class IntegerDBIDPair extends java.lang.Object implements DBIDPair, IntegerDBIDs
| Modifier and Type | Class and Description |
|---|---|
private static class |
IntegerDBIDPair.Itr
Iterator.
|
private class |
IntegerDBIDPair.Slice
Slice of an array.
|
| Modifier and Type | Field and Description |
|---|---|
int |
first
First value in pair
|
int |
second
Second value in pair
|
| Modifier | Constructor and Description |
|---|---|
protected |
IntegerDBIDPair(int first,
int second)
Initialize pair
|
| Modifier and Type | Method and Description |
|---|---|
DBIDVar |
assignVar(int index,
DBIDVar var)
Assign a DBID variable the value of position
index. |
int |
binarySearch(DBIDRef key)
Search for the position of the given key, assuming that the data set is
sorted.
|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
boolean |
equals(java.lang.Object obj) |
DBID |
get(int i)
Deprecated.
|
IntegerDBID |
getFirst()
Deprecated.
|
IntegerDBID |
getSecond()
Deprecated.
|
int |
hashCode()
Canonical hash function, mixing the two hash values.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
IntegerDBIDArrayIter |
iter()
Iterable
|
int |
size()
Size of the DBID "collection".
|
ArrayDBIDs |
slice(int begin,
int end)
Slice a subarray (as view, not copy!)
|
java.lang.String |
toString()
Canonical toString operator
|
public int first
public int second
protected IntegerDBIDPair(int first,
int second)
first - first parametersecond - second parameterpublic java.lang.String toString()
toString in class java.lang.Object@Deprecated public final IntegerDBID getFirst()
DBIDPair@Deprecated public final IntegerDBID getSecond()
DBIDPair@Deprecated public DBID get(int i)
ArrayDBIDs
If possible, use an DBIDArrayIter via ArrayDBIDs.iter() instead, or
an DBIDVar via ArrayDBIDs.assignVar(int, de.lmu.ifi.dbs.elki.database.ids.DBIDVar)
get in interface ArrayDBIDsi - Indexpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDspublic boolean contains(DBIDRef o)
DBIDspublic boolean isEmpty()
DBIDspublic DBIDVar assignVar(int index, DBIDVar var)
ArrayDBIDsindex.assignVar in interface ArrayDBIDsindex - Positionvar - Variable to assign the value to.public ArrayDBIDs slice(int begin, int end)
ArrayDBIDsslice in interface ArrayDBIDsbegin - Begin (inclusive)end - End (exclusive)public int binarySearch(DBIDRef key)
ArrayDBIDs
For keys not found, -(1+insertion position) is returned, as
for Java Collections.binarySearch(java.util.List<? extends java.lang.Comparable<? super T>>, T)
binarySearch in interface ArrayDBIDskey - Key to search forpublic IntegerDBIDArrayIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDsiter in interface IntegerDBIDsCopyright © 2019 ELKI Development Team. License information.