The Original CHomP Software
|
This class defines a multivalued map. More...
#include <hashsets.h>
Public Member Functions | |
mvmap (int bequiet=1) | |
The default constructor. More... | |
~mvmap () | |
The destructor. More... | |
const domelement & | get (int_t n) const |
Retrieves the n-th element from the domain for reading only. More... | |
const hashedset< domelement > & | getdomain () const |
Retrieves the domain of the map for reading only. More... | |
const hashedset< imgelement > & | operator() (int_t n) const |
Retrieve the image of the n-th element for reading only. More... | |
const hashedset< imgelement > & | operator() (const domelement &x) const |
Retrieve the image of an element for reading only. More... | |
hashedset< imgelement > & | operator[] (int_t n) |
Returns the image of the n-th element for writing. More... | |
hashedset< imgelement > & | operator[] (const domelement &x) |
Returns the image of an element for writing. More... | |
int_t | size () const |
Returns the number of elements in the domain of the map. More... | |
bool | remove (const domelement &x) |
Removes an element from the domain of the map. More... | |
bool | removenum (int_t n) |
Removes the n-th element from the domain of the map. More... | |
void | remove (const hashedset< domelement > &x) |
Removes a set of elements from the domain of the map. More... | |
void | swap (mvmap< domelement, imgelement > &other) |
Swaps the internal data of two multivalued maps. More... | |
Public Attributes | |
int | quiet |
This variable indicates whether the map should be quiet. More... | |
Private Attributes | |
hashedset< domelement > | domain |
The domain of the map. More... | |
multitable< hashedset< imgelement > > | images |
The images of cubes from the domain. More... | |
This class defines a multivalued map.
Each domain-type element is mapped into a hashed set of image-type elements. The images of elements can be accessed with the operator [] (for modifying) and operator () (for retrieval only). NOTE: Since the domain elements can be identified either by their value, or by their successive numbers, the domain cannot be a set of integers, because this would cause ambiguity.
Definition at line 944 of file hashsets.h.
|
inlineexplicit |
The default constructor.
The argument 'bequiet' is passed to the hashed set which represents the domain of the map. If set to zero, makes the domain display statistics information.
Definition at line 1013 of file hashsets.h.
|
inline |
The destructor.
Definition at line 1020 of file hashsets.h.
|
inline |
Retrieves the n-th element from the domain for reading only.
Definition at line 1026 of file hashsets.h.
|
inline |
Retrieves the domain of the map for reading only.
Definition at line 1035 of file hashsets.h.
|
inline |
Retrieve the image of an element for reading only.
Throws an exception if the element is not in the domain.
Definition at line 1051 of file hashsets.h.
|
inline |
Retrieve the image of the n-th element for reading only.
Throws an exception if the number is out of range.
Definition at line 1042 of file hashsets.h.
|
inline |
Returns the image of an element for writing.
If the element is not in the domain, then it is added and a reference to its empty image is returned.
Definition at line 1071 of file hashsets.h.
|
inline |
Returns the image of the n-th element for writing.
Definition at line 1062 of file hashsets.h.
|
inline |
Removes an element from the domain of the map.
Returns true if removed, false if it was not in the domain.
Definition at line 1100 of file hashsets.h.
|
inline |
Removes a set of elements from the domain of the map.
Definition at line 1106 of file hashsets.h.
|
inline |
Removes the n-th element from the domain of the map.
Definition at line 1085 of file hashsets.h.
|
inline |
Returns the number of elements in the domain of the map.
Definition at line 1079 of file hashsets.h.
|
inline |
Swaps the internal data of two multivalued maps.
Definition at line 1116 of file hashsets.h.
References chomp::multiwork::swap().
|
private |
The domain of the map.
Definition at line 1002 of file hashsets.h.
|
private |
The images of cubes from the domain.
The order of these images is the same as the order of elements in the domain.
Definition at line 1006 of file hashsets.h.
int chomp::homology::mvmap< domelement, imgelement >::quiet |
This variable indicates whether the map should be quiet.
If set to false, the map may display some additional information about hashing statistics, etc.
Definition at line 998 of file hashsets.h.