Loading...
Searching...
No Matches
htable.h
Go to the documentation of this file.
#ifndef HTABLE_H
#define HTABLE_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
#include "kernel/mod2.h"
#include "Singular/subexpr.h"
struct stelem;
typedef struct stelem * telem;
struct stelem
{
telem next;
char* key;
sleftv val;
uint32_t hash;
};
struct stablerec
{
telem *t;
int max;
int ref;
};
#define TABLE_MAX 1000
stablerec* t_createTable(int s);
void t_destroyTable(stablerec* t);
stablerec* copyTable(stablerec* t);
char* stringTable(stablerec* t);
void htable_Print(stablerec *d);
/// find the entry to key s
telem t_findTable(stablerec* t,const char *s);
/// find the data to key s
leftv t_findTabelVal(stablerec* t,const char *s);
/// add a new entry (key s, data v) to table t
void t_addTable(stablerec* t,char *s, leftv v);
#endif
sleftv
Class used for (list of) interpreter objects.
Definition subexpr.h:83
s
const CanonicalForm int s
Definition facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
t_destroyTable
void t_destroyTable(stablerec *t)
Definition htable.cc:20
stringTable
char * stringTable(stablerec *t)
Definition htable.cc:48
t_createTable
stablerec * t_createTable(int s)
Definition htable.cc:11
htable_Print
void htable_Print(stablerec *d)
Definition htable.cc:108
t_findTabelVal
leftv t_findTabelVal(stablerec *t, const char *s)
find the data to key s
Definition htable.cc:85
stablerec::t
telem * t
Definition htable.h:24
stelem::key
char * key
Definition htable.h:17
stelem::hash
uint32_t hash
Definition htable.h:19
t_addTable
void t_addTable(stablerec *t, char *s, leftv v)
add a new entry (key s, data v) to table t
Definition htable.cc:93
t_findTable
telem t_findTable(stablerec *t, const char *s)
find the entry to key s
Definition htable.cc:71
stelem::next
telem next
Definition htable.h:16
stablerec::max
int max
Definition htable.h:25
stablerec::ref
int ref
Definition htable.h:26
copyTable
stablerec * copyTable(stablerec *t)
Definition htable.cc:42
stelem::val
sleftv val
Definition htable.h:18
stablerec
Definition htable.h:23
stelem
Definition htable.h:15
mod2.h
leftv
sleftv * leftv
Definition structs.h:53
subexpr.h