Loading...
Searching...
No Matches
arg_list Class Reference

## Public Member Functions

| arg_list ()
| ~arg_list ()
leftv | pop_front ()
int | length ()
void | appendPoly (const Poly &p)
void | appendIdeal (const Ideal &p)
void | appendModule (const Module &p)
void | appendint (int p)
void | appendNumber (const Number &p)
void | appendVector (const Vector &p)
void | appendArray (const NumpyArrayType &f)
void | appendString (const char *s)
void | appendRing (const Ring &r)
lists | dumpToLists ()
void | appendPrelist (arg_list &l)
void | appendIntvec (Intvec &iv)

## Data Fields

leftv | args

## Protected Member Functions

leftv | initArg ()
void | internal_append (leftv v)

## Detailed Description

Definition at line 62 of file interpreter_support.cc.

## Constructor & Destructor Documentation

## arg_list()

arg_list::arg_list | ( |  | ) |

inline

Definition at line 66 of file interpreter_support.cc.

{
args=(leftv) NULL;
}
arg_list::args
leftv args
Definition interpreter_support.cc:65
NULL
#define NULL
Definition omList.c:12
leftv
sleftv * leftv
Definition structs.h:53

## ~arg_list()

arg_list::~arg_list | ( |  | ) |

inline

Definition at line 70 of file interpreter_support.cc.

{
if (args!=NULL)
{
args->CleanUp();
omFreeBin(args, sleftv_bin);
}
}
sleftv_bin
EXTERN_VAR omBin sleftv_bin
Definition ipid.h:145
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259

## Member Function Documentation

## appendArray()

void arg_list::appendArray | ( | const NumpyArrayType & | f | ) |

inline

Definition at line 139 of file interpreter_support.cc.

{
leftv v=initArg();
matrix m=matrixFromArray(f);
v->data=m;
v->rtyp=MATRIX_CMD;
internal_append(v);
}
m
int m
Definition cfEzgcd.cc:128
f
FILE * f
Definition checklibs.c:9
arg_list::internal_append
void internal_append(leftv v)
Definition interpreter_support.cc:198
arg_list::initArg
leftv initArg()
Definition interpreter_support.cc:192
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
MATRIX_CMD
@ MATRIX_CMD
Definition grammar.cc:287
matrixFromArray
matrix matrixFromArray(const NumpyArrayType &f)
Definition interpreter_support.cc:37
matrix
ip_smatrix * matrix
Definition matpol.h:43

## appendIdeal()

void arg_list::appendIdeal | ( | const Ideal & | p | ) |

inline

Definition at line 104 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=p.as_ideal();
v->rtyp=IDEAL_CMD;
internal_append(v);
}
p
int p
Definition cfModGcd.cc:4086
IDEAL_CMD
@ IDEAL_CMD
Definition grammar.cc:285

## appendint()

void arg_list::appendint | ( | int | p | ) |

inline

Definition at line 118 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=(void*)((long)p);
v->rtyp=INT_CMD;
internal_append(v);
}
INT_CMD
@ INT_CMD
Definition tok.h:96

## appendIntvec()

void arg_list::appendIntvec | ( | Intvec & | iv | ) |

inline

Definition at line 184 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=iv.allocate_legacy_intvec_copy();
v->rtyp=INTVEC_CMD;
internal_append(v);
}
Intvec::allocate_legacy_intvec_copy
intvec * allocate_legacy_intvec_copy() const
Definition IIntvec.h:21
INTVEC_CMD
@ INTVEC_CMD
Definition tok.h:101

## appendModule()

void arg_list::appendModule | ( | const Module & | p | ) |

inline

Definition at line 111 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=p.as_module();
v->rtyp=MODUL_CMD;
internal_append(v);
}
MODUL_CMD
@ MODUL_CMD
Definition grammar.cc:288

## appendNumber()

void arg_list::appendNumber | ( | const Number & | p | ) |

inline

Definition at line 125 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=(void*) p.as_number();
v->rtyp=NUMBER_CMD;
internal_append(v);
}
NUMBER_CMD
@ NUMBER_CMD
Definition grammar.cc:289

## appendPoly()

void arg_list::appendPoly | ( | const Poly & | p | ) |

inline

Definition at line 97 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=p.as_poly();
v->rtyp=POLY_CMD;
internal_append(v);
}
POLY_CMD
@ POLY_CMD
Definition grammar.cc:290

## appendPrelist()

void arg_list::appendPrelist | ( | arg_list & | l | ) |

inline

Definition at line 177 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=l.dumpToLists();
v->rtyp=LIST_CMD;
internal_append(v);
}
l
int l
Definition cfEzgcd.cc:100
LIST_CMD
@ LIST_CMD
Definition tok.h:118

## appendRing()

void arg_list::appendRing | ( | const Ring & | r | ) |

inline

Definition at line 154 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=r.pimpl.get();
r.pimpl->ref++;
v->rtyp=RING_CMD;
internal_append(v);
}
Ring::pimpl
intrusive_ptr< ip_sring > pimpl
Definition ring_wrap.h:23
RING_CMD
@ RING_CMD
Definition grammar.cc:282

## appendString()

void arg_list::appendString | ( | const char * | s | ) |

inline

Definition at line 147 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=omStrDup(s);
v->rtyp=STRING_CMD;
internal_append(v);
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
STRING_CMD
@ STRING_CMD
Definition tok.h:187

## appendVector()

void arg_list::appendVector | ( | const Vector & | p | ) |

inline

Definition at line 132 of file interpreter_support.cc.

{
leftv v=initArg();
v->data=p.as_poly();
v->rtyp=VECTOR_CMD;
internal_append(v);
}
VECTOR_CMD
@ VECTOR_CMD
Definition grammar.cc:293

## dumpToLists()

lists arg_list::dumpToLists | ( |  | ) |

inline

Definition at line 162 of file interpreter_support.cc.

{
int n=length();
lists res=(lists)omAlloc0Bin(slists_bin);
res->Init(n);
for(int i=0;i<n;i++)
{
leftv iv=pop_front();
//swap the content
memcpy(&res->m[i],iv,sizeof(sleftv));
//iv->Init();
omFreeBin(iv, sleftv_bin);
}
return res;
}
i
int i
Definition cfEzgcd.cc:132
arg_list::length
int length()
Definition interpreter_support.cc:86
arg_list::pop_front
leftv pop_front()
Definition interpreter_support.cc:78
res
CanonicalForm res
Definition facAbsFact.cc:60
slists_bin
VAR omBin slists_bin
Definition lists.cc:23
lists
slists * lists
Definition mpr_numeric.h:146
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206

## initArg()

leftv arg_list::initArg | ( |  | ) |

inline protected

Definition at line 192 of file interpreter_support.cc.

{
leftv res=(leftv)omAllocBin(sleftv_bin);
res->Init();
return res;
}
omAllocBin
#define omAllocBin(bin)
Definition omAllocDecl.h:205

## internal_append()

void arg_list::internal_append | ( | leftv | v | ) |

inline protected

Definition at line 198 of file interpreter_support.cc.

{
if (args!=NULL)
{
leftv last=args;
while(last->next!=NULL)
{
last=last->next;
}
last->next=v;
}
else
args=v;
}
last
STATIC_VAR poly last
Definition hdegree.cc:1138

## length()

int arg_list::length | ( |  | ) |

inline

Definition at line 86 of file interpreter_support.cc.

{
leftv v=args;
int l=0;
while(v!=NULL)
{
l++;
v=v->next;
}
return l;
}
Variable::next
Variable next() const
Definition factory.h:146

## pop_front()

leftv arg_list::pop_front | ( |  | ) |

inline

Definition at line 78 of file interpreter_support.cc.

{
assume(args!=NULL);
leftv res=args;
args=args->next;
res->next=NULL;
return res;
}
assume
#define assume(x)
Definition mod2.h:389

## Field Documentation

## args

leftv arg_list::args

Definition at line 65 of file interpreter_support.cc.

The documentation for this class was generated from the following file:

- Singular/dyn_modules/python/interpreter_support.cc