#include <OrderedSubset.h>
Inherits NamedObject.
Inheritance diagram for OrderedSubset:
Public Member Functions | |
OrderedSubset (const char *name, bool zeroBased=true) | |
Creates an empty OrderedSubset, to be filled later. | |
OrderedSubset (const char *name, int numIndices, bool zeroBased=true) | |
Creates an OrderedSubset, and fills it with numIndices values, in order. | |
OrderedSubset (OrderedSubset &) | |
Copy constructor. | |
int | getNumEntries () |
Accessor method. | |
void | add (int i) |
Adds an index to the OrderedSubset. | |
const int | get (int i) |
Retrieves the index at the given position. | |
void | add (OrderedSubset &) |
Adds the contents of one OrderedSubset to this one. | |
void | loadAscii (istream &s) |
Loads the space-separated ordering indices from an input stream. | |
void | loadBinary (istream &s, int numEntries) |
Loads the ordering indices from a binary stream (faster than parsing text). | |
void | saveAscii (ostream &s) |
Writes the indices to the passed output stream, one per line. | |
void | saveBinary (ostream &s) |
Writes the indices to the passed output stream as a binary array of integers. | |
void | permuteEntries () |
Randomizes the order of the stored indices. | |
Friends | |
ostream & | operator<< (ostream &s, OrderedSubset &os) |
Sends the indices in an OrderedSubset to the passed stream. | |
istream & | operator>> (istream &s, OrderedSubset &os) |
Reads the indices for the OrderedSubset from the passed input stream. |
As such, it defines both a subset, and an ordering of a subset. OrderedSubsets are used to store the orderings in View Objects.
|
Creates an empty OrderedSubset, to be filled later.
|
|
Creates an OrderedSubset, and fills it with numIndices values, in order.
|
|
Copy constructor.
|
|
Adds the contents of one OrderedSubset to this one.
|
|
Adds an index to the OrderedSubset.
|
|
Retrieves the index at the given position.
|
|
Accessor method.
|
|
Loads the space-separated ordering indices from an input stream.
|
|
Loads the ordering indices from a binary stream (faster than parsing text). The indices are loaded as an array of integers of specified size.
|
|
Randomizes the order of the stored indices.
|
|
Writes the indices to the passed output stream, one per line.
|
|
Writes the indices to the passed output stream as a binary array of integers.
|
|
Sends the indices in an OrderedSubset to the passed stream.
|
|
Reads the indices for the OrderedSubset from the passed input stream.
|