havBpNet:J
|
All Packages Class Hierarchy This Package Previous Next Index
havBpNet:J Home Page
Class havNN.havSystem.havSys
java.lang.Object
|
+----havNN.havSystem.havSys
- public final class havSys
- extends Object
The havBpsys class contains various enumerations of special types or general utility functions
used in various hav.Software products.
- Version:
- 1.1(java) 1/1/98
-
havCUBE
- Value = 3.
-
havFALSE
- Value = 0.
-
havHERMITE
- Value = 4.
-
havHIDDEN
- Value = 1.
-
havHTAN
- Value = 1.
-
havINPUT
- Value = 0.
-
havLINEAR
- Value = 2.
-
havOFF
- Value = 1.
-
havON
- Value = 0.
-
havOUTPUT
- Value = 2.
-
havQUAD
- Value = 4.
-
havSIGMOID
- Value = 0.
-
havSIN
- Value = 3.
-
havSQUARED
- Value = 2.
-
havTRUE
- Value = 1.
-
havSys()
-
-
havexp(double)
- General utility used for data and response UN-scaling - assumes f = 1.
-
havexp(double, double)
- General utility used for data and response UN-scaling.
-
havlog(double)
- General utility used to for data and response scalling - assumes f1.
-
havlog(double, double)
- General utility used for data and response scalling.
-
mk1d(long, int[], int[])
-
This general utility function will calculate a 1d index value from an Nd
specification.
-
mkNd(int, int, int[], int[])
-
This utility function will calculate an Nd index from a 1d index specification.
-
readDouble(StreamTokenizer)
-
General utility for reading a Double value from a file.
-
readInt(StreamTokenizer)
-
General utility for reading an Integer value from a file.
-
sign_of(double)
-
This utility function will return the sign of the input as +/- 1 or 0 if the input is 0.
havFALSE
public static final int havFALSE
- Value = 0.
havTRUE
public static final int havTRUE
- Value = 1.
havON
public static final int havON
- Value = 0.
havOFF
public static final int havOFF
- Value = 1.
havINPUT
public static final int havINPUT
- Value = 0.
havHIDDEN
public static final int havHIDDEN
- Value = 1.
havOUTPUT
public static final int havOUTPUT
- Value = 2.
havSIGMOID
public static final int havSIGMOID
- Value = 0.
havHTAN
public static final int havHTAN
- Value = 1.
havLINEAR
public static final int havLINEAR
- Value = 2.
havSIN
public static final int havSIN
- Value = 3.
havHERMITE
public static final int havHERMITE
- Value = 4.
havSQUARED
public static final int havSQUARED
- Value = 2.
havCUBE
public static final int havCUBE
- Value = 3.
havQUAD
public static final int havQUAD
- Value = 4.
havSys
public havSys()
havlog
public static double havlog(double x,
double f)
- General utility used for data and response scalling.
Full implementation of the so-called mu-law which is useful when the input-
and expected-data values are both positive and negative.
The basic formula for havlog is ...
x' = sign_of(x) * log( (|x|/f) + 1.0)
- Parameters:
- x - The number to be scaled
- f - The OPTIONAL shaping factor - will affect the steepness of the resulting curve.
havlog
public static double havlog(double x)
- General utility used to for data and response scalling - assumes f = 1.
Full implementation of the so-called mu-law which is useful when the input-
and expected-data values are both positive and negative.
The basic formula for havlog is ...
x' = sign_of(x) * log( (|x|/1.0) + 1.0)
- Parameters:
- x - The number to be scaled
havexp
public static double havexp(double x,
double f)
- General utility used for data and response UN-scaling.
Full implementation of the so-called mu-law which is useful when the input-
and expected-data values are both positive and negative.
The basic formula for havexp to un-scale a value, x', that had previously been scaled
using havlog is ...
x = sign_of(x') * (exp(|x'|) - 1.0) * f
- Parameters:
- x - The number to be un-scaled
- f - The OPTIONAL shaping factor - will affect the steepness of the resulting curve.
havexp
public static double havexp(double x)
- General utility used for data and response UN-scaling - assumes f = 1.
Full implementation of the so-called mu-law which is useful when the input-
and expected-data values are both positive and negative.
The basic formula for havexp to un-scale a value, x', that had previously been scaled
using havlog is ...
x = sign_of(x') * (exp(|x'|) - 1.0) * 1.0
- Parameters:
- x - The number to be un-scaled
mk1d
public static int mk1d(long numdims,
int dims[],
int in[])
- This general utility function will calculate a 1d index value from an Nd
specification.
Assumptions: It is assumed that the lower bounds of all dimensions are 0.
Examples:
Imagine that we have a vector of data defined as double a[70] ... but suppose that
we view it logically as a 3d array specified as ...
a[7,5,2] i.e. 0 1 2 3 4 5 6 35 36 37 38 39 40 41
7 8 9 10 11 12 13 42 43 44 45 46 47 48
14 15 16 17 18 19 20 49 50 51 52 53 54 55
21 22 23 24 25 26 27 56 57 58 58 60 61 62
28 29 30 31 32 33 34 63 64 65 66 67 68 69
a(0,0,0) to a(6,4,0) a(0,0,1) to a(6,4,1)
...to get the 1d index of the logical position (3,2,1) - element 52 above - we can use ...
long dims[] = {7, 5, 2}; // max dims of the logical array
long in[3];
. . .
in[0] = 3; // identify the logical position for which we
in[1] = 2; // want the 1d index
in[2] = 1;
. . .
1d_index = mk1d(3, dims, in); // get the 1d index into a
// of the logical index (3,4,2)
Note that the 1d index returned in the example above is...
1d_index = 3 + (2*7) + (1*7*5)
= 3 + 14 + 35
= 52
- Parameters:
- numdims - The number of indicies (i.e. N)
- dims - A list of the size of each of the N dimensions
- in - The Nd index specification to be converted to a 1d index
mkNd
public static void mkNd(int index1D,
int numdims,
int dims[],
int indexND[])
- This utility function will calculate an Nd index from a 1d index specification.
This is the inverse of the mk1D utility function.
- Parameters:
- index1D - is the 1D index to be converted
- numdims - is the number of demensions for the resulting Nd index
- dims - is a dimension vector with (numdims) elements - these are the upper
limit for dimensions - lower limits for all dimensions are assumed to be 0
- indexND - is a caller supplied vector with at least (numdims) elements into
which the resulting Nd index will be placed for return to the caller.
sign_of
public static double sign_of(double x)
- This utility function will return the sign of the input as +/- 1 or 0 if the input is 0.
Maintained for compatability with c++ version.
readInt
public static int readInt(StreamTokenizer fileIn) throws IOException
- General utility for reading an Integer value from a file.
- Throws: IOException
- Exception is thrown if any IO Error occurs.
readDouble
public static double readDouble(StreamTokenizer fileIn) throws IOException
- General utility for reading a Double value from a file.
- Throws: IOException
- Exception is thrown if any IO Error occurs.
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1998 by hav.Software. All Rights Reserved.