Gromacs  2026.0-dev-20241212-74b8831
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::PullCoordExpressionParser Class Reference

#include <gromacs/pulling/pullcoordexpressionparser.h>

Description

Class with a mathematical expression and parser.

The class handles parser instantiation from an mathematical expression, e.g. 'x1*x2', and evaluates the expression given the variables' numerical values.

Note that for performance reasons you should not create a new PullCoordExpressionParser for every evaluation. Instead, instantiate one PullCoordExpressionParser per expression, then update the variables before the next evaluation.

Public Member Functions

 PullCoordExpressionParser (const std::string &expression, int numVariables, bool allowTimeAsVariable)
 Constructor which takes a mathematical expression and the number of variables as arguments.
 
double evaluate (ArrayRef< const double > variables)
 Evaluates the expression with the numerical values passed in variables.
 

The documentation for this class was generated from the following files: