File numerics/src/QP/ConvexQP.h

Go to the source code of this file

Definition of a structure to handle Convex Quadratic Problem.

Functions

void convexQP_clear(ConvexQP *cqp)

Clear ConvexQP structure: set all pointeurs to NULL, double and int to 0.

Parameters
  • cqp: the problem to clear

void convexQP_display(ConvexQP *cqp)

display a ConvexQPProblem

Parameters
  • cqp: the problem to display

void convexQP_free(ConvexQP *cqp)

free a ConvexQPProblem

Parameters
  • cqp: the problem to free

static void *convexQP_get_env(void *cqp)

get the environment from the struct

Return
the environment from the struct
Parameters
  • cqp: a ConvexQP problem

ConvexQP *convexQP_new(int size)

new ConvexQP problem

Return
a initialized ConvexQP struct
Parameters
  • size: size of the ambient space for the CQP

int convexQP_newFromFile(ConvexQP *cqp, FILE *file)

read a ConvexQPProblem in a file (numerics .dat format)

Return
ok if successfull
Parameters
  • cqp: the problem to read
  • file: the target file

int convexQP_printInFile(ConvexQP *cqp, FILE *file)

print a ConvexQPProblem in a file (numerics .dat format)

Return
ok if successfull
Parameters
  • cqp: the problem to print out
  • file: the dest file

struct ConvexQP

Public Members

NumericsMatrix *A

Matrix A that defines the constraints.

If it is NULL, we assume that A is the identity matrix

double *b

vector b that defines the constant term in the constraints.

void *env

pointer onto env object (which is self is the simplest case)

int istheNormConvexQPset

Boolean to know if the norm is set If not (istheNormConvexQPset=0) it will be computed in the first call of convexQP_compute_error By default, set istheNormConvexQPset =0.

int m

m \( m \)

NumericsMatrix *M

Matrix M that defines the quadratic term in the cost function.

double normConvexQP

Norm of the problem to compute relative solution.

void (*ProjectionOnC)(void *self, double *x, double *PX)

Projection on C.

double *q

vector q that defines the linear term in the cost function.

void *set

opaque struct that represent the set C (possibly empty)

int size

size \( n \)