Logo Search packages:      
Sourcecode: blender version File versions  Download package

CwiseNullaryOp< NullaryOp, MatrixType > Class Template Reference

#include <CwiseNullaryOp.h>

Inheritance diagram for CwiseNullaryOp< NullaryOp, MatrixType >:

MatrixBase< CwiseNullaryOp< NullaryOp, MatrixType > >

List of all members.


Detailed Description

template<typename NullaryOp, typename MatrixType>
class 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()

Definition at line 57 of file CwiseNullaryOp.h.


Public Types

enum  
typedef Eigen::Transpose
< NestByValue< typename
ei_cleantype
< ConjugateReturnType >::type > > 
AdjointReturnType
typedef Block< CwiseNullaryOp
< ei_scalar_identity_op
< Scalar >, SquareMatrixType >
, ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::RowsAtCompileTime,
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::ColsAtCompileTime > 
BasisReturnType
typedef Block< CwiseNullaryOp
< NullaryOp, MatrixType >
, ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::RowsAtCompileTime, 1 > 
ColXpr
typedef ei_meta_if< NumTraits
< Scalar >::IsComplex, const
CwiseUnaryOp
< ei_scalar_conjugate_op
< Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType >
>, const CwiseNullaryOp
< NullaryOp, MatrixType >
& >::ret 
ConjugateReturnType
typedef CwiseNullaryOp
< ei_scalar_constant_op
< Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType > > 
ConstantReturnType
typedef Matrix< typename
NumTraits< typename ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar >::Real,
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::ColsAtCompileTime, 1 > 
EigenvaluesReturnType
typedef CwiseNullaryOp
< ei_scalar_identity_op
< Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType > > 
IdentityReturnType
typedef CwiseUnaryOp
< ei_scalar_imag_op< Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
ImagReturnType
typedef ei_packet_traits
< Scalar >::type 
PacketScalar
typedef ei_plain_matrix_type
< CwiseNullaryOp< NullaryOp,
MatrixType > >::type 
PlainMatrixType
typedef ei_plain_matrix_type
< CwiseNullaryOp< NullaryOp,
MatrixType > >::type 
PlainMatrixType_ColMajor
typedef CwiseUnaryOp
< ei_scalar_real_op< Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
RealReturnType
typedef NumTraits< Scalar >::Real RealScalar
typedef Block< CwiseNullaryOp
< NullaryOp, MatrixType >
, 1, ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::ColsAtCompileTime > 
RowXpr
typedef ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar 
Scalar
typedef CwiseUnaryOp
< ei_scalar_multiple_op
< Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType > > 
ScalarMultipleReturnType
typedef CwiseUnaryOp
< ei_scalar_quotient1_op
< Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType > > 
ScalarQuotient1ReturnType
typedef Matrix< Scalar,
EIGEN_ENUM_MAX(RowsAtCompileTime,
ColsAtCompileTime),
EIGEN_ENUM_MAX(RowsAtCompileTime,
ColsAtCompileTime)> 
SquareMatrixType

Public Member Functions

const AdjointReturnType adjoint () const
bool all (void) const
bool any (void) const
const DiagonalMatrix
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
asDiagonal () const
const CwiseBinaryOp
< CustomBinaryOp,
CwiseNullaryOp< NullaryOp,
MatrixType >, OtherDerived > 
binaryExpr (const MatrixBase< OtherDerived > &other, const CustomBinaryOp &func=CustomBinaryOp()) const
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, BlockRows,
BlockCols >::Type 
block (int startRow, int startCol) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, BlockRows,
BlockCols >::Type 
block (int startRow, int startCol)
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Type 
block (int startRow, int startCol, int blockRows, int blockCols) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Type 
block (int startRow, int startCol, int blockRows, int blockCols)
const CwiseUnaryOp
< ei_scalar_cast_op< typename
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar, NewType >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
cast () const
EIGEN_STRONG_INLINE const Scalar coeff (int index) const
EIGEN_STRONG_INLINE const Scalar coeff (int rows, int cols) const
Scalar & coeffRef (int index)
Scalar & coeffRef (int row, int col)
const ColXpr col (int i) const
ColXpr col (int i)
EIGEN_STRONG_INLINE int cols () const
const PartialRedux
< CwiseNullaryOp< NullaryOp,
MatrixType >, Vertical > 
colwise () const
void computeInverse (PlainMatrixType *result) const
ConjugateReturnType conjugate () const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
const_cast_derived () const
void copyCoeff (int index, const MatrixBase< OtherDerived > &other)
void copyCoeff (int row, int col, const MatrixBase< OtherDerived > &other)
void copyPacket (int index, const MatrixBase< OtherDerived > &other)
void copyPacket (int row, int col, const MatrixBase< OtherDerived > &other)
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, CRows, CCols >
::Type 
corner (CornerType type) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, CRows, CCols >
::Type 
corner (CornerType type)
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Type 
corner (CornerType type, int cRows, int cCols) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Type 
corner (CornerType type, int cRows, int cCols)
int count () const
PlainMatrixType cross (const MatrixBase< OtherDerived > &other) const
Cwise< CwiseNullaryOp
< NullaryOp, MatrixType > > 
cwise ()
const Cwise< CwiseNullaryOp
< NullaryOp, MatrixType > > 
cwise () const
 CwiseNullaryOp (int rows, int cols, const NullaryOp &func=NullaryOp())
CwiseNullaryOp< NullaryOp,
MatrixType > & 
derived ()
const CwiseNullaryOp
< NullaryOp, MatrixType > & 
derived () const
Scalar determinant () const
const DiagonalCoeffs
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
diagonal () const
DiagonalCoeffs< CwiseNullaryOp
< NullaryOp, MatrixType > > 
diagonal ()
Scalar dot (const MatrixBase< OtherDerived > &other) const
EigenvaluesReturnType eigenvalues () const
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
end () const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
end ()
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Dynamic >
::SubVectorType 
end (int size) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Dynamic >
::SubVectorType 
end (int size)
Matrix< Scalar, 3, 1 > eulerAngles (int a0, int a1, int a2) const
EIGEN_STRONG_INLINE const
ei_eval< CwiseNullaryOp
< NullaryOp, MatrixType >
>::type 
eval () const
void fill (const Scalar &value)
const WithFormat
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
format (const IOFormat &fmt) const
const ImagReturnType imag () const
int innerSize () const
const PlainMatrixType inverse () const
bool isApprox (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isApproxToConstant (const Scalar &value, RealScalar prec=precision< Scalar >()) const
bool isConstant (const Scalar &value, RealScalar prec=precision< Scalar >()) const
bool isDiagonal (RealScalar prec=precision< Scalar >()) const
bool isIdentity (RealScalar prec=precision< Scalar >()) const
bool isLowerTriangular (RealScalar prec=precision< Scalar >()) const
bool isMuchSmallerThan (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isMuchSmallerThan (const RealScalar &other, RealScalar prec=precision< Scalar >()) const
bool isOnes (RealScalar prec=precision< Scalar >()) const
bool isOrthogonal (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isUnitary (RealScalar prec=precision< Scalar >()) const
bool isUpperTriangular (RealScalar prec=precision< Scalar >()) const
bool isVector () const
bool isZero (RealScalar prec=precision< Scalar >()) const
const Flagged< CwiseNullaryOp
< NullaryOp, MatrixType >
, 0, EvalBeforeNestingBit|EvalBeforeAssigningBit
lazy () const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
lazyAssign (const SparseProduct< Derived1, Derived2, DenseTimeSparseProduct > &product)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
lazyAssign (const SparseProduct< Derived1, Derived2, SparseTimeDenseProduct > &product)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
lazyAssign (const Flagged< OtherDerived, 0, EvalBeforeNestingBit|EvalBeforeAssigningBit > &other)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
lazyAssign (const Product< Lhs, Rhs, CacheFriendlyProduct > &product)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
lazyAssign (const MatrixBase< OtherDerived > &other)
const LDLT< PlainMatrixTypeldlt () const
const LLT< PlainMatrixTypellt () const
RealScalar lpNorm () const
const LU< PlainMatrixTypelu () const
const Flagged< CwiseNullaryOp
< NullaryOp, MatrixType >
, Added, 0 > 
marked () const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
maxCoeff (int *index) const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
maxCoeff (int *row, int *col) const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
maxCoeff () const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
minCoeff (int *index) const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
minCoeff (int *row, int *col) const
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar 
minCoeff () const
const Minor< CwiseNullaryOp
< NullaryOp, MatrixType > > 
minor (int row, int col) const
Minor< CwiseNullaryOp
< NullaryOp, MatrixType > > 
minor (int row, int col)
const NestByValue
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
nestByValue () const
int nonZeros () const
RealScalar norm () const
void normalize ()
const PlainMatrixType normalized () const
bool operator!= (const MatrixBase< OtherDerived > &other) const
Scalar & operator() (int index)
const Scalar operator() (int index) const
Scalar & operator() (int row, int col)
const Scalar operator() (int row, int col) const
const ProductReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, OtherDerived >
::Type 
operator* (const MatrixBase< OtherDerived > &other) const
const ScalarMultipleReturnType operator* (const Scalar &scalar) const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator*= (const MatrixBase< OtherDerived > &other)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator*= (const Scalar &other)
const CwiseBinaryOp
< ei_scalar_sum_op< typename
ei_traits< CwiseNullaryOp
< NullaryOp, MatrixType >
>::Scalar >, CwiseNullaryOp
< NullaryOp, MatrixType >
, OtherDerived > 
operator+ (const MatrixBase< OtherDerived > &other) const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator+= (const Flagged< Product< Lhs, Rhs, CacheFriendlyProduct >, 0, EvalBeforeNestingBit|EvalBeforeAssigningBit > &other)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator+= (const MatrixBase< OtherDerived > &other)
const CwiseBinaryOp
< ei_scalar_difference_op
< typename ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType >, OtherDerived > 
operator- (const MatrixBase< OtherDerived > &other) const
const CwiseUnaryOp
< ei_scalar_opposite_op
< typename ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
operator- () const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator-= (const MatrixBase< OtherDerived > &other)
const CwiseUnaryOp
< ei_scalar_quotient1_op
< typename ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
operator/ (const Scalar &scalar) const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
operator/= (const Scalar &other)
CommaInitializer
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
operator<< (const MatrixBase< OtherDerived > &other)
CommaInitializer
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
operator<< (const Scalar &s)
bool operator== (const MatrixBase< OtherDerived > &other) const
Scalar & operator[] (int index)
const Scalar operator[] (int index) const
RealScalar operatorNorm () const
int outerSize () const
template<int LoadMode>
EIGEN_STRONG_INLINE PacketScalar packet (int) const
template<int LoadMode>
EIGEN_STRONG_INLINE PacketScalar packet (int, int) const
const Part< CwiseNullaryOp
< NullaryOp, MatrixType >
, Mode > 
part () const
Part< CwiseNullaryOp
< NullaryOp, MatrixType >
, Mode > 
part ()
const QR< PlainMatrixTypeqr () const
const RealReturnType real () const
const RowXpr row (int i) const
RowXpr row (int i)
EIGEN_STRONG_INLINE int rows () const
const PartialRedux
< CwiseNullaryOp< NullaryOp,
MatrixType >, Horizontal > 
rowwise () const
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
segment (int start) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
segment (int start)
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::SubVectorType 
segment (int start, int size) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType > >::SubVectorType 
segment (int start, int size)
const Select< CwiseNullaryOp
< NullaryOp, MatrixType >
, NestByValue< typename
ElseDerived::ConstantReturnType >
, ElseDerived > 
select (typename ElseDerived::Scalar thenScalar, const MatrixBase< ElseDerived > &elseMatrix) const
const Select< CwiseNullaryOp
< NullaryOp, MatrixType >
, ThenDerived, NestByValue
< typename
ThenDerived::ConstantReturnType > > 
select (const MatrixBase< ThenDerived > &thenMatrix, typename ThenDerived::Scalar elseScalar) const
const Select< CwiseNullaryOp
< NullaryOp, MatrixType >
, ThenDerived, ElseDerived > 
select (const MatrixBase< ThenDerived > &thenMatrix, const MatrixBase< ElseDerived > &elseMatrix) const
CwiseNullaryOp< NullaryOp,
MatrixType > & 
setConstant (const Scalar &value)
CwiseNullaryOp< NullaryOp,
MatrixType > & 
setIdentity ()
CwiseNullaryOp< NullaryOp,
MatrixType > & 
setOnes ()
CwiseNullaryOp< NullaryOp,
MatrixType > & 
setRandom ()
CwiseNullaryOp< NullaryOp,
MatrixType > & 
setZero ()
int size () const
ei_plain_matrix_type_column_major
< OtherDerived >::type 
solveTriangular (const MatrixBase< OtherDerived > &other) const
void solveTriangularInPlace (const MatrixBase< OtherDerived > &other) const
RealScalar squaredNorm () const
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
start () const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Size >
::SubVectorType 
start (void)
const BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Dynamic >
::SubVectorType 
start (int size) const
BlockReturnType
< CwiseNullaryOp< NullaryOp,
MatrixType >, Dynamic >
::SubVectorType 
start (int size)
int stride (void) const
Scalar sum () const
SVD< PlainMatrixTypesvd () const
void swap (const MatrixBase< OtherDerived > &other)
Scalar trace () const
const Eigen::Transpose
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
transpose () const
Eigen::Transpose
< CwiseNullaryOp< NullaryOp,
MatrixType > > 
transpose ()
void transposeInPlace ()
const CwiseUnaryOp
< CustomUnaryOp,
CwiseNullaryOp< NullaryOp,
MatrixType > > 
unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const
PlainMatrixType unitOrthogonal (void) const
void visit (Visitor &func) const
Scalar & w ()
const Scalar w () const
void writePacket (int index, const PacketScalar &x)
void writePacket (int row, int col, const PacketScalar &x)
Scalar & x ()
const Scalar x () const
Scalar & y ()
const Scalar y () const
Scalar & z ()
const Scalar z () const

Static Public Member Functions

static const ConstantReturnType Constant (const Scalar &value)
static const ConstantReturnType Constant (int size, const Scalar &value)
static const ConstantReturnType Constant (int rows, int cols, const Scalar &value)
static const IdentityReturnType Identity (int rows, int cols)
static const IdentityReturnType Identity ()
static const CwiseNullaryOp
< CustomNullaryOp,
CwiseNullaryOp< NullaryOp,
MatrixType > > 
NullaryExpr (const CustomNullaryOp &func)
static const CwiseNullaryOp
< CustomNullaryOp,
CwiseNullaryOp< NullaryOp,
MatrixType > > 
NullaryExpr (int size, const CustomNullaryOp &func)
static const CwiseNullaryOp
< CustomNullaryOp,
CwiseNullaryOp< NullaryOp,
MatrixType > > 
NullaryExpr (int rows, int cols, const CustomNullaryOp &func)
static const ConstantReturnType Ones ()
static const ConstantReturnType Ones (int size)
static const ConstantReturnType Ones (int rows, int cols)
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
Random ()
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
Random (int size)
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
Random (int rows, int cols)
static const BasisReturnType Unit (int i)
static const BasisReturnType Unit (int size, int i)
static const BasisReturnType UnitW ()
static const BasisReturnType UnitX ()
static const BasisReturnType UnitY ()
static const BasisReturnType UnitZ ()
static const ConstantReturnType Zero ()
static const ConstantReturnType Zero (int size)
static const ConstantReturnType Zero (int rows, int cols)

Protected Attributes

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

Friends

const CwiseUnaryOp
< ei_scalar_multiple_op
< typename ei_traits
< CwiseNullaryOp< NullaryOp,
MatrixType > >::Scalar >
, CwiseNullaryOp< NullaryOp,
MatrixType > > 
operator* (const Scalar &scalar, const MatrixBase &matrix)

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

Generated by  Doxygen 1.6.0   Back to index