Class ConstPropagationAbsIntMathFunctions
- java.lang.Object
-
- ptolemy.data.ontologies.ConceptFunction
-
- ptolemy.data.ontologies.lattice.adapters.constPropagationAbsInt.ConstPropagationAbsIntMathFunctions
-
public class ConstPropagationAbsIntMathFunctions extends ConceptFunction
A concept function that returns the Concept result of a math operation between two FlatScalarTokenInfiniteConcepts in the constPropagationAbsInt ontology.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Green (cshelton)
-
-
Field Summary
-
Fields inherited from class ptolemy.data.ontologies.ConceptFunction
_argumentDomainOntologies, _name, _numArgsIsFixed, _outputRangeOntology
-
-
Constructor Summary
Constructors Constructor Description ConstPropagationAbsIntMathFunctions(Ontology ontology, java.lang.String mathOperation)
Create a new ConstPropagationAbsIntMathFunctions concept function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Concept
_evaluateFunction(java.util.List<Concept> argValues)
Return the function output from the given input arguments.-
Methods inherited from class ptolemy.data.ontologies.ConceptFunction
evaluateFunction, getArgumentDomainOntologies, getName, getNumberOfArguments, getOutputRangeOntology, isMonotonic, isNumberOfArgumentsFixed, toString
-
-
-
-
Constructor Detail
-
ConstPropagationAbsIntMathFunctions
public ConstPropagationAbsIntMathFunctions(Ontology ontology, java.lang.String mathOperation) throws IllegalActionException
Create a new ConstPropagationAbsIntMathFunctions concept function.- Parameters:
ontology
- The domain and range unit system ontology for this concept function.mathOperation
- Indicates whether this concept function will perform addition, subtraction, multiplication or division for the FlatScalarTokenInfiniteConcepts.- Throws:
IllegalActionException
- Thrown if the concept function cannot be created.
-
-
Method Detail
-
_evaluateFunction
protected Concept _evaluateFunction(java.util.List<Concept> argValues) throws IllegalActionException
Return the function output from the given input arguments. The output concept is a FlatScalarTokenInfiniteConcept that is the result of the addition, subtraction, multiplication or division of the two input FlatScalarTokenInfiniteConcepts. If the operation results in a value of zero, return the finite Zero concept in the constPropagationAbsInt ontology.- Specified by:
_evaluateFunction
in classConceptFunction
- Parameters:
argValues
- The 2 FlatScalarTokenInfiniteConcept input arguments.- Returns:
- The output FlatScalarTokenInfiniteConcept.
- Throws:
IllegalActionException
- Thrown if there is a problem creating the output FlatScalarTokenInfiniteConcept.
-
-