本文整理汇总了C#中DotNetMatrix.GeneralMatrix.SetMatrix方法的典型用法代码示例。如果您正苦于以下问题:C# GeneralMatrix.SetMatrix方法的具体用法?C# GeneralMatrix.SetMatrix怎么用?C# GeneralMatrix.SetMatrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetMatrix.GeneralMatrix
的用法示例。
在下文中一共展示了GeneralMatrix.SetMatrix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
{
try_success("set(int,int,double)... OutofBoundsException... ", "");
System.Console.Out.WriteLine(e1.Message);
}
}
catch (System.ArgumentException e1)
{
errorCount = try_failure(errorCount, "set(int,int,double)... ", "OutOfBoundsException expected but not thrown");
System.Console.Out.WriteLine(e1.Message);
}
try
{
B.SetElement(ib, jb, 0.0);
tmp = B.GetElement(ib, jb);
try
{
check(tmp, 0.0);
try_success("set(int,int,double)... ", "");
}
catch (System.SystemException e)
{
errorCount = try_failure(errorCount, "set(int,int,double)... ", "GeneralMatrix element not successfully set");
System.Console.Out.WriteLine(e.Message);
}
}
catch (System.IndexOutOfRangeException e1)
{
errorCount = try_failure(errorCount, "set(int,int,double)... ", "Unexpected ArrayIndexOutOfBoundsException");
System.Console.Out.WriteLine(e1.Message);
}
M = new GeneralMatrix(2, 3, 0.0);
try
{
B.SetMatrix(ib, ie + B.RowDimension + 1, jb, je, M);
errorCount = try_failure(errorCount, "SetMatrix(int,int,int,int,GeneralMatrix)... ", "ArrayIndexOutOfBoundsException expected but not thrown");
}
catch (System.IndexOutOfRangeException e)
{
System.Console.Out.WriteLine(e.Message);
try
{
B.SetMatrix(ib, ie, jb, je + B.ColumnDimension + 1, M);
errorCount = try_failure(errorCount, "SetMatrix(int,int,int,int,GeneralMatrix)... ", "ArrayIndexOutOfBoundsException expected but not thrown");
}
catch (System.IndexOutOfRangeException e1)
{
try_success("SetMatrix(int,int,int,int,GeneralMatrix)... ArrayIndexOutOfBoundsException... ", "");
System.Console.Out.WriteLine(e1.Message);
}
}
catch (System.ArgumentException e1)
{
errorCount = try_failure(errorCount, "SetMatrix(int,int,int,int,GeneralMatrix)... ", "ArrayIndexOutOfBoundsException expected but not thrown");
System.Console.Out.WriteLine(e1.Message);
}
try
{
B.SetMatrix(ib, ie, jb, je, M);
try
{
check(M.Subtract(B.GetMatrix(ib, ie, jb, je)), M);
try_success("SetMatrix(int,int,int,int,GeneralMatrix)... ", "");
}
catch (System.SystemException e)
{
errorCount = try_failure(errorCount, "SetMatrix(int,int,int,int,GeneralMatrix)... ", "submatrix not successfully set");