DataChunk next() throws IOException { if (level == 0) { return myEntries.get(currentEntry++); } else { if (currentNode.hasNext()) return currentNode.next(); currentEntry++; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(null); return currentNode.next(); } } }
DataChunk next() throws IOException { if (level == 0) { return myEntries.get(currentEntry++); } else { if (currentNode.hasNext()) return currentNode.next(); currentEntry++; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(null); return currentNode.next(); } } }
DataChunk next() throws IOException { if (level == 0) { return myEntries.get(currentEntry++); } else { if (currentNode.hasNext()) return currentNode.next(); currentEntry++; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(null); return currentNode.next(); } } }
currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry); currentNode.first(wantOrigin); break; currentEntry = nentries - 1; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin);
currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry); currentNode.first(wantOrigin); break; currentEntry = nentries - 1; 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; }
/** * 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 * @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 * @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); }
/** * 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); }
/** * 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); }