Interface
Evaluation
Homotopy.evaluate
— Function.evaluate(H::AbstractPolynomialHomotopy, x, t)
Evaluate the homotopy H
at x
to time t
, i.e. $H(x,t)$.
evaluate(H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Evaluate the homotopy H
at x
to time t
using the precompuated values in cfg
. Note that this is significantly faster than evaluate(H, x, t)
.
Homotopy.evaluate!
— Function.evaluate!(u::Vector, H::AbstractPolynomialHomotopy, x, t)
Evaluate the homotopy H
at x
to time t
, i.e. $H(x,t)$, and store the result in u
.
evaluate!(u::AbstractVector, H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Evaluate the homotopy H
at x
to time t
using the precompuated values in cfg
and store the result in u
.
Differentiation
Homotopy.jacobian
— Function.jacobian(H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute the jacobian of H
at x
and t
using the precomputed values in cfg
. The jacobian is constructed w.r.t. x
, i.e. it doesn't contain the partial derivatives w.r.t. t
.
Homotopy.jacobian!
— Function.jacobian!(u, H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute the jacobian of H
at x
and t
using the precomputed values in cfg
and store the result in u
.
jacobian!(r::JacobianDiffResult, H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute $H(x, t)$ and the jacobian of H
at x
and t
at once using the precomputated values in cfg
and store thre result in r
. This is faster than computing both values separetely.
Example
cfg = PolynomialHomotopyConfig(H)
r = JacobianDiffResult(cfg)
jacobian!(r, H, x, t, cfg)
value(r) == H(x, t)
jacobian(r) == jacobian(H, x, t, cfg)
Homotopy.dt
— Function.dt(H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute the derivative of H
w.r.t. $t$ at x
and t
using the precomputed values in cfg
.
Homotopy.dt!
— Function.dt!(u, H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute the derivative of H
w.r.t. $t$ at x
and t
using the precomputed values in cfg
and store the result in u
.
dt!(r::DtDiffResult, H::AbstractPolynomialHomotopy, x, t, cfg::PolynomialHomotopyConfig)
Compute the derivative of H
w.r.t. $t$ at x
and t
using the precomputed values in cfg
and store the result in r
. This is faster than computing both values separetely.
Example
cfg = PolynomialHomotopyConfig(H)
r = DtDiffResult(cfg)
dt!(r, H, x, t, cfg)
value(r) == H(x, t)
dt(r) == dt(H, x, t, cfg)
Homogenization
Homotopy.homogenize
— Function.homogenize(H::AbstractPolynomialHomotopy)
Homogenize the homotopy H
. This adds an additional variable. If H
is already homogenized, this is the identity.
Homotopy.dehomogenize
— Function.dehomogenize(H::AbstractPolynomialHomotopy)
Dehomogenize the homotopy H
. This removes the first variable. If H
is not homogenized, this is the identity.
Homotopy.ishomogenized
— Function.ishomogenized(H::AbstractPolynomialHomotopy)
Check whether the homotopy H
was homogenized.
Homotopy.ishomogenous
— Function.ishomogenous(H::AbstractPolynomialHomotopy)
Check whether the homotopy H
is homogenous. This does not imply that H
was homogenized.
Misc
Homotopy.nvariables
— Function.nvariables(H::AbstractPolynomialHomotopy)
The number of variables which H
expects as input, i.e. to evaluate H(x,t)
x
has to be a vector of length nvariables(H)
.
Homotopy.weylnorm
— Function.weylnorm(H::AbstractPolynomialHomotopy)
Creates a function with variable t
that computes the Weyl norm (or Bombieri norm) of $H(x,t)$. See here for details about the Weyl norm.