The Conley-Morse Graphs Software
|
The Morse decoposition class. More...
#include <morsedec.h>
Public Types | |
typedef mapcomp | MapCompType |
The type of the map computation class. More... | |
typedef cubetype | CubeType |
The type of a single cube. More... | |
typedef cubsettype | CubSetType |
The type of a set of cubes used to store each Morse set. More... | |
typedef IndexPair< mapcomp, cubetype, cubsettype > | PairType |
The type of the index pair. More... | |
typedef ConleyIndex< PairType > | IndexType |
The type of the Conley index. More... | |
Public Member Functions | |
MorseDecomposition (const mapcomp &_M=mapcomp()) | |
The default constructor. More... | |
~MorseDecomposition () | |
The destructor. More... | |
MorseDecomposition (const MorseDecomposition &m) | |
The copy constructor. More... | |
MorseDecomposition< mapcomp, cubetype, cubsettype > & | operator= (const MorseDecomposition< mapcomp, cubetype, cubsettype > &m) |
The assignment operator. More... | |
void | swap (MorseDecomposition &m) |
Swaps the internal data with another object (note: both must be initialized with the same map computation object reference). More... | |
int | setnumber (int n) |
Changes (increases or decreases) the number of Morse sets. More... | |
int | add (int n, const cubetype &q) |
Adds a cube to the given Morse set and increases the number of Morse sets if necessary. More... | |
int | count () const |
Returns the number of Morse sets. More... | |
const cubsettype & | operator[] (int n) const |
Returns the n-th Morse set. More... | |
cubsettype & | operator[] (int n) |
Returns the n-th Morse set. More... | |
int | distance (int n, int m) const |
Returns the approximate distance between the two Morse sets. More... | |
int | addconn (int n, int m) |
Adds a connection between the given Morse sets without adding any cubes to this connection (like in a direct connection). More... | |
int | addconn (int n, int m, const cubetype &q) |
Adds a cube to the connecting orbit between the given Morse sets. More... | |
bool | connected (int n, int m) const |
Checks whether there exists a connection between given sets. More... | |
const cubsettype & | connection (int n, int m) const |
Returns the connection between the given sets. More... | |
int | distance (int n, int m, int k) const |
Returns the approximate maximal distance of a cube in the orbit that connects the sets n and m (in either direction) from the k-th Morse set, i.e., how far the orbit is from the set. More... | |
int | conndistance (int n, int m) const |
Returns the appropriate maximal distance between cubes that are contained in the Morse set n and the connecting orbit n-m or m-n. More... | |
int | makegraph (chomp::homology::diGraph<> &g) const |
Creates a graph representation of the Morse decomposition. More... | |
const IndexType & | compute (int n) |
Computes the Conley index of the given Morse set. More... | |
int | compute () |
Computes the Conley indices of all the Morse sets. More... | |
bool | computed (int n) const |
Verifies if the Conley index for the given Morse set has been already computed. More... | |
const IndexType & | index (int n) const |
Retrieves the previously computed Conley index of the given Morse set. More... | |
const IndexType & | setindex (int n, const typename MorseDecomposition< mapcomp, cubetype, cubsettype >::IndexType &ind) |
Sets the index of the given Morse set to the apriori known one. More... | |
bool | trivial (int n) const |
Returns true if the Conley index of the given Morse set is trivial, and false if either nontrivial or not yet computed. More... | |
void | intersection (const MorseDecomposition< mapcomp, cubetype, cubsettype > &m, const MorseDecomposition< mapcomp, cubetype, cubsettype > &n) |
Computes the set-wise intersection of two Morse decompositions. More... | |
int | join (int n, int m) |
Joins the two given Morse sets. More... | |
int | passthru (int n) |
Make connecting orbits pass through the given Morse set, because its invariant part is in fact empty. More... | |
int | passthru (chomp::homology::hashedset< int > &setsToRemove) |
Make connecting orbits pass through the given Morse sets, because their invariant part is in fact empty. More... | |
int | jointrivial (int_t maxsetsize, int_t maxconnsize, int maxdistance) |
Joins small Morse sets with trivial indices with Morse sets whose indices are nontrivial. More... | |
int | savetofiles (const char *prefix=0) |
Save the Morse sets and connecting orbits to files. More... | |
int | loadfromfiles (const char *prefix=0) |
Load the Morse sets and connecting orbits from files. More... | |
Public Attributes | |
const mapcomp & | M |
The map computation class. More... | |
Private Types | |
typedef chomp::homology::mvmap< cubetype, cubetype > | cubmaptype |
The type of a combinatorial cubical multivalued map. More... | |
Private Member Functions | |
void | setConnDefined (void) |
Initializes the connection array so that connections are defined from this point on. More... | |
void | deleteall (int firstnumber, int lastnumber) |
Release the memory (used in the destructor and copy constructor). More... | |
void | copyall (const MorseDecomposition &m) |
Copy all the data (used in the copy constructor and operator =). More... | |
void | addone () |
Add one Morse set and initialize its data. More... | |
bool | adjacent (int n, int m, int margin=0) const |
Verifies if two Morse sets are adjacent to each other. More... | |
Static Private Member Functions | |
static int | cubsetdistance (const cubsettype &X, const cubsettype &Y, bool minimum) |
Returns the approximate distance between the two cubical sets. More... | |
Private Attributes | |
int | nsets |
The number of Morse sets. More... | |
chomp::homology::multitable< cubsettype * > | sets |
The Morse sets. More... | |
chomp::homology::multitable< IndexType * > | indices |
The Conley indices of the Morse sets. More... | |
chomp::homology::multitable< int > | nontrivial |
The table that stores the information on whether the indices are trivial or not: -1 = unknown, 0 = trivial, 1 = nontrivial. More... | |
chomp::homology::multitable< chomp::homology::multitable< cubsettype * > > | conn |
Connecting orbits from one set to another. More... | |
bool | connDefined |
Were any connections defined? More... | |
chomp::homology::multitable< chomp::homology::multitable< int > > | dist |
Tabulated distances between the Morse sets. More... | |
bool | distDefined |
Were any distances computed? More... | |
chomp::homology::multitable< chomp::homology::multitable< int > > | distconn |
Tabulated values of the function "conndistance". More... | |
bool | distconnDefined |
Were any values of conn distance defined? More... | |
The Morse decoposition class.
This is a template whose parameters define a class used to compute the combinatorial cubical multivalued map on Morse sets, a class which corresponds to a single cube, and a class which is used to keep sets of cubes (the hashed set by default).
Definition at line 64 of file morsedec.h.
typedef cubetype MorseDecomposition< mapcomp, cubetype, cubsettype >::CubeType |
The type of a single cube.
Definition at line 74 of file morsedec.h.
|
private |
The type of a combinatorial cubical multivalued map.
Definition at line 67 of file morsedec.h.
typedef cubsettype MorseDecomposition< mapcomp, cubetype, cubsettype >::CubSetType |
The type of a set of cubes used to store each Morse set.
Definition at line 77 of file morsedec.h.
typedef ConleyIndex<PairType> MorseDecomposition< mapcomp, cubetype, cubsettype >::IndexType |
The type of the Conley index.
Definition at line 83 of file morsedec.h.
typedef mapcomp MorseDecomposition< mapcomp, cubetype, cubsettype >::MapCompType |
The type of the map computation class.
Definition at line 71 of file morsedec.h.
typedef IndexPair<mapcomp,cubetype,cubsettype> MorseDecomposition< mapcomp, cubetype, cubsettype >::PairType |
The type of the index pair.
Definition at line 80 of file morsedec.h.
|
inline |
The default constructor.
Definition at line 314 of file morsedec.h.
|
inline |
The destructor.
Definition at line 480 of file morsedec.h.
|
inline |
The copy constructor.
Definition at line 554 of file morsedec.h.
References MorseDecomposition< mapcomp, cubetype, cubsettype >::copyall().
|
inline |
Adds a cube to the given Morse set and increases the number of Morse sets if necessary.
Definition at line 780 of file morsedec.h.
|
inline |
Adds a connection between the given Morse sets without adding any cubes to this connection (like in a direct connection).
Definition at line 794 of file morsedec.h.
|
inline |
Adds a cube to the connecting orbit between the given Morse sets.
Definition at line 808 of file morsedec.h.
|
inlineprivate |
Add one Morse set and initialize its data.
Definition at line 597 of file morsedec.h.
|
inlineprivate |
Verifies if two Morse sets are adjacent to each other.
Note: If both sets are large, then this can be time-consuming.
Definition at line 643 of file morsedec.h.
|
inline |
Computes the Conley indices of all the Morse sets.
Definition at line 1064 of file morsedec.h.
|
inline |
Computes the Conley index of the given Morse set.
Definition at line 1030 of file morsedec.h.
|
inline |
Verifies if the Conley index for the given Morse set has been already computed.
Definition at line 1072 of file morsedec.h.
|
inline |
Returns the appropriate maximal distance between cubes that are contained in the Morse set n and the connecting orbit n-m or m-n.
Note: The values returned by this function are tabulated, and are not updated when the Morse sets are modified with the 'add' function or when the connecting orbits are modified with the 'addconn' function. Call with (-1,-1) to reset the tabulation.
Definition at line 952 of file morsedec.h.
|
inline |
Checks whether there exists a connection between given sets.
Returns true if yes, false if no or wrong numbers.
Definition at line 921 of file morsedec.h.
|
inline |
Returns the connection between the given sets.
Throws an exception if there is no connection or wrong numbers.
Definition at line 929 of file morsedec.h.
|
inlineprivate |
Copy all the data (used in the copy constructor and operator =).
Definition at line 488 of file morsedec.h.
Referenced by MorseDecomposition< mapcomp, cubetype, cubsettype >::MorseDecomposition().
|
inline |
Returns the number of Morse sets.
Definition at line 823 of file morsedec.h.
|
inlinestaticprivate |
Returns the approximate distance between the two cubical sets.
If minimum is set to true, then computes the minimal distance between any pair of cubes, one taken from X, the other from Y. If minimum is set to false, then computes the maximal distance of any cube in X from the set Y, that is, how far X is from Y (warning: the latter relation is not symmetric!) Note: This computation may take some time for large sets.
Definition at line 716 of file morsedec.h.
|
inlineprivate |
Release the memory (used in the destructor and copy constructor).
Optionally, delete only Morse decompositions data for Morse sets whose numbers are greater or equal the given number.
Definition at line 347 of file morsedec.h.
|
inline |
Returns the approximate distance between the two Morse sets.
Warning: This computation may take some time for large sets. Note: The values returned by this function are tabulated, and are not updated when the Morse sets are modified with the 'add' function. Call with (-1,-1) to reset the tabulation.
Definition at line 847 of file morsedec.h.
|
inline |
Returns the approximate maximal distance of a cube in the orbit that connects the sets n and m (in either direction) from the k-th Morse set, i.e., how far the orbit is from the set.
Note: This computation may take some time for large sets.
Definition at line 939 of file morsedec.h.
|
inline |
Retrieves the previously computed Conley index of the given Morse set.
Throws an exception if the index has not yet been computed. Note that if the Morse set is chaned, then its index should be computed again using one of the functions above.
Definition at line 1080 of file morsedec.h.
|
inline |
Computes the set-wise intersection of two Morse decompositions.
The Morse decomposition must be initially empty and different from the objects passed as arguments.
Definition at line 1116 of file morsedec.h.
|
inline |
Joins the two given Morse sets.
Updates the connecting orbits. Resets the Conley index. The new Morse set replaces the n-th one, and the numbers of Morse sets beyond the m-th one are shifted downwards.
Definition at line 1138 of file morsedec.h.
|
inline |
Joins small Morse sets with trivial indices with Morse sets whose indices are nontrivial.
Only sets whose size, as well as the size of the connecting orbit is below the given limits are joined, provided their distance is also limited.
Definition at line 1321 of file morsedec.h.
|
inline |
Load the Morse sets and connecting orbits from files.
Definition at line 1585 of file morsedec.h.
|
inline |
Creates a graph representation of the Morse decomposition.
Each Morse set corresponds to a vertex, and each connecting orbit gives rise to a corresponding edge. The graph given as an argument must be initially empty.
Definition at line 1011 of file morsedec.h.
|
inline |
The assignment operator.
Definition at line 563 of file morsedec.h.
|
inline |
Returns the n-th Morse set.
Throws an exception in case of a wrong number.
Definition at line 838 of file morsedec.h.
|
inline |
Returns the n-th Morse set.
Throws an exception in case of a wrong number.
Definition at line 829 of file morsedec.h.
|
inline |
Make connecting orbits pass through the given Morse sets, because their invariant part is in fact empty.
The Morse sets are deleted and their contents are included in the corresponding connecting orbits. Important: The array must contain the numbers of the Morse sets in the ascending order.
Definition at line 1301 of file morsedec.h.
|
inline |
Make connecting orbits pass through the given Morse set, because its invariant part is in fact empty.
The Morse set is deleted and its contents is included in connecting orbits.
Definition at line 1236 of file morsedec.h.
|
inline |
Save the Morse sets and connecting orbits to files.
Set numbers are attached to the given prefix. Connections are numbered N-M.
Definition at line 1517 of file morsedec.h.
|
inlineprivate |
Initializes the connection array so that connections are defined from this point on.
Definition at line 323 of file morsedec.h.
|
inline |
Sets the index of the given Morse set to the apriori known one.
Does not compute it, but verifies if it is nontrivial.
Definition at line 1090 of file morsedec.h.
|
inline |
Changes (increases or decreases) the number of Morse sets.
Definition at line 767 of file morsedec.h.
|
inline |
Swaps the internal data with another object (note: both must be initialized with the same map computation object reference).
Definition at line 580 of file morsedec.h.
|
inline |
Returns true if the Conley index of the given Morse set is trivial, and false if either nontrivial or not yet computed.
Definition at line 1107 of file morsedec.h.
|
private |
Connecting orbits from one set to another.
There is no connection iff the pointer is zero.
Definition at line 261 of file morsedec.h.
|
private |
Were any connections defined?
Definition at line 264 of file morsedec.h.
|
mutableprivate |
Tabulated distances between the Morse sets.
Definition at line 268 of file morsedec.h.
|
mutableprivate |
Tabulated values of the function "conndistance".
Definition at line 275 of file morsedec.h.
|
mutableprivate |
Were any values of conn distance defined?
Definition at line 278 of file morsedec.h.
|
mutableprivate |
Were any distances computed?
Definition at line 271 of file morsedec.h.
|
private |
The Conley indices of the Morse sets.
Definition at line 252 of file morsedec.h.
const mapcomp& MorseDecomposition< mapcomp, cubetype, cubsettype >::M |
The map computation class.
Definition at line 105 of file morsedec.h.
|
private |
The table that stores the information on whether the indices are trivial or not: -1 = unknown, 0 = trivial, 1 = nontrivial.
Definition at line 256 of file morsedec.h.
|
private |
The number of Morse sets.
Definition at line 246 of file morsedec.h.
|
private |
The Morse sets.
Definition at line 249 of file morsedec.h.