statalign.postprocess.plugins.contree.hash
Class HashUtils

java.lang.Object
  extended by statalign.postprocess.plugins.contree.hash.HashUtils

public class HashUtils
extends java.lang.Object

Details about this class can be found in papers on consensus tree construction algorithms: - An Experimental Analysis of Consensus Tree Algorithm [..]. Seung-Jin Sul et al. 2009. - A Linear-time Majority Tree Algorithm. Amenta et al. 2004.

Author:
eiriksson

Field Summary
 int[] a1
           
 int[] a2
           
 int m1
           
 int m2
           
 
Constructor Summary
HashUtils()
           
 
Method Summary
static int getNextPrime(int n)
          Determines the next prime above or equal to n.
 void initialize(int noOfTaxa, int noOfTrees, int c, long seed)
          Initializes the hash utilities.
static boolean isPrime(long n)
          Determines if a number is a prime or not.
static void main(java.lang.String[] args)
          For debugging purposes only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m1

public int m1

m2

public int m2

a1

public int[] a1

a2

public int[] a2
Constructor Detail

HashUtils

public HashUtils()
Method Detail

initialize

public void initialize(int noOfTaxa,
                       int noOfTrees,
                       int c,
                       long seed)
Initializes the hash utilities.


getNextPrime

public static int getNextPrime(int n)
Determines the next prime above or equal to n.


isPrime

public static boolean isPrime(long n)
Determines if a number is a prime or not.


main

public static void main(java.lang.String[] args)
For debugging purposes only.