Class AbsMatrixNxNTest

java.lang.Object
org.djunits.vecmat.dn.AbsMatrixNxNTest

public class AbsMatrixNxNTest extends Object
Tests for AbsMatrixNxN.

This class provides exhaustive coverage of AbsMatrixNxN and all inherited functionality from AbsSquareMatrix, AbsMatrix, AbsTable, AbsVectorMatrix and Value. The tests intentionally use an NxN matrix with N = 2 to exercise the generic NxN implementation paths while keeping test logic manageable.

Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.

Author:
Alexander Verbraeck
  • Constructor Details

    • AbsMatrixNxNTest

      public AbsMatrixNxNTest()
  • Method Details

    • testCtorBase

      @Test public void testCtorBase()
      Test constructor and base methods.
    • testCtorExceptions

      @Test public void testCtorExceptions()
      Test constructor exceptions.
    • testInstantiateSi

      @Test public void testInstantiateSi()
      Test instantiateSi().
    • testStaticFactories

      @Test public void testStaticFactories()
      Test all static of() and ofSi() factories.
    • testAbsStaticFactories

      @Test public void testAbsStaticFactories()
      Test the of(A[]) and of(A[][]) static factories.
    • testScalarAndSiGrids

      @Test public void testScalarAndSiGrids()
      Test scalar and SI array / grid extraction.
    • testGetRowAndColumnSi

      @Test public void testGetRowAndColumnSi()
      Test 0-based row and column SI access.
    • testGetRowAndColumnScalars

      @Test public void testGetRowAndColumnScalars()
      Test 0-based scalar row access.
    • testMgetRowAndColumnSi

      @Test public void testMgetRowAndColumnSi()
      Test 1-based row and column SI access.
    • testMgetRowAndColumnScalars

      @Test public void testMgetRowAndColumnScalars()
      Test 1-based scalar row and column access.
    • testDiagonalSi

      @Test public void testDiagonalSi()
      Test diagonal SI.
    • testDiagonalScalars

      @Test public void testDiagonalScalars()
      Test diagonal scalar.
    • testGetRowAndColumnVector

      @Test public void testGetRowAndColumnVector()
      Test 0-based vector row and column access.
    • testMgetRowAndColumnVector

      @Test public void testMgetRowAndColumnVector()
      Test 1-based vector row and column access.
    • testDiagonalVector

      @Test public void testDiagonalVector()
      Test diagonal vector.
    • testMinMaxMedian

      @Test public void testMinMaxMedian()
      Test min(), max() and median().
    • testTranspose

      @Test public void testTranspose()
      Test transpose().
    • testAddSubtract

      @Test public void testAddSubtract()
      Test add() and subtract() methods.
    • testToString

      @Test public void testToString()
      Test toString().
    • testEqualsHashCode

      @Test public void testEqualsHashCode()
      Test equals(), hashCode().
    • testVectorAccess

      @Test public void testVectorAccess()
      Test mgetRowVector and getColumnVector.
    • testSymmetry

      @Test public void testSymmetry()
      Test symmetric and skew-symmetric checks.
    • testAsFunctions

      @Test @DisplayName("AbsMatrixNxN as() functions test") public void testAsFunctions()
      Test as() functions.