Reference

Reference

Input

We support any polynomials which follow the MultivariatePolynomials interface. By default we export the routines @polyvar, PolyVar, differentiate and variables from the DynamicPolynomials implementation. With these you can simply create variables

# Create variables x, y, z
@polyvar x y z
f = x^2+y^2+z^2

# You can also create an array of variables
@polyvar x[1:3] # This creates x1, x2, x3 accessed by x[1], x[2], x[3]
f = dot(x, x) # = x[1]^2+x[2]^2+x[3]^2

# Also you can create matrices of variables
# This creates x1_1, x1_2, x2_1, x2_2 accessed by
# x[1,1], x[1,2], x[2,1], x[2,2]
@polyvar x[1:2, 1:2]

Utilities

ishomogenous(f::MP.AbstractPolynomialLike)

Checks whether f is homogenous.

ishomogenous(f::MP.AbstractPolynomialLike, vars)

Checks whether f is homogenous in the variables vars with possible weights.

ishomogenous(F::Vector{MP.AbstractPolynomialLike}, variables)

Checks whether each polynomial in F is homogenous in the variables variables.

uniquevar(f::MP.AbstractPolynomialLike, tag=:x0)
uniquevar(F::MPPolys, tag=:x0)

Creates a unique variable.

homogenize(f::MP.AbstractPolynomial, variable=uniquevar(f))

Homogenize the polynomial f by using the given variable variable.

homogenize(F::Vector{<:MP.AbstractPolynomial}, variable=uniquevar(F))

Homogenize each polynomial in F by using the given variable variable.

homogenize(f::MP.AbstractPolynomial, v::Vector{<:MP.AbstractVariable}, variable=uniquevar(f))

Homogenize the variables v in the polynomial f by using the given variable variable.

homogenize(F::Vector{<:MP.AbstractPolynomial}, v::Vector{<:MP.AbstractVariable}, variable=uniquevar(F))

Homogenize the variables v in each polynomial in F by using the given variable variable.

AffinePatches

Affine patches are there to augment projective system such that they can be considered as (locally) affine system. By default the following patches are defined

OrthogonalPatch()
EmbeddingPatch()

Holds an PVector onto its affine patch. With this the effect is basically the same as tracking in affine space.

RandomPatch()

A random patch. The vector has norm 1.

FixedPatch()