#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cf_assert.h"
#include "cf_defs.h"
#include "gf_tabutil.h"
#include "cf_util.h"
#include "canonicalform.h"
#include "variable.h"
#include "gfops.h"
#include "singext.h"
Go to the source code of this file.
◆ gf_get_table()
static void gf_get_table |
( |
int |
p, |
|
|
int |
n |
|
) |
| |
|
static |
Definition at line 76 of file gfops.cc.
95 sprintf( buffer,
"gftables/%d", q);
99 strcat(gffilename,buffer);
100 inputfile = fopen( gffilename,
"r" );
104 sprintf( buffer,
"gftables/%d", q );
107 inputfile = fopen( buffer,
"r" );
109 inputfile =
feFopen( buffer,
"r" );
114 fprintf(stderr,
"can not open GF(q) addition table: %s\n",gffilename);
123 STICKYASSERT( strcmp( buffer,
"@@ factory GF(q) table @@\n" ) == 0,
"illegal table" );
127 STICKYASSERT( success,
"illegal table (reading p and n)" );
128 sscanf( buffer,
"%d %d", &pFile, &nFile );
132 bufptr = (
char *)strchr( buffer,
';' ) + 2;
135 sscanf( bufptr,
"%d", &
degree );
136 bufptr = (
char *)strchr( bufptr,
' ' ) + 1;
140 sscanf( bufptr,
"%d",
mipo +
i );
141 bufptr = (
char *)strchr( bufptr,
' ' ) + 1;
155 STICKYASSERT( strlen( buffer ) - 1 == (
size_t)digs * 30,
"illegal table" );
158 while (
i <
gf_q &&
k < 30 )
175 (void)fclose( inputfile );
#define STICKYASSERT(expression, message)
int ipower(int b, int m)
int ipower ( int b, int m )
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
int convertback62(char *p, int n)
int gf_tab_numdigits62(int q)
STATIC_VAR char * gftable_dir
VAR unsigned short * gf_table
static CanonicalForm intVec2CF(int degree, int *coeffs, int level)
INST_VAR CanonicalForm gf_mipo
void * malloc(size_t size)
◆ gf_gf2ff() [1/2]
◆ gf_gf2ff() [2/2]
◆ gf_isff() [1/2]
Definition at line 264 of file gfops.cc.
int gf_power(int a, int n)
◆ gf_isff() [2/2]
◆ gf_setcharacteristic()
void gf_setcharacteristic |
( |
int |
p, |
|
|
int |
n, |
|
|
char |
name |
|
) |
| |
Definition at line 202 of file gfops.cc.
204 ASSERT( gf_valid_combination(
p, n ),
"illegal immediate GF(q)" );
#define ASSERT(expression, message)
static void gf_get_table(int p, int n)
int name
New type name for int.
◆ intVec2CF()
static CanonicalForm intVec2CF |
( |
int |
degree, |
|
|
int * |
coeffs, |
|
|
int |
level |
|
) |
| |
|
static |
Definition at line 58 of file gfops.cc.
factory's class for variables
The main handler for Singular numbers which are suitable for Singular polynomials.
◆ set_gftable_dir()
void set_gftable_dir |
( |
char * |
d | ) |
|
◆ gf_m1
◆ gf_maxbuffer
const int gf_maxbuffer = 200 |
◆ gf_maxtable
const int gf_maxtable = 63001 |
◆ gf_mipo
◆ gf_n
◆ gf_name
◆ gf_p
◆ gf_primes_len
const int gf_primes_len = 42 |
◆ gf_q
◆ gf_q1
◆ gf_table
VAR unsigned short* gf_table = 0 |
◆ gftable_dir