Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::blackbox::AlgoBuilder Class Reference

A de-serializer, whose responsibility it is to construct runnable objects based on input files. More...

#include <algorithm_builder.hpp>

Public Member Functions

 AlgoBuilder ()=default
int ClassicBuild (std::string const &config_str, std::string const &input_str)
 Construct an algorithm from pre-split CONFIG and INPUT strings.
AnyAlgorithm * GetAlg ()
 Returns a non-owning pointer to the built algorithm (nullptr if not yet built).

Detailed Description

A de-serializer, whose responsibility it is to construct runnable objects based on input files.

This class is inspired by the SimBuilder class from Hythem Sidky's SAPHRON package for molecular dynamics.

Constructor & Destructor Documentation

◆ AlgoBuilder()

bertini::blackbox::AlgoBuilder::AlgoBuilder ( )
default

Member Function Documentation

◆ ClassicBuild()

int bertini::blackbox::AlgoBuilder::ClassicBuild ( std::string const & config_str,
std::string const & input_str )

Construct an algorithm from pre-split CONFIG and INPUT strings.

Call SplitIntoConfigAndInput before this. Splitting is done outside so that the caller can broadcast the strings over MPI before invoking ClassicBuild on all ranks.

Returns
0 on success, nonzero on failure.

◆ GetAlg()

AnyAlgorithm * bertini::blackbox::AlgoBuilder::GetAlg ( )
inline

Returns a non-owning pointer to the built algorithm (nullptr if not yet built).