本文整理汇总了C++中SiconosMatrix::zero_mat方法的典型用法代码示例。如果您正苦于以下问题:C++ SiconosMatrix::zero_mat方法的具体用法?C++ SiconosMatrix::zero_mat怎么用?C++ SiconosMatrix::zero_mat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiconosMatrix
的用法示例。
在下文中一共展示了SiconosMatrix::zero_mat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SimpleMatrix
//.........这里部分代码省略.........
return (DenseMat)(*A.dense() - *B.triang());
else if (numB == 3)
return (DenseMat)(*A.dense() - *B.sym());
else if (numB == 4)
return (DenseMat)(*A.dense() - *B.sparse());
else if (numB == 5)
return (DenseMat)(*A.dense() - *B.banded());
else // if(numB ==7)
return (DenseMat)(*A.dense() - *B.identity());
}
else if (numA == 2)
{
if (numB == 1)
return (DenseMat)(*A.triang() - *B.dense());
else if (numB == 3)
return (DenseMat)(*A.triang() - *B.sym());
else if (numB == 4)
return (DenseMat)(*A.triang() - *B.sparse());
else if (numB == 5)
return (DenseMat)(*A.triang() - *B.banded());
else // if(numB ==7:
return (DenseMat)(*A.triang() - *B.identity());
}
else if (numA == 3)
{
if (numB == 1)
return (DenseMat)(*A.sym() - *B.dense());
else if (numB == 2)
return (DenseMat)(*A.sym() - *B.triang());
else if (numB == 4)
return (DenseMat)(*A.sym() - *B.sparse());
else if (numB == 5)
return (DenseMat)(*A.sym() - *B.banded());
else // if(numB ==7)
return (DenseMat)(*A.sym() - *B.identity());
}
else if (numA == 4)
{
if (numB == 1)
return (DenseMat)(*A.sparse() - *B.dense());
else if (numB == 2)
return (DenseMat)(*A.sparse() - *B.triang());
else if (numB == 3)
return (DenseMat)(*A.sparse() - *B.sym());
else if (numB == 5)
return (DenseMat)(*A.sparse() - *B.banded());
else // if(numB ==7)
return (DenseMat)(*A.sparse() - *B.identity());
}
else if (numA == 5)
{
if (numB == 1)
return (DenseMat)(*A.banded() - *B.dense());
else if (numB == 2)
return (DenseMat)(*A.banded() - *B.triang());
else if (numB == 3)
return (DenseMat)(*A.banded() - *B.sym());
else if (numB == 4)
return (DenseMat)(*A.banded() - *B.sparse());
else //if(numB ==7)
return (DenseMat)(*A.banded() - *B.identity());
}
else if (numA == 6)
{
if (numB == 1)
return (DenseMat)(*A.zero_mat() - *B.dense());
else if (numB == 2)
return (DenseMat)(*A.zero_mat() - *B.triang());
else if (numB == 3)
return (DenseMat)(*A.zero_mat() - *B.sym());
else if (numB == 4)
return (DenseMat)(*A.zero_mat() - *B.sparse());
else //if(numB ==7)
return (DenseMat)(*A.zero_mat() - *B.identity());
}
else //if(numA==7)
{
if (numB == 1)
return (DenseMat)(*A.identity() - *B.dense());
else if (numB == 2)
return (DenseMat)(*A.identity() - *B.triang());
else if (numB == 3)
return (DenseMat)(*A.identity() - *B.sym());
else if (numB == 4)
return (DenseMat)(*A.identity() - *B.sparse());
else //if(numB ==5)
return (DenseMat)(*A.identity() - *B.banded());
}
}
else // A and/or B are/is Block
{
SimpleMatrix tmp(A);
tmp -= B;
return tmp;
}
}