Vector Space bases

The vector space $\mathcal{V}$ is represented by the abstract type AbstractBasis.

Base.lengthMethod
length(b::AbstractBasis)

Return the number of elements in the basis.

source
VectorSpaceLeastSquares.derivativeMethod
derivative(b::AbstractBasis, x::AbstractVector{<:Real}, index::Integer, derivativeIndex::Integer)

Compute the value of the first derivative of the index-th basis function w.r.t to the derivativeIndex variate at point x.

source

Polynomial Bases

Polynomial Bases are implemented using the PolynomialBasis type

VectorSpaceLeastSquares.PolynomialBasisType
PolynomialBasis

Represent a multivariate polynomial

  • degree::Int64: maximum total degree
  • nVariates::Int6: number of variates
  • dim::Int6: dimension of the generated vector space
  • type::PolynomialType: a value from PolynomialType
  • tensor::SparseMatrixCSC{Int64, Int64}: the sparse tensor representation of the polynomial. Polynomials are stored by column.
source

The following families of polynomials are available

A PolynomialBasis object can be created using

Piecewise constant functions (local bases)

Piecewise constant functions can be efficiently obtained from a basis of local functions with disjoint supports. Such bases are implemented using the PiecewiseConstantBasis

VectorSpaceLeastSquares.PiecewiseConstantBasisType
PiecewiseConstantBasis

Represent a basis of local functions defined on $[0,1]^d$

  • nVariates is the dimension d of the space.
  • nIntervals is a vector of size d defining the number of sub-intervals to use along each dimension
source

A PiecewiseConstantBasis object can be created using

VectorSpaceLeastSquares.PiecewiseConstantBasisMethod
PiecewiseConstantBasis(nVariates::Integer, nIntervals::Vector{<:Integer})

Create a PiecewiseConstantBasis by specifying the number of intervals per direction (possibly different to allow non squared grids).

source