it.grypho.scala.leonardo.transform

Members list

Type members

Classlikes

case class _Fourier(e: _Expression, t: _Variable, w: _Variable) extends _Functional

AST node for the Fourier transform: fourier(e, t, w) in the grammar.

AST node for the Fourier transform: fourier(e, t, w) in the grammar.

Computes the unilateral Fourier transform F{e(t)} with frequency variable w via the Laplace-to-Fourier substitution s -> i*w (see fourierOf). Results are generally complex-valued. The binder t is excluded from children; w appears free in the result.

eval applies fourierOf and guards against the fixpoint.

Value parameters

e

the time-domain expression to transform

t

the time variable (binder -- excluded from children)

w

the angular frequency variable (free in the result)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class _Functional
trait _Expression
class Object
trait Matchable
class Any
Show all
case class _InverseLaplace(f: _Expression, s: _Variable, t: _Variable) extends _Functional

AST node for the inverse Laplace transform: invlaplace(f, s, t) in the grammar.

AST node for the inverse Laplace transform: invlaplace(f, s, t) in the grammar.

Computes L^-1{f(s)} as a function of t via the rule table in inverseLaplaceOf. The frequency binder s is excluded from children (dual of _Laplace); t names the output variable and appears free in the result.

eval applies inverseLaplaceOf and guards against the fixpoint.

Value parameters

f

the frequency-domain expression to invert

s

the Laplace frequency variable (binder -- excluded from children)

t

the time variable (free in the result)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class _Functional
trait _Expression
class Object
trait Matchable
class Any
Show all

AST node for the inverse z-transform: invztrans(X, z, n) in the grammar.

AST node for the inverse z-transform: invztrans(X, z, n) in the grammar.

Recovers x[n] from a rational X(z) via the rule table in inverseZTransformOf. The frequency binder z is excluded from children (dual of _ZTransform); n names the output index and appears free in the result.

eval applies inverseZTransformOf and guards against the fixpoint.

Value parameters

f

the frequency-domain expression to invert

n

the discrete index variable (free in the result)

z

the z-domain variable (binder -- excluded from children)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class _Functional
trait _Expression
class Object
trait Matchable
class Any
Show all
case class _Laplace(e: _Expression, t: _Variable, s: _Variable) extends _Functional

AST node for the Laplace transform: laplace(e, t, s) in the grammar.

AST node for the Laplace transform: laplace(e, t, s) in the grammar.

Computes L{e(t)} with Laplace variable s via the rule table in laplaceOf. The integration binder t is excluded from children per the _Functional convention; s names the output variable and appears free in the result.

eval applies laplaceOf and guards against the fixpoint (stays symbolic when the rule table cannot reduce the expression).

Value parameters

e

the time-domain expression to transform

s

the complex frequency variable (free in the result)

t

the time variable (binder -- excluded from children)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class _Functional
trait _Expression
class Object
trait Matchable
class Any
Show all
case class _ZTransform(x: _Expression, n: _Variable, z: _Variable) extends _Functional

AST node for the z-transform: ztrans(x, n, z) in the grammar.

AST node for the z-transform: ztrans(x, n, z) in the grammar.

Computes the one-sided (unilateral) transform X(z) = sum(k >= 0) x[k]*z^-k via the rule table in zTransformOf. The summation binder n is excluded from children per the _Functional convention; z names the output variable and appears free in the result.

One-sided rather than bilateral by design, matching laplace, which is itself unilateral. A bilateral transform would have to carry a region of convergence on every result — without one the same X(z) inverts to a causal or an anti-causal signal, so the inverse would have to guess — and that is deferred as future work.

eval applies zTransformOf and guards against the fixpoint (stays symbolic when the rule table cannot reduce the expression), the convention shared with _Laplace.

Value parameters

n

the discrete index variable (binder -- excluded from children)

x

the sequence expression to transform, in terms of the index n

z

the complex frequency variable (free in the result)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class _Functional
trait _Expression
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

Computes F{e} with time variable t and frequency variable w.

Computes F{e} with time variable t and frequency variable w.

Picks a fresh internal name for the Laplace frequency variable that cannot collide with any free variable already present in e (or with the binders t and w). Returns _Fourier(e, t, w) when laplaceOf cannot reduce the expression.

Value parameters

e

the time-domain expression to transform

t

the time variable

w

the angular frequency variable

Attributes

Returns

the Fourier transform of e, or _Fourier(e, t, w) if the Laplace transform is not computable

Computes L^-1{f} with Laplace variable s and time variable t.

Computes L^-1{f} with Laplace variable s and time variable t.

Applies simplifyFully to the result when a rule fires, keeping the output readable.

Value parameters

f

the frequency-domain expression to invert

s

the Laplace frequency variable

t

the time variable

Attributes

Returns

the inverse Laplace transform of f, or _InverseLaplace(f, s, t) if no rule applies

Recovers x[n] from f = X(z).

Recovers x[n] from f = X(z).

Value parameters

f

the z-domain expression

n

the discrete index variable

z

the z-domain variable

Attributes

Returns

the sequence in terms of n, or _InverseZTransform(f, z, n) if no rule applies

Computes L{e} with time variable t and Laplace variable s.

Computes L{e} with time variable t and Laplace variable s.

Delegates to laplaceImpl which carries the string name of t for fast pattern matching without re-boxing. Returns _Laplace(e, t, s) when no rule fires.

Value parameters

e

the time-domain expression

s

the Laplace frequency variable

t

the time variable

Attributes

Returns

the Laplace transform of e, or _Laplace(e, t, s) if no rule applies

Computes Z{x} with index variable n and frequency variable z.

Computes Z{x} with index variable n and frequency variable z.

Value parameters

n

the discrete index variable

x

the sequence expression, in terms of n

z

the z-domain variable

Attributes

Returns

the z-transform of x, or _ZTransform(x, n, z) if no rule applies