My Project
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions
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.

67 {
68 args=(leftv) NULL;
69 }
#define NULL
Definition: omList.c:12
sleftv * leftv
Definition: structs.h:57

◆ ~arg_list()

arg_list::~arg_list ( )
inline

Definition at line 70 of file interpreter_support.cc.

71 {
72 if (args!=NULL)
73 {
74 args->CleanUp();
76 }
77 }
void CleanUp(ring r=currRing)
Definition: subexpr.cc:348
EXTERN_VAR omBin sleftv_bin
Definition: ipid.h:145
#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.

140 {
141 leftv v=initArg();
143 v->data=m;
144 v->rtyp=MATRIX_CMD;
146 }
int m
Definition: cfEzgcd.cc:128
FILE * f
Definition: checklibs.c:9
void internal_append(leftv v)
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:39
@ MATRIX_CMD
Definition: grammar.cc:286
matrix matrixFromArray(const NumpyArrayType &f)

◆ appendIdeal()

void arg_list::appendIdeal ( const Ideal p)
inline

Definition at line 104 of file interpreter_support.cc.

105 {
106 leftv v=initArg();
107 v->data=p.as_ideal();
108 v->rtyp=IDEAL_CMD;
110 }
int p
Definition: cfModGcd.cc:4078
@ IDEAL_CMD
Definition: grammar.cc:284

◆ appendint()

void arg_list::appendint ( int  p)
inline

Definition at line 118 of file interpreter_support.cc.

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

◆ appendIntvec()

void arg_list::appendIntvec ( Intvec iv)
inline

Definition at line 184 of file interpreter_support.cc.

185 {
186 leftv v=initArg();
188 v->rtyp=INTVEC_CMD;
190 }
intvec * allocate_legacy_intvec_copy() const
Definition: IIntvec.h:21
@ INTVEC_CMD
Definition: tok.h:101

◆ appendModule()

void arg_list::appendModule ( const Module p)
inline

Definition at line 111 of file interpreter_support.cc.

112 {
113 leftv v=initArg();
114 v->data=p.as_module();
115 v->rtyp=MODUL_CMD;
117 }
@ MODUL_CMD
Definition: grammar.cc:287

◆ appendNumber()

void arg_list::appendNumber ( const Number p)
inline

Definition at line 125 of file interpreter_support.cc.

126 {
127 leftv v=initArg();
128 v->data=(void*) p.as_number();
129 v->rtyp=NUMBER_CMD;
131 }
@ NUMBER_CMD
Definition: grammar.cc:288

◆ appendPoly()

void arg_list::appendPoly ( const Poly p)
inline

Definition at line 97 of file interpreter_support.cc.

98 {
99 leftv v=initArg();
100 v->data=p.as_poly();
101 v->rtyp=POLY_CMD;
103 }
@ POLY_CMD
Definition: grammar.cc:289

◆ appendPrelist()

void arg_list::appendPrelist ( arg_list l)
inline

Definition at line 177 of file interpreter_support.cc.

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

◆ appendRing()

void arg_list::appendRing ( const Ring r)
inline

Definition at line 154 of file interpreter_support.cc.

155 {
156 leftv v=initArg();
157 v->data=r.pimpl.get();
158 r.pimpl->ref++;
159 v->rtyp=RING_CMD;
161 }
intrusive_ptr< ip_sring > pimpl
Definition: ring_wrap.h:23
@ RING_CMD
Definition: grammar.cc:281

◆ appendString()

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

Definition at line 147 of file interpreter_support.cc.

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

◆ appendVector()

void arg_list::appendVector ( const Vector p)
inline

Definition at line 132 of file interpreter_support.cc.

133 {
134 leftv v=initArg();
135 v->data=p.as_poly();
136 v->rtyp=VECTOR_CMD;
138 }
@ VECTOR_CMD
Definition: grammar.cc:292

◆ dumpToLists()

lists arg_list::dumpToLists ( )
inline

Definition at line 162 of file interpreter_support.cc.

163 {
164 int n=length();
166 res->Init(n);
167 for(int i=0;i<n;i++)
168 {
169 leftv iv=pop_front();
170 //swap the content
171 memcpy(&res->m[i],iv,sizeof(sleftv));
172 //iv->Init();
174 }
175 return res;
176 }
int i
Definition: cfEzgcd.cc:132
Definition: lists.h:24
CanonicalForm res
Definition: facAbsFact.cc:60
VAR omBin slists_bin
Definition: lists.cc:23
slists * lists
Definition: mpr_numeric.h:146
#define omAlloc0Bin(bin)
Definition: omAllocDecl.h:206

◆ initArg()

leftv arg_list::initArg ( )
inlineprotected

Definition at line 192 of file interpreter_support.cc.

193 {
195 res->Init();
196 return res;
197 }
#define omAllocBin(bin)
Definition: omAllocDecl.h:205

◆ internal_append()

void arg_list::internal_append ( leftv  v)
inlineprotected

Definition at line 198 of file interpreter_support.cc.

199 {
200 if (args!=NULL)
201 {
203 while(last->next!=NULL)
204 {
205 last=last->next;
206 }
207 last->next=v;
208 }
209 else
210 args=v;
211 }
STATIC_VAR poly last
Definition: hdegree.cc:1173

◆ length()

int arg_list::length ( )
inline

Definition at line 86 of file interpreter_support.cc.

87 {
88 leftv v=args;
89 int l=0;
90 while(v!=NULL)
91 {
92 l++;
93 v=v->next;
94 }
95 return l;
96 }
Variable next() const
Definition: variable.h:52

◆ pop_front()

leftv arg_list::pop_front ( )
inline

Definition at line 78 of file interpreter_support.cc.

79 {
82 args=args->next;
83 res->next=NULL;
84 return res;
85 }
leftv next
Definition: subexpr.h:86
#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: