Updates this vector to be the entrywise product (i.e. Hadamard product) of this vector with the other.
165125
public void product(LongIntVector other) {
        // TODO: Add special case for LongIntDenseVector.
        for (int i=0; i<idxAfterLast; i++) {
            elements[i] *= other.get(i);
        }
    }
21410
public void product(LongIntVector other) {
        // TODO: Add special case for LongIntDenseVector.
        for (int i=0; i<size; i++) {
            elements[i + start] *= other.get(i);
        }
    }
895502
public RowVector multiply(RowVector rv) throws MatrixException
    {
        // Validate rv's size.
        if (nCols != rv.nCols) {
            throw new MatrixException(
                                MatrixException.INVALID_DIMENSIONS);
        }

        double pv[] = new double[nRows];  // product values

        // Compute the values of the product.
        for (int c = 0; c < nCols; ++c) {
            double dot = 0;
            for (int r = 0; r < nRows; ++r) {
                dot += rv.values[0][r] * values[r][c];
            }
            pv[c] = dot;
        }

        return new RowVector(pv);
    }
653691
public void add(MultidimensionalReward other) {
        for (Map.Entry<Integer, Float> entry : other.map.entrySet()) {
            Integer dimension = entry.getKey();
            Float reward_value = entry.getValue();
            this.add(dimension.intValue(), reward_value.floatValue());
        }
    }
314543
public static void update(DMatrixRMaj H ,
							  DMatrixRMaj s ,
							  DMatrixRMaj y ,
							  DMatrixRMaj tempV0, DMatrixRMaj tempV1) {
		double p = VectorVectorMult_DDRM.innerProd(y,s);
		if( p == 0 )
			return;

		p = 1.0/p;

		double sBs = VectorVectorMult_DDRM.innerProdA(s,H,s);
		if( sBs == 0 )
			return;

		CommonOps_DDRM.mult(H,s,tempV0);
		CommonOps_DDRM.multTransA(s,H,tempV1);

		VectorVectorMult_DDRM.rank1Update(-p, H , tempV0, y);
		VectorVectorMult_DDRM.rank1Update(-p, H , y, tempV1);
		VectorVectorMult_DDRM.rank1Update(p*(p*sBs+1), H , y, y);
	}
133028
public void add(IntLongVector other) {
        if (other instanceof IntLongUnsortedVector) {
            IntLongUnsortedVector vec = (IntLongUnsortedVector) other;
            for (int i=0; i<vec.top; i++) {
                this.add(vec.idx[i], vec.vals[i]);
            }
        } else {
            //  TODO: Add special case for IntLongDenseVector.
            other.iterate(new SparseBinaryOpApplier(this, new Lambda.LongAdd()));
        }
    }
683095
public void set(IntDoubleSortedVector other) {
        this.used = other.used;
        this.indices = IntArrays.copyOf(other.indices);
        this.values = DoubleArrays.copyOf(other.values);
    }
687594
def union_update(self, other, ignore_conflicts=False):
        """"""
        if not ignore_conflicts:
            ensure_compatible(self, other)
        self._objects |= other._objects
        self._properties |= other._properties
        self._pairs |= other._pairs
799275
public LongIntSortedVector getProd(LongIntVector other) {
        LongIntSortedVector prod = new LongIntSortedVector(this);
        prod.product(other);
        return prod;
    }
828986
def transform(self, vector):
        
        if isinstance(vector, RDD):
            vector = vector.map(_convert_to_vector)

        else:
            vector = _convert_to_vector(vector)
        return callMLlibFunc("elementwiseProductVector", self.scalingVector, vector)
629062
protected void updateBox ()
    {
        int hmin = _horz.getMinimum();
        int vmin = _vert.getMinimum();
        _hFactor = (_active.width) / (float) (_horz.getMaximum() - hmin);
        _vFactor = (_active.height) / (float) (_vert.getMaximum() - vmin);

        _box.x = _active.x + Math.round((_horz.getValue() - hmin) * _hFactor);
        _box.width = Math.round(_horz.getExtent() * _hFactor);
        _box.y = _active.y + Math.round((_vert.getValue() - vmin) * _vFactor);
        _box.height = Math.round(_vert.getExtent() * _vFactor);
    }
784191
public void set(IntFloatSortedVector other) {
        this.used = other.used;
        this.indices = IntArrays.copyOf(other.indices);
        this.values = FloatArrays.copyOf(other.values);
    }
848646
private static void add(IntegerVector semantics, TernaryVector index) {
        // Lock on the semantic vector to avoid a race condition with another
        // thread updating its semantics.  Use the vector to avoid a class-level
        // lock, which would limit the concurrency.
        synchronized(semantics) {
            for (int p : index.positiveDimensions())
                semantics.add(p, 1);
            for (int n : index.negativeDimensions())
                semantics.add(n, -1);
        }
    }
1280635
def _update(self, other):
        
        for key, value in other.items():
            self[key] = value
662776
function transform(m) {
         var points = this.points;
         var len = points.length;

         for (var i = 0; i < len; i++) {
           m.multiplyVector(points[i]);
         }

         this.recalc();
         this.updateBounds();
         return this;
       }
1336789
public static Vector add(Vector vector1, Vector vector2) {
        if (vector2.length() != vector1.length())
            throw new IllegalArgumentException(
                    "Vectors of different sizes cannot be added");
        if (vector2 instanceof IntegerVector &&
            vector1 instanceof DoubleVector)
            return add(vector1, Vectors.asDouble(vector2));
        if (vector2 instanceof SparseVector)
            addSparseValues(vector1, vector2);
        else {
            int length = vector2.length();
            for (int i = 0; i < length; ++i) {
                double value = vector2.getValue(i).doubleValue() +
                               vector1.getValue(i).doubleValue();
                vector1.set(i, value);
            }
        }

        return vector1;
    }
1172747
public void product(IntIntVector other) {
        // TODO: Add special case for IntIntDenseVector.
        for (int i=0; i<size; i++) {
            elements[i + start] *= other.get(i);
        }
    }