### Question:
SparseBinaryToNetwork { protected void computeCorrelations(List<int[]> profileData, int k) { int numGenes = profileData.size(); topInteractions = new KHeap[numGenes]; for (int i=0; i<numGenes; i++) { topInteractions[i] = new KHeap(k); } System.out.println("computing correlations"); for (int i=0; i<numGenes; i++) { for (int j=0; j<i; j++) { double weight = computeCorrelation(profileData.get(i), profileData.get(j)); topInteractions[i].offer(j, weight); topInteractions[j].offer(i, weight); } } System.out.println("done"); } SparseBinaryToNetwork(int numGenes, int numFeatures); void convert(List<int[]> profileData, int k); Matrix convertToInteractionMatrix(); int dump(PrintWriter writer, String[] geneNames);  }### Answer:
@Test public void testComputeCorrelations() { int numFeatures = 10; int [] g1 = {2,4}; int [] g2 = {3,4,9}; int [] g3 = {}; Vector<int[]> profileData = new Vector<int[]>(); profileData.add(g1); profileData.add(g2); profileData.add(g3); int numGenes = profileData.size(); SparseBinaryToNetwork p2n = new SparseBinaryToNetwork(numGenes, numFeatures); p2n.countNonZerosPerFeature(profileData); p2n.computeFactors(); p2n.computeNegBaseline(); p2n.computeCorrelation(g1, g2); }