Loading...
Searching...
No Matches
idhdl_wrap Class Reference

## Public Member Functions

| idhdl_wrap (idhdl id)
| idhdl_wrap ()
bool | is_zero ()
bool | id_is_proc ()
bool | print_type ()
void | writePoly (const Poly &p)
void | writeIdeal (const Ideal &p)
void | writeModule (const Module &p)
void | writeint (int p)
void | writeNumber (const Number &p)
void | writeVector (const Vector &p)
void | writeArray (const NumpyArrayType &f)
void | writeRing (const Ring &r)
void | writeString (const char *s)
void | writeIntvec (const Intvec &iv)
void | writeList (arg_list &f)

## Data Fields

idhdl | id

## Detailed Description

Definition at line 214 of file interpreter_support.cc.

## Constructor & Destructor Documentation

## idhdl_wrap() [1/2]

idhdl_wrap::idhdl_wrap | ( | idhdl | id | ) |

inline

Definition at line 218 of file interpreter_support.cc.

{
this->id=id;
}
idhdl_wrap::id
idhdl id
Definition interpreter_support.cc:217

## idhdl_wrap() [2/2]

idhdl_wrap::idhdl_wrap | ( |  | ) |

inline

Definition at line 222 of file interpreter_support.cc.

{
id=(idhdl) NULL;
}
NULL
#define NULL
Definition omList.c:12
idhdl
idrec * idhdl
Definition ring.h:22

## Member Function Documentation

## id_is_proc()

bool idhdl_wrap::id_is_proc | ( |  | ) |

inline

Definition at line 230 of file interpreter_support.cc.

{
return (id->typ==PROC_CMD);
}
PROC_CMD
@ PROC_CMD
Definition grammar.cc:281

## is_zero()

bool idhdl_wrap::is_zero | ( |  | ) |

inline

Definition at line 226 of file interpreter_support.cc.

{
return id==NULL;
}

## print_type()

bool idhdl_wrap::print_type | ( |  | ) |

inline

Definition at line 234 of file interpreter_support.cc.

{
Print("type:%d\n",id->typ);
}
Print
#define Print
Definition emacs.cc:80

## writeArray()

void idhdl_wrap::writeArray | ( | const NumpyArrayType & | f | ) |

inline

Definition at line 285 of file interpreter_support.cc.

{
if(id->typ=MATRIX_CMD)
{
matrix m=matrixFromArray(f);
id_Delete((ideal*) &id->data.umatrix,currRing);
id->data.umatrix=m;
}
}
m
int m
Definition cfEzgcd.cc:128
f
FILE * f
Definition checklibs.c:9
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
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition simpleideals.cc:123

## writeIdeal()

void idhdl_wrap::writeIdeal | ( | const Ideal & | p | ) |

inline

Definition at line 246 of file interpreter_support.cc.

{
if (id->typ==IDEAL_CMD)
{
id_Delete(&id->data.uideal, currRing);
id->data.uideal=p.as_ideal();
}
}
p
int p
Definition cfModGcd.cc:4086
IDEAL_CMD
@ IDEAL_CMD
Definition grammar.cc:285

## writeint()

void idhdl_wrap::writeint | ( | int | p | ) |

inline

Definition at line 262 of file interpreter_support.cc.

{
if (id->typ==INT_CMD)
{
id->data.i=p;
}
}
INT_CMD
@ INT_CMD
Definition tok.h:96

## writeIntvec()

void idhdl_wrap::writeIntvec | ( | const Intvec & | iv | ) |

inline

Definition at line 312 of file interpreter_support.cc.

{
if(id->typ=INTVEC_CMD)
{
delete id->data.iv;
id->data.iv=iv.allocate_legacy_intvec_copy();;
}
}
Intvec::allocate_legacy_intvec_copy
intvec * allocate_legacy_intvec_copy() const
Definition IIntvec.h:21
INTVEC_CMD
@ INTVEC_CMD
Definition tok.h:101

## writeList()

void idhdl_wrap::writeList | ( | arg_list & | f | ) |

inline

Definition at line 320 of file interpreter_support.cc.

{
//warning f gets empty
if(id->typ=LIST_CMD)
{
id->data.l->Clean(currRing);
id->data.l=f.dumpToLists();
}
}
LIST_CMD
@ LIST_CMD
Definition tok.h:118

## writeModule()

void idhdl_wrap::writeModule | ( | const Module & | p | ) |

inline

Definition at line 254 of file interpreter_support.cc.

{
if (id->typ==MODUL_CMD)
{
id_Delete(&id->data.uideal, currRing);
id->data.uideal=p.as_module();
}
}
MODUL_CMD
@ MODUL_CMD
Definition grammar.cc:288

## writeNumber()

void idhdl_wrap::writeNumber | ( | const Number & | p | ) |

inline

Definition at line 269 of file interpreter_support.cc.

{
if (id->typ==NUMBER_CMD)
{
n_Delete(&id->data.n, currRing);
id->data.n=p.as_number();
}
}
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
NUMBER_CMD
@ NUMBER_CMD
Definition grammar.cc:289

## writePoly()

void idhdl_wrap::writePoly | ( | const Poly & | p | ) |

inline

Definition at line 238 of file interpreter_support.cc.

{
if (id->typ==POLY_CMD)
{
p_Delete(&id->data.p, currRing);
id->data.p=p.as_poly();
}
}
POLY_CMD
@ POLY_CMD
Definition grammar.cc:290
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903

## writeRing()

void idhdl_wrap::writeRing | ( | const Ring & | r | ) |

inline

Definition at line 294 of file interpreter_support.cc.

{
if(id->typ=RING_CMD)
{
r.pimpl->ref++;
((ring) id->data.uring)->ref--;//FIXME: destruct it
ring r2=r.pimpl.get();
id->data.uring=r2;
}
}
Ring::pimpl
intrusive_ptr< ip_sring > pimpl
Definition ring_wrap.h:23
RING_CMD
@ RING_CMD
Definition grammar.cc:282

## writeString()

void idhdl_wrap::writeString | ( | const char * | s | ) |

inline

Definition at line 304 of file interpreter_support.cc.

{
if(id->typ=STRING_CMD)
{
omFree((ADDRESS) id->data.ustring);
id->data.ustring=omStrDup(s);
}
}
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
s
const CanonicalForm int s
Definition facAbsFact.cc:51
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
STRING_CMD
@ STRING_CMD
Definition tok.h:187

## writeVector()

void idhdl_wrap::writeVector | ( | const Vector & | p | ) |

inline

Definition at line 277 of file interpreter_support.cc.

{
if (id->typ==VECTOR_CMD)
{
p_Delete(&id->data.p, currRing);
id->data.p=p.as_poly();
}
}
VECTOR_CMD
@ VECTOR_CMD
Definition grammar.cc:293

## Field Documentation

## id

idhdl idhdl_wrap::id

Definition at line 217 of file interpreter_support.cc.

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

- Singular/dyn_modules/python/interpreter_support.cc