public class LearningTask extends java.lang.Object implements ThreadTask
Constructor and Description |
---|
LearningTask(LearningTask copy,
int start,
int end) |
LearningTask(PlasticEnsembleImpl parent,
PlasticEnsembleTermination termination,
int start,
int end) |
Modifier and Type | Method and Description |
---|---|
LearningTask |
clone() |
LearningTask |
clone(PlasticEnsembleImpl parent) |
LearningTask |
clone(PlasticEnsembleImpl parent,
PlasticEnsembleTermination term) |
PlasticEnsembleImpl |
getParent() |
boolean |
isFinished() |
void |
reset(boolean randomize) |
void |
run(float startTime,
float endTime)
Runs the Task, updating the parent Node as needed
|
public LearningTask(PlasticEnsembleImpl parent, PlasticEnsembleTermination termination, int start, int end)
parent
- Parent PlasticEnsemble of this tasktermination
- PlasticEnsembleTermination that this task will learn onstart
- Starting index for the set of terminations to learn onend
- Ending index for the set of terminations to learn onpublic LearningTask(LearningTask copy, int start, int end)
copy
- LearningTask to copy the parent and termination values fromstart
- Starting index for the set of terminations to learn onend
- Ending index for the set of terminations to learn onpublic void reset(boolean randomize)
reset
in interface Resettable
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.Resettable.reset(boolean)
public PlasticEnsembleImpl getParent()
ca.nengo.util.ThreadTask#getParent()
public boolean isFinished()
isFinished
in interface ThreadTask
ThreadTask.isFinished()
public void run(float startTime, float endTime) throws SimulationException
ThreadTask
run
in interface ThreadTask
startTime
- simulation time at which running starts (s)endTime
- simulation time at which running ends (s)SimulationException
- if a problem is encountered while trying to runThreadTask.run(float, float)
public LearningTask clone() throws java.lang.CloneNotSupportedException
clone
in interface ThreadTask
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the superclass does not support cloningpublic LearningTask clone(PlasticEnsembleImpl parent) throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public LearningTask clone(PlasticEnsembleImpl parent, PlasticEnsembleTermination term) throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException