#include "kernel/mod2.h"
#include "misc/intvec.h"
#include "polys/matpol.h"
#include "kernel/polys.h"
#include "kernel/ideals.h"
#include "tok.h"
#include "ipid.h"
#include "subexpr.h"
#include "ipshell.h"
#include "ipprint.h"
#include "attrib.h"
Go to the source code of this file.
◆ ipPrint_CRING()
Definition at line 212 of file ipprint.cc.
213{
215 {
217 else PrintS(
"ring (with zero-divisors): ");
218 }
222}
static FORCE_INLINE BOOLEAN nCoeff_is_Domain(const coeffs r)
returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
static FORCE_INLINE char * nCoeffName(const coeffs cf)
void PrintS(const char *s)
◆ ipPrint_INTMAT()
Definition at line 40 of file ipprint.cc.
41{
43 for(
i=0;
i<
v->rows();
i++)
44 {
45 for(
j=0;
j<
v->cols();
j++)
46 {
48 }
50 }
52}
const Variable & v
< [in] a sqrfree bivariate poly
#define IMATELEM(M, I, J)
◆ ipPrint_INTVEC()
◆ ipPrint_MA()
Definition at line 185 of file ipprint.cc.
186{
190}
void ipPrint_MA0(matrix m, const char *name)
◆ ipPrint_MA0()
Definition at line 57 of file ipprint.cc.
58{
60 {
62 char *ss;
66
67
68 size_t len=14+strlen(
name);
71 vl=
si_max(vl,(
int)strlen(ss));
73
74
80 {
87 }
88
89
91 {
93 {
95 {
98 ss[0]='\0';
99 snprintf(ss,len,
"%s[%d,%d]",
name,
i+1,
j+1);
101 {
102 strcat(ss,",");
103 vl=
si_max(vl,(
int)strlen(ss));
104 }
105 }
108 }
109 }
110
111 int maxlen=0;
113 {
115 }
117 {
118
119
120
121
122 size_t len=14+strlen(
name);
124 {
126 {
129 {
133 ss[0]='\0';
134 snprintf(ss,len,
"%s[%d,%d]",
name,
i+1,
j+1);
136 {
137 strcat(ss,",");
138 }
141 {
142
143
144
146 }
148 }
149 else
150 {
152 }
153 }
154 }
155 }
156
158 {
163 {
165 {
168 }
172 }
174 }
175
178 }
180}
static int si_max(const int a, const int b)
const CanonicalForm int s
#define omFreeSize(addr, size)
#define omFreeBinAddr(addr)
void StringSetS(const char *st)
void StringAppendS(const char *st)
int name
New type name for int.
◆ ipPrint_RING()
static BOOLEAN ipPrint_RING |
( |
ring | r | ) |
|
|
static |
Definition at line 195 of file ipprint.cc.
196{
197 PrintS(
"polynomial ring, over a ");
199 {
201 else PrintS(
"ring (with zero-divisors)");
202 }
204 if (r->OrdSgn==1)
PrintS(
", global");
205 else if (r->MixedOrder==1)
PrintS(
", mixed");
210}
void rWrite(ring r, BOOLEAN details)
static BOOLEAN rField_is_Domain(const ring r)
#define rField_is_Ring(R)
◆ ipPrint_V()
Definition at line 226 of file ipprint.cc.
227{
230
232
236 {
240 else
241 {
243 break;
244 }
245 }
246
250}
void p_Vec2Polys(poly v, poly **p, int *len, const ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
◆ ipPrintBetti()
static void ipPrintBetti |
( |
leftv | u | ) |
|
|
static |
Definition at line 346 of file ipprint.cc.
347{
349 int row_shift=(int)((
long)(
atGet(u,
"rowShift",
INT_CMD)));
351
357
359 {
360 Print(
"%5d:",
i+row_shift);
362 {
366 else
368 }
370 }
371
376 {
379 {
381 }
383 }
385}
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
◆ jjDBPRINT()
Definition at line 318 of file ipprint.cc.
319{
322 {
323 print= (((int)((long)(u->
Data()))) > 0);
325 }
326 if (print)
327 {
328
332 {
341 }
342 }
344}
BOOLEAN jjPRINT(leftv res, leftv u)
◆ jjPRINT()
Definition at line 252 of file ipprint.cc.
253{
258 {
261 break;
262
265 break;
266
269 break;
270
272 {
277 break;
278 }
279
281 {
285 break;
286 }
287
290 break;
291
294 break;
295
298 break;
299
300 default:
302 break;
303 }
306 {
308 if (
s[
l-1]==
'\n')
s[
l-1]=
'\0';
309 }
311 return bo;
312}
char * String(void *d=NULL, BOOLEAN typed=FALSE, int dim=1)
Called for conversion to string (used by string(..), write(..),..)
void Print(leftv store=NULL, int spaces=0)
Called by type_cmd (e.g. "r;") or as default in jPRINT.
ideal id_Copy(ideal h1, const ring r)
copy an ideal
static BOOLEAN ipPrint_RING(ring r)
static BOOLEAN ipPrint_V(poly u)
static BOOLEAN ipPrint_MA(leftv u)
static BOOLEAN ipPrint_INTVEC(intvec *v)
static BOOLEAN ipPrint_INTMAT(intvec *v)
static BOOLEAN ipPrint_CRING(coeffs r)
The main handler for Singular numbers which are suitable for Singular polynomials.
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
matrix id_Module2Matrix(ideal mod, const ring R)
◆ jjPRINT_FORMAT()
Definition at line 391 of file ipprint.cc.
392{
393
394 if ((u->
Typ()==
INTMAT_CMD)&&(strcmp((
char *)
v->Data(),
"betti")==0))
395 {
401 }
402 else
403
404 {
407 if (strlen(ns) == 3 && ns[1] == '2')
408 {
410 ns[1] = ns[2];
411 ns[2] = '\0';
412 }
413 if (strcmp(ns,"%l") == 0)
414 {
417 {
418 char* ns = (
char*)
omAlloc(strlen((
char*)
res->data) + 2);
419 strcpy(ns, (
char*)
res->data);
421 strcat(ns, "\n");
423 }
424 }
425 else if (strcmp(ns,"%t") == 0)
426 {
431 ((
char*)
res->data)[strlen((
char*)
res->data) -1] =
'\0';
432 }
433 else if (strcmp(ns,"%;") == 0)
434 {
439 }
440 else if (strcmp(ns,"%p") == 0)
441 {
443 }
445 {
450 }
451 else
452 {
455 {
456 char* ns = (
char*)
omAlloc(strlen((
char*)
res->data) + 2);
457 strcpy(ns, (
char*)
res->data);
459 strcat(ns, "\n");
461 }
462 }
464 }
466}
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
static void ipPrintBetti(leftv u)