User Guide
nmodl::parser::DiffeqDriver Class Reference

Class that binds all pieces together for parsing differential equations. More...

Detailed Description

Class that binds all pieces together for parsing differential equations.

Driver class bind components required for lexing, parsing and ast generation for differential equations.

Definition at line 36 of file diffeq_driver.hpp.

#include <diffeq_driver.hpp>

Public Member Functions

 DiffeqDriver ()=default
 

Static Public Member Functions

static std::string solve (const std::string &equation, std::string method, bool debug=false)
 solve equation using provided method More...
 
static bool cnexp_possible (const std::string &equation, std::string &solution)
 check if given equation can be solved using cnexp method More...
 

Static Private Member Functions

static std::string solve_equation (std::string &state, int order, std::string &rhs, std::string &method, bool &cnexp_possible, bool debug=false)
 
static void parse_equation (const std::string &equation, std::string &state, std::string &rhs, int &order)
 parse given equation into lhs, rhs and find it's order and state variable More...
 

Constructor & Destructor Documentation

◆ DiffeqDriver()

nmodl::parser::DiffeqDriver::DiffeqDriver ( )
default

Member Function Documentation

◆ cnexp_possible()

bool nmodl::parser::DiffeqDriver::cnexp_possible ( const std::string &  equation,
std::string &  solution 
)
static

check if given equation can be solved using cnexp method

Todo:
Instead of using neuron like api, we need to refactor

Definition at line 64 of file diffeq_driver.cpp.

◆ parse_equation()

void nmodl::parser::DiffeqDriver::parse_equation ( const std::string &  equation,
std::string &  state,
std::string &  rhs,
int &  order 
)
staticprivate

parse given equation into lhs, rhs and find it's order and state variable

expect prime on lhs, find order and remove quote

error if no prime in equation or not an assignment statement

Definition at line 18 of file diffeq_driver.cpp.

◆ solve()

std::string nmodl::parser::DiffeqDriver::solve ( const std::string &  equation,
std::string  method,
bool  debug = false 
)
static

solve equation using provided method

Definition at line 38 of file diffeq_driver.cpp.

◆ solve_equation()

std::string nmodl::parser::DiffeqDriver::solve_equation ( std::string &  state,
int  order,
std::string &  rhs,
std::string &  method,
bool &  cnexp_possible,
bool  debug = false 
)
staticprivate

Definition at line 46 of file diffeq_driver.cpp.


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