@Test public void testIndexChunkerTiledToString() throws InvalidRangeException { Section dataSection = new Section("0:0, 40:59, 0:1353 "); Section wantSection = new Section("0:2, 22:3152,0:1350"); IndexChunkerTiled index = new IndexChunkerTiled(dataSection, wantSection); assertThat(index.toString()) .isEqualTo(String.format(" data = 0:1353 want = 0:1350 intersect = 0:1350 ncontigElements = 1351%n" + " data = 40:59 want = 22:3152 intersect = 40:59 ncontigElements = 20%n" + " data = 0:0 want = 0:2 intersect = 0:0 ncontigElements = 1%n")); }
public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); }
IndexChunker { public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); } }
IndexChunker { public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); } IndexChunker(int[] srcShape, @Nullable Section wantSection); }
IndexChunker { public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); } IndexChunker(int[] srcShape, @Nullable Section wantSection); long getTotalNelems(); boolean hasNext(); Chunk next(); String toString(); }
IndexChunker { public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); } IndexChunker(int[] srcShape, @Nullable Section wantSection); long getTotalNelems(); boolean hasNext(); Chunk next(); String toString();  }