diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-09-27 19:24:57 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-09-27 19:24:57 +0000 |
commit | 4e299afb1f1f19f470920f63b39c5a91be138788 (patch) | |
tree | 640e1d7479129de2dcb8306028ec3057d47e544c | |
parent | d99d9407df76d432bf9459ce000a2506e887c03b (diff) |
don't enclose eigen in a namespace. prefixing is the way to go.
For example Qt uses a prefix and no namespace (except for a few things)
-rw-r--r-- | doc/tutorial.cpp | 1 | ||||
-rw-r--r-- | src/internal/Block.h | 4 | ||||
-rw-r--r-- | src/internal/EigenBase.h | 4 | ||||
-rw-r--r-- | src/internal/Matrix.h | 5 | ||||
-rw-r--r-- | src/internal/MatrixOps.h | 4 | ||||
-rw-r--r-- | src/internal/MatrixRef.h | 5 | ||||
-rw-r--r-- | src/internal/MatrixStorage.h | 4 | ||||
-rw-r--r-- | src/internal/Minor.h | 4 | ||||
-rw-r--r-- | src/internal/RowAndCol.h | 4 | ||||
-rw-r--r-- | src/internal/ScalarOps.h | 4 | ||||
-rw-r--r-- | src/internal/Util.h | 6 | ||||
-rw-r--r-- | test/main.h | 1 |
12 files changed, 0 insertions, 46 deletions
diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp index 18a1ced55..2eec7be3e 100644 --- a/doc/tutorial.cpp +++ b/doc/tutorial.cpp @@ -1,7 +1,6 @@ #include "../src/All" using namespace std; -using namespace Eigen; int main(int, char **) { diff --git a/src/internal/Block.h b/src/internal/Block.h index 9be1d165c..72181abb7 100644 --- a/src/internal/Block.h +++ b/src/internal/Block.h @@ -26,8 +26,6 @@ #ifndef EIGEN_BLOCK_H #define EIGEN_BLOCK_H -namespace Eigen { - template<typename MatrixType> class MatrixBlock : public EigenBase<typename MatrixType::Scalar, MatrixBlock<MatrixType> > { @@ -83,6 +81,4 @@ EigenBase<Scalar, Derived>::block(int startRow, int endRow, int startCol, int en return MatrixBlock<EigenBase>(ref(), startRow, endRow, startCol, endCol); } -} // namespace Eigen - #endif // EIGEN_BLOCK_H diff --git a/src/internal/EigenBase.h b/src/internal/EigenBase.h index 804880c75..ad39df599 100644 --- a/src/internal/EigenBase.h +++ b/src/internal/EigenBase.h @@ -28,8 +28,6 @@ #include "Util.h" -namespace Eigen { - template<typename _Scalar, typename Derived> class EigenBase { static const int RowsAtCompileTime = Derived::RowsAtCompileTime, @@ -129,6 +127,4 @@ std::ostream & operator << return s; } -} // namespace Eigen - #endif // EIGEN_EIGENBASE_H diff --git a/src/internal/Matrix.h b/src/internal/Matrix.h index e7ab5e8d8..af397c2eb 100644 --- a/src/internal/Matrix.h +++ b/src/internal/Matrix.h @@ -31,9 +31,6 @@ #include "MatrixRef.h" #include "MatrixStorage.h" -namespace Eigen -{ - template<typename _Scalar, int _Rows, int _Cols> class Matrix : public EigenBase<_Scalar, Matrix<_Scalar, _Rows, _Cols> >, public MatrixStorage<_Scalar, _Rows, _Cols> @@ -129,8 +126,6 @@ EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd) #undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES #undef EIGEN_MAKE_TYPEDEFS -} // namespace Eigen - #include "MatrixOps.h" #include "ScalarOps.h" #include "RowAndCol.h" diff --git a/src/internal/MatrixOps.h b/src/internal/MatrixOps.h index 9fb639fa3..eda1b58b4 100644 --- a/src/internal/MatrixOps.h +++ b/src/internal/MatrixOps.h @@ -26,8 +26,6 @@ #ifndef EIGEN_MATRIXOPS_H #define EIGEN_MATRIXOPS_H -namespace Eigen { - template<typename Lhs, typename Rhs> class MatrixSum : public EigenBase<typename Lhs::Scalar, MatrixSum<Lhs, Rhs> > { @@ -197,6 +195,4 @@ EigenBase<Scalar, Derived>::operator*=(const EigenBase<Scalar, OtherDerived> &ot return *static_cast<Derived*>(this); } -} // namespace Eigen - #endif // EIGEN_MATRIXOPS_H diff --git a/src/internal/MatrixRef.h b/src/internal/MatrixRef.h index 71545aba3..8ee569001 100644 --- a/src/internal/MatrixRef.h +++ b/src/internal/MatrixRef.h @@ -26,9 +26,6 @@ #ifndef EIGEN_MATRIXREF_H #define EIGEN_MATRIXREF_H -namespace Eigen -{ - template<typename MatrixType> class MatrixRef : public EigenBase<typename MatrixType::Scalar, MatrixRef<MatrixType> > { @@ -60,6 +57,4 @@ template<typename MatrixType> class MatrixRef MatrixType& m_matrix; }; -} // namespace Eigen - #endif // EIGEN_MATRIXREF_H diff --git a/src/internal/MatrixStorage.h b/src/internal/MatrixStorage.h index 8dee4cebf..45afcbe6a 100644 --- a/src/internal/MatrixStorage.h +++ b/src/internal/MatrixStorage.h @@ -26,8 +26,6 @@ #ifndef EIGEN_MATRIXSTORAGE_H #define EIGEN_MATRIXSTORAGE_H -namespace Eigen { - template<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime> @@ -125,6 +123,4 @@ class MatrixStorage<Scalar, DynamicSize, DynamicSize> { delete[] m_array; } }; -} // namespace Eigen - #endif // EIGEN_MATRIXSTORAGE_H diff --git a/src/internal/Minor.h b/src/internal/Minor.h index 627dbf723..20aa7060f 100644 --- a/src/internal/Minor.h +++ b/src/internal/Minor.h @@ -26,8 +26,6 @@ #ifndef EIGEN_MINOR_H #define EIGEN_MINOR_H -namespace Eigen { - template<typename MatrixType> class MatrixMinor : public EigenBase<typename MatrixType::Scalar, MatrixMinor<MatrixType> > { @@ -79,6 +77,4 @@ EigenBase<Scalar, Derived>::minor(int row, int col) return MatrixMinor<EigenBase>(ref(), row, col); } -} // namespace Eigen - #endif // EIGEN_MINOR_H diff --git a/src/internal/RowAndCol.h b/src/internal/RowAndCol.h index b99d70766..5b6e4ef07 100644 --- a/src/internal/RowAndCol.h +++ b/src/internal/RowAndCol.h @@ -26,8 +26,6 @@ #ifndef EIGEN_ROWANDCOL_H #define EIGEN_ROWANDCOL_H -namespace Eigen { - template<typename MatrixType> class MatrixRow : public EigenBase<typename MatrixType::Scalar, MatrixRow<MatrixType> > { @@ -143,6 +141,4 @@ EigenBase<Scalar, Derived>::col(int i) return MatrixCol<EigenBase>(ref(), i); } -} // namespace Eigen - #endif // EIGEN_ROWANDCOL_H diff --git a/src/internal/ScalarOps.h b/src/internal/ScalarOps.h index fb8e340dc..a28b7e6cb 100644 --- a/src/internal/ScalarOps.h +++ b/src/internal/ScalarOps.h @@ -26,8 +26,6 @@ #ifndef EIGEN_SCALAROPS_H #define EIGEN_SCALAROPS_H -namespace Eigen { - template<typename MatrixType> class ScalarProduct : public EigenBase<typename MatrixType::Scalar, ScalarProduct<MatrixType> > { @@ -113,6 +111,4 @@ EIGEN_MAKE_SCALAR_OPS(std::complex<double>) #undef EIGEN_MAKE_SCALAR_OPS -} // namespace Eigen - #endif // EIGEN_SCALAROPS_H diff --git a/src/internal/Util.h b/src/internal/Util.h index 1851bdd6c..179f70ffd 100644 --- a/src/internal/Util.h +++ b/src/internal/Util.h @@ -40,9 +40,6 @@ #define EIGEN_CHECK_COL_RANGE(matrix, col) \ assert(col >= 0 && col < (matrix).cols()) -namespace Eigen -{ - //forward declarations template<typename _Scalar, int _Rows, int _Cols> class Matrix; template<typename MatrixType> class MatrixAlias; @@ -100,7 +97,4 @@ EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \ EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \ EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=) - -} // namespace Eigen - #endif // EIGEN_UTIL_H diff --git a/test/main.h b/test/main.h index 45cabd369..0ae9967b5 100644 --- a/test/main.h +++ b/test/main.h @@ -33,7 +33,6 @@ #include <ctime> using namespace std; -using namespace Eigen; class EigenTest : public QObject { |