#include <IbexFunction.h>
Public Member Functions | |
| Dim | arg_dim (int i) const |
| int | nb_inputs () const |
| int | input_size () const |
| int | output_size () const |
| int | temp_size () const |
| Dim | img_dim () const |
| int | status (int key) const |
| ~Function () | |
| void | forward (Space &space) const |
| void | backward (Space &space) const |
| void | gradient (Space &space) const |
Public Attributes | |
| const char * | name |
| Env | env |
| const Assign ** | code |
| int | code_size |
Example of a function definition in Quimper:
function y=f(x,A[2][4],B[4][3]) W1 = A*B; w2 = x+1; w3 = w2*W1[1][1]-w2; y = w3+w3; end
| ibex::Function::~Function | ( | ) |
Deletes this instance.
| Dim ibex::Function::arg_dim | ( | int | i | ) | const |
Return the dimension of the ith input argument.
| int ibex::Function::nb_inputs | ( | ) | const |
Number of input arguments (or: dimension of the input variable vector). Warning, this may not equal input_size() since some input variable may be vectors or matrices.
| int ibex::Function::input_size | ( | ) | const |
Return the total number of entries (i.e., keys) of the input.
Returns the total number of entries (i.e., keys) of the input.
| int ibex::Function::output_size | ( | ) | const |
Return the output size (or dimension)
Returns the output size (or dimension)
| int ibex::Function::temp_size | ( | ) | const |
Return the total number of temporary variables (i.e., keys).
Returns the total number of temporary variables (i.e., keys).
| Dim ibex::Function::img_dim | ( | ) | const |
Return the dimension of the image (the output).
Returns the dimension of the image (the output).
| int ibex::Function::status | ( | int | key | ) | const |
Return:
Returns:
| void ibex::Function::forward | ( | Space & | space | ) | const |
Contract y under the constraint y=f(x) with a forward evaluation.
| void ibex::Function::backward | ( | Space & | space | ) | const |
Contract x under the constraint y=f(x) with a backward evaluation.
| void ibex::Function::gradient | ( | Space & | space | ) | const |
Computes the gradient of f on a space. The result is stored in the ibex::Entity::deriv fields.
Computes the gradient.
| const char* ibex::Function::name |
The function name (the symbol).
The function local environment (the one that contains input, temporary and output arguments).
| const Assign** ibex::Function::code |
The code of the function. This array of assignments represents how to compute output arguments from the input arguments. This structure also corresponds to the DAG of the function.
Number of assignments in the code.
1.5.5