当前位置: 首页>>代码示例>>C#>>正文


C# Matrix.RemoveColumn方法代码示例

本文整理汇总了C#中Matrix.RemoveColumn方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.RemoveColumn方法的具体用法?C# Matrix.RemoveColumn怎么用?C# Matrix.RemoveColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Matrix的用法示例。


在下文中一共展示了Matrix.RemoveColumn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: persistOriginalAndReconstruction

        public static void persistOriginalAndReconstruction(int width, int height, Matrix<float> original, Matrix<float> reconstruction, String dirPath)
        {
            Matrix<float> originalCropped = original.RemoveColumn(0);
            Matrix<float> reconstructionCropped = reconstruction.RemoveColumn(0);

            for (int row = 0; row < original.RowCount; ++row)
            {
                String originalOutput = dirPath + "\\" + row + "_original.png";
                String reconstructionOutput = dirPath + "\\" + row + "_reconstruction.png";
                persistPatch(originalCropped.Row(row).ToArray(), width, height, originalOutput);
                persistPatch(reconstructionCropped.Row(row).ToArray(), width, height, reconstructionOutput);
            }
        }
开发者ID:Gnork,项目名称:StromaFramework,代码行数:13,代码来源:ImageHelper.cs

示例2: Weight2

        public static double Weight2(Matrix<double> v, int index)
        {
            if (v.ColumnCount == 1)
                return 1;

            double sum2 = 0;
            Matrix<double> temp2 = v.RemoveColumn(index).RemoveRow(index);
            for (int c = 0; c < temp2.ColumnCount; c++)
            {
                int tmp = c;
                if (c >= index)
                    tmp = c + 1;
                int h = 0;
                while (h == index)
                    h = h + 1;
                sum2 = sum2 + (v[tmp, index] - v[tmp, h]) * Weight(temp2, c);
            }
            return sum2;
        }
开发者ID:rospoly,项目名称:F-Formation,代码行数:19,代码来源:DominantSet.cs

示例3: removeLabels

 public static Matrix<float> removeLabels(Matrix<float> matrix)
 {
     return matrix.RemoveColumn(matrix.ColumnCount-1);
 }
开发者ID:Gnork,项目名称:StromaFramework,代码行数:4,代码来源:MatrixHelper.cs

示例4: Weight

        public static double Weight(Matrix<double> v, int index)
        {
            if (v.ColumnCount == 1)
                return 1;

            Matrix<double> temp = v.RemoveColumn(index).RemoveRow(index);
            double sum = 0;
            for (int c = 0; c < temp.ColumnCount; c++)
            {
                int tmp = c;
                if (c >= index)
                    tmp = c + 1;
                sum = sum + (RelativeAffinity(temp, c, v[tmp, index]) * Weight(temp, c));
            }
            return sum;
        }
开发者ID:rospoly,项目名称:F-Formation,代码行数:16,代码来源:DominantSet.cs


注:本文中的Matrix.RemoveColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。