$darkmode
evaluate.hpp File Reference
#include <functional>
#include <string>
Include dependency graph for evaluate.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::function< bool(double)> cloe::utility::compile_evaluation (const std::string &s)
 
std::function< bool(double)> cloe::utility::compile_evaluation (const std::string &op, double val)
 

Detailed Description

Function Documentation

◆ compile_evaluation()

std::function< bool(double)> cloe::utility::compile_evaluation ( const std::string &  s)

Compile an evaluation string into a function that evaluates a single double.

For example:

  • "<50" returns a function that returns true when input is less than 50.
  • ">60" returns a function that returns true when input is greater than 60.

An out_of_range error is thrown if the operator is not one of the following: ==, !=, <, <=, >, >=

Here is the call graph for this function:
Here is the caller graph for this function: