35 Partition
orbits(
const F&,
unsigned long,
unsigned long);
66 explicit Partition(
unsigned long n):d_class(n),d_classRep() {}
68 explicit Partition(std::vector<unsigned long>&);
78 unsigned long class_of(
unsigned long j)
const {
return d_class[j]; }
81 {
return d_class == other.
d_class; }
84 unsigned long classCount()
const {
return d_classRep.size(); }
87 unsigned long classRep(
unsigned long c)
const {
return d_classRep[c]; }
90 unsigned long classSize(
unsigned long)
const;
93 unsigned long size()
const {
return d_class.size(); }
96 class Comp :
public std::unary_function<unsigned long,unsigned long>
125 void clear() { d_classRep.clear(); }
127 unsigned long new_class(
unsigned long c);
202 return d_range.first == i.
d_range.first;
206 return d_range.first != i.
d_range.first;
213 pointer operator-> ()
const {
218 return d_range.first != d_data.end();
231 { d_range.first = d_stop[0];
232 d_range.second = d_stop[1];
233 d_currentEnd = d_stop.begin()+1;
Comp::result_type operator()(Comp::argument_type x) const
Definition: partition.h:101
void swap(Partition &)
Definition: partition.cpp:98
Definition: partition.h:51
bool operator==(const Partition &other) const
Definition: partition.h:80
bool operator!=(const type_expr &x, const type_expr &y)
Definition: axis-types.h:374
Definition: Poincare.cpp:13
Partition orbits(const F &, unsigned long, unsigned long)
uA p
Definition: lists.cpp:26
std::pair< SubIterator, SubIterator > d_range
Definition: partition.h:185
void rewind()
Definition: partition.h:230
unsigned long new_class(unsigned long c)
Definition: partition.cpp:107
const value_type * pointer
Definition: partition.h:194
void clear()
Clears all entries of d_classRep.
Definition: partition.h:125
unsigned long classRep(unsigned long c) const
Definition: partition.h:87
std::pair< SubIterator, SubIterator > value_type
Definition: partition.h:192
void addToClass(unsigned long c, unsigned long j)
Adds value j to class #c.
Definition: partition.h:116
std::vector< SubIterator > d_stop
Definition: partition.h:184
Definition: partition.h:176
RationalVector< C2 > operator*(const matrix::Matrix< C1 > &M, const RationalVector< C2 > &v)
Definition: ratvec.cpp:158
ptrdiff_t difference_type
Definition: partition.h:193
unsigned long classSize(unsigned long) const
Counts the number of elements in class #c.
Definition: partition.cpp:120
Partition(unsigned long n)
Undefined partition of [0,n[ with no classes yet (use |add_class|)
Definition: partition.h:66
std::vector< unsigned long >::const_iterator SubIterator
Definition: partition.h:179
std::vector< unsigned long > d_class
Definition: partition.h:53
Partition()
Definition: partition.h:61
PartitionIterator iterator
Definition: partition.h:58
std::vector< unsigned long > d_data
Definition: partition.h:183
std::vector< unsigned long > d_classRep
Definition: partition.h:54
Comp(const Partition &p)
Definition: partition.h:100
~Partition()
Definition: partition.h:72
Comp comparer() const
Definition: partition.h:105
void resize(unsigned long n)
Resizes the class to be a partition of [0,n[.
Definition: partition.h:132
Definition: partition.h:96
unsigned long n
Definition: axis.cpp:77
std::forward_iterator_tag iterator_category
Definition: partition.h:191
unsigned long classCount() const
Definition: partition.h:84
std::vector< SubIterator >::const_iterator d_currentEnd
Definition: partition.h:186
Template definitions for the class Partition.
unsigned long size() const
Definition: partition.h:93
const Partition & pi
Definition: partition.h:98
const value_type & reference
Definition: partition.h:195
unsigned long class_of(unsigned long j) const
Definition: partition.h:78