org.ddogleg.fitting.modelset
Class MultipleToSingle
- java.lang.Object
-
- org.ddogleg.fitting.modelset.MultipleToSingle
-
- All Implemented Interfaces:
- ModelMatcher
public class MultipleToSingle extends java.lang.Object implements ModelMatcher
Converts aModelMatcherMultiinto aModelMatcherfor testing purposes.
-
-
Constructor Summary
Constructors Constructor and Description MultipleToSingle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetFitQuality()Returns the metric used to evaluate the quality of fit.intgetInputIndex(int matchIndex)For an item in the match set, return the index of the item in the original input set.java.util.ListgetMatchSet()A set of points which match the provided parameters.intgetMinimumSize()This is the minimum number of observations which can be input and produce a valid model.java.lang.ObjectgetModelParameters()Model for the match setbooleanprocess(java.util.List dataSet)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.
-
-
-
Method Detail
-
process
public boolean process(java.util.List dataSet)
Description copied from interface:ModelMatcherFinds 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:
processin interfaceModelMatcher- Parameters:
dataSet- Set of points (with noise) that are to be fit.- Returns:
- true if it successfully found a solution or false if not.
-
getModelParameters
public java.lang.Object getModelParameters()
Description copied from interface:ModelMatcherModel for the match set- Specified by:
getModelParametersin interfaceModelMatcher- Returns:
- model.
-
getMatchSet
public java.util.List getMatchSet()
Description copied from interface:ModelMatcherA set of points which match the provided parameters.- Specified by:
getMatchSetin interfaceModelMatcher- Returns:
- List of points in the match set.
-
getInputIndex
public int getInputIndex(int matchIndex)
Description copied from interface:ModelMatcherFor an item in the match set, return the index of the item in the original input set.- Specified by:
getInputIndexin interfaceModelMatcher- Parameters:
matchIndex- Index of an element in the match set.- Returns:
- Index of the same element in the original input list.
-
getFitQuality
public double getFitQuality()
Description copied from interface:ModelMatcherReturns the metric used to evaluate the quality of fit. Meaning is implementation specific. Larger or smaller values could be preferred depending on implementation..- Specified by:
getFitQualityin interfaceModelMatcher- Returns:
- Quality of fit to matched set of points
-
getMinimumSize
public int getMinimumSize()
Description copied from interface:ModelMatcherThis is the minimum number of observations which can be input and produce a valid model.- Specified by:
getMinimumSizein interfaceModelMatcher- Returns:
- Minimum number of sample points
-
-
DataMelt 3.0 © DataMelt by jWork.ORG