Package functions.endpoint
Class EndpointFunction
Object
GeneralFunction
EndpointFunction
- All Implemented Interfaces:
Differentiable
,Evaluable
,Outputable
,Simplifiable
,Comparable<GeneralFunction>
,Iterable<GeneralFunction>
,OutputFunction
public abstract class EndpointFunction extends GeneralFunction implements OutputFunction
All classes extending
EndpointFunction
are endpoints of the function tree as they have no input or operands.-
Field Summary
-
Constructor Summary
Constructors Constructor Description EndpointFunction()
-
Method Summary
Modifier and Type Method Description String
getName()
Returns the name of this functionList<OutputFunction>
getOperands()
Returns the operands of this function (its children in the function tree)@NotNull Iterator<GeneralFunction>
iterator()
Returns an iterator over the operands of thisGeneralFunction
GeneralFunction
substituteAll(Predicate<? super GeneralFunction> test, Function<? super GeneralFunction,? extends GeneralFunction> replacer)
String
toLatex()
Returns aLaTeX
representation of the function treeOutputFunction
toOutputFunction()
Converts this function into anOutputFunction
for use in string conversionMethods inherited from class GeneralFunction
clone, compareSelf, compareTo, derivativeAt, equals, equalsFunction, equalsSimplified, getNthDerivative, getSimplifiedDerivative, hashCode, substituteVariables, toString
-
Constructor Details
-
EndpointFunction
public EndpointFunction()
-
-
Method Details
-
substituteAll
public GeneralFunction substituteAll(Predicate<? super GeneralFunction> test, Function<? super GeneralFunction,? extends GeneralFunction> replacer)Description copied from class:GeneralFunction
- Specified by:
substituteAll
in classGeneralFunction
- Parameters:
test
- checks if the function should be replacedreplacer
- replaces the function- Returns:
- a new
GeneralFunction
with all replacements made
-
toOutputFunction
Description copied from interface:Outputable
Converts this function into anOutputFunction
for use in string conversion- Specified by:
toOutputFunction
in interfaceOutputable
- Returns:
- this function as an
OutputFunction
-
getName
public String getName()Description copied from interface:OutputFunction
Returns the name of this function- Specified by:
getName
in interfaceOutputFunction
- Returns:
- the name of this function
-
getOperands
Description copied from interface:OutputFunction
Returns the operands of this function (its children in the function tree)- Specified by:
getOperands
in interfaceOutputFunction
- Returns:
- a collection of operands
-
toLatex
public String toLatex()Description copied from interface:OutputFunction
Returns aLaTeX
representation of the function tree- Specified by:
toLatex
in interfaceOutputFunction
- Returns:
- a
LaTeX
representation of the function tree
-
iterator
Description copied from class:GeneralFunction
Returns an iterator over the operands of thisGeneralFunction
- Specified by:
iterator
in interfaceIterable<GeneralFunction>
- Specified by:
iterator
in classGeneralFunction
- Returns:
- an iterator over the operands of this
GeneralFunction
-