The Original CHomP Software
|
This namespace contains the core of the homology computation procedures and related classes and templates contained in the CHomP C++ library. More...
Namespaces | |
namespace | reduction0 |
namespace | reduction1 |
Classes | |
class | Acyclic1d |
This class defines a procedure for verifying if a full-cubical neighborhood in a given set of a full cube of dimension 1 is acyclic. More... | |
class | Acyclic2d |
This class defines a procedure for verifying if a full-cubical neighborhood in a given set of a full cube of dimension 2 is acyclic. More... | |
class | Acyclic3d |
This class defines a procedure for verifying if a full-cubical neighborhood in a given set of a full cube of dimension 3 is acyclic. More... | |
class | argelement |
This is a helper class which defines common properties of a command-line argument bound with any type of a variable. More... | |
class | argflags |
This is a helper class which defines specific flags indicating various types of command-line arguments and the state of interpreting them. More... | |
class | arguments |
The objects of this class gather the expected command-line arguments and decode them. More... | |
class | argunit |
This is a helper class which defines one command-line argument which is bound with some specific variable. More... | |
class | auto_array |
An auto_array template that mimics selected behaviors of the std::auto_ptr template, but releases the memory with delete[], and thus should be applied to arrays. More... | |
class | bincube |
A binary n-dimensional hypercube for storing cubes as bits. More... | |
class | BitField |
This class defines a bit field that is part of some larger array or that uses an allocated piece of memory. More... | |
class | BitFields |
This class defines a simple table of bit fields with very limited functionality that is used for storing the information on the verified combinations of cubes' neighbors. More... | |
class | BitSets |
This class uses bit representation to store many small sets. More... | |
class | bmpfile |
The class 'bmpfile' is an elementary interface that can be used to read or create and write images in the uncompressed Windows BMP format. More... | |
class | BufferedMapClass |
This class is a wrapper for a map that computes the image of a cube as a rectangular box (i.e., using the interval arithmetic). More... | |
class | chain |
This class defines objects which represent chains as finite sequences of elements identified by integral numbers with coefficients in a given Euclidean domain. More... | |
class | chaincomplex |
This is an implementation of a chain complex over an arbitrary ring. More... | |
class | chainmap |
This class defines a chain map between two chain complexes. More... | |
class | ColorPalette |
Provides a palette of distinct RGB colors. More... | |
class | diGraph |
This class defines a directed graph with very limited number of operations, and a few specific algorithms implemented on it, like DFS. More... | |
class | dummyArray |
A dummy array of integers that ignores all the assigned values. More... | |
class | dummyRounding |
A dummy class for rounding operations which does not actually do any rounding. More... | |
class | FibonacciHeap |
This template contains the definition of a Fibonacci heap that can be used as an efficient priority queue, for example, in the Dijxtra graph algorithm. More... | |
class | FixDimBitmap |
A fixed-dimensional bitmap of the size 2^n in each direction. More... | |
class | flatMatrix |
This class defines a simple data structure for a flat 2-dim square matrix whose entries are stored in a single array. More... | |
class | gcomplex |
The class that defines a geometric complex - a set of cells (cubes, simplices, etc). More... | |
class | hashedset |
This is a template for a set of objects of the given type. More... | |
class | HashingGlobal |
A hashing method using globally defined functions that calculate the two required hashing keys. More... | |
class | HashingMember |
A hashing method using member functions that calculate the two required hashing keys. More... | |
class | hashNumber |
A class of numbers that can be used in a hashed set. More... | |
class | hashstat |
This is a small class used to gather and display hashing statistics for the hashing tables in the class "hashedset". More... | |
class | integer |
This class defines integer numbers with overflow control and with some specific properties of an Euclidean domain. More... | |
class | local_var |
Local variable guardian. More... | |
class | MapCanExpand |
A class for the procecure checking if the image of a given map can be expanded without any harm to the homology of the codomain when a given full cube is moved from X\A to A in the domain during the expansion procedure conducted in the domain. More... | |
class | MapCanExpandDummy |
A dummy class that substitutes MapCanExpand if there is no map to check, so the verification always results in an approval. More... | |
class | MapClass |
This is a general map class that may be inherited by your particular class that computes a map. More... | |
class | MapRemainsAcyclic |
A wrapper class for the procecure checking if a given map remains acyclic when a given full cube is removed from its domain during the reduction of this domain. More... | |
class | matrices |
class | mmatrix |
A class for representing sparse matrices containing elements of the 'euclidom' type. More... | |
class | multitable |
A container for elements placed in a table (like a vector) that is actually built of many smaller tables. More... | |
class | mvcellmap |
This class represents a multivalued map whose domain is a geometric complex. More... | |
class | mvmap |
This class defines a multivalued map. More... | |
class | Neighbors |
The neighborhood of a cube in a set of cubes. More... | |
class | NeighborsBdd |
This is a class used by the classes "Acyclic1d", "Acyclic2d", and "Acyclic3d" to use binary decision diagrams for the verification if a cubical neighborhood of a cube in the class "bincube" is acyclic. More... | |
class | outputstream |
This class defines an output stream for replacing the standard 'cout'. More... | |
class | pool |
This template contains the definition of a pool of elements that are stored in an extensible table. More... | |
class | Power |
This is a helper class which makes the compiler compute n^k during the compilation of the program. More... | |
class | Power< number, 0 > |
This is a specialization which defines n^0, necessary to stop the recursion defined in the "Power" template. More... | |
class | PredecessorsCycle |
A helper class for determining a cycle that realizes the minimum. More... | |
struct | PredecessorsIgnore |
A helper class for ignoring predecessor information. More... | |
class | primeint |
This is a simple class which is a wrapper for computing the smallest prime number greater or equal to the given integer. More... | |
class | psethashstat |
This is a small class used only to collect and display statistics on how successful the hashing procedures were. More... | |
class | SetOfBitFields |
This class defines a set of bit fields of the same length which are to be stored in a contiguous piece of memory to avoid multiple memory allocation/deallocation. More... | |
class | SetOfFullCubes |
This is an abstract class which defines a set of full cubes represented as a bitmap for the purpose of the class "bincube". More... | |
class | setunion |
A union of two hashed sets. More... | |
class | simplelist |
This class defines a simple list of pointers to objects of the given type. More... | |
class | Simplex |
This class defines a simplex as a geometric cell that can be used as a member of a geometric complex. More... | |
class | Tabulated |
A class for storing tabulated configurations of neighbors for various dimensions. More... | |
class | tCell2l |
A general cubical cell with additional information about the layer number. More... | |
class | tCellBase |
This class defines cubical cell in R^n with edges parallel to the axes and with size 0 or 1 in each direction. More... | |
class | tCellFix |
This class defines cubical cell in R^n with edges parallel to the axes and with size 0 or 1 in each direction. More... | |
class | tCellVar |
This class defines cubical cell in R^n with edges parallel to the axes and with size 0 or 1 in each direction. More... | |
class | tCube2l |
A (hyper)cube with additional information about the layer number. More... | |
class | tCubeBase |
This class defines a hypercube in R^n with edges parallel to the axes and with size 1 in each direction. More... | |
class | tCubeFix |
This class defines a hypercube in R^n with edges parallel to the axes and with size 1 in each direction. More... | |
class | tCubeVar |
This class defines a hypercube in R^n with edges parallel to the axes and with size 1 in each direction. More... | |
class | textfile |
A class for reading text data from a text file. More... | |
class | timeused |
A class that stores the time at which it was initialized and then returns or displays the time used since the initialization. More... | |
class | tNeighbors |
This class can be used for iterating point's neighbors. More... | |
class | tPointBase |
This class keeps a common set of points which are indexed for the use of other classes, like cubes or cubical cells. More... | |
class | tPointBaseInitializer |
This class is used to deallocate memory kept in the static variables of the corresponding class "tPointBase" upon program exit, and also to show the information on how many points were in use. More... | |
class | tPointset |
This class represents a set of points in R^n with integer coordinates. More... | |
class | tRectangle |
This class can be used for iterating a rectangular set of points, given its left and right bound. More... | |
class | tWrapBase |
This class is a simplified version of the point base class used only for the space wrapping support. More... | |
class | word |
A word, that is, a string with very few properties. More... | |
Typedefs | |
typedef hashedset< hashNumber< int > > | hashIntQueue |
typedef tCellBase< coordinate > | CubicalCell |
The default type of a cubical cell. More... | |
typedef CubicalCell | ElementaryCell |
An alternative name for a cubical cell. More... | |
typedef hashedset< CubicalCell > | SetOfCubicalCells |
The default type of a set of cubical cells. More... | |
typedef gcomplex< CubicalCell, integer > | CubicalComplex |
The default type of a cubical complex. More... | |
typedef mvcellmap< CubicalCell, integer, CubicalCell > | CubicalMultivaluedMap |
The default type of a cubical multivalued map. More... | |
typedef CubicalCell | qcell |
An abbreviation for a cubical cell [deprecated]. More... | |
typedef SetOfCubicalCells | qcells |
An abbreviation for a set of cubical cell [deprecated]. More... | |
typedef CubicalComplex | cubicalcomplex |
An abbreviation for a cubical complex [deprecated]. More... | |
typedef tCubeBase< coordinate > | Cube |
The default cube type. More... | |
typedef Cube | FullCube |
An alternative name for a cube. More... | |
typedef Cube | HyperCube |
An alternative name for a cube. More... | |
typedef hashedset< Cube > | SetOfCubes |
The default type of a set of cubes. More... | |
typedef mvmap< Cube, Cube > | CombinatorialMultivaluedMap |
The default type of a combinatorial cubical multivalued map. More... | |
typedef Cube | cube |
A lower-case name of a cube [deprecated]. More... | |
typedef SetOfCubes | cubes |
An abbreviation for a set of cubes [deprecated]. More... | |
typedef CombinatorialMultivaluedMap | CubicalMap |
An abbreviation for a combinatorial cubical multivalued map. More... | |
typedef CombinatorialMultivaluedMap | cubicalmap |
A lower-case version of the name of a combinatorial cubical multivalued map [deprecated]. More... | |
typedef tPointBase< coordinate > | PointBase |
The default type of the point base class. More... | |
typedef short int | coordinate |
The default type of coordinates. More... | |
typedef tPointset< coordinate > | pointset |
The pointset class with the default type of coordinates. More... | |
typedef tNeighbors< coordinate > | neighbors |
The neighbors class with the default type of coordinates. More... | |
typedef tRectangle< coordinate > | rectangle |
The rectangle class with the default type of coordinates. More... | |
typedef short int | theLayerType |
The type of the layer variable. More... | |
typedef tCube2l< tCubeBase< coordinate > > | Cube2l |
A typical full cube in the two-layer setting. More... | |
typedef tCell2l< tCellBase< coordinate > > | CubicalCell2l |
A typical cubical cell in the two-layer setting. More... | |
typedef mvmap< Cube2l, Cube2l > | CombinatorialMultivaluedMap2l |
A typical multivalued map on full cubes in the two-layer setting. More... | |
typedef hashedset< Cube2l > | SetOfCubes2l |
A typical set of full cubes in the two-layer setting. More... | |
typedef hashedset< CubicalCell2l > | SetOfCubicalCells2l |
A typical set of cubical cells in the two-layer setting. More... | |
typedef gcomplex< CubicalCell2l, integer > | CubicalComplex2l |
A typical cubical complex in the two-layer setting. More... | |
typedef mvcellmap< CubicalCell2l, integer, CubicalCell2l > | CubicalMultivaluedMap2l |
A typical multivalued cubical-cellular map in the two-layer setting. More... | |
typedef chaincomplex< integer > | ChainComplex |
A class for representing a chain complex with integral coefficients. More... | |
typedef chainmap< integer > | ChainMap |
A class for representing a chain map with integral coefficients. More... | |
typedef chain< integer > | Chain |
A class for representing a chain with integral coefficients. More... | |
typedef hashedset< simplex > | SetOfSimplices |
A class for representing a set of simplices. More... | |
typedef gcomplex< simplex, integer > | SimplicialComplex |
A class for representing a simplicial complex. More... | |
typedef Simplex | simplex |
A lower-case name for a simplex [deprecated]. More... | |
typedef gcomplex< simplex, integer > | simplicialcomplex |
A lower-case name for a simplicial complex [deprecated]. More... | |
typedef hashedset< simplex > | simplices |
An alternative name for a set of simplices [deprecated]. More... | |
typedef BitField | bitfield |
A lower-case version of the name of a bit field [deprecated]. More... | |
typedef SetOfBitFields | bitfieldset |
A lower-case version of the name of a bit field set [deprecated]. More... | |
typedef signed short | numbertype |
The type of number used to store the value of an object of type "integer". More... | |
typedef hashedset< word > | words |
The default type of a set of words. More... | |
Functions | |
template<class coordinate > | |
void | bit2neighborAlg (int number, const coordinate *src, coordinate *dest, int Dim) |
template<class settype > | |
settype::iterator | bit2neighborAlg (const typename settype::iterator &q, int n) |
template<int Dim, int twoPower> | |
bool | operator== (const typename bincube< Dim, twoPower >::neighborhood_iterator &x1, const typename bincube< Dim, twoPower >::neighborhood_iterator &x2) |
template<int Dim, int twoPower> | |
bool | operator!= (const typename bincube< Dim, twoPower >::neighborhood_iterator &x1, const typename bincube< Dim, twoPower >::neighborhood_iterator &x2) |
template<int Dim, int twoPower> | |
std::ostream & | operator<< (std::ostream &out, const bincube< Dim, twoPower > &b) |
template<int Dim, int twoPower> | |
std::istream & | operator>> (std::istream &in, bincube< Dim, twoPower > &b) |
template<class Number > | |
int_t | hashkey1 (const hashNumber< Number > &n) |
The first hashing key. More... | |
template<class Number > | |
int_t | hashkey2 (const hashNumber< Number > &n) |
The second hashing key. More... | |
template<class SetT , class QueueT > | |
void | addneighbors (const int &c, const SetT &s, QueueT &q) |
Adds the neighbors of the cube 'c' in the set 's' to the set 'q'. More... | |
template<typename SetT , typename Acyclic , typename QueueT > | |
int | reduceFullCubesAlg (SetT &X, bool quiet) |
Reduces the set of full cubes. More... | |
template<class FullCubSet > | |
int | reduceFullCubes (FullCubSet &X, bool quiet=false) |
Reduces the set of full cubes. More... | |
int | readbitpoints (std::istream &in, pointset &p, int *bitcode_depth=NULL) |
Reads a set of full cubical sets represented as a set of points from a file encoded in the "bitcode" format used by Bill Kalies. More... | |
int | writebitpoints (std::ostream &out, pointset &p, bool sorted=true, int fixed_depth=0, coordinate *fixed_corner=NULL) |
Writes a full cubical set represented by a set of points to a file in the "bitcode" format. More... | |
template<class coordtype > | |
int_t | hashkey1 (const tCellBase< coordtype > &c) |
template<class coordtype > | |
int_t | hashkey2 (const tCellBase< coordtype > &c) |
template<class coordtype > | |
int | operator!= (const tCellBase< coordtype > &c1, const tCellBase< coordtype > &c2) |
Checks if the two cells are different. More... | |
template<class coordtype > | |
tCellBase< coordtype > | operator* (const tCellBase< coordtype > &c1, const tCellBase< coordtype > &c2) |
Computes the Cartesian product of two cells. More... | |
template<class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCellBase< coordtype > &c) |
Writes a cell to an output stream. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, tCellBase< coordtype > &c) |
Reads a cell from an input stream. More... | |
template<class coordtype > | |
tCellBase< coordtype > | boundarycell (const tCellBase< coordtype > &q, int i, bool onlyexisting) |
Computes the i-th boundary element of a cell. More... | |
template<class coordtype > | |
tCellBase< coordtype > | boundarycell (const tCellBase< coordtype > &q, int i) |
Computes the i-th boundary element of a cell. More... | |
template<class coordtype > | |
int | boundarylength (const tCellBase< coordtype > &q) |
Returns the length of the boundary of a cell. More... | |
template<class coordtype > | |
int | boundarycoef (const tCellBase< coordtype > &q, int i) |
Returns the i-th coefficient in the boundary of a cell. More... | |
template<int dimfix, class coordtype > | |
int_t | hashkey1 (const tCellFix< dimfix, coordtype > &c) |
template<int dimfix, class coordtype > | |
int_t | hashkey2 (const tCellFix< dimfix, coordtype > &c) |
template<int dimfix, class coordtype > | |
int | operator!= (const tCellFix< dimfix, coordtype > &c1, const tCellFix< dimfix, coordtype > &c2) |
Checks if the two cells are different. More... | |
template<int dim1, int dim2, class coordtype > | |
tCellFix< dim1+dim2, coordtype > | operator* (const tCellFix< dim1, coordtype > &c1, const tCellFix< dim2, coordtype > &c2) |
Computes the Cartesian product of two cells. More... | |
template<int dimfix, class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCellFix< dimfix, coordtype > &c) |
Writes a cell to an output stream. More... | |
template<int dimfix, class coordtype > | |
std::istream & | operator>> (std::istream &in, tCellFix< dimfix, coordtype > &c) |
Reads a cell from an input stream. More... | |
template<int dimfix, class coordtype > | |
tCellFix< dimfix, coordtype > | boundarycell (const tCellFix< dimfix, coordtype > &q, int i, bool onlyexisting) |
Computes the i-th boundary element of a cell. More... | |
template<int dimfix, class coordtype > | |
tCellFix< dimfix, coordtype > | boundarycell (const tCellFix< dimfix, coordtype > &q, int i) |
Computes the i-th boundary element of a cell. More... | |
template<int dimfix, class coordtype > | |
int | boundarylength (const tCellFix< dimfix, coordtype > &q) |
Returns the length of the boundary of a cell. More... | |
template<int dimfix, class coordtype > | |
int | boundarycoef (const tCellFix< dimfix, coordtype > &q, int i) |
Returns the i-th coefficient in the boundary of a cell. More... | |
template<class celltype > | |
celltype | CubicalBoundaryCell (const celltype &q, int i, bool onlyexisting) |
Returns the i-th boundary element of a cell. More... | |
template<class celltype > | |
celltype | CubicalBoundaryCell (const celltype &q, int i) |
Returns the i-th cell in the boundary of the given cell. More... | |
template<class celltype > | |
int | CubicalBoundaryLength (const celltype &q) |
Returns the length of the boundary of a cubical cell. More... | |
template<class celltype > | |
int | CubicalBoundaryCoef (const celltype &q, int i) |
Returns the i-th coefficient in the boundary of a cubical cell. More... | |
template<class celltype > | |
std::ostream & | WriteCubicalCell (std::ostream &out, const celltype &c) |
Writes a cubical cell to the output stream in the text form. More... | |
template<class celltype > | |
std::istream & | ReadCubicalCell (std::istream &in, celltype &c) |
Reads a cubical cell form the input text stream. More... | |
template<class coordtype > | |
int | CommonCell (coordtype *left, coordtype *right, const coordtype *c1, const coordtype *c2, int spcdim, const coordtype *wrap=0) |
Computes the left and right corner of a cell which is the intersection of the two given cubes. More... | |
template<class coordtype > | |
int_t | hashkey1 (const tCellVar< coordtype > &c) |
template<class coordtype > | |
int_t | hashkey2 (const tCellVar< coordtype > &c) |
template<class coordtype > | |
int | operator!= (const tCellVar< coordtype > &c1, const tCellVar< coordtype > &c2) |
Checks if the two cells are different. More... | |
template<class coordtype > | |
tCellVar< coordtype > | operator* (const tCellVar< coordtype > &c1, const tCellVar< coordtype > &c2) |
Computes the Cartesian product of two cells. More... | |
template<class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCellVar< coordtype > &c) |
Writes a cell to an output stream. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, tCellVar< coordtype > &c) |
Reads a cell from an input stream. More... | |
template<class coordtype > | |
tCellVar< coordtype > | boundarycell (const tCellVar< coordtype > &q, int i, bool onlyexisting) |
Computes the i-th boundary element of a cell. More... | |
template<class coordtype > | |
tCellVar< coordtype > | boundarycell (const tCellVar< coordtype > &q, int i) |
Computes the i-th boundary element of a cell. More... | |
template<class coordtype > | |
int | boundarylength (const tCellVar< coordtype > &q) |
Returns the length of the boundary of a cell. More... | |
template<class coordtype > | |
int | boundarycoef (const tCellVar< coordtype > &q, int i) |
Returns the i-th coefficient in the boundary of a cell. More... | |
template<class coordtype > | |
int_t | hashkey1 (const tCubeBase< coordtype > &c) |
template<class coordtype > | |
int_t | hashkey2 (const tCubeBase< coordtype > &c) |
template<class coordtype > | |
int | operator!= (const tCubeBase< coordtype > &c1, const tCubeBase< coordtype > &c2) |
The operator != for comparing full cubes. More... | |
template<class coordtype > | |
tCubeBase< coordtype > | operator* (const tCubeBase< coordtype > &c1, const tCubeBase< coordtype > &c2) |
Computes the Cartesian product of two cubes. More... | |
template<class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCubeBase< coordtype > &c) |
Writes a cube to an output stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, tCubeBase< coordtype > &c) |
Reads a cube from an input stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, hashedset< tCubeBase< coordtype > > &s) |
Reads a set of cubes from an input stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, mvmap< tCubeBase< coordtype >, tCubeBase< coordtype > > &m) |
Reads a cubical map from an input stream in the text mode. More... | |
template<int dimfix, class coordtype > | |
int_t | hashkey1 (const tCubeFix< dimfix, coordtype > &c) |
template<int dimfix, class coordtype > | |
int_t | hashkey2 (const tCubeFix< dimfix, coordtype > &c) |
template<int dim1, int dim2, class coordtype > | |
int | operator!= (const tCubeFix< dim1, coordtype > &c1, const tCubeFix< dim2, coordtype > &c2) |
The operator != for comparing full cubes. More... | |
template<int dim1, int dim2, class coordtype > | |
tCubeFix< dim1+dim2, coordtype > | operator* (const tCubeFix< dim1, coordtype > &c1, const tCubeFix< dim2, coordtype > &c2) |
Computes the Cartesian product of two cubes. More... | |
template<int dimfix, class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCubeFix< dimfix, coordtype > &c) |
Writes a cube to an output stream in the text mode. More... | |
template<int dimfix, class coordtype > | |
std::istream & | operator>> (std::istream &in, tCubeFix< dimfix, coordtype > &c) |
Reads a cube from an input stream in the text mode. More... | |
template<int dimfix, class coordtype > | |
std::istream & | operator>> (std::istream &in, hashedset< tCubeFix< dimfix, coordtype > > &s) |
Reads a set of cubes from an input stream in the text mode. More... | |
template<int dimfix, class coordtype > | |
std::istream & | operator>> (std::istream &in, mvmap< tCubeFix< dimfix, coordtype >, tCubeFix< dimfix, coordtype > > &m) |
Reads a cubical map from an input stream in the text mode. More... | |
template<class dest_cube , class src_cube > | |
dest_cube | cube_cast (const src_cube &src) |
Converts one cube into another. More... | |
template<class cubetype > | |
std::ostream & | WriteCube (std::ostream &out, const cubetype &c) |
Writes a cube to the output stream in the text mode. More... | |
template<class cubetype > | |
std::istream & | ReadCubeFix (std::istream &in, cubetype &c, int dimfix) |
Reads a cube from the input text stream. More... | |
template<class cubetype > | |
std::istream & | ReadCube (std::istream &in, cubetype &c) |
Reads a cube from the input text stream. More... | |
template<class cubsettype > | |
std::istream & | ReadCubes (std::istream &in, cubsettype &s) |
Reads a set of cubes and ignores the line at the beginning of the file which starts with the letter 'd' (like "dimension 2"). More... | |
template<class tCube > | |
std::istream & | ReadCubicalMap (std::istream &in, mvmap< tCube, tCube > &m) |
Reads a combinatorial cubical multivalued map from an input text stream. More... | |
template<class coordtype > | |
int_t | hashkey1 (const tCubeVar< coordtype > &c) |
template<class coordtype > | |
int_t | hashkey2 (const tCubeVar< coordtype > &c) |
template<class coordtype > | |
int | operator!= (const tCubeVar< coordtype > &c1, const tCubeVar< coordtype > &c2) |
The operator != for comparing full cubes. More... | |
template<class coordtype > | |
tCubeVar< coordtype > | operator* (const tCubeVar< coordtype > &c1, const tCubeVar< coordtype > &c2) |
Computes the Cartesian product of two cubes. More... | |
template<class coordtype > | |
std::ostream & | operator<< (std::ostream &out, const tCubeVar< coordtype > &c) |
Writes a cube to an output stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, tCubeVar< coordtype > &c) |
Reads a cube from an input stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, hashedset< tCubeVar< coordtype > > &s) |
Reads a set of cubes from an input stream in the text mode. More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, mvmap< tCubeVar< coordtype >, tCubeVar< coordtype > > &m) |
Reads a cubical map from an input stream in the text mode. More... | |
template<class euclidom , class tCell > | |
std::ostream & | writegenerators (std::ostream &out, const chain< euclidom > *hom, const chaincomplex< euclidom > &c, const gcomplex< tCell, euclidom > &g, const int *level, int xdim, int format=0) |
Writes projected homology generators of a cubical complex to a file. More... | |
template<class euclidom , class tCell , class tCube > | |
int_t | createimages (mvcellmap< tCell, euclidom, tCube > &m, const mvmap< tCube, tCube > &f1, const mvmap< tCube, tCube > &f2, const hashedset< tCube > &dom1, const hashedset< tCube > &dom2) |
Creates images of cells in 'm' as unions of cubes determined by f1 and f2. More... | |
template<class euclidom , class tCell , class tCube > | |
int_t | createimages (mvcellmap< tCell, euclidom, tCube > &m, const mvmap< tCube, tCube > &f, const hashedset< tCube > &dom) |
A wrapper for the above function if there is only one map. More... | |
template<class euclidom , class tCell , class tCube > | |
int_t | createimages (mvcellmap< tCell, euclidom, tCube > &m, const mvmap< tCube, tCube > &f1, const mvmap< tCube, tCube > &f2) |
Creates images of cells in m as unions of cubes determined by f1 and f2. More... | |
template<class euclidom , class tCell , class tCube > | |
int_t | createimages (mvcellmap< tCell, euclidom, tCube > &m, const mvmap< tCube, tCube > &f) |
A wrapper for the above function if there is only one map. More... | |
template<class euclidom , class tCell > | |
void | createprojection (const gcomplex< tCell, euclidom > &Fcompl, const gcomplex< tCell, euclidom > &Ycompl, chainmap< euclidom > &cmap, int offset, int outdim, int discarddim, int *level=NULL) |
Creates the chain map of the projection from a cell complex of the graph of a map to a cell complex of the codomain of the map. More... | |
template<class euclidom , class tCell > | |
void | project (const gcomplex< tCell, euclidom > &c, gcomplex< tCell, euclidom > &img, const gcomplex< tCell, euclidom > &only, int offset, int outdim, int discarddim, const int *level, bool watchforimages) |
Creates the image of the projection from the set of cubical cells in the given geometric complex to the subspace of R^n spanned by the 'outdim' subsequent standard vectors with the first number 'offset'. More... | |
template<class tCube > | |
std::istream & | readdomain (std::istream &in, hashedset< tCube > &dom) |
Reads the domain of a multivalued cubical map. More... | |
template<class tCube > | |
std::istream & | readimage (std::istream &in, hashedset< tCube > &img) |
Reads the image of a multivalued cubical map. More... | |
template<class tCube > | |
std::istream & | readimage (std::istream &in, const hashedset< tCube > &dom, hashedset< tCube > &img) |
Read the image of a set under a multivalued cubical map. More... | |
template<class tCube > | |
std::istream & | readselective (std::istream &in, const hashedset< tCube > &dom1, const hashedset< tCube > &dom2, mvmap< tCube, tCube > &m) |
Reads the restriction of a multivalued map to the given pair of sets. More... | |
template<class tCube > | |
std::istream & | readselective (std::istream &in, const hashedset< tCube > &dom, mvmap< tCube, tCube > &m) |
Reads a restriction of a multivalued cubical map to the given set. More... | |
int_t | getmaxneighbors (int dim) |
Returns the maximal number of neighbors of a cube: 3^dim - 1. More... | |
template<class tCube > | |
int_t | neighbor2bit (const tCube &q, const tCube &neighbor) |
Returns the number of the neighbor bit for the given neighbor of 'q' or -1 if not a neighbor or the same cube as 'q'. More... | |
template<class tCube > | |
int_t | neighbor2bit (const tCube &q, const typename tCube::CellType &face) |
Returns the number of the neighbor bit for the neighbor which intersects the given cube at the face provided. More... | |
template<class tCube > | |
tCube | bit2neighbor (const tCube &q, int_t number, bool unconditional=false) |
Creates the neighbor of the given cube with the specified number. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
int_t | getneighbors_scan (const tCube &q, BitField *bits, const tCubeSet1 &theset, tCubeSet2 *neighbors, int_t limit) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
int_t | getneighbors_generate (const tCube &q, BitField *bits, const tCubeSet1 &theset, tCubeSet2 *neighbors, int_t limit) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
int_t | getneighbors (const tCube &q, BitField *bits, const tCubeSet1 &theset, tCubeSet2 *neighbors, int_t limit) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided. More... | |
template<class tCube , class tCubeSet > | |
int_t | getneighbors (const tCube &q, BitField *bits, const tCubeSet &theset, int_t limit) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided. More... | |
template<class tCube , class tCubeSet > | |
int_t | addneighbors (const tCube &q, const BitField &bits, tCubeSet &set, const tCubeSet ¬these) |
Adds neighbors listed in the given bit field to the set of cubes unless they are in the 'forbidden' set. More... | |
template<class tCube , class tCubeSet > | |
int_t | addneighbors (const tCube &q, const BitField &bits, tCubeSet &set, bool unconditional=false) |
Adds neighbors listed in the given bit field to the set of cubes. More... | |
template<class tCube , class tCell > | |
int_t | addneighbors (const tCube &q, const BitField &bits, gcomplex< tCell, integer > &c, bool unconditional=false) |
Adds intersections of neighbors listed in the given bit field with the given cube to the cubical complex. More... | |
template<class coordtype > | |
int | thesame (const coordtype *c1, const coordtype *c2, int dim) |
Compare two points. Returns true iff they have the same coordinates. More... | |
template<class coordtype > | |
void | copycoord (coordtype *destination, const coordtype *source, int dim) |
Copies the coordinates of one point to another. More... | |
template<class coordtype > | |
void | wrapcoord (coordtype *destination, const coordtype *source, const coordtype *wrap, int dim) |
Wraps coordinates stored in 'c' accordint to the wrap table 'wrap' and store the result in the table called 'result'. More... | |
template<> | |
void | wrapcoord< double > (double *destination, const double *source, const double *wrap, int dim) |
Wraps coordinates stored in 'c' accordint to the wrap table 'wrap' and store the result in the table called 'result'. More... | |
bool | numberisprime (unsigned n) |
Verifies if the given number is a prime number. More... | |
unsigned | ceilprimenumber (unsigned n) |
Computes the smallest prime number greater than or equal to the given number. More... | |
template<class coordtype > | |
int_t | pointhashkey (const coordtype *c, int dim, int_t hashsize) |
Generates the main hashing key for points. More... | |
template<class coordtype > | |
int_t | pointhashadd (const coordtype *c, int dim, int_t hashsize) |
Generates the second hashing key for points. More... | |
template<class coordtype > | |
coordtype | rounddown (double x) |
Rounds down the given real number to an integral type. More... | |
template<class coordtype > | |
void | roundpoint (const double *p, coordtype *c, const double *grid, int dim) |
Rounds down the double coordinates of a point to integer ones. More... | |
template<class coordtype > | |
void | cubemiddle (coordtype *c, double *p, double *grid, int dim) |
Computes the middle of a cube with its left lower etc. More... | |
template<class coordtype > | |
coordtype * | allocatepoint (int dim, char *errormessage=NULL) |
Allocate a point with 'new'. In case of failure throw an error message. More... | |
template<class coordtype > | |
int | countneighbors (const tPointset< coordtype > &p, const coordtype *c, int which=1, int maxcount=0) |
Counts how many neighbors of the point there are in the set, depending on 'which': 1 = in the set, 0 = out of the set. More... | |
template<class coordtype > | |
int | countneighbors (const tPointset< coordtype > &p, const tPointset< coordtype > &q, const coordtype *c, int which=1, int maxcount=0) |
Counts neighbors with respect to the union of the sets 'p' and 'q'. More... | |
template<class coordtype > | |
int | attheborder (const tPointset< coordtype > &p, const coordtype *c) |
Verifies if the point is at the border of a given set. More... | |
template<class coordtype > | |
int_t | findboundarypoint (tPointset< coordtype > &p, int_t n, int direction=1) |
Finds a boundary point starting at the given one. More... | |
template<class coordtype > | |
int_t | findboundarypoint (tPointset< coordtype > &p, tPointset< coordtype > &q, int_t n, int direction=1) |
Finds a point in 'p' at the boundary of the union of 'p' and 'q'. More... | |
template<class coordtype > | |
tPointset< coordtype > * | computeboundary (tPointset< coordtype > &p) |
Creates the set of all the boundary points with the 'new' operator. More... | |
template<class coordtype > | |
void | computeboundary (tPointset< coordtype > &p, tPointset< coordtype > &b) |
Computes the boundary points of the given set and adds them to the other set of points. More... | |
template<class coordtype > | |
void | enhancepoint (tPointset< coordtype > &p, coordtype *c) |
Enhances the set by adding the neighborhood of the point with given coordinates. More... | |
template<class coordtype > | |
void | enhancepoint (tPointset< coordtype > &p, int_t n) |
Enhances the set by adding the neighborhood of the point with given number. More... | |
template<class coordtype > | |
void | enhance (tPointset< coordtype > &p) |
Enhances the set of points by adding to it all the neighbors of all the points in the set. More... | |
template<class coordtype > | |
int | read (textfile &f, coordtype *c, int maxdim) |
Reads a point from a text file and removes a pair of parentheses, braces or brackets if present. More... | |
template<class coordtype > | |
int | read (std::istream &in, coordtype *c, int maxdim) |
Reads a point from a text file and removes a pair of parentheses, braces or brackets if present. More... | |
template<class coordtype > | |
int | write (std::ostream &out, const coordtype *c, int dim, char parenthesis=40, char closing=0) |
template<class coordtype > | |
int | readcubeorcell (std::istream &in, coordtype *left, coordtype *right, int maxdim, int *type=NULL) |
Reads a cube or a cell from a text file. More... | |
template<class coordtype > | |
int_t | read (textfile &f, tPointset< coordtype > &p, int_t first=0, int_t howmany=-1, coordtype *wrap=NULL, int maxdim=0, int quiet=0, tPointset< coordtype > *notthese=NULL) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
int_t | read (std::istream &in, tPointset< coordtype > &p, int_t first=0, int_t howmany=-1, coordtype *wrap=NULL, int maxdim=0, int quiet=0, tPointset< coordtype > *notthese=NULL) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
int_t | read (textfile &f, tPointset< coordtype > &p, coordtype *wrap, int maxdim, int quiet=0, tPointset< coordtype > *notthese=NULL) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
int_t | read (std::istream &in, tPointset< coordtype > &p, coordtype *wrap, int maxdim, int quiet=0, tPointset< coordtype > *notthese=NULL) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
textfile & | operator>> (textfile &f, tPointset< coordtype > &p) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
std::istream & | operator>> (std::istream &in, tPointset< coordtype > &p) |
Reads a set of points from an input stream (starting at the point given). More... | |
template<class coordtype > | |
int_t | write (std::ostream &out, tPointset< coordtype > &p, int_t first=0, int_t howmany=-1, int quiet=0) |
Writes a set of points to a file (starting at the point given). More... | |
template<class coordtype > | |
std::ostream & | operator<< (std::ostream &out, tPointset< coordtype > &p) |
Writes a set of points to a file (starting at the point given). More... | |
std::ostream & | operator<< (std::ostream &out, const psethashstat &s) |
Writes the information gathered in a hashing statistics collector object to an output stream. More... | |
template<class coordtype > | |
int | countneighbors (const tPointset< coordtype > &p, const tPointset< coordtype > &q, coordtype *c, int which, int maxcount) |
template<class coordtype > | |
void | computeboundary (const tPointset< coordtype > &p, tPointset< coordtype > &b) |
template<class coordtype > | |
int | readcoordinates (std::istream &in, coordtype *coord, int maxdim, int closing) |
Reads the coordinates of a point. More... | |
template<class coordtype > | |
int | readcoordinates (std::istream &in, coordtype *coord, int maxdim) |
template<class tCube > | |
int_t | hashkey1 (const tCube2l< tCube > &c) |
template<class tCube > | |
int_t | hashkey2 (const tCube2l< tCube > &c) |
template<class tCube > | |
int | operator== (const tCube2l< tCube > &c1, const tCube2l< tCube > &c2) |
The operator == verifies if two cubes are equal. More... | |
template<class tCube > | |
int | operator!= (const tCube2l< tCube > &c1, const tCube2l< tCube > &c2) |
The operator != verifies whether two cubes are different. More... | |
template<class tCube > | |
tCube2l< tCube > | operator* (const tCube2l< tCube > &c1, const tCube2l< tCube > &c2) |
The operator * computes the Cartesian product of two cubes. More... | |
template<class tCube > | |
std::ostream & | operator<< (std::ostream &out, const tCube2l< tCube > &c) |
The operator << writes a cube to the output stream in the text mode. More... | |
template<class tCube > | |
std::istream & | operator>> (std::istream &in, tCube2l< tCube > &c) |
The operator >> reads a cube from the input stream in the text mode. More... | |
template<class tCube > | |
std::istream & | operator>> (std::istream &in, hashedset< tCube2l< tCube > > &s) |
A specialized version of the operator >> for reading a set of cubes and ignores the first line "dimension N". More... | |
template<class tCube > | |
std::istream & | operator>> (std::istream &in, mvmap< tCube2l< tCube >, tCube2l< tCube > > &m) |
A specialized version of the operator >> that reads a combinatorial cubical multivalued map. More... | |
template<class tCell > | |
int_t | hashkey1 (const tCell2l< tCell > &c) |
template<class tCell > | |
int_t | hashkey2 (const tCell2l< tCell > &c) |
template<class tCell > | |
int | operator== (const tCell2l< tCell > &c1, const tCell2l< tCell > &c2) |
The operator == verifies if two cells are equal. More... | |
template<class tCell > | |
int | operator!= (const tCell2l< tCell > &c1, const tCell2l< tCell > &c2) |
The operator != verifies whether two cubes are different. More... | |
template<class tCell > | |
tCell2l< tCell > | operator* (const tCell2l< tCell > &c1, const tCell2l< tCell > &c2) |
The operator * computes the Cartesian product of two cells. More... | |
template<class tCell > | |
std::ostream & | operator<< (std::ostream &out, const tCell2l< tCell > &c) |
The operator << writes a cubical cell to the text output stream. More... | |
template<class tCell > | |
std::istream & | operator>> (std::istream &in, tCell2l< tCell > &c) |
The operator >> reads a cubical cell from the text input stream. More... | |
template<class tCell > | |
tCell2l< tCell > | boundarycell (const tCell2l< tCell > &q, int i, bool onlyexisting) |
Computes the given boundary element of a cell. More... | |
template<class tCell > | |
tCell2l< tCell > | boundarycell (const tCell2l< tCell > &q, int i) |
Computes the given boundary element of a cell. More... | |
template<class tCell > | |
int | boundarylength (const tCell2l< tCell > &q) |
Returns the length of the boundary of a cell. More... | |
template<class tCell > | |
int | boundarycoef (const tCell2l< tCell > &q, int i) |
Returns the given coefficient in the boundary of a cell. More... | |
template<class tCube > | |
tCube2l< tCube > | bit2neighbor (const tCube2l< tCube > &q, int_t number, bool unconditional=false) |
Specialization of the "bit2neighbor" function for two-layer cubes. More... | |
template<class tCube > | |
int_t | neighbor2bit (const tCube2l< tCube > &q, const tCube2l< tCube > &neighbor) |
Specialization of the "neighbor2bit" function for two-layer cubes. More... | |
template<class tCube > | |
bool | intersection2l (const tCube &q0, const tCube &q1, BitField *bits) |
Computes the intersection between two cubes at different layers. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
int_t | getneighbors_scan (const tCube2l< tCube > &q2l, BitField *bits, const tCubeSet1 &theset, tCubeSet2 *neighbors, int_t limit) |
Specialization of the function which gets neighbors of the given cube by scanning the entire set of possible neighbors. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
int_t | getneighbors_generate (const tCube2l< tCube > &q2l, BitField *bits, const tCubeSet1 &theset, tCubeSet2 *neighbors, int_t limit) |
Specialization of the function which gets neighbors of the given cube by generating all the possible neighbors and checking if they are present in the given set. More... | |
template<class euclidom , class tCell , class tCube > | |
int_t | createimages (mvcellmap< tCell2l< tCell >, euclidom, tCube2l< tCube > > &m, const mvmap< tCube2l< tCube >, tCube2l< tCube > > &f1, const mvmap< tCube2l< tCube >, tCube2l< tCube > > &f2, const hashedset< tCube2l< tCube > > &dom1, const hashedset< tCube2l< tCube > > &dom2) |
Specialization of the "createimages" function for two-layer cubes. More... | |
template<class NeighborCheck > | |
bool | acyclic1d (NeighborCheck &n) |
Verifies whether the neighborhood of a 1-dimensional "cube" is acyclic. More... | |
template<class NeighborCheck > | |
bool | acyclic2d (NeighborCheck &n) |
Verifies whether the neighborhood of a 2-dimensional "cube" is acyclic. More... | |
template<class NeighborCheck > | |
bool | acyclic3d_Malandain (NeighborCheck &n) |
Verifies whether the neighborhood of a 3-dimensional cube is acyclic. More... | |
template<class NeighborCheck > | |
bool | acyclic3d (NeighborCheck &n) |
Verifies whether the neighborhood of a 3-dimensional cube is acyclic. More... | |
template<class tCube , class tCubeSet > | |
bool | bddacyclic (const tCube &q, int dim, const tCubeSet &s, BitField &b) |
Uses binary decision diagrams to verify whether the neighborhood of the given cube in the given set is acyclic. More... | |
template<class euclidom > | |
outputstream & | show_homology (outputstream &out, const chain< euclidom > &c) |
Shows a chain as a list of generators of one level of a homology module. More... | |
template<class euclidom > | |
std::ostream & | show_homology (std::ostream &out, const chain< euclidom > &c) |
Shows a chain as a list of generators of one level of a homology module. More... | |
template<class euclidom > | |
std::ostream & | operator<< (std::ostream &out, const chain< euclidom > &c) |
Outputs the given chain to a standard output stream in the text mode. More... | |
template<class euclidom > | |
std::istream & | operator>> (std::istream &in, chain< euclidom > &c) |
Reads a chain from a standard input stream in the text mode. More... | |
template<class euclidom > | |
std::ostream & | operator<< (std::ostream &out, const mmatrix< euclidom > &m) |
Writes a matrix to the output stream as a map in terms of columns. More... | |
template<class euclidom > | |
std::ostream & | operator<< (std::ostream &out, const chaincomplex< euclidom > &c) |
Writes a chain complex to an output stream in the text format. More... | |
template<class euclidom > | |
std::ostream & | operator<< (std::ostream &out, const chainmap< euclidom > &m) |
Writes a chain map to an output stream in the text format. More... | |
bool | acyclic (int dim, BitField &b) |
Checks whether this cube's nieghbors form an acyclic set. More... | |
template<class tCube > | |
bool | acyclic (const hashedset< tCube > &cset) |
Checks whether the given set of cubes is acyclic. More... | |
template<class tCube , class tCubeSet1 , class tCubeSet2 > | |
bool | acyclic (const tCube &q, int dim, const tCubeSet1 &cset, BitField *b, int_t maxneighbors, tCubeSet2 *neighbors) |
Verifies the acyclicity of a neighborhood of the given cube. More... | |
template<class tCube , class tCubeSet > | |
bool | acyclic (const tCube &q, int dim, const tCubeSet &cset, BitField *b, int_t maxneighbors) |
Verifies the acyclicity of a neighborhood of the given cube. More... | |
template<class tCube , class tSet1 , class tSet2 > | |
bool | acyclic_rel (const tCube &q, int dim, const tSet1 &cset, const tSet2 &other, BitField *b, int_t maxneighbors, hashedset< tCube > *neighbors_main, hashedset< tCube > *neighbors_other) |
Verifies whether a cube from the other set can be removed. More... | |
template<class tCube , class tCell , class tSet > | |
int_t | computeimage (hashedset< tCube > &img, const tCell &face, const mvmap< tCube, tCube > &map, const tSet &cset, const tCube &ignore) |
Computes the image of the face under the combinatorial cubical multivalued map, but doesn't take the given cube into consideration. More... | |
template<class tCube , class tSet > | |
bool | remainsacyclic (const mvmap< tCube, tCube > &map, const tCube &q, const tSet &cset) |
Verifies if the map remains acyclic after the addition or removal of the given cube to/from the union of the first and the second set. More... | |
template<class tCube > | |
int_t | cubreducequiet (hashedset< tCube > &cset, hashedset< tCube > &other, mvmap< tCube, tCube > &cubmap, const hashedset< tCube > &keep, bool quiet=true) |
Reduces a pair of sets of cubes for relative homology computation. More... | |
template<class tCube > | |
int_t | cubreduce (hashedset< tCube > &cset, hashedset< tCube > &other, mvmap< tCube, tCube > &cubmap, const hashedset< tCube > &keep) |
Reduces a pair of sets of cubes for relative homology computation. More... | |
template<class tCube > | |
int_t | cubreducequiet (hashedset< tCube > &cset, hashedset< tCube > &other, const hashedset< tCube > &keep, bool quiet=true) |
Reduces a pair of sets of cubes for relative homology computation. More... | |
template<class tCube > | |
int_t | cubreduce (hashedset< tCube > &cset, hashedset< tCube > &other, const hashedset< tCube > &keep) |
Reduces a pair of sets of cubes for relative homology computation. More... | |
template<class tCube > | |
int_t | cubreducequiet (const hashedset< tCube > &maincset, hashedset< tCube > &cset, bool quiet=true) |
Reduce the set 'cset' towards 'maincset'. More... | |
template<class tCube > | |
int_t | cubreduce (const hashedset< tCube > &maincset, hashedset< tCube > &cset) |
Reduces a set of cubes towards the main set. More... | |
template<class tCube > | |
int_t | cubexpand (hashedset< tCube > &cset, hashedset< tCube > &other, bool quiet=false) |
Expands the set 'other' towards 'cset' without changing the homology of (cset + other, other). More... | |
template<class tCube > | |
int_t | cubexpand (hashedset< tCube > &cset, hashedset< tCube > &other, hashedset< tCube > &imgsrc, hashedset< tCube > &img, const mvmap< tCube, tCube > &map, bool indexmap, bool checkacyclic, bool quiet=false) |
Expands the set 'other' towards 'cset' without changing the homology of (cset + other, other). More... | |
template<class cell > | |
int | boundarycoef (const cell &, int i) |
template<class cell > | |
int | boundarylength (const cell &) |
template<class cell > | |
cell | boundarycell (const cell &, int i) |
template<class element > | |
int_t | findelem (const multitable< element > &tab, const element &e, int_t len) |
Finds the given element in the table of given length. More... | |
template<class cell , class euclidom > | |
chaincomplex< euclidom > & | createchaincomplex (chaincomplex< euclidom > &c, const gcomplex< cell, euclidom > &g, bool quiet=false) |
Creates an algebraic chain complex based on the data from the given geometric cell complex. More... | |
template<class cell , class euclidom > | |
std::ostream & | writechaincomplex (std::ostream &out, const gcomplex< cell, euclidom > &g, bool symbolicnames=false, bool quiet=false) |
Writes out a chain complex of the geometric cell complex. More... | |
template<class cell , class euclidom > | |
chaincomplex< euclidom > & | createchaincomplex (chaincomplex< euclidom > &c, const gcomplex< cell, euclidom > &g, const gcomplex< cell, euclidom > &rel, bool quiet=false) |
Creates a relative algebraic chain complex with the data from the given pair of geometric cell complexes. More... | |
template<class cell , class euclidom > | |
std::ostream & | writegenerators (std::ostream &out, const chain< euclidom > *hom, const chaincomplex< euclidom > &c, const gcomplex< cell, euclidom > &g, const int *level=NULL) |
Writes the homology generators of the geometric complex to a file. More... | |
template<class cell , class euclidom > | |
gcomplex< cell, euclidom > & | creategraph (const mvmap< cell, cell > &m, gcomplex< cell, euclidom > &graph) |
Add a graph of a multivalued cell map to the cell complex. More... | |
template<class cell , class euclidom > | |
bool | acyclic (gcomplex< cell, euclidom > &c) |
Checks whether this chain complex is acyclic. More... | |
template<class cell , class euclidom > | |
std::ostream & | operator<< (std::ostream &out, const gcomplex< cell, euclidom > &c) |
Writes a geometric complex to the output stream in the text format. More... | |
template<class cell , class euclidom > | |
std::istream & | operator>> (std::istream &in, gcomplex< cell, euclidom > &c) |
Reads a geometric complex from an input stream in the text format. More... | |
template<class cell , class euclidom , class element > | |
void | creategraph (const mvcellmap< cell, euclidom, element > &m, gcomplex< cell, euclidom > &c, bool addbd) |
Creates the full graph of a map as a cellular complex. More... | |
template<class cell , class euclidom , class element > | |
void | creategraph (const mvcellmap< cell, euclidom, element > &m, const gcomplex< cell, euclidom > &rel, gcomplex< cell, euclidom > &c, bool addbd) |
Creates the full graph of a map as a cellular complex. More... | |
template<class cell , class euclidom , class element > | |
void | createcellmap (const mvcellmap< cell, euclidom, element > &m, mvcellmap< cell, euclidom, cell > &cm) |
Creates the graph of the map as a cell complex while reducing as possible. More... | |
template<class cell , class euclidom , class element > | |
bool | createcellmap (const mvcellmap< cell, euclidom, element > &m, const mvcellmap< cell, euclidom, element > &rel, mvcellmap< cell, euclidom, cell > &cm, bool verifyacyclicity) |
Creates the graph of the map as a cell complex while reducing as possible. More... | |
template<class cell , class euclidom , class element > | |
std::ostream & | operator<< (std::ostream &out, const mvcellmap< cell, euclidom, element > &m) |
Writes a multivalued cellular map to the output stream. More... | |
template<class euclidom > | |
int | BettiNumber (const chain< euclidom > &c) |
Returns the Betti number that corresponds to the given chain which describes one homology group. More... | |
template<class euclidom > | |
int | TorsionCoefficient (const chain< euclidom > &c, int start=0) |
Returns the next position in the chain containing a torsion coefficient. More... | |
template<class euclidom > | |
void | ShowHomology (const chain< euclidom > &c) |
Shows (that is, writes to 'sout') one level of the homology module encoded in the given chain. More... | |
template<class euclidom > | |
void | ShowHomology (const chain< euclidom > *hom, int maxlevel) |
Shows (that is, writes to 'sout') the entire homology module encoded in an array of chains. More... | |
template<class euclidom > | |
void | ShowHomology (const chainmap< euclidom > &hmap) |
Show (that is, writes to 'sout') the homology map encoded in terms of a chain map. More... | |
template<class euclidom > | |
void | ShowGenerator (const chain< euclidom > &c) |
Shows (that is, writes to 'sout') one generator of the homology module of a chain complex. More... | |
template<class euclidom > | |
void | ShowGenerators (const chain< euclidom > *c, int count) |
Shows (that is, writes to 'sout') all the generators of one level of the homology module of a chain complex. More... | |
template<class euclidom > | |
void | ShowGenerators (chain< euclidom > const *const *const gen, const chain< euclidom > *hom, int maxlevel) |
Shows (that is, writes to 'sout') all the generators of the entire homology module of a chain complex. More... | |
template<class euclidom > | |
void | ShowGenerators (const chaincomplex< euclidom > &c, const chain< euclidom > *hom, int maxlevel) |
Shows (that is, writes to 'sout') all the generators of the entire homology module of a chain complex. More... | |
template<class cell , class euclidom > | |
void | ShowGenerator (const chain< euclidom > &c, const hashedset< cell > &s) |
Shows (that is, writes to 'sout') one generator of the homology module of a geometric complex. More... | |
template<class cell , class euclidom > | |
void | ShowGenerators (const chain< euclidom > *c, int count, const hashedset< cell > &s) |
Shows (that is, writes to 'sout') all the generators of one level of the homology module of a geometric complex. More... | |
template<class euclidom , class cell > | |
void | ShowGenerators (chain< euclidom > *const *gen, const chain< euclidom > *hom, int maxlevel, const gcomplex< cell, euclidom > &gcompl) |
Shows all the generators of the entire homology module of a geometric complex. More... | |
template<class euclidom > | |
chain< euclidom > ** | ExtractGenerators (const chaincomplex< euclidom > &cx, chain< euclidom > *hom, int maxlevel) |
Extracts homology generators from a chain complex in the simple form. More... | |
template<class euclidom > | |
int | Homology (chaincomplex< euclidom > &cx, const char *Xname, chain< euclidom > *&hom) |
Transforms the chain complex into a simple form and compute its homology. More... | |
template<class cell , class euclidom > | |
int | Homology (gcomplex< cell, euclidom > &Xcompl, const char *Xname, chain< euclidom > *&hom, chain< euclidom > ***gen=0) |
Computes the homology of a given cubical complex. More... | |
template<class euclidom , class cubetype > | |
int | Homology (hashedset< cubetype > &Xcubes, const char *Xname, chain< euclidom > *&hom, chain< euclidom > ***gen=0, gcomplex< typename cubetype::CellType, euclidom > **gcompl=0) |
Computes the homology of a given set of cubes. More... | |
template<class cell , class euclidom > | |
int | Homology (gcomplex< cell, euclidom > &Xcompl, const char *Xname, gcomplex< cell, euclidom > &Acompl, const char *Aname, chain< euclidom > *&hom, chain< euclidom > ***gen=0) |
Computes the relative homology of the given pair of cubical complexes. More... | |
template<class euclidom , class cubetype > | |
int | Homology (hashedset< cubetype > &Xcubes, const char *Xname, hashedset< cubetype > &Acubes, const char *Aname, chain< euclidom > *&hom, chain< euclidom > ***gen=0, gcomplex< typename cubetype::CellType, euclidom > **gcompl=0) |
Computes the relative homology of a given pair of sets of cubes. More... | |
template<class euclidom > | |
chainmap< euclidom > * | HomologyMap (const chainmap< euclidom > &cmap, const chain< euclidom > *hom_cx, const chain< euclidom > *hom_cy, int maxlevel) |
Extracts the homomorphism induced in homology from the chain map on two chain complexes whose homology has just been computed. More... | |
template<class euclidom > | |
chainmap< euclidom > * | HomologyMap (const chainmap< euclidom > &cmap, const chain< euclidom > *hom_cx, int maxlevel) |
Extracts the endomorphism induced in homology from the chain map on one chain complex whose homology has just been computed. More... | |
template<class euclidom , class cubetype > | |
int | Homology (mvmap< cubetype, cubetype > &Fcubmap, const char *Fname, hashedset< cubetype > &Xcubes, const char *Xname, hashedset< cubetype > &Acubes, const char *Aname, hashedset< cubetype > &Ycubes, const char *Yname, hashedset< cubetype > &Bcubes, const char *Bname, chain< euclidom > *&hom_cx, int &maxlevel_cx, chain< euclidom > *&hom_cy, int &maxlevel_cy, chainmap< euclidom > *&hom_f, bool inclusion=false, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< typename cubetype::CellType, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< typename cubetype::CellType, euclidom > **gycompl=0) |
Computes the homomorphism induced in homology by a combinatorial cubical multivalued map. More... | |
template<class euclidom , class cubetype > | |
int | Homology (mvmap< cubetype, cubetype > &Fcubmap, hashedset< cubetype > &Xcubes, hashedset< cubetype > &Acubes, hashedset< cubetype > &Ycubes, hashedset< cubetype > &Bcubes, chain< euclidom > *&hom_cx, int &maxlevel_cx, chain< euclidom > *&hom_cy, int &maxlevel_cy, chainmap< euclidom > *&hom_f, bool inclusion=false, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< typename cubetype::CellType, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< typename cubetype::CellType, euclidom > **gycompl=0) |
A version of the above procedure with the default names. More... | |
template<class euclidom , class cubetype > | |
int | Homology (mvmap< cubetype, cubetype > &Fcubmap, const char *Fname, hashedset< cubetype > &Xcubes, const char *Xname, hashedset< cubetype > &Acubes, const char *Aname, chain< euclidom > *&hom, int &maxlevel, chainmap< euclidom > *&hom_f, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< typename cubetype::CellType, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< typename cubetype::CellType, euclidom > **gycompl=0) |
Computes the endomorphism induced in homology by a combinatorial cubical multivalued map. More... | |
template<class euclidom , class cubetype > | |
int | Homology (mvmap< cubetype, cubetype > &Fcubmap, hashedset< cubetype > &Xcubes, hashedset< cubetype > &Acubes, chain< euclidom > *&hom, int &maxlevel, chainmap< euclidom > *&hom_f, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< typename cubetype::CellType, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< typename cubetype::CellType, euclidom > **gycompl=0) |
A version of the above procedure with the default names. More... | |
template<class euclidom , class cubetype > | |
int | Homology2l (mvmap< cubetype, cubetype > &Fcubmap0, const char *Fname, hashedset< cubetype > &Xcubes0, const char *Xname, hashedset< cubetype > &Acubes0, const char *Aname, chain< euclidom > *&hom_cx, int &maxlevel, chainmap< euclidom > *&hom_f, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< tCell2l< typename cubetype::CellType >, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< tCell2l< typename cubetype::CellType >, euclidom > **gycompl=0) |
Computes the endomorphism induced in homology by a combinatorial cubical multivalued map using the two-layer construction developped by P. More... | |
template<class euclidom , class cubetype > | |
int | Homology2l (mvmap< cubetype, cubetype > &Fcubmap, hashedset< cubetype > &Xcubes, hashedset< cubetype > &Acubes, chain< euclidom > *&hom, int &maxlevel, chainmap< euclidom > *&hom_f, int careful=0x01, chain< euclidom > ***gfgen=0, gcomplex< tCell2l< typename cubetype::CellType >, euclidom > **gfcompl=0, chain< euclidom > ***gygen=0, gcomplex< tCell2l< typename cubetype::CellType >, euclidom > **gycompl=0) |
A version of the above procedure with the default names. More... | |
bool | acyclic (const cube &q, const cubes &X) |
Verifies whether the neighborhood of q in X is acyclic. More... | |
template<int dim, int twoPower> | |
void | ComputeBettiNumbers (bincube< dim, twoPower > &b, int *result) |
Computes the Betti Numbers of a set of full cubes in a bincube. More... | |
template<int dim, int twoPower, class coordtype > | |
void | ComputeBettiNumbers (char *binary_buffer, int *result, const coordtype *space_wrapping=0) |
Computes the Betti Numbers of the Homology of a full cubical set defined by means of an n-dimensional bitmap. More... | |
template<class coordtype > | |
void | ComputeBettiNumbers (coordtype *coord, int n, int dim, int *result) |
Computes the Betti numbers of the given set of full cubes. More... | |
template<class coordtype > | |
void | SetSpaceWrapping (int dim, const coordtype *wrap) |
Sets space wrapping in each direction separately. More... | |
template<class tCube > | |
void | scancubes (const char *name) |
Reads all the cubes from the given file and ignores them. More... | |
template<class settype > | |
void | readtheset (const char *name, settype &s, const char *pluralname, const char *what) |
Reads a given set from the file and shows appropriate messages. More... | |
template<class cell , class euclidom > | |
void | readcells (const char *name, gcomplex< cell, euclidom > &s, const char *what) |
Uses the general procedure "readtheset" to read a geometric complex. More... | |
template<class element > | |
void | readelements (const char *name, hashedset< element > &s, const char *what) |
Uses the general procedure "readtheset" to read a set of elements. More... | |
void | readelements (const char *name, cubes &cub, const char *what) |
Reads a set of cubes from the given file. More... | |
template<class element > | |
void | readmapdomain (const char *name, hashedset< element > &cub) |
Reads the domain of a cubical multivalued map from the given file. More... | |
template<class element > | |
void | readmapimage (const char *name, hashedset< element > &cub) |
Reads the domain of a cubical multivalued map from the given file. More... | |
template<class element > | |
void | readmapimage (const char *filename, const hashedset< element > &dom, const char *domname, hashedset< element > &cub) |
Reads the image of a set by a cubical multivalued map from the given file. More... | |
template<class element > | |
void | readmaprestriction (mvmap< element, element > &Fcubmap, const char *mapname, const hashedset< element > &Xcubes, const hashedset< element > &Acubes, const char *Xname, const char *purpose=0) |
Reads the restriction of a multivalued map to the union of two sets. More... | |
template<class element > | |
void | readmaprestriction (mvmap< element, element > &Fcubmap, const char *mapname, const hashedset< element > &Xcubes, const char *Xname, const char *purpose=NULL) |
Reads the restriction of a multivalued map to the given set. More... | |
template<class settype > | |
void | savetheset (const char *name, const settype &s, const char *pluralname, const char *what, const char *filecomment=0) |
Saves a given set to a file and shows appropriate messages. More... | |
template<class cell , class euclidom > | |
void | savecells (const char *name, const gcomplex< cell, euclidom > &s, const char *what, const char *filecomment=0) |
Uses the general procedure "savetheset" to save a geometric complex. More... | |
template<class element > | |
void | saveelements (const char *name, const hashedset< element > &s, const char *what, const char *filecomment=0) |
Uses the general procedure "savetheset" to save a set of elements. More... | |
void | saveelements (const char *name, const cubes &cub, const char *what, const char *filecomment=0) |
Saves a set of cubes to the given file. More... | |
template<class cubsettype > | |
bool | checkinclusion (const cubsettype &Xcubes, const cubsettype &Ycubes, const cubsettype &Bcubes, const char *Xname, const char *YBname) |
Checks if X is a subset of the union of Y and B. More... | |
template<class cubsettype > | |
bool | checkinclusion (const cubsettype &Xcubes, const cubsettype &Ycubes, const char *Xname, const char *Yname) |
Checks for the inclusion of X in Y. More... | |
template<class maptype , class cubsettype > | |
bool | checkimagecontained (const maptype &Fcubmap, const cubsettype &Xcubes, const cubsettype &Ycubes, const cubsettype &Bcubes, const char *Xname, const char *Yname) |
Checks if the image of X by F is contained in the union of Y and B. More... | |
template<class maptype , class cubsettype > | |
bool | checkimagecontained (const maptype &Fcubmap, const cubsettype &Xcubes, const cubsettype &Ycubes, const char *Xname, const char *Yname) |
Checks if the image of X by F is contained in the set Y alone. More... | |
template<class maptype , class cubsettype > | |
bool | checkimagedisjoint (const maptype &Fcubmap, const cubsettype &Acubes, const cubsettype &Ycubes, const char *Aname, const char *Yname) |
Checks if the image of A by F is disjoint from Y (actually, from Y\B). More... | |
template<class tCell , class tCube , class tCoef > | |
bool | checkacyclicmap (const mvcellmap< tCell, tCoef, tCube > &Fcellcubmap, const char *Xname) |
Checks if the image of each element of the domain of this map is acyclic. More... | |
template<class cubsettype > | |
void | restrictAtoneighbors (const cubsettype &Xcubes, cubsettype &Acubes, const char *Xname, const char *Aname, const cubsettype *keepcubes=0) |
Restricts the set of cubes 'Acubes' to these cubes which are neighbors of any of the cubes in 'Xcubes' and displays appropriate messages. More... | |
template<class cubsettype > | |
void | removeAfromX (cubsettype &Xcubes, const cubsettype &Acubes, const char *Xname, const char *Aname) |
Removes 'Acubes' from 'Xcubes' and shows messages. More... | |
template<class cell , class euclidom > | |
void | removeAfromX (gcomplex< cell, euclidom > &X, const gcomplex< cell, euclidom > &A, const char *Xname, const char *Aname) |
Removes from 'X' all the cells that appear in 'A'. More... | |
template<class cubsettype > | |
void | expandAinX (cubsettype &Xcubes, cubsettype &Acubes, const char *Xname, const char *Aname) |
Expands the other element of the pair into the main portion of the set. More... | |
template<class cubsettype , class maptype > | |
void | expandAinX (cubsettype &Xcubes, cubsettype &Acubes, cubsettype &Ycubes, cubsettype &Bcubes, const maptype &Fcubmap, const char *Xname, const char *Aname, const char *Bname, bool indexmap, bool checkacyclic) |
Expands the other element of the pair into the main portion of the set. More... | |
template<class cubsettype > | |
void | reducepair (cubsettype &Xcubes, cubsettype &Acubes, const cubsettype &Xkeepcubes, const char *Xname, const char *Aname) |
Reduces the pair of sets of cubes. Keeps the given cubes untouched. More... | |
template<class maptype , class cubsettype > | |
void | reducepair (cubsettype &Xcubes, cubsettype &Acubes, maptype &Fcubmap, const cubsettype &Xkeepcubes, const char *Xname, const char *Aname) |
Reduces the pair of sets of cubes. More... | |
template<class maptype , class cubsettype > | |
void | addmapimg (const maptype &Fcubmap, const maptype &FcubmapA, const cubsettype &Xcubes, const cubsettype &Acubes, cubsettype &Ykeepcubes, bool indexmap) |
Adds the images of both maps to the set of cubes to be kept. More... | |
template<class maptype , class cubsettype > | |
void | addmapimg (const maptype &Fcubmap, const cubsettype &Xcubes, const cubsettype &Acubes, cubsettype &Ykeepcubes, bool indexmap) |
Adds the image of the given map to the set of cubes to be kept. More... | |
template<class tCubes , class tCell , class tCoef > | |
void | cubes2cells (tCubes &Xcubes, gcomplex< tCell, tCoef > &Xcompl, const char *Xname, bool deletecubes=true) |
Transforms cubes to full-dimensional cells. More... | |
template<class cell , class euclidom > | |
void | collapse (gcomplex< cell, euclidom > &Xcompl, gcomplex< cell, euclidom > &Acompl, gcomplex< cell, euclidom > &Xkeepcompl, const char *Xname, const char *Aname, bool addbd=true, bool addcob=false, bool disjoint=true, const int *level=NULL) |
Collapses a pair of geometric complexes. More... | |
template<class cell , class euclidom > | |
void | collapse (gcomplex< cell, euclidom > &Xcompl, gcomplex< cell, euclidom > &Acompl, const char *Xname, const char *Aname, bool addbd=true, bool addcob=false, bool disjoint=true, const int *level=NULL) |
Collapses a pair of geometric complexes. More... | |
template<class cell , class euclidom > | |
void | collapse (gcomplex< cell, euclidom > &Xcompl, gcomplex< cell, euclidom > &Xkeepcompl, const char *Xname, bool addbd=true, bool addcob=false, bool disjoint=true, const int *level=NULL) |
Collapses a single geometric complex. More... | |
template<class cell , class euclidom > | |
void | collapse (gcomplex< cell, euclidom > &Xcompl, const char *Xname, bool addbd=true, bool addcob=false, bool disjoint=true, const int *level=NULL) |
Collapses a single geometric complex. More... | |
template<class cell , class euclidom > | |
void | decreasedimension (gcomplex< cell, euclidom > &Acompl, int dim, const char *name) |
Decreases the dimension of the geometric complex by adding boundary cells to all the cells on higher dimensions and then removing these cells. More... | |
template<class cell , class euclidom > | |
void | addboundaries (gcomplex< cell, euclidom > &Xcompl, gcomplex< cell, euclidom > &Acompl, int minlevel, bool bothsets, const char *Xname, const char *Aname) |
Adds boundaries to the geometric complex X or to both X and A. More... | |
template<class tCube > | |
int | ReadBitmapFile (const char *bmpname, hashedset< tCube > &cset, int mingray=0, int maxgray=128) |
Reads the squares from a bitmap file to the set of cubes. More... | |
template<class TCube > | |
std::ostream & | operator<< (std::ostream &out, const BufferedMapClass< TCube > &map) |
template<class TSetOfCubes > | |
int | neighborhood (const TSetOfCubes &X, TSetOfCubes &result) |
Computes a cubical neighborhood of width 1 around the set. More... | |
template<class TSetOfCubes , class TMap > | |
void | invariantpart (TSetOfCubes &X, const TMap &F, TSetOfCubes &result) |
Computes X := Inv (X). More... | |
template<class HSet > | |
bool | inclusion (const HSet &X, const HSet &Y) |
Verifies if X is a subset of Y. Returns true if yes, false if not. More... | |
template<class TSetOfCubes , class TMap > | |
int | ExitSetM (const TSetOfCubes &N, const TSetOfCubes &Q1, const TMap &F, TSetOfCubes &resultQ2) |
Computes iteratively Q2 := (F (Q1 + Q2) - Q1) * N. More... | |
template<class TSetOfCubes , class TMap > | |
int | IndexPairM (const TMap &F, const TSetOfCubes &initialS, TSetOfCubes &resultQ1, TSetOfCubes &resultQ2) |
Constructs a combinatorial index pair satisfying Mrozek's definition. More... | |
template<class TSetOfCubes , class TMap > | |
int | IndexPairP (const TMap &F, const TSetOfCubes &initialS, TSetOfCubes &resultQ1, TSetOfCubes &resultQ2) |
Constructs a combinatorial index pair satisfying Pilarczyk's definition. More... | |
int_t | hashkey1 (const Simplex &s) |
int_t | hashkey2 (const Simplex &s) |
int | operator== (const Simplex &s, const Simplex &t) |
The operator == that compares whether the two simplices are the same, that is, have the same vertices in the same order. More... | |
int | operator!= (const Simplex &s, const Simplex &t) |
The operator != verifies if the two simplices are different. More... | |
int | boundarylength (const Simplex &s) |
Returns the length of the boundary of a simplex. More... | |
int | boundarycoef (const Simplex &, int i) |
Returns the i-th coefficient in the boundary of a simplex. More... | |
Simplex | boundarycell (const Simplex &s, int i) |
Returns the i-th boundary face of a simplex. More... | |
Simplex | boundarycell (const Simplex &s, int i, bool) |
Returns the i-th boundary face of a simplex. More... | |
std::ostream & | operator<< (std::ostream &out, const Simplex &s) |
Writes a simplex to the output stream in the text format. More... | |
std::istream & | operator>> (std::istream &in, Simplex &s) |
Reads a simplex from an imput stream from a text format. More... | |
int | bitcountbyte (char n) |
int | bitcount (int number) |
void | int2bits (int bits, int_t length, BitField &field) |
int | bits2int (const BitField &field, int_t length) |
template<class wType1 , class wType2 > | |
bool | operator== (const diGraph< wType1 > &g1, const diGraph< wType2 > &g2) |
template<class wType1 , class wType2 > | |
bool | operator!= (const diGraph< wType1 > &g1, const diGraph< wType2 > &g2) |
template<class wType > | |
std::ostream & | operator<< (std::ostream &out, const diGraph< wType > &g) |
Writes a graph in the text mode to an output stream. More... | |
template<class wType , class Table1 , class Table2 > | |
int_t | SCC (const diGraph< wType > &g, Table1 &compVertices, Table2 &compEnds, diGraph< wType > *scc=0, diGraph< wType > *transposed=0, bool copyweights=false) |
Computes strongly connected components of the graph 'g'. More... | |
template<class wType , class Table1 , class Table2 > | |
int_t | SCC_Tarjan (const diGraph< wType > &g, Table1 &compVertices, Table2 &compEnds) |
Computes strongly connected components of the graph 'g' using Tarjan's algorithm (as described in the Wikipedia). More... | |
template<class wType > | |
int_t | addRenumEdges (const diGraph< wType > &g, int_t vertex, const int_t *newNum, int_t cur, int_t *srcVert, diGraph< wType > &result) |
A helper function for "collapseVertices". More... | |
template<class wType , class Table1 , class Table2 > | |
int_t | collapseVertices (const diGraph< wType > &g, int_t compNum, Table1 &compVertices, Table2 &compEnds, diGraph< wType > &result, int_t *newNumbers=0) |
Collapses disjoint subsets of vertices to single vertices and creates a corresponding graph in which the first vertices come from the collapsed ones. More... | |
template<class wType , class TabSets > | |
int_t | addRenumEdges2 (const diGraph< wType > &g, int_t vertex, const int_t *newNum, TabSets &numSets, int_t cur, int_t *srcVert, diGraph< wType > &result) |
A helper function for "collapseVertices2". More... | |
template<class wType , class Table1 , class Table2 > | |
int_t | collapseVertices2 (const diGraph< wType > &g, int_t compNum, Table1 &compVertices, Table2 &compEnds, diGraph< wType > &result) |
Collapses (possibly non-disjoint) subsets of vertices to single vertices and creates a corresponding graph in which the first vertices come from the collapsed ones. More... | |
template<class wType > | |
int_t | connectionGraph (const diGraph< wType > &g, int_t nVert, diGraph< wType > &result) |
Computes the graph that represents connections between a number of the first vertices in the given graph. More... | |
template<class GraphType > | |
int_t | computePeriod (const GraphType &g) |
Computes the period of a strongly connected graph. More... | |
template<class wType > | |
int_t | inclusionGraph (const diGraph< wType > &g, int_t nVert, diGraph< wType > &result) |
Computes the graph that represents flow-induced relations on Morse sets. More... | |
template<class wType , class TConn > | |
int_t | inclusionGraph (const diGraph< wType > &g, int_t nVert, diGraph< wType > &result, TConn &connections) |
A more complicated version of the 'inclusionGraph' function. More... | |
template<class wType , class matrix > | |
void | graph2matrix (const diGraph< wType > &g, matrix &m) |
Creates the adjacency matrix of the given graph. More... | |
template<class wType , class matrix > | |
void | matrix2graph (const matrix &m, int_t n, diGraph< wType > &g) |
Creates a graph based on the given adjacency matrix. More... | |
template<class matrix > | |
void | transitiveClosure (matrix &m, int_t n) |
Computes the transitive closure of an acyclic graph defined by its adjacency matrix, using the Warshall's algorithm: S. More... | |
template<class matrix > | |
void | transitiveReduction (matrix &m, int_t n) |
Computes the transitive reduction of a CLOSED acyclic graph defined by its adjacency matrix, using the algorithm by D. More... | |
template<class wType > | |
void | transitiveReduction (const diGraph< wType > &g, diGraph< wType > &gRed) |
Computes the transitive reduction of an arbitrary acyclic graph. More... | |
std::ostream & | 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 & | 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 & | 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 & | 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 & | 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 > & | 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 > & | 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 > & | 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 > & | 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 & | 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 & | 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 & | 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 & | 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 & | 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 & | 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 & | operator>> (std::istream &in, mvmap< domelement, imgelement > &m) |
Reads a multivalued map from an input stream. More... | |
std::ostream & | operator<< (std::ostream &out, const primeint &p) |
Writes an object of the type "primeint" to an output stream. More... | |
std::istream & | operator>> (std::istream &in, primeint &p) |
Reads a prime number from an input stream. More... | |
std::ostream & | operator<< (std::ostream &out, const integer &n) |
std::istream & | operator>> (std::istream &in, integer &n) |
int | operator!= (const integer &n, const integer &m) |
int | operator== (const integer &n, int m) |
int | operator!= (const integer &n, int m) |
integer | operator- (const integer &n, const integer &m) |
bool | operator< (const integer &x, const integer &y) |
bool | operator> (const integer &x, const integer &y) |
template<class set1type , class set2type > | |
setunion< set1type, set2type > | makesetunion (const set1type &set1, const set2type &set2) |
Creates an object which represents the union of two sets. More... | |
int_t | hashkey1 (const word &w) |
int_t | hashkey2 (const word &w) |
int | operator== (const word &w1, const word &w2) |
Compares two words. Returns 1 if they are the same, 0 otherwise. More... | |
int | operator!= (const word &w1, const word &w2) |
Compares two words. Returns 0 if they are the same, 1 otherwise. More... | |
int | operator== (const word &w, const char *c) |
Compares a word with a C-style string. More... | |
int | operator!= (const word &w, const char *c) |
Compares a word with a C-style string. More... | |
int | operator== (const char *c, const word &w) |
Compares a C-style string with a word. More... | |
int | operator!= (const char *c, const word &w) |
Compares a C-style string with a word. More... | |
int | operator< (const word &w1, const word &w2) |
Compares two words in an alphabetical way (by ASCII codes). More... | |
int | operator> (const word &w1, const word &w2) |
Compares two words in an alphabetical way (by ASCII codes). More... | |
int | operator<= (const word &w1, const word &w2) |
Compares two words in an alphabetical way (by ASCII codes). More... | |
int | operator>= (const word &w1, const word &w2) |
Compares two words in an alphabetical way (by ASCII codes). More... | |
template<class type > | |
word & | operator<< (word &w, const type &elem) |
Appends the string value of a given element to a word. More... | |
std::ostream & | operator<< (std::ostream &out, const word &w) |
Writes the given word to an output stream. More... | |
std::istream & | operator>> (std::istream &in, word &w) |
Reads a word from an input stream. More... | |
std::ostream & | operator<< (std::ostream &out, const argelement &p) |
template<class type > | |
int | readfromstring (char *str, type &t) |
A template for reading a variable from a string. More... | |
int | readfromstring (char *str, char *&t) |
A specialization of the above template for interpreting a string as a string (no processing is necessary). More... | |
int | readfromstring (char *str, const char *&t) |
A specialization of the above template for interpreting a string as a const string (no processing is necessary). More... | |
int | readfromstring (char *str, bool &t) |
A specialization of the above template for reading a bool type. More... | |
template<class type > | |
void | arg (arguments &a, const char *name, type &value) |
Adds a command line argument. More... | |
template<class type > | |
void | arg (arguments &a, const char *name, type &value, type defaultvalue) |
Adds a command line argument with a default value. More... | |
void | arg (arguments &a, const char *name, char *&value, const char *defaultvalue) |
A specialization of the above for C-style strings. More... | |
template<class type > | |
void | arg (arguments &a, const char *name, type *value, int &count, int size) |
Adds a command line argument whose repeated occurrences fill in consecutive elements of the given array. More... | |
template<class type > | |
void | arg (arguments &a, const char *name, type *value, int &count, int size, type defaultvalue) |
A version of the above with a default value of the arguments. More... | |
template<class type > | |
void | argoblig (arguments &arg, const char *name, type &value) |
Defines an obligatory command line argument. More... | |
template<class type > | |
void | argoblig (arguments &arg, const char *name, type &value, type defaultvalue) |
A version of the above with the default value provided. More... | |
void | argoblig (arguments &arg, const char *name, char *&value, const char *defaultvalue) |
A version of the above for reading an array of argument values. More... | |
template<class type > | |
void | argbreak (arguments &arg, const char *name, type &value) |
Adds an argument whose appearence interrupts the analysis of the command line and makes the analyzing function return the value of 1. More... | |
template<class type > | |
void | argbreak (arguments &arg, const char *name, type &value, type defaultvalue) |
A version of the above with the default value provided. More... | |
void | argbreak (arguments &arg, const char *name, char *&value, const char *defaultvalue) |
A version of the above for the C-style string. More... | |
void | argbreak (arguments &arg, const char *name) |
A version of the above which ignores the value of the argument. More... | |
template<class type > | |
void | argswitch (arguments &arg, const char *name, type &value, const type &defaultvalue) |
Defines a command line argument which is a switch, that is, there is no value given for it in the command line. More... | |
void | argswitch (arguments &arg, const char *name, char *&value, const char *defaultvalue) |
A version of the above for the C-style string. More... | |
void | argswitch (arguments &arg, const char *name) |
Defines an ignored switch (no value is set when this argument appears). More... | |
void | arghelp (arguments &a) |
Adds the typical arguments which should make the program display help information. More... | |
void | argstreams (arguments &a, char *&logfilename, char *&seqfilename, bool &quiet, bool &debug) |
Adds typical command line arguments for manipulating output streams. More... | |
void | setstreams (const char *logfilename, char *seqfilename, bool quiet, bool debug) |
Sets the parameters of the output streams depending on the file names acquired from the command line. More... | |
template<typename type > | |
outputstream & | operator<< (outputstream &out, const type &object) |
The operator << for writing any kind of object to the output stream. More... | |
outputstream & | operator<< (outputstream &out, const char *object) |
A specialization of the operator << for writing a C-style string to the output stream. More... | |
outputstream & | operator<< (outputstream &out, std::ostream &(*object)(std::ostream &)) |
A specialization of the operator << for putting manipulators (like std::endl, std::flush) to the output stream. More... | |
template<class type > | |
void | swapelements (type &x, type &y) |
A simple template for swapping two elements with the use of a temporary variable of the same type and the assignment operator. More... | |
template<class type > | |
int | sortelements (type *tab, int n) |
A simple template that sorts an array using the bubble sort method, removes repeated elements and returns the new number of the elements. More... | |
void | ignoreline (std::istream &in) |
Ignores the input characters until the end of a line, including this end of the line. More... | |
void | ignorecomments (std::istream &in) |
Ignores white characters (spaces, tabulators, CRs and LFs), as well as comments from the input text file. More... | |
int | closingparenthesis (int ch) |
Returns the matching closing parenthesis for the given opening one or EOF if none. More... | |
int | readparenthesis (std::istream &in) |
Reads an opening parenthesis from the input file. More... | |
std::string | commandline (int argc, char *argv[]) |
Returns the entire command line as a single string. More... | |
const char * | currenttime (void) |
Retrieves the current time as a pointer to a C-style string. More... | |
template<class settype > | |
static void | savetheset (const settype &c, const char *prefix, const char *filename, const char *name) |
Writes the given object to a file whose name is a concatenation of the prefix and the given file name. More... | |
void | fileerror (const char *filename, const char *what="open") |
Throws a message about the inability to do something with a file. More... | |
Variables | |
const int | DimBits = (sizeof (int_t) > 4) ? 7 : 6 |
The number of signed bits to store the dimension (i.e., 6: max 31). More... | |
const int | NumBits = (sizeof (int_t) << 3) - DimBits |
The number of bits in an integer number that remain to be used for other purposes, because the high 'DimBits' bits are used for the dimension. More... | |
const int_t | SignBit = static_cast<int_t> (1) << ((sizeof (int_t) << 3) - 1) |
The sign bit of the int_t number. More... | |
const int_t | NumMask = (~(static_cast<int_t> (0) ^ SignBit)) >> (DimBits - 1) |
The mask of the bits remaining after the dimension bits are excluded. More... | |
const int | MaxBasDim1 = static_cast<int> (1u << (DimBits - 1)) |
The maximal dimension that can be represented using 'DimBits' bits. More... | |
const int | MaxBasDim2 = static_cast<int> ((sizeof (int_t) << 3) - DimBits) |
The maximal dimension which still leaves enough bits in the integer to have one bit for each direction. More... | |
const int | MaxBasDim = (MaxBasDim1 < MaxBasDim2) ? MaxBasDim1 : MaxBasDim2 |
The maximal dimension that can be used if the high bits of an integer store the value of the dimension, and the number of remaining bits is at least as large as the dimension. More... | |
const int | MaxBddDimPossible = 3 |
The maximal dimension for which binary decision diagrams are programmed. More... | |
int | MaxBddDim |
The maximal dimension for which binary decision diagrams are used. More... | |
bool | UseMalandainCode |
The variable which controls which binary decision diagrams should be used in dimension 3, either programmed by P. More... | |
BitFields | knownbits |
The global table of BitFields which store the acyclicity information for reducing full cubical sets. More... | |
Tabulated | tabulated |
The global instance of this class which stores tabulated configurations to use in the full cube reduction procedures. More... | |
unsigned char | bitcounttable [] |
outputstream | sout |
A replacement for standard output stream, with optional logging and other features provided by the class 'outputstream'. More... | |
outputstream | scon |
The console output stream to which one should put all the junk that spoils the log file, like progress indicators. More... | |
outputstream | serr |
A wrapper for the standard error stream. More... | |
outputstream | slog |
The output stream to which one can send messages for logging only. More... | |
outputstream | sbug |
An output stream for writing additional debug messages. More... | |
outputstream | sseq |
An auxiliary stream which captures sequences of processed data. More... | |
timeused | program_time |
The external variable which measures the time used by the program from its start. More... | |
This namespace contains the core of the homology computation procedures and related classes and templates contained in the CHomP C++ library.
typedef BitField chomp::homology::bitfield |
A lower-case version of the name of a bit field [deprecated].
Definition at line 58 of file bitfield.h.
A lower-case version of the name of a bit field set [deprecated].
Definition at line 61 of file bitfield.h.
typedef chain<integer> chomp::homology::Chain |
A class for representing a chain with integral coefficients.
Definition at line 86 of file homology.h.
A class for representing a chain complex with integral coefficients.
Definition at line 80 of file homology.h.
typedef chainmap<integer> chomp::homology::ChainMap |
A class for representing a chain map with integral coefficients.
Definition at line 83 of file homology.h.
A typical multivalued map on full cubes in the two-layer setting.
Definition at line 1254 of file twolayer.h.
typedef short int chomp::homology::coordinate |
The default type of coordinates.
Definition at line 63 of file pointset.h.
typedef tCubeBase<coordinate> chomp::homology::Cube |
typedef Cube chomp::homology::cube |
typedef tCube2l<tCubeBase<coordinate> > chomp::homology::Cube2l |
A typical full cube in the two-layer setting.
Definition at line 1248 of file twolayer.h.
typedef SetOfCubes chomp::homology::cubes |
typedef tCell2l<tCellBase<coordinate> > chomp::homology::CubicalCell2l |
A typical cubical cell in the two-layer setting.
Definition at line 1251 of file twolayer.h.
A typical cubical complex in the two-layer setting.
Definition at line 1263 of file twolayer.h.
A typical multivalued cubical-cellular map in the two-layer setting.
Definition at line 1267 of file twolayer.h.
typedef Cube chomp::homology::FullCube |
typedef hashedset<hashNumber<int> > chomp::homology::hashIntQueue |
typedef Cube chomp::homology::HyperCube |
The neighbors class with the default type of coordinates.
Definition at line 84 of file pointset.h.
typedef signed short chomp::homology::numbertype |
The type of number used to store the value of an object of type "integer".
Note that "signed short" (or even "signed char") uses less memory but limits the range of correctly stored numbers which may cause to interrupt the computations in the numbers become too large. Use "signed long" for large prime numbers.
The default type of the point base class.
Definition at line 62 of file pointbas.h.
typedef tPointset<coordinate> chomp::homology::pointset |
The pointset class with the default type of coordinates.
Definition at line 81 of file pointset.h.
typedef CubicalCell chomp::homology::qcell |
The rectangle class with the default type of coordinates.
Definition at line 87 of file pointset.h.
typedef hashedset<Cube> chomp::homology::SetOfCubes |
typedef hashedset<Cube2l> chomp::homology::SetOfCubes2l |
A typical set of full cubes in the two-layer setting.
Definition at line 1257 of file twolayer.h.
A typical set of cubical cells in the two-layer setting.
Definition at line 1260 of file twolayer.h.
typedef hashedset< Simplex > chomp::homology::SetOfSimplices |
A class for representing a set of simplices.
The type of a set of simplices.
Definition at line 89 of file homology.h.
typedef Simplex chomp::homology::simplex |
typedef hashedset<simplex> chomp::homology::simplices |
typedef gcomplex< Simplex, integer > chomp::homology::SimplicialComplex |
A class for representing a simplicial complex.
The type of a simplicial complex.
Definition at line 92 of file homology.h.
typedef short int chomp::homology::theLayerType |
The type of the layer variable.
It holds the values for the layer numbers (0 and 1), as well as the layer numbers of the Cartesian product of cubes obtained from the layers by bitwise OR on the layer of the first cube shifted by 2 bits to the left and the layer of the other cube.
Definition at line 66 of file twolayer.h.
typedef hashedset<word> chomp::homology::words |
Verifies whether the neighborhood of q in X is acyclic.
Uses BDDs for dimensions 2 and 3, and computes homology otherwise.
Definition at line 2007 of file homology.h.
References acyclic(), and getmaxneighbors().
|
inline |
Checks whether the given set of cubes is acyclic.
Returns true if yes, false if not.
Definition at line 113 of file cubacycl.h.
References acyclic(), and cubreducequiet().
|
inline |
Verifies the acyclicity of a neighborhood of the given cube.
Calls the above procedure with a null pointer to the set of neighbors.
Definition at line 174 of file cubacycl.h.
References acyclic().
|
inline |
Verifies the acyclicity of a neighborhood of the given cube.
q | - the cube whose neighborhood is verified |
dim | - the dimension of the cube |
cset | - the set to search for the cubes adjacent to q |
b | - a pointer to a bitfield in which neighbors are marked |
neighbors | - a pointer to a set of cubes to which the neighbors are added (unless BDDs are used) if the pointer is not null |
maxneighbors | - the maximal possible number of neighbors: should be equal to 3^dim - 1 Uses BDDs if available. Marks verified neighbors in b. |
Definition at line 151 of file cubacycl.h.
References acyclic(), bddacyclic(), getneighbors(), and MaxBddDim.
bool chomp::homology::acyclic | ( | gcomplex< cell, euclidom > & | c | ) |
Checks whether this chain complex is acyclic.
This verification destroys the chain complex. Acknowledgement: There was a memory leak here - "hom" was not deleted. Thanks to Marc Niethammer for pointing this out. [July 29, 2004]
Definition at line 1447 of file gcomplex.h.
References collapse(), and createchaincomplex().
|
inline |
Checks whether this cube's nieghbors form an acyclic set.
The set of neighbors is encoded by means of a bitfield. Returns: true = yes, false = no.
Definition at line 70 of file cubacycl.h.
References acyclic(), addneighbors(), bits2int(), chomp::homology::Tabulated::get(), getmaxneighbors(), knownbits, and tabulated.
Referenced by acyclic(), acyclic_rel(), checkacyclicmap(), createcellmap(), chomp::homology::reduction0::cubexpand(), chomp::homology::reduction1::cubexpand(), chomp::homology::reduction0::cubreducequiet(), chomp::homology::reduction1::cubreducequiet(), Homology(), and Homology2l().
bool chomp::homology::acyclic1d | ( | NeighborCheck & | n | ) |
Verifies whether the neighborhood of a 1-dimensional "cube" is acyclic.
Definition at line 49 of file bddacycl.h.
Referenced by bddacyclic(), and chomp::homology::Acyclic1d< SetT >::check().
bool chomp::homology::acyclic2d | ( | NeighborCheck & | n | ) |
Verifies whether the neighborhood of a 2-dimensional "cube" is acyclic.
Definition at line 63 of file bddacycl.h.
Referenced by bddacyclic(), and chomp::homology::Acyclic2d< SetT >::check().
bool chomp::homology::acyclic3d | ( | NeighborCheck & | n | ) |
Verifies whether the neighborhood of a 3-dimensional cube is acyclic.
Definition at line 613 of file bddacycl.h.
Referenced by bddacyclic(), and chomp::homology::Acyclic3d< SetT >::check().
bool chomp::homology::acyclic3d_Malandain | ( | NeighborCheck & | n | ) |
Verifies whether the neighborhood of a 3-dimensional cube is acyclic.
This procedure has been received from G. Malandain, see L. Robert and G. Malandain, Computer Vision and Image Understanding, Fast Binary Image Processing Using Binary Decision Diagrams, October 1998, No. 1, Vol. 72, pp. 1–9.
Definition at line 101 of file bddacycl.h.
Referenced by bddacyclic().
bool chomp::homology::acyclic_rel | ( | const tCube & | q, |
int | dim, | ||
const tSet1 & | cset, | ||
const tSet2 & | other, | ||
BitField * | b, | ||
int_t | maxneighbors, | ||
hashedset< tCube > * | neighbors_main, | ||
hashedset< tCube > * | neighbors_other | ||
) |
Verifies whether a cube from the other set can be removed.
Definition at line 183 of file cubacycl.h.
References acyclic(), bddacyclic(), getneighbors(), makesetunion(), and MaxBddDim.
Referenced by chomp::homology::reduction0::cubreducequiet(), and chomp::homology::reduction1::cubreducequiet().
void chomp::homology::addboundaries | ( | gcomplex< cell, euclidom > & | Xcompl, |
gcomplex< cell, euclidom > & | Acompl, | ||
int | minlevel, | ||
bool | bothsets, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Adds boundaries to the geometric complex X or to both X and A.
Definition at line 835 of file homtools.h.
References addboundaries(), and sout.
Referenced by addboundaries(), chomp::homology::gcomplex< cell, euclidom >::addboundaries(), chomp::homology::gcomplex< cell, euclidom >::collapse(), createcellmap(), creategraph(), decreasedimension(), Homology(), Homology2l(), and remainsacyclic().
|
inline |
Adds the image of the given map to the set of cubes to be kept.
Includes the sets 'Xcubes' and 'Acubes' if this is an index map.
Definition at line 706 of file homtools.h.
References addmapimg().
void chomp::homology::addmapimg | ( | const maptype & | Fcubmap, |
const maptype & | FcubmapA, | ||
const cubsettype & | Xcubes, | ||
const cubsettype & | Acubes, | ||
cubsettype & | Ykeepcubes, | ||
bool | indexmap | ||
) |
Adds the images of both maps to the set of cubes to be kept.
The image of each set is taken using the corresponding map. Includes the sets 'Xcubes' and 'Acubes' if this is an index map.
Definition at line 658 of file homtools.h.
References retrieveimage(), and sout.
Referenced by addmapimg(), and Homology2l().
void chomp::homology::addneighbors | ( | const int & | c, |
const SetT & | s, | ||
QueueT & | q | ||
) |
Adds the neighbors of the cube 'c' in the set 's' to the set 'q'.
Definition at line 1048 of file bincube.h.
References chomp::homology::bincube< Dim, twoPower >::add(), chomp::homology::bincube< Dim, twoPower >::end(), chomp::homology::bincube< Dim, twoPower >::neighborhood_begin(), and chomp::homology::bincube< Dim, twoPower >::neighborhood_end().
Referenced by acyclic(), reduceFullCubesAlg(), and remainsacyclic().
int_t chomp::homology::addneighbors | ( | const tCube & | q, |
const BitField & | bits, | ||
gcomplex< tCell, integer > & | c, | ||
bool | unconditional = false |
||
) |
Adds intersections of neighbors listed in the given bit field with the given cube to the cubical complex.
If not 'unconditional', then adds only cubes which already exist.
Definition at line 386 of file neighbor.h.
References getmaxneighbors().
int_t chomp::homology::addneighbors | ( | const tCube & | q, |
const BitField & | bits, | ||
tCubeSet & | set, | ||
bool | unconditional = false |
||
) |
Adds neighbors listed in the given bit field to the set of cubes.
If not 'unconditional', then adds only cubes which already exist.
Definition at line 364 of file neighbor.h.
References bit2neighbor(), and getmaxneighbors().
int_t chomp::homology::addneighbors | ( | const tCube & | q, |
const BitField & | bits, | ||
tCubeSet & | set, | ||
const tCubeSet & | notthese | ||
) |
Adds neighbors listed in the given bit field to the set of cubes unless they are in the 'forbidden' set.
Returns the number of added neighbors.
Definition at line 342 of file neighbor.h.
References bit2neighbor(), and getmaxneighbors().
|
inline |
A helper function for "collapseVertices".
Definition at line 3498 of file digraph.h.
Referenced by collapseVertices().
|
inline |
A helper function for "collapseVertices2".
Definition at line 3613 of file digraph.h.
Referenced by collapseVertices2().
|
inline |
Allocate a point with 'new'. In case of failure throw an error message.
Definition at line 262 of file pointset.h.
|
inline |
A specialization of the above for C-style strings.
Definition at line 624 of file arg.h.
|
inline |
Adds a command line argument.
The actual argument name consists of the dash and its name provided to the function. If name == 0, then the value of this argument is read directly from the command line without any preceding string. The value variable is filled in by the value read from the command line string using the operator >>.
Definition at line 604 of file arg.h.
Referenced by argbreak(), argoblig(), argstreams(), argswitch(), and chomp::multiwork::mwSubdivMain().
|
inline |
|
inline |
|
inline |
|
inline |
A version of the above which ignores the value of the argument.
Definition at line 731 of file arg.h.
References arg(), chomp::homology::argflags::breakinterpreting, and chomp::homology::argflags::ignorevalue.
|
inline |
A version of the above for the C-style string.
Definition at line 719 of file arg.h.
References arg(), chomp::homology::argflags::breakinterpreting, and chomp::homology::argflags::ignorevalue.
|
inline |
Adds an argument whose appearence interrupts the analysis of the command line and makes the analyzing function return the value of 1.
This is useful for arguments whose appearence should make the program ignore all the remaining arguments, e.g., to display help information.
Definition at line 697 of file arg.h.
References arg(), chomp::homology::argflags::breakinterpreting, and chomp::homology::argflags::ignorevalue.
Referenced by arghelp().
|
inline |
A version of the above with the default value provided.
Definition at line 708 of file arg.h.
References arg(), chomp::homology::argflags::breakinterpreting, and chomp::homology::argflags::ignorevalue.
|
inline |
Adds the typical arguments which should make the program display help information.
If help is requested, the command line analysis is interrupted, and the procedure returns the value 1.
Definition at line 778 of file arg.h.
References argbreak().
Referenced by chomp::multiwork::mwSubdivMain().
|
inline |
A version of the above for reading an array of argument values.
Definition at line 682 of file arg.h.
References arg(), and chomp::homology::argflags::obligatory.
|
inline |
Defines an obligatory command line argument.
If this argument does not appear, then an error is displayed and error code is returned by the analysis procedure.
Definition at line 662 of file arg.h.
References arg(), and chomp::homology::argflags::obligatory.
|
inline |
A version of the above with the default value provided.
Definition at line 672 of file arg.h.
References arg(), and chomp::homology::argflags::obligatory.
|
inline |
Adds typical command line arguments for manipulating output streams.
This is an internal function used by the macro "algstreamprepare".
Definition at line 793 of file arg.h.
References arg(), and argswitch().
|
inline |
Defines an ignored switch (no value is set when this argument appears).
Definition at line 766 of file arg.h.
References arg(), and chomp::homology::argflags::ignorevalue.
|
inline |
A version of the above for the C-style string.
Definition at line 755 of file arg.h.
References arg(), and chomp::homology::argflags::ignorevalue.
|
inline |
Defines a command line argument which is a switch, that is, there is no value given for it in the command line.
The appearence of this argument sets the predefined default value to the given variable.
Definition at line 745 of file arg.h.
References arg(), and chomp::homology::argflags::ignorevalue.
Referenced by argstreams(), and chomp::multiwork::mwSubdivMain().
int chomp::homology::attheborder | ( | const tPointset< coordtype > & | p, |
const coordtype * | c | ||
) |
Verifies if the point is at the border of a given set.
Definition at line 1851 of file pointset.h.
References countneighbors(), and OUTSIDE.
Referenced by computeboundary(), and findboundarypoint().
bool chomp::homology::bddacyclic | ( | const tCube & | q, |
int | dim, | ||
const tCubeSet & | s, | ||
BitField & | b | ||
) |
Uses binary decision diagrams to verify whether the neighborhood of the given cube in the given set is acyclic.
Uses the bitfield provided to record each tested neighbor in. Verifies whether the neighborhood of the given cube is acyclic or not using the code generated from binary decision diagrams.
Definition at line 1198 of file bddacycl.h.
References acyclic1d(), acyclic2d(), acyclic3d(), acyclic3d_Malandain(), and UseMalandainCode.
Referenced by acyclic(), and acyclic_rel().
int chomp::homology::BettiNumber | ( | const chain< euclidom > & | c | ) |
Returns the Betti number that corresponds to the given chain which describes one homology group.
Definition at line 104 of file homology.h.
Referenced by ComputeBettiNumbers().
tCube chomp::homology::bit2neighbor | ( | const tCube & | q, |
int_t | number, | ||
bool | unconditional = false |
||
) |
Creates the neighbor of the given cube with the specified number.
If the coordinates of the neighbor do not belong to 'PointBase', then returns 'q', unless 'unconditional' is set to true.
Definition at line 165 of file neighbor.h.
Referenced by addneighbors(), chomp::homology::Neighbors< cubetype, settype >::check(), and getneighbors_generate().
|
inline |
Specialization of the "bit2neighbor" function for two-layer cubes.
Throws an exception, because there might be more than one neighbor in the given direction.
Definition at line 945 of file twolayer.h.
settype::iterator chomp::homology::bit2neighborAlg | ( | const typename settype::iterator & | q, |
int | n | ||
) |
Definition at line 694 of file bincube.h.
References bit2neighborAlg(), chomp::homology::bincube< Dim, twoPower >::coord2num(), and chomp::homology::bincube< Dim, twoPower >::num2coord().
|
inline |
Definition at line 667 of file bincube.h.
Referenced by bit2neighborAlg(), and chomp::homology::bincube< Dim, twoPower >::neighborhood_iterator::operator++().
|
inline |
Definition at line 48 of file bitcount.h.
References bitcountbyte().
|
inline |
Definition at line 43 of file bitcount.h.
References bitcounttable.
Referenced by bitcount(), and chomp::homology::bincube< Dim, twoPower >::count().
The length must not exceed the size of the integer.
Definition at line 215 of file bitfield.h.
Referenced by acyclic().
cell chomp::homology::boundarycell | ( | const cell & | , |
int | i | ||
) |
Returns the i-th boundary face of a simplex.
Definition at line 347 of file simplex.h.
Returns the i-th boundary face of a simplex.
Definition at line 353 of file simplex.h.
References boundarycell().
|
inline |
Computes the given boundary element of a cell.
Definition at line 914 of file twolayer.h.
References CubicalBoundaryCell().
|
inline |
Computes the given boundary element of a cell.
If only existing cells are considered and the requested cell doesn't exist, returns '*this'.
Definition at line 901 of file twolayer.h.
References CubicalBoundaryCell().
|
inline |
Computes the i-th boundary element of a cell.
Definition at line 493 of file cellbase.h.
References CubicalBoundaryCell().
|
inline |
Computes the i-th boundary element of a cell.
If only existing cells are considered, returns '*this' if the requested boundary cell doesn't exist.
Definition at line 485 of file cellbase.h.
References CubicalBoundaryCell().
Referenced by chomp::homology::gcomplex< cell, euclidom >::addboundaries(), boundarycell(), chomp::homology::gcomplex< cell, euclidom >::collapse(), createchaincomplex(), intersection2l(), chomp::homology::tCube2l< tCube >::setlayers(), and writechaincomplex().
|
inline |
Computes the i-th boundary element of a cell.
Definition at line 504 of file cellfix.h.
References CubicalBoundaryCell().
|
inline |
Computes the i-th boundary element of a cell.
Definition at line 496 of file cellfix.h.
References CubicalBoundaryCell().
|
inline |
Computes the i-th boundary element of a cell.
Definition at line 565 of file cellvar.h.
References CubicalBoundaryCell().
|
inline |
Computes the i-th boundary element of a cell.
Definition at line 557 of file cellvar.h.
References CubicalBoundaryCell().
int chomp::homology::boundarycoef | ( | const cell & | , |
int | i | ||
) |
|
inline |
|
inline |
Returns the given coefficient in the boundary of a cell.
Definition at line 931 of file twolayer.h.
References CubicalBoundaryCoef().
|
inline |
Returns the i-th coefficient in the boundary of a cell.
Definition at line 508 of file cellbase.h.
References CubicalBoundaryCoef().
Referenced by chomp::homology::gcomplex< cell, euclidom >::addboundaries(), createchaincomplex(), and writechaincomplex().
|
inline |
Returns the i-th coefficient in the boundary of a cell.
Definition at line 519 of file cellfix.h.
References CubicalBoundaryCoef().
|
inline |
Returns the i-th coefficient in the boundary of a cell.
Definition at line 580 of file cellvar.h.
References CubicalBoundaryCoef().
int chomp::homology::boundarylength | ( | const cell & | ) |
|
inline |
|
inline |
Returns the length of the boundary of a cell.
Definition at line 924 of file twolayer.h.
References CubicalBoundaryLength().
|
inline |
Returns the length of the boundary of a cell.
Definition at line 501 of file cellbase.h.
References CubicalBoundaryLength().
Referenced by chomp::homology::gcomplex< cell, euclidom >::addboundaries(), chomp::homology::gcomplex< cell, euclidom >::collapse(), createchaincomplex(), intersection2l(), chomp::homology::tCube2l< tCube >::setlayers(), and writechaincomplex().
|
inline |
Returns the length of the boundary of a cell.
Definition at line 512 of file cellfix.h.
References CubicalBoundaryLength().
|
inline |
Returns the length of the boundary of a cell.
Definition at line 573 of file cellvar.h.
References CubicalBoundaryLength().
|
inline |
Computes the smallest prime number greater than or equal to the given number.
Returns the computed prime number.
Definition at line 170 of file pointset.h.
References numberisprime().
Referenced by chomp::homology::tPointset< coordtype >::rehash().
bool chomp::homology::checkacyclicmap | ( | const mvcellmap< tCell, tCoef, tCube > & | Fcellcubmap, |
const char * | Xname | ||
) |
Checks if the image of each element of the domain of this map is acyclic.
Shows messages and a warning if necessary. Returns true = yes.
Definition at line 454 of file homtools.h.
|
inline |
Checks if the image of X by F is contained in the set Y alone.
Displays messages and a warning if necessary. Returns true if yes.
Definition at line 416 of file homtools.h.
References checkimagecontained().
bool chomp::homology::checkimagecontained | ( | const maptype & | Fcubmap, |
const cubsettype & | Xcubes, | ||
const cubsettype & | Ycubes, | ||
const cubsettype & | Bcubes, | ||
const char * | Xname, | ||
const char * | Yname | ||
) |
Checks if the image of X by F is contained in the union of Y and B.
Displays messages and a warning if necessary. Returns true if yes.
Definition at line 384 of file homtools.h.
References sout.
Referenced by checkimagecontained(), Homology(), and Homology2l().
bool chomp::homology::checkimagedisjoint | ( | const maptype & | Fcubmap, |
const cubsettype & | Acubes, | ||
const cubsettype & | Ycubes, | ||
const char * | Aname, | ||
const char * | Yname | ||
) |
Checks if the image of A by F is disjoint from Y (actually, from Y\B).
Displays messages and a warning if necessary. Returns true if yes.
Definition at line 428 of file homtools.h.
References sout.
Referenced by Homology(), and Homology2l().
|
inline |
Checks for the inclusion of X in Y.
Displays messages and a warning if necessary. Returns the result: true = passed.
Definition at line 374 of file homtools.h.
References checkinclusion().
bool chomp::homology::checkinclusion | ( | const cubsettype & | Xcubes, |
const cubsettype & | Ycubes, | ||
const cubsettype & | Bcubes, | ||
const char * | Xname, | ||
const char * | YBname | ||
) |
Checks if X is a subset of the union of Y and B.
Displays messages and a warning if necessary. Returns the result: true = passed.
Definition at line 349 of file homtools.h.
References sout.
Referenced by checkinclusion(), and Homology().
|
inline |
Returns the matching closing parenthesis for the given opening one or EOF if none.
Definition at line 411 of file textfile.h.
Referenced by operator>>(), readcubeorcell(), ReadCubicalCell(), ReadCubicalMap(), readimage(), readparenthesis(), readtheset(), scancubes(), and write().
|
inline |
Collapses a single geometric complex.
This version does not take any complex to keep.
Definition at line 800 of file homtools.h.
References collapse().
|
inline |
Collapses a pair of geometric complexes.
This version does not take any complex to keep.
Definition at line 773 of file homtools.h.
References collapse().
void chomp::homology::collapse | ( | gcomplex< cell, euclidom > & | Xcompl, |
gcomplex< cell, euclidom > & | Acompl, | ||
gcomplex< cell, euclidom > & | Xkeepcompl, | ||
const char * | Xname, | ||
const char * | Aname, | ||
bool | addbd = true , |
||
bool | addcob = false , |
||
bool | disjoint = true , |
||
const int * | level = NULL |
||
) |
Collapses a pair of geometric complexes.
Definition at line 742 of file homtools.h.
References collapse(), and sout.
Referenced by acyclic(), chomp::homology::gcomplex< cell, euclidom >::collapse(), collapse(), createcellmap(), Homology(), and Homology2l().
|
inline |
Collapses a single geometric complex.
Definition at line 786 of file homtools.h.
References collapse().
|
inline |
Collapses disjoint subsets of vertices to single vertices and creates a corresponding graph in which the first vertices come from the collapsed ones.
The result graph must be initially empty. Saves translation table from old to new vertex numbers. The table must have sufficient length.
Definition at line 3530 of file digraph.h.
References addRenumEdges().
|
inline |
Collapses (possibly non-disjoint) subsets of vertices to single vertices and creates a corresponding graph in which the first vertices come from the collapsed ones.
The result graph must be initially empty.
Definition at line 3656 of file digraph.h.
References addRenumEdges2().
|
inline |
Returns the entire command line as a single string.
Definition at line 441 of file textfile.h.
|
inline |
Computes the left and right corner of a cell which is the intersection of the two given cubes.
Returns the actual dimension of this cell.
Definition at line 328 of file cellmain.h.
Referenced by chomp::homology::tCellBase< coordtype >::tCellBase(), and chomp::homology::tCellFix< dimfix, coordtype >::tCellFix().
void chomp::homology::ComputeBettiNumbers | ( | bincube< dim, twoPower > & | b, |
int * | result | ||
) |
Computes the Betti Numbers of a set of full cubes in a bincube.
This procedure makes use of the technique of splitting the set of cubes into connected components and computing relative homology of each component with respect to some cube in each of them.
Definition at line 2028 of file homology.h.
References BettiNumber(), Homology(), reduceFullCubes(), chomp::homology::tPointBase< coordtype >::setwrapping(), ShowHomology(), and sout.
Referenced by ComputeBettiNumbers().
void chomp::homology::ComputeBettiNumbers | ( | char * | binary_buffer, |
int * | result, | ||
const coordtype * | space_wrapping = 0 |
||
) |
Computes the Betti Numbers of the Homology of a full cubical set defined by means of an n-dimensional bitmap.
The size of this bitmap in each direction must equal 2^n, where n=twoPower. The subsequent bits of the binary buffer correspond to the cubes (0,0,...,0), (1,0,...,0), (2,0,...,0), ..., (2^n-1,0,...,0), then (0,1,0,...,0), (1,1,0,...,0), ..., (2^n-1,1,0,...,0), ..., (2^n-1,...,2^n-1). That is, the first coordinate changes the fastest, the second changes less frequently, and the last one changes the slowest.
Definition at line 2152 of file homology.h.
References ComputeBettiNumbers(), and sout.
void chomp::homology::ComputeBettiNumbers | ( | coordtype * | coord, |
int | n, | ||
int | dim, | ||
int * | result | ||
) |
Computes the Betti numbers of the given set of full cubes.
coord | - a table of coordinates of all the cubes; the i-th coordinate of the k-th cube is stored in coord [dim * k + i] |
n | - the number of cubes in the table, |
dim | - the space dimension, |
result | - a table into which the result is written; its size must be at least (dim + 1), |
Definition at line 2194 of file homology.h.
References BettiNumber(), Homology(), chomp::homology::tCubeBase< coordtype >::MaxDim, scon, and sout.
void chomp::homology::computeboundary | ( | const tPointset< coordtype > & | p, |
tPointset< coordtype > & | b | ||
) |
Definition at line 1930 of file pointset.h.
References attheborder().
tPointset< coordtype > * chomp::homology::computeboundary | ( | tPointset< coordtype > & | p | ) |
Creates the set of all the boundary points with the 'new' operator.
Definition at line 1944 of file pointset.h.
References computeboundary().
Referenced by computeboundary().
void chomp::homology::computeboundary | ( | tPointset< coordtype > & | p, |
tPointset< coordtype > & | b | ||
) |
Computes the boundary points of the given set and adds them to the other set of points.
int_t chomp::homology::computeimage | ( | hashedset< tCube > & | img, |
const tCell & | face, | ||
const mvmap< tCube, tCube > & | map, | ||
const tSet & | cset, | ||
const tCube & | ignore | ||
) |
Computes the image of the face under the combinatorial cubical multivalued map, but doesn't take the given cube into consideration.
Returns the number of cubes whose images were added to 'img'.
Definition at line 235 of file cubacycl.h.
Referenced by remainsacyclic().
|
inline |
Computes the period of a strongly connected graph.
The period of a graph is defined as the greatest common divisor of the lengths of all the cycles in the graph. Period 1 means that the graph is aperiodic. The complexity of this operation is linear (one DFS).
Definition at line 3879 of file digraph.h.
|
inline |
Computes the graph that represents connections between a number of the first vertices in the given graph.
The vertices of the result graph are the first "nVert" vertices from the source graph. An edge is added to the new graph iff there exists a path from one vertex to another, without going through any other vertex in that set. Runs DFS starting from each of the first "nVert" vertices, and thus may be a little inefficient in some cases.
Definition at line 3769 of file digraph.h.
|
inline |
Copies the coordinates of one point to another.
Definition at line 108 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::add(), chomp::homology::tCellBase< coordtype >::leftcoord(), chomp::homology::tCellVar< coordtype >::operator=(), chomp::homology::tCubeVar< coordtype >::operator=(), chomp::homology::tPointset< coordtype >::remove(), chomp::homology::tCellBase< coordtype >::rightcoord(), chomp::homology::tCellFix< dimfix, coordtype >::tCellFix(), chomp::homology::tCellVar< coordtype >::tCellVar(), chomp::homology::tCubeVar< coordtype >::tCubeVar(), and chomp::homology::tPointBase< coordtype >::wrapcopy().
int chomp::homology::countneighbors | ( | const tPointset< coordtype > & | p, |
const coordtype * | c, | ||
int | which = 1 , |
||
int | maxcount = 0 |
||
) |
Counts how many neighbors of the point there are in the set, depending on 'which': 1 = in the set, 0 = out of the set.
Returns the number of neighbors of the given point in a given set.
If 'maxcount' > 0 then counts up to this number and quits. Use countneighbors (c, OUTSIDE, 1) to check for a boundary point or countneighbors (c, INSIDE, 1) to check if the point is not isolated.
Definition at line 1785 of file pointset.h.
References INSIDE, and OUTSIDE.
Referenced by attheborder(), countneighbors(), and findboundarypoint().
int chomp::homology::countneighbors | ( | const tPointset< coordtype > & | p, |
const tPointset< coordtype > & | q, | ||
const coordtype * | c, | ||
int | which = 1 , |
||
int | maxcount = 0 |
||
) |
Counts neighbors with respect to the union of the sets 'p' and 'q'.
int chomp::homology::countneighbors | ( | const tPointset< coordtype > & | p, |
const tPointset< coordtype > & | q, | ||
coordtype * | c, | ||
int | which, | ||
int | maxcount | ||
) |
Definition at line 1819 of file pointset.h.
References countneighbors(), INSIDE, and OUTSIDE.
bool chomp::homology::createcellmap | ( | const mvcellmap< cell, euclidom, element > & | m, |
const mvcellmap< cell, euclidom, element > & | rel, | ||
mvcellmap< cell, euclidom, cell > & | cm, | ||
bool | verifyacyclicity | ||
) |
Creates the graph of the map as a cell complex while reducing as possible.
Note: There must be a constructor for 'cell' from 'element' and the Cartesian product operator for cells. The domain of 'rel' must be a subset of the domain of 'm'. If the acyclicity is to be verified, returns true if Ok, false if not.
Definition at line 1948 of file gcomplex.h.
References acyclic(), addboundaries(), collapse(), and scon.
void chomp::homology::createcellmap | ( | const mvcellmap< cell, euclidom, element > & | m, |
mvcellmap< cell, euclidom, cell > & | cm | ||
) |
Creates the graph of the map as a cell complex while reducing as possible.
Note: There must be a constructor for 'cell' from 'element' and the Cartesian product operator for cells.
Definition at line 1874 of file gcomplex.h.
References collapse(), and scon.
Referenced by Homology(), and Homology2l().
chaincomplex< euclidom > & chomp::homology::createchaincomplex | ( | chaincomplex< euclidom > & | c, |
const gcomplex< cell, euclidom > & | g, | ||
bool | quiet = false |
||
) |
Creates an algebraic chain complex based on the data from the given geometric cell complex.
Boundary formulas are restricted to cells which are in the geom. complex. The chain complex should already be initialized with the right dimension.
Definition at line 1128 of file gcomplex.h.
References boundarycell(), boundarycoef(), boundarylength(), and scon.
Referenced by acyclic(), Homology(), and Homology2l().
chaincomplex< euclidom > & chomp::homology::createchaincomplex | ( | chaincomplex< euclidom > & | c, |
const gcomplex< cell, euclidom > & | g, | ||
const gcomplex< cell, euclidom > & | rel, | ||
bool | quiet = false |
||
) |
Creates a relative algebraic chain complex with the data from the given pair of geometric cell complexes.
Boundary formulas are restricted to cells which are in the geom. complex. The chain complex should already be initialized with the right dimension.
Definition at line 1260 of file gcomplex.h.
References boundarycell(), boundarycoef(), boundarylength(), and scon.
void chomp::homology::creategraph | ( | const mvcellmap< cell, euclidom, element > & | m, |
const gcomplex< cell, euclidom > & | rel, | ||
gcomplex< cell, euclidom > & | c, | ||
bool | addbd | ||
) |
Creates the full graph of a map as a cellular complex.
Note: There must be a constructor for 'cell' from 'element' and the Cartesian product operator for cells.
Definition at line 1828 of file gcomplex.h.
References addboundaries(), and scon.
void chomp::homology::creategraph | ( | const mvcellmap< cell, euclidom, element > & | m, |
gcomplex< cell, euclidom > & | c, | ||
bool | addbd | ||
) |
Creates the full graph of a map as a cellular complex.
Note: There must be a constructor for 'cell' from 'element' and the Cartesian product operator for cells.
Definition at line 1788 of file gcomplex.h.
References addboundaries(), and scon.
gcomplex< cell, euclidom > & chomp::homology::creategraph | ( | const mvmap< cell, cell > & | m, |
gcomplex< cell, euclidom > & | graph | ||
) |
Add a graph of a multivalued cell map to the cell complex.
Definition at line 1429 of file gcomplex.h.
Referenced by Homology(), and Homology2l().
hashedset< imgelement > & chomp::homology::creategraph | ( | const mvmap< domelement, imgelement > & | m, |
hashedset< imgelement > & | graph | ||
) |
Adds a graph of a multivalued map to the given set.
The operator * is used to create the Cartesian products (pairs) of elements from the domain and elements in their images.
Definition at line 1141 of file hashsets.h.
|
inline |
A wrapper for the above function if there is only one map.
Definition at line 221 of file cubmaps.h.
References createimages().
|
inline |
A wrapper for the above function if there is only one map.
Definition at line 200 of file cubmaps.h.
References createimages().
int_t chomp::homology::createimages | ( | mvcellmap< tCell, euclidom, tCube > & | m, |
const mvmap< tCube, tCube > & | f1, | ||
const mvmap< tCube, tCube > & | f2 | ||
) |
Creates images of cells in m as unions of cubes determined by f1 and f2.
Return the total number of cubes in all the images of cells.
Definition at line 211 of file cubmaps.h.
References createimages().
int_t chomp::homology::createimages | ( | mvcellmap< tCell, euclidom, tCube > & | m, |
const mvmap< tCube, tCube > & | f1, | ||
const mvmap< tCube, tCube > & | f2, | ||
const hashedset< tCube > & | dom1, | ||
const hashedset< tCube > & | dom2 | ||
) |
Creates images of cells in 'm' as unions of cubes determined by f1 and f2.
The domains of interest must be given explicitly. Returns the total number of cubes in all the images of cells.
Definition at line 147 of file cubmaps.h.
Referenced by createimages(), Homology(), and Homology2l().
int_t chomp::homology::createimages | ( | mvcellmap< tCell2l< tCell >, euclidom, tCube2l< tCube > > & | m, |
const mvmap< tCube2l< tCube >, tCube2l< tCube > > & | f1, | ||
const mvmap< tCube2l< tCube >, tCube2l< tCube > > & | f2, | ||
const hashedset< tCube2l< tCube > > & | dom1, | ||
const hashedset< tCube2l< tCube > > & | dom2 | ||
) |
Specialization of the "createimages" function for two-layer cubes.
This function creates images of cells in 'm' as unions of cubes determined by f1 and f2. The domains of interest are given explicitly. Returns the total number of cubes in all the images of cells.
Definition at line 1140 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::identify().
void chomp::homology::createprojection | ( | const gcomplex< tCell, euclidom > & | Fcompl, |
const gcomplex< tCell, euclidom > & | Ycompl, | ||
chainmap< euclidom > & | cmap, | ||
int | offset, | ||
int | outdim, | ||
int | discarddim, | ||
int * | level = NULL |
||
) |
Creates the chain map of the projection from a cell complex of the graph of a map to a cell complex of the codomain of the map.
If a table of levels is given, creates the map only at given levels.
Definition at line 237 of file cubmaps.h.
Referenced by Homology(), and Homology2l().
|
inline |
Converts one cube into another.
Definition at line 58 of file cubemain.h.
|
inline |
Computes the middle of a cube with its left lower etc.
corner represented by the given point with respect to the given grid.
Definition at line 245 of file pointset.h.
void chomp::homology::cubes2cells | ( | tCubes & | Xcubes, |
gcomplex< tCell, tCoef > & | Xcompl, | ||
const char * | Xname, | ||
bool | deletecubes = true |
||
) |
Transforms cubes to full-dimensional cells.
Definition at line 716 of file homtools.h.
References sout.
Referenced by Homology(), and Homology2l().
int_t chomp::homology::cubexpand | ( | hashedset< tCube > & | cset, |
hashedset< tCube > & | other, | ||
bool | quiet = false |
||
) |
Expands the set 'other' towards 'cset' without changing the homology of (cset + other, other).
The two sets must be disjoint.
Definition at line 153 of file cubisets.h.
References cubexpand().
Referenced by cubexpand(), and expandAinX().
|
inline |
Expands the set 'other' towards 'cset' without changing the homology of (cset + other, other).
The two sets must be disjoint. Increases 'img' if necessary to cover F (other), but moves cubes only if it can prove that the inclusion of the old 'img' into the new, enlarged 'img' induces an isomorphism in homology. Every cube added to 'img' is removed from 'imgsrc'.
Definition at line 167 of file cubisets.h.
References cubexpand().
|
inline |
Returns the i-th cell in the boundary of the given cell.
Definition at line 143 of file cellmain.h.
References CubicalBoundaryCell().
|
inline |
Returns the i-th boundary element of a cell.
If only existing cells are considered, returns '*this' if the requested boundary cell doesn't exist.
For a cubical cell whose non-zero intervals in the Cartesian product are [p1-,p1+], [p2-,p2+], etc., the boundary is an alternating sum of cells in which these intervals are replaced by single elements, first by those with larger values (signs begin with a '+'), and then by those with smaller values (signs begin with a '-').
Definition at line 72 of file cellmain.h.
Referenced by boundarycell(), and CubicalBoundaryCell().
|
inline |
Returns the i-th coefficient in the boundary of a cubical cell.
Definition at line 157 of file cellmain.h.
Referenced by boundarycoef().
|
inline |
Returns the length of the boundary of a cubical cell.
Definition at line 150 of file cellmain.h.
Referenced by boundarylength().
|
inline |
Reduces a set of cubes towards the main set.
Returns the number of cubes removed from the set.
Definition at line 139 of file cubisets.h.
References cubreducequiet().
|
inline |
Reduces a pair of sets of cubes for relative homology computation.
Does not remove any cubes from the set 'keep'. Returns the number of cubes removed from both sets.
Definition at line 116 of file cubisets.h.
References cubreducequiet().
|
inline |
Reduces a pair of sets of cubes for relative homology computation.
Does not remove any cubes from the set 'keep'. Additionally makes sure that the acyclicity of the given map is preserved. Returns the number of cubes removed from both sets.
Definition at line 91 of file cubisets.h.
References cubreducequiet().
Referenced by reducepair().
int_t chomp::homology::cubreducequiet | ( | const hashedset< tCube > & | maincset, |
hashedset< tCube > & | cset, | ||
bool | quiet = true |
||
) |
Reduce the set 'cset' towards 'maincset'.
These sets must be disjoint. If 'quiet' is set to true, then suppresses any messages. Returns the number of cubes removed from 'cset'.
Definition at line 126 of file cubisets.h.
References cubreducequiet().
|
inline |
Reduces a pair of sets of cubes for relative homology computation.
Does not remove any cubes from the set 'keep'. If 'quiet' is set to true, then suppresses any messages. Returns the number of cubes removed from both sets.
Definition at line 102 of file cubisets.h.
References cubreducequiet().
|
inline |
Reduces a pair of sets of cubes for relative homology computation.
Does not remove any cubes from the set 'keep'. Additionally makes sure that the acyclicity of the given map is preserved. If 'quiet' is set to true then suppresses any messages. Returns the number of cubes removed from both sets.
Definition at line 76 of file cubisets.h.
References cubreducequiet().
Referenced by acyclic(), cubreduce(), cubreducequiet(), chomp::homology::MapCanExpand< tCube >::operator()(), and remainsacyclic().
|
inline |
Retrieves the current time as a pointer to a C-style string.
Definition at line 454 of file textfile.h.
Referenced by chomp::multiwork::mwSubCoordinator< dim, coord >::mwSubCoordinator(), and chomp::multiwork::mwSubCoordinator< dim, coord >::~mwSubCoordinator().
void chomp::homology::decreasedimension | ( | gcomplex< cell, euclidom > & | Acompl, |
int | dim, | ||
const char * | name | ||
) |
Decreases the dimension of the geometric complex by adding boundary cells to all the cells on higher dimensions and then removing these cells.
Definition at line 813 of file homtools.h.
References addboundaries(), and sout.
Referenced by chomp::homology::gcomplex< cell, euclidom >::collapse(), Homology(), Homology2l(), chomp::homology::gcomplex< cell, euclidom >::remove(), and chomp::homology::gcomplex< cell, euclidom >::removeall().
void chomp::homology::enhance | ( | tPointset< coordtype > & | p | ) |
Enhances the set of points by adding to it all the neighbors of all the points in the set.
Definition at line 1984 of file pointset.h.
References enhancepoint().
void chomp::homology::enhancepoint | ( | tPointset< coordtype > & | p, |
coordtype * | c | ||
) |
Enhances the set by adding the neighborhood of the point with given coordinates.
Definition at line 1965 of file pointset.h.
Referenced by enhance(), and enhancepoint().
void chomp::homology::enhancepoint | ( | tPointset< coordtype > & | p, |
int_t | n | ||
) |
Enhances the set by adding the neighborhood of the point with given number.
Definition at line 1976 of file pointset.h.
References enhancepoint().
int chomp::homology::ExitSetM | ( | const TSetOfCubes & | N, |
const TSetOfCubes & | Q1, | ||
const TMap & | F, | ||
TSetOfCubes & | resultQ2 | ||
) |
Computes iteratively Q2 := (F (Q1 + Q2) - Q1) * N.
Definition at line 328 of file indxpalg.h.
Referenced by IndexPairM().
void chomp::homology::expandAinX | ( | cubsettype & | Xcubes, |
cubsettype & | Acubes, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Expands the other element of the pair into the main portion of the set.
Definition at line 580 of file homtools.h.
References cubexpand(), and sout.
Referenced by Homology(), and Homology2l().
void chomp::homology::expandAinX | ( | cubsettype & | Xcubes, |
cubsettype & | Acubes, | ||
cubsettype & | Ycubes, | ||
cubsettype & | Bcubes, | ||
const maptype & | Fcubmap, | ||
const char * | Xname, | ||
const char * | Aname, | ||
const char * | Bname, | ||
bool | indexmap, | ||
bool | checkacyclic | ||
) |
Expands the other element of the pair into the main portion of the set.
Definition at line 595 of file homtools.h.
References cubexpand(), and sout.
chain< euclidom > ** chomp::homology::ExtractGenerators | ( | const chaincomplex< euclidom > & | cx, |
chain< euclidom > * | hom, | ||
int | maxlevel | ||
) |
Extracts homology generators from a chain complex in the simple form.
Returns a pointer to an allocated table of tables of chains each of which defines one generator of the homology module at the specified level. Returns the zero pointer in case of error or if the homology is trivial.
Definition at line 339 of file homology.h.
Referenced by Homology(), and Homology2l().
|
inline |
Throws a message about the inability to do something with a file.
By default this is a problem with opening the file, but another name of this action may be provided.
Definition at line 532 of file textfile.h.
References ERRORMSG, and THROW.
Referenced by ReadBitmapFile(), readmapdomain(), readmapimage(), readmaprestriction(), readtheset(), savetheset(), and scancubes().
int_t chomp::homology::findboundarypoint | ( | tPointset< coordtype > & | p, |
int_t | n, | ||
int | direction = 1 |
||
) |
Finds a boundary point starting at the given one.
Call with n = 0 to find the first boundary point. Direction: 1 - in ascending order, -1 - in descending order. Returns -1 if not found.
Definition at line 1858 of file pointset.h.
References attheborder().
int_t chomp::homology::findboundarypoint | ( | tPointset< coordtype > & | p, |
tPointset< coordtype > & | q, | ||
int_t | n, | ||
int | direction = 1 |
||
) |
Finds a point in 'p' at the boundary of the union of 'p' and 'q'.
Definition at line 1894 of file pointset.h.
References countneighbors(), and OUTSIDE.
int_t chomp::homology::findelem | ( | const multitable< element > & | tab, |
const element & | e, | ||
int_t | len | ||
) |
Finds the given element in the table of given length.
Return its index or -1 if not found.
Definition at line 705 of file gcomplex.h.
Referenced by chomp::homology::gcomplex< cell, euclidom >::collapse().
|
inline |
Returns the maximal number of neighbors of a cube: 3^dim - 1.
Definition at line 60 of file neighbor.h.
Referenced by acyclic(), addneighbors(), chomp::homology::reduction0::cubexpand(), chomp::homology::reduction1::cubexpand(), chomp::homology::reduction0::cubreducequiet(), chomp::homology::reduction1::cubreducequiet(), getneighbors(), getneighbors_generate(), and remainsacyclic().
int_t chomp::homology::getneighbors | ( | const tCube & | q, |
BitField * | bits, | ||
const tCubeSet & | theset, | ||
int_t | limit | ||
) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided.
Returns the number of neighbors. If the limit is nonzero then quits after having found that many neighbors.
Definition at line 326 of file neighbor.h.
References getneighbors().
int_t chomp::homology::getneighbors | ( | const tCube & | q, |
BitField * | bits, | ||
const tCubeSet1 & | theset, | ||
tCubeSet2 * | neighbors, | ||
int_t | limit | ||
) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided.
Returns the number of neighbors. If the limit is nonzero then quits after having found that many neighbors.
Definition at line 302 of file neighbor.h.
References getmaxneighbors(), getneighbors_generate(), and getneighbors_scan().
Referenced by acyclic(), acyclic_rel(), chomp::homology::reduction1::addcubeneighbors(), chomp::homology::reduction1::cubexpand(), getneighbors(), remainsacyclic(), restrictAtoneighbors(), and chomp::homology::tCube2l< tCube >::setlayers().
int_t chomp::homology::getneighbors_generate | ( | const tCube & | q, |
BitField * | bits, | ||
const tCubeSet1 & | theset, | ||
tCubeSet2 * | neighbors, | ||
int_t | limit | ||
) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided.
Returns the number of neighbors. If the limit is nonzero then quits after having found that many neighbors. Generates all the possible neighbors.
Definition at line 255 of file neighbor.h.
References bit2neighbor(), and getmaxneighbors().
Referenced by getneighbors().
int_t chomp::homology::getneighbors_generate | ( | const tCube2l< tCube > & | q2l, |
BitField * | bits, | ||
const tCubeSet1 & | theset, | ||
tCubeSet2 * | neighbors, | ||
int_t | limit | ||
) |
Specialization of the function which gets neighbors of the given cube by generating all the possible neighbors and checking if they are present in the given set.
Definition at line 1070 of file twolayer.h.
References bit2neighbor(), getmaxneighbors(), intersection2l(), chomp::homology::tCube2l< tCube >::layer0(), and chomp::homology::tCube2l< tCube >::layer1().
int_t chomp::homology::getneighbors_scan | ( | const tCube & | q, |
BitField * | bits, | ||
const tCubeSet1 & | theset, | ||
tCubeSet2 * | neighbors, | ||
int_t | limit | ||
) |
Gets neighbors of the given cube from the given set and indicates them in the bit field provided.
Returns the number of neighbors. If the limit is nonzero then quits after having found that many neighbors. Scans through the entire set of cubes.
Definition at line 211 of file neighbor.h.
References neighbor2bit().
Referenced by getneighbors().
int_t chomp::homology::getneighbors_scan | ( | const tCube2l< tCube > & | q2l, |
BitField * | bits, | ||
const tCubeSet1 & | theset, | ||
tCubeSet2 * | neighbors, | ||
int_t | limit | ||
) |
Specialization of the function which gets neighbors of the given cube by scanning the entire set of possible neighbors.
Definition at line 1003 of file twolayer.h.
References intersection2l(), chomp::homology::tCube2l< tCube >::layer0(), and neighbor2bit().
|
inline |
Creates the adjacency matrix of the given graph.
m [i] [j] is set to 1 if the graph g contains the edge i -> j, using the assignment operator.
Definition at line 4318 of file digraph.h.
Referenced by transitiveReduction().
|
inline |
The first hashing key.
Definition at line 1029 of file bincube.h.
Referenced by chomp::homology::hashedset< element, hashkeys >::hashfind(), chomp::homology::tCube2l< tCube >::hashkey1(), chomp::homology::tCell2l< tCell >::hashkey1(), chomp::homology::HashingGlobal< element >::hashkey1(), and hashkey1().
|
inline |
|
inline |
Definition at line 400 of file cellfix.h.
References hashkey1().
|
inline |
Definition at line 270 of file twolayer.h.
References hashkey1().
|
inline |
|
inline |
Definition at line 221 of file cubefix.h.
References hashkey1().
|
inline |
|
inline |
The second hashing key.
Definition at line 1036 of file bincube.h.
Referenced by chomp::homology::hashedset< element, hashkeys >::hashfind(), chomp::homology::tCube2l< tCube >::hashkey2(), chomp::homology::tCell2l< tCell >::hashkey2(), chomp::homology::HashingGlobal< element >::hashkey2(), and hashkey2().
|
inline |
|
inline |
Definition at line 424 of file cellfix.h.
References hashkey2().
|
inline |
Definition at line 282 of file twolayer.h.
References hashkey2().
|
inline |
|
inline |
Definition at line 244 of file cubefix.h.
References hashkey2().
|
inline |
int chomp::homology::Homology | ( | chaincomplex< euclidom > & | cx, |
const char * | Xname, | ||
chain< euclidom > *& | hom | ||
) |
Transforms the chain complex into a simple form and compute its homology.
The changes of bases are reflected in all the chain maps whose domain or codomain this chain complex is. If the generators of the chain complex are to be retrieved, the input chain complex must be created with a suitable option, and the function ExtractGenerators can be used to extract them. The table 'hom' is allocated or set to 0 in case of trivial homology. Returns the number of the highest nontrivial homology level or -1 if none.
Definition at line 379 of file homology.h.
References sout.
Referenced by ComputeBettiNumbers(), Homology(), and Homology2l().
int chomp::homology::Homology | ( | gcomplex< cell, euclidom > & | Xcompl, |
const char * | Xname, | ||
chain< euclidom > *& | hom, | ||
chain< euclidom > *** | gen = 0 |
||
) |
Computes the homology of a given cubical complex.
All the boundary cells must be present (use the function for pairs with an empty set A or "X. addboundaries ()" to add boundaries if necessary), because missing cells give rise to missing generators of the corresponding chain complex which indicates a relative cubical complex. Destroy the contents of X before running the algebraic computations. If 'gen' is given, the contents of X is not destroyed, and *gen is set to point to a newly allocated table of tables of chains each of which defines one generator of the homology module at a specified level. Returns the number of the highest nontrivial homology level or -1 if none.
Definition at line 425 of file homology.h.
References createchaincomplex(), ExtractGenerators(), Homology(), and sout.
int chomp::homology::Homology | ( | gcomplex< cell, euclidom > & | Xcompl, |
const char * | Xname, | ||
gcomplex< cell, euclidom > & | Acompl, | ||
const char * | Aname, | ||
chain< euclidom > *& | hom, | ||
chain< euclidom > *** | gen = 0 |
||
) |
Computes the relative homology of the given pair of cubical complexes.
Begins with adding boundaries to the cells in A and in X while removing from X all the cells that appear in A to make X a relative cell complex. Destroys the contents of X and A before running the algebraic computations unless homology generators are to be retrieved. Note that if A is empty then all possible boundaries will be added to X. Returns the number of the highest nontrivial homology level or -1 if none.
Definition at line 544 of file homology.h.
References collapse(), Homology(), and sout.
int chomp::homology::Homology | ( | hashedset< cubetype > & | Xcubes, |
const char * | Xname, | ||
chain< euclidom > *& | hom, | ||
chain< euclidom > *** | gen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gcompl = 0 |
||
) |
Computes the homology of a given set of cubes.
The set is destroyed. If the generators are to be retrieved, the table 'gen' is allocated as in the Homology function for geometric complexes, and the pointer pointed to by 'gcompl' is set to the cubical complex arising in the computations. Returns the number of the highest nontrivial homology level or -1 if none.
Definition at line 469 of file homology.h.
References collapse(), cubes2cells(), Homology(), knownbits, reducepair(), and sout.
int chomp::homology::Homology | ( | hashedset< cubetype > & | Xcubes, |
const char * | Xname, | ||
hashedset< cubetype > & | Acubes, | ||
const char * | Aname, | ||
chain< euclidom > *& | hom, | ||
chain< euclidom > *** | gen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gcompl = 0 |
||
) |
Computes the relative homology of a given pair of sets of cubes.
Modifies the sets and then destroys them during the computations. If homology generators are to be retrieved, no expansion of A in X is performed. If the generators are to be retrieved, the table 'gen' is allocated as in the Homology function for geometric complexes, and the pointer pointed to by 'gcompl' is set to the cubical complex arising in the computations. Returns the number of the highest nontrivial homology level or -1 if none.
Definition at line 599 of file homology.h.
References cubes2cells(), expandAinX(), Homology(), knownbits, reducepair(), removeAfromX(), and restrictAtoneighbors().
int chomp::homology::Homology | ( | mvmap< cubetype, cubetype > & | Fcubmap, |
const char * | Fname, | ||
hashedset< cubetype > & | Xcubes, | ||
const char * | Xname, | ||
hashedset< cubetype > & | Acubes, | ||
const char * | Aname, | ||
chain< euclidom > *& | hom, | ||
int & | maxlevel, | ||
chainmap< euclidom > *& | hom_f, | ||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gycompl = 0 |
||
) |
Computes the endomorphism induced in homology by a combinatorial cubical multivalued map.
See the description of the previous function for details.
Definition at line 1308 of file homology.h.
References Homology().
int chomp::homology::Homology | ( | mvmap< cubetype, cubetype > & | Fcubmap, |
const char * | Fname, | ||
hashedset< cubetype > & | Xcubes, | ||
const char * | Xname, | ||
hashedset< cubetype > & | Acubes, | ||
const char * | Aname, | ||
hashedset< cubetype > & | Ycubes, | ||
const char * | Yname, | ||
hashedset< cubetype > & | Bcubes, | ||
const char * | Bname, | ||
chain< euclidom > *& | hom_cx, | ||
int & | maxlevel_cx, | ||
chain< euclidom > *& | hom_cy, | ||
int & | maxlevel_cy, | ||
chainmap< euclidom > *& | hom_f, | ||
bool | inclusion = false , |
||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gycompl = 0 |
||
) |
Computes the homomorphism induced in homology by a combinatorial cubical multivalued map.
Deletes the contents of X, A, Y, B and F when used. Fills in the given data with the computed result. If 'inclusion' is true, then composes the result with the inverse of the homomorphism induced in homology by the inclusion (X,A) -> (Y,B). If the inclusion is not invertible, throws an error message. Note that (X,A) and (Y,B) are modified independently, so you can't just pass the same sets to this procedure; you must clone them first. Set 'careful' bits: 0x01 = basic data verification, 0x02 = preserve the map's acyclicity in reductions (this can be slow!). Displays the computed homology and homomorphisms to the screen. Returns the highest nontrivial homology level for the map or -1 if none.
Definition at line 768 of file homology.h.
References acyclic(), addboundaries(), checkimagecontained(), checkimagedisjoint(), checkinclusion(), collapse(), createcellmap(), createchaincomplex(), creategraph(), createimages(), createprojection(), cubes2cells(), decreasedimension(), expandAinX(), ExtractGenerators(), Homology(), inclusion(), knownbits, project(), reducepair(), removeAfromX(), restrictAtoneighbors(), sbug, and sout.
int chomp::homology::Homology | ( | mvmap< cubetype, cubetype > & | Fcubmap, |
hashedset< cubetype > & | Xcubes, | ||
hashedset< cubetype > & | Acubes, | ||
chain< euclidom > *& | hom, | ||
int & | maxlevel, | ||
chainmap< euclidom > *& | hom_f, | ||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gycompl = 0 |
||
) |
A version of the above procedure with the default names.
Definition at line 1331 of file homology.h.
References Homology().
int chomp::homology::Homology | ( | mvmap< cubetype, cubetype > & | Fcubmap, |
hashedset< cubetype > & | Xcubes, | ||
hashedset< cubetype > & | Acubes, | ||
hashedset< cubetype > & | Ycubes, | ||
hashedset< cubetype > & | Bcubes, | ||
chain< euclidom > *& | hom_cx, | ||
int & | maxlevel_cx, | ||
chain< euclidom > *& | hom_cy, | ||
int & | maxlevel_cy, | ||
chainmap< euclidom > *& | hom_f, | ||
bool | inclusion = false , |
||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< typename cubetype::CellType, euclidom > ** | gycompl = 0 |
||
) |
A version of the above procedure with the default names.
Definition at line 1286 of file homology.h.
References Homology(), and inclusion().
int chomp::homology::Homology2l | ( | mvmap< cubetype, cubetype > & | Fcubmap, |
hashedset< cubetype > & | Xcubes, | ||
hashedset< cubetype > & | Acubes, | ||
chain< euclidom > *& | hom, | ||
int & | maxlevel, | ||
chainmap< euclidom > *& | hom_f, | ||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< tCell2l< typename cubetype::CellType >, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< tCell2l< typename cubetype::CellType >, euclidom > ** | gycompl = 0 |
||
) |
A version of the above procedure with the default names.
Definition at line 1986 of file homology.h.
References Homology2l().
int chomp::homology::Homology2l | ( | mvmap< cubetype, cubetype > & | Fcubmap0, |
const char * | Fname, | ||
hashedset< cubetype > & | Xcubes0, | ||
const char * | Xname, | ||
hashedset< cubetype > & | Acubes0, | ||
const char * | Aname, | ||
chain< euclidom > *& | hom_cx, | ||
int & | maxlevel, | ||
chainmap< euclidom > *& | hom_f, | ||
int | careful = 0x01 , |
||
chain< euclidom > *** | gfgen = 0 , |
||
gcomplex< tCell2l< typename cubetype::CellType >, euclidom > ** | gfcompl = 0 , |
||
chain< euclidom > *** | gygen = 0 , |
||
gcomplex< tCell2l< typename cubetype::CellType >, euclidom > ** | gycompl = 0 |
||
) |
Computes the endomorphism induced in homology by a combinatorial cubical multivalued map using the two-layer construction developped by P.
Pilarczyk and K. Stolot.
Definition at line 1353 of file homology.h.
References acyclic(), addboundaries(), addmapimg(), checkimagecontained(), checkimagedisjoint(), collapse(), createcellmap(), createchaincomplex(), creategraph(), createimages(), createprojection(), cubes2cells(), decreasedimension(), expandAinX(), ExtractGenerators(), Homology(), knownbits, MaxBddDim, project(), reducepair(), removeAfromX(), restrictAtoneighbors(), and sout.
Referenced by Homology2l().
chainmap< euclidom > * chomp::homology::HomologyMap | ( | const chainmap< euclidom > & | cmap, |
const chain< euclidom > * | hom_cx, | ||
const chain< euclidom > * | hom_cy, | ||
int | maxlevel | ||
) |
Extracts the homomorphism induced in homology from the chain map on two chain complexes whose homology has just been computed.
Note that 'maxlevel' must be the MINIMUM of the two maximal nontrivial homology levels encoded in "hom_cx" and "hom_cy". Returns a pointer to the extracted homomorphism.
Explanation: In order to compute the homomorphism induced in homology by a chain map, it is enough to define the chain map between two chain complexes (one can also use the same chain complex for its domain and codomain if the map is an endomorphism), and then compute the homology of both chain complexes. One can use one of the functions below to extract the information obtained in this way into a simpler (and smaller) data structure. The extracted map is exactly the homomorphism induced in homology. Since the returned chain map is allocated with the 'new' operator, one should 'delete' it when finished.
Definition at line 706 of file homology.h.
chainmap< euclidom > * chomp::homology::HomologyMap | ( | const chainmap< euclidom > & | cmap, |
const chain< euclidom > * | hom_cx, | ||
int | maxlevel | ||
) |
Extracts the endomorphism induced in homology from the chain map on one chain complex whose homology has just been computed.
Returns a pointer to the extracted homomorphism.
Definition at line 734 of file homology.h.
|
inline |
Ignores white characters (spaces, tabulators, CRs and LFs), as well as comments from the input text file.
The comment begins with a semicolon and ends with the end of the line.
Definition at line 385 of file textfile.h.
References ignoreline().
Referenced by operator>>(), read(), readcoordinates(), ReadCubeFix(), readcubeorcell(), ReadCubes(), ReadCubicalCell(), ReadCubicalMap(), readdomain(), readimage(), readrestriction(), chomp::multiwork::mwSubCoordinator< dim, coord >::ReadResults(), readselective(), readtheset(), and scancubes().
|
inline |
Ignores the input characters until the end of a line, including this end of the line.
Definition at line 376 of file textfile.h.
Referenced by ignorecomments(), read(), readcubeorcell(), ReadCubicalMap(), readdomain(), readimage(), chomp::multiwork::mwSubCoordinator< dim, coord >::ReadResults(), readselective(), readtheset(), and scancubes().
bool chomp::homology::inclusion | ( | const HSet & | X, |
const HSet & | Y | ||
) |
Verifies if X is a subset of Y. Returns true if yes, false if not.
Definition at line 309 of file indxpalg.h.
Referenced by Homology(), and IndexPairM().
|
inline |
Computes the graph that represents flow-induced relations on Morse sets.
The vertices of the result graph are the first "nVert" vertices from the source graph. An edge is added to the new graph iff there exists a path from one vertex to another. Edges that come from the transitive closure are not added.
Definition at line 3976 of file digraph.h.
|
inline |
A more complicated version of the 'inclusionGraph' function.
Computes the graph that represents flow-induced relations on Morse sets. The vertices of the result graph are the first "nVert" vertices from the source graph. An edge is added to the new graph iff there exists a path from one vertex to another. Edges that come from the transitive closure are not added. Records vertices along connecting orbits using operator () with the following arguments: source, target, vertex.
Definition at line 4096 of file digraph.h.
int chomp::homology::IndexPairM | ( | const TMap & | F, |
const TSetOfCubes & | initialS, | ||
TSetOfCubes & | resultQ1, | ||
TSetOfCubes & | resultQ2 | ||
) |
Constructs a combinatorial index pair satisfying Mrozek's definition.
The initial set S must be invariant, or otherwise some of its cubes may not be included in the resulting invariant set.
Definition at line 361 of file indxpalg.h.
References ExitSetM(), inclusion(), invariantpart(), neighborhood(), scon, and sout.
int chomp::homology::IndexPairP | ( | const TMap & | F, |
const TSetOfCubes & | initialS, | ||
TSetOfCubes & | resultQ1, | ||
TSetOfCubes & | resultQ2 | ||
) |
Constructs a combinatorial index pair satisfying Pilarczyk's definition.
The initial set S must be an approximation of the invariant set for the map, for example, a rough covering obtained in numerical simulations.
Definition at line 414 of file indxpalg.h.
The length must not exceed the size of the integer.
Definition at line 201 of file bitfield.h.
bool chomp::homology::intersection2l | ( | const tCube & | q0, |
const tCube & | q1, | ||
BitField * | bits | ||
) |
Computes the intersection between two cubes at different layers.
One cube is at layer 1, and the other is at layer 0, but not in the set on which the identification takes place. The intersection directions are marked in the given bit field. Returns true iff the intersection is nonempty.
Definition at line 968 of file twolayer.h.
References boundarycell(), boundarylength(), chomp::homology::tCell2l< tCell >::identify(), and neighbor2bit().
Referenced by getneighbors_generate(), and getneighbors_scan().
void chomp::homology::invariantpart | ( | TSetOfCubes & | X, |
const TMap & | F, | ||
TSetOfCubes & | result | ||
) |
Computes X := Inv (X).
New algorithm by Bill Kalies and Hyunju Ban. If the graph 'gInv' is given, then the resulting graph is created, otherwise only the set X is modified.
Definition at line 238 of file indxpalg.h.
References SCC().
Referenced by IndexPairM().
|
inline |
Creates an object which represents the union of two sets.
Definition at line 225 of file setunion.h.
Referenced by acyclic_rel(), chomp::homology::reduction0::cubreducequiet(), and chomp::homology::reduction1::cubreducequiet().
|
inline |
Creates a graph based on the given adjacency matrix.
If m [i] [j] is nonzero, then the edge i -> j is added to the graph. It is assumed that the graph g is initially empty. The size of the matrix (the number of vertices), n, must be given.
Definition at line 4338 of file digraph.h.
Referenced by transitiveReduction().
int_t chomp::homology::neighbor2bit | ( | const tCube & | q, |
const tCube & | neighbor | ||
) |
Returns the number of the neighbor bit for the given neighbor of 'q' or -1 if not a neighbor or the same cube as 'q'.
Definition at line 84 of file neighbor.h.
Referenced by getneighbors_scan(), and intersection2l().
int_t chomp::homology::neighbor2bit | ( | const tCube & | q, |
const typename tCube::CellType & | face | ||
) |
Returns the number of the neighbor bit for the neighbor which intersects the given cube at the face provided.
Definition at line 129 of file neighbor.h.
int_t chomp::homology::neighbor2bit | ( | const tCube2l< tCube > & | q, |
const tCube2l< tCube > & | neighbor | ||
) |
Specialization of the "neighbor2bit" function for two-layer cubes.
Throws an exception, because there might be more than one bit which cescribes the intersection.
Definition at line 956 of file twolayer.h.
int chomp::homology::neighborhood | ( | const TSetOfCubes & | X, |
TSetOfCubes & | result | ||
) |
Computes a cubical neighborhood of width 1 around the set.
Definition at line 190 of file indxpalg.h.
Referenced by IndexPairM().
|
inline |
Verifies if the given number is a prime number.
Returns: true = Yes, false = No.
Definition at line 155 of file pointset.h.
Referenced by ceilprimenumber().
|
inline |
|
inline |
|
inline |
The operator != verifies whether two cubes are different.
(Uses the == operator.)
Definition at line 843 of file twolayer.h.
|
inline |
Checks if the two cells are different.
Definition at line 427 of file cellbase.h.
|
inline |
The operator != verifies whether two cubes are different.
(Uses the == operator.)
Definition at line 398 of file twolayer.h.
|
inline |
The operator != for comparing full cubes.
Definition at line 271 of file cubebase.h.
|
inline |
|
inline |
The operator * computes the Cartesian product of two cells.
Definition at line 851 of file twolayer.h.
|
inline |
Computes the Cartesian product of two cells.
Definition at line 437 of file cellbase.h.
|
inline |
Computes the Cartesian product of two cells.
Definition at line 455 of file cellfix.h.
|
inline |
Computes the Cartesian product of two cells.
Definition at line 511 of file cellvar.h.
|
inline |
The operator * computes the Cartesian product of two cubes.
Definition at line 406 of file twolayer.h.
|
inline |
Computes the Cartesian product of two cubes.
Definition at line 281 of file cubebase.h.
|
inline |
Computes the Cartesian product of two cubes.
Definition at line 273 of file cubefix.h.
|
inline |
Computes the Cartesian product of two cubes.
Definition at line 337 of file cubevar.h.
|
inline |
Operator += adds one hashed set to another.
Definition at line 915 of file hashsets.h.
|
inline |
Operator -= removes the contents of one set from another.
Definition at line 924 of file hashsets.h.
Compares two words in an alphabetical way (by ASCII codes).
Returns 1 if the first word precedes the second one, 0 otherwise.
Definition at line 304 of file words.h.
|
inline |
A specialization of the operator << for writing a C-style string to the output stream.
Definition at line 248 of file textfile.h.
|
inline |
The operator << for writing any kind of object to the output stream.
This object is written using the operator << of the standard stream.
Definition at line 227 of file textfile.h.
|
inline |
A specialization of the operator << for putting manipulators (like std::endl, std::flush) to the output stream.
Definition at line 269 of file textfile.h.
|
inline |
|
inline |
Definition at line 907 of file bincube.h.
References chomp::homology::bincube< Dim, twoPower >::getbufsize(), and write().
std::ostream & chomp::homology::operator<< | ( | std::ostream & | out, |
const BufferedMapClass< TCube > & | map | ||
) |
Definition at line 176 of file indxpalg.h.
|
inline |
|
inline |
Writes a chain complex to an output stream in the text format.
Definition at line 3211 of file chains.h.
|
inline |
Writes a chain map to an output stream in the text format.
Definition at line 3557 of file chains.h.
|
inline |
std::ostream & chomp::homology::operator<< | ( | std::ostream & | out, |
const gcomplex< cell, euclidom > & | c | ||
) |
Writes a geometric complex to the output stream in the text format.
Definition at line 1496 of file gcomplex.h.
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).
Definition at line 855 of file hashsets.h.
References LARGE_SIZE, and write().
|
inline |
Shows hashing statistics in a concise and readable way to the output stream in the text format.
Definition at line 114 of file hashsets.h.
|
inline |
|
inline |
std::ostream & chomp::homology::operator<< | ( | std::ostream & | out, |
const mvcellmap< cell, euclidom, element > & | m | ||
) |
Writes a multivalued cellular map to the output stream.
Definition at line 2066 of file gcomplex.h.
References SMALL_SIZE, and write().
std::ostream & chomp::homology::operator<< | ( | std::ostream & | out, |
const mvmap< domelement, imgelement > & | m | ||
) |
Writes a multivalued map to the output stream.
Each assignment is written in such a way that the element of the domain is followed by the space, the arrow "->", another space, and then the image set is written in the small style (in braces, with commas between the elements).
Definition at line 1371 of file hashsets.h.
References SMALL_SIZE, and write().
|
inline |
|
inline |
Writes the information gathered in a hashing statistics collector object to an output stream.
Definition at line 463 of file pointset.h.
|
inline |
Writes a simplex to the output stream in the text format.
Definition at line 361 of file simplex.h.
|
inline |
The operator << writes a cubical cell to the text output stream.
Definition at line 862 of file twolayer.h.
References WriteCubicalCell().
|
inline |
Writes a cell to an output stream.
Definition at line 465 of file cellbase.h.
References WriteCubicalCell().
|
inline |
Writes a cell to an output stream.
Definition at line 478 of file cellfix.h.
References WriteCubicalCell().
|
inline |
Writes a cell to an output stream.
Definition at line 539 of file cellvar.h.
References WriteCubicalCell().
|
inline |
The operator << writes a cube to the output stream in the text mode.
Definition at line 417 of file twolayer.h.
References WriteCube().
|
inline |
Writes a cube to an output stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 299 of file cubebase.h.
References WriteCube().
|
inline |
Writes a cube to an output stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 289 of file cubefix.h.
References WriteCube().
|
inline |
Writes a cube to an output stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 355 of file cubevar.h.
References WriteCube().
|
inline |
std::ostream & chomp::homology::operator<< | ( | std::ostream & | out, |
tPointset< coordtype > & | p | ||
) |
Writes a set of points to a file (starting at the point given).
Definition at line 2481 of file pointset.h.
References write().
|
inline |
|
inline |
No isomorphism check, just comparing with the same order of vertices. Ignores weights.
Definition at line 600 of file digraph.h.
|
inline |
Definition at line 370 of file integer.h.
The operator == that compares whether the two simplices are the same, that is, have the same vertices in the same order.
Definition at line 310 of file simplex.h.
|
inline |
The operator == verifies if two cells are equal.
Definition at line 833 of file twolayer.h.
|
inline |
The operator == verifies if two cubes are equal.
Definition at line 388 of file twolayer.h.
|
inline |
|
inline |
Definition at line 914 of file bincube.h.
References chomp::homology::bincube< Dim, twoPower >::read().
|
inline |
Reads a chain from a standard input stream in the text mode.
Warning: The operators >> and << are not symmetric for chains.
Definition at line 894 of file chains.h.
References ignorecomments(), and readparenthesis().
std::istream & chomp::homology::operator>> | ( | std::istream & | in, |
gcomplex< cell, euclidom > & | c | ||
) |
Reads a geometric complex from an input stream in the text format.
Definition at line 1508 of file gcomplex.h.
References closingparenthesis(), and ignorecomments().
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).
Definition at line 908 of file hashsets.h.
References LARGE_SIZE, and read().
|
inline |
A specialized version of the operator >> for reading a set of cubes and ignores the first line "dimension N".
Definition at line 456 of file twolayer.h.
References ReadCubes().
|
inline |
Reads a set of cubes from an input stream in the text mode.
Definition at line 316 of file cubebase.h.
References ReadCubes().
|
inline |
Reads a set of cubes from an input stream in the text mode.
Definition at line 307 of file cubefix.h.
References ReadCubes().
|
inline |
Reads a set of cubes from an input stream in the text mode.
Definition at line 372 of file cubevar.h.
References ReadCubes().
|
inline |
std::istream & chomp::homology::operator>> | ( | std::istream & | in, |
mvmap< domelement, imgelement > & | m | ||
) |
Reads a multivalued map from an input stream.
Definition at line 1385 of file hashsets.h.
References ignorecomments(), read(), and SMALL_SIZE.
|
inline |
A specialized version of the operator >> that reads a combinatorial cubical multivalued map.
This version allows one to use two formats which are automatically distinguished. The assignments can be either like in a generic multivalued map, or in Jacek and Marcin's format (see the chmap program).
Definition at line 468 of file twolayer.h.
References ReadCubicalMap().
|
inline |
Reads a cubical map from an input stream in the text mode.
Definition at line 324 of file cubebase.h.
References ReadCubicalMap().
|
inline |
Reads a cubical map from an input stream in the text mode.
Definition at line 315 of file cubefix.h.
References ReadCubicalMap().
|
inline |
Reads a cubical map from an input stream in the text mode.
Definition at line 380 of file cubevar.h.
References ReadCubicalMap().
|
inline |
|
inline |
Reads a simplex from an imput stream from a text format.
Throws an error message in case of failure.
Definition at line 377 of file simplex.h.
References closingparenthesis(), ignorecomments(), chomp::homology::Simplex::MaxDim, and sortelements().
|
inline |
The operator >> reads a cubical cell from the text input stream.
Definition at line 876 of file twolayer.h.
References ignorecomments(), and ReadCubicalCell().
|
inline |
Reads a cell from an input stream.
Definition at line 473 of file cellbase.h.
References ReadCubicalCell().
|
inline |
Reads a cell from an input stream.
Definition at line 486 of file cellfix.h.
References ReadCubicalCell().
|
inline |
Reads a cell from an input stream.
Definition at line 547 of file cellvar.h.
References ReadCubicalCell().
|
inline |
The operator >> reads a cube from the input stream in the text mode.
Definition at line 431 of file twolayer.h.
References ignorecomments(), and ReadCube().
|
inline |
Reads a cube from an input stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 309 of file cubebase.h.
References ReadCube().
|
inline |
Reads a cube from an input stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 299 of file cubefix.h.
References ReadCubeFix().
|
inline |
Reads a cube from an input stream in the text mode.
The cube is represented by an n-tuple of integers which are the coordinates of the vertex with minimal coordinates.
Definition at line 365 of file cubevar.h.
References ReadCube().
std::istream & chomp::homology::operator>> | ( | std::istream & | in, |
tPointset< coordtype > & | p | ||
) |
Reads a set of points from an input stream (starting at the point given).
Definition at line 2399 of file pointset.h.
References read().
|
inline |
Reads a word from an input stream.
Definition at line 364 of file words.h.
textfile & chomp::homology::operator>> | ( | textfile & | f, |
tPointset< coordtype > & | p | ||
) |
Reads a set of points from an input stream (starting at the point given).
Definition at line 2392 of file pointset.h.
References read().
int_t chomp::homology::pointhashadd | ( | const coordtype * | c, |
int | dim, | ||
int_t | hashsize | ||
) |
Generates the second hashing key for points.
Definition at line 198 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::hashfindpoint().
int_t chomp::homology::pointhashkey | ( | const coordtype * | c, |
int | dim, | ||
int_t | hashsize | ||
) |
Generates the main hashing key for points.
Definition at line 180 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::hashfindpoint().
void chomp::homology::project | ( | const gcomplex< tCell, euclidom > & | c, |
gcomplex< tCell, euclidom > & | img, | ||
const gcomplex< tCell, euclidom > & | only, | ||
int | offset, | ||
int | outdim, | ||
int | discarddim, | ||
const int * | level, | ||
bool | watchforimages | ||
) |
Creates the image of the projection from the set of cubical cells in the given geometric complex to the subspace of R^n spanned by the 'outdim' subsequent standard vectors with the first number 'offset'.
Only these cells which appear in 'only' are added unless 'only' is empty.
Definition at line 320 of file cubmaps.h.
Referenced by Homology(), and Homology2l().
int chomp::homology::read | ( | std::istream & | in, |
coordtype * | c, | ||
int | maxdim | ||
) |
Reads a point from a text file and removes a pair of parentheses, braces or brackets if present.
Returns the number of coordinates read. If the maximal dimension is reached, no more coordinates are read. Note: The first input character should be the opening parenthesis. This is an old version, use "readcoordinates" instead.
Definition at line 2059 of file pointset.h.
References read().
int_t chomp::homology::read | ( | std::istream & | in, |
tPointset< coordtype > & | p, | ||
coordtype * | wrap, | ||
int | maxdim, | ||
int | quiet = 0 , |
||
tPointset< coordtype > * | notthese = NULL |
||
) |
Reads a set of points from an input stream (starting at the point given).
Returns the number of points read or -1 (and show a message) if failed.
Definition at line 2384 of file pointset.h.
References read().
int_t chomp::homology::read | ( | std::istream & | in, |
tPointset< coordtype > & | p, | ||
int_t | first = 0 , |
||
int_t | howmany = -1 , |
||
coordtype * | wrap = NULL , |
||
int | maxdim = 0 , |
||
int | quiet = 0 , |
||
tPointset< coordtype > * | notthese = NULL |
||
) |
Reads a set of points from an input stream (starting at the point given).
Returns the number of points read or -1 (and show a message) if failed.
Definition at line 2367 of file pointset.h.
References read().
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.
Definition at line 864 of file hashsets.h.
References ignorecomments(), readparenthesis(), and SMALL_SIZE.
int chomp::homology::read | ( | textfile & | f, |
coordtype * | c, | ||
int | maxdim | ||
) |
Reads a point from a text file and removes a pair of parentheses, braces or brackets if present.
Returns the number of coordinates read. If the maximal dimension is reached, no more coordinates are read. Note: The first input character should be the opening parenthesis. This is an old version, use "readcoordinates" instead.
Definition at line 1994 of file pointset.h.
References ignoreline().
Referenced by operator>>(), read(), ReadCubes(), ReadCubicalMap(), readimage(), readrestriction(), and readselective().
int_t chomp::homology::read | ( | textfile & | f, |
tPointset< coordtype > & | p, | ||
coordtype * | wrap, | ||
int | maxdim, | ||
int | quiet = 0 , |
||
tPointset< coordtype > * | notthese = NULL |
||
) |
Reads a set of points from an input stream (starting at the point given).
Returns the number of points read or -1 (and show a message) if failed.
Definition at line 2376 of file pointset.h.
References read().
int_t chomp::homology::read | ( | textfile & | f, |
tPointset< coordtype > & | p, | ||
int_t | first = 0 , |
||
int_t | howmany = -1 , |
||
coordtype * | wrap = NULL , |
||
int | maxdim = 0 , |
||
int | quiet = 0 , |
||
tPointset< coordtype > * | notthese = NULL |
||
) |
Reads a set of points from an input stream (starting at the point given).
Returns the number of points read or -1 (and show a message) if failed.
Definition at line 2267 of file pointset.h.
References ignoreline(), read(), and sout.
int chomp::homology::ReadBitmapFile | ( | const char * | bmpname, |
hashedset< tCube > & | cset, | ||
int | mingray = 0 , |
||
int | maxgray = 128 |
||
) |
Reads the squares from a bitmap file to the set of cubes.
Each pixel whose gray value is within the given range (at least 'mingray', strictly less than 'maxgray') gives raise to one square with the corresponding coordinates. For color bitmaps, a weighted average of RGB is computed as gray. Gray level 0 corresponds to black, gray level 255 is white. Return 0 on success, throw an error message if failed.
Definition at line 891 of file homtools.h.
References fileerror().
int chomp::homology::readbitpoints | ( | std::istream & | in, |
pointset & | p, | ||
int * | bitcode_depth = NULL |
||
) |
Reads a set of full cubical sets represented as a set of points from a file encoded in the "bitcode" format used by Bill Kalies.
The depth of bit codes is saved to '*bitcode_depth' unless NULL. Returns 0 on success and -1 on error (and displays a message).
|
inline |
Uses the general procedure "readtheset" to read a geometric complex.
Definition at line 155 of file homtools.h.
References readtheset().
|
inline |
Definition at line 2142 of file pointset.h.
References readcoordinates().
|
inline |
Reads the coordinates of a point.
The point must begin with an opening parenthesis, brace or bracket (unless a closing parenthesis is different from EOF), then the coordinates must be separated by spaces or commas, and must end with a corresponding closing parenthesis, brace or bracket (or the given one). The closing parenthesis may also be defined as '
'. Interrupts if the number of coordinates reaches the maximal dimension. Returns the number of coordinates read or -1 on error.
Definition at line 2073 of file pointset.h.
References ignorecomments(), and readparenthesis().
Referenced by readcoordinates(), ReadCubeFix(), readcubeorcell(), ReadCubicalCell(), ReadCubicalMap(), and scancubes().
|
inline |
Reads a cube from the input text stream.
Definition at line 184 of file cubemain.h.
References ReadCubeFix().
Referenced by operator>>().
std::istream & chomp::homology::ReadCubeFix | ( | std::istream & | in, |
cubetype & | c, | ||
int | dimfix | ||
) |
Reads a cube from the input text stream.
The fixed dimension is forced, unless set to -1.
Definition at line 90 of file cubemain.h.
References ignorecomments(), and readcoordinates().
Referenced by operator>>(), and ReadCube().
int chomp::homology::readcubeorcell | ( | std::istream & | in, |
coordtype * | left, | ||
coordtype * | right, | ||
int | maxdim, | ||
int * | type = NULL |
||
) |
Reads a cube or a cell from a text file.
Ignores any preceding text lines. Returns the dimension of the object read and sets the type accordingly. Returns 0 in the case of the end of a file or a file error. Throws an error message on failure.
Definition at line 2180 of file pointset.h.
References CELL, closingparenthesis(), CUBE, ignorecomments(), ignoreline(), and readcoordinates().
std::istream & chomp::homology::ReadCubes | ( | std::istream & | in, |
cubsettype & | s | ||
) |
Reads a set of cubes and ignores the line at the beginning of the file which starts with the letter 'd' (like "dimension 2").
For compatibility with previous versions of my software.
Definition at line 193 of file cubemain.h.
References ignorecomments(), LARGE_SIZE, and read().
Referenced by operator>>().
|
inline |
Reads a cubical cell form the input text stream.
Allowed formats are: (1) two opposite vertices: with minimal and maximal coordinates, (2) a Cartesian product of intervals (with degenerated intervals allowed), (3) a full-dimensional cubical cell defined by its minimal vertex. For example: [(1,8,-3) (2,9,-2)] = (1,2) x (8,9) x (-3,-2) = (1,8,-3). Another example: [(-4,5,12) (-4,6,12)] = (-4) x (5,6) x (12). Note that the definition of a cubical cell is interpreted as the definition of a full-dimensional cube only if other interpretations fail. As a result, (3,4) will be treated as a 1-dimensional nondegenerated cubical cell in R^1, and not as (3,4) x (4,5). The same applies to 0-dimensional cells in R^1.
Definition at line 235 of file cellmain.h.
References closingparenthesis(), ignorecomments(), and readcoordinates().
Referenced by operator>>().
std::istream & chomp::homology::ReadCubicalMap | ( | std::istream & | in, |
mvmap< tCube, tCube > & | m | ||
) |
Reads a combinatorial cubical multivalued map from an input text stream.
Definition at line 211 of file cubemain.h.
References closingparenthesis(), ignorecomments(), ignoreline(), read(), readcoordinates(), and SMALL_SIZE.
Referenced by operator>>().
std::istream & chomp::homology::readdomain | ( | std::istream & | in, |
hashedset< domelement > & | dom, | ||
const mvmap< domelement, imgelement > & | |||
) |
Reads the domain of a multivalued map.
Definition at line 1159 of file hashsets.h.
References ignorecomments(), and readparenthesis().
std::istream & chomp::homology::readdomain | ( | std::istream & | in, |
hashedset< tCube > & | dom | ||
) |
Reads the domain of a multivalued cubical map.
This is a specialization of the corresponding function for reading the domain of a general multivalued map.
Definition at line 406 of file cubmaps.h.
References ignorecomments(), ignoreline(), and readdomain().
Referenced by readdomain(), and readmapdomain().
|
inline |
Reads a set of cubes from the given file.
This function is necessary because cubes need special treatment.
Definition at line 173 of file homtools.h.
References chomp::homology::tCubeBase< coordtype >::pluralname(), and readtheset().
|
inline |
Uses the general procedure "readtheset" to read a set of elements.
Definition at line 164 of file homtools.h.
References readtheset().
|
inline |
A specialization of the above template for reading a bool type.
Definition at line 388 of file arg.h.
|
inline |
|
inline |
|
inline |
A template for reading a variable from a string.
Returns 0 on success, -1 on failure.
Definition at line 353 of file arg.h.
Referenced by chomp::homology::argunit< type >::setvalue().
std::istream & chomp::homology::readimage | ( | std::istream & | in, |
const hashedset< tCube > & | dom, | ||
hashedset< tCube > & | img | ||
) |
Read the image of a set under a multivalued cubical map.
This is a specialization of the corresponding function for reading the image of a general multivalued map.
Definition at line 488 of file cubmaps.h.
References closingparenthesis(), ignorecomments(), and ignoreline().
std::istream & chomp::homology::readimage | ( | std::istream & | in, |
hashedset< imgelement > & | img, | ||
const mvmap< domelement, imgelement > & | |||
) |
Reads the image of a multivalued map.
Definition at line 1205 of file hashsets.h.
References ignorecomments(), read(), and SMALL_SIZE.
std::istream & chomp::homology::readimage | ( | std::istream & | in, |
hashedset< tCube > & | img | ||
) |
Reads the image of a multivalued cubical map.
This is a specialization of the corresponding function for reading the image of a general multivalued map.
Definition at line 437 of file cubmaps.h.
References ignorecomments(), ignoreline(), and readimage().
Referenced by readimage(), and readmapimage().
|
inline |
Reads the domain of a cubical multivalued map from the given file.
Definition at line 181 of file homtools.h.
References fileerror(), readdomain(), and sout.
|
inline |
Reads the image of a set by a cubical multivalued map from the given file.
Definition at line 216 of file homtools.h.
References fileerror(), readimage(), and sout.
|
inline |
Reads the domain of a cubical multivalued map from the given file.
Definition at line 198 of file homtools.h.
References fileerror(), readimage(), and sout.
|
inline |
Reads the restriction of a multivalued map to the given set.
Definition at line 265 of file homtools.h.
References readmaprestriction().
|
inline |
Reads the restriction of a multivalued map to the union of two sets.
Definition at line 236 of file homtools.h.
References fileerror(), readselective(), and sout.
Referenced by readmaprestriction().
|
inline |
Reads an opening parenthesis from the input file.
Return a corresponding closing parenthesis or EOF if none was found.
Definition at line 432 of file textfile.h.
References closingparenthesis().
Referenced by operator>>(), read(), readcoordinates(), readdomain(), readrestriction(), and readselective().
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.
Definition at line 1289 of file hashsets.h.
References ignorecomments(), read(), readparenthesis(), SMALL_SIZE, and sout.
|
inline |
Reads a restriction of a multivalued cubical map to the given set.
The order of arguments is reversed to distinguish form the template defined for a general multivalued map.
Definition at line 653 of file cubmaps.h.
References readselective().
std::istream & chomp::homology::readselective | ( | std::istream & | in, |
const hashedset< tCube > & | dom1, | ||
const hashedset< tCube > & | dom2, | ||
mvmap< tCube, tCube > & | m | ||
) |
Reads the restriction of a multivalued map to the given pair of sets.
Definition at line 598 of file cubmaps.h.
References ignorecomments(), ignoreline(), readselective(), and sout.
Referenced by readmaprestriction(), and readselective().
|
inline |
Reads a restriction of a multivalued map to the given set.
Definition at line 1356 of file hashsets.h.
References readselective().
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.
Definition at line 1233 of file hashsets.h.
References ignorecomments(), read(), readparenthesis(), SMALL_SIZE, and sout.
void chomp::homology::readtheset | ( | const char * | name, |
settype & | s, | ||
const char * | pluralname, | ||
const char * | what | ||
) |
Reads a given set from the file and shows appropriate messages.
Assumes the elements of the set begin with an opening parenthesis-char (or a digit, if "digitOk" == true) and ignores all the preceding data. Uses the given plural name of the elements for the messages. Note: This procedure is suitable for gcomplex<type> or hashedset<type>.
Definition at line 117 of file homtools.h.
References closingparenthesis(), fileerror(), ignorecomments(), ignoreline(), and sout.
Referenced by readcells(), and readelements().
|
inline |
Reduces the set of full cubes.
Definition at line 1167 of file bincube.h.
References chomp::homology::bincube< Dim, twoPower >::dimension(), and reduceFullCubesAlg().
Referenced by ComputeBettiNumbers().
int chomp::homology::reduceFullCubesAlg | ( | SetT & | X, |
bool | quiet | ||
) |
Reduces the set of full cubes.
The class 'Acyclic' provides the function for checking if a cube can be removed from a full cubical set (the 'acyclicity' criterion). A queue in which each element should appear only once is used.
Definition at line 1065 of file bincube.h.
References addneighbors(), chomp::homology::bincube< Dim, twoPower >::begin(), chomp::homology::bincube< Dim, twoPower >::count(), chomp::homology::bincube< Dim, twoPower >::empty(), chomp::homology::bincube< Dim, twoPower >::end(), chomp::homology::bincube< Dim, twoPower >::remove(), scon, and sout.
Referenced by reduceFullCubes().
void chomp::homology::reducepair | ( | cubsettype & | Xcubes, |
cubsettype & | Acubes, | ||
const cubsettype & | Xkeepcubes, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Reduces the pair of sets of cubes. Keeps the given cubes untouched.
Definition at line 619 of file homtools.h.
References cubreduce(), and sout.
Referenced by Homology(), and Homology2l().
void chomp::homology::reducepair | ( | cubsettype & | Xcubes, |
cubsettype & | Acubes, | ||
maptype & | Fcubmap, | ||
const cubsettype & | Xkeepcubes, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Reduces the pair of sets of cubes.
Keeps the given cubes untouched. Makes sure that the acyclicity of the given map is not spoiled.
Definition at line 638 of file homtools.h.
References cubreduce(), and sout.
bool chomp::homology::remainsacyclic | ( | const mvmap< tCube, tCube > & | map, |
const tCube & | q, | ||
const tSet & | cset | ||
) |
Verifies if the map remains acyclic after the addition or removal of the given cube to/from the union of the first and the second set.
Assumes that the map is acyclic before the change. Returns 'true' if yes for sure, 'false' if there is some doubt about it.
Definition at line 280 of file cubacycl.h.
References addboundaries(), addneighbors(), computeimage(), cubreducequiet(), getmaxneighbors(), and getneighbors().
Referenced by chomp::homology::MapCanExpand< tCube >::operator()(), and chomp::homology::MapRemainsAcyclic< tCube >::operator()().
void chomp::homology::removeAfromX | ( | cubsettype & | Xcubes, |
const cubsettype & | Acubes, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Removes 'Acubes' from 'Xcubes' and shows messages.
Definition at line 548 of file homtools.h.
References sout.
Referenced by Homology(), and Homology2l().
void chomp::homology::removeAfromX | ( | gcomplex< cell, euclidom > & | X, |
const gcomplex< cell, euclidom > & | A, | ||
const char * | Xname, | ||
const char * | Aname | ||
) |
Removes from 'X' all the cells that appear in 'A'.
Definition at line 563 of file homtools.h.
References sout.
void chomp::homology::restrictAtoneighbors | ( | const cubsettype & | Xcubes, |
cubsettype & | Acubes, | ||
const char * | Xname, | ||
const char * | Aname, | ||
const cubsettype * | keepcubes = 0 |
||
) |
Restricts the set of cubes 'Acubes' to these cubes which are neighbors of any of the cubes in 'Xcubes' and displays appropriate messages.
Definition at line 503 of file homtools.h.
References getneighbors(), sout, and sseq.
Referenced by Homology(), and Homology2l().
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'.
Definition at line 1128 of file hashsets.h.
Referenced by addmapimg().
|
inline |
Rounds down the given real number to an integral type.
Definition at line 214 of file pointset.h.
|
inline |
Rounds down the double coordinates of a point to integer ones.
If the grid is provided (not NULL), then uses this grid instead of the integral lattice.
Definition at line 226 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::addRounded(), and chomp::homology::tPointset< coordtype >::getnumberRounded().
|
inline |
Uses the general procedure "savetheset" to save a geometric complex.
Definition at line 316 of file homtools.h.
References savetheset().
|
inline |
Saves a set of cubes to the given file.
This function is necessary because cubes need special treatment.
Definition at line 334 of file homtools.h.
References chomp::homology::tCubeBase< coordtype >::pluralname(), and savetheset().
|
inline |
Uses the general procedure "savetheset" to save a set of elements.
Definition at line 325 of file homtools.h.
References savetheset().
void chomp::homology::savetheset | ( | const char * | name, |
const settype & | s, | ||
const char * | pluralname, | ||
const char * | what, | ||
const char * | filecomment = 0 |
||
) |
Saves a given set to a file and shows appropriate messages.
Note: This procedure is suitable for gcomplex<type> or hashedset<type>.
Definition at line 283 of file homtools.h.
References fileerror(), and sout.
Referenced by savecells(), and saveelements().
|
static |
Writes the given object to a file whose name is a concatenation of the prefix and the given file name.
If the prefix is 0 thenthe prefix is treated as an empty string. Displays a warning if unsuccessful, does not throw any exception. This procedure can be applied to any data type which has the operator << for writing it to a text output stream (std::ostream) defined.
Definition at line 468 of file textfile.h.
References sout.
|
inline |
Reads all the cubes from the given file and ignores them.
In this way the numbers of cubes are established.
Definition at line 55 of file homtools.h.
References closingparenthesis(), fileerror(), ignorecomments(), ignoreline(), readcoordinates(), and sout.
|
inline |
Computes strongly connected components of the graph 'g'.
Creates the graph 'scc' in which each vertex corresponds to one component. The graph 'scc' given as an argument must be initially empty. The table 'compVertices' is filled with the numbers of vertices in 'g' which form the components, and the indices that end the listing for each component are stored in the table 'compEnds'. Returns the number of strongly connected components found.
Definition at line 2392 of file digraph.h.
Referenced by invariantpart(), chomp::homology::diGraph< wType >::minMeanCycleWeight(), and chomp::homology::diGraph< wType >::minMeanCycleWeightMem().
|
inline |
Computes strongly connected components of the graph 'g' using Tarjan's algorithm (as described in the Wikipedia).
Tha advantage of this approach over the one described in Cormen's textbook is that the transposed graph need not be computed. However, this algorithm might be slightly slower than the other one. The table 'compVertices' is filled with the numbers of vertices in 'g' which form the components, and the indices that end the listing for each component are stored in the table 'compEnds'. Returns the number of strongly connected components found.
Definition at line 2434 of file digraph.h.
|
inline |
Sets space wrapping in each direction separately.
dim | - the dimension of cubes for which the space wrapping is defined |
wrap | - space wrapping: a nonzero entry indicates a periodic boundary condition in the corresponding direction |
Definition at line 2237 of file homology.h.
References chomp::homology::tCubeBase< coordtype >::MaxDim, chomp::homology::tPointBase< coordtype >::setwrapping(), and wrapcoord().
|
inline |
Sets the parameters of the output streams depending on the file names acquired from the command line.
This is an internal function used by the macro "algstreamset".
Definition at line 806 of file arg.h.
References program_time, sbug, scon, serr, slog, sout, and sseq.
|
inline |
Shows a chain as a list of generators of one level of a homology module.
Definition at line 3584 of file chains.h.
References chomp::homengin::ringsymbol().
Referenced by chomp::homology::chaincomplex< euclidom >::compute_and_show_homology(), chomp::homology::chaincomplex< euclidom >::show_homology(), show_homology(), and chomp::homology::chainmap< euclidom >::show_homology().
|
inline |
Shows a chain as a list of generators of one level of a homology module.
Definition at line 3623 of file chains.h.
References show_homology().
|
inline |
Shows (that is, writes to 'sout') one generator of the homology module of a chain complex.
The generator is encoded in the given chain. Note: The numbers of generators of the original chain complex are displayed increased by 1 (that is, the first generator is "1", not "0").
Definition at line 208 of file homology.h.
References sout.
Referenced by ShowGenerators().
void chomp::homology::ShowGenerator | ( | const chain< euclidom > & | c, |
const hashedset< cell > & | s | ||
) |
Shows (that is, writes to 'sout') one generator of the homology module of a geometric complex.
The generator is encoded in the given chain.
Definition at line 272 of file homology.h.
References sout.
void chomp::homology::ShowGenerators | ( | chain< euclidom > *const * | gen, |
const chain< euclidom > * | hom, | ||
int | maxlevel, | ||
const gcomplex< cell, euclidom > & | gcompl | ||
) |
Shows all the generators of the entire homology module of a geometric complex.
Each level of generators is encoded in one array of chains.
Definition at line 311 of file homology.h.
References ShowGenerators(), and sout.
void chomp::homology::ShowGenerators | ( | chain< euclidom > const *const *const | gen, |
const chain< euclidom > * | hom, | ||
int | maxlevel | ||
) |
Shows (that is, writes to 'sout') all the generators of the entire homology module of a chain complex.
Each level of generators is encoded in one array of chains.
Definition at line 233 of file homology.h.
References ShowGenerators(), and sout.
void chomp::homology::ShowGenerators | ( | const chain< euclidom > * | c, |
int | count | ||
) |
Shows (that is, writes to 'sout') all the generators of one level of the homology module of a chain complex.
Each generator is encoded in one chain in the given array.
Definition at line 218 of file homology.h.
References ShowGenerator(), and sout.
Referenced by ShowGenerators().
void chomp::homology::ShowGenerators | ( | const chain< euclidom > * | c, |
int | count, | ||
const hashedset< cell > & | s | ||
) |
Shows (that is, writes to 'sout') all the generators of one level of the homology module of a geometric complex.
Each generator is encoded in one chain in the given array.
Definition at line 296 of file homology.h.
References ShowGenerator(), and sout.
void chomp::homology::ShowGenerators | ( | const chaincomplex< euclidom > & | c, |
const chain< euclidom > * | hom, | ||
int | maxlevel | ||
) |
Shows (that is, writes to 'sout') all the generators of the entire homology module of a chain complex.
The generators are retrieved from the chain complex itself.
Definition at line 251 of file homology.h.
References ShowGenerator(), and sout.
|
inline |
Shows (that is, writes to 'sout') one level of the homology module encoded in the given chain.
Definition at line 137 of file homology.h.
References chomp::homengin::ringsymbol(), and sout.
Referenced by ComputeBettiNumbers(), and ShowHomology().
void chomp::homology::ShowHomology | ( | const chain< euclidom > * | hom, |
int | maxlevel | ||
) |
Shows (that is, writes to 'sout') the entire homology module encoded in an array of chains.
Definition at line 180 of file homology.h.
References ShowHomology(), and sout.
|
inline |
Show (that is, writes to 'sout') the homology map encoded in terms of a chain map.
Definition at line 197 of file homology.h.
References sout.
|
inline |
A simple template that sorts an array using the bubble sort method, removes repeated elements and returns the new number of the elements.
Definition at line 340 of file textfile.h.
References swapelements().
Referenced by operator>>().
|
inline |
A simple template for swapping two elements with the use of a temporary variable of the same type and the assignment operator.
Definition at line 329 of file textfile.h.
Referenced by sortelements(), chomp::homology::chain< euclidom >::swap(), and chomp::homology::chain< euclidom >::swapnumbers().
|
inline |
Compare two points. Returns true iff they have the same coordinates.
Definition at line 98 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::hashfindpoint().
int chomp::homology::TorsionCoefficient | ( | const chain< euclidom > & | c, |
int | start = 0 |
||
) |
Returns the next position in the chain containing a torsion coefficient.
Starts the search at the given position. Returns -1 if not found or the position 'p' of the coefficient. This coefficient can be retrieved as "c. coef (p)".
Definition at line 120 of file homology.h.
|
inline |
Computes the transitive closure of an acyclic graph defined by its adjacency matrix, using the Warshall's algorithm: S.
Warshall, A theorem on Boolean matrices, J. ACM 9 (1962) 11-12.
Definition at line 4356 of file digraph.h.
Referenced by transitiveReduction().
|
inline |
Computes the transitive reduction of an arbitrary acyclic graph.
The output graph must be initially empty.
Definition at line 4399 of file digraph.h.
References graph2matrix(), matrix2graph(), transitiveClosure(), and transitiveReduction().
|
inline |
Computes the transitive reduction of a CLOSED acyclic graph defined by its adjacency matrix, using the algorithm by D.
Gries, A.J. Martin, J.L.A. van de Snepscheut and J.T. Udding, An algorithm for transitive reduction of an acyclic graph, Science of Computer Programming 12 (1989), 151-155. WARNING: The input graph MUST BE CLOSED, use the "transitiveClosure" algorithm first if this is not the case.
Definition at line 4380 of file digraph.h.
Referenced by transitiveReduction().
|
inline |
Wraps coordinates stored in 'c' accordint to the wrap table 'wrap' and store the result in the table called 'result'.
Definition at line 119 of file pointset.h.
Referenced by chomp::homology::tPointset< coordtype >::add(), chomp::homology::tNeighbors< coordtype >::get(), chomp::homology::tPointset< coordtype >::hashfindpoint(), SetSpaceWrapping(), chomp::homology::tPointBase< coordtype >::wrapcoord(), and chomp::homology::tPointBase< coordtype >::wrapcopy().
|
inline |
Wraps coordinates stored in 'c' accordint to the wrap table 'wrap' and store the result in the table called 'result'.
Definition at line 142 of file pointset.h.
int chomp::homology::write | ( | std::ostream & | out, |
const coordtype * | c, | ||
int | dim, | ||
char | parenthesis = 40 , |
||
char | closing = 0 |
||
) |
Definition at line 2148 of file pointset.h.
References closingparenthesis().
Referenced by operator<<(), and write().
int_t chomp::homology::write | ( | std::ostream & | out, |
tPointset< coordtype > & | p, | ||
int_t | first = 0 , |
||
int_t | howmany = -1 , |
||
int | quiet = 0 |
||
) |
Writes a set of points to a file (starting at the point given).
Returns the number of points written or -1 (and show a message) in case of failure.
Definition at line 2407 of file pointset.h.
References write().
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.
The operator << is used to write each element of the set. The parameter 'size' should be set either to SMALL_SIZE or LARGE_SIZE.
Definition at line 826 of file hashsets.h.
References SMALL_SIZE.
int chomp::homology::writebitpoints | ( | std::ostream & | out, |
pointset & | p, | ||
bool | sorted = true , |
||
int | fixed_depth = 0 , |
||
coordinate * | fixed_corner = NULL |
||
) |
Writes a full cubical set represented by a set of points to a file in the "bitcode" format.
If 'sorted', bit codes are sorted as the software by Bill Kalies needs. Otherwise they are saved in the same order as the points in 'p'. The depth of bit fields is determined automatically to the minimal necessary value unless 'fixed_depth' is positive. As the lower left corner, the minimal coordinates of the points are selected unless 'fixed_corner' is NULL. Returns 0 on success and -1 on error (and displays a message).
std::ostream & chomp::homology::writechaincomplex | ( | std::ostream & | out, |
const gcomplex< cell, euclidom > & | g, | ||
bool | symbolicnames = false , |
||
bool | quiet = false |
||
) |
Writes out a chain complex of the geometric cell complex.
Boundary formulas are restricted to cells which are in the geom. complex. If symbolic names requested, the cells are written directly as generators. This procedure is a slightly modified version of "createchaincomplex".
Definition at line 1180 of file gcomplex.h.
References boundarycell(), boundarycoef(), boundarylength(), and scon.
|
inline |
Writes a cube to the output stream in the text mode.
Definition at line 69 of file cubemain.h.
Referenced by operator<<().
|
inline |
Writes a cubical cell to the output stream in the text form.
The actual format depends on which OutputBits are set.
Definition at line 173 of file cellmain.h.
Referenced by operator<<().
std::ostream & chomp::homology::writegenerators | ( | std::ostream & | out, |
const chain< euclidom > * | hom, | ||
const chaincomplex< euclidom > & | c, | ||
const gcomplex< cell, euclidom > & | g, | ||
const int * | level = NULL |
||
) |
Writes the homology generators of the geometric complex to a file.
Definition at line 1390 of file gcomplex.h.
std::ostream & chomp::homology::writegenerators | ( | std::ostream & | out, |
const chain< euclidom > * | hom, | ||
const chaincomplex< euclidom > & | c, | ||
const gcomplex< tCell, euclidom > & | g, | ||
const int * | level, | ||
int | xdim, | ||
int | format = 0 |
||
) |
Writes projected homology generators of a cubical complex to a file.
Format: 0 = text format, 1 = chl format.
Definition at line 64 of file cubmaps.h.
|
extern |
Referenced by bitcountbyte().
const int chomp::homology::DimBits = (sizeof (int_t) > 4) ? 7 : 6 |
The number of signed bits to store the dimension (i.e., 6: max 31).
The maximal allowed dimension in the program is less than what follows from the number of bits (i.e., max 30 for 6 bits).
Definition at line 67 of file pointbas.h.
|
extern |
The global table of BitFields which store the acyclicity information for reducing full cubical sets.
Referenced by acyclic(), Homology(), and Homology2l().
const int chomp::homology::MaxBasDim = (MaxBasDim1 < MaxBasDim2) ? MaxBasDim1 : MaxBasDim2 |
The maximal dimension that can be used if the high bits of an integer store the value of the dimension, and the number of remaining bits is at least as large as the dimension.
Definition at line 89 of file pointbas.h.
Referenced by chomp::homology::tPointBase< coordtype >::number(), and chomp::homology::tPointBase< coordtype >::setwrapping().
const int chomp::homology::MaxBasDim1 = static_cast<int> (1u << (DimBits - 1)) |
The maximal dimension that can be represented using 'DimBits' bits.
Definition at line 80 of file pointbas.h.
The maximal dimension which still leaves enough bits in the integer to have one bit for each direction.
Definition at line 84 of file pointbas.h.
|
extern |
The maximal dimension for which binary decision diagrams are used.
This can be decreased by a program if no binary decision diagrams should be used. However, the value of MaxBddDim cannot exceed the value of MaxBddDimPossible.
Referenced by acyclic(), acyclic_rel(), chomp::homology::reduction1::addcubeneighbors(), and Homology2l().
const int chomp::homology::MaxBddDimPossible = 3 |
The maximal dimension for which binary decision diagrams are programmed.
Definition at line 1177 of file bddacycl.h.
The number of bits in an integer number that remain to be used for other purposes, because the high 'DimBits' bits are used for the dimension.
Definition at line 71 of file pointbas.h.
Referenced by chomp::homology::tCellBase< coordtype >::dim(), chomp::homology::tCellFix< dimfix, coordtype >::dim(), chomp::homology::tCellVar< coordtype >::dim(), chomp::homology::tCubeBase< coordtype >::dim(), chomp::homology::tCellFix< dimfix, coordtype >::initialize(), chomp::homology::tCellBase< coordtype >::initialize(), chomp::homology::tCellVar< coordtype >::initialize(), chomp::homology::tCellBase< coordtype >::spacedim(), chomp::homology::tCellVar< coordtype >::spacedim(), chomp::homology::tCellBase< coordtype >::tCellBase(), chomp::homology::tCellFix< dimfix, coordtype >::tCellFix(), chomp::homology::tCellVar< coordtype >::tCellVar(), and chomp::homology::tCubeBase< coordtype >::tCubeBase().
The mask of the bits remaining after the dimension bits are excluded.
Definition at line 77 of file pointbas.h.
Referenced by chomp::homology::tCubeBase< coordtype >::num(), chomp::homology::tCellBase< coordtype >::num1(), chomp::homology::tCellBase< coordtype >::num2(), chomp::homology::tPointBase< coordtype >::number(), and chomp::homology::tCellBase< coordtype >::tCellBase().
|
extern |
The external variable which measures the time used by the program from its start.
Note that in the destructor of this variable, a message is displayed to std::cout indicating how much time was used by the program in its entire run.
Referenced by chomp::multiwork::mwSubdivMain(), and setstreams().
|
extern |
An output stream for writing additional debug messages.
This stream is turned off by default.
Referenced by chomp::homology::diGraph< wType >::BellmanFord(), chomp::homology::diGraph< wType >::DFSfinishTime(), chomp::homology::diGraph< wType >::DFSforest(), chomp::multiwork::mwSubCoordinator< dim, coord >::FailedBox(), chomp::multiwork::mwSubCoordinator< dim, coord >::GoodProbe(), Homology(), chomp::homology::diGraph< wType >::Johnson(), chomp::homology::diGraph< wType >::minMeanCycleWeightMem(), chomp::multiwork::mwSubCoordinator< dim, coord >::NegativeProbe(), setstreams(), and chomp::multiwork::mwSubCoordinator< dim, coord >::SuccessfulBox().
|
extern |
The console output stream to which one should put all the junk that spoils the log file, like progress indicators.
Referenced by checkacyclicmap(), chomp::homology::gcomplex< cell, euclidom >::collapse(), ComputeBettiNumbers(), ComputeBettiNumbers(), createcellmap(), createchaincomplex(), creategraph(), chomp::homology::reduction0::cubexpand(), chomp::homology::reduction1::cubexpand(), chomp::homology::reduction0::cubreducequiet(), chomp::homology::reduction1::cubreducequiet(), IndexPairM(), IndexPairP(), reduceFullCubesAlg(), setstreams(), chomp::homology::mmatrix< euclidom >::simple_form(), chomp::homology::mmatrix< euclidom >::simple_reductions(), and writechaincomplex().
|
extern |
A wrapper for the standard error stream.
Referenced by setstreams().
The sign bit of the int_t number.
Definition at line 74 of file pointbas.h.
|
extern |
The output stream to which one can send messages for logging only.
Those messages are not shown to the standard output and are ignored if the log file is not in use.
Referenced by setstreams().
|
extern |
A replacement for standard output stream, with optional logging and other features provided by the class 'outputstream'.
Referenced by chomp::multiwork::mwSubCoordinator< dim, coord >::Accept(), addboundaries(), addmapimg(), checkacyclicmap(), checkimagecontained(), checkimagedisjoint(), checkinclusion(), collapse(), ComputeBettiNumbers(), ComputeBettiNumbers(), cubes2cells(), decreasedimension(), expandAinX(), Homology(), Homology2l(), IndexPairM(), IndexPairP(), chomp::multiwork::mwSubCoordinator< dim, coord >::mwSubCoordinator(), chomp::multiwork::mwSubdivMain(), chomp::multiwork::mwSubCoordinator< dim, coord >::Prepare(), chomp::multiwork::mwSubWorker< dim, coord >::Process(), read(), readmapdomain(), readmapimage(), readmaprestriction(), readrestriction(), readselective(), readtheset(), reduceFullCubesAlg(), reducepair(), chomp::homology::tPointset< coordtype >::rehash(), chomp::multiwork::mwSubCoordinator< dim, coord >::Reject(), removeAfromX(), restrictAtoneighbors(), savetheset(), scancubes(), setstreams(), ShowGenerator(), ShowGenerators(), ShowHomology(), chomp::homology::mmatrix< euclidom >::simple_form(), chomp::homology::chaincomplex< euclidom >::simple_form(), chomp::homology::mmatrix< euclidom >::simple_form_to_SNF(), chomp::homology::mmatrix< euclidom >::simple_reductions(), chomp::homology::hashedset< element, hashkeys >::~hashedset(), and chomp::homology::tPointBaseInitializer< coordtype >::~tPointBaseInitializer().
|
extern |
An auxiliary stream which captures sequences of processed data.
This stream is used by some programs in the CHomP package.
Referenced by chomp::homology::gcomplex< cell, euclidom >::collapse(), chomp::homology::reduction0::cubexpand(), chomp::homology::reduction1::cubexpand(), chomp::homology::reduction0::cubreducequiet(), chomp::homology::reduction1::cubreducequiet(), chomp::homology::MapCanExpand< tCube >::operator()(), restrictAtoneighbors(), and setstreams().
|
extern |
The global instance of this class which stores tabulated configurations to use in the full cube reduction procedures.
Referenced by acyclic().
|
extern |
The variable which controls which binary decision diagrams should be used in dimension 3, either programmed by P.
Pilarczyk (if set to false) or received from G. Malandain (if set to true).
Referenced by bddacyclic().