Classes | |
class | coco::annotation |
Annotations for Models. More... | |
class | coco::expression_node |
The base class for a node in the expression DAGs. More... | |
class | coco::expression_print_visitor |
class | coco::graphorder_visitor |
This visitor class is used for computing a graph order. More... | |
class | coco::model |
The model class (an attributed DAG of expression nodes, lowest class in the model hierarchy). More... | |
class | coco::model_iddata |
The model id-data class (the topmost in the model class hierarchy). More... | |
class | coco::model_gid |
Model Group Data Class (middle class in the model hierarchy). More... | |
Typedefs | |
typedef model::walker | coco::expression_walker |
Walker to the expression DAG. | |
typedef model::const_walker | coco::expression_const_walker |
Const walker to the expression DAG. | |
Functions | |
void | coco::graphorder (const model &DAG, std::vector< unsigned int > &order) |
Compute a graph order. | |
Variables | |
const char * | coco::expr_names [] |
Operator types of standard expressions | |
These definitions define the standard operator types for the expression_node class. In the operator descriptions is used for the value of the th child of the node, while stands for the value of the th child of the node multiplied by the th entry of the coeffs array. | |
#define | EXPRINFO_GHOST 0 |
#define | EXPRINFO_CONSTANT -1 |
#define | EXPRINFO_VARIABLE -2 |
#define | EXPRINFO_SUM -3 |
#define | EXPRINFO_MEAN -4 |
#define | EXPRINFO_PROD -5 |
#define | EXPRINFO_MAX -6 |
#define | EXPRINFO_MIN -7 |
#define | EXPRINFO_MONOME -8 |
#define | EXPRINFO_SCPROD -9 |
#define | EXPRINFO_NORM -10 |
#define | EXPRINFO_INVERT -11 |
#define | EXPRINFO_SQUARE -12 |
#define | EXPRINFO_SQROOT -13 |
#define | EXPRINFO_ABS -14 |
#define | EXPRINFO_INTPOWER -15 |
#define | EXPRINFO_EXP -16 |
#define | EXPRINFO_LOG -17 |
#define | EXPRINFO_SIN -18 |
#define | EXPRINFO_COS -19 |
#define | EXPRINFO_GAUSS -20 |
#define | EXPRINFO_POLY -21 |
#define | EXPRINFO_POW -22 |
#define | EXPRINFO_DIV -23 |
#define | EXPRINFO_ATAN2 -24 |
#define | EXPRINFO_LIN -25 |
#define | EXPRINFO_QUAD -26 |
#define | EXPRINFO_RE -27 |
#define | EXPRINFO_IM -28 |
#define | EXPRINFO_ARG -29 |
#define | EXPRINFO_CPLXCONJ -30 |
#define | EXPRINFO_LOOKUP -31 |
#define | EXPRINFO_PWLIN -32 |
#define | EXPRINFO_SPLINE -33 |
#define | EXPRINFO_PWCONSTLC -34 |
#define | EXPRINFO_PWCONSTRC -35 |
#define | EXPRINFO_IN -36 |
#define | EXPRINFO_IF -37 |
#define | EXPRINFO_AND -38 |
#define | EXPRINFO_OR -39 |
#define | EXPRINFO_NOT -40 |
#define | EXPRINFO_IMPLIES -41 |
#define | EXPRINFO_COUNT -42 |
#define | EXPRINFO_ALLDIFF -43 |
#define | EXPRINFO_HISTOGRAM -44 |
#define | EXPRINFO_LEVEL -45 |
#define | EXPRINFO_NEIGHBOR -46 |
#define | EXPRINFO_NOGOOD -47 |
#define | EXPRINFO_EXPECTATION -48 |
#define | EXPRINFO_INTEGRAL -49 |
#define | EXPRINFO_DET -50 |
#define | EXPRINFO_COND -51 |
#define | EXPRINFO_PSD -52 |
#define | EXPRINFO_MPROD -53 |
#define | EXPRINFO_FEM -54 |
#define | EXPRINFO_CMPROD -55 |
#define | EXPRINFO_CGFEM -56 |
#define | EXPRINFO_UNDEFINED -57 |
#define | EXPRINFO_NUMOFPREDEF -(EXPRINFO_UNDEFINED) |
#define EXPRINFO_ABS -14 |
The absolute value node is , where is stored in params.nd()
.
Definition at line 145 of file expression.h.
#define EXPRINFO_ALLDIFF -43 |
This node returns if all children are pairwise different. Here different means with in params.nd()
.
Definition at line 288 of file expression.h.
#define EXPRINFO_AND -38 |
The value is if all where the are stored in params.i()
, and otherwise.
Definition at line 265 of file expression.h.
#define EXPRINFO_ARG -29 |
This node returns the argument of a complex number.
Definition at line 215 of file expression.h.
#define EXPRINFO_ATAN2 -24 |
The atan2 node has no parameters, and its definition is .
Definition at line 190 of file expression.h.
#define EXPRINFO_CGFEM -56 |
This node computes information relevant for FEM computations with constant .
Definition at line 351 of file expression.h.
#define EXPRINFO_CMPROD -55 |
This node computes a matrix vector product with constant .
Definition at line 347 of file expression.h.
#define EXPRINFO_COND -51 |
This node computes the condition of a matrix.
Definition at line 333 of file expression.h.
#define EXPRINFO_CONSTANT -1 |
This node represents a constant, whose value is contained in params.nd()
.
Definition at line 81 of file expression.h.
#define EXPRINFO_COS -19 |
The cosine node is , where is stored in params.nd()
.
Definition at line 165 of file expression.h.
#define EXPRINFO_COUNT -42 |
The count node returns for how many we have , where * the intervals are stored in params.i()
.
Definition at line 283 of file expression.h.
#define EXPRINFO_CPLXCONJ -30 |
This node returns the complex conjugate of a complex number.
Definition at line 220 of file expression.h.
#define EXPRINFO_DET -50 |
This node computes the determinant of a matrix.
Definition at line 330 of file expression.h.
#define EXPRINFO_DIV -23 |
The general division node is and is stored in params.nd()
.
Definition at line 185 of file expression.h.
#define EXPRINFO_EXP -16 |
The exponential node is , where is stored in params.nd()
.
Definition at line 153 of file expression.h.
#define EXPRINFO_EXPECTATION -48 |
This node computes the expectation value of a function depending on stochastic nodes.
Definition at line 318 of file expression.h.
#define EXPRINFO_FEM -54 |
This node computes information relevant for FEM computations.
Definition at line 342 of file expression.h.
#define EXPRINFO_GAUSS -20 |
The gaussian function node is , where the two dimensional vector is stored in params.d()
.
Definition at line 170 of file expression.h.
#define EXPRINFO_GHOST 0 |
This is a virtual expression needed for the dag_delta
class. Ghost nodes are exceptions to the rule that node numbers have to be unique throughout all models in a model group. The node number of a ghost node is the same as the node number of the node, of which it is a ghost.
Definition at line 76 of file expression.h.
#define EXPRINFO_HISTOGRAM -44 |
The histogram node counts how many children are in which interval . The numbers are collected, and if for all the value , the result is . Otherwise, it is .
Definition at line 294 of file expression.h.
#define EXPRINFO_IF -37 |
We get the interval from params.ni()
and define the result of the node as
Definition at line 261 of file expression.h.
#define EXPRINFO_IM -28 |
This node returns the imaginary part of a complex number.
Definition at line 212 of file expression.h.
#define EXPRINFO_IMPLIES -41 |
The value is if the following is true: , where the are stored in params.i()
. Otherwise, the value is .
Definition at line 279 of file expression.h.
#define EXPRINFO_IN -36 |
The point defined by is tested against the box stored in params.i()
. If the value is , if , the return value is , and if the node's value is .
Definition at line 250 of file expression.h.
#define EXPRINFO_INTEGRAL -49 |
This node computes the definite integral of a function depending on free nodes over the box stored in params.i()
.
Definition at line 322 of file expression.h.
#define EXPRINFO_INTPOWER -15 |
The integer power node is , where the integer is in params.nn()
.
Definition at line 149 of file expression.h.
#define EXPRINFO_INVERT -11 |
Inversion is defined as with in params.nd()
.
Definition at line 133 of file expression.h.
#define EXPRINFO_LEVEL -45 |
The matrix in params.mi()
contains a set of boxes contained within another. The result is the smallest row index such that the vector is contained in .
Definition at line 300 of file expression.h.
#define EXPRINFO_LIN -25 |
This node is a linear combination of all variables. In params.nn()
the row number in the matrix of linear constraints is stored.
Definition at line 197 of file expression.h.
#define EXPRINFO_LOG -17 |
The logarithm node is , where is stored in params.nd()
.
Definition at line 157 of file expression.h.
#define EXPRINFO_LOOKUP -31 |
This node computes a function with a table lookup procedure. The table is stored in params.m()
.
Definition at line 226 of file expression.h.
#define EXPRINFO_MAX -6 |
The maximum node is defined as with in params.nd()
.
Definition at line 109 of file expression.h.
#define EXPRINFO_MEAN -4 |
This is a sum node where it is guaranteed that all coefficients are positive, and their sum is $1$. So this is a convex linear combination without constant term:
Definition at line 101 of file expression.h.
#define EXPRINFO_MIN -7 |
The minimum node is defined as with in params.nd()
.
Definition at line 113 of file expression.h.
#define EXPRINFO_MONOME -8 |
The general monomial node is defined as , where the are contained in the vector params.n()
.
Definition at line 118 of file expression.h.
#define EXPRINFO_MPROD -53 |
This node computes a matrix-vector product.
Definition at line 339 of file expression.h.
#define EXPRINFO_NEIGHBOR -46 |
This returns if and are neighbors, i.e., if is in the list of allowed value pairs where the vector is stored in params.n()
. The and are integers.
Definition at line 308 of file expression.h.
#define EXPRINFO_NOGOOD -47 |
This returns if with in params.n()
. Both and are integer vectors.
Definition at line 312 of file expression.h.
#define EXPRINFO_NORM -10 |
The norm node has the form , where is stored in params.nd()
, and is the vector built from the values of all children.
Definition at line 127 of file expression.h.
#define EXPRINFO_NOT -40 |
The value is if and otherwise. Here is in params.ni()
.
Definition at line 273 of file expression.h.
#define EXPRINFO_NUMOFPREDEF -(EXPRINFO_UNDEFINED) |
This is the number of standard operator types.
Definition at line 359 of file expression.h.
#define EXPRINFO_OR -39 |
The value is if all where the are stored in params.i()
, and otherwise.
Definition at line 269 of file expression.h.
#define EXPRINFO_POLY -21 |
The polynomial node is , where the coefficients are stored in params.d()
.
Definition at line 175 of file expression.h.
#define EXPRINFO_POW -22 |
The general power node is with in params.nd()
.
Definition at line 181 of file expression.h.
#define EXPRINFO_PROD -5 |
The product node has the form , where is in params.nd()
.
Definition at line 105 of file expression.h.
#define EXPRINFO_PSD -52 |
This node checks whether a matrix is positive semidefinite.
Definition at line 336 of file expression.h.
#define EXPRINFO_PWCONSTLC -34 |
This node computes a piecewise constant left-continuous function from a table. The table is stored in params.m()
.
Definition at line 238 of file expression.h.
#define EXPRINFO_PWCONSTRC -35 |
This node computes a piecewise constant right-continuous function from a table. The table is stored in params.m()
.
Definition at line 242 of file expression.h.
#define EXPRINFO_PWLIN -32 |
This node computes a piecewise linear function from a table. The table is stored in params.m()
.
Definition at line 230 of file expression.h.
#define EXPRINFO_QUAD -26 |
This node is a quadratic form in all variables. The params.m()
stores the enhanced matrix for the function . is assumed symmetric and sparse.
Definition at line 203 of file expression.h.
#define EXPRINFO_RE -27 |
This node returns the real part of a complex number.
Definition at line 209 of file expression.h.
#define EXPRINFO_SCPROD -9 |
The scalar product is defined as without parameters.
Definition at line 122 of file expression.h.
#define EXPRINFO_SIN -18 |
The sine node is , where is stored in params.nd()
.
Definition at line 161 of file expression.h.
#define EXPRINFO_SPLINE -33 |
This node computes a cubic spline from a table. The table is stored in params.m()
.
Definition at line 234 of file expression.h.
#define EXPRINFO_SQROOT -13 |
The square root node is , where is stored in params.nd()
.
Definition at line 141 of file expression.h.
#define EXPRINFO_SQUARE -12 |
The square node is where is stored in params.nd()
.
Definition at line 137 of file expression.h.
#define EXPRINFO_SUM -3 |
This is a general linear combination of the form where is stored in params.nd()
. Here as in all operator types stands for , where is the result of the th child and stands for coeff[i]
.
Definition at line 96 of file expression.h.
#define EXPRINFO_UNDEFINED -57 |
This is the artifical number for undefined nodes.
Definition at line 356 of file expression.h.
#define EXPRINFO_VARIABLE -2 |
The variable number of this node is contained in params.nn()
.
Definition at line 84 of file expression.h.
typedef model::const_walker coco::expression_const_walker |
typedef model::walker coco::expression_walker |
void coco::graphorder | ( | const model & | DAG, | |
std::vector< unsigned int > & | order | |||
) |
This function computes a node order in order
, which is compatible with the DAG structure defined by DAG
.
Definition at line 94 of file graphorder.cc.
const char * coco::expr_names |
This array of strings keeps the names of the various operator types in the .dag format.
Definition at line 36 of file exprnames.cc.