de.unima.alcomox.algorithms
Class IndexMarker
java.lang.Object
de.unima.alcomox.algorithms.IndexMarker
- All Implemented Interfaces:
- java.lang.Comparable<IndexMarker>, java.util.Iterator<java.lang.Integer>
public class IndexMarker
- extends java.lang.Object
- implements java.lang.Comparable<IndexMarker>, java.util.Iterator<java.lang.Integer>
An index marker is an array of flags that inform wether or not a
correspondence of a mapping is active or not. It is used for fast performance
of algorithms compared to directly working on mappings and correspondences.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
IndexMarker
public IndexMarker(Mapping mapping,
ConflictStore cm)
- Constructs an index-marker of size specified by a mapping. The flags are
set such that each correspondence is accepted. Normally the root in
search algorithms.
- Parameters:
mapping
- The mapping that determines size and confidence values of this
index-marker.
initOrResetIndex
public void initOrResetIndex()
getChild
public IndexMarker getChild(int index,
ConflictStore cm)
- Constructs a child of an index-marker which ic the parent index-maker
where on of the flags is set from true to false (one correspondence
dismissed).
- Parameters:
index
- The index of the correspondence to be dismissed.
isActive
public boolean isActive(int index)
getActiveMapping
public Mapping getActiveMapping(Mapping mapping)
getInactiveMapping
public Mapping getInactiveMapping(Mapping mapping)
getEstimatedTrustLoss
public double getEstimatedTrustLoss()
getTrust
public double getTrust()
getFinalTrust
public double getFinalTrust()
activeSize
public int activeSize()
size
public int size()
compareTo
public int compareTo(IndexMarker that)
- Specified by:
compareTo
in interface java.lang.Comparable<IndexMarker>
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
deactivate
public void deactivate(int index)
getConfidence
public double getConfidence(int index)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<java.lang.Integer>
next
public java.lang.Integer next()
- Specified by:
next
in interface java.util.Iterator<java.lang.Integer>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<java.lang.Integer>