File numerics/src/tools/SiconosSets.h#
Go to the source code of this file
Sets structures used in Siconos:
box constraints \( K = \{ x \in \mathbb{R}^n | lb_i \leq x_i \leq ub_i\quad i = 1 .. n\}\)
polytopes and polyhedra \( \{ x \in \mathbb{R}^n | Hx\leq K\}\)
sets defined by a set of inequalities \(\{g_i(x)\leq 0\}\) ( work in progress)
Typedefs
-
typedef generic_set positive_orthant#
The positive orthant does not need to contain much info.
Enums
Functions
-
static inline void set_set_id(void *set, int id)#
set set id
- Parameters:
set – the set which id should be set
id – the id of the set
-
void project_on_set(int n, double *x, void *set)#
project the point x on a set
- Parameters:
n – the size of x
x – the point to project
set – the set on which we project x
-
void free_siconos_set(void *set)#
free a set
- Parameters:
set – struct to be freed
-
void free_box(box_constraints *b)#
free a box struct
- Parameters:
b – the box struct to free
-
void free_polyhedron(polyhedron *poly)#
free a Polyhedron struct
- Parameters:
poly – the Polyhedron struct to free
-
void free_polyhedron_unified(polyhedron_unified *poly)#
free a Polyhedron struct
- Parameters:
poly – the Polyhedron struct to free
-
struct generic_set#
- #include <SiconosSets.h>
Generic set (can be seen as a kind of `base class’).
Mainly used to infer the type of set (box, polytope, …) to properly operate on it
Public Members
-
int id#
type of the set
-
int id#
-
struct box_constraints#
- #include <SiconosSets.h>
Definition of a rectangular set, also known as box.
-
struct polyhedron#
- #include <SiconosSets.h>
Definition of a polytope in terms of (H,K) representation.
Public Members
-
int id#
id of the structure, usually solver specific
-
unsigned size_ineq#
number of inequalities
-
unsigned size_eq#
number of equalities
-
NumericsMatrix *H#
H matrix in an (H,K) representation of a polytope H x <= K.
-
double *K#
K vector in an (H,K) representation of a polytope H x <= K.
-
NumericsMatrix *Heq#
Heq matrix for the equality constraints Heq x = Keq.
-
double *Keq#
Keq vector for the equality constraints Heq x = Keq.
-
int id#
-
struct polyhedron_unified#
- #include <SiconosSets.h>
Definition of a polytope in terms of (H,K) representation.
Public Members
-
int id#
id of the structure, usually solver specific
-
NumericsMatrix *A#
A matrix in an (A,b) representation of a polytope \(Ax (\leq,=,\geq) b\).
-
double *b#
b vector in an (A,b) representation of a polytope \(Ax (\leq,=,\geq) b\)
-
char *type#
type of constraint of type SICONOS_RELATION_TYPES
-
int id#
-
union polyhedron_set#