statalign.postprocess.plugins.contree
Class CNetworkPath

java.lang.Object
  extended by statalign.postprocess.plugins.contree.CNetworkPath

public class CNetworkPath
extends java.lang.Object

Paths of incompatible splits in the consensus network

Author:
wood

Field Summary
 java.util.ArrayList<CNetworkEdge> pathOfEdges
           
 java.util.ArrayList<CNetworkNode> pathOfNodes
           
 
Constructor Summary
CNetworkPath()
           
 
Method Summary
 boolean checkForSplit(CNetworkEdge edgeToLookFor)
          Returns true if this path already contains an edge from the argument split, otherwise false.
 CNetworkPath combineWith(CNetworkPath toAdd, CNetworkNode nodeToLinkOver)
          Combines this path with the argument path across the argument node
 CNetworkNode endNode()
          Returns the node at the end of the path
 boolean isSplitSide(CNetworkSplit inputSplit, int noOfTaxa)
          This function sees if adjoining splits at the nodes at the path ends create subsets on both sides of the input split...
 CNetworkPath reordered()
          Reorders this path
 CNetworkNode startNode()
          Returns the node at the start of the path
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pathOfEdges

public java.util.ArrayList<CNetworkEdge> pathOfEdges

pathOfNodes

public java.util.ArrayList<CNetworkNode> pathOfNodes
Constructor Detail

CNetworkPath

public CNetworkPath()
Method Detail

startNode

public CNetworkNode startNode()
Returns the node at the start of the path


endNode

public CNetworkNode endNode()
Returns the node at the end of the path


checkForSplit

public boolean checkForSplit(CNetworkEdge edgeToLookFor)
Returns true if this path already contains an edge from the argument split, otherwise false.

Parameters:
edgeToLookFor - Edge from split we want to see is already present in path or not

combineWith

public CNetworkPath combineWith(CNetworkPath toAdd,
                                CNetworkNode nodeToLinkOver)
Combines this path with the argument path across the argument node

Parameters:
toAdd - Path to add to this one
nodeToLinkOver - Node over which to link (ensures non-duplication of this node)

reordered

public CNetworkPath reordered()
Reorders this path


isSplitSide

public boolean isSplitSide(CNetworkSplit inputSplit,
                           int noOfTaxa)
This function sees if adjoining splits at the nodes at the path ends create subsets on both sides of the input split... Is to see is path actually links two nodes from where the split occurs. Returns true if is a desired split path otherwise false.

Parameters:
inputSplit - Split that is being added and must create splits in some of the edges joining the end nodes
noOfTaxa - Standard request for number of taxa in the network