33#ifndef _CMGRAPHS_EIGENVAL_H_
34#define _CMGRAPHS_EIGENVAL_H_
46#include "chomp/system/config.h"
47#include "chomp/system/textfile.h"
48#include "chomp/cubes/cube.h"
49#include "chomp/multiwork/mw.h"
71 template <
class ConleyIndexType>
79 std::vector<double> &
re (
unsigned int level);
83 const std::vector<double> &
re (
unsigned int level)
const;
87 std::vector<double> &
im (
unsigned int level);
91 const std::vector<double> &
im (
unsigned int level)
const;
106 std::ostream &
write (std::ostream &out,
107 const char *valueSep = 0,
const char *lineSep = 0)
const;
128template <
class ConleyIndexType>
131 int dim = index. dim ();
132 for (
int level = 0; level <= dim; ++ level)
134 std::vector<double> reVector, imVector;
135 index. eigenvalues (level, reVector, imVector);
146 std::vector<double> emptyVector;
163 throw "Undefined level of eigenvalues requested (re).";
177 throw "Undefined level of eigenvalues requested (im).";
189 for (
int level = 0; level <
maxLevel; ++ level)
200 const char *valueSep,
const char *lineSep)
const
210 for (
int level = 0; level <
maxLevel; ++ level)
213 int nValues =
re. size ();
217 out <<
"Eigenvalues " << level <<
":" << lineSep <<
"(";
218 for (
int i = 0; i < nValues; ++ i)
229 out <<
im [i] <<
"i";
231 out <<
")." << lineSep;
Eigenvalues of the Conley index map gathered by levels.
std::vector< std::vector< double > > reVectors
The vector of the real part vectors.
int maxLevel() const
Returns the number of levels + 1.
IndexEigenValues()
The constructor of an empty object.
std::vector< std::vector< double > > imVectors
The vector of the imaginary part vectors.
void addVectors(unsigned int level)
Makes sure that the vectors are large enough for the given level.
bool trivial() const
Returns "true" if there are no eigenvalues at any level.
std::vector< double > & im(unsigned int level)
Returns the vector of the imaginary parts of the eigenvalues at the given level for appending.
std::ostream & write(std::ostream &out, const char *valueSep=0, const char *lineSep=0) const
Writes the eigenvalues in a human-readable format to the output stream.
std::vector< double > & re(unsigned int level)
Returns the vector of the real parts of the eigenvalues at the given level for appending.
Choice of configuration settings.
Customizable data types for the Conley-Morse graphs computation program.
Data types for the dynamical systems data structures.