if (debugChunkOrder) System.out.printf(" Entry=%d: Tile order %d-%d%n", currentEntry, tiling.order(offset[currentEntry]), tiling.order(offset[currentEntry + 1])); if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry); currentNode.first(wantOrigin); break; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin);
tiling.order(offset[currentEntry]), tiling.order(offset[currentEntry + 1])); if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry); currentNode.first(wantOrigin); break; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin);
void first(int[] wantOrigin) throws IOException { if (level == 0) { currentEntry = 0; /* note nentries-1 - assume dont skip the last one for (currentEntry = 0; currentEntry < nentries-1; currentEntry++) { DataChunk entry = myEntries.get(currentEntry + 1); if ((wantOrigin == null) || tiling.compare(wantOrigin, entry.offset) < 0) break; // LOOK ?? } */ } else { currentNode = null; for (currentEntry = 0; currentEntry < nentries; currentEntry++) { if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin); break; } } // heres the case where its the last entry we want; the tiling.compare() above may fail if (currentNode == null) { currentEntry = nentries - 1; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin); } } //if (currentEntry >= nentries) // System.out.println("hah"); assert (nentries == 0) || (currentEntry < nentries) : currentEntry + " >= " + nentries; }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public boolean hasNext() { return root.hasNext(); // && !node.greaterThan(wantOrigin); }
public DataChunk next() throws IOException { return root.next(); } }
public DataChunk next() throws IOException { return root.next(); } }
public DataChunk next() throws IOException { return root.next(); } }
/** * Constructor * * @param want skip any nodes that are before this section * @param nChunkDim number of chunk dimensions - may be less than the offset[] length * @throws IOException on error */ DataChunkIteratorNoFilter(Section want, int nChunkDim) throws IOException { this.nChunkDim = nChunkDim; root = new Node(rootNodeAddress, -1); // should we cache the nodes ??? int[] wantOrigin = (want != null) ? want.getOrigin() : null; root.first(wantOrigin); }
boolean hasNext() { if (level == 0) { return currentEntry < nentries; } else { if (currentNode.hasNext()) return true; return currentEntry < nentries - 1; } }
public LayoutTiled.DataChunk next() throws IOException { DataChunk dc = root.next(); int[] offset = dc.offset; if (offset.length > nChunkDim) { // may have to eliminate last offset offset = new int[nChunkDim]; System.arraycopy(dc.offset, 0, offset, 0, nChunkDim); } if (debugChunkOrder) System.out.printf("LayoutTiled.DataChunk next order %d%n", tiling.order(dc.offset)); return new LayoutTiled.DataChunk(offset, dc.filePos); } }
/** * Constructor * * @param want skip any nodes that are before this section * @param nChunkDim number of chunk dimensions - may be less than the offset[] length * @throws IOException on error */ DataChunkIteratorNoFilter(Section want, int nChunkDim) throws IOException { this.nChunkDim = nChunkDim; root = new Node(rootNodeAddress, -1); // should we cache the nodes ??? int[] wantOrigin = (want != null) ? want.getOrigin() : null; root.first(wantOrigin); }
/** * Constructor * * @param want skip any nodes that are before this section * @throws IOException on error */ DataChunkIterator(Section want) throws IOException { root = new Node(rootNodeAddress, -1); // should we cache the nodes ??? wantOrigin = (want != null) ? want.getOrigin() : null; root.first(wantOrigin); }
public LayoutTiled.DataChunk next() throws IOException { DataChunk dc = root.next(); int[] offset = dc.offset; if (offset.length > nChunkDim) { // may have to eliminate last offset offset = new int[nChunkDim]; System.arraycopy(dc.offset, 0, offset, 0, nChunkDim); } if (debugChunkOrder) System.out.printf("LayoutTiled.DataChunk next order %d%n", tiling.order(dc.offset)); return new LayoutTiled.DataChunk(offset, dc.filePos); } }