Package org.apache.commons.math.util.OpenIntToDoubleHashMap

Examples of org.apache.commons.math.util.OpenIntToDoubleHashMap.Iterator


    }

    /** {@inheritDoc} */
    public double getNorm() {
        double res = 0;
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            res += iter.value() * iter.value();
        }
        return Math.sqrt(res);
    }
View Full Code Here


    }

    /** {@inheritDoc} */
    public boolean isInfinite() {
        boolean infiniteFound = false;
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            final double value = iter.value();
            if (Double.isNaN(value)) {
                return false;
            }
            if (Double.isInfinite(value)) {
                infiniteFound = true;
View Full Code Here

        return infiniteFound;
    }

    /** {@inheritDoc} */
    public boolean isNaN() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            if (Double.isNaN(iter.value())) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        return copy().mapAbsToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapAbsToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.abs(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapAsinToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapAsinToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.asin(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapAtanToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapAtanToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.atan(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapCbrtToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapCbrtToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.cbrt(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapCeilToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapCeilToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.ceil(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapDivideToSelf(d);
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapDivideToSelf(double d) {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), iter.value() / d);
        }
        return this;
    }
View Full Code Here

        return copy().mapExpm1ToSelf();
    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapExpm1ToSelf() {
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.expm1(iter.value()));
        }
        return this;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.util.OpenIntToDoubleHashMap.Iterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.