Beispiel #1
0
 public void Remove(ISBNode node) {
   // remove from map
   MapDelete(node);
   // check if stream object at mtree is still being referenced
   if (MapCountObjRefs(node.obj) <= 0) {
     // delete stream object from mtree
     mtree.remove(node.obj);
   }
 }
Beispiel #2
0
 public Vector<ISBSearchResult> RangeSearch(ISBNode node, double radius) {
   Vector<ISBSearchResult> results = new Vector<ISBSearchResult>();
   StreamObj obj;
   double d;
   MTreeStreamObjects.Query query = mtree.getNearestByRange(node.obj, radius);
   for (MTreeStreamObjects.ResultItem q : query) {
     // get next obj found within range
     obj = q.data;
     // get distance of obj from query
     d = q.distance;
     // get all nodes referencing obj
     Vector<ISBNode> nodes = MapGetNodes(obj);
     for (int i = 0; i < nodes.size(); i++) results.add(new ISBSearchResult(nodes.get(i), d));
   }
   return results;
 }
Beispiel #3
0
 public void Insert(ISBNode node) {
   // insert object of node at mtree
   mtree.add(node.obj);
   // insert node at map
   MapInsert(node);
 }