|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.pivots.AbstractIncrementalPivotSelector<O>
public abstract class AbstractIncrementalPivotSelector<O extends OB>
AbstractIncrementalPivotSelector holds common functionality to all the incremental pivot selectors.
| Field Summary | |
|---|---|
protected Pivotable<O> |
pivotable
Pivotable objects determine if a given object is suitable. |
protected Random |
r
|
| Constructor Summary | |
|---|---|
protected |
AbstractIncrementalPivotSelector()
|
protected |
AbstractIncrementalPivotSelector(Pivotable<O> pivotable)
|
| Method Summary | |
|---|---|
void |
enableAcceptRepeated()
|
PivotResult |
generatePivots(int pivotsCount,
Index<O> index)
|
abstract PivotResult |
generatePivots(int pivotCount,
cern.colt.list.LongArrayList elements,
Index<O> index)
|
protected O |
getObject(long i,
cern.colt.list.LongArrayList elements,
Index<O> index)
Returns the given object. |
protected long |
mapId(long i,
cern.colt.list.LongArrayList elements)
|
protected int |
max(cern.colt.list.LongArrayList source,
Index<O> index)
Returns the max # of elements. |
protected long[] |
select(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
Selects k random elements from the given source. |
protected O[] |
selectO(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
|
protected long[] |
selectUnique(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Random r
protected Pivotable<O extends OB> pivotable
| Constructor Detail |
|---|
protected AbstractIncrementalPivotSelector(Pivotable<O> pivotable)
protected AbstractIncrementalPivotSelector()
| Method Detail |
|---|
protected final O getObject(long i,
cern.colt.list.LongArrayList elements,
Index<O> index)
throws IllegalAccessException,
InstantiationException,
IllegalIdException,
OBException
i - The id in the database or in elements of the object that will
be accessed.elements - Elements that will be searched.
IllegalAccessException
InstantiationException
com.sleepycat.je.DatabaseException
IllegalIdException
OBException
protected long mapId(long i,
cern.colt.list.LongArrayList elements)
public void enableAcceptRepeated()
public PivotResult generatePivots(int pivotsCount,
Index<O> index)
throws OBException,
IllegalAccessException,
InstantiationException,
OBStorageException,
PivotsUnavailableException
OBException
IllegalAccessException
InstantiationException
OBStorageException
PivotsUnavailableException
public abstract PivotResult generatePivots(int pivotCount,
cern.colt.list.LongArrayList elements,
Index<O> index)
throws OBException,
IllegalAccessException,
InstantiationException,
OBStorageException,
PivotsUnavailableException
OBException
IllegalAccessException
InstantiationException
OBStorageException
PivotsUnavailableException
protected int max(cern.colt.list.LongArrayList source,
Index<O> index)
throws OBStorageException
source - The source of data (can be null)index - The underlying index.
OBStorageException
protected long[] select(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
throws OBStorageException,
IllegalIdException,
OBException,
IllegalAccessException,
InstantiationException
k - number of elements to selectr - Random object used to randomly select objects.source - The source of item ids.index - underlying index.will - not add pivots included in excludes.
InstantiationException
IllegalAccessException
OBException
IllegalIdException
OBStorageException
protected long[] selectUnique(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
throws OBStorageException,
IllegalIdException,
OBException,
IllegalAccessException,
InstantiationException
OBStorageException
IllegalIdException
OBException
IllegalAccessException
InstantiationException
protected O[] selectO(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<O> index,
cern.colt.list.LongArrayList excludes)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
IllegalIdException
IllegalAccessException
InstantiationException
OBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||