CwiseNullaryOp Class Template Reference

Inherits ei_no_assignment_operator, and MatrixBase< Eigen::CwiseNullaryOp< NullaryOp, MatrixType > >.

List of all members.


Detailed Description

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

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

Parameters:
NullaryOp template functor implementing the operator
This class represents an expression of a generic nullary operator. It is the return type of the Ones(), Zero(), Constant(), Identity() and Random() functions, 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, MatrixBase::NullaryExpr()

Public Member Functions

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

Protected Attributes

const ei_int_if_dynamic
< ColsAtCompileTime > 
m_cols
const NullaryOp m_functor
const ei_int_if_dynamic
< RowsAtCompileTime > 
m_rows

Member Function Documentation

const Scalar coeff ( int  index  )  const [inline]

Short version: don't use this function, use operator[](int) const instead.

Long version: this function is similar to operator[](int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameter index is in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](int) const .

See also:
operator[](int) const, coeffRef(int), coeff(int,int) const

Reimplemented from MatrixBase.

const Scalar coeff ( int  row,
int  col 
) const [inline]

Short version: don't use this function, use operator()(int,int) const instead.

Long version: this function is similar to operator()(int,int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(int,int) const .

See also:
operator()(int,int) const, coeffRef(int,int), coeff(int) const

Reimplemented from MatrixBase.

int cols ( void   )  const [inline]

Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from MatrixBase.

PacketScalar packet ( int  index  )  const [inline]

Returns:
the packet of coefficients starting at the given index. It is your responsibility to ensure that a packet really starts there. This method is only available on expressions having the PacketAccessBit and the LinearAccessBit.
The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.

Reimplemented from MatrixBase.

PacketScalar packet ( int  row,
int  col 
) const [inline]

Returns:
the packet of coefficients starting at the given row and column. It is your responsibility to ensure that a packet really starts there. This method is only available on expressions having the PacketAccessBit.
The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.

Reimplemented from MatrixBase.

int rows ( void   )  const [inline]

Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from MatrixBase.


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

Generated on Thu Apr 9 10:10:01 2009 for Eigen by  doxygen 1.5.5