aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-06-04 13:21:15 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-06-04 13:21:15 +0200
commita2ae0634917aaa653d0c22f16ac902f8df9964ce (patch)
treedc73a86c1b69a2818208ce3d7cf1527b5c561c58
parent1b20e1654660fd084314da6ac75dfc11fa2eb02a (diff)
add a noncopyable base class for decompositions
-rw-r--r--Eigen/src/Core/util/Meta.h15
-rw-r--r--Eigen/src/IterativeLinearSolvers/IncompleteLUT.h2
-rw-r--r--Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h2
-rw-r--r--Eigen/src/SuperLUSupport/SuperLUSupport.h2
-rw-r--r--Eigen/src/UmfPackSupport/UmfPackSupport.h2
5 files changed, 19 insertions, 4 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index 7ece430ac..82c93f922 100644
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -103,6 +103,21 @@ template<bool Condition, typename T> struct enable_if;
template<typename T> struct enable_if<true,T>
{ typedef T type; };
+
+
+/** \internal
+ * A base class do disable default copy ctor and copy assignement operator.
+ */
+class noncopyable
+{
+ noncopyable(const noncopyable&);
+ const noncopyable& operator=(const noncopyable&);
+protected:
+ noncopyable() {}
+ ~noncopyable() {}
+};
+
+
/** \internal
* Convenient struct to get the result type of a unary or binary functor.
*
diff --git a/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h b/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h
index c9ddbda63..32f152634 100644
--- a/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h
+++ b/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h
@@ -51,7 +51,7 @@ namespace Eigen {
* see http://www-users.cs.umn.edu/~saad/software/SPARSKIT/README for more details.
*/
template <typename _Scalar>
-class IncompleteLUT
+class IncompleteLUT : internal::noncopyable
{
typedef _Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
diff --git a/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h b/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h
index 90a9675d5..b27ad82ec 100644
--- a/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h
+++ b/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h
@@ -33,7 +33,7 @@ namespace Eigen {
* \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner
*/
template< typename Derived>
-class IterativeSolverBase
+class IterativeSolverBase : internal::noncopyable
{
public:
typedef typename internal::traits<Derived>::MatrixType MatrixType;
diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h
index 60a3eb09a..a3ffa4ef2 100644
--- a/Eigen/src/SuperLUSupport/SuperLUSupport.h
+++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h
@@ -303,7 +303,7 @@ MappedSparseMatrix<Scalar,Flags,Index> map_superlu(SluMatrix& sluMat)
* \brief The base class for the direct and incomplete LU factorization of SuperLU
*/
template<typename _MatrixType, typename Derived>
-class SuperLUBase
+class SuperLUBase : internal::noncopyable
{
public:
typedef _MatrixType MatrixType;
diff --git a/Eigen/src/UmfPackSupport/UmfPackSupport.h b/Eigen/src/UmfPackSupport/UmfPackSupport.h
index 9b09241b9..84f98ffd3 100644
--- a/Eigen/src/UmfPackSupport/UmfPackSupport.h
+++ b/Eigen/src/UmfPackSupport/UmfPackSupport.h
@@ -136,7 +136,7 @@ inline int umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *N
* \sa \ref TutorialSparseDirectSolvers
*/
template<typename _MatrixType>
-class UmfPackLU
+class UmfPackLU : internal::noncopyable
{
public:
typedef _MatrixType MatrixType;