public class Tuple
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Constructor and Description |
---|
Tuple()
Creates a new instance of Centroid
|
Tuple(double l,
double r) |
Modifier and Type | Method and Description |
---|---|
Tuple |
add(Tuple x)
Adds an existing tuple to the current tuple by adding their left and right members respectively.
|
Tuple |
clone() |
int |
compareTo(java.lang.Object o)
Comparison is done using right member of tuple!.
|
boolean |
contains(double x)
Returns true if the parameter falls within the interval defined by the Tuple.
|
double |
getAverage() |
double |
getLeft() |
double |
getRight() |
double |
getSize() |
void |
setEqual(Tuple t)
Sets the left and right points of this tuple to that of tuple t.
|
void |
setLeft(double l) |
void |
setRight(double r) |
java.lang.String |
toString() |
public Tuple()
public Tuple(double l, double r)
public Tuple clone()
clone
in class java.lang.Object
public void setLeft(double l)
public void setRight(double r)
public void setEqual(Tuple t)
t
- public double getLeft()
public double getRight()
public double getAverage()
public boolean contains(double x)
x
- public double getSize()
public java.lang.String toString()
toString
in class java.lang.Object
public Tuple add(Tuple x)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable