public ArrayList<RPChromosomeRegion> getAllChromosomeRegions() { // Search the R+ tree to extract the chromosome regions RPTreeNode thisNode = rootNode; ArrayList<RPChromosomeRegion> regionList = new ArrayList<RPChromosomeRegion>(); findAllChromosomeRegions(thisNode, regionList); return regionList; }
public ArrayList<RPChromosomeRegion> getAllChromosomeRegions() { // Search the R+ tree to extract the chromosome regions RPTreeNode thisNode = rootNode; ArrayList<RPChromosomeRegion> regionList = new ArrayList<RPChromosomeRegion>(); findAllChromosomeRegions(thisNode, regionList); return regionList; }
public ArrayList<RPChromosomeRegion> getAllChromosomeRegions() { // Search the R+ tree to extract the chromosome regions RPTreeNode thisNode = rootNode; ArrayList<RPChromosomeRegion> regionList = new ArrayList<RPChromosomeRegion>(); findAllChromosomeRegions(thisNode, regionList); return regionList; }
private void findAllChromosomeRegions(RPTreeNode thisNode, ArrayList<RPChromosomeRegion> regionList) { // search down the tree recursively starting with the root node if (thisNode.isLeaf()) { int nLeaves = thisNode.getItemCount(); for (int index = 0; index < nLeaves; ++index) { RPTreeLeafNodeItem leaf = (RPTreeLeafNodeItem) thisNode.getItem(index); // add all leaf regions RPChromosomeRegion region = leaf.getChromosomeBounds(); regionList.add(region); } } else { // get all child nodes int nNodes = thisNode.getItemCount(); for (int index = 0; index < nNodes; ++index) { RPTreeChildNodeItem childItem = (RPTreeChildNodeItem) thisNode.getItem(index); RPTreeNode childNode = childItem.getChildNode(); findAllChromosomeRegions(childNode, regionList); } } }
private void findAllChromosomeRegions(RPTreeNode thisNode, ArrayList<RPChromosomeRegion> regionList) { // search down the tree recursively starting with the root node if (thisNode.isLeaf()) { int nLeaves = thisNode.getItemCount(); for (int index = 0; index < nLeaves; ++index) { RPTreeLeafNodeItem leaf = (RPTreeLeafNodeItem) thisNode.getItem(index); // add all leaf regions RPChromosomeRegion region = leaf.getChromosomeBounds(); regionList.add(region); } } else { // get all child nodes int nNodes = thisNode.getItemCount(); for (int index = 0; index < nNodes; ++index) { RPTreeChildNodeItem childItem = (RPTreeChildNodeItem) thisNode.getItem(index); RPTreeNode childNode = childItem.getChildNode(); findAllChromosomeRegions(childNode, regionList); } } }
private void findAllChromosomeRegions(RPTreeNode thisNode, ArrayList<RPChromosomeRegion> regionList) { // search down the tree recursively starting with the root node if (thisNode.isLeaf()) { int nLeaves = thisNode.getItemCount(); for (int index = 0; index < nLeaves; ++index) { RPTreeLeafNodeItem leaf = (RPTreeLeafNodeItem) thisNode.getItem(index); // add all leaf regions RPChromosomeRegion region = leaf.getChromosomeBounds(); regionList.add(region); } } else { // get all child nodes int nNodes = thisNode.getItemCount(); for (int index = 0; index < nNodes; ++index) { RPTreeChildNodeItem childItem = (RPTreeChildNodeItem) thisNode.getItem(index); RPTreeNode childNode = childItem.getChildNode(); findAllChromosomeRegions(childNode, regionList); } } }