11 #ifndef EIGEN_DENSEBASE_H 12 #define EIGEN_DENSEBASE_H 42 #ifndef EIGEN_PARSED_BY_DOXYGEN
43 :
public DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value>
46 #endif // not EIGEN_PARSED_BY_DOXYGEN 77 using Base::const_cast_derived;
81 using Base::rowIndexByOuterInner;
82 using Base::colIndexByOuterInner;
84 using Base::coeffByOuterInner;
85 using Base::operator();
86 using Base::operator[];
92 using Base::innerStride;
93 using Base::outerStride;
94 using Base::rowStride;
95 using Base::colStride;
160 NumDimensions =
int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2,
172 InnerSizeAtCompileTime =
int(IsVectorAtCompileTime) ?
int(SizeAtCompileTime)
173 :
int(IsRowMajor) ?
int(ColsAtCompileTime) :
int(RowsAtCompileTime),
175 InnerStrideAtCompileTime =
internal::inner_stride_at_compile_time<Derived>::
ret,
176 OuterStrideAtCompileTime =
internal::outer_stride_at_compile_time<Derived>::
ret 181 enum { IsPlainObjectBase = 0 };
196 internal::traits<Derived>::RowsAtCompileTime,
197 internal::traits<Derived>::ColsAtCompileTime,
225 return IsVectorAtCompileTime ? 1
237 return IsVectorAtCompileTime ? this->
size()
250 &&
"DenseBase::resize() does not actually allow to resize.");
262 &&
"DenseBase::resize() does not actually allow to resize.");
265 #ifndef EIGEN_PARSED_BY_DOXYGEN 275 #endif // not EIGEN_PARSED_BY_DOXYGEN 278 template<
typename OtherDerived>
288 template<
typename OtherDerived>
292 template<
typename OtherDerived>
296 template<
typename OtherDerived>
300 template<
typename OtherDerived>
306 template<
typename OtherDerived>
314 template<
unsigned int Added,
unsigned int Removed>
317 const Derived& flagged()
const 318 {
return derived(); }
320 template<
typename OtherDerived>
326 TransposeReturnType transpose();
329 ConstTransposeReturnType transpose()
const;
331 void transposeInPlace();
338 Constant(
const Scalar&
value);
343 LinSpaced(
Sequential_t,
const Scalar& low,
const Scalar& high);
346 LinSpaced(
Index size,
const Scalar& low,
const Scalar& high);
348 LinSpaced(
const Scalar& low,
const Scalar& high);
358 NullaryExpr(
const CustomNullaryOp&
func);
390 inline bool hasNaN()
const;
391 inline bool allFinite()
const;
418 template<
typename OtherDerived>
422 EIGEN_STATIC_ASSERT(!OtherDerived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
430 template<
typename OtherDerived>
444 inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>
::type forceAlignedAccessIf();
452 template<
int NaNPropagation>
454 template<
int NaNPropagation>
463 return minCoeff<PropagateFast>();
466 return maxCoeff<PropagateFast>();
469 template<
int NaNPropagation,
typename IndexType>
472 template<
int NaNPropagation,
typename IndexType>
475 template<
int NaNPropagation,
typename IndexType>
478 template<
int NaNPropagation,
typename IndexType>
483 template<
typename IndexType>
486 return minCoeff<PropagateFast>(
row,
col);
488 template<
typename IndexType>
491 return maxCoeff<PropagateFast>(
row,
col);
493 template<
typename IndexType>
496 return minCoeff<PropagateFast>(index);
498 template<
typename IndexType>
501 return maxCoeff<PropagateFast>(index);
504 template<
typename BinaryOp>
506 Scalar redux(
const BinaryOp&
func)
const;
508 template<
typename Visitor>
510 void visit(Visitor& func)
const;
530 return derived().coeff(0,0);
551 return ConstRowwiseReturnType(derived());
563 return ConstColwiseReturnType(derived());
569 static const RandomReturnType Random(
Index size);
570 static const RandomReturnType Random();
572 template<
typename ThenDerived,
typename ElseDerived>
577 template<
typename ThenDerived>
581 template<
typename ElseDerived>
585 template<
int p> RealScalar
lpNorm()
const;
587 template<
int RowFactor,
int ColFactor>
612 return ConstReverseReturnType(derived());
616 #ifdef EIGEN_PARSED_BY_DOXYGEN 620 typedef random_access_iterator_type
iterator;
647 inline iterator begin();
648 inline const_iterator begin()
const;
649 inline const_iterator cbegin()
const;
650 inline iterator
end();
651 inline const_iterator
end()
const;
652 inline const_iterator cend()
const;
654 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase 655 #define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL 656 #define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) 657 #define EIGEN_DOC_UNARY_ADDONS(X,Y) 658 # include "../plugins/CommonCwiseUnaryOps.h" 659 # include "../plugins/BlockMethods.h" 660 # include "../plugins/IndexedViewMethods.h" 661 # include "../plugins/ReshapedMethods.h" 662 # ifdef EIGEN_DENSEBASE_PLUGIN 663 # include EIGEN_DENSEBASE_PLUGIN 665 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS 666 #undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL 667 #undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF 668 #undef EIGEN_DOC_UNARY_ADDONS 671 template<
typename Dest>
686 #ifdef EIGEN_INTERNAL_DEBUGGING 688 &&
EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1,
int(!IsRowMajor))),
689 INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION)
701 #endif // EIGEN_DENSEBASE_H find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Generic expression of a matrix where all coefficients are defined by a functor.
#define EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE)
EIGEN_DEVICE_FUNC ConstReverseReturnType reverse() const
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator+=(bfloat16 &a, const bfloat16 &b)
Enforce aligned packet loads and stores regardless of what is requested.
internal::traits< Derived >::Scalar Scalar
static const Eigen::internal::all_t all
Base::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC void evalTo(Dest &) const
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff(IndexType *index) const
internal::traits< Derived >::StorageKind StorageKind
EIGEN_DEVICE_FUNC ConstColwiseReturnType colwise() const
Expression of the transpose of a matrix.
const unsigned int DirectAccessBit
static void check_DenseIndex_is_signed()
internal::add_const< Transpose< const Derived > >::type ConstTransposeReturnType
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff() const
const VectorwiseOp< const Derived, Horizontal > ConstRowwiseReturnType
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC CoeffReturnType value() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEPRECATED typedef CwiseNullaryOp< internal::linspaced_op< Scalar >, PlainObject > SequentialLinSpacedReturnType
internal::conditional< IsVectorAtCompileTime, const_iterator_type, void >::type const_iterator
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC void resize(Index newSize)
Pseudo expression providing broadcasting and partial reduction operations.
const WithFormat< Derived > format(const IOFormat &fmt) const
VectorwiseOp< Derived, Horizontal > RowwiseReturnType
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
const unsigned int RowMajorBit
Base class for all dense matrices, vectors, and arrays.
#define EIGEN_IMPLIES(a, b)
const Reverse< const Derived, BothDirections > ConstReverseReturnType
Helper class used by the comma initializer operator.
internal::traits< Derived >::StorageIndex StorageIndex
The type used to store indices.
Transpose< Derived > TransposeReturnType
static const Vector2 mean(20, 40)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(const DenseBase< OtherDerived > &other)
internal::add_const_on_value_type< typename internal::eval< Derived >::type >::type EvalReturnType
void lpNorm(const VectorType &v)
Reverse< Derived, BothDirections > ReverseReturnType
void replicate(const MatrixType &m)
internal::find_best_packet< Scalar, SizeAtCompileTime >::type PacketScalar
EIGEN_DEVICE_FUNC const Replicate< Derived, Dynamic, Dynamic > replicate(Index rowFactor, Index colFactor) const
v setLinSpaced(5, 0.5f, 1.5f)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerSize() const
Expression of the multiple replication of a matrix or vector.
EIGEN_DEVICE_FUNC ConstRowwiseReturnType rowwise() const
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff() const
Expression which must be nested by value.
EIGEN_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator/=(bfloat16 &a, const bfloat16 &b)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator*=(bfloat16 &a, const bfloat16 &b)
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerSize() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator-=(bfloat16 &a, const bfloat16 &b)
NumTraits< Scalar >::Real RealScalar
internal::conditional< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray >::type PlainObject
The plain matrix or array type corresponding to this expression.
void reverse(const MatrixType &m)
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff(IndexType *row, IndexType *col) const
Matrix< typename NumTraits< typename internal::traits< Derived >::Scalar >::Real, internal::traits< Derived >::ColsAtCompileTime, 1 > EigenvaluesReturnType
VectorwiseOp< Derived, Vertical > ColwiseReturnType
static EIGEN_DEPRECATED const end_t end
General-purpose arrays with easy API for coefficient-wise operations.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(PlainObjectBase< OtherDerived > &other)
CwiseNullaryOp< internal::scalar_random_op< Scalar >, PlainObject > RandomReturnType
const VectorwiseOp< const Derived, Vertical > ConstColwiseReturnType
CwiseNullaryOp< internal::scalar_constant_op< Scalar >, PlainObject > ConstantReturnType
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff(IndexType *row, IndexType *col) const
CwiseNullaryOp< internal::linspaced_op< Scalar >, PlainObject > RandomAccessLinSpacedReturnType
Generic expression where a coefficient-wise unary operator is applied to an expression.
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index nonZeros() const
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Expression of the reverse of a vector or matrix.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
internal::conditional< IsVectorAtCompileTime, iterator_type, void >::type iterator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff(IndexType *index) const
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Expression of a coefficient wise version of the C++ ternary operator ?:
An InnerIterator allows to loop over the element of any matrix expression.
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)