source: git/Singular/number2.h @ d770e6

fieker-DuValspielwiese
Last change on this file since d770e6 was 810491, checked in by Oleksandr Motsak <motsak@…>, 9 years ago
Fix including "libpolys/" and removal of unnecessary header includes + minor cleanup
  • Property mode set to 100644
File size: 1.4 KB
Line 
1#ifndef NUMBER2_H
2#define NUMBER2_H
3
4#include <libpolys/misc/auxiliary.h>
5
6#ifdef SINGULAR_4_1
7#include <omalloc/omalloc.h>
8#include <coeffs/coeffs.h>
9#include <kernel/structs.h>
10struct snumber2;
11typedef struct snumber2 *   number2;
12struct snumber2
13{ coeffs cf;
14  number n;
15};
16
17static inline number2 n2Init(long i, coeffs c)
18{ number2 N=(number2)omAlloc0(sizeof(snumber2)); if (c!=NULL) { N->cf=c; N->n=n_Init(i,c);} return N;}
19
20char *crString(coeffs c);
21
22void crPrint(coeffs cf);
23
24BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b);
25BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b);
26
27BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b); // compare cring
28
29// type conversion:
30BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b); // <any>,cring ->number2
31BOOLEAN jjN2_CR(leftv res, leftv a);              // number2 ->cring
32BOOLEAN jjCM_CR(leftv res, leftv a);              // cmatrix ->cring
33BOOLEAN jjBIM2_CR(leftv res, leftv a);              // bigint ->cring
34BOOLEAN jjR2_CR(leftv res, leftv a);              // ring ->cring
35BOOLEAN jjN2_N(leftv res, leftv a);             // number2 ->number
36
37// operations:
38BOOLEAN jjNUMBER2_OP1(leftv res, leftv a);
39BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b);
40
41number2 n2Copy(const number2 d);
42void n2Delete(number2 &d);
43char *n2String(number2 d, BOOLEAN typed);
44void n2Print(number2 d);
45
46BOOLEAN jjCMATRIX_3(leftv, leftv, leftv,leftv);
47#endif
48#endif
Note: See TracBrowser for help on using the repository browser.