Package functions.unitary.integer
Class IntegerUnitaryFunction
Object
GeneralFunction
UnitaryFunction
IntegerUnitaryFunction
- All Implemented Interfaces:
Differentiable,Evaluable,Outputable,Simplifiable,Comparable<GeneralFunction>,Iterable<GeneralFunction>
- Direct Known Subclasses:
Factorial
public abstract class IntegerUnitaryFunction extends UnitaryFunction
IntegerUnitaryFunction provides resources for subclasses to implement mathematical functions with integer-restricted domain.-
Field Summary
-
Constructor Summary
Constructors Constructor Description IntegerUnitaryFunction(GeneralFunction operand)Constructs a newIntegerUnitaryFunction -
Method Summary
Modifier and Type Method Description doubleevaluate(Map<String,Double> variableValues)Evaluates aGeneralFunctionat a point denoted by aMapGeneralFunctiongetDerivative(String varID)Returns the derivative of aGeneralFunctionwith respect to a variable.abstract longoperate(int input)Performs the operation of this functionMethods inherited from class UnitaryFunction
clone, compareSelf, equalsFunction, getInstance, hashCode, iterator, newInstanceOf, simplify, simplifyFOC, simplifyInternal, simplifyInverse, substituteAll, toOutputFunction, toStringMethods inherited from class GeneralFunction
compareTo, derivativeAt, equals, equalsSimplified, getNthDerivative, getSimplifiedDerivative, substituteVariables
-
Constructor Details
-
IntegerUnitaryFunction
Constructs a newIntegerUnitaryFunction- Parameters:
operand- TheGeneralFunctionwhich will be operated on
-
-
Method Details
-
getDerivative
Description copied from interface:DifferentiableReturns the derivative of aGeneralFunctionwith respect to a variable. Should not be used in general;GeneralFunction.getSimplifiedDerivative(java.lang.String)is strongly preferred.- Parameters:
varID- the ID of the variable that is differentiated against- Returns:
- the derivative of the function with respect to
varID
-
evaluate
public double evaluate(Map<String,Double> variableValues)Description copied from interface:EvaluableEvaluates aGeneralFunctionat a point denoted by aMap- Parameters:
variableValues- the values of the variables in theGeneralFunctionat the point- Returns:
- the value of the
GeneralFunctionat the point
-
operate
public abstract long operate(int input)Performs the operation of this function- Parameters:
input- the value to be operated on- Returns:
- the result of the operation
-