DenseBase.h
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
5// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
6//
7// This Source Code Form is subject to the terms of the Mozilla
8// Public License v. 2.0. If a copy of the MPL was not distributed
9// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
11#ifndef EIGEN_DENSEBASE_H
12#define EIGEN_DENSEBASE_H
13
14namespace Eigen {
15
31template<typename Derived> class DenseBase
32#ifndef EIGEN_PARSED_BY_DOXYGEN
33 : public internal::special_scalar_op_base<Derived,typename internal::traits<Derived>::Scalar,
34 typename NumTraits<typename internal::traits<Derived>::Scalar>::Real>
35#else
36 : public DenseCoeffsBase<Derived>
37#endif // not EIGEN_PARSED_BY_DOXYGEN
38{
39 public:
40 using internal::special_scalar_op_base<Derived,typename internal::traits<Derived>::Scalar,
42
43 class InnerIterator;
44
45 typedef typename internal::traits<Derived>::StorageKind StorageKind;
46
51 typedef typename internal::traits<Derived>::Index Index;
52
53 typedef typename internal::traits<Derived>::Scalar Scalar;
54 typedef typename internal::packet_traits<Scalar>::type PacketScalar;
55 typedef typename NumTraits<Scalar>::Real RealScalar;
56
57 typedef DenseCoeffsBase<Derived> Base;
58 using Base::derived;
59 using Base::const_cast_derived;
60 using Base::rows;
61 using Base::cols;
62 using Base::size;
63 using Base::rowIndexByOuterInner;
64 using Base::colIndexByOuterInner;
65 using Base::coeff;
66 using Base::coeffByOuterInner;
67 using Base::packet;
68 using Base::packetByOuterInner;
69 using Base::writePacket;
70 using Base::writePacketByOuterInner;
71 using Base::coeffRef;
72 using Base::coeffRefByOuterInner;
73 using Base::copyCoeff;
74 using Base::copyCoeffByOuterInner;
75 using Base::copyPacket;
76 using Base::copyPacketByOuterInner;
77 using Base::operator();
78 using Base::operator[];
79 using Base::x;
80 using Base::y;
81 using Base::z;
82 using Base::w;
83 using Base::stride;
84 using Base::innerStride;
85 using Base::outerStride;
86 using Base::rowStride;
87 using Base::colStride;
88 typedef typename Base::CoeffReturnType CoeffReturnType;
89
90 enum {
91
92 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
97
98 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
100 * by the \a Derived type. If a value is not known at compile-time,
101 * it is set to the \a Dynamic constant.
102 * \sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */
103
104
105 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
106 internal::traits<Derived>::ColsAtCompileTime>::ret),
107 /**< This is equal to the number of coefficients, i.e. the number of
108 * rows times the number of columns, or to \a Dynamic if this is not
109 * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
110
111 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
121
122 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
125 * this value is set to \a Dynamic.
126 *
127 * This value is useful to know when evaluating an expression, in order to determine
128 * whether it is possible to avoid doing a dynamic memory allocation.
129 *
130 * \sa ColsAtCompileTime, MaxRowsAtCompileTime, MaxSizeAtCompileTime
131 */
132
133 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
134 internal::traits<Derived>::MaxColsAtCompileTime>::ret),
135
144
145 IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1
146 || internal::traits<Derived>::MaxColsAtCompileTime == 1,
150
151
152 Flags = internal::traits<Derived>::Flags,
153 /**< This stores expression \ref flags flags which may or may not be inherited by new expressions
154 * constructed from this one. See the \ref flags "list of flags".
155 */
156
158
159 InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
161
166
167 InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret,
168 OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret
169 };
171 enum { ThisConstantIsPrivateInPlainObjectBase };
172
174
175 inline Index nonZeros() const { return size(); }
176 /** \returns true if either the number of rows or the number of columns is equal to 1.
177 * In other words, this function returns
178 * \code rows()==1 || cols()==1 \endcode
179 * \sa rows(), cols(), IsVectorAtCompileTime. */
180
187 {
188 return IsVectorAtCompileTime ? 1
189 : int(IsRowMajor) ? this->rows() : this->cols();
190 }
195
199 return IsVectorAtCompileTime ? this->size()
200 : int(IsRowMajor) ? this->cols() : this->rows();
201 }
202
207 void resize(Index size)
208 {
209 EIGEN_ONLY_USED_FOR_DEBUG(size);
210 eigen_assert(size == this->size()
211 && "DenseBase::resize() does not actually allow to resize.");
212 }
213
215 * nothing else.
216 */
217 void resize(Index rows, Index cols)
218 {
219 EIGEN_ONLY_USED_FOR_DEBUG(rows);
220 EIGEN_ONLY_USED_FOR_DEBUG(cols);
221 eigen_assert(rows == this->rows() && cols == this->cols()
222 && "DenseBase::resize() does not actually allow to resize.");
223 }
224
225#ifndef EIGEN_PARSED_BY_DOXYGEN
226
228 typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Derived> ConstantReturnType;
230 typedef CwiseNullaryOp<internal::linspaced_op<Scalar,false>,Derived> SequentialLinSpacedReturnType;
232 typedef CwiseNullaryOp<internal::linspaced_op<Scalar,true>,Derived> RandomAccessLinSpacedReturnType;
234 typedef Matrix<typename NumTraits<typename internal::traits<Derived>::Scalar>::Real, internal::traits<Derived>::ColsAtCompileTime, 1> EigenvaluesReturnType;
235
236#endif // not EIGEN_PARSED_BY_DOXYGEN
237
239 template<typename OtherDerived>
240 Derived& operator=(const DenseBase<OtherDerived>& other);
241
243 * from generating a default operator= (issue hit with g++ 4.1)
244 */
245 Derived& operator=(const DenseBase& other);
246
247 template<typename OtherDerived>
248 Derived& operator=(const EigenBase<OtherDerived> &other);
249
250 template<typename OtherDerived>
251 Derived& operator+=(const EigenBase<OtherDerived> &other);
252
253 template<typename OtherDerived>
254 Derived& operator-=(const EigenBase<OtherDerived> &other);
255
256 template<typename OtherDerived>
257 Derived& operator=(const ReturnByValue<OtherDerived>& func);
258
259#ifndef EIGEN_PARSED_BY_DOXYGEN
261 template<typename OtherDerived>
262 Derived& lazyAssign(const DenseBase<OtherDerived>& other);
263#endif // not EIGEN_PARSED_BY_DOXYGEN
264
266
267 template<unsigned int Added,unsigned int Removed>
268 const Flagged<Derived, Added, Removed> flagged() const;
269
270 template<typename OtherDerived>
272
274 typedef const Transpose<const Derived> ConstTransposeReturnType;
275 ConstTransposeReturnType transpose() const;
276 void transposeInPlace();
277#ifndef EIGEN_NO_DEBUG
278 protected:
279 template<typename OtherDerived>
280 void checkTransposeAliasing(const OtherDerived& other) const;
281 public:
282#endif
283
284 typedef VectorBlock<Derived> SegmentReturnType;
285 typedef const VectorBlock<const Derived> ConstSegmentReturnType;
286 template<int Size> struct FixedSegmentReturnType { typedef VectorBlock<Derived, Size> Type; };
287 template<int Size> struct ConstFixedSegmentReturnType { typedef const VectorBlock<const Derived, Size> Type; };
288
289 // Note: The "DenseBase::" prefixes are added to help MSVC9 to match these declarations with the later implementations.
290 SegmentReturnType segment(Index start, Index size);
291 typename DenseBase::ConstSegmentReturnType segment(Index start, Index size) const;
292
293 SegmentReturnType head(Index size);
294 typename DenseBase::ConstSegmentReturnType head(Index size) const;
295
296 SegmentReturnType tail(Index size);
297 typename DenseBase::ConstSegmentReturnType tail(Index size) const;
298
299 template<int Size> typename FixedSegmentReturnType<Size>::Type head();
300 template<int Size> typename ConstFixedSegmentReturnType<Size>::Type head() const;
301
302 template<int Size> typename FixedSegmentReturnType<Size>::Type tail();
303 template<int Size> typename ConstFixedSegmentReturnType<Size>::Type tail() const;
304
305 template<int Size> typename FixedSegmentReturnType<Size>::Type segment(Index start);
306 template<int Size> typename ConstFixedSegmentReturnType<Size>::Type segment(Index start) const;
307
308 static const ConstantReturnType
309 Constant(Index rows, Index cols, const Scalar& value);
310 static const ConstantReturnType
311 Constant(Index size, const Scalar& value);
312 static const ConstantReturnType
313 Constant(const Scalar& value);
314
315 static const SequentialLinSpacedReturnType
316 LinSpaced(Sequential_t, Index size, const Scalar& low, const Scalar& high);
317 static const RandomAccessLinSpacedReturnType
318 LinSpaced(Index size, const Scalar& low, const Scalar& high);
319 static const SequentialLinSpacedReturnType
320 LinSpaced(Sequential_t, const Scalar& low, const Scalar& high);
321 static const RandomAccessLinSpacedReturnType
322 LinSpaced(const Scalar& low, const Scalar& high);
323
324 template<typename CustomNullaryOp>
326 NullaryExpr(Index rows, Index cols, const CustomNullaryOp& func);
327 template<typename CustomNullaryOp>
329 NullaryExpr(Index size, const CustomNullaryOp& func);
330 template<typename CustomNullaryOp>
332 NullaryExpr(const CustomNullaryOp& func);
333
334 static const ConstantReturnType Zero(Index rows, Index cols);
335 static const ConstantReturnType Zero(Index size);
336 static const ConstantReturnType Zero();
337 static const ConstantReturnType Ones(Index rows, Index cols);
338 static const ConstantReturnType Ones(Index size);
339 static const ConstantReturnType Ones();
340
341 void fill(const Scalar& value);
342 Derived& setConstant(const Scalar& value);
343 Derived& setLinSpaced(Index size, const Scalar& low, const Scalar& high);
344 Derived& setLinSpaced(const Scalar& low, const Scalar& high);
345 Derived& setZero();
346 Derived& setOnes();
347 Derived& setRandom();
349 template<typename OtherDerived>
350 bool isApprox(const DenseBase<OtherDerived>& other,
351 RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
352 bool isMuchSmallerThan(const RealScalar& other,
353 RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
354 template<typename OtherDerived>
355 bool isMuchSmallerThan(const DenseBase<OtherDerived>& other,
356 RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
357
358 bool isApproxToConstant(const Scalar& value, RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
359 bool isConstant(const Scalar& value, RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
360 bool isZero(RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
361 bool isOnes(RealScalar prec = NumTraits<Scalar>::dummy_precision()) const;
362
363 inline Derived& operator*=(const Scalar& other);
364 inline Derived& operator/=(const Scalar& other);
365
366 typedef typename internal::add_const_on_value_type<typename internal::eval<Derived>::type>::type EvalReturnType;
370 * a const reference, in order to avoid a useless copy.
371 */
372 EIGEN_STRONG_INLINE EvalReturnType eval() const
373 {
374 // Even though MSVC does not honor strong inlining when the return type
375 // is a dynamic matrix, we desperately need strong inlining for fixed
376 // size types on MSVC.
377 return typename internal::eval<Derived>::type(derived());
378 }
379
381
383 template<typename OtherDerived>
384 void swap(const DenseBase<OtherDerived>& other,
385 int = OtherDerived::ThisConstantIsPrivateInPlainObjectBase)
386 {
387 SwapWrapper<Derived>(derived()).lazyAssign(other.derived());
388 }
389
393 template<typename OtherDerived>
395 {
396 SwapWrapper<Derived>(derived()).lazyAssign(other.derived());
397 }
398
400 inline const NestByValue<Derived> nestByValue() const;
401 inline const ForceAlignedAccess<Derived> forceAlignedAccess() const;
402 inline ForceAlignedAccess<Derived> forceAlignedAccess();
403 template<bool Enable> inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf() const;
404 template<bool Enable> inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();
405
406 Scalar sum() const;
407 Scalar mean() const;
408 Scalar trace() const;
409
410 Scalar prod() const;
411
412 typename internal::traits<Derived>::Scalar minCoeff() const;
413 typename internal::traits<Derived>::Scalar maxCoeff() const;
415 template<typename IndexType>
416 typename internal::traits<Derived>::Scalar minCoeff(IndexType* row, IndexType* col) const;
417 template<typename IndexType>
418 typename internal::traits<Derived>::Scalar maxCoeff(IndexType* row, IndexType* col) const;
419 template<typename IndexType>
420 typename internal::traits<Derived>::Scalar minCoeff(IndexType* index) const;
421 template<typename IndexType>
422 typename internal::traits<Derived>::Scalar maxCoeff(IndexType* index) const;
423
424 template<typename BinaryOp>
425 typename internal::result_of<BinaryOp(typename internal::traits<Derived>::Scalar)>::type
426 redux(const BinaryOp& func) const;
427
428 template<typename Visitor>
429 void visit(Visitor& func) const;
430
431 inline const WithFormat<Derived> format(const IOFormat& fmt) const;
432
434 CoeffReturnType value() const
435 {
436 EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
437 eigen_assert(this->rows() == 1 && this->cols() == 1);
438 return derived().coeff(0,0);
439 }
440
441
442
443 bool all(void) const;
444 bool any(void) const;
445 Index count() const;
446
447 typedef VectorwiseOp<Derived, Horizontal> RowwiseReturnType;
448 typedef const VectorwiseOp<const Derived, Horizontal> ConstRowwiseReturnType;
449 typedef VectorwiseOp<Derived, Vertical> ColwiseReturnType;
450 typedef const VectorwiseOp<const Derived, Vertical> ConstColwiseReturnType;
451
452 ConstRowwiseReturnType rowwise() const;
453 RowwiseReturnType rowwise();
454 ConstColwiseReturnType colwise() const;
455 ColwiseReturnType colwise();
456
457 static const CwiseNullaryOp<internal::scalar_random_op<Scalar>,Derived> Random(Index rows, Index cols);
458 static const CwiseNullaryOp<internal::scalar_random_op<Scalar>,Derived> Random(Index size);
459 static const CwiseNullaryOp<internal::scalar_random_op<Scalar>,Derived> Random();
460
461 template<typename ThenDerived,typename ElseDerived>
462 const Select<Derived,ThenDerived,ElseDerived>
463 select(const DenseBase<ThenDerived>& thenMatrix,
464 const DenseBase<ElseDerived>& elseMatrix) const;
466 template<typename ThenDerived>
467 inline const Select<Derived,ThenDerived, typename ThenDerived::ConstantReturnType>
468 select(const DenseBase<ThenDerived>& thenMatrix, typename ThenDerived::Scalar elseScalar) const;
469
470 template<typename ElseDerived>
471 inline const Select<Derived, typename ElseDerived::ConstantReturnType, ElseDerived >
472 select(typename ElseDerived::Scalar thenScalar, const DenseBase<ElseDerived>& elseMatrix) const;
473
474 template<int p> RealScalar lpNorm() const;
475
476 template<int RowFactor, int ColFactor>
477 const Replicate<Derived,RowFactor,ColFactor> replicate() const;
478 const Replicate<Derived,Dynamic,Dynamic> replicate(Index rowFacor,Index colFactor) const;
479
480 typedef Reverse<Derived, BothDirections> ReverseReturnType;
481 typedef const Reverse<const Derived, BothDirections> ConstReverseReturnType;
482 ReverseReturnType reverse();
483 ConstReverseReturnType reverse() const;
484 void reverseInPlace();
485
486#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase
487# include "../plugins/BlockMethods.h"
488# ifdef EIGEN_DENSEBASE_PLUGIN
489# include EIGEN_DENSEBASE_PLUGIN
490# endif
491#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
492
493#ifdef EIGEN2_SUPPORT
494
495 Block<Derived> corner(CornerType type, Index cRows, Index cCols);
496 const Block<Derived> corner(CornerType type, Index cRows, Index cCols) const;
497 template<int CRows, int CCols>
499 template<int CRows, int CCols>
500 const Block<Derived, CRows, CCols> corner(CornerType type) const;
501
502#endif // EIGEN2_SUPPORT
503
505 // disable the use of evalTo for dense objects with a nice compilation error
506 template<typename Dest> inline void evalTo(Dest& ) const
507 {
508 EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);
509 }
510
511 protected:
514 {
515 /* Just checks for self-consistency of the flags.
516 * Only do it when debugging Eigen, as this borders on paranoiac and could slow compilation down
517 */
518#ifdef EIGEN_INTERNAL_DEBUGGING
519 EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, int(IsRowMajor))
520 && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, int(!IsRowMajor))),
521 INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION)
522#endif
523 }
524
525 private:
526 explicit DenseBase(int);
527 DenseBase(int,int);
528 template<typename OtherDerived> explicit DenseBase(const DenseBase<OtherDerived>&);
529};
530
531} // end namespace Eigen
532
533#endif // EIGEN_DENSEBASE_H
Expression of a fixed-size or dynamic-size block.
Definition Block.h:99
Generic expression of a matrix where all coefficients are defined by a functor.
Definition CwiseNullaryOp.h:51
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:38
bool isApprox(const DenseBase< OtherDerived > &other, RealScalar prec=NumTraits< Scalar >::dummy_precision()) const
Definition Fuzzy.h:98
static const SequentialLinSpacedReturnType LinSpaced(Sequential_t, Index size, const Scalar &low, const Scalar &high)
Sets a linearly space vector.
Definition CwiseNullaryOp.h:242
Index count() const
Definition BooleanRedux.h:131
const WithFormat< Derived > format(const IOFormat &fmt) const
Definition IO.h:118
void resize(Index size)
Definition DenseBase.h:207
EvalReturnType eval() const
Definition DenseBase.h:372
Index nonZeros() const
Definition DenseBase.h:175
static const CwiseNullaryOp< CustomNullaryOp, Derived > NullaryExpr(Index rows, Index cols, const CustomNullaryOp &func)
Definition CwiseNullaryOp.h:117
Index innerSize() const
Definition DenseBase.h:197
Derived & setOnes()
Definition CwiseNullaryOp.h:625
const Replicate< Derived, RowFactor, ColFactor > replicate() const
Definition Replicate.h:139
void swap(PlainObjectBase< OtherDerived > &other)
Definition DenseBase.h:394
static const ConstantReturnType Ones()
Definition CwiseNullaryOp.h:597
ConstColwiseReturnType colwise() const
Definition VectorwiseOp.h:555
static const ConstantReturnType Zero()
Definition CwiseNullaryOp.h:468
Derived & setConstant(const Scalar &value)
Definition CwiseNullaryOp.h:332
void transposeInPlace()
Definition Transpose.h:291
DenseBase()
Definition DenseBase.h:513
Eigen::Transpose< Derived > transpose()
Definition Transpose.h:199
void visit(Visitor &func) const
Definition Visitor.h:77
internal::traits< Derived >::Index Index
The type of indices.
Definition DenseBase.h:51
ColXpr col(Index i)
Definition DenseBase.h:553
bool isZero(RealScalar prec=NumTraits< Scalar >::dummy_precision()) const
Definition CwiseNullaryOp.h:482
SegmentReturnType tail(Index size)
Definition VectorBlock.h:175
bool isOnes(RealScalar prec=NumTraits< Scalar >::dummy_precision()) const
Definition CwiseNullaryOp.h:612
internal::traits< Derived >::Scalar maxCoeff() const
Definition Redux.h:346
ReverseReturnType reverse()
Definition Reverse.h:191
static const CwiseNullaryOp< internal::scalar_random_op< Scalar >, Derived > Random(Index rows, Index cols)
Definition Random.h:49
const NestByValue< Derived > nestByValue() const
Definition NestByValue.h:104
Derived & setZero()
Definition CwiseNullaryOp.h:499
ConstRowwiseReturnType rowwise() const
Definition VectorwiseOp.h:580
CoeffReturnType value() const
Definition DenseBase.h:434
Scalar prod() const
Definition Redux.h:384
internal::traits< Derived >::Scalar minCoeff() const
Definition Redux.h:337
void fill(const Scalar &value)
Definition CwiseNullaryOp.h:322
RowXpr row(Index i)
Definition DenseBase.h:570
Derived & operator=(const DenseBase< OtherDerived > &other)
Definition Assign.h:541
Scalar sum() const
Definition Redux.h:357
Derived & setRandom()
Definition Random.h:110
SegmentReturnType segment(Index start, Index size)
Definition VectorBlock.h:111
static const ConstantReturnType Constant(Index rows, Index cols, const Scalar &value)
Definition CwiseNullaryOp.h:179
void resize(Index rows, Index cols)
Definition DenseBase.h:217
Derived & setLinSpaced(Index size, const Scalar &low, const Scalar &high)
Sets a linearly space vector.
Definition CwiseNullaryOp.h:387
Index outerSize() const
Definition DenseBase.h:186
const Select< Derived, ThenDerived, ElseDerived > select(const DenseBase< ThenDerived > &thenMatrix, const DenseBase< ElseDerived > &elseMatrix) const
Definition Select.h:124
bool all(void) const
Definition BooleanRedux.h:79
void swap(const DenseBase< OtherDerived > &other, int=OtherDerived::ThisConstantIsPrivateInPlainObjectBase)
Definition DenseBase.h:384
CommaInitializer< Derived > operator<<(const Scalar &s)
Definition CommaInitializer.h:125
const Flagged< Derived, Added, Removed > flagged() const
Definition Flagged.h:133
bool isConstant(const Scalar &value, RealScalar prec=NumTraits< Scalar >::dummy_precision()) const
Definition CwiseNullaryOp.h:312
@ MaxRowsAtCompileTime
Definition DenseBase.h:111
@ CoeffReadCost
Definition DenseBase.h:162
@ IsRowMajor
Definition DenseBase.h:157
@ RowsAtCompileTime
Definition DenseBase.h:92
@ IsVectorAtCompileTime
Definition DenseBase.h:145
@ Flags
Definition DenseBase.h:152
@ SizeAtCompileTime
Definition DenseBase.h:105
@ MaxColsAtCompileTime
Definition DenseBase.h:122
@ MaxSizeAtCompileTime
Definition DenseBase.h:133
@ ColsAtCompileTime
Definition DenseBase.h:98
Scalar mean() const
Definition Redux.h:370
bool any(void) const
Definition BooleanRedux.h:105
void reverseInPlace()
Definition Reverse.h:217
bool isApproxToConstant(const Scalar &value, RealScalar prec=NumTraits< Scalar >::dummy_precision()) const
Definition CwiseNullaryOp.h:298
Enforce aligned packet loads and stores regardless of what is requested.
Definition ForceAlignedAccess.h:36
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:129
Expression which must be nested by value.
Definition NestByValue.h:37
Dense storage base class for matrices and arrays.
Definition PlainObjectBase.h:74
Expression of the multiple replication of a matrix or vector.
Definition Replicate.h:64
Expression of the reverse of a vector or matrix.
Definition Reverse.h:72
Expression of a coefficient wise version of the C++ ternary operator ?:
Definition Select.h:57
Expression of the transpose of a matrix.
Definition Transpose.h:59
Expression of a fixed-size or dynamic-size sub-vector.
Definition VectorBlock.h:61
Pseudo expression providing partial reduction operations.
Definition VectorwiseOp.h:166
Pseudo expression providing matrix output with given format.
Definition IO.h:92
CornerType
Definition Constants.h:196
@ Vertical
Definition Constants.h:204
@ BothDirections
Definition Constants.h:210
@ Horizontal
Definition Constants.h:207
const unsigned int RowMajorBit
Definition Constants.h:48
Definition LDLT.h:18
Helper class used by the comma initializer operator.
Definition CommaInitializer.h:29
Definition EigenBase.h:27
Stores a set of parameters controlling the way matrices are printed.
Definition IO.h:51
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:89