template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >
General-purpose arrays with easy API for coefficient-wise operations.
The Array class is very similar to the Matrix class. It provides general-purpose one- and two-dimensional arrays. The difference between the Array and the Matrix class is primarily in the API: the API for the Array class provides easy access to coefficient-wise operations, while the API for the Matrix class provides easy access to linear-algebra operations.
See documentation of class Matrix for detailed information on the template parameters storage layout.
This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_ARRAY_PLUGIN
.
- See also
- The Array class and coefficient-wise operations, The class hierarchy
|
| Array () |
|
| Array (const Array &other) |
|
template<typename OtherDerived > |
| Array (const EigenBase< OtherDerived > &other) |
|
| Array (const Scalar &val0, const Scalar &val1) |
|
| Array (const Scalar &val0, const Scalar &val1, const Scalar &val2) |
|
| Array (const Scalar &val0, const Scalar &val1, const Scalar &val2, const Scalar &val3) |
|
| Array (const Scalar &value) |
|
| Array (const Scalar *data) |
| Constructs a fixed-sized array initialized with coefficients starting at data.
|
|
| Array (Index dim) |
|
| Array (Index rows, Index cols) |
|
const Scalar & | coeff (Index index) const |
|
const Scalar & | coeff (Index rowId, Index colId) const |
|
Scalar & | coeffRef (Index index) |
|
const Scalar & | coeffRef (Index index) const |
|
Scalar & | coeffRef (Index rowId, Index colId) |
|
const Scalar & | coeffRef (Index rowId, Index colId) const |
|
Array & | operator= (const Array &other) |
|
template<typename OtherDerived > |
Array & | operator= (const DenseBase< OtherDerived > &other) |
|
template<typename OtherDerived > |
Array & | operator= (const EigenBase< OtherDerived > &other) |
|
Array & | operator= (const Scalar &value) |
|
const Scalar & | coeff (Index index) const |
|
const Scalar & | coeff (Index rowId, Index colId) const |
|
Scalar & | coeffRef (Index index) |
|
const Scalar & | coeffRef (Index index) const |
|
Scalar & | coeffRef (Index rowId, Index colId) |
|
const Scalar & | coeffRef (Index rowId, Index colId) const |
|
void | conservativeResize (Index rows, Index cols) |
|
void | conservativeResize (Index rows, NoChange_t) |
|
void | conservativeResize (Index size) |
|
void | conservativeResize (NoChange_t, Index cols) |
|
void | conservativeResizeLike (const DenseBase< OtherDerived > &other) |
|
Scalar * | data () |
|
const Scalar * | data () const |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | lazyAssign (const DenseBase< OtherDerived > &other) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | operator= (const EigenBase< OtherDerived > &other) |
| Copies the generic expression other into *this.
|
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | operator= (const PlainObjectBase &other) |
|
void | resize (Index rows, Index cols) |
|
void | resize (Index rows, NoChange_t) |
|
void | resize (Index size) |
|
void | resize (NoChange_t, Index cols) |
|
void | resizeLike (const EigenBase< OtherDerived > &_other) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setConstant (Index size, const Scalar &val) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setConstant (Index rows, Index cols, const Scalar &val) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setZero (Index size) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setZero (Index rows, Index cols) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setOnes (Index size) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setOnes (Index rows, Index cols) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setRandom (Index size) |
|
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & | setRandom (Index rows, Index cols) |
|
template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename OtherDerived >
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.