ibex::Function Class Reference
[Expressions]

Function declaration expression. More...

#include <IbexFunction.h>

List of all members.

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


Detailed Description

Function declaration expression.

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

Note:
  • x,a,B, are input symbols
  • y is the output symbol
  • w1,W2 and w3 are temporary symbols
Author:
Gilles Chabert
Date:
December 2007

Constructor & Destructor Documentation

ibex::Function::~Function (  ) 

Deletes this instance.


Member Function Documentation

Dim ibex::Function::arg_dim ( int  i  )  const

Return the dimension of the ith input argument.

Precondition:
i< nb_inputs().

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:

  • 0 - if key is the key of an input symbol
  • 1 - if key is the key of an output symbol
  • 2 - if key is the key of a temporary symbol

Returns:

  • 0 - if key is the key of an input symbol
  • 1 - if key is the key of an output symbol
  • 2 - if key is the key of a temporary symbol

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.

Exceptions:
ibex::NotDifferentiableException,ibex::UnboundedResultException,ibex::UnfeasibilityException 
Computes the gradient.


Member Data Documentation

const char* ibex::Function::name

The function name (the symbol).

The function local environment (the one that contains input, temporary and output arguments).

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.


The documentation for this class was generated from the following files:

Generated on Sun Jun 27 15:52:00 2010 for IBEX by  doxygen 1.5.5