aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Sparse/SparseVector.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-25 10:15:22 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-25 10:15:22 -0400
commit4716040703be1ee906439385d20475dcddad5ce3 (patch)
tree8efd3cf3007d8360e66f38e2d280127cbb70daa6 /Eigen/src/Sparse/SparseVector.h
parentca85a1f6c5fc33ac382aa2d7ba2da63d55d3223e (diff)
bug #86 : use internal:: namespace instead of ei_ prefix
Diffstat (limited to 'Eigen/src/Sparse/SparseVector.h')
-rw-r--r--Eigen/src/Sparse/SparseVector.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/Eigen/src/Sparse/SparseVector.h b/Eigen/src/Sparse/SparseVector.h
index c5d0a6981..4671cf48f 100644
--- a/Eigen/src/Sparse/SparseVector.h
+++ b/Eigen/src/Sparse/SparseVector.h
@@ -34,8 +34,10 @@
* See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
*
*/
+
+namespace internal {
template<typename _Scalar, int _Options, typename _Index>
-struct ei_traits<SparseVector<_Scalar, _Options, _Index> >
+struct traits<SparseVector<_Scalar, _Options, _Index> >
{
typedef _Scalar Scalar;
typedef _Index Index;
@@ -53,6 +55,7 @@ struct ei_traits<SparseVector<_Scalar, _Options, _Index> >
SupportedAccessPatterns = InnerRandomAccessPattern
};
};
+}
template<typename _Scalar, int _Options, typename _Index>
class SparseVector
@@ -68,7 +71,7 @@ class SparseVector
public:
typedef SparseMatrixBase<SparseVector> SparseBase;
- enum { IsColVector = ei_traits<SparseVector>::IsColVector };
+ enum { IsColVector = internal::traits<SparseVector>::IsColVector };
CompressedStorage<Scalar,Index> m_data;
Index m_size;
@@ -82,7 +85,7 @@ class SparseVector
EIGEN_STRONG_INLINE Index cols() const { return IsColVector ? 1 : m_size; }
EIGEN_STRONG_INLINE Index innerSize() const { return m_size; }
EIGEN_STRONG_INLINE Index outerSize() const { return 1; }
- EIGEN_STRONG_INLINE Index innerNonZeros(Index j) const { ei_assert(j==0); return m_size; }
+ EIGEN_STRONG_INLINE Index innerNonZeros(Index j) const { eigen_assert(j==0); return m_size; }
EIGEN_STRONG_INLINE const Scalar* _valuePtr() const { return &m_data.value(0); }
EIGEN_STRONG_INLINE Scalar* _valuePtr() { return &m_data.value(0); }
@@ -92,14 +95,14 @@ class SparseVector
inline Scalar coeff(Index row, Index col) const
{
- ei_assert((IsColVector ? col : row)==0);
+ eigen_assert((IsColVector ? col : row)==0);
return coeff(IsColVector ? row : col);
}
inline Scalar coeff(Index i) const { return m_data.at(i); }
inline Scalar& coeffRef(Index row, Index col)
{
- ei_assert((IsColVector ? col : row)==0);
+ eigen_assert((IsColVector ? col : row)==0);
return coeff(IsColVector ? row : col);
}
@@ -125,12 +128,12 @@ class SparseVector
inline void startVec(Index outer)
{
- ei_assert(outer==0);
+ eigen_assert(outer==0);
}
inline Scalar& insertBackByOuterInner(Index outer, Index inner)
{
- ei_assert(outer==0);
+ eigen_assert(outer==0);
return insertBack(inner);
}
inline Scalar& insertBack(Index i)
@@ -143,7 +146,7 @@ class SparseVector
{
Index inner = IsColVector ? row : col;
Index outer = IsColVector ? col : row;
- ei_assert(outer==0);
+ eigen_assert(outer==0);
return insert(inner);
}
Scalar& insert(Index i)
@@ -178,7 +181,7 @@ class SparseVector
void resize(Index rows, Index cols)
{
- ei_assert(rows==1 || cols==1);
+ eigen_assert(rows==1 || cols==1);
resize(IsColVector ? rows : cols);
}
@@ -260,9 +263,9 @@ class SparseVector
// // 1 - compute the number of coeffs per dest inner vector
// // 2 - do the actual copy/eval
// // Since each coeff of the rhs has to be evaluated twice, let's evauluate it if needed
-// typedef typename ei_nested<OtherDerived,2>::type OtherCopy;
+// typedef typename internal::nested<OtherDerived,2>::type OtherCopy;
// OtherCopy otherCopy(other.derived());
-// typedef typename ei_cleantype<OtherCopy>::type _OtherCopy;
+// typedef typename internal::cleantype<OtherCopy>::type _OtherCopy;
//
// resize(other.rows(), other.cols());
// Eigen::Map<VectorXi>(m_outerIndex,outerSize()).setZero();
@@ -321,7 +324,7 @@ class SparseVector
// {
// if (m_data.index(i)==other.m_data.index(j))
// {
-// res += m_data.value(i) * ei_conj(other.m_data.value(j));
+// res += m_data.value(i) * internal::conj(other.m_data.value(j));
// ++i; ++j;
// }
// else if (m_data.index(i)<other.m_data.index(j))
@@ -351,7 +354,7 @@ class SparseVector
/** \deprecated use insertBack(Index,Index) */
EIGEN_DEPRECATED Scalar& fill(Index r, Index c)
{
- ei_assert(r==0 || c==0);
+ eigen_assert(r==0 || c==0);
return fill(IsColVector ? r : c);
}
@@ -365,7 +368,7 @@ class SparseVector
/** \deprecated use insert(Index,Index) */
EIGEN_DEPRECATED Scalar& fillrand(Index r, Index c)
{
- ei_assert(r==0 || c==0);
+ eigen_assert(r==0 || c==0);
return fillrand(IsColVector ? r : c);
}
@@ -386,7 +389,7 @@ class SparseVector<Scalar,_Options,_Index>::InnerIterator
InnerIterator(const SparseVector& vec, Index outer=0)
: m_data(vec.m_data), m_id(0), m_end(static_cast<Index>(m_data.size()))
{
- ei_assert(outer==0);
+ eigen_assert(outer==0);
}
InnerIterator(const CompressedStorage<Scalar,Index>& data)