PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "linear_assert.h"
#include <time.h>
#include <sys/time.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
#include "sommet.h"
#include "polyedre.h"
#include "union.h"
Go to the source code of this file.
Functions | |
Pdisjunct | dj_new () |
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date : Modified : 04 04 95 Documents: UNION.tex : `‘Extension de C3 aux unions de polyedres’' Comments : More... | |
Pdisjunct | dj_dup (Pdisjunct in_dj) |
Pdisjunct dj_dup( (Pdisjunct) in_dj ) AL 15/11/93 Duplicates input disjunction. More... | |
Pdisjunct | dj_free (Pdisjunct in_dj) |
Pdisjunct dj_free( (Pdisjunct) in_dj ) AL 31/05/94 w - 1 depth free of input disjunction. More... | |
Pdisjunct | dj_dup1 (Pdisjunct in_dj) |
Pdisjunct dj_dup1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth duplication of input disjunction. More... | |
Pdisjunct | dj_free1 (Pdisjunct in_dj) |
Pdisjunct dj_free1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth free of input disjunction. More... | |
Pdisjunct | dj_full () |
Pdisjunct dj_full() AL 18/11/93 Return full space disjunction = dj_new() More... | |
bool | dj_full_p (Pdisjunct in_dj) |
dj_full_p( (Pdisjunct) in_dj ) AL 30/05/94 Returns True if in_dj = (NIL) ^ (NIL) More... | |
Pdisjunct | dj_empty () |
Pdisjunct dj_empty() AL 18/11/93 Returns a disjunction with sc_empty() element. More... | |
bool | dj_empty_p (Pdisjunct in_dj) |
dj_empty_p( (Ppath) in_pa ) AL 30/05/94 Returns True if in_dj = (1*TCST = 0) ^ (NIL) More... | |
Pdisjunct | dj_intersection_ofl_ctrl (Pdisjunct in_dj1, Pdisjunct in_dj2, int ofl_ctrl) |
Pdisjunct dj_intersection_ofl_ctrl( in_dj1, in_dj2, ofl_ctrl ) Computes intersection of two disjunctions. More... | |
Pdisjunct | dj_intersect_system_ofl_ctrl (in_dj, in_ps, ofl_ctrl) |
Pdisjunct dj_intersect_system_ofl_ctrl( ) More... | |
Pdisjunct | dj_intersect_djcomp_ofl_ctrl (Pdisjunct in_dj1, Pdisjunct in_dj2, int ofl_ctrl) |
Pdisjunct dj_intersect_djcomp_ofl_ctrl( ) No sharing. More... | |
Pdisjunct | dj_union (Pdisjunct in_dj1, Pdisjunct in_dj2) |
Pdisjunct dj_union( (Pdisjunct) in_dj1, (Pdisjunct) in_dj2 ) Give the union of the two disjunctions. More... | |
bool | dj_feasibility_ofl_ctrl (Pdisjunct in_dj, int ofl_ctrl) |
bool dj_feasibility_ofl_ctrl( (Pdisjunct) in_dj, (int) ofl_ctrl ) Returns true if in_dj is a feasible disjunction. More... | |
Pdisjunct | dj_system_complement (Psysteme in_ps) |
Pdisjunct dj_system_complement( (Psystem) in_ps ) AL 26/10/93 Input : A Psysteme. More... | |
Pdisjunct | dj_disjunct_complement (Pdisjunct in_dj) |
Returns complement of in_dj. More... | |
Pdisjunct | dj_projection_along_variables_ofl_ctrl (Pdisjunct in_dj, Pvecteur in_pv, int ofl_ctrl) |
Returns projection of in_dj along vars of in_pv. More... | |
Pdisjunct | dj_simple_inegs_to_eg (Pdisjunct in_dj) |
Pdisjunct dj_simple_inegs_to_eg( in_dj ) transforms two opposite inequalities in a simple equality in each system of the input disjunction. More... | |
bool | dj_is_system_p (Pdisjunct in_dj) |
bool dj_is_system_p( (Pdisjunct) in_dj ) AL 16/11/93 Returns True if disjunction in_dj has only one Psysteme in it. More... | |
Pdisjunct | dj_append_system (Pdisjunct in_dj, Psysteme in_ps) |
Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in_ps will be added. More... | |
Pdisjunct | dj_variable_rename (Pdisjunct in_dj, Variable in_vold, Variable in_vnew) |
dj_variable_rename replaces in_vold with in_vnew : in_dj is modified More... | |
Pdisjunct | dj_variable_substitution_with_eqs_ofl_ctrl (in_dj, in_pc, in_pv, ofl_ctrl) |
Pdisjunct dj_variable_substitution_with_eqs_ofl_ctrl() AL160595 Substitutes to all systems of disjunction in_dj definitions of variables in in_pv that are implied by in_pc. More... | |
void | dj_fprint_tab (FILE *in_fi, Pdisjunct in_dj, char *(*in_fu)(), int in_tab) |
void dj_fprint_tab(FILE*, Pdisjunct, function, int) prints a Pdisjunct More... | |
Pdisjunct | dj_read (char *nomfic) |
void dj_read(FILE*) reads a Pdisjunct More... | |
Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in_ps will be added.
AL 10/11/93 Output : Disjunct in_dj with in_ps. => ! Sharing. Comment: Nothing is checked on result in_dj.
in_dj | n_dj |
in_ps | n_ps |
Definition at line 403 of file disjunct.c.
References dj_full_p(), dj_new(), Ssyslist::psys, and sl_append_system().
Referenced by compatible_pc_p(), dj_system_complement(), and pa_path_to_disjunct_rule4_ofl_ctrl().
Returns complement of in_dj.
No sharing
debugging
in_dj | n_dj |
Definition at line 299 of file disjunct.c.
References C3_DEBUG, C3_RETURN, dj_dup(), dj_empty_p(), dj_fprint_tab(), dj_full(), dj_full_p(), dj_intersection, dj_system_complement(), DJ_UNDEFINED, DJ_UNDEFINED_P, IS_DJ, and union_variable_name.
Referenced by dj_intersect_djcomp_ofl_ctrl().
Pdisjunct dj_dup( (Pdisjunct) in_dj ) AL 15/11/93 Duplicates input disjunction.
in_dj | n_dj |
Definition at line 58 of file disjunct.c.
References dj_full(), dj_full_p(), and sl_dup().
Referenced by dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), and dj_simple_inegs_to_eg().
Pdisjunct dj_dup1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth duplication of input disjunction.
in_dj | n_dj |
Definition at line 76 of file disjunct.c.
References sl_dup1().
Pdisjunct dj_empty | ( | void | ) |
Pdisjunct dj_empty() AL 18/11/93 Returns a disjunction with sc_empty() element.
Definition at line 111 of file disjunct.c.
References sc_empty(), and sl_append_system().
Referenced by dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_disjunct_rule4_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), and pa_system_difference_ofl_ctrl().
dj_empty_p( (Ppath) in_pa ) AL 30/05/94 Returns True if in_dj = (1*TCST = 0) ^ (NIL)
in_dj | n_dj |
Definition at line 118 of file disjunct.c.
References DJ_UNDEFINED, and sc_empty_p().
Referenced by dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), dj_projection_along_variables_ofl_ctrl(), dj_simple_inegs_to_eg(), dj_union(), dj_variable_rename(), dj_variable_substitution_with_eqs_ofl_ctrl(), and pa_feasibility_ofl_ctrl().
bool dj_feasibility_ofl_ctrl( (Pdisjunct) in_dj, (int) ofl_ctrl ) Returns true if in_dj is a feasible disjunction.
AL,BC 23/02/95
in_dj | n_dj |
ofl_ctrl | fl_ctrl |
Definition at line 232 of file disjunct.c.
References DJ_UNDEFINED, Ssyslist::psys, sc_rational_feasibility_ofl_ctrl(), and Ssyslist::succ.
void dj_fprint_tab(FILE*, Pdisjunct, function, int) prints a Pdisjunct
Definition at line 492 of file disjunct.c.
References dj_full_p(), DJ_UNDEFINED_P, fprintf(), sl_fprint_tab(), and sl_get_tab_string().
Referenced by dj_disjunct_complement(), dj_intersect_djcomp_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().
Pdisjunct dj_free( (Pdisjunct) in_dj ) AL 31/05/94 w - 1 depth free of input disjunction.
in_dj | n_dj |
Definition at line 69 of file disjunct.c.
References sl_free().
Referenced by disjunction_to_region_sc(), dj_union(), pa_feasibility_ofl_ctrl(), pa_path_to_disjunct_ofl_ctrl(), pa_path_to_few_disjunct_ofl_ctrl(), pa_reduce_simple_complement(), and pa_system_difference_ofl_ctrl().
Pdisjunct dj_free1( (Pdisjunct) in_dj ) AL 31/05/94 1st depth free of input disjunction.
in_dj | n_dj |
Definition at line 84 of file disjunct.c.
References sl_free1().
Referenced by disjunction_to_region_sc().
Pdisjunct dj_full | ( | void | ) |
Pdisjunct dj_full() AL 18/11/93 Return full space disjunction = dj_new()
Definition at line 92 of file disjunct.c.
References dj_new().
Referenced by dj_disjunct_complement(), dj_dup(), dj_intersection_ofl_ctrl(), dj_system_complement(), pa_path_to_disjunct_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().
dj_full_p( (Pdisjunct) in_dj ) AL 30/05/94 Returns True if in_dj = (NIL) ^ (NIL)
in_dj | n_dj |
Definition at line 98 of file disjunct.c.
References DJ_UNDEFINED.
Referenced by dj_append_system(), dj_disjunct_complement(), dj_dup(), dj_fprint_tab(), dj_intersect_djcomp_ofl_ctrl(), dj_intersection_ofl_ctrl(), dj_projection_along_variables_ofl_ctrl(), dj_simple_inegs_to_eg(), dj_union(), dj_variable_rename(), and dj_variable_substitution_with_eqs_ofl_ctrl().
Pdisjunct dj_intersect_djcomp_ofl_ctrl( ) No sharing.
in_dj1 and in_dj2 stay as is.
Special cases
debuging
General cases
in_dj1 | n_dj1 |
in_dj2 | n_dj2 |
ofl_ctrl | fl_ctrl |
Definition at line 173 of file disjunct.c.
References C3_DEBUG, C3_RETURN, dj_disjunct_complement(), dj_dup(), dj_empty(), dj_empty_p(), dj_fprint_tab(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, dj_union(), fprintf(), free(), IS_DJ, pa_make(), pa_path_to_few_disjunct_ofl_ctrl(), Ssyslist::psys, Ssyslist::succ, and union_variable_name.
Pdisjunct dj_intersect_system_ofl_ctrl | ( | in_dj | , |
in_ps | , | ||
ofl_ctrl | |||
) |
Pdisjunct dj_intersect_system_ofl_ctrl( )
Definition at line 162 of file disjunct.c.
References dj_intersection_ofl_ctrl(), and sl_append_system().
Pdisjunct dj_intersection_ofl_ctrl( in_dj1, in_dj2, ofl_ctrl ) Computes intersection of two disjunctions.
AL,BC 23/03/95 Very costly function : -> sc_faisabilite_ofl_ctrl used. No sharing
empty intersection
in_dj1 | n_dj1 |
in_dj2 | n_dj2 |
ofl_ctrl | fl_ctrl |
Definition at line 134 of file disjunct.c.
References dj_dup(), dj_empty(), dj_empty_p(), dj_full(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, sc_append(), sc_dup(), sc_free(), sc_rational_feasibility_ofl_ctrl(), sl_append_system(), and Ssyslist::succ.
Referenced by dj_intersect_system_ofl_ctrl(), and pa_path_to_disjunct_ofl_ctrl().
bool dj_is_system_p( (Pdisjunct) in_dj ) AL 16/11/93 Returns True if disjunction in_dj has only one Psysteme in it.
in_dj | n_dj |
Definition at line 393 of file disjunct.c.
References sl_is_system_p().
Pdisjunct dj_new | ( | void | ) |
Package : C3/union Author : Arnauld LESERVOT (leservot(a)limeil.cea.fr) Date :
Modified : 04 04 95 Documents: UNION.tex : `‘Extension de C3 aux unions de polyedres’' Comments :
cproto-generated files
WARNING
THOSE FUNCTIONS ARE AUTOMATICALLY DERIVED
FROM THE WEB SOURCES !
Ansi includes
Linear includes
Pdisjunct dj_new() AL 26/10/93 Allocate a new Pdisjunct
Definition at line 52 of file disjunct.c.
References sl_new().
Referenced by dj_append_system(), and dj_full().
Returns projection of in_dj along vars of in_pv.
Sharing : in_dj is modified
in_dj | n_dj |
in_pv | n_pv |
ofl_ctrl | fl_ctrl |
Definition at line 319 of file disjunct.c.
References dj_empty_p(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, and Ssyslist::succ.
Pdisjunct dj_read | ( | char* | nomfic | ) |
void dj_read(FILE*) reads a Pdisjunct
nomfic | omfic |
Definition at line 510 of file disjunct.c.
References sl_read().
Pdisjunct dj_simple_inegs_to_eg( in_dj ) transforms two opposite inequalities in a simple equality in each system of the input disjunction.
Input disjunction is not modified.
Special case
General case
Compare with inequalities
Do we have ineq <= 0 and - ineq <= 0 ?
in_dj | n_dj |
Definition at line 339 of file disjunct.c.
References assert, contrainte_dup(), contrainte_free(), contrainte_in_liste(), contrainte_make(), CONTRAINTE_UNDEFINED, contraintes_dup(), dj_dup(), dj_empty_p(), dj_full_p(), DJ_UNDEFINED_P, Ssysteme::egalites, Ssysteme::inegalites, Ssysteme::nb_ineq, Ssyslist::psys, sc_add_egalite(), sc_add_inegalite(), sc_creer_base(), sc_dup(), sc_empty_p(), sc_full_p(), sc_make(), sl_append_system(), Scontrainte::succ, Ssyslist::succ, vect_chg_sgn(), vect_dup(), and Scontrainte::vecteur.
Referenced by pa_system_difference_ofl_ctrl().
Pdisjunct dj_system_complement( (Psystem) in_ps ) AL 26/10/93 Input : A Psysteme.
Output : A disjunction which is complement of in_ps.
debugging
v1 = 1*TCST to build complement system ...
Look for equalities
Look for inequalities
in_ps | n_ps |
Definition at line 254 of file disjunct.c.
References C3_DEBUG, C3_RETURN, contrainte_make(), CONTRAINTE_UNDEFINED, dj_append_system(), dj_full(), DJ_UNDEFINED, Ssysteme::egalites, eq, Ssysteme::inegalites, IS_DJ, sc_empty_p(), sc_fprint(), sc_make(), sl_append_system(), Scontrainte::succ, TCST, union_variable_name, VALUE_ONE, vect_add(), vect_chg_sgn(), vect_dup(), vect_new(), vect_rm(), and Scontrainte::vecteur.
Referenced by analyze_quast(), dj_disjunct_complement(), pa_path_to_disjunct_ofl_ctrl(), and pa_reduce_simple_complement().
Pdisjunct dj_union( (Pdisjunct) in_dj1, (Pdisjunct) in_dj2 ) Give the union of the two disjunctions.
AL 15/11/93 Memory: systems of the 2 unions are shared. in_dj1 = dj_union(in_dj1,in_dj2); (in_dj1 = dj_free(in_dj1); to remove in_dj1 and in_dj2
in_dj1 | n_dj1 |
in_dj2 | n_dj2 |
Definition at line 211 of file disjunct.c.
References dj_empty_p(), dj_free(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, and Ssyslist::succ.
Referenced by dj_intersect_djcomp_ofl_ctrl(), and pa_path_to_few_disjunct_ofl_ctrl().
dj_variable_rename replaces in_vold with in_vnew : in_dj is modified
in_dj | n_dj |
in_vold | n_vold |
in_vnew | n_vnew |
Definition at line 417 of file disjunct.c.
References dj_empty_p(), dj_full_p(), DJ_UNDEFINED, DJ_UNDEFINED_P, Ssyslist::psys, sc_variable_rename(), and Ssyslist::succ.
Pdisjunct dj_variable_substitution_with_eqs_ofl_ctrl | ( | in_dj | , |
in_pc | , | ||
in_pv | , | ||
ofl_ctrl | |||
) |
Pdisjunct dj_variable_substitution_with_eqs_ofl_ctrl() AL160595 Substitutes to all systems of disjunction in_dj definitions of variables in in_pv that are implied by in_pc.
in_pc are equality constraints that define uniquely each variable of in_pc. Function based on sc_variable_substitution_with_eq_ofl_ctrl().
Special cases
For each variable in in_pv, we should have one and only one constraint in in_pc that defines it. In each constraint, we should have only one variable in in_pv.
Find constraint def that defines var (only one !)
Assert that there is no other variable of in_pv that belongs to def
Assert that there is no other variable of in_pv that belongs to def
Definition at line 440 of file disjunct.c.
References assert, C3_DEBUG, contrainte_fprint(), dj_empty_p(), dj_fprint, dj_full_p(), DJ_UNDEFINED_P, Ssyslist::psys, Scontrainte::succ, Ssyslist::succ, Svecteur::succ, union_variable_name, Svecteur::var, vect_coeff(), vect_fprint(), and Scontrainte::vecteur.