|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGenFn
public class GenFn
Class GenFn computes approximations to a function λ(z) to
be used in Theorem 3.3, for a specified transition function file,
and then computes the corresponding bounds on γ.
In
the comments in the code, the notation APPROX(e,n), where e is
some expression and n is an integer, denotes the statement that
the ratio between the computed numerical value of e and the exact
value the expression e would have if all arithmetic were exact
(starting with the given value of z
and the computed
values of v
) lies in
(ρ-n,ρn), where
ρ=1+2-52.
Field Summary | |
---|---|
(package private) int |
h
The history length. |
(package private) double |
maxRatio
The maximum ratio by which any component of v increases this iteration. |
(package private) double |
minRatio
The minimum ratio by which any component of v increases this iteration. |
(package private) int |
numberOfAcceptingStates
The number of states, not including the rejecting state |
static double |
TOLERANCE
The factor controlling how close the ratios between elements of two successive vectors must be before we stop iterating. |
(package private) double[] |
v
The last approximation to an eigenvector of Az; see Section 3.1 in the paper. |
(package private) static int |
verbosity
This controls the level of output. |
(package private) double[] |
vNew
The next approximation to an eigenvector of Az. |
(package private) double[] |
wmuz
wmuz is computed in method lambda by
wmuz[h+i] = wμ,z(Tc,i),
where wμ,z is as defined in Section 3.1, and μ and
Tc,i are as defined in the overview of the code. |
Constructor Summary | |
---|---|
GenFn(java.lang.String filename)
Initialize the structure to compute λ values corresponding to the transition function represented in file filename . |
Method Summary | |
---|---|
void |
dumpEigen(double z)
Dump the current approximation to the eigenvector to the file eigen<h>.bin. |
void |
iterate()
Carry out one iteration: multiply Az and v, and rescale. |
double |
lambda(double z)
Compute a numerical approximation to the λ(z) in Theorem 3.3, using the machine encoded in the file filename . |
static void |
logbase(double x,
double b,
double eb,
int denom)
Compute and print an integer value p such that logbx≤p/denom, attempting to make p as small as possible so that the round-off error verification described in Section 3.2.2 can be performed. |
static void |
main(java.lang.String[] args)
The main program is used with the command GenFn <filename> <z0> <z1>
<zdelta> For each z in the range z0 to
z1 , with a step size of zdelta , it
computes lambda(z) and the resulting upper bound on γ,
using the transition function stored in
./data/filename . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static int verbosity
public static final double TOLERANCE
int h
int numberOfAcceptingStates
double[] v
double[] vNew
v
.
double minRatio
double maxRatio
double[] wmuz
wmuz
is computed in method lambda by
wmuz[h+i]
= wμ,z(Tc,i),
where wμ,z is as defined in Section 3.1, and μ and
Tc,i are as defined in the overview of the code.
Constructor Detail |
---|
public GenFn(java.lang.String filename) throws java.io.IOException
filename
.
java.io.IOException
Method Detail |
---|
public double lambda(double z) throws java.io.IOException
filename
.
java.io.IOException
public void iterate() throws java.io.IOException
java.io.IOException
public static void logbase(double x, double b, double eb, int denom)
public void dumpEigen(double z) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
GenFn <filename> <z0> <z1>
<zdelta>
z
in the range z0
to
z1
, with a step size of zdelta
, it
computes lambda(z) and the resulting upper bound on γ,
using the transition function stored in
./data/filename
.
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |