An iterator for sets of increasing corresponding values that have the same cardinality. More...
#include <hamiltonian_path.h>
Public Types | |
| typedef SetRange::SetType | SetType |
| Make the parameter types visible to SetRangeWithCardinality. More... | |
| typedef SetType::IntegerType | IntegerType |
Public Member Functions | |
| SetRangeIterator (const SetType set) | |
| SetType | operator * () const |
| STL iterator-related methods. More... | |
| bool | operator!= (const SetRangeIterator &other) const |
| const SetRangeIterator & | operator++ () |
| Computes the next set with the same cardinality using Gosper's hack. More... | |
An iterator for sets of increasing corresponding values that have the same cardinality.
For example, the sets with cardinality 3 will be listed as ...00111, ...01011, ...01101, ...1110, etc...
Definition at line 223 of file hamiltonian_path.h.
| typedef SetType::IntegerType operations_research::SetRangeIterator< SetRange >::IntegerType |
Definition at line 227 of file hamiltonian_path.h.
| typedef SetRange::SetType operations_research::SetRangeIterator< SetRange >::SetType |
Make the parameter types visible to SetRangeWithCardinality.
Definition at line 226 of file hamiltonian_path.h.
|
inlineexplicit |
Definition at line 229 of file hamiltonian_path.h.
|
inline |
STL iterator-related methods.
Definition at line 232 of file hamiltonian_path.h.
|
inline |
Definition at line 233 of file hamiltonian_path.h.
|
inline |
Computes the next set with the same cardinality using Gosper's hack.
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-239.pdf ITEM 175 Also translated in C https://www.cl.cam.ac.uk/~am21/hakmemc.html
Dividing by c as in HAKMEMC can be avoided by taking into account that c is the smallest singleton of current_set_, and using a shift.
Definition at line 240 of file hamiltonian_path.h.