 |
My Project
debian-1:4.1.2-p1+ds-2
|
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 181 of file weight.cc.
193 x = (
int * )
omAlloc(2 * (n + 1) *
sizeof(int));
194 wCall(
s, sl,
x, (
double)2.0 / (
double)n,
R);
195 for (
i = n;
i!=0;
i--)
196 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 107 of file weight.cc.
110 int n, q, npol, mons,
i;
111 int *
A, *xopt, *lpol, *degw;
112 double f1, fx, eps, *rel;
116 lpol = (
int * )
omAlloc((sl + 1) *
sizeof(int));
119 for (
i = n;
i!=0;
i--)
128 q = (n + 1) * mons *
sizeof(
int);
131 degw =
A + (n * mons);
132 memset(degw, 0, mons *
sizeof(
int));
133 for (
i = n;
i!=0;
i--)
135 wNorm(degw, lpol, npol, rel);
136 f1 = (*wFunctional)(degw, lpol, npol, rel, (double)1.0, wNsqr);
139 fx = (double)2.0 * eps;
140 memset(
x, 0, (n + 1) *
sizeof(
int));
143 memcpy(
x + 1, xopt + 1, n *
sizeof(
int));
144 memset(degw, 0, mons *
sizeof(
int));
145 for (
i = n;
i!=0;
i--)
154 for (
i = n;
i!=0;
i--)
◆ wFunctionalBuch()
double wFunctionalBuch |
( |
int * |
degw, |
|
|
int * |
lpol, |
|
|
int |
npol, |
|
|
double * |
rel, |
|
|
double |
wx, |
|
|
double |
wNsqr |
|
) |
| |
Definition at line 77 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
THREAD_VAR 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)
THREAD_VAR 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
EXTERN_VAR short * ecartWeights