public void add(LongIntVector other) {
        if (other instanceof LongIntUnsortedVector) {
            LongIntUnsortedVector vec = (LongIntUnsortedVector) other;
            for (int i=0; i<vec.top; i++) {
                this.add(vec.idx[i], vec.vals[i]);
            }
        } else {
            //  TODO: Add special case for LongIntDenseVector.
            other.iterate(new SparseBinaryOpApplier(this, new Lambda.IntAdd()));
        }
    }
public void add ( LongIntVector other ) { if ( other instanceof LongIntUnsortedVector ) { LongIntUnsortedVector vec = ( LongIntUnsortedVector ) other ; for ( int i = 0 ; i < vec . top ; i ++ ) { this . add ( vec . idx [ i ] , vec . vals [ i ] ) ; } } else { other . iterate ( new SparseBinaryOpApplier ( this , new Lambda . IntAdd ( ) ) ) ; } }
Updates this vector to be the entrywise sum of this vector with the other.