Module math
Package de.lmu.ifi.dbs.elki.utilities.pairs
package de.lmu.ifi.dbs.elki.utilities.pairs
Pairs and triples utility classes.
Pairs and triples are frequently used classes and reimplemented too often.
-
is the generic non-comparable pair (you can use external comparators!).
invalid reference
Pair -
is the generic pair comparable in the first component only.
invalid reference
FCPair -
is the pair comparable in both components.
invalid reference
CPair -
is the generic pair comparable in the second component only.
invalid reference
SCPair
Due to limitations in object subclassing,
cannot be
a subclass of
invalid reference
CPair
, since a class cannot implement
the Comparable interface twice.invalid reference
FCPair
Also primitive types cannot be used in Generics, resulting in the following classes for primitive types:
IntIntPairstoring twointvaluesDoubleIntPairstoring onedoubleand oneintvalue.-
storing one
invalid reference
IntDoublePairintand onedoublevalue. DoubleDoublePairstoring twodoublevalues
Triples can be used via:
-
is the generic non-comparable triple.
invalid reference
Triple -
is the triple comparable in all components.
invalid reference
CTriple
If you need a triple comparable in just particular components, either define a comparator for sorting or subclass Triple appropriately.
-
ClassDescriptionPair storing two doubles.Pair storing an integer and a double.Pair storing two integers.PairInterface<FIRST,
SECOND> Pair interface.