public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); } }
protected Node readNode(BufferedInputStreamWrapper nodesFileStream) throws IOException { int nodeId = nodesFileStream.readInt(); int perimeter = nodesFileStream.readInt(); int area = nodesFileStream.readInt(); int upperLeftX = nodesFileStream.readInt(); int upperLeftY = nodesFileStream.readInt(); int width = nodesFileStream.readInt(); int height = nodesFileStream.readInt(); BoundingBox box = new BoundingBox(upperLeftX, upperLeftY, width, height); int contourSize = nodesFileStream.readInt(); int byteCount = nodesFileStream.readInt(); byte[] bits = new byte[byteCount]; nodesFileStream.readFully(bits); Contour contour = new Contour(contourSize, bits); int numberOfComponentsPerPixel = nodesFileStream.readInt(); return buildNode(nodeId, box, contour, perimeter, area, numberOfComponentsPerPixel); }
nodesFileStream = new BufferedInputStreamWrapper(nodesFile); int nodeCount = nodesFileStream.readInt(); Int2ObjectMap<Node> nodesMap = new Int2ObjectLinkedOpenHashMap<Node>(nodeCount); Graph graph = new Graph(nodeCount); int nodeId = edgesFileStream.readInt(); assert(node.getId() == nodeId); int edgeCount = edgesFileStream.readInt(); for (int k=0; k<edgeCount; k++) { int targetNodeId = edgesFileStream.readInt(); int boundary = edgesFileStream.readInt(); Node targetNode = nodesMap.get(targetNodeId); if (targetNode != null) {
inputFileStream = new BufferedInputStreamWrapper(nodesFile); int bandCount = inputFileStream.readInt();