The Conley-Morse Graphs Software
Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ConleyIndex< IndexPair, euclidom > Class Template Reference

The class that computes and returns properties of the Conley index. More...

#include <conindex.h>

Public Member Functions

 ConleyIndex (const IndexPair *c=0)
 The default constructor. More...
 
 ConleyIndex (const ConleyIndex< IndexPair, euclidom > &c)
 The copy constructor. More...
 
 ~ConleyIndex ()
 The destructor. More...
 
ConleyIndex< IndexPair, euclidom > & operator= (const ConleyIndex< IndexPair, euclidom > &c)
 The assignment operator. More...
 
void setIndexPair (const IndexPair *f)
 Sets the index pair to be used to compute the Conley index. More...
 
int compute (bool twolayer=false)
 Computes the Conley index. More...
 
int reduce (bool shrink=true)
 Reduces the index map using some shift equivalences to certain extent. More...
 
void truncate (int newlevel)
 Truncates the Conley index to the new top level. More...
 
int eigenvalues (int level, std::vector< double > &Re, std::vector< double > &Im, bool nonzero=true, bool sorted=true) const
 Computes the eigenvalues of the index map. More...
 
bool trivial () const
 Verifies if the index is trivial. More...
 
int BettiNumber (int n) const
 Retrieves the nth Betti number. More...
 
euclidom Coefficient (int n, int i) const
 Retrieves the 'i'th [torsion] coefficient at the nth level. More...
 
int dim () const
 Retrieves the top level, or the maximal dimension of the index. More...
 
const chomp::homology::mmatrix< euclidom > * Map (int n) const
 Retrieves the matrix of the index map at the given level. More...
 
std::string MapString (int n, const char *newline="\n") const
 Retrieves a human-readable text representation of the map. More...
 
std::string EigenString (int n) const
 Retrieves a human-readable text showing the eigenvalues. More...
 
std::string HomString () const
 Retrieves a human-readable text representation of the homology. More...
 
void define (const int *betti, const chomp::homology::mmatrix< euclidom > *matr, int _toplevel)
 Defines the Conley index by the given Betti numbers and the given maps in homology. More...
 
void define (const int *betti, int _toplevel)
 Defines the Conley index by the given Betti numbers and adds the identity map. More...
 

Static Private Member Functions

static double round (double x, double epsilon, double threshold)
 Rounds a real number to the given precision. More...
 

Private Attributes

const IndexPaircf
 An object that feeds this class with cubes. More...
 
int toplevel
 The number of the top homology level. More...
 
std::vector< std::vector< euclidom > > coef
 The torsion coefficients of the corresponding homology generators. More...
 
chomp::homology::mmatrix< euclidom > * indmap
 The matrices of the index map at each level. More...
 
int nontrivialindex
 Variable that stores the tabulated information on whether the index is nontrivial. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const ConleyIndex< IndexPair, euclidom > &c)
 Converts the Conley index to a string (without the index pair). More...
 
std::istream & operator>> (std::istream &in, ConleyIndex< IndexPair, euclidom > &c)
 Retrieves the Conley index from a string (without the index pair). More...
 

Detailed Description

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
class ConleyIndex< IndexPair, euclidom >

The class that computes and returns properties of the Conley index.

The index pair object is used to get the cubical index pair.

Definition at line 85 of file conindex.h.

Constructor & Destructor Documentation

◆ ConleyIndex() [1/2]

template<class IndexPair , class euclidom >
ConleyIndex< IndexPair, euclidom >::ConleyIndex ( const IndexPair c = 0)
inline

The default constructor.

Definition at line 221 of file conindex.h.

◆ ConleyIndex() [2/2]

template<class IndexPair , class euclidom >
ConleyIndex< IndexPair, euclidom >::ConleyIndex ( const ConleyIndex< IndexPair, euclidom > &  c)
inline

The copy constructor.

Definition at line 231 of file conindex.h.

◆ ~ConleyIndex()

template<class IndexPair , class euclidom >
ConleyIndex< IndexPair, euclidom >::~ConleyIndex
inline

The destructor.

Definition at line 268 of file conindex.h.

Member Function Documentation

◆ BettiNumber()

template<class IndexPair , class euclidom >
int ConleyIndex< IndexPair, euclidom >::BettiNumber ( int  n) const
inline

Retrieves the nth Betti number.

Definition at line 301 of file conindex.h.

◆ Coefficient()

template<class IndexPair , class euclidom >
euclidom ConleyIndex< IndexPair, euclidom >::Coefficient ( int  n,
int  i 
) const
inline

Retrieves the 'i'th [torsion] coefficient at the nth level.

Returns 0 if 'i' is beyond the available scope.

Definition at line 323 of file conindex.h.

◆ compute()

template<class IndexPair , class euclidom >
int ConleyIndex< IndexPair, euclidom >::compute ( bool  twolayer = false)
inline

Computes the Conley index.

If requested, uses the two-layer construction. Otherwise, first tries the flat model, and switches to the two-layer construction only in the case of failure.

Definition at line 417 of file conindex.h.

◆ define() [1/2]

template<class IndexPair , class euclidom >
void ConleyIndex< IndexPair, euclidom >::define ( const int *  betti,
const chomp::homology::mmatrix< euclidom > *  matr,
int  _toplevel 
)
inline

Defines the Conley index by the given Betti numbers and the given maps in homology.

Definition at line 958 of file conindex.h.

◆ define() [2/2]

template<class IndexPair , class euclidom >
void ConleyIndex< IndexPair, euclidom >::define ( const int *  betti,
int  _toplevel 
)
inline

Defines the Conley index by the given Betti numbers and adds the identity map.

Definition at line 998 of file conindex.h.

◆ dim()

template<class IndexPair , class euclidom >
int ConleyIndex< IndexPair, euclidom >::dim
inline

Retrieves the top level, or the maximal dimension of the index.

The numbers of available levels are from 0 to dim inclusive. Returns -1 if the index is undefined.

Definition at line 337 of file conindex.h.

◆ EigenString()

template<class IndexPair , class euclidom >
std::string ConleyIndex< IndexPair, euclidom >::EigenString ( int  n) const
inline

Retrieves a human-readable text showing the eigenvalues.

Definition at line 917 of file conindex.h.

◆ eigenvalues()

template<class IndexPair , class euclidom >
int ConleyIndex< IndexPair, euclidom >::eigenvalues ( int  level,
std::vector< double > &  Re,
std::vector< double > &  Im,
bool  nonzero = true,
bool  sorted = true 
) const
inline

Computes the eigenvalues of the index map.

The eigenvalues are appended to the given vectors of doubles with the "push_back" method. Returns the number of eigenvalues or -1 in case of failure.

Definition at line 765 of file conindex.h.

References dgeev_().

◆ HomString()

template<class IndexPair , class euclidom >
std::string ConleyIndex< IndexPair, euclidom >::HomString
inline

Retrieves a human-readable text representation of the homology.

Definition at line 368 of file conindex.h.

◆ Map()

template<class IndexPair , class euclidom >
const chomp::homology::mmatrix< euclidom > * ConleyIndex< IndexPair, euclidom >::Map ( int  n) const
inline

Retrieves the matrix of the index map at the given level.

Returns 0 if the map at this level is zero.

Definition at line 315 of file conindex.h.

◆ MapString()

template<class IndexPair , class euclidom >
std::string ConleyIndex< IndexPair, euclidom >::MapString ( int  n,
const char *  newline = "\n" 
) const
inline

Retrieves a human-readable text representation of the map.

Definition at line 343 of file conindex.h.

◆ operator=()

template<class IndexPair , class euclidom >
ConleyIndex< IndexPair, euclidom > & ConleyIndex< IndexPair, euclidom >::operator= ( const ConleyIndex< IndexPair, euclidom > &  c)
inline

The assignment operator.

Definition at line 249 of file conindex.h.

◆ reduce()

template<class IndexPair , class euclidom >
int ConleyIndex< IndexPair, euclidom >::reduce ( bool  shrink = true)
inline

Reduces the index map using some shift equivalences to certain extent.

Shrinks the matrices and generators if requested to.

Definition at line 617 of file conindex.h.

◆ round()

template<class IndexPair , class euclidom >
double ConleyIndex< IndexPair, euclidom >::round ( double  x,
double  epsilon,
double  threshold 
)
staticprivate

Rounds a real number to the given precision.

If the absolute value of the number is below the given threshold then the number is truncated to 0.

Definition at line 284 of file conindex.h.

◆ setIndexPair()

template<class IndexPair , class euclidom >
void ConleyIndex< IndexPair, euclidom >::setIndexPair ( const IndexPair f)
inline

Sets the index pair to be used to compute the Conley index.

Definition at line 276 of file conindex.h.

◆ trivial()

template<class IndexPair , class euclidom >
bool ConleyIndex< IndexPair, euclidom >::trivial
inline

Verifies if the index is trivial.

Returns true if yes, false if it is non-trivial. Note: This information is tabulated.

Definition at line 894 of file conindex.h.

◆ truncate()

template<class IndexPair , class euclidom >
void ConleyIndex< IndexPair, euclidom >::truncate ( int  newlevel)
inline

Truncates the Conley index to the new top level.

Definition at line 754 of file conindex.h.

Friends And Related Function Documentation

◆ operator<<

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
std::ostream & operator<< ( std::ostream &  out,
const ConleyIndex< IndexPair, euclidom > &  c 
)
friend

Converts the Conley index to a string (without the index pair).

Definition at line 1022 of file conindex.h.

◆ operator>>

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
std::istream & operator>> ( std::istream &  in,
ConleyIndex< IndexPair, euclidom > &  c 
)
friend

Retrieves the Conley index from a string (without the index pair).

Definition at line 1061 of file conindex.h.

Member Data Documentation

◆ cf

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
const IndexPair* ConleyIndex< IndexPair, euclidom >::cf
private

An object that feeds this class with cubes.

Definition at line 165 of file conindex.h.

◆ coef

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
std::vector<std::vector<euclidom> > ConleyIndex< IndexPair, euclidom >::coef
private

The torsion coefficients of the corresponding homology generators.

If delta () == 1, then no torsion.

Definition at line 172 of file conindex.h.

◆ indmap

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
chomp::homology::mmatrix<euclidom>* ConleyIndex< IndexPair, euclidom >::indmap
private

The matrices of the index map at each level.

Definition at line 175 of file conindex.h.

◆ nontrivialindex

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
int ConleyIndex< IndexPair, euclidom >::nontrivialindex
mutableprivate

Variable that stores the tabulated information on whether the index is nontrivial.

Values used: -1 = unknown, 0 = trivial, 1 = nontrivial.

Definition at line 194 of file conindex.h.

◆ toplevel

template<class IndexPair = EmptyIndexPair, class euclidom = chomp::homology::integer>
int ConleyIndex< IndexPair, euclidom >::toplevel
private

The number of the top homology level.

Definition at line 168 of file conindex.h.


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