Macaulay2 Engine
Loading...
Searching...
No Matches
aring.h
Go to the documentation of this file.
1#ifndef _aring_h_
2# define _aring_h_
3` annotations on individual entries
41 * mark those that already have a matching `d/` binding ---
42 * notably `rawARingTower1`/`_2`/`_3` are **not** marked
43 * connected. Adding a new `aring` requires declaring it
44 * here, implementing in `aring.cpp`, and wiring the M2-side
45 * `.dd` binding.
46 *
47 * @see aring.cpp
48 * @see engine-includes.hpp
49 */
50
51# include "engine-includes.hpp"
52
53// TODO: fix this
54# if defined(__cplusplus)
55class Ring;
56class RingElement;
57# else
58typedef struct Ring Ring;
59typedef struct RingElement RingElement;
60# endif
61
65
66# if defined(__cplusplus)
67extern "C" {
68# endif
69
70const Ring /* or null */ *rawARingZZp(unsigned long p); /* connected */
71/* Expects a prime number p in range 2 <= p <= 32749 */
72
73const Ring /* or null */ *rawARingGaloisField1(
74 const RingElement *prim); /* connected */
75/* same interface as rawGaloisField, but uses different internal code */
76
77const Ring /* or null */ *rawARingGaloisFieldFlintBig(
78 const RingElement *prim); /* connected */
79/* same interface as rawGaloisField, but uses Flint GF code designed for
80 wordsize p, but too big for lookup tables */
81
82const Ring /* or null */ *rawARingGaloisFieldFlintZech(
83 const RingElement *prim); /* connected */
84/* same interface as rawGaloisField, but uses Flint GF code designed for
85 wordsize p, and uses lookup tables */
86
87const Ring /* or null */ *rawARingGaloisField(int p, int n); /* connected */
88/* creates a ring GF(p^n). Constraints on p, n? */
89/* returns null if the values p,n are too large */
90
92 const RingElement *prim); /* connected */
93/* same interface as rawGaloisField, but uses Givaro */
94
96/* given an ARingGF, return the coefficient array of the quotient polynomial.
97 So, if R = kk[a]/(f(a)), where kk = ZZ/p, then the (integer) coefficients
98 {f0, f1, f2, ..., f_(degree f)} is returned.
99 */
100
102/* f can be written as a polynomial in the generator a, e.g.
103 f = f0 + a*f1 + ... + a^(d-1) * f_(d-1), where d = deg of the
104 ring over ZZ/p. This function returns {f0, f1, ..., f_(d-1)},
105 where each entry is an integer */
106
107const Ring /* or null */ *rawARingTower1(const Ring *K, M2_ArrayString names);
108
109const Ring /* or null */ *rawARingTower2(const Ring *R1,
110 M2_ArrayString new_names);
111
112const Ring /* or null */ *rawARingTower3(const Ring *R1,
113 engine_RawRingElementArray eqns);
114
116/* given an ARingGF, return the the generator of the multiplicative group.
117 */
118
122
123const Ring /* or null */ *rawARingZZFlint(); /* connected */
124
125const Ring /* or null */ *rawARingQQFlint(); /* connected */
126
127const Ring /* or null */ *rawARingZZpFlint(unsigned long p); /* connected */
128/* Expects a prime number p in range 2 <= p <= 2^64-1 */
129
130# if defined(__cplusplus)
131}
132# endif
133
134#endif /* _aring_h_ */
135
136// Local Variables:
137// indent-tabs-mode: nil
138// End:
M2_arrayintOrNull rawARingGFPolynomial(const Ring *R)
const Ring * rawARingGaloisFieldFlintBig(const RingElement *prim)
Definition aring.cpp:98
const Ring * rawARingGaloisField1(const RingElement *prim)
Definition aring.cpp:85
const Ring * rawARingGaloisField(int p, int n)
Definition aring.cpp:138
const RingElement * rawMultiplicativeGenerator(const Ring *R)
const Ring * rawARingTower3(const Ring *R1, engine_RawRingElementArray eqns)
Definition aring.cpp:346
const Ring * rawARingQQFlint()
Definition aring.cpp:37
const Ring * rawARingZZFlint()
Definition aring.cpp:32
const Ring * rawARingTower2(const Ring *R1, M2_ArrayString new_names)
Definition aring.cpp:321
const Ring * rawARingZZp(unsigned long p)
Definition aring.cpp:42
const Ring * rawARingZZpFlint(unsigned long p)
Definition aring.cpp:51
M2_arrayintOrNull rawARingGFCoefficients(const RingElement *f)
const Ring * rawARingGaloisFieldFromQuotient(const RingElement *prim)
const Ring * rawARingGaloisFieldFlintZech(const RingElement *prim)
Definition aring.cpp:112
const Ring * rawARingTower1(const Ring *K, M2_ArrayString names)
Definition aring.cpp:296
const Ring * R
Definition relem.hpp:68
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
xxx xxx xxx
Definition ring.hpp:102
Engine-wide include prelude — a single point of truth for portability shims.
int p
const Ring * rawARingTower1(const Ring *K, M2_ArrayString names)
Definition aring.cpp:296
M2_arrayint M2_arrayintOrNull
Definition m2-types.h:99
Definition aring-CC.cpp:3