Vector1D implements Vector<Euclidean1D> { public Space getSpace() { return Euclidean1D.getInstance(); } Vector1D(double x);  Vector1D(double a, Vector1D u);  Vector1D(double a1, Vector1D u1, double a2, Vector1D u2);  Vector1D(double a1, Vector1D u1, double a2, Vector1D u2,
                   double a3, Vector1D u3);  Vector1D(double a1, Vector1D u1, double a2, Vector1D u2,
                   double a3, Vector1D u3, double a4, Vector1D u4); double getX(); Space getSpace(); Vector1D getZero(); double getNorm1(); double getNorm(); double getNormSq(); double getNormInf(); Vector1D add(Vector<Euclidean1D> v); Vector1D add(double factor, Vector<Euclidean1D> v); Vector1D subtract(Vector<Euclidean1D> p); Vector1D subtract(double factor, Vector<Euclidean1D> v); Vector1D normalize(); Vector1D negate(); Vector1D scalarMultiply(double a); boolean isNaN(); boolean isInfinite(); double distance1(Vector<Euclidean1D> p); @Deprecated double distance(Vector<Euclidean1D> p); double distance(Point<Euclidean1D> p); double distanceInf(Vector<Euclidean1D> p); double distanceSq(Vector<Euclidean1D> p); double dotProduct(final Vector<Euclidean1D> v); static double distance(Vector1D p1, Vector1D p2); static double distanceInf(Vector1D p1, Vector1D p2); static double distanceSq(Vector1D p1, Vector1D p2); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); String toString(final NumberFormat format); static final Vector1D ZERO; static final Vector1D ONE; static final Vector1D NaN; static final Vector1D POSITIVE_INFINITY; static final Vector1D NEGATIVE_INFINITY; }
@Test public void testSpace() { Space space = new Vector1D(1).getSpace(); Assert.assertEquals(1, space.getDimension()); }