MOAB
4.9.3pre
|
Dense storage base class for matrices and arrays. More...
#include <PlainObjectBase.h>
Classes | |
struct | StridedAlignedMapType |
struct | StridedConstAlignedMapType |
struct | StridedConstMapType |
struct | StridedMapType |
Public Types | |
enum | { Options = internal::traits<Derived>::Options } |
enum | { NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment>0) } |
enum | { IsPlainObjectBase = 1 } |
typedef internal::dense_xpr_base < Derived >::type | Base |
typedef internal::traits < Derived >::StorageKind | StorageKind |
typedef internal::traits < Derived >::Scalar | Scalar |
typedef internal::packet_traits < Scalar >::type | PacketScalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef Derived | DenseType |
typedef Eigen::Map< Derived, Unaligned > | MapType |
typedef const Eigen::Map < const Derived, Unaligned > | ConstMapType |
typedef Eigen::Map< Derived, AlignedMax > | AlignedMapType |
typedef const Eigen::Map < const Derived, AlignedMax > | ConstAlignedMapType |
Public Member Functions | |
EIGEN_DEVICE_FUNC Base & | base () |
EIGEN_DEVICE_FUNC const Base & | base () const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index | rows () const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index | cols () const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & | coeff (Index rowId, Index colId) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & | coeff (Index index) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & | coeffRef (Index rowId, Index colId) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & | coeffRef (Index index) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index rowId, Index colId) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index index) const |
template<int LoadMode> | |
EIGEN_STRONG_INLINE PacketScalar | packet (Index rowId, Index colId) const |
template<int LoadMode> | |
EIGEN_STRONG_INLINE PacketScalar | packet (Index index) const |
template<int StoreMode> | |
EIGEN_STRONG_INLINE void | writePacket (Index rowId, Index colId, const PacketScalar &val) |
template<int StoreMode> | |
EIGEN_STRONG_INLINE void | writePacket (Index index, const PacketScalar &val) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * | data () const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * | data () |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | resize (Index rows, Index cols) |
EIGEN_DEVICE_FUNC void | resize (Index size) |
EIGEN_DEVICE_FUNC void | resize (NoChange_t, Index cols) |
EIGEN_DEVICE_FUNC void | resize (Index rows, NoChange_t) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | resizeLike (const EigenBase< OtherDerived > &_other) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index rows, Index cols) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index rows, NoChange_t) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (NoChange_t, Index cols) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index size) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResizeLike (const DenseBase< OtherDerived > &other) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator= (const PlainObjectBase &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | lazyAssign (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator= (const ReturnByValue< OtherDerived > &func) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator= (const EigenBase< OtherDerived > &other) |
EIGEN_DEVICE_FUNC Derived & | setConstant (Index size, const Scalar &val) |
EIGEN_DEVICE_FUNC Derived & | setConstant (Index rows, Index cols, const Scalar &val) |
EIGEN_DEVICE_FUNC Derived & | setZero (Index size) |
EIGEN_DEVICE_FUNC Derived & | setZero (Index rows, Index cols) |
EIGEN_DEVICE_FUNC Derived & | setOnes (Index size) |
EIGEN_DEVICE_FUNC Derived & | setOnes (Index rows, Index cols) |
Derived & | setRandom (Index size) |
Derived & | setRandom (Index rows, Index cols) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC void | swap (DenseBase< OtherDerived > &other) |
Override DenseBase::swap() since for dynamic-sized matrices of same type it is enough to swap the data pointers. | |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC void | swap (DenseBase< OtherDerived > const &other) |
const version forwarded to DenseBase::swap | |
Static Public Member Functions | |
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _check_template_params () |
Map | |
static ConstMapType | Map (const Scalar *data) |
static MapType | Map (Scalar *data) |
static ConstMapType | Map (const Scalar *data, Index size) |
static MapType | Map (Scalar *data, Index size) |
static ConstMapType | Map (const Scalar *data, Index rows, Index cols) |
static MapType | Map (Scalar *data, Index rows, Index cols) |
static ConstAlignedMapType | MapAligned (const Scalar *data) |
static AlignedMapType | MapAligned (Scalar *data) |
static ConstAlignedMapType | MapAligned (const Scalar *data, Index size) |
static AlignedMapType | MapAligned (Scalar *data, Index size) |
static ConstAlignedMapType | MapAligned (const Scalar *data, Index rows, Index cols) |
static AlignedMapType | MapAligned (Scalar *data, Index rows, Index cols) |
template<int Outer, int Inner> | |
static StridedConstMapType < Stride< Outer, Inner > >::type | Map (const Scalar *data, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedMapType< Stride < Outer, Inner > >::type | Map (Scalar *data, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedConstMapType < Stride< Outer, Inner > >::type | Map (const Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedMapType< Stride < Outer, Inner > >::type | Map (Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedConstMapType < Stride< Outer, Inner > >::type | Map (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedMapType< Stride < Outer, Inner > >::type | Map (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedConstAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (Scalar *data, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedConstAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedConstAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
template<int Outer, int Inner> | |
static StridedAlignedMapType < Stride< Outer, Inner > >::type | MapAligned (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
Protected Member Functions | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase () |
EIGEN_DEVICE_FUNC | PlainObjectBase (internal::constructor_without_unaligned_array_assert) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const PlainObjectBase &other) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (Index size, Index rows, Index cols) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const ReturnByValue< OtherDerived > &other) |
Copy constructor with in-place evaluation. | |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _resize_to_match (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | _set (const DenseBase< OtherDerived > &other) |
Copies the value of the expression other into *this with automatic resizing. | |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | _set_noalias (const DenseBase< OtherDerived > &other) |
template<typename T0 , typename T1 > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (Index rows, Index cols, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0) |
template<typename T0 , typename T1 > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (const Scalar &val0, const Scalar &val1, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0) |
template<typename T0 , typename T1 > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (const Index &val0, const Index &val1, typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< T0, Index >::value)&&(internal::is_same< T1, Index >::value)&&Base::SizeAtCompileTime==2, T1 >::type *=0) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (Index size, typename internal::enable_if< (Base::SizeAtCompileTime!=1||!internal::is_convertible< T, Scalar >::value)&&((!internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T >::type *=0) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar &val0, typename internal::enable_if< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T >::type *=0) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Index &val0, typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< Index, T >::value)&&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * >::type *=0) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar *data) |
template<typename T , typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const DenseBase< OtherDerived > &other) |
template<typename T , typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const EigenBase< OtherDerived > &other) |
template<typename T , typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const ReturnByValue< OtherDerived > &other) |
template<typename T , typename OtherDerived , int ColsAtCompileTime> | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const RotationBase< OtherDerived, ColsAtCompileTime > &r) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar &val0, typename internal::enable_if< Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T >::type *=0) |
template<typename T > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Index &val0, typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< Index, T >::value)&&Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T * >::type *=0) |
Protected Attributes | |
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > | m_storage |
Friends | |
class | Eigen::Map |
class | Eigen::Map< Derived, Unaligned > |
class | Eigen::Map< const Derived, Unaligned > |
struct | internal::matrix_swap_impl |
Dense storage base class for matrices and arrays.
This class can be extended with the help of the plugin mechanism described on the page TopicCustomizingEigen by defining the preprocessor symbol EIGEN_PLAINOBJECTBASE_PLUGIN
.
Definition at line 91 of file PlainObjectBase.h.
typedef Eigen::Map<Derived, AlignedMax> Eigen::PlainObjectBase< Derived >::AlignedMapType |
Definition at line 124 of file PlainObjectBase.h.
typedef internal::dense_xpr_base<Derived>::type Eigen::PlainObjectBase< Derived >::Base |
Reimplemented in Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, 1 >, Eigen::Matrix< int, 1, MatrixType::ColsAtCompileTime >, Eigen::Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 3, 1 >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Eigen::Matrix< StorageIndex, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, Dynamic, ColMajor >, Eigen::Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Eigen::Matrix< StorageIndex, Dynamic, 1 >, Eigen::Matrix< Scalar, Dynamic, 1 >, Eigen::Matrix< Scalar, Dim, 1 >, Eigen::Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Eigen::Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Eigen::Matrix< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 1, RowsAtCompileTime, RowMajor, 1, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, Size, Size, ColMajor, MaxColsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< StorageIndex, 1, EIGEN_SIZE_MIN_PREFER_DYNAMIC(ColsAtCompileTime, RowsAtCompileTime), RowMajor, 1, EIGEN_SIZE_MIN_PREFER_FIXED(MaxColsAtCompileTime, MaxRowsAtCompileTime)>, Eigen::Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >, Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Array< RealScalar, Dynamic, 1 >, Eigen::Array< double, UMFPACK_CONTROL, 1 >, Eigen::Array< double, DPARM_SIZE, 1 >, Eigen::Array< StorageIndex, 2, 1 >, Eigen::Array< Index, 1, Dynamic >, Eigen::Array< int, IPARM_SIZE, 1 >, and Eigen::Array< StorageIndex, 64, 1, DontAlign >.
Definition at line 96 of file PlainObjectBase.h.
typedef const Eigen::Map<const Derived, AlignedMax> Eigen::PlainObjectBase< Derived >::ConstAlignedMapType |
Definition at line 125 of file PlainObjectBase.h.
typedef const Eigen::Map<const Derived, Unaligned> Eigen::PlainObjectBase< Derived >::ConstMapType |
Definition at line 118 of file PlainObjectBase.h.
typedef Derived Eigen::PlainObjectBase< Derived >::DenseType |
Definition at line 103 of file PlainObjectBase.h.
typedef Eigen::Map<Derived, Unaligned> Eigen::PlainObjectBase< Derived >::MapType |
Definition at line 116 of file PlainObjectBase.h.
typedef internal::packet_traits<Scalar>::type Eigen::PlainObjectBase< Derived >::PacketScalar |
Definition at line 101 of file PlainObjectBase.h.
typedef NumTraits<Scalar>::Real Eigen::PlainObjectBase< Derived >::RealScalar |
Definition at line 102 of file PlainObjectBase.h.
typedef internal::traits<Derived>::Scalar Eigen::PlainObjectBase< Derived >::Scalar |
Definition at line 99 of file PlainObjectBase.h.
typedef internal::traits<Derived>::StorageKind Eigen::PlainObjectBase< Derived >::StorageKind |
Definition at line 98 of file PlainObjectBase.h.
anonymous enum |
Definition at line 95 of file PlainObjectBase.h.
{ Options = internal::traits<Derived>::Options };
anonymous enum |
Definition at line 135 of file PlainObjectBase.h.
{ NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment>0) };
anonymous enum |
Definition at line 874 of file PlainObjectBase.h.
{ IsPlainObjectBase = 1 };
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | ) | [inline, protected] |
Definition at line 457 of file PlainObjectBase.h.
: m_storage() { // _check_template_params(); // EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
EIGEN_DEVICE_FUNC Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | internal::constructor_without_unaligned_array_assert | ) | [inline, explicit, protected] |
Definition at line 467 of file PlainObjectBase.h.
: m_storage(internal::constructor_without_unaligned_array_assert()) { // _check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | const PlainObjectBase< Derived > & | other | ) | [inline, protected] |
Copy constructor
Definition at line 492 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | Index | size, |
Index | rows, | ||
Index | cols | ||
) | [inline, protected] |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | const DenseBase< OtherDerived > & | other | ) | [inline, protected] |
Definition at line 505 of file PlainObjectBase.h.
: m_storage() { _check_template_params(); resizeLike(other); _set_noalias(other); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | const EigenBase< OtherDerived > & | other | ) | [inline, protected] |
Definition at line 516 of file PlainObjectBase.h.
: m_storage() { _check_template_params(); resizeLike(other); *this = other.derived(); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase | ( | const ReturnByValue< OtherDerived > & | other | ) | [inline, protected] |
Copy constructor with in-place evaluation.
Definition at line 526 of file PlainObjectBase.h.
{ _check_template_params(); // FIXME this does not automatically transpose vectors if necessary resize(other.rows(), other.cols()); other.evalTo(this->derived()); }
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_check_template_params | ( | ) | [inline, static] |
Definition at line 860 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor) && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, (Options&RowMajor)==0) && ((RowsAtCompileTime == Dynamic) || (RowsAtCompileTime >= 0)) && ((ColsAtCompileTime == Dynamic) || (ColsAtCompileTime >= 0)) && ((MaxRowsAtCompileTime == Dynamic) || (MaxRowsAtCompileTime >= 0)) && ((MaxColsAtCompileTime == Dynamic) || (MaxColsAtCompileTime >= 0)) && (MaxRowsAtCompileTime == RowsAtCompileTime || RowsAtCompileTime==Dynamic) && (MaxColsAtCompileTime == ColsAtCompileTime || ColsAtCompileTime==Dynamic) && (Options & (DontAlign|RowMajor)) == Options), INVALID_MATRIX_TEMPLATE_PARAMETERS) }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | Index | size, |
typename internal::enable_if< (Base::SizeAtCompileTime!=1||!internal::is_convertible< T, Scalar >::value)&&((!internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 740 of file PlainObjectBase.h.
{ // NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument. const bool is_integer = NumTraits<T>::IsInteger; EIGEN_STATIC_ASSERT(is_integer, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(size); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const Scalar & | val0, |
typename internal::enable_if< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 753 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) m_storage.data()[0] = val0; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const Index & | val0, |
typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< Index, T >::value)&&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 762 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) m_storage.data()[0] = Scalar(val0); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const Scalar * | data | ) | [inline, protected] |
Definition at line 775 of file PlainObjectBase.h.
{ this->_set_noalias(ConstMapType(data)); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const DenseBase< OtherDerived > & | other | ) | [inline, protected] |
Definition at line 782 of file PlainObjectBase.h.
{ this->_set_noalias(other); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const EigenBase< OtherDerived > & | other | ) | [inline, protected] |
Definition at line 789 of file PlainObjectBase.h.
{ this->derived() = other; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const ReturnByValue< OtherDerived > & | other | ) | [inline, protected] |
Definition at line 795 of file PlainObjectBase.h.
{ resize(other.rows(), other.cols()); other.evalTo(this->derived()); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const RotationBase< OtherDerived, ColsAtCompileTime > & | r | ) | [inline, protected] |
Definition at line 803 of file PlainObjectBase.h.
{ this->derived() = r; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const Scalar & | val0, |
typename internal::enable_if< Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 811 of file PlainObjectBase.h.
{ Base::setConstant(val0); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 | ( | const Index & | val0, |
typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< Index, T >::value)&&Base::SizeAtCompileTime!=Dynamic &&Base::SizeAtCompileTime!=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T * >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 822 of file PlainObjectBase.h.
{ Base::setConstant(val0); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init2 | ( | Index | rows, |
Index | cols, | ||
typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 706 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT(bool(NumTraits<T0>::IsInteger) && bool(NumTraits<T1>::IsInteger), FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(rows,cols); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init2 | ( | const Scalar & | val0, |
const Scalar & | val1, | ||
typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 716 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2) m_storage.data()[0] = val0; m_storage.data()[1] = val1; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init2 | ( | const Index & | val0, |
const Index & | val1, | ||
typename internal::enable_if< (!internal::is_same< Index, Scalar >::value)&&(internal::is_same< T0, Index >::value)&&(internal::is_same< T1, Index >::value)&&Base::SizeAtCompileTime==2, T1 >::type * | = 0 |
||
) | [inline, protected] |
Definition at line 725 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2) m_storage.data()[0] = Scalar(val0); m_storage.data()[1] = Scalar(val1); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_resize_to_match | ( | const EigenBase< OtherDerived > & | other | ) | [inline, protected] |
Resizes *this in preparation for assigning other to it. Takes care of doing all the checking that's needed.
Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.
Definition at line 650 of file PlainObjectBase.h.
{ #ifdef EIGEN_NO_AUTOMATIC_RESIZING eigen_assert((this->size()==0 || (IsVectorAtCompileTime ? (this->size() == other.size()) : (rows() == other.rows() && cols() == other.cols()))) && "Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined"); EIGEN_ONLY_USED_FOR_DEBUG(other); #else resizeLike(other); #endif }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::_set | ( | const DenseBase< OtherDerived > & | other | ) | [inline, protected] |
Copies the value of the expression other into *this
with automatic resizing.
*this might be resized to match the dimensions of other. If *this was a null matrix (not already initialized), it will be initialized.
Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.
Definition at line 680 of file PlainObjectBase.h.
{ internal::call_assignment(this->derived(), other.derived()); return this->derived(); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::_set_noalias | ( | const DenseBase< OtherDerived > & | other | ) | [inline, protected] |
Like _set() but additionally makes the assumption that no aliasing effect can happen (which is the case when creating a new matrix) so one can enforce lazy evaluation.
Definition at line 693 of file PlainObjectBase.h.
{ // I don't think we need this resize call since the lazyAssign will anyways resize // and lazyAssign will be called by the assign selector. //_resize_to_match(other); // the 'false' below means to enforce lazy evaluation. We don't use lazyAssign() because // it wouldn't allow to copy a row-vector into a column-vector. internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar>()); return this->derived(); }
EIGEN_DEVICE_FUNC Base& Eigen::PlainObjectBase< Derived >::base | ( | ) | [inline] |
Definition at line 139 of file PlainObjectBase.h.
{ return *static_cast<Base*>(this); }
EIGEN_DEVICE_FUNC const Base& Eigen::PlainObjectBase< Derived >::base | ( | ) | const [inline] |
Definition at line 141 of file PlainObjectBase.h.
{ return *static_cast<const Base*>(this); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeff | ( | Index | rowId, |
Index | colId | ||
) | const [inline] |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeff | ( | Index | index | ) | const [inline] |
Definition at line 158 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::PlainObjectBase< Derived >::coeffRef | ( | Index | rowId, |
Index | colId | ||
) | [inline] |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::PlainObjectBase< Derived >::coeffRef | ( | Index | index | ) | [inline] |
Definition at line 173 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeffRef | ( | Index | rowId, |
Index | colId | ||
) | const [inline] |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeffRef | ( | Index | index | ) | const [inline] |
Definition at line 188 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::PlainObjectBase< Derived >::cols | ( | void | ) | const [inline] |
Definition at line 146 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Resizes the matrix to rows x cols while leaving old values untouched.
The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or conservativeResize(Index, NoChange_t).
Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will be uninitialized.
Definition at line 363 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize | ( | Index | rows, |
NoChange_t | |||
) | [inline] |
Resizes the matrix to rows x cols while leaving old values untouched.
As opposed to conservativeResize(Index rows, Index cols), this version leaves the number of columns unchanged.
In case the matrix is growing, new rows will be uninitialized.
Definition at line 376 of file PlainObjectBase.h.
{ // Note: see the comment in conservativeResize(Index,Index) conservativeResize(rows, cols()); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize | ( | NoChange_t | , |
Index | cols | ||
) | [inline] |
Resizes the matrix to rows x cols while leaving old values untouched.
As opposed to conservativeResize(Index rows, Index cols), this version leaves the number of rows unchanged.
In case the matrix is growing, new columns will be uninitialized.
Definition at line 390 of file PlainObjectBase.h.
{ // Note: see the comment in conservativeResize(Index,Index) conservativeResize(rows(), cols); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize | ( | Index | size | ) | [inline] |
Resizes the vector to size while retaining old values.
. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.
When values are appended, they will be uninitialized.
Definition at line 405 of file PlainObjectBase.h.
{ internal::conservative_resize_like_impl<Derived>::run(*this, size); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResizeLike | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Resizes the matrix to rows x cols of other
, while leaving old values untouched.
The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or conservativeResize(Index, NoChange_t).
Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will copied from other
.
Definition at line 421 of file PlainObjectBase.h.
{
internal::conservative_resize_like_impl<Derived,OtherDerived>::run(*this, other);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar* Eigen::PlainObjectBase< Derived >::data | ( | ) | const [inline] |
Definition at line 228 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar* Eigen::PlainObjectBase< Derived >::data | ( | ) | [inline] |
Definition at line 232 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::lazyAssign | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Definition at line 438 of file PlainObjectBase.h.
{ _resize_to_match(other); return Base::lazyAssign(other.derived()); }
static ConstMapType Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data | ) | [inline, static] |
Definition at line 555 of file PlainObjectBase.h.
{ return ConstMapType(data); }
static MapType Eigen::PlainObjectBase< Derived >::Map | ( | Scalar * | data | ) | [inline, static] |
Definition at line 557 of file PlainObjectBase.h.
static ConstMapType Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data, |
Index | size | ||
) | [inline, static] |
Definition at line 559 of file PlainObjectBase.h.
{ return ConstMapType(data, size); }
static MapType Eigen::PlainObjectBase< Derived >::Map | ( | Scalar * | data, |
Index | size | ||
) | [inline, static] |
Definition at line 561 of file PlainObjectBase.h.
static ConstMapType Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data, |
Index | rows, | ||
Index | cols | ||
) | [inline, static] |
Definition at line 563 of file PlainObjectBase.h.
{ return ConstMapType(data, rows, cols); }
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data, |
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 582 of file PlainObjectBase.h.
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | Scalar * | data, |
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 585 of file PlainObjectBase.h.
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data, |
Index | size, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 588 of file PlainObjectBase.h.
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | Scalar * | data, |
Index | size, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 591 of file PlainObjectBase.h.
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | const Scalar * | data, |
Index | rows, | ||
Index | cols, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map | ( | Scalar * | data, |
Index | rows, | ||
Index | cols, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data | ) | [inline, static] |
Definition at line 568 of file PlainObjectBase.h.
{ return ConstAlignedMapType(data); }
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data | ) | [inline, static] |
Definition at line 570 of file PlainObjectBase.h.
{ return AlignedMapType(data); }
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data, |
Index | size | ||
) | [inline, static] |
Definition at line 572 of file PlainObjectBase.h.
{ return ConstAlignedMapType(data, size); }
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data, |
Index | size | ||
) | [inline, static] |
Definition at line 574 of file PlainObjectBase.h.
{ return AlignedMapType(data, size); }
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data, |
Index | rows, | ||
Index | cols | ||
) | [inline, static] |
Definition at line 576 of file PlainObjectBase.h.
{ return ConstAlignedMapType(data, rows, cols); }
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data, |
Index | rows, | ||
Index | cols | ||
) | [inline, static] |
Definition at line 578 of file PlainObjectBase.h.
{ return AlignedMapType(data, rows, cols); }
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data, |
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 601 of file PlainObjectBase.h.
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data, |
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 604 of file PlainObjectBase.h.
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data, |
Index | size, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 607 of file PlainObjectBase.h.
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data, |
Index | size, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
Definition at line 610 of file PlainObjectBase.h.
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | const Scalar * | data, |
Index | rows, | ||
Index | cols, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned | ( | Scalar * | data, |
Index | rows, | ||
Index | cols, | ||
const Stride< Outer, Inner > & | stride | ||
) | [inline, static] |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= | ( | const PlainObjectBase< Derived > & | other | ) | [inline] |
This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=.
Definition at line 430 of file PlainObjectBase.h.
{ return _set(other); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= | ( | const ReturnByValue< OtherDerived > & | func | ) | [inline] |
Reimplemented in Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, 1 >, Eigen::Matrix< int, 1, MatrixType::ColsAtCompileTime >, Eigen::Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 3, 1 >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Eigen::Matrix< StorageIndex, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, Dynamic, ColMajor >, Eigen::Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Eigen::Matrix< StorageIndex, Dynamic, 1 >, Eigen::Matrix< Scalar, Dynamic, 1 >, Eigen::Matrix< Scalar, Dim, 1 >, Eigen::Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Eigen::Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Eigen::Matrix< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 1, RowsAtCompileTime, RowMajor, 1, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, Size, Size, ColMajor, MaxColsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< StorageIndex, 1, EIGEN_SIZE_MIN_PREFER_DYNAMIC(ColsAtCompileTime, RowsAtCompileTime), RowMajor, 1, EIGEN_SIZE_MIN_PREFER_FIXED(MaxColsAtCompileTime, MaxRowsAtCompileTime)>, Eigen::Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, and Eigen::Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >.
Definition at line 446 of file PlainObjectBase.h.
{ resize(func.rows(), func.cols()); return Base::operator=(func); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= | ( | const EigenBase< OtherDerived > & | other | ) | [inline] |
Copies the generic expression other into *this.
The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify MatrixBase
Reimplemented in Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, 1 >, Eigen::Matrix< int, 1, MatrixType::ColsAtCompileTime >, Eigen::Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 3, 1 >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Eigen::Matrix< StorageIndex, MatrixType::RowsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Eigen::Matrix< RealScalar, Dynamic, Dynamic, ColMajor >, Eigen::Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Eigen::Matrix< StorageIndex, Dynamic, 1 >, Eigen::Matrix< Scalar, Dynamic, 1 >, Eigen::Matrix< Scalar, Dim, 1 >, Eigen::Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Eigen::Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Eigen::Matrix< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Eigen::Matrix< Scalar, 1, RowsAtCompileTime, RowMajor, 1, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, Size, Size, ColMajor, MaxColsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Eigen::Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Eigen::Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< StorageIndex, 1, EIGEN_SIZE_MIN_PREFER_DYNAMIC(ColsAtCompileTime, RowsAtCompileTime), RowMajor, 1, EIGEN_SIZE_MIN_PREFER_FIXED(MaxColsAtCompileTime, MaxRowsAtCompileTime)>, Eigen::Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, Eigen::Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >, Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Array< RealScalar, Dynamic, 1 >, Eigen::Array< double, UMFPACK_CONTROL, 1 >, Eigen::Array< double, DPARM_SIZE, 1 >, Eigen::Array< StorageIndex, 2, 1 >, Eigen::Array< Index, 1, Dynamic >, Eigen::Array< int, IPARM_SIZE, 1 >, and Eigen::Array< StorageIndex, 64, 1, DontAlign >.
Definition at line 540 of file PlainObjectBase.h.
{ _resize_to_match(other); Base::operator=(other.derived()); return this->derived(); }
EIGEN_STRONG_INLINE PacketScalar Eigen::PlainObjectBase< Derived >::packet | ( | Index | rowId, |
Index | colId | ||
) | const [inline] |
Definition at line 195 of file PlainObjectBase.h.
EIGEN_STRONG_INLINE PacketScalar Eigen::PlainObjectBase< Derived >::packet | ( | Index | index | ) | const [inline] |
Definition at line 205 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::resize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Resizes *this
to a rows x cols matrix.
This method is intended for dynamic-size matrices, although it is legal to call it on any matrix as long as fixed dimensions are left unchanged. If you only want to change the number of rows and/or of columns, you can use resize(NoChange_t, Index), resize(Index, NoChange_t).
If the current number of coefficients of *this
exactly matches the product rows * cols, then no memory allocation is performed and the current values are left unchanged. In all other cases, including shrinking, the data is reallocated and all previous values are lost.
Example:
Output:
Definition at line 252 of file PlainObjectBase.h.
{ eigen_assert( EIGEN_IMPLIES(RowsAtCompileTime!=Dynamic,rows==RowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime!=Dynamic,cols==ColsAtCompileTime) && EIGEN_IMPLIES(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic,rows<=MaxRowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic,cols<=MaxColsAtCompileTime) && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array."); internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(rows, cols); #ifdef EIGEN_INITIALIZE_COEFFS Index size = rows*cols; bool size_changed = size != this->size(); m_storage.resize(size, rows, cols); if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED #else m_storage.resize(rows*cols, rows, cols); #endif }
EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize | ( | Index | size | ) | [inline] |
Resizes *this
to a vector of length size
. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.
Example:
Output:
Definition at line 282 of file PlainObjectBase.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase) eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime==Dynamic || size<=MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size>=0); #ifdef EIGEN_INITIALIZE_COEFFS bool size_changed = size != this->size(); #endif if(RowsAtCompileTime == 1) m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); #ifdef EIGEN_INITIALIZE_COEFFS if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED #endif }
EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize | ( | NoChange_t | , |
Index | cols | ||
) | [inline] |
Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value NoChange
as in the example below.
Example:
Output:
Definition at line 307 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize | ( | Index | rows, |
NoChange_t | |||
) | [inline] |
Resizes the matrix, changing only the number of rows. For the parameter of type NoChange_t, just pass the special value NoChange
as in the example below.
Example:
Output:
Definition at line 321 of file PlainObjectBase.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::resizeLike | ( | const EigenBase< OtherDerived > & | _other | ) | [inline] |
Resizes *this
to have the same dimensions as other. Takes care of doing all the checking that's needed.
Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.
Definition at line 335 of file PlainObjectBase.h.
{ const OtherDerived& other = _other.derived(); internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(other.rows(), other.cols()); const Index othersize = other.rows()*other.cols(); if(RowsAtCompileTime == 1) { eigen_assert(other.rows() == 1 || other.cols() == 1); resize(1, othersize); } else if(ColsAtCompileTime == 1) { eigen_assert(other.rows() == 1 || other.cols() == 1); resize(othersize, 1); } else resize(other.rows(), other.cols()); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::PlainObjectBase< Derived >::rows | ( | void | ) | const [inline] |
Definition at line 144 of file PlainObjectBase.h.
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant | ( | Index | size, |
const Scalar & | val | ||
) |
Resizes to the given size, and sets all coefficients in this expression to the given value val.
Example:
Output:
Definition at line 351 of file CwiseNullaryOp.h.
{ resize(size); return setConstant(val); }
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant | ( | Index | rows, |
Index | cols, | ||
const Scalar & | val | ||
) |
Resizes to the given size, and sets all coefficients in this expression to the given value val.
rows | the new number of rows |
cols | the new number of columns |
val | the value to which all coefficients are set |
Example:
Output:
Definition at line 370 of file CwiseNullaryOp.h.
{ resize(rows, cols); return setConstant(val); }
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes | ( | Index | newSize | ) |
Resizes to the given newSize, and sets all coefficients in this expression to one.
Example:
Output:
Definition at line 645 of file CwiseNullaryOp.h.
{ resize(newSize); return setConstant(Scalar(1)); }
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes | ( | Index | rows, |
Index | cols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to one.
rows | the new number of rows |
cols | the new number of columns |
Example:
Output:
Definition at line 663 of file CwiseNullaryOp.h.
{ resize(rows, cols); return setConstant(Scalar(1)); }
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom | ( | Index | newSize | ) |
Resizes to the given newSize, and sets all coefficients in this expression to random values.
Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.
Example:
Output:
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom | ( | Index | rows, |
Index | cols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to random values.
Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.
rows | the new number of rows |
cols | the new number of columns |
Example:
Output:
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero | ( | Index | newSize | ) |
Resizes to the given size, and sets all coefficients in this expression to zero.
Example:
Output:
Definition at line 519 of file CwiseNullaryOp.h.
{ resize(newSize); return setConstant(Scalar(0)); }
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero | ( | Index | rows, |
Index | cols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to zero.
rows | the new number of rows |
cols | the new number of columns |
Example:
Output:
Definition at line 537 of file CwiseNullaryOp.h.
{ resize(rows, cols); return setConstant(Scalar(0)); }
EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::swap | ( | DenseBase< OtherDerived > & | other | ) | [inline] |
Override DenseBase::swap() since for dynamic-sized matrices of same type it is enough to swap the data pointers.
Definition at line 845 of file PlainObjectBase.h.
{ enum { SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime==Dynamic }; internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.derived()); }
EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::swap | ( | DenseBase< OtherDerived > const & | other | ) | [inline] |
const version forwarded to DenseBase::swap
Definition at line 856 of file PlainObjectBase.h.
{ Base::swap(other.derived()); }
EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::writePacket | ( | Index | rowId, |
Index | colId, | ||
const PacketScalar & | val | ||
) | [inline] |
Definition at line 212 of file PlainObjectBase.h.
EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::writePacket | ( | Index | index, |
const PacketScalar & | val | ||
) | [inline] |
Definition at line 222 of file PlainObjectBase.h.
friend class Eigen::Map [friend] |
Definition at line 114 of file PlainObjectBase.h.
friend class Eigen::Map< const Derived, Unaligned > [friend] |
Definition at line 117 of file PlainObjectBase.h.
friend class Eigen::Map< Derived, Unaligned > [friend] |
Definition at line 115 of file PlainObjectBase.h.
friend struct internal::matrix_swap_impl [friend] |
Reimplemented in Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Eigen::Array< RealScalar, Dynamic, 1 >, Eigen::Array< double, UMFPACK_CONTROL, 1 >, Eigen::Array< double, DPARM_SIZE, 1 >, Eigen::Array< StorageIndex, 2, 1 >, Eigen::Array< Index, 1, Dynamic >, Eigen::Array< int, IPARM_SIZE, 1 >, and Eigen::Array< StorageIndex, 64, 1, DontAlign >.
Definition at line 834 of file PlainObjectBase.h.
DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> Eigen::PlainObjectBase< Derived >::m_storage [protected] |
Definition at line 132 of file PlainObjectBase.h.