* @param rate learning rate
* @param oja whether or not to use Oja smoothing
*/
public void learn(String learnTerm, String modTerm, float rate, boolean oja) {
for(int i=0; i < myNumNodes; i++) {
PESTermination term;
try {
term = (PESTermination)myNodes[i].getTermination(learnTerm);
}
catch(StructuralException se) {
//term does not exist on this node
term=null;
}
catch(ClassCastException se) {
//term is not a PESTermination
term=null;
}
if(term != null) {
term.setLearningRate(rate);
term.setOja(oja);
term.setOriginName("X");
term.setModTermName(modTerm);
}
}
}