fplll 5.4.5
fplll
pruner
pruner_simplex.h
Go to the documentation of this file.
1
5
template
<
class
FT>
inline
FT
Pruner<FT>::eval_poly
(
const
int
ld,
/*i*/
const
poly &p,
const
FT x)
6
{
7
FT acc;
8
acc = 0.0;
9
for
(
int
i = ld; i >= 0; --i)
10
{
11
acc = acc * x;
12
acc = acc + p[i];
13
}
14
return
acc;
15
}
16
17
template
<
class
FT>
inline
void
Pruner<FT>::integrate_poly
(
const
int
ld,
/*io*/
poly &p)
18
{
19
for
(
int
i = ld; i >= 0; --i)
20
{
21
FT tmp;
22
tmp = i + 1.;
23
p[i + 1] = p[i] / tmp;
24
}
25
p[0] = 0.0;
26
}
27
31
template
<
class
FT>
32
inline
FT
Pruner<FT>::relative_volume
(
const
int
rd,
33
/*i*/
const
evec &b)
34
{
35
poly P(rd + 1);
36
P[0] = 1;
37
int
ld = 0;
38
for
(
int
i = rd - 1; i >= 0; --i)
39
{
40
integrate_poly(ld, P);
41
ld++;
42
P[0] = -1.0 * eval_poly(ld, P, b[i] / b[rd - 1]);
43
}
44
FT res = P[0] * tabulated_factorial[rd];
45
return
(rd % 2) ? -res : res;
46
}
Pruner
Pruner class, to compute and optimize cost and success probability of pruned enumeration.
Definition:
pruner.h:273
Generated by
1.9.4