compsol.h

Go to the documentation of this file.
00001 /*
00002  * compsol.h: this file is part of the FM project.
00003  *
00004  * FM, a fast and optimized C implementation of Fourier-Motzkin
00005  * projection algorithm.
00006  *
00007  * Copyright (C) 2007,2008 Louis-Noel Pouchet
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public License
00011  * as published by the Free Software Foundation; either version 3
00012  * of the License, or (at your option) any later version.
00013  *
00014  * The complete GNU Lesser General Public Licence Notice can be found
00015  *  as the `COPYING.LESSER' file in the root directory.
00016  *
00017  * Author:
00018  * Louis-Noel Pouchet <Louis-Noel.Pouchet@inria.fr>
00019  *
00020  */
00021 #ifndef FM_COMPSOL_H
00022 # define FM_COMPSOL_H
00023 
00024 # include <stdio.h>
00025 # include <fm/vector.h>
00026 # include <fm/system.h>
00027 # include <fm/solution.h>
00028 # include <fm/solver.h>
00029 
00030 
00031 BEGIN_C_DECLS
00032 
00033 /**
00034  * A compacted solution, composed of a convex polyhedron and a set of
00035  * equalities for linearly dependent variables of the system.
00036  *
00037  *
00038  */
00039 struct s_fm_compsol
00040 {
00041   s_fm_solution_t* redeq;       /// List of equations to build dependent
00042                                 /// variables
00043   s_fm_solution_t* redfree;     /// List of constraints for free variables
00044   s_fm_solution_t* poly;        /// Compacted (convex) polyhedron
00045   unsigned size;                /// Size of the expanded polyhedron
00046   unsigned nb_reduc;            /// Number of equality reduced variables
00047   unsigned nb_free;             /// Number of free variables
00048   unsigned empty;               /// Boolean for emptiness of the polyhedron
00049 };
00050 
00051 typedef struct s_fm_compsol s_fm_compsol_t;
00052 
00053 extern
00054 s_fm_compsol_t*
00055 fm_compsol_alloc (unsigned size);
00056 
00057 extern
00058 s_fm_compsol_t*
00059 fm_compsol_dup (s_fm_compsol_t* s);
00060 
00061 extern
00062 void
00063 fm_compsol_free (s_fm_compsol_t* s);
00064 
00065 extern
00066 s_fm_compsol_t*
00067 fm_compsol_init_sol (s_fm_solution_t* in);
00068 
00069 extern
00070 s_fm_compsol_t*
00071 fm_compsol_init_sol_free (s_fm_solution_t* in, s_fm_solution_t* sfree);
00072 
00073 extern
00074 s_fm_compsol_t*
00075 fm_compsol_init_sys (s_fm_system_t* in);
00076 
00077 extern
00078 void
00079 fm_compsol_add_unique (s_fm_compsol_t* s, s_fm_vector_t* v);
00080 
00081 extern
00082 s_fm_solution_t*
00083 fm_compsol_expand (s_fm_compsol_t* s);
00084 
00085 extern
00086 s_fm_solution_t*
00087 fm_compsol_redundancy_elimination (s_fm_solution_t* s);
00088 
00089 extern
00090 s_fm_system_t*
00091 fm_compsol_redundancy_elimination_sys (s_fm_system_t* s);
00092 
00093 END_C_DECLS
00094 
00095 
00096 #endif // FM_COMPSOL_H

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