at.tuwien.ifs.somtoolbox.visualization.clustering
Class ClusterLabel

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.layers.Label
      extended by at.tuwien.ifs.somtoolbox.visualization.clustering.ClusterLabel
All Implemented Interfaces:
Serializable, Comparable<ClusterLabel>

public class ClusterLabel
extends Label
implements Comparable<ClusterLabel>

Extends the Label class with an additional value for sorting to determine the order of the labels. The natural order of this class is by ascending 'sortingValue'. If two ClusterLabels have equal sortingValue, they are compared by their names.

Version:
$Id: ClusterLabel.java 3883 2010-11-02 17:13:23Z frank $
Author:
Angela Roiger
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
private  double sortingValue
           
 
Fields inherited from class at.tuwien.ifs.somtoolbox.layers.Label
SORT_ASC, SORT_DESC
 
Constructor Summary
ClusterLabel(Label l, double sortingValue)
           
ClusterLabel(String name)
           
ClusterLabel(String name, double value)
           
ClusterLabel(String name, double value, double qe)
           
ClusterLabel(String name, double value, double qe, double sortingValue)
          Constructs a ClusterLabel object with the given arguments.
 
Method Summary
 int compareTo(ClusterLabel c)
           
 double getSortingValue()
           
 void setSortingValue(double d)
           
 
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.Label
getBestContext, getName, getNameAndScaledValue, getQe, getValue, sortByName, sortByQe, sortByQeValue, sortByValue, sortByValueQe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

sortingValue

private double sortingValue
Constructor Detail

ClusterLabel

public ClusterLabel(Label l,
                    double sortingValue)

ClusterLabel

public ClusterLabel(String name)

ClusterLabel

public ClusterLabel(String name,
                    double value)

ClusterLabel

public ClusterLabel(String name,
                    double value,
                    double qe)

ClusterLabel

public ClusterLabel(String name,
                    double value,
                    double qe,
                    double sortingValue)
Constructs a ClusterLabel object with the given arguments.

Parameters:
name - the name of the label.
value - the label value.
qe - the quantization error of the label.
sortingValue - the value determining the order of labels
Method Detail

compareTo

public int compareTo(ClusterLabel c)
Specified by:
compareTo in interface Comparable<ClusterLabel>

getSortingValue

public double getSortingValue()

setSortingValue

public void setSortingValue(double d)