本文整理汇总了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);
}
}
示例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;
}
示例3: removeLabels
public static Matrix<float> removeLabels(Matrix<float> matrix)
{
return matrix.RemoveColumn(matrix.ColumnCount-1);
}
示例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;
}