/** * Construct a new node with the given data * * @param pnts the data for the node and its children * @param inds a list of indices that point to the relevant * parts of the pnts array that should be used * @param rng the random number generator */ public ByteKDTreeNode(final byte [][] pnts, IntArrayView inds, Uniform rng) { this.rng = rng; if (inds.size() > leaf_max_points) { // Internal node node_data = new InternalNodeData(); split_points(pnts, inds); } else { node_data = new LeafNodeData(); ((LeafNodeData)node_data).indices = inds.toArray(); } }
/** * Construct a new node with the given data * * @param pnts the data for the node and its children * @param inds a list of indices that point to the relevant * parts of the pnts array that should be used * @param rng the random number generator */ public ByteKDTreeNode(final byte [][] pnts, IntArrayView inds, Uniform rng) { this.rng = rng; if (inds.size() > leaf_max_points) { // Internal node node_data = new InternalNodeData(); split_points(pnts, inds); } else { node_data = new LeafNodeData(); ((LeafNodeData)node_data).indices = inds.toArray(); } }