hpp-constraints
4.9.0
Definition of basic geometric constraints for motion planning
|
Go to the documentation of this file.
17 #ifndef HPP_CONSTRAINTS_MATRIX_VIEW_HH
18 #define HPP_CONSTRAINTS_MATRIX_VIEW_HH
23 #include <hpp/util/indent.hh>
24 #include <hpp/pinocchio/util.hh>
27 # define HPP_EIGEN_USE_EVALUATOR EIGEN_VERSION_AT_LEAST(3,2,92)
53 template <
typename Derived>
55 (
const Eigen::ArrayBase<Derived>& array);
111 template <
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
class MatrixBlockView;
123 template <
bool _allRows = false,
bool _allCols = false>
class MatrixBlocks;
131 template <
typename First,
typename Second>
132 static inline First&
run (First& f, Second&) {
return f; }
135 template <
typename First,
typename Second>
136 static inline Second&
run (First&, Second& s) {
return s; }
143 template <
typename In0_t,
typename In1_t>
empty_struct (In0_t, In1_t) {}
147 template <
bool If>
struct get_if {
template <
typename T1,
typename T2>
static EIGEN_STRONG_INLINE T1
run (T1 then, T2 Else) { (void)Else;
return then; } };
148 template <>
struct get_if<false> {
template <
typename T1,
typename T2>
static EIGEN_STRONG_INLINE T2
run (T1 then, T2 Else) { (void)then;
return Else; } };
150 template <
bool _allRows,
bool _allCols>
157 typedef typename internal::conditional<_allRows, internal::empty_struct, BlockIndex::segments_t>::type
RowIndices_t;
158 typedef typename internal::conditional<_allCols, internal::empty_struct, BlockIndex::segments_t>::type
ColIndices_t;
161 template <
bool _allRows,
bool _allCols>
168 typedef typename internal::conditional<_allRows, internal::empty_struct, const BlockIndex::segments_t&>::type
RowIndices_t;
169 typedef typename internal::conditional<_allCols, internal::empty_struct, const BlockIndex::segments_t&>::type
ColIndices_t;
172 template <
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
175 # if HPP_EIGEN_USE_EVALUATOR
176 typedef typename ArgType::StorageIndex StorageIndex;
177 # else // HPP_EIGEN_USE_EVALUATOR
178 typedef typename ArgType::Index
Index;
179 # endif // HPP_EIGEN_USE_EVALUATOR
181 typedef typename traits<ArgType>::XprKind
XprKind;
184 # if !HPP_EIGEN_USE_EVALUATOR
185 CoeffReadCost = ArgType::CoeffReadCost,
186 # endif // !HPP_EIGEN_USE_EVALUATOR
187 Flags = ~PacketAccessBit & ~DirectAccessBit & ~ActualPacketAccessBit & ~LinearAccessBit & ArgType::Flags,
188 RowsAtCompileTime = (_allRows ? ArgType::RowsAtCompileTime : _Rows),
189 ColsAtCompileTime = (_allCols ? ArgType::ColsAtCompileTime : _Cols),
190 MaxRowsAtCompileTime = ArgType::MaxRowsAtCompileTime,
191 MaxColsAtCompileTime = ArgType::MaxColsAtCompileTime
195 # if HPP_EIGEN_USE_EVALUATOR
196 template<
typename Derived,
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols,
typename Functor,
typename Scalar>
197 struct Assignment<Derived,
MatrixBlockView <ArgType, _Rows, _Cols, _allRows, _allCols>, Functor, Dense2Dense, Scalar> {
199 static EIGEN_STRONG_INLINE
void run(Derived& dst,
const OtherDerived& src,
const Functor& func) {
200 dst.resize(src.rows(), src.cols());
201 typedef Block<Derived> BlockDerived;
202 typedef Assignment<BlockDerived, typename OtherDerived::BlockConstXprType, Functor> AssignmentType;
203 for (
typename OtherDerived::block_iterator b (src); b.valid(); ++b) {
204 BlockDerived bdst (dst.block(b.ro(), b.co(), b.rs(), b.cs()));
205 AssignmentType::run(bdst, src._block(b), func);
209 # else // HPP_EIGEN_USE_EVALUATOR
210 template<
typename Derived,
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
211 struct assign_selector<Derived,
MatrixBlockView <ArgType, _Rows, _Cols, _allRows, _allCols>,false,false> {
214 template<
typename ActualDerived,
typename ActualOtherDerived>
215 static EIGEN_STRONG_INLINE Derived&
evalTo(ActualDerived& dst,
const ActualOtherDerived& other) { other.evalTo(dst);
return dst; }
217 template<
typename Derived,
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
218 struct assign_selector<Derived,
MatrixBlockView <ArgType, _Rows, _Cols, _allRows, _allCols>,false,true> {
220 static EIGEN_STRONG_INLINE Derived&
run(Derived& dst,
const OtherDerived& other) { other.
writeTo(dst.transpose());
return dst; }
221 template<
typename ActualDerived,
typename ActualOtherDerived>
222 static EIGEN_STRONG_INLINE Derived&
evalTo(ActualDerived& dst,
const ActualOtherDerived& other) { Transpose<ActualDerived> dstTrans(dst); other.evalTo(dstTrans);
return dst; }
224 # endif // HPP_EIGEN_USE_EVALUATOR
227 template <
typename Src,
typename _ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
231 static void run (
const Src& src,
Dst& dst) {
233 dst.
_block(b) = src.block(b.ro(), b.co(), b.rs(), b.cs());
236 template <
typename _ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols,
typename Dst>
240 static void run (
const Src& src, Dst& dst) {
242 dst.block(b.ro(), b.co(), b.rs(), b.cs()) = src.
_block(b);
245 template <
typename _ArgType ,
int _Rows ,
int _Cols ,
bool _allRows ,
bool _allCols ,
246 typename _ArgType2,
int _Rows2,
int _Cols2,
bool _allRows2,
bool _allCols2>
264 template <
typename ReturnType,
typename View,
bool AllRows = View::AllRows,
bool AllCols = View::AllCols>
268 template <
typename Derived>
271 return ReturnType (
d, r, c, rs, cs);
274 template <
typename ReturnType,
typename View>
278 template <
typename Derived>
281 return d.middleRows (r, rs);
284 template <
typename ReturnType,
typename View>
288 template <
typename Derived>
291 return d.middleCols (c, cs);
295 struct dont_print_indices {
template <
typename BlockIndexType>
static void run (std::ostream&,
const BlockIndexType&) {} };
297 template <
typename BlockIndexType>
298 static void run (std::ostream& os,
const BlockIndexType& bi) {
299 for (std::size_t i = 0; i < bi.size(); ++i)
300 os <<
"[ " << bi[i].first <<
", " << bi[i].second <<
"], ";
304 # if HPP_EIGEN_USE_EVALUATOR
305 template <
typename ArgType,
int _Rows,
int _Cols,
bool _allRows,
bool _allCols>
306 struct unary_evaluator <
MatrixBlockView <ArgType, _Rows, _Cols, _allRows, _allCols> >
307 : evaluator_base <MatrixBlockView <ArgType, _Rows, _Cols, _allRows, _allCols> >
312 CoeffReadCost = evaluator<ArgType>::CoeffReadCost,
313 Flags = ~PacketAccessBit & ~DirectAccessBit & ~ActualPacketAccessBit & ~LinearAccessBit & ArgType::Flags,
316 EIGEN_DEVICE_FUNC
explicit unary_evaluator (
const XprType& view)
320 const XprType& m_view;
322 # endif // HPP_EIGEN_USE_EVALUATOR
325 #define EIGEN_MATRIX_BLOCKS_PUBLIC_INTERFACE(Derived) \
327 AllRows = _allRows, \
330 typedef MatrixBlocksBase<Derived> Base; \
331 typedef typename Base::size_type size_type; \
332 typedef typename Base::segments_t segments_t; \
333 typedef typename Base::segment_t segment_t; \
334 typedef typename Base::RowIndices_t RowIndices_t; \
335 typedef typename Base::ColIndices_t ColIndices_t;
340 template <
typename Derived>
359 template <
typename MatrixType,
int _Rows = MatrixType::RowsAtCompileTime,
int _Cols = MatrixType::ColsAtCompileTime>
struct View {
363 Derived
const&
derived ()
const {
return static_cast<Derived const&
> (*this); }
364 Derived &
derived () {
return static_cast<Derived &
> (*this); }
370 template <
typename MatrixType>
372 MatrixType& o =
const_cast<MatrixBase<MatrixType>&
>(other).
derived();
373 if (Derived::OneDimension)
383 template <
typename MatrixType>
385 if (Derived::OneDimension)
494 template <
bool _allRows,
bool _allCols>
495 class MatrixBlocks :
public MatrixBlocksBase < MatrixBlocks <_allRows, _allCols> >
568 :
m_nbRows(_allRows ? 0 : idx.second)
569 ,
m_nbCols(_allCols ? 0 : idx.second)
574 template <
typename MBDerived>
581 (
bool(AllRows) ==
bool(MBDerived::AllRows)) && (
bool(AllCols) ==
bool(MBDerived::AllCols)),
582 YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
621 template<
bool Sort,
bool Shrink,
bool Cardinal>
630 template<
bool Sort,
bool Shrink,
bool Cardinal>
637 inline const RowIndices_t&
rows()
const
644 inline const ColIndices_t&
cols()
const
663 template<
bool Sort,
bool Shrink,
bool Cardinal>
665 update<Sort, Shrink, Cardinal> (
675 template<
bool Sort,
bool Shrink,
bool Cardinal>
684 template <
bool _allRows,
bool _allCols>
685 class MatrixBlocksRef :
public MatrixBlocksBase < MatrixBlocksRef <_allRows, _allCols> >
691 MatrixBlocksRef (
const size_type& nbRows,
const RowIndices_t& rows,
695 const size_type& nbCols,
const ColIndices_t& cols) :
696 m_nbRows(nbRows), m_nbCols(nbCols),
697 m_rows (rows ), m_cols (cols )
701 template <
typename Derived1,
typename Derived2>
702 MatrixBlocksRef (
const MatrixBlocksBase<Derived1>& rows,
703 const MatrixBlocksBase<Derived2>& cols) :
704 m_nbRows(rows.nbIndices()), m_nbCols(cols.nbIndices()),
705 m_rows (rows. indices()), m_cols (cols. indices())
707 EIGEN_STATIC_ASSERT(
bool(Derived1::OneDimension) &&
bool (Derived2::OneDimension),
708 YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
717 : m_nbRows(_allRows ? 0 : nidx)
718 , m_nbCols(_allCols ? 0 : nidx)
719 , m_rows(idx), m_cols(idx)
723 MatrixBlocksRef (
const MatrixBlocksRef& other)
725 , m_nbRows(other.nbRows())
726 , m_nbCols(other.nbCols())
727 , m_rows(other.rows())
728 , m_cols(other.cols())
733 inline const RowIndices_t& rows()
const
740 inline const ColIndices_t& cols()
const
765 template <
typename Derived>
768 typedef typename internal::conditional<Derived::AllRows, internal::dont_print_indices, internal::print_indices>::type row_printer;
769 typedef typename internal::conditional<Derived::AllCols, internal::dont_print_indices, internal::print_indices>::type col_printer;
770 if (!Derived::AllRows) {
772 row_printer::run (os, mbi.
rows());
773 if (!Derived::AllCols) os << hpp::iendl;
775 if (!Derived::AllCols) {
777 col_printer::run (os, mbi.
cols());
811 template <
typename _ArgType,
int _Rows = _ArgType::RowsAtCompileTime,
int _Cols = _ArgType::ColsAtCompileTime,
bool _allRows = false,
bool _allCols = false>
812 class MatrixBlockView :
public MatrixBase< MatrixBlockView<_ArgType, _Rows, _Cols, _allRows, _allCols> >
825 internal::variable_if_dynamic<
size_type, (_allRows ? 0 : Dynamic) >
_ro;
826 internal::variable_if_dynamic<
size_type, (_allCols ? 0 : Dynamic) >
_co;
861 typedef MatrixBase< MatrixBlockView<_ArgType, _Rows, _Cols, _allRows, _allCols> >
Base;
864 typedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime>
PlainObject;
872 template <typename Derived>
874 typedef Block<Derived,
875 (
AllRows ? Derived::RowsAtCompileTime : Eigen::Dynamic),
876 (
AllCols ? Derived::ColsAtCompileTime : Eigen::Dynamic),
877 (
AllCols ? (bool)Derived::IsRowMajor
878 : (
AllRows ? (
bool)!Derived::IsRowMajor :
false)
886 typedef typename internal::conditional<_allRows, const internal::empty_struct, const Indices_t& >::type
RowIndices_t;
887 typedef typename internal::conditional<_allCols, const internal::empty_struct, const Indices_t& >::type
ColIndices_t;
912 assert(
false &&
"It is not possible to access the coefficients of "
913 "MatrixBlockView this way.");
918 assert(
false &&
"It is not possible to access the coefficients of "
919 "MatrixBlockView this way.");
923 assert(
false &&
"It is not possible to access the coefficients of "
924 "MatrixBlockView this way.");
928 assert(
false &&
"It is not possible to access the coefficients of "
929 "MatrixBlockView this way.");
931 template <
typename Dest>
932 EIGEN_STRONG_INLINE
void evalTo (Dest& dst)
const {
936 template <
typename Dest>
937 EIGEN_STRONG_INLINE
void writeTo (Dest& dst)
const {
948 template <
typename OtherDerived>
950 EIGEN_STATIC_ASSERT_LVALUE(
ArgType);
959 ::template run <ArgType> (
m_arg, b.
ri(), b.
ci(), b.
rs(), b.
cs());
964 ::template run <const ArgType> (
m_arg, b.
ri(), b.
ci(), b.
rs(), b.
cs());
968 EIGEN_STRONG_INLINE
bool isZero (
const RealScalar& prec = NumTraits<Scalar>::dummy_precision())
const
972 block.ri(), block.ci(),
973 block.rs(), block.cs())
993 # undef HPP_EIGEN_USE_EVALUATOR
996 template <
int Option>
999 return os <<
"[ " << s.first <<
", " << s.first + s.second <<
" ]";
1004 #endif // HPP_CONSTRAINTS_MATRIX_VIEW_HH
std::pair< size_type, size_type > segment_t
Definition: fwd.hh:68
internal::conditional< _allRows, internal::empty_struct, const BlockIndex::segments_t & >::type RowIndices_t
Definition: matrix-view.hh:168
static segments_t fromLogicalExpression(const Eigen::ArrayBase< Derived > &array)
Definition: matrix-view.hh:20
static segments_t split(segments_t &segments, const size_type &cardinal)
static EIGEN_STRONG_INLINE Derived & run(Derived &dst, const OtherDerived &other)
Definition: matrix-view.hh:220
traits< ArgType >::StorageKind StorageKind
Definition: matrix-view.hh:180
RowIndices_t m_rows
Definition: matrix-view.hh:671
EIGEN_STRONG_INLINE MatrixBlockView & operator=(const EigenBase< OtherDerived > &other)
Definition: matrix-view.hh:949
Block< Derived,(AllRows ? Derived::RowsAtCompileTime :Eigen::Dynamic),(AllCols ? Derived::ColsAtCompileTime :Eigen::Dynamic),(AllCols ?(bool) Derived::IsRowMajor :(AllRows ?(bool)!Derived::IsRowMajor :false))> type
Definition: matrix-view.hh:879
Derived & derived()
Definition: matrix-view.hh:364
void clearCols()
Clear cols.
Definition: matrix-view.hh:593
MatrixBase< MatrixBlockView< _ArgType, _Rows, _Cols, _allRows, _allCols > > Base
Definition: matrix-view.hh:861
static First & run(First &f, Second &)
Definition: matrix-view.hh:132
const size_type & nbRows() const
Definition: matrix-view.hh:444
internal::conditional< _allCols, internal::empty_struct, BlockIndex::segments_t >::type ColIndices_t
Definition: matrix-view.hh:158
const size_type & nbRows() const
Definition: matrix-view.hh:651
void addCol(const size_type &col, const size_type size)
Definition: matrix-view.hh:611
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > PlainObject
Definition: matrix-view.hh:864
EIGEN_STRONG_INLINE PlainObject eval() const
Definition: matrix-view.hh:942
Definition: matrix-view.hh:873
const Derived & d
Definition: matrix-view-operation.hh:126
BlockIndex::segment_t segment_t
Interval of indices [first, first + second - 1].
Definition: matrix-view.hh:352
static ReturnType run(Derived &d, size_type r, size_type c, size_type rs, size_type cs)
Definition: matrix-view.hh:269
Definition: matrix-view.hh:130
RowIndices_t m_rows
Definition: matrix-view.hh:981
View::size_type size_type
Definition: matrix-view.hh:277
static void run(std::ostream &os, const BlockIndexType &bi)
Definition: matrix-view.hh:298
ColIndices_t m_cols
Definition: matrix-view.hh:983
_ArgType ArgType
Definition: matrix-view.hh:866
MatrixBlocks(const segments_t &idx)
Definition: matrix-view.hh:557
size_type row
Definition: matrix-view.hh:824
static EIGEN_STRONG_INLINE Derived & run(Derived &dst, const OtherDerived &other)
Definition: matrix-view.hh:213
MatrixBlockView(ArgType &arg, const size_type &nbRows, const RowIndices_t rows, const size_type &nbCols, const ColIndices_t cols)
Definition: matrix-view.hh:891
void updateCols()
Definition: matrix-view.hh:631
MatrixBlockView< MatrixType, _Rows, _Cols, AllRows, AllCols > type
Definition: matrix-view.hh:360
MatrixBlocks(const segments_t &rows, const segments_t &cols)
Definition: matrix-view.hh:507
const segments_t & indices() const
Definition: matrix-view.hh:413
EIGEN_STRONG_INLINE View< const MatrixType >::type rview(const MatrixBase< MatrixType > &other) const
Definition: matrix-view.hh:384
size_type cs() const
number of ColS
Definition: matrix-view.hh:839
void clearRows()
Clear rows.
Definition: matrix-view.hh:586
Smaller matrix composed by concatenation of the blocks.
Definition: matrix-view.hh:359
MatrixBlockView< _ArgType, _Rows, _Cols, _allRows, _allCols > Dst
Definition: matrix-view.hh:230
size_type rs() const
number of RowS
Definition: matrix-view.hh:837
View::size_type size_type
Definition: matrix-view.hh:267
size_type m_nbRows
Definition: matrix-view.hh:980
EIGEN_STRONG_INLINE block_iterator _block_iterator() const
Definition: matrix-view.hh:966
BlockIndex::segments_t segments_t
vector of segments
Definition: matrix-view.hh:354
@ AllCols
Definition: matrix-view.hh:346
Definition: matrix-view.hh:341
static EIGEN_STRONG_INLINE Derived & evalTo(ActualDerived &dst, const ActualOtherDerived &other)
Definition: matrix-view.hh:215
const RowIndices_t & rows() const
Definition: matrix-view.hh:420
size_type ro() const
Row in the Output matrix
Definition: matrix-view.hh:829
Definition: matrix-view.hh:123
size_type m_nbCols
Definition: matrix-view.hh:982
static EIGEN_STRONG_INLINE T1 run(T1 then, T2 Else)
Definition: matrix-view.hh:147
static void run(const Src &src, Dst &dst)
Definition: matrix-view.hh:231
EIGEN_STRONG_INLINE void evalTo(Dest &dst) const
Definition: matrix-view.hh:932
static segments_t difference(const segment_t &a, const segment_t &b)
Compute the set difference between two segments.
#define EIGEN_MATRIX_BLOCKS_PUBLIC_INTERFACE(Derived)
Definition: matrix-view.hh:325
EIGEN_STRONG_INLINE size_type _blocks() const
Definition: matrix-view.hh:955
internal::variable_if_dynamic< size_type,(_allCols ? 0 :Dynamic) > _co
Definition: matrix-view.hh:826
MatrixBlocksBase(const MatrixBlocksBase &)
Copy constructor.
Definition: matrix-view.hh:491
static bool overlap(const segment_t &a, const segment_t &b)
Whether two segments overlap.
static EIGEN_STRONG_INLINE Derived & evalTo(ActualDerived &dst, const ActualOtherDerived &other)
Definition: matrix-view.hh:222
MatrixBlockView(ArgType &arg, const size_type &nbIndices, const Indices_t &indices)
Valid only when _allRows or _allCols is true.
Definition: matrix-view.hh:900
EIGEN_STRONG_INLINE CoeffReturnType coeff(size_type row, size_type col) const
Definition: matrix-view.hh:915
static EIGEN_STRONG_INLINE T2 run(T1 then, T2 Else)
Definition: matrix-view.hh:148
static Index size()
Definition: matrix-view.hh:144
MatrixBlocks()
Empty constructor.
Definition: matrix-view.hh:501
static void run(const Src &src, Dst &dst)
Definition: matrix-view.hh:240
static void run(const Src &src, Dst &dst)
Definition: matrix-view.hh:253
const size_type & nbCols() const
Definition: matrix-view.hh:658
const RowIndices_t & rows() const
Definition: matrix-view.hh:637
MatrixBlocks(size_type start, size_type size)
Definition: matrix-view.hh:545
size_type m_nbCols
Definition: matrix-view.hh:670
@ AllCols
Definition: matrix-view.hh:820
std::pair< size_type, size_type > segment_t
Interval of indices [first, first + second - 1].
Definition: matrix-view.hh:41
internal::traits< Derived >::RowIndices_t RowIndices_t
Definition: matrix-view.hh:355
assert(d.lhs()._blocks()==d.rhs()._blocks())
Definition: matrix-view.hh:127
Definition: matrix-view.hh:111
@ AllRows
Definition: matrix-view.hh:819
internal::conditional< _allRows, const internal::empty_struct, const Indices_t & >::type RowIndices_t
Definition: matrix-view.hh:886
std::vector< segment_t > segments_t
Definition: fwd.hh:69
block_t< const ArgType >::type BlockConstXprType
Definition: matrix-view.hh:882
static ReturnType run(Derived &d, size_type, size_type c, size_type, size_type cs)
Definition: matrix-view.hh:289
const size_type & nbCols() const
Definition: matrix-view.hh:451
Derived const & derived() const
Definition: matrix-view.hh:363
static std::ostream & run(std::ostream &os, const constraints::segment_t &s)
Definition: matrix-view.hh:998
void updateIndices()
Definition: matrix-view.hh:664
block_iterator operator++(int)
Definition: matrix-view.hh:855
bool valid() const
Definition: matrix-view.hh:856
static Second & run(First &, Second &s)
Definition: matrix-view.hh:136
internal::conditional< _allCols, const internal::empty_struct, const Indices_t & >::type ColIndices_t
Definition: matrix-view.hh:887
View::size_type size_type
Definition: matrix-view.hh:287
internal::conditional< _allRows, internal::empty_struct, BlockIndex::segments_t >::type RowIndices_t
Definition: matrix-view.hh:157
size_type m_nbRows
Definition: matrix-view.hh:670
static segments_t extract(const segments_t &segments, size_type start, size_type cardinal)
static void add(segments_t &a, const segment_t &b)
In place addition of a segment_t to segments_t.
EIGEN_STRONG_INLINE void writeTo(Dest &dst) const
Definition: matrix-view.hh:937
Definition: matrix-view.hh:265
MatrixBlocks(const size_type &nbRows, const RowIndices_t &rows, const size_type &nbCols, const ColIndices_t &cols)
Definition: matrix-view.hh:527
@ Rows
Definition: matrix-view.hh:817
const size_type & nbIndices() const
Definition: matrix-view.hh:437
empty_struct()
Definition: matrix-view.hh:141
Definition: active-set-differentiable-function.hh:24
MatrixBlocks< AllRows, AllCols > block(size_type i, size_type j, size_type ni, size_type nj) const
Definition: matrix-view.hh:460
@ Cols
Definition: matrix-view.hh:818
ArgType & m_arg
Definition: matrix-view.hh:979
Definition: matrix-view.hh:295
block_iterator & operator++()
Definition: matrix-view.hh:841
Definition: matrix-view.hh:226
EIGEN_STRONG_INLINE size_type cols() const
Definition: matrix-view.hh:908
@ OneDimension
Definition: matrix-view.hh:347
pinocchio::size_type size_type
Definition: fwd.hh:35
Definition: matrix-view.hh:147
const MatrixBlockView & view
Definition: matrix-view.hh:823
static segments_t sum(const segment_t &a, const segment_t &b)
Compute the union of tws segments.
MatrixBlockView< _ArgType, _Rows, _Cols, _allRows, _allCols > Src
Definition: matrix-view.hh:239
MatrixBlocks(const segment_t &idx)
Definition: matrix-view.hh:567
const EIGEN_STRONG_INLINE BlockConstXprType _block(const block_iterator &b) const
Definition: matrix-view.hh:961
MatrixXd::Index Index
Definition: matrix-view.hh:140
MatrixBlocksBase()
Empty constructor.
Definition: matrix-view.hh:488
MatrixBlocks< AllRows, AllCols > middleRows(size_type i, size_type ni) const
Definition: matrix-view.hh:470
hpp::constraints::size_type size_type
Definition: matrix-view.hh:815
MatrixBlocksRef< AllCols, AllRows > transpose() const
Definition: matrix-view.hh:391
EIGEN_STRONG_INLINE Scalar & coeffRef(size_type row, const size_type &col)
Definition: matrix-view.hh:926
const Index & operator[](const Index &i) const
Definition: matrix-view.hh:145
MatrixBlocksRef< AllRows, true > keepRows() const
Definition: matrix-view.hh:396
hpp::constraints::size_type size_type
Index of vector or matrix.
Definition: matrix-view.hh:39
internal::traits< Derived >::ColIndices_t ColIndices_t
Definition: matrix-view.hh:356
internal::variable_if_dynamic< size_type,(_allRows ? 0 :Dynamic) > _ro
Definition: matrix-view.hh:825
empty_struct(In_t)
Definition: matrix-view.hh:142
MatrixBlocksRef< true, AllCols > keepCols() const
Definition: matrix-view.hh:402
static void run(std::ostream &, const BlockIndexType &)
Definition: matrix-view.hh:295
MatrixBlockView< _ArgType, _Rows, _Cols, _allRows, _allCols > Src
Definition: matrix-view.hh:251
void updateRows()
Definition: matrix-view.hh:622
Definition: matrix-view.hh:296
static void shrink(segments_t &a)
std::vector< segment_t > segments_t
vector of segments
Definition: matrix-view.hh:43
block_t< ArgType >::type BlockXprType
Definition: matrix-view.hh:881
internal::ref_selector< ArgType >::type ArgTypeNested
Definition: matrix-view.hh:867
internal::remove_all< ArgType >::type NestedExpression
Definition: matrix-view.hh:868
size_type co() const
Col in the Output matrix
Definition: matrix-view.hh:831
block_iterator(const MatrixBlockView &v)
Definition: matrix-view.hh:827
hpp::constraints::size_type size_type
Index of vector or matrix.
Definition: matrix-view.hh:350
static void sort(segments_t &a)
const ColIndices_t & cols() const
Definition: matrix-view.hh:644
MatrixBlockView< ArgType, _Rows, _Cols, _allRows, _allCols > OtherDerived
Definition: matrix-view.hh:219
const ColIndices_t & cols() const
Definition: matrix-view.hh:427
ArgType::Scalar Scalar
Definition: matrix-view.hh:182
EIGEN_STRONG_INLINE View< MatrixType >::type lview(const MatrixBase< MatrixType > &other) const
Definition: matrix-view.hh:371
EIGEN_STRONG_INLINE CoeffReturnType coeff(size_type index) const
Definition: matrix-view.hh:910
size_type col
Definition: matrix-view.hh:824
static ReturnType run(Derived &d, size_type r, size_type, size_type rs, size_type)
Definition: matrix-view.hh:279
size_type ri() const
Row in the Input matrix
Definition: matrix-view.hh:833
Definition: matrix-view.hh:139
EIGEN_STRONG_INLINE bool isZero(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: matrix-view.hh:968
EIGEN_STRONG_INLINE Scalar & coeffRef(size_type index)
Definition: matrix-view.hh:921
EIGEN_STRONG_INLINE size_type rows() const
Definition: matrix-view.hh:907
@ AllRows
Definition: matrix-view.hh:345
MatrixBlockView< ArgType, _Rows, _Cols, _allRows, _allCols > OtherDerived
Definition: matrix-view.hh:212
MatrixIndices_t::segments_t Indices_t
Definition: matrix-view.hh:885
MatrixBlocks< AllRows, AllCols > middleCols(size_type j, size_type nj) const
Definition: matrix-view.hh:480
empty_struct(In0_t, In1_t)
Definition: matrix-view.hh:143
MatrixBlockView< _ArgType2, _Rows2, _Cols2, _allRows2, _allCols2 > Dst
Definition: matrix-view.hh:252
MatrixBlocks(const MatrixBlocksBase< MBDerived > &other)
Copy constructor.
Definition: matrix-view.hh:575
internal::conditional< _allCols, internal::empty_struct, const BlockIndex::segments_t & >::type ColIndices_t
Definition: matrix-view.hh:169
traits< ArgType >::XprKind XprKind
Definition: matrix-view.hh:181
ColIndices_t m_cols
Definition: matrix-view.hh:672
MatrixBlocks< _allRows, _allCols > MatrixIndices_t
Definition: matrix-view.hh:884
ArgType::Index Index
Definition: matrix-view.hh:178
Definition: matrix-view.hh:37
EIGEN_STRONG_INLINE BlockXprType _block(const block_iterator &b)
Definition: matrix-view.hh:956
size_type ci() const
Col in the Input matrix
Definition: matrix-view.hh:835
Definition: matrix-view.hh:822
void addRow(const size_type &row, const size_type size)
Definition: matrix-view.hh:602
static size_type cardinal(const segments_t &a)