_Functional

it.grypho.scala.leonardo.scalar._Functional
abstract class _Functional extends _Expression

Base class for higher-order operators that take an expression and a variable and produce a new expression: differentiation, integration, and limits.

The algorithms live in their own files (Derive.scala, Integrate.scala, Limit.scala); subclasses here are the AST nodes that carry the unevaluated form.

children / rebuild convention: the binder variable (v in derive(e, v), integral(e, v), limit(e, v, point)) is excluded from children -- it names the variable of differentiation/integration, not a use-site occurrence -- so traversals (substitute, dependsOn) never recurse into it. _DefIntegral's children include low_limit and up_limit because they are regular expression positions subject to substitution and dependsOn checks.

Attributes

Graph
Supertypes
trait _Expression
class Object
trait Matchable
class Any
Known subtypes
class _ODE
class _DefIntegral
class _Derivative
class _Integral
class _Laurent
class _Limit
class _Pade
class _Tabulate
class _Taylor
class _Fourier
class _Laplace
class _ZTransform
Show all

Members list

Value members

Inherited and Abstract methods

def children: List[_Expression]

Sub-expressions subject to recursive structural traversal. Binder positions (e.g. the differentiation variable) are excluded.

Sub-expressions subject to recursive structural traversal. Binder positions (e.g. the differentiation variable) are excluded.

Attributes

Inherited from:
_Expression
def eval(env: Environment): Either[_Expression, _Value]

Reduces this expression in the given environment.

Reduces this expression in the given environment.

Value parameters

env

variable bindings and display precision

Attributes

Returns

Right(v) when all free variables resolved to concrete values; Left(e) when reduction is partial or impossible

Inherited from:
_Expression
def rebuild(newChildren: List[_Expression]): _Expression

Reconstructs the same node shape with replacement sub-expressions.

Reconstructs the same node shape with replacement sub-expressions.

Value parameters

newChildren

replacements in the same order and count as children

Attributes

Inherited from:
_Expression

Inherited fields

lazy val freeVars: Set[String]

Cached set of free variable names; O(1) after the first access.

Cached set of free variable names; O(1) after the first access.

Attributes

Inherited from:
_Expression