statalign.postprocess.plugins.contree
Class CNetwork

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

public class CNetwork
extends java.lang.Object

The Consensus network

Author:
wood

Field Summary
 java.util.ArrayList<CNetworkNode> nodes
           
 int noOfTaxa
           
 java.lang.String outputString
           
 java.util.ArrayList<CNetworkSplit> splits
           
 
Constructor Summary
CNetwork(int noOfTaxa)
          Constructs a new Consensus Network.
 
Method Summary
 void FindPositions(int noOfTaxa)
          Calculates positions for network nodes and edges linking them to output to the network visualiser.
 void PrintOut(int function, int noOfTaxa, TaxaMap taxa)
          Prints out the network in Nexus format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputString

public java.lang.String outputString

splits

public java.util.ArrayList<CNetworkSplit> splits

nodes

public java.util.ArrayList<CNetworkNode> nodes

noOfTaxa

public int noOfTaxa
Constructor Detail

CNetwork

public CNetwork(int noOfTaxa)
Constructs a new Consensus Network.

Parameters:
noOfTaxa - The number of taxa in the network.
Method Detail

PrintOut

public void PrintOut(int function,
                     int noOfTaxa,
                     TaxaMap taxa)
              throws java.io.IOException
Prints out the network in Nexus format. Can be read by SplitsTree 4

Parameters:
function - 1 - print as splits, 2 - print drawn network as calculated
noOfTaxa - The number of taxa in the network.
taxa - the map of taxa indices to names
Throws:
java.io.IOException

FindPositions

public void FindPositions(int noOfTaxa)
Calculates positions for network nodes and edges linking them to output to the network visualiser.

Parameters:
noOfTaxa - The number of taxa in the network