gov.sandia.cognition.learning.function.vector
Class ScalarBasisSet<InputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.vector.ScalarBasisSet<InputType>
Type Parameters:
InputType - Input class that the basis function operate upon
All Implemented Interfaces:
Evaluator<InputType,Vector>, VectorOutputEvaluator<InputType,Vector>, CloneableSerializable, Serializable, Cloneable

public class ScalarBasisSet<InputType>
extends AbstractCloneableSerializable
implements Evaluator<InputType,Vector>, VectorOutputEvaluator<InputType,Vector>

Collection of scalar basis functions, where the ith function operates on the ith element of the output Vector

Author:
Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
ScalarBasisSet(Collection<? extends Evaluator<? super InputType,Double>> basisFunctions)
          Creates a new instance of ScalarBasisSet
ScalarBasisSet(ScalarBasisSet<InputType> other)
          Copy Constructor
 
Method Summary
 Vector evaluate(InputType input)
          Evaluates the function on the given input and returns the output.
 Collection<? extends Evaluator<? super InputType,Double>> getBasisFunctions()
          Getter for basisFunctions
 int getOutputDimensionality()
          Gets the expected dimensionality of the output vector of the evaluator, if it is known.
 void setBasisFunctions(Collection<? extends Evaluator<? super InputType,Double>> basisFunctions)
          Setter for basisFunctions
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalarBasisSet

public ScalarBasisSet(Collection<? extends Evaluator<? super InputType,Double>> basisFunctions)
Creates a new instance of ScalarBasisSet

Parameters:
basisFunctions - Collection of scalar basis functions, where the ith function operates on the ith element of the output Vector

ScalarBasisSet

public ScalarBasisSet(ScalarBasisSet<InputType> other)
Copy Constructor

Parameters:
other - ScalarBasisSet to copy
Method Detail

getOutputDimensionality

public int getOutputDimensionality()
Description copied from interface: VectorOutputEvaluator
Gets the expected dimensionality of the output vector of the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getOutputDimensionality in interface VectorOutputEvaluator<InputType,Vector>
Returns:
The expected dimensionality of the output vector of the evaluator, or -1 if it is not known.

evaluate

public Vector evaluate(InputType input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<InputType,Vector>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

getBasisFunctions

public Collection<? extends Evaluator<? super InputType,Double>> getBasisFunctions()
Getter for basisFunctions

Returns:
Collection of scalar basis functions, where the ith function operates on the ith element of the output Vector

setBasisFunctions

public void setBasisFunctions(Collection<? extends Evaluator<? super InputType,Double>> basisFunctions)
Setter for basisFunctions

Parameters:
basisFunctions - Collection of scalar basis functions, where the ith function operates on the ith element of the output Vector