Class ObjectForReduction
Object
ObjectForReduction
- All Implemented Interfaces:
Comparable<ObjectForReduction>
An object that can be reduced.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA special index value to indicate that an object has been newly-added. -
Constructor Summary
ConstructorsConstructorDescriptionObjectForReduction(LabelledWithConfidence<ObjectMask> labelled) Creates with aObjectMaskthat is considered newly-added.ObjectForReduction(LabelledWithConfidence<ObjectMask> labelled, int index) Creates a newObjectForReductioninstance. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ObjectForReduction other) booleandoubleThe associated confidence.The underlyingObjectMaskwith whom a confidence and label is associated.intgetIndex()The index of the element in the original list for reduction, orNEWLY_ADDEDif newly added.getLabel()The label associated with the element.The underlying labelledObjectMaskfor input to a reduction algorithm.inthashCode()toString()
-
Field Details
-
NEWLY_ADDED
public static final int NEWLY_ADDEDA special index value to indicate that an object has been newly-added.Typically indices are non-negative, reflecting the position their position in the input list (as passed for reduction).
- See Also:
-
-
Constructor Details
-
ObjectForReduction
Creates with aObjectMaskthat is considered newly-added.- Parameters:
labelled- a labelled newly-added object.
-
ObjectForReduction
Creates a newObjectForReductioninstance.- Parameters:
labelled- The underlying labelledObjectMaskfor input to a reduction algorithm.index- The index of the element in the original list for reduction, orNEWLY_ADDEDif newly added.
-
-
Method Details
-
getElement
The underlyingObjectMaskwith whom a confidence and label is associated.- Returns:
- the element to be passed as an input to a reduction algorithm.
-
getLabel
The label associated with the element.- Returns:
- the label.
-
getConfidence
public double getConfidence()The associated confidence.- Returns:
- the confidence.
-
compareTo
- Specified by:
compareToin interfaceComparable<ObjectForReduction>
-
getLabelled
The underlying labelledObjectMaskfor input to a reduction algorithm. -
getIndex
public int getIndex()The index of the element in the original list for reduction, orNEWLY_ADDEDif newly added. -
equals
-
hashCode
public int hashCode() -
toString
-