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

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


        return copy().mapRintToSelf();
    }

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


        return copy().mapSignumToSelf();
    }

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

        return copy().mapSinToSelf();
    }

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

    }

    /** {@inheritDoc} */
    public OpenMapRealVector mapSinhToSelf() {

        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            entries.put(iter.key(), Math.sinh(iter.value()));
        }
        return this;
    }
View Full Code Here

        return copy().mapSqrtToSelf();
    }

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

        return copy().mapTanToSelf();
    }

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

        return copy().mapTanhToSelf();
    }

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

        return copy().mapUlpToSelf();
    }

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

     * @throws IllegalArgumentException If the dimensions don't match
     */
    public OpenMapRealMatrix outerproduct(OpenMapRealVector v) throws IllegalArgumentException{
        checkVectorDimensions(v.getDimension());
        OpenMapRealMatrix res = new OpenMapRealMatrix(virtualSize, virtualSize);
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            Iterator iter2 = v.getEntries().iterator();
            while (iter2.hasNext()) {
                iter2.advance();
                res.setEntry(iter.key(), iter2.key(), iter.value()*iter2.value());
            }
        }
        return res;
    }
View Full Code Here

        checkVectorDimensions(v.getDimension());
        if (v instanceof OpenMapRealVector) {
            return outerproduct((OpenMapRealVector)v);
        }
        RealMatrix res = new OpenMapRealMatrix(virtualSize, virtualSize);
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();
            int row = iter.key();
            for (int col = 0; col < virtualSize; col++) {
                res.setEntry(row, col, iter.value()*v.getEntry(col));
            }
        }
        return res;
    }
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.