|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
ArrayDBIDs | Interface for array based DBIDs. |
ArrayModifiableDBIDs | Array-oriented implementation of a modifiable DBID collection. |
ArrayStaticDBIDs | Unmodifiable, indexed DBIDs. |
DBID | Database ID object. |
DBIDFactory | Factory interface for generating DBIDs. |
DBIDPair | Immutable pair of two DBIDs. |
DBIDRange | Static DBID range. |
DBIDs | Interface for a collection of database references (IDs). |
HashSetDBIDs | Hash-organized DBIDs |
HashSetModifiableDBIDs | Set-oriented implementation of a modifiable DBID collection. |
ModifiableDBIDs | Interface for a generic modifiable DBID collection. |
SetDBIDs | Interface for DBIDs that support fast "set" operations, in particular "contains" lookups. |
StaticDBIDs | Unmodifiable DBIDs. |
TreeSetDBIDs | Marker for sorted, tree-organized DBIDs |
TreeSetModifiableDBIDs | Set-oriented implementation of a modifiable DBID collection. |
Class Summary | |
---|---|
DBIDUtil | DBID Utility functions. |
EmptyDBIDs | Empty DBID collection. |
Database object identification and ID group handling API. Database IDs (short: DBID) in ELKI are based on the factory pattern, to allow replacing the simple Integer-based DBIDs with more complex implementations, e.g. for use with external databases or to add tracking for debugging purposes. This also allows adding of more efficient implementations later on in a single place.
DBID
object identifies a single object.
The DBIDs
hierarchy contains classes for handling groups (sets, arrays) of IDs, that can
be seen as a two-dimensional matrix consisting
ArrayDBIDs |
HashSetDBIDs |
TreeSetDBIDs |
|
---|---|---|---|
ModifiableDBIDs |
ArrayModifiableDBIDs |
HashSetModifiableDBIDs |
TreeSetModifiableDBIDs |
StaticDBIDs |
ArrayStaticDBIDs |
n/a | n/a |
StaticDBIDs
are structures that cannot support
modifications, but thus can be implemented more efficiently, for example as Interval. They are
mostly used by the data sources.
These interfaces cannot be instantiated, obviously. Instead, use the static
DBIDFactory.FACTORY
, which is also wrapped in the DBIDUtil
class.
DBIDs allids = database.getIDs();
// preallocate an array of initial capacity 123
ArrayModifiableDBIDs array = DBIDUtil.newArraySet(123);
// new DBID hash set with minimum initial capacity
ModifiableDBIDs hash = DBIDUtil.newHashSet();
// initialize a tree set with the IDs of the database.
ModifiableDBIDs tree = DBIDUtil.newTreeSet(database.getIDs());
// add all DBIDs from the hash
tree.addDBIDs(hash)
DBIDUtil
class provides various utility functions, including:
DBIDUtil.ensureArray
to ensure ArrayDBIDs
DBIDUtil.ensureModifiable
to ensure ModifiableDBIDS
DBIDUtil.makeUnmodifiable
to wrap DBIDs unmodifiable (UnmodifiableDBIDs
MergedDBIDs
allows virtual concatenation of multiple DBIDs objects.
MaskedDBIDs
allows masking an ArrayDBIDs with a BitSet.
|
|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |