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

Variable Index

 o havCUBE
Value = 3.
 o havFALSE
Value = 0.
 o havHERMITE
Value = 4.
 o havHIDDEN
Value = 1.
 o havHTAN
Value = 1.
 o havINPUT
Value = 0.
 o havLINEAR
Value = 2.
 o havOFF
Value = 1.
 o havON
Value = 0.
 o havOUTPUT
Value = 2.
 o havQUAD
Value = 4.
 o havSIGMOID
Value = 0.
 o havSIN
Value = 3.
 o havSQUARED
Value = 2.
 o havTRUE
Value = 1.

Constructor Index

 o havSys()

Method Index

 o havexp(double)
General utility used for data and response UN-scaling - assumes f = 1.
 o havexp(double, double)
General utility used for data and response UN-scaling.
 o havlog(double)
General utility used to for data and response scalling - assumes f1.
 o havlog(double, double)
General utility used for data and response scalling.
 o mk1d(long, int[], int[])
This general utility function will calculate a 1d index value from an Nd specification.
 o mkNd(int, int, int[], int[])
This utility function will calculate an Nd index from a 1d index specification.
 o readDouble(StreamTokenizer)
General utility for reading a Double value from a file.
 o readInt(StreamTokenizer)
General utility for reading an Integer value from a file.
 o sign_of(double)
This utility function will return the sign of the input as +/- 1 or 0 if the input is 0.

Variables

 o havFALSE
 public static final int havFALSE
Value = 0.

 o havTRUE
 public static final int havTRUE
Value = 1.

 o havON
 public static final int havON
Value = 0.

 o havOFF
 public static final int havOFF
Value = 1.

 o havINPUT
 public static final int havINPUT
Value = 0.

 o havHIDDEN
 public static final int havHIDDEN
Value = 1.

 o havOUTPUT
 public static final int havOUTPUT
Value = 2.

 o havSIGMOID
 public static final int havSIGMOID
Value = 0.

 o havHTAN
 public static final int havHTAN
Value = 1.

 o havLINEAR
 public static final int havLINEAR
Value = 2.

 o havSIN
 public static final int havSIN
Value = 3.

 o havHERMITE
 public static final int havHERMITE
Value = 4.

 o havSQUARED
 public static final int havSQUARED
Value = 2.

 o havCUBE
 public static final int havCUBE
Value = 3.

 o havQUAD
 public static final int havQUAD
Value = 4.

Constructors

 o havSys
 public havSys()

Methods

 o 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.
 o 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
 o 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.
 o 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
 o 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
 o 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.
 o 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.

 o 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.
 o 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.