Home | History | Annotate | Download | only in SparseLU

Lines Matching full:matrix

30   * scalar type of your input matrix. 
38 * (and eventually the rows) of the matrix to reduce the number of new elements that are created during
57 * \warning The input matrix A should be in a \b compressed and \b column-major form.
58 * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
60 * \note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix.
65 * \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<>
83 typedef Matrix<Scalar,Dynamic,1> ScalarVector;
84 typedef Matrix<Index,Dynamic,1> IndexVector;
93 SparseLU(const MatrixType& matrix):m_isInitialized(true),m_lastError(""),m_Ustore(0,0,0,0,0,0),m_symmetricmode(false),m_diagpivotthresh(1.0),m_detPermR(1)
96 compute(matrix);
104 void analyzePattern (const MatrixType& matrix);
105 void factorize (const MatrixType& matrix);
106 void simplicialfactorize(const MatrixType& matrix);
109 * Compute the symbolic and numeric factorization of the input sparse matrix.
110 * The input matrix should be in column-major storage.
112 void compute (const MatrixType& matrix)
115 analyzePattern(matrix);
117 factorize(matrix);
122 /** Indicate that the pattern of the input matrix is symmetric */
128 /** \returns an expression of the matrix L, internally stored as supernodes
138 /** \returns an expression of the matrix U,
150 * \returns a reference to the row matrix permutation \f$ P_r \f$ such that \f$P_r A P_c^T = L U\f$
158 * \returns a reference to the column matrix permutation\f$ P_c^T \f$ such that \f$P_r A P_c^T = L U\f$
173 * \warning the destination matrix X in X = this->solve(B) must be colmun-major.
182 && "SparseLU::solve(): invalid number of rows of the right hand side matrix B");
195 && "SparseLU::solve(): invalid number of rows of the right hand side matrix B");
203 * \c InvalidInput if the input matrix is invalid
225 eigen_assert(m_factorizationIsOk && "The matrix should be factorized first");
249 * \returns the absolute value of the determinant of the matrix of which
260 eigen_assert(m_factorizationIsOk && "The matrix should be factorized first.");
261 // Initialize with the determinant of the row matrix
280 /** \returns the natural log of the absolute value of the determinant of the matrix
290 eigen_assert(m_factorizationIsOk && "The matrix should be factorized first.");
313 eigen_assert(m_factorizationIsOk && "The matrix should be factorized first.");
335 NCMatrix m_mat; // The input (permuted ) matrix
336 SCMatrix m_Lstore; // The lower triangular matrix (supernodal)
337 MappedSparseMatrix<Scalar,ColMajor,Index> m_Ustore; // The upper triangular matrix
350 Index m_detPermR; // Determinant of the coefficient matrix
363 * - Apply this permutation to the input matrix -
365 * - Compute the column elimination tree on the permuted matrix
374 //TODO It is possible as in SuperLU to compute row and columns scaling vectors to equilibrate the matrix mat.
379 // Apply the permutation to the column of the input matrix
380 //First copy the whole input matrix.
400 // Compute the column elimination tree of the permuted matrix
417 // Postmultiply A*Pc by post, i.e reorder the matrix according to the postorder of the etree
454 void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix)
458 eigen_assert((matrix.rows() == matrix.cols()) && "Only for squared matrices");
464 // m_mat = matrix * m_perm_c.inverse();
465 m_mat = matrix;
471 if (matrix.isCompressed()) outerIndexPtr = matrix.outerIndexPtr();
474 Index* outerIndexPtr_t = new Index[matrix.cols()+1];
475 for(Index i = 0; i <= matrix.cols(); i++) outerIndexPtr_t[i] = m_mat.outerIndexPtr()[i];
478 for (Index i = 0; i < matrix.cols(); i++)
483 if(!matrix.isCompressed()) delete[] outerIndexPtr;
487 m_perm_c.resize(matrix.cols());
488 for(Index i = 0; i < matrix.cols(); ++i) m_perm_c.indices()(i) = i;
547 Index pivrow; // Pivotal row number in the original row matrix
616 m_lastError = "THE MATRIX IS STRUCTURALLY SINGULAR ... ZERO COLUMN AT ";
625 // Update the determinant of the row permutation matrix
646 // Create supernode matrix L
648 // Create the column major upper sparse matrix U;
704 Map<const Matrix<Scalar,Dynamic,Dynamic>, 0, OuterStride<> > A( &(m_mapL.valuePtr()[luptr]), nsupc, nsupc, OuterStride<>(lda) );
705 Map< Matrix<Scalar,Dynamic,Dynamic>, 0, OuterStride<> > U (&(X(fsupc,0)), nsupc, nrhs, OuterStride<>(n) );