Package org.djunits.value.vdouble.matrix
Class DoubleMatrixConstructorsTest
java.lang.Object
org.djunits.value.vdouble.matrix.DoubleMatrixConstructorsTest
Test constructors of DoubleMatrix.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompareValues(double[][] reference, double[][] got) Compare two double arrays.voidcompareValuesWithScale(Scale scale, double[][] reference, double[][] got) Compare two double arrays with factor and offset (derived from a scale).voidcompareValuesWithScale(Scale scale, Collection<DoubleSparseValue<?, ?>> reference, double[][] got) Compare two double arrays with factor and offset (derived from a scale).voidTest all the exception that the constructors may throw.voidTest the SIMatrix class.voidtest double[][] constructors.voidtest Map<Integer, Double> constructors.voidtest Scalar[][] constructors.
-
Constructor Details
-
DoubleMatrixConstructorsTest
public DoubleMatrixConstructorsTest()
-
-
Method Details
-
testDoubleConstructors
@Test public void testDoubleConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundExceptiontest double[][] constructors.- Throws:
SecurityException- on errorNoSuchMethodException- on errorInvocationTargetException- on errorIllegalArgumentException- on errorIllegalAccessException- on errorInstantiationException- on errorClassNotFoundException- 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
-
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
-
siMatrixConstructors
@Test public void siMatrixConstructors() throws ValueRuntimeException, UnitException, ClassNotFoundExceptionTest the SIMatrix 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
-
compareValues
public void compareValues(double[][] reference, double[][] got) Compare two double arrays.- Parameters:
reference- 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- the scalereference- the reference valuesgot- double[][] the values that should match the reference values
-
compareValuesWithScale
public void compareValuesWithScale(Scale scale, Collection<DoubleSparseValue<?, ?>> reference, double[][] got) Compare two double arrays with factor and offset (derived from a scale).- Parameters:
scale- the scalereference- the reference valuesgot- double[][] the values that should match the reference values
-