#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
Go to the source code of this file.
Classes | |
struct | T_Vertex |
struct | T_VertexSet |
struct | T_VertexSuperset |
union | T_Key |
struct | T_Tree |
Macros | |
#define | COPYRIGHT1 "(C) Benno Bueeler and Andreas Enge, {bueeler,enge}@ifor.math.ethz.ch" |
#define | COPYRIGHT2 " Developed in the ETHZ-EPFL project on Optimisation and Computational" |
#define | COPYRIGHT3 " Geometry with Komei Fukuda" |
#define | VERSION "1" |
#define | VERSION_DATE "March 1998" |
#define | T01 "The package computes the volume of a polytope whose vertices, defining" |
#define | T02 "hyperplanes and/or incidences of vertices and facettes are stored in files" |
#define | T03 "following Avis' and Fukuda's polytope format. The vertices are supposed to" |
#define | T04 "be in a file with extension '.ine', the hyperplanes in '.ext' and the" |
#define | T05 "incidences in '.icd' (see the sample files 'square.ext', 'square.icd' and" |
#define | T06 "'square.ine').\n" |
#define | T07 "Its basic call is 'vinci file' where 'file' stands for the polyhedron file" |
#define | T08 "name without extension, e. g. 'vinci square'. In this case the existing files" |
#define | T09 "and installed additional packages are analysed and according to the problem" |
#define | T10 "type an appropriate volume computation method is chosen automatically." |
#define | T11 "" |
#define | T12 "The following additional parameters are possible:" |
#define | T13 "-m followed by the label of a specific volume computation method; to see a" |
#define | T14 " list of the implemented methods, use 'vinci -m' without any label." |
#define | T15 "-p1, -p2 or -p3 which are valid for some methods. They determine the space" |
#define | T16 " and time complexity. Higher values lead to more space consume and a fast-" |
#define | T17 " er execution. If none of the parameters is specified the value" |
#define | T18 " DEFAULT_PRECOMP defined in 'vinci.h' is chosen." |
#define | T19 "-s directly followed by a natural integer. The value determines for how many" |
#define | T20 " recursion levels intermediate results are stored. A higher value speeds" |
#define | T21 " up certain methods considerably while needing more storage space." |
#define | T22 "-r directly followed by an integer. The value sets the random seed used for" |
#define | T23 " determining the objective function for Lawrence's formula." |
#define | T24 "\nFor more information please consult the manual." |
#define | LRS_EXEC "lrs" |
#define | CDD_EXEC "cddf+" |
#define | QHULL_EXEC "qhull" |
#define | QHULL_OPTIONS "d i Q0 Qz" |
#define | PIVOTING 1 |
#define | MIN_PIVOT 0.5 |
#define | PIVOTING_LASS 0 |
#define | MIN_PIVOT_LASS 0.1 |
#define | MAX_PRECOMP 3 |
#define | DEFAULT_PRECOMP 1 |
#define | DEFAULT_STORAGE 20 |
#define | STATISTICS |
#define | NO_RATIONAL |
#define | NO_COG |
#define | EPSILON 1e-10 |
#define | ARRAYSIZESTEP 5 |
#define | FALSE 0 |
#define | TRUE 1 |
#define | EOLN 10 /* end of line character */ |
#define | NONE 0 /* constants for data types in files */ |
#define | INTEGER_T 1 |
#define | REAL_T 2 |
#define | RATIONAL_T 3 |
#define | RCH 1 /* constants for the volume computation methods */ |
#define | GS 2 |
#define | GSH 3 |
#define | HOT 4 |
#define | HOTH 5 |
#define | CDDP 6 |
#define | CDDM 7 |
#define | QHULL 8 |
#define | LAWD 9 |
#define | LAWND 10 |
#define | RLASS 11 |
#define | LRS 12 |
#define | PREPARE 1 /* constants for precomputation of hyperplane intersections */ |
#define | RETRIEVE 2 |
#define | FREE 3 |
#define | KEY_PLANES 1 /* constants for the key type actually used in the balanced */ |
#define | KEY_VERTICES 2 /* tree routines */ |
#define | KEY_PLANES_VAR 3 |
#define | SCHMIDT 1 /* constants for the orthonormalisation technique used */ |
#define | HOUSEHOLDER 2 |
#define | STAT_SMALLEST_EXP -200 |
#define | STAT_BIGGEST_EXP 200 |
Typedefs | |
typedef double | real |
typedef int | boolean |
typedef unsigned char | T_LassInt |
typedef real | rational |
typedef struct T_Vertex | T_Vertex |
typedef struct T_VertexSet | T_VertexSet |
typedef struct T_VertexSuperset | T_VertexSuperset |
typedef union T_Key | T_Key |
typedef struct T_Tree | T_Tree |
Variables | |
int | G_d |
int | G_m |
real ** | G_Hyperplanes |
T_VertexSet * | G_Incidence |
T_VertexSet | G_Vertices |
int | G_Precomp |
int | G_Storage |
int | G_RandomSeed |
boolean | G_OutOfMem |
void * | G_MemRes |
rational | G_Minus1 |
unsigned int | Stat_Count |
real | Stat_Smallest |
real | Stat_Biggest |
unsigned int | Stat_CountPos [STAT_BIGGEST_EXP-STAT_SMALLEST_EXP+3] |
unsigned int | Stat_CountNeg [STAT_BIGGEST_EXP-STAT_SMALLEST_EXP+3] |
unsigned int * | Stat_CountStored |
unsigned int * | Stat_CountRetrieved |
unsigned int | Stat_CountShifts |
long int | Stat_ActualMem |
long int | Stat_MaxMem |
#define COPYRIGHT1 "(C) Benno Bueeler and Andreas Enge, {bueeler,enge}@ifor.math.ethz.ch" |
#define COPYRIGHT2 " Developed in the ETHZ-EPFL project on Optimisation and Computational" |
#define FALSE 0 |
Definition at line 133 of file vinci.h.
Referenced by Mesh::addCohesive(), bs95setup_(), Face::containsNode(), ElementList::empty(), FaceList::empty(), FaceListList::empty(), NodeList::empty(), IntList::empty(), Node::getSeparateElements(), Element::isCohesive(), Face::isExterior(), lass(), NodeList::move_to(), ElementList::move_to(), FaceListList::move_to(), FaceList::move_to(), IntList::move_to(), notInPivot(), MVec::operator==(), operator>>(), Node::separate(), cimg_library::cimg::system(), tree_out(), and VOLUME_LASSERRE_FILE().
Definition at line 159 of file vinci.h.
Referenced by compare_key(), create_key(), free_key(), and tree_out().
#define KEY_PLANES_VAR 3 |
Definition at line 161 of file vinci.h.
Referenced by compare_key(), create_key(), free_key(), lass(), tree_out(), and VOLUME_LASSERRE_FILE().
#define KEY_VERTICES 2 /* tree routines */ |
Definition at line 160 of file vinci.h.
Referenced by compare_key(), and tree_out().
#define MIN_PIVOT_LASS 0.1 |
#define PREPARE 1 /* constants for precomputation of hyperplane intersections */ |
#define SCHMIDT 1 /* constants for the orthonormalisation technique used */ |
#define T01 "The package computes the volume of a polytope whose vertices, defining" |
#define T02 "hyperplanes and/or incidences of vertices and facettes are stored in files" |
#define T03 "following Avis' and Fukuda's polytope format. The vertices are supposed to" |
#define T04 "be in a file with extension '.ine', the hyperplanes in '.ext' and the" |
#define T05 "incidences in '.icd' (see the sample files 'square.ext', 'square.icd' and" |
#define T07 "Its basic call is 'vinci file' where 'file' stands for the polyhedron file" |
#define T09 "and installed additional packages are analysed and according to the problem" |
#define T10 "type an appropriate volume computation method is chosen automatically." |
#define T12 "The following additional parameters are possible:" |
#define T14 " list of the implemented methods, use 'vinci -m' without any label." |
#define T15 "-p1, -p2 or -p3 which are valid for some methods. They determine the space" |
#define T16 " and time complexity. Higher values lead to more space consume and a fast-" |
#define T17 " er execution. If none of the parameters is specified the value" |
#define T18 " DEFAULT_PRECOMP defined in 'vinci.h' is chosen." |
#define T20 " recursion levels intermediate results are stored. A higher value speeds" |
#define T21 " up certain methods considerably while needing more storage space." |
#define T24 "\nFor more information please consult the manual." |
#define TRUE 1 |
Definition at line 134 of file vinci.h.
Referenced by CImg< uintT >::_load_jpeg(), CImg< uintT >::_save_jpeg(), Mesh::addCohesive(), Face::containsNode(), FaceList::empty(), ElementList::empty(), NodeList::empty(), FaceListList::empty(), IntList::empty(), Node::getSeparateElements(), Element::isCohesive(), Face::isExterior(), lass(), FaceList::move_to(), ElementList::move_to(), NodeList::move_to(), FaceListList::move_to(), IntList::move_to(), my_malloc(), notInPivot(), MVec::operator==(), operator>>(), Node::separate(), and tree_out().
typedef struct T_VertexSet T_VertexSet |
typedef struct T_VertexSuperset T_VertexSuperset |
void add_element | ( | T_VertexSet * | s, |
T_Vertex * | e | ||
) |
Definition at line 168 of file vinci_lass.c.
Referenced by lass().
rational add_orthonormal_householder | ( | int | d, |
T_VertexSet | face, | ||
rational ** | H, | ||
T_Vertex * | vertex | ||
) |
rational add_orthonormal_schmidt | ( | int | d, |
T_VertexSet | face, | ||
rational ** | B, | ||
T_Vertex * | vertex | ||
) |
void add_superelement | ( | T_VertexSuperset ** | S, |
T_VertexSet | s | ||
) |
boolean are_equal_sets | ( | T_VertexSet | s1, |
T_VertexSet | s2 | ||
) |
rational*** create_basis | ( | ) |
T_VertexSet create_empty_set | ( | void | ) |
T_VertexSuperset* create_empty_superset | ( | void | ) |
T_VertexSet* create_faces | ( | ) |
rational* create_fact | ( | ) |
void create_hyperplanes | ( | ) |
void create_incidence | ( | ) |
int* create_int_vector | ( | int | n | ) |
void create_key | ( | T_Key * | key, |
int | key_choice | ||
) |
Definition at line 131 of file vinci_lass.c.
Referenced by tree_out(), and VOLUME_LASSERRE_FILE().
rational** create_matrix | ( | int | m, |
int | n | ||
) |
rational* create_vector | ( | ) |
T_Vertex* create_vertex | ( | ) |
boolean delete_element | ( | T_VertexSet * | s, |
T_Vertex * | e | ||
) |
Definition at line 204 of file vinci_lass.c.
Referenced by lass().
T_VertexSet* do_intersections | ( | int | precomp, |
int | i1, | ||
int | i2, | ||
int | i3, | ||
int | action | ||
) |
T_VertexSet duplicate_set | ( | T_VertexSet | s | ) |
Definition at line 1028 of file vinci_lass.c.
Referenced by tree_out().
boolean empty | ( | T_VertexSet | s | ) |
Referenced by broadcast_win_attributes(), datafile::get_index_order(), Mesh::MeshUtilityObject::GetCon(), ComSwitch::getFieldMappings(), ComSwitch::getIndexOrder(), In_place_list_n< T, managed >::sort(), Overlay::sort_on_green_edges(), and Rocout::write_rocin_control_file().
rational factorial | ( | int | n | ) |
void free_basis | ( | rational *** | basis | ) |
void free_faces | ( | T_VertexSet * | face | ) |
void free_fact | ( | rational * | fact | ) |
void free_hyperplanes | ( | ) |
void free_incidence | ( | ) |
void free_int_vector | ( | int * | v, |
int | n | ||
) |
Definition at line 248 of file vinci_lass.c.
Referenced by free_key().
void free_key | ( | T_Key | key, |
int | key_choice | ||
) |
Definition at line 151 of file vinci_lass.c.
Referenced by VOLUME_LASSERRE_FILE().
void free_matrix | ( | rational ** | A, |
int | m, | ||
int | n | ||
) |
void free_superset | ( | T_VertexSuperset ** | S | ) |
void free_vector | ( | rational * | v | ) |
void free_vertex | ( | T_Vertex * | v | ) |
Referenced by QualityMetric::compute_element_numerical_hessian().
void intersect | ( | T_VertexSet | s1, |
T_VertexSet | s2, | ||
T_VertexSet * | inter | ||
) |
boolean is_contained | ( | T_VertexSet | s1, |
T_VertexSet | s2 | ||
) |
boolean is_in_set | ( | T_Vertex * | e, |
T_VertexSet | s | ||
) |
boolean is_in_superset | ( | T_VertexSet | s, |
T_VertexSuperset * | S | ||
) |
void my_free | ( | void * | pointer, |
long int | size | ||
) |
Definition at line 121 of file vinci_lass.c.
Referenced by free_int_vector(), free_key(), and lass().
void* my_malloc | ( | long int | size | ) |
Definition at line 90 of file vinci_lass.c.
Referenced by compact(), create_int_vector(), create_key(), duplicate_set(), lass(), my_malloc(), tree_out(), and VOLUME_LASSERRE_FILE().
void* my_realloc | ( | void * | pointer, |
long int | new_size, | ||
long int | size_diff | ||
) |
rational normalise_vertices | ( | ) |
rational orthonormal_householder | ( | int | d, |
T_VertexSet | face, | ||
rational ** | H | ||
) |
rational orthonormal_schmidt | ( | int | d, |
T_VertexSet | face, | ||
rational ** | B | ||
) |
void print_set | ( | FILE * | f, |
T_VertexSet | s | ||
) |
void print_superset | ( | FILE * | f, |
T_VertexSuperset * | S | ||
) |
void redim_matrix | ( | rational *** | A, |
int | m_alt, | ||
int | m_neu, | ||
int | n | ||
) |
void simplex_volume | ( | T_VertexSet | S, |
rational * | volume, | ||
boolean | verbose | ||
) |
void tree_out | ( | T_Tree ** | ppr, |
int * | pi_balance, | ||
T_Key | key, | ||
rational ** | volume, | ||
T_Key ** | keyfound, | ||
int | key_choice | ||
) |
Definition at line 870 of file vinci_lass.c.
Referenced by lass(), and tree_out().
void volume_cdd_file | ( | rational * | volume, |
int | direction, | ||
char | vertexfile[255] | ||
) |
void volume_ch_file | ( | rational * | volume, |
char | vertexfile[255], | ||
char | incidencefile[255] | ||
) |
void volume_lasserre_file | ( | double | planes2[7][4], |
rational * | volume | ||
) |
Definition at line 800 of file vinci_lass.c.
Referenced by volratio().
void volume_lawrence_file | ( | rational * | volume, |
char | vertexfile[255], | ||
char | planesfile[255], | ||
char | incidencefile[255] | ||
) |
void volume_lawrence_lrs_file | ( | rational * | volume, |
char | planesfile[255] | ||
) |
void volume_lrs_file | ( | rational * | volume, |
char * | rational_volume, | ||
char | vertexfile[255] | ||
) |
void volume_ortho_file | ( | rational * | volume, |
char | vertexfile[255], | ||
char | incidencefile[255], | ||
int | key_choice, | ||
int | ortho_choice | ||
) |
void volume_qhull_file | ( | rational * | volume, |
char | vertexfile[255] | ||
) |
int G_d |
Definition at line 50 of file 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 |
Definition at line 53 of file vinci_lass.c.
Referenced by compact(), and VOLUME_LASSERRE_FILE().
T_VertexSet* G_Incidence |
Definition at line 54 of file vinci_lass.c.
int G_m |
Definition at line 51 of file 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 |
Definition at line 62 of file vinci_lass.c.
Referenced by lass(), my_malloc(), and VOLUME_LASSERRE_FILE().
rational G_Minus1 |
Definition at line 63 of file vinci_lass.c.
Referenced by tree_out().
boolean G_OutOfMem |
Definition at line 61 of file vinci_lass.c.
Referenced by lass(), my_malloc(), tree_out(), and VOLUME_LASSERRE_FILE().
int G_Precomp |
Definition at line 57 of file vinci_lass.c.
int G_RandomSeed |
Definition at line 59 of file vinci_lass.c.
int G_Storage |
Definition at line 58 of file 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 vinci_lass.c.
long int Stat_ActualMem |
real Stat_Biggest |
unsigned int Stat_Count |
unsigned int Stat_CountNeg[STAT_BIGGEST_EXP-STAT_SMALLEST_EXP+3] |
unsigned int Stat_CountPos[STAT_BIGGEST_EXP-STAT_SMALLEST_EXP+3] |
unsigned int * Stat_CountRetrieved |
unsigned int Stat_CountShifts |
unsigned int* Stat_CountStored |
long int Stat_MaxMem |
real Stat_Smallest |