| org.ajmm.obsearch.example.OBVectorExample | Line |
|---|
| this value should be cached. | 138 |
| org.ajmm.obsearch.index.AbstractExtendedPyramidIndex | Line |
|---|
| insert the keys in C in order to increase performance. I read somewhere that Berkeley DB works better if you do so. | 120 |
| remove this comment? cDB.preload(pc); | 132 |
| move these parameters to a centralized configuration file. | 246 |
| move these parameters to a centralized configuration file. | 260 |
| org.ajmm.obsearch.index.AbstractP2PIndex | Line |
|---|
| Improve this so that boxes are only sent when we modify one of our boxes | 1042 |
| if there is some inconsistency with the string generated by EndpointAddress, this hack won't work | 1240 |
| This method * should only be invoked when: 1) We just connected with the peer 2) * our data has been modified | 1561 |
| org.ajmm.obsearch.index.AbstractPPTree | Line |
|---|
| improve the way we represent the data. Instead of having two huge vectors with each of the elements, we could have one byte vector whose elements point to the cluster the element belongs to. | 567 |
| check this statement: | 815 |
| org.ajmm.obsearch.index.AbstractPivotIndex | Line |
|---|
| Optimization: put these two objects in the class so that they don't have to be created over and over again | 1024 |
| org.ajmm.obsearch.index.ExtendedPyramidIndexShort | Line |
|---|
| select the pyramids randomly just like quicksort | 245 |
| org.ajmm.obsearch.index.UnsafeNCorePPTreeShort | Line |
|---|
| parallelizing this would imply that more distance computations have to be performed. public final void searchBTreeAndUpdate(O object, short[] tuple, short r, float hlow, float hhigh, OBPriorityQueueShort < O > result) throws DatabaseException, IllegalAccessException, InstantiationException, IllegalIdException, OBException { Cursor cursor = null; try { DatabaseEntry keyEntry = new DatabaseEntry(); DatabaseEntry dataEntry = new DatabaseEntry(); cursor = cDB.openCursor(null, null); SortedFloatBinding.floatToEntry(hlow, keyEntry); OperationStatus retVal = cursor.getSearchKeyRange(keyEntry, dataEntry, null); if (retVal == OperationStatus.NOTFOUND) { return; } if (cursor.count() > 0) { float currentPyramidValue = SortedFloatBinding .entryToFloat(keyEntry); short max = Short.MIN_VALUE; Unsafe unsafe = UnsafeArrayHandlerShort.unsafe; long i = 0; long init = UnsafeArrayHandlerInt.size + UnsafeArrayHandlerByte.offset; short t; while (retVal == OperationStatus.SUCCESS && currentPyramidValue <= hhigh) { byte[] in = dataEntry.getData(); // TupleInput in = new TupleInput(dataEntry.getData()); this.smapRecordsCompared++; i = init; max = Short.MIN_VALUE; // STATS for (short b : tuple) { t = (short) Math.abs(b - unsafe.getShort(in, i)); if (t > max) { max = t; if (t > r) { break; // finish this loop this slice won't be // matched // after all! } } i += UnsafeArrayHandlerShort.size; } if (max <= r && result.isCandidate(max)) { // there is a chance it is a possible match int id = intHandler.getint(in, 0); O toCompare = getObject(id); DistanceEvaluation d = new DistanceEvaluation(r, id, toCompare, object, result); while (true) { try { queue.put(d); break; } catch (InterruptedException e) { } } this.distanceComputations++; } // read the next record retVal = cursor.getNext(keyEntry, dataEntry, null); // update the current pyramid value so that we know when // to // stop currentPyramidValue = SortedFloatBinding .entryToFloat(keyEntry); } } } finally { cursor.close(); } } | 369 |
| org.ajmm.obsearch.index.pptree.AbstractSpaceTreeNode | Line |
|---|
| remove this to save some memory private float [] center; | 35 |
| org.ajmm.obsearch.index.pptree.SpaceTreeLeaf | Line |
|---|
| this thing sometimes generates 1.00001 or stuff like that. shall we just force it to be 1? | 210 |