@Test public void testSpanCreation () { Span[] s1 = new Span[4]; Span[] s2 = new Span[4]; int[] a = new int[2]; int[] b = {41,47,100,128,150,157}; s1[0] = new Span(b); a[0] = 100; a[1] = 128; s1[1] = new Span(a); a[0] = 116; a[1] = 128; s1[2] = new Span(a); a[0] = 150; a[1] = 157; s1[3] = new Span(a); int[] c = {41,49,100,128}; s2[0] = new Span(c); a[0] = 100; a[1] = 128; s2[1] = new Span(a); a[0] = 110; a[1] = 128; s2[2] = new Span(a); a[0] = 200; a[1] = 208; s2[3] = new Span(a); SpanAlignment sa = new SpanAlignment (s1, s2); int[] id1 = sa.get1(); String line1 = IntStream.of(sa.get1()).boxed().map(i -> i.toString()).collect(Collectors.joining(" ")); assertEquals("1 2 3 4", line1); log.info( line1 ); String line2 = IntStream.of(sa.get2()).boxed().map(i -> i.toString()).collect(Collectors.joining(" ")); assertEquals("1 2 3 5", line2); log.info( line2 ); }
public String toString () { StringBuffer sb = new StringBuffer(); for (int i[] : s) sb.append(i[0]).append("-").append(i[1]).append(":"); sb.deleteCharAt(sb.length()-1); return sb.toString(); }
Span { public String toString () { StringBuffer sb = new StringBuffer(); for (int i[] : s) sb.append(i[0]).append("-").append(i[1]).append(":"); sb.deleteCharAt(sb.length()-1); return sb.toString(); } }
Span { public String toString () { StringBuffer sb = new StringBuffer(); for (int i[] : s) sb.append(i[0]).append("-").append(i[1]).append(":"); sb.deleteCharAt(sb.length()-1); return sb.toString(); } Span();  Span(int[] i);  Span(String str); }
Span { public String toString () { StringBuffer sb = new StringBuffer(); for (int i[] : s) sb.append(i[0]).append("-").append(i[1]).append(":"); sb.deleteCharAt(sb.length()-1); return sb.toString(); } Span();  Span(int[] i);  Span(String str); int size(); int length(); int[] get(int i); Span tail(); static double score(Span s1, Span s2); double gap(); String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
Span { public String toString () { StringBuffer sb = new StringBuffer(); for (int i[] : s) sb.append(i[0]).append("-").append(i[1]).append(":"); sb.deleteCharAt(sb.length()-1); return sb.toString(); } Span();  Span(int[] i);  Span(String str); int size(); int length(); int[] get(int i); Span tail(); static double score(Span s1, Span s2); double gap(); String toString(); @Override boolean equals(Object o); @Override int hashCode();  }