V
- the type of NumberVector this unit containspublic class CLIQUEUnit<V extends NumberVector<?>> extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
assigned
Flag that indicates if this unit is already assigned to a cluster.
|
private gnu.trove.map.hash.TIntObjectHashMap<Interval> |
dimensionToInterval
Provides a mapping of particular dimensions to the intervals of which this
unit is build.
|
private ModifiableDBIDs |
ids
The ids of the feature vectors this unit contains.
|
private SortedSet<Interval> |
intervals
The one-dimensional intervals of which this unit is build.
|
Constructor and Description |
---|
CLIQUEUnit(Interval interval)
Creates a new one-dimensional unit for the given interval.
|
CLIQUEUnit(SortedSet<Interval> intervals,
ModifiableDBIDs ids)
Creates a new k-dimensional unit for the given intervals.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addFeatureVector(DBIDRef id,
V vector)
Adds the id of the specified feature vector to this unit, if this unit
contains the feature vector.
|
boolean |
contains(V vector)
Returns true, if the intervals of this unit contain the specified feature
vector.
|
boolean |
containsLeftNeighbor(Interval i)
Returns true if this unit contains the left neighbor of the specified
interval.
|
boolean |
containsRightNeighbor(Interval i)
Returns true if this unit contains the right neighbor of the specified
interval.
|
DBIDs |
getIds()
Returns the ids of the feature vectors this unit contains.
|
Interval |
getInterval(Integer dimension)
Returns the interval of the specified dimension.
|
SortedSet<Interval> |
getIntervals()
Returns a sorted set of the intervals of which this unit is build.
|
boolean |
isAssigned()
Returns true if this unit is already assigned to a cluster.
|
CLIQUEUnit<V> |
join(CLIQUEUnit<V> other,
double all,
double tau)
Joins this unit with the specified unit.
|
void |
markAsAssigned()
Marks this unit as assigned to a cluster.
|
int |
numberOfFeatureVectors()
Returns the number of feature vectors this unit contains.
|
double |
selectivity(double total)
Returns the selectivity of this unit, which is defined as the fraction of
total feature vectors contained in this unit.
|
String |
toString()
Returns a string representation of this unit that contains the intervals of
this unit.
|
private SortedSet<Interval> intervals
private gnu.trove.map.hash.TIntObjectHashMap<Interval> dimensionToInterval
private ModifiableDBIDs ids
private boolean assigned
public CLIQUEUnit(SortedSet<Interval> intervals, ModifiableDBIDs ids)
intervals
- the intervals belonging to this unitids
- the ids of the feature vectors belonging to this unitpublic CLIQUEUnit(Interval interval)
interval
- the interval belonging to this unitpublic boolean contains(V vector)
vector
- the feature vector to be tested for containmentpublic boolean addFeatureVector(DBIDRef id, V vector)
id
- Vector idvector
- the feature vector to be addedpublic int numberOfFeatureVectors()
public double selectivity(double total)
total
- the total number of feature vectorspublic SortedSet<Interval> getIntervals()
public Interval getInterval(Integer dimension)
dimension
- the dimension of the interval to be returnedpublic boolean containsLeftNeighbor(Interval i)
i
- the intervalpublic boolean containsRightNeighbor(Interval i)
i
- the intervalpublic boolean isAssigned()
public void markAsAssigned()
public DBIDs getIds()
public CLIQUEUnit<V> join(CLIQUEUnit<V> other, double all, double tau)
other
- the unit to be joinedall
- the overall number of feature vectorstau
- the density threshold for the selectivity of a unit