The Original CHomP Software
Public Member Functions | Protected Member Functions | List of all members
chomp::homengin::MMengine Class Referenceabstract

A general class for the MM* bitmap-based engines. More...

#include <engines.h>

Inheritance diagram for chomp::homengin::MMengine:
chomp::homengin::engine chomp::homengin::MM_ARengine chomp::homengin::MM_ASLTengine chomp::homengin::MM_CRengine

Public Member Functions

virtual int speed () const =0
 The speed of the engine: The higher the number, the better. More...
 
bool dimsupported (int dim) const
 Is this dimension supported by this engine? More...
 
int memory (const cubfile &X) const
 Rough memory usage estimate for a single set of cubes. More...
 
bool relative () const
 Does this engine compute relative homology? More...
 
bool elementary () const
 Is this engine capable of processing elementary cubes? More...
 
bool spacewrapping () const
 Does this engine support space wrapping? More...
 
virtual void homology (const cubfile &x, algstruct< chomp::homology::integer > &h) const =0
 Compute the homology of the given set of cubes. More...
 
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. More...
 
virtual const char * name () const =0
 The name of the engine to be used in the command line. More...
 
virtual std::ostream & describe (std::ostream &out) const =0
 Describes this particular engine. More...
 
virtual int speed () const
 The speed of the engine: The higher the number, the better. More...
 
virtual bool dimsupported (int dim) const
 Is this dimension supported by this engine? More...
 
virtual int memory (const cubfile &X) const
 Rough memory usage estimate for a single set of cubes. More...
 
virtual bool relative () const
 Does this engine compute relative homology? More...
 
virtual bool elementary () const
 Is this engine capable of processing elementary cubes? More...
 
virtual bool spacewrapping () const
 Does this engine support space wrapping? More...
 
virtual void homology (const cubfile &x, algstruct< chomp::homology::integer > &h) const
 Compute the homology of the given set of cubes. More...
 
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. More...
 
virtual const char * name () const
 The name of the engine to be used in the command line. More...
 
virtual std::ostream & describe (std::ostream &out) const
 Describes this particular engine. More...
 

Protected Member Functions

 MMengine ()
 The default constructor. More...
 
 ~MMengine ()
 The destructor. More...
 
- Protected Member Functions inherited from chomp::homengin::engine
 engine ()
 The default constructor: Add the engine to the list. More...
 
virtual ~engine ()
 The destructor: Remove the engine from the list. More...
 

Additional Inherited Members

- Public Types inherited from chomp::homengin::engine
typedef std::vector< const engine * > enginelist
 The type of a list of engines. More...
 
- Static Public Member Functions inherited from chomp::homengin::engine
static std::ostream & showlist (std::ostream &out, const engine::enginelist &elist=engine::engines)
 Shows a list of available homology engines with descriptions. More...
 
static const enginefind (const cubfile *X, const cubfile *Y, const engine::enginelist &elist=engine::engines)
 Finds the most appropriate homology engine. More...
 
static const enginefind (const cubfile *X, const engine::enginelist &elist=engine::engines)
 Finds the most appropriate homology engine for just one set. More...
 
static const enginefind (const char *name, const engine::enginelist &elist=engine::engines)
 Finds a homology engine with the given name. More...
 
- Static Public Attributes inherited from chomp::homengin::engine
static enginelist engines
 A list of all the engines that have been defined so far. More...
 

Detailed Description

A general class for the MM* bitmap-based engines.

Definition at line 408 of file engines.h.

Constructor & Destructor Documentation

◆ MMengine()

chomp::homengin::MMengine::MMengine ( )
inlineprotected

The default constructor.

Definition at line 412 of file engines.h.

413 {
414 return;
415 }

◆ ~MMengine()

chomp::homengin::MMengine::~MMengine ( )
inlineprotected

The destructor.

Definition at line 418 of file engines.h.

419 {
420 return;
421 }

Member Function Documentation

◆ describe()

virtual std::ostream & chomp::homengin::MMengine::describe ( std::ostream &  out) const
pure virtual

Describes this particular engine.

Reimplemented from chomp::homengin::engine.

Implemented in chomp::homengin::MM_CRengine, chomp::homengin::MM_ARengine, and chomp::homengin::MM_ASLTengine.

◆ dimsupported()

bool chomp::homengin::MMengine::dimsupported ( int  dim) const
inlinevirtual

Is this dimension supported by this engine?

Reimplemented from chomp::homengin::engine.

Reimplemented in chomp::homengin::MM_CRengine, and chomp::homengin::MM_ARengine.

Definition at line 428 of file engines.h.

429 {
430 return (dim == embeddingDim);
431 }

◆ elementary()

bool chomp::homengin::MMengine::elementary ( ) const
inlinevirtual

Is this engine capable of processing elementary cubes?

Reimplemented from chomp::homengin::engine.

Definition at line 444 of file engines.h.

445 {
446 return false;
447 }

◆ homology() [1/2]

virtual void chomp::homengin::MMengine::homology ( const cubfile x,
algstruct< chomp::homology::integer > &  h 
) const
pure virtual

Compute the homology of the given set of cubes.

Reimplemented from chomp::homengin::engine.

Implemented in chomp::homengin::MM_CRengine, chomp::homengin::MM_ARengine, and chomp::homengin::MM_ASLTengine.

◆ homology() [2/2]

void chomp::homengin::MMengine::homology ( const cubfile x,
const cubfile y,
algstruct< chomp::homology::integer > &  h 
) const
inlinevirtual

Compute the relative homology of the given pair of sets of cubes.

Reimplemented from chomp::homengin::engine.

Definition at line 460 of file engines.h.

462 {
463 throw "The MM* engines do not support relative homology.";
464 }

◆ memory()

int chomp::homengin::MMengine::memory ( const cubfile X) const
virtual

Rough memory usage estimate for a single set of cubes.

Returns 0 if unknown, -1 if not enough memory.

Reimplemented from chomp::homengin::engine.

◆ name()

virtual const char * chomp::homengin::MMengine::name ( ) const
pure virtual

The name of the engine to be used in the command line.

Reimplemented from chomp::homengin::engine.

Implemented in chomp::homengin::MM_CRengine, chomp::homengin::MM_ARengine, and chomp::homengin::MM_ASLTengine.

◆ relative()

bool chomp::homengin::MMengine::relative ( ) const
inlinevirtual

Does this engine compute relative homology?

Reimplemented from chomp::homengin::engine.

Definition at line 438 of file engines.h.

439 {
440 return false;
441 }

◆ spacewrapping()

bool chomp::homengin::MMengine::spacewrapping ( ) const
inlinevirtual

Does this engine support space wrapping?

Reimplemented from chomp::homengin::engine.

Definition at line 450 of file engines.h.

451 {
452 return false;
453 }

◆ speed()

virtual int chomp::homengin::MMengine::speed ( ) const
pure virtual

The speed of the engine: The higher the number, the better.

Reimplemented from chomp::homengin::engine.

Implemented in chomp::homengin::MM_CRengine, chomp::homengin::MM_ARengine, and chomp::homengin::MM_ASLTengine.


The documentation for this class was generated from the following file: