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
-
watchManager
- the watchManager that watches these variables
-
wmName
- the prefix string for the name of every watched variable (passed in to setWatchManager)
-
GradDesc()
-
-
BNF(int)
-
-
getName()
- Return the variable "name" that was passed into setWatchManager
-
getParameters(int)
- Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
-
getWatchManager()
- Return the WatchManager set by setWatchManager().
-
parse(Parser, int)
- Parse the input file to get the parameters for this object.
-
run()
- repeatedly change x until f(x) reaches a local minimum
-
setWatchManager(WatchManager, String)
- Register all variables with this WatchManager.
-
unparse(Unparser, int)
- Output a description of this object that can be parsed with parse().
watchManager
protected WatchManager watchManager
- the watchManager that watches these variables
wmName
protected String wmName
- the prefix string for the name of every watched variable (passed in to setWatchManager)
GradDesc
public GradDesc()
run
public abstract void run()
- repeatedly change x until f(x) reaches a local minimum
- Overrides:
- run in class Experiment
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
getName
public String getName()
- Return the variable "name" that was passed into setWatchManager
- Overrides:
- getName in class Experiment
getWatchManager
public WatchManager getWatchManager()
- Return the WatchManager set by setWatchManager().
- Overrides:
- getWatchManager in class Experiment
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
BNF
public String BNF(int lang)
- Overrides:
- BNF in class Experiment
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
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