public void DefineMatrix(IMutableMatrixEx M) { if (M.RowPartitioning.TotalLength != M.ColPartition.TotalLength) { throw new ArgumentException("Matrix must be symmetric."); } this.Matrix = M.ToMsrMatrix(); }
/// <summary> /// sets the matrix of the solver /// </summary> virtual public void DefineMatrix(IMutableMatrixEx _M) { using (new FuncTrace()) { MsrMatrix M = _M as MsrMatrix; if (M == null) { // provisorium, geht sicher besser M = _M.ToMsrMatrix(); } if (M.RowPartitioning.TotalLength != M.NoOfCols) { throw new ArgumentException("Matrix has to be quadratic.", "_M"); } m_Matrix = Device.CreateMatrix(M, m_MatrixType); } }
public void DefineMatrix(IMutableMatrixEx M) { Mtx = M.ToMsrMatrix(); }