mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 12:46:00 +08:00
Prevent copying with internal::noncopyable.
This commit is contained in:
parent
9e2b4eeac0
commit
55ec3cc6d5
@ -21,8 +21,8 @@ namespace Eigen {
|
|||||||
* expected to be an instantiation of the Matrix class template.
|
* expected to be an instantiation of the Matrix class template.
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixExponential {
|
class MatrixExponential : internal::noncopyable
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** \brief Constructor.
|
/** \brief Constructor.
|
||||||
@ -43,10 +43,6 @@ class MatrixExponential {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Prevent copying
|
|
||||||
MatrixExponential(const MatrixExponential&);
|
|
||||||
MatrixExponential& operator=(const MatrixExponential&);
|
|
||||||
|
|
||||||
/** \brief Compute the (3,3)-Padé approximant to the exponential.
|
/** \brief Compute the (3,3)-Padé approximant to the exponential.
|
||||||
*
|
*
|
||||||
* After exit, \f$ (V+U)(V-U)^{-1} \f$ is the Padé
|
* After exit, \f$ (V+U)(V-U)^{-1} \f$ is the Padé
|
||||||
|
@ -34,7 +34,7 @@ namespace Eigen {
|
|||||||
template <typename MatrixType,
|
template <typename MatrixType,
|
||||||
typename AtomicType,
|
typename AtomicType,
|
||||||
int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>
|
int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>
|
||||||
class MatrixFunction
|
class MatrixFunction : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class MatrixFunction
|
|||||||
* \brief Partial specialization of MatrixFunction for real matrices
|
* \brief Partial specialization of MatrixFunction for real matrices
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType, typename AtomicType>
|
template <typename MatrixType, typename AtomicType>
|
||||||
class MatrixFunction<MatrixType, AtomicType, 0>
|
class MatrixFunction<MatrixType, AtomicType, 0> : internal::noncopyable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -111,8 +111,6 @@ class MatrixFunction<MatrixType, AtomicType, 0>
|
|||||||
private:
|
private:
|
||||||
typename internal::nested<MatrixType>::type m_A; /**< \brief Reference to argument of matrix function. */
|
typename internal::nested<MatrixType>::type m_A; /**< \brief Reference to argument of matrix function. */
|
||||||
AtomicType& m_atomic; /**< \brief Class for computing matrix function of atomic blocks. */
|
AtomicType& m_atomic; /**< \brief Class for computing matrix function of atomic blocks. */
|
||||||
|
|
||||||
MatrixFunction& operator=(const MatrixFunction&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +118,7 @@ class MatrixFunction<MatrixType, AtomicType, 0>
|
|||||||
* \brief Partial specialization of MatrixFunction for complex matrices
|
* \brief Partial specialization of MatrixFunction for complex matrices
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType, typename AtomicType>
|
template <typename MatrixType, typename AtomicType>
|
||||||
class MatrixFunction<MatrixType, AtomicType, 1>
|
class MatrixFunction<MatrixType, AtomicType, 1> : internal::noncopyable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -176,8 +174,6 @@ class MatrixFunction<MatrixType, AtomicType, 1>
|
|||||||
* separation constant is set to 0.1, a value taken from the
|
* separation constant is set to 0.1, a value taken from the
|
||||||
* paper by Davies and Higham. */
|
* paper by Davies and Higham. */
|
||||||
static const RealScalar separation() { return static_cast<RealScalar>(0.1); }
|
static const RealScalar separation() { return static_cast<RealScalar>(0.1); }
|
||||||
|
|
||||||
MatrixFunction& operator=(const MatrixFunction&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \brief Constructor.
|
/** \brief Constructor.
|
||||||
|
@ -21,7 +21,7 @@ namespace Eigen {
|
|||||||
* entries are close to each other.
|
* entries are close to each other.
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixFunctionAtomic
|
class MatrixFunctionAtomic : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -44,10 +44,6 @@ class MatrixFunctionAtomic
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Prevent copying
|
|
||||||
MatrixFunctionAtomic(const MatrixFunctionAtomic&);
|
|
||||||
MatrixFunctionAtomic& operator=(const MatrixFunctionAtomic&);
|
|
||||||
|
|
||||||
void computeMu();
|
void computeMu();
|
||||||
bool taylorConverged(Index s, const MatrixType& F, const MatrixType& Fincr, const MatrixType& P);
|
bool taylorConverged(Index s, const MatrixType& F, const MatrixType& Fincr, const MatrixType& P);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace Eigen {
|
|||||||
* \sa class MatrixFunctionAtomic, MatrixBase::log()
|
* \sa class MatrixFunctionAtomic, MatrixBase::log()
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixLogarithmAtomic
|
class MatrixLogarithmAtomic : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -71,10 +71,6 @@ private:
|
|||||||
std::numeric_limits<RealScalar>::digits<= 64? 8: // extended precision
|
std::numeric_limits<RealScalar>::digits<= 64? 8: // extended precision
|
||||||
std::numeric_limits<RealScalar>::digits<=106? 10: // double-double
|
std::numeric_limits<RealScalar>::digits<=106? 10: // double-double
|
||||||
11; // quadruple precision
|
11; // quadruple precision
|
||||||
|
|
||||||
// Prevent copying
|
|
||||||
MatrixLogarithmAtomic(const MatrixLogarithmAtomic&);
|
|
||||||
MatrixLogarithmAtomic& operator=(const MatrixLogarithmAtomic&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \brief Compute logarithm of triangular matrix with clustered eigenvalues. */
|
/** \brief Compute logarithm of triangular matrix with clustered eigenvalues. */
|
||||||
|
@ -38,7 +38,7 @@ class MatrixPowerRetval : public ReturnByValue< MatrixPowerRetval<MatrixType> >
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
class MatrixPowerAtomic
|
class MatrixPowerAtomic : internal::noncopyable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
@ -257,7 +257,7 @@ MatrixPowerAtomic<MatrixType>::computeSuperDiag(RealScalar curr, RealScalar prev
|
|||||||
* Output: \verbinclude MatrixPower_optimal.out
|
* Output: \verbinclude MatrixPower_optimal.out
|
||||||
*/
|
*/
|
||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
class MatrixPower
|
class MatrixPower : internal::noncopyable
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
@ -24,7 +24,7 @@ namespace Eigen {
|
|||||||
* \sa MatrixSquareRoot, MatrixSquareRootTriangular
|
* \sa MatrixSquareRoot, MatrixSquareRootTriangular
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixSquareRootQuasiTriangular
|
class MatrixSquareRootQuasiTriangular : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ void MatrixSquareRootQuasiTriangular<MatrixType>
|
|||||||
* \sa MatrixSquareRoot, MatrixSquareRootQuasiTriangular
|
* \sa MatrixSquareRoot, MatrixSquareRootQuasiTriangular
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixSquareRootTriangular
|
class MatrixSquareRootTriangular : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MatrixSquareRootTriangular(const MatrixType& A)
|
MatrixSquareRootTriangular(const MatrixType& A)
|
||||||
@ -370,7 +370,7 @@ class MatrixSquareRoot<MatrixType, 0>
|
|||||||
// ********** Partial specialization for complex matrices **********
|
// ********** Partial specialization for complex matrices **********
|
||||||
|
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
class MatrixSquareRoot<MatrixType, 1>
|
class MatrixSquareRoot<MatrixType, 1> : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace Eigen {
|
|||||||
* \brief Stem functions corresponding to standard mathematical functions.
|
* \brief Stem functions corresponding to standard mathematical functions.
|
||||||
*/
|
*/
|
||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
class StdStemFunctions
|
class StdStemFunctions : internal::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user