Macaulay2 Engine
Loading...
Searching...
No Matches
exptable.h
Go to the documentation of this file.
1#ifndef __exptable_h_
2#define __exptable_h_
3
30
31/* Implementation of a hashtable [exponent vectors, of fixed length] --> unsigned long int. */
32/* The implementation uses table.{h,c}, which was written by David R. Hanson */
33
34typedef int * exponent;
35typedef struct exponent_table exponent_table;
36
37#if defined(__cplusplus)
38extern "C" {
39#endif
40
42 int nvars);
43
45
47
48long exponent_table_put(exponent_table *E, const exponent expon, long value);
49/* Puts the element 'expon => value' into the table, and if an element is
50 already there, its value is returned, otherwise 0 is returned.
51 Thus, it is a good idea to not insert zero values into the table */
52
53long exponent_table_get(exponent_table *E, const exponent expon);
54/* Returns the value associated to 'expon', returning zero, if 'expon'
55 is not in the table */
56
58
59#if defined(__cplusplus)
60}
61#endif
62#endif
63
64/*
65// Local Variables:
66// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
67// indent-tabs-mode: nil
68// End:
69*/
void exponent_table_free(exponent_table **E)
Definition exptable.c:55
const void ** exponent_table_to_array(exponent_table *E)
Definition exptable.c:79
exponent_table * exponent_table_new(int hint, int nvars)
Definition exptable.c:45
int * exponent
Definition exptable.h:34
long exponent_table_put(exponent_table *E, const exponent expon, long value)
Definition exptable.c:62
int exponent_table_length(exponent_table *E)
Definition exptable.c:54
long exponent_table_get(exponent_table *E, const exponent expon)
Definition exptable.c:71