All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.sandia.cognition.math.AbstractScalarFunction Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
/*
 * File:            AbstractScalarFunction.java
 * Authors:         Justin Basilico
 * Project:         Cognitive Foundry Common Core
 * 
 * Copyright 2011 Cognitive Foundry. All rights reserved.
 */

package gov.sandia.cognition.math;

import gov.sandia.cognition.util.AbstractCloneableSerializable;

/**
 * An abstract implementation of the {@code ScalarFunction} interface. The
 * {@code evaluate} method calls {@code evaluateAsDouble}.
 *
 * @param   
 *      The type of the input to the scalar function.
 * @author  Justin Basilico
 * @since   3.3.3
 */
public abstract class AbstractScalarFunction
    extends AbstractCloneableSerializable
    implements ScalarFunction
{
    /**
     * Creates a new {@code AbstractScalarFunction}.
     */
    public AbstractScalarFunction()
    {
        super();
    }

    /**
     * Returns the result of calling {@code evaluateAsDouble}.
     *
     * @param   input
     *      The input value.
     * @return
     *      The result evaluated as a double.
     */
    @Override
    public Double evaluate(
        final InputType input)
    {
        return this.evaluateAsDouble(input);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy