@Test public void testIndexChunkerToString() throws InvalidRangeException { int[] full = new int[] {2, 10, 20}; int[] part = new int[] {2, 5, 20}; Section section = new Section(part); IndexChunker index = new IndexChunker(full, section); assertThat(index.toString()).isEqualTo("wantSize=1,2 maxSize=200,2 wantStride=1,1 stride=20,200"); }
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();  }