AST node representing a function expression (max, min, pow, ...).
More...
#include <FunctionNode.h>
|
| template<typename... NodePtr> |
| | FunctionNode (FunctionNodeType type, NodePtr... operands) |
| | Construct a FunctionNode from a list of operands. More...
|
| |
| | FunctionNode (FunctionNodeType type, const std::vector< Node * > &operands) |
| | Construct a FunctionNode from an existing vector of operands. More...
|
| |
| | FunctionNode (FunctionNodeType type, std::vector< Node * > &&operands) |
| | Construct a FunctionNode by moving operand vector. More...
|
| |
| std::string | name () const override |
| |
| FunctionNodeType | type () const |
| |
| std::string | typeToString () const |
| |
|
template<typename... NodePtr> |
| | ParentNode (NodePtr... operands) |
| |
| | ParentNode (const std::vector< Node * > &operands) |
| | Constructs a parent node with the specified operands. More...
|
| |
| | ParentNode (std::vector< Node * > &&operands) |
| | Constructs a parent node with the specified operands. Vector is moved. More...
|
| |
| const std::vector< Node * > & | getOperands () const |
| | Retrieves the operands of the parent node. More...
|
| |
|
const std::vector< const Node * > | getConstOperands () const |
| |
|
Node * | operator[] (std::size_t idx) const |
| |
|
size_t | size () const |
| |
|
bool | operator== (const IName &other) const =default |
| |
AST node representing a function expression (max, min, pow, ...).
FunctionNode is a ParentNode whose operands represent the arguments of the function. The type indicates which function is applied. examples:
- base^exponent -> FunctionNode(FunctionNodeType::pow, base, exponent)
- max(a, b, c) -> FunctionNode(FunctionNodeType::max, a, b, c)
- min(x, y) -> FunctionNode(FunctionNodeType::min, x, y)
- reduced_cost(var) -> FunctionNode(FunctionNodeType::reduced_cost, VariableNode("var"))
- dual(constraint) -> FunctionNode(FunctionNodeType::dual, ParameterNode("constraint"))
◆ FunctionNode() [1/3]
template<typename... NodePtr>
| Antares::Expressions::Nodes::FunctionNode::FunctionNode |
( |
FunctionNodeType |
type, |
|
|
NodePtr... |
operands |
|
) |
| |
|
inlineexplicit |
Construct a FunctionNode from a list of operands.
- Template Parameters
-
| NodePtr | Variadic parameter pack of Node* operands. |
- Parameters
-
| type | Function type. |
| operands | Node* operands passed to ParentNode. |
◆ FunctionNode() [2/3]
| Antares::Expressions::Nodes::FunctionNode::FunctionNode |
( |
FunctionNodeType |
type, |
|
|
const std::vector< Node * > & |
operands |
|
) |
| |
|
inlineexplicit |
Construct a FunctionNode from an existing vector of operands.
- Parameters
-
| type | Function type. |
| operands | Vector of Node* operands. |
◆ FunctionNode() [3/3]
| Antares::Expressions::Nodes::FunctionNode::FunctionNode |
( |
FunctionNodeType |
type, |
|
|
std::vector< Node * > && |
operands |
|
) |
| |
|
inlineexplicit |
Construct a FunctionNode by moving operand vector.
- Parameters
-
| type | Function type. |
| operands | Rvalue vector of operands. |
◆ name()
| std::string Antares::Expressions::Nodes::FunctionNode::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ type()
| FunctionNodeType Antares::Expressions::Nodes::FunctionNode::type |
( |
| ) |
const |
|
inline |
- Returns
- Function type associated with this node.
◆ typeToString()
| std::string Antares::Expressions::Nodes::FunctionNode::typeToString |
( |
| ) |
const |
|
inline |
- Returns
- String representation of the function type.
The documentation for this class was generated from the following file: