@Test public void testToArray() { IVectorN vector = VectorN.from(42, 1337, 3.14); assertThat(vector.toArray()).isEqualTo(new double[] { 42d, 1337d, 3.14 }); }
public static VectorN from(final double... data) { if (data == null) { return VectorN.empty(); } return new VectorN(data); }
VectorN extends AVectorN { public static VectorN from(final double... data) { if (data == null) { return VectorN.empty(); } return new VectorN(data); } }
VectorN extends AVectorN { public static VectorN from(final double... data) { if (data == null) { return VectorN.empty(); } return new VectorN(data); } private  VectorN(final int dim); private  VectorN(final double... data); private  VectorN(final IVector vector); }
VectorN extends AVectorN { public static VectorN from(final double... data) { if (data == null) { return VectorN.empty(); } return new VectorN(data); } private  VectorN(final int dim); private  VectorN(final double... data); private  VectorN(final IVector vector); static VectorN zero(final int dim); static VectorN empty(); static VectorN from(final double... data); static VectorN copy(final IVector vector); static VectorN fromReal(final RealVector rv); void set(final int i, final double value); VectorN add(final IVector vector); VectorN subtract(final IVector vector); VectorN multiply(final double factor); VectorN apply(final Function<Double, Double> function); @Override double x(); @Override double y(); @Override double get(final int i); @Override int getNumDimensions(); }
VectorN extends AVectorN { public static VectorN from(final double... data) { if (data == null) { return VectorN.empty(); } return new VectorN(data); } private  VectorN(final int dim); private  VectorN(final double... data); private  VectorN(final IVector vector); static VectorN zero(final int dim); static VectorN empty(); static VectorN from(final double... data); static VectorN copy(final IVector vector); static VectorN fromReal(final RealVector rv); void set(final int i, final double value); VectorN add(final IVector vector); VectorN subtract(final IVector vector); VectorN multiply(final double factor); VectorN apply(final Function<Double, Double> function); @Override double x(); @Override double y(); @Override double get(final int i); @Override int getNumDimensions();  }