Eigen::symbolic¶
Classes¶
Name | |
---|---|
class | Eigen::symbolic::AddExpr |
class | Eigen::symbolic::BaseExpr |
struct | Eigen::symbolic::is_symbolic |
class | Eigen::symbolic::NegateExpr |
class | Eigen::symbolic::ProductExpr |
class | Eigen::symbolic::QuotientExpr |
class | Eigen::symbolic::Symbol |
class | Eigen::symbolic::SymbolExpr |
class | Eigen::symbolic::SymbolValue |
class | Eigen::symbolic::ValueExpr |
class | Eigen::symbolic::ValueExpr< internal::FixedInt< N > > |
Detailed Description¶
This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index. Here is a simple example:
// First step, defines symbols:
struct x_tag {}; static const symbolic::SymbolExpr<x_tag> x;
struct y_tag {}; static const symbolic::SymbolExpr<y_tag> y;
struct z_tag {}; static const symbolic::SymbolExpr<z_tag> z;
// Defines an expression:
auto expr = (x+3)/y+z;
// And evaluate it: (c++14)
std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
// In c++98/11, only one symbol per expression is supported for now:
auto expr98 = (3-x)/2;
std::cout << expr98.eval(x=6) << "\n";
It is currently only used internally to define and manipulate the Eigen::last and Eigen::lastp1 symbols in Eigen::seq and Eigen::seqN.
Updated on 2023-11-29 at 18:22:21 +0000