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 # Used in dynamic Descriptor resolution
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 dynamic Descriptor
resolution is used and a Descriptor
cannot be inferred, e.g. when calling TPS(a)
where a
is not a TPS
.
Examples
julia> da = Descriptor(2, 10)
Descriptor(NV=2, MO=10)
julia> db = Descriptor([1, 2, 3], 5)
Descriptor(NV=3, VOS=[1, 2, 3], MO=5)
julia> dc = Descriptor(3, 4, 1, 2)
Descriptor(NV=3, MO=4, NP=1, PO=2)
julia> dd = Descriptor([6, 5], 8, [4, 3], 7)
Descriptor(NV=2, VOS=[6, 5], MO=8, NP=2, POS=[4, 3], PO=7)
julia> GTPSA.desc_current = d1
ERROR: UndefVarError: `d1` not defined
Documentation
GTPSA.Descriptor
— TypeDescriptor(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 TPSAmo
– Maximum truncation order of the TPSA
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
vos
–Vector
of the individual truncation orders of each variablemo
– Maximum truncation order of the TPSA, <= sum(vos)
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 TPSAmo
– Maximum truncation order of the TPSA including variables and parametersnp
– Number of parameters in the TPSApo
– Truncation order of the parameters part of a monomial
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
vos
–Vector
of the individual truncation orders of each variablemo
– Maximum truncation order of the TPSA including variables and parameterspos
–Vector
of the individual truncation orders of each parameterpo
– Truncation order of the parameters part of a monomial