Package com.irurueta.geometry
Class Accuracy2D
java.lang.Object
com.irurueta.geometry.Accuracy
com.irurueta.geometry.Accuracy2D
- All Implemented Interfaces:
Serializable
Contains methods to convert covariance matrices into ellipses representing accuracy
with requested confidence.
- See Also:
-
Field Summary
Fields inherited from class com.irurueta.geometry.Accuracy
confidence, sqrtSingularValues, standardDeviationFactor, u -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Accuracy2D(double confidence) Constructor.Accuracy2D(com.irurueta.algebra.Matrix covarianceMatrix) Constructor.Accuracy2D(com.irurueta.algebra.Matrix covarianceMatrix, double confidence) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintGets number of dimensions.Converts provided covariance matrix into a 2D ellipse taking into account current confidence and standard deviation factor.Methods inherited from class com.irurueta.geometry.Accuracy
getAverageAccuracy, getConfidence, getCovarianceMatrix, getLargestAccuracy, getSmallestAccuracy, getStandardDeviationFactor, setConfidence, setCovarianceMatrix, setStandardDeviationFactor
-
Constructor Details
-
Accuracy2D
public Accuracy2D()Constructor. -
Accuracy2D
public Accuracy2D(com.irurueta.algebra.Matrix covarianceMatrix) throws com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException Constructor.- Parameters:
covarianceMatrix- covariance matrix to be set. Must be 2x2 and positive definite.- Throws:
IllegalArgumentException- if provided matrix is not square (it must also be positive definite to be properly converted to an ellipse).com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException- if provided matrix is not symmetric and positive definite.
-
Accuracy2D
public Accuracy2D(double confidence) Constructor.- Parameters:
confidence- confidence of provided accuracy of an estimated position.- Throws:
IllegalArgumentException- if provided value is not within 0 and 1.
-
Accuracy2D
public Accuracy2D(com.irurueta.algebra.Matrix covarianceMatrix, double confidence) throws com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException Constructor.- Parameters:
covarianceMatrix- covariance matrix to be set. Must be 2x2 and positive definite.confidence- confidence of provided accuracy of an estimated position.- Throws:
IllegalArgumentException- if provided matrix is not square (it must also be positive definite to be properly converted to an ellipse), or if provided confidence value is not within 0 and 1.com.irurueta.algebra.NonSymmetricPositiveDefiniteMatrixException- if provided matrix is not symmetric and positive definite.
-
-
Method Details
-
getNumberOfDimensions
public int getNumberOfDimensions()Gets number of dimensions.- Specified by:
getNumberOfDimensionsin classAccuracy- Returns:
- always returns 2.
-
toEllipse
Converts provided covariance matrix into a 2D ellipse taking into account current confidence and standard deviation factor.- Returns:
- ellipse representing accuracy of covariance matrix with current confidence and standard deviation factor.
- Throws:
NullPointerException- if covariance matrix has not been provided yet.InvalidRotationMatrixException- if rotation cannot be properly determined.
-