#include "vinci.h"
Go to the source code of this file.
Macros | |
#define | MAXIMUM 1.0e150 /* define the maximum used for testing infinity */ |
#define | EPSILON_LASS EPSILON /* Numbers smaller than this are treated as zero in rhs*/ |
#define | EPS1 EPSILON /* Numbers smaller than this are treated as zero in coefficient */ |
#define | EPS_NORM EPSILON /* EPSILON used for constraint normalization*/ |
#define | LaShiftLevel 0 /* Shifting is possible if d>=LaShiftLevel */ |
#define | LaShift |
#define | verboseFirstLevel /* output the intermediate volume of the first level */ |
Functions | |
void * | my_malloc (long int size) |
void | my_free (void *pointer, long int size) |
void | create_key (T_Key *key, int key_choice) |
void | free_key (T_Key key, int key_choice) |
void | add_hypervar (T_LassInt hyperplane, T_LassInt variable, T_Key *key) |
void | delete_hypervar (T_LassInt hyperplane, T_LassInt variable, T_Key *key) |
int * | create_int_vector (n) |
void | free_int_vector (int *v, int n) |
static T_LassInt | add_reduced_index (T_LassInt red, T_LassInt *indices, T_LassInt *ref_indices) |
static void | del_original_indices (T_LassInt *indices, T_LassInt *org_indices) |
static void | del_original (T_LassInt base, T_LassInt *indices) |
static void | rm_original_inElAll_index (T_LassInt baserow) |
static void | rm_constraint (rational *A, int *LastPlane_, int d, int rm_index) |
static rational * | compact () |
static int | notInPivot (int *pivot, int col, int i) |
static void | shift_P (rational *A, int LastPlane_, int d) |
static int | norm_and_clean_constraints (rational *A, int *LastPlane_, int d, T_LassInt *Del_index, int Index_needed) |
static rational | lass (rational *A, int LastPlane_, int d) |
void | VOLUME_LASSERRE_FILE (double planes2[7][4], rational *volume) |
void | volume_lasserre_file (double planes2[7][4], rational *volume) |
void | VOLUME_LASSERRE_FILE_ (double planes2[7][4], rational *volume) |
void | volume_lasserre_file_ (double planes2[7][4], rational *volume) |
void | tree_out (T_Tree **ppr, int *pi_balance, T_Key key, rational **volume, T_Key **keyfound, int key_choice) |
T_VertexSet | duplicate_set (T_VertexSet s) |
static int | compare_key (T_Key key1, T_Key key2, int key_choice) |
Variables | |
int | G_d |
int | G_m |
real ** | G_Hyperplanes = NULL |
T_VertexSet * | G_Incidence = NULL |
T_VertexSet | G_Vertices |
int | G_Precomp = 0 |
int | G_Storage = -1 |
int | G_RandomSeed = 4 |
boolean | G_OutOfMem = TRUE |
void * | G_MemRes = NULL |
rational | G_Minus1 = -1 |
rational * | A |
rational * | pivotrow |
T_LassInt * | All_index |
T_LassInt * | Pivot |
int ** | p2c |
rational * | planescopy |
static T_Key | key |
static T_Key * | keyfound |
static T_Tree * | tree_volumes |
static T_VertexSet * | face |
#define EPS1 EPSILON /* Numbers smaller than this are treated as zero in coefficient */ |
Definition at line 27 of file MP/Source/vinci_lass.c.
Referenced by norm_and_clean_constraints().
Definition at line 28 of file MP/Source/vinci_lass.c.
Referenced by norm_and_clean_constraints().
Definition at line 26 of file MP/Source/vinci_lass.c.
Referenced by lass().
#define LaShift |
Definition at line 30 of file MP/Source/vinci_lass.c.
Referenced by lass().
Definition at line 29 of file MP/Source/vinci_lass.c.
Referenced by lass().
#define MAXIMUM 1.0e150 /* define the maximum used for testing infinity */ |
Definition at line 25 of file MP/Source/vinci_lass.c.
Referenced by lass().
#define verboseFirstLevel /* output the intermediate volume of the first level */ |
Definition at line 34 of file MP/Source/vinci_lass.c.
|
static |
Definition at line 258 of file MP/Source/vinci_lass.c.
Referenced by lass(), and norm_and_clean_constraints().
|
static |
Definition at line 345 of file MP/Source/vinci_lass.c.
References G_d, G_Hyperplanes, G_m, i, j, and my_malloc().
Referenced by VOLUME_LASSERRE_FILE().
Definition at line 991 of file MP/Source/vinci_lass.c.
References T_Key::d, G_m, T_Key::hyperplanes, T_Key::hypervar, i, KEY_PLANES, KEY_PLANES_VAR, KEY_VERTICES, T_VertexSet::lastel, T_VertexSet::loe, p1, T_Key::set, and T_Key::vertices.
Referenced by tree_out().
int* create_int_vector | ( | n | ) |
Definition at line 236 of file MP/Source/vinci_lass.c.
References my_malloc(), n, and v.
void create_key | ( | T_Key * | key, |
int | key_choice | ||
) |
Definition at line 131 of file MP/Source/vinci_lass.c.
References create_int_vector(), G_d, G_Storage, T_Key::hyperplanes, KEY_PLANES, KEY_PLANES_VAR, my_malloc(), and T_Key::variables.
Referenced by tree_out(), and VOLUME_LASSERRE_FILE().
Definition at line 308 of file MP/Source/vinci_lass.c.
Referenced by lass(), and rm_original_inElAll_index().
Definition at line 292 of file MP/Source/vinci_lass.c.
Referenced by lass().
T_VertexSet duplicate_set | ( | T_VertexSet | s | ) |
Definition at line 976 of file MP/Source/vinci_lass.c.
References T_VertexSet::lastel, T_VertexSet::loe, T_VertexSet::maxel, and my_malloc().
Referenced by tree_out().
void free_int_vector | ( | int * | v, |
int | n | ||
) |
Definition at line 248 of file MP/Source/vinci_lass.c.
References my_free().
Referenced by free_key().
void free_key | ( | T_Key | key, |
int | key_choice | ||
) |
Definition at line 151 of file MP/Source/vinci_lass.c.
References free_int_vector(), G_d, G_Storage, T_Key::hyperplanes, T_Key::hypervar, KEY_PLANES, KEY_PLANES_VAR, my_free(), and T_Key::variables.
Referenced by VOLUME_LASSERRE_FILE().
Definition at line 572 of file MP/Source/vinci_lass.c.
References A, add_hypervar(), add_reduced_index(), All_index, d, del_original(), del_original_indices(), delete_hypervar(), EPSILON_LASS, FALSE, G_d, G_m, G_MemRes, G_OutOfMem, G_Storage, i, j, KEY_PLANES_VAR, LaShift, LaShiftLevel, MAXIMUM, MIN_PIVOT_LASS, my_free(), my_malloc(), norm_and_clean_constraints(), p2c, Pivot, pivotrow, rm_original_inElAll_index(), shift_P(), tree_out(), TRUE, and volume().
Referenced by VOLUME_LASSERRE_FILE().
void my_free | ( | void * | pointer, |
long int | size | ||
) |
Definition at line 121 of file MP/Source/vinci_lass.c.
Referenced by free_int_vector(), free_key(), and lass().
void* my_malloc | ( | long int | size | ) |
Definition at line 90 of file MP/Source/vinci_lass.c.
References G_MemRes, G_OutOfMem, my_malloc(), and TRUE.
Referenced by compact(), create_int_vector(), create_key(), duplicate_set(), lass(), my_malloc(), tree_out(), and VOLUME_LASSERRE_FILE().
|
static |
Definition at line 483 of file MP/Source/vinci_lass.c.
References A, add_reduced_index(), All_index, d, EPS1, EPS_NORM, i, j, p1, rm_constraint(), and sqrt().
Referenced by lass().
|
static |
Definition at line 366 of file MP/Source/vinci_lass.c.
Referenced by shift_P().
|
static |
Definition at line 328 of file MP/Source/vinci_lass.c.
Referenced by norm_and_clean_constraints().
|
static |
Definition at line 323 of file MP/Source/vinci_lass.c.
References All_index, and del_original().
Referenced by lass().
|
static |
Definition at line 374 of file MP/Source/vinci_lass.c.
References A, create_int_vector(), d, G_d, i, j, MIN_PIVOT_LASS, notInPivot(), p1, and planescopy.
Referenced by lass().
void tree_out | ( | T_Tree ** | ppr, |
int * | pi_balance, | ||
T_Key | key, | ||
rational ** | volume, | ||
T_Key ** | keyfound, | ||
int | key_choice | ||
) |
Definition at line 818 of file MP/Source/vinci_lass.c.
References compare_key(), create_key(), T_Key::d, duplicate_set(), FALSE, G_d, G_Minus1, G_OutOfMem, G_Storage, T_Key::hyperplanes, T_Key::hypervar, if(), key, KEY_PLANES, KEY_PLANES_VAR, KEY_VERTICES, my_malloc(), p1, T_Key::set, T_Tree::tree_b, T_Tree::tree_l, tree_out(), T_Tree::tree_r, TRUE, T_Key::variables, T_Key::vertices, and T_Tree::vol.
Referenced by lass(), and tree_out().
void VOLUME_LASSERRE_FILE | ( | double | planes2[7][4], |
rational * | volume | ||
) |
Definition at line 737 of file MP/Source/vinci_lass.c.
References All_index, compact(), create_key(), FALSE, free_key(), G_d, G_Hyperplanes, G_m, G_MemRes, G_OutOfMem, G_Storage, T_Key::hyperplanes, T_Key::hypervar, i, j, KEY_PLANES_VAR, lass(), my_malloc(), p2c, Pivot, pivotrow, planescopy, and T_Key::variables.
void volume_lasserre_file | ( | double | planes2[7][4], |
rational * | volume | ||
) |
Definition at line 800 of file MP/Source/vinci_lass.c.
References VOLUME_LASSERRE_FILE().
Referenced by volratio().
void VOLUME_LASSERRE_FILE_ | ( | double | planes2[7][4], |
rational * | volume | ||
) |
Definition at line 804 of file MP/Source/vinci_lass.c.
References VOLUME_LASSERRE_FILE().
void volume_lasserre_file_ | ( | double | planes2[7][4], |
rational * | volume | ||
) |
Definition at line 808 of file MP/Source/vinci_lass.c.
References VOLUME_LASSERRE_FILE().
rational* A |
Definition at line 67 of file MP/Source/vinci_lass.c.
T_LassInt* All_index |
Definition at line 69 of file MP/Source/vinci_lass.c.
|
static |
Definition at line 79 of file MP/Source/vinci_lass.c.
int G_d |
Definition at line 50 of file MP/Source/vinci_lass.c.
Referenced by add_hypervar(), compact(), create_key(), delete_hypervar(), free_key(), lass(), shift_P(), tree_out(), and VOLUME_LASSERRE_FILE().
real** G_Hyperplanes = NULL |
Definition at line 53 of file MP/Source/vinci_lass.c.
Referenced by compact(), and VOLUME_LASSERRE_FILE().
T_VertexSet* G_Incidence = NULL |
Definition at line 54 of file MP/Source/vinci_lass.c.
int G_m |
Definition at line 51 of file MP/Source/vinci_lass.c.
Referenced by add_hypervar(), add_reduced_index(), compact(), compare_key(), del_original(), del_original_indices(), delete_hypervar(), lass(), and VOLUME_LASSERRE_FILE().
void* G_MemRes = NULL |
Definition at line 62 of file MP/Source/vinci_lass.c.
Referenced by lass(), my_malloc(), and VOLUME_LASSERRE_FILE().
rational G_Minus1 = -1 |
Definition at line 63 of file MP/Source/vinci_lass.c.
Referenced by tree_out().
Definition at line 61 of file MP/Source/vinci_lass.c.
Referenced by lass(), my_malloc(), tree_out(), and VOLUME_LASSERRE_FILE().
int G_Precomp = 0 |
Definition at line 57 of file MP/Source/vinci_lass.c.
int G_RandomSeed = 4 |
Definition at line 59 of file MP/Source/vinci_lass.c.
int G_Storage = -1 |
Definition at line 58 of file MP/Source/vinci_lass.c.
Referenced by create_key(), free_key(), lass(), tree_out(), and VOLUME_LASSERRE_FILE().
T_VertexSet G_Vertices |
Definition at line 55 of file MP/Source/vinci_lass.c.
|
static |
Definition at line 76 of file MP/Source/vinci_lass.c.
Referenced by tree_out().
|
static |
Definition at line 76 of file MP/Source/vinci_lass.c.
int** p2c |
Definition at line 71 of file MP/Source/vinci_lass.c.
T_LassInt* Pivot |
Definition at line 70 of file MP/Source/vinci_lass.c.
rational* pivotrow |
Definition at line 68 of file MP/Source/vinci_lass.c.
rational* planescopy |
Definition at line 75 of file MP/Source/vinci_lass.c.
|
static |
Definition at line 78 of file MP/Source/vinci_lass.c.