Package org.djunits.value.vfloat.vector
Class FloatSIVectorTest
java.lang.Object
org.djunits.value.vfloat.vector.FloatSIVectorTest
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, float[] reference, float[] got) Compare two float arrays with factor and offset (derived from a scale).<AU extends AbsoluteLinearUnit<AU,
RU>, A extends FloatScalarAbs<AU, A, RU, R>, AV extends FloatVectorAbs<AU, A, AV, RU, R, RV>, RU extends Unit<RU>, R extends FloatScalarRelWithAbs<AU, A, RU, R>, RV extends FloatVectorRelWithAbs<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
(float[] reference, FloatFunction operation, FloatDimensionlessVector got) Verify the contents of a FloatFloatDimensionlessVector.
-
Constructor Details
-
FloatSIVectorTest
public FloatSIVectorTest()
-
-
Method Details
-
testAsAll
@Test public <AU extends AbsoluteLinearUnit<AU,RU>, void testAsAll() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, UnitException, InstantiationExceptionA extends FloatScalarAbs<AU, A, RU, R>, AV extends FloatVectorAbs<AU, A, AV, RU, R, RV>, RU extends Unit<RU>, R extends FloatScalarRelWithAbs<AU, A, RU, R>, RV extends FloatVectorRelWithAbs<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(float[] reference, FloatFunction operation, FloatDimensionlessVector got) Verify the contents of a FloatFloatDimensionlessVector.- Parameters:
reference
- float[]; 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
- FloatFloatDimensionlessVector; the values that must be verified
-
compareValuesWithScale
Compare two float arrays with factor and offset (derived from a scale).- Parameters:
scale
- Scale; the scalereference
- float[]; the reference valuesgot
- float[] the values that should match the reference values
-