30#ifndef _CMGRAPHS_MAPOPT_H_
31#define _CMGRAPHS_MAPOPT_H_
45#include "chomp/system/config.h"
46#include "chomp/system/textfile.h"
76 void saveData (std::ostream &out,
bool incremental);
84 void addData (
const std::string &line,
bool computed);
89 const double *leftParam,
const double *rightParam,
124 throw "Trying to use the copy constructor of MapOptimization.";
130 throw "Trying to use the assignment operator of MapOptimization.";
143 throw "Trying to load map optimization data "
144 "on top of new data.";
146 chomp::homology::ignorecomments (in);
151 std::getline (in, line);
154 chomp::homology::ignorecomments (in);
168 for (
size_t n = incremental ?
oldData : 0;
191 std::istringstream in (line);
199 const double *leftParam,
const double *rightParam,
int nParam)
205 throw "Map optimization lines-parameters mismatch.";
209 parRequested. define (leftParam, rightParam, nParam);
A class whose objects are responsible for adjusting the integration parameters such as step size and ...
size_t oldData
The number of data lines loaded previously or already saved.
std::vector< std::string > dataLines
Collected data lines.
void loadData(std::istream &in)
Reads all the optimization data from a stream.
void saveData(std::ostream &out, bool incremental)
Saves all the optimization data to a stream.
std::vector< MapParam > dataParam
Decoded parameter aggregates for each data line.
MapOptimization()
The default constructor.
MapOptimization & operator=(const MapOptimization &)
The assignment operator should not be used.
~MapOptimization()
The destructor.
size_t size() const
Returns the number of map optimization information lines.
void prepareData(std::vector< std::string > &data, const double *leftParam, const double *rightParam, int nParam)
Prepares a collection of lines to consider while processing a map with the given parameters.
void addData(const std::string &line, bool computed)
Adds a line of optimization data obtained from computation or read from a file to the collection.
A data structure for storing map parameters.
A simple aggregate data structure for map parameters.
bool intersect(const MapParam &par1, const MapParam &par2)
Checks if two aggregate parameter objects are so close to each other that after a small blow-up they ...
bool shareInteriors(const MapParam &par1, const MapParam &par2)
Checks if two aggregate parameter objects that intersect actually share interiors in the parameters o...