fr.cnes.sirius.patrius.tools.ephemerisComparator
Class VectorDPFacade

java.lang.Object
  extended by org.apache.commons.math3.linear.RealVector
      extended by org.apache.commons.math3.linear.ArrayRealVector
          extended by fr.cnes.sirius.patrius.tools.ephemerisComparator.VectorDPFacade
All Implemented Interfaces:
DeviationProvider, Serializable

public class VectorDPFacade
extends ArrayRealVector
implements DeviationProvider

This class is a facade for the use of vectors.

Since:
1.0
Version:
$Id: VectorDPFacade.java 17581 2017-05-10 12:47:31Z bignon $
Author:
Philippe Pavero
See Also:
DeviationProvider, Serialized Form
Concurrency :
immutable

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.math3.linear.RealVector
RealVector.Entry, RealVector.SparseEntryIterator
 
Constructor Summary
VectorDPFacade(double[] data)
          simple constructor.
 
Method Summary
 double computeDeviationTo(boolean absolute, DeviationProvider obj, boolean positive)
          computes the relative deviation between the stored vector value and the given one.
 
Methods inherited from class org.apache.commons.math3.linear.ArrayRealVector
add, addToEntry, append, append, append, checkVectorDimensions, checkVectorDimensions, combine, combineToSelf, copy, dotProduct, ebeDivide, ebeMultiply, equals, getDataRef, getDimension, getDistance, getEntry, getL1Distance, getL1Norm, getLInfDistance, getLInfNorm, getNorm, getSubVector, hashCode, isInfinite, isNaN, map, mapAddToSelf, mapDivideToSelf, mapMultiplyToSelf, mapSubtractToSelf, mapToSelf, outerProduct, set, setEntry, setSubVector, setSubVector, subtract, toArray, toString, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder
 
Methods inherited from class org.apache.commons.math3.linear.RealVector
checkIndex, checkIndices, cosine, getMaxIndex, getMaxValue, getMinIndex, getMinValue, iterator, mapAdd, mapDivide, mapMultiply, mapSubtract, projection, sparseIterator, unitize, unitVector, unmodifiableRealVector
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VectorDPFacade

public VectorDPFacade(double[] data)
simple constructor.

Parameters:
data - the vectors components
Since:
1.0
See Also:
ArrayRealVector.ArrayRealVector(double[])
Method Detail

computeDeviationTo

public final double computeDeviationTo(boolean absolute,
                                       DeviationProvider obj,
                                       boolean positive)
computes the relative deviation between the stored vector value and the given one.

Specified by:
computeDeviationTo in interface DeviationProvider
Parameters:
absolute - absolute or relative comparison
obj - the DeviationProvider that should be a VectorDPFacade
positive - true if absolute value of deviations, false otherwise
Returns:
the deviation between the two values. The deviation is positive if the stored value is greater than the one given, 0 if they are equal and negative if smaller.
Throws:
EphemerisComparatorRuntimeException - if the DeviationProvider is not of the correct type
See Also:
DeviationProvider.computeDeviationTo(boolean, DeviationProvider, boolean)


Copyright © 2017 CNES. All Rights Reserved.