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 StringgetName()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 thisGeneralFunctionGeneralFunctionsubstituteAll(Predicate<? super GeneralFunction> test, Function<? super GeneralFunction,? extends GeneralFunction> replacer)StringtoLatex()Returns aLaTeXrepresentation of the function treeOutputFunctiontoOutputFunction()Converts this function into anOutputFunctionfor 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:
substituteAllin classGeneralFunction- Parameters:
test- checks if the function should be replacedreplacer- replaces the function- Returns:
- a new
GeneralFunctionwith all replacements made
-
toOutputFunction
Description copied from interface:OutputableConverts this function into anOutputFunctionfor use in string conversion- Specified by:
toOutputFunctionin interfaceOutputable- Returns:
- this function as an
OutputFunction
-
getName
public String getName()Description copied from interface:OutputFunctionReturns the name of this function- Specified by:
getNamein interfaceOutputFunction- Returns:
- the name of this function
-
getOperands
Description copied from interface:OutputFunctionReturns the operands of this function (its children in the function tree)- Specified by:
getOperandsin interfaceOutputFunction- Returns:
- a collection of operands
-
toLatex
public String toLatex()Description copied from interface:OutputFunctionReturns aLaTeXrepresentation of the function tree- Specified by:
toLatexin interfaceOutputFunction- Returns:
- a
LaTeXrepresentation of the function tree
-
iterator
Description copied from class:GeneralFunctionReturns an iterator over the operands of thisGeneralFunction- Specified by:
iteratorin interfaceIterable<GeneralFunction>- Specified by:
iteratorin classGeneralFunction- Returns:
- an iterator over the operands of this
GeneralFunction
-