solver.h File Reference

Go to the source code of this file.

Functions

BEGIN_C_DECLS
s_fm_solution_t
fm_solver (s_fm_system_t *system, int solver_type)
 Fourier-Motzkin projection algorithm, to solve rational and integral systems of (in-)equalities.
s_fm_solution_tfm_solver_solution_at (s_fm_system_t *system, int solver_type, unsigned last)
 Fourier-Motzkin projection algorithm, to solve rational and integral systems of (in-)equalities.
s_fm_solution_tfm_solver_solution_to (s_fm_system_t *system, int solver_type, unsigned to)
 Fourier-Motzkin projection algorithm. Projection done up to the 'to' dimension.
s_fm_rational_t ** fm_solver_minlexico (s_fm_solution_t *sol, z_type_t min, int is_integral)
 Compute lexio-smallest solution. If lower bound is -infinite, use argument 'min' instead. is_integral is a bit to force computation of integral lexico-smallest vector.
s_fm_rational_t ** fm_solver_maxlexico (s_fm_solution_t *sol, z_type_t max, int is_integral)
 Compute lexio-largest solution. If upper bound is infinite, use argument 'max' instead. is_integral is a bit to force computation of integral lexico-largest vector.
void fm_solver_compute_min (s_fm_rational_t **lb, s_fm_list_t *l, s_fm_vector_t *vect, unsigned idx, int is_int)
void fm_solver_compute_max (s_fm_rational_t **Ub, s_fm_list_t *l, s_fm_vector_t *vect, unsigned idx, int is_int)
s_fm_solution_tfm_solver_linind (s_fm_system_t *A)
int fm_solver_gauss (s_fm_system_t *A)


Function Documentation

BEGIN_C_DECLS s_fm_solution_t* fm_solver ( s_fm_system_t system,
int  solver_type 
)

Fourier-Motzkin projection algorithm, to solve rational and integral systems of (in-)equalities.

Fourier-Motzkin projection algorithm.

Possible options for solver_type:

input s_fm_system_t* : A system to solve. input int : The option to provide.

output s_fm_solution_t* : The solution of the system, if it exists (NULL otherwise).

See also:
fm/system.h fm/solution.h

s_fm_solution_t* fm_solver_solution_at ( s_fm_system_t system,
int  solver_type,
unsigned  last 
)

Fourier-Motzkin projection algorithm, to solve rational and integral systems of (in-)equalities.

Fourier-Motzkin projection algorithm.

Possible options for solver_type:

input s_fm_system_t* : A system to solve. input int : The option to provide.

input unsigned : The last variable index to store in the solution (full projection is performed, but we only store inequalities involving variable 1 to 'last' in the solution.

output s_fm_solution_t* : The solution of the system, if it exists (NULL otherwise).

See also:
fm/system.h fm/solution.h

s_fm_solution_t* fm_solver_solution_to ( s_fm_system_t system,
int  solver_type,
unsigned  to 
)

Fourier-Motzkin projection algorithm. Projection done up to the 'to' dimension.

Fourier-Motzkin projection algorithm.

Possible options for solver_type:

input s_fm_system_t* : A system to solve. input int : The option to provide.

input unsigned : The variable index at which to stop the projection (the projection is performed from the last variable of the system to the 'to' variable)

output s_fm_solution_t* : The solution of the system, if it exists (NULL otherwise).

See also:
fm/system.h fm/solution.h

s_fm_rational_t** fm_solver_minlexico ( s_fm_solution_t sol,
z_type_t  min,
int  is_integral 
)

Compute lexio-smallest solution. If lower bound is -infinite, use argument 'min' instead. is_integral is a bit to force computation of integral lexico-smallest vector.

Lexicographically smallest computation.

input s_fm_solution_t* : input solution for the system. input z_type_t : minimum value to use for -infinite bounds. input int : set to 0 for rational values, to 1 for integral values.

output s_fm_rational_t** : A NULL-terminated array of rationals*, where denominators are be '1' if is_integral is set.

s_fm_rational_t** fm_solver_maxlexico ( s_fm_solution_t sol,
z_type_t  max,
int  is_integral 
)

Compute lexio-largest solution. If upper bound is infinite, use argument 'max' instead. is_integral is a bit to force computation of integral lexico-largest vector.

Lexicographically largest computation.

input s_fm_solution_t* : input solution for the system. input z_type_t : maximum value to use for infinite bounds. input int : set to 0 for rational values, to 1 for integral values.

output s_fm_rational_t** : A NULL-terminated array of rationals*, where denominators are be '1' if is_integral is set.

void fm_solver_compute_min ( s_fm_rational_t **  lb,
s_fm_list_t l,
s_fm_vector_t vect,
unsigned  idx,
int  is_int 
)

Return the lower bound for a given variable at index idx, NULL if there is no bounds.

void fm_solver_compute_max ( s_fm_rational_t **  Ub,
s_fm_list_t l,
s_fm_vector_t vect,
unsigned  idx,
int  is_int 
)

Return the Upper bound for a given variable at index idx, NULL if there is no bounds.

s_fm_solution_t* fm_solver_linind ( s_fm_system_t A  ) 

Input: A system of linear equation Output: A list of replacement vectors (on the `positive' attribute), or NULL if there is a contradiction in the input system format: x = 2 -> [ 0 1 2 ] in pip so output is [ 0 2 ] 0x + 0y -2z + t = 1-> [ 0 0 0 -2 -1 ] (value for the current variable to replace is always 1).

int fm_solver_gauss ( s_fm_system_t A  ) 


Generated on Thu Oct 30 13:38:21 2008 for FM by  doxygen 1.5.3