Shapeworks Studio
2.1
Shape analysis software suite
|
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>::Flags & AlignedBit) != 0 } |
typedef internal::dense_xpr_base< Derived >::type | Base |
typedef internal::traits< Derived >::StorageKind | StorageKind |
typedef internal::traits< Derived >::Index | Index |
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, Aligned > | AlignedMapType |
typedef const Eigen::Map< const Derived, Aligned > | ConstAlignedMapType |
Public Member Functions | |
Base & | base () |
const Base & | base () const |
EIGEN_STRONG_INLINE Index | rows () const |
EIGEN_STRONG_INLINE Index | cols () const |
EIGEN_STRONG_INLINE const Scalar & | coeff (Index rowId, Index colId) const |
EIGEN_STRONG_INLINE const Scalar & | coeff (Index index) const |
EIGEN_STRONG_INLINE Scalar & | coeffRef (Index rowId, Index colId) |
EIGEN_STRONG_INLINE Scalar & | coeffRef (Index index) |
EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index rowId, Index colId) const |
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_STRONG_INLINE const Scalar * | data () const |
EIGEN_STRONG_INLINE Scalar * | data () |
EIGEN_STRONG_INLINE void | resize (Index nbRows, Index nbCols) |
void | resize (Index size) |
void | resize (NoChange_t, Index nbCols) |
void | resize (Index nbRows, NoChange_t) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE void | resizeLike (const EigenBase< OtherDerived > &_other) |
EIGEN_STRONG_INLINE void | conservativeResize (Index nbRows, Index nbCols) |
EIGEN_STRONG_INLINE void | conservativeResize (Index nbRows, NoChange_t) |
EIGEN_STRONG_INLINE void | conservativeResize (NoChange_t, Index nbCols) |
EIGEN_STRONG_INLINE void | conservativeResize (Index size) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE void | conservativeResizeLike (const DenseBase< OtherDerived > &other) |
EIGEN_STRONG_INLINE Derived & | operator= (const PlainObjectBase &other) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE Derived & | lazyAssign (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE Derived & | operator= (const ReturnByValue< OtherDerived > &func) |
PlainObjectBase (internal::constructor_without_unaligned_array_assert) | |
EIGEN_STRONG_INLINE | PlainObjectBase (Index a_size, Index nbRows, Index nbCols) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE Derived & | operator= (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE | PlainObjectBase (const EigenBase< OtherDerived > &other) |
Derived & | setConstant (Index size, const Scalar &value) |
Derived & | setConstant (Index rows, Index cols, const Scalar &value) |
Derived & | setZero (Index size) |
Derived & | setZero (Index rows, Index cols) |
Derived & | setOnes (Index size) |
Derived & | setOnes (Index rows, Index cols) |
Derived & | setRandom (Index size) |
Derived & | setRandom (Index rows, Index cols) |
Static Public Member Functions | |
static 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 | |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE void | _resize_to_match (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE Derived & | _set (const DenseBase< OtherDerived > &other) |
Copies the value of the expression other into *this with automatic resizing. More... | |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE void | _set_selector (const OtherDerived &other, const internal::true_type &) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE void | _set_selector (const OtherDerived &other, const internal::false_type &) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE Derived & | _set_noalias (const DenseBase< OtherDerived > &other) |
template<typename T0 , typename T1 > | |
EIGEN_STRONG_INLINE void | _init2 (Index nbRows, Index nbCols, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0) |
template<typename T0 , typename T1 > | |
EIGEN_STRONG_INLINE void | _init2 (const Scalar &val0, const Scalar &val1, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0) |
template<typename OtherDerived > | |
void | _swap (DenseBase< OtherDerived > const &other) |
Protected Attributes | |
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > | m_storage |
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 85 of file PlainObjectBase.h.
|
inline |
Definition at line 456 of file PlainObjectBase.h.
|
inlineprotected |
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 593 of file PlainObjectBase.h.
|
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 339 of file PlainObjectBase.h.
|
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 351 of file PlainObjectBase.h.
|
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 364 of file PlainObjectBase.h.
|
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 378 of file PlainObjectBase.h.
|
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 393 of file PlainObjectBase.h.
|
inline |
Definition at line 209 of file PlainObjectBase.h.
|
inline |
Definition at line 213 of file PlainObjectBase.h.
|
inline |
Definition at line 408 of file PlainObjectBase.h.
|
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 401 of file PlainObjectBase.h.
|
inline |
Definition at line 447 of file PlainObjectBase.h.
|
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 232 of file PlainObjectBase.h.
|
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 262 of file PlainObjectBase.h.
|
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 286 of file PlainObjectBase.h.
|
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 299 of file PlainObjectBase.h.
|
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 312 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.
Example:
Output:
Definition at line 348 of file CwiseNullaryOp.h.
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant | ( | Index | nbRows, |
Index | nbCols, | ||
const Scalar & | val | ||
) |
Resizes to the given size, and sets all coefficients in this expression to the given value.
nbRows | the new number of rows |
nbCols | the new number of columns |
val | the value to which all coefficients are set |
Example:
Output:
Definition at line 367 of file CwiseNullaryOp.h.
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 641 of file CwiseNullaryOp.h.
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes | ( | Index | nbRows, |
Index | nbCols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to one.
nbRows | the new number of rows |
nbCols | the new number of columns |
Example:
Output:
Definition at line 659 of file CwiseNullaryOp.h.
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.
Example:
Output:
Definition at line 126 of file Random.h.
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom | ( | Index | nbRows, |
Index | nbCols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to random values.
nbRows | the new number of rows |
nbCols | the new number of columns |
Example:
Output:
Definition at line 144 of file Random.h.
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 515 of file CwiseNullaryOp.h.
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero | ( | Index | nbRows, |
Index | nbCols | ||
) |
Resizes to the given size, and sets all coefficients in this expression to zero.
nbRows | the new number of rows |
nbCols | the new number of columns |
Example:
Output:
Definition at line 533 of file CwiseNullaryOp.h.