class StackedFunction: UnivariateFunction

Stacks multiple functions and outputs the value according to the defined operation.

Fields

Name Description
val domain: Range<Double>

definable domain

Constructors

<init>

constructor(memberFunction: UnivariateFunction, operation: (List<Double>)->Double, defaultValue: Double)

Parameters

Name Description
memberFunction: UnivariateFunction
operation: (List<Double>)->Double
defaultValue: Double

<init>

constructor(memberFunctions: List<UnivariateFunction>, operation: (List<Double>)->Double, defaultValue: Double)

Stacks multiple functions and outputs the value according to the defined operation.

Parameters

Name Description
memberFunctions: List<UnivariateFunction>

functions to be stacked together

operation: (List<Double>)->Double

operation which combines the values of each member function

defaultValue: Double

the default value, if one of the member functions is not defined at the requested parameter

Methods

equals

fun equals(other: Any?): Boolean

Parameters

Name Description
other: Any?

ReturnValue

Name Description
Boolean

hashCode

fun hashCode(): Int

ReturnValue

Name Description
Int

CompanionObject

StackedFunction

class StackedFunction: UnivariateFunction

Stacks multiple functions and outputs the value according to the defined operation.

Methods

ofSum

fun ofSum(memberFunctions: List<UnivariateFunction>, defaultValue: Double): StackedFunction

Creates a StackedFunction which serves sum of each memberFunctions.

Parameters

Name Description
memberFunctions: List<UnivariateFunction>

member functions to be summed

defaultValue: Double

used value if one of the memberFunctions is not defined at the requested parameter

ReturnValue

Name Description
StackedFunction

ofSum

fun ofSum(vararg memberFunctions: UnivariateFunction, defaultValue: Double): StackedFunction

Creates a StackedFunction which serves sum of each memberFunctions.

Parameters

Name Description
vararg memberFunctions: UnivariateFunction

member functions to be summed

defaultValue: Double

used value if one of the memberFunctions is not defined at the requested parameter

ReturnValue

Name Description
StackedFunction