#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <misc/options.h>
#include <misc/intvec.h>
#include <polys/matpol.h>
#include <kernel/polys.h>
#include <kernel/ideals.h>
#include <Singular/tok.h>
#include <Singular/ipid.h>
#include <Singular/ipshell.h>
#include <Singular/attrib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
Go to the source code of this file.
|
static void | attr_free (attr h, const ring r=currRing) |
|
void * | atGet (idhdl root, const char *name, int t, void *defaultReturnValue) |
|
void * | atGet (leftv root, const char *name, int t) |
|
void | atSet (idhdl root, const char *name, void *data, int typ) |
|
void | atSet (leftv root, const char *name, void *data, int typ) |
|
void | at_Kill (idhdl root, const char *name, const ring r) |
|
void | at_KillAll (idhdl root, const ring r) |
|
void | at_KillAll (leftv root, const ring r) |
|
BOOLEAN | atATTRIB1 (leftv res, leftv v) |
|
BOOLEAN | atATTRIB2 (leftv res, leftv v, leftv b) |
|
BOOLEAN | atATTRIB3 (leftv, leftv v, leftv b, leftv c) |
|
BOOLEAN | atKILLATTR1 (leftv, leftv a) |
|
BOOLEAN | atKILLATTR2 (leftv, leftv a, leftv b) |
|
Definition at line 209 of file attrib.cc.
222 while (temp1->
next!=temp) temp1 = temp1->
next;
const CanonicalForm CFMap CFMap & N
char name(const Variable &v)
Definition at line 229 of file attrib.cc.
void killAll(const ring r)
Definition at line 235 of file attrib.cc.
void killAll(const ring r)
Definition at line 241 of file attrib.cc.
247 WerrorS(
"this object cannot have attributes");
256 PrintS(
"attr:isSB, type int\n");
257 haveNoAttribute=
FALSE;
261 PrintS(
"attr:qringNF, type int\n");
262 haveNoAttribute=
FALSE;
266 PrintS(
"attr:global, type int\n");
267 haveNoAttribute=
FALSE;
276 else if(haveNoAttribute)
PrintS(
"no attributes\n");
Class used for (list of) interpreter objects.
void WerrorS(const char *s)
void PrintS(const char *s)
BOOLEAN atATTRIB1(leftv res, leftv v)
Definition at line 279 of file attrib.cc.
286 if (strcmp(name,
"isSB")==0)
292 else if ((strcmp(name,
"rank")==0)&&(v->
Typ()==
MODUL_CMD))
295 res->
data=(
void *)(((ideal)v->
Data())->rank);
297 else if ((strcmp(name,
"global")==0)
301 res->
data=(
void *)(((ring)v->
Data())->OrdSgn==1);
303 else if ((strcmp(name,
"ring_cf")==0)
309 else if (strcmp(name,
"qringNF")==0)
316 else if ((strcmp(name,
"isLPring")==0)
320 res->
data=(
void *)(
long)(((ring)v->
Data())->isLPring);
328 WerrorS(
"this object cannot have attributes");
Class used for (list of) interpreter objects.
void WerrorS(const char *s)
char name(const Variable &v)
static BOOLEAN rField_is_Ring(const ring r)
Definition at line 346 of file attrib.cc.
359 if (strcmp(name,
"isSB")==0)
363 WerrorS(
"attribute isSB must be int");
366 if (((
long)c->
Data())!=0L)
377 else if (strcmp(name,
"qringNF")==0)
381 WerrorS(
"attribute qringNF must be int");
384 if (((
long)c->
Data())!=0L)
395 else if ((strcmp(name,
"rank")==0)&&(v->
Typ()==
MODUL_CMD))
399 WerrorS(
"attribute `rank` must be int");
402 ideal I=(ideal)v->
Data();
403 I->rank=
si_max((
int)I->rank,(
int)((
long)c->
Data()));
405 else if ((strcmp(name,
"global")==0)
408 WerrorS(
"can not set attribute `global`");
412 else if ((strcmp(name,
"isLPring")==0)
416 ((ring)v->
Data())->isLPring=(
int)(long)c->
Data();
419 WerrorS(
"attribute `isLPring` must be int");
void atSet(idhdl root, const char *name, void *data, int typ)
void WerrorS(const char *s)
static int si_max(const int a, const int b)
char name(const Variable &v)
void* atGet |
( |
idhdl |
root, |
|
|
const char * |
name, |
|
|
int |
t, |
|
|
void * |
defaultReturnValue |
|
) |
| |
Definition at line 135 of file attrib.cc.
138 if ((temp!=
NULL) && (temp->
atyp==t))
141 return defaultReturnValue;
char name(const Variable &v)
void* atGet |
( |
leftv |
root, |
|
|
const char * |
name, |
|
|
int |
t |
|
) |
| |
Definition at line 144 of file attrib.cc.
150 if ((temp!=
NULL) && (temp->
atyp==t))
char name(const Variable &v)
Definition at line 450 of file attrib.cc.
454 WerrorS(
"object must have a name");
458 if (strcmp(name,
"isSB")==0)
463 else if (strcmp(name,
"global")==0)
465 WerrorS(
"can not set attribut `global`");
void WerrorS(const char *s)
char name(const Variable &v)
void atSet |
( |
idhdl |
root, |
|
|
const char * |
name, |
|
|
void * |
data, |
|
|
int |
typ |
|
) |
| |
Definition at line 156 of file attrib.cc.
163 WerrorS(
"cannot set ring-dependend objects at this type");
attr set(const char *s, void *data, int t)
void WerrorS(const char *s)
char name(const Variable &v)
void atSet |
( |
leftv |
root, |
|
|
const char * |
name, |
|
|
void * |
data, |
|
|
int |
typ |
|
) |
| |
Definition at line 169 of file attrib.cc.
176 WerrorS(
"cannot set attributes of this object");
180 WerrorS(
"cannot set ring-dependend objects at this type");
attr set(const char *s, void *data, int t)
void WerrorS(const char *s)
char name(const Variable &v)
Definition at line 64 of file attrib.cc.
void s_internalDelete(const int t, void *d, const ring r)