public class StochasticTree.STNode
extends java.lang.Object
Constructor and Description |
---|
STNode(double w)
Initializes a node with a weight only
|
STNode(double w,
StochasticTree.STNode p)
Initializes a node with a given weight and parent node
|
STNode(T el,
double w,
StochasticTree.STNode p)
Initializes a leaf node with the given weight and parent
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLeaf()
Returns true if this is a left node
|
public STNode(T el, double w, StochasticTree.STNode p)
el
- the element of the lead nodew
- the weight of the elementp
- the parent nodepublic STNode(double w)
w
- the weight of the nodepublic STNode(double w, StochasticTree.STNode p)
w
- the weight of the nodep
- the parent pointer