The Original CHomP Software
|
This file contains the definition of the container "hashedset" which can be used to represent a set of elements of arbitrary type. More...
#include "chomp/system/config.h"
#include "chomp/system/textfile.h"
#include "chomp/struct/multitab.h"
#include "chomp/struct/inthash.h"
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <algorithm>
Go to the source code of this file.
Classes | |
class | chomp::homology::hashstat |
This is a small class used to gather and display hashing statistics for the hashing tables in the class "hashedset". More... | |
class | chomp::homology::HashingGlobal< element > |
A hashing method using globally defined functions that calculate the two required hashing keys. More... | |
class | chomp::homology::HashingMember< element > |
A hashing method using member functions that calculate the two required hashing keys. More... | |
class | chomp::homology::hashedset< element, hashkeys > |
This is a template for a set of objects of the given type. More... | |
class | chomp::homology::mvmap< domelement, imgelement > |
This class defines a multivalued map. More... | |
Namespaces | |
namespace | chomp |
This namespace contains the entire CHomP library interface. | |
namespace | chomp::homology |
This namespace contains the core of the homology computation procedures and related classes and templates contained in the CHomP C++ library. | |
Macros | |
#define | SMALL_SIZE true |
This constant passed to the function 'write' makes the hashed set be displayed in a way that is appropriate for small sets: the entire set is enclosed in braces, and elements are written on one line separated by commas. More... | |
#define | LARGE_SIZE false |
This constant passed to the function 'write' makes the hashed set be displayed in a way that is appropriate for large sets: each element is displayed in a separate line, and the elements are preceded by a comment in which the number of elements is indicated and hashing statistics are written. More... | |
Functions | |
std::ostream & | chomp::homology::operator<< (std::ostream &out, const hashstat &s) |
Shows hashing statistics in a concise and readable way to the output stream in the text format. More... | |
template<class stream , class element , class hashkeys > | |
stream & | chomp::homology::write (stream &out, const hashedset< element, hashkeys > &s, bool size) |
Writes the entire hashed set to an output stream in the text mode. More... | |
template<class element , class hashkeys > | |
std::ostream & | chomp::homology::operator<< (std::ostream &out, const hashedset< element, hashkeys > &s) |
Writes a hashed set to an output stream as a large one (each element is written on a separate line, with some comments at the beginning). More... | |
template<class stream , class element , class hashkeys > | |
stream & | chomp::homology::read (stream &in, hashedset< element, hashkeys > &s, bool size) |
Reads a hashed set from an input stream, either a small size style or a large one. More... | |
template<class element , class hashkeys > | |
std::istream & | chomp::homology::operator>> (std::istream &in, hashedset< element, hashkeys > &s) |
Reads a hashed set from an input stream in a large size style (each element occupies one line, any comments are ignored). More... | |
template<class element , class hashkeys > | |
hashedset< element, hashkeys > & | chomp::homology::operator+= (hashedset< element, hashkeys > &s, const hashedset< element, hashkeys > &u) |
Operator += adds one hashed set to another. More... | |
template<class element , class hashkeys > | |
hashedset< element, hashkeys > & | chomp::homology::operator-= (hashedset< element, hashkeys > &s, const hashedset< element, hashkeys > &u) |
Operator -= removes the contents of one set from another. More... | |
template<class domelement , class imgelement > | |
hashedset< imgelement > & | chomp::homology::retrieveimage (const mvmap< domelement, imgelement > &m, hashedset< imgelement > &img) |
Adds images of all the elements from the domain of the map to 'img'. More... | |
template<class domelement , class imgelement > | |
hashedset< imgelement > & | chomp::homology::creategraph (const mvmap< domelement, imgelement > &m, hashedset< imgelement > &graph) |
Adds a graph of a multivalued map to the given set. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::readdomain (std::istream &in, hashedset< domelement > &dom, const mvmap< domelement, imgelement > &) |
Reads the domain of a multivalued map. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::readimage (std::istream &in, hashedset< imgelement > &img, const mvmap< domelement, imgelement > &) |
Reads the image of a multivalued map. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::readselective (std::istream &in, mvmap< domelement, imgelement > &m, const hashedset< domelement > &dom1, const hashedset< domelement > &dom2) |
Reads a restriction of a multivalued map to the union of the given sets. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::readrestriction (std::istream &in, mvmap< domelement, imgelement > &m, const hashedset< domelement > &dom, const hashedset< imgelement > &img) |
Reads a restriction of a multivalued map to the two given sets. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::readselective (std::istream &in, mvmap< domelement, imgelement > &m, const hashedset< domelement > &dom) |
Reads a restriction of a multivalued map to the given set. More... | |
template<class domelement , class imgelement > | |
std::ostream & | chomp::homology::operator<< (std::ostream &out, const mvmap< domelement, imgelement > &m) |
Writes a multivalued map to the output stream. More... | |
template<class domelement , class imgelement > | |
std::istream & | chomp::homology::operator>> (std::istream &in, mvmap< domelement, imgelement > &m) |
Reads a multivalued map from an input stream. More... | |
This file contains the definition of the container "hashedset" which can be used to represent a set of elements of arbitrary type.
Hashing tables are used to access the elements in an efficient way.
Based on the container "hashedset", the container "mvmap" is also defined. It represents a multivalued map which maps each element in its domain to a set of elements contained in its codomain.
Definition in file hashsets.h.
#define LARGE_SIZE false |
This constant passed to the function 'write' makes the hashed set be displayed in a way that is appropriate for large sets: each element is displayed in a separate line, and the elements are preceded by a comment in which the number of elements is indicated and hashing statistics are written.
Definition at line 820 of file hashsets.h.
#define SMALL_SIZE true |
This constant passed to the function 'write' makes the hashed set be displayed in a way that is appropriate for small sets: the entire set is enclosed in braces, and elements are written on one line separated by commas.
Definition at line 813 of file hashsets.h.