Namespaces | Functions

homtools.h File Reference

This file contains various small procedures that might be useful in programs which compute homology. More...

#include "chomp/homology/cubisets.h"
#include "chomp/cubes/cubmaps.h"
#include "chomp/simplices/simplex.h"
#include "chomp/bitmaps/bitmaps.h"

Go to the source code of this file.

Namespaces

namespace  chomp
 

This namespace contains the entire CHomP library interface.


namespace  chomp::homology
 

This namespace contains the core of the homology computation procedures and related classes and templates contained in the CHomP C++ library.


Functions

template<class tCube >
void chomp::homology::scancubes (const char *name)
 Reads all the cubes from the given file and ignores them.
template<class settype >
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.
template<class cell , class euclidom >
void chomp::homology::readcells (const char *name, gcomplex< cell, euclidom > &s, const char *what)
 Uses the general procedure "readtheset" to read a geometric complex.
template<class element >
void chomp::homology::readelements (const char *name, hashedset< element > &s, const char *what)
 Uses the general procedure "readtheset" to read a set of elements.
void chomp::homology::readelements (const char *name, cubes &cub, const char *what)
 Reads a set of cubes from the given file.
template<class element >
void chomp::homology::readmapdomain (const char *name, hashedset< element > &cub)
 Reads the domain of a cubical multivalued map from the given file.
template<class element >
void chomp::homology::readmapimage (const char *name, hashedset< element > &cub)
 Reads the domain of a cubical multivalued map from the given file.
template<class element >
void chomp::homology::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.
template<class element >
void chomp::homology::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.
template<class element >
void chomp::homology::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.
template<class settype >
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.
template<class cell , class euclidom >
void chomp::homology::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.
template<class element >
void chomp::homology::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.
void chomp::homology::saveelements (const char *name, const cubes &cub, const char *what, const char *filecomment=0)
 Saves a set of cubes to the given file.
template<class cubsettype >
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.
template<class cubsettype >
bool chomp::homology::checkinclusion (const cubsettype &Xcubes, const cubsettype &Ycubes, const char *Xname, const char *Yname)
 Checks for the inclusion of X in Y.
template<class maptype , class cubsettype >
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.
template<class maptype , class cubsettype >
bool chomp::homology::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.
template<class maptype , class cubsettype >
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).
template<class tCell , class tCube , class tCoef >
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.
template<class cubsettype >
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.
template<class cubsettype >
void chomp::homology::removeAfromX (cubsettype &Xcubes, const cubsettype &Acubes, const char *Xname, const char *Aname)
 Removes 'Acubes' from 'Xcubes' and shows messages.
template<class cell , class euclidom >
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'.
template<class cubsettype >
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.
template<class cubsettype , class maptype >
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.
template<class cubsettype >
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.
template<class maptype , class cubsettype >
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.
template<class maptype , class cubsettype >
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.
template<class maptype , class cubsettype >
void chomp::homology::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.
template<class tCubes , class tCell , class tCoef >
void chomp::homology::cubes2cells (tCubes &Xcubes, gcomplex< tCell, tCoef > &Xcompl, const char *Xname, bool deletecubes=true)
 Transforms cubes to full-dimensional cells.
template<class cell , class euclidom >
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.
template<class cell , class euclidom >
void chomp::homology::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.
template<class cell , class euclidom >
void chomp::homology::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.
template<class cell , class euclidom >
void chomp::homology::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.
template<class cell , class euclidom >
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.
template<class cell , class euclidom >
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.
template<class tCube >
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.

Detailed Description

This file contains various small procedures that might be useful in programs which compute homology.

The procedures include reading and writing cubical sets and geometric complexes, as well as some processing and verification of the cubical data structures.

Author:
Pawel Pilarczyk

Definition in file homtools.h.