@Override public Vector get() { return vector.copy(); }
@Override public Vector get() { return vector.copy(); }
@Override public Vector get() { return vector.copy(); }
/** * Constructor for IR. Uses the given vector as template for creating * scratch vectors. Typically, the solution or the right hand side vector * can be passed, and the template is not modified * * @param template * Vector to use as template for the work vectors needed in the * solution process */ public IR(Vector template) { z = template.copy(); r = template.copy(); }
/** * Constructor for IR. Uses the given vector as template for creating * scratch vectors. Typically, the solution or the right hand side vector * can be passed, and the template is not modified * * @param template * Vector to use as template for the work vectors needed in the * solution process */ public IR(Vector template) { z = template.copy(); r = template.copy(); }
/** * Creates a new instance of DenseVector * @param vector Vector from which to populate the elements of this, will not be modified */ protected DenseVector( DenseVector vector ) { this( (no.uib.cipr.matrix.DenseVector) vector.getInternalVector().copy() ); }
private DenseVector sigmoid(Vector vector) { final DenseVector out = (DenseVector) vector.copy(); final double[] xd = out.getData(); for (int i = 0; i < xd.length; i++) xd[i] = 1 / (1 + Math.exp(-xd[i])); return out; } }
/** * Creates a new instance of DenseVector * @param vector Vector from which to populate the elements of this, will not be modified */ protected DenseVector( DenseVector vector ) { this( (no.uib.cipr.matrix.DenseVector) vector.getInternalVector().copy() ); }
@Override public Vector copy() { return Matrices.synchronizedVector(x.copy()); }
/** * Creates a new instance of DenseVector * @param vector Vector from which to populate the elements of this, will not be modified */ protected DenseVector( DenseVector vector ) { this( (no.uib.cipr.matrix.DenseVector) vector.getInternalVector().copy() ); }
private DenseVector sigmoid(Vector vector) { final DenseVector out = (DenseVector) vector.copy(); final double[] xd = out.getData(); for (int i = 0; i < xd.length; i++) xd[i] = 1 / (1 + Math.exp(-xd[i])); return out; } }
@Override public Vector copy() { return Matrices.synchronizedVector(x.copy()); }
@Override public AbstractMTJVector clone() { AbstractMTJVector clone = (AbstractMTJVector) super.clone(); clone.setInternalVector( this.getInternalVector().copy() ); return clone; }
@Override public AbstractMTJVector clone() { AbstractMTJVector clone = (AbstractMTJVector) super.clone(); clone.setInternalVector( this.getInternalVector().copy() ); return clone; }
@Override public AbstractMTJVector clone() { AbstractMTJVector clone = (AbstractMTJVector) super.clone(); clone.setInternalVector( this.getInternalVector().copy() ); return clone; }
private Vector project(Vector v, Vector u){ return u.copy().scale((v.dot(u) / u.dot(u))); }
private static Point2d end(Vector origin, Vector dir) { final Vector ret = origin.copy().add(10000, dir); return new Point2dImpl((float) ret.get(0), (float) ret.get(1)); }
private static Point2d start(Vector origin, Vector dir) { final Vector ret = origin.copy().add(-10000, dir); return new Point2dImpl((float) ret.get(0), (float) ret.get(1)); }
private static Point2d end(Vector origin, Vector dir) { final Vector ret = origin.copy().add(10000, dir); return new Point2dImpl((float) ret.get(0), (float) ret.get(1)); }
private static Point2d start(Vector origin, Vector dir) { final Vector ret = origin.copy().add(-10000, dir); return new Point2dImpl((float) ret.get(0), (float) ret.get(1)); }