Package functions.unitary.integer.combo
Class RFactorial
Object
- All Implemented Interfaces:
Differentiable
,Evaluable
,Outputable
,Simplifiable
,Comparable<GeneralFunction>
,Iterable<GeneralFunction>
public class RFactorial extends Factorial
The standard recursive definition of factorial.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RFactorial(GeneralFunction operand)
-
Method Summary
Modifier and Type Method Description GeneralFunction
classForm()
Returns this representation of factorial in the form of a composition of other raw classesGeneralFunction
getDerivative(String varID)
Returns the derivative of aGeneralFunction
with respect to a variable.UnitaryFunction
getInstance(GeneralFunction function)
Returns a new instance of thisUnitaryFunction
long
operate(int input)
Performs the operation of this functionMethods inherited from class UnitaryFunction
clone, compareSelf, equalsFunction, hashCode, iterator, newInstanceOf, simplify, simplifyFOC, simplifyInternal, simplifyInverse, substituteAll, toOutputFunction
Methods inherited from class GeneralFunction
compareTo, derivativeAt, equals, equalsSimplified, getNthDerivative, getSimplifiedDerivative, substituteVariables
-
Constructor Details
-
Method Details
-
classForm
Description copied from class:Factorial
Returns this representation of factorial in the form of a composition of other raw classes- Specified by:
classForm
in classFactorial
- Returns:
- the representation as a composition of other raw classes
- Throws:
UnsupportedOperationException
- if no such representation exists, such as in the case of recursive factorialRFactorial
-
getInstance
Description copied from class:UnitaryFunction
Returns a new instance of thisUnitaryFunction
- Specified by:
getInstance
in classUnitaryFunction
- Parameters:
function
- theGeneralFunction
to be operated on- Returns:
- a new instance of this
UnitaryFunction
-
getDerivative
Description copied from interface:Differentiable
Returns the derivative of aGeneralFunction
with respect to a variable. Should not be used in general;GeneralFunction.getSimplifiedDerivative(java.lang.String)
is strongly preferred.- Specified by:
getDerivative
in interfaceDifferentiable
- Overrides:
getDerivative
in classIntegerUnitaryFunction
- Parameters:
varID
- the ID of the variable that is differentiated against- Returns:
- the derivative of the function with respect to
varID
-
operate
public long operate(int input)Description copied from class:IntegerUnitaryFunction
Performs the operation of this function- Specified by:
operate
in classIntegerUnitaryFunction
- Parameters:
input
- the value to be operated on- Returns:
- the result of the operation
-