Package gnu.trove.function

Examples of gnu.trove.function.TDoubleFunction


    /**
     * multiply this vector by a scalar.
     */
    public void mul(final double a) {
        transformValues(new TDoubleFunction() {
            public double execute(double b) {
                return a * b;
            }
        });
    }
View Full Code Here


    public void applyTruncation(StringKeyedVector instance) {
        final double update = this.optimizer.getDecreasingLearningRate(epoch) * truncationUpdate;
        final double threshold = truncationThreshold;

        TDoubleFunction truncFn = new TDoubleFunction() {
            public double execute(double parameter) {
                if (parameter > 0 && parameter < threshold) {
                    return Math.max(0, parameter - update);
                } else if (parameter < 0 && parameter > -threshold) {
                    return Math.min(0, parameter + update);
View Full Code Here

TOP

Related Classes of gnu.trove.function.TDoubleFunction

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.