Dense storage base class for matrices and arrays. More...
#include <PlainObjectBase.h>
Inherits dense_xpr_base_dispatcher_for_doxygen< Derived >.
Classes | |
struct | StridedAlignedMapType |
struct | StridedConstAlignedMapType |
struct | StridedConstMapType |
struct | StridedMapType |
Public Types | |
enum | { Options } |
enum | { NeedsToAlign } |
typedef Eigen::Map< Derived, Aligned > | AlignedMapType |
typedef internal::dense_xpr_base < Derived >::type | Base |
typedef const Eigen::Map < const Derived, Aligned > | ConstAlignedMapType |
typedef const Eigen::Map < const Derived, Unaligned > | ConstMapType |
typedef Derived | DenseType |
typedef internal::traits < Derived >::Index | Index |
typedef Eigen::Map< Derived, Unaligned > | MapType |
typedef internal::packet_traits < Scalar >::type | PacketScalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits < Derived >::Scalar | Scalar |
typedef internal::traits < Derived >::StorageKind | StorageKind |
Public Member Functions | |
Base & | base () |
const Base & | base () const |
const Scalar & | coeff (Index row, Index col) const |
const Scalar & | coeff (Index index) const |
Scalar & | coeffRef (Index row, Index col) |
Scalar & | coeffRef (Index index) |
const Scalar & | coeffRef (Index row, Index col) const |
const Scalar & | coeffRef (Index index) const |
Index | cols () const |
void | conservativeResize (Index rows, Index cols) |
void | conservativeResize (Index rows, NoChange_t) |
void | conservativeResize (NoChange_t, Index cols) |
void | conservativeResize (Index size) |
template<typename OtherDerived > | |
void | conservativeResizeLike (const DenseBase< OtherDerived > &other) |
const Scalar * | data () const |
Scalar * | data () |
template<typename OtherDerived > | |
Derived & | lazyAssign (const DenseBase< OtherDerived > &other) |
Derived & | operator= (const PlainObjectBase &other) |
template<typename OtherDerived > | |
Derived & | operator= (const ReturnByValue< OtherDerived > &func) |
template<typename OtherDerived > | |
Derived & | operator= (const EigenBase< OtherDerived > &other) |
Copies the generic expression other into *this. | |
template<int LoadMode> | |
PacketScalar | packet (Index row, Index col) const |
template<int LoadMode> | |
PacketScalar | packet (Index index) const |
PlainObjectBase () | |
PlainObjectBase (Index size, Index rows, Index cols) | |
template<typename OtherDerived > | |
PlainObjectBase (const EigenBase< OtherDerived > &other) | |
void | resize (Index rows, Index cols) |
void | resize (Index size) |
void | resize (NoChange_t, Index cols) |
void | resize (Index rows, NoChange_t) |
template<typename OtherDerived > | |
void | resizeLike (const EigenBase< OtherDerived > &_other) |
Index | rows () const |
Derived & | setConstant (Index size, const Scalar &value) |
Derived & | setConstant (Index rows, Index cols, const Scalar &value) |
Derived & | setOnes (Index size) |
Derived & | setOnes (Index rows, Index cols) |
Derived & | setRandom (Index size) |
Derived & | setRandom (Index rows, Index cols) |
Derived & | setZero (Index size) |
Derived & | setZero (Index rows, Index cols) |
template<int StoreMode> | |
void | writePacket (Index row, Index col, const PacketScalar &x) |
template<int StoreMode> | |
void | writePacket (Index index, const PacketScalar &x) |
Static Public Member Functions | |
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 T0 , typename T1 > | |
void | _init2 (Index rows, Index cols, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0) |
template<typename T0 , typename T1 > | |
void | _init2 (const Scalar &x, const Scalar &y, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0) |
template<typename OtherDerived > | |
void | _resize_to_match (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
Derived & | _set (const DenseBase< OtherDerived > &other) |
Copies the value of the expression other into *this with automatic resizing. | |
template<typename OtherDerived > | |
Derived & | _set_noalias (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
void | _set_selector (const OtherDerived &other, const internal::true_type &) |
template<typename OtherDerived > | |
void | _set_selector (const OtherDerived &other, const internal::false_type &) |
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 Customizing/Extending Eigen by defining the preprocessor symbol EIGEN_PLAINOBJECTBASE_PLUGIN
.
typedef Eigen::Map<Derived, Aligned> AlignedMapType |
typedef internal::dense_xpr_base<Derived>::type Base |
Reimplemented in Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Matrix< RealScalar, Dynamic, 1 >, Matrix< int, 1, MatrixType::ColsAtCompileTime >, Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Matrix< Index, MatrixType::RowsAtCompileTime, 1 >, Matrix< Scalar, 3, 1 >, Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Matrix< internal::scalar_product_traits< Lhs::Scalar, Rhs::Scalar >::ReturnType, 1, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Matrix< Scalar, Dynamic, Dynamic >, Matrix< double, DPARM_SIZE, 1 >, Matrix< Scalar, Dynamic, 1 >, Matrix< RootType, _Deg, 1 >, Matrix< Scalar, Dim, 1 >, Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Matrix< int, IPARM_SIZE, 1 >, Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< Index, Dynamic, 1 >, Matrix< int, Dynamic, 1 >, Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >, Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >, Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, and Array< Index, 64, 1 >.
typedef const Eigen::Map<const Derived, Aligned> ConstAlignedMapType |
typedef const Eigen::Map<const Derived, Unaligned> ConstMapType |
typedef Derived DenseType |
typedef Eigen::Map<Derived, Unaligned> MapType |
typedef internal::packet_traits<Scalar>::type PacketScalar |
typedef NumTraits<Scalar>::Real RealScalar |
typedef internal::traits<Derived>::StorageKind StorageKind |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
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.
Referenced by Array< Index, 64, 1 >::operator=(), and PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=().
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize(), DiagonalPreconditioner< _Scalar >::factorize(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize(), and SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run().
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.
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize().
|
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.
|
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.
|
inline |
Resizes the vector to size while retaining old values.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.. 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.
|
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
.
|
inline |
Referenced by PastixBase< PastixLU< _MatrixType > >::clean(), Transform< _Scalar, _Dim, _Mode, _Options >::data(), PardisoImpl< PardisoLU< MatrixType > >::pardisoRelease(), and SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run().
|
inline |
|
inline |
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::lazyAssign(), and CoeffBasedProduct< LhsNested, RhsNested, NestingFlags >::operator const PlainObject &().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=.
Referenced by Array< Index, 64, 1 >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), and PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase().
|
inline |
Reimplemented in Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Matrix< RealScalar, Dynamic, 1 >, Matrix< int, 1, MatrixType::ColsAtCompileTime >, Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Matrix< Index, MatrixType::RowsAtCompileTime, 1 >, Matrix< Scalar, 3, 1 >, Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Matrix< internal::scalar_product_traits< Lhs::Scalar, Rhs::Scalar >::ReturnType, 1, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Matrix< Scalar, Dynamic, Dynamic >, Matrix< double, DPARM_SIZE, 1 >, Matrix< Scalar, Dynamic, 1 >, Matrix< RootType, _Deg, 1 >, Matrix< Scalar, Dim, 1 >, Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Matrix< int, IPARM_SIZE, 1 >, Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< Index, Dynamic, 1 >, Matrix< int, Dynamic, 1 >, Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >, and Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >.
|
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 Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 >, Matrix< RealScalar, Dynamic, 1 >, Matrix< int, 1, MatrixType::ColsAtCompileTime >, Matrix< int, MatrixType::RowsAtCompileTime, 1 >, Matrix< Index, MatrixType::RowsAtCompileTime, 1 >, Matrix< Scalar, 3, 1 >, Matrix< Scalar, AmbientDimAtCompileTime, 1, Options >, Matrix< internal::scalar_product_traits< Lhs::Scalar, Rhs::Scalar >::ReturnType, 1, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &(~RowMajor), MaxColsAtCompileTime, 1 >, Matrix< Scalar, 1, Size, Options|RowMajor, 1, MaxSize >, Matrix< Scalar, Dynamic, Dynamic >, Matrix< double, DPARM_SIZE, 1 >, Matrix< Scalar, Dynamic, 1 >, Matrix< RootType, _Deg, 1 >, Matrix< Scalar, Dim, 1 >, Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime >, Matrix< Scalar, SizeMinusOne, 1, Options &~RowMajor, MaxSizeMinusOne, 1 >, Matrix< int, IPARM_SIZE, 1 >, Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 >, Matrix< Index, Dynamic, 1 >, Matrix< int, Dynamic, 1 >, Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime >, Matrix< Scalar, AmbientDimAtCompileTime, 1 >, Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime >, Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >, Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options >, Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >, Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, and Array< Index, 64, 1 >.
|
inline |
|
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:
here's the 2x3 matrix m: 1 2 3 4 5 6 let's resize m to 3x2. This is a conservative resizing because 2*3==3*2. here's the 3x2 matrix m: 1 5 4 3 2 6 now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized: 1.79e-316 2.12e-314 4.94e-324 4.94e-323
Referenced by Array< Index, 64, 1 >::Array(), HessenbergDecomposition< MatrixType >::compute(), Tridiagonalization< _MatrixType >::compute(), DiagonalPreconditioner< _Scalar >::factorize(), HessenbergDecomposition< MatrixType >::HessenbergDecomposition(), Eigen::internal::householder_qr_inplace_blocked(), Eigen::internal::householder_qr_inplace_unblocked(), SuperLUBase< _MatrixType, SuperILU< _MatrixType > >::initFactorization(), ProductBase< SelfadjointProductMatrix< Lhs, LhsMode, false, Rhs, RhsMode, false >, Lhs, Rhs >::operator const PlainObject &(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), and SparseMatrix< _Scalar, _Options, _Index >::sumupDuplicates().
|
inline |
Resizes *this
to a vector of length size
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.. 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:
v: 3 rows, 1 cols w: 1 rows, 3 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:
m: 3 rows, 5 cols
|
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:
m: 5 rows, 4 cols
|
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.
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match().
|
inline |
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize(), and SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run().
Resizes to the given size, and sets all coefficients in this expression to the given value.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
5 5 5
Referenced by AlignedBox< _Scalar, _AmbientDim >::setEmpty().
Resizes to the given size, and sets all coefficients in this expression to the given value.
rows | the new number of rows |
cols | the new number of columns |
value | the value to which all coefficients are set |
Example:
Output:
5 5 5 5 5 5 5 5 5
|
inline |
Resizes to the given size, and sets all coefficients in this expression to one.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
1 1 1
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:
1 1 1 1 1 1 1 1 1
|
inline |
Resizes to the given size, and sets all coefficients in this expression to random values.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
0.68 -0.211 0.566
Resizes to the given size, and sets all coefficients in this expression to random values.
rows | the new number of rows |
cols | the new number of columns |
Example:
Output:
0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444
|
inline |
Resizes to the given size, and sets all coefficients in this expression to zero.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
0 0 0
Referenced by main(), Translation< _Scalar, _Dim >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), PardisoImpl< PardisoLU< MatrixType > >::PardisoImpl(), and Eigen::internal::set_from_triplets().
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:
0 0 0 0 0 0 0 0 0
|
inline |
|
inline |
|
protected |
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init2(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::coeff(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::coeffRef(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::cols(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::data(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::packet(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::rows(), and PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::writePacket().