All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sim.funApp.InterferenceFunction

java.lang.Object
   |
   +----sim.funApp.FunApp
           |
           +----sim.funApp.InterferenceFunction

public class InterferenceFunction
extends FunApp

Variable Index

 o function
 o origFunction

Constructor Index

 o InterferenceFunction()

Method Index

 o BNF(int)
Return the BNF description of how to parse the parameters of this object.
 o clone()
Make an exact duplicate of this class.
 o cloneVars(FunApp)
After making a copy of self during a clone(), call cloneVars() to copy variables into the copy, then return super.cloneVars(copy).
 o evaluate()
calculate the output for the given input.
 o findGradients()
Calculate the output and gradient for a given input.
 o findHessian()
Calculate the output, gradient, and Hessian for a given input.
 o nWeights(int, int)
Return # weights needed for nIn inputs (including the first one which is always 1.0), and nOut outputs.
 o parse(Parser, int)
Parse the input file to get the parameters for this object.
 o setIO(MatrixD, MatrixD, MatrixD, MatrixD, MatrixD, MatrixD, MatrixD, MatrixD, MatrixD)
Define the MatrixD objects that will be used by evaluate() and findGradients().
 o unparse(Unparser, int)
Output a description of this object that can be parsed with parse().

Variables

 o function
 protected FunApp function
 o origFunction
 protected FunApp origFunction

Constructors

 o InterferenceFunction
 public InterferenceFunction()

Methods

 o setIO
 public void setIO(MatrixD inVect,
                   MatrixD outVect,
                   MatrixD weights,
                   MatrixD dEdIn,
                   MatrixD dEdOut,
                   MatrixD dEdWeights,
                   MatrixD dEdIndIn,
                   MatrixD dEdOutdOut,
                   MatrixD dEdWeightsdWeights) throws MatrixException
Define the MatrixD objects that will be used by evaluate() and findGradients(). All 9 should be column vectors (n by 1 matrices). All the MatrixD objects are copied, but the pointers still point to the same data arrays.

Throws: MatrixException
if vector shapes don't match
Overrides:
setIO in class FunApp
 o evaluate
 public void evaluate()
calculate the output for the given input. Also calculates Ap and App because it is appropriate to do so eventhough they are not used until backward pass

Overrides:
evaluate in class FunApp
 o findGradients
 public void findGradients()
Calculate the output and gradient for a given input. This does everything evaluate() does, plus it calculates the gradient of the error with respect to the inputs and weights, dEdx and dEdw, User must set dEdOut before calling. User must set dEdOut before calling.

Overrides:
findGradients in class FunApp
 o findHessian
 public void findHessian()
Calculate the output, gradient, and Hessian for a given input. This does everything evaluate() and findGradients() do, plus it calculates the Hessian of the error with resepect to the the weights and inputs, dEdxdx, dEdwdx, and dEdwdw. User must set dEdOut and dEdOutdOut before calling.

Overrides:
findHessian in class FunApp
 o nWeights
 public int nWeights(int nIn,
                     int nOut)
Return # weights needed for nIn inputs (including the first one which is always 1.0), and nOut outputs.

Overrides:
nWeights in class FunApp
 o BNF
 public String BNF(int lang)
Return the BNF description of how to parse the parameters of this object.

Overrides:
BNF in class FunApp
 o unparse
 public void unparse(Unparser u,
                     int lang)
Output a description of this object that can be parsed with parse().

Overrides:
unparse in class FunApp
See Also:
Parsable
 o parse
 public Object parse(Parser p,
                     int lang) throws ParserException
Parse the input file to get the parameters for this object.

Throws: ParserException
parser didn't find the required token
Overrides:
parse in class FunApp
 o clone
 public Object clone()
Make an exact duplicate of this class. For objects it contains, it only duplicates the pointers, not the objects they point to. For a new FunApp called MyFunApp, the code in this method should be the single line: return cloneVars(new MyFunApp());

Overrides:
clone in class FunApp
 o cloneVars
 public Object cloneVars(FunApp copy)
After making a copy of self during a clone(), call cloneVars() to copy variables into the copy, then return super.cloneVars(copy). The variables copied are just those set in parse() and setWatchManager(). The caller will be required to call setIO to set up the rest of the variables.

Overrides:
cloneVars in class FunApp

All Packages  Class Hierarchy  This Package  Previous  Next  Index