#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <polylib/polylib.h>
Go to the source code of this file.
Functions | |
Matrix * | Matrix_Alloc (unsigned NbRows, unsigned NbColumns) |
void | Matrix_Free (Matrix *Mat) |
void | Matrix_Extend (Matrix *Mat, unsigned NbRows) |
void | Matrix_Print (FILE *Dst, const char *Format, Matrix *Mat) |
void | Matrix_Read_Input (Matrix *Mat) |
Matrix * | Matrix_Read (void) |
static int | hermite (Matrix *H, Matrix *U, Matrix *Q) |
void | right_hermite (Matrix *A, Matrix **Hp, Matrix **Up, Matrix **Qp) |
void | left_hermite (Matrix *A, Matrix **Hp, Matrix **Qp, Matrix **Up) |
int | MatInverse (Matrix *Mat, Matrix *MatInv) |
void | rat_prodmat (Matrix *S, Matrix *X, Matrix *P) |
void | Matrix_Vector_Product (Matrix *Mat, Value *p1, Value *p2) |
void | Vector_Matrix_Product (Value *p1, Matrix *Mat, Value *p2) |
void | Matrix_Product (Matrix *Mat1, Matrix *Mat2, Matrix *Mat3) |
int | Matrix_Inverse (Matrix *Mat, Matrix *MatInv) |
Definition at line 228 of file matrix.c.
References errormsg1(), Matrix_Print(), matrix::NbColumns, matrix::NbRows, nr, matrix::p, value_absolute, value_addmul, value_assign, value_clear, value_decrement, value_division, value_init, value_lt, value_modulus, value_multiply, value_neg_p, value_notzero_p, value_oppose, value_subtract, value_zero_p, and Vector_Exchange().
Referenced by left_hermite(), and right_hermite().
Definition at line 505 of file matrix.c.
References errormsg1(), hermite(), Matrix_Alloc(), Matrix_Free(), matrix::NbColumns, matrix::NbRows, nr, matrix::p, matrix::p_Init, value_assign, value_clear, value_init, value_set_si, and Vector_Set().
Referenced by Equalities_integerSolution(), Equalities_validityLattice(), int_ker(), Lattice_extractSubLattice(), linearInter(), and main().
Definition at line 591 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, value_assign, value_clear, value_divexact, value_gcd, value_init, value_multiply, value_notone_p, value_notzero_p, value_set_si, value_subtract, value_zero_p, Vector_Gcd(), Vector_Normalize_Positive(), and Vector_Set().
Referenced by Equalities_integerSolution(), mtransformation_inverse(), test_Constraints_fullDimensionize(), and traite_m_face().
Matrix* Matrix_Alloc | ( | unsigned | NbRows, | |
unsigned | NbColumns | |||
) |
Definition at line 45 of file matrix.c.
References errormsg1(), matrix::NbColumns, matrix::NbRows, matrix::p, p, matrix::p_Init, matrix::p_Init_size, and value_alloc().
Referenced by AddANullColumn(), AddANullRow(), AddConstraints(), AddRays(), AddZPolytoZDomain(), affine_periods(), AffineSmith(), CalcBase(), CanonicalForm(), ChangeLatticeDimension(), ComputeNPLinesRays(), Constraints2Polyhedron(), Constraints_fullDimensionize(), Constraints_permute(), Constraints_Remove_parm_eqs(), Constraints_removeElimCols(), ConvertDarMattoPolMat(), dehomogenize_polyhedron(), DomainSimplify(), Elim_Columns(), eliminable_vars(), EmptyLattice(), Enumeration_zero(), Equalities_integerSolution(), Equalities_intModBasis(), ExtractLinearPart(), Find_m_faces(), findHermiteBasis(), FindHermiteBasisofDomain(), FindSimple(), full_dimensionize(), GenParamPolyhedron(), Identity(), Identity_Matrix(), int_ker(), Lattice2LatticeUnion(), Lattice_extractSubLattice(), LatticeImage(), LatticeIntersection(), LatticePreimage(), left_hermite(), LexSmaller(), linearInter(), main(), MakeDioEqforInter(), Matrix_Copy(), Matrix_Read(), Matrix_subMatrix(), mpolyhedron_compress_last_vars(), mpolyhedron_permute(), mtransformation_inverse(), mtransformation_permute(), old_Polyhedron_Preprocess(), Orthogonal_Base(), P_Enum(), Param_Polyhedron_Scale_Integer(), Polyhedron2Constraints(), Polyhedron2Rays(), Polyhedron_Image(), Polyhedron_Image_Enumerate(), Polyhedron_Preimage(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Polyhedron_Scan(), PolyhedronLTQ(), PreElim_Columns(), Rays2Polyhedron(), RearrangeMatforSolveDio(), Recession_Cone(), RemoveColumn(), RemoveNColumns(), RemoveRow(), right_hermite(), SimplifyConstraints(), SimplifyEqualities(), SolveDiophantine(), split_constraints(), Stras_DomainSimplify(), SubConstraint(), test_Constraints_fullDimensionize(), traite_m_face(), Transpose(), Union_Read(), valuesWithoutElim(), and VertexCT().
void Matrix_Extend | ( | Matrix * | Mat, | |
unsigned | NbRows | |||
) |
Definition at line 103 of file matrix.c.
References errormsg1(), matrix::NbColumns, matrix::NbRows, matrix::p, p, matrix::p_Init, matrix::p_Init_size, value_init, and Vector_Set().
Referenced by Chernikova().
void Matrix_Free | ( | Matrix * | Mat | ) |
Definition at line 92 of file matrix.c.
References matrix::p, matrix::p_Init, matrix::p_Init_size, and value_free().
Referenced by AddConstraints(), AddLattice(), AddRays(), AddZPolytoZDomain(), AffineHermite(), AffineSmith(), CanonicalForm(), Constraints2Polyhedron(), Constraints_fullDimensionize(), Constraints_Remove_parm_eqs(), dehomogenize_polyhedron(), DomainSimplify(), Ehrhart_Quick_Apx(), Elim_Columns(), eliminable_vars(), EmptyZPolyhedron(), Enumeration_zero(), Equalities_integerSolution(), Equalities_intModBasis(), Equalities_validityLattice(), Find_m_faces(), findHermiteBasis(), FindHermiteBasisofDomain(), FindSimple(), full_dimensionize(), Hermite(), homogenize(), int_ker(), IntegraliseLattice(), isfulldim(), isinHnf(), Lattice2LatticeUnion(), Lattice_extractSubLattice(), LatticeDifference(), LatticeImage(), LatticeIncludes(), LatticeIntersection(), LatticePreimage(), LatticeUnion_Free(), left_hermite(), LexSmaller(), linearInter(), main(), mpolyhedron_compress_last_vars(), mtransformation_inverse(), old_Polyhedron_Preprocess(), P_Enum(), Param_Polyhedron_Free(), Param_Polyhedron_Scale_Integer(), Param_Vertices_Free(), Polyhedron_Enumerate(), Polyhedron_Image(), Polyhedron_Image_Enumerate(), Polyhedron_Preimage(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Polyhedron_Remove_parm_eqs(), Polyhedron_Scan(), PolyhedronLTQ(), Rays2Polyhedron(), RearrangeMatforSolveDio(), Recession_Cone(), sameLattice(), Scan_Vertices(), Simplify(), SimplifyConstraints(), SimplifyEqualities(), Smith(), SolveDiophantine(), SplitZpolyhedron(), Stras_DomainSimplify(), SubConstraint(), test_Constraints_fullDimensionize(), test_Constraints_Remove_parm_eqs(), test_Polyhedron_Remove_parm_eqs(), Union_Read(), ZPolyhedron_Free(), ZPolyhedronDifference(), ZPolyhedronImage(), ZPolyhedronIntersection(), and ZPolyhedronPreimage().
Definition at line 889 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, value_assign, value_clear, value_divexact, value_division, value_gcd, value_init, value_multiply, value_neg_p, value_notone_p, value_notzero_p, value_oppose, value_set_si, value_subtract, value_zero_p, Vector_Gcd(), and Vector_Set().
Referenced by AffineSmith(), CanonicalForm(), FindHermiteBasisofDomain(), Lattice2LatticeUnion(), LatticeImage(), Polyhedron_Image(), and SolveDiophantine().
void Matrix_Print | ( | FILE * | Dst, | |
const char * | Format, | |||
Matrix * | Mat | |||
) |
Definition at line 138 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, p, P_VALUE_FMT, and value_print.
Referenced by Chernikova(), ComputeNPLinesRays(), Constraints2Polyhedron(), Elim_Columns(), Find_m_faces(), Gauss(), hermite(), main(), P_Enum(), Polyhedron_Image_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), PolyhedronLTQ(), PreElim_Columns(), PrintLatticeUnion(), Rays2Polyhedron(), Remove_Redundants(), scan_m_face(), traite_m_face(), and ZPolyhedronPrint().
Definition at line 845 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, matrix::p_Init, value_addmul, value_assign, value_clear, value_init, and value_set_si.
Referenced by AddZPolytoZDomain(), CanonicalForm(), Equalities_integerSolution(), FindHermiteBasisofDomain(), Lattice2LatticeUnion(), LatticeImage(), and main().
Matrix* Matrix_Read | ( | void | ) |
Definition at line 203 of file matrix.c.
References errormsg1(), Matrix_Alloc(), Matrix_Read_Input(), and s.
Referenced by main(), and Union_Read().
void Matrix_Read_Input | ( | Matrix * | Mat | ) |
Definition at line 166 of file matrix.c.
References errormsg1(), n, matrix::NbColumns, matrix::NbRows, p, matrix::p_Init, s, and value_read.
Referenced by Matrix_Read(), and Union_Read().
void Matrix_Vector_Product | ( | Matrix * | Mat, | |
Value * | p1, | |||
Value * | p2 | |||
) |
Definition at line 785 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, value_addmul, and value_multiply.
Definition at line 719 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, value_addmul, value_assign, value_clear, value_divexact, value_division, value_gcd, value_init, value_multiply, value_one_p, value_set_si, and Vector_Normalize_Positive().
Referenced by traite_m_face().
Definition at line 435 of file matrix.c.
References errormsg1(), hermite(), Matrix_Alloc(), matrix::NbColumns, matrix::NbRows, nr, matrix::p, matrix::p_Init, value_assign, value_clear, value_init, value_set_si, Vector_Copy(), and Vector_Set().
Referenced by eliminable_vars(), int_ker(), and main().
void Vector_Matrix_Product | ( | Value * | p1, | |
Matrix * | Mat, | |||
Value * | p2 | |||
) |
Definition at line 817 of file matrix.c.
References matrix::NbColumns, matrix::NbRows, matrix::p, value_addmul, and value_multiply.