gov.sandia.cognition.math.AbstractScalarFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitive-foundry Show documentation
Show all versions of cognitive-foundry Show documentation
A single jar with all the Cognitive Foundry components.
/*
* 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);
}
}