LazyPowerSeries

com.phasmidsoftware.number.core.numerical.LazyPowerSeries
abstract class LazyPowerSeries[X, Y](coefficients: LazyList[Y])(f: X => Y)(using evidence$1: Numeric[X], evidence$2: Numeric[Y]) extends PowerSeries[X, Y]

Represents a lazy power series that is computed on demand, using a sequence of pre-specified coefficients and a transformation function for powers of the input variable.

TESTME (not currently used)

This class allows defining power series where the terms are calculated as required, combining both the provided coefficients and a transformation of the powers of the input.

Type parameters

X

the type of the input variable to the power series

Y

the type of the coefficients and resulting series terms

Value parameters

coefficients

a lazy, infinite list representing the coefficients of the power series

f

a function used to transform the powers of the input variable

Attributes

Graph
Supertypes
trait PowerSeries[X, Y]
trait X => Series[Y]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(x: X): Series[Y]

Computes the resulting power series by applying the transformation function to the powers of the input and combining these with the series coefficients.

Computes the resulting power series by applying the transformation function to the powers of the input and combining these with the series coefficients.

The method generates an infinite series based on the input x, where each term of the series is derived by multiplying the transformed power of x with the corresponding coefficient.

Value parameters

x

the input variable for which the power series is computed

Attributes

Returns

an instance of Series[Y] representing the computed power series

Inherited methods

def andThen[A](g: Series[Y] => A): X => A

Composes two instances of Function1 in a new Function1, with this function applied first.

Composes two instances of Function1 in a new Function1, with this function applied first.

Type parameters

A

the result type of function g

Value parameters

g

a function R => A

Attributes

Returns

a new function f such that f(x) == g(apply(x))

Inherited from:
Function1
def compose[A](g: A => X): A => Series[Y]

Composes two instances of Function1 in a new Function1, with this function applied last.

Composes two instances of Function1 in a new Function1, with this function applied last.

Type parameters

A

the type to which function g can be applied

Value parameters

g

a function A => T1

Attributes

Returns

a new function f such that f(x) == apply(g(x))

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1

Concrete fields

val xn: Numeric[X]
val yn: Numeric[Y]