# ShapeFunction

class ShapeFunction(val functions: SortedMap<Double, UnivariateFunction>, val extrapolateX: Boolean = false, val extrapolateY: Boolean = false) : BivariateFunction

The bivariate shape function is defined by a list of functions that are parallel to the y axis and placed at different positions on the x axis.

#### Parameters

functions

univariate functions parallel to the y axis, whereas the key denotes the location on the x axis

extrapolateX

if true, the last (or first) function is used when exceeding (or falling below)

extrapolateY

if true, the last (or first) value is used, which is still within the domain of the respective function

## Constructors

fun ShapeFunction(functions: SortedMap<Double, UnivariateFunction>, extrapolateX: Boolean = false, extrapolateY: Boolean = false)

## Functions

fun value(x: Double, y: Double): Either<Exception, Double>

Returns the value z = f(x, y). If x is not in domainX or y is not in domainY an error is returned.

fun valueInFuzzy(x: Double, y: Double, tolerance: Double): Either<Exception, Double>

Returns the value z = f(x, y). If x is not in domainX or y is not in domainY an error is returned. However, a fuzziness is allowed with a certain tolerance.

## Properties

open override val domainX: Range<Double>

function's domain for x