Package functions.unitary.piecewise
Class Abs
Object
- All Implemented Interfaces:
- Differentiable,- Evaluable,- Outputable,- Simplifiable,- Comparable<GeneralFunction>,- Iterable<GeneralFunction>
public class Abs extends PiecewiseFunction
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description Abs(GeneralFunction operand)Constructs a newAbs
- 
Method SummaryModifier 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.UnitaryFunctiongetInstance(GeneralFunction operand)Returns a new instance of thisUnitaryFunctionOutputFunctiontoOutputFunction()Converts this function into anOutputFunctionfor use in string conversionStringtoString()Returns a String representation of thisGeneralFunctionMethods inherited from class UnitaryFunctionclone, compareSelf, equalsFunction, hashCode, iterator, newInstanceOf, simplify, simplifyFOC, simplifyInternal, simplifyInverse, substituteAllMethods inherited from class GeneralFunctioncompareTo, derivativeAt, equals, equalsSimplified, getNthDerivative, getSimplifiedDerivative, substituteVariables
- 
Constructor Details
- 
Method Details- 
evaluatepublic 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 the- GeneralFunctionat the point
- Returns:
- the value of the GeneralFunctionat the point
 
- 
getDerivativeDescription 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
 
- 
getInstanceDescription copied from class:UnitaryFunctionReturns a new instance of thisUnitaryFunction- Specified by:
- getInstancein class- UnitaryFunction
- Parameters:
- operand- the- GeneralFunctionto be operated on
- Returns:
- a new instance of this UnitaryFunction
 
- 
toStringpublic String toString()Description copied from class:GeneralFunctionReturns a String representation of thisGeneralFunction- Overrides:
- toStringin class- UnitaryFunction
- Returns:
- String representation of this function
 
- 
toOutputFunctionDescription copied from interface:OutputableConverts this function into anOutputFunctionfor use in string conversion- Specified by:
- toOutputFunctionin interface- Outputable
- Overrides:
- toOutputFunctionin class- UnitaryFunction
- Returns:
- this function as an OutputFunction
 
 
-