Package org.djunits.value.vdouble.matrix
Class DoubleMatrixConstructorsTest
java.lang.Object
org.djunits.value.vdouble.matrix.DoubleMatrixConstructorsTest
Test constructors of DoubleMatrix.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compareValues
(double[][] reference, double[][] got) Compare two double arrays.void
compareValuesWithScale
(org.djunits.unit.scale.Scale scale, double[][] reference, double[][] got) Compare two double arrays with factor and offset (derived from a scale).void
compareValuesWithScale
(org.djunits.unit.scale.Scale scale, Collection<org.djunits.value.vdouble.matrix.base.DoubleSparseValue<?, ?>> 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 the SIMatrix class.void
test double[][] constructorsvoid
test Map<Integer, Double> constructorsvoid
test 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 org.djunits.value.ValueRuntimeException, org.djunits.unit.util.UnitException, ClassNotFoundExceptionTest the SIMatrix class.- Throws:
org.djunits.unit.util.UnitException
- if that happens uncaught; this test has failedorg.djunits.value.ValueRuntimeException
- if that happens uncaught; this test has failedClassNotFoundException
- if that happens uncaught; this test has failed
-
exceptionsTest
@Test public void exceptionsTest() throws org.djunits.value.ValueRuntimeException, org.djunits.unit.util.UnitExceptionTest all the exception that the constructors may throw.- Throws:
org.djunits.unit.util.UnitException
- when that happens uncaught; this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught; this test has failed
-
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
public void compareValuesWithScale(org.djunits.unit.scale.Scale scale, double[][] reference, double[][] got) 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
-
compareValuesWithScale
public void compareValuesWithScale(org.djunits.unit.scale.Scale scale, Collection<org.djunits.value.vdouble.matrix.base.DoubleSparseValue<?, ?>> reference, double[][] got) Compare two double arrays with factor and offset (derived from a scale).- Parameters:
scale
- Scale; the scalereference
- Collection<DoubleSparseValue>; the reference valuesgot
- double[][] the values that should match the reference values
-