|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgpalta.nodes.Node
public abstract class Node
Generic Node definition
Constructor Summary | |
---|---|
Node()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
Node |
deepClone(int currentDepth)
|
abstract double |
eval(DataHolder data)
Evaluate the Node for a sinlge sample. |
protected abstract void |
evalVect(double[] outVect,
double[][] kidOutVect,
DataHolder data)
Evaluate the Node for all samples (vectorial evaluation). |
void |
evalVect(Output out,
TempOutputFactory tempOutputFactory,
DataHolder data)
Evaluate a Node for all samples (vectorial evaluation), using Output objects for storing the results. |
int |
getCurrentDepth()
|
Node |
getKid(int whichKid)
|
int |
getMaxDepthFromHere()
|
int |
getNSubNodes()
|
NodeParent |
getParent()
|
int |
getWhichKidOfParent()
|
void |
init(Config config,
DataHolder data)
Initialize the Node. |
abstract java.lang.String |
name()
Get the Node's short name (such as "plus", "minus", "x1", etc) |
void |
newKids()
|
abstract int |
nKids()
Read the number of kids of the Node |
static java.lang.String |
parse(java.lang.String expression,
NodeParent parent,
int whichKid,
NodeFactory nodeFactory)
|
void |
setCurrentDepth(int currentDepth)
|
void |
setKid(int whichKid,
Node kid)
|
void |
setMaxDepthFromHere(int maxDepthFromHere)
|
void |
setNSubNodes(int nSubNodes)
|
void |
setParent(NodeParent parent)
|
void |
setTypeOfKids(int whichKid,
NodeSet t)
|
void |
setWhichKidOfParent(int whichKidOfParent)
|
java.lang.String |
toString()
|
NodeSet |
typeOfKids(int whichKid)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node()
Method Detail |
---|
public void init(Config config, DataHolder data)
config
- data
- public abstract double eval(DataHolder data)
data
-
public void evalVect(Output out, TempOutputFactory tempOutputFactory, DataHolder data)
out
- tempOutputFactory
- data
- protected abstract void evalVect(double[] outVect, double[][] kidOutVect, DataHolder data)
outVect
- The array where the outout must be storedkidOutVect
- A matrix holding the outputs of this Node's kids. Each row holds the output
for each kiddata
- The problem's datapublic void setTypeOfKids(int whichKid, NodeSet t)
public NodeSet typeOfKids(int whichKid)
typeOfKids
in interface NodeParent
public abstract int nKids()
nKids
in interface NodeParent
public abstract java.lang.String name()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public Node deepClone(int currentDepth)
public static java.lang.String parse(java.lang.String expression, NodeParent parent, int whichKid, NodeFactory nodeFactory)
public int getWhichKidOfParent()
public void setWhichKidOfParent(int whichKidOfParent)
public NodeParent getParent()
getParent
in interface NodeParent
public void setParent(NodeParent parent)
public int getNSubNodes()
getNSubNodes
in interface NodeParent
public void setNSubNodes(int nSubNodes)
setNSubNodes
in interface NodeParent
public Node getKid(int whichKid)
getKid
in interface NodeParent
public void setKid(int whichKid, Node kid)
setKid
in interface NodeParent
public int getCurrentDepth()
getCurrentDepth
in interface NodeParent
public void setCurrentDepth(int currentDepth)
public void newKids()
newKids
in interface NodeParent
public int getMaxDepthFromHere()
getMaxDepthFromHere
in interface NodeParent
public void setMaxDepthFromHere(int maxDepthFromHere)
setMaxDepthFromHere
in interface NodeParent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |