 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
Go to the source code of this file.
|
void | kEcartWeights (poly *s, int sl, short *eweight, const ring R) |
|
long | maxdegreeWecart (poly p, int *l, ring r) |
|
long | totaldegreeWecart (poly p, ring r) |
|
long | totaldegreeWecart_IV (poly p, ring r, const short *w) |
|
short * | iv2array (intvec *iv, const ring R) |
|
double | wFunctionalBuch (int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr) |
|
void | wCall (poly *s, int sl, int *x, double wNsqr, const ring R) |
|
◆ iv2array()
◆ kEcartWeights()
void kEcartWeights |
( |
poly * |
s, |
|
|
int |
sl, |
|
|
short * |
eweight, |
|
|
const ring |
R |
|
) |
| |
Definition at line 188 of file weight.cc.
199 x = (
int * )
omAlloc(2 * (n + 1) *
sizeof(int));
200 wCall(
s, sl,
x, (
double)2.0 / (
double)n,
R);
201 for (
i = n;
i!=0;
i--)
202 eweight[
i] =
x[
i + n + 1];
◆ maxdegreeWecart()
long maxdegreeWecart |
( |
poly |
p, |
|
|
int * |
l, |
|
|
ring |
r |
|
) |
| |
◆ totaldegreeWecart()
long totaldegreeWecart |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
◆ totaldegreeWecart_IV()
long totaldegreeWecart_IV |
( |
poly |
p, |
|
|
ring |
r, |
|
|
const short * |
w |
|
) |
| |
◆ wCall()
void wCall |
( |
poly * |
s, |
|
|
int |
sl, |
|
|
int * |
x, |
|
|
double |
wNsqr, |
|
|
const ring |
R |
|
) |
| |
Definition at line 114 of file weight.cc.
116 int n, q, npol, mons,
i;
117 int *
A, *xopt, *lpol, *degw;
118 double f1, fx, eps, *rel;
122 lpol = (
int * )
omAlloc((sl + 1) *
sizeof(int));
125 for (
i = n;
i!=0;
i--)
134 q = (n + 1) * mons *
sizeof(
int);
137 degw =
A + (n * mons);
138 memset(degw, 0, mons *
sizeof(
int));
139 for (
i = n;
i!=0;
i--)
141 wNorm(degw, lpol, npol, rel);
142 f1 = (*wFunctional)(degw, lpol, npol, rel, (double)1.0, wNsqr);
145 fx = (double)2.0 * eps;
146 memset(
x, 0, (n + 1) *
sizeof(
int));
149 memcpy(
x + 1, xopt + 1, n *
sizeof(
int));
150 memset(degw, 0, mons *
sizeof(
int));
151 for (
i = n;
i!=0;
i--)
160 for (
i = n;
i!=0;
i--)
◆ wFunctionalBuch()
double wFunctionalBuch |
( |
int * |
degw, |
|
|
int * |
lpol, |
|
|
int |
npol, |
|
|
double * |
rel, |
|
|
double |
wx, |
|
|
double |
wNsqr |
|
) |
| |
Definition at line 78 of file weight0.c.
81 int i,
j, ecl, ecu, ec;
83 double gfmax, ghom, pfmax;
90 for (
i = 0;
i < npol;
i++)
93 for (
j = lpol[
i] - 1;
j!=0 ;
j--)
101 pfmax = (double)ecl / (
double)ecu;
104 gfmax += (double)(ecu * ecu) * (*r++);
106 if (ghom > (
double)0.5)
107 gfmax *= ((double)1.0 - (ghom * ghom)) / (
double)0.75;
108 return gfmax /
pow(wx, wNsqr);
◆ ecartWeights
◆ wFunctional
double(* wFunctional) (int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr) |
static int si_min(const int a, const int b)
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
void wAdd(int *A, int mons, int kn, int xx, int rvar)
long totaldegreeWecart(poly p, ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
#define omFreeSize(addr, size)
void wSecondSearch(int *A, int *x, int *lpol, int npol, int mons, double *rel, double *fk, double wNsqr, int rvar)
double wFunctionalMora(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
static int max(int a, int b)
double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
static void wDimensions(poly *s, int sl, int *lpol, int *npol, int *mons)
void wFirstSearch(int *A, int *x, int mons, int *lpol, int npol, double *rel, double *fopt, double wNsqr, int rvar)
Rational pow(const Rational &a, int e)
void wNorm(int *degw, int *lpol, int npol, double *rel)
static void wInit(poly *s, int sl, int mons, int *A, const ring R)
const CanonicalForm int s