FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTexpression.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTEXPRESSION_H_INCLUDED
9#define FMTEXPRESSION_H_INCLUDED
10
11#include <string>
12#include <vector>
13#include <map>
14#include <stack>
15
16namespace Core
17{
19 {
20 std::vector<std::string>infix;
21 std::vector<std::string> getpostfix(const std::vector<std::string>& localinfix) const;
22 std::vector<std::string> replacevariables(const std::map<std::string, double>& mapping) const;
23 double evaluatepostfix(const std::vector<std::string>& postfix) const;
24 bool is_number(const std::string& s) const;
25 public:
27 FMTexpression(const std::vector<std::string>& lsources);
29 FMTexpression simplify(std::map<std::string,double>& values) const;
30 std::vector<std::string>getvariables() const;
31 double shuntingyard(const std::map<std::string, double>& mapping) const;
32 std::vector<std::string>getinfix() const;
33 operator std::string() const;
35 ~FMTexpression() = default;
36
37 };
38}
39
40#endif
Definition: FMTexpression.hpp:19
FMTexpression(const std::vector< std::string > &lsources)
FMTexpression & operator=(const FMTexpression &rhs)
std::vector< std::string > getvariables() const
std::vector< std::string > getinfix() const
FMTexpression(const FMTexpression &rhs)
FMTexpression simplify(std::map< std::string, double > &values) const
double shuntingyard(const std::map< std::string, double > &mapping) const
~FMTexpression()=default
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31