polylib 5.22.8
matrix.c File Reference
#include <ctype.h>
#include <polylib/polylib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

MatrixMatrix_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)
 
MatrixMatrix_Read_Input (Matrix *Mat)
 
MatrixMatrix_Read_InputFile (Matrix *Mat, FILE *fp)
 
MatrixMatrix_Read (void)
 
MatrixMatrix_ReadFile (FILE *fp)
 
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)
 

Function Documentation

◆ hermite()

◆ left_hermite()

◆ MatInverse()

◆ Matrix_Alloc()

Matrix * Matrix_Alloc ( unsigned  NbRows,
unsigned  NbColumns 
)

Definition at line 24 of file matrix.c.

References errormsg1(), matrix::NbColumns, matrix::NbRows, matrix::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_ReadFile(), 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().

◆ Matrix_Extend()

void Matrix_Extend ( Matrix Mat,
unsigned  NbRows 
)

◆ Matrix_Free()

void Matrix_Free ( Matrix Mat)

Definition at line 71 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(), Matrix_ReadFile(), 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().

◆ Matrix_Inverse()

◆ Matrix_Print()

◆ Matrix_Product()

◆ Matrix_Read()

Matrix * Matrix_Read ( void  )

Definition at line 209 of file matrix.c.

References Matrix_ReadFile().

Referenced by main(), and Union_Read().

◆ Matrix_Read_Input()

Matrix * Matrix_Read_Input ( Matrix Mat)

Definition at line 141 of file matrix.c.

References Matrix_Read_InputFile().

Referenced by Matrix_ReadFile(), and Union_Read().

◆ Matrix_Read_InputFile()

Matrix * Matrix_Read_InputFile ( Matrix Mat,
FILE *  fp 
)

Definition at line 148 of file matrix.c.

References errormsg1(), n, matrix::NbColumns, matrix::NbRows, matrix::p_Init, s, and value_read.

Referenced by Matrix_Read_Input().

◆ Matrix_ReadFile()

Matrix * Matrix_ReadFile ( FILE *  fp)

Definition at line 215 of file matrix.c.

References errormsg1(), Matrix_Alloc(), Matrix_Free(), Matrix_Read_Input(), and s.

Referenced by Matrix_Read().

◆ Matrix_Vector_Product()

void Matrix_Vector_Product ( Matrix Mat,
Value *  p1,
Value *  p2 
)

Definition at line 812 of file matrix.c.

References matrix::NbColumns, matrix::NbRows, matrix::p, value_addmul, and value_multiply.

◆ rat_prodmat()

◆ right_hermite()

void right_hermite ( Matrix A,
Matrix **  Hp,
Matrix **  Up,
Matrix **  Qp 
)

◆ Vector_Matrix_Product()

void Vector_Matrix_Product ( Value *  p1,
Matrix Mat,
Value *  p2 
)

Definition at line 844 of file matrix.c.

References matrix::NbColumns, matrix::NbRows, matrix::p, value_addmul, and value_multiply.