Class ObjectForReduction
Object
ObjectForReduction
- All Implemented Interfaces:
Comparable<ObjectForReduction>
An object that can be reduced.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A special index value to indicate that an object has been newly-added. -
Constructor Summary
ConstructorsConstructorDescriptionObjectForReduction
(LabelledWithConfidence<ObjectMask> labelled) Creates with aObjectMask
that is considered newly-added.ObjectForReduction
(LabelledWithConfidence<ObjectMask> labelled, int index) Creates a newObjectForReduction
instance. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ObjectForReduction other) boolean
double
The associated confidence.The underlyingObjectMask
with whom a confidence and label is associated.int
getIndex()
The index of the element in the original list for reduction, orNEWLY_ADDED
if newly added.getLabel()
The label associated with the element.The underlying labelledObjectMask
for input to a reduction algorithm.int
hashCode()
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 aObjectMask
that is considered newly-added.- Parameters:
labelled
- a labelled newly-added object.
-
ObjectForReduction
Creates a newObjectForReduction
instance.- Parameters:
labelled
- The underlying labelledObjectMask
for input to a reduction algorithm.index
- The index of the element in the original list for reduction, orNEWLY_ADDED
if newly added.
-
-
Method Details
-
getElement
The underlyingObjectMask
with 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:
compareTo
in interfaceComparable<ObjectForReduction>
-
getLabelled
The underlying labelledObjectMask
for input to a reduction algorithm. -
getIndex
public int getIndex()The index of the element in the original list for reduction, orNEWLY_ADDED
if newly added. -
equals
-
hashCode
public int hashCode() -
toString
-