Class LeastMedianOfSquares_MT<Model,Point>
java.lang.Object
org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares<Model,Point>
org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares_MT<Model,Point>
- All Implemented Interfaces:
InlierFraction
,ModelMatcher<Model,
,Point> ModelMatcherPost<Model,
Point>
Concurrent version of
LeastMedianOfSquares
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares
LeastMedianOfSquares.TrialHelper
-
Field Summary
Fields inherited from class org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares
bestMedian, errorFraction, helper, initializeModels, inlierFrac, inlierSet, matchToInput, maxMedianError, ModelManager, sampleSize, totalCycles, trialRNG
-
Constructor Summary
ConstructorDescriptionLeastMedianOfSquares_MT
(long randSeed, int totalCycles, double maxMedianError, double inlierFraction, ModelManager<Model> modelManager, Class<Point> pointType) LeastMedianOfSquares_MT
(long randSeed, int totalCycles, ModelManager<Model> modelManager, Class<Point> pointType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Finds a set of points from the provided list that are a good fit for the internal model and computes the fit parameters for the model.void
setModel
(Factory<ModelGenerator<Model, Point>> factoryGenerator, Factory<DistanceFromModel<Model, Point>> factoryDistance) Specifies the internal model.Methods inherited from class org.ddogleg.fitting.modelset.lmeds.LeastMedianOfSquares
checkTrialGenerators, computeInlierSet, getErrorFraction, getFitQuality, getInputIndex, getMatchSet, getMinimumSize, getModelParameters, getModelType, getPointType, reset, setErrorFraction, setSampleSize
-
Constructor Details
-
LeastMedianOfSquares_MT
public LeastMedianOfSquares_MT(long randSeed, int totalCycles, double maxMedianError, double inlierFraction, ModelManager<Model> modelManager, Class<Point> pointType) - See Also:
-
LeastMedianOfSquares_MT
public LeastMedianOfSquares_MT(long randSeed, int totalCycles, ModelManager<Model> modelManager, Class<Point> pointType)
-
-
Method Details
-
process
Description copied from interface:ModelMatcher
Finds a set of points from the provided list that are a good fit for the internal model and computes the fit parameters for the model.- Specified by:
process
in interfaceModelMatcher<Model,
Point> - Overrides:
process
in classLeastMedianOfSquares<Model,
Point> - Parameters:
dataSet
- Set of points (with noise) that are to be fit.- Returns:
- true if it successfully found a solution or false if not.
-
setModel
public void setModel(Factory<ModelGenerator<Model, Point>> factoryGenerator, Factory<DistanceFromModel<Model, Point>> factoryDistance) Description copied from interface:ModelMatcherPost
Specifies the internal model. Factories are provided since each thread might need its own unique instance of the generator and distance function if they are not thread safe.- Specified by:
setModel
in interfaceModelMatcherPost<Model,
Point> - Overrides:
setModel
in classLeastMedianOfSquares<Model,
Point> - Parameters:
factoryGenerator
-ModelGenerator
factoryDistance
-DistanceFromModel
-