1#ifndef DUNE_COPASI_PARSER_CONTEXT_HH
2#define DUNE_COPASI_PARSER_CONTEXT_HH
6#include <dune/common/fvector.hh>
7#include <dune/common/parametertree.hh>
9#include <unordered_map>
30 static std::tuple<std::vector<std::string_view>, std::string_view>
38 std::unordered_map<std::string, double> _constants;
39 std::unordered_map<std::string, std::function<
typename Parser::Function1D()>> _func_maker_1;
40 std::unordered_map<std::string, std::function<
typename Parser::Function2D()>> _func_maker_2;
41 std::unordered_map<std::string, std::function<
typename Parser::Function3D()>> _func_maker_3;
42 std::unordered_map<std::string, std::function<
typename Parser::Function4D()>> _func_maker_4;
43 std::unordered_map<std::string, ParameterTree> _functions_expr;
44 std::unordered_map<std::string, std::function<
double(std::size_t)>> _cell_data;
static std::tuple< std::vector< std::string_view >, std::string_view > parse_function_expression(std::string_view fnc_expr)
ParserContext(const ParameterTree &config={})
Parser::Function0D make_function(ParserType, const std::array< std::string, 0 > &, std::string_view) const
Parser::Function4D make_function(ParserType, const std::array< std::string, 4 > &, std::string_view) const
Parser::Function2D make_function(ParserType, const std::array< std::string, 2 > &, std::string_view) const
Parser::Function1D make_function(ParserType, const std::array< std::string, 1 > &, std::string_view) const
Parser::Function3D make_function(ParserType, const std::array< std::string, 3 > &, std::string_view) const
void add_context(Parser &parser) const
fu2::unique_function< RangeField(RangeField, RangeField, RangeField) const > Function3D
Definition parser.hh:34
fu2::unique_function< RangeField() const > Function0D
Definition parser.hh:31
fu2::unique_function< RangeField(RangeField, RangeField, RangeField, RangeField) const > Function4D
Definition parser.hh:35
fu2::unique_function< RangeField(RangeField, RangeField) const > Function2D
Definition parser.hh:33
fu2::unique_function< RangeField(RangeField) const > Function1D
Definition parser.hh:32
Definition axis_names.hh:7
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24
ParserType
Definition factory.hh:12