#include <partition.h>
atlas::partition::Partition::Partition |
( |
| ) |
|
|
inline |
atlas::partition::Partition::Partition |
( |
unsigned long |
n | ) |
|
|
inlineexplicit |
Undefined partition of [0,n[ with no classes yet (use |add_class|)
atlas::partition::Partition::Partition |
( |
std::vector< unsigned long > & |
f | ) |
|
|
explicit |
Counts the number of elements in class #c.
NOTE: Straightforward implementation. Successively computing |classSize| for all classes would cost more time then necessary.
atlas::partition::Partition::~Partition |
( |
| ) |
|
|
inline |
void atlas::partition::Partition::addToClass |
( |
unsigned long |
c, |
|
|
unsigned long |
j |
|
) |
| |
|
inline |
Adds value j to class #c.
Assumes that class #c is already non-empty; that is, that j is not the first element of the class. For the first element of a class, use newClass(j) instead.
unsigned long atlas::partition::Partition::class_of |
( |
unsigned long |
j | ) |
const |
|
inline |
unsigned long atlas::partition::Partition::classCount |
( |
| ) |
const |
|
inline |
unsigned long atlas::partition::Partition::classRep |
( |
unsigned long |
c | ) |
const |
|
inline |
unsigned long atlas::partition::Partition::classSize |
( |
unsigned long |
c | ) |
const |
Counts the number of elements in class #c.
NOTE: Straightforward implementation. Successively computing |classSize| for all classes with this method would cost more time then necessary.
void atlas::partition::Partition::clear |
( |
| ) |
|
|
inline |
Clears all entries of d_classRep.
Comp atlas::partition::Partition::comparer |
( |
| ) |
const |
|
inline |
unsigned long atlas::partition::Partition::new_class |
( |
unsigned long |
c | ) |
|
void atlas::partition::Partition::resize |
( |
unsigned long |
n | ) |
|
|
inline |
Resizes the class to be a partition of [0,n[.
unsigned long atlas::partition::Partition::size |
( |
| ) |
const |
|
inline |
void atlas::partition::Partition::swap |
( |
Partition & |
other | ) |
|
std::vector<unsigned long> atlas::partition::Partition::d_class |
|
private |
std::vector<unsigned long> atlas::partition::Partition::d_classRep |
|
private |
The documentation for this class was generated from the following files:
- /home/ran/atlas_project/latest_branch_07182016/sources/utilities/partition.h
- /home/ran/atlas_project/latest_branch_07182016/sources/utilities/partition.cpp