Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

emmy.env

Batteries-included namespace for the Emmy library.

The purpose of emmy.env is to bundle all of the functions used in Structure and Interpretation of Classical Mechanics and Functional Differential Geometry into a single scope. The following form will import everything from emmy.env into your REPL:

(require '[emmy.env :as e])
(e/bootstrap-repl!)

Or, in Clojure:

(require '[emmy.env :as e :refer :all])
Batteries-included namespace for the [Emmy](https://github.com/mentat-collective/emmy/) library.

The purpose of [[emmy.env]] is to bundle all of the functions used
in [Structure and Interpretation of Classical
Mechanics](https://tgvaughan.github.io/sicm/) and [Functional Differential
Geometry](https://mitpress.mit.edu/books/functional-differential-geometry)
into a single scope. The following form will import everything
from [[emmy.env]] into your REPL:

```clojure
(require '[emmy.env :as e])
(e/bootstrap-repl!)
```

Or, in Clojure:

```clojure
(require '[emmy.env :as e :refer :all])
```
raw docstring

*clj/s

(*)
(* x)
(* x y)
(* x y & more)

Generic implementation of *. Returns the product of all supplied arguments. (*) returns 1, the multiplicative identity.

When applied between numbers, acts like clojure.core/*. Dispatch is open, however, making it possible to 'multiply' types wherever the behavior is mathematically sound.

For example:

(* 2 #emmy/complex "3 + 1i")
;;=> #emmy/complex "6 + 2i"
Generic implementation of `*`. Returns the product of all supplied
arguments. `(*)` returns 1, the multiplicative identity.

When applied between numbers, acts like `clojure.core/*`. Dispatch is open,
however, making it possible to 'multiply' types wherever the behavior is
mathematically sound.

For example:

```clojure
(* 2 #emmy/complex "3 + 1i")
;;=> #emmy/complex "6 + 2i"
```
source (clj)source (cljs)raw docstring

+clj/s

(+)
(+ x)
(+ x y)
(+ x y & more)

Generic implementation of +. Returns the sum of all supplied arguments. (+) returns 0, the additive identity.

When applied between numbers, acts like clojure.core/+. Dispatch is open, however, making it possible to 'add' types wherever the behavior is mathematically sound.

For example:

(+ [1 2 3] [2 3 4])
;;=> (up 3 5 7)
Generic implementation of `+`. Returns the sum of all supplied arguments. `(+)`
returns 0, the additive identity.

When applied between numbers, acts like `clojure.core/+`. Dispatch is open,
however, making it possible to 'add' types wherever the behavior is
mathematically sound.

For example:

```clojure
(+ [1 2 3] [2 3 4])
;;=> (up 3 5 7)
```
source (clj)source (cljs)raw docstring

-clj/s

(-)
(- x)
(- x y)
(- x y & more)

Generic implementation of -.

If one argument is supplied, returns the negation of a. Else returns the difference of the first argument a and the sum of all remaining arguments. (-) returns 0.

When applied between numbers, acts like clojure.core/-. Dispatch is open, however, making it possible to 'subtract' types wherever the behavior is mathematically sound.

For example:

(- [1 2 3] [2 3 4])
;;=> (up -1 -1 -1)

(- [1 10])
;;=> (up -1 -10)
Generic implementation of `-`.

If one argument is supplied, returns the negation of `a`. Else returns the
difference of the first argument `a` and the sum of all remaining
arguments. `(-)` returns 0.

When applied between numbers, acts like `clojure.core/-`. Dispatch is open,
however, making it possible to 'subtract' types wherever the behavior is
mathematically sound.

For example:

```clojure
(- [1 2 3] [2 3 4])
;;=> (up -1 -1 -1)

(- [1 10])
;;=> (up -1 -10)
```
source (clj)source (cljs)raw docstring

->H-stateclj/s≠

clj
(->H-state t q p)
cljs
(->H-state ??)
?? invalid arglists:
(quote ([t q p]))

Given a time t, coordinate tuple (or scalar) q and momentum tuple (or scalar) p, returns a 'Hamiltonian state tuple', i.e., the state expected by a Hamiltonian.

Given a time `t`, coordinate tuple (or scalar) `q` and momentum tuple (or
scalar) `p`, returns a 'Hamiltonian state tuple', i.e., the state expected by a
Hamiltonian.
source (clj)source (cljs)raw docstring

->infixclj/s

Converts an S-expression to printable infix form. Numeric exponents are written as superscripts. Partial derivatives get subscripts.

Converts an S-expression to printable infix form. Numeric exponents are
written as superscripts. Partial derivatives get subscripts.
source (clj)source (cljs)raw docstring

->JavaScriptclj/s

Converts an S-expression to JavaScript.

Converts an S-expression to JavaScript.
source (clj)source (cljs)raw docstring

->L-stateclj/s

(->L-state t q qdot & derivs)

Given a time t, coordinate tuple (or scalar) q, velocity tuple (or scalar) qdot and any number of additional higher-order derivative tuples (or scalars), returns a 'Local tuple', i.e., the state expected by a Lagrangian.

Given a time `t`, coordinate tuple (or scalar) `q`, velocity tuple (or scalar)
`qdot` and any number of additional higher-order derivative tuples (or
scalars), returns a 'Local tuple', i.e., the state expected by a Lagrangian.
source (clj)source (cljs)raw docstring

->localclj/s

Alias for ->L-state.

Alias for [[->L-state]].
source (clj)source (cljs)raw docstring

->stateclj/s

Alias for ->L-state.

Alias for [[->L-state]].
source (clj)source (cljs)raw docstring

->TeXclj/s

(->TeX expr & {:keys [equation]})

Convert the given expression to TeX format, as a string.

If you set the :equation keyword argument to a truthy value, the result will be wrapped in an equation environment. :equation <string> will insert a \label{<string>} entry inside the equation environment.

For example:

(let [expr (+ 'x 'xy)]
  (println
    (->TeX expr :equation "label!")))

\begin{equation}
\label{label!}
x + y
\end{equation}
Convert the given expression to TeX format, as a string.

If you set the `:equation` keyword argument to a truthy value, the result will
be wrapped in an equation environment. `:equation <string>` will insert a
`\label{<string>}` entry inside the equation environment.

For example:

```clojure
(let [expr (+ 'x 'xy)]
  (println
    (->TeX expr :equation "label!")))

\begin{equation}
\label{label!}
x + y
\end{equation}
```
source (clj)source (cljs)raw docstring

->tex-equationclj/s

(->tex-equation expr & {:keys [label]})

Returns a string containing a LaTeX representation of expr, wrapped in an equation environment.

Optionally supply a :label keyword argument to set a custom label.

Returns a string containing a LaTeX representation of `expr`, wrapped in an
`equation` environment.

Optionally supply a `:label` keyword argument to set a custom label.
sourceraw docstring

-piclj/s

The negation of the mathematical constant Pi.

The negation of the mathematical
constant [Pi](https://en.wikipedia.org/wiki/Pi).
sourceraw docstring

-tauclj/s

The negation of the mathematical constant Tau, equal to $-2\pi$.

The negation of the mathematical
constant [Tau](https://en.wikipedia.org/wiki/Turn_(angle)#Tau_proposals),
equal to $-2\pi$.
sourceraw docstring

/clj/s

(/)
(/ x)
(/ x y)
(/ x y & more)

Generic implementation of /.

If one argument is supplied, returns the multiplicative inverse of a. Else returns the result of dividing first argument a by the product of all remaining arguments. (/) returns 1, the multiplicative identity.

When applied between numbers, acts like clojure.core//. Dispatch is open, however, making it possible to 'divide' types wherever the behavior is mathematically sound.

For example:

(/ [2 4 6] 2)
;;=> (up 1 2 3)
Generic implementation of `/`.

If one argument is supplied, returns the multiplicative inverse of `a`. Else
returns the result of dividing first argument `a` by the product of all
remaining arguments. `(/)` returns 1, the multiplicative identity.

When applied between numbers, acts like `clojure.core//`. Dispatch is open,
however, making it possible to 'divide' types wherever the behavior is
mathematically sound.

For example:

```clojure
(/ [2 4 6] 2)
;;=> (up 1 2 3)
```
source (clj)source (cljs)raw docstring

=clj/smultimethod

source (clj)source (cljs)

absclj/s≠multimethod

clj
(abs a)
cljs
(abs ??)
?? invalid arglists:
(quote ([a]))

generic abs

generic abs
source (clj)source (cljs)raw docstring

accelerationclj/s≠

clj
(acceleration local)
cljs
(acceleration ??)
?? invalid arglists:
(quote ([local]))

Returns the acceleration element of a local tuple (by convention, the fourth element).

See coordinate for more detail.

Returns the acceleration element of a local tuple (by convention, the fourth
element).

See [[coordinate]] for more detail.
source (clj)source (cljs)raw docstring

acceleration-tupleclj/s

source (clj)source (cljs)

acosclj/s≠multimethod

clj
(acos a)
cljs
(acos ??)
?? invalid arglists:
(quote ([a]))

generic acos.

Computes the inverse cosine of the supplied argument a.

Defaults to atan(sqrt(1-x^2)/x).

generic acos.

Computes the inverse cosine of the supplied argument `a`.

Defaults to `atan(sqrt(1-x^2)/x)`.
source (clj)source (cljs)raw docstring

acoshclj/s≠multimethod

clj
(acosh a)
cljs
(acosh ??)
?? invalid arglists:
(quote ([a]))

generic acosh.

Computes the inverse hyperbolic cosine of the supplied argument a.

defaults to 2 ln(sqrt((x+1)/2) + sqrt((x-1)/2)).

generic acosh.

Computes the [inverse hyperbolic
 cosine](https://mathworld.wolfram.com/InverseHyperbolicCosine.html) of the supplied
 argument `a`.

defaults to `2 ln(sqrt((x+1)/2) + sqrt((x-1)/2))`.
source (clj)source (cljs)raw docstring

acotclj/s≠multimethod

clj
(acot a)
cljs
(acot ??)
?? invalid arglists:
(quote ([a]))

generic acot.

Computes the inverse cotangent of the supplied argument a.

defaults to pi/2 - atan(x).

generic acot.

Computes the [inverse
 cotangent](https://mathworld.wolfram.com/InverseCotangent.html) of the supplied
 argument `a`.

defaults to `pi/2 - atan(x)`.
source (clj)source (cljs)raw docstring

acothclj/s≠multimethod

clj
(acoth a)
cljs
(acoth ??)
?? invalid arglists:
(quote ([a]))

generic acoth.

Computes the inverse hyperbolic cotangent of the supplied argument a.

defaults to 1/2 ln((x+1)/(x-1)).

generic acoth.

Computes the [inverse hyperbolic
 cotangent](https://mathworld.wolfram.com/InverseHyperbolicCotangent.html) of
 the supplied argument `a`.

defaults to `1/2 ln((x+1)/(x-1))`.
source (clj)source (cljs)raw docstring

acscclj/s≠multimethod

clj
(acsc a)
cljs
(acsc ??)
?? invalid arglists:
(quote ([a]))

generic acsc.

Computes the inverse cosecant of the supplied argument a.

defaults to atan(1 / sqrt(x^2 - 1)).

generic acsc.

Computes the [inverse
 cosecant](https://mathworld.wolfram.com/InverseCosecant.html) of the supplied
 argument `a`.

defaults to `atan(1 / sqrt(x^2 - 1))`.
source (clj)source (cljs)raw docstring

acschclj/s≠multimethod

clj
(acsch a)
cljs
(acsch ??)
?? invalid arglists:
(quote ([a]))

generic acsch.

Computes the inverse hyperbolic cosecant of the supplied argument a.

defaults to ln((1 + sqrt(1+x^2)) / x).

generic acsch.

Computes the [inverse hyperbolic
 cosecant](https://mathworld.wolfram.com/InverseHyperbolicCosecant.html) of the
 supplied argument `a`.

defaults to `ln((1 + sqrt(1+x^2)) / x)`.
source (clj)source (cljs)raw docstring

add-v:csclj/s≠

clj
(add-v:cs v1:c v2:c)
cljs
(add-v:cs ??)
?? invalid arglists:
(quote ([v1:c v2:c]))
source (clj)source (cljs)

add-velocitiesclj/s≠

clj
(add-velocities v1 v2)
cljs
(add-velocities ??)
?? invalid arglists:
(quote ([v1 v2]))

velocities must be in meters/second, since we don't yet have units support.

velocities must be in meters/second, since we don't yet have units support.
source (clj)source (cljs)raw docstring

Altclj/s≠

clj
(Alt form)
cljs
(Alt ??)
?? invalid arglists:
(quote ([form]))

Returns the alternation of the supplied differential form.

Returns the alternation of the supplied differential `form`.
source (clj)source (cljs)raw docstring

alt-wedgeclj/s

(alt-wedge & args)

Alternative definition of wedge in terms of alternation.

Alternative definition of [[wedge]] in terms of alternation.
source (clj)source (cljs)raw docstring

alternate-anglesclj/s

source (clj)source (cljs)

ancestor-frameclj/s≠

clj
(ancestor-frame _)
cljs
(ancestor-frame ??)
?? invalid arglists:
(quote ([_]))

Returns the ancestor [[IFrame]] instance of this frame, or nil if there is no ancestor.

Returns the ancestor [[IFrame]] instance of this frame, or nil if there is
no ancestor.
sourceraw docstring

angleclj/s≠multimethod

clj
(angle a)
cljs
(angle ??)
?? invalid arglists:
(quote ([a]))

generic angle

generic angle
source (clj)source (cljs)raw docstring

angle-axis->rotation-matrixclj/s≠

clj
(angle-axis->rotation-matrix theta [x y z])
cljs
(angle-axis->rotation-matrix ??)
?? invalid arglists:
(quote ([theta [x y z]]))
source (clj)source (cljs)

anticommutatorclj/s≠

clj
(anticommutator o p)
cljs
(anticommutator ??)
?? invalid arglists:
(quote ([o p]))
source (clj)source (cljs)

arg-scaleclj/s

(arg-scale f & factors)

Takes a function f and a sequence of factors, and returns a new function that multiplies each factor by the corresponding argument of f. Too many or two few factors are ignored.

((arg-scale square 3) 4) ==> 144
((arg-scale square 3 2 1) 4) ==> 144
Takes a function `f` and a sequence of `factors`, and returns a new function
that multiplies each factor by the corresponding argument of `f`. Too many or
two few factors are ignored.

```clojure
((arg-scale square 3) 4) ==> 144
((arg-scale square 3 2 1) 4) ==> 144
```
source (clj)source (cljs)raw docstring

arg-shiftclj/s

(arg-shift f & shifts)

Takes a function f and a sequence of shifts, and returns a new function that adds each shift to the corresponding argument of f. Too many or two few shifts are ignored.

((arg-shift square 3) 4) ==> 49
((arg-shift square 3 2 1) 4) ==> 49
Takes a function `f` and a sequence of `shifts`, and returns a new function
that adds each shift to the corresponding argument of `f`. Too many or two few
shifts are ignored.

```clojure
((arg-shift square 3) 4) ==> 49
((arg-shift square 3 2 1) 4) ==> 49
```
source (clj)source (cljs)raw docstring

argument-typesclj/s≠

clj
(argument-types f)
cljs
(argument-types ??)
?? invalid arglists:
(quote ([f]))

Given an operator or function f, returns its registered vector of argument types, or [] if none exist.

argument types are, for example,

[::ff/oneform-field ::vf/vector-field ::vf/vector-field]

for a Christoffel-2, which takes one oneform field and two vector fields.

Given an operator or function `f`, returns its registered vector of argument
types, or `[]` if none exist.

argument types are, for example,

```clojure
[::ff/oneform-field ::vf/vector-field ::vf/vector-field]
```

for a `Christoffel-2`, which takes one oneform field and two vector fields.
source (clj)source (cljs)raw docstring

arityclj/s≠

clj
(arity f)
cljs
(arity ??)
?? invalid arglists:
(quote ([f]))

Return the cached or obvious arity of f if we know it. Otherwise delegates to heavy duty reflection.

Return the cached or obvious arity of `f` if we know it. Otherwise
delegates to heavy duty reflection.
sourceraw docstring

asecclj/s≠multimethod

clj
(asec a)
cljs
(asec ??)
?? invalid arglists:
(quote ([a]))

generic asec.

Computes the inverse secant of the supplied argument a.

defaults to atan(sqrt(x^2 - 1)).

generic asec.

Computes the [inverse
 secant](https://mathworld.wolfram.com/InverseSecant.html) of the supplied
 argument `a`.

defaults to `atan(sqrt(x^2 - 1))`.
source (clj)source (cljs)raw docstring

asechclj/s≠multimethod

clj
(asech a)
cljs
(asech ??)
?? invalid arglists:
(quote ([a]))

generic asech.

Computes the inverse hyperbolic secant of the supplied argument a.

defaults to ln((1 + sqrt(1-x^2)) / x).

generic asech.

Computes the [inverse hyperbolic
 secant](https://mathworld.wolfram.com/InverseHyperbolicSecant.html) of the
 supplied argument `a`.

defaults to `ln((1 + sqrt(1-x^2)) / x)`.
source (clj)source (cljs)raw docstring

asinclj/s≠multimethod

clj
(asin a)
cljs
(asin ??)
?? invalid arglists:
(quote ([a]))

generic asin.

Computes the inverse sine of the supplied argument a.

Defaults to atan(x/sqrt(1-x^2)).

generic asin.

Computes the inverse sine of the supplied argument `a`.

Defaults to `atan(x/sqrt(1-x^2))`.
source (clj)source (cljs)raw docstring

asinhclj/s≠multimethod

clj
(asinh a)
cljs
(asinh ??)
?? invalid arglists:
(quote ([a]))

generic asinh.

Computes the inverse hyperbolic sine of the supplied argument a.

defaults to ln(x + sqrt(1 + x^2)).

generic asinh.

Computes the [inverse hyperbolic
 sine](https://mathworld.wolfram.com/InverseHyperbolicSine.html) of the
 supplied argument `a`.

defaults to `ln(x + sqrt(1 + x^2))`.
source (clj)source (cljs)raw docstring

atanclj/s≠multimethod

clj
(atan a)
(atan a b)
cljs
(atan ??)
?? invalid arglists:
(quote ([a] [a b]))

generic atan.

Computes the inverse tangent of the supplied argument a. Given two arguments a and b, returns the inverse tangent of the angle formed by the point (b, a) in a 2-dimensional euclidean plane.

The two-argument version is sometimes called Atan2.

generic atan.

Computes the inverse tangent of the supplied argument `a`. Given two
  arguments `a` and `b`, returns the inverse tangent of the angle formed by the
  point `(b, a)` in a 2-dimensional euclidean plane.

  The two-argument version is sometimes
  called [Atan2](https://en.wikipedia.org/wiki/Atan2).
source (clj)source (cljs)raw docstring

atanhclj/s≠multimethod

clj
(atanh a)
cljs
(atanh ??)
?? invalid arglists:
(quote ([a]))

generic atanh.

Computes the inverse hyperbolic tangent of the supplied argument a.

defaults to 1/2 ln((1+x)/(1-x)).

generic atanh.

Computes the [inverse hyperbolic
 tangent](https://mathworld.wolfram.com/InverseHyperbolicTangent.html) of the
 supplied argument `a`.

defaults to `1/2 ln((1+x)/(1-x))`.
source (clj)source (cljs)raw docstring

base-frame-makerclj/s

source (clj)source (cljs)

basis->basis-over-mapclj/s≠

clj
(basis->basis-over-map mu:N->M basis-on-M)
cljs
(basis->basis-over-map ??)
?? invalid arglists:
(quote ([mu:N->M basis-on-M]))
source (clj)source (cljs)

basis->coordinate-systemclj/s≠

clj
(basis->coordinate-system b)
cljs
(basis->coordinate-system ??)
?? invalid arglists:
(quote ([b]))
source (clj)source (cljs)

basis->dimensionclj/s≠

clj
(basis->dimension b)
cljs
(basis->dimension ??)
?? invalid arglists:
(quote ([b]))

Extract the dimension from the given basis object b.

Extract the dimension from the given basis object `b`.
source (clj)source (cljs)raw docstring

basis->oneform-basisclj/s≠

clj
(basis->oneform-basis b)
cljs
(basis->oneform-basis ??)
?? invalid arglists:
(quote ([b]))

Extract the dual basis from the given basis object b.

Extract the dual basis from the given basis object `b`.
source (clj)source (cljs)raw docstring

basis->vector-basisclj/s≠

clj
(basis->vector-basis b)
cljs
(basis->vector-basis ??)
?? invalid arglists:
(quote ([b]))

Extract the vector basis from the given basis object b.

Extract the vector basis from the given basis object `b`.
source (clj)source (cljs)raw docstring

basis-components->oneform-fieldclj/s≠

clj
(basis-components->oneform-field components oneform-basis)
cljs
(basis-components->oneform-field ??)
?? invalid arglists:
(quote ([components oneform-basis]))

Given a structure of components functions defined on manifold points and and a matching oneform-basis (of identical structure),

Returns a new one-form field that

  • passes its vector-field argument to oneform-basis, returning a new equivalent structure with each slot populated by functions from a manifold point to the directional derivative (using the vector field) in that coordinate direction

  • contracts the result of that operation with the result of applying each component in components to the manifold point.

NOTE:

  • This is for any basis, not just a coordinate basis
  • The components are evaluated at a manifold point, not its coordinates
  • Given a dual basis, you can retrieve the original components with oneform-field->basis-components
Given a structure of `components` functions defined on manifold points and and
a matching `oneform-basis` (of identical structure),

Returns a new one-form field that

- passes its vector-field argument to `oneform-basis`, returning a new
  equivalent structure with each slot populated by functions from a manifold
  point to the directional derivative (using the vector field) in that
  coordinate direction

- contracts the result of that operation with the result of applying each
  component in `components` to the manifold point.

NOTE:
- This is for any basis, not just a coordinate basis
- The `components` are evaluated at a manifold point, not its coordinates
- Given a dual basis, you can retrieve the original components
  with [[oneform-field->basis-components]]
source (clj)source (cljs)raw docstring

basis-components->vector-fieldclj/s≠

clj
(basis-components->vector-field components vector-basis)
cljs
(basis-components->vector-field ??)
?? invalid arglists:
(quote ([components vector-basis]))

Given a structure of components and and a matching vector-basis (of identical structure with orientations flipped), returns a new vector field generated contracting by these two structures together.

The returned vector field passes its input function to the operator generated by this contraction.

For example:

(let-coordinates [[x y] R2-rect]
  (basis-components->vector-field
   (up x y)
   (coordinate-system->vector-basis R2-rect)))
;; => (+ (* x d:dx) (* y d:dy))

NOTE:

  • This is for any basis, not just a coordinate basis
  • The components are evaluated at a manifold point, not its coordinates
  • Given a dual basis, you can retrieve the original components with vector-field->basis-components
Given a structure of `components` and and a matching `vector-basis` (of
identical structure with orientations flipped), returns a new vector field
generated contracting by these two structures together.

The returned vector field passes its input function to the operator generated
by this contraction.

For example:

```clojure
(let-coordinates [[x y] R2-rect]
  (basis-components->vector-field
   (up x y)
   (coordinate-system->vector-basis R2-rect)))
;; => (+ (* x d:dx) (* y d:dy))
```

NOTE:
- This is for any basis, not just a coordinate basis
- The `components` are evaluated at a manifold point, not its coordinates
- Given a dual basis, you can retrieve the original components
  with [[vector-field->basis-components]]
source (clj)source (cljs)raw docstring

basis?clj/s≠

clj
(basis? x)
cljs
(basis? ??)
?? invalid arglists:
(quote ([x]))

Returns true if x is a basis, false otherwise.

Returns true if `x` is a basis, false otherwise.
source (clj)source (cljs)raw docstring

bigintcljs

(bigint ??)
?? invalid arglists:
(quote ([x]))
source

bigint?clj/s≠

clj
(bigint? x)
cljs
(bigint? ??)
?? invalid arglists:
(quote ([x]))

Returns true if the supplied x is a BigInt, false otherwise.

Returns true if the supplied `x` is a `BigInt`, false otherwise.
source (clj)source (cljs)raw docstring

binomial-seriesclj/s≠

clj
(binomial-series alpha)
cljs
(binomial-series ??)
?? invalid arglists:
(quote ([alpha]))

Returns a [[PowerSeries]] instance representing a Binomial series, i.e., the taylor series of the function $f$ given by

$$f(x) = (1 + x)^\alpha$$
Returns a [[PowerSeries]] instance representing a
[Binomial series](https://en.wikipedia.org/wiki/Binomial_series), i.e., the
taylor series of the function $f$ given by

```
$$f(x) = (1 + x)^\alpha$$
```
source (clj)source (cljs)raw docstring

boost-directionclj/s≠

clj
(boost-direction frame)
cljs
(boost-direction ??)
?? invalid arglists:
(quote ([frame]))
source (clj)source (cljs)

bootstrap-repl!clj/smacro

(bootstrap-repl!)

Bootstraps a repl or Clojure namespace by requiring all public vars from emmy.env.

(This will only work at a repl in ClojureScript.)

TODO add :rename, :exclude support.

Bootstraps a repl or Clojure namespace by requiring all public vars
from [[emmy.env]].

(This will only work at a repl in ClojureScript.)

TODO add `:rename`, `:exclude` support.
sourceraw docstring

brent-maxclj/s≠

clj
(brent-max f a b opts)
cljs
(brent-max ??)
?? invalid arglists:
(quote ([f a b opts]))

For convenience, we also provide the sister-procedure for finding the maximum of a unimodal function using Brent's method.

Negate the function, minimize, negate the result.

See brent-min for all supported opts.

For convenience, we also provide the sister-procedure for finding the maximum
of a unimodal function using Brent's method.

Negate the function, minimize, negate the result.

See [[brent-min]] for all supported `opts`.
source (clj)source (cljs)raw docstring

brent-minclj/s

(brent-min f a b)
(brent-min f
           a
           b
           {:keys [relative-threshold absolute-threshold initial-guess maxiter
                   maxfun callback]
            :or {relative-threshold default-relative-threshold
                 absolute-threshold default-absolute-threshold
                 initial-guess (initial-brent-guess a b)
                 maxiter 1000
                 callback (constantly nil)}})

Find the minimum of the function f: R -> R in the interval [a,b] using Brent's Method, described by Richard Brent in Algorithms for Minimization without Derivatives.

Brent's method is a combination of a golden section search with a parabolic interpolation step. Parabolic interpolation can go wild if the candidate point is close to colinear with the search bounds, or of the points are too close together.

Brent's method prevents this by applying an internal test that forces a golden section step every so often. (If you want the details, see parabola-valid? above.)

brent-min supports the following optional keyword arguments:

  • :callback: if supplied, the supplied fn will be invoked at each intermediate point with the iteration count and the values of x and f(x) at each search step.

  • :initial-guess: the first internal point checked by the algorithm. Defaults to ([[initial-brent-guess]] a b).

  • :relative-threshold: multiplied by each guess to determine a relative threshold. Defaults to 1.0e-11.

  • :absolute-threshold: a smaller absolute threshold that applies when the candidate minimum point is close to 0. defaults to around 1.49e8, the sqrt of the machine tolerance. You won't gain any benefit attempting to set the value less than the default.

  • :maxiter: Maximum number of iterations allowed for the minimizer. Defaults to 1000.

  • :maxfun: Maximum number of times the function can be evaluated before exiting. Defaults to (inc maxiter).

Find the minimum of the function f: R -> R in the interval [a,b] using Brent's
Method, described by Richard Brent in [Algorithms for Minimization without
Derivatives](https://books.google.com/books?id=AITCAgAAQBAJ&q=Brent%E2%80%99s#v=onepage&q=Parabolic&f=false).

Brent's method is a combination of a golden section search with a parabolic
interpolation step. Parabolic interpolation can go wild if the candidate point
is close to colinear with the search bounds, or of the points are too close
together.

Brent's method prevents this by applying an internal test that forces a golden
section step every so often. (If you want the details, see `parabola-valid?`
above.)

[[brent-min]] supports the following optional keyword arguments:

- `:callback`: if supplied, the supplied fn will be invoked at each
  intermediate point with the iteration count and the values of x and f(x) at
  each search step.

- `:initial-guess`: the first internal point checked by the algorithm. Defaults
  to `([[initial-brent-guess]] a b)`.

- `:relative-threshold`: multiplied by each guess to determine a relative
  threshold. Defaults to 1.0e-11.

- `:absolute-threshold`: a smaller absolute threshold that applies when the
  candidate minimum point is close to 0. defaults to around 1.49e8, the sqrt of
  the machine tolerance. You won't gain any benefit attempting to set the value
  less than the default.

- `:maxiter`: Maximum number of iterations allowed for the minimizer. Defaults
  to 1000.

- `:maxfun`: Maximum number of times the function can be evaluated before
  exiting. Defaults to `(inc maxiter)`.
source (clj)source (cljs)raw docstring

Cartan->basisclj/s≠

clj
(Cartan->basis C)
cljs
(Cartan->basis ??)
?? invalid arglists:
(quote ([C]))
source (clj)source (cljs)

Cartan->Cartan-over-mapclj/s≠

clj
(Cartan->Cartan-over-map Cartan map)
cljs
(Cartan->Cartan-over-map ??)
?? invalid arglists:
(quote ([Cartan map]))
source (clj)source (cljs)

Cartan->Christoffelclj/s≠

clj
(Cartan->Christoffel Cartan)
cljs
(Cartan->Christoffel ??)
?? invalid arglists:
(quote ([Cartan]))
source (clj)source (cljs)

Cartan->formsclj/s≠

clj
(Cartan->forms C)
cljs
(Cartan->forms ??)
?? invalid arglists:
(quote ([C]))
source (clj)source (cljs)

Cartan-transformclj/s≠

clj
(Cartan-transform cartan basis-prime)
cljs
(Cartan-transform ??)
?? invalid arglists:
(quote ([cartan basis-prime]))
source (clj)source (cljs)

Cartan?clj/s≠

clj
(Cartan? x)
cljs
(Cartan? ??)
?? invalid arglists:
(quote ([x]))
source (clj)source (cljs)

ceilingclj/s≠multimethod

clj
(ceiling a)
cljs
(ceiling ??)
?? invalid arglists:
(quote ([a]))

generic ceiling.

Returns the result of rounding a up to the next largest integer.

Extensions beyond real numbers may behave differently; see the Documentation site for more detail.

generic ceiling.

Returns the result of rounding `a` up to the next largest integer.

  Extensions beyond real numbers may behave differently; see the [Documentation
  site](https://cljdoc.org/d/org.mentat/emmy/CURRENT/doc/basics/generics)
  for more detail.
source (clj)source (cljs)raw docstring

chartclj/s≠

clj
(chart coordinate-system)
cljs
(chart ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given an [[ICoordinateSystem]], returns a function from a point on the coordinate system's manifold to the coordinate representation specified by the supplied coordinate-system.

Given an [[ICoordinateSystem]], returns a function from a point on the
coordinate system's manifold to the coordinate representation specified by the
supplied `coordinate-system`.
source (clj)source (cljs)raw docstring

chinese-remainderclj/s

(chinese-remainder & modints)

Chinese Remainder Algorithm.

Accepts a sequence of [[ModInt]] instances (where the modulus of all [[ModInt]] instances are relatively prime), and returns a [[ModInt]] x such that (residue input) == (mod x (modulus input)).

For example:

(let [a1 (m/make 2 5)
      a2 (m/make 3 13)]
  [(= 42 (chinese-remainder a1 a2))
   (= (residue a1) (mod cr (modulus a1)))
   (= (residue a2) (mod cr (modulus a2)))])
;;=> [true true true]
[Chinese Remainder Algorithm](https://en.wikipedia.org/wiki/Chinese_remainder_theorem).

Accepts a sequence of [[ModInt]] instances (where the `modulus` of
all [[ModInt]] instances are relatively prime), and returns a [[ModInt]] `x`
such that `(residue input) == (mod x (modulus input))`.

For example:

```clojure
(let [a1 (m/make 2 5)
      a2 (m/make 3 13)]
  [(= 42 (chinese-remainder a1 a2))
   (= (residue a1) (mod cr (modulus a1)))
   (= (residue a2) (mod cr (modulus a2)))])
;;=> [true true true]
```
source (clj)source (cljs)raw docstring

Christoffel->basisclj/s≠

clj
(Christoffel->basis C)
cljs
(Christoffel->basis ??)
?? invalid arglists:
(quote ([C]))
source (clj)source (cljs)

Christoffel->Cartanclj/s≠

clj
(Christoffel->Cartan Christoffel)
cljs
(Christoffel->Cartan ??)
?? invalid arglists:
(quote ([Christoffel]))
source (clj)source (cljs)

Christoffel->symbolsclj/s≠

clj
(Christoffel->symbols C)
cljs
(Christoffel->symbols ??)
?? invalid arglists:
(quote ([C]))
source (clj)source (cljs)

Christoffel?clj/s≠

clj
(Christoffel? x)
cljs
(Christoffel? ??)
?? invalid arglists:
(quote ([x]))
source (clj)source (cljs)

claimclj/s≠

clj
(claim coords owner)
cljs
(claim ??)
?? invalid arglists:
(quote ([coords owner]))

Marks (via metadata) the supplied set of coords as being owned by owner. If coords already has an owner (that is not equal to owner), throws.

Marks (via metadata) the supplied set of `coords` as being owned by `owner`. If
`coords` already has an owner (that is not equal to `owner`), throws.
source (clj)source (cljs)raw docstring

column-matrixclj/s

(column-matrix & xs)

Returns a column matrix populated by the supplied xs. Variadic equivalent to [[column*]].

Returns a column matrix populated by the supplied `xs`. Variadic equivalent
to [[column*]].
source (clj)source (cljs)raw docstring

column-matrix->upclj/s≠

clj
(column-matrix->up m)
cljs
(column-matrix->up ??)
?? invalid arglists:
(quote ([m]))

Returns the single column from the supplied column matrix as an up. Errors if some other type is supplied.

Returns the single column from the supplied column matrix as an `up`. Errors if
some other type is supplied.
source (clj)source (cljs)raw docstring

column-matrix->vectorclj/s≠

clj
(column-matrix->vector m)
cljs
(column-matrix->vector ??)
?? invalid arglists:
(quote ([m]))

Returns the single column from the supplied column matrix as a vector. Errors if some other type is supplied.

Returns the single column from the supplied column matrix as a vector. Errors
if some other type is supplied.
source (clj)source (cljs)raw docstring

commutatorclj/s≠

clj
(commutator o p)
cljs
(commutator ??)
?? invalid arglists:
(quote ([o p]))
source (clj)source (cljs)

compareclj/s≠

clj
(compare x y)

Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable

Comparator. Returns a negative number, zero, or a positive number
when x is logically 'less than', 'equal to', or 'greater than'
y. Same as Java x.compareTo(y) except it also works for nil, and
compares numbers and collections in a type-independent manner. x
must implement Comparable
cljs
(compare ??)
?? invalid arglists:
(quote ([x y]))

Comparator. Clone of [[cljs.core/compare]] that works with the expanded Emmy numeric tower.

Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Uses IComparable if available and google.array.defaultCompare for objects of the same type and special-cases nil to be less than any other object.

Comparator. Clone of [[cljs.core/compare]] that works with the expanded
    Emmy numeric tower.

Returns a negative number, zero, or a positive number when x is logically
'less than', 'equal to', or 'greater than' y. Uses IComparable if available
and google.array.defaultCompare for objects of the same type and special-cases
nil to be less than any other object.
source (clj)source (cljs)raw docstring

compatible-shapeclj/s≠

clj
(compatible-shape s)
cljs
(compatible-shape ??)
?? invalid arglists:
(quote ([s]))

Returns a structure compatible for multiplication with s down to a scalar, with the slots filled with gensyms.

Returns a structure compatible for multiplication with `s` down to a scalar,
with the slots filled with gensyms.
source (clj)source (cljs)raw docstring

compatible-zeroclj/s≠

clj
(compatible-zero s)
cljs
(compatible-zero ??)
?? invalid arglists:
(quote ([s]))

Returns a structure compatible for multiplication with s down to 0.

Returns a structure compatible for multiplication with `s` down to 0.
source (clj)source (cljs)raw docstring

complexclj/s

(complex c)
(complex re im)

Returns a [[Complex]] number with the supplied real part re and imaginary part im. im defaults to 0.

Returns a [[Complex]] number with the supplied real part `re` and imaginary
part `im`. `im` defaults to 0.
source (clj)source (cljs)raw docstring

complex?clj/s≠

clj
(complex? a)
cljs
(complex? ??)
?? invalid arglists:
(quote ([a]))

Returns true if a is an instance of [[Complex]], false otherwise.

Returns true if `a` is an instance of [[Complex]], false otherwise.
source (clj)source (cljs)raw docstring

componentclj/s

(component & selectors)

Given a sequence of selectors, return a function that accepts some object x and returns:

(apply ref x selectors)
Given a sequence of `selectors`, return a function that accepts some object `x`
and returns:

```clojure
(apply ref x selectors)
```
sourceraw docstring

components->metricclj/s≠

clj
(components->metric components basis)
cljs
(components->metric ??)
?? invalid arglists:
(quote ([components basis]))
source (clj)source (cljs)

components->oneform-fieldclj/s

(components->oneform-field components coordinate-system)
(components->oneform-field components coordinate-system name)

Takes:

  • a down tuple of components of the one-form field relative to coordinate-system
  • the coordinate-system

And returns a full one-form field.

A one-field field is an operator that takes a vector field to a real-valued function on the manifold.

Takes:

- a `down` tuple of `components` of the one-form field relative to
  `coordinate-system`
- the `coordinate-system`

And returns a full one-form field.

A one-field field is an operator that takes a vector field to a real-valued
function on the manifold.
source (clj)source (cljs)raw docstring

components->vector-fieldclj/s

(components->vector-field components coordinate-system)
(components->vector-field components coordinate-system name)

Takes:

  • an up tuple of the functions that each return the corresponding component of the vector field relative coordinate-system
  • the coordinate-system
  • optionally, a symbolic name for the vector field operator

And returns a vector field.

A vector field is an operator that takes a smooth real-valued function of manifold points and produces a NEW function that computes the directional derivative of the given function at each point of the manifold.

Takes:

- an `up` tuple of the functions that each return the corresponding component
of the vector field relative `coordinate-system`
- the `coordinate-system`
- optionally, a symbolic name for the vector field operator

And returns a vector field.

A vector field is an operator that takes a smooth real-valued function of
manifold points and produces a NEW function that computes the directional
derivative of the given function at each point of the manifold.
source (clj)source (cljs)raw docstring

composeclj/s

(compose & fns)

Arity-preserving version of clojure.core/comp.

The arity of a composition is the arity of the rightmost (that is, first to be applied) function term in fns.

Arity-preserving version of `clojure.core/comp`.

The arity of a composition is the arity of the rightmost (that is, first to be
applied) function term in `fns`.
source (clj)source (cljs)raw docstring

compositional-canonical?clj/s≠

clj
(compositional-canonical? C H)
cljs
(compositional-canonical? ??)
?? invalid arglists:
(quote ([C H]))

p.324

p.324
source (clj)source (cljs)raw docstring

conjugateclj/s≠multimethod

clj
(conjugate a)
cljs
(conjugate ??)
?? invalid arglists:
(quote ([a]))

generic conjugate

generic conjugate
source (clj)source (cljs)raw docstring

constant-manifold-functionclj/s≠

clj
(constant-manifold-function c)
cljs
(constant-manifold-function ??)
?? invalid arglists:
(quote ([c]))

Takes some constant c and returns a manifold function that maps every input manifold point to c.

Takes some constant `c` and returns a manifold function that maps every input
manifold `point` to `c.`
source (clj)source (cljs)raw docstring

constant-seriesclj/s

(constant-series c)
(constant-series c kind)

Returns a [[PowerSeries]] representing the supplied constant term.

Optionally, pass kind of either ::series or ::power-series to specify the type of series returned.

Returns a [[PowerSeries]] representing the supplied constant term.

Optionally, pass `kind` of either `::series` or `::power-series` to specify
the type of series returned.
source (clj)source (cljs)raw docstring

contractclj/s≠

clj
(contract f basis)
cljs
(contract ??)
?? invalid arglists:
(quote ([f basis]))
source (clj)source (cljs)

coordinateclj/s≠

clj
(coordinate local)
cljs
(coordinate ??)
?? invalid arglists:
(quote ([local]))

A convenience function on local tuples. A local tuple describes the state of a system at a particular time:

[t, q, D q, D^2 q]

representing time, position, velocity (and optionally acceleration etc.)

coordinate returns the q element, which is expected to be a mapping from time to a structure of coordinates.

A convenience function on local tuples. A local tuple describes
the state of a system at a particular time:

```
[t, q, D q, D^2 q]
```

representing time, position, velocity (and optionally acceleration etc.)

[[coordinate]] returns the `q` element, which is expected to be a mapping from
time to a structure of coordinates.
source (clj)source (cljs)raw docstring

coordinate-basis-oneform-fieldclj/s

(coordinate-basis-oneform-field coordinate-system name & indices)

Given some coordinate-system, a symbolic name and a sequence of indices into the structure of the coordinate system's representation, returns a one-form field.

The returned one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field.

Given some `coordinate-system`, a symbolic `name` and a sequence of indices
into the structure of the coordinate system's representation, returns a
one-form field.

The returned one-form field at each structural spot takes a vector field and
returns a function that takes the directional derivative in that coordinate's
direction using the vector field.
source (clj)source (cljs)raw docstring

coordinate-basis-vector-fieldclj/s

(coordinate-basis-vector-field coordinate-system name & indices)

Given some coordinate-system, a symbolic name and a sequence of indices into the structure of the coordinate system's representation,

returns a vector field that takes a function and returns a new function that computes the partial derivative of that function with respect to the supplied indices into coordinate-system.

To compute the full Jacobian, pass no indices.

Given some `coordinate-system`, a symbolic `name` and a sequence of indices
into the structure of the coordinate system's representation,

returns a vector field that takes a function and returns a new function that
computes the partial derivative of that function with respect to the supplied
`indices` into `coordinate-system`.

To compute the full Jacobian, pass no indices.
source (clj)source (cljs)raw docstring

coordinate-basis?clj/s≠

clj
(coordinate-basis? x)
cljs
(coordinate-basis? ??)
?? invalid arglists:
(quote ([x]))

Returns true if x is a coordinate basis, false otherwise.

Returns true if `x` is a coordinate basis, false otherwise.
source (clj)source (cljs)raw docstring

coordinate-functionsclj/s≠

clj
(coordinate-functions coordinate-system)
cljs
(coordinate-functions ??)
?? invalid arglists:
(quote ([coordinate-system]))

Returns a structure similar to the [[manifold/coordinate-prototype]] of coordinate-system, where every entry is a function from manifold point => the associated component of the point in the coordinate representation described by coordinate-system.

Returns a structure similar to the [[manifold/coordinate-prototype]] of
`coordinate-system`, where every entry is a function from manifold point =>
the associated component of the point in the coordinate representation
described by `coordinate-system`.
source (clj)source (cljs)raw docstring

coordinate-originclj/s≠

clj
(coordinate-origin frame)
cljs
(coordinate-origin ??)
?? invalid arglists:
(quote ([frame]))
source (clj)source (cljs)

coordinate-system->basisclj/s≠

clj
(coordinate-system->basis coordinate-system)
cljs
(coordinate-system->basis ??)
?? invalid arglists:
(quote ([coordinate-system]))

Returns the standard basis object for coordinate-system.

Returns the standard basis object for `coordinate-system`.
source (clj)source (cljs)raw docstring

coordinate-system->inverse-metricclj/s≠

clj
(coordinate-system->inverse-metric coordinate-system)
cljs
(coordinate-system->inverse-metric ??)
?? invalid arglists:
(quote ([coordinate-system]))
source (clj)source (cljs)

coordinate-system->metricclj/s≠

clj
(coordinate-system->metric coordinate-system)
cljs
(coordinate-system->metric ??)
?? invalid arglists:
(quote ([coordinate-system]))
source (clj)source (cljs)

coordinate-system->metric-componentsclj/s≠

clj
(coordinate-system->metric-components coordsys)
cljs
(coordinate-system->metric-components ??)
?? invalid arglists:
(quote ([coordsys]))
source (clj)source (cljs)

coordinate-system->oneform-basisclj/s≠

clj
(coordinate-system->oneform-basis coordinate-system)
cljs
(coordinate-system->oneform-basis ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given some coordinate-system, returns a structure of coordinate-basis-oneform-field instances.

The one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field.

When applied as a function, the structure behaves equivalently to

(coordinate-basis-oneform-field <coordinate-system> 'ignored-name)

With no indices supplied.

Given some `coordinate-system`, returns a structure of
`coordinate-basis-oneform-field` instances.

The one-form field at each structural spot takes a vector field and returns a
function that takes the directional derivative in that coordinate's direction
using the vector field.

When applied as a function, the structure behaves equivalently to

```clojure
(coordinate-basis-oneform-field <coordinate-system> 'ignored-name)
```

With no indices supplied.
source (clj)source (cljs)raw docstring

coordinate-system->vector-basisclj/s≠

clj
(coordinate-system->vector-basis coordinate-system)
cljs
(coordinate-system->vector-basis ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given some coordinate-system, returns a structure of coordinate-basis-vector-field instances. The vector field at each structural spot takes a function and computes its directional derivative with respect to that coordinate.

When applied as a function, the structure behaves equivalently to

(coordinate-basis-vector-field <coordinate-system> 'ignored-name)

With no indices supplied.

Given some `coordinate-system`, returns a structure of
`coordinate-basis-vector-field` instances. The vector field at each structural
spot takes a function and computes its directional derivative with respect to
that coordinate.

When applied as a function, the structure behaves equivalently to

```clojure
(coordinate-basis-vector-field <coordinate-system> 'ignored-name)
```

With no indices supplied.
source (clj)source (cljs)raw docstring

coordinate-system-atclj/s≠

clj
(coordinate-system-at manifold coordinate-system-name patch-name)
cljs
(coordinate-system-at ??)
?? invalid arglists:
(quote ([manifold coordinate-system-name patch-name]))

Returns an [[ICoordinateSystem]] instance specialized to the patch named patch-name on manifold.

Returns an [[ICoordinateSystem]] instance specialized to the patch named
`patch-name` on `manifold`.
source (clj)source (cljs)raw docstring

coordinate-system-namesclj/s≠

clj
(coordinate-system-names patch)
cljs
(coordinate-system-names ??)
?? invalid arglists:
(quote ([patch]))

Returns a set of names of all coordinate system constructors registered in the supplied patch.

Returns a set of names of all coordinate system constructors registered in the
supplied patch.
source (clj)source (cljs)raw docstring

coordinate-system?clj/s≠

clj
(coordinate-system? x)
cljs
(coordinate-system? ??)
?? invalid arglists:
(quote ([x]))

Returns true if x implements [[ICoordinateSystem]], false otherwise.

Returns true if `x` implements [[ICoordinateSystem]], false otherwise.
source (clj)source (cljs)raw docstring

coordinate-tupleclj/s

source (clj)source (cljs)

coordinatizeclj/s≠

clj
(coordinatize vf coordinate-system)
cljs
(coordinatize ??)
?? invalid arglists:
(quote ([vf coordinate-system]))

Returns an operator that acts as a coordinate version of the supplied vector field vf with respect to coordinate-system.

The returned operator takes a function and returns a new function that takes directional derivatives of coordinate representations of manifold points, with respect to coordinate-system.

Returns an operator that acts as a coordinate version of the supplied vector
field `vf` with respect to `coordinate-system`.

The returned operator takes a function and returns a new function that takes
directional derivatives of coordinate representations of manifold points, with
respect to `coordinate-system`.
source (clj)source (cljs)raw docstring

coords->eventclj/s≠

clj
(coords->event this coords)
cljs
(coords->event ??)
?? invalid arglists:
(quote ([this coords]))

Accepts a coordinate representation coords of some event and returns a coordinate-free representation of the event.

coords must be owned this this reference frame; coords->event will throw if not.

Accepts a coordinate representation `coords` of some `event` and returns a
coordinate-free representation of the event.

`coords` must be owned this this reference frame; [[coords->event]] will throw
if not.
sourceraw docstring

corresponding-velocitiesclj/s≠

clj
(corresponding-velocities coords)
cljs
(corresponding-velocities ??)
?? invalid arglists:
(quote ([coords]))

Takes a coordinate representation coords of a manifold point with all symbolic entries, and returns a structure of the same shape with v: prepended to all symbols.

This structure is appropriate for representing the velocities associated with each coordinate.

Takes a coordinate representation `coords` of a manifold point with all
symbolic entries, and returns a structure of the same shape with `v:`
prepended to all symbols.

This structure is appropriate for representing the velocities associated with
each coordinate.
source (clj)source (cljs)raw docstring

cosclj/s≠multimethod

clj
(cos a)
cljs
(cos ??)
?? invalid arglists:
(quote ([a]))

generic cos.

Returns the cosine of the supplied argument a.

generic cos.

Returns the [cosine](https://en.wikipedia.org/wiki/Sine_and_cosine) of the
  supplied argument `a`.
source (clj)source (cljs)raw docstring

coshclj/s≠multimethod

clj
(cosh a)
cljs
(cosh ??)
?? invalid arglists:
(quote ([a]))

generic cosh.

Computes the hyperbolic cosine of the supplied argument a.

defaults to (e^x + e^{-x}) / 2.

generic cosh.

Computes the [hyperbolic
 cosine](https://mathworld.wolfram.com/HyperbolicCosine.html) of the supplied
 argument `a`.

defaults to `(e^x + e^{-x}) / 2`.
source (clj)source (cljs)raw docstring

cotclj/s≠multimethod

clj
(cot a)
cljs
(cot ??)
?? invalid arglists:
(quote ([a]))

generic cot.

Computes the trigonometric cotangent function of the supplied argument a.

Equivalent to (invert (tan a)), or (/ (cos a) (sin a)).

generic cot.

Computes the trigonometric cotangent function of the supplied argument `a`.

Equivalent to `(invert (tan a))`, or `(/ (cos a) (sin a))`.
source (clj)source (cljs)raw docstring

cothclj/s≠multimethod

clj
(coth a)
cljs
(coth ??)
?? invalid arglists:
(quote ([a]))

generic coth.

Computes the hyperbolic cotangent of the supplied argument a.

defaults to cosh(x) / sinh(x).

generic coth.

Computes the [hyperbolic
 cotangent](https://mathworld.wolfram.com/HyperbolicCotangent.html) of the supplied
 argument `a`.

defaults to `cosh(x) / sinh(x)`.
source (clj)source (cljs)raw docstring

covariant-derivativeclj/s

(covariant-derivative Cartan)
(covariant-derivative Cartan map)
source (clj)source (cljs)

covariant-differentialclj/s≠

clj
(covariant-differential Cartan)
cljs
(covariant-differential ??)
?? invalid arglists:
(quote ([Cartan]))
source (clj)source (cljs)

cross-productclj/s≠multimethod

clj
(cross-product a b)
cljs
(cross-product ??)
?? invalid arglists:
(quote ([a b]))

generic cross-product

generic cross-product
source (clj)source (cljs)raw docstring

cscclj/s≠multimethod

clj
(csc a)
cljs
(csc ??)
?? invalid arglists:
(quote ([a]))

generic csc.

Computes the cosecant of the supplied argument a.

Equivalent to (invert (sin a)).

generic csc.

Computes the cosecant of the supplied argument `a`.

Equivalent to `(invert (sin a))`.
source (clj)source (cljs)raw docstring

cschclj/s≠multimethod

clj
(csch a)
cljs
(csch ??)
?? invalid arglists:
(quote ([a]))

generic csch.

Computes the hyperbolic cosecant of the supplied argument a.

defaults to 1 / sinh(x).

generic csch.

Computes the [hyperbolic
 cosecant](https://mathworld.wolfram.com/HyperbolicCosecant.html) of the supplied
 argument `a`.

defaults to `1 / sinh(x)`.
source (clj)source (cljs)raw docstring

cubeclj/s≠multimethod

clj
(cube a)
cljs
(cube ??)
?? invalid arglists:
(quote ([a]))

generic cube

generic cube
source (clj)source (cljs)raw docstring

curlclj/s≠

clj
(curl metric orthonormal-basis)
cljs
(curl ??)
?? invalid arglists:
(quote ([metric orthonormal-basis]))

curl implements equation (10.7) of Functional Differential Geometry, defined on page 155.

[[curl]] implements equation (10.7) of Functional Differential Geometry,
defined on page 155.
source (clj)source (cljs)raw docstring

Curlclj/s

Operator that takes a function f and returns a function that calculates the Curl of f at its input point.

f must be a function from $\mathbb{R}^3 \to \mathbb{R}^3$.

Operator that takes a function `f` and returns a function that
calculates the [Curl](https://en.wikipedia.org/wiki/Curl_(mathematics)) of `f`
at its input point.

`f` must be a function from $\mathbb{R}^3 \to \mathbb{R}^3$.
source (clj)source (cljs)raw docstring

curvature-componentsclj/s≠

clj
(curvature-components nabla coord-sys)
cljs
(curvature-components ??)
?? invalid arglists:
(quote ([nabla coord-sys]))
source (clj)source (cljs)

Dclj/s≠

clj
(D f)
cljs
(D ??)
?? invalid arglists:
(quote ([f]))

Derivative operator. Takes some function f and returns a function whose value at some point can multiply an increment in the arguments to produce the best linear estimate of the increment in the function value.

For univariate functions, D computes a derivative. For vector-valued functions, D computes the Jacobian of f.

The related emmy.env/Grad returns a function that produces a structure of the opposite orientation as D. Both of these functions use reverse-mode automatic differentiation.

Derivative operator. Takes some function `f` and returns a function whose value
at some point can multiply an increment in the arguments to produce the best
linear estimate of the increment in the function value.

For univariate functions, [[D]] computes a derivative. For vector-valued
functions, [[D]] computes
the [Jacobian](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)
of `f`.

The related [[emmy.env/Grad]] returns a function that produces a structure of
the opposite orientation as [[D]]. Both of these functions use reverse-mode
automatic differentiation.
source (clj)source (cljs)raw docstring

D-as-matrixclj/s≠

clj
(D-as-matrix F)
cljs
(D-as-matrix ??)
?? invalid arglists:
(quote ([F]))
source (clj)source (cljs)

D-forwardclj/s≠

clj
(D-forward f)
cljs
(D-forward ??)
?? invalid arglists:
(quote ([f]))

Forward-mode derivative operator. Takes some function f and returns a function whose value at some point can multiply an increment in the arguments to produce the best linear estimate of the increment in the function value.

For univariate functions, D-forward computes a derivative. For vector-valued functions, D-forward computes the Jacobian of f.

Forward-mode derivative operator. Takes some function `f` and returns a
function whose value at some point can multiply an increment in the arguments
to produce the best linear estimate of the increment in the function value.

For univariate functions, [[D-forward]] computes a derivative. For vector-valued
functions, [[D-forward]] computes
the [Jacobian](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)
of `f`.
source (clj)source (cljs)raw docstring

D-numericclj/s

(D-numeric f)
(D-numeric f opts)

Takes a function f: R => R (function of a single real variable), and returns a new function of x that approximates the derivative $Df(x)$ (or $D^2f(x)$ if you pass :method :central-d2).

Returns the estimated value of the derivative at x. If you pass :info? true, the fn returns a dictionary of the results of us/seq-limit:

{:converged? <boolean>
 :terms-checked <int>
 :result <derivative estimate>}

Make sure to visit emmy.calculus.derivative/D if you want symbolic or automatic differentiation.

Roundoff Estimate

The returned function will attempt to estimate how many times it can halve the step size used to estimate the derivative before roundoff error swamps the calculation, and force the function to return (with :converged? false, if you pass :info?)

Optional Arguments

D-numeric takes optional args as its second param. Any of these can be overridden by passing a second argument to the function returned by D-numeric; helpful for setting defaults and then overriding them later.

The returned function passes through these and any other options to us/seq-limit, where they control the sequence of richardson extrapolation-accelerated estimates.

Options:

  • :method: one of :central, :central-d2, :forward or :backward. :central-d2 forces a second derivative estimate; the other methods configure a first derivative estimator.

  • :info? if false (default), returns the estimated value of x. If true, returns a dictionary with more information (see D-numeric's docstring for more info.)

  • :initial-h: the initial h to use for derivative estimates before $h o 0$. Defaults to 0.1 * abs(x).

  • :tolerance: see us/stream-limit for a discussion of how this value handles relative vs absolute tolerance. $\sqrt(\epsilon)$ by default, where $\epsilon$ = machine tolerance.

  • :maxterms: the maximum number of terms to consider when hunting for a derivative estimate. This defaults to an estimate generated internally, designed to prevent roundoff error from swamping the result. If you want to disable this feature, set :maxterms to something moderately large, like :maxterms 100. But do so carefully! See the surrounding namespace for a larger discussion.

Takes a function `f: R => R` (function of a single real variable), and returns
a new function of `x` that approximates the derivative $Df(x)$ (or $D^2f(x)$
if you pass `:method :central-d2`).

Returns the estimated value of the derivative at `x`. If you pass `:info?
true`, the fn returns a dictionary of the results of `us/seq-limit`:

```clojure
{:converged? <boolean>
 :terms-checked <int>
 :result <derivative estimate>}
```

Make sure to visit [[emmy.calculus.derivative/D]] if you want symbolic or
automatic differentiation.

### Roundoff Estimate

The returned function will attempt to estimate how many times it can halve the
step size used to estimate the derivative before roundoff error swamps the
calculation, and force the function to return (with `:converged? false`, if
you pass `:info?`)

### Optional Arguments

`D-numeric` takes optional args as its second param. Any of these can be
overridden by passing a second argument to the function returned by
`D-numeric`; helpful for setting defaults and then overriding them later.

The returned function passes through these and any other options to
`us/seq-limit`, where they control the sequence of richardson
extrapolation-accelerated estimates.

Options:

- `:method`: one of `:central`, `:central-d2`, `:forward` or `:backward`.
`:central-d2` forces a second derivative estimate; the other methods configure
a first derivative estimator.

- `:info?` if false (default), returns the estimated value of `x`. If true,
returns a dictionary with more information (see `D-numeric`'s docstring for
more info.)

- `:initial-h`: the initial `h` to use for derivative estimates before $h 	o
0$. Defaults to `0.1 * abs(x)`.

- `:tolerance`: see `us/stream-limit` for a discussion of how this value
handles relative vs absolute tolerance. $\sqrt(\epsilon)$ by default, where
$\epsilon$ = machine tolerance.

- `:maxterms`: the maximum number of terms to consider when hunting for a
derivative estimate. This defaults to an estimate generated internally,
designed to prevent roundoff error from swamping the result. If you want to
disable this feature, set `:maxterms` to something moderately large, like
`:maxterms 100`. But do so carefully! See the surrounding namespace for a
larger discussion.
source (clj)source (cljs)raw docstring

D-reverseclj/s≠

clj
(D-reverse f)
cljs
(D-reverse ??)
?? invalid arglists:
(quote ([f]))

Reverse-mode derivative operator. Takes some function f and returns a function whose value at some point can multiply an increment in the arguments to produce the best linear estimate of the increment in the function value.

For univariate functions, D-reverse computes a derivative. For vector-valued functions, D-reverse computes the Jacobian of f.

Reverse-mode derivative operator. Takes some function `f` and returns a
function whose value at some point can multiply an increment in the arguments
to produce the best linear estimate of the increment in the function value.

For univariate functions, [[D-reverse]] computes a derivative. For vector-valued
functions, [[D-reverse]] computes
the [Jacobian](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)
of `f`.
source (clj)source (cljs)raw docstring

define-coordinatesclj/s

(define-coordinates coordinate-prototype coordinate-system)

Given some coordinate-system like R2-rect and a coordinate-prototype like [x y] or (up x y),binds the following definitions into the namespace where define-coordinates is invoked:

  • R2-rect binds to a new version of the coordinate system with its coordinate-prototype replaced by the supplied prototype

  • x and y bind to coordinate functions, i.e., functions from manifold point to that particular coordinate

  • d:dx and d:dy bind to the corresponding vector field procedures

  • dx and dy bind to 1-forms for each coordinate.

Given some `coordinate-system` like `R2-rect` and a `coordinate-prototype` like
`[x y]` or `(up x y), `binds the following definitions into the namespace
where [[define-coordinates]] is invoked:

- `R2-rect` binds to a new version of the coordinate system with its
  `coordinate-prototype` replaced by the supplied prototype

- `x` and `y` bind to coordinate functions, i.e., functions from manifold point
to that particular coordinate

- `d:dx` and `d:dy` bind to the corresponding vector field procedures

- `dx` and `dy` bind to 1-forms for each coordinate.
sourceraw docstring

definite-integralclj/s

(definite-integral f a b)
(definite-integral f
                   a
                   b
                   {:keys [method compile? info?]
                    :or {method :open compile? false info? false}
                    :as opts})

Evaluates the definite integral of integrand f across the interval $a, b$. Optionally accepts a dictionary opts of customizing options; All opts will be passed through to the supplied integrate functions.

If you'd like more control, or to retrieve the integration function directly without looking it up via :method each time, see get-integrator.

All supplied options are passed through to the underlying integrator; see the specific integrator for information on what options are available.

Keyword arguments:

:method: Specifies the integration method used. Must be

  • a keyword naming one of the available methods in available-methods
  • a function with the proper integrator signature
  • a dictionary of integrator options with a :method key

Defaults to :open, which specifies an adaptive bulirsch-stoer quadrature method.

:compile? If true, the generic function will be simplified and compiled before execution.

:info? If true, definite-integral will return a map of integration information returned by the underlying integrator. Else, returns an estimate of the definite integral.

Evaluates the definite integral of integrand `f` across the interval $a, b$.
Optionally accepts a dictionary `opts` of customizing options; All `opts` will
be passed through to the supplied `integrate` functions.

If you'd like more control, or to retrieve the integration function directly
without looking it up via `:method` each time, see `get-integrator`.

All supplied options are passed through to the underlying integrator; see the
specific integrator for information on what options are available.

## Keyword arguments:

`:method`: Specifies the integration method used. Must be

- a keyword naming one of the available methods in `available-methods`
- a function with the proper integrator signature
- a dictionary of integrator options with a `:method` key

Defaults to `:open`, which specifies an adaptive bulirsch-stoer quadrature method.

`:compile?` If true, the generic function will be simplified and compiled
before execution.

`:info?` If true, `definite-integral` will return a map of integration
information returned by the underlying integrator. Else, returns an estimate
of the definite integral.
source (clj)source (cljs)raw docstring

denominatorclj/s≠

clj
(denominator _)
cljs
(denominator ??)
?? invalid arglists:
(quote ([_]))
source

derivativeclj/s≠

clj
(derivative f)
cljs
(derivative ??)
?? invalid arglists:
(quote ([f]))

Returns a single-argument function of that, when called with an argument x, returns the derivative of f at x using forward-mode automatic differentiation.

For numerical differentiation, see emmy.numerical.derivative/D-numeric.

f must be built out of generic operations that know how to handle [[Dual]] inputs in addition to any types that a normal (f x) call would present. This restriction does not apply to operations like putting x into a container or destructuring; just primitive function calls.

Returns a single-argument function of that, when called with an argument `x`,
returns the derivative of `f` at `x` using forward-mode automatic
differentiation.

For numerical differentiation,
see [[emmy.numerical.derivative/D-numeric]].

`f` must be built out of generic operations that know how to handle [[Dual]]
inputs in addition to any types that a normal `(f x)` call would present. This
restriction does _not_ apply to operations like putting `x` into a container
or destructuring; just primitive function calls.
source (clj)source (cljs)raw docstring

determinantclj/s≠multimethod

clj
(determinant a)
cljs
(determinant ??)
?? invalid arglists:
(quote ([a]))

generic determinant

generic determinant
source (clj)source (cljs)raw docstring

differentialclj/s

Alias for [[differential-of-map]].
source (clj)source (cljs)raw docstring

differential-of-mapclj/s≠

clj
(differential-of-map mu:N->M)
cljs
(differential-of-map ??)
?? invalid arglists:
(quote ([mu:N->M]))

Defined on FDG p.72.

Defined on FDG p.72.
source (clj)source (cljs)raw docstring

dimensionclj/s≠multimethod

clj
(dimension a)
cljs
(dimension ??)
?? invalid arglists:
(quote ([a]))

generic dimension

generic dimension
source (clj)source (cljs)raw docstring

Divclj/s

Operator that takes a function f and returns a function that calculates the Divergence of f at its input point.

The divergence is a one-level contraction of the gradient.

Operator that takes a function `f` and returns a function that
calculates the [Divergence](https://en.wikipedia.org/wiki/Divergence) of
`f` at its input point.

The divergence is a one-level contraction of the gradient.
source (clj)source (cljs)raw docstring

divergenceclj/s

(divergence Cartan)
(divergence metric orthonormal-basis)

Both arities of divergence are defined on page 156 of Functional Differential Geometry.

Both arities of [[divergence]] are defined on page 156 of Functional Differential Geometry.
source (clj)source (cljs)raw docstring

divideclj/s

Alias for /.

Alias for [[/]].
source (clj)source (cljs)raw docstring

dot-productclj/s≠multimethod

clj
(dot-product a b)
cljs
(dot-product ??)
?? invalid arglists:
(quote ([a b]))

generic dot-product

generic dot-product
source (clj)source (cljs)raw docstring

downclj/s

(down & xs)

Construct a down (covariant) tuple from the arguments. Variadic version of [[down*]].

Construct a down (covariant) tuple from the arguments. Variadic version
of [[down*]].
source (clj)source (cljs)raw docstring

down->row-matrixclj/s≠

clj
(down->row-matrix v)
cljs
(down->row-matrix ??)
?? invalid arglists:
(quote ([v]))

Returns a row matrix with the contents of the supplied down structure. Errors if any other type is provided.

Returns a row matrix with the contents of the supplied `down` structure.
Errors if any other type is provided.
source (clj)source (cljs)raw docstring

drop1clj/s

Alias for lower.

Alias for [[lower]].
source (clj)source (cljs)raw docstring

drop2clj/s≠

clj
(drop2 metric-tensor basis)
cljs
(drop2 ??)
?? invalid arglists:
(quote ([metric-tensor basis]))

For making a (2,0) tensor into a (0,2) tensor.

For making a (2,0) tensor into a (0,2) tensor.
source (clj)source (cljs)raw docstring

dual-zeroclj/s

Alias for compatible-zero.

Alias for [[compatible-zero]].
source (clj)source (cljs)raw docstring

elliptic-fclj/s≠

clj
(elliptic-f phi k)
cljs
(elliptic-f ??)
?? invalid arglists:
(quote ([phi k]))

Legendre elliptic integral of the first kind F(φ, k). See W.H. Press, Numerical Recipes in C++, 2ed. eq. 6.11.19

See page 260.

Legendre elliptic integral of the first kind F(φ, k).
 See W.H. Press, Numerical Recipes in C++, 2ed. eq. 6.11.19

See [page 260](http://phys.uri.edu/nigh/NumRec/bookfpdf/f6-11.pdf).
source (clj)source (cljs)raw docstring

eulerclj/s

The mathematical constant e, sometimes known as Euler's Number.

The mathematical
constant [e](https://en.wikipedia.org/wiki/E_(mathematical_constant)),
sometimes known as Euler's Number.
sourceraw docstring

Euler->Mclj/s≠

clj
(Euler->M [theta phi psi])
cljs
(Euler->M ??)
?? invalid arglists:
(quote ([[theta phi psi]]))

Compute the rotation matrix from a 3-vector of Euler angles.

Our Euler Angle convention:

M(theta, phi, psi) = R_z(phi)*R_x(theta)*R_z(psi)

Compute the rotation matrix from a 3-vector of Euler angles.

Our Euler Angle convention:

M(theta, phi, psi) = R_z(phi)*R_x(theta)*R_z(psi)
source (clj)source (cljs)raw docstring

Euler-anglesclj/s

source (clj)source (cljs)

euler-gammaclj/s

The mathematical constant known as the Euler–Mascheroni constant and sometimes as Euler's constant.

The mathematical constant known as the [Euler–Mascheroni
constant](https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant) and
sometimes as Euler's constant.
sourceraw docstring

Euler-Lagrange-operatorclj/s≠

clj
(Euler-Lagrange-operator L)
cljs
(Euler-Lagrange-operator ??)
?? invalid arglists:
(quote ([L]))
source (clj)source (cljs)

event->coordsclj/s≠

clj
(event->coords this event)
cljs
(event->coords ??)
?? invalid arglists:
(quote ([this event]))

Accepts a reference frame and an event, and returns this reference frame's coordinate representation of the supplied event.

Accepts a reference frame and an `event`, and returns this reference
frame's coordinate representation of the supplied `event`.
sourceraw docstring

event?clj/s≠

clj
(event? e)
cljs
(event? ??)
?? invalid arglists:
(quote ([e]))

Returns true if e is an event, false otherwise.

Make new events with make-event.

Returns true if `e` is an event, false otherwise.

Make new events with [[make-event]].
source (clj)source (cljs)raw docstring

evolutionclj/s≠

clj
(evolution order)
cljs
(evolution ??)
?? invalid arglists:
(quote ([order]))

We can use the coordinatized vector field to build an evolution along an integral curve.

NOTE: I don't see how this has anything to do with coordinatize!

We can use the coordinatized vector field to build an evolution along an
integral curve.

NOTE: I don't see how this has anything to do with [[coordinatize]]!
source (clj)source (cljs)raw docstring

evolveclj/s

(evolve state-derivative & state-derivative-args)

evolve takes a state derivative function constructor and its arguments, and returns an integrator via make-integrator.

In particular, the returned function accepts a callback function which will be invoked at intermediate grid points of the integration.

evolve takes a state derivative function constructor and its arguments, and
returns an integrator via make-integrator.

In particular, the returned function accepts a callback function which will be
invoked at intermediate grid points of the integration.
source (clj)source (cljs)raw docstring

exact-divideclj/s≠multimethod

clj
(exact-divide a b)
cljs
(exact-divide ??)
?? invalid arglists:
(quote ([a b]))

generic exact-divide.

Similar to the binary case of /, but throws if (g/exact? <result>) returns false.

generic exact-divide.

Similar to the binary case of [[/]], but throws if `(g/exact? <result>)`
  returns false.
source (clj)source (cljs)raw docstring

exact?clj/s≠multimethod

clj
(exact? a)
cljs
(exact? ??)
?? invalid arglists:
(quote ([a]))

generic exact?.

Entries that are exact are available for gcd, among other operations.

generic exact?.

Entries that are exact are available for `gcd`, among other operations.
source (clj)source (cljs)raw docstring

expclj/s≠multimethod

clj
(exp a)
cljs
(exp ??)
?? invalid arglists:
(quote ([a]))

generic exp.

Returns the base-e exponential of x. Equivalent to (expt e x), given some properly-defined e symbol.

generic exp.

Returns the base-e exponential of `x`. Equivalent to `(expt e x)`, given
  some properly-defined `e` symbol.
source (clj)source (cljs)raw docstring

exp10clj/s≠multimethod

clj
(exp10 a)
cljs
(exp10 ??)
?? invalid arglists:
(quote ([a]))

generic exp10.

Returns the base-10 exponential of x. Equivalent to (expt 10 x).

generic exp10.

Returns the base-10 exponential of `x`. Equivalent to `(expt 10 x)`.
source (clj)source (cljs)raw docstring

exp2clj/s≠multimethod

clj
(exp2 a)
cljs
(exp2 ??)
?? invalid arglists:
(quote ([a]))

generic exp2.

Returns the base-2 exponential of x. Equivalent to (expt 2 x).

generic exp2.

Returns the base-2 exponential of `x`. Equivalent to `(expt 2 x)`.
source (clj)source (cljs)raw docstring

expression->streamclj/s

(expression->stream expr stream)
(expression->stream expr stream options)

Renders an expression through the simplifier and onto the stream.

Renders an expression through the simplifier and onto the stream.
source (clj)source (cljs)raw docstring

expression->stringclj/s≠

clj
(expression->string expr)
cljs
(expression->string ??)
?? invalid arglists:
(quote ([expr]))

Returns a string representation of a frozen, simplified version of the supplied expression expr.

Returns a string representation of a frozen, simplified version of the supplied
expression `expr`.
source (clj)source (cljs)raw docstring

expression-ofclj/s≠

clj
(expression-of expr)
cljs
(expression-of ??)
?? invalid arglists:
(quote ([expr]))

If the supplied argument is a [[Literal]] (or a symbol, interpreted elsewhere as a numerical literal expression), returns the wrapped expression (or the symbol).

Else, returns expr.

If the supplied argument is a [[Literal]] (or a symbol, interpreted elsewhere
as a numerical literal expression), returns the wrapped expression (or the
symbol).

Else, returns `expr`.
source (clj)source (cljs)raw docstring

exptclj/s≠multimethod

clj
(expt a b)
cljs
(expt ??)
?? invalid arglists:
(quote ([a b]))

generic expt

generic expt
source (clj)source (cljs)raw docstring

extended-rotationclj/s≠

clj
(extended-rotation R)
cljs
(extended-rotation ??)
?? invalid arglists:
(quote ([R]))
source (clj)source (cljs)

exterior-derivativeclj/s

source (clj)source (cljs)

F->Cclj/s≠

clj
(F->C F)
cljs
(F->C ??)
?? invalid arglists:
(quote ([F]))

Accepts a coordinate transformation F from a local tuple to a new coordinate structure, and returns a function from local -> local that applies the transformation directly.

F->C handles local tuples of arbitrary length.

Accepts a coordinate transformation `F` from a local tuple to a new coordinate
structure, and returns a function from `local -> local` that applies the
transformation directly.

[[F->C]] handles local tuples of arbitrary length.
source (clj)source (cljs)raw docstring

F->CTclj/s

Alias for [[F->CH]].

Alias for [[F->CH]].
source (clj)source (cljs)raw docstring

factorclj/s≠

clj
(factor expr)
cljs
(factor ??)
?? invalid arglists:
(quote ([expr]))

Accepts a single symbolic expression and returns a factored version of that expression.

Differs from [[factor-expression]] in that it can handle any expression, not just expressions limited to polynomial operations.

Accepts a single symbolic expression and returns a factored version of that
expression.

Differs from [[factor-expression]] in that it can handle any expression, not
just expressions limited to polynomial operations.
source (clj)source (cljs)raw docstring

factorialclj/s≠

clj
(factorial n)
cljs
(factorial ??)
?? invalid arglists:
(quote ([n]))

Returns the factorial of n, i.e., the product of 1 to n (inclusive).

factorial will return a platform-specific emmy.util/bigint given some n that causes integer overflow.

Returns the factorial of `n`, i.e., the product of 1 to `n` (inclusive).

[[factorial]] will return a platform-specific [[emmy.util/bigint]] given
some `n` that causes integer overflow.
source (clj)source (cljs)raw docstring

ff:zeroclj/s≠

clj
(ff:zero _)
cljs
(ff:zero ??)
?? invalid arglists:
(quote ([_]))

Returns a form field that returns, for any supplied vector field vf, a manifold function [[manifold/zero-manifold-function]] that maps every input manifold point to the scalar value 0.

Returns a form field that returns, for any supplied vector field `vf`, a
manifold function [[manifold/zero-manifold-function]] that maps every input
manifold `point` to the scalar value 0.
source (clj)source (cljs)raw docstring

find-pathclj/s

(find-path Lagrangian t0 q0 t1 q1 n & {:keys [observe]})

SICM p. 23. The optional parameter values is a callback which will report intermediate points of the minimization.

SICM p. 23. The optional parameter values is a callback which will report
intermediate points of the minimization.
source (clj)source (cljs)raw docstring

floorclj/s≠multimethod

clj
(floor a)
cljs
(floor ??)
?? invalid arglists:
(quote ([a]))

generic floor.

Returns the largest integer less than or equal to a.

Extensions beyond real numbers may behave differently; see the Documentation site for more detail.

generic floor.

Returns the largest integer less than or equal to `a`.

  Extensions beyond real numbers may behave differently; see the [Documentation
  site](https://cljdoc.org/d/org.mentat/emmy/CURRENT/doc/basics/generics)
  for more detail.
source (clj)source (cljs)raw docstring

form-field->form-field-over-mapclj/s≠

clj
(form-field->form-field-over-map mu:N->M)
cljs
(form-field->form-field-over-map ??)
?? invalid arglists:
(quote ([mu:N->M]))
source (clj)source (cljs)

form-field?clj/s≠

clj
(form-field? ff)
cljs
(form-field? ??)
?? invalid arglists:
(quote ([ff]))

Returns true if the supplied f is a form field operator, false otherwise.

Returns true if the supplied `f` is a form field operator, false otherwise.
source (clj)source (cljs)raw docstring

four-tuple->ctclj/s≠

clj
(four-tuple->ct [ct])
cljs
(four-tuple->ct ??)
?? invalid arglists:
(quote ([[ct]]))
source (clj)source (cljs)

four-tuple->spaceclj/s≠

clj
(four-tuple->space [_ x y z])
cljs
(four-tuple->space ??)
?? invalid arglists:
(quote ([[_ x y z]]))
source (clj)source (cljs)

fractional-partclj/s≠multimethod

clj
(fractional-part a)
cljs
(fractional-part ??)
?? invalid arglists:
(quote ([a]))

generic fractional-part.

Returns the fractional part of the given value, defined as x - ⌊x⌋.

For positive numbers, this is identical to (- a (integer-part a)). For negative a, because floor truncates toward negative infinity, you might be surprised to find that fractional-part returns the distance between a and the next-lowest integer:

(= 0.6 (fractional-part -0.4))
generic fractional-part.

Returns the fractional part of the given value, defined as `x - ⌊x⌋`.

  For positive numbers, this is identical to `(- a (integer-part a))`. For
  negative `a`, because [[floor]] truncates toward negative infinity, you might
  be surprised to find that [[fractional-part]] returns the distance between `a`
  and the next-lowest integer:

```clojure
(= 0.6 (fractional-part -0.4))
```
source (clj)source (cljs)raw docstring

frame-makerclj/s≠

clj
(frame-maker c->e e->c)
cljs
(frame-maker ??)
?? invalid arglists:
(quote ([c->e e->c]))

Takes:

  • c->e, a function mapping coordinates to events
  • e->c, a function mapping events to coordinates

and returns a function that takes:

  • a symbolic name
  • an ancestor frame
  • a dictionary of params

and returns instance of [[IFrame]].

Both c->e and e->c must accept three arguments:

  • ancestor-frame
  • the [[IFrame]] instance
  • a map of parameters supplied to the returned function (possibly empty!).
Takes:

- `c->e`, a function mapping coordinates to events
- `e->c`, a function mapping events to coordinates

and returns a function that takes:

- a symbolic name
- an ancestor frame
- a dictionary of params

and returns instance of [[IFrame]].

Both `c->e` and `e->c` must accept three arguments:

- `ancestor-frame`
- the [[IFrame]] instance
- a map of parameters supplied to the returned function (possibly empty!).
source (clj)source (cljs)raw docstring

frame-nameclj/s≠

clj
(frame-name _)
cljs
(frame-name ??)
?? invalid arglists:
(quote ([_]))

Returns the symbolic name of the suppplied frame.

Returns the symbolic name of the suppplied frame.
sourceraw docstring

frame-ownerclj/s≠

clj
(frame-owner coords)
cljs
(frame-owner ??)
?? invalid arglists:
(quote ([coords]))

Returns the owning [[IFrame]] instance of the supplied coordinates coords, nil if there's no owner otherwise.

Returns the owning [[IFrame]] instance of the supplied coordinates `coords`,
nil if there's no owner otherwise.
source (clj)source (cljs)raw docstring

frame-paramsclj/s≠

clj
(frame-params _)
cljs
(frame-params ??)
?? invalid arglists:
(quote ([_]))

Returns the parameters registered with the supplied frame.

Returns the parameters registered with the supplied frame.
sourceraw docstring

frame?clj/s≠

clj
(frame? x)
cljs
(frame? ??)
?? invalid arglists:
(quote ([x]))

Returns true if x implements [[IFrame]], false otherwise.

Returns true if `x` implements [[IFrame]], false otherwise.
source (clj)source (cljs)raw docstring

freezeclj/s≠multimethod

clj
(freeze a)
cljs
(freeze ??)
?? invalid arglists:
(quote ([a]))

generic freeze.

Freezing an expression means removing wrappers and other metadata from subexpressions, so that the result is basically a pure S-expression with the same structure as the input. Doing this will rob an expression of useful information for further computation; so this is intended to be done just before simplification and printing, to simplify those processes.

generic freeze.

Freezing an expression means removing wrappers and other metadata from
  subexpressions, so that the result is basically a pure S-expression with the
  same structure as the input. Doing this will rob an expression of useful
  information for further computation; so this is intended to be done just
  before simplification and printing, to simplify those processes.
source (clj)source (cljs)raw docstring

function->oneform-fieldclj/s≠

clj
(function->oneform-field f)
cljs
(function->oneform-field ??)
?? invalid arglists:
(quote ([f]))

One of the two incompatible definitions of differential.

This differential is a special case of exterior derivative. The other one lives at [[map/differential]].

One of the two incompatible definitions of differential.

This differential is a special case of exterior derivative. The other one
lives at [[map/differential]].
source (clj)source (cljs)raw docstring

Gammaclj/s

(Gamma q)
(Gamma q n)

Gamma takes a path function (from time to coordinates) to a state function (from time to local tuple).

Gamma takes a path function (from time to coordinates) to a state
function (from time to local tuple).
source (clj)source (cljs)raw docstring

Gamma-barclj/s≠

clj
(Gamma-bar f)
cljs
(Gamma-bar ??)
?? invalid arglists:
(quote ([f]))
source (clj)source (cljs)

gcdclj/s≠multimethod

clj
(gcd a b)
cljs
(gcd ??)
?? invalid arglists:
(quote ([a b]))

generic gcd.

Returns the greatest common divisor of the two inputs a and b.

generic gcd.

Returns the [greatest common
  divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor) of the two
  inputs `a` and `b`.
source (clj)source (cljs)raw docstring

general-boostclj/s≠

clj
(general-boost beta)
cljs
(general-boost ??)
?? invalid arglists:
(quote ([beta]))
source (clj)source (cljs)

general-boost2clj/s≠

clj
(general-boost2 direction v:c)
cljs
(general-boost2 ??)
?? invalid arglists:
(quote ([direction v:c]))

Takes a unit 3-vector direction (representing a direction) and a velocity v:c normalized by C.

Takes a unit 3-vector `direction` (representing a direction) and a velocity
`v:c` normalized by `C`.
source (clj)source (cljs)raw docstring

generalized-LEclj/s≠

clj
(generalized-LE Lagrangian)
cljs
(generalized-LE ??)
?? invalid arglists:
(quote ([Lagrangian]))
source (clj)source (cljs)

geodesic-equationclj/s≠

clj
(geodesic-equation source-coordsys target-coordsys Cartan-on-target)
cljs
(geodesic-equation ??)
?? invalid arglists:
(quote ([source-coordsys target-coordsys Cartan-on-target]))
source (clj)source (cljs)

golden-section-maxclj/s

(golden-section-max f xa xb)
(golden-section-max f xa xb opts)

For convenience, we also provide the sister-procedure for finding the maximum of a unimodal function using the golden section method.

Negate the function, minimize, negate the result.

For convenience, we also provide the sister-procedure for finding
the maximum of a unimodal function using the golden section method.

Negate the function, minimize, negate the result.
source (clj)source (cljs)raw docstring

golden-section-minclj/s

(golden-section-min f xa xb)
(golden-section-min f
                    xa
                    xb
                    {:keys [choose callback]
                     :or {choose best-of callback (constantly nil)}
                     :as opts})

Golden Section search attempts to locate the minimum of the supplied function f by evaluating points located at golden-ratioed intervals between the two starting endpoints a and b. This method is slow, steady and reliable.

Supports the following optional keyword arguments:

:converged? is an optional predicate accepting five arguments:

  • [a fa]
  • [l fl]
  • [r fr]
  • [b fb]
  • current-iteration

If the supplied fn returns true, it will signal convergence and the optimizer will return. Returning false will continue.

:choose is called at the final step of optimization with all 4 points and their fn values (see the first four arguments to :converged?), and returns the final choice.

:callback receives all 5 arguments on every iteration.

:maxiter Maximum number of iterations allowed for the minimizer. Defaults to 1000.

:maxfun Maximum number of times the function can be evaluated before exiting. Defaults to 1000.

:fn-tolerance check that the minimal value of any of the checked points is within the maximum of f(a) or f(b).

:arg-tolerance check that a and b are within this supplied absolute distance.

Golden Section search attempts to locate the minimum of the supplied function
`f` by evaluating points located at golden-ratioed intervals between the two
starting endpoints `a` and `b`. This method is slow, steady and reliable.

Supports the following optional keyword arguments:

`:converged?` is an optional predicate accepting five arguments:

- `[a fa]`
- `[l fl]`
- `[r fr]`
- `[b fb]`
- `current-iteration`

If the supplied `fn` returns true, it will signal convergence and the
optimizer will return. Returning false will continue.

`:choose` is called at the final step of optimization with all 4 points and
their fn values (see the first four arguments to `:converged?`), and returns
the final choice.

`:callback` receives all 5 arguments on every iteration.

`:maxiter` Maximum number of iterations allowed for the minimizer. Defaults to
1000.

`:maxfun` Maximum number of times the function can be evaluated before exiting.
Defaults to 1000.

`:fn-tolerance` check that the minimal value of any of the checked points is
within the maximum of f(a) or f(b).

`:arg-tolerance` check that `a` and `b` are within this supplied absolute
distance.
source (clj)source (cljs)raw docstring

Gradclj/s

Operator that takes a function f and returns a new function that calculates the Gradient of f.

The related emmy.env/D operator returns a function that produces a structure of the opposite orientation as Grad. Both of these functions use reverse-mode automatic differentiation.

Operator that takes a function `f` and returns a new function that
calculates the [Gradient](https://en.wikipedia.org/wiki/Gradient) of `f`.

The related [[emmy.env/D]] operator returns a function that produces a
structure of the opposite orientation as [[Grad]]. Both of these functions use
reverse-mode automatic differentiation.
source (clj)source (cljs)raw docstring

gradientclj/s≠

clj
(gradient metric basis)
cljs
(gradient ??)
?? invalid arglists:
(quote ([metric basis]))

gradient implements equation (10.3) in Functional Differential Geometry, defined on page 154.

[[gradient]] implements equation (10.3) in Functional Differential Geometry,
defined on page 154.
source (clj)source (cljs)raw docstring

Gram-Schmidtclj/s≠

clj
(Gram-Schmidt vector-basis metric)
cljs
(Gram-Schmidt ??)
?? invalid arglists:
(quote ([vector-basis metric]))
source (clj)source (cljs)

Hamilton-equationsclj/s≠

clj
(Hamilton-equations Hamiltonian)
cljs
(Hamilton-equations ??)
?? invalid arglists:
(quote ([Hamiltonian]))
source (clj)source (cljs)

Hamiltonianclj/s≠

clj
(Hamiltonian n)
cljs
(Hamiltonian ??)
?? invalid arglists:
(quote ([n]))

Returns function signature for a Hamiltonian with n degrees of freedom (or an unrestricted number if n is not given).

Useful for constructing Hamiltonian literal functions.

Returns function signature for a Hamiltonian with n degrees of freedom (or an
unrestricted number if n is not given).

Useful for constructing Hamiltonian literal functions.
source (clj)source (cljs)raw docstring

Hamiltonian->state-derivativeclj/s≠

clj
(Hamiltonian->state-derivative H)
cljs
(Hamiltonian->state-derivative ??)
?? invalid arglists:
(quote ([H]))
source (clj)source (cljs)

Hodge-starclj/s

(Hodge-star metric spec & {:keys [orthonormalize?] :or {orthonormalize? false}})

Takes a metric and a spec and returns the Hodge star operator (actually just a function, but I suspect this should be a proper operator!)

spec may be:

  • a coordinate system with an orthonormal basis
  • an orthonormal basis
  • a basis

if the spec is a basis that needs to be orthonormalized, the optional :orthonormalize? keyword argument must be a coordinate system.

Takes a `metric` and a `spec` and returns the [Hodge star
operator](https://en.wikipedia.org/wiki/Hodge_star_operator) (actually just a
function, but I suspect this should be a proper operator!)

`spec` may be:

- a coordinate system with an orthonormal basis
- an orthonormal basis
- a basis

if the spec is a basis that needs to be orthonormalized, the optional
`:orthonormalize?` keyword argument must be a coordinate system.
source (clj)source (cljs)raw docstring

Iclj/s

Identity function. Returns its argument.

Identity function. Returns its argument.
source (clj)source (cljs)raw docstring

i:contractclj/s≠

clj
(i:contract T u d n)
cljs
(i:contract ??)
?? invalid arglists:
(quote ([T u d n]))
source (clj)source (cljs)

i:outer-productclj/s≠

clj
(i:outer-product T1 T2)
cljs
(i:outer-product ??)
?? invalid arglists:
(quote ([T1 T2]))
source (clj)source (cljs)

identity-likeclj/s≠multimethod

clj
(identity-like a)
cljs
(identity-like ??)
?? invalid arglists:
(quote ([a]))

generic identity-like.

Like one-like but works for square matrices.

generic identity-like.

Like `one-like` but works for square matrices.
source (clj)source (cljs)raw docstring

identity?clj/s≠multimethod

clj
(identity? a)
cljs
(identity? ??)
?? invalid arglists:
(quote ([a]))

generic identity?.

Like one?, but this is true of square identity matrices as well. No matrix is considered one? because its function as a multiplicative identity depends on the shape of the other multiplicand.

generic identity?.

Like `one?`, but this is true of square identity matrices as well.
  No matrix is considered `one?` because its function as a multiplicative
  identity depends on the shape of the other multiplicand.
source (clj)source (cljs)raw docstring

imag-partclj/s≠multimethod

clj
(imag-part a)
cljs
(imag-part ??)
?? invalid arglists:
(quote ([a]))

generic imag-part

generic imag-part
source (clj)source (cljs)raw docstring

index-typesclj/s≠

clj
(index-types f)
cljs
(index-types ??)
?? invalid arglists:
(quote ([f]))

Given an operator or function f, returns its registered vector of index types, or [] if none exist.

index types are, for example,

['up 'down 'down]

for a Christoffel-2, which takes one oneform field and two vector fields.

Given an operator or function `f`, returns its registered vector of index
types, or `[]` if none exist.

index types are, for example,

```clojure
['up 'down 'down]
```

for a `Christoffel-2`, which takes one oneform field and two vector fields.
source (clj)source (cljs)raw docstring

indexed->typedclj/s≠

clj
(indexed->typed indexed basis)
cljs
(indexed->typed ??)
?? invalid arglists:
(quote ([indexed basis]))
source (clj)source (cljs)

infinite?clj/s≠multimethod

clj
(infinite? a)
cljs
(infinite? ??)
?? invalid arglists:
(quote ([a]))

generic infinite?.

Returns true if a is either numerically infinite (i.e., equal to ##Inf) or a compound number (complex or quaterion, for example) with some infinite component.

generic infinite?.

Returns true if `a` is either numerically infinite (i.e., equal to `##Inf`) or
  a compound number (complex or quaterion, for example) with some infinite
  component.
source (clj)source (cljs)raw docstring

inner-productclj/s≠multimethod

clj
(inner-product a b)
cljs
(inner-product ??)
?? invalid arglists:
(quote ([a b]))

generic inner-product

generic inner-product
source (clj)source (cljs)raw docstring

integer-partclj/s≠multimethod

clj
(integer-part a)
cljs
(integer-part ??)
?? invalid arglists:
(quote ([a]))

generic integer-part.

Returns the integer part of a by removing any fractional digits.

generic integer-part.

Returns the integer part of `a` by removing any fractional digits.
source (clj)source (cljs)raw docstring

integrate-state-derivativeclj/s≠

clj
(integrate-state-derivative state-derivative
                            state-derivative-args
                            initial-state
                            t1
                            dt)
cljs
(integrate-state-derivative ??)
?? invalid arglists:
(quote ([state-derivative state-derivative-args initial-state t1 dt]))

A wrapper for evolve, which is more convenient when you just want a vector of (time, state) pairs over the integration interval instead of having to deal with a callback. Integrates the supplied state derivative (and its argument package) from [0 to t1] in steps of size dt

A wrapper for evolve, which is more convenient when you just
want a vector of (time, state) pairs over the integration interval
instead of having to deal with a callback. Integrates the supplied
state derivative (and its argument package) from [0 to t1] in steps
of size dt
source (clj)source (cljs)raw docstring

interior-productclj/s≠

clj
(interior-product X)
cljs
(interior-product ??)
?? invalid arglists:
(quote ([X]))
source (clj)source (cljs)

invertclj/s≠multimethod

clj
(invert a)
cljs
(invert ??)
?? invalid arglists:
(quote ([a]))

generic invert.

Returns the multiplicative inverse of a.

Equivalent to (/ 1 a).

generic invert.

Returns the multiplicative inverse of `a`.

  Equivalent to `(/ 1 a)`.
source (clj)source (cljs)raw docstring

iterated-mapclj/s≠

clj
(iterated-map f n)
cljs
(iterated-map ??)
?? invalid arglists:
(quote ([f n]))

f is a function of (x y continue fail), which calls continue with the values of x' y' that follow x y in the mapping.

Returns a map of the same shape that iterates the iterated map n times before invoking the continuation, or invokes the fail continuation if the inner map fails.

f is a function of (x y continue fail), which calls continue with the values of
x' y' that follow x y in the mapping.

Returns a map of the same shape that iterates the iterated map n times before
invoking the continuation, or invokes the fail continuation if the inner map
fails.
source (clj)source (cljs)raw docstring

Jacobianclj/s≠

clj
(Jacobian to-basis from-basis)
cljs
(Jacobian ??)
?? invalid arglists:
(quote ([to-basis from-basis]))

Returns the Jacobian of transition from from-basis to to-basis.

The Jacobian is a structure of manifold functions. The outer index is the from-basis index, so this structure can be multiplied by tuple of component functions of a vector field relative to from-basis to get component functions for a vector field in to-basis.

Returns the Jacobian of transition from `from-basis` to `to-basis`.

The Jacobian is a structure of manifold functions. The outer index is the
from-basis index, so this structure can be multiplied by tuple of component
functions of a vector field relative to `from-basis` to get component
functions for a vector field in `to-basis`.
source (clj)source (cljs)raw docstring

kindclj/s≠

clj
(kind this)
cljs
(kind ??)
?? invalid arglists:
(quote ([this]))
source

kind-predicateclj/s≠

clj
(kind-predicate x)
cljs
(kind-predicate ??)
?? invalid arglists:
(quote ([x]))

Returns a predicate that returns true if its argument matches the supplied kind-keyword k, false otherwise.

Returns a predicate that returns true if its argument matches the supplied
kind-keyword `k`, false otherwise.
source (clj)source (cljs)raw docstring

Lagrange-equationsclj/s

(Lagrange-equations L)
(Lagrange-equations L dissipation-fn)
source (clj)source (cljs)

Lagrange-equations-first-orderclj/s≠

clj
(Lagrange-equations-first-order L)
cljs
(Lagrange-equations-first-order ??)
?? invalid arglists:
(quote ([L]))
source (clj)source (cljs)

Lagrange-interpolation-functionclj/s≠

clj
(Lagrange-interpolation-function ys xs)
cljs
(Lagrange-interpolation-function ??)
?? invalid arglists:
(quote ([ys xs]))

Given ys (a sequence of function values) and xs (an equal-length sequence of function inputs), returns a [[emmy.polynomial/Polynomial]] instance guaranteed to pass through all supplied xs and ys.

The contract for inputs is that (map vector xs ys) should return a sequence of pairs of points.

Given `ys` (a sequence of function values) and `xs` (an equal-length sequence
of function inputs), returns a [[emmy.polynomial/Polynomial]] instance
guaranteed to pass through all supplied `xs` and `ys`.

The contract for inputs is that `(map vector xs ys)` should return a sequence
of pairs of points.
source (clj)source (cljs)raw docstring

Lagrangian->energyclj/s≠

clj
(Lagrangian->energy L)
cljs
(Lagrangian->energy ??)
?? invalid arglists:
(quote ([L]))
source (clj)source (cljs)

Lagrangian->Hamiltonianclj/s

source (clj)source (cljs)

Lagrangian->power-lossclj/s≠

clj
(Lagrangian->power-loss L)
cljs
(Lagrangian->power-loss ??)
?? invalid arglists:
(quote ([L]))
source (clj)source (cljs)

Lagrangian->state-derivativeclj/s

(Lagrangian->state-derivative L)
(Lagrangian->state-derivative L dissipation-fn)

Optionally takes a dissipation function.

Optionally takes a dissipation function.
source (clj)source (cljs)raw docstring

Lagrangian-actionclj/s

(Lagrangian-action L q t1 t2)
(Lagrangian-action L q t1 t2 integration-opts)
source (clj)source (cljs)

Lapclj/s

Operator that takes a function f and returns a function that calculates the Vector Laplacian of f at its input point.

Operator that takes a function `f` and returns a function that calculates
the [Vector
Laplacian](https://en.wikipedia.org/wiki/Laplace_operator#Vector_Laplacian) of
`f` at its input point.
source (clj)source (cljs)raw docstring

Laplacianclj/s≠

clj
(Laplacian metric orthonormal-basis)
cljs
(Laplacian ??)
?? invalid arglists:
(quote ([metric orthonormal-basis]))
source (clj)source (cljs)

lcmclj/s≠multimethod

clj
(lcm a b)
cljs
(lcm ??)
?? invalid arglists:
(quote ([a b]))

generic lcm.

Returns the least common multiple of the two inputs a and b.

generic lcm.

Returns the [least common
  multiple](https://en.wikipedia.org/wiki/Least_common_multiple) of the two
  inputs `a` and `b`.
source (clj)source (cljs)raw docstring

Legendre-transformclj/s

source (clj)source (cljs)

let-coordinatesclj/s

(let-coordinates bindings & body)

similar to a let binding that holds pairs of

<coordinate-structure-prototype>, <coordinate-system>

And internally binds, for each pair: (take [x y] and m/R2-rect as examples):

  • The coordinate system symbol R2-rect to a new version of the coordinate system with its coordinate-prototype replaced by the one you supplied. That's (up x y) in this example.

  • the entries x and y to coordinate functions, i.e., functions from manifold point to this particular coordinate

  • d:dx and d:dy vector field procedures (I'm fuzzy here!)

  • dx and dy 1-forms for each coordinate (fuzzy here too!)

Example:

(let-coordinates [[x y]    R2-rect
                 [r theta] R2-polar]
  ;; bindings:
  ;; R2-rect, x, y, d:dx, d:dy, dx, dy
  ;; R2-polar, r, theta, d:dr, d:dtheta, dr, dtheta
  body...)
similar to a `let` binding that holds pairs of

<coordinate-structure-prototype>, <coordinate-system>

And internally binds, for each pair: (take `[x y]` and `m/R2-rect` as
examples):

- The coordinate system symbol `R2-rect` to a new version of the coordinate
  system with its `coordinate-prototype` replaced by the one you supplied.
  That's `(up x y)` in this example.

- the entries `x` and `y` to coordinate functions, i.e., functions from manifold
  point to this particular coordinate

- `d:dx` and `d:dy` vector field procedures (I'm fuzzy here!)

- `dx` and `dy` 1-forms for each coordinate (fuzzy here too!)

Example:

```clojure
(let-coordinates [[x y]    R2-rect
                 [r theta] R2-polar]
  ;; bindings:
  ;; R2-rect, x, y, d:dx, d:dy, dx, dy
  ;; R2-polar, r, theta, d:dr, d:dtheta, dr, dtheta
  body...)
```
sourceraw docstring

Lie-Dclj/s≠

clj
(Lie-D R)
cljs
(Lie-D ??)
?? invalid arglists:
(quote ([R]))

Takes a system derivative R and returns a operator that takes a function F of coordinatized state and performs the operation described below, from ODE.scm in scmutils:

Let (sigma t) be the state of a system at time t. Let the (first-order) system of differential equations governing the evolution of this state be:

((D sigma) t) = (R (sigma t))
(D sigma) = (compose R sigma)

i.e. R is a system derivative.

Let F be any function of state, then a differential equation for the evolution of F, as it is dragged along the integral curve sigma is:

(D (compose F sigma)) = (* (compose (D F) sigma) (D sigma))
= (compose (* (D F) R) sigma)

Let's call this operation Lie-D (the Lie derivative for coordinates).

Takes a system derivative `R` and returns a operator that takes a function `F`
of coordinatized state and performs the operation described below, from
ODE.scm in scmutils:

Let `(sigma t)` be the state of a system at time `t`. Let the
(first-order) system of differential equations governing the evolution of
this state be:

```clojure
((D sigma) t) = (R (sigma t))
```

```clojure
(D sigma) = (compose R sigma)
```

i.e. `R` is a system derivative.

Let `F` be any function of state, then a differential equation for the
evolution of `F`, as it is dragged along the integral curve sigma is:

```clojure
(D (compose F sigma)) = (* (compose (D F) sigma) (D sigma))
= (compose (* (D F) R) sigma)
```

Let's call this operation `Lie-D` (the Lie derivative for coordinates).
source (clj)source (cljs)raw docstring

Lie-derivativeclj/s≠multimethod

clj
(Lie-derivative a)
cljs
(Lie-derivative ??)
?? invalid arglists:
(quote ([a]))

generic Lie-derivative

generic Lie-derivative
source (clj)source (cljs)raw docstring

Lie-transformclj/s≠

clj
(Lie-transform H t)
cljs
(Lie-transform ??)
?? invalid arglists:
(quote ([H t]))

p. 428, the Lie transform is just the time-advance operator using the Lie derivative (see Hamiltonian.scm).

p. 428, the Lie transform is just the time-advance operator using the Lie
derivative (see Hamiltonian.scm).
source (clj)source (cljs)raw docstring

linear-interpolantsclj/s≠

clj
(linear-interpolants x0 x1 n)
cljs
(linear-interpolants ??)
?? invalid arglists:
(quote ([x0 x1 n]))
source (clj)source (cljs)

literal-Cartanclj/s≠

clj
(literal-Cartan name coordsys)
cljs
(literal-Cartan ??)
?? invalid arglists:
(quote ([name coordsys]))
source (clj)source (cljs)

literal-Christoffel-1clj/s≠

clj
(literal-Christoffel-1 name coordsys)
cljs
(literal-Christoffel-1 ??)
?? invalid arglists:
(quote ([name coordsys]))
source (clj)source (cljs)

literal-Christoffel-2clj/s≠

clj
(literal-Christoffel-2 name coordsys)
cljs
(literal-Christoffel-2 ??)
?? invalid arglists:
(quote ([name coordsys]))
source (clj)source (cljs)

literal-downclj/s≠

clj
(literal-down sym size)
cljs
(literal-down ??)
?? invalid arglists:
(quote ([sym size]))

Generates a down structure of dimension size populated by symbolic entries, each prefixed by the supplied symbol sym.

For example:

(= (literal-down 'x 3)
   (down 'x_0 'x_1 'x_2))
Generates a `down` structure of dimension `size` populated by symbolic entries,
each prefixed by the supplied symbol `sym`.

For example:

```clojure
(= (literal-down 'x 3)
   (down 'x_0 'x_1 'x_2))
```
source (clj)source (cljs)raw docstring

literal-functionclj/s

(literal-function f)
(literal-function f sicm-signature)
(literal-function f domain range)
source

literal-Lagrangian-stateclj/s≠

clj
(literal-Lagrangian-state n-dof)
cljs
(literal-Lagrangian-state ??)
?? invalid arglists:
(quote ([n-dof]))
source (clj)source (cljs)

literal-manifold-functionclj/s≠

clj
(literal-manifold-function sym coordinate-system)
cljs
(literal-manifold-function ??)
?? invalid arglists:
(quote ([sym coordinate-system]))

Given a symbolic name sym and an [[ICoordinateSystem]], returns a literal function that maps coordinate-free manifold points to a scalar output.

Also aliased as literal-manifold-function.

Given a symbolic name `sym` and an [[ICoordinateSystem]], returns a literal
function that maps coordinate-free manifold points to a scalar output.

Also aliased as [[literal-manifold-function]].
source (clj)source (cljs)raw docstring

literal-manifold-mapclj/s≠

clj
(literal-manifold-map name source target)
cljs
(literal-manifold-map ??)
?? invalid arglists:
(quote ([name source target]))
source (clj)source (cljs)

literal-matrixclj/s

(literal-matrix sym nrows)
(literal-matrix sym nrows ncols)

Generates a nrows x ncols matrix of symbolic entries, each prefixed by the supplied symbol sym.

If ncols (the third argument) is not supplied, returns a square matrix of size nrows x nrows.

NOTE: The symbols in the returned matrix record their Einstein-notation path into the structure that this matrix represents; a down of up columns. This means that the returned indices embedded in the symbols look flipped, ji vs ij.

For example:

(= (literal-matrix 'x 2 2)
   (by-rows ['x_0↑0 'x_1↑0]
            ['x_0↑1 'x_1↑1]))
Generates a `nrows` x `ncols` matrix of symbolic entries, each prefixed by the
supplied symbol `sym`.

If `ncols` (the third argument) is not supplied, returns a square matrix of
size `nrows` x `nrows`.

NOTE: The symbols in the returned matrix record their Einstein-notation path
into the structure that this matrix represents; a `down` of `up` columns. This
means that the returned indices embedded in the symbols look flipped, `ji` vs
`ij`.

For example:

```clojure
(= (literal-matrix 'x 2 2)
   (by-rows ['x_0↑0 'x_1↑0]
            ['x_0↑1 'x_1↑1]))
```
source (clj)source (cljs)raw docstring

literal-metricclj/s≠

clj
(literal-metric name coordinate-system)
cljs
(literal-metric ??)
?? invalid arglists:
(quote ([name coordinate-system]))

Flat coordinate systems here only.

Flat coordinate systems here only.
source (clj)source (cljs)raw docstring

literal-numberclj/s≠

clj
(literal-number x)
cljs
(literal-number ??)
?? invalid arglists:
(quote ([x]))

Returns its argument, wrapped in a marker type that responds to the generic operations registered in emmy.numsymb.

Symbols are automatically treated as literal-number instances, so

(* 10 (literal-number 'x))

is equivalent to

(* 10 'x)

If you pass an actual number, emmy will attempt to preserve exact values through various operations:

(g/+ 1 (g/cos (g/* 2 (literal-number 4))))
;;=> (+ 1 (cos 8))

Notice that the (g/* 2 ...) is evaluated, but cos evaluation is deferred, since the result is inexact. On the other hand, if the number is inexact to begin with:

(g/+ 1 (g/cos (g/* 2 (literal-number 2.2))))
;;=> 0.6926671300215806

the system will go ahead and evaluate it.

Returns its argument, wrapped in a marker type that responds to the generic
operations registered in [[emmy.numsymb]].

Symbols are automatically treated as [[literal-number]] instances, so

```clojure
(* 10 (literal-number 'x))
```

is equivalent to

```clojure
(* 10 'x)
```

If you pass an actual number, emmy will attempt to preserve exact values
through various operations:

```clojure
(g/+ 1 (g/cos (g/* 2 (literal-number 4))))
;;=> (+ 1 (cos 8))
```

Notice that the `(g/* 2 ...)` is evaluated, but `cos` evaluation is deferred,
since the result is inexact. On the other hand, if the number is inexact to
begin with:

```clojure
(g/+ 1 (g/cos (g/* 2 (literal-number 2.2))))
;;=> 0.6926671300215806
```

the system will go ahead and evaluate it.
source (clj)source (cljs)raw docstring

literal-oneform-fieldclj/s≠

clj
(literal-oneform-field name coordinate-system)
cljs
(literal-oneform-field ??)
?? invalid arglists:
(quote ([name coordinate-system]))

Given a symbolic name sym and a coordinate-system, returns a one-form field consisting of literal real-valued functions from the coordinate system's dimension for each coordinate component.

These functions are passed to components->oneform-field, along with the supplied coordinate-system and symbolic name sym.

For coordinate systems of dimension 1, literal-form-field's component functions will accept a single non-structural argument.

Given a symbolic name `sym` and a `coordinate-system`, returns a one-form field
consisting of literal real-valued functions from the coordinate system's
dimension for each coordinate component.

These functions are passed to [[components->oneform-field]], along with the
supplied `coordinate-system` and symbolic name `sym`.

For coordinate systems of dimension 1, `literal-form-field`'s component
functions will accept a single non-structural argument.
source (clj)source (cljs)raw docstring

literal-upclj/s≠

clj
(literal-up sym size)
cljs
(literal-up ??)
?? invalid arglists:
(quote ([sym size]))

Generates an up structure of dimension size populated by symbolic entries, each prefixed by the supplied symbol sym.

For example:

(= (literal-up 'x 3)
   (up 'x↑0 'x↑1 'x↑2))
Generates an `up` structure of dimension `size` populated by symbolic entries,
each prefixed by the supplied symbol `sym`.

For example:

```clojure
(= (literal-up 'x 3)
   (up 'x↑0 'x↑1 'x↑2))
```
source (clj)source (cljs)raw docstring

literal-vector-fieldclj/s≠

clj
(literal-vector-field sym coordinate-system)
cljs
(literal-vector-field ??)
?? invalid arglists:
(quote ([sym coordinate-system]))

Given a symbolic name sym and a coordinate-system, returns a vector field consisting of literal real-valued functions from the coordinate system's dimension for each coordinate component.

These functions are passed to components->vector-field, along with the supplied coordinate-system and symbolic name sym.

For coordinate systems of dimension 1, literal-vector-field's component functions will accept a single non-structural argument.

Given a symbolic name `sym` and a `coordinate-system`, returns a vector field
consisting of literal real-valued functions from the coordinate system's
dimension for each coordinate component.

These functions are passed to [[components->vector-field]], along with the
supplied `coordinate-system` and symbolic name `sym`.

For coordinate systems of dimension 1, `literal-vector-field`'s component
functions will accept a single non-structural argument.
source (clj)source (cljs)raw docstring

logclj/s≠multimethod

clj
(log a)
cljs
(log ??)
?? invalid arglists:
(quote ([a]))

generic log.

Returns the natural logarithm of x.

generic log.

Returns the natural logarithm of `x`.
source (clj)source (cljs)raw docstring

log10clj/s≠multimethod

clj
(log10 a)
cljs
(log10 ??)
?? invalid arglists:
(quote ([a]))

generic log10.

Returns the base-10 logarithm of x, i.e., $log_10(x)$.

generic log10.

Returns the base-10 logarithm of `x`, i.e., $log_10(x)$.
source (clj)source (cljs)raw docstring

log2clj/s≠multimethod

clj
(log2 a)
cljs
(log2 ??)
?? invalid arglists:
(quote ([a]))

generic log2.

Returns the base-2 logarithm of x, i.e., $log_2(x)$.

generic log2.

Returns the base-2 logarithm of `x`, i.e., $log_2(x)$.
source (clj)source (cljs)raw docstring

lowerclj/s≠

clj
(lower metric)
cljs
(lower ??)
?? invalid arglists:
(quote ([metric]))

To make a vector field into a one-form field, i.e., a (1,0) tensor into a (0,1) tensor.

To make a vector field into a one-form field, i.e., a (1,0) tensor into a (0,1)
tensor.
source (clj)source (cljs)raw docstring

m->sclj/s≠

clj
(m->s ls m rs)
cljs
(m->s ??)
?? invalid arglists:
(quote ([ls m rs]))

Convert the matrix m into a structure S, guided by the requirement that (* ls S rs) should be a scalar.

Convert the matrix `m` into a structure `S`, guided by the requirement that `(*
ls S rs)` should be a scalar.
source (clj)source (cljs)raw docstring

m:generateclj/s

(m:generate n f)
(m:generate r c f)

Returns a matrix with r rows and c columns, whose entries are generated by the supplied function f.

If you only supply one dimension n the returned matrix will be square.

The entry in the ith row and j-th column is (f i j).

Returns a matrix with `r` rows and `c` columns, whose entries are generated by
the supplied function `f`.

If you only supply one dimension `n` the returned matrix will be square.

The entry in the `i`th row and `j`-th column is `(f i j)`.
source (clj)source (cljs)raw docstring

magnitudeclj/s≠multimethod

clj
(magnitude a)
cljs
(magnitude ??)
?? invalid arglists:
(quote ([a]))

generic magnitude

generic magnitude
source (clj)source (cljs)raw docstring

make-basisclj/s≠

clj
(make-basis vector-basis dual-basis)
cljs
(make-basis ??)
?? invalid arglists:
(quote ([vector-basis dual-basis]))

Make a basis object out of a vector and dual basis.

The dimensions of vector-basis and dual-basis must agree.

Make a basis object out of a vector and dual basis.

The dimensions of `vector-basis` and `dual-basis` must agree.
source (clj)source (cljs)raw docstring

make-Cartanclj/s≠

clj
(make-Cartan forms basis)
cljs
(make-Cartan ??)
?? invalid arglists:
(quote ([forms basis]))
source (clj)source (cljs)

make-Christoffelclj/s≠

clj
(make-Christoffel symbols basis)
cljs
(make-Christoffel ??)
?? invalid arglists:
(quote ([symbols basis]))

Returns a data structure representing Christoffel symbols of the second kind.

Returns a data structure representing [Christoffel symbols of the second
kind](https://en.wikipedia.org/wiki/Christoffel_symbols#Christoffel_symbols_of_the_second_kind_(symmetric_definition)).
source (clj)source (cljs)raw docstring

make-Christoffel-1clj/s≠

clj
(make-Christoffel-1 symbols basis)
cljs
(make-Christoffel-1 ??)
?? invalid arglists:
(quote ([symbols basis]))

Returns a data structure representing Christoffel symbols of the first kind.

Returns a data structure representing [Christoffel symbols of the first
kind](https://en.wikipedia.org/wiki/Christoffel_symbols#Christoffel_symbols_of_the_first_kind).
source (clj)source (cljs)raw docstring

make-constant-vector-fieldclj/s≠

clj
(make-constant-vector-field basis m0)
cljs
(make-constant-vector-field ??)
?? invalid arglists:
(quote ([basis m0]))
source (clj)source (cljs)

make-eventclj/s≠

clj
(make-event e)
cljs
(make-event ??)
?? invalid arglists:
(quote ([e]))

Marks the input event e as an event via its metadata. The return value will return true when passed to event?.

Marks the input event `e` as an event via its metadata. The return value will
return `true` when passed to [[event?]].
source (clj)source (cljs)raw docstring

make-four-tupleclj/s≠

clj
(make-four-tuple ct [x y z])
cljs
(make-four-tuple ??)
?? invalid arglists:
(quote ([ct [x y z]]))
source (clj)source (cljs)

make-manifoldclj/s

(make-manifold family n)
(make-manifold family n embedding-dimension)

Returns a concrete manifold generated by specializing the supplied manifold family into a concrete manifold of dimension n. n must be a positive integer.

Optionally takes an embedding-dimension; this must be >= the value of n. Use this in cases like an n-sphere embedded in a euclidean space of dimension n+1.

A manifold is a topological space that locally resembles Euclidean space near each point.

Returns a concrete manifold generated by specializing the supplied manifold
`family` into a concrete manifold of dimension `n`. `n` must be a positive
integer.

Optionally takes an `embedding-dimension`; this must be >= the value of `n`.
Use this in cases like an n-sphere embedded in a euclidean space of dimension
n+1.

A [manifold](https://en.wikipedia.org/wiki/Manifold) is a topological space
that locally resembles Euclidean space near each point.
source (clj)source (cljs)raw docstring

make-polarclj/s≠multimethod

clj
(make-polar a b)
cljs
(make-polar ??)
?? invalid arglists:
(quote ([a b]))

generic make-polar

generic make-polar
source (clj)source (cljs)raw docstring

make-rectangularclj/s≠multimethod

clj
(make-rectangular a b)
cljs
(make-rectangular ??)
?? invalid arglists:
(quote ([a b]))

generic make-rectangular

generic make-rectangular
source (clj)source (cljs)raw docstring

make-SR-coordinatesclj/s≠

clj
(make-SR-coordinates frame four-tuple)
cljs
(make-SR-coordinates ??)
?? invalid arglists:
(quote ([frame four-tuple]))
source (clj)source (cljs)

make-SR-frameclj/s≠

clj
(make-SR-frame name ancestor-frame boost-direction v-over-c origin)
cljs
(make-SR-frame ??)
?? invalid arglists:
(quote ([name ancestor-frame boost-direction v-over-c origin]))
source (clj)source (cljs)

manifold-family?clj/s≠

clj
(manifold-family? m)
cljs
(manifold-family? ??)
?? invalid arglists:
(quote ([m]))

Returns true if m is a dictionary representing a manifold family, false otherwise.

Returns `true` if `m` is a dictionary representing a manifold family, false
otherwise.
source (clj)source (cljs)raw docstring

manifold-point?clj/s≠

clj
(manifold-point? p)
cljs
(manifold-point? ??)
?? invalid arglists:
(quote ([p]))

Returns true if p is a manifold point, false otherwise.

Returns true if `p` is a manifold point, false otherwise.
source (clj)source (cljs)raw docstring

manifold-typeclj/s≠

clj
(manifold-type manifold)
cljs
(manifold-type ??)
?? invalid arglists:
(quote ([manifold]))

The supplied manifold m locally resembles some vector space; this function returns the field over which that vector space was specified.

The supplied manifold `m` locally resembles some vector space; this function
returns the field over which that vector space was specified.
source (clj)source (cljs)raw docstring

manifold?clj/s≠

clj
(manifold? m)
cljs
(manifold? ??)
?? invalid arglists:
(quote ([m]))

Returns true if m is a dictionary representing a manifold, false otherwise.

Returns `true` if `m` is a dictionary representing a manifold, false
otherwise.
source (clj)source (cljs)raw docstring

maprclj/s

(mapr f & structures)

Return a structure with the same shape as s but with f applied to each primitive (that is, not structural) component.

Return a structure with the same shape as s but with f applied to each
primitive (that is, not structural) component.
source (clj)source (cljs)raw docstring

matrix-by-colsclj/s

(matrix-by-cols & cols)

Returns a matrix whose columns consist of the supplied sequence of cols. These all must be the same length.

Variadic equivalent to [[by-cols*]].

Returns a matrix whose columns consist of the supplied sequence of `cols`.
These all must be the same length.

Variadic equivalent to [[by-cols*]].
source (clj)source (cljs)raw docstring

matrix-by-rowsclj/s

(matrix-by-rows & rows)

Returns a matrix whose rows consist of the supplied sequence of rows. These all must be the same length.

Variadic equivalent to [[by-rows*]].

Returns a matrix whose rows consist of the supplied sequence of `rows`. These
all must be the same length.

Variadic equivalent to [[by-rows*]].
source (clj)source (cljs)raw docstring

metric->Christoffel-1clj/s≠

clj
(metric->Christoffel-1 metric basis)
cljs
(metric->Christoffel-1 ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

metric->Christoffel-2clj/s≠

clj
(metric->Christoffel-2 metric basis)
cljs
(metric->Christoffel-2 ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

metric->componentsclj/s≠

clj
(metric->components metric basis)
cljs
(metric->components ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

metric->connection-1clj/s≠

clj
(metric->connection-1 metric basis)
cljs
(metric->connection-1 ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

metric->connection-2clj/s≠

clj
(metric->connection-2 metric basis)
cljs
(metric->connection-2 ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

metric->inverse-componentsclj/s≠

clj
(metric->inverse-components metric basis)
cljs
(metric->inverse-components ??)
?? invalid arglists:
(quote ([metric basis]))

Given a metric and a basis, computes the inverse metric.

Given a metric and a basis, computes the inverse metric.
source (clj)source (cljs)raw docstring

metric-over-mapclj/s≠

clj
(metric-over-map mu:N->M g-on-M)
cljs
(metric-over-map ??)
?? invalid arglists:
(quote ([mu:N->M g-on-M]))
source (clj)source (cljs)

metric:invertclj/s≠

clj
(metric:invert metric basis)
cljs
(metric:invert ??)
?? invalid arglists:
(quote ([metric basis]))
source (clj)source (cljs)

minimizeclj/s

(minimize f a b)
(minimize f a b observe)

Find the minimum of the function f: R -> R in the interval [a, b].

If an observe function is supplied, it will be invoked with the iteration count and the values of x and f(x) at each search step.

Find the minimum of the function `f: R -> R` in the interval `[a, b]`.

If an `observe` function is supplied, it will be invoked with the iteration
count and the values of x and f(x) at each search step.
source (clj)source (cljs)raw docstring

moduloclj/s≠multimethod

clj
(modulo a b)
cljs
(modulo ??)
?? invalid arglists:
(quote ([a b]))

generic modulo.

Returns the result of the mathematical Modulo operation between a and b (using the Knuth definition listed).

The contract satisfied by modulo is:

(= a (+ (* b (floor (/ a b)))
        (modulo a b)))

For numbers, this differs from the contract offered by remainder because (floor (/ a b)) rounds toward negative infinity, while the quotient operation in the contract for remainder rounds toward 0.

The result will be either 0 or of the same sign as the divisor b.

generic modulo.

Returns the result of the
  mathematical [Modulo](https://en.wikipedia.org/wiki/Modulo_operation)
  operation between `a` and `b` (using the Knuth definition listed).

 The contract satisfied by [[modulo]] is:

```clojure
(= a (+ (* b (floor (/ a b)))
        (modulo a b)))
```

 For numbers, this differs from the contract offered by [[remainder]]
 because `(floor (/ a b))` rounds toward negative infinity, while
 the [[quotient]] operation in the contract for [[remainder]] rounds toward 0.

 The result will be either `0` or of the same sign as the divisor `b`.
source (clj)source (cljs)raw docstring

momentumclj/s≠

clj
(momentum H-state)
cljs
(momentum ??)
?? invalid arglists:
(quote ([H-state]))

Returns the momentum element of a local Hamiltonian state tuple (by convention, the third element).

Returns the momentum element of a local Hamiltonian state tuple (by convention,
the third element).
source (clj)source (cljs)raw docstring

momentum-tupleclj/s

source (clj)source (cljs)

multidimensional-minimizeclj/s

(multidimensional-minimize func x0 & {:keys [info?] :as opts})

Entrypoint for multidimensional minimization routines.

See emmy.numerical.multimin.nelder-mead/nelder-mead for the only supported option.

Entrypoint for multidimensional minimization routines.

See [[emmy.numerical.multimin.nelder-mead/nelder-mead]] for the only
supported option.
source (clj)source (cljs)raw docstring

negateclj/s≠multimethod

clj
(negate a)
cljs
(negate ??)
?? invalid arglists:
(quote ([a]))

generic negate.

Returns the negation of a.

Equivalent to (- (g/zero-like a) a).

generic negate.

Returns the negation of `a`.

  Equivalent to `(- (g/zero-like a) a)`.
source (clj)source (cljs)raw docstring

negative?clj/s≠multimethod

clj
(negative? a)
cljs
(negative? ??)
?? invalid arglists:
(quote ([a]))

generic negative?.

Returns true if the argument a is less than (g/zero-like a), false otherwise. The default implementation depends on a proper Comparable implementation on the type.`

generic negative?.

Returns true if the argument `a` is less than `(g/zero-like a)`,
  false otherwise. The default implementation depends on a proper Comparable
  implementation on the type.`
source (clj)source (cljs)raw docstring

nelder-meadclj/s≠

clj
(nelder-mead func x0 {:keys [callback] :as opts})
cljs
(nelder-mead ??)
?? invalid arglists:
(quote ([func x0 {:keys [callback], :as opts}]))

Find the minimum of the function f: R^n -> R, given an initial point q ∈ R^n. Supports the following optional keyword arguments:

:callback if supplied, the supplied fn will be invoked with iteration count, the values of X and the value of f(X) at each intermediate point of evaluation.

:info? if true, wraps the result with evaluation information.

:adaptive? if true, the Nelder-Mead parameters for contraction, expansion, reflection and shrinking will be set adaptively, as functions of the number of dimensions. If false they stay constant.

:alpha sets the reflection coefficient used for each step of Nelder-Mead.

:beta sets the expansion coefficient used for each step of Nelder-Mead.

:gamma sets the contraction coefficient used for each step of Nelder-Mead.

:sigma sets the shrink coefficient used for each step of Nelder-Mead.

:maxiter Maximum number of iterations allowed for the minimizer. Defaults to 200*dimension.

:maxfun Maximum number of times the function can be evaluated before exiting. Defaults to 200*dimension.

:simplex-tolerance When the absolute value of the max difference between the best point and any point in the simplex falls below this tolerance, the minimizer stops. Defaults to 1e-4.

:fn-tolerance When the absolute value of the max difference between the best point's function value and the fn value of any point in the simplex falls below this tolerance, the minimizer stops. Defaults to 1e-4.

:zero-delta controls the value to which 0 entries in the initial vector are set during initial simplex generation. Defaults to 0.00025.

:nonzero-delta factor by which entries in the initial vector are perturbed to generate the initial simplex. Defaults to 0.05.

See Gao, F. and Han, L. Implementing the Nelder-Mead simplex algorithm with adaptive parameters. 2012. Computational Optimization and Applications. 51:1, pp. 259-277 I gratefully acknowledge the Python implementation in SciPy which I have imitated here.

Find the minimum of the function f: R^n -> R, given an initial point q ∈ R^n.
Supports the following optional keyword arguments:

`:callback` if supplied, the supplied fn will be invoked with iteration count,
the values of X and the value of f(X) at each intermediate point of
evaluation.

`:info?` if true, wraps the result with evaluation information.

`:adaptive?` if true, the Nelder-Mead parameters for contraction, expansion,
reflection and shrinking will be set adaptively, as functions of the number of
dimensions. If false they stay constant.

`:alpha` sets the reflection coefficient used for each step of Nelder-Mead.

`:beta` sets the expansion coefficient used for each step of Nelder-Mead.

`:gamma` sets the contraction coefficient used for each step of Nelder-Mead.

`:sigma` sets the shrink coefficient used for each step of Nelder-Mead.

`:maxiter` Maximum number of iterations allowed for the minimizer. Defaults to
200*dimension.

`:maxfun` Maximum number of times the function can be evaluated before exiting.
Defaults to 200*dimension.

`:simplex-tolerance` When the absolute value of the max difference between the
best point and any point in the simplex falls below this tolerance, the
minimizer stops. Defaults to 1e-4.

`:fn-tolerance` When the absolute value of the max difference between the best
point's function value and the fn value of any point in the simplex falls
below this tolerance, the minimizer stops. Defaults to 1e-4.

`:zero-delta` controls the value to which 0 entries in the initial vector are
set during initial simplex generation. Defaults to 0.00025.

`:nonzero-delta` factor by which entries in the initial vector are perturbed to
generate the initial simplex. Defaults to 0.05.

See Gao, F. and Han, L.
    Implementing the Nelder-Mead simplex algorithm with adaptive
    parameters. 2012. Computational Optimization and Applications.
    51:1, pp. 259-277
I gratefully acknowledge the [Python implementation in
SciPy](https://github.com/scipy/scipy/blob/589c9afe41774ee96ec121f1867361146add8276/scipy/optimize/optimize.py#L556:5)
which I have imitated here.
source (clj)source (cljs)raw docstring

nform-field?clj/s≠

clj
(nform-field? f n)
cljs
(nform-field? ??)
?? invalid arglists:
(quote ([f n]))

Returns true if the supplied f is an form field of rank n, false otherwise.

A form-field of rank n is an operator that takes n vector fields to a real-valued function on the manifold.

Returns true if the supplied `f` is an [form field of rank
n](https://en.wikipedia.org/wiki/Differential_form), false otherwise.

A form-field of rank n is an operator that takes n vector fields to a
real-valued function on the manifold.
source (clj)source (cljs)raw docstring

numeratorclj/s≠

clj
(numerator _)
cljs
(numerator ??)
?? invalid arglists:
(quote ([_]))
source

numerical?clj/s≠

clj
(numerical? x)
cljs
(numerical? ??)
?? invalid arglists:
(quote ([x]))

Returns true if x is a purely numerical value and should be considered for numerical simplifications, such as $x * 1 == x$ or $x * 0 == 0$.

numerical? should return false if x has additional, non-numerical structure that should be preserved.

Returns true if `x` is a purely numerical value and should be considered for
 numerical simplifications, such as $x * 1 == x$ or $x * 0 ==
 0$.

[[numerical?]] should return `false` if `x` has additional, non-numerical
 structure that should be preserved.
sourceraw docstring

one-likeclj/s≠multimethod

clj
(one-like a)
cljs
(one-like ??)
?? invalid arglists:
(quote ([a]))

generic one-like.

In general, this procedure returns the multiplicative identity of the type of its argument, if it exists. For numbers this is 1.

generic one-like.

In general, this procedure returns the multiplicative identity of the type of
  its argument, if it exists. For numbers this is 1.
source (clj)source (cljs)raw docstring

one-manifold-functionclj/s≠

clj
(one-manifold-function point)
cljs
(one-manifold-function ??)
?? invalid arglists:
(quote ([point]))

Manifold function that maps every input manifold point to the scalar value 1.

Manifold function that maps every input manifold `point` to the scalar value 1.
source (clj)source (cljs)raw docstring

one?clj/s≠multimethod

clj
(one? a)
cljs
(one? ??)
?? invalid arglists:
(quote ([a]))

generic one?.

Is true if x is a multiplicative identity.

generic one?.

Is true if `x` is a multiplicative identity.
source (clj)source (cljs)raw docstring

oneform-field->basis-componentsclj/s≠

clj
(oneform-field->basis-components w vector-basis)
cljs
(oneform-field->basis-components ??)
?? invalid arglists:
(quote ([w vector-basis]))

Given a structure w of and a vector field basis vector-basis, returns a new structure generated by applying the full vector basis to each element of w.

Here's an example of how to use this function to round trip a structure of basis components:

(let [vb    (vf/coordinate-system->vector-basis coordsys)
      basis (coordinate-system->oneform-basis coordsys)
      components (down d:dx d:dy)]
  (= components
     (-> components
         (basis-components->oneform-field basis)
         (oneform-field->basis-components vb))))
Given a structure `w` of and a vector field basis `vector-basis`, returns a new
structure generated by applying the full vector basis to each element of `w`.

Here's an example of how to use this function to round trip a structure of
basis components:

```clojure
(let [vb    (vf/coordinate-system->vector-basis coordsys)
      basis (coordinate-system->oneform-basis coordsys)
      components (down d:dx d:dy)]
  (= components
     (-> components
         (basis-components->oneform-field basis)
         (oneform-field->basis-components vb))))
```
source (clj)source (cljs)raw docstring

oneform-field->componentsclj/s≠

clj
(oneform-field->components form coordinate-system)
cljs
(oneform-field->components ??)
?? invalid arglists:
(quote ([form coordinate-system]))

Given a one-form field form and a coordinate-system, returns a function from the coordinate representation of a manifold point to a coordinate representation of the coordinatized components of the form field at that point.

For example:

(let-coordinates [[x y] R2-rect]
  (let [f (literal-oneform-field 'f R2-rect)]
    ((oneform-field->components f R2-rect)
     (up 'x0 'y0))))

;;=> (down (f_0 (up x0 y0))
;;         (f_1 (up x0 y0)))
Given a one-form field `form` and a `coordinate-system`, returns a function
from the coordinate representation of a manifold point to a coordinate
representation of the coordinatized components of the form field at that
point.

For example:

```clojure
(let-coordinates [[x y] R2-rect]
  (let [f (literal-oneform-field 'f R2-rect)]
    ((oneform-field->components f R2-rect)
     (up 'x0 'y0))))

;;=> (down (f_0 (up x0 y0))
;;         (f_1 (up x0 y0)))
```
source (clj)source (cljs)raw docstring

oneform-field->vector-fieldclj/s

Alias for raise.

Alias for [[raise]].
source (clj)source (cljs)raw docstring

oneform-field?clj/s≠

clj
(oneform-field? f)
cljs
(oneform-field? ??)
?? invalid arglists:
(quote ([f]))

Returns true if the supplied f is a One-form, false otherwise.

A One-form takes a single vector field to a real-valued function on the manifold.

Returns true if the supplied `f` is
a [One-form](https://en.wikipedia.org/wiki/One-form), false
otherwise.

A [One-form](https://en.wikipedia.org/wiki/One-form) takes a single vector
field to a real-valued function on the manifold.
source (clj)source (cljs)raw docstring

orientationclj/s≠

clj
(orientation s)
cljs
(orientation ??)
?? invalid arglists:
(quote ([s]))

Returns the orientation of s, either ::up or ::down. Defaults to ::up, even for non-structures.

Returns the orientation of `s`, either `::up` or `::down`. Defaults to `::up`,
even for non-structures.
source (clj)source (cljs)raw docstring

orthonormalizeclj/s≠

clj
(orthonormalize basis metric coordinate-system)
cljs
(orthonormalize ??)
?? invalid arglists:
(quote ([basis metric coordinate-system]))
source (clj)source (cljs)

osculating-pathclj/s≠

clj
(osculating-path state0)
cljs
(osculating-path ??)
?? invalid arglists:
(quote ([state0]))

Given a state tuple (of finite length), reconstitutes the initial segment of the Taylor series corresponding to the state tuple data as a function of t.

Time is measured beginning at the point of time specified in the input state tuple.

Given a state tuple (of finite length), reconstitutes the initial segment of
the Taylor series corresponding to the state tuple data as a function of t.

Time is measured beginning at the point of time specified in the input state
tuple.
source (clj)source (cljs)raw docstring

outer-productclj/s≠multimethod

clj
(outer-product a b)
cljs
(outer-product ??)
?? invalid arglists:
(quote ([a b]))

generic outer-product

generic outer-product
source (clj)source (cljs)raw docstring

p->rclj/s≠

clj
(p->r tqv)
cljs
(p->r ??)
?? invalid arglists:
(quote ([tqv]))

SICM p. 47. Polar to rectangular coordinates of state.

SICM p. 47. Polar to rectangular coordinates of state.
source (clj)source (cljs)raw docstring

parallel-transport-equationclj/s≠

clj
(parallel-transport-equation source-coordsys target-coordsys Cartan-on-target)
cljs
(parallel-transport-equation ??)
?? invalid arglists:
(quote ([source-coordsys target-coordsys Cartan-on-target]))
source (clj)source (cljs)

partialclj/s

(partial & selectors)

A shim. Dispatches to [[d/partial]] when all the arguments are integers; falls back to [[clojure.core/partial]] (partial function application) otherwise.

A shim. Dispatches to [[d/partial]] when all the arguments are integers; falls
back to [[clojure.core/partial]] (partial function application) otherwise.
sourceraw docstring

partial-derivativeclj/s≠multimethod

clj
(partial-derivative a b)
cljs
(partial-derivative ??)
?? invalid arglists:
(quote ([a b]))

generic partial-derivative

generic partial-derivative
source (clj)source (cljs)raw docstring

partial-forwardclj/s

(partial-forward & selectors)

Returns an operator that, when applied to a function f, produces a function that uses forward-mode automatic differentiation to compute the partial derivative of f at the (zero-based) slot index provided via selectors.

Returns an operator that, when applied to a function `f`, produces a function
that uses forward-mode automatic differentiation to compute the partial
derivative of `f` at the (zero-based) slot index provided via `selectors`.
source (clj)source (cljs)raw docstring

partial-reverseclj/s

(partial-reverse & selectors)

Returns an operator that, when applied to a function f, produces a function that uses reverse-mode automatic differentiation to compute the partial derivative of f at the (zero-based) slot index provided via selectors.

Returns an operator that, when applied to a function `f`, produces a function
that uses reverse-mode automatic differentiation to compute the partial
derivative of `f` at the (zero-based) slot index provided via `selectors`.
source (clj)source (cljs)raw docstring

partial-sumsclj/s≠

clj
(partial-sums s)
cljs
(partial-sums ??)
?? invalid arglists:
(quote ([s]))

Returns a series (of the same type as the input) of partial sums of the terms in the supplied series s.

Returns a series (of the same type as the input) of partial sums of the terms
in the supplied series `s`.
source (clj)source (cljs)raw docstring

patch-namesclj/s≠

clj
(patch-names manifold)
cljs
(patch-names ??)
?? invalid arglists:
(quote ([manifold]))

Returns a set of patch names registered in the supplied manifold.

Returns a set of patch names registered in the supplied manifold.
source (clj)source (cljs)raw docstring

phase-space-derivativeclj/s

Alias for Hamiltonian->state-derivative, for compatibility with 1st edition of SICM.

Alias for [[Hamiltonian->state-derivative]], for compatibility with
1st edition of SICM.
source (clj)source (cljs)raw docstring

phiclj/s

The mathematical constant 𝜑, also known as the Golden Ratio.

The mathematical constant [𝜑](https://en.wikipedia.org/wiki/Golden_ratio), also
known as the Golden Ratio.
sourceraw docstring

piclj/s

The mathematical constant Pi.

The mathematical constant [Pi](https://en.wikipedia.org/wiki/Pi).
sourceraw docstring

pointclj/s≠

clj
(point coordinate-system)
cljs
(point ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given an [[ICoordinateSystem]], returns a function from coordinates in coordinate-system's repesentation to the matching point on the manifold associated with coordinate-system.

Given an [[ICoordinateSystem]], returns a function from coordinates in
`coordinate-system`'s repesentation to the matching point on the manifold
associated with `coordinate-system`.
source (clj)source (cljs)raw docstring

Poisson-bracketclj/s≠

clj
(Poisson-bracket f g)
cljs
(Poisson-bracket ??)
?? invalid arglists:
(quote ([f g]))
source (clj)source (cljs)

polar-canonicalclj/s≠

clj
(polar-canonical alpha)
cljs
(polar-canonical ??)
?? invalid arglists:
(quote ([alpha]))

p.327

p.327
source (clj)source (cljs)raw docstring

power-seriesclj/s

(power-series & prefix)

Return a [[PowerSeries]] starting with the supplied values. The remainder of the series will be filled with the zero-value corresponding to the first of the given values.

If you have a sequence already, prefer [[power-series*]].

Return a [[PowerSeries]] starting with the supplied values. The remainder of
the series will be filled with the zero-value corresponding to the first of
the given values.

If you have a sequence already, prefer [[power-series*]].
source (clj)source (cljs)raw docstring

principal-valueclj/s≠

clj
(principal-value cuthigh)
cljs
(principal-value ??)
?? invalid arglists:
(quote ([cuthigh]))
source (clj)source (cljs)

clj
(print-expression expr)
cljs
(print-expression ??)
?? invalid arglists:
(quote ([expr]))
source (clj)source (cljs)

proper-space-intervalclj/s≠

clj
(proper-space-interval four-tuple)
cljs
(proper-space-interval ??)
?? invalid arglists:
(quote ([four-tuple]))
source (clj)source (cljs)

proper-time-intervalclj/s≠

clj
(proper-time-interval four-tuple)
cljs
(proper-time-interval ??)
?? invalid arglists:
(quote ([four-tuple]))
source (clj)source (cljs)

pullbackclj/s

(pullback mu:N->M)
(pullback mu:N->M mu-inverse:M->N)
source (clj)source (cljs)

pullback-formclj/s≠

clj
(pullback-form mu:N->M)
cljs
(pullback-form ??)
?? invalid arglists:
(quote ([mu:N->M]))

Returns a function which will pull a form back across a map (without needing its inverse)

Returns a function which will pull a form back across a map (without needing
its inverse)
source (clj)source (cljs)raw docstring

pullback-functionclj/s≠

clj
(pullback-function mu:N->M)
cljs
(pullback-function ??)
?? invalid arglists:
(quote ([mu:N->M]))
source (clj)source (cljs)

pullback-vector-fieldclj/s≠

clj
(pullback-vector-field mu:N->M mu-inverse:M->N)
cljs
(pullback-vector-field ??)
?? invalid arglists:
(quote ([mu:N->M mu-inverse:M->N]))
source (clj)source (cljs)

pushforward-functionclj/s≠

clj
(pushforward-function mu-inverse:M->N)
cljs
(pushforward-function ??)
?? invalid arglists:
(quote ([mu-inverse:M->N]))
source (clj)source (cljs)

pushforward-vectorclj/s≠

clj
(pushforward-vector mu:N->M mu-inverse:M->N)
cljs
(pushforward-vector ??)
?? invalid arglists:
(quote ([mu:N->M mu-inverse:M->N]))
source (clj)source (cljs)

qp-submatrixclj/s≠

clj
(qp-submatrix m)
cljs
(qp-submatrix ??)
?? invalid arglists:
(quote ([m]))
source (clj)source (cljs)

quotientclj/s≠multimethod

clj
(quotient a b)
cljs
(quotient ??)
?? invalid arglists:
(quote ([a b]))

generic quotient

generic quotient
source (clj)source (cljs)raw docstring

r->pclj/s≠

clj
(r->p tqv)
cljs
(r->p ??)
?? invalid arglists:
(quote ([tqv]))
source (clj)source (cljs)

r->sclj/s≠

clj
(r->s local)
cljs
(r->s ??)
?? invalid arglists:
(quote ([local]))
source (clj)source (cljs)

R3-sphericalclj/s

source (clj)source (cljs)

raiseclj/s≠

clj
(raise metric basis)
cljs
(raise ??)
?? invalid arglists:
(quote ([metric basis]))

To make a one-form field into a vector field, i.e., a (0,1) tensor into a (1,0) tensor.

To make a one-form field into a vector field, i.e., a (0,1) tensor into a (1,0)
tensor.
source (clj)source (cljs)raw docstring

raise1clj/s

Alias for raise.

Alias for [[raise]].
source (clj)source (cljs)raw docstring

raise2clj/s≠

clj
(raise2 metric-tensor basis)
cljs
(raise2 ??)
?? invalid arglists:
(quote ([metric-tensor basis]))

For making a (0,2) tensor into a (2,0) tensor.

For making a (0,2) tensor into a (2,0) tensor.
source (clj)source (cljs)raw docstring

ratio?cljs

source

rationalizecljs

(rationalize x)
(rationalize n d)

Construct a ratio.

Construct a ratio.
sourceraw docstring

real-partclj/s≠multimethod

clj
(real-part a)
cljs
(real-part ??)
?? invalid arglists:
(quote ([a]))

generic real-part

generic real-part
source (clj)source (cljs)raw docstring

refclj/s

(ref a)
(ref a & ks)

A shim so that ref can act like nth in SICM contexts, as clojure core ref elsewhere.

A shim so that ref can act like nth in SICM contexts, as clojure core ref
elsewhere.
sourceraw docstring

remainderclj/s≠multimethod

clj
(remainder a b)
cljs
(remainder ??)
?? invalid arglists:
(quote ([a b]))

generic remainder.

Returns the remainder of dividing the dividend a by divisor b.

The contract satisfied by remainder is:

(= a (+ (* b (quotient a b))
        (remainder a b)))

For numbers, this differs from the contract offered by modulo because quotient rounds toward 0, while (floor (/ a b)) rounds toward negative infinity.

The result will be either 0 or of the same sign as the dividend a.

generic remainder.

Returns the remainder of dividing the dividend `a` by divisor `b`.

 The contract satisfied by [[remainder]] is:

```clojure
(= a (+ (* b (quotient a b))
        (remainder a b)))
```

 For numbers, this differs from the contract offered by [[modulo]]
 because [[quotient]] rounds toward 0, while `(floor (/ a b))` rounds toward
 negative infinity.

 The result will be either `0` or of the same sign as the dividend `a`.
source (clj)source (cljs)raw docstring

Ricciclj/s≠

clj
(Ricci nabla basis)
cljs
(Ricci ??)
?? invalid arglists:
(quote ([nabla basis]))
source (clj)source (cljs)

Riemannclj/s≠

clj
(Riemann nabla)
cljs
(Riemann ??)
?? invalid arglists:
(quote ([nabla]))
source (clj)source (cljs)

Riemann-curvatureclj/s≠

clj
(Riemann-curvature nabla)
cljs
(Riemann-curvature ??)
?? invalid arglists:
(quote ([nabla]))
source (clj)source (cljs)

rotate-x-matrixclj/s≠

clj
(rotate-x-matrix α)
cljs
(rotate-x-matrix ??)
?? invalid arglists:
(quote ([α]))

Produce the matrix of a rotation of α radians about the x axis.

Produce the matrix of a rotation of α radians about the x axis.
source (clj)source (cljs)raw docstring

rotate-x-tupleclj/s≠

clj
(rotate-x-tuple α)
cljs
(rotate-x-tuple ??)
?? invalid arglists:
(quote ([α]))
source (clj)source (cljs)

rotate-y-matrixclj/s≠

clj
(rotate-y-matrix α)
cljs
(rotate-y-matrix ??)
?? invalid arglists:
(quote ([α]))

Produce the matrix of a rotation of α radians about the y axis.

Produce the matrix of a rotation of α radians about the y axis.
source (clj)source (cljs)raw docstring

rotate-y-tupleclj/s≠

clj
(rotate-y-tuple α)
cljs
(rotate-y-tuple ??)
?? invalid arglists:
(quote ([α]))
source (clj)source (cljs)

rotate-z-matrixclj/s≠

clj
(rotate-z-matrix α)
cljs
(rotate-z-matrix ??)
?? invalid arglists:
(quote ([α]))

Produce the matrix of a rotation of α radians about the z axis.

Produce the matrix of a rotation of α radians about the z axis.
source (clj)source (cljs)raw docstring

rotate-z-tupleclj/s≠

clj
(rotate-z-tuple α)
cljs
(rotate-z-tuple ??)
?? invalid arglists:
(quote ([α]))
source (clj)source (cljs)

row-matrixclj/s

(row-matrix & xs)

Returns a row matrix populated by the supplied xs. Variadic equivalent to [[row*]].

Returns a row matrix populated by the supplied `xs`. Variadic equivalent
to [[row*]].
source (clj)source (cljs)raw docstring

row-matrix->downclj/s≠

clj
(row-matrix->down m)
cljs
(row-matrix->down ??)
?? invalid arglists:
(quote ([m]))

Returns the single row from the supplied row matrix as a down. Errors if some other type is supplied.

Returns the single row from the supplied row matrix as a `down`. Errors if some
other type is supplied.
source (clj)source (cljs)raw docstring

row-matrix->vectorclj/s≠

clj
(row-matrix->vector m)
cljs
(row-matrix->vector ??)
?? invalid arglists:
(quote ([m]))

Returns the single row from the supplied row matrix as a vector. Errors if some other type is supplied.

Returns the single row from the supplied row matrix as a vector. Errors if some
other type is supplied.
source (clj)source (cljs)raw docstring

Rxclj/s≠

clj
(Rx α)
cljs
(Rx ??)
?? invalid arglists:
(quote ([α]))

Returns a function which rotates a vector α radians about the x axis.

Returns a function which rotates a vector α radians about the x axis.
source (clj)source (cljs)raw docstring

Ryclj/s≠

clj
(Ry α)
cljs
(Ry ??)
?? invalid arglists:
(quote ([α]))

Returns a function which rotates a vector α radians about the y axis.

Returns a function which rotates a vector α radians about the y axis.
source (clj)source (cljs)raw docstring

Rzclj/s≠

clj
(Rz α)
cljs
(Rz ??)
?? invalid arglists:
(quote ([α]))

Returns a function which rotates a vector α radians about the z axis.

Returns a function which rotates a vector α radians about the z axis.
source (clj)source (cljs)raw docstring

s->mclj/s

(s->m ms rs)
(s->m ls ms rs)

Convert the structure ms, which would be a scalar if the (compatible) multiplication (* ls ms rs) were performed, to a matrix.

Convert the structure `ms`, which would be a scalar if the (compatible)
multiplication `(* ls ms rs)` were performed, to a matrix.
source (clj)source (cljs)raw docstring

s->rclj/s≠

clj
(s->r local)
cljs
(s->r ??)
?? invalid arglists:
(quote ([local]))

SICM p. 83

SICM p. 83
source (clj)source (cljs)raw docstring

S2-sphericalclj/s

source (clj)source (cljs)

S2-stereographicclj/s

source (clj)source (cljs)

S2-tiltedclj/s

Similar to the S2-spherical coordinate system, with the north pole rotated 90 degrees and lying along the positive y axis.

Similar to the [[S2-spherical]] coordinate system, with the north pole rotated
90 degrees and lying along the positive y axis.
source (clj)source (cljs)raw docstring

S2p-gnomonicclj/s

source (clj)source (cljs)

S2p-sphericalclj/s

source (clj)source (cljs)

S2p-stereographicclj/s

source (clj)source (cljs)

S3-sphericalclj/s

source (clj)source (cljs)

S3-stereographicclj/s

source (clj)source (cljs)

s:generateclj/s≠

clj
(s:generate dimension orientation f)
cljs
(s:generate ??)
?? invalid arglists:
(quote ([dimension orientation f]))

Generate a structure with the given orientation whose elements are

(f i)

where i ranges from [0..dimension).

Generate a structure with the given `orientation` whose elements are

(f i)

where i ranges from `[0..dimension)`.
source (clj)source (cljs)raw docstring

secclj/s≠multimethod

clj
(sec a)
cljs
(sec ??)
?? invalid arglists:
(quote ([a]))

generic sec.

Computes the secant of the supplied argument a.

Equivalent to (invert (cos a)).

generic sec.

Computes the secant of the supplied argument `a`.

Equivalent to `(invert (cos a))`.
source (clj)source (cljs)raw docstring

sechclj/s≠multimethod

clj
(sech a)
cljs
(sech ??)
?? invalid arglists:
(quote ([a]))

generic sech.

Computes the hyperbolic secant of the supplied argument a.

defaults to 1 / cosh(x).

generic sech.

Computes the [hyperbolic
 secant](https://mathworld.wolfram.com/HyperbolicSecant.html) of the supplied
 argument `a`.

defaults to `1 / cosh(x)`.
source (clj)source (cljs)raw docstring

seq:pprintclj/s≠

clj
(seq:pprint n xs)
cljs
(seq:pprint ??)
?? invalid arglists:
(quote ([n xs]))

Realizes, simplifies and pretty-prints n elements from the supplied sequence xs.

Realizes, simplifies and pretty-prints `n` elements from the supplied sequence
`xs`.
source (clj)source (cljs)raw docstring

seq:printclj/s≠

clj
(seq:print n xs)
cljs
(seq:print ??)
?? invalid arglists:
(quote ([n xs]))

Realizes, simplifies and prints n elements from the supplied sequence xs.

Realizes, simplifies and prints `n` elements from the supplied sequence `xs`.
source (clj)source (cljs)raw docstring

seriesclj/s

(series & prefix)

Return a [[Series]] starting with the supplied values. The remainder of the series will be filled with the zero-value corresponding to the first of the given values.

If you have a sequence already, prefer [[series*]].

Return a [[Series]] starting with the supplied values. The remainder of the
series will be filled with the zero-value corresponding to the first of the
given values.

If you have a sequence already, prefer [[series*]].
source (clj)source (cljs)raw docstring

series:sumclj/s≠

clj
(series:sum s n)
cljs
(series:sum ??)
?? invalid arglists:
(quote ([s n]))

Returns the sum of all elements in the input series s up to order n (inclusive). For example:

(sum (series 1 1 1 1 1 1 1) 3)
;; => 4

NOTE that sum sums the first n + 1 terms, since a series starts with an order 0 term.

Returns the sum of all elements in the input series `s` up to order
`n` (inclusive). For example:

```clojure
(sum (series 1 1 1 1 1 1 1) 3)
;; => 4
```

NOTE that [[sum]] sums the first `n + 1` terms, since a series starts with an
order 0 term.
source (clj)source (cljs)raw docstring

sharpenclj/s≠

clj
(sharpen metric basis m)
cljs
(sharpen ??)
?? invalid arglists:
(quote ([metric basis m]))
source (clj)source (cljs)

simplifyclj/s≠multimethod

clj
(simplify a)
cljs
(simplify ??)
?? invalid arglists:
(quote ([a]))

generic simplify

generic simplify
source (clj)source (cljs)raw docstring

sinclj/s≠multimethod

clj
(sin a)
cljs
(sin ??)
?? invalid arglists:
(quote ([a]))

generic sin.

Returns the sine of the supplied argument a.

generic sin.

Returns the [sine](https://en.wikipedia.org/wiki/Sine_and_cosine) of the
  supplied argument `a`.
source (clj)source (cljs)raw docstring

sincclj/s≠multimethod

clj
(sinc a)
cljs
(sinc ??)
?? invalid arglists:
(quote ([a]))

generic sinc.

The unnormalized sinc function, equivalent to $\frac{\sin x}{x}$ but defined to be equal to 1 at $x = 0$.

References

generic sinc.

The unnormalized [sinc
  function](https://en.wikipedia.org/wiki/Sinc_function), equivalent to
  $\frac{\sin x}{x}$ but defined to be equal to 1 at $x = 0$.

  ### References

   - [Wikipedia page](https://en.wikipedia.org/wiki/Sinc_function)
   - [Mathworld page on Sinc](https://mathworld.wolfram.com/SincFunction.html)
   - [Boost notes on [[sinc]]
     and [[sinch]]](https://www.boost.org/doc/libs/1_65_0/libs/math/doc/html/math_toolkit/sinc/sinc_overview.html)
source (clj)source (cljs)raw docstring

sinhclj/s≠multimethod

clj
(sinh a)
cljs
(sinh ??)
?? invalid arglists:
(quote ([a]))

generic sinh.

Computes the hyperbolic sine of the supplied argument a.

defaults to (e^x - e^{-x}) / 2.

generic sinh.

Computes the [hyperbolic
 sine](https://mathworld.wolfram.com/HyperbolicSine.html) of the supplied
 argument `a`.

defaults to `(e^x - e^{-x}) / 2`.
source (clj)source (cljs)raw docstring

sinhcclj/s≠multimethod

clj
(sinhc a)
cljs
(sinhc ??)
?? invalid arglists:
(quote ([a]))

generic sinhc.

The sinhc function, equivalent to $\frac{\sinh x}{x}$ but defined to be equal to 1 at $x = 0$.

References

generic sinhc.

The [sinhc function](https://en.wikipedia.org/wiki/Sinhc_function),
  equivalent to $\frac{\sinh x}{x}$ but defined to be equal to 1 at $x = 0$.

  ### References

   - [Wikipedia page](https://en.wikipedia.org/wiki/Sinhc_function)
   - [Mathworld page on Sinhc](https://mathworld.wolfram.com/SinhcFunction.html)
source (clj)source (cljs)raw docstring

solve-linearclj/s≠multimethod

clj
(solve-linear a b)
cljs
(solve-linear ??)
?? invalid arglists:
(quote ([a b]))

generic solve-linear.

For a given a and b, returns x such that a*x = b.

Seesolve-linear-right for a similar function that solves for a = x*b.

generic solve-linear.

For a given `a` and `b`, returns `x` such that `a*x = b`.

  See[[solve-linear-right]] for a similar function that solves for `a = x*b`.
source (clj)source (cljs)raw docstring

solve-linear-leftclj/s≠

clj
(solve-linear-left a b)
cljs
(solve-linear-left ??)
?? invalid arglists:
(quote ([a b]))

Alias for solve-linear; present for compatibility with the original scmutils codebase.

NOTE: In scmutils, solve-linear-left and solve-linear act identically in all cases except matrices. solve-linear-left only accepted a column matrix (or up structure) in the b position, while solve-linear accepted either a column or row (up or down structure).

In Emmy, both functions accept either type.

Alias for [[solve-linear]]; present for compatibility with the original
`scmutils` codebase.

NOTE: In `scmutils`, `solve-linear-left` and `solve-linear` act identically in
all cases except matrices. `solve-linear-left` only accepted a column
matrix (or up structure) in the `b` position, while `solve-linear` accepted
either a column or row (up or down structure).

In Emmy, both functions accept either type.
source (clj)source (cljs)raw docstring

solve-linear-rightclj/s≠multimethod

clj
(solve-linear-right a b)
cljs
(solve-linear-right ??)
?? invalid arglists:
(quote ([a b]))

generic solve-linear-right.

For a given a and b, returns x such that a = x*b.

Seesolve-linear for a similar function that solves for a*x = b.

generic solve-linear-right.

For a given `a` and `b`, returns `x` such that `a = x*b`.

  See[[solve-linear]] for a similar function that solves for `a*x = b`.
source (clj)source (cljs)raw docstring

spacetime-rectclj/s

source (clj)source (cljs)

spacetime-sphereclj/s

source (clj)source (cljs)

sqrtclj/s≠multimethod

clj
(sqrt a)
cljs
(sqrt ??)
?? invalid arglists:
(quote ([a]))

generic sqrt

generic sqrt
source (clj)source (cljs)raw docstring

squareclj/s≠multimethod

clj
(square a)
cljs
(square ??)
?? invalid arglists:
(quote ([a]))

generic square

generic square
source (clj)source (cljs)raw docstring

SR-coordinates?clj/s≠

clj
(SR-coordinates? coords)
cljs
(SR-coordinates? ??)
?? invalid arglists:
(quote ([coords]))
source (clj)source (cljs)

SR-nameclj/s≠

clj
(SR-name coords)
cljs
(SR-name ??)
?? invalid arglists:
(quote ([coords]))
source (clj)source (cljs)

standard-mapclj/s≠

clj
(standard-map K)
cljs
(standard-map ??)
?? invalid arglists:
(quote ([K]))
source (clj)source (cljs)

state->tclj/s

Alias for [[time]].

Alias for [[time]].
source (clj)source (cljs)raw docstring

state-advancerclj/s

(state-advancer state-derivative & state-derivative-args)

state-advancer takes a state derivative function constructor followed by the arguments to construct it with. The state derivative function is constructed and an integrator is produced which takes:

  • initial state
  • target time

as arguments. Optionally, supply an options map with these optional fields:

:compile?: If true, the ODE solver will compile your state function.

:epsilon: The maximum error tolerance allowed by the ODE solver, both relative and absolute.

Returns the final state.

The state derivative is expected to map a structure to a structure of the same shape, and is required to have the time parameter as the first element.

state-advancer takes a state derivative function constructor followed by the
arguments to construct it with. The state derivative function is constructed
and an integrator is produced which takes:

- initial state
- target time

as arguments. Optionally, supply an options map with these optional fields:

`:compile?`: If true, the ODE solver will compile your state function.

`:epsilon`: The maximum error tolerance allowed by the ODE solver, both
relative and absolute.

Returns the final state.

The state derivative is expected to map a structure to a structure of the same
shape, and is required to have the time parameter as the first element.
source (clj)source (cljs)raw docstring

structure->typedclj/s≠

clj
(structure->typed coeff-functions basis)
cljs
(structure->typed ??)
?? invalid arglists:
(quote ([coeff-functions basis]))
source (clj)source (cljs)

structure->vectorclj/s≠

clj
(structure->vector s)
cljs
(structure->vector ??)
?? invalid arglists:
(quote ([s]))

Return the structure s in unoriented vector form.

Return the structure `s` in unoriented vector form.
source (clj)source (cljs)raw docstring

structure-constantclj/s≠

clj
(structure-constant e_i e_j e_k basis metric)
cljs
(structure-constant ??)
?? invalid arglists:
(quote ([e_i e_j e_k basis metric]))
source (clj)source (cljs)

structure?clj/s≠

clj
(structure? s)
cljs
(structure? ??)
?? invalid arglists:
(quote ([s]))

Returns true if s is a structure, false otherwise. (Vectors are treated as up structures.)

Returns `true` if `s` is a structure, false otherwise. (Vectors are treated as
up structures.)
source (clj)source (cljs)raw docstring

submatrixclj/s≠

clj
(submatrix x lowrow hirow lowcol hicol)
cljs
(submatrix ??)
?? invalid arglists:
(quote ([x lowrow hirow lowcol hicol]))

Returns the submatrix of the matrix (or matrix-like structure) s generated by taking

  • rows from lowrow -> hirow (inclusive)
  • columns from lowcol -> hicol (inclusive)
Returns the submatrix of the matrix (or matrix-like structure) `s` generated by
taking

- rows    from `lowrow` -> `hirow` (inclusive)
- columns from `lowcol` -> `hicol` (inclusive)
source (clj)source (cljs)raw docstring

sumclj/s

(sum xs)
(sum f low high)

Takes either:

  • a series xs of numbers
  • A transformation function f, an inclusive-lower bound low and exclusive-upper bound upper

And returns the result of aggregating either xs or (map f (range low high)) using the fold dynamically bound to [[fold]].

Use binding to substitute in a different fold:

(require '[emmy.algebra.fold :as af])

(binding [*fold* (af/join af/kahan af/min af/max)]
  (sum inc 0 10))
;;=> [55.0 1 10]
Takes either:

- a series `xs` of numbers
- A transformation function `f`, an inclusive-lower bound `low` and
  exclusive-upper bound `upper`

And returns the result of aggregating either `xs` or `(map f (range low
high))` using the fold dynamically bound to [[*fold*]].

Use `binding` to substitute in a different fold:

```clj
(require '[emmy.algebra.fold :as af])

(binding [*fold* (af/join af/kahan af/min af/max)]
  (sum inc 0 10))
;;=> [55.0 1 10]
```
source (clj)source (cljs)raw docstring

sumrclj/s

(sumr f & structures)

Given some function f and any number of isomorphic structures, returns the sum of the results of applying f to each associated set of entries in each structure.

Given some function `f` and any number of isomorphic `structures`,
returns the sum of the results of applying `f` to each associated set of
entries in each `structure`.
source (clj)source (cljs)raw docstring

symmetrize-Cartanclj/s≠

clj
(symmetrize-Cartan Cartan)
cljs
(symmetrize-Cartan ??)
?? invalid arglists:
(quote ([Cartan]))
source (clj)source (cljs)

symmetrize-Christoffelclj/s≠

clj
(symmetrize-Christoffel G)
cljs
(symmetrize-Christoffel ??)
?? invalid arglists:
(quote ([G]))
source (clj)source (cljs)

symplectic-transform?clj/s≠

clj
(symplectic-transform? C)
cljs
(symplectic-transform? ??)
?? invalid arglists:
(quote ([C]))

p. 334

p. 334
source (clj)source (cljs)raw docstring

symplectic-unitclj/s≠

clj
(symplectic-unit n)
cljs
(symplectic-unit ??)
?? invalid arglists:
(quote ([n]))

p. 334 (used, but not defined there)

p. 334 (used, but not defined there)
source (clj)source (cljs)raw docstring

tanclj/s≠multimethod

clj
(tan a)
cljs
(tan ??)
?? invalid arglists:
(quote ([a]))

generic tan.

Computes the trigonometric tangent function of the supplied argument a.

Equivalent to (/ (sin a) (cos a)).

generic tan.

Computes the trigonometric tangent function of the supplied argument `a`.

Equivalent to `(/ (sin a) (cos a))`.
source (clj)source (cljs)raw docstring

tancclj/s≠multimethod

clj
(tanc a)
cljs
(tanc ??)
?? invalid arglists:
(quote ([a]))

generic tanc.

tanc is defined, by analogy with sinc, to be equal to $\frac{\tan x}{x}$ for nonzero $x$ and equal to 1 at $x = 0$.

References

generic tanc.

`tanc` is defined, by analogy with [[sinc]], to be equal to $\frac{\tan
  x}{x}$ for nonzero $x$ and equal to 1 at $x = 0$.

  ### References

   - [Wikipedia page](https://en.wikipedia.org/wiki/Tanc_function)
   - [Mathworld page on Sinc](https://mathworld.wolfram.com/TancFunction.html)
source (clj)source (cljs)raw docstring

tanhclj/s≠multimethod

clj
(tanh a)
cljs
(tanh ??)
?? invalid arglists:
(quote ([a]))

generic tanh.

Computes the hyperbolic tangent of the supplied argument a.

defaults to sinh(x) / cosh(x).

generic tanh.

Computes the [hyperbolic
 tangent](https://mathworld.wolfram.com/HyperbolicTangent.html) of the supplied
 argument `a`.

defaults to `sinh(x) / cosh(x)`.
source (clj)source (cljs)raw docstring

tanhcclj/s≠multimethod

clj
(tanhc a)
cljs
(tanhc ??)
?? invalid arglists:
(quote ([a]))

generic tanhc.

The tanhc function, equivalent to $\frac{\tanh x}{x}$ but defined to be equal to 1 at $x = 0$.

References

generic tanhc.

The [tanhc function](https://en.wikipedia.org/wiki/Tanhc_function),
  equivalent to $\frac{\tanh x}{x}$ but defined to be equal to 1 at $x = 0$.

  ### References

   - [Wikipedia page](https://en.wikipedia.org/wiki/Tanhc_function)
   - [Mathworld page on Tanhc](https://mathworld.wolfram.com/TanhcFunction.html)
source (clj)source (cljs)raw docstring

tauclj/s

The mathematical constant Tau, equal to $2\pi$.

The mathematical
constant [Tau](https://en.wikipedia.org/wiki/Turn_(angle)#Tau_proposals),
equal to $2\pi$.
sourceraw docstring

taylor-seriesclj/s

(taylor-series f)
(taylor-series f & xs)

Given a differentiable function f and any number of arguments xs, returns a [[emmy.series/PowerSeries]] representing the Taylor series of the function f expanded at xs.

Calling taylor-series with no arguments will return the Maclaurin series of f, i.e., the Taylor series expansion at (= x 0).

Calling the returned power series with incremental argument dx will produce a [[emmy.series/Series]] representing the terms of the Taylor series of f expanded at x and evaluated at x+dx.

NOTE: Just like the D operator, functions f of multiple-arguments are treated as a function of a single structural argument. If you pass multiple arguments xs, you'll have to manually wrap your multiple-argument dx in a emmy.structure/up or a vector before passing it to the returned power series.

NOTE: The typical definition of a Taylor series of f expanded around some point x is

$$T(p) = f(x) + \frac{f'(x)}{1!}(p-x) + \frac{f''(x)}{2!} (p-x)^2 + \ldots,$$

where p is the evaluation point. When (= p x), all derivatives of the Taylor series expansion of f will exactly match the derivatives of f itself.

The Taylor series returned here (call it $T'$) is actually a function of dx, where

$$T'(dx) = T(x+dx) = f(x) + \frac{f'(x)}{1!}(dx) + \frac{f''(x)}{2!} (dx)^2 + \ldots.$$

Given a differentiable function `f` and any number of arguments `xs`, returns
a [[emmy.series/PowerSeries]] representing the [Taylor
series](https://en.wikipedia.org/wiki/Taylor_series) of the function `f`
expanded at `xs`.

Calling [[taylor-series]] with no arguments will return the [Maclaurin
series](https://en.wikipedia.org/wiki/Taylor_series#List_of_Maclaurin_series_of_some_common_functions)
of `f`, i.e., the Taylor series expansion at `(= x 0)`.

Calling the returned power series with incremental argument `dx` will produce
a [[emmy.series/Series]] representing the terms of the Taylor series of
`f` expanded at `x` and evaluated at `x+dx`.

NOTE: Just like the [[D]] operator, functions `f` of multiple-arguments are
treated as a function of a single structural argument. If you pass multiple
arguments `xs`, you'll have to manually wrap your multiple-argument `dx` in
a [[emmy.structure/up]] or a vector before passing it to the returned
power series.

NOTE: The typical definition of a Taylor series of `f` expanded around some
point `x` is

$$T(p) = f(x) + \frac{f'(x)}{1!}(p-x) + \frac{f''(x)}{2!} (p-x)^2 + \ldots,$$

where `p` is the evaluation point. When `(= p x)`, all derivatives of the
Taylor series expansion of `f` will exactly match the derivatives of `f`
itself.

The Taylor series returned here (call it $T'$) is actually a function of `dx`,
where

$$T'(dx) = T(x+dx) = f(x) + \frac{f'(x)}{1!}(dx) + \frac{f''(x)}{2!} (dx)^2 + \ldots.$$
source (clj)source (cljs)raw docstring

tex$clj/s

(tex$ expr)

Returns a string containing a LaTeX representation of expr, wrapped in single $ to mark the string as an inline LaTeX form.

Returns a string containing a LaTeX representation of `expr`, wrapped in single
`$` to mark the string as an inline LaTeX form.
sourceraw docstring

tex$$clj/s

(tex$$ expr)

Returns a string containing a LaTeX representation of expr, wrapped in double $$ to mark the string as a block LaTeX form.

Returns a string containing a LaTeX representation of `expr`, wrapped in double
`$$` to mark the string as a block LaTeX form.
sourceraw docstring

the-real-lineclj/s

source (clj)source (cljs)

time-independent-canonical?clj/s≠

clj
(time-independent-canonical? C)
cljs
(time-independent-canonical? ??)
?? invalid arglists:
(quote ([C]))

p.326

p.326
source (clj)source (cljs)raw docstring

torsionclj/s≠

clj
(torsion nabla)
cljs
(torsion ??)
?? invalid arglists:
(quote ([nabla]))
source (clj)source (cljs)

torsion-vectorclj/s≠

clj
(torsion-vector nabla)
cljs
(torsion-vector ??)
?? invalid arglists:
(quote ([nabla]))
source (clj)source (cljs)

traceclj/s≠multimethod

clj
(trace a)
cljs
(trace ??)
?? invalid arglists:
(quote ([a]))

generic trace

generic trace
source (clj)source (cljs)raw docstring

trace2downclj/s≠

clj
(trace2down metric-tensor basis)
cljs
(trace2down ??)
?? invalid arglists:
(quote ([metric-tensor basis]))

Computes the trace of a (0,2) tensor.

Computes the trace of a (0,2) tensor.
source (clj)source (cljs)raw docstring

trace2upclj/s≠

clj
(trace2up metric-tensor basis)
cljs
(trace2up ??)
?? invalid arglists:
(quote ([metric-tensor basis]))

Computes the trace of a (2,0) tensor

Computes the trace of a (2,0) tensor
source (clj)source (cljs)raw docstring

transfer-pointclj/s≠

clj
(transfer-point embedded embedding)
cljs
(transfer-point ??)
?? invalid arglists:
(quote ([embedded embedding]))

Returns a function that takes a single manifold point embedded in the manifold embedded and transfers the point to the supplied embedding manifold.

The embedding dimension must be the same for both manifolds.

NOTE that embedded and embedding can be either manifolds, or instances of [[ICoordinateSystem]]. In the latter case embedded and embedding will bind to the manifold associated with the supplied [[ICoordinateSystem]].

Returns a function that takes a single manifold `point` embedded in the
manifold `embedded` and transfers the point to the supplied `embedding`
manifold.

The embedding dimension must be the same for both manifolds.

NOTE that `embedded` and `embedding` can be either manifolds, or instances
of [[ICoordinateSystem]]. In the latter case `embedded` and `embedding` will
bind to the manifold associated with the supplied [[ICoordinateSystem]].
source (clj)source (cljs)raw docstring

transposeclj/s≠multimethod

clj
(transpose a)
cljs
(transpose ??)
?? invalid arglists:
(quote ([a]))

generic transpose

generic transpose
source (clj)source (cljs)raw docstring

typed->indexedclj/s≠

clj
(typed->indexed f basis)
cljs
(typed->indexed ??)
?? invalid arglists:
(quote ([f basis]))
source (clj)source (cljs)

typed->structureclj/s≠

clj
(typed->structure T basis)
cljs
(typed->structure ??)
?? invalid arglists:
(quote ([T basis]))
source (clj)source (cljs)

typical-coordsclj/s≠

clj
(typical-coords coordinate-system)
cljs
(typical-coords ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given an [[ICoordinateSystem]], returns a structure that matches the [[coordinate-prototype]] of coordinate-system, with all unique, gensym-ed entries.

Use typical-coords if you require a unique symbolic coordinate representation compatible with coordinate-system.

See typical-point for a coordinate-free version of this function.

Given an [[ICoordinateSystem]], returns a structure that matches
the [[coordinate-prototype]] of `coordinate-system`, with all unique,
gensym-ed entries.

Use [[typical-coords]] if you require a unique symbolic coordinate
representation compatible with `coordinate-system`.

See [[typical-point]] for a coordinate-free version of this function.
source (clj)source (cljs)raw docstring

typical-pointclj/s≠

clj
(typical-point coordinate-system)
cljs
(typical-point ??)
?? invalid arglists:
(quote ([coordinate-system]))

Given an [[ICoordinateSystem]], returns a unique, symbolically-represented point on the manifold associated with coordinate-system.

See typical-coords for a coordinate-based version of this function.

Given an [[ICoordinateSystem]], returns a unique, symbolically-represented
point on the manifold associated with `coordinate-system`.

See [[typical-coords]] for a coordinate-based version of this function.
source (clj)source (cljs)raw docstring

upclj/s

(up & xs)

Construct an up (contravariant) tuple from the arguments.

Variadic version of [[up*]].

Construct an up (contravariant) tuple from the arguments.

Variadic version of [[up*]].
source (clj)source (cljs)raw docstring

up->column-matrixclj/s≠

clj
(up->column-matrix v)
cljs
(up->column-matrix ??)
?? invalid arglists:
(quote ([v]))

Returns a column matrix with the contents of the supplied up structure. Errors if any other type is provided.

Returns a column matrix with the contents of the supplied `up` structure.
Errors if any other type is provided.
source (clj)source (cljs)raw docstring

up?clj/s≠

clj
(up? s)
cljs
(up? ??)
?? invalid arglists:
(quote ([s]))

Returns true if s is an up structure, false otherwise.

Returns `true` if `s` is an `up` structure, false otherwise.
source (clj)source (cljs)raw docstring

using-coordinatesclj/s

(using-coordinates coordinate-prototype coordinate-system & body)

using-coordinates wraps let-coordinates and allows you to supply a single coordinate prototype and a single coordinate system. See let-coordinates for details about what symbols are bound inside the body.

Example:

(using-coordinates (up x y) R2-rect
                   body...)
[[using-coordinates]] wraps [[let-coordinates]] and allows you to supply a
single coordinate prototype and a single coordinate system.
See [[let-coordinates]] for details about what symbols are bound inside the
body.

Example:

```clojure
(using-coordinates (up x y) R2-rect
                   body...)
```
sourceraw docstring

v:cclj/s≠

clj
(v:c frame)
cljs
(v:c ??)
?? invalid arglists:
(quote ([frame]))
source (clj)source (cljs)

v:make-basis-unitclj/s

(v:make-basis-unit i)
(v:make-basis-unit n i)

Returns a basis sequence of n 0s, with 1 in the ith position.

If n is not supplied returns an infinite sequence.

Returns a basis sequence of `n` 0s, with `1` in the `i`th position.

If `n` is not supplied returns an infinite sequence.
source (clj)source (cljs)raw docstring

vector->downclj/s≠

clj
(vector->down v)
cljs
(vector->down ??)
?? invalid arglists:
(quote ([v]))

Form a down-tuple from a vector.

NOTE that this is an alias of [[down*]] that is more restrictive, in that it only accepts a vector. Use [[down*]] if you'd like to pass an arbitrary sequence. (If you pass a vector to [[down*]]) it will be just as efficient.

Form a down-tuple from a vector.

NOTE that this is an alias of [[down*]] that is more restrictive, in that it
only accepts a vector. Use [[down*]] if you'd like to pass an arbitrary
sequence. (If you pass a vector to [[down*]]) it will be just as efficient.
source (clj)source (cljs)raw docstring

vector->upclj/s≠

clj
(vector->up v)
cljs
(vector->up ??)
?? invalid arglists:
(quote ([v]))

Form an up-tuple from a vector.

NOTE that this is an alias of [[up*]] that is more restrictive, in that it only accepts a vector. Use [[up*]] if you'd like to pass an arbitrary sequence. (If you pass a vector to [[up*]]) it will be just as efficient.

Form an up-tuple from a vector.

NOTE that this is an alias of [[up*]] that is more restrictive, in that it
only accepts a vector. Use [[up*]] if you'd like to pass an arbitrary
sequence. (If you pass a vector to [[up*]]) it will be just as efficient.
source (clj)source (cljs)raw docstring

vector-basis->dualclj/s≠

clj
(vector-basis->dual vector-basis coordinate-system)
cljs
(vector-basis->dual ??)
?? invalid arglists:
(quote ([vector-basis coordinate-system]))
source (clj)source (cljs)

vector-field->basis-componentsclj/s≠

clj
(vector-field->basis-components vf dual-basis)
cljs
(vector-field->basis-components ??)
?? invalid arglists:
(quote ([vf dual-basis]))

Given a vector field vf generated from basis-components->vector-field and a dual basis, returns the original basis components.

NOTE: You can generate a dual basis with [[basis/vector-basis->dual-basis]].

Here's an example of how to use this function to round trip a structure of basis components:

(let [basis (coordinate-system->vector-basis coordsys)
      dual  (basis/vector-basis->dual basis coordsys)]
  (= basis-components
     (-> basis-components
         (basis-components->vector-field basis)
         (vector-field->basis-components dual))))
Given a vector field `vf` generated from [[basis-components->vector-field]] and
a dual basis, returns the original basis components.

NOTE: You can generate a dual basis with [[basis/vector-basis->dual-basis]].

Here's an example of how to use this function to round trip a structure of
basis components:

```clojure
(let [basis (coordinate-system->vector-basis coordsys)
      dual  (basis/vector-basis->dual basis coordsys)]
  (= basis-components
     (-> basis-components
         (basis-components->vector-field basis)
         (vector-field->basis-components dual))))
```
source (clj)source (cljs)raw docstring

vector-field->componentsclj/s≠

clj
(vector-field->components vf coordinate-system)
cljs
(vector-field->components ??)
?? invalid arglists:
(quote ([vf coordinate-system]))

Given a vector field vf and a coordinate-system, returns a function from the coordinate representation of a manifold point to a coordinate representation of the coordinatized components of the vector field at that point.

For example:

(let-coordinates [[x y] R2-rect]
  (let [f (literal-vector-field 'f R2-rect)]
      ((vector-field->components f R2-rect)
       (up 'x0 'y0))))

;;=> (up (f↑0 (up x0 y0))
;;       (f↑1 (up x0 y0)))
Given a vector field `vf` and a `coordinate-system`, returns a function from
the coordinate representation of a manifold point to a coordinate
representation of the coordinatized components of the vector field at that
point.

For example:

```clojure
(let-coordinates [[x y] R2-rect]
  (let [f (literal-vector-field 'f R2-rect)]
      ((vector-field->components f R2-rect)
       (up 'x0 'y0))))

;;=> (up (f↑0 (up x0 y0))
;;       (f↑1 (up x0 y0)))
```
source (clj)source (cljs)raw docstring

vector-field->oneform-fieldclj/s

Alias for lower.

Alias for [[lower]].
source (clj)source (cljs)raw docstring

vector-field->vector-field-over-mapclj/s≠

clj
(vector-field->vector-field-over-map mu:N->M)
cljs
(vector-field->vector-field-over-map ??)
?? invalid arglists:
(quote ([mu:N->M]))

Defined on FDG p.72.

Defined on FDG p.72.
source (clj)source (cljs)raw docstring

vector-field?clj/s≠

clj
(vector-field? vf)
cljs
(vector-field? ??)
?? invalid arglists:
(quote ([vf]))

Returns true if the supplied argument vf is a vector field operator, false otherwise.

Returns true if the supplied argument `vf` is a vector field operator, false
otherwise.
source (clj)source (cljs)raw docstring

vector:generateclj/s≠

clj
(vector:generate n f)
cljs
(vector:generate ??)
?? invalid arglists:
(quote ([n f]))

Generates a new vector of length n by applying the function f to integers in the range $[0,n)$.

Generates a new vector of length `n` by applying the function `f` to integers
in the range $[0,n)$.
source (clj)source (cljs)raw docstring

velocityclj/s≠

clj
(velocity local)
cljs
(velocity ??)
?? invalid arglists:
(quote ([local]))

Returns the velocity element of a local tuple (by convention, the third element).

See coordinate for more detail.

Returns the velocity element of a local tuple (by convention, the third
element).

See [[coordinate]] for more detail.
source (clj)source (cljs)raw docstring

velocity-tupleclj/s

source (clj)source (cljs)

vf:zeroclj/s≠

clj
(vf:zero _)
cljs
(vf:zero ??)
?? invalid arglists:
(quote ([_]))

Returns a vector field that returns, for any supplied function f, a manifold function [[manifold/zero-manifold-function]] that maps every input manifold point to the scalar value 0.

Returns a vector field that returns, for any supplied function `f`, a manifold
function [[manifold/zero-manifold-function]] that maps every input manifold
`point` to the scalar value 0.
source (clj)source (cljs)raw docstring

wcross->wclj/s≠

clj
(wcross->w A)
cljs
(wcross->w ??)
?? invalid arglists:
(quote ([A]))
source (clj)source (cljs)

wedgeclj/s

(wedge)
(wedge f)
(wedge f & fs)

Computes the wedge product of the sequence fs of one-forms.

Higher rank forms can be constructed from one-forms by wedging them together. This antisymmetric tensor product is computed as a determinant. The purpose of this is to allow us to use the construction dx^dy to compute the area described by the vectors that are given to it.

See Spivak p275 v1 of 'Differential Geometry' to see the correct definition. The key is that the wedge of the coordinate basis forms had better be the volume element.

Computes the wedge product of the sequence `fs` of one-forms.

Higher rank forms can be constructed from one-forms by wedging them together.
This antisymmetric tensor product is computed as a determinant. The purpose of
this is to allow us to use the construction dx^dy to compute the area
described by the vectors that are given to it.

See Spivak p275 v1 of 'Differential Geometry' to see the correct definition.
The key is that the wedge of the coordinate basis forms had better be the
volume element.
source (clj)source (cljs)raw docstring

with-argument-typesclj/s≠

clj
(with-argument-types f types)
cljs
(with-argument-types ??)
?? invalid arglists:
(quote ([f types]))

Given some operator or function f, returns a copy of f with the supplied argument types types registered in its metadata (if a function) or context (if an operator).

Retrieve these types with argument-types.

Given some operator or function `f`, returns a copy of `f` with the supplied
argument types `types` registered in its metadata (if a function) or
context (if an operator).

Retrieve these types with [[argument-types]].
source (clj)source (cljs)raw docstring

with-index-typesclj/s≠

clj
(with-index-types f types)
cljs
(with-index-types ??)
?? invalid arglists:
(quote ([f types]))

Given some operator or function f, returns a copy of f with the supplied index types types registered in its metadata (if a function) or context (if an operator).

Retrieve these types with index-types.

Given some operator or function `f`, returns a copy of `f` with the supplied
index types `types` registered in its metadata (if a function) or
context (if an operator).

Retrieve these types with [[index-types]].
source (clj)source (cljs)raw docstring

with-literal-functionsclj/s

(with-literal-functions & args)
source

zero-likeclj/s≠multimethod

clj
(zero-like a)
cljs
(zero-like ??)
?? invalid arglists:
(quote ([a]))

generic zero-like.

In general, this procedure returns the additive identity of the type of its argument, if it exists. For numbers this is 0.

generic zero-like.

In general, this procedure returns the additive identity of the type of its
  argument, if it exists. For numbers this is 0.
source (clj)source (cljs)raw docstring

zero-manifold-functionclj/s≠

clj
(zero-manifold-function point)
cljs
(zero-manifold-function ??)
?? invalid arglists:
(quote ([point]))

Manifold function that maps every input manifold point to the scalar value 0.

Manifold function that maps every input manifold `point` to the scalar value 0.
source (clj)source (cljs)raw docstring

zero?clj/s≠multimethod

clj
(zero? a)
cljs
(zero? ??)
?? invalid arglists:
(quote ([a]))

generic zero?.

Is true if x is an additive identity.

generic zero?.

Is true if `x` is an additive identity.
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close