Package org.djunits.value.vfloat.matrix
Class FloatMatrixConstructorsTest
java.lang.Object
org.djunits.value.vfloat.matrix.FloatMatrixConstructorsTest
Test constructors of FloatMatrix.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compareValues
(float[][] reference, float[][] got) Compare two float arrays.void
compareValuesWithScale
(org.djunits.unit.scale.Scale scale, float[][] reference, float[][] got) Compare two float arrays with factor and offset (derived from a scale).void
compareValuesWithScale
(org.djunits.unit.scale.Scale scale, Collection<org.djunits.value.vfloat.matrix.base.FloatSparseValue<?, ?>> reference, float[][] got) Compare two float arrays with factor and offset (derived from a scale).void
Test all the exception that the constructors may throw.void
Test the FloatSIMatrix class.void
test float[][] constructorsvoid
test Map<Integer, Float> constructorsvoid
test Scalar[][] constructors
-
Constructor Details
-
FloatMatrixConstructorsTest
public FloatMatrixConstructorsTest()
-
-
Method Details
-
testFloatConstructors
@Test public void testFloatConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundExceptiontest float[][] 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
-
testMapFloatConstructors
@Test public void testMapFloatConstructors() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptiontest Map<Integer, Float> 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 FloatSIMatrix 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(float[][] reference, float[][] got) Compare two float arrays.- Parameters:
reference
- float[][]; the reference valuesgot
- float[][] the values that should match the reference values
-
compareValuesWithScale
public void compareValuesWithScale(org.djunits.unit.scale.Scale scale, float[][] reference, float[][] got) 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
-
compareValuesWithScale
public void compareValuesWithScale(org.djunits.unit.scale.Scale scale, Collection<org.djunits.value.vfloat.matrix.base.FloatSparseValue<?, ?>> reference, float[][] got) Compare two float arrays with factor and offset (derived from a scale).- Parameters:
scale
- Scale; the scalereference
- Collection<FloatSparseValue>; the reference valuesgot
- float[][] the values that should match the reference values
-