Ronis,
I want you to know that I have incorporated your pretty table into my module
module PDFPs
import Base: ==, +, -, *, /, \, ^, <, <=, %, Γ·, mod, fld, cld, floor, ceil
import Base: float, inv, round, <<, >>
import Base: sqrt, cbrt, show, factorial
# Unfortunately getproperty slows down PDFP so we disable it from version 2.1.5
# import Base: getproperty
using PrettyTables, SpecialFunctions, ForwardDiff, LinearAlgebra, Statistics, Distributions
function prettytable1D(vector,label::String)
len = length(vector)
matrix = Array{Any,2}(undef,len,2);
for row in 1:len
matrix[row,1] = row - 1
matrix[row,2] = vector[row]
end
pretty_table(matrix,["depth",label])
end
function prettytable2D(vector)
len = length(vector)
matrix = Array{Any,2}(undef,len,3);
for row in 1:len
matrix[row,1] = row - 1
matrix[row,2] = vector[row][1]
matrix[row,3] = vector[row][2]
end
pretty_table(matrix,["depth","x","y"])
end
result = PDFP_newtonRaphson_multifunc_multivariate(f,value,20,true,DiffMethod="Automatic",LogDict=logdict)
tracklog = logdict["tracklog"]
tracklog_string = PDFP_convertVecVectoString(tracklog)
println()
println("=== tracklog ===")
prettytable2D(tracklog_string)
=== tracklog ===
βββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββ
β depth β x β y β
βββββββββΌββββββββββββββββββββΌβββββββββββββββββββββ€
β 0 β 2.000000000000000 β 3.000000000000000 β
β 1 β 1.499999999999999 β 1.500000000000000 β
β 2 β 1.583333333333333 β 0.9166666666666665 β
β 3 β 1.675484094052559 β 0.8940179806362377 β
β 4 β 1.674148101652140 β 0.8959765160151239 β
β 5 β 1.674149228035889 β 0.8959774761302971 β
β 6 β 1.674149228035540 β 0.8959774761298381 β
βββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββ
=== vectordiff ===
βββββββββ¬βββββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β depth β x β y β
βββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β 0 β -0.5000000000000007 β -1.500000000000000 β
β 1 β 0.08333333333333420 β -0.5833333333333335 β
β 2 β 0.09215076071922585 β -0.02264868603042876 β
β 3 β -0.001335992400419135 β 0.001958535378886226 β
β 4 β 1.126383749322501E-6 β 9.601151732034509E-7 β
β 5 β -3.489329826610390E-13 β -4.589578360097503E-13 β
β 6 β -9.286509053016300E-17 β 4.969988818226068E-17 β
βββββββββ΄βββββββββββββββββββββββββ΄βββββββββββββββββββββββββ
=== score ===
βββββββββ¬ββββββββββββββββββββββββ
β depth β score β
βββββββββΌββββββββββββββββββββββββ€
β 0 β 130.0000000000000 β
β 1 β 6.250000000000003 β
β 2 β 0.1205632716049392 β
β 3 β 8.108508457272838E-5 β
β 4 β 3.159267906972166E-11 β
β 5 β 4.793890810000000E-24 β
β 6 β 1.600000000000000E-31 β
βββββββββ΄ββββββββββββββββββββββββ