Vector Space bases
The vector space $\mathcal{V}$ is represented by the abstract type AbstractBasis.
VectorSpaceLeastSquares.AbstractBasis — TypeAbstractBasisSuper type for all bases. A basis must implement the following methods: nVariates, length, getType, isDifferentiable, value. If the basis contains only differentiable functions, in which case isDifferentiable returns true, it must also implement derivative.
VectorSpaceLeastSquares.nVariates — MethodnVariates(b::AbstractBasis)Return the number of variates of the functions inside the basis.
Base.length — Methodlength(b::AbstractBasis)Return the number of elements in the basis.
Base.size — MethodVectorSpaceLeastSquares.getType — MethodgetType(b::AbstractBasis)Return the internal basis type.
VectorSpaceLeastSquares.isDifferentiable — MethodisDifferentiable(b::AbstractBasis)Return true if the functions in the basis are differentiable. In this case, a specific method derivative must be implemented.
VectorSpaceLeastSquares.value — Methodvalue(b::AbstractBasis, x::AbstractVector{<:Real}, index::Integer)Compute the value of the index-th basis function at point x.
VectorSpaceLeastSquares.derivative — Methodderivative(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.
Polynomial Bases
Polynomial Bases are implemented using the PolynomialBasis type
VectorSpaceLeastSquares.PolynomialBasis — TypePolynomialBasisRepresent a multivariate polynomial
degree::Int64: maximum total degreenVariates::Int6: number of variatesdim::Int6: dimension of the generated vector spacetype::PolynomialType: a value fromPolynomialTypetensor::SparseMatrixCSC{Int64, Int64}: the sparse tensor representation of the polynomial. Polynomials are stored by column.
The following families of polynomials are available
VectorSpaceLeastSquares.PolynomialType — TypePolynomialTypeList the families of polynomials available through the PolynomialBasis type
CanonicHermiteTchebychev
A PolynomialBasis object can be created using
VectorSpaceLeastSquares.PolynomialBasis — MethodPolynomialBasis(type::PolynomialType, nVariates::Integer, degree::Integer)Create a polynomial basis with type, nVariates variables and total maximum degree
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.PiecewiseConstantBasis — TypePiecewiseConstantBasisRepresent a basis of local functions defined on $[0,1]^d$
nVariatesis the dimensiondof the space.nIntervalsis a vector of sizeddefining the number of sub-intervals to use along each dimension
A PiecewiseConstantBasis object can be created using
VectorSpaceLeastSquares.PiecewiseConstantBasis — MethodPiecewiseConstantBasis(nVariates::Integer, nIntervals::Integer)Create a PiecewiseConstantBasis with nIntervals along each direction.
VectorSpaceLeastSquares.PiecewiseConstantBasis — MethodPiecewiseConstantBasis(nVariates::Integer, nIntervals::Vector{<:Integer})Create a PiecewiseConstantBasis by specifying the number of intervals per direction (possibly different to allow non squared grids).