Public Types | Public Member Functions | Protected Attributes | List of all members
CwiseNullaryOp< NullaryOp, PlainObjectType > Class Template Reference

Generic expression of a matrix where all coefficients are defined by a functor. More...

#include <CwiseNullaryOp.h>

Inherits no_assignment_operator, and type< CwiseNullaryOp< NullaryOp, PlainObjectType > >.

Public Types

typedef
internal::dense_xpr_base
< CwiseNullaryOp >::type 
Base

Public Member Functions

const Scalar coeff (Index rows, Index cols) const
const Scalar coeff (Index index) const
Index cols () const
 CwiseNullaryOp (Index rows, Index cols, const NullaryOp &func=NullaryOp())
const NullaryOp & functor () const
template<int LoadMode>
PacketScalar packet (Index row, Index col) const
template<int LoadMode>
PacketScalar packet (Index index) const
Index rows () const

Protected Attributes

const
internal::variable_if_dynamic
< Index, ColsAtCompileTime > 
m_cols
const NullaryOp m_functor
const
internal::variable_if_dynamic
< Index, RowsAtCompileTime > 
m_rows

Detailed Description

template<typename NullaryOp, typename PlainObjectType>
class Eigen::CwiseNullaryOp< NullaryOp, PlainObjectType >

Generic expression of a matrix where all coefficients are defined by a functor.

Parameters
NullaryOptemplate functor implementing the operator
PlainObjectTypethe underlying plain matrix/array type

This class represents an expression of a generic nullary operator. It is the return type of the Ones(), Zero(), Constant(), Identity() and Random() methods, and most of the time this is the only way it is used.

However, if you want to write a function returning such an expression, you will need to use this class.

See Also
class CwiseUnaryOp, class CwiseBinaryOp, DenseBase::NullaryExpr()

Member Typedef Documentation

typedef internal::dense_xpr_base<CwiseNullaryOp>::type Base

Constructor & Destructor Documentation

CwiseNullaryOp ( Index  rows,
Index  cols,
const NullaryOp &  func = NullaryOp() 
)
inline

References Eigen::Dynamic, and eigen_assert.

Member Function Documentation

const Scalar coeff ( Index  rows,
Index  cols 
) const
inline
const Scalar coeff ( Index  index) const
inline
Index cols ( ) const
inline
const NullaryOp& functor ( ) const
inline
Returns
the functor representing the nullary operation
PacketScalar packet ( Index  row,
Index  col 
) const
inline
PacketScalar packet ( Index  index) const
inline
Index rows ( ) const
inline

Member Data Documentation

const internal::variable_if_dynamic<Index, ColsAtCompileTime> m_cols
protected
const NullaryOp m_functor
protected
const internal::variable_if_dynamic<Index, RowsAtCompileTime> m_rows
protected

The documentation for this class was generated from the following file: