18 template <
typename Derived>
20 (
const Eigen::ArrayBase<Derived>&
array)
23 for (
size_type i = 0; i < array.derived().size(); ++i)
24 if (array.derived()[i]) res.push_back (
segment_t(i, 1));
std::vector< segment_t > segments_t
vector of segments
Definition: matrix-view.hh:43
std::vector< segment_t > segments_t
Definition: fwd.hh:69
static void run(std::ostream &os, const BlockIndexType &bi)
Definition: matrix-view.hh:298
hpp::constraints::size_type size_type
Index of vector or matrix.
Definition: matrix-view.hh:39
static segments_t fromLogicalExpression(const Eigen::ArrayBase< Derived > &array)
Definition: matrix-view.hh:20
std::pair< size_type, size_type > segment_t
Interval of indices [first, first + second - 1].
Definition: matrix-view.hh:41
static std::ostream & run(std::ostream &os, const constraints::segments_t &segs)
Definition: matrix-view.hh:35