/** * Copy this vector and multiply its values by a * scalar * @param value scalar multiplier * @return the multiplied vector */ public SparseFloatArray multiply(double value) { return copy().multiplyInplace(value); }
final double d = x.dotProduct(x); if (d > 0 && d != 1.0) x.multiplyInplace(1.0 / Math.sqrt(d));
final double d = x.dotProduct(x); if (d > 0 && d != 1.0) x.multiplyInplace(1.0 / Math.sqrt(d));