#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) |
|
§ at_Kill()
Definition at line 207 of file attrib.cc.
220 while (temp1->
next!=temp) temp1 = temp1->
next;
const CanonicalForm CFMap CFMap & N
char name(const Variable &v)
§ at_KillAll() [1/2]
Definition at line 227 of file attrib.cc.
void killAll(const ring r)
§ at_KillAll() [2/2]
Definition at line 233 of file attrib.cc.
void killAll(const ring r)
§ atATTRIB1()
Definition at line 239 of file attrib.cc.
244 WerrorS(
"this object cannot have attributes");
253 PrintS(
"attr:isSB, type int\n");
254 haveNoAttribute=
FALSE;
258 PrintS(
"attr:qringNF, type int\n");
259 haveNoAttribute=
FALSE;
263 PrintS(
"attr:cf_class, type int\n");
264 PrintS(
"attr:global, type int\n");
265 PrintS(
"attr:maxExp, type int\n");
266 PrintS(
"attr:ring_cf, type int\n");
268 PrintS(
"attr:isLPring, type int\n");
271 haveNoAttribute=
FALSE;
280 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)
§ atATTRIB2()
Definition at line 283 of file attrib.cc.
290 if (strcmp(name,
"isSB")==0)
296 else if ((strcmp(name,
"rank")==0)&&(t==
MODUL_CMD))
299 res->
data=(
void *)(((ideal)v->
Data())->rank);
301 else if ((strcmp(name,
"global")==0)
305 res->
data=(
void *)(((ring)v->
Data())->OrdSgn==1);
307 else if ((strcmp(name,
"maxExp")==0)
311 res->
data=(
void *)(
long)(((ring)v->
Data())->bitmask/2);
313 else if ((strcmp(name,
"ring_cf")==0)
319 else if ((strcmp(name,
"cf_class")==0)
326 res->
data=(
void *)(
long)(cf->type);
328 else if (strcmp(name,
"qringNF")==0)
335 else if ((strcmp(name,
"isLPring")==0)
339 res->
data=(
void *)(
long)(((ring)v->
Data())->isLPring);
347 WerrorS(
"this object cannot have attributes");
Class used for (list of) interpreter objects.
void WerrorS(const char *s)
The main handler for Singular numbers which are suitable for Singular polynomials.
char name(const Variable &v)
static BOOLEAN rField_is_Ring(const ring r)
§ atATTRIB3()
Definition at line 365 of file attrib.cc.
378 if (strcmp(name,
"isSB")==0)
382 WerrorS(
"attribute isSB must be int");
385 if (((
long)c->
Data())!=0L)
396 else if (strcmp(name,
"qringNF")==0)
400 WerrorS(
"attribute qringNF must be int");
403 if (((
long)c->
Data())!=0L)
414 else if ((strcmp(name,
"rank")==0)&&(t==
MODUL_CMD))
418 WerrorS(
"attribute `rank` must be int");
421 ideal I=(ideal)v->
Data();
425 else if (((strcmp(name,
"global")==0)
426 || (strcmp(name,
"cf_class")==0)
427 || (strcmp(name,
"ring_cf")==0)
428 || (strcmp(name,
"maxExp")==0))
431 Werror(
"can not set attribute `%s`",name);
435 else if ((strcmp(name,
"isLPring")==0)
439 ((ring)v->
Data())->isLPring=(
int)(long)c->
Data();
442 WerrorS(
"attribute `isLPring` must be int");
void atSet(idhdl root, const char *name, void *data, int typ)
void WerrorS(const char *s)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
static int si_max(const int a, const int b)
char name(const Variable &v)
void Werror(const char *fmt,...)
§ atGet() [1/2]
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)
§ atGet() [2/2]
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)
§ atKILLATTR1()
§ atKILLATTR2()
Definition at line 473 of file attrib.cc.
477 WerrorS(
"object must have a name");
481 if (strcmp(name,
"isSB")==0)
486 else if (strcmp(name,
"global")==0)
488 WerrorS(
"can not set attribut `global`");
void WerrorS(const char *s)
char name(const Variable &v)
§ atSet() [1/2]
void atSet |
( |
idhdl |
root, |
|
|
const char * |
name, |
|
|
void * |
data, |
|
|
int |
typ |
|
) |
| |
Definition at line 156 of file attrib.cc.
162 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)
§ atSet() [2/2]
void atSet |
( |
leftv |
root, |
|
|
const char * |
name, |
|
|
void * |
data, |
|
|
int |
typ |
|
) |
| |
Definition at line 168 of file attrib.cc.
175 WerrorS(
"cannot set attributes of this object");
178 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)
§ attr_free()
Definition at line 64 of file attrib.cc.
void s_internalDelete(const int t, void *d, const ring r)
§ sattr_bin