de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.deliclu
Class DeLiCluTree

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.tree.IndexTree<N,E>
      extended by de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialIndexTree<N,E>
          extended by de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.AbstractRStarTree<N,E>
              extended by de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.NonFlatRStarTree<DeLiCluNode,DeLiCluEntry>
                  extended by de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.deliclu.DeLiCluTree
Direct Known Subclasses:
DeLiCluTreeIndex

public class DeLiCluTree
extends NonFlatRStarTree<DeLiCluNode,DeLiCluEntry>

DeLiCluTree is a spatial index structure based on an R-TRee. DeLiCluTree is designed for the DeLiClu algorithm, having in each node a boolean array which indicates whether the child nodes are already handled by the DeLiClu algorithm.


Field Summary
private  HashMap<Integer,HashSet<Integer>> expanded
          Holds the ids of the expanded nodes.
private static Logging logger
          The logger for this class.
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.AbstractRStarTree
bulkSplitter, distanceCalcs, extraIntegrityChecks, height, insertionStrategy, nodeSplitter, reinsertions
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.IndexTree
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
 
Constructor Summary
DeLiCluTree(PageFile<DeLiCluNode> pagefile, BulkSplit bulkSplitter, InsertionStrategy insertionStrategy)
          Constructor.
 
Method Summary
protected  DeLiCluEntry createNewDirectoryEntry(DeLiCluNode node)
          Creates a new directory entry representing the specified node.
protected  DeLiCluNode createNewDirectoryNode()
          Creates a new directory node with the specified capacity.
protected  DeLiCluNode createNewLeafNode()
          Creates a new leaf node with the specified capacity.
protected  DeLiCluEntry createRootEntry()
          Creates an entry representing the root node.
 Set<Integer> getExpanded(DeLiCluNode entry)
          Returns the nodes which are already expanded with the specified node.
 Set<Integer> getExpanded(SpatialEntry entry)
          Returns the nodes which are already expanded with the specified node.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 int numNodes()
          Determines and returns the number of nodes in this index.
 void setExpanded(SpatialEntry entry1, SpatialEntry entry2)
          Marks the nodes with the specified ids as expanded.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.NonFlatRStarTree
bulkLoad, computeHeight, createEmptyRoot, hasOverflow, hasUnderflow
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.AbstractRStarTree
adjustTree, canBulkLoad, choosePath, clearReinsertions, containedTest, createBulkLeafNodes, createNewRoot, deletePath, doExtraIntegrityChecks, findPathToObject, getHeight, getLeaves, initializeCapacities, initializeFromFile, insertDirectoryEntry, insertLeaf, insertLeafEntry, reInsert, setHeight, toString
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.IndexTree
createHeader, deleteNode, getFile, getNode, getNode, getPageFileStatistics, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initialize, isRoot, postDelete, preInsert, writeNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final Logging logger
The logger for this class.


expanded

private HashMap<Integer,HashSet<Integer>> expanded
Holds the ids of the expanded nodes.

Constructor Detail

DeLiCluTree

public DeLiCluTree(PageFile<DeLiCluNode> pagefile,
                   BulkSplit bulkSplitter,
                   InsertionStrategy insertionStrategy)
Constructor.

Parameters:
pagefile - Page file
bulkSplitter - bulk load strategy
insertionStrategy - the strategy to find the insertion child
Method Detail

setExpanded

public void setExpanded(SpatialEntry entry1,
                        SpatialEntry entry2)
Marks the nodes with the specified ids as expanded.

Parameters:
entry1 - the first node
entry2 - the second node

getExpanded

public Set<Integer> getExpanded(SpatialEntry entry)
Returns the nodes which are already expanded with the specified node.

Parameters:
entry - the id of the node for which the expansions should be returned
Returns:
the nodes which are already expanded with the specified node

getExpanded

public Set<Integer> getExpanded(DeLiCluNode entry)
Returns the nodes which are already expanded with the specified node.

Parameters:
entry - the id of the node for which the expansions should be returned
Returns:
the nodes which are already expanded with the specified node

numNodes

public int numNodes()
Determines and returns the number of nodes in this index.

Returns:
the number of nodes in this index

createNewLeafNode

protected DeLiCluNode createNewLeafNode()
Creates a new leaf node with the specified capacity.

Specified by:
createNewLeafNode in class IndexTree<DeLiCluNode,DeLiCluEntry>
Returns:
a new leaf node

createNewDirectoryNode

protected DeLiCluNode createNewDirectoryNode()
Creates a new directory node with the specified capacity.

Specified by:
createNewDirectoryNode in class IndexTree<DeLiCluNode,DeLiCluEntry>
Returns:
a new directory node

createNewDirectoryEntry

protected DeLiCluEntry createNewDirectoryEntry(DeLiCluNode node)
Creates a new directory entry representing the specified node.

Specified by:
createNewDirectoryEntry in class AbstractRStarTree<DeLiCluNode,DeLiCluEntry>
Parameters:
node - the node to be represented by the new entry
Returns:
the newly created directory entry

createRootEntry

protected DeLiCluEntry createRootEntry()
Creates an entry representing the root node.

Specified by:
createRootEntry in class IndexTree<DeLiCluNode,DeLiCluEntry>
Returns:
an entry representing the root node

getLogger

protected Logging getLogger()
Description copied from class: IndexTree
Get the (STATIC) logger for this class.

Specified by:
getLogger in class IndexTree<DeLiCluNode,DeLiCluEntry>
Returns:
the static logger

Release 0.4.0 (2011-09-20_1324)