mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
add plugin mechanism to sparse objects
This commit is contained in:
parent
9111d73017
commit
c7baf07a3e
@ -333,6 +333,10 @@ class DynamicSparseMatrix
|
|||||||
/** \deprecated use finalize()
|
/** \deprecated use finalize()
|
||||||
* Does nothing. Provided for compatibility with SparseMatrix. */
|
* Does nothing. Provided for compatibility with SparseMatrix. */
|
||||||
EIGEN_DEPRECATED void endFill() {}
|
EIGEN_DEPRECATED void endFill() {}
|
||||||
|
|
||||||
|
# ifdef EIGEN_DYNAMICSPARSEMATRIX_PLUGIN
|
||||||
|
# include EIGEN_DYNAMICSPARSEMATRIX_PLUGIN
|
||||||
|
# endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Scalar, int _Options, typename _Index>
|
template<typename Scalar, int _Options, typename _Index>
|
||||||
|
@ -601,6 +601,10 @@ class SparseMatrix
|
|||||||
/** \deprecated use finalize */
|
/** \deprecated use finalize */
|
||||||
EIGEN_DEPRECATED void endFill() { finalize(); }
|
EIGEN_DEPRECATED void endFill() { finalize(); }
|
||||||
|
|
||||||
|
# ifdef EIGEN_SPARSEMATRIX_PLUGIN
|
||||||
|
# include EIGEN_SPARSEMATRIX_PLUGIN
|
||||||
|
# endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct default_prunning_func {
|
struct default_prunning_func {
|
||||||
default_prunning_func(Scalar ref, RealScalar eps) : reference(ref), epsilon(eps) {}
|
default_prunning_func(Scalar ref, RealScalar eps) : reference(ref), epsilon(eps) {}
|
||||||
|
@ -124,12 +124,16 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
|
|||||||
|
|
||||||
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject;
|
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject;
|
||||||
|
|
||||||
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase
|
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase
|
||||||
#include "../plugins/CommonCwiseUnaryOps.h"
|
# include "../plugins/CommonCwiseUnaryOps.h"
|
||||||
#include "../plugins/CommonCwiseBinaryOps.h"
|
# include "../plugins/CommonCwiseBinaryOps.h"
|
||||||
#include "../plugins/MatrixCwiseUnaryOps.h"
|
# include "../plugins/MatrixCwiseUnaryOps.h"
|
||||||
#include "../plugins/MatrixCwiseBinaryOps.h"
|
# include "../plugins/MatrixCwiseBinaryOps.h"
|
||||||
#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
|
# ifdef EIGEN_SPARSEMATRIXBASE_PLUGIN
|
||||||
|
# include EIGEN_SPARSEMATRIXBASE_PLUGIN
|
||||||
|
# endif
|
||||||
|
# undef EIGEN_CURRENT_STORAGE_BASE_CLASS
|
||||||
|
#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
|
||||||
|
|
||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||||
/** This is the "real scalar" type; if the \a Scalar type is already real numbers
|
/** This is the "real scalar" type; if the \a Scalar type is already real numbers
|
||||||
|
@ -384,6 +384,10 @@ class SparseVector
|
|||||||
|
|
||||||
/** \deprecated use finalize() */
|
/** \deprecated use finalize() */
|
||||||
EIGEN_DEPRECATED void endFill() {}
|
EIGEN_DEPRECATED void endFill() {}
|
||||||
|
|
||||||
|
# ifdef EIGEN_SPARSEVECTOR_PLUGIN
|
||||||
|
# include EIGEN_SPARSEVECTOR_PLUGIN
|
||||||
|
# endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Scalar, int _Options, typename _Index>
|
template<typename Scalar, int _Options, typename _Index>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user