src/main/java/org/thegalactic/context/constraint/numerical/NumericalStorage.java
public NumericalStorage union(final NumericalStorage storage) {
        final int size = this.inf.size();
        if (storage.inf.size() == size) {
            for (int index = 0; index < size; index++) {
                this.inf.set(index, Math.min(this.inf.get(index), storage.inf.get(index)));
                this.sup.set(index, Math.max(this.sup.get(index), storage.sup.get(index)));
            }
            return this;
        } else {
            throw new IllegalArgumentException(EXCEPTION_SIZE);
        }
    }
/**
     * Union.
     *
     * An approximation is made for union when the two intervals are disjoint.
     * The result is the minimum interval containing both intervals.
     *
     * @param storage NumericalStorage
     *
     * @return this for chaining
     */
Union.
An approximation is made for union when the two intervals are disjoint.
The result is the minimum interval containing both intervals.



@return this for chaining
Union . An approximation is made for union when the two intervals are disjoint . The result is the minimum interval containing both intervals . @return this for chaining
public NumericalStorage union(final NumericalStorage storage) {
        final int size = this.inf.size();
        if (storage.inf.size() == size) {
            for (int index = 0; index < size; index++) {
                this.inf.set(index, Math.min(this.inf.get(index), storage.inf.get(index)));
                this.sup.set(index, Math.max(this.sup.get(index), storage.sup.get(index)));
            }
            return this;
        } else {
            throw new IllegalArgumentException(EXCEPTION_SIZE);
        }
    }
public NumericalStorage union ( final NumericalStorage storage ) { final int size = this . inf . size ( ) ; if ( storage . inf . size ( ) == size ) { for ( int index = 0 ; index < size ; index ++ ) { this . inf . set ( index , Math . min ( this . inf . get ( index ) , storage . inf . get ( index ) ) ) ; this . sup . set ( index , Math . max ( this . sup . get ( index ) , storage . sup . get ( index ) ) ) ; } return this ; } else { throw new IllegalArgumentException ( EXCEPTION_SIZE ) ; } }
Union.
Union .