34#ifndef _CAPD_HOMENGIN_ENGINES_H_
35#define _CAPD_HOMENGIN_ENGINES_H_
44#include "capd/homologicalAlgebra/embeddingDim.h"
45#include "capd/chom/dim.hpp"
46#include "capd/auxil/ofstreamcout.h"
48extern ofstreamcout
fcout;
98 enginelist::iterator it = std::find (
engines. begin (),
147 throw "Homology computation not supported.";
154 throw "Relative homology computation not supported.";
158 virtual const char *
name ()
const
164 virtual std::ostream &
describe (std::ostream &out)
const
166 out <<
"This is an unknown homology engine.\n";
184 return find (X, 0, elist);
337 throw "The BK engine cannot compute relative homology.";
430 return (dim == embeddingDim);
463 throw "The MM* engines do not support relative homology.";
467 virtual const char *
name ()
const = 0;
470 virtual std::ostream &
describe (std::ostream &out)
const = 0;
506 return ((dim == embeddingDim) || ((dim >= 2) && (dim <= 4)));
558 return ((dim == embeddingDim) || ((dim >= 2) && (dim <= 4)));
This file defines an algebraic data structure which is used to store the information about computed h...
This file contains the definition of a class which can be used to parse the command line of a program...
This file contains various procedures for the homology computation.
The homology engine that uses the Bill Kalies' engine: the version which uses the lookup table for re...
BK_LTengine()
The default constructor.
static BK_LTengine eng
One instance of this engine.
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
int speed() const
The speed of the engine: The higher the number, the better.
const char * name() const
The name of the engine to be used in the command line.
~BK_LTengine()
The destructor.
The homology engine that uses the Bill Kalies' engine.
void homology(const cubfile &x, const cubfile &y, algstruct< chomp::homology::integer > &h) const
Compute the relative homology of the given pair of sets of cubes.
int memory(const cubfile &X) const
Rough memory usage estimate for a single set of cubes.
bool dimsupported(int dim) const
Is this dimension supported by this engine?
const char * name() const
The name of the engine to be used in the command line.
int speed() const
The speed of the engine: The higher the number, the better.
bool elementary() const
Is this engine capable of processing elementary cubes?
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
~BKengine()
The destructor.
void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
static BKengine eng
One instance of this engine.
bool spacewrapping() const
Does this engine support space wrapping?
bool relative() const
Does this engine compute relative homology?
bool useLookupTable
Should the lookup table be used prior to the homology computation?
BKengine()
The default constructor.
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
const char * name() const
The name of the engine to be used in the command line.
~MM_ARengine()
The destructor.
int speed() const
The speed of the engine: The higher the number, the better.
bool dimsupported(int dim) const
Is this dimension supported by this engine?
MM_ARengine()
The default constructor.
void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
static MM_ARengine eng
One instance of this engine.
MM_ASLTengine()
The default constructor.
static MM_ASLTengine eng
One instance of this engine.
void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
int speed() const
The speed of the engine: The higher the number, the better.
const char * name() const
The name of the engine to be used in the command line.
~MM_ASLTengine()
The destructor.
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
const char * name() const
The name of the engine to be used in the command line.
void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
int speed() const
The speed of the engine: The higher the number, the better.
static MM_CRengine eng
One instance of this engine.
MM_CRengine()
The default constructor.
bool dimsupported(int dim) const
Is this dimension supported by this engine?
~MM_CRengine()
The destructor.
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
A general class for the MM* bitmap-based engines.
virtual const char * name() const =0
The name of the engine to be used in the command line.
virtual std::ostream & describe(std::ostream &out) const =0
Describes this particular engine.
bool spacewrapping() const
Does this engine support space wrapping?
~MMengine()
The destructor.
bool elementary() const
Is this engine capable of processing elementary cubes?
virtual void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const =0
Compute the homology of the given set of cubes.
bool relative() const
Does this engine compute relative homology?
virtual int speed() const =0
The speed of the engine: The higher the number, the better.
bool dimsupported(int dim) const
Is this dimension supported by this engine?
int memory(const cubfile &X) const
Rough memory usage estimate for a single set of cubes.
MMengine()
The default constructor.
void homology(const cubfile &x, const cubfile &y, algstruct< chomp::homology::integer > &h) const
Compute the relative homology of the given pair of sets of cubes.
The homology engine that uses lists of cubes (Pawel Pilarczyk).
bool elementary() const
Is this engine capable of processing elementary cubes?
void homology(const cubfile &x, const cubfile &y, algstruct< chomp::homology::integer > &h) const
Compute the relative homology of the given pair of sets of cubes.
~PPengine()
The destructor.
int memory(const cubfile &X) const
Rough memory usage estimate for a single set of cubes.
bool relative() const
Does this engine compute relative homology?
const char * name() const
The name of the engine to be used in the command line.
std::ostream & describe(std::ostream &out) const
Describes this particular engine.
bool spacewrapping() const
Does this engine support space wrapping?
bool dimsupported(int dim) const
Is this dimension supported by this engine?
void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
static PPengine eng
One instance of this engine.
int speed() const
The speed of the engine: The higher the number, the better.
PPengine()
The default constructor.
An algebraic structure that represents a finitely generated Abelian group with gradation.
An abstract class that is inherited by all the cubical sets.
An abstract class that is inherited by all the homology engines.
std::vector< const engine * > enginelist
The type of a list of engines.
virtual std::ostream & describe(std::ostream &out) const
Describes this particular engine.
static const engine * find(const cubfile *X, const cubfile *Y, const engine::enginelist &elist=engine::engines)
Finds the most appropriate homology engine.
static std::ostream & showlist(std::ostream &out, const engine::enginelist &elist=engine::engines)
Shows a list of available homology engines with descriptions.
virtual bool relative() const
Does this engine compute relative homology?
static const engine * find(const cubfile *X, const engine::enginelist &elist=engine::engines)
Finds the most appropriate homology engine for just one set.
virtual int speed() const
The speed of the engine: The higher the number, the better.
virtual bool dimsupported(int dim) const
Is this dimension supported by this engine?
virtual int memory(const cubfile &X) const
Rough memory usage estimate for a single set of cubes.
virtual bool elementary() const
Is this engine capable of processing elementary cubes?
static enginelist engines
A list of all the engines that have been defined so far.
virtual const char * name() const
The name of the engine to be used in the command line.
virtual void homology(const cubfile &x, const cubfile &y, algstruct< chomp::homology::integer > &h) const
Compute the relative homology of the given pair of sets of cubes.
engine()
The default constructor: Add the engine to the list.
virtual void homology(const cubfile &x, algstruct< chomp::homology::integer > &h) const
Compute the homology of the given set of cubes.
virtual ~engine()
The destructor: Remove the engine from the list.
virtual bool spacewrapping() const
Does this engine support space wrapping?
static const engine * find(const char *name, const engine::enginelist &elist=engine::engines)
Finds a homology engine with the given name.
static const int MaxDim
The maximal dimension of a cube.
This file contains some precompiler definitions which indicate the operating system and/or compiler u...
This file defines various types of cubical sets whose homology can be computed by homology engines.
ofstreamcout fcout
An output stream defined by M. Mrozek in the CAPD library.
This namespace contains the entire CHomP library interface.
This file contains some useful functions related to the text input/output procedures.
This file defines a simple data structure which can be used to measure time used by the program (or s...