42#ifndef EIGEN_PARSED_BY_DOXYGEN
43 :
public DenseCoeffsBase<Derived>
45 :
public DenseCoeffsBase<Derived,DirectWriteAccessors>
53 typedef Eigen::InnerIterator<Derived> InnerIterator;
55 typedef typename internal::traits<Derived>::StorageKind StorageKind;
63 typedef typename internal::traits<Derived>::StorageIndex
StorageIndex;
66 typedef typename internal::traits<Derived>::Scalar
Scalar;
73 typedef typename NumTraits<Scalar>::Real RealScalar;
74 typedef DenseCoeffsBase<Derived> Base;
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;
96 typedef typename Base::CoeffReturnType CoeffReturnType;
113 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
114 internal::traits<Derived>::ColsAtCompileTime>::ret),
141 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
142 internal::traits<Derived>::MaxColsAtCompileTime>::ret),
154 || internal::traits<Derived>::MaxColsAtCompileTime == 1,
160 Flags = internal::traits<Derived>::Flags,
170 InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret,
171 OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret
174 typedef typename internal::find_best_packet<Scalar,SizeAtCompileTime>::type PacketScalar;
176 enum { IsPlainObjectBase = 0 };
180 typedef Matrix<typename internal::traits<Derived>::Scalar,
181 internal::traits<Derived>::RowsAtCompileTime,
182 internal::traits<Derived>::ColsAtCompileTime,
184 internal::traits<Derived>::MaxRowsAtCompileTime,
185 internal::traits<Derived>::MaxColsAtCompileTime
190 typedef Array<typename internal::traits<Derived>::Scalar,
191 internal::traits<Derived>::RowsAtCompileTime,
192 internal::traits<Derived>::ColsAtCompileTime,
194 internal::traits<Derived>::MaxRowsAtCompileTime,
195 internal::traits<Derived>::MaxColsAtCompileTime
204 typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,
MatrixXpr >
::value,
243 EIGEN_ONLY_USED_FOR_DEBUG(newSize);
244 eigen_assert(newSize == this->
size()
245 &&
"DenseBase::resize() does not actually allow to resize.");
254 EIGEN_ONLY_USED_FOR_DEBUG(
rows);
255 EIGEN_ONLY_USED_FOR_DEBUG(
cols);
256 eigen_assert(
rows == this->
rows() && cols == this->
cols()
257 &&
"DenseBase::resize() does not actually allow to resize.");
260#ifndef EIGEN_PARSED_BY_DOXYGEN
262 typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,
PlainObject> ConstantReturnType;
264 typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,
PlainObject> SequentialLinSpacedReturnType;
266 typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,
PlainObject> RandomAccessLinSpacedReturnType;
268 typedef Matrix<typename NumTraits<typename internal::traits<Derived>::Scalar>::Real, internal::traits<Derived>::ColsAtCompileTime, 1> EigenvaluesReturnType;
273 template<
typename OtherDerived>
274 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
275 Derived&
operator=(
const DenseBase<OtherDerived>& other);
280 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
283 template<
typename OtherDerived>
285 Derived&
operator=(
const EigenBase<OtherDerived> &other);
287 template<
typename OtherDerived>
289 Derived& operator+=(
const EigenBase<OtherDerived> &other);
291 template<
typename OtherDerived>
293 Derived& operator-=(
const EigenBase<OtherDerived> &other);
295 template<
typename OtherDerived>
297 Derived&
operator=(
const ReturnByValue<OtherDerived>& func);
302 template<
typename OtherDerived>
304 Derived&
lazyAssign(
const DenseBase<OtherDerived>& other);
307 CommaInitializer<Derived>
operator<< (
const Scalar& s);
310 template<
unsigned int Added,
unsigned int Removed>
315 template<
typename OtherDerived>
317 CommaInitializer<Derived>
operator<< (
const DenseBase<OtherDerived>& other);
319 typedef Transpose<Derived> TransposeReturnType;
322 typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
324 ConstTransposeReturnType
transpose()
const;
328 EIGEN_DEVICE_FUNC
static const ConstantReturnType
330 EIGEN_DEVICE_FUNC
static const ConstantReturnType
332 EIGEN_DEVICE_FUNC
static const ConstantReturnType
335 EIGEN_DEVICE_FUNC
static const SequentialLinSpacedReturnType
337 EIGEN_DEVICE_FUNC
static const RandomAccessLinSpacedReturnType
339 EIGEN_DEVICE_FUNC
static const SequentialLinSpacedReturnType
340 LinSpaced(Sequential_t,
const Scalar& low,
const Scalar& high);
341 EIGEN_DEVICE_FUNC
static const RandomAccessLinSpacedReturnType
342 LinSpaced(
const Scalar& low,
const Scalar& high);
344 template<
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
345 static const CwiseNullaryOp<CustomNullaryOp, PlainObject>
347 template<
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
348 static const CwiseNullaryOp<CustomNullaryOp, PlainObject>
349 NullaryExpr(
Index size,
const CustomNullaryOp& func);
350 template<
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
351 static const CwiseNullaryOp<CustomNullaryOp, PlainObject>
352 NullaryExpr(
const CustomNullaryOp& func);
355 EIGEN_DEVICE_FUNC
static const ConstantReturnType
Zero(
Index size);
356 EIGEN_DEVICE_FUNC
static const ConstantReturnType
Zero();
358 EIGEN_DEVICE_FUNC
static const ConstantReturnType
Ones(
Index size);
359 EIGEN_DEVICE_FUNC
static const ConstantReturnType
Ones();
361 EIGEN_DEVICE_FUNC
void fill(
const Scalar&
value);
364 EIGEN_DEVICE_FUNC Derived&
setLinSpaced(
const Scalar& low,
const Scalar& high);
365 EIGEN_DEVICE_FUNC Derived&
setZero();
366 EIGEN_DEVICE_FUNC Derived&
setOnes();
369 template<
typename OtherDerived> EIGEN_DEVICE_FUNC
370 bool isApprox(
const DenseBase<OtherDerived>& other,
373 bool isMuchSmallerThan(
const RealScalar& other,
375 template<
typename OtherDerived> EIGEN_DEVICE_FUNC
376 bool isMuchSmallerThan(
const DenseBase<OtherDerived>& other,
384 inline bool hasNaN()
const;
387 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
388 Derived& operator*=(
const Scalar& other);
389 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
390 Derived& operator/=(
const Scalar& other);
392 typedef typename internal::add_const_on_value_type<typename internal::eval<Derived>::type>::type EvalReturnType;
401 EIGEN_STRONG_INLINE EvalReturnType
eval()
const
406 return typename internal::eval<Derived>::type(
derived());
412 template<
typename OtherDerived>
414 void swap(
const DenseBase<OtherDerived>& other)
416 EIGEN_STATIC_ASSERT(!OtherDerived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
417 eigen_assert(
rows()==other.rows() &&
cols()==other.cols());
418 call_assignment(
derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
424 template<
typename OtherDerived>
426 void swap(PlainObjectBase<OtherDerived>& other)
428 eigen_assert(
rows()==other.rows() &&
cols()==other.cols());
429 call_assignment(
derived(), other.derived(), internal::swap_assign_op<Scalar>());
432 EIGEN_DEVICE_FUNC
inline const NestByValue<Derived>
nestByValue()
const;
433 EIGEN_DEVICE_FUNC
inline const ForceAlignedAccess<Derived> forceAlignedAccess()
const;
434 EIGEN_DEVICE_FUNC
inline ForceAlignedAccess<Derived> forceAlignedAccess();
435 template<
bool Enable> EIGEN_DEVICE_FUNC
436 inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf()
const;
437 template<
bool Enable> EIGEN_DEVICE_FUNC
438 inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();
440 EIGEN_DEVICE_FUNC Scalar
sum()
const;
441 EIGEN_DEVICE_FUNC Scalar
mean()
const;
442 EIGEN_DEVICE_FUNC Scalar trace()
const;
444 EIGEN_DEVICE_FUNC Scalar
prod()
const;
446 EIGEN_DEVICE_FUNC
typename internal::traits<Derived>::Scalar
minCoeff()
const;
447 EIGEN_DEVICE_FUNC
typename internal::traits<Derived>::Scalar
maxCoeff()
const;
449 template<
typename IndexType> EIGEN_DEVICE_FUNC
450 typename internal::traits<Derived>::Scalar
minCoeff(IndexType* row, IndexType* col)
const;
451 template<
typename IndexType> EIGEN_DEVICE_FUNC
452 typename internal::traits<Derived>::Scalar
maxCoeff(IndexType* row, IndexType* col)
const;
453 template<
typename IndexType> EIGEN_DEVICE_FUNC
454 typename internal::traits<Derived>::Scalar
minCoeff(IndexType* index)
const;
455 template<
typename IndexType> EIGEN_DEVICE_FUNC
456 typename internal::traits<Derived>::Scalar
maxCoeff(IndexType* index)
const;
458 template<
typename BinaryOp>
460 Scalar redux(
const BinaryOp& func)
const;
462 template<
typename Visitor>
464 void visit(Visitor& func)
const;
466 inline const WithFormat<Derived>
format(
const IOFormat& fmt)
const;
472 EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
473 eigen_assert(this->
rows() == 1 && this->
cols() == 1);
481 typedef VectorwiseOp<Derived, Horizontal> RowwiseReturnType;
482 typedef const VectorwiseOp<const Derived, Horizontal> ConstRowwiseReturnType;
483 typedef VectorwiseOp<Derived, Vertical> ColwiseReturnType;
484 typedef const VectorwiseOp<const Derived, Vertical> ConstColwiseReturnType;
494 EIGEN_DEVICE_FUNC
inline ConstRowwiseReturnType
rowwise()
const {
495 return ConstRowwiseReturnType(
derived());
497 EIGEN_DEVICE_FUNC RowwiseReturnType
rowwise();
506 EIGEN_DEVICE_FUNC
inline ConstColwiseReturnType
colwise()
const {
507 return ConstColwiseReturnType(
derived());
509 EIGEN_DEVICE_FUNC ColwiseReturnType
colwise();
511 typedef CwiseNullaryOp<internal::scalar_random_op<Scalar>,
PlainObject> RandomReturnType;
514 static const RandomReturnType
Random();
516 template<
typename ThenDerived,
typename ElseDerived>
517 const Select<Derived,ThenDerived,ElseDerived>
518 select(
const DenseBase<ThenDerived>& thenMatrix,
519 const DenseBase<ElseDerived>& elseMatrix)
const;
521 template<
typename ThenDerived>
522 inline const Select<Derived,ThenDerived, typename ThenDerived::ConstantReturnType>
523 select(
const DenseBase<ThenDerived>& thenMatrix,
const typename ThenDerived::Scalar& elseScalar)
const;
525 template<
typename ElseDerived>
526 inline const Select<Derived, typename ElseDerived::ConstantReturnType, ElseDerived >
527 select(
const typename ElseDerived::Scalar& thenScalar,
const DenseBase<ElseDerived>& elseMatrix)
const;
529 template<
int p> RealScalar lpNorm()
const;
531 template<
int RowFactor,
int ColFactor>
533 const Replicate<Derived,RowFactor,ColFactor>
replicate()
const;
546 return Replicate<Derived, Dynamic, Dynamic>(
derived(), rowFactor, colFactor);
549 typedef Reverse<Derived, BothDirections> ReverseReturnType;
550 typedef const Reverse<const Derived, BothDirections> ConstReverseReturnType;
551 EIGEN_DEVICE_FUNC ReverseReturnType
reverse();
554 EIGEN_DEVICE_FUNC ConstReverseReturnType
reverse()
const
556 return ConstReverseReturnType(
derived());
560#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase
561#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
562#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND)
563# include "../plugins/BlockMethods.h"
564# ifdef EIGEN_DENSEBASE_PLUGIN
565# include EIGEN_DENSEBASE_PLUGIN
567#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
568#undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
569#undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF
572 template<
typename Dest>
574 inline void evalTo(Dest& )
const
576 EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);
586#ifdef EIGEN_INTERNAL_DEBUGGING
589 INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION)
594 EIGEN_DEVICE_FUNC
explicit DenseBase(
int);
596 template<
typename OtherDerived> EIGEN_DEVICE_FUNC
explicit DenseBase(
const DenseBase<OtherDerived>&);