mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix several documentation issues
This commit is contained in:
parent
f450303321
commit
f41d96deb9
@ -143,7 +143,7 @@ template<typename Derived> class ArrayBase
|
|||||||
ArrayBase<Derived>& array() { return *this; }
|
ArrayBase<Derived>& array() { return *this; }
|
||||||
const ArrayBase<Derived>& array() const { return *this; }
|
const ArrayBase<Derived>& array() const { return *this; }
|
||||||
|
|
||||||
/** \returns an \link MatrixBase Matrix \endlink expression of this array
|
/** \returns an \link Eigen::MatrixBase Matrix \endlink expression of this array
|
||||||
* \sa MatrixBase::array() */
|
* \sa MatrixBase::array() */
|
||||||
MatrixWrapper<Derived> matrix() { return derived(); }
|
MatrixWrapper<Derived> matrix() { return derived(); }
|
||||||
const MatrixWrapper<const Derived> matrix() const { return derived(); }
|
const MatrixWrapper<const Derived> matrix() const { return derived(); }
|
||||||
|
@ -163,11 +163,11 @@ DenseBase<Derived>::NullaryExpr(const CustomNullaryOp& func)
|
|||||||
|
|
||||||
/** \returns an expression of a constant matrix of value \a value
|
/** \returns an expression of a constant matrix of value \a value
|
||||||
*
|
*
|
||||||
* The parameters \a rows and \a cols are the number of rows and of columns of
|
* The parameters \a nbRows and \a nbCols are the number of rows and of columns of
|
||||||
* the returned matrix. Must be compatible with this DenseBase type.
|
* the returned matrix. Must be compatible with this DenseBase type.
|
||||||
*
|
*
|
||||||
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
||||||
* it is redundant to pass \a rows and \a cols as arguments, so Zero() should be used
|
* it is redundant to pass \a nbRows and \a nbCols as arguments, so Zero() should be used
|
||||||
* instead.
|
* instead.
|
||||||
*
|
*
|
||||||
* The template parameter \a CustomNullaryOp is the type of the functor.
|
* The template parameter \a CustomNullaryOp is the type of the functor.
|
||||||
@ -176,9 +176,9 @@ DenseBase<Derived>::NullaryExpr(const CustomNullaryOp& func)
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
||||||
DenseBase<Derived>::Constant(Index rows, Index cols, const Scalar& value)
|
DenseBase<Derived>::Constant(Index nbRows, Index nbCols, const Scalar& value)
|
||||||
{
|
{
|
||||||
return DenseBase<Derived>::NullaryExpr(rows, cols, internal::scalar_constant_op<Scalar>(value));
|
return DenseBase<Derived>::NullaryExpr(nbRows, nbCols, internal::scalar_constant_op<Scalar>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of a constant matrix of value \a value
|
/** \returns an expression of a constant matrix of value \a value
|
||||||
@ -292,7 +292,7 @@ DenseBase<Derived>::LinSpaced(const Scalar& low, const Scalar& high)
|
|||||||
return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar,true>(low,high,Derived::SizeAtCompileTime));
|
return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar,true>(low,high,Derived::SizeAtCompileTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns true if all coefficients in this matrix are approximately equal to \a value, to within precision \a prec */
|
/** \returns true if all coefficients in this matrix are approximately equal to \a val, to within precision \a prec */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
bool DenseBase<Derived>::isApproxToConstant
|
bool DenseBase<Derived>::isApproxToConstant
|
||||||
(const Scalar& val, const RealScalar& prec) const
|
(const Scalar& val, const RealScalar& prec) const
|
||||||
@ -314,7 +314,7 @@ bool DenseBase<Derived>::isConstant
|
|||||||
return isApproxToConstant(val, prec);
|
return isApproxToConstant(val, prec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Alias for setConstant(): sets all coefficients in this expression to \a value.
|
/** Alias for setConstant(): sets all coefficients in this expression to \a val.
|
||||||
*
|
*
|
||||||
* \sa setConstant(), Constant(), class CwiseNullaryOp
|
* \sa setConstant(), Constant(), class CwiseNullaryOp
|
||||||
*/
|
*/
|
||||||
@ -353,9 +353,9 @@ PlainObjectBase<Derived>::setConstant(Index size, const Scalar& val)
|
|||||||
|
|
||||||
/** Resizes to the given size, and sets all coefficients in this expression to the given \a value.
|
/** Resizes to the given size, and sets all coefficients in this expression to the given \a value.
|
||||||
*
|
*
|
||||||
* \param rows the new number of rows
|
* \param nbRows the new number of rows
|
||||||
* \param cols the new number of columns
|
* \param nbCols the new number of columns
|
||||||
* \param value the value to which all coefficients are set
|
* \param val the value to which all coefficients are set
|
||||||
*
|
*
|
||||||
* Example: \include Matrix_setConstant_int_int.cpp
|
* Example: \include Matrix_setConstant_int_int.cpp
|
||||||
* Output: \verbinclude Matrix_setConstant_int_int.out
|
* Output: \verbinclude Matrix_setConstant_int_int.out
|
||||||
@ -520,8 +520,8 @@ PlainObjectBase<Derived>::setZero(Index newSize)
|
|||||||
|
|
||||||
/** Resizes to the given size, and sets all coefficients in this expression to zero.
|
/** Resizes to the given size, and sets all coefficients in this expression to zero.
|
||||||
*
|
*
|
||||||
* \param rows the new number of rows
|
* \param nbRows the new number of rows
|
||||||
* \param cols the new number of columns
|
* \param nbCols the new number of columns
|
||||||
*
|
*
|
||||||
* Example: \include Matrix_setZero_int_int.cpp
|
* Example: \include Matrix_setZero_int_int.cpp
|
||||||
* Output: \verbinclude Matrix_setZero_int_int.out
|
* Output: \verbinclude Matrix_setZero_int_int.out
|
||||||
@ -540,7 +540,7 @@ PlainObjectBase<Derived>::setZero(Index nbRows, Index nbCols)
|
|||||||
|
|
||||||
/** \returns an expression of a matrix where all coefficients equal one.
|
/** \returns an expression of a matrix where all coefficients equal one.
|
||||||
*
|
*
|
||||||
* The parameters \a rows and \a cols are the number of rows and of columns of
|
* The parameters \a nbRows and \a nbCols are the number of rows and of columns of
|
||||||
* the returned matrix. Must be compatible with this MatrixBase type.
|
* the returned matrix. Must be compatible with this MatrixBase type.
|
||||||
*
|
*
|
||||||
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
||||||
@ -561,7 +561,7 @@ DenseBase<Derived>::Ones(Index nbRows, Index nbCols)
|
|||||||
|
|
||||||
/** \returns an expression of a vector where all coefficients equal one.
|
/** \returns an expression of a vector where all coefficients equal one.
|
||||||
*
|
*
|
||||||
* The parameter \a size is the size of the returned vector.
|
* The parameter \a newSize is the size of the returned vector.
|
||||||
* Must be compatible with this MatrixBase type.
|
* Must be compatible with this MatrixBase type.
|
||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
@ -627,7 +627,7 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setOnes()
|
|||||||
return setConstant(Scalar(1));
|
return setConstant(Scalar(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resizes to the given \a size, and sets all coefficients in this expression to one.
|
/** Resizes to the given \a newSize, and sets all coefficients in this expression to one.
|
||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
@ -646,8 +646,8 @@ PlainObjectBase<Derived>::setOnes(Index newSize)
|
|||||||
|
|
||||||
/** Resizes to the given size, and sets all coefficients in this expression to one.
|
/** Resizes to the given size, and sets all coefficients in this expression to one.
|
||||||
*
|
*
|
||||||
* \param rows the new number of rows
|
* \param nbRows the new number of rows
|
||||||
* \param cols the new number of columns
|
* \param nbCols the new number of columns
|
||||||
*
|
*
|
||||||
* Example: \include Matrix_setOnes_int_int.cpp
|
* Example: \include Matrix_setOnes_int_int.cpp
|
||||||
* Output: \verbinclude Matrix_setOnes_int_int.out
|
* Output: \verbinclude Matrix_setOnes_int_int.out
|
||||||
@ -666,7 +666,7 @@ PlainObjectBase<Derived>::setOnes(Index nbRows, Index nbCols)
|
|||||||
|
|
||||||
/** \returns an expression of the identity matrix (not necessarily square).
|
/** \returns an expression of the identity matrix (not necessarily square).
|
||||||
*
|
*
|
||||||
* The parameters \a rows and \a cols are the number of rows and of columns of
|
* The parameters \a nbRows and \a nbCols are the number of rows and of columns of
|
||||||
* the returned matrix. Must be compatible with this MatrixBase type.
|
* the returned matrix. Must be compatible with this MatrixBase type.
|
||||||
*
|
*
|
||||||
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
* This variant is meant to be used for dynamic-size matrix types. For fixed-size types,
|
||||||
@ -776,8 +776,8 @@ EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity()
|
|||||||
|
|
||||||
/** \brief Resizes to the given size, and writes the identity expression (not necessarily square) into *this.
|
/** \brief Resizes to the given size, and writes the identity expression (not necessarily square) into *this.
|
||||||
*
|
*
|
||||||
* \param rows the new number of rows
|
* \param nbRows the new number of rows
|
||||||
* \param cols the new number of columns
|
* \param nbCols the new number of columns
|
||||||
*
|
*
|
||||||
* Example: \include Matrix_setIdentity_int_int.cpp
|
* Example: \include Matrix_setIdentity_int_int.cpp
|
||||||
* Output: \verbinclude Matrix_setIdentity_int_int.out
|
* Output: \verbinclude Matrix_setIdentity_int_int.out
|
||||||
|
@ -56,9 +56,14 @@ class DiagonalBase : public EigenBase<Derived>
|
|||||||
inline Index rows() const { return diagonal().size(); }
|
inline Index rows() const { return diagonal().size(); }
|
||||||
inline Index cols() const { return diagonal().size(); }
|
inline Index cols() const { return diagonal().size(); }
|
||||||
|
|
||||||
|
/** \returns the diagonal matrix product of \c *this by the matrix \a matrix.
|
||||||
|
*/
|
||||||
template<typename MatrixDerived>
|
template<typename MatrixDerived>
|
||||||
const DiagonalProduct<MatrixDerived, Derived, OnTheLeft>
|
const DiagonalProduct<MatrixDerived, Derived, OnTheLeft>
|
||||||
operator*(const MatrixBase<MatrixDerived> &matrix) const;
|
operator*(const MatrixBase<MatrixDerived> &matrix) const
|
||||||
|
{
|
||||||
|
return DiagonalProduct<MatrixDerived, Derived, OnTheLeft>(matrix.derived(), derived());
|
||||||
|
}
|
||||||
|
|
||||||
inline const DiagonalWrapper<const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const DiagonalVectorType> >
|
inline const DiagonalWrapper<const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const DiagonalVectorType> >
|
||||||
inverse() const
|
inverse() const
|
||||||
|
@ -108,16 +108,6 @@ MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal)
|
|||||||
return DiagonalProduct<Derived, DiagonalDerived, OnTheRight>(derived(), a_diagonal.derived());
|
return DiagonalProduct<Derived, DiagonalDerived, OnTheRight>(derived(), a_diagonal.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the diagonal matrix product of \c *this by the matrix \a matrix.
|
|
||||||
*/
|
|
||||||
template<typename DiagonalDerived>
|
|
||||||
template<typename MatrixDerived>
|
|
||||||
inline const DiagonalProduct<MatrixDerived, DiagonalDerived, OnTheLeft>
|
|
||||||
DiagonalBase<DiagonalDerived>::operator*(const MatrixBase<MatrixDerived> &matrix) const
|
|
||||||
{
|
|
||||||
return DiagonalProduct<MatrixDerived, DiagonalDerived, OnTheLeft>(matrix.derived(), derived());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
|
||||||
#endif // EIGEN_DIAGONALPRODUCT_H
|
#endif // EIGEN_DIAGONALPRODUCT_H
|
||||||
|
@ -139,7 +139,8 @@ MatrixBase<Derived>::operator*=(const EigenBase<OtherDerived> &other)
|
|||||||
return derived();
|
return derived();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=() */
|
/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=().
|
||||||
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline void MatrixBase<Derived>::applyOnTheRight(const EigenBase<OtherDerived> &other)
|
inline void MatrixBase<Derived>::applyOnTheRight(const EigenBase<OtherDerived> &other)
|
||||||
|
@ -133,20 +133,20 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
|
|||||||
|
|
||||||
/** Constructor in the fixed-size case.
|
/** Constructor in the fixed-size case.
|
||||||
*
|
*
|
||||||
* \param data pointer to the array to map
|
* \param dataPtr pointer to the array to map
|
||||||
* \param stride optional Stride object, passing the strides.
|
* \param a_stride optional Stride object, passing the strides.
|
||||||
*/
|
*/
|
||||||
inline Map(PointerArgType data, const StrideType& stride = StrideType())
|
inline Map(PointerArgType dataPtr, const StrideType& a_stride = StrideType())
|
||||||
: Base(cast_to_pointer_type(data)), m_stride(stride)
|
: Base(cast_to_pointer_type(dataPtr)), m_stride(a_stride)
|
||||||
{
|
{
|
||||||
PlainObjectType::Base::_check_template_params();
|
PlainObjectType::Base::_check_template_params();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Constructor in the dynamic-size vector case.
|
/** Constructor in the dynamic-size vector case.
|
||||||
*
|
*
|
||||||
* \param data pointer to the array to map
|
* \param dataPtr pointer to the array to map
|
||||||
* \param size the size of the vector expression
|
* \param a_size the size of the vector expression
|
||||||
* \param stride optional Stride object, passing the strides.
|
* \param a_stride optional Stride object, passing the strides.
|
||||||
*/
|
*/
|
||||||
inline Map(PointerArgType dataPtr, Index a_size, const StrideType& a_stride = StrideType())
|
inline Map(PointerArgType dataPtr, Index a_size, const StrideType& a_stride = StrideType())
|
||||||
: Base(cast_to_pointer_type(dataPtr), a_size), m_stride(a_stride)
|
: Base(cast_to_pointer_type(dataPtr), a_size), m_stride(a_stride)
|
||||||
@ -156,10 +156,10 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
|
|||||||
|
|
||||||
/** Constructor in the dynamic-size matrix case.
|
/** Constructor in the dynamic-size matrix case.
|
||||||
*
|
*
|
||||||
* \param data pointer to the array to map
|
* \param dataPtr pointer to the array to map
|
||||||
* \param rows the number of rows of the matrix expression
|
* \param nbRows the number of rows of the matrix expression
|
||||||
* \param cols the number of columns of the matrix expression
|
* \param nbCols the number of columns of the matrix expression
|
||||||
* \param stride optional Stride object, passing the strides.
|
* \param a_stride optional Stride object, passing the strides.
|
||||||
*/
|
*/
|
||||||
inline Map(PointerArgType dataPtr, Index nbRows, Index nbCols, const StrideType& a_stride = StrideType())
|
inline Map(PointerArgType dataPtr, Index nbRows, Index nbCols, const StrideType& a_stride = StrideType())
|
||||||
: Base(cast_to_pointer_type(dataPtr), nbRows, nbCols), m_stride(a_stride)
|
: Base(cast_to_pointer_type(dataPtr), nbRows, nbCols), m_stride(a_stride)
|
||||||
|
@ -317,7 +317,7 @@ template<typename Derived> class MatrixBase
|
|||||||
MatrixBase<Derived>& matrix() { return *this; }
|
MatrixBase<Derived>& matrix() { return *this; }
|
||||||
const MatrixBase<Derived>& matrix() const { return *this; }
|
const MatrixBase<Derived>& matrix() const { return *this; }
|
||||||
|
|
||||||
/** \returns an \link ArrayBase Array \endlink expression of this matrix
|
/** \returns an \link Eigen::ArrayBase Array \endlink expression of this matrix
|
||||||
* \sa ArrayBase::matrix() */
|
* \sa ArrayBase::matrix() */
|
||||||
ArrayWrapper<Derived> array() { return derived(); }
|
ArrayWrapper<Derived> array() { return derived(); }
|
||||||
const ArrayWrapper<const Derived> array() const { return derived(); }
|
const ArrayWrapper<const Derived> array() const { return derived(); }
|
||||||
|
@ -112,7 +112,7 @@ inline Derived& DenseBase<Derived>::setRandom()
|
|||||||
return *this = Random(rows(), cols());
|
return *this = Random(rows(), cols());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resizes to the given \a size, and sets all coefficients in this expression to random values.
|
/** Resizes to the given \a newSize, and sets all coefficients in this expression to random values.
|
||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
@ -123,16 +123,16 @@ inline Derived& DenseBase<Derived>::setRandom()
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE Derived&
|
EIGEN_STRONG_INLINE Derived&
|
||||||
PlainObjectBase<Derived>::setRandom(Index size)
|
PlainObjectBase<Derived>::setRandom(Index newSize)
|
||||||
{
|
{
|
||||||
resize(size);
|
resize(newSize);
|
||||||
return setRandom();
|
return setRandom();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resizes to the given size, and sets all coefficients in this expression to random values.
|
/** Resizes to the given size, and sets all coefficients in this expression to random values.
|
||||||
*
|
*
|
||||||
* \param rows the new number of rows
|
* \param nbRows the new number of rows
|
||||||
* \param cols the new number of columns
|
* \param nbCols the new number of columns
|
||||||
*
|
*
|
||||||
* Example: \include Matrix_setRandom_int_int.cpp
|
* Example: \include Matrix_setRandom_int_int.cpp
|
||||||
* Output: \verbinclude Matrix_setRandom_int_int.out
|
* Output: \verbinclude Matrix_setRandom_int_int.out
|
||||||
|
@ -264,9 +264,9 @@ enum {
|
|||||||
ColMajor = 0,
|
ColMajor = 0,
|
||||||
/** Storage order is row major (see \ref TopicStorageOrders). */
|
/** Storage order is row major (see \ref TopicStorageOrders). */
|
||||||
RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
|
RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
|
||||||
/** \internal Align the matrix itself if it is vectorizable fixed-size */
|
/** Align the matrix itself if it is vectorizable fixed-size */
|
||||||
AutoAlign = 0,
|
AutoAlign = 0,
|
||||||
/** \internal Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned) */ // FIXME --- clarify the situation
|
/** Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned) */ // FIXME --- clarify the situation
|
||||||
DontAlign = 0x2
|
DontAlign = 0x2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1121,7 +1121,7 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Fill the matrix \c *this with the list of \em triplets defined by the iterator range \a begin - \b.
|
/** Fill the matrix \c *this with the list of \em triplets defined by the iterator range \a begin - \a end.
|
||||||
*
|
*
|
||||||
* A \em triplet is a tuple (i,j,value) defining a non-zero element.
|
* A \em triplet is a tuple (i,j,value) defining a non-zero element.
|
||||||
* The input list of triplets does not have to be sorted, and can contains duplicated elements.
|
* The input list of triplets does not have to be sorted, and can contains duplicated elements.
|
||||||
|
@ -38,7 +38,7 @@ namespace Eigen {
|
|||||||
* An important parameter of this class is the ordering method. It is used to reorder the columns
|
* An important parameter of this class is the ordering method. It is used to reorder the columns
|
||||||
* (and eventually the rows) of the matrix to reduce the number of new elements that are created during
|
* (and eventually the rows) of the matrix to reduce the number of new elements that are created during
|
||||||
* numerical factorization. The cheapest method available is COLAMD.
|
* numerical factorization. The cheapest method available is COLAMD.
|
||||||
* See \link Ordering_Modules the Ordering module \endlink for the list of
|
* See \link OrderingMethods_Module the OrderingMethods module \endlink for the list of
|
||||||
* built-in and external ordering methods.
|
* built-in and external ordering methods.
|
||||||
*
|
*
|
||||||
* Simple example with key steps
|
* Simple example with key steps
|
||||||
@ -55,10 +55,10 @@ namespace Eigen {
|
|||||||
* x = solver.solve(b);
|
* x = solver.solve(b);
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* \WARNING The input matrix A should be in a \b compressed and \b column-major form.
|
* \warning The input matrix A should be in a \b compressed and \b column-major form.
|
||||||
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
||||||
*
|
*
|
||||||
* \NOTE Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix.
|
* \note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix.
|
||||||
* For badly scaled matrices, this step can be useful to reduce the pivoting during factorization.
|
* For badly scaled matrices, this step can be useful to reduce the pivoting during factorization.
|
||||||
* If this is the case for your matrices, you can try the basic scaling method at
|
* If this is the case for your matrices, you can try the basic scaling method at
|
||||||
* "unsupported/Eigen/src/IterativeSolvers/Scaling.h"
|
* "unsupported/Eigen/src/IterativeSolvers/Scaling.h"
|
||||||
@ -68,7 +68,7 @@ namespace Eigen {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \sa \ref TutorialSparseDirectSolvers
|
* \sa \ref TutorialSparseDirectSolvers
|
||||||
* \sa \ref Ordering_Modules
|
* \sa \ref OrderingMethods_Module
|
||||||
*/
|
*/
|
||||||
template <typename _MatrixType, typename _OrderingType>
|
template <typename _MatrixType, typename _OrderingType>
|
||||||
class SparseLU
|
class SparseLU
|
||||||
|
@ -44,10 +44,10 @@
|
|||||||
/**
|
/**
|
||||||
* Expand the existing storage to accomodate more fill-ins
|
* Expand the existing storage to accomodate more fill-ins
|
||||||
* \param vec Valid pointer to the vector to allocate or expand
|
* \param vec Valid pointer to the vector to allocate or expand
|
||||||
* \param [in,out]length At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector
|
* \param[in,out] length At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector
|
||||||
* \param [in]nbElts Current number of elements in the factors
|
* \param[in] nbElts Current number of elements in the factors
|
||||||
* \param keep_prev 1: use length and do not expand the vector; 0: compute new_len and expand
|
* \param keep_prev 1: use length and do not expand the vector; 0: compute new_len and expand
|
||||||
* \param [in,out]num_expansions Number of times the memory has been expanded
|
* \param[in,out] num_expansions Number of times the memory has been expanded
|
||||||
*/
|
*/
|
||||||
template <typename Scalar, typename Index>
|
template <typename Scalar, typename Index>
|
||||||
template <typename VectorType>
|
template <typename VectorType>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* \brief Performs numeric block updates from a given supernode to a single column
|
* \brief Performs numeric block updates from a given supernode to a single column
|
||||||
*
|
*
|
||||||
* \param segsize Size of the segment (and blocks ) to use for updates
|
* \param segsize Size of the segment (and blocks ) to use for updates
|
||||||
* \param [in,out]dense Packed values of the original matrix
|
* \param[in,out] dense Packed values of the original matrix
|
||||||
* \param tempv temporary vector to use for updates
|
* \param tempv temporary vector to use for updates
|
||||||
* \param lusup array containing the supernodes
|
* \param lusup array containing the supernodes
|
||||||
* \param lda Leading dimension in the supernode
|
* \param lda Leading dimension in the supernode
|
||||||
|
@ -169,18 +169,18 @@ void SparseLUBase<Scalar,Index>::LU_dfs_kernel(const int jj, IndexVector& perm_r
|
|||||||
* marker[i] == jj, if i was visited during dfs of current column jj;
|
* marker[i] == jj, if i was visited during dfs of current column jj;
|
||||||
* marker1[i] >= jcol, if i was visited by earlier columns in this panel;
|
* marker1[i] >= jcol, if i was visited by earlier columns in this panel;
|
||||||
*
|
*
|
||||||
* \param [in]m number of rows in the matrix
|
* \param[in] m number of rows in the matrix
|
||||||
* \param [in]w Panel size
|
* \param[in] w Panel size
|
||||||
* \param [in]jcol Starting column of the panel
|
* \param[in] jcol Starting column of the panel
|
||||||
* \param [in]A Input matrix in column-major storage
|
* \param[in] A Input matrix in column-major storage
|
||||||
* \param [in]perm_r Row permutation
|
* \param[in] perm_r Row permutation
|
||||||
* \param [out]nseg Number of U segments
|
* \param[out] nseg Number of U segments
|
||||||
* \param [out]dense Accumulate the column vectors of the panel
|
* \param[out] dense Accumulate the column vectors of the panel
|
||||||
* \param [out]panel_lsub Subscripts of the row in the panel
|
* \param[out] panel_lsub Subscripts of the row in the panel
|
||||||
* \param [out]segrep Segment representative i.e first nonzero row of each segment
|
* \param[out] segrep Segment representative i.e first nonzero row of each segment
|
||||||
* \param [out]repfnz First nonzero location in each row
|
* \param[out] repfnz First nonzero location in each row
|
||||||
* \param [out]xprune
|
* \param[out] xprune
|
||||||
* \param [out]marker
|
* \param[out] marker
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -45,9 +45,9 @@
|
|||||||
*
|
*
|
||||||
* \param jcol The current column of L
|
* \param jcol The current column of L
|
||||||
* \param u diagonal pivoting threshold
|
* \param u diagonal pivoting threshold
|
||||||
* \param [in,out]perm_r Row permutation (threshold pivoting)
|
* \param[in,out] perm_r Row permutation (threshold pivoting)
|
||||||
* \param [in] iperm_c column permutation - used to finf diagonal of Pc*A*Pc'
|
* \param[in] iperm_c column permutation - used to finf diagonal of Pc*A*Pc'
|
||||||
* \param [out]pivrow The pivot row
|
* \param[out] pivrow The pivot row
|
||||||
* \param glu Global LU data
|
* \param glu Global LU data
|
||||||
* \return 0 if success, i > 0 if U(i,i) is exactly zero
|
* \return 0 if success, i > 0 if U(i,i) is exactly zero
|
||||||
*
|
*
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \param jcol The current column of L
|
* \param jcol The current column of L
|
||||||
* \param [in]perm_r Row permutation
|
* \param[in] perm_r Row permutation
|
||||||
* \param [out]pivrow The pivot row
|
* \param[out] pivrow The pivot row
|
||||||
* \param nseg Number of segments
|
* \param nseg Number of segments
|
||||||
* \param segrep
|
* \param segrep
|
||||||
* \param repfnz
|
* \param repfnz
|
||||||
* \param [out]xprune
|
* \param[out] xprune
|
||||||
* \param glu Global LU data
|
* \param glu Global LU data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -114,7 +114,7 @@ inline int umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *N
|
|||||||
* using the UmfPack library. The sparse matrix A must be squared and full rank.
|
* using the UmfPack library. The sparse matrix A must be squared and full rank.
|
||||||
* The vectors or matrices X and B can be either dense or sparse.
|
* The vectors or matrices X and B can be either dense or sparse.
|
||||||
*
|
*
|
||||||
* \WARNING The input matrix A should be in a \b compressed and \b column-major form.
|
* \warning The input matrix A should be in a \b compressed and \b column-major form.
|
||||||
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
||||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||||
*
|
*
|
||||||
|
@ -35,7 +35,12 @@ EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
|
|||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived,
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived,
|
||||||
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
||||||
(min)(const Scalar &other) const
|
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
min
|
||||||
|
#else
|
||||||
|
(min)
|
||||||
|
#endif
|
||||||
|
(const Scalar &other) const
|
||||||
{
|
{
|
||||||
return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
|
return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
|
||||||
}
|
}
|
||||||
@ -55,7 +60,12 @@ EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
|
|||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived,
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived,
|
||||||
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
||||||
(max)(const Scalar &other) const
|
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
max
|
||||||
|
#else
|
||||||
|
(max)
|
||||||
|
#endif
|
||||||
|
(const Scalar &other) const
|
||||||
{
|
{
|
||||||
return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
|
return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
|
||||||
}
|
}
|
||||||
|
@ -584,7 +584,7 @@ inline ConstRowXpr row(Index i) const
|
|||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
* \param start the first coefficient in the segment
|
* \param start the first coefficient in the segment
|
||||||
* \param size the number of coefficients in the segment
|
* \param vecSize the number of coefficients in the segment
|
||||||
*
|
*
|
||||||
* Example: \include MatrixBase_segment_int_int.cpp
|
* Example: \include MatrixBase_segment_int_int.cpp
|
||||||
* Output: \verbinclude MatrixBase_segment_int_int.out
|
* Output: \verbinclude MatrixBase_segment_int_int.out
|
||||||
@ -613,7 +613,7 @@ inline ConstSegmentReturnType segment(Index start, Index vecSize) const
|
|||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
* \param size the number of coefficients in the block
|
* \param vecSize the number of coefficients in the block
|
||||||
*
|
*
|
||||||
* Example: \include MatrixBase_start_int.cpp
|
* Example: \include MatrixBase_start_int.cpp
|
||||||
* Output: \verbinclude MatrixBase_start_int.out
|
* Output: \verbinclude MatrixBase_start_int.out
|
||||||
@ -624,10 +624,10 @@ inline ConstSegmentReturnType segment(Index start, Index vecSize) const
|
|||||||
*
|
*
|
||||||
* \sa class Block, block(Index,Index)
|
* \sa class Block, block(Index,Index)
|
||||||
*/
|
*/
|
||||||
inline SegmentReturnType head(Index vecsize)
|
inline SegmentReturnType head(Index vecSize)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
return SegmentReturnType(derived(), 0, vecsize);
|
return SegmentReturnType(derived(), 0, vecSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is the const version of head(Index).*/
|
/** This is the const version of head(Index).*/
|
||||||
@ -642,7 +642,7 @@ inline ConstSegmentReturnType
|
|||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
* \param size the number of coefficients in the block
|
* \param vecSize the number of coefficients in the block
|
||||||
*
|
*
|
||||||
* Example: \include MatrixBase_end_int.cpp
|
* Example: \include MatrixBase_end_int.cpp
|
||||||
* Output: \verbinclude MatrixBase_end_int.out
|
* Output: \verbinclude MatrixBase_end_int.out
|
||||||
|
@ -122,7 +122,7 @@ arrays can be multiplied if and only if they have the same dimensions.
|
|||||||
The Array class defines other coefficient-wise operations besides the addition, subtraction and multiplication
|
The Array class defines other coefficient-wise operations besides the addition, subtraction and multiplication
|
||||||
operators described above. For example, the \link ArrayBase::abs() .abs() \endlink method takes the absolute
|
operators described above. For example, the \link ArrayBase::abs() .abs() \endlink method takes the absolute
|
||||||
value of each coefficient, while \link ArrayBase::sqrt() .sqrt() \endlink computes the square root of the
|
value of each coefficient, while \link ArrayBase::sqrt() .sqrt() \endlink computes the square root of the
|
||||||
coefficients. If you have two arrays of the same size, you can call \link ArrayBase::min() .min() \endlink to
|
coefficients. If you have two arrays of the same size, you can call \link ArrayBase::min(const Eigen::ArrayBase<OtherDerived>&) const .min(.) \endlink to
|
||||||
construct the array whose coefficients are the minimum of the corresponding coefficients of the two given
|
construct the array whose coefficients are the minimum of the corresponding coefficients of the two given
|
||||||
arrays. These operations are illustrated in the following example.
|
arrays. These operations are illustrated in the following example.
|
||||||
|
|
||||||
@ -168,8 +168,8 @@ The following example shows how to use array operations on a Matrix object by em
|
|||||||
* to multiply them coefficient-wise and assigns the result to the matrix variable \c result (this is legal
|
* to multiply them coefficient-wise and assigns the result to the matrix variable \c result (this is legal
|
||||||
because Eigen allows assigning array expressions to matrix variables).
|
because Eigen allows assigning array expressions to matrix variables).
|
||||||
|
|
||||||
As a matter of fact, this usage case is so common that Eigen provides a \link MatrixBase::cwiseProduct()
|
As a matter of fact, this usage case is so common that Eigen provides a \link MatrixBase::cwiseProduct() const
|
||||||
.cwiseProduct() \endlink method for matrices to compute the coefficient-wise product. This is also shown in
|
.cwiseProduct(.) \endlink method for matrices to compute the coefficient-wise product. This is also shown in
|
||||||
the example program.
|
the example program.
|
||||||
|
|
||||||
<table class="example">
|
<table class="example">
|
||||||
|
@ -25,10 +25,10 @@ Manipulating and solving sparse problems involves various modules which are summ
|
|||||||
|
|
||||||
<table class="manual">
|
<table class="manual">
|
||||||
<tr><th>Module</th><th>Header file</th><th>Contents</th></tr>
|
<tr><th>Module</th><th>Header file</th><th>Contents</th></tr>
|
||||||
<tr><td>\link Sparse_Module SparseCore \endlink</td><td>\code#include <Eigen/SparseCore>\endcode</td><td>SparseMatrix and SparseVector classes, matrix assembly, basic sparse linear algebra (including sparse triangular solvers)</td></tr>
|
<tr><td>\link SparseCore_Module SparseCore \endlink</td><td>\code#include <Eigen/SparseCore>\endcode</td><td>SparseMatrix and SparseVector classes, matrix assembly, basic sparse linear algebra (including sparse triangular solvers)</td></tr>
|
||||||
<tr><td>\link SparseCholesky_Module SparseCholesky \endlink</td><td>\code#include <Eigen/SparseCholesky>\endcode</td><td>Direct sparse LLT and LDLT Cholesky factorization to solve sparse self-adjoint positive definite problems</td></tr>
|
<tr><td>\link SparseCholesky_Module SparseCholesky \endlink</td><td>\code#include <Eigen/SparseCholesky>\endcode</td><td>Direct sparse LLT and LDLT Cholesky factorization to solve sparse self-adjoint positive definite problems</td></tr>
|
||||||
<tr><td>\link IterativeLinearSolvers_Module IterativeLinearSolvers \endlink</td><td>\code#include <Eigen/IterativeLinearSolvers>\endcode</td><td>Iterative solvers to solve large general linear square problems (including self-adjoint positive definite problems)</td></tr>
|
<tr><td>\link IterativeLinearSolvers_Module IterativeLinearSolvers \endlink</td><td>\code#include <Eigen/IterativeLinearSolvers>\endcode</td><td>Iterative solvers to solve large general linear square problems (including self-adjoint positive definite problems)</td></tr>
|
||||||
<tr><td></td><td>\code#include <Eigen/Sparse>\endcode</td><td>Includes all the above modules</td></tr>
|
<tr><td>\link Sparse_modules Sparse \endlink</td><td>\code#include <Eigen/Sparse>\endcode</td><td>Includes all the above modules</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
\section TutorialSparseIntro Sparse matrix representation
|
\section TutorialSparseIntro Sparse matrix representation
|
||||||
|
@ -5,7 +5,7 @@ namespace Eigen {
|
|||||||
\ingroup Tutorial
|
\ingroup Tutorial
|
||||||
|
|
||||||
\li \b Previous: \ref TutorialSparse
|
\li \b Previous: \ref TutorialSparse
|
||||||
\li \b Next: \ref TODO
|
\li \b Next:
|
||||||
|
|
||||||
This tutorial page explains how to work with "raw" C++ arrays. This can be useful in a variety of contexts, particularly when "importing" vectors and matrices from other libraries into Eigen.
|
This tutorial page explains how to work with "raw" C++ arrays. This can be useful in a variety of contexts, particularly when "importing" vectors and matrices from other libraries into Eigen.
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ for (int i = 0; i < n_matrices; i++)
|
|||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\li \b Next: \ref TODO
|
\li \b Next:
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1214,7 +1214,9 @@ PREDEFINED = EIGEN_EMPTY_STRUCT \
|
|||||||
EIGEN_VECTORIZE \
|
EIGEN_VECTORIZE \
|
||||||
EIGEN_QT_SUPPORT \
|
EIGEN_QT_SUPPORT \
|
||||||
EIGEN_STRONG_INLINE=inline \
|
EIGEN_STRONG_INLINE=inline \
|
||||||
EIGEN2_SUPPORT_STAGE=99
|
"EIGEN2_SUPPORT_STAGE=99" \
|
||||||
|
"EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR)=template<typename OtherDerived> const CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived> METHOD(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const;" \
|
||||||
|
"EIGEN_CWISE_PRODUCT_RETURN_TYPE(LHS,RHS)=CwiseBinaryOp<internal::scalar_product_op<typename LHS::Scalar, typename RHS::Scalar >, const LHS, const RHS>"
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||||
# this tag can be used to specify a list of macro names that should be expanded.
|
# this tag can be used to specify a list of macro names that should be expanded.
|
||||||
@ -1224,11 +1226,10 @@ PREDEFINED = EIGEN_EMPTY_STRUCT \
|
|||||||
EXPAND_AS_DEFINED = EIGEN_MAKE_TYPEDEFS \
|
EXPAND_AS_DEFINED = EIGEN_MAKE_TYPEDEFS \
|
||||||
EIGEN_MAKE_FIXED_TYPEDEFS \
|
EIGEN_MAKE_FIXED_TYPEDEFS \
|
||||||
EIGEN_MAKE_TYPEDEFS_ALL_SIZES \
|
EIGEN_MAKE_TYPEDEFS_ALL_SIZES \
|
||||||
EIGEN_MAKE_CWISE_BINARY_OP \
|
|
||||||
EIGEN_CWISE_UNOP_RETURN_TYPE \
|
EIGEN_CWISE_UNOP_RETURN_TYPE \
|
||||||
EIGEN_CWISE_BINOP_RETURN_TYPE \
|
EIGEN_CWISE_BINOP_RETURN_TYPE \
|
||||||
EIGEN_CWISE_PRODUCT_RETURN_TYPE \
|
|
||||||
EIGEN_CURRENT_STORAGE_BASE_CLASS \
|
EIGEN_CURRENT_STORAGE_BASE_CLASS \
|
||||||
|
EIGEN_MATHFUNC_IMPL \
|
||||||
_EIGEN_GENERIC_PUBLIC_INTERFACE \
|
_EIGEN_GENERIC_PUBLIC_INTERFACE \
|
||||||
EIGEN2_SUPPORT
|
EIGEN2_SUPPORT
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ are doing.
|
|||||||
Eigen3; see \ref Eigen2SupportModes.
|
Eigen3; see \ref Eigen2SupportModes.
|
||||||
- \b EIGEN_DEFAULT_DENSE_INDEX_TYPE - the type for column and row indices in matrices, vectors and array
|
- \b EIGEN_DEFAULT_DENSE_INDEX_TYPE - the type for column and row indices in matrices, vectors and array
|
||||||
(DenseBase::Index). Set to \c std::ptrdiff_t by default.
|
(DenseBase::Index). Set to \c std::ptrdiff_t by default.
|
||||||
- \b EIGEN_DEFAULT_IO_FORMAT - the IOFormat to use when printing a matrix if no #IOFormat is specified.
|
- \b EIGEN_DEFAULT_IO_FORMAT - the IOFormat to use when printing a matrix if no %IOFormat is specified.
|
||||||
Defaults to the #IOFormat constructed by the default constructor IOFormat().
|
Defaults to the %IOFormat constructed by the default constructor IOFormat::IOFormat().
|
||||||
- \b EIGEN_INITIALIZE_MATRICES_BY_ZERO - if defined, all entries of newly constructed matrices and arrays are
|
- \b EIGEN_INITIALIZE_MATRICES_BY_ZERO - if defined, all entries of newly constructed matrices and arrays are
|
||||||
initializes to zero, as are new entries in matrices and arrays after resizing. Not defined by default.
|
initializes to zero, as are new entries in matrices and arrays after resizing. Not defined by default.
|
||||||
- \b EIGEN_NO_AUTOMATIC_RESIZING - if defined, the matrices (or arrays) on both sides of an assignment
|
- \b EIGEN_NO_AUTOMATIC_RESIZING - if defined, the matrices (or arrays) on both sides of an assignment
|
||||||
|
@ -39,7 +39,7 @@ Eigen provides a limited set of methods to reorder the matrix in this step, eith
|
|||||||
DirectSolverClassName<SparseMatrix<double>, OrderingMethod<IndexType> > solver;
|
DirectSolverClassName<SparseMatrix<double>, OrderingMethod<IndexType> > solver;
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
See \link Ordering_Modules the Ordering module \endlink for the list of available methods and the associated options.
|
See the \link OrderingMethods_Module OrderingMethods module \endlink for the list of available methods and the associated options.
|
||||||
|
|
||||||
In factorize(), the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls.
|
In factorize(), the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls.
|
||||||
|
|
||||||
@ -64,10 +64,10 @@ x1 = solver.solve(b1);
|
|||||||
x2 = solver.solve(b2);
|
x2 = solver.solve(b2);
|
||||||
// ...
|
// ...
|
||||||
\endcode
|
\endcode
|
||||||
For direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using setTolerance(). For all the available functions, please, refer to the documentation of the \link IterativeLinearSolvers_module Iterative solvers module \endlink.
|
For direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using setTolerance(). For all the available functions, please, refer to the documentation of the \link IterativeLinearSolvers_Module Iterative solvers module \endlink.
|
||||||
|
|
||||||
\section BenchmarkRoutine
|
\section BenchmarkRoutine
|
||||||
Most of the time, all you need is to know how much time it will take to qolve your system, and hopefully, what is the most suitable solver. In Eigen, we provide a benchmark routine that can be used for this purpose. It is very easy to use. First, it should be activated at the configuration step with the flag TEST_REAL_CASES. Then, in bench/spbench, you can compile the routine by typing \b make \e spbenchsolver. You can then run it with --help option to get the list of all available options. Basically, the matrices to test should be in \link http://math.nist.gov/MatrixMarket/formats.html MatrixMarket Coordinate format \endlink, and the routine returns the statistics from all available solvers in Eigen.
|
Most of the time, all you need is to know how much time it will take to qolve your system, and hopefully, what is the most suitable solver. In Eigen, we provide a benchmark routine that can be used for this purpose. It is very easy to use. First, it should be activated at the configuration step with the flag TEST_REAL_CASES. Then, in bench/spbench, you can compile the routine by typing \b make \e spbenchsolver. You can then run it with --help option to get the list of all available options. Basically, the matrices to test should be in <a href="http://math.nist.gov/MatrixMarket/formats.html">MatrixMarket Coordinate format</a>, and the routine returns the statistics from all available solvers in Eigen.
|
||||||
|
|
||||||
The following table gives an example of XHTML statistics from several Eigen built-in and external solvers.
|
The following table gives an example of XHTML statistics from several Eigen built-in and external solvers.
|
||||||
<TABLE border="1">
|
<TABLE border="1">
|
||||||
|
@ -31,7 +31,7 @@ The Eigen library is divided in a Core module and several additional modules. Ea
|
|||||||
<tr><td>\link SVD_Module SVD \endlink</td><td>\code#include <Eigen/SVD>\endcode</td><td>SVD decomposition with least-squares solver (JacobiSVD)</td></tr>
|
<tr><td>\link SVD_Module SVD \endlink</td><td>\code#include <Eigen/SVD>\endcode</td><td>SVD decomposition with least-squares solver (JacobiSVD)</td></tr>
|
||||||
<tr class="alt"><td>\link QR_Module QR \endlink</td><td>\code#include <Eigen/QR>\endcode</td><td>QR decomposition with solver (HouseholderQR, ColPivHouseholderQR, FullPivHouseholderQR)</td></tr>
|
<tr class="alt"><td>\link QR_Module QR \endlink</td><td>\code#include <Eigen/QR>\endcode</td><td>QR decomposition with solver (HouseholderQR, ColPivHouseholderQR, FullPivHouseholderQR)</td></tr>
|
||||||
<tr><td>\link Eigenvalues_Module Eigenvalues \endlink</td><td>\code#include <Eigen/Eigenvalues>\endcode</td><td>Eigenvalue, eigenvector decompositions (EigenSolver, SelfAdjointEigenSolver, ComplexEigenSolver)</td></tr>
|
<tr><td>\link Eigenvalues_Module Eigenvalues \endlink</td><td>\code#include <Eigen/Eigenvalues>\endcode</td><td>Eigenvalue, eigenvector decompositions (EigenSolver, SelfAdjointEigenSolver, ComplexEigenSolver)</td></tr>
|
||||||
<tr class="alt"><td>\link Sparse_Module Sparse \endlink</td><td>\code#include <Eigen/Sparse>\endcode</td><td>%Sparse matrix storage and related basic linear algebra (SparseMatrix, DynamicSparseMatrix, SparseVector)</td></tr>
|
<tr class="alt"><td>\link Sparse_modules Sparse \endlink</td><td>\code#include <Eigen/Sparse>\endcode</td><td>%Sparse matrix storage and related basic linear algebra (SparseMatrix, DynamicSparseMatrix, SparseVector)</td></tr>
|
||||||
<tr><td></td><td>\code#include <Eigen/Dense>\endcode</td><td>Includes Core, Geometry, LU, Cholesky, SVD, QR, and Eigenvalues header files</td></tr>
|
<tr><td></td><td>\code#include <Eigen/Dense>\endcode</td><td>Includes Core, Geometry, LU, Cholesky, SVD, QR, and Eigenvalues header files</td></tr>
|
||||||
<tr class="alt"><td></td><td>\code#include <Eigen/Eigen>\endcode</td><td>Includes %Dense and %Sparse header files (the whole Eigen library)</td></tr>
|
<tr class="alt"><td></td><td>\code#include <Eigen/Eigen>\endcode</td><td>Includes %Dense and %Sparse header files (the whole Eigen library)</td></tr>
|
||||||
</table>
|
</table>
|
||||||
@ -89,8 +89,8 @@ MatrixWrapper<Array44f> a1m(a1);
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
In the rest of this document we will use the following symbols to emphasize the features which are specifics to a given kind of object:
|
In the rest of this document we will use the following symbols to emphasize the features which are specifics to a given kind of object:
|
||||||
\li <a name="matrixonly"><a/>\matrixworld linear algebra matrix and vector only
|
\li <a name="matrixonly"></a>\matrixworld linear algebra matrix and vector only
|
||||||
\li <a name="arrayonly"><a/>\arrayworld array objects only
|
\li <a name="arrayonly"></a>\arrayworld array objects only
|
||||||
|
|
||||||
\subsection QuickRef_Basics Basic matrix manipulation
|
\subsection QuickRef_Basics Basic matrix manipulation
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ mat = 2 7 8
|
|||||||
\endcode</td></tr>
|
\endcode</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Special versions of \link DenseBase::minCoeff(Index*,Index*) minCoeff \endlink and \link DenseBase::maxCoeff(Index*,Index*) maxCoeff \endlink:
|
Special versions of \link DenseBase::minCoeff(IndexType*,IndexType*) const minCoeff \endlink and \link DenseBase::maxCoeff(IndexType*,IndexType*) const maxCoeff \endlink:
|
||||||
\code
|
\code
|
||||||
int i, j;
|
int i, j;
|
||||||
s = vector.minCoeff(&i); // s == vector[i]
|
s = vector.minCoeff(&i); // s == vector[i]
|
||||||
|
@ -61,7 +61,7 @@ In addition you can coarsely select choose which parts will be substituted by de
|
|||||||
<tr><td>\c EIGEN_USE_MKL_ALL </td><td>Defines \c EIGEN_USE_BLAS, \c EIGEN_USE_LAPACKE, and \c EIGEN_USE_MKL_VML </td></tr>
|
<tr><td>\c EIGEN_USE_MKL_ALL </td><td>Defines \c EIGEN_USE_BLAS, \c EIGEN_USE_LAPACKE, and \c EIGEN_USE_MKL_VML </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Finally, the PARDISO sparse solver shipped with Intel MKL can be used through the \ref PardisoLU, \ref PardisoLLT and \ref PardisoLDLT classes of the \ref PARDISOSupport_Module.
|
Finally, the PARDISO sparse solver shipped with Intel MKL can be used through the \ref PardisoLU, \ref PardisoLLT and \ref PardisoLDLT classes of the \ref PardisoSupport_Module.
|
||||||
|
|
||||||
|
|
||||||
\section TopicUsingIntelMKL_SupportedFeatures List of supported features
|
\section TopicUsingIntelMKL_SupportedFeatures List of supported features
|
||||||
|
@ -213,7 +213,7 @@ public:
|
|||||||
* this object was used to solve the eigenproblem for the selfadjoint
|
* this object was used to solve the eigenproblem for the selfadjoint
|
||||||
* matrix \f$ A \f$, then the matrix returned by this function is the
|
* matrix \f$ A \f$, then the matrix returned by this function is the
|
||||||
* matrix \f$ V \f$ in the eigendecomposition \f$ A V = D V \f$.
|
* matrix \f$ V \f$ in the eigendecomposition \f$ A V = D V \f$.
|
||||||
* For the generalized eigenproblem, the matrix returned is the solution \f$A V = D B V
|
* For the generalized eigenproblem, the matrix returned is the solution \f$ A V = D B V \f$
|
||||||
*
|
*
|
||||||
* Example: \include SelfAdjointEigenSolver_eigenvectors.cpp
|
* Example: \include SelfAdjointEigenSolver_eigenvectors.cpp
|
||||||
* Output: \verbinclude SelfAdjointEigenSolver_eigenvectors.out
|
* Output: \verbinclude SelfAdjointEigenSolver_eigenvectors.out
|
||||||
|
@ -16,7 +16,7 @@ namespace Eigen
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* \ingroup Splines_Module
|
* \ingroup Splines_Module
|
||||||
* \class Spline class
|
* \class Spline
|
||||||
* \brief A class representing multi-dimensional spline curves.
|
* \brief A class representing multi-dimensional spline curves.
|
||||||
*
|
*
|
||||||
* The class represents B-splines with non-uniform knot vectors. Each control
|
* The class represents B-splines with non-uniform knot vectors. Each control
|
||||||
|
Loading…
x
Reference in New Issue
Block a user