|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NetNode<T>
This interface defines basic methods that a network node must implement.
| Field Summary | |
|---|---|
static double |
NO_DISTANCE
|
static java.lang.String |
NO_NAME
|
| Method Summary | |
|---|---|
void |
addGamma(double gamma)
This function adds the gamma value stored in this node. |
boolean |
adoptChild(NetNode<T> child,
double distance)
This function connects an existing node (the node that makes a call to this function) to another node child. |
boolean |
adoptChild(NetNode<T> child,
double distance,
double gamma)
This function connects an existing node (the node that makes a call to this function) to another node child. |
java.lang.Iterable<NetNode<T>> |
getChildren()
|
T |
getData()
|
double |
getGamma(int index)
This function returns the gamma value stored in this node. |
double |
getGamma(NetNode<T> child)
This function returns the gamma value stored in this node. |
int |
getIndeg()
|
java.lang.String |
getName()
|
int |
getOutdeg()
|
double |
getParentDistance(NetNode<T> parent)
|
int |
getParentNumber()
This function returns the number of parent of a node. |
java.lang.Iterable<NetNode<T>> |
getParents()
|
boolean |
isLeaf()
|
boolean |
isNetworkNode()
|
boolean |
isRoot()
|
boolean |
isTreeNode()
|
boolean |
removeChild(NetNode<T> child)
This function makes child no longer a child of this node. |
void |
setData(T data)
This function updates data stored in this node. |
void |
setGamma(int index,
double gamma)
This function updates the gamma value stored in this node. |
void |
setName(java.lang.String name)
This function changes the name of an existing node. |
boolean |
setParentDistance(NetNode<T> parent,
double distance)
This functions sets the distance from this calling node to parent with
the new value newDistance. |
| Field Detail |
|---|
static final double NO_DISTANCE
static final java.lang.String NO_NAME
| Method Detail |
|---|
java.lang.Iterable<NetNode<T>> getChildren()
boolean isRoot()
true if the node is the root of the network.boolean isLeaf()
true if the node is a leaf; false otherwise.boolean isTreeNode()
true if this node is a tree node, i.e. it has only one parent.boolean isNetworkNode()
true if this node is a network node, i.e. it has more than one parent.java.lang.Iterable<NetNode<T>> getParents()
double getParentDistance(NetNode<T> parent)
parent: - The parent of this node.
parent; NaN if parent
is not in the list of parents of this node.int getIndeg()
int getOutdeg()
java.lang.String getName()
T getData()
boolean adoptChild(NetNode<T> child,
double distance)
child. The calling code will add child
to its list of children if child has not been already a child of the calling node.
child: - The node that the calling node wants to connects to.distance: - The distance between the calling code and child.
true if this function succeeded; false otherwise.
boolean adoptChild(NetNode<T> child,
double distance,
double gamma)
child. The calling code will add child
to its list of children if child has not been already a child of the calling node.
child: - The node that the calling node wants to connects to.distance: - The distance between the calling code and child.gamma: - The alleles proportion.
true if this function succeeded; false otherwise.boolean removeChild(NetNode<T> child)
child no longer a child of this node.
child: - The node to be removed.void setName(java.lang.String name)
name: - The new name for the calling node.void setData(T data)
data - is the new data.
boolean setParentDistance(NetNode<T> parent,
double distance)
parent with
the new value newDistance.
parent: - A parent of this node that it wants to modify the distance.distance: - New value for the distance from this node to parent.void addGamma(double gamma)
gamma - is the new gamma.
void setGamma(int index,
double gamma)
gamma - is the new gamma.double getGamma(int index)
double getGamma(NetNode<T> child)
int getParentNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||