code: public static void checkVectorAddition() {
          DoubleMatrix x = new DoubleMatrix(3, 1, 1.0, 2.0, 3.0);
          DoubleMatrix y = new DoubleMatrix(3, 1, 4.0, 5.0, 6.0);
          DoubleMatrix z = new DoubleMatrix(3, 1, 5.0, 7.0, 9.0);
  
          check("checking vector addition", x.add(y).equals(z));
      }
docs: Check whether vector addition works. This is pure Java code and should work.