Loading...
Searching...
No Matches
LinTree Namespace Reference

## Data Structures

class | LinTree

## Typedefs

typedef void(* | LinTreeEncodeFunc) (LinTree &lintree, leftv val)
typedef leftv(* | LinTreeDecodeFunc) (LinTree &lintree)
typedef void(* | LinTreeRefFunc) (LinTree &lintree, int by)

## Functions

void | install (int typ, LinTreeEncodeFunc enc, LinTreeDecodeFunc dec, LinTreeRefFunc ref)
void | set_needs_ring (int typ)
void | encode (LinTree &lintree, leftv val)
leftv | decode (LinTree &lintree)
void | updateref (LinTree &lintree, int by)
leftv | new_leftv (int code, void *data)
leftv | new_leftv (int code, long data)
void | encode_mpz (LinTree &lintree, const mpz_t num)
void | decode_mpz (LinTree &lintree, mpz_t &num)
void | encode_none (LinTree &lintree, leftv val)
leftv | decode_none (LinTree &lintree)
void | ref_none (LinTree &lintree, int by)
void | encode_int (LinTree &lintree, leftv val)
leftv | decode_int (LinTree &lintree)
void | ref_int (LinTree &lintree, int by)
void | encode_string (LinTree &lintree, leftv val)
leftv | decode_string (LinTree &lintree)
void | ref_string (LinTree &lintree, int by)
void | encode_def (LinTree &lintree, leftv val)
leftv | decode_def (LinTree &lintree)
void | ref_def (LinTree &lintree, int by)
void | encode_longrat_cf (LinTree &lintree, const number n)
number | decode_longrat_cf (LinTree &lintree)
void | encode_number_cf (LinTree &lintree, const number n, const coeffs cf)
number | decode_number_cf (LinTree &lintree, const coeffs cf)
leftv | decode_number (LinTree &lintree)
void | encode_number (LinTree &lintree, leftv val)
void | ref_number_cf (LinTree &lintree, coeffs cf, int by)
void | ref_number (LinTree &lintree, int by)
void | encode_bigint (LinTree &lintree, leftv val)
leftv | decode_bigint (LinTree &lintree)
void | ref_bigint (LinTree &lintree, int by)
leftv | decode_intmat (LinTree &lintree)
void | encode_intmat (LinTree &lintree, leftv val)
void | ref_intmat (LinTree &lintree, int by)
void | encode_poly (LinTree &lintree, int typ, poly p, const ring r)
void | encode_poly (LinTree &lintree, int typ, poly p)
void | encode_poly (LinTree &lintree, leftv val)
poly | decode_poly (LinTree &lintree, const ring r)
leftv | decode_poly (LinTree &lintree)
void | ref_poly (LinTree &lintree, int by)
ideal | decode_ideal (LinTree &lintree, int typ, const ring r)
void | encode_ideal (LinTree &lintree, int typ, const ideal I, const ring R)
void | encode_ideal (LinTree &lintree, int typ, const ideal I)
void | encode_ideal (LinTree &lintree, leftv val)
leftv | decode_ideal (LinTree &lintree)
void | ref_ideal (LinTree &lintree, int by)
void | encode_ring (LinTree &lintree, const ring r)
void | encode_ring (LinTree &lintree, leftv val)
ring | decode_ring_raw (LinTree &lintree)
leftv | decode_ring (LinTree &lintree)
void | ref_ring (LinTree &lintree, int by)
void | encode_list (LinTree &lintree, leftv val)
leftv | decode_list (LinTree &lintree)
void | ref_list (LinTree &lintree, int by)
void | encode_command (LinTree &lintree, leftv val)
leftv | decode_command (LinTree &lintree)
void | ref_command (LinTree &lintree, int by)
void | dump_string (string str)
void | encoding_error (const char *s)
void | decoding_error (const char *s)
std::string | to_string (leftv val)
leftv | from_string (std::string &str)
void | init ()

## Variables

vector< LinTreeEncodeFunc > | encoders
vector< LinTreeDecodeFunc > | decoders
vector< LinTreeRefFunc > | refupdaters
vector< char > | needs_ring

## Typedef Documentation

## LinTreeDecodeFunc

typedef leftv(* LinTree::LinTreeDecodeFunc) (LinTree &lintree)

Definition at line 14 of file lintree.h.

## LinTreeEncodeFunc

typedef void(* LinTree::LinTreeEncodeFunc) (LinTree &lintree, leftv val)

Definition at line 13 of file lintree.h.

## LinTreeRefFunc

typedef void(* LinTree::LinTreeRefFunc) (LinTree &lintree, int by)

Definition at line 15 of file lintree.h.

## Function Documentation

## decode()

leftv LinTree::decode | ( | LinTree & | lintree | ) |

Definition at line 101 of file lintree.cc.

{
ring decode_ring_raw(LinTree &lintree);
int typ = lintree.get_int();
if (typ < 0) {
lintree.set_last_ring(decode_ring_raw(lintree));
typ = lintree.get_int();
}
LinTreeDecodeFunc fn = decoders[typ];
return fn(lintree);
}
LinTree::LinTree::get_int
int get_int()
Definition lintree.h:68
LinTree::LinTree::set_last_ring
void set_last_ring(void *r)
Definition lintree.cc:900
LinTree
Definition lintree.cc:42
LinTree::decode_ring_raw
ring decode_ring_raw(LinTree &lintree)
Definition lintree.cc:597
LinTree::decoders
vector< LinTreeDecodeFunc > decoders
Definition lintree.cc:47
LinTree::LinTreeDecodeFunc
leftv(* LinTreeDecodeFunc)(LinTree &lintree)
Definition lintree.h:14

## decode_bigint()

leftv LinTree::decode_bigint | ( | LinTree & | lintree | ) |

Definition at line 355 of file lintree.cc.

{
return new_leftv(BIGINT_CMD,
decode_number_cf(lintree, coeffs_BIGINT));
}
LinTree::new_leftv
leftv new_leftv(int code, void *data)
Definition lintree.cc:118
LinTree::decode_number_cf
number decode_number_cf(LinTree &lintree, const coeffs cf)
Definition lintree.cc:292
coeffs_BIGINT
VAR coeffs coeffs_BIGINT
Definition polys.cc:14
BIGINT_CMD
@ BIGINT_CMD
Definition tok.h:38

## decode_command()

leftv LinTree::decode_command | ( | LinTree & | lintree | ) |

Definition at line 779 of file lintree.cc.

{
command cmd = (command)omAlloc0(sizeof(*cmd));
int op = lintree.get_int();
int argc = lintree.get_int();
cmd->op = op;
cmd->argc = argc;
if (argc >= 1) {
leftv val = decode(lintree);
memcpy(&cmd->arg1, val, sizeof(*val));
omFreeBin(val, sleftv_bin);
}
if (argc < 4) {
if (argc >= 2) {
leftv val = decode(lintree);
memcpy(&cmd->arg2, val, sizeof(*val));
omFreeBin(val, sleftv_bin);
}
if (argc >= 3) {
leftv val = decode(lintree);
memcpy(&cmd->arg3, val, sizeof(*val));
omFreeBin(val, sleftv_bin);
}
}
leftv result = new_leftv(COMMAND, cmd);
int error = result->Eval();
if (error) {
lintree.mark_error("error in eval");
}
return result;
}
LinTree::LinTree::mark_error
void mark_error(const char *s)
Definition lintree.h:38
result
return result
Definition facAbsBiFact.cc:76
sleftv_bin
EXTERN_VAR omBin sleftv_bin
Definition ipid.h:145
command
ip_command * command
Definition ipid.h:23
error
#define error(a)
Definition mpr_numeric.cc:966
LinTree::decode
leftv decode(LinTree &lintree)
Definition lintree.cc:101
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259
leftv
sleftv * leftv
Definition structs.h:53
COMMAND
#define COMMAND
Definition tok.h:29

## decode_def()

leftv LinTree::decode_def | ( | LinTree & | lintree | ) |

Definition at line 207 of file lintree.cc.

{
size_t len = lintree.get<size_t>();
const char *p = lintree.get_bytes(len);
leftv result = new_leftv(DEF_CMD, (void *)NULL);
char *name = (char *) omAlloc0(len+1);
result->name = name;
result->rtyp = 0;
memcpy(name, p, len);
int error = result->Eval();
if (error) {
lintree.mark_error("error in name lookup");
}
return result;
}
p
int p
Definition cfModGcd.cc:4086
LinTree::LinTree::get
T get()
Definition lintree.h:48
LinTree::LinTree::get_bytes
const char * get_bytes(size_t n)
Definition lintree.h:80
name
char name(const Variable &v)
Definition factory.h:189
NULL
#define NULL
Definition omList.c:12
DEF_CMD
@ DEF_CMD
Definition tok.h:58

## decode_ideal() [1/2]

leftv LinTree::decode_ideal | ( | LinTree & | lintree | ) |

Definition at line 513 of file lintree.cc.

{
ideal I = decode_ideal(lintree, IDEAL_CMD, (ring) lintree.get_last_ring());
return new_leftv(IDEAL_CMD, I);
}
LinTree::LinTree::get_last_ring
void * get_last_ring()
Definition lintree.h:124
IDEAL_CMD
@ IDEAL_CMD
Definition grammar.cc:285
LinTree::decode_ideal
ideal decode_ideal(LinTree &lintree, int typ, const ring r)
Definition lintree.cc:462

## decode_ideal() [2/2]

ideal LinTree::decode_ideal | ( | LinTree & | lintree,
|  | int | typ,
|  | const ring | r )

Definition at line 462 of file lintree.cc.

{
int n = lintree.get_int();
ideal I = idInit(n, 1);
for (int i=0; i<IDELEMS(I); i++)
I->m[i] = decode_poly(lintree, r);
return I;
}
i
int i
Definition cfEzgcd.cc:132
LinTree::decode_poly
poly decode_poly(LinTree &lintree, const ring r)
Definition lintree.cc:420
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition simpleideals.cc:35
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23

## decode_int()

leftv LinTree::decode_int | ( | LinTree & | lintree | ) |

Definition at line 166 of file lintree.cc.

{
long data = lintree.get<long>();
return new_leftv(INT_CMD, data);
}
INT_CMD
@ INT_CMD
Definition tok.h:96

## decode_intmat()

leftv LinTree::decode_intmat | ( | LinTree & | lintree | ) |

Definition at line 366 of file lintree.cc.

{
int rows = lintree.get_int();
int cols = lintree.get_int();
int len = rows * cols;
intvec *v = new intvec(rows, cols, 0);
for (int i = 0; i < len; i++) {
(*v)[i] = lintree.get_int();
}
return new_leftv(INTMAT_CMD, v);
}
intvec
Definition intvec.h:24
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
INTMAT_CMD
@ INTMAT_CMD
Definition grammar.cc:280

## decode_list()

leftv LinTree::decode_list | ( | LinTree & | lintree | ) |

Definition at line 744 of file lintree.cc.

{
int n = lintree.get_int();
lists l = (lists)omAlloc(sizeof(*l));
l->Init(n+1);
for (int i=0; i<=n; i++) {
leftv val = decode(lintree);
memcpy(&l->m[i], val, sizeof(*val));
omFreeBin(val, sleftv_bin);
}
return new_leftv(LIST_CMD, l);
}
l
int l
Definition cfEzgcd.cc:100
lists
slists * lists
Definition mpr_numeric.h:146
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
LIST_CMD
@ LIST_CMD
Definition tok.h:118

## decode_longrat_cf()

number LinTree::decode_longrat_cf | ( | LinTree & | lintree | ) |

Definition at line 246 of file lintree.cc.

{
number result;
int subtype = lintree.get_int();
if (subtype < 0)
result = INT_TO_SR(lintree.get<long>());
else if (subtype < 2) {
result = nlRInit(0);
mpz_init(result->n);
decode_mpz(lintree, result->z);
decode_mpz(lintree, result->n);
result->s = subtype;
} else {
result = nlRInit(0);
decode_mpz(lintree, result->z);
result->s = subtype;
}
return result;
}
nlRInit
number nlRInit(long i)
Definition longrat.cc:2501
INT_TO_SR
#define INT_TO_SR(INT)
Definition longrat.h:68
LinTree::decode_mpz
void decode_mpz(LinTree &lintree, mpz_t &num)
Definition lintree.cc:140

## decode_mpz()

void LinTree::decode_mpz | ( | LinTree & | lintree,
|  | mpz_t & | num )

Definition at line 140 of file lintree.cc.

{
size_t nbytes = lintree.get<size_t>();
const char *p = lintree.get_bytes(nbytes);
mpz_import(num, nbytes, 1, 1, 0, 0, p);
}
num
CanonicalForm num(const CanonicalForm &f)
Definition canonicalform.h:337

## decode_none()

leftv LinTree::decode_none | ( | LinTree & | lintree | ) |

Definition at line 151 of file lintree.cc.

{
return new_leftv(NONE, 0L);
}
NONE
#define NONE
Definition tok.h:223

## decode_number()

leftv LinTree::decode_number | ( | LinTree & | lintree | ) |

Definition at line 315 of file lintree.cc.

{
return new_leftv(NUMBER_CMD,
decode_number_cf(lintree, ((ring)lintree.get_last_ring())->cf));
}
NUMBER_CMD
@ NUMBER_CMD
Definition grammar.cc:289

## decode_number_cf()

number LinTree::decode_number_cf | ( | LinTree & | lintree,
|  | const coeffs | cf )

Definition at line 292 of file lintree.cc.

{
poly decode_poly(LinTree &lintree, const ring r);
n_coeffType ct = getCoeffType(cf);
switch (ct) {
case n_transExt:
{
fraction f= (fraction) n_Init(1, cf);
NUM(f) = decode_poly(lintree, cf->extRing);
DEN(f) = decode_poly(lintree, cf->extRing);
return (number) f;
}
case n_algExt:
return (number) decode_poly(lintree, cf->extRing);
case n_Zp:
return (number) (lintree.get<long>());
case n_Q:
return decode_longrat_cf(lintree);
default:
lintree.mark_error("coefficient type not supported");
return NULL;
}
}
cf
CanonicalForm cf
Definition cfModGcd.cc:4091
f
FILE * f
Definition checklibs.c:9
n_coeffType
n_coeffType
Definition coeffs.h:27
n_Q
@ n_Q
rational (GMP) numbers
Definition coeffs.h:30
n_algExt
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
Definition coeffs.h:35
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
n_transExt
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition coeffs.h:38
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition coeffs.h:431
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:541
LinTree::decode_longrat_cf
number decode_longrat_cf(LinTree &lintree)
Definition lintree.cc:246
NUM
#define NUM
Definition readcf.cc:180

## decode_poly() [1/2]

leftv LinTree::decode_poly | ( | LinTree & | lintree | ) |

Definition at line 445 of file lintree.cc.

{
ring r = (ring) lintree.get_last_ring();
return new_leftv(POLY_CMD, decode_poly(lintree, r));
}
POLY_CMD
@ POLY_CMD
Definition grammar.cc:290

## decode_poly() [2/2]

poly LinTree::decode_poly | ( | LinTree & | lintree,
|  | const ring | r )

Definition at line 420 of file lintree.cc.

{
int len = lintree.get_int();
poly p;
poly ret = NULL;
poly prev = NULL;
for (int l = 0; l < len; l++) {
p = p_Init(r);
pSetCoeff0(p, decode_number_cf(lintree, r->cf));
int d;
d = lintree.get_int();
p_SetComp(p, d, r);
for(int i=1;i<=rVar(r);i++)
{
d=lintree.get_int();
p_SetExp(p,i,d,r);
}
p_Setm(p,r);
p_Test(p,r);
if (ret==NULL) ret=p;
else pNext(prev)=p;
prev=p;
}
return ret;
}
pNext
#define pNext(p)
Definition monomials.h:36
pSetCoeff0
#define pSetCoeff0(p, n)
Definition monomials.h:59
p_SetExp
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
Definition p_polys.h:490
p_SetComp
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition p_polys.h:249
p_Setm
static void p_Setm(poly p, const ring r)
Definition p_polys.h:235
p_Init
static poly p_Init(const ring r, omBin bin)
Definition p_polys.h:1341
p_Test
#define p_Test(p, r)
Definition p_polys.h:161
rVar
static short rVar(const ring r)
define rVar(r) (r->N)
Definition ring.h:598

## decode_ring()

leftv LinTree::decode_ring | ( | LinTree & | lintree | ) |

Definition at line 693 of file lintree.cc.

{
return new_leftv(RING_CMD, decode_ring_raw(lintree));
}
RING_CMD
@ RING_CMD
Definition grammar.cc:282

## decode_ring_raw()

ring LinTree::decode_ring_raw | ( | LinTree & | lintree | ) |

Definition at line 597 of file lintree.cc.

{
int ch = lintree.get_int();
int N = lintree.get_int();
coeffs cf = NULL;
char **names = NULL;
switch (ch) {
case -1:
case -2:
case -3:
{
const char *cf_name = lintree.get_cstring();
cf = nFindCoeffByName((char *)cf_name);
if (cf == NULL) {
lintree.mark_error("cannot find coeffient name");
return NULL;
}
}
break;
case -4:
return NULL;
break;
case -5:
return (ring) lintree.get_last_ring();
break;
}
if (N != 0) {
names = (char **)omAlloc(N*sizeof(char *));
for (int i=0; i<N; i++)
names[i] = omStrDup(lintree.get_cstring());
}
int num_ord;
num_ord = lintree.get_int();
rRingOrder_t *ord =
(rRingOrder_t *)omAlloc0((num_ord + 1)*sizeof(rRingOrder_t));
int *block0 = (int *)omAlloc0((num_ord + 1)*sizeof(int));
int *block1 = (int *)omAlloc0((num_ord + 1)*sizeof(int));
int **wvhdl = (int **)omAlloc0((num_ord + 1)*sizeof(int*));
for (int i=0; i<num_ord; i++)
{
ord[i] = (rRingOrder_t) lintree.get_int();
block0[i] = lintree.get_int();
block1[i] = lintree.get_int();
switch (ord[i]) {
case ringorder_a:
case ringorder_wp:
case ringorder_Wp:
case ringorder_ws:
case ringorder_Ws:
case ringorder_aa:
wvhdl[i] = (int *)omAlloc((block1[i]-block0[i]+1)*sizeof(int));
for (int j=block0[i]; j<=block1[i]; j++)
wvhdl[i][j-block0[i]] = lintree.get_int();
break;
case ringorder_a64:
case ringorder_M:
case ringorder_L:
case ringorder_IS:
lintree.mark_error("ring oder not implemented for lintrees");
break;
default:
break;
}
}
if (N == 0) {
omFree(ord);
omFree(block0);
omFree(block1);
omFree(wvhdl);
return NULL;
} else {
ring r = NULL;
if (ch >= 0)
r = rDefault(ch, N, names, num_ord, ord, block0, block1, wvhdl);
else if (ch == -1) {
TransExtInfo T;
T.r = decode_ring_raw(lintree);
if (T.r == NULL) return NULL;
cf = nInitChar(n_transExt, &T);
r = rDefault(cf, N, names, num_ord, ord, block0, block1, wvhdl);
} else if (ch == -2) {
TransExtInfo T;
T.r = decode_ring_raw(lintree);
if (T.r == NULL) return NULL;
cf = nInitChar(n_algExt, &T);
r = rDefault(cf, N, names, num_ord, ord, block0, block1, wvhdl);
} else if (ch == -3) {
r = rDefault(cf, N, names, num_ord, ord, block0, block1, wvhdl);
}
lintree.set_last_ring(r);
if (lintree.get_int()) {
r->qideal = decode_ideal(lintree, IDEAL_CMD, r);
}
return r;
}
}
N
const CanonicalForm CFMap CFMap & N
Definition cfEzgcd.cc:56
LinTree::LinTree::get_cstring
const char * get_cstring()
Definition lintree.h:104
nInitChar
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:412
j
int j
Definition facHensel.cc:110
T
STATIC_VAR jList * T
Definition janet.cc:30
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
nFindCoeffByName
coeffs nFindCoeffByName(char *cf_name)
find an existing coeff by its "CoeffName"
Definition numbers.cc:640
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
rDefault
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
Definition ring.cc:103
rRingOrder_t
rRingOrder_t
order stuff
Definition ring.h:69
ringorder_a
@ ringorder_a
Definition ring.h:71
ringorder_a64
@ ringorder_a64
for int64 weights
Definition ring.h:72
ringorder_L
@ ringorder_L
Definition ring.h:91
ringorder_aa
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
Definition ring.h:93
ringorder_Wp
@ ringorder_Wp
Definition ring.h:83
ringorder_ws
@ ringorder_ws
Definition ring.h:88
ringorder_Ws
@ ringorder_Ws
Definition ring.h:89
ringorder_IS
@ ringorder_IS
Induced (Schreyer) ordering.
Definition ring.h:95
ringorder_wp
@ ringorder_wp
Definition ring.h:82
ringorder_M
@ ringorder_M
Definition ring.h:75

## decode_string()

leftv LinTree::decode_string | ( | LinTree & | lintree | ) |

Definition at line 184 of file lintree.cc.

{
size_t len = lintree.get<size_t>();
const char *p = lintree.get_bytes(len);
leftv result = new_leftv(STRING_CMD, (void *)NULL);
result->data = omAlloc0(len+1);
memcpy(result->data, p, len);
return result;
}
STRING_CMD
@ STRING_CMD
Definition tok.h:187

## decoding_error()

void LinTree::decoding_error | ( | const char * | s | ) |

Definition at line 838 of file lintree.cc.

{
Werror("libthread decoding error: %s", s);
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189

## dump_string()

void LinTree::dump_string | ( | string | str | ) |

Definition at line 821 of file lintree.cc.

{
printf("%d: ", (int)str.size());
for (int i=0; i<str.size(); i++) {
char ch = str[i];
if (ch < ' ' || ch >= 0x7f)
printf("#%02x", (int) ch & 0xff);
else
printf("%c", ch);
}
printf("\n");
fflush(stdout);
}

## encode()

void LinTree::encode | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 78 of file lintree.cc.

{
void encode_ring(LinTree &lintree, const ring r);
int typ = val->Typ();
char enc_ring = 0;
LinTreeEncodeFunc fn;
if (typ < encoders.size()) {
fn = encoders[typ];
enc_ring = needs_ring[typ];
}
else
fn = NULL;
if (fn) {
if (enc_ring && !lintree.has_last_ring()) {
lintree.put_int(-1);
encode_ring(lintree, currRing);
lintree.set_last_ring(currRing);
}
lintree.put_int(typ);
fn(lintree, val);
} else
lintree.mark_error("trying to share unsupported data type");
}
LinTree::LinTree::put_int
void put_int(int code)
Definition lintree.h:74
LinTree::LinTree::has_last_ring
int has_last_ring()
Definition lintree.h:121
sleftv::Typ
int Typ()
Definition subexpr.cc:1048
LinTree::needs_ring
vector< char > needs_ring
Definition lintree.cc:49
LinTree::encode_ring
void encode_ring(LinTree &lintree, const ring r)
Definition lintree.cc:527
LinTree::encoders
vector< LinTreeEncodeFunc > encoders
Definition lintree.cc:46
LinTree::LinTreeEncodeFunc
void(* LinTreeEncodeFunc)(LinTree &lintree, leftv val)
Definition lintree.h:13
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13

## encode_bigint()

void LinTree::encode_bigint | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 351 of file lintree.cc.

{
encode_number_cf(lintree, (number) val->Data(), coeffs_BIGINT);
}
sleftv::Data
void * Data()
Definition subexpr.cc:1192
LinTree::encode_number_cf
void encode_number_cf(LinTree &lintree, const number n, const coeffs cf)
Definition lintree.cc:265

## encode_command()

void LinTree::encode_command | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 765 of file lintree.cc.

{
command cmd = (command) val->Data();
lintree.put_int(cmd->op);
lintree.put_int(cmd->argc);
if (cmd->argc >= 1)
encode(lintree, &cmd->arg1);
if (cmd->argc < 4) {
if (cmd->argc >= 2)
encode(lintree, &cmd->arg2);
if (cmd->argc >= 3)
encode(lintree, &cmd->arg3);
}
}
LinTree::encode
void encode(LinTree &lintree, leftv val)
Definition lintree.cc:78

## encode_def()

void LinTree::encode_def | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 200 of file lintree.cc.

{
char *p = (char *)val->Name();
size_t len = strlen(p);
lintree.put(len);
lintree.put_bytes(p, len);
}
LinTree::LinTree::put_bytes
void put_bytes(char *p, size_t n)
Definition lintree.h:88
LinTree::LinTree::put
void put(T data)
Definition lintree.h:61
sleftv::Name
const char * Name()
Definition subexpr.h:120

## encode_ideal() [1/3]

void LinTree::encode_ideal | ( | LinTree & | lintree,
|  | int | typ,
|  | const ideal | I )

Definition at line 491 of file lintree.cc.

{
encode_ideal(lintree, typ, I, (ring) lintree.get_last_ring());
}
LinTree::encode_ideal
void encode_ideal(LinTree &lintree, int typ, const ideal I, const ring R)
Definition lintree.cc:470

## encode_ideal() [2/3]

void LinTree::encode_ideal | ( | LinTree & | lintree,
|  | int | typ,
|  | const ideal | I,
|  | const ring | R )

Definition at line 470 of file lintree.cc.

{
matrix M = (matrix) I;
int mn;
if (typ == MATRIX_CMD)
{
mn = MATROWS(M) * MATCOLS(M);
lintree.put_int(MATROWS(M));
lintree.put_int(MATCOLS(M));
} else {
mn = IDELEMS(I);
lintree.put_int(IDELEMS(I));
}
int tt;
if (typ == MODUL_CMD)
tt = VECTOR_CMD;
else
tt = POLY_CMD;
for (int i=0; i<mn; i++)
encode_poly(lintree, tt, I->m[i], R);
}
MATRIX_CMD
@ MATRIX_CMD
Definition grammar.cc:287
MODUL_CMD
@ MODUL_CMD
Definition grammar.cc:288
VECTOR_CMD
@ VECTOR_CMD
Definition grammar.cc:293
matrix
ip_smatrix * matrix
Definition matpol.h:43
MATROWS
#define MATROWS(i)
Definition matpol.h:26
MATCOLS
#define MATCOLS(i)
Definition matpol.h:27
LinTree::encode_poly
void encode_poly(LinTree &lintree, int typ, poly p, const ring r)
Definition lintree.cc:400
R
#define R
Definition sirandom.c:27
M
#define M
Definition sirandom.c:25

## encode_ideal() [3/3]

void LinTree::encode_ideal | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 495 of file lintree.cc.

{
void encode_ring(LinTree &lintree, const ring r);
int typ = val->Typ();
void *data = val->Data();
switch (typ) {
case IDEAL_CMD:
case MATRIX_CMD:
break;
case MODUL_CMD:
{
ideal M = (ideal) data;
lintree.put_int((int) M->rank);
}
break;
}
encode_ideal(lintree, typ, (ideal) data);
}

## encode_int()

void LinTree::encode_int | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 161 of file lintree.cc.

{
long data = (long)(val->Data());
lintree.put(data);
}

## encode_intmat()

void LinTree::encode_intmat | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 377 of file lintree.cc.

{
intvec *v = (intvec *)(val->Data());
int rows = v->rows();
int cols = v->cols();
int len = v->length();
lintree.put_int(rows);
lintree.put_int(cols);
for (int i = 0; i < len; i++) {
lintree.put_int((*v)[i]);
}
}

## encode_list()

void LinTree::encode_list | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 735 of file lintree.cc.

{
lists l = (lists) val->Data();
int n = lSize(l);
lintree.put_int(n);
for (int i=0; i<=n; i++) {
encode(lintree, &l->m[i]);
}
}
lSize
int lSize(lists L)
Definition lists.cc:25

## encode_longrat_cf()

void LinTree::encode_longrat_cf | ( | LinTree & | lintree,
|  | const number | n )

Definition at line 230 of file lintree.cc.

{
if (SR_HDL(n) & SR_INT) {
long nn = SR_TO_INT(n);
lintree.put<int>(-1);
lintree.put<long>(nn);
} else {
lintree.put<int>(n->s);
if (n->s < 2) {
encode_mpz(lintree, n->z);
encode_mpz(lintree, n->n);
} else {
encode_mpz(lintree, n->z);
}
}
}
SR_INT
#define SR_INT
Definition longrat.h:67
SR_TO_INT
#define SR_TO_INT(SR)
Definition longrat.h:69
LinTree::encode_mpz
void encode_mpz(LinTree &lintree, const mpz_t num)
Definition lintree.cc:132
SR_HDL
#define SR_HDL(A)
Definition tgb.cc:35

## encode_mpz()

void LinTree::encode_mpz | ( | LinTree & | lintree,
|  | const mpz_t | num )

Definition at line 132 of file lintree.cc.

{
size_t nbytes = (mpz_sizeinbase(num, 2) + 7UL) / 8UL;
char *p = (char *) alloca(nbytes);
mpz_export(p, &nbytes, 1, 1, 0, 0, num);
lintree.put(nbytes);
lintree.put_bytes(p, nbytes);
}

## encode_none()

void LinTree::encode_none | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 148 of file lintree.cc.

{
}

## encode_number()

void LinTree::encode_number | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 320 of file lintree.cc.

{
encode_number_cf(lintree, (number)val->Data(),
((ring) lintree.get_last_ring())->cf);
}

## encode_number_cf()

void LinTree::encode_number_cf | ( | LinTree & | lintree,
|  | const number | n,
|  | const coeffs | cf )

Definition at line 265 of file lintree.cc.

{
void encode_poly(LinTree &lintree, int typ, poly p, const ring r);
n_coeffType ct = getCoeffType(cf);
// lintree.put_int((int)ct);
switch (ct) {
case n_transExt:
{
fraction f= (fraction) n;
encode_poly(lintree, POLY_CMD, NUM(f), cf->extRing);
encode_poly(lintree, POLY_CMD, DEN(f), cf->extRing);
}
break;
case n_algExt:
encode_poly(lintree, POLY_CMD, (poly) n, cf->extRing);
break;
case n_Zp:
lintree.put<long>((long) n);
break;
case n_Q:
encode_longrat_cf(lintree, n);
break;
default:
lintree.mark_error("coefficient type not supported");
break;
}
}
LinTree::encode_longrat_cf
void encode_longrat_cf(LinTree &lintree, const number n)
Definition lintree.cc:230

## encode_poly() [1/3]

void LinTree::encode_poly | ( | LinTree & | lintree,
|  | int | typ,
|  | poly | p )

Definition at line 412 of file lintree.cc.

{
encode_poly(lintree, typ, p, (ring) lintree.get_last_ring());
}

## encode_poly() [2/3]

void LinTree::encode_poly | ( | LinTree & | lintree,
|  | int | typ,
|  | poly | p,
|  | const ring | r )

Definition at line 400 of file lintree.cc.

{
lintree.put_int(pLength(p));
while (p != NULL) {
encode_number_cf(lintree, pGetCoeff(p), r->cf);
lintree.put_int(p_GetComp(p, r));
for (int j=1; j<=rVar(r); j++) {
lintree.put_int(p_GetExp(p, j, r));
}
pIter(p);
}
}
p_GetComp
#define p_GetComp(p, r)
Definition monomials.h:64
pIter
#define pIter(p)
Definition monomials.h:37
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44
pLength
static int pLength(poly a)
Definition p_polys.h:190
p_GetExp
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
Definition p_polys.h:471

## encode_poly() [3/3]

void LinTree::encode_poly | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 416 of file lintree.cc.

{
encode_poly(lintree, val->Typ(), (poly) val->Data());
}

## encode_ring() [1/2]

void LinTree::encode_ring | ( | LinTree & | lintree,
|  | const ring | r )

Definition at line 527 of file lintree.cc.

{
if (r == NULL) {
lintree.put_int(-4);
return;
}
if (r == lintree.get_last_ring()) {
lintree.put_int(-5);
return;
}
if (rField_is_Q(r) || rField_is_Zp(r)) {
lintree.put_int(n_GetChar(r->cf));
lintree.put_int(r->N);
} else if (rFieldType(r) == n_transExt) {
lintree.put_int(-1);
lintree.put_int(r->N);
} else if (rFieldType(r) == n_algExt) {
lintree.put_int(-2);
lintree.put_int(r->N);
} else {
lintree.put_int(-3);
lintree.put_int(r->N);
lintree.put_cstring(nCoeffName(r->cf));
}
for (int i=0; i<r->N; i++) {
lintree.put_cstring(r->names[i]);
}
int i = 0;
if (r->order) while (r->order[i] != 0) i++;
lintree.put_int(i);
i = 0;
if (r->order) while (r->order[i] != 0) {
lintree.put_int(r->order[i]);
lintree.put_int(r->block0[i]);
lintree.put_int(r->block1[i]);
switch (r->order[i]) {
case ringorder_a:
case ringorder_wp:
case ringorder_Wp:
case ringorder_ws:
case ringorder_Ws:
case ringorder_aa:
for (int j = r->block0[i]; j <= r->block1[i]; j++)
lintree.put_int(r->wvhdl[i][j-r->block0[i]]);
break;
case ringorder_a64:
case ringorder_M:
case ringorder_L:
case ringorder_IS:
lintree.mark_error("ring order not implemented");
break;
default:
break;
}
i++;
}
if (rFieldType(r) == n_transExt || rFieldType(r) == n_algExt) {
encode_ring(lintree, r->cf->extRing);
}
if (r->qideal) {
lintree.put_int(IDEAL_CMD);
encode_ideal(lintree, IDEAL_CMD, r->qideal, r);
} else {
lintree.put_int(0);
}
}
LinTree::LinTree::put_cstring
void put_cstring(char *p)
Definition lintree.h:99
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition coeffs.h:450
nCoeffName
static FORCE_INLINE char * nCoeffName(const coeffs cf)
Definition coeffs.h:962
rField_is_Zp
static BOOLEAN rField_is_Zp(const ring r)
Definition ring.h:506
rFieldType
static n_coeffType rFieldType(const ring r)
the type of the coefficient filed of r (n_Zp, n_Q, etc)
Definition ring.h:562
rField_is_Q
static BOOLEAN rField_is_Q(const ring r)
Definition ring.h:512

## encode_ring() [2/2]

void LinTree::encode_ring | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 593 of file lintree.cc.

{
encode_ring(lintree, (ring) val->Data());
}

## encode_string()

void LinTree::encode_string | ( | LinTree & | lintree,
|  | leftv | val )

Definition at line 177 of file lintree.cc.

{
char *p = (char *)val->Data();
size_t len = strlen(p);
lintree.put(len);
lintree.put_bytes(p, len);
}

## encoding_error()

void LinTree::encoding_error | ( | const char * | s | ) |

Definition at line 834 of file lintree.cc.

{
Werror("libthread encoding error: %s", s);
}

## from_string()

leftv LinTree::from_string | ( | std::string & | str | ) |

Definition at line 854 of file lintree.cc.

{
LinTree lintree(str);
leftv result = decode(lintree);
if (lintree.has_error()) {
decoding_error(lintree.error_msg());
result = new_leftv(NONE, 0L);
}
return result;
}
LinTree::decoding_error
void decoding_error(const char *s)
Definition lintree.cc:838

## init()

void LinTree::init | ( |  | ) |

Definition at line 864 of file lintree.cc.

{
install(NONE, encode_none, decode_none, ref_none);
install(INT_CMD, encode_int, decode_int, ref_int);
install(LIST_CMD, encode_list, decode_list, ref_list);
install(STRING_CMD, encode_string, decode_string, ref_string);
install(COMMAND, encode_command, decode_command, ref_command);
install(DEF_CMD, encode_def, decode_def, ref_def);
install(NUMBER_CMD, encode_number, decode_number, ref_number);
install(BIGINT_CMD, encode_bigint, decode_bigint, ref_bigint);
install(INTMAT_CMD, encode_intmat, decode_intmat, ref_intmat);
set_needs_ring(NUMBER_CMD);
install(RING_CMD, encode_ring, decode_ring, ref_ring);
install(POLY_CMD, encode_poly, decode_poly, ref_poly);
set_needs_ring(POLY_CMD);
install(IDEAL_CMD, encode_ideal, decode_ideal, ref_ideal);
set_needs_ring(IDEAL_CMD);
}
LinTree::set_needs_ring
void set_needs_ring(int typ)
Definition lintree.cc:74
LinTree::ref_poly
void ref_poly(LinTree &lintree, int by)
Definition lintree.cc:450
LinTree::encode_intmat
void encode_intmat(LinTree &lintree, leftv val)
Definition lintree.cc:377
LinTree::decode_bigint
leftv decode_bigint(LinTree &lintree)
Definition lintree.cc:355
LinTree::ref_number
void ref_number(LinTree &lintree, int by)
Definition lintree.cc:344
LinTree::ref_def
void ref_def(LinTree &lintree, int by)
Definition lintree.cc:222
LinTree::decode_none
leftv decode_none(LinTree &lintree)
Definition lintree.cc:151
LinTree::encode_bigint
void encode_bigint(LinTree &lintree, leftv val)
Definition lintree.cc:351
LinTree::ref_none
void ref_none(LinTree &lintree, int by)
Definition lintree.cc:155
LinTree::encode_string
void encode_string(LinTree &lintree, leftv val)
Definition lintree.cc:177
LinTree::ref_bigint
void ref_bigint(LinTree &lintree, int by)
Definition lintree.cc:360
LinTree::ref_int
void ref_int(LinTree &lintree, int by)
Definition lintree.cc:171
LinTree::encode_none
void encode_none(LinTree &lintree, leftv val)
Definition lintree.cc:148
LinTree::encode_list
void encode_list(LinTree &lintree, leftv val)
Definition lintree.cc:735
LinTree::decode_command
leftv decode_command(LinTree &lintree)
Definition lintree.cc:779
LinTree::ref_ring
void ref_ring(LinTree &lintree, int by)
Definition lintree.cc:697
LinTree::encode_command
void encode_command(LinTree &lintree, leftv val)
Definition lintree.cc:765
LinTree::ref_ideal
void ref_ideal(LinTree &lintree, int by)
Definition lintree.cc:518
LinTree::decode_def
leftv decode_def(LinTree &lintree)
Definition lintree.cc:207
LinTree::decode_string
leftv decode_string(LinTree &lintree)
Definition lintree.cc:184
LinTree::decode_int
leftv decode_int(LinTree &lintree)
Definition lintree.cc:166
LinTree::encode_int
void encode_int(LinTree &lintree, leftv val)
Definition lintree.cc:161
LinTree::ref_string
void ref_string(LinTree &lintree, int by)
Definition lintree.cc:193
LinTree::decode_number
leftv decode_number(LinTree &lintree)
Definition lintree.cc:315
LinTree::encode_def
void encode_def(LinTree &lintree, leftv val)
Definition lintree.cc:200
LinTree::ref_list
void ref_list(LinTree &lintree, int by)
Definition lintree.cc:756
LinTree::decode_intmat
leftv decode_intmat(LinTree &lintree)
Definition lintree.cc:366
LinTree::decode_list
leftv decode_list(LinTree &lintree)
Definition lintree.cc:744
LinTree::install
void install(int typ, LinTreeEncodeFunc enc, LinTreeDecodeFunc dec, LinTreeRefFunc ref)
Definition lintree.cc:51
LinTree::ref_intmat
void ref_intmat(LinTree &lintree, int by)
Definition lintree.cc:389
LinTree::encode_number
void encode_number(LinTree &lintree, leftv val)
Definition lintree.cc:320
LinTree::ref_command
void ref_command(LinTree &lintree, int by)
Definition lintree.cc:810
LinTree::decode_ring
leftv decode_ring(LinTree &lintree)
Definition lintree.cc:693

## install()

void LinTree::install | ( | int | typ,
|  | LinTreeEncodeFunc | enc,
|  | LinTreeDecodeFunc | dec,
|  | LinTreeRefFunc | ref )

Definition at line 51 of file lintree.cc.

{
size_t n;
for (;;) {
n = encoders.size();
if (n > typ) break;
if (n == 0)
n = 256;
else
n = n * 2;
encoders.resize(n);
decoders.resize(n);
refupdaters.resize(n);
needs_ring.resize(n);
}
encoders[typ] = enc;
decoders[typ] = dec;
refupdaters[typ] = ref;
}
LinTree::refupdaters
vector< LinTreeRefFunc > refupdaters
Definition lintree.cc:48

## new_leftv() [1/2]

leftv LinTree::new_leftv | ( | int | code,
|  | long | data )

Definition at line 125 of file lintree.cc.

{
leftv result = (leftv) omAlloc0Bin(sleftv_bin);
result->rtyp = code;
result->data = (char *)data;
return result;
}
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206

## new_leftv() [2/2]

leftv LinTree::new_leftv | ( | int | code,
|  | void * | data )

Definition at line 118 of file lintree.cc.

{
leftv result = (leftv) omAlloc0Bin(sleftv_bin);
result->rtyp = code;
result->data = (char *)data;
return result;
}

## ref_bigint()

void LinTree::ref_bigint | ( | LinTree & | lintree,
|  | int | by )

Definition at line 360 of file lintree.cc.

{
ref_number_cf(lintree, coeffs_BIGINT, by);
}
LinTree::ref_number_cf
void ref_number_cf(LinTree &lintree, coeffs cf, int by)
Definition lintree.cc:325

## ref_command()

void LinTree::ref_command | ( | LinTree & | lintree,
|  | int | by )

Definition at line 810 of file lintree.cc.

{
int op = lintree.get_int();
int argc = lintree.get_int();
if (argc >= 1)
updateref(lintree, by);
if (argc < 4) {
if (argc >= 2) updateref(lintree, by);
if (argc >= 3) updateref(lintree, by);
}
}
LinTree::updateref
void updateref(LinTree &lintree, int by)
Definition lintree.cc:112

## ref_def()

void LinTree::ref_def | ( | LinTree & | lintree,
|  | int | by )

Definition at line 222 of file lintree.cc.

{
size_t len = lintree.get<size_t>();
lintree.skip_bytes(len);
}
LinTree::LinTree::skip_bytes
void skip_bytes(size_t n)
Definition lintree.h:114

## ref_ideal()

void LinTree::ref_ideal | ( | LinTree & | lintree,
|  | int | by )

Definition at line 518 of file lintree.cc.

{
int n = lintree.get_int();
for (int i=0; i<n; i++)
ref_poly(lintree, by);
}

## ref_int()

void LinTree::ref_int | ( | LinTree & | lintree,
|  | int | by )

Definition at line 171 of file lintree.cc.

{
lintree.skip<long>();
}
LinTree::LinTree::skip
void skip()
Definition lintree.h:65

## ref_intmat()

void LinTree::ref_intmat | ( | LinTree & | lintree,
|  | int | by )

Definition at line 389 of file lintree.cc.

{
int rows = lintree.get_int();
int cols = lintree.get_int();
int len = rows * cols;
for (int i = 0; i < len; i++) {
(void) lintree.get_int();
}
}

## ref_list()

void LinTree::ref_list | ( | LinTree & | lintree,
|  | int | by )

Definition at line 756 of file lintree.cc.

{
int n = lintree.get_int();
for (int i = 0; i < n; i++) {
updateref(lintree, by);
}
}

## ref_none()

void LinTree::ref_none | ( | LinTree & | lintree,
|  | int | by )

Definition at line 155 of file lintree.cc.

{
}

## ref_number()

void LinTree::ref_number | ( | LinTree & | lintree,
|  | int | by )

Definition at line 344 of file lintree.cc.

{
coeffs cf = ((ring) lintree.get_last_ring())->cf;
ref_number_cf(lintree, cf, by);
}

## ref_number_cf()

void LinTree::ref_number_cf | ( | LinTree & | lintree,
|  | coeffs | cf,
|  | int | by )

Definition at line 325 of file lintree.cc.

{
void ref_poly(LinTree &lintree, int by);
switch (getCoeffType(cf)) {
case n_transExt:
ref_poly(lintree, by);
ref_poly(lintree, by);
break;
case n_algExt:
ref_poly(lintree, by);
break;
case n_Zp:
lintree.skip<long>();
break;
default:
abort(); // should never happen
break;
}
}

## ref_poly()

void LinTree::ref_poly | ( | LinTree & | lintree,
|  | int | by )

Definition at line 450 of file lintree.cc.

{
ring r = (ring) lintree.get_last_ring();
int len = lintree.get_int();
for (int l = 0; l <len; l++) {
ref_number(lintree, by);
lintree.skip_int();
for (int i=1; i<=rVar(r); i++)
lintree.skip_int();
}
}
LinTree::LinTree::skip_int
void skip_int()
Definition lintree.h:77

## ref_ring()

void LinTree::ref_ring | ( | LinTree & | lintree,
|  | int | by )

Definition at line 697 of file lintree.cc.

{
int ch = lintree.get_int();
int N = lintree.get_int();
switch (ch) {
case -3:
lintree.skip_cstring();
case -4:
case -5:
return;
}
for (int i=0; i<N; i++)
lintree.skip_cstring();
int num_ord = lintree.get_int();
for (int i=0; i<N; i++) {
int ord = lintree.get_int();
int block0 = lintree.get_int();
int block1 = lintree.get_int();
switch (ord) {
case ringorder_a:
case ringorder_wp:
case ringorder_Wp:
case ringorder_ws:
case ringorder_Ws:
case ringorder_aa:
for (int j=block0; j<=block1; j++)
lintree.skip_int();
break;
}
}
if (N != 0) {
if (ch == -1 || ch == -2) {
ref_ring(lintree, by);
}
}
}
LinTree::LinTree::skip_cstring
void skip_cstring()
Definition lintree.h:110

## ref_string()

void LinTree::ref_string | ( | LinTree & | lintree,
|  | int | by )

Definition at line 193 of file lintree.cc.

{
size_t len = lintree.get<size_t>();
lintree.skip_bytes(len);
}

## set_needs_ring()

void LinTree::set_needs_ring | ( | int | typ | ) |

Definition at line 74 of file lintree.cc.

{
needs_ring[typ] = 1;
}

## to_string()

std::string LinTree::to_string | ( | leftv | val | ) |

Definition at line 843 of file lintree.cc.

{
LinTree lintree;
encode(lintree, val);
if (lintree.has_error()) {
encoding_error(lintree.error_msg());
lintree.clear();
lintree.put_int(NONE);
}
return lintree.to_string();
}
LinTree::LinTree::to_string
std::string & to_string()
Definition lintree.h:117
LinTree::LinTree::clear
void clear()
Definition lintree.h:37
LinTree::LinTree::has_error
int has_error()
Definition lintree.h:41
LinTree::LinTree::error_msg
const char * error_msg()
Definition lintree.h:44
LinTree::encoding_error
void encoding_error(const char *s)
Definition lintree.cc:834

## updateref()

void LinTree::updateref | ( | LinTree & | lintree,
|  | int | by )

Definition at line 112 of file lintree.cc.

{
int typ = lintree.get_int();
LinTreeRefFunc fn = refupdaters[typ];
fn(lintree, by);
}
LinTree::LinTreeRefFunc
void(* LinTreeRefFunc)(LinTree &lintree, int by)
Definition lintree.h:15

## Variable Documentation

## decoders

std::vector< LinTreeDecodeFunc > LinTree::decoders

Definition at line 47 of file lintree.cc.

## encoders

std::vector< LinTreeEncodeFunc > LinTree::encoders

Definition at line 46 of file lintree.cc.

## needs_ring

vector<char> LinTree::needs_ring

Definition at line 49 of file lintree.cc.

## refupdaters

std::vector< LinTreeRefFunc > LinTree::refupdaters

Definition at line 48 of file lintree.cc.