All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sim.gradDesc.GradDesc

java.lang.Object
   |
   +----sim.Experiment
           |
           +----sim.gradDesc.GradDesc

public abstract class GradDesc
extends Experiment
This object performs some form of gradient descent. The run() method repeatedly changes x until a local minimum of f(x) is reached.

This code is (c) 1996 Leemon Baird <leemon@cs.cmu.edu>, http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely. If the code is modified, please state so in the comments.

Version:
1.0, 25 June 96
Author:
Leemon Baird

Variable Index

 o watchManager
the watchManager that watches these variables
 o wmName
the prefix string for the name of every watched variable (passed in to setWatchManager)

Constructor Index

 o GradDesc()

Method Index

 o BNF(int)
 o getName()
Return the variable "name" that was passed into setWatchManager
 o getParameters(int)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
 o getWatchManager()
Return the WatchManager set by setWatchManager().
 o parse(Parser, int)
Parse the input file to get the parameters for this object.
 o run()
repeatedly change x until f(x) reaches a local minimum
 o setWatchManager(WatchManager, String)
Register all variables with this WatchManager.
 o unparse(Unparser, int)
Output a description of this object that can be parsed with parse().

Variables

 o watchManager
 protected WatchManager watchManager
the watchManager that watches these variables

 o wmName
 protected String wmName
the prefix string for the name of every watched variable (passed in to setWatchManager)

Constructors

 o GradDesc
 public GradDesc()

Methods

 o run
 public abstract void run()
repeatedly change x until f(x) reaches a local minimum

Overrides:
run in class Experiment
 o setWatchManager
 public void setWatchManager(WatchManager wm,
                             String name)
Register all variables with this WatchManager. This will be called after all parsing is done.

Overrides:
setWatchManager in class Experiment
 o getName
 public String getName()
Return the variable "name" that was passed into setWatchManager

Overrides:
getName in class Experiment
 o getWatchManager
 public WatchManager getWatchManager()
Return the WatchManager set by setWatchManager().

Overrides:
getWatchManager in class Experiment
 o getParameters
 public Object[][] getParameters(int lang)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.

Overrides:
getParameters in class Experiment
See Also:
getParameters
 o BNF
 public String BNF(int lang)
Overrides:
BNF in class Experiment
 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 Experiment
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 Experiment

All Packages  Class Hierarchy  This Package  Previous  Next  Index