Descriptor

Defines the number of variables, number of parameters, and order(s) for each in the GTPSA

Syntax

d = Descriptor(num_vars, max_order)     
d = Descriptor(vars_orders, max_order)
d = Descriptor(num_vars, max_order, num_params, param_order)   
d = Descriptor(vars_orders, max_order, params_orders, param_order)

GTPSA.desc_current = d

Description

d = Descriptor(num_vars, max_order) defines a GTPSA Descriptor with num_vars variables and a maximum truncation order max_order

d = Descriptor(vars_orders, max_order) defines a GTPSA Descriptor with length(var_orders) variables each having individual truncation orders specified in the var_orders vector, and a maximum truncation order max_order for the entire monomial

d = Descriptor(num_vars, max_order, num_params, param_order) defines a GTPSA Descriptor with num_vars variables and num_params parameters. The parameters part of a monomial is truncated at param_order, and the entire monomial is truncated at max_order (so param_order <= max_order)

d = Descriptor(vars_orders, max_order, params_orders, param_order) defines a GTPSA Descriptor with length(var_orders) variables each having individual truncation orders specified in the vars_orders vector, and length(param_orders) parameters each having individual truncation orders specified in the params_orders vector. The parameters part of the monomial is truncated at param_order, and the entire monomial is truncated at max_order (so param_order <= max_order)


GTPSA.desc_current is a global variable that is set each time a user creates a new Descriptor, and can also be set manually by a user. GTPSA.desc_current defines the Descriptor to use when that information is not explicitly (or implicitly in a TPS copy constructor) available, e.g. when calling TPS(a) where a is not a TPS. This also allows one to use general Number commands like convert(TPS, a) and zeros(TPS, 6).

Examples


julia> d1 = Descriptor(2, 10)GTPSA Descriptor ----------------------- # Variables: 2 Maximum order: 10
julia> d2 = Descriptor([1, 2, 3], 5)GTPSA Descriptor ----------------------- # Variables: 3 Variable orders: [1, 2, 3] Maximum order: 5
julia> d3 = Descriptor(3, 4, 1, 2)GTPSA Descriptor ----------------------- # Variables: 3 Maximum order: 4 # Parameters: 1 Parameter order: 2
julia> d4 = Descriptor([6, 5], 8, [4, 3], 7)GTPSA Descriptor ----------------------- # Variables: 2 Variable orders: [6, 5] Maximum order: 8 # Parameters: 2 Parameter orders: [4, 3] Parameter order: 7
julia> GTPSA.desc_current = d1GTPSA Descriptor ----------------------- # Variables: 2 Maximum order: 10

Documentation

GTPSA.DescriptorType
Descriptor(nv::Integer, mo::Integer)::Descriptor

Creates a TPSA Descriptor with nv variables, and a maximum truncation order mo.

Input

  • nv – Number of variables in the TPSA
  • mo – Maximum truncation order of the TPSA
source
Descriptor(vos::Vector{<:Integer}, mo::Integer)::Descriptor

Creates a TPSA Descriptor with length(vos) variables with individual truncation orders specified in the Vector vos, and a maximum truncation order mo for the TPSA.

Input

  • vosVector of the individual truncation orders of each variable
  • mo – Maximum truncation order of the TPSA, <= sum(vos)
source
Descriptor(nv::Integer, mo::Integer, np::Integer, po::Integer)::Descriptor

Creates a TPSA Descriptor with nv variables and np parameters. The maximum truncation order is mo (including the parameters), and the truncation order for the parameters part of a monomial is po.

Input

  • nv – Number of variables in the TPSA
  • mo – Maximum truncation order of the TPSA including variables and parameters
  • np – Number of parameters in the TPSA
  • po – Truncation order of the parameters part of a monomial
source
Descriptor(vos::Vector{<:Integer}, mo::Integer, pos::Vector{<:Integer}, po::Integer)::Descriptor

Creates a TPSA Descriptor with length(vos) variables with individual truncation orders specified in vos, and length(pos) parameters with individual truncation orders specified in pos. The maximum truncation order including both variables and parameters is mo, and the truncation order for just the parameters part of the is po.

Input

  • vosVector of the individual truncation orders of each variable
  • mo – Maximum truncation order of the TPSA including variables and parameters
  • posVector of the individual truncation orders of each parameter
  • po – Truncation order of the parameters part of a monomial
source