Package org.djunits.value.vdouble.vector
Class DoubleVectorConstructorsTest
java.lang.Object
org.djunits.value.vdouble.vector.DoubleVectorConstructorsTest
Test constructors of DoubleVector.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compareValues
(double[] reference, double[] got) Compare two double arrays.void
compareValuesWithScale
(Scale scale, double[] reference, double[] got) Compare two double arrays with factor and offset (derived from a scale).void
Test all the exception that the constructors may throw.void
Test that parallelized operations work.void
Test the SIVector class.void
test double[] constructors.void
test List<Double> constructors.void
test List<Scalar> constructors.void
test Map<Integer, Double> constructors.void
test Map<Integer, Scalar> constructors.void
test Scalar[] constructors.
-
Constructor Details
-
DoubleVectorConstructorsTest
public DoubleVectorConstructorsTest()
-
-
Method Details
-
testDoubleConstructors
@Test public void testDoubleConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest double[] constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
testScalarConstructors
@Test public void testScalarConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest Scalar[] constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
testListDoubleConstructors
@Test public void testListDoubleConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest List<Double> constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
testListScalarConstructors
@Test public void testListScalarConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest List<Scalar> constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
testMapDoubleConstructors
@Test public void testMapDoubleConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest Map<Integer, Double> constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
testMapScalarConstructors
@Test public void testMapScalarConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest Map<Integer, Scalar> constructors.- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorInstantiationException
- on error
-
siVectorConstructors
@Test public void siVectorConstructors() throws ValueRuntimeException, UnitException, ClassNotFoundExceptionTest the SIVector class.- Throws:
UnitException
- if that happens uncaught; this test has failedValueRuntimeException
- if that happens uncaught; this test has failedClassNotFoundException
- if that happens uncaught; this test has failed
-
exceptionsTest
Test all the exception that the constructors may throw.- Throws:
UnitException
- when that happens uncaught; this test has failedValueRuntimeException
- when that happens uncaught; this test has failed
-
parallelTest
@Test public void parallelTest()Test that parallelized operations work. -
compareValues
public void compareValues(double[] reference, double[] got) Compare two double arrays.- Parameters:
reference
- double[]; the reference valuesgot
- double[] the values that should match the reference values
-
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
-