Series

# Series

Series{T}

Class representing multivariate series with coefficients of type T. The series are dictionaries, which associates values of type T to monomials.

source
dual(p:Polynomial{C,T}) -> Series{T}

Construct the series from the polynomial by replacing the monomial basis by its dual basis

Example

@ring x1 x2
p = x1^2*x2+3*x2+2
s = dual(p)

# output

dx1^2dx2 + 3dx2 + 2
source
dualdot(sigma::Series{T}, p::Monomial) -> T
dualdot(sigma::Series{T}, p::Term) -> T
dualdot(sigma::Series{T}, p::Polynomial) -> T
dualdot(sigma::Series{T}, p::Polynomial, q::Polynomial) -> T

Compute the dot product $‹ p, q ›_{σ} = ‹ σ | p q ›$ or $‹ σ | p ›$ for p, q polynomials, terms or monomials.

source
moment(w::Vector{T}, P::Matrix{T}) -> Vector{Int64} -> T

Compute the moment function $α -> ∑_{i} ω_{i} P_{i}^α$ associated to the sequence P of r points of dimension n, which is a matrix of size r*n and the weights w.

source
moment(p::Polynomial, zeta::Vector{T}) -> Vector{Int64} -> T

Compute the moment function $α \rightarrow p(ζ^α)$.

source
series(p::Polynomial, d:: Int64) -> Series{T} 

Compute the series associated to the tensor p of degree d. T is the type of the coefficients of the polynomial p.

source
series(f,L) -> Series{T}

Compute the generating series $\sum_{x^{α} \in L} f(α) z^α$ for a function $f: \mathbb{N}^n \rightarrow T$ and a sequence L of monomials.

source
series(H,L1, L2) -> Series{T}

Compute the series associated to the Hankel matrix H, with rows (resp. columns) indexed by the array of monomials L1 (resp. L2).

source
series(w:: Vector{T}, P::Matrix{T}, L::Vector{M}) -> Series{T}

Compute the series of the moment sequence $∑_{i} ω_{i} P_{i}^α$ for $α \in L$.

source
series(w:: Vector{T}, P::Matrix{T}, X, d::Int64) -> Series{T}

Compute the series of the moment sequence $∑_i ω_{i} P_{i}^α$ for $|α| \leq d$.

source
series(p::Polynomial, zeta, X, d::Int64) -> Series{T}

Compute the series of moments $p(ζ^α)$ for $|α| \leq d$.

source
monoms(V, d::Int64) -> Vector{Monomial}
monoms(V, rg::UnitRangeInt64) -> Vector{Monomial}

List of all monomials in the variables V up to degree d of from degree d1 to d2, ordered by increasing degree.

source
monoms(V, d::Int64) -> Vector{Monomial}

List of all monomials in the variables V up to degree d of from degree d1 to d2, ordered by increasing degree.

source

Scale the moments $σ_α$ by $λ^{deg(α)}$.

source

Scale the moments $σ_α$ by $λ^{deg(α)}$, overwriting $σ$

source
hankel(sigma::Series{T}, L1, L2) -> Array{T,2}

Hankel matrix of $σ$ with the rows indexed by the list of polynomials L1 and the columns by L2. The entries are the dot product for $σ$ of the corresponding elements in L1 and L2.

Example

julia> L =[1, x1, x2, x1^2, x1*x2, x2^2]

julia> H = hankel(s,L,L)
6x6 Array{Float64,2}:
4.0   5.0   7.0    5.0  11.0  13.0
5.0   5.0  11.0   -1.0  17.0  23.0
7.0  11.0  13.0   17.0  23.0  25.0
5.0  -1.0  17.0  -31.0  23.0  41.0
11.0  17.0  23.0   23.0  41.0  47.0
13.0  23.0  25.0   41.0  47.0  49.0
source