I/O

Global Variables

There are three non-constant global variables which can be set to customize the printed output of TPSs:

show_eps::Float64 =  0.0     # Print epsilon
show_sparse::Bool = false    # Use sparse monomial print
show_header::Bool = false    # Print a header above each TPS

show_eps defines the value below which the absolute value of a monomial coefficient is NOT printed

show_sparse specifies whether the sparse monomial format is used for printing. This is useful for GTPSAs containing a large number of variables and parameters

show_header specifies whether or not to print the GTPSA Descriptor information above each TPS output

Examples


julia> d = Descriptor(100, 1, 10, 1)GTPSA Descriptor ----------------------- # Variables: 100 Maximum order: 1 # Parameters: 10 Parameter order: 1
julia> x = vars() # Doesn't fit on screen100-element Vector{TPS64}: Out Coefficient Order Exponent -------------------------------------------------------------------------------- 1: 1.0000000000000000e+00 1 1 0 0 0 0 0 0 0 0 ⋯ -------------------------------------------------------------------------------- 2: 1.0000000000000000e+00 1 0 1 0 0 0 0 0 0 0 ⋯ -------------------------------------------------------------------------------- 3: 1.0000000000000000e+00 1 0 0 1 0 0 0 0 0 0 ⋯ -------------------------------------------------------------------------------- 4: 1.0000000000000000e+00 1 0 0 0 1 0 0 0 0 0 ⋯ -------------------------------------------------------------------------------- 5: 1.0000000000000000e+00 1 0 0 0 0 1 0 0 0 0 ⋯ -------------------------------------------------------------------------------- 6: 1.0000000000000000e+00 1 0 0 0 0 0 1 0 0 0 ⋯ -------------------------------------------------------------------------------- 7: 1.0000000000000000e+00 1 0 0 0 0 0 0 1 0 0 ⋯ -------------------------------------------------------------------------------- 8: 1.0000000000000000e+00 1 0 0 0 0 0 0 0 1 0 ⋯ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋱ 102 columns and 93 rows omitted
julia> GTPSA.show_sparse = true;
julia> x100-element Vector{TPS64}: Out Coefficient Order Monomial -------------------------------------------------- 1: 1.0000000000000000e+00 1 (x₁)¹ -------------------------------------------------- 2: 1.0000000000000000e+00 1 (x₂)¹ -------------------------------------------------- 3: 1.0000000000000000e+00 1 (x₃)¹ -------------------------------------------------- 4: 1.0000000000000000e+00 1 (x₄)¹ -------------------------------------------------- 5: 1.0000000000000000e+00 1 (x₅)¹ -------------------------------------------------- 6: 1.0000000000000000e+00 1 (x₆)¹ -------------------------------------------------- 7: 1.0000000000000000e+00 1 (x₇)¹ -------------------------------------------------- 8: 1.0000000000000000e+00 1 (x₈)¹ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ 93 rows omitted
julia> GTPSA.show_header = truetrue
julia> x[1]TPS64: ----------------------- # Variables: 100 Maximum order: 1 # Parameters: 10 Parameter order: 1 ----------------------- Coefficient Order Monomial 1.0000000000000000e+00 1 (x₁)¹