Visitor class for code generation.
#include <drake/common/symbolic/codegen.h>
Public Types | |
using | IdToIndexMap = std::unordered_map< Variable::Id, std::vector< Variable >::size_type > |
Public Member Functions | |
CodeGenVisitor (const std::vector< Variable > ¶meters) | |
Constructs an instance of this visitor class using the vector of variables, parameters . More... | |
std::string | CodeGen (const Expression &e) const |
Generates C expression for the expression e . More... | |
Does not allow copy, move, or assignment | |
CodeGenVisitor (const CodeGenVisitor &)=delete | |
CodeGenVisitor & | operator= (const CodeGenVisitor &)=delete |
CodeGenVisitor (CodeGenVisitor &&)=delete | |
CodeGenVisitor & | operator= (CodeGenVisitor &&)=delete |
Friends | |
std::string | VisitExpression (const CodeGenVisitor *, const Expression &) |
using IdToIndexMap = std::unordered_map<Variable::Id, std::vector<Variable>::size_type> |
|
delete |
|
delete |
|
explicit |
Constructs an instance of this visitor class using the vector of variables, parameters
.
This visitor will map a symbolic variable var
into p[n]
where n
is the index of the variable var
in the given parameters
.
std::string CodeGen | ( | const Expression & | e | ) | const |
Generates C expression for the expression e
.
|
delete |
|
delete |
|
friend |