jpayne@68: package fun; jpayne@68: jpayne@68: public class ProbShared { jpayne@68: jpayne@68: public static void main(String args[]){ jpayne@68: int k=Integer.parseInt(args[0]); jpayne@68: int len1=Integer.parseInt(args[1]); jpayne@68: int len2=Integer.parseInt(args[2]); jpayne@68: jpayne@68: System.out.println("Cardinality 1: "+cardinality(k, len1)); jpayne@68: System.out.println("Cardinality 2: "+cardinality(k, len2)); jpayne@68: System.out.println("Probability: "+probIntersect(k, len1, len2)); jpayne@68: jpayne@68: } jpayne@68: jpayne@68: static int cardinality(int k, int seqLength){ jpayne@68: double space=Math.pow(4, k); jpayne@68: int kmers=seqLength-k+1; jpayne@68: double unique=0; jpayne@68: for(int i=0; i