# PolynomialFunction

data class PolynomialFunction(val coefficients: DoubleArray, val domain: Range<Double> = Range.all()) : UnivariateFunction

Polynomial function of form f(x) = c0 + c1*x + c2*x^2 + ... + c\[N]*x^N.

#### Parameters

coefficients

coefficients for f(x), whereby coefficients0 corresponds to c0

domain

domain for which the polynomial function is defined

## Constructors

constructor(coefficients: List<Double>)
constructor(coefficients: DoubleArray, domain: Range<Double> = Range.all())

object Companion

## Properties

val degree: Int

degree of the polynomial function

open override val domain: Range<Double>
val endValue: Either<Exception, Double>

endValue = f(upper endpoint of domain).

startValue = f(lowest endpoint of domain).

## Functions

operator fun div(m: Double): StackedFunction
open operator override fun equals(other: Any?): Boolean
open override fun hashCode(): Int
fun slope(x: Double): Either<Exception, Double>

Evaluation of the slope = f'(x) with strict checking whether x is within the function's domain.

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

Evaluation of the slope = f(x) with fuzzy checking whether x is within the function's domain.

operator fun times(m: Double): StackedFunction
open override fun toString(): String
operator fun unaryMinus(): StackedFunction