Class Indices
Defined in File Indices.h
Class Documentation
-
class Indices
Public Types
-
typedef std::vector<unsigned int> RowsChunk
RowsChunk a vector<unsigned int> of rows which are contiguous.
Public Functions
-
Indices(unsigned int i)
SubTaskMap creates a SubTaskMap of size 1, with just one index.
- Parameters
i –
-
Indices(const std::list<unsigned int> &rowsList)
-
Indices(const std::vector<unsigned int> &rowsVector)
-
const std::list<unsigned int> &asList() const
asList returns the list of all rows as a list (first row has index 0)
- Returns
a list of row indices (starting from 0)
-
const std::vector<unsigned int> &asVector() const
asVector returns the list of all rows as a vector (first row has index 0)
- Returns
a vector of row indices (starting from 0)
-
Indices &shift(unsigned int amount)
shift shifts all indices by the amount specified
- Parameters
amount – by which all indices will be shift
-
bool isContiguous() const
-
int size() const
-
Indices &filter(const OpenSoT::Indices &f)
filter modifies the current set of indices by picking only the entries specified in f (the entries are counted starting from 0) For example, if the current object contains a set of 13 indices, [2,14], and the filter f contains 3 indices, [0,3,5] the final object will contain just 3 indices, [2, 5, 7]
- Parameters
f – the indices filter. Numbers here will specify the entries to keep in the filtered Indices set
- Returns
the current object, with just the filtered index set.
-
Indices operator+(const Indices &b) const
operator + adds a set of indices to the current indices set
- Parameters
b – the indices set to concatenate
- Returns
a bigger indices set (sorted, without duplicates)
-
Indices operator+(const unsigned int r) const
operator + adds a new index to the current indices set
- Parameters
r – the index to add to the set
- Returns
a bigger indices set (sorted, without duplicates)
-
Indices operator-(const Indices &b) const
operator - removes a set of indices (if existing) from the current indices set
- Parameters
b – the indices set to remove
- Returns
a smaller indices set (sorted, without duplicates)
-
Indices operator-(const unsigned int r) const
operator - removes an index (if existing) from the current indices set
- Parameters
r – the index to remove frin the set
- Returns
a smaller indices set (sorted, without duplicates)
-
operator std::string() const
-
operator std::list<unsigned int>() const
-
typedef std::vector<unsigned int> RowsChunk