15 #include <sys/types.h>
18 #include <boost/filesystem/operations.hpp>
19 #include <boost/filesystem/path.hpp>
20 #include <boost/progress.hpp>
21 #include <boost/regex.hpp>
113 std::vector< std::vector< std::pair<double,double> > >
Values;
163 std::string
WriteInputStepTwo(std::vector<std::pair<double, double> > tmprandomvalues,
181 boost::filesystem::path tempstr =
base_dir;
182 boost::filesystem::create_directories(tempstr);
184 boost::filesystem::create_directories(tempstr);
189 Functions.clear(); VarGroups.clear();
190 Parameters.clear(); ParameterNames.clear();
191 Constants.clear(); ConstantNames.clear();
192 Values.clear(); NumMeshPoints.clear();
194 RandomValues.clear();
195 numfunct = 0; numvariables = 0; numvargroup = 0; numparam = 0; numconsts = 0;
202 void ParseData(boost::filesystem::path dir);
222 std::stringstream ss;
223 ss <<
"1) save values\n"
224 <<
"2) load random values\n"
225 <<
"3) make new values\n"
226 <<
"*\n0)return to paramotopy\n: ";
296 void SetBaseDirNew(std::vector< boost::filesystem::path > found_runs);
311 void load(boost::filesystem::path filename);
317 void get_run_xml(boost::filesystem::path filename,
int & run, time_t & wheninitiated, time_t & whenupdated);
336 std::vector < boost::filesystem::path > folders_with_data,
337 boost::filesystem::path run_to_analyze,
338 int parser_index,
bool mergefailed);
341 std::vector< boost::filesystem::path >
GetFoldersForData(boost::filesystem::path dir);
344 boost::filesystem::path base_output_folder_name,
345 int & output_folder_index);
347 void MergeFolders(std::string file_to_gather, std::string left_folder,
348 std::string right_folder, std::string output_folder_name,
int parser_index);
351 boost::filesystem::path source_folder,
352 boost::filesystem::path base_output_folder_name,
353 int parser_index,
bool mergefailed);
356 void rest_of_files(std::ifstream & datafile, std::string & output_buffer,
357 std::ofstream & outputfile, std::vector < boost::filesystem::path > filelist,
358 int file_index,
int parser_index);
361 bool endoffile_stuff(std::ifstream & datafile,
int & file_index, std::vector < boost::filesystem::path > filelist);
365 bool ReadPoint(std::ifstream & fin,
int & next_index, std::string & data,
int parser_index);
429 void MakeConstantsStep2(std::vector<std::pair<double, double> > CurrentValues, std::stringstream & inputfilestream,
bool standardstep2);
445 std::pair< double, double > > > RandomRanges);
void MakeDeclareFunctions(std::stringstream &inputstringstream)
void ReadSizes(std::ifstream &fin)
void SetBaseDirManual(std::vector< boost::filesystem::path > found_runs)
std::vector< std::vector< std::pair< std::string, std::string > > > ParseSolutionsFile_ActualSolutions(std::ifstream &fin)
void GetOriginalParamotopy()
std::string ParseSolutionsFile(std::ifstream &fin)
void SetDataInteractive()
std::vector< std::pair< double, double > > RandomValues
bool ReadPoint(std::ifstream &fin, int &next_index, std::string &data, int parser_index)
function for parsing ***_solutions files, as output from bertini.
void ReadConstantStrings(std::ifstream &fin)
std::vector< int > NumMeshPoints
void MakeFunctions(std::stringstream &inputstringstream)
void load(boost::filesystem::path filename)
boost::filesystem::path base_dir
boost::filesystem::path GetAvailableRuns()
std::string paramotopy_file
void rest_of_files(std::ifstream &datafile, std::string &output_buffer, std::ofstream &outputfile, std::vector< boost::filesystem::path > filelist, int file_index, int parser_index)
void MakeCustomLines(std::stringstream &inputfilestream)
boost::filesystem::path fundamental_dir
void WriteOriginalParamotopy(boost::filesystem::path dir)
void ReadVarGroups(std::ifstream &fin)
void finalize_run_to_file(boost::filesystem::path file_to_gather, boost::filesystem::path source_folder, boost::filesystem::path base_output_folder_name, int parser_index, bool mergefailed)
void MakeDeclareConstants(std::stringstream &fout)
void ReadParameters(std::ifstream &fin)
void CollectSpecificFiles(boost::filesystem::path file_to_gather, std::vector< boost::filesystem::path > folders_with_data, boost::filesystem::path run_to_analyze, int parser_index, bool mergefailed)
std::string WriteInputStepTwo(std::vector< std::pair< double, double > > tmprandomvalues, bool standardstep2)
void ParseDataGuts(std::ifstream &fin)
void make_base_dir_name()
void ReadConstants(std::ifstream &fin)
void ReadCustomLines(std::ifstream &fin)
std::string WriteInputStepOne(ProgSettings paramotopy_settings)
void MakeParameterNames()
std::string ParseFailedPaths(std::ifstream &fin)
function for parsing the failed_paths file (just one instance of it)
int get_int_choice(std::string display_string, int min_value, int max_value)
std::vector< std::string > Parameters
void SetBaseDirNew(std::vector< boost::filesystem::path > found_runs)
void MakeConstants(std::stringstream &fout)
std::vector< boost::filesystem::path > GetFoldersForData(boost::filesystem::path dir)
void get_run_xml(boost::filesystem::path filename, int &run, time_t &wheninitiated, time_t &whenupdated)
std::vector< std::string > ParameterNames
bool endoffile_stuff(std::ifstream &datafile, int &file_index, std::vector< boost::filesystem::path > filelist)
std::vector< std::string > VarGroups
void WriteDataDateStarted()
boost::filesystem::path inputfilename
boost::filesystem::path prefix
boost::filesystem::path location
void AutoScanData(const int preferred_behaviour)
void MergeFolders(std::string file_to_gather, std::string left_folder, std::string right_folder, std::string output_folder_name, int parser_index)
void SetBaseDirMostRecent(std::vector< boost::filesystem::path > found_runs)
A class that stores the general program settings of Paramotopy.
std::vector< std::string > Functions
void MakeVariableGroups(std::stringstream &fout, ProgSettings paramotopy_settings)
void CopyUserDefinedFile()
std::vector< std::string > ConstantNames
void MakeConstantsStep2(std::vector< std::pair< double, double > > CurrentValues, std::stringstream &inputfilestream, bool standardstep2)
std::vector< std::vector< std::pair< double, double > > > Values
A class for the input file parser.
void IncrementOutputFolder(boost::filesystem::path &output_folder_name, boost::filesystem::path base_output_folder_name, int &output_folder_index)
void ReadFunctions(std::ifstream &fin)
std::vector< std::pair< double, double > > BoundsLeft
void WriteModifiedParamotopy(boost::filesystem::path dir, int iteration)
std::vector< std::string > Constants
std::vector< std::pair< double, double > > BoundsRight