本文整理汇总了C#中IMatrix.GetRow方法的典型用法代码示例。如果您正苦于以下问题:C# IMatrix.GetRow方法的具体用法?C# IMatrix.GetRow怎么用?C# IMatrix.GetRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMatrix
的用法示例。
在下文中一共展示了IMatrix.GetRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
/// <summary>
/// Builds the dot.file with the directed graph (includes: nodes and cots)
/// </summary>
public void Build(double[,] _points, IMatrix _matrix, String _fileName)
{
double[] nodes = new Double[number];
Row row = new Row(nodes);
FILE_NAME = _fileName;
if (File.Exists(FILE_NAME))
{
Console.WriteLine("{0} already exists.", FILE_NAME);
return;
}
StreamWriter sr = File.CreateText(FILE_NAME);
sr.WriteLine(" digraph G {\n size =\"" + number + "," + number + "\";");
for (int i = 0; i < number; i++)
{
row = _matrix.GetRow(i);
for (int j = 0; j < row.Length; j++)
{
if (row.Values[j] != -1)
{
if (_points == null)
{
if ((Double)_points.GetValue(i, j) > 0.0)
sr.WriteLine(" " + (i + 1) + " -> " + (j + 1) + " [label=\"" + row.Values[j] + "\",color=red];");
else
sr.WriteLine(" " + (i + 1) + " -> " + (j + 1) + " [label=\"" + row.Values[j] + "\"];");
}
else
sr.WriteLine(" " + (i + 1) + " -> " + (j + 1) + " [label=\"" + row.Values[j] + "\"];");
}
}
}
sr.WriteLine(" }");
sr.Close();
}