33 template<
typename T,
int _Options,
typename _Index>
38 typedef gsEigen::SparseVector<T,_Options,_Index> Base;
41 typedef typename gsEigen::Block<Base> Block;
47 typedef memory::shared_ptr< gsSparseVector >
Ptr;
55 template<
typename OtherDerived>
56 gsSparseVector(
const gsEigen::EigenBase<OtherDerived>& other) : Base(other) { }
60 template<
typename OtherDerived>
61 gsSparseVector(
const gsEigen::MatrixBase<OtherDerived>& other) : Base(other) { }
65 template<
typename OtherDerived>
66 gsSparseVector(
const gsEigen::SparseMatrixBase<OtherDerived>& other) : Base(other) { }
70 template<
typename OtherDerived>
71 gsSparseVector(
const gsEigen::ReturnByValue<OtherDerived>& other) : Base(other) { }
75 #if !EIGEN_HAS_RVALUE_REFERENCES
79 template <
class EigenExpr>
80 gsSparseVector& operator= (
const EigenExpr & other)
82 this->Base::operator=(other);
86 using Base::operator=;
93 gsSparseVector(
const gsSparseVector& other) : Base(other)
94 { Base::operator=(other); }
96 gsSparseVector& operator= (
const gsSparseVector & other)
97 { Base::operator=(other);
return *
this; }
99 gsSparseVector(gsSparseVector&& other)
100 { operator=(std::forward<gsSparseVector>(other)); }
102 gsSparseVector & operator=(gsSparseVector&& other)
114 this->data().squeeze();
117 inline T at (_Index i )
const {
return this->coeff(i); }
118 inline T & at (_Index i ) {
return this->coeffRef(i); }
120 inline T operator () (_Index i)
const {
return this->coeff(i); }
121 inline T & operator () (_Index i) {
return this->coeffRef(i); }
123 inline T operator [] (_Index i)
const {
return this->coeff(i); }
124 inline T & operator [] (_Index i) {
return this->coeffRef(i); }
gsSparseVector(const gsEigen::ReturnByValue< OtherDerived > &other)
Definition: gsSparseVector.h:71
gsSparseVector(const gsEigen::EigenBase< OtherDerived > &other)
Definition: gsSparseVector.h:56
gsSparseVector * clone() const
Clone function. Used to make a copy of the matrix.
Definition: gsSparseVector.h:127
gsSparseVector(const gsEigen::SparseMatrixBase< OtherDerived > &other)
Definition: gsSparseVector.h:66
memory::shared_ptr< gsSparseVector > Ptr
Shared pointer for gsSparseVector.
Definition: gsSparseVector.h:47
Represents a block-view of the given matrix.
Definition: gsMatrixBlockView.h:31
Sparse vector class, based on gsEigen::SparseVector.
Definition: gsSparseVector.h:34
gsSparseVector(const gsEigen::MatrixBase< OtherDerived > &other)
Definition: gsSparseVector.h:61