configure.ac: extract out AX_CHECK_NTL
[barvinok.git] / zsolve / vectorarray.h
blobd0f4d1f9a0c431185b5fb54a999f10841c4bb5a3
1 /*
2 4ti2 -- A software package for algebraic, geometric and combinatorial
3 problems on linear spaces.
5 Copyright (C) 2006 4ti2 team.
6 Main author(s): Matthias Walter.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _VECTORARRAY_H
24 #define _VECTORARRAY_H
26 #include <stdio.h>
27 #include "defs.h"
28 #include "vector.h"
29 #include "varproperties.h"
31 typedef struct vectorarray_t
33 int Variables;
34 int Size;
35 int Memory;
37 VariableProperties Properties;
38 Vector *Data;
39 } vectorarray_t;
40 typedef vectorarray_t *VectorArray;
42 VectorArray createVectorArray(int);
43 /* Allocate memory for an empty array (variables) */
45 void deleteVectorArray(VectorArray);
46 /* Free memory and all vectors (array) */
48 void fprintVectorArray(FILE *, VectorArray, bool);
49 /* Print to stream with or without header (stream, array, header) */
51 void printVectorArray(VectorArray, bool);
52 /* Print to stdout with or without header (stream, array, header) */
54 void appendToVectorArray(VectorArray, Vector);
55 /* Append a vector (array, vector) */
57 void swapVectorArrayRows(VectorArray, int, int);
58 /* Swap two vectors */
60 void swapVectorArrayColumns(VectorArray, int, int);
61 /* Swap two columns completely */
63 void appendVectorArrayNegatives(VectorArray);
64 /* append all negative vectors, too */
66 typedef int (*ColumnCompare)(int, int);
68 void sortVectorArrayColumns(VectorArray, ColumnCompare);
69 /* sort columns by order in Properties */
71 VectorArray readVectorArray(FILE *, bool);
72 /* read vectorarray from a stream, optionally with header (stream, header?) */
74 #endif