public class AssociateNearestNeighbor<D extends TupleDesc_F64> extends java.lang.Object implements AssociateDescription<D>
NearestNeighbor search from DDogleg. The source features are processed
as a lump using NearestNeighbor.setPoints(java.util.List, java.util.List) while destination features
are matched one at time using NearestNeighbor.findNearest(double[], double, org.ddogleg.nn.NnData).
Typically the processing of source features is more expensive and should be minimized while looking up
destination features is fast. Multiple matches for source features are possible while there will only
be a unique match for each destination feature.| Constructor and Description |
|---|
AssociateNearestNeighbor(org.ddogleg.nn.NearestNeighbor<java.lang.Integer> alg,
int featureDimension) |
| Modifier and Type | Method and Description |
|---|---|
void |
associate()
Finds the best match for each item in the source list with an item in the destination list.
|
org.ddogleg.struct.FastQueue<AssociatedIndex> |
getMatches()
List of associated features.
|
MatchScoreType |
getScoreType()
Specifies the type of score which is returned.
|
org.ddogleg.struct.GrowQueue_I32 |
getUnassociatedDestination()
Indexes of features in the destination set which are not associated.
|
org.ddogleg.struct.GrowQueue_I32 |
getUnassociatedSource()
Indexes of features in the source set which are not associated.
|
void |
setDestination(org.ddogleg.struct.FastQueue<D> listDst)
Sets the list of destination features
NOTE: A reference to the input list might be saved internally until the next call to this function.
|
void |
setSource(org.ddogleg.struct.FastQueue<D> listSrc)
Sets the list of source features.
|
void |
setThreshold(double score)
Associations are only considered if their score is less than or equal to the specified threshold.
|
boolean |
uniqueDestination()
If at most one match is returned for each destination feature.
|
boolean |
uniqueSource()
If at most one match is returned for each source feature.
|
public AssociateNearestNeighbor(org.ddogleg.nn.NearestNeighbor<java.lang.Integer> alg,
int featureDimension)
public void setSource(org.ddogleg.struct.FastQueue<D> listSrc)
AssociateDescriptionsetSource in interface AssociateDescription<D extends TupleDesc_F64>listSrc - List of featurespublic void setDestination(org.ddogleg.struct.FastQueue<D> listDst)
AssociateDescriptionsetDestination in interface AssociateDescription<D extends TupleDesc_F64>listDst - List of featurespublic void associate()
Associatepublic org.ddogleg.struct.FastQueue<AssociatedIndex> getMatches()
AssociategetMatches in interface Associatepublic org.ddogleg.struct.GrowQueue_I32 getUnassociatedSource()
AssociategetUnassociatedSource in interface Associatepublic org.ddogleg.struct.GrowQueue_I32 getUnassociatedDestination()
AssociategetUnassociatedDestination in interface Associatepublic void setThreshold(double score)
AssociatesetThreshold in interface Associatescore - The threshold.public MatchScoreType getScoreType()
AssociategetScoreType in interface Associatepublic boolean uniqueSource()
AssociateuniqueSource in interface Associatepublic boolean uniqueDestination()
AssociateuniqueDestination in interface Associate