Syntax

it.grypho.scala.leonardo.scalar.Syntax
object Syntax

Optional method-call syntax for the scalar algorithms.

Lets callers write e.simplify() instead of simplify(e). Kept in an object (and out of the _Expression trait) so core depends on no domain and the method names do not collide with the top-level package functions they forward to. Opt in with import scalar.Syntax.*.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Syntax.type

Members list

Extensions

Extensions

extension (e: _Expression)
def collect(v: _Variable): Option[Vector[_Expression]]

Dense polynomial coefficient vector in v; see collect.

Dense polynomial coefficient vector in v; see collect.

Attributes

def compile(v: _Variable): Option[Double => Double]

Compile to a Double => Double closure; see compile.

Compile to a Double => Double closure; see compile.

Attributes

def dependsOn(v: _Variable): Boolean

Free-variable occurrence test; see dependsOn.

Free-variable occurrence test; see dependsOn.

Attributes

Single-variable derivative; see derive.

Single-variable derivative; see derive.

Attributes

Multi-variable or higher-order derivative (left-to-right fold); see derive.

Multi-variable or higher-order derivative (left-to-right fold); see derive.

Attributes

def deriveN(v: _Variable, n: Int): _Expression

n-th derivative; see deriveN.

n-th derivative; see deriveN.

Attributes

Distributes * over + and expands integer powers; see expand.

Distributes * over + and expands integer powers; see expand.

Attributes

Symbolic indefinite integration; see integrate.

Symbolic indefinite integration; see integrate.

Attributes

Like-term collection as a polynomial in v; see normalize.

Like-term collection as a polynomial in v; see normalize.

Attributes

def sample(v: _Variable, lo: Double, hi: Double, n: Int, env: Environment): Vector[(Double, Double)]

Uniform-grid numerical sampling; see sample.

Uniform-grid numerical sampling; see sample.

Attributes

Single-pass structural simplification; see simplify.

Single-pass structural simplification; see simplify.

Attributes

Fixpoint simplification; see simplifyFully.

Fixpoint simplification; see simplifyFully.

Attributes

def substitute(definitions: Map[String, _Expression]): _Expression

Variable substitution; see substitute.

Variable substitution; see substitute.

Attributes