hpp-constraints  4.9.1
Definition of basic geometric constraints for motion planning
Eigen::BlockIndex Struct Reference

#include <hpp/constraints/matrix-view.hh>

Public Types

typedef hpp::constraints::size_type size_type
 Index of vector or matrix. More...
 
typedef std::pair< size_type, size_typesegment_t
 Interval of indices [first, first + second - 1]. More...
 
typedef std::vector< segment_tsegments_t
 vector of segments More...
 

Static Public Member Functions

static size_type cardinal (const segments_t &a)
 
template<typename Derived >
static segments_t fromLogicalExpression (const Eigen::ArrayBase< Derived > &array)
 
static void sort (segments_t &a)
 
static void shrink (segments_t &a)
 
static bool overlap (const segment_t &a, const segment_t &b)
 Whether two segments overlap. More...
 
static segments_t sum (const segment_t &a, const segment_t &b)
 Compute the union of tws segments. More...
 
static void add (segments_t &a, const segment_t &b)
 In place addition of a segment_t to segments_t. More...
 
static void add (segments_t &a, const segments_t &b)
 In place addition of segments_t to segments_t. More...
 
static segments_t difference (const segment_t &a, const segment_t &b)
 Compute the set difference between two segments. More...
 
static segments_t difference (const segments_t &a, const segment_t &b)
 
static segments_t difference (const segment_t &a, const segments_t &b)
 
static segments_t difference (const segments_t &a, const segments_t &b)
 
static segments_t split (segments_t &segments, const size_type &cardinal)
 
static segments_t extract (const segments_t &segments, size_type start, size_type cardinal)
 

Detailed Description

List of integer intervals

Used to select blocks in a vector or in a matrix.

Member Typedef Documentation

◆ segment_t

Interval of indices [first, first + second - 1].

◆ segments_t

vector of segments

◆ size_type

Index of vector or matrix.

Member Function Documentation

◆ add() [1/2]

static void Eigen::BlockIndex::add ( segments_t a,
const segment_t b 
)
static

In place addition of a segment_t to segments_t.

◆ add() [2/2]

static void Eigen::BlockIndex::add ( segments_t a,
const segments_t b 
)
static

In place addition of segments_t to segments_t.

◆ cardinal()

static size_type Eigen::BlockIndex::cardinal ( const segments_t a)
static

Return the number of indices in the vector of segments.

Parameters
avector of segments

◆ difference() [1/4]

static segments_t Eigen::BlockIndex::difference ( const segment_t a,
const segment_t b 
)
static

Compute the set difference between two segments.

◆ difference() [2/4]

static segments_t Eigen::BlockIndex::difference ( const segments_t a,
const segment_t b 
)
static

Compute the set difference between a vector of segments and a segment.

Note
assumes a is sorted

◆ difference() [3/4]

static segments_t Eigen::BlockIndex::difference ( const segment_t a,
const segments_t b 
)
static

Compute the set difference between a segment and a vector of segments.

Note
assume b is sorted

◆ difference() [4/4]

static segments_t Eigen::BlockIndex::difference ( const segments_t a,
const segments_t b 
)
static

Compute the set difference between two vectors of segments.

Note
assume a and b are sorted

◆ extract()

static segments_t Eigen::BlockIndex::extract ( const segments_t segments,
size_type  start,
size_type  cardinal 
)
static

Extract a subset of a set of segments

Parameters
segmentsinput set of segments
startbeginning of extracted set of segments (cardinal of subset left behind in input set of segments)
cardinalcardinal of extracted set of segments,
Returns
subset of segments.

◆ fromLogicalExpression()

template<typename Derived >
BlockIndex::segments_t Eigen::BlockIndex::fromLogicalExpression ( const Eigen::ArrayBase< Derived > &  array)
static

Build a vector of segments from an array of Boolean.

Parameters
arrayarray of Boolean values
Returns
the vector of segments corresponding to true values in the input.

◆ overlap()

static bool Eigen::BlockIndex::overlap ( const segment_t a,
const segment_t b 
)
static

Whether two segments overlap.

◆ shrink()

static void Eigen::BlockIndex::shrink ( segments_t a)
static

Build a sequence of non overlapping segments.

Parameters
aa vector of segments
Note
assumes a is sorted

◆ sort()

static void Eigen::BlockIndex::sort ( segments_t a)
static

Sort segments in increasing order. Compare lower bounds of intervals and lengths if lower bounds are equal.

◆ split()

static segments_t Eigen::BlockIndex::split ( segments_t segments,
const size_type cardinal 
)
static

Split a set of segment into two sets of segments

Parameters
segmentsinput set of segments,
cardinalcardinal of the first set of segments,
Returns
the first set of segments.

The second set is stored in the input set of segments.

◆ sum()

static segments_t Eigen::BlockIndex::sum ( const segment_t a,
const segment_t b 
)
static

Compute the union of tws segments.


The documentation for this struct was generated from the following file: