Package org.djunits.value.vdouble.vector
Class DoubleSIVectorTest
java.lang.Object
org.djunits.value.vdouble.vector.DoubleSIVectorTest
Test.java.
Copyright (c) 2019-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License
- Author:
- Alexander Verbraeck
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compareValuesWithScale
(Scale scale, double[] reference, double[] got) Compare two double arrays with factor and offset (derived from a scale).<AU extends AbsoluteLinearUnit<AU,
RU>, A extends DoubleScalarAbs<AU, A, RU, R>, AV extends DoubleVectorAbs<AU, A, AV, RU, R, RV>, RU extends Unit<RU>, R extends DoubleScalarRelWithAbs<AU, A, RU, R>, RV extends DoubleVectorRelWithAbs<AU, A, AV, RU, R, RV>>
voidTest all "asXX" methods.<U extends Unit<U>>
voidTest most "asXX" methods.<U extends Unit<U>>
voidTest the "asXX" methods of the remaining classes.void
Test the methods that are only implemented in DimensionLess vectors.static void
verifyDimensionLessVector
(double[] reference, DoubleFunction operation, DimensionlessVector got) Verify the contents of a FloatDimensionlessVector.
-
Constructor Details
-
DoubleSIVectorTest
public DoubleSIVectorTest()
-
-
Method Details
-
testAsAll
@Test public <AU extends AbsoluteLinearUnit<AU,RU>, void testAsAll() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, UnitException, InstantiationExceptionA extends DoubleScalarAbs<AU, A, RU, R>, AV extends DoubleVectorAbs<AU, A, AV, RU, R, RV>, RU extends Unit<RU>, R extends DoubleScalarRelWithAbs<AU, A, RU, R>, RV extends DoubleVectorRelWithAbs<AU, A, AV, RU, R, RV>> Test all "asXX" methods.- Type Parameters:
AU
- the absolute unit typeA
- the absolute scalar typeAV
- the absolute vector typeRU
- the relative unit typeR
- the relative scalar typeRV
- the relative vector type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errorUnitException
- on errorInstantiationException
- on error
-
testDimensionLess
@Test public void testDimensionLess()Test the methods that are only implemented in DimensionLess vectors. -
testAsMost
@Test public <U extends Unit<U>> void testAsMost() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, UnitException, InstantiationExceptionTest most "asXX" methods.- Type Parameters:
U
- the unit type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errorUnitException
- on errorInstantiationException
- on error
-
testAsRemaining
@Test public <U extends Unit<U>> void testAsRemaining() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, UnitException, InstantiationExceptionTest the "asXX" methods of the remaining classes.- Type Parameters:
U
- the unit type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errorUnitException
- on errorInstantiationException
- on error
-
verifyDimensionLessVector
public static void verifyDimensionLessVector(double[] reference, DoubleFunction operation, DimensionlessVector got) Verify the contents of a FloatDimensionlessVector.- Parameters:
reference
- double[]; the values on which theoperation
needs to be applied to get the values that must be verifiedoperation
- FloatFunction; the operation that converts thereference
values to the values that must be verifiedgot
- FloatDimensionlessVector; the values that must be verified
-
compareValuesWithScale
Compare two double arrays with factor and offset (derived from a scale).- Parameters:
scale
- Scale; the scalereference
- double[]; the reference valuesgot
- double[] the values that should match the reference values
-