Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities
Class IDIDDoubleTriple

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.IDIDDoubleTriple
All Implemented Interfaces:
Comparable<IDIDDoubleTriple>

public class IDIDDoubleTriple
extends Object
implements Comparable<IDIDDoubleTriple>

Encapsulates the attributes of a pair containing two integer ids and a double value.

Author:
Elke Achtert

Field Summary
private  int id1
          The first id.
private  int id2
          The second id.
private  double value
          The value.
 
Constructor Summary
IDIDDoubleTriple(int id1, int id2, double value)
          Constructs a triple of the two given ids and a given value.
 
Method Summary
 int compareTo(IDIDDoubleTriple o)
          Compares this object with the specified object for order.
 int getId1()
          Returns the first id of this triple.
 int getId2()
          Returns the second id of this triple.
 double getValue()
          Returns the value of this triple.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id1

private final int id1
The first id.


id2

private final int id2
The second id.


value

private final double value
The value.

Constructor Detail

IDIDDoubleTriple

public IDIDDoubleTriple(int id1,
                        int id2,
                        double value)
Constructs a triple of the two given ids and a given value.

Parameters:
id1 - the first id
id2 - the second id
value - the value
Method Detail

getId1

public int getId1()
Returns the first id of this triple.

Returns:
the first id of this pair

getId2

public int getId2()
Returns the second id of this triple.

Returns:
the second id of this pair

getValue

public double getValue()
Returns the value of this triple.

Returns:
the value of this triple

compareTo

public int compareTo(IDIDDoubleTriple o)
Compares this object with the specified object for order. Returns a negative integer or a positive integer as the value of this object is less than or greater than the the value of the specified object. If both values are equal the ids of both objects are compared.

Specified by:
compareTo in interface Comparable<IDIDDoubleTriple>
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

Release 0.1 (2008-07-10_1838)