Example #1
0
 public void DefineMatrix(IMutableMatrixEx M)
 {
     if (M.RowPartitioning.TotalLength != M.ColPartition.TotalLength)
     {
         throw new ArgumentException("Matrix must be symmetric.");
     }
     this.Matrix = M.ToMsrMatrix();
 }
Example #2
0
        /// <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);
            }
        }
Example #3
0
 public void DefineMatrix(IMutableMatrixEx M)
 {
     Mtx = M.ToMsrMatrix();
 }