content
stringlengths
5
1.03M
input_ids
sequencelengths
4
823k
ratio_char_token
float64
0.4
12.5
token_count
int64
4
823k
""" SynchronousExecution Functor object for using synchronous execution in a progressive-hedging algorithm (assuming multiple Julia cores are available). Create by supplying a [`Synchronous`](@ref) object through `execution` in the `ProgressiveHedgingSolver` factory function and then pass to a `StochasticPrograms.jl` model. """ struct SynchronousExecution{T <: AbstractFloat, A <: AbstractVector, PT <: AbstractPenaltyterm} <: AbstractProgressiveHedgingExecution subworkers::Vector{SubWorker{T,A,PT}} function SynchronousExecution(::Type{T}, ::Type{A}, ::Type{PT}) where {T <: AbstractFloat, A <: AbstractVector, PT <: AbstractPenaltyterm} return new{T,A,PT}(Vector{SubWorker{T,A,PT}}(undef, nworkers())) end end function initialize_subproblems!(ph::AbstractProgressiveHedging, execution::SynchronousExecution, scenarioproblems::DistributedScenarioProblems, penaltyterm::AbstractPenaltyterm) # Create subproblems on worker processes initialize_subproblems!(ph, execution.subworkers, scenarioproblems, penaltyterm) # Initial reductions update_iterate!(ph) update_dual_gap!(ph) return nothing end function restore_subproblems!(::AbstractProgressiveHedging, execution::SynchronousExecution) restore_subproblems!(execution.subworkers) return nothing end function resolve_subproblems!(ph::AbstractProgressiveHedging, execution::SynchronousExecution{T}) where T <: AbstractFloat partial_solutions = Vector{SubproblemSolution{T}}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_solutions[i] = remotecall_fetch(resolve_subproblems!, w, execution.subworkers[w-1], ph.ξ, penalty(ph)) end end return sum(partial_solutions) end function update_iterate!(ph::AbstractProgressiveHedging, execution::SynchronousExecution{T,A}) where {T <: AbstractFloat, A <: AbstractVector} partial_primals = Vector{A}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_primals[i] = remotecall_fetch(collect_primals, w, execution.subworkers[w-1], length(ph.ξ)) end end ξ_prev = copy(ph.ξ) ph.ξ .= sum(partial_primals) # Update δ₁ ph.data.δ₁ = norm(ph.ξ - ξ_prev, 2) ^ 2 return nothing end function update_subproblems!(ph::AbstractProgressiveHedging, execution::SynchronousExecution) # Update dual prices @sync begin for w in workers() @async remotecall_fetch( w, execution.subworkers[w-1], ph.ξ, penalty(ph)) do sw, ξ, r subproblems = fetch(sw) if length(subproblems) > 0 update_subproblems!(subproblems, ξ, r) end end end end return nothing end function update_dual_gap!(ph::AbstractProgressiveHedging, execution::SynchronousExecution) return update_dual_gap!(ph, execution.subworkers) end function calculate_objective_value(ph::AbstractProgressiveHedging, execution::SynchronousExecution) return calculate_objective_value(execution.subworkers) end function scalar_subproblem_reduction(value::Function, execution::SynchronousExecution{T}) where T <: AbstractFloat partial_results = Vector{T}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_results[i] = remotecall_fetch(w, execution.subworkers[w-1], value) do sw, value subproblems = fetch(sw) return mapreduce(+, subproblems, init = zero(T)) do subproblem π = subproblem.probability return π * value(subproblem) end end end end return sum(partial_results) end function vector_subproblem_reduction(value::Function, execution::SynchronousExecution{T,A}, n::Integer) where {T <: AbstractFloat, A <: AbstractVector} partial_results = Vector{A}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_results[i] = remotecall_fetch(w, execution.subworkers[w-1], value, n) do sw, value, n subproblems = fetch(sw) return mapreduce(+, subproblems, init = zero(T, n)) do subproblem π = subproblem.probability return π * value(subproblem) end end end end return sum(partial_results) end # API # ------------------------------------------------------------ function (execution::Synchronous)(::Type{T}, ::Type{A}, ::Type{PT}) where {T <: AbstractFloat, A <: AbstractVector, PT <: AbstractPenaltyterm} return SynchronousExecution(T,A,PT) end function str(::Synchronous) return "Synchronous " end
[ 37811, 198, 220, 220, 220, 16065, 11413, 516, 23002, 1009, 198, 198, 24629, 2715, 2134, 329, 1262, 18305, 516, 9706, 287, 257, 10393, 12, 704, 2667, 11862, 357, 32935, 3294, 22300, 21758, 389, 1695, 737, 13610, 416, 28099, 257, 685, 63, 50, 31301, 63, 16151, 31, 5420, 8, 2134, 832, 4600, 18558, 1009, 63, 287, 262, 4600, 2964, 19741, 39, 276, 2667, 50, 14375, 63, 8860, 2163, 290, 788, 1208, 284, 257, 4600, 1273, 5374, 3477, 15167, 82, 13, 20362, 63, 2746, 13, 198, 198, 37811, 198, 7249, 16065, 11413, 516, 23002, 1009, 90, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 1279, 25, 27741, 2964, 19741, 39, 276, 2667, 23002, 1009, 198, 220, 220, 220, 850, 22896, 3712, 38469, 90, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 11709, 628, 220, 220, 220, 2163, 16065, 11413, 516, 23002, 1009, 7, 3712, 6030, 90, 51, 5512, 7904, 6030, 90, 32, 5512, 7904, 6030, 90, 11571, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 51, 11, 32, 11, 11571, 92, 7, 38469, 90, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 11709, 7, 917, 891, 11, 299, 22896, 3419, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 41216, 62, 7266, 1676, 22143, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 3712, 50, 31301, 23002, 1009, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 3712, 20344, 6169, 3351, 39055, 2964, 22143, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 4354, 3712, 23839, 25553, 6017, 4354, 8, 198, 220, 220, 220, 1303, 13610, 850, 1676, 22143, 319, 8383, 7767, 198, 220, 220, 220, 41216, 62, 7266, 1676, 22143, 0, 7, 746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 13, 7266, 22896, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 4354, 8, 198, 220, 220, 220, 1303, 20768, 20691, 198, 220, 220, 220, 4296, 62, 2676, 378, 0, 7, 746, 8, 198, 220, 220, 220, 4296, 62, 646, 282, 62, 43554, 0, 7, 746, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 11169, 62, 7266, 1676, 22143, 0, 7, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 8, 198, 220, 220, 220, 11169, 62, 7266, 1676, 22143, 0, 7, 18558, 1009, 13, 7266, 22896, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 10568, 62, 7266, 1676, 22143, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 90, 51, 30072, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 13027, 62, 82, 14191, 796, 20650, 90, 7004, 45573, 46344, 90, 51, 11709, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 86, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 82, 14191, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 411, 6442, 62, 7266, 1676, 22143, 28265, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 13, 7266, 22896, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 872, 13, 138, 122, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 7, 746, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 47172, 62, 82, 14191, 8, 198, 437, 198, 198, 8818, 4296, 62, 2676, 378, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 90, 51, 11, 32, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 317, 1279, 25, 27741, 38469, 92, 198, 220, 220, 220, 13027, 62, 19795, 874, 796, 20650, 90, 32, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 86, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 19795, 874, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 33327, 62, 19795, 874, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 13, 7266, 22896, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4129, 7, 746, 13, 138, 122, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7377, 122, 62, 47050, 796, 4866, 7, 746, 13, 138, 122, 8, 198, 220, 220, 220, 872, 13, 138, 122, 764, 28, 2160, 7, 47172, 62, 19795, 874, 8, 198, 220, 220, 220, 1303, 10133, 7377, 112, 158, 224, 223, 198, 220, 220, 220, 872, 13, 7890, 13, 138, 112, 158, 224, 223, 796, 2593, 7, 746, 13, 138, 122, 532, 7377, 122, 62, 47050, 11, 362, 8, 10563, 362, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 4296, 62, 7266, 1676, 22143, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 8, 198, 220, 220, 220, 1303, 10133, 10668, 4536, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 266, 287, 3259, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 816, 313, 721, 439, 62, 69, 7569, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 13, 7266, 22896, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 872, 13, 138, 122, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 7, 746, 4008, 466, 1509, 11, 7377, 122, 11, 374, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 1676, 22143, 796, 21207, 7, 2032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 7266, 1676, 22143, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 7266, 1676, 22143, 0, 7, 7266, 1676, 22143, 11, 7377, 122, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 4296, 62, 646, 282, 62, 43554, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 8, 198, 220, 220, 220, 1441, 4296, 62, 646, 282, 62, 43554, 0, 7, 746, 11, 9706, 13, 7266, 22896, 8, 198, 437, 198, 198, 8818, 15284, 62, 15252, 425, 62, 8367, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 9706, 3712, 50, 31301, 23002, 1009, 8, 198, 220, 220, 220, 1441, 15284, 62, 15252, 425, 62, 8367, 7, 18558, 1009, 13, 7266, 22896, 8, 198, 437, 198, 198, 8818, 16578, 283, 62, 7266, 45573, 62, 445, 8110, 7, 8367, 3712, 22203, 11, 9706, 3712, 50, 31301, 23002, 1009, 90, 51, 30072, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 13027, 62, 43420, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 86, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 43420, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 86, 11, 9706, 13, 7266, 22896, 58, 86, 12, 16, 4357, 1988, 8, 466, 1509, 11, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 1676, 22143, 796, 21207, 7, 2032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3975, 445, 7234, 7, 28200, 850, 1676, 22143, 11, 2315, 796, 6632, 7, 51, 4008, 466, 850, 45573, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 796, 850, 45573, 13, 1676, 65, 1799, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 18074, 222, 1635, 1988, 7, 7266, 45573, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 47172, 62, 43420, 8, 198, 437, 198, 198, 8818, 15879, 62, 7266, 45573, 62, 445, 8110, 7, 8367, 3712, 22203, 11, 9706, 3712, 50, 31301, 23002, 1009, 90, 51, 11, 32, 5512, 299, 3712, 46541, 8, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 317, 1279, 25, 27741, 38469, 92, 198, 220, 220, 220, 13027, 62, 43420, 796, 20650, 90, 32, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 86, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 43420, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 86, 11, 9706, 13, 7266, 22896, 58, 86, 12, 16, 4357, 1988, 11, 299, 8, 466, 1509, 11, 1988, 11, 299, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 1676, 22143, 796, 21207, 7, 2032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3975, 445, 7234, 7, 28200, 850, 1676, 22143, 11, 2315, 796, 6632, 7, 51, 11, 299, 4008, 466, 850, 45573, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 796, 850, 45573, 13, 1676, 65, 1799, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 18074, 222, 1635, 1988, 7, 7266, 45573, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 47172, 62, 43420, 8, 198, 437, 198, 198, 2, 7824, 198, 2, 20368, 1783, 10541, 198, 8818, 357, 18558, 1009, 3712, 50, 31301, 5769, 3712, 6030, 90, 51, 5512, 7904, 6030, 90, 32, 5512, 7904, 6030, 90, 11571, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 1441, 16065, 11413, 516, 23002, 1009, 7, 51, 11, 32, 11, 11571, 8, 198, 437, 198, 198, 8818, 965, 7, 3712, 50, 31301, 8, 198, 220, 220, 220, 1441, 366, 50, 31301, 366, 198, 437, 198 ]
1.983793
2,900
function simulate_waveforms( mcevents::TypedTables.Table, sim::Simulation{T}, output_dir::AbstractString, output_base_name::AbstractString = "generated_waveforms"; chunk_n_physics_events::Int = 1000, Δt::RealQuantity = 4u"ns", max_nsteps::Int = 1000, diffusion::Bool = false, self_repulsion::Bool = false, number_of_carriers::Int = 1, number_of_shells::Int = 1, verbose = false) where {T <: SSDFloat} n_total_physics_events = length(mcevents) Δtime = T(to_internal_units(Δt)) n_contacts = length(sim.detector.contacts) @info "Detector has $(n_contacts) contact(s)" contacts = sim.detector.contacts if !ispath(output_dir) mkpath(output_dir) end nfmt(i::Int) = format(i, zeropadding = true, width = length(digits(n_total_physics_events))) evt_ranges = chunked_ranges(n_total_physics_events, chunk_n_physics_events) @info "-> $(length(flatview(mcevents.edep))) energy depositions to simulate." for evtrange in evt_ranges ofn = joinpath(output_dir, "$(output_base_name)_evts_$(nfmt(first(evtrange)))-$(nfmt(last(evtrange))).h5") @info "Now simulating $(evtrange) and storing it in\n\t \"$ofn\"" mcevents_sub = simulate_waveforms(mcevents[evtrange], sim; Δt, max_nsteps, diffusion, self_repulsion, number_of_carriers, number_of_shells, verbose) HDF5.h5open(ofn, "w") do output LegendHDF5IO.writedata(output, "generated_waveforms", mcevents_sub) end end end
[ 8818, 29308, 62, 19204, 23914, 7, 285, 344, 85, 658, 3712, 31467, 276, 51, 2977, 13, 10962, 11, 985, 3712, 8890, 1741, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 15908, 3712, 23839, 10100, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 8692, 62, 3672, 3712, 23839, 10100, 796, 366, 27568, 62, 19204, 23914, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16058, 62, 77, 62, 746, 23154, 62, 31534, 3712, 5317, 796, 8576, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 83, 3712, 15633, 31208, 796, 604, 84, 1, 5907, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 77, 20214, 3712, 5317, 796, 8576, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44258, 3712, 33, 970, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 62, 7856, 15204, 3712, 33, 970, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1271, 62, 1659, 62, 7718, 8910, 3712, 5317, 796, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1271, 62, 1659, 62, 29149, 82, 3712, 5317, 796, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 796, 3991, 8, 810, 1391, 51, 1279, 25, 6723, 8068, 5439, 265, 92, 198, 220, 220, 220, 299, 62, 23350, 62, 746, 23154, 62, 31534, 796, 4129, 7, 76, 344, 85, 658, 8, 198, 220, 220, 220, 37455, 2435, 796, 309, 7, 1462, 62, 32538, 62, 41667, 7, 138, 242, 83, 4008, 220, 198, 220, 220, 220, 299, 62, 3642, 8656, 796, 4129, 7, 14323, 13, 15255, 9250, 13, 3642, 8656, 8, 198, 220, 220, 220, 2488, 10951, 366, 11242, 9250, 468, 29568, 77, 62, 3642, 8656, 8, 2800, 7, 82, 16725, 198, 220, 220, 220, 13961, 796, 985, 13, 15255, 9250, 13, 3642, 8656, 198, 220, 220, 220, 611, 5145, 271, 6978, 7, 22915, 62, 15908, 8, 33480, 6978, 7, 22915, 62, 15908, 8, 886, 198, 220, 220, 220, 299, 69, 16762, 7, 72, 3712, 5317, 8, 796, 5794, 7, 72, 11, 1976, 263, 404, 26872, 796, 2081, 11, 9647, 796, 4129, 7, 12894, 896, 7, 77, 62, 23350, 62, 746, 23154, 62, 31534, 22305, 198, 220, 220, 220, 819, 83, 62, 81, 6231, 796, 16058, 276, 62, 81, 6231, 7, 77, 62, 23350, 62, 746, 23154, 62, 31534, 11, 16058, 62, 77, 62, 746, 23154, 62, 31534, 8, 198, 220, 220, 220, 2488, 10951, 366, 3784, 29568, 13664, 7, 38568, 1177, 7, 76, 344, 85, 658, 13, 276, 538, 22305, 2568, 12304, 1756, 284, 29308, 526, 628, 220, 220, 220, 329, 819, 2213, 858, 287, 819, 83, 62, 81, 6231, 198, 220, 220, 220, 220, 220, 220, 220, 286, 77, 796, 4654, 6978, 7, 22915, 62, 15908, 11, 17971, 7, 22915, 62, 8692, 62, 3672, 8, 62, 1990, 912, 62, 3, 7, 77, 69, 16762, 7, 11085, 7, 1990, 2213, 858, 4008, 13219, 3, 7, 77, 69, 16762, 7, 12957, 7, 1990, 2213, 858, 4008, 737, 71, 20, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 3844, 985, 8306, 29568, 1990, 2213, 858, 8, 290, 23069, 340, 287, 59, 77, 59, 83, 19990, 3, 1659, 77, 7879, 1, 198, 220, 220, 220, 220, 220, 220, 220, 285, 344, 85, 658, 62, 7266, 796, 29308, 62, 19204, 23914, 7, 76, 344, 85, 658, 58, 1990, 2213, 858, 4357, 985, 26, 37455, 83, 11, 3509, 62, 77, 20214, 11, 44258, 11, 2116, 62, 7856, 15204, 11, 1271, 62, 1659, 62, 7718, 8910, 11, 1271, 62, 1659, 62, 29149, 82, 11, 15942, 577, 8, 198, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5572, 37, 20, 13, 71, 20, 9654, 7, 1659, 77, 11, 366, 86, 4943, 466, 5072, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9883, 39, 8068, 20, 9399, 13, 8933, 276, 1045, 7, 22915, 11, 366, 27568, 62, 19204, 23914, 1600, 285, 344, 85, 658, 62, 7266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 886, 220, 220, 220, 220, 198, 437, 198 ]
1.941566
907
module CoolPkg export add2 """ add2(a, b) Adds two numbers together... * `a`: A number * `b`: Another number """ add2(a, b) = a + b end
[ 21412, 15226, 47, 10025, 198, 198, 39344, 751, 17, 198, 198, 37811, 198, 220, 220, 220, 751, 17, 7, 64, 11, 275, 8, 220, 220, 220, 220, 198, 198, 46245, 734, 3146, 1978, 986, 198, 198, 9, 4600, 64, 63, 25, 317, 1271, 198, 9, 4600, 65, 63, 25, 6023, 1271, 198, 37811, 198, 2860, 17, 7, 64, 11, 275, 8, 796, 257, 1343, 275, 198, 198, 437, 198 ]
2.15942
69
#------------------------------------------------------------------------------- # This function creates an instance of SNEASY+FUND. #------------------------------------------------------------------------------- # Load required packages. using Mimi using MimiFUND using MimiSNEASY using DataFrames using CSVFiles function create_sneasy_fundch4(;rcp_scenario::String="RCP85", start_year::Int=1765, end_year::Int=2300, etminan_ch4_forcing::Bool=true) # --------------------------------------------- # Load and clean up necessary data. # --------------------------------------------- # Load RCP emissions and concentration scenario values (RCP options = "RCP26" and "RCP85"). rcp_emissions = DataFrame(load(joinpath(@__DIR__, "..", "..", "data", "model_data", rcp_scenario*"_emissions.csv"), skiplines_begin=36)) rcp_concentrations = DataFrame(load(joinpath(@__DIR__, "..", "..", "data", "model_data", rcp_scenario*"_concentrations.csv"), skiplines_begin=37)) rcp_forcing = DataFrame(load(joinpath(@__DIR__, "..", "..", "data", "model_data", rcp_scenario*"_midyear_radforcings.csv"), skiplines_begin=58)) # Load FUND data for RCP non-methane tropospheric ozone radiative forcing. fund_non_CH₄_O₃forcing = DataFrame(load(joinpath(@__DIR__, "..", "..", "data", "model_data", rcp_scenario*"_nonch4_tropo3_forcing_fund.csv"))) # Find start and end year indices to crop RCP scenario data to correct model time horizon. rcp_indices = findall((in)(collect(start_year:end_year)), rcp_emissions.YEARS) # Set pre-industrial atmospheric CO₂, CH₄, and N₂O concentrations to RCP values in 1765. CO₂_0 = rcp_concentrations[rcp_concentrations.YEARS .== 1765, :CO2][1] CH₄_0 = rcp_concentrations[rcp_concentrations.YEARS .== 1765, :CH4][1] N₂O_0 = rcp_concentrations[rcp_concentrations.YEARS .== 1765, :N2O][1] # Calculate carbon dioxide emissions as well as aerosol and exogenous RCP radiative forcing scenarios. rcp_co2_emissions = rcp_emissions.FossilCO2 .+ rcp_emissions.OtherCO2 rcp_aerosol_forcing = rcp_forcing.TOTAER_DIR_RF .+ rcp_forcing.CLOUD_TOT_RF rcp_exogenous_forcing = rcp_forcing.TOTAL_INCLVOLCANIC_RF .- rcp_forcing.CO2_RF .- rcp_forcing.CH4_RF .- rcp_forcing.TROPOZ_RF .+ fund_non_CH₄_O₃forcing.nonch4_forcing .- rcp_forcing.CH4OXSTRATH2O_RF .- rcp_aerosol_forcing # ------------------------------------------------------------ # Initialize Mimi-SNEASY and add new CH₄ components to model. # ------------------------------------------------------------ # Get an instance of Mimi-SNEASY. m = MimiSNEASY.get_model(start_year=start_year, end_year=end_year) # Remove old radiative forcing components. delete!(m, :rfco2) delete!(m, :radiativeforcing) # Add in new components. add_comp!(m, rf_total, before = :doeclim) add_comp!(m, rf_co2_etminan, before = :rf_total) add_comp!(m, rf_ch4_total_fund, before = :rf_co2_etminan) add_comp!(m, MimiFUND.climatech4cycle , before= :rf_ch4_total_fund) # Add in user-specified CH₄ radiative forcing component. # Note: If not using Etminan et al. equations, use original forcing equations from parent CH₄ model. if etminan_ch4_forcing == true add_comp!(m, rf_ch4_etminan, before = :rf_ch4_total_fund) else add_comp!(m, rf_ch4_direct_fund, before = :rf_ch4_total_fund) end # --------------------------------------------- # Set component parameters. # --------------------------------------------- # ---- Common parameters --- Mimi.set_external_param!(m, :CH₄_0, CH₄_0) Mimi.set_external_param!(m, :N₂O_0, N₂O_0) Mimi.set_external_param!(m, :N₂O, rcp_concentrations.N2O[rcp_indices], param_dims=[:time]) # ---- Carbon Cycle ---- # update_param!(m, :CO2_emissions, rcp_co2_emissions[rcp_indices]) update_param!(m, :atmco20, CO₂_0) # ---- Methane Cycle ---- # set_param!(m, :climatech4cycle, :lifech4, 12.0) set_param!(m, :climatech4cycle, :ch4pre, CH₄_0) set_param!(m, :climatech4cycle, :globch4, rcp_emissions.CH4[rcp_indices]) set_param!(m, :climatech4cycle, :acch4_0, CH₄_0) # ---- Direct Methane Radiative Forcing ---- # if etminan_ch4_forcing == true connect_param!(m, :rf_ch4_etminan, :CH₄_0, :CH₄_0) connect_param!(m, :rf_ch4_etminan, :N₂O_0, :N₂O_0) set_param!(m, :rf_ch4_etminan, :scale_CH₄, 1.0) set_param!(m, :rf_ch4_etminan, :a₃, -1.3e-6) set_param!(m, :rf_ch4_etminan, :b₃, -8.2e-6) connect_param!(m, :rf_ch4_etminan, :N₂O, :N₂O) else connect_param!(m, :rf_ch4_direct_fund, :N₂O_0, :N₂O_0) connect_param!(m, :rf_ch4_direct_fund, :CH₄_0, :CH₄_0) set_param!(m, :rf_ch4_direct_fund, :scale_CH₄, 1.0) end # ---- Total Methane Radiative Forcing (including indirect effects) ---- # connect_param!(m, :rf_ch4_total_fund, :CH₄_0, :CH₄_0) set_param!(m, :rf_ch4_total_fund, :ϕ, 0.4) # ---- Carbon Dioxide Radiative Forcing ---- # set_param!(m, :rf_co2_etminan, :a₁, -2.4e-7) set_param!(m, :rf_co2_etminan, :b₁, 7.2e-4) set_param!(m, :rf_co2_etminan, :c₁, -2.1e-4) set_param!(m, :rf_co2_etminan, :CO₂_0, CO₂_0) connect_param!(m, :rf_co2_etminan, :N₂O_0, :N₂O_0) connect_param!(m, :rf_co2_etminan, :N₂O, :N₂O) set_param!(m, :rf_co2_etminan, :rf_scale_CO₂, co2_rf_scale(3.7, CO₂_0, N₂O_0)) # ---- Total Radiative Forcing ---- # set_param!(m, :rf_total, :α, 1.0) # TODO It would be nice if `rf_aerosol` didn't exist as an external parameter # at this point connect_param!(m, :rf_total, :rf_aerosol, :rf_aerosol) update_param!(m, :rf_aerosol, rcp_aerosol_forcing[rcp_indices]) set_param!(m, :rf_total, :rf_exogenous, rcp_exogenous_forcing[rcp_indices]) set_param!(m, :rf_total, :rf_O₃, zeros(length(start_year:end_year))) set_param!(m, :rf_total, :rf_CH₄_H₂O, zeros(length(start_year:end_year))) # ---------------------------------------------------------- # Create connections between Mimi SNEASY+Hector components. # ---------------------------------------------------------- connect_param!(m, :doeclim, :forcing, :rf_total, :total_forcing) connect_param!(m, :ccm, :temp, :doeclim, :temp) connect_param!(m, :rf_co2_etminan, :CO₂, :ccm, :atmco2) connect_param!(m, :rf_ch4_total_fund, :CH₄, :climatech4cycle, :acch4) # Create different connections if using updated Etminan et al. CH₄ forcing equations. if etminan_ch4_forcing == true connect_param!(m, :rf_ch4_etminan, :CH₄, :climatech4cycle, :acch4) connect_param!(m, :rf_ch4_total_fund, :rf_ch4_direct, :rf_ch4_etminan, :rf_CH₄) else connect_param!(m, :rf_ch4_direct_fund, :CH₄, :climatech4cycle, :acch4) connect_param!(m, :rf_ch4_total_fund, :rf_ch4_direct, :rf_ch4_direct_fund, :rf_ch4_direct) end connect_param!(m, :rf_total, :rf_CH₄, :rf_ch4_total_fund, :rf_ch4_total) connect_param!(m, :rf_total, :rf_CO₂, :rf_co2_etminan, :rf_CO₂) # Return constructed model. return m end
[ 2, 10097, 24305, 198, 2, 770, 2163, 8075, 281, 4554, 286, 11346, 36, 26483, 10, 42296, 35, 13, 198, 2, 10097, 24305, 198, 198, 2, 8778, 2672, 10392, 13, 198, 3500, 337, 25236, 198, 3500, 337, 25236, 42296, 35, 198, 3500, 337, 25236, 50, 12161, 26483, 198, 3500, 6060, 35439, 198, 3500, 44189, 25876, 198, 198, 8818, 2251, 62, 82, 710, 4107, 62, 10990, 354, 19, 7, 26, 6015, 79, 62, 1416, 39055, 3712, 10100, 2625, 7397, 47, 5332, 1600, 923, 62, 1941, 3712, 5317, 28, 1558, 2996, 11, 886, 62, 1941, 3712, 5317, 28, 1954, 405, 11, 2123, 1084, 272, 62, 354, 19, 62, 18766, 3712, 33, 970, 28, 7942, 8, 628, 220, 220, 220, 1303, 20368, 32501, 198, 220, 220, 220, 1303, 8778, 290, 3424, 510, 3306, 1366, 13, 198, 220, 220, 220, 1303, 20368, 32501, 628, 220, 220, 220, 1303, 8778, 371, 8697, 8971, 290, 10368, 8883, 3815, 357, 7397, 47, 3689, 796, 366, 7397, 47, 2075, 1, 290, 366, 7397, 47, 5332, 11074, 198, 220, 220, 220, 374, 13155, 62, 368, 7717, 220, 220, 220, 220, 220, 796, 6060, 19778, 7, 2220, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 492, 1600, 366, 7890, 1600, 366, 19849, 62, 7890, 1600, 374, 13155, 62, 1416, 39055, 9, 1, 62, 368, 7717, 13, 40664, 12340, 19984, 489, 1127, 62, 27471, 28, 2623, 4008, 198, 220, 220, 220, 374, 13155, 62, 1102, 1087, 9143, 796, 6060, 19778, 7, 2220, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 492, 1600, 366, 7890, 1600, 366, 19849, 62, 7890, 1600, 374, 13155, 62, 1416, 39055, 9, 1, 62, 1102, 1087, 9143, 13, 40664, 12340, 19984, 489, 1127, 62, 27471, 28, 2718, 4008, 198, 220, 220, 220, 374, 13155, 62, 18766, 220, 220, 220, 220, 220, 220, 220, 796, 6060, 19778, 7, 2220, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 492, 1600, 366, 7890, 1600, 366, 19849, 62, 7890, 1600, 374, 13155, 62, 1416, 39055, 9, 1, 62, 13602, 1941, 62, 6335, 1640, 66, 654, 13, 40664, 12340, 19984, 489, 1127, 62, 27471, 28, 3365, 4008, 628, 220, 220, 220, 1303, 8778, 29397, 35, 1366, 329, 371, 8697, 1729, 12, 76, 2788, 1531, 14673, 2117, 15011, 37170, 19772, 876, 10833, 13, 198, 220, 220, 220, 1814, 62, 13159, 62, 3398, 158, 224, 226, 62, 46, 158, 224, 225, 18766, 796, 6060, 19778, 7, 2220, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 492, 1600, 366, 7890, 1600, 366, 19849, 62, 7890, 1600, 374, 13155, 62, 1416, 39055, 9, 1, 62, 13159, 354, 19, 62, 48385, 78, 18, 62, 18766, 62, 10990, 13, 40664, 1, 22305, 628, 220, 220, 220, 1303, 9938, 923, 290, 886, 614, 36525, 284, 13833, 371, 8697, 8883, 1366, 284, 3376, 2746, 640, 17810, 13, 198, 220, 220, 220, 374, 13155, 62, 521, 1063, 796, 1064, 439, 19510, 259, 5769, 33327, 7, 9688, 62, 1941, 25, 437, 62, 1941, 36911, 374, 13155, 62, 368, 7717, 13, 56, 17133, 50, 8, 628, 220, 220, 220, 1303, 5345, 662, 12, 31130, 20938, 7375, 158, 224, 224, 11, 5870, 158, 224, 226, 11, 290, 399, 158, 224, 224, 46, 14587, 284, 371, 8697, 3815, 287, 1596, 2996, 13, 198, 220, 220, 220, 7375, 158, 224, 224, 62, 15, 796, 374, 13155, 62, 1102, 1087, 9143, 58, 6015, 79, 62, 1102, 1087, 9143, 13, 56, 17133, 50, 764, 855, 1596, 2996, 11, 1058, 8220, 17, 7131, 16, 60, 198, 220, 220, 220, 5870, 158, 224, 226, 62, 15, 796, 374, 13155, 62, 1102, 1087, 9143, 58, 6015, 79, 62, 1102, 1087, 9143, 13, 56, 17133, 50, 764, 855, 1596, 2996, 11, 1058, 3398, 19, 7131, 16, 60, 198, 220, 220, 220, 399, 158, 224, 224, 46, 62, 15, 796, 374, 13155, 62, 1102, 1087, 9143, 58, 6015, 79, 62, 1102, 1087, 9143, 13, 56, 17133, 50, 764, 855, 1596, 2996, 11, 1058, 45, 17, 46, 7131, 16, 60, 628, 220, 220, 220, 1303, 27131, 378, 6588, 17556, 8971, 355, 880, 355, 41376, 349, 290, 409, 27897, 371, 8697, 19772, 876, 10833, 13858, 13, 198, 220, 220, 220, 374, 13155, 62, 1073, 17, 62, 368, 7717, 220, 220, 220, 220, 796, 374, 13155, 62, 368, 7717, 13, 37, 793, 346, 8220, 17, 764, 10, 374, 13155, 62, 368, 7717, 13, 6395, 8220, 17, 198, 220, 220, 220, 374, 13155, 62, 25534, 418, 349, 62, 18766, 220, 220, 796, 374, 13155, 62, 18766, 13, 51, 29009, 1137, 62, 34720, 62, 32754, 764, 10, 374, 13155, 62, 18766, 13, 5097, 2606, 35, 62, 51, 2394, 62, 32754, 198, 220, 220, 220, 374, 13155, 62, 1069, 27897, 62, 18766, 796, 374, 13155, 62, 18766, 13, 51, 27510, 62, 1268, 5097, 44558, 44565, 2149, 62, 32754, 764, 12, 374, 13155, 62, 18766, 13, 8220, 17, 62, 32754, 764, 12, 374, 13155, 62, 18766, 13, 3398, 19, 62, 32754, 764, 12, 374, 13155, 62, 18766, 13, 5446, 3185, 46, 57, 62, 32754, 764, 10, 1814, 62, 13159, 62, 3398, 158, 224, 226, 62, 46, 158, 224, 225, 18766, 13, 13159, 354, 19, 62, 18766, 764, 12, 374, 13155, 62, 18766, 13, 3398, 19, 48632, 18601, 12599, 17, 46, 62, 32754, 764, 12, 374, 13155, 62, 25534, 418, 349, 62, 18766, 628, 198, 220, 220, 220, 1303, 20368, 1783, 10541, 198, 220, 220, 220, 1303, 20768, 1096, 337, 25236, 12, 50, 12161, 26483, 290, 751, 649, 5870, 158, 224, 226, 6805, 284, 2746, 13, 198, 220, 220, 220, 1303, 20368, 1783, 10541, 628, 220, 220, 220, 1303, 3497, 281, 4554, 286, 337, 25236, 12, 50, 12161, 26483, 13, 198, 220, 220, 220, 285, 796, 337, 25236, 50, 12161, 26483, 13, 1136, 62, 19849, 7, 9688, 62, 1941, 28, 9688, 62, 1941, 11, 886, 62, 1941, 28, 437, 62, 1941, 8, 628, 220, 220, 220, 1303, 17220, 1468, 19772, 876, 10833, 6805, 13, 198, 220, 220, 220, 12233, 0, 7, 76, 11, 1058, 41871, 1073, 17, 8, 198, 220, 220, 220, 12233, 0, 7, 76, 11, 1058, 6335, 72, 876, 18766, 8, 628, 220, 220, 220, 1303, 3060, 287, 649, 6805, 13, 198, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 374, 69, 62, 23350, 11, 878, 796, 1058, 67, 2577, 565, 320, 8, 198, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 374, 69, 62, 1073, 17, 62, 316, 1084, 272, 11, 878, 796, 1058, 41871, 62, 23350, 8, 198, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 374, 69, 62, 354, 19, 62, 23350, 62, 10990, 11, 878, 796, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 8, 198, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 337, 25236, 42296, 35, 13, 42570, 354, 19, 13696, 837, 878, 28, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 8, 628, 220, 220, 220, 1303, 3060, 287, 2836, 12, 23599, 5870, 158, 224, 226, 19772, 876, 10833, 7515, 13, 198, 220, 220, 220, 1303, 5740, 25, 1002, 407, 1262, 17906, 1084, 272, 2123, 435, 13, 27490, 11, 779, 2656, 10833, 27490, 422, 2560, 5870, 158, 224, 226, 2746, 13, 198, 220, 220, 220, 611, 2123, 1084, 272, 62, 354, 19, 62, 18766, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 374, 69, 62, 354, 19, 62, 316, 1084, 272, 11, 878, 796, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 751, 62, 5589, 0, 7, 76, 11, 374, 69, 62, 354, 19, 62, 12942, 62, 10990, 11, 878, 796, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 8, 198, 220, 220, 220, 886, 628, 198, 220, 220, 220, 1303, 20368, 32501, 198, 220, 220, 220, 1303, 5345, 7515, 10007, 13, 198, 220, 220, 220, 1303, 20368, 32501, 628, 220, 220, 220, 1303, 13498, 8070, 10007, 11420, 198, 220, 220, 220, 337, 25236, 13, 2617, 62, 22615, 62, 17143, 0, 7, 76, 11, 1058, 3398, 158, 224, 226, 62, 15, 11, 5870, 158, 224, 226, 62, 15, 8, 198, 220, 220, 220, 337, 25236, 13, 2617, 62, 22615, 62, 17143, 0, 7, 76, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 11, 399, 158, 224, 224, 46, 62, 15, 8, 198, 220, 220, 220, 337, 25236, 13, 2617, 62, 22615, 62, 17143, 0, 7, 76, 11, 1058, 45, 158, 224, 224, 46, 11, 374, 13155, 62, 1102, 1087, 9143, 13, 45, 17, 46, 58, 6015, 79, 62, 521, 1063, 4357, 5772, 62, 67, 12078, 41888, 25, 2435, 12962, 628, 220, 220, 220, 1303, 13498, 23699, 26993, 13498, 1303, 198, 220, 220, 220, 4296, 62, 17143, 0, 7, 76, 11, 1058, 8220, 17, 62, 368, 7717, 11, 374, 13155, 62, 1073, 17, 62, 368, 7717, 58, 6015, 79, 62, 521, 1063, 12962, 198, 220, 220, 220, 4296, 62, 17143, 0, 7, 76, 11, 1058, 265, 76, 1073, 1238, 11, 7375, 158, 224, 224, 62, 15, 8, 628, 220, 220, 220, 1303, 13498, 39675, 1531, 26993, 13498, 1303, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 42570, 354, 19, 13696, 11, 1058, 6042, 354, 19, 11, 1105, 13, 15, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 42570, 354, 19, 13696, 11, 1058, 354, 19, 3866, 11, 5870, 158, 224, 226, 62, 15, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 42570, 354, 19, 13696, 11, 1058, 4743, 672, 354, 19, 11, 374, 13155, 62, 368, 7717, 13, 3398, 19, 58, 6015, 79, 62, 521, 1063, 12962, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 42570, 354, 19, 13696, 11, 1058, 330, 354, 19, 62, 15, 11, 5870, 158, 224, 226, 62, 15, 8, 628, 220, 220, 220, 1303, 13498, 4128, 39675, 1531, 5325, 72, 876, 1114, 2259, 13498, 1303, 198, 220, 220, 220, 611, 2123, 1084, 272, 62, 354, 19, 62, 18766, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 3398, 158, 224, 226, 62, 15, 11, 1058, 3398, 158, 224, 226, 62, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 9888, 62, 3398, 158, 224, 226, 11, 352, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 64, 158, 224, 225, 11, 532, 16, 13, 18, 68, 12, 21, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 65, 158, 224, 225, 11, 532, 23, 13, 17, 68, 12, 21, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 1058, 45, 158, 224, 224, 46, 11, 1058, 45, 158, 224, 224, 46, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 12942, 62, 10990, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 12942, 62, 10990, 11, 1058, 3398, 158, 224, 226, 62, 15, 11, 1058, 3398, 158, 224, 226, 62, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 12942, 62, 10990, 11, 1058, 9888, 62, 3398, 158, 224, 226, 11, 352, 13, 15, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 13498, 7472, 39675, 1531, 5325, 72, 876, 1114, 2259, 357, 8201, 12913, 3048, 8, 13498, 1303, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 1058, 3398, 158, 224, 226, 62, 15, 11, 1058, 3398, 158, 224, 226, 62, 15, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 1058, 139, 243, 11, 657, 13, 19, 8, 628, 220, 220, 220, 1303, 13498, 23699, 360, 16671, 5325, 72, 876, 1114, 2259, 13498, 1303, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 64, 158, 224, 223, 11, 532, 17, 13, 19, 68, 12, 22, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 65, 158, 224, 223, 11, 767, 13, 17, 68, 12, 19, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 66, 158, 224, 223, 11, 532, 17, 13, 16, 68, 12, 19, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 8220, 158, 224, 224, 62, 15, 11, 7375, 158, 224, 224, 62, 15, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 11, 1058, 45, 158, 224, 224, 46, 62, 15, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 45, 158, 224, 224, 46, 11, 1058, 45, 158, 224, 224, 46, 8, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 1058, 41871, 62, 9888, 62, 8220, 158, 224, 224, 11, 763, 17, 62, 41871, 62, 9888, 7, 18, 13, 22, 11, 7375, 158, 224, 224, 62, 15, 11, 399, 158, 224, 224, 46, 62, 15, 4008, 628, 220, 220, 220, 1303, 13498, 7472, 5325, 72, 876, 1114, 2259, 13498, 1303, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 17394, 11, 352, 13, 15, 8, 198, 220, 220, 220, 1303, 16926, 46, 632, 561, 307, 3621, 611, 4600, 41871, 62, 25534, 418, 349, 63, 1422, 470, 2152, 355, 281, 7097, 11507, 198, 220, 220, 220, 1303, 379, 428, 966, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 25534, 418, 349, 11, 1058, 41871, 62, 25534, 418, 349, 8, 198, 220, 220, 220, 4296, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 25534, 418, 349, 11, 374, 13155, 62, 25534, 418, 349, 62, 18766, 58, 6015, 79, 62, 521, 1063, 12962, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 1069, 27897, 11, 374, 13155, 62, 1069, 27897, 62, 18766, 58, 6015, 79, 62, 521, 1063, 12962, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 46, 158, 224, 225, 11, 1976, 27498, 7, 13664, 7, 9688, 62, 1941, 25, 437, 62, 1941, 22305, 198, 220, 220, 220, 900, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 3398, 158, 224, 226, 62, 39, 158, 224, 224, 46, 11, 1976, 27498, 7, 13664, 7, 9688, 62, 1941, 25, 437, 62, 1941, 22305, 220, 220, 220, 220, 628, 220, 220, 220, 1303, 20368, 22369, 438, 198, 220, 220, 220, 1303, 13610, 8787, 1022, 337, 25236, 11346, 36, 26483, 10, 39, 9250, 6805, 13, 198, 220, 220, 220, 1303, 20368, 22369, 438, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 67, 2577, 565, 320, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 18766, 11, 1058, 41871, 62, 23350, 11, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 62, 18766, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 535, 76, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 29510, 11, 220, 220, 220, 1058, 67, 2577, 565, 320, 11, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 29510, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 220, 220, 220, 1058, 8220, 158, 224, 224, 11, 220, 220, 220, 220, 1058, 535, 76, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 265, 76, 1073, 17, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 1058, 3398, 158, 224, 226, 11, 220, 220, 220, 220, 1058, 42570, 354, 19, 13696, 11, 1058, 330, 354, 19, 8, 628, 220, 220, 220, 1303, 13610, 1180, 8787, 611, 1262, 6153, 17906, 1084, 272, 2123, 435, 13, 5870, 158, 224, 226, 10833, 27490, 13, 198, 220, 220, 220, 611, 2123, 1084, 272, 62, 354, 19, 62, 18766, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 220, 220, 220, 220, 1058, 3398, 158, 224, 226, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 42570, 354, 19, 13696, 11, 220, 220, 220, 1058, 330, 354, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 220, 1058, 41871, 62, 354, 19, 62, 12942, 11, 1058, 41871, 62, 354, 19, 62, 316, 1084, 272, 11, 220, 220, 220, 220, 1058, 41871, 62, 3398, 158, 224, 226, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 12942, 62, 10990, 11, 1058, 3398, 158, 224, 226, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 42570, 354, 19, 13696, 11, 220, 220, 220, 1058, 330, 354, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 220, 1058, 41871, 62, 354, 19, 62, 12942, 11, 1058, 41871, 62, 354, 19, 62, 12942, 62, 10990, 11, 1058, 41871, 62, 354, 19, 62, 12942, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 3398, 158, 224, 226, 11, 1058, 41871, 62, 354, 19, 62, 23350, 62, 10990, 11, 1058, 41871, 62, 354, 19, 62, 23350, 8, 198, 220, 220, 220, 2018, 62, 17143, 0, 7, 76, 11, 1058, 41871, 62, 23350, 11, 1058, 41871, 62, 8220, 158, 224, 224, 11, 1058, 41871, 62, 1073, 17, 62, 316, 1084, 272, 11, 220, 220, 220, 1058, 41871, 62, 8220, 158, 224, 224, 8, 628, 220, 220, 220, 1303, 8229, 12006, 2746, 13, 198, 220, 220, 220, 1441, 285, 198, 437, 198 ]
2.201591
3,269
# This file was generated, do not modify it. import MLJ: schema, std, mean, median, coerce, coerce!, scitype using DataFrames using UrlDownload using PyPlot ioff() # hide raw_data = urldownload("https://github.com/tlienart/DataScienceTutorialsData.jl/blob/master/data/wri_global_power_plant_db_be_022020.csv?raw=true") data = DataFrame(raw_data); schema(data) is_active(col) = !occursin(r"source|generation", string(col)) active_cols = [col for col in names(data) if is_active(col)] select!(data, active_cols); select!(data, Not([:wepp_id, :url, :owner])) schema(data) describe(data) # The describe() function shows that there are several features with missing values. capacity = select(data, [:country, :primary_fuel, :capacity_mw]); first(capacity, 5) cap_gr = groupby(capacity, [:country, :primary_fuel]); cap_mean = combine(cap_gr, :capacity_mw => mean) cap_sum = combine(cap_gr, :capacity_mw => sum) first(cap_sum, 3) ctry_selec = r"BEL|FRA|DEU" tech_selec = r"Solar" cap_sum_plot = cap_sum[occursin.(ctry_selec, cap_sum.country) .& occursin.(tech_selec, cap_sum.primary_fuel), :] sort!(cap_sum_plot, :capacity_mw_sum, rev=true) figure(figsize=(8,6)) plt.bar(cap_sum_plot.country, cap_sum_plot.capacity_mw_sum, width=0.35) plt.xticks(rotation=90) savefig(joinpath(@OUTPUT, "D0-processing-g1.svg")) # hide cap_sum_ctry_gd = groupby(capacity, [:country]); cap_sum_ctry = combine(cap_sum_ctry_gd, :capacity_mw => sum); cap_sum = DataFrame(cap_sum); cap_sum_ctry = DataFrame(cap_sum_ctry); cap_share = leftjoin(cap_sum, cap_sum_ctry, on = :country, makeunique = true) cap_share.capacity_mw_share = cap_share.capacity_mw_sum ./ cap_share.capacity_mw_sum_1; nMissings = length(findall(x -> ismissing(x), data.commissioning_year)) nMissings_share = nMissings/size(data)[1] typeof(data.commissioning_year) data_nmiss = dropmissing(data, :commissioning_year); map!(x -> round(x, digits=0), data_nmiss.commissioning_year, data_nmiss.commissioning_year); # We can now calculate plant age for each plant (worth remembering that the dataset only contains active plants) current_year = fill!(Array{Float64}(undef, size(data_nmiss)[1]), 2020); data_nmiss[:, :plant_age] = current_year - data_nmiss[:, :commissioning_year]; mean_age = mean(skipmissing(data_nmiss.plant_age)) median_age = median(skipmissing(data_nmiss.plant_age)) figure(figsize=(8,6)) plt.hist(data_nmiss.plant_age, color="blue", edgecolor="white", bins=100, density=true, alpha=0.5) plt.axvline(mean_age, label = "Mean", color = "red") plt.axvline(median_age, label = "Median") plt.legend() plt.xlim(0,) savefig(joinpath(@OUTPUT, "D0-processing-g2.svg")) # hide age = select(data_nmiss, [:country, :primary_fuel, :plant_age]) age_mean = combine(groupby(age, [:country, :primary_fuel]), :plant_age => mean) coal_means = age_mean[occursin.(ctry_selec, age_mean.country) .& occursin.(r"Coal", age_mean.primary_fuel), :] gas_means = age_mean[occursin.(ctry_selec, age_mean.country) .& occursin.(r"Gas", age_mean.primary_fuel), :] width = 0.35 # the width of the bars fig, (ax1, ax2) = plt.subplots(1,2) fig.suptitle("Mean plant age by country and technology") ax1.bar(coal_means.country, coal_means.plant_age_mean, width, label="Coal") ax2.bar(gas_means.country, gas_means.plant_age_mean, width, label="Gas") ax1.set_ylabel("Age") ax1.set_title("Coal") ax2.set_title("Gas") savefig(joinpath(@OUTPUT, "D0-processing-g3.svg")) # hide
[ 2, 770, 2393, 373, 7560, 11, 466, 407, 13096, 340, 13, 198, 198, 11748, 10373, 41, 25, 32815, 11, 14367, 11, 1612, 11, 14288, 11, 31255, 344, 11, 31255, 344, 28265, 629, 414, 431, 198, 3500, 6060, 35439, 198, 3500, 8799, 75, 10002, 198, 3500, 9485, 43328, 198, 952, 487, 3419, 1303, 7808, 198, 198, 1831, 62, 7890, 796, 2956, 335, 593, 2220, 7203, 5450, 1378, 12567, 13, 785, 14, 28781, 2013, 433, 14, 6601, 26959, 51, 44917, 82, 6601, 13, 20362, 14, 2436, 672, 14, 9866, 14, 7890, 14, 86, 380, 62, 20541, 62, 6477, 62, 15060, 62, 9945, 62, 1350, 62, 2999, 42334, 13, 40664, 30, 1831, 28, 7942, 4943, 198, 7890, 796, 6060, 19778, 7, 1831, 62, 7890, 1776, 198, 198, 15952, 2611, 7, 7890, 8, 198, 198, 271, 62, 5275, 7, 4033, 8, 796, 5145, 13966, 1834, 259, 7, 81, 1, 10459, 91, 20158, 1600, 4731, 7, 4033, 4008, 198, 5275, 62, 4033, 82, 796, 685, 4033, 329, 951, 287, 3891, 7, 7890, 8, 611, 318, 62, 5275, 7, 4033, 15437, 198, 19738, 0, 7, 7890, 11, 4075, 62, 4033, 82, 1776, 198, 198, 19738, 0, 7, 7890, 11, 1892, 26933, 25, 732, 381, 62, 312, 11, 1058, 6371, 11, 1058, 18403, 60, 4008, 198, 15952, 2611, 7, 7890, 8, 198, 198, 20147, 4892, 7, 7890, 8, 198, 198, 2, 1849, 464, 6901, 3419, 2163, 2523, 326, 612, 389, 1811, 3033, 351, 4814, 3815, 13, 198, 198, 42404, 796, 2922, 7, 7890, 11, 685, 25, 19315, 11, 1058, 39754, 62, 25802, 11, 1058, 42404, 62, 76, 86, 36563, 198, 11085, 7, 42404, 11, 642, 8, 198, 198, 11128, 62, 2164, 796, 1448, 1525, 7, 42404, 11, 685, 25, 19315, 11, 1058, 39754, 62, 25802, 36563, 198, 198, 11128, 62, 32604, 796, 12082, 7, 11128, 62, 2164, 11, 1058, 42404, 62, 76, 86, 5218, 1612, 8, 198, 11128, 62, 16345, 796, 12082, 7, 11128, 62, 2164, 11, 1058, 42404, 62, 76, 86, 5218, 2160, 8, 198, 11085, 7, 11128, 62, 16345, 11, 513, 8, 198, 198, 310, 563, 62, 325, 293, 66, 796, 374, 1, 33, 3698, 91, 37, 3861, 91, 7206, 52, 1, 198, 13670, 62, 325, 293, 66, 796, 374, 1, 38825, 1, 198, 198, 11128, 62, 16345, 62, 29487, 796, 1451, 62, 16345, 58, 13966, 1834, 259, 12195, 310, 563, 62, 325, 293, 66, 11, 1451, 62, 16345, 13, 19315, 8, 764, 5, 8833, 259, 12195, 13670, 62, 325, 293, 66, 11, 1451, 62, 16345, 13, 39754, 62, 25802, 828, 1058, 60, 198, 198, 30619, 0, 7, 11128, 62, 16345, 62, 29487, 11, 1058, 42404, 62, 76, 86, 62, 16345, 11, 2710, 28, 7942, 8, 198, 198, 26875, 7, 5647, 7857, 16193, 23, 11, 21, 4008, 198, 198, 489, 83, 13, 5657, 7, 11128, 62, 16345, 62, 29487, 13, 19315, 11, 1451, 62, 16345, 62, 29487, 13, 42404, 62, 76, 86, 62, 16345, 11, 9647, 28, 15, 13, 2327, 8, 198, 489, 83, 13, 742, 3378, 7, 10599, 341, 28, 3829, 8, 198, 198, 21928, 5647, 7, 22179, 6978, 7, 31, 2606, 7250, 3843, 11, 366, 35, 15, 12, 36948, 12, 70, 16, 13, 21370, 70, 48774, 1303, 7808, 198, 198, 11128, 62, 16345, 62, 310, 563, 62, 21287, 796, 1448, 1525, 7, 42404, 11, 685, 25, 19315, 36563, 198, 11128, 62, 16345, 62, 310, 563, 796, 12082, 7, 11128, 62, 16345, 62, 310, 563, 62, 21287, 11, 1058, 42404, 62, 76, 86, 5218, 2160, 1776, 198, 198, 11128, 62, 16345, 796, 6060, 19778, 7, 11128, 62, 16345, 1776, 198, 11128, 62, 16345, 62, 310, 563, 796, 6060, 19778, 7, 11128, 62, 16345, 62, 310, 563, 1776, 198, 11128, 62, 20077, 796, 1364, 22179, 7, 11128, 62, 16345, 11, 1451, 62, 16345, 62, 310, 563, 11, 319, 796, 1058, 19315, 11, 787, 34642, 796, 2081, 8, 198, 11128, 62, 20077, 13, 42404, 62, 76, 86, 62, 20077, 796, 1451, 62, 20077, 13, 42404, 62, 76, 86, 62, 16345, 24457, 1451, 62, 20077, 13, 42404, 62, 76, 86, 62, 16345, 62, 16, 26, 198, 198, 77, 17140, 654, 796, 4129, 7, 19796, 439, 7, 87, 4613, 318, 45688, 7, 87, 828, 1366, 13, 785, 3411, 278, 62, 1941, 4008, 198, 198, 77, 17140, 654, 62, 20077, 796, 299, 17140, 654, 14, 7857, 7, 7890, 38381, 16, 60, 198, 198, 4906, 1659, 7, 7890, 13, 785, 3411, 278, 62, 1941, 8, 198, 198, 7890, 62, 77, 3927, 796, 4268, 45688, 7, 7890, 11, 1058, 785, 3411, 278, 62, 1941, 1776, 198, 198, 8899, 0, 7, 87, 4613, 2835, 7, 87, 11, 19561, 28, 15, 828, 1366, 62, 77, 3927, 13, 785, 3411, 278, 62, 1941, 11, 1366, 62, 77, 3927, 13, 785, 3411, 278, 62, 1941, 1776, 198, 198, 2, 1849, 1135, 460, 783, 15284, 4618, 2479, 329, 1123, 4618, 357, 9268, 24865, 326, 262, 27039, 691, 4909, 4075, 6134, 8, 198, 198, 14421, 62, 1941, 796, 6070, 0, 7, 19182, 90, 43879, 2414, 92, 7, 917, 891, 11, 2546, 7, 7890, 62, 77, 3927, 38381, 16, 46570, 12131, 1776, 198, 7890, 62, 77, 3927, 58, 45299, 1058, 15060, 62, 496, 60, 796, 1459, 62, 1941, 532, 1366, 62, 77, 3927, 58, 45299, 1058, 785, 3411, 278, 62, 1941, 11208, 198, 198, 32604, 62, 496, 796, 1612, 7, 48267, 45688, 7, 7890, 62, 77, 3927, 13, 15060, 62, 496, 4008, 198, 1150, 666, 62, 496, 796, 14288, 7, 48267, 45688, 7, 7890, 62, 77, 3927, 13, 15060, 62, 496, 4008, 198, 198, 26875, 7, 5647, 7857, 16193, 23, 11, 21, 4008, 198, 198, 489, 83, 13, 10034, 7, 7890, 62, 77, 3927, 13, 15060, 62, 496, 11, 3124, 2625, 17585, 1600, 5743, 8043, 2625, 11186, 1600, 41701, 28, 3064, 11, 198, 220, 220, 220, 220, 220, 12109, 28, 7942, 11, 17130, 28, 15, 13, 20, 8, 198, 489, 83, 13, 897, 85, 1370, 7, 32604, 62, 496, 11, 6167, 796, 366, 5308, 272, 1600, 3124, 796, 366, 445, 4943, 198, 489, 83, 13, 897, 85, 1370, 7, 1150, 666, 62, 496, 11, 6167, 796, 366, 9921, 666, 4943, 198, 198, 489, 83, 13, 1455, 437, 3419, 198, 198, 489, 83, 13, 87, 2475, 7, 15, 35751, 198, 198, 21928, 5647, 7, 22179, 6978, 7, 31, 2606, 7250, 3843, 11, 366, 35, 15, 12, 36948, 12, 70, 17, 13, 21370, 70, 48774, 1303, 7808, 198, 198, 496, 796, 2922, 7, 7890, 62, 77, 3927, 11, 685, 25, 19315, 11, 1058, 39754, 62, 25802, 11, 1058, 15060, 62, 496, 12962, 198, 496, 62, 32604, 796, 12082, 7, 8094, 1525, 7, 496, 11, 685, 25, 19315, 11, 1058, 39754, 62, 25802, 46570, 1058, 15060, 62, 496, 5218, 1612, 8, 198, 198, 25140, 62, 1326, 504, 796, 2479, 62, 32604, 58, 13966, 1834, 259, 12195, 310, 563, 62, 325, 293, 66, 11, 2479, 62, 32604, 13, 19315, 8, 764, 5, 8833, 259, 12195, 81, 1, 7222, 282, 1600, 2479, 62, 32604, 13, 39754, 62, 25802, 828, 1058, 60, 198, 22649, 62, 1326, 504, 796, 2479, 62, 32604, 58, 13966, 1834, 259, 12195, 310, 563, 62, 325, 293, 66, 11, 2479, 62, 32604, 13, 19315, 8, 764, 5, 8833, 259, 12195, 81, 1, 39699, 1600, 2479, 62, 32604, 13, 39754, 62, 25802, 828, 1058, 60, 198, 198, 10394, 796, 657, 13, 2327, 220, 1303, 262, 9647, 286, 262, 9210, 198, 198, 5647, 11, 357, 897, 16, 11, 7877, 17, 8, 796, 458, 83, 13, 7266, 489, 1747, 7, 16, 11, 17, 8, 198, 198, 5647, 13, 2385, 457, 2578, 7203, 5308, 272, 4618, 2479, 416, 1499, 290, 3037, 4943, 198, 198, 897, 16, 13, 5657, 7, 25140, 62, 1326, 504, 13, 19315, 11, 5655, 62, 1326, 504, 13, 15060, 62, 496, 62, 32604, 11, 9647, 11, 6167, 2625, 7222, 282, 4943, 198, 897, 17, 13, 5657, 7, 22649, 62, 1326, 504, 13, 19315, 11, 3623, 62, 1326, 504, 13, 15060, 62, 496, 62, 32604, 11, 9647, 11, 6167, 2625, 39699, 4943, 198, 198, 897, 16, 13, 2617, 62, 2645, 9608, 7203, 23396, 4943, 198, 198, 897, 16, 13, 2617, 62, 7839, 7203, 7222, 282, 4943, 198, 897, 17, 13, 2617, 62, 7839, 7203, 39699, 4943, 198, 198, 21928, 5647, 7, 22179, 6978, 7, 31, 2606, 7250, 3843, 11, 366, 35, 15, 12, 36948, 12, 70, 18, 13, 21370, 70, 48774, 1303, 7808, 628 ]
2.502187
1,372
abstract type CompilerHint end abstract type ProgramStructureHint <: CompilerHint end abstract type AddressingHint <: CompilerHint end include("static/kernel_hint.jl") include("static/switch_hint.jl") include("static/dynamic_address_hint.jl")
[ 397, 8709, 2099, 3082, 5329, 39, 600, 886, 198, 397, 8709, 2099, 6118, 1273, 5620, 39, 600, 1279, 25, 3082, 5329, 39, 600, 886, 198, 397, 8709, 2099, 3060, 11697, 39, 600, 1279, 25, 3082, 5329, 39, 600, 886, 198, 198, 17256, 7203, 12708, 14, 33885, 62, 71, 600, 13, 20362, 4943, 198, 17256, 7203, 12708, 14, 31943, 62, 71, 600, 13, 20362, 4943, 198, 17256, 7203, 12708, 14, 67, 28995, 62, 21975, 62, 71, 600, 13, 20362, 4943, 198 ]
3.05
80
module ConvDiffMIPDECO using jInv.Mesh using jInv.ForwardShare using jInv.Utils using jInv.LinearSolvers using jInv.InverseSolve using KrylovMethods using LinearAlgebra using SparseArrays using Printf using DSP function getBICGSTB(;PC=:jac,maxIter=1000,out=0,tol=1e-10) bicg = (A,b; M=identity,tol=1e-10,maxIter=500,out=1)-> bicgstb(A,b,M1=identity,tol=tol,maxIter=maxIter,out=out,tolRho=1e-60) return getIterativeSolver(bicg,PC=PC,maxIter=maxIter,out=out,tol=tol) end # files are organized in the src (containing functions) and test (containing some unit tests) import jInv.ForwardShare.ForwardProbType export ConvDiffParam, getConvDiffParam """ type ConvDiffParam <: ForwardProbType description of stationary convection diffusion forward problem (- sig*Laplacian + v dot GRAD) u = f with boundary conditions du/dn = gn on Omega1, u=gd on Omega2 Construct an instance using getConvDiffParam(M,v,kwargs...) Fields: M - describes computational mesh v - velocities at cell-centers sig - scalar, >0 bc - vector describing boundary conditions Fields - stores fields, i.e., u Ainv - factorization of PDE """ mutable struct ConvDiffParam <: ForwardProbType M :: RegularMesh A :: SparseMatrixCSC{Float64} P :: AbstractArray{Float64} sig::Float64 bc::Array{Float64} Fields::Array{Float64,1} Ainv::AbstractSolver end """ function getConvDiffParam(M,v) constructs and returns ConvDiffParam The PDE is discretized and factorized and stored in field Ainv. Inputs: M - mesh Keyword arguments: v - velocity, (vector or function) gd::Function - Dirichlet boundary conditions gn::Function - Neuman boundary condition P - measurement operator sig - viscosity bc - description of boundary conditions Fields - storing PDE solutions Ainv - description of linear solver """ function getConvDiffParam(M::RegularMesh,v; gd::Function=X->zeros(size(X,1)), gn::Function=X->zeros(size(X,1)), P=Diagonal(ones(M.nc)),sig::Number=0.01,bc=(:dir,:neu,:neu,:neu),Fields=zeros(0),Ainv=getJuliaSolver()) # get boundary conditions iddir, idneu, iddirn, idneun, idint = getBoundaryIndices(M,bc) A, Adir, Aneu = getConvDiffMatrix(M,sig,v,iddir,idneu,iddirn,idneun,idint) gdir, gneu = getBoundaryFuncVal(gd,gn,M,bc) bc = -2*Adir*gdir + Aneu*gneu return ConvDiffParam(M,A,P,sig,bc,Fields,Ainv) end include("getBoundaryCondition.jl") include("getGhostIndices.jl") include("getConvDiffMatrix.jl") include("getBoundaryIndices.jl") include("getBoundaryFuncVal.jl") include("getDiffOps.jl") include("getData.jl") include("utils.jl") include("ConvDiffFEMParam.jl") include("FEM.jl") include("getDataFEM.jl") include("getConvDiffFEMConstraintsAMPL.jl") include("mipdecoHeuristic.jl") include("rounding.jl") include("dilation.jl") include("regularizers.jl") end
[ 21412, 34872, 28813, 44, 4061, 41374, 46, 198, 198, 3500, 474, 19904, 13, 37031, 198, 3500, 474, 19904, 13, 39746, 11649, 198, 3500, 474, 19904, 13, 18274, 4487, 198, 3500, 474, 19904, 13, 14993, 451, 36949, 690, 198, 3500, 474, 19904, 13, 818, 4399, 50, 6442, 198, 3500, 41662, 27086, 46202, 198, 3500, 44800, 2348, 29230, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 12578, 69, 198, 3500, 360, 4303, 198, 198, 8818, 651, 33, 2149, 38, 2257, 33, 7, 26, 5662, 28, 25, 30482, 11, 9806, 29993, 28, 12825, 11, 448, 28, 15, 11, 83, 349, 28, 16, 68, 12, 940, 8, 198, 197, 65, 291, 70, 796, 357, 32, 11, 65, 26, 337, 28, 738, 414, 11, 83, 349, 28, 16, 68, 12, 940, 11, 9806, 29993, 28, 4059, 11, 448, 28, 16, 8, 3784, 198, 197, 65, 291, 70, 301, 65, 7, 32, 11, 65, 11, 44, 16, 28, 738, 414, 11, 83, 349, 28, 83, 349, 11, 9806, 29993, 28, 9806, 29993, 11, 448, 28, 448, 11, 83, 349, 49, 8873, 28, 16, 68, 12, 1899, 8, 198, 197, 7783, 651, 29993, 876, 50, 14375, 7, 65, 291, 70, 11, 5662, 28, 5662, 11, 9806, 29993, 28, 9806, 29993, 11, 448, 28, 448, 11, 83, 349, 28, 83, 349, 8, 198, 437, 198, 198, 2, 3696, 389, 8389, 287, 262, 12351, 357, 38301, 5499, 8, 290, 1332, 357, 38301, 617, 4326, 5254, 8, 198, 11748, 474, 19904, 13, 39746, 11649, 13, 39746, 2964, 65, 6030, 198, 198, 39344, 34872, 28813, 22973, 11, 651, 3103, 85, 28813, 22973, 198, 198, 37811, 198, 4906, 34872, 28813, 22973, 1279, 25, 19530, 2964, 65, 6030, 198, 198, 11213, 286, 31607, 24748, 596, 44258, 2651, 1917, 198, 198, 32590, 43237, 9, 14772, 489, 330, 666, 1343, 410, 16605, 10863, 2885, 8, 334, 796, 277, 198, 4480, 18645, 3403, 7043, 14, 32656, 796, 19967, 319, 19839, 16, 11, 334, 28, 21287, 319, 19839, 17, 198, 198, 42316, 281, 4554, 1262, 651, 3103, 85, 28813, 22973, 7, 44, 11, 85, 11, 46265, 22046, 23029, 198, 198, 15878, 82, 25, 198, 197, 44, 220, 220, 220, 220, 220, 532, 8477, 31350, 19609, 198, 197, 85, 220, 220, 220, 220, 220, 532, 11555, 420, 871, 379, 2685, 12, 1087, 364, 198, 197, 82, 328, 220, 220, 220, 532, 16578, 283, 11, 1875, 15, 198, 197, 15630, 220, 220, 220, 220, 532, 15879, 12059, 18645, 3403, 198, 197, 15878, 82, 532, 7000, 7032, 11, 1312, 13, 68, 1539, 334, 198, 197, 32, 16340, 220, 220, 532, 5766, 1634, 286, 350, 7206, 198, 198, 37811, 198, 76, 18187, 2878, 34872, 28813, 22973, 1279, 25, 19530, 2964, 65, 6030, 198, 197, 44, 7904, 23603, 37031, 198, 197, 32, 7904, 1338, 17208, 46912, 34, 6173, 90, 43879, 2414, 92, 198, 197, 47, 7904, 27741, 19182, 90, 43879, 2414, 92, 198, 197, 82, 328, 3712, 43879, 2414, 198, 197, 15630, 3712, 19182, 90, 43879, 2414, 92, 198, 197, 15878, 82, 3712, 19182, 90, 43879, 2414, 11, 16, 92, 198, 197, 32, 16340, 3712, 23839, 50, 14375, 198, 437, 198, 198, 37811, 198, 8818, 651, 3103, 85, 28813, 22973, 7, 44, 11, 85, 8, 198, 198, 41571, 82, 290, 5860, 34872, 28813, 22973, 198, 198, 464, 350, 7206, 318, 1221, 1186, 1143, 290, 5766, 1143, 290, 8574, 287, 2214, 317, 16340, 13, 198, 198, 20560, 82, 25, 198, 197, 44, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 19609, 198, 198, 9218, 4775, 7159, 25, 198, 197, 85, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15432, 11, 357, 31364, 393, 2163, 8, 198, 197, 21287, 3712, 22203, 532, 36202, 488, 1616, 18645, 3403, 198, 197, 4593, 3712, 22203, 532, 3169, 3778, 18645, 4006, 198, 197, 47, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15558, 10088, 198, 197, 82, 328, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 1490, 6966, 414, 198, 197, 15630, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 6764, 286, 18645, 3403, 198, 197, 15878, 82, 220, 220, 220, 220, 220, 220, 532, 23069, 350, 7206, 8136, 198, 197, 32, 16340, 220, 220, 220, 220, 220, 220, 220, 220, 532, 6764, 286, 14174, 1540, 332, 198, 198, 37811, 198, 8818, 651, 3103, 85, 28813, 22973, 7, 44, 3712, 40164, 37031, 11, 85, 26, 198, 197, 21287, 3712, 22203, 28, 55, 3784, 9107, 418, 7, 7857, 7, 55, 11, 16, 36911, 19967, 3712, 22203, 28, 55, 3784, 9107, 418, 7, 7857, 7, 55, 11, 16, 36911, 350, 28, 18683, 27923, 7, 1952, 7, 44, 13, 10782, 36911, 82, 328, 3712, 15057, 28, 15, 13, 486, 11, 15630, 16193, 25, 15908, 11, 25, 710, 84, 11, 25, 710, 84, 11, 25, 710, 84, 828, 15878, 82, 28, 9107, 418, 7, 15, 828, 32, 16340, 28, 1136, 16980, 544, 50, 14375, 28955, 628, 197, 2, 651, 18645, 3403, 198, 197, 1638, 343, 11, 4686, 710, 84, 11, 220, 1638, 343, 77, 11, 4686, 710, 403, 11, 4686, 600, 796, 651, 49646, 560, 5497, 1063, 7, 44, 11, 15630, 8, 628, 197, 32, 11, 1215, 343, 11, 317, 710, 84, 796, 651, 3103, 85, 28813, 46912, 7, 44, 11, 82, 328, 11, 85, 11, 1638, 343, 11, 312, 710, 84, 11, 1638, 343, 77, 11, 312, 710, 403, 11, 312, 600, 8, 628, 197, 70, 15908, 11, 308, 710, 84, 796, 651, 49646, 560, 37, 19524, 7762, 7, 21287, 11, 4593, 11, 44, 11, 15630, 8, 628, 197, 15630, 796, 532, 17, 9, 2782, 343, 9, 70, 15908, 1343, 317, 710, 84, 9, 70, 710, 84, 628, 197, 7783, 34872, 28813, 22973, 7, 44, 11, 32, 11, 47, 11, 82, 328, 11, 15630, 11, 15878, 82, 11, 32, 16340, 8, 198, 437, 628, 198, 17256, 7203, 1136, 49646, 560, 48362, 13, 20362, 4943, 198, 17256, 7203, 1136, 32001, 5497, 1063, 13, 20362, 4943, 198, 17256, 7203, 1136, 3103, 85, 28813, 46912, 13, 20362, 4943, 198, 17256, 7203, 1136, 49646, 560, 5497, 1063, 13, 20362, 4943, 198, 17256, 7203, 1136, 49646, 560, 37, 19524, 7762, 13, 20362, 4943, 198, 17256, 7203, 1136, 28813, 41472, 13, 20362, 4943, 198, 17256, 7203, 1136, 6601, 13, 20362, 4943, 198, 17256, 7203, 26791, 13, 20362, 4943, 198, 17256, 7203, 3103, 85, 28813, 37, 3620, 22973, 13, 20362, 4943, 198, 17256, 7203, 37, 3620, 13, 20362, 4943, 198, 17256, 7203, 1136, 6601, 37, 3620, 13, 20362, 4943, 198, 17256, 7203, 1136, 3103, 85, 28813, 37, 3620, 3103, 2536, 6003, 2390, 6489, 13, 20362, 4943, 198, 17256, 7203, 76, 541, 12501, 78, 1544, 27915, 13, 20362, 4943, 198, 17256, 7203, 744, 278, 13, 20362, 4943, 198, 17256, 7203, 67, 10520, 13, 20362, 4943, 198, 17256, 7203, 16338, 11341, 13, 20362, 4943, 198, 437, 198 ]
2.539146
1,124
module TestAcquisition using Test using LinearAlgebra using GaussianDistributions using CovarianceFunctions const Kernel = CovarianceFunctions using SARA: ucb, inner_sampling, random_sampling, uncertainty_sampling, integrated_uncertainty_sampling @testset "acquisition" begin l = 1/2 k = Kernel.Lengthscale(Kernel.EQ(), l) G = Gaussian(sin, k) n = 256 @testset "random sampling" begin x = randn(n) @test random_sampling(G, x) isa Real @test random_sampling(G, x) in x end @testset "upper confidence bound" begin # test on unconditioned GP x = range(0, π, length = n) α = 3. xi = ucb(G, x, α) @test isapprox(xi, π/2, atol = 5e-2) # create 2d synthetic data and condition l = 1/2 k = Kernel.Lengthscale(Kernel.EQ(), l) G = Gaussian(k) f(x) = sum(sin, x) x = [randn(2) for _ in 1:n] σ = .01 y = @. f(x) + σ*randn() C = G | (x, y, σ^2) # test ucb sampling on conditioned process ns = 1024 xs = [randn(2) for _ in 1:ns] x0 = ucb(C, xs, 0.) # without uncertainty term, chooses point close to optimum @test isapprox(f(x0), 2, atol = 3e-1) xi = ucb(C, xs, α) # with uncertainty term, @test f(x0) > f(xi) # trades off value with uncertainty @test f(xi) > 1 # still chooses xi with moderately large value end @testset "integrated uncertainty sampling" begin l = .1 k = Kernel.Lengthscale(Kernel.EQ(), l) G = Gaussian(k) # test on unconditioned GP n = 32 x = range(0, π, length = n) σ = 1e-2 y = @. sin(x) + σ * randn() C = G | (x, y, σ^2) m = 256 xs = range(0, π, length = m) xi = integrated_uncertainty_sampling(G, xs, σ) xk = uncertainty_sampling(G, xs) xi = integrated_uncertainty_sampling(C, xs, σ) xk = uncertainty_sampling(C, xs) end @testset "SARA inner loop sampling" begin l = .1 k = Kernel.Lengthscale(Kernel.EQ(), l) G = Gaussian(sin, k) # test on unconditioned GP n = 32 x = range(0, π, length = n) σ = 1e-2 y = @. sin(x) + σ * randn() C = G | (x, y, σ^2) m = 256 xs = range(0, π, length = m) xi = inner_sampling(G, xs, σ) xi = inner_sampling(C, xs, σ) # @test isapprox(xi, π/2, atol = 5e-2) end end end
[ 21412, 6208, 12832, 421, 10027, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 12822, 31562, 20344, 2455, 507, 198, 3500, 39751, 2743, 590, 24629, 2733, 198, 9979, 32169, 796, 39751, 2743, 590, 24629, 2733, 198, 3500, 311, 24401, 25, 334, 21101, 11, 8434, 62, 37687, 11347, 11, 4738, 62, 37687, 11347, 11, 13479, 62, 37687, 11347, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11521, 62, 19524, 1425, 774, 62, 37687, 11347, 628, 198, 31, 9288, 2617, 366, 43561, 10027, 1, 2221, 198, 220, 220, 220, 300, 796, 352, 14, 17, 198, 220, 220, 220, 479, 796, 32169, 13, 24539, 9888, 7, 42, 7948, 13, 36, 48, 22784, 300, 8, 198, 220, 220, 220, 402, 796, 12822, 31562, 7, 31369, 11, 479, 8, 198, 220, 220, 220, 299, 796, 17759, 628, 220, 220, 220, 2488, 9288, 2617, 366, 25120, 19232, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 43720, 77, 7, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4738, 62, 37687, 11347, 7, 38, 11, 2124, 8, 318, 64, 6416, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4738, 62, 37687, 11347, 7, 38, 11, 2124, 8, 287, 2124, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 45828, 6628, 5421, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 319, 31776, 653, 276, 14714, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2837, 7, 15, 11, 18074, 222, 11, 4129, 796, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 796, 513, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 334, 21101, 7, 38, 11, 2124, 11, 26367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 29992, 11, 18074, 222, 14, 17, 11, 379, 349, 796, 642, 68, 12, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2251, 362, 67, 18512, 1366, 290, 4006, 198, 220, 220, 220, 220, 220, 220, 220, 300, 796, 352, 14, 17, 198, 220, 220, 220, 220, 220, 220, 220, 479, 796, 32169, 13, 24539, 9888, 7, 42, 7948, 13, 36, 48, 22784, 300, 8, 198, 220, 220, 220, 220, 220, 220, 220, 402, 796, 12822, 31562, 7, 74, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 7, 87, 8, 796, 2160, 7, 31369, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 685, 25192, 77, 7, 17, 8, 329, 4808, 287, 352, 25, 77, 60, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 796, 764, 486, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 2488, 13, 277, 7, 87, 8, 1343, 18074, 225, 9, 25192, 77, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 327, 796, 402, 930, 357, 87, 11, 331, 11, 18074, 225, 61, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 334, 21101, 19232, 319, 31964, 1429, 198, 220, 220, 220, 220, 220, 220, 220, 36545, 796, 28119, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 685, 25192, 77, 7, 17, 8, 329, 4808, 287, 352, 25, 5907, 60, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 15, 796, 334, 21101, 7, 34, 11, 2124, 82, 11, 657, 2014, 1303, 1231, 13479, 3381, 11, 19769, 966, 1969, 284, 39475, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 69, 7, 87, 15, 828, 362, 11, 379, 349, 796, 513, 68, 12, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 334, 21101, 7, 34, 11, 2124, 82, 11, 26367, 8, 1303, 351, 13479, 3381, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 277, 7, 87, 15, 8, 1875, 277, 7, 29992, 8, 1303, 17674, 572, 1988, 351, 13479, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 277, 7, 29992, 8, 1875, 352, 1303, 991, 19769, 2124, 72, 351, 32611, 1588, 1988, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 18908, 4111, 13479, 19232, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 300, 796, 764, 16, 198, 220, 220, 220, 220, 220, 220, 220, 479, 796, 32169, 13, 24539, 9888, 7, 42, 7948, 13, 36, 48, 22784, 300, 8, 198, 220, 220, 220, 220, 220, 220, 220, 402, 796, 12822, 31562, 7, 74, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 319, 31776, 653, 276, 14714, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 3933, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2837, 7, 15, 11, 18074, 222, 11, 4129, 796, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 796, 352, 68, 12, 17, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 2488, 13, 7813, 7, 87, 8, 1343, 18074, 225, 1635, 43720, 77, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 327, 796, 402, 930, 357, 87, 11, 331, 11, 18074, 225, 61, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 285, 796, 17759, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 2837, 7, 15, 11, 18074, 222, 11, 4129, 796, 285, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 11521, 62, 19524, 1425, 774, 62, 37687, 11347, 7, 38, 11, 2124, 82, 11, 18074, 225, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 74, 796, 13479, 62, 37687, 11347, 7, 38, 11, 2124, 82, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 11521, 62, 19524, 1425, 774, 62, 37687, 11347, 7, 34, 11, 2124, 82, 11, 18074, 225, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 74, 796, 13479, 62, 37687, 11347, 7, 34, 11, 2124, 82, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 50, 24401, 8434, 9052, 19232, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 300, 796, 764, 16, 198, 220, 220, 220, 220, 220, 220, 220, 479, 796, 32169, 13, 24539, 9888, 7, 42, 7948, 13, 36, 48, 22784, 300, 8, 198, 220, 220, 220, 220, 220, 220, 220, 402, 796, 12822, 31562, 7, 31369, 11, 479, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 319, 31776, 653, 276, 14714, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 3933, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2837, 7, 15, 11, 18074, 222, 11, 4129, 796, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 796, 352, 68, 12, 17, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 2488, 13, 7813, 7, 87, 8, 1343, 18074, 225, 1635, 43720, 77, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 327, 796, 402, 930, 357, 87, 11, 331, 11, 18074, 225, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 17759, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 2837, 7, 15, 11, 18074, 222, 11, 4129, 796, 285, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 8434, 62, 37687, 11347, 7, 38, 11, 2124, 82, 11, 18074, 225, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 8434, 62, 37687, 11347, 7, 34, 11, 2124, 82, 11, 18074, 225, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 318, 1324, 13907, 7, 29992, 11, 18074, 222, 14, 17, 11, 379, 349, 796, 642, 68, 12, 17, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 198 ]
1.957198
1,285
using Plots, SFFM # include("../../src/SFFM.jl") cme_9 = SFFM.MakeME(SFFM.CMEParams[9]) f = SFFM.pdf(cme_9) F(x) = 1 - SFFM.cdf(cme_9)(x) x = 0:0.05:1.5 plot(x,f.(x), label = "α exp(Sz) s") plot!(x,f.(x.+0.3)./F.(0.3), label = "α exp(S(0.3+z)) s/α exp(S 0.3) e") plot!(x,f.(x.+0.6)./F.(0.6), label = "α exp(S(0.6+z)) s/α exp(S 0.6) e") plot!( xlabel = "z", ylabel = "Density", legend = :outertop, ) savefig("examples/meNumerics/ME_residual_life_density.pdf")
[ 3500, 1345, 1747, 11, 311, 5777, 44, 198, 198, 2, 2291, 7203, 40720, 40720, 10677, 14, 50, 5777, 44, 13, 20362, 4943, 198, 198, 66, 1326, 62, 24, 796, 311, 5777, 44, 13, 12050, 11682, 7, 50, 5777, 44, 13, 24187, 8905, 283, 4105, 58, 24, 12962, 198, 198, 69, 796, 311, 5777, 44, 13, 12315, 7, 66, 1326, 62, 24, 8, 198, 37, 7, 87, 8, 796, 352, 532, 311, 5777, 44, 13, 66, 7568, 7, 66, 1326, 62, 24, 5769, 87, 8, 198, 198, 87, 796, 657, 25, 15, 13, 2713, 25, 16, 13, 20, 198, 29487, 7, 87, 11, 69, 12195, 87, 828, 6167, 796, 366, 17394, 1033, 7, 50, 89, 8, 264, 4943, 198, 29487, 0, 7, 87, 11, 69, 12195, 87, 13, 10, 15, 13, 18, 737, 14, 37, 12195, 15, 13, 18, 828, 6167, 796, 366, 17394, 1033, 7, 50, 7, 15, 13, 18, 10, 89, 4008, 264, 14, 17394, 1033, 7, 50, 657, 13, 18, 8, 304, 4943, 198, 29487, 0, 7, 87, 11, 69, 12195, 87, 13, 10, 15, 13, 21, 737, 14, 37, 12195, 15, 13, 21, 828, 6167, 796, 366, 17394, 1033, 7, 50, 7, 15, 13, 21, 10, 89, 4008, 264, 14, 17394, 1033, 7, 50, 657, 13, 21, 8, 304, 4943, 198, 29487, 0, 7, 198, 220, 220, 220, 2124, 18242, 796, 366, 89, 1600, 198, 220, 220, 220, 331, 18242, 796, 366, 35, 6377, 1600, 198, 220, 220, 220, 8177, 796, 1058, 39605, 4852, 11, 198, 8, 198, 198, 21928, 5647, 7203, 1069, 12629, 14, 1326, 45, 6975, 873, 14, 11682, 62, 411, 312, 723, 62, 6042, 62, 43337, 13, 12315, 4943 ]
1.727273
275
function simplextest{Lib<:PolyhedraLibrary}(lib::Lib) A = [1 1; -1 0; 0 -1] b = [1, 0, 0] linset = IntSet([1]) V = [0 1; 1 0] ine = SimpleHRepresentation(A, b, linset) poly1 = polyhedron(ine, lib) @test !isempty(poly1) inequality_fulltest(poly1, A, b, linset) generator_fulltest(poly1, V) ext = SimpleVRepresentation(V) poly2 = polyhedron(ext, lib) @test !isempty(poly2) inequality_fulltest(poly2, A, b, linset) generator_fulltest(poly2, V) # x_1 cannot be 2 @test isempty(polyhedron(SimpleHRepresentation([A; 1 0], [b; 2], union(linset, IntSet([4]))), lib)) # We now add the vertex (0, 0) V0 = [0 0] ext0 = SimpleVRepresentation(V0) push!(poly1, ext0) inequality_fulltest(poly1, A, b, IntSet([])) generator_fulltest(poly1, [V0; V]) push!(poly2, ext0) inequality_fulltest(poly2, A, b, IntSet([])) generator_fulltest(poly2, [V0; V]) # nonnegative orthant cut by x_1 + x_2 = 1 Vray = [1 0; 0 1] extray = SimpleVRepresentation(Matrix{Int}(0,2), Vray) poly3 = polyhedron(extray, lib) Acut = [1 1] bcut = [1] linsetcut = IntSet([1]) inecut = SimpleHRepresentation(Acut, bcut, linsetcut) push!(poly3, inecut) inequality_fulltest(poly3, A, b, linset) generator_fulltest(poly3, V) poly4 = project(poly1, [1; 0]) inequality_fulltest(poly4, [-1; 1], [0, 1], IntSet()) generator_fulltest(poly4, [0; 1], []) #\ # \ # |\ # |_\ # \ Alin = [1 1] blin = [1] linsetlin = IntSet(1) Vlin = [1 0] Rlin = [1 -1] inelin = SimpleHRepresentation([1 1; -1 -1], [1, -1], IntSet()) plin = polyhedron(inelin, lib) inequality_fulltest(plin, Alin, blin, linsetlin) generator_fulltest(plin, Vlin, Rlin, IntSet(), IntSet(1)) ineout = getinequalities(plin) @test ineout.linset == IntSet(1) Vlin = [1 0] Rlin = [1 -1] extlin = SimpleVRepresentation(Vlin, [1 -1; -1 1]) plin = polyhedron(extlin, lib) inequality_fulltest(plin, Alin, blin, linsetlin) generator_fulltest(plin, Vlin, Rlin, IntSet(), IntSet(1)) extout = SimpleVRepresentation(getgenerators(plin)) @test extout.Rlinset == IntSet(1) end
[ 8818, 2829, 742, 395, 90, 25835, 27, 25, 34220, 704, 430, 23377, 92, 7, 8019, 3712, 25835, 8, 198, 220, 317, 796, 685, 16, 352, 26, 532, 16, 657, 26, 657, 532, 16, 60, 198, 220, 275, 796, 685, 16, 11, 657, 11, 657, 60, 198, 220, 300, 1040, 316, 796, 2558, 7248, 26933, 16, 12962, 198, 220, 569, 796, 685, 15, 352, 26, 352, 657, 60, 628, 220, 287, 68, 796, 17427, 39, 40171, 341, 7, 32, 11, 275, 11, 300, 1040, 316, 8, 198, 220, 7514, 16, 796, 7514, 704, 1313, 7, 500, 11, 9195, 8, 198, 220, 2488, 9288, 5145, 271, 28920, 7, 35428, 16, 8, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 16, 11, 317, 11, 275, 11, 300, 1040, 316, 8, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 16, 11, 569, 8, 628, 220, 1070, 796, 17427, 53, 40171, 341, 7, 53, 8, 198, 220, 7514, 17, 796, 7514, 704, 1313, 7, 2302, 11, 9195, 8, 198, 220, 2488, 9288, 5145, 271, 28920, 7, 35428, 17, 8, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 17, 11, 317, 11, 275, 11, 300, 1040, 316, 8, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 17, 11, 569, 8, 628, 220, 1303, 2124, 62, 16, 2314, 307, 362, 198, 220, 2488, 9288, 318, 28920, 7, 35428, 704, 1313, 7, 26437, 39, 40171, 341, 26933, 32, 26, 352, 657, 4357, 685, 65, 26, 362, 4357, 6441, 7, 21602, 316, 11, 2558, 7248, 26933, 19, 60, 4008, 828, 9195, 4008, 628, 220, 1303, 775, 783, 751, 262, 37423, 357, 15, 11, 657, 8, 198, 220, 569, 15, 796, 685, 15, 657, 60, 198, 220, 1070, 15, 796, 17427, 53, 40171, 341, 7, 53, 15, 8, 628, 220, 4574, 0, 7, 35428, 16, 11, 1070, 15, 8, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 16, 11, 317, 11, 275, 11, 2558, 7248, 7, 21737, 4008, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 16, 11, 685, 53, 15, 26, 569, 12962, 198, 220, 4574, 0, 7, 35428, 17, 11, 1070, 15, 8, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 17, 11, 317, 11, 275, 11, 2558, 7248, 7, 21737, 4008, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 17, 11, 685, 53, 15, 26, 569, 12962, 628, 220, 1303, 1729, 31591, 29617, 415, 2005, 416, 2124, 62, 16, 1343, 2124, 62, 17, 796, 352, 198, 220, 569, 2433, 796, 685, 16, 657, 26, 657, 352, 60, 198, 220, 1070, 2433, 796, 17427, 53, 40171, 341, 7, 46912, 90, 5317, 92, 7, 15, 11, 17, 828, 569, 2433, 8, 198, 220, 7514, 18, 796, 7514, 704, 1313, 7, 2302, 2433, 11, 9195, 8, 198, 220, 4013, 315, 796, 685, 16, 352, 60, 198, 220, 275, 8968, 796, 685, 16, 60, 198, 220, 300, 1040, 316, 8968, 796, 2558, 7248, 26933, 16, 12962, 198, 220, 287, 721, 315, 796, 17427, 39, 40171, 341, 7, 32, 8968, 11, 275, 8968, 11, 300, 1040, 316, 8968, 8, 198, 220, 4574, 0, 7, 35428, 18, 11, 287, 721, 315, 8, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 18, 11, 317, 11, 275, 11, 300, 1040, 316, 8, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 18, 11, 569, 8, 628, 220, 7514, 19, 796, 1628, 7, 35428, 16, 11, 685, 16, 26, 657, 12962, 198, 220, 12791, 62, 12853, 9288, 7, 35428, 19, 11, 25915, 16, 26, 352, 4357, 685, 15, 11, 352, 4357, 2558, 7248, 28955, 198, 220, 17301, 62, 12853, 9288, 7, 35428, 19, 11, 685, 15, 26, 352, 4357, 685, 12962, 628, 220, 1303, 59, 198, 220, 1303, 3467, 198, 220, 1303, 930, 59, 198, 220, 1303, 930, 62, 59, 198, 220, 1303, 220, 220, 220, 3467, 198, 220, 978, 259, 796, 685, 16, 352, 60, 198, 220, 698, 259, 796, 685, 16, 60, 198, 220, 300, 1040, 316, 2815, 796, 2558, 7248, 7, 16, 8, 198, 220, 569, 2815, 796, 685, 16, 657, 60, 198, 220, 371, 2815, 796, 685, 16, 532, 16, 60, 198, 220, 287, 27176, 796, 17427, 39, 40171, 341, 26933, 16, 352, 26, 532, 16, 532, 16, 4357, 685, 16, 11, 532, 16, 4357, 2558, 7248, 28955, 198, 220, 458, 259, 796, 7514, 704, 1313, 7, 20538, 259, 11, 9195, 8, 198, 220, 12791, 62, 12853, 9288, 7, 46982, 11, 978, 259, 11, 698, 259, 11, 300, 1040, 316, 2815, 8, 198, 220, 17301, 62, 12853, 9288, 7, 46982, 11, 569, 2815, 11, 371, 2815, 11, 2558, 7248, 22784, 2558, 7248, 7, 16, 4008, 198, 220, 287, 68, 448, 796, 651, 500, 13255, 871, 7, 46982, 8, 198, 220, 2488, 9288, 287, 68, 448, 13, 21602, 316, 6624, 2558, 7248, 7, 16, 8, 198, 220, 569, 2815, 796, 685, 16, 657, 60, 198, 220, 371, 2815, 796, 685, 16, 532, 16, 60, 198, 220, 1070, 2815, 796, 17427, 53, 40171, 341, 7, 53, 2815, 11, 685, 16, 532, 16, 26, 532, 16, 352, 12962, 198, 220, 458, 259, 796, 7514, 704, 1313, 7, 2302, 2815, 11, 9195, 8, 198, 220, 12791, 62, 12853, 9288, 7, 46982, 11, 978, 259, 11, 698, 259, 11, 300, 1040, 316, 2815, 8, 198, 220, 17301, 62, 12853, 9288, 7, 46982, 11, 569, 2815, 11, 371, 2815, 11, 2558, 7248, 22784, 2558, 7248, 7, 16, 4008, 198, 220, 1070, 448, 796, 17427, 53, 40171, 341, 7, 1136, 8612, 2024, 7, 46982, 4008, 198, 220, 2488, 9288, 1070, 448, 13, 49, 21602, 316, 6624, 2558, 7248, 7, 16, 8, 198, 437, 198 ]
2.297593
914
__precompile__ @everywhere module OneDim using Random using FFTW include("helper.jl") include("NewtonImp.jl") include("SGPE.jl") include("solver.jl") include("modelA.jl") include("modelA_fourier_galerkin.jl") include("SGPE_fourier_galerkin.jl") export NewtonImp, phi_step_sgpe, tuple_stencil_bc, V_fct, V_fct_pinned, sampler_complex, sampler, solver, phi_step_modelA, observables, phi_galerk_modelA, phi_galerk_sgpe end
[ 834, 3866, 5589, 576, 834, 198, 198, 31, 16833, 3003, 8265, 1881, 29271, 198, 198, 3500, 14534, 198, 3500, 376, 9792, 54, 198, 198, 17256, 7203, 2978, 525, 13, 20362, 4943, 198, 17256, 7203, 3791, 1122, 26950, 13, 20362, 4943, 198, 17256, 7203, 38475, 11401, 13, 20362, 4943, 198, 17256, 7203, 82, 14375, 13, 20362, 4943, 198, 17256, 7203, 19849, 32, 13, 20362, 4943, 198, 17256, 7203, 19849, 32, 62, 69, 280, 5277, 62, 13528, 263, 5116, 13, 20362, 4943, 198, 17256, 7203, 38475, 11401, 62, 69, 280, 5277, 62, 13528, 263, 5116, 13, 20362, 4943, 198, 198, 39344, 17321, 26950, 11, 198, 220, 220, 220, 872, 72, 62, 9662, 62, 45213, 431, 11, 198, 220, 220, 220, 46545, 62, 26400, 2856, 62, 15630, 11, 198, 220, 220, 220, 569, 62, 69, 310, 11, 198, 220, 220, 220, 569, 62, 69, 310, 62, 11635, 2817, 11, 198, 220, 220, 220, 6072, 20053, 62, 41887, 11, 198, 220, 220, 220, 6072, 20053, 11, 198, 220, 220, 220, 1540, 332, 11, 198, 220, 220, 220, 872, 72, 62, 9662, 62, 19849, 32, 11, 198, 220, 220, 220, 3799, 2977, 11, 198, 220, 220, 220, 872, 72, 62, 13528, 9587, 62, 19849, 32, 11, 198, 220, 220, 220, 872, 72, 62, 13528, 9587, 62, 45213, 431, 198, 198, 437, 198 ]
2.16129
217
{"score": 7.38, "score_count": 45917, "timestamp": 1562557262.0} {"score": 7.39, "score_count": 44143, "timestamp": 1545775577.0} {"score": 7.41, "score_count": 36841, "timestamp": 1492413902.0} {"score": 7.42, "score_count": 34604, "timestamp": 1478750823.0} {"score": 7.43, "score_count": 32502, "timestamp": 1466354767.0} {"score": 7.44, "score_count": 31902, "timestamp": 1463150884.0} {"score": 7.44, "score_count": 31473, "timestamp": 1460904298.0} {"score": 7.44, "score_count": 31163, "timestamp": 1459491256.0} {"score": 7.44, "score_count": 30969, "timestamp": 1458653345.0} {"score": 7.44, "score_count": 30929, "timestamp": 1458371272.0} {"score": 7.4, "score_count": 41503, "timestamp": 1522339569.0} {"score": 7.43, "score_count": 32608, "timestamp": 1466869616.0} {"score": 7.44, "score_count": 30090, "timestamp": 1453682311.0} {"score": 7.44, "score_count": 31539, "timestamp": 1461254769.0} {"score": 7.44, "score_count": 31792, "timestamp": 1462455699.0} {"score": 7.44, "score_count": 31041, "timestamp": 1459020818.0} {"score": 7.45, "score_count": 29149, "timestamp": 1449168737.0} {"score": 7.42, "score_count": 34688, "timestamp": 1479314131.0}
[ 4895, 26675, 1298, 767, 13, 2548, 11, 366, 26675, 62, 9127, 1298, 604, 3270, 1558, 11, 366, 16514, 27823, 1298, 23871, 1495, 3553, 29119, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2670, 11, 366, 26675, 62, 9127, 1298, 5846, 21139, 11, 366, 16514, 27823, 1298, 1315, 33032, 38172, 3324, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3901, 11, 366, 26675, 62, 9127, 1298, 43019, 3901, 11, 366, 16514, 27823, 1298, 24041, 1731, 20219, 2999, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3682, 11, 366, 26675, 62, 9127, 1298, 4974, 31916, 11, 366, 16514, 27823, 1298, 1478, 3695, 15426, 23, 1954, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3559, 11, 366, 26675, 62, 9127, 1298, 3933, 35126, 11, 366, 16514, 27823, 1298, 1478, 2791, 2327, 2857, 3134, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 40385, 2999, 11, 366, 16514, 27823, 1298, 22986, 3132, 1120, 40353, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 34085, 4790, 11, 366, 16514, 27823, 1298, 1478, 31751, 3023, 27728, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 35592, 5066, 11, 366, 16514, 27823, 1298, 1478, 3270, 2920, 1065, 3980, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 1542, 38819, 11, 366, 16514, 27823, 1298, 1478, 3365, 2996, 2091, 2231, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 40286, 1959, 11, 366, 16514, 27823, 1298, 1478, 3365, 2718, 1065, 4761, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 19, 11, 366, 26675, 62, 9127, 1298, 6073, 31938, 11, 366, 16514, 27823, 1298, 1315, 1828, 2091, 3865, 3388, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3559, 11, 366, 26675, 62, 9127, 1298, 3933, 28688, 11, 366, 16514, 27823, 1298, 1478, 35809, 38205, 1433, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 5867, 3829, 11, 366, 16514, 27823, 1298, 20299, 27412, 1954, 1157, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 32647, 2670, 11, 366, 16514, 27823, 1298, 22986, 11623, 2857, 3388, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 37563, 5892, 11, 366, 16514, 27823, 1298, 22986, 1731, 37864, 2079, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2598, 11, 366, 26675, 62, 9127, 1298, 28947, 3901, 11, 366, 16514, 27823, 1298, 1478, 36993, 21315, 1507, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2231, 11, 366, 26675, 62, 9127, 1298, 2808, 19442, 11, 366, 16514, 27823, 1298, 1478, 2920, 1433, 5774, 2718, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3682, 11, 366, 26675, 62, 9127, 1298, 4974, 34427, 11, 366, 16514, 27823, 1298, 1478, 3720, 33638, 22042, 13, 15, 92, 198 ]
2.366397
494
#!/usr/bin/env julia using Luxor, Random Random.seed!(42) using Test function test_circular_arrows_1(pos) gsave() froma = rescale(rand(1:100), 1, 100, 0, 2pi) toa = rescale(rand(1:100), (1, 100), (0, 2pi)) sethue("black") arrow(pos, 100, froma, toa, linewidth=rand(1:6), arrowheadlength=rand(10:30)) text(string("from: ", round(rad2deg(froma), digits=1)), pos) text(string("to: ", round(rad2deg(toa), digits=1)), pos.x, pos.y+10) sethue("magenta") arrow(pos, 100, toa, froma; linewidth=rand(1:6), arrowheadlength=rand(10:30)) text(string("from: ", round(rad2deg(toa), digits=1)), pos.x, pos.y+20) text(string("to: ", round(rad2deg(froma), digits=1)), pos.x, pos.y+30) grestore() end function test_circular_arrows_2(pos, w) sethue("black") for a in 50:10:w randomhue() starta = rand(0:pi/12:2pi) finisha = rand(0:pi/12:2pi) arrow(pos, a, starta, finisha, linewidth=rand(1:6), arrowheadlength=rand(1:20)) end end function arrow_arc_test(fname) pagewidth, pageheight = 2000, 2000 Drawing(pagewidth, pageheight, fname) origin() # move 0/0 to center background(1, 1, 0.9, 1) setopacity(0.5) setline(2) pagetiles = Tiler(pagewidth, pageheight, 4, 4, margin=50) for (pos, n) in pagetiles if isodd(n) test_circular_arrows_1(pos) else test_circular_arrows_2(pos, pagetiles.tilewidth/2) end end # test Bezier arrow setopacity(1.0) sethue("red") arrow(pagetiles[1][1], pagetiles[3][1], pagetiles[6][1], pagetiles[7][1], linewidth=5, arrowheadlength=50, arrowheadfill = false, arrowheadangle=π/4, startarrow=true) @test finish() == true println("...finished arrow-test: saved in $(fname)") end fname = "arrow-arctest.png" arrow_arc_test(fname)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 3500, 17145, 273, 11, 14534, 198, 198, 29531, 13, 28826, 0, 7, 3682, 8, 198, 198, 3500, 6208, 198, 198, 8818, 1332, 62, 21170, 934, 62, 6018, 82, 62, 16, 7, 1930, 8, 198, 220, 220, 220, 308, 21928, 3419, 198, 220, 220, 220, 422, 64, 796, 6811, 1000, 7, 25192, 7, 16, 25, 3064, 828, 352, 11, 1802, 11, 657, 11, 362, 14415, 8, 198, 220, 220, 220, 284, 64, 796, 220, 220, 6811, 1000, 7, 25192, 7, 16, 25, 3064, 828, 357, 16, 11, 1802, 828, 357, 15, 11, 362, 14415, 4008, 198, 220, 220, 220, 900, 71, 518, 7203, 13424, 4943, 198, 220, 220, 220, 15452, 7, 1930, 11, 1802, 11, 422, 64, 11, 284, 64, 11, 9493, 413, 5649, 28, 25192, 7, 16, 25, 21, 828, 15452, 2256, 13664, 28, 25192, 7, 940, 25, 1270, 4008, 198, 220, 220, 220, 2420, 7, 8841, 7203, 6738, 25, 33172, 2835, 7, 6335, 17, 13500, 7, 6738, 64, 828, 19561, 28, 16, 36911, 1426, 8, 198, 220, 220, 220, 2420, 7, 8841, 7203, 1462, 25, 33172, 2835, 7, 6335, 17, 13500, 7, 1462, 64, 828, 19561, 28, 16, 36911, 1426, 13, 87, 11, 1426, 13, 88, 10, 940, 8, 198, 220, 220, 220, 900, 71, 518, 7203, 19726, 29188, 4943, 198, 220, 220, 220, 15452, 7, 1930, 11, 1802, 11, 284, 64, 11, 422, 64, 26, 9493, 413, 5649, 28, 25192, 7, 16, 25, 21, 828, 15452, 2256, 13664, 28, 25192, 7, 940, 25, 1270, 4008, 198, 220, 220, 220, 2420, 7, 8841, 7203, 6738, 25, 33172, 2835, 7, 6335, 17, 13500, 7, 1462, 64, 828, 19561, 28, 16, 36911, 1426, 13, 87, 11, 1426, 13, 88, 10, 1238, 8, 198, 220, 220, 220, 2420, 7, 8841, 7203, 1462, 25, 33172, 2835, 7, 6335, 17, 13500, 7, 6738, 64, 828, 19561, 28, 16, 36911, 1426, 13, 87, 11, 1426, 13, 88, 10, 1270, 8, 198, 220, 220, 220, 308, 2118, 382, 3419, 198, 437, 198, 198, 8818, 1332, 62, 21170, 934, 62, 6018, 82, 62, 17, 7, 1930, 11, 266, 8, 198, 220, 900, 71, 518, 7203, 13424, 4943, 198, 220, 329, 257, 287, 2026, 25, 940, 25, 86, 198, 220, 220, 220, 4738, 71, 518, 3419, 198, 220, 220, 220, 923, 64, 796, 43720, 7, 15, 25, 14415, 14, 1065, 25, 17, 14415, 8, 198, 220, 220, 220, 5461, 64, 796, 43720, 7, 15, 25, 14415, 14, 1065, 25, 17, 14415, 8, 198, 220, 220, 220, 15452, 7, 1930, 11, 257, 11, 923, 64, 11, 5461, 64, 11, 9493, 413, 5649, 28, 25192, 7, 16, 25, 21, 828, 15452, 2256, 13664, 28, 25192, 7, 16, 25, 1238, 4008, 198, 220, 886, 198, 437, 198, 198, 8818, 15452, 62, 5605, 62, 9288, 7, 69, 3672, 8, 198, 220, 42208, 413, 5649, 11, 2443, 17015, 796, 4751, 11, 4751, 198, 220, 40027, 7, 79, 363, 413, 5649, 11, 2443, 17015, 11, 277, 3672, 8, 198, 220, 8159, 3419, 1303, 1445, 657, 14, 15, 284, 3641, 198, 220, 4469, 7, 16, 11, 352, 11, 657, 13, 24, 11, 352, 8, 198, 220, 900, 404, 4355, 7, 15, 13, 20, 8, 198, 220, 900, 1370, 7, 17, 8, 198, 220, 42208, 316, 2915, 796, 309, 5329, 7, 79, 363, 413, 5649, 11, 2443, 17015, 11, 604, 11, 604, 11, 10330, 28, 1120, 8, 198, 220, 329, 357, 1930, 11, 299, 8, 287, 42208, 316, 2915, 198, 220, 220, 220, 611, 318, 5088, 7, 77, 8, 198, 220, 220, 220, 220, 220, 1332, 62, 21170, 934, 62, 6018, 82, 62, 16, 7, 1930, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1332, 62, 21170, 934, 62, 6018, 82, 62, 17, 7, 1930, 11, 42208, 316, 2915, 13, 40927, 10394, 14, 17, 8, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 1303, 1332, 1355, 89, 959, 15452, 198, 220, 900, 404, 4355, 7, 16, 13, 15, 8, 198, 220, 900, 71, 518, 7203, 445, 4943, 198, 220, 15452, 7, 79, 363, 316, 2915, 58, 16, 7131, 16, 4357, 42208, 316, 2915, 58, 18, 7131, 16, 4357, 42208, 316, 2915, 58, 21, 7131, 16, 4357, 42208, 316, 2915, 58, 22, 7131, 16, 4357, 198, 220, 220, 220, 9493, 413, 5649, 28, 20, 11, 198, 220, 220, 220, 15452, 2256, 13664, 28, 1120, 11, 198, 220, 220, 220, 15452, 2256, 20797, 796, 3991, 11, 198, 220, 220, 220, 15452, 2256, 9248, 28, 46582, 14, 19, 11, 198, 220, 220, 220, 923, 6018, 28, 7942, 8, 628, 220, 2488, 9288, 5461, 3419, 6624, 2081, 198, 220, 44872, 7203, 986, 43952, 15452, 12, 9288, 25, 7448, 287, 29568, 69, 3672, 8, 4943, 198, 437, 198, 198, 69, 3672, 796, 366, 6018, 12, 283, 310, 395, 13, 11134, 1, 198, 6018, 62, 5605, 62, 9288, 7, 69, 3672, 8, 198 ]
2.211634
808
function EventBasedManeuverTriggers(arg0::AbstractDetector, arg1::AbstractDetector) return EventBasedManeuverTriggers((AbstractDetector, AbstractDetector), arg0, arg1) end function event_occurred(obj::EventBasedManeuverTriggers, arg0::SpacecraftState, arg1::EventDetector, arg2::jboolean) return jcall(obj, "eventOccurred", Action, (SpacecraftState, EventDetector, jboolean), arg0, arg1, arg2) end function get_events_detectors(obj::EventBasedManeuverTriggers) return jcall(obj, "getEventsDetectors", Stream, ()) end function get_field_events_detectors(obj::EventBasedManeuverTriggers, arg0::Field) return jcall(obj, "getFieldEventsDetectors", Stream, (Field,), arg0) end function get_start_firing_detector(obj::EventBasedManeuverTriggers) return jcall(obj, "getStartFiringDetector", AbstractDetector, ()) end function get_stop_firing_detector(obj::EventBasedManeuverTriggers) return jcall(obj, "getStopFiringDetector", AbstractDetector, ()) end function get_triggered_end(obj::EventBasedManeuverTriggers) return jcall(obj, "getTriggeredEnd", AbsoluteDate, ()) end function get_triggered_start(obj::EventBasedManeuverTriggers) return jcall(obj, "getTriggeredStart", AbsoluteDate, ()) end function init(obj::EventBasedManeuverTriggers, arg0::SpacecraftState, arg1::AbsoluteDate) return jcall(obj, "init", void, (SpacecraftState, AbsoluteDate), arg0, arg1) end function is_firing(obj::EventBasedManeuverTriggers, arg0::AbsoluteDate) return jcall(obj, "isFiring", jboolean, (AbsoluteDate,), arg0) end function is_firing(obj::EventBasedManeuverTriggers, arg0::AbsoluteDate, arg1::Vector{jdouble}) return jcall(obj, "isFiring", jboolean, (AbsoluteDate, Vector{jdouble}), arg0, arg1) end function is_firing(obj::EventBasedManeuverTriggers, arg0::FieldAbsoluteDate, arg1::Vector{RealFieldElement}) return jcall(obj, "isFiring", jboolean, (FieldAbsoluteDate, Vector{RealFieldElement}), arg0, arg1) end function reset_state(obj::EventHandler, arg0::EventDetector, arg1::SpacecraftState) return jcall(obj, "resetState", SpacecraftState, (EventDetector, SpacecraftState), arg0, arg1) end function set_firing(obj::EventBasedManeuverTriggers, arg0::jboolean, arg1::AbsoluteDate) return jcall(obj, "setFiring", void, (jboolean, AbsoluteDate), arg0, arg1) end
[ 8818, 8558, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 7, 853, 15, 3712, 23839, 11242, 9250, 11, 1822, 16, 3712, 23839, 11242, 9250, 8, 198, 220, 220, 220, 1441, 8558, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 19510, 23839, 11242, 9250, 11, 27741, 11242, 9250, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 1785, 62, 13966, 12808, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 14106, 3323, 9012, 11, 1822, 16, 3712, 9237, 11242, 9250, 11, 1822, 17, 3712, 73, 2127, 21052, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 15596, 29223, 12808, 1600, 7561, 11, 357, 14106, 3323, 9012, 11, 8558, 11242, 9250, 11, 474, 2127, 21052, 828, 1822, 15, 11, 1822, 16, 11, 1822, 17, 8, 198, 437, 198, 198, 8818, 651, 62, 31534, 62, 15255, 478, 669, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 37103, 47504, 669, 1600, 13860, 11, 32865, 198, 437, 198, 198, 8818, 651, 62, 3245, 62, 31534, 62, 15255, 478, 669, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 15878, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 15878, 37103, 47504, 669, 1600, 13860, 11, 357, 15878, 11, 828, 1822, 15, 8, 198, 437, 198, 198, 8818, 651, 62, 9688, 62, 69, 3428, 62, 15255, 9250, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 10434, 37, 3428, 11242, 9250, 1600, 27741, 11242, 9250, 11, 32865, 198, 437, 198, 198, 8818, 651, 62, 11338, 62, 69, 3428, 62, 15255, 9250, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 19485, 37, 3428, 11242, 9250, 1600, 27741, 11242, 9250, 11, 32865, 198, 437, 198, 198, 8818, 651, 62, 2213, 328, 10446, 62, 437, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 2898, 328, 10446, 12915, 1600, 36532, 10430, 11, 32865, 198, 437, 198, 198, 8818, 651, 62, 2213, 328, 10446, 62, 9688, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 2898, 328, 10446, 10434, 1600, 36532, 10430, 11, 32865, 198, 437, 198, 198, 8818, 2315, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 14106, 3323, 9012, 11, 1822, 16, 3712, 24849, 3552, 10430, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 15003, 1600, 7951, 11, 357, 14106, 3323, 9012, 11, 36532, 10430, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 318, 62, 69, 3428, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 24849, 3552, 10430, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 271, 37, 3428, 1600, 474, 2127, 21052, 11, 357, 24849, 3552, 10430, 11, 828, 1822, 15, 8, 198, 437, 198, 198, 8818, 318, 62, 69, 3428, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 24849, 3552, 10430, 11, 1822, 16, 3712, 38469, 90, 73, 23352, 30072, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 271, 37, 3428, 1600, 474, 2127, 21052, 11, 357, 24849, 3552, 10430, 11, 20650, 90, 73, 23352, 92, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 318, 62, 69, 3428, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 15878, 24849, 3552, 10430, 11, 1822, 16, 3712, 38469, 90, 15633, 15878, 20180, 30072, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 271, 37, 3428, 1600, 474, 2127, 21052, 11, 357, 15878, 24849, 3552, 10430, 11, 20650, 90, 15633, 15878, 20180, 92, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 13259, 62, 5219, 7, 26801, 3712, 9237, 25060, 11, 1822, 15, 3712, 9237, 11242, 9250, 11, 1822, 16, 3712, 14106, 3323, 9012, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 42503, 9012, 1600, 4687, 3323, 9012, 11, 357, 9237, 11242, 9250, 11, 4687, 3323, 9012, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 900, 62, 69, 3428, 7, 26801, 3712, 9237, 15001, 44, 1531, 84, 332, 2898, 328, 5355, 11, 1822, 15, 3712, 73, 2127, 21052, 11, 1822, 16, 3712, 24849, 3552, 10430, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 2617, 37, 3428, 1600, 7951, 11, 357, 73, 2127, 21052, 11, 36532, 10430, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 628 ]
2.789157
830
module StressTest """ dream(seconds) Like Base.sleep() except maxes out the thread for a specified number of seconds. The minimum dream time is 1 millisecond or input of `0.001`. """ function dream(sec::Real) sec ≥ 0 || throw(ArgumentError("cannot dream for $sec seconds")) t = Timer(sec) while isopen(t) yield() end nothing end export dream end # module
[ 21412, 36957, 14402, 198, 198, 37811, 198, 220, 220, 220, 4320, 7, 43012, 8, 198, 198, 7594, 7308, 13, 42832, 3419, 2845, 3509, 274, 503, 262, 4704, 329, 257, 7368, 1271, 286, 4201, 13, 383, 5288, 4320, 640, 318, 352, 198, 17805, 27866, 623, 393, 5128, 286, 4600, 15, 13, 8298, 44646, 198, 37811, 198, 8818, 4320, 7, 2363, 3712, 15633, 8, 198, 220, 220, 220, 792, 26870, 657, 8614, 3714, 7, 28100, 1713, 12331, 7203, 66, 34574, 4320, 329, 720, 2363, 4201, 48774, 198, 220, 220, 220, 256, 796, 5045, 263, 7, 2363, 8, 198, 220, 220, 220, 981, 318, 9654, 7, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7800, 3419, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2147, 198, 437, 198, 198, 39344, 4320, 198, 198, 437, 1303, 8265, 198 ]
2.854015
137
""" qubits(N::Int; mixed::Bool=false) qubits(sites::Vector{<:Index}; mixed::Bool=false) Initialize qubits to: - An MPS wavefunction `|ψ⟩` if `mixed = false` - An MPO density matrix `ρ` if `mixed = true` """ qubits(N::Int; mixed::Bool=false) = qubits(siteinds("Qubit", N); mixed=mixed) function qubits(sites::Vector{<:Index}; mixed::Bool=false) @warn "Method `qubits` is deprecated, use `productstate` or `productoperator` instead." ψ = productMPS(sites, "0") mixed && return MPO(ψ) return ψ end """ qubits(M::Union{MPS,MPO,LPDO}; mixed::Bool=false) Initialize qubits on the Hilbert space of a reference state, given as `MPS`, `MPO` or `LPDO`. """ qubits(M::Union{MPS,MPO,LPDO}; mixed::Bool=false) = qubits(hilbertspace(M); mixed=mixed) """ qubits(N::Int, states::Vector{String}; mixed::Bool=false) qubits(sites::Vector{<:Index}, states::Vector{String};mixed::Bool = false) Initialize the qubits to a given single-qubit product state. """ function qubits(N::Int, states::Vector{String}; mixed::Bool=false) return qubits(siteinds("Qubit", N), states; mixed=mixed) end function qubits(sites::Vector{<:Index}, states::Vector{String}; mixed::Bool=false) @warn "Method `qubits` is deprecated, use `productstate` or `productoperator` instead." N = length(sites) @assert N == length(states) ψ = productMPS(sites, "0") if N == 1 s1 = sites[1] state1 = state(states[1]) if eltype(state1) <: Complex ψ[1] = complex(ψ[1]) end for j in 1:dim(s1) ψ[1][s1 => j] = state1[j] end mixed && return MPO(ψ) return ψ end # Set first site s1 = sites[1] l1 = linkind(ψ, 1) state1 = state(states[1]) if eltype(state1) <: Complex ψ[1] = complex(ψ[1]) end for j in 1:dim(s1) ψ[1][s1 => j, l1 => 1] = state1[j] end # Set sites 2:N-1 for n in 2:(N - 1) sn = sites[n] ln_1 = linkind(ψ, n - 1) ln = linkind(ψ, n) state_n = state(states[n]) if eltype(state_n) <: Complex ψ[n] = complex(ψ[n]) end for j in 1:dim(sn) ψ[n][sn => j, ln_1 => 1, ln => 1] = state_n[j] end end # Set last site N sN = sites[N] lN_1 = linkind(ψ, N - 1) state_N = state(states[N]) if eltype(state_N) <: Complex ψ[N] = complex(ψ[N]) end for j in 1:dim(sN) ψ[N][sN => j, lN_1 => 1] = state_N[j] end mixed && return MPO(ψ) return ψ end
[ 198, 37811, 198, 220, 220, 220, 627, 9895, 7, 45, 3712, 5317, 26, 7668, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 627, 9895, 7, 49315, 3712, 38469, 90, 27, 25, 15732, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 628, 198, 24243, 1096, 627, 9895, 284, 25, 198, 12, 1052, 337, 3705, 6769, 8818, 4600, 91, 139, 230, 158, 253, 102, 63, 611, 4600, 76, 2966, 796, 3991, 63, 198, 12, 1052, 4904, 46, 12109, 17593, 4600, 33643, 63, 611, 4600, 76, 2966, 796, 2081, 63, 198, 37811, 198, 421, 9895, 7, 45, 3712, 5317, 26, 7668, 3712, 33, 970, 28, 9562, 8, 796, 627, 9895, 7, 15654, 521, 82, 7203, 48, 549, 270, 1600, 399, 1776, 7668, 28, 76, 2966, 8, 198, 198, 8818, 627, 9895, 7, 49315, 3712, 38469, 90, 27, 25, 15732, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 198, 220, 2488, 40539, 366, 17410, 4600, 421, 9895, 63, 318, 39224, 11, 779, 4600, 11167, 5219, 63, 393, 4600, 11167, 46616, 63, 2427, 526, 198, 220, 18074, 230, 796, 1720, 44, 3705, 7, 49315, 11, 366, 15, 4943, 198, 220, 7668, 11405, 1441, 4904, 46, 7, 139, 230, 8, 198, 220, 1441, 18074, 230, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 627, 9895, 7, 44, 3712, 38176, 90, 44, 3705, 11, 7378, 46, 11, 43, 5760, 46, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 198, 198, 24243, 1096, 627, 9895, 319, 262, 47718, 2272, 286, 257, 4941, 1181, 11, 198, 35569, 355, 4600, 44, 3705, 47671, 4600, 7378, 46, 63, 393, 4600, 43, 5760, 46, 44646, 198, 37811, 198, 421, 9895, 7, 44, 3712, 38176, 90, 44, 3705, 11, 7378, 46, 11, 43, 5760, 46, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 796, 627, 9895, 7, 71, 346, 527, 912, 10223, 7, 44, 1776, 7668, 28, 76, 2966, 8, 198, 198, 37811, 198, 220, 220, 220, 627, 9895, 7, 45, 3712, 5317, 11, 2585, 3712, 38469, 90, 10100, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 628, 220, 220, 220, 627, 9895, 7, 49315, 3712, 38469, 90, 27, 25, 15732, 5512, 2585, 3712, 38469, 90, 10100, 19629, 76, 2966, 3712, 33, 970, 796, 3991, 8, 198, 198, 24243, 1096, 262, 627, 9895, 284, 257, 1813, 2060, 12, 421, 2545, 1720, 1181, 13, 198, 37811, 198, 8818, 627, 9895, 7, 45, 3712, 5317, 11, 2585, 3712, 38469, 90, 10100, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 198, 220, 1441, 627, 9895, 7, 15654, 521, 82, 7203, 48, 549, 270, 1600, 399, 828, 2585, 26, 7668, 28, 76, 2966, 8, 198, 437, 198, 198, 8818, 627, 9895, 7, 49315, 3712, 38469, 90, 27, 25, 15732, 5512, 2585, 3712, 38469, 90, 10100, 19629, 7668, 3712, 33, 970, 28, 9562, 8, 198, 220, 2488, 40539, 366, 17410, 4600, 421, 9895, 63, 318, 39224, 11, 779, 4600, 11167, 5219, 63, 393, 4600, 11167, 46616, 63, 2427, 526, 198, 220, 399, 796, 4129, 7, 49315, 8, 198, 220, 2488, 30493, 399, 6624, 4129, 7, 27219, 8, 628, 220, 18074, 230, 796, 1720, 44, 3705, 7, 49315, 11, 366, 15, 4943, 628, 220, 611, 399, 6624, 352, 198, 220, 220, 220, 264, 16, 796, 5043, 58, 16, 60, 198, 220, 220, 220, 1181, 16, 796, 1181, 7, 27219, 58, 16, 12962, 198, 220, 220, 220, 611, 1288, 4906, 7, 5219, 16, 8, 1279, 25, 19157, 198, 220, 220, 220, 220, 220, 18074, 230, 58, 16, 60, 796, 3716, 7, 139, 230, 58, 16, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 474, 287, 352, 25, 27740, 7, 82, 16, 8, 198, 220, 220, 220, 220, 220, 18074, 230, 58, 16, 7131, 82, 16, 5218, 474, 60, 796, 1181, 16, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7668, 11405, 1441, 4904, 46, 7, 139, 230, 8, 198, 220, 220, 220, 1441, 18074, 230, 198, 220, 886, 628, 220, 1303, 5345, 717, 2524, 198, 220, 264, 16, 796, 5043, 58, 16, 60, 198, 220, 300, 16, 796, 2792, 521, 7, 139, 230, 11, 352, 8, 198, 220, 1181, 16, 796, 1181, 7, 27219, 58, 16, 12962, 198, 220, 611, 1288, 4906, 7, 5219, 16, 8, 1279, 25, 19157, 198, 220, 220, 220, 18074, 230, 58, 16, 60, 796, 3716, 7, 139, 230, 58, 16, 12962, 198, 220, 886, 198, 220, 329, 474, 287, 352, 25, 27740, 7, 82, 16, 8, 198, 220, 220, 220, 18074, 230, 58, 16, 7131, 82, 16, 5218, 474, 11, 300, 16, 5218, 352, 60, 796, 1181, 16, 58, 73, 60, 198, 220, 886, 628, 220, 1303, 5345, 5043, 362, 25, 45, 12, 16, 198, 220, 329, 299, 287, 362, 37498, 45, 532, 352, 8, 198, 220, 220, 220, 3013, 796, 5043, 58, 77, 60, 198, 220, 220, 220, 300, 77, 62, 16, 796, 2792, 521, 7, 139, 230, 11, 299, 532, 352, 8, 198, 220, 220, 220, 300, 77, 796, 2792, 521, 7, 139, 230, 11, 299, 8, 198, 220, 220, 220, 1181, 62, 77, 796, 1181, 7, 27219, 58, 77, 12962, 198, 220, 220, 220, 611, 1288, 4906, 7, 5219, 62, 77, 8, 1279, 25, 19157, 198, 220, 220, 220, 220, 220, 18074, 230, 58, 77, 60, 796, 3716, 7, 139, 230, 58, 77, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 474, 287, 352, 25, 27740, 7, 16184, 8, 198, 220, 220, 220, 220, 220, 18074, 230, 58, 77, 7131, 16184, 5218, 474, 11, 300, 77, 62, 16, 5218, 352, 11, 300, 77, 5218, 352, 60, 796, 1181, 62, 77, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 1303, 5345, 938, 2524, 399, 198, 220, 264, 45, 796, 5043, 58, 45, 60, 198, 220, 300, 45, 62, 16, 796, 2792, 521, 7, 139, 230, 11, 399, 532, 352, 8, 198, 220, 1181, 62, 45, 796, 1181, 7, 27219, 58, 45, 12962, 198, 220, 611, 1288, 4906, 7, 5219, 62, 45, 8, 1279, 25, 19157, 198, 220, 220, 220, 18074, 230, 58, 45, 60, 796, 3716, 7, 139, 230, 58, 45, 12962, 198, 220, 886, 198, 220, 329, 474, 287, 352, 25, 27740, 7, 82, 45, 8, 198, 220, 220, 220, 18074, 230, 58, 45, 7131, 82, 45, 5218, 474, 11, 300, 45, 62, 16, 5218, 352, 60, 796, 1181, 62, 45, 58, 73, 60, 198, 220, 886, 628, 220, 7668, 11405, 1441, 4904, 46, 7, 139, 230, 8, 198, 220, 1441, 18074, 230, 198, 437, 628 ]
2.213556
1,077
import CLFFT # figure out a gc safe way to store plans. # weak refs won't work, since the caching should keep them alive. # But at the end, we need to free all of these, otherwise CLFFT will crash # at closing time. # An atexit hook here, which will empty the dictionary seems to introduce racing # conditions. #const plan_dict = Dict() import Base: *, plan_ifft!, plan_fft!, plan_fft, plan_ifft, size, plan_bfft, plan_bfft! struct CLFFTPlan{Direction, Inplace, T, N} <: Base.FFTW.FFTWPlan{T, Direction, Inplace} plan::CLFFT.Plan{T} function CLFFTPlan{Direction, Inplace}(A::CLArray{T, N}) where {T, N, Direction, Inplace} ctx = context(A) p = CLFFT.Plan(T, ctx.context, size(A)) CLFFT.set_layout!(p, :interleaved, :interleaved) if Inplace CLFFT.set_result!(p, :inplace) else CLFFT.set_result!(p, :outofplace) end CLFFT.set_scaling_factor!(p, Direction, 1f0) CLFFT.bake!(p, ctx.queue) new{Direction, Inplace, T, N}(p) end end size(x::CLFFTPlan) = (CLFFT.lengths(x.plan)...,) # ignore flags, but have them to make it base compatible. # TODO can we actually implement the flags? function plan_fft(A::CLArray; flags = nothing, timelimit = Inf) CLFFTPlan{:forward, false}(A) end function plan_fft!(A::CLArray; flags = nothing, timelimit = Inf) CLFFTPlan{:forward, true}(A) end function plan_bfft(A::CLArray, region; flags = nothing, timelimit = Inf) CLFFTPlan{:backward, false}(A) end function plan_bfft!(A::CLArray, region; flags = nothing, timelimit = Inf) CLFFTPlan{:backward, true}(A) end const _queue_ref = Vector{cl.CmdQueue}(1) function *(plan::CLFFTPlan{Direction, true, T, N}, A::CLArray{T, N}) where {T, N, Direction} _queue_ref[] = context(A).queue CLFFT.enqueue_transform(plan.plan, Direction, _queue_ref, buffer(A), nothing) A end function *(plan::CLFFTPlan{Direction, false, T, N}, A::CLArray{T, N}) where {T, N, Direction} _queue_ref[] = context(A).queue y = typeof(A)(size(plan)) CLFFT.enqueue_transform(plan.plan, Direction, _queue_ref, buffer(A), buffer(y)) y end
[ 11748, 7852, 5777, 51, 198, 198, 2, 3785, 503, 257, 308, 66, 3338, 835, 284, 3650, 3352, 13, 198, 2, 4939, 1006, 82, 1839, 470, 670, 11, 1201, 262, 40918, 815, 1394, 606, 6776, 13, 198, 2, 887, 379, 262, 886, 11, 356, 761, 284, 1479, 477, 286, 777, 11, 4306, 7852, 5777, 51, 481, 7014, 198, 2, 379, 9605, 640, 13, 198, 2, 1052, 379, 37023, 8011, 994, 11, 543, 481, 6565, 262, 22155, 2331, 284, 10400, 11717, 198, 2, 3403, 13, 198, 2, 9979, 1410, 62, 11600, 796, 360, 713, 3419, 198, 11748, 7308, 25, 1635, 11, 1410, 62, 361, 701, 28265, 1410, 62, 487, 83, 28265, 1410, 62, 487, 83, 11, 1410, 62, 361, 701, 11, 2546, 11, 1410, 62, 65, 487, 83, 11, 1410, 62, 65, 487, 83, 0, 198, 198, 7249, 7852, 5777, 51, 20854, 90, 35, 4154, 11, 554, 5372, 11, 309, 11, 399, 92, 1279, 25, 7308, 13, 5777, 34551, 13, 5777, 34551, 20854, 90, 51, 11, 41837, 11, 554, 5372, 92, 198, 220, 220, 220, 1410, 3712, 5097, 5777, 51, 13, 20854, 90, 51, 92, 198, 220, 220, 220, 2163, 7852, 5777, 51, 20854, 90, 35, 4154, 11, 554, 5372, 92, 7, 32, 3712, 5097, 19182, 90, 51, 11, 399, 30072, 810, 1391, 51, 11, 399, 11, 41837, 11, 554, 5372, 92, 198, 220, 220, 220, 220, 220, 220, 220, 269, 17602, 796, 4732, 7, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 7852, 5777, 51, 13, 20854, 7, 51, 11, 269, 17602, 13, 22866, 11, 2546, 7, 32, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 7852, 5777, 51, 13, 2617, 62, 39786, 0, 7, 79, 11, 1058, 3849, 293, 9586, 11, 1058, 3849, 293, 9586, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 554, 5372, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7852, 5777, 51, 13, 2617, 62, 20274, 0, 7, 79, 11, 1058, 259, 5372, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7852, 5777, 51, 13, 2617, 62, 20274, 0, 7, 79, 11, 1058, 448, 1659, 5372, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 7852, 5777, 51, 13, 2617, 62, 1416, 4272, 62, 31412, 0, 7, 79, 11, 41837, 11, 352, 69, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7852, 5777, 51, 13, 65, 539, 0, 7, 79, 11, 269, 17602, 13, 36560, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 90, 35, 4154, 11, 554, 5372, 11, 309, 11, 399, 92, 7, 79, 8, 198, 220, 220, 220, 886, 198, 437, 198, 7857, 7, 87, 3712, 5097, 5777, 51, 20854, 8, 796, 357, 5097, 5777, 51, 13, 13664, 82, 7, 87, 13, 11578, 26513, 35751, 198, 198, 2, 8856, 9701, 11, 475, 423, 606, 284, 787, 340, 2779, 11670, 13, 198, 2, 16926, 46, 460, 356, 1682, 3494, 262, 9701, 30, 198, 8818, 1410, 62, 487, 83, 7, 32, 3712, 5097, 19182, 26, 9701, 796, 2147, 11, 4628, 417, 320, 270, 796, 4806, 8, 198, 220, 220, 220, 7852, 5777, 51, 20854, 90, 25, 11813, 11, 3991, 92, 7, 32, 8, 198, 437, 198, 8818, 1410, 62, 487, 83, 0, 7, 32, 3712, 5097, 19182, 26, 9701, 796, 2147, 11, 4628, 417, 320, 270, 796, 4806, 8, 198, 220, 220, 220, 7852, 5777, 51, 20854, 90, 25, 11813, 11, 2081, 92, 7, 32, 8, 198, 437, 198, 8818, 1410, 62, 65, 487, 83, 7, 32, 3712, 5097, 19182, 11, 3814, 26, 9701, 796, 2147, 11, 4628, 417, 320, 270, 796, 4806, 8, 198, 220, 220, 220, 7852, 5777, 51, 20854, 90, 25, 1891, 904, 11, 3991, 92, 7, 32, 8, 198, 437, 198, 8818, 1410, 62, 65, 487, 83, 0, 7, 32, 3712, 5097, 19182, 11, 3814, 26, 9701, 796, 2147, 11, 4628, 417, 320, 270, 796, 4806, 8, 198, 220, 220, 220, 7852, 5777, 51, 20854, 90, 25, 1891, 904, 11, 2081, 92, 7, 32, 8, 198, 437, 198, 198, 9979, 4808, 36560, 62, 5420, 796, 20650, 90, 565, 13, 40109, 34991, 92, 7, 16, 8, 198, 8818, 1635, 7, 11578, 3712, 5097, 5777, 51, 20854, 90, 35, 4154, 11, 2081, 11, 309, 11, 399, 5512, 317, 3712, 5097, 19182, 90, 51, 11, 399, 30072, 810, 1391, 51, 11, 399, 11, 41837, 92, 198, 220, 220, 220, 4808, 36560, 62, 5420, 21737, 796, 4732, 7, 32, 737, 36560, 198, 220, 220, 220, 7852, 5777, 51, 13, 268, 36560, 62, 35636, 7, 11578, 13, 11578, 11, 41837, 11, 4808, 36560, 62, 5420, 11, 11876, 7, 32, 828, 2147, 8, 198, 220, 220, 220, 317, 198, 437, 198, 8818, 1635, 7, 11578, 3712, 5097, 5777, 51, 20854, 90, 35, 4154, 11, 3991, 11, 309, 11, 399, 5512, 317, 3712, 5097, 19182, 90, 51, 11, 399, 30072, 810, 1391, 51, 11, 399, 11, 41837, 92, 198, 220, 220, 220, 4808, 36560, 62, 5420, 21737, 796, 4732, 7, 32, 737, 36560, 198, 220, 220, 220, 331, 796, 2099, 1659, 7, 32, 5769, 7857, 7, 11578, 4008, 198, 220, 220, 220, 7852, 5777, 51, 13, 268, 36560, 62, 35636, 7, 11578, 13, 11578, 11, 41837, 11, 4808, 36560, 62, 5420, 11, 11876, 7, 32, 828, 11876, 7, 88, 4008, 198, 220, 220, 220, 331, 198, 437, 198 ]
2.376392
898
include("myfile.jl")
[ 17256, 7203, 1820, 7753, 13, 20362, 4943, 198 ]
2.625
8
# Stubs - Can be used as references struct Account <: QBObject end struct ItemBasedExpenseLineDetail; end struct Employee <: QBObject end struct Vendor <: QBObject end struct Customer <: QBObject end struct Item <: QBObject end struct Company <: QBObject Id::Maybe{Int} end from_json(::Type{ItemBasedExpenseLineDetail}, data) = ItemBasedExpenseLineDetail() # Class struct Class <: QBObject Id::Maybe{Int64} SyncToken::Maybe{Int64} Parent::Optional{QboRef{Class}} Name::Maybe{String} Active::Maybe{Bool} end @eval @make_default_methods $Class # PaymentMethod mutable struct PaymentMethod Id::Maybe{Int} SyncToken::Maybe{Int} Name::Maybe{String} Type::Maybe{String} end @eval @make_default_methods $PaymentMethod ### Purchases struct AccountBasedExpenseLineDetail Account::QboRef{Account} Class::Optional{QboRef{Class}} BillableStatus::String end @eval @make_default_methods $AccountBasedExpenseLineDetail const DetailType = Union{ItemBasedExpenseLineDetail, AccountBasedExpenseLineDetail} struct Line Id::Maybe{Int} Amount::Maybe{Decimal} Detail::DetailType end Line(Amount::Decimal, Detail::DetailType) = Line(missing, Amount, Detail) @eval from_json(::Type{Line}, data) = @from_json $Line $(Dict( :Detail => quote if data["DetailType"] == "AccountBasedExpenseLineDetail" from_json(AccountBasedExpenseLineDetail, data["AccountBasedExpenseLineDetail"]) elseif data["DetailType"] == "ItemBasedExpenseLineDetail" from_json(ItemBasedExpenseLineDetail, data["ItemBasedExpenseLineDetail"]) end end )) @eval to_json(data::Line) = @to_json $Line $(Dict( :Detail => quote if isa(data.Detail, AccountBasedExpenseLineDetail) ret["DetailType"] = "AccountBasedExpenseLineDetail" ret["AccountBasedExpenseLineDetail"] = to_json(data.Detail) elseif isa(data.Detail, ItemBasedExpenseLineDetail) ret["DetailType"] = "ItemBasedExpenseLineDetail" ret["ItemBasedExpenseLineDetail"] = to_json(data.Detail) end end )) mutable struct Purchase <: QBObject Id::Maybe{Int} SyncToken::Maybe{Int} Account::Maybe{QboRef{Account}} PaymentMethod::Optional{QboRef{PaymentMethod}} PaymentType::Maybe{String} Entity::Maybe{QboRef{<:QBObject}} TxnDate::Maybe{Date} Lines::Vector{Line} end @eval @make_default_methods $Purchase $(Dict( :Lines => "Line" )) # Type Mapping function key_to_type(key::String) Dict{String, Type}( "Purchase" => Purchase, "Class" => Class, "Employee" => Employee, "PaymentMethod" => PaymentMethod )[key] end
[ 2, 520, 23161, 532, 1680, 307, 973, 355, 10288, 198, 7249, 10781, 1279, 25, 16135, 10267, 886, 198, 7249, 9097, 15001, 16870, 1072, 13949, 11242, 603, 26, 886, 198, 7249, 36824, 1279, 25, 16135, 10267, 886, 198, 7249, 39896, 1279, 25, 16135, 10267, 886, 198, 7249, 22092, 1279, 25, 16135, 10267, 886, 198, 7249, 9097, 1279, 25, 16135, 10267, 886, 198, 198, 7249, 5834, 1279, 25, 16135, 10267, 198, 220, 220, 220, 5121, 3712, 13300, 90, 5317, 92, 198, 437, 198, 198, 6738, 62, 17752, 7, 3712, 6030, 90, 7449, 15001, 16870, 1072, 13949, 11242, 603, 5512, 1366, 8, 796, 9097, 15001, 16870, 1072, 13949, 11242, 603, 3419, 198, 198, 2, 5016, 198, 7249, 5016, 1279, 25, 16135, 10267, 198, 220, 220, 220, 5121, 3712, 13300, 90, 5317, 2414, 92, 198, 220, 220, 220, 35908, 30642, 3712, 13300, 90, 5317, 2414, 92, 198, 220, 220, 220, 16774, 3712, 30719, 90, 48, 2127, 8134, 90, 9487, 11709, 198, 220, 220, 220, 6530, 3712, 13300, 90, 10100, 92, 198, 220, 220, 220, 14199, 3712, 13300, 90, 33, 970, 92, 198, 437, 198, 31, 18206, 2488, 15883, 62, 12286, 62, 24396, 82, 720, 9487, 198, 198, 2, 28784, 17410, 198, 76, 18187, 2878, 28784, 17410, 198, 220, 220, 220, 5121, 3712, 13300, 90, 5317, 92, 198, 220, 220, 220, 35908, 30642, 3712, 13300, 90, 5317, 92, 198, 220, 220, 220, 6530, 3712, 13300, 90, 10100, 92, 198, 220, 220, 220, 5994, 3712, 13300, 90, 10100, 92, 198, 437, 198, 31, 18206, 2488, 15883, 62, 12286, 62, 24396, 82, 720, 19197, 434, 17410, 198, 198, 21017, 34459, 1386, 198, 198, 7249, 10781, 15001, 16870, 1072, 13949, 11242, 603, 198, 220, 220, 220, 10781, 3712, 48, 2127, 8134, 90, 30116, 92, 198, 220, 220, 220, 5016, 3712, 30719, 90, 48, 2127, 8134, 90, 9487, 11709, 198, 220, 220, 220, 3941, 540, 19580, 3712, 10100, 198, 437, 198, 31, 18206, 2488, 15883, 62, 12286, 62, 24396, 82, 720, 30116, 15001, 16870, 1072, 13949, 11242, 603, 198, 198, 9979, 42585, 6030, 796, 4479, 90, 7449, 15001, 16870, 1072, 13949, 11242, 603, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10781, 15001, 16870, 1072, 13949, 11242, 603, 92, 198, 198, 7249, 6910, 198, 220, 220, 220, 5121, 3712, 13300, 90, 5317, 92, 198, 220, 220, 220, 26308, 3712, 13300, 90, 10707, 4402, 92, 198, 220, 220, 220, 42585, 3712, 11242, 603, 6030, 198, 437, 198, 198, 13949, 7, 31264, 3712, 10707, 4402, 11, 42585, 3712, 11242, 603, 6030, 8, 796, 6910, 7, 45688, 11, 26308, 11, 42585, 8, 198, 198, 31, 18206, 422, 62, 17752, 7, 3712, 6030, 90, 13949, 5512, 1366, 8, 796, 2488, 6738, 62, 17752, 720, 13949, 29568, 35, 713, 7, 198, 220, 220, 220, 1058, 11242, 603, 5218, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 14692, 11242, 603, 6030, 8973, 6624, 366, 30116, 15001, 16870, 1072, 13949, 11242, 603, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 62, 17752, 7, 30116, 15001, 16870, 1072, 13949, 11242, 603, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 14692, 30116, 15001, 16870, 1072, 13949, 11242, 603, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 1366, 14692, 11242, 603, 6030, 8973, 6624, 366, 7449, 15001, 16870, 1072, 13949, 11242, 603, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 62, 17752, 7, 7449, 15001, 16870, 1072, 13949, 11242, 603, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 14692, 7449, 15001, 16870, 1072, 13949, 11242, 603, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 4008, 198, 198, 31, 18206, 284, 62, 17752, 7, 7890, 3712, 13949, 8, 796, 2488, 1462, 62, 17752, 720, 13949, 29568, 35, 713, 7, 198, 220, 220, 220, 1058, 11242, 603, 5218, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 64, 7, 7890, 13, 11242, 603, 11, 10781, 15001, 16870, 1072, 13949, 11242, 603, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 14692, 11242, 603, 6030, 8973, 796, 366, 30116, 15001, 16870, 1072, 13949, 11242, 603, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 14692, 30116, 15001, 16870, 1072, 13949, 11242, 603, 8973, 796, 284, 62, 17752, 7, 7890, 13, 11242, 603, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 7890, 13, 11242, 603, 11, 9097, 15001, 16870, 1072, 13949, 11242, 603, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 14692, 11242, 603, 6030, 8973, 796, 366, 7449, 15001, 16870, 1072, 13949, 11242, 603, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 14692, 7449, 15001, 16870, 1072, 13949, 11242, 603, 8973, 796, 284, 62, 17752, 7, 7890, 13, 11242, 603, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 15306, 198, 198, 76, 18187, 2878, 27637, 1279, 25, 16135, 10267, 198, 220, 220, 220, 5121, 3712, 13300, 90, 5317, 92, 198, 220, 220, 220, 35908, 30642, 3712, 13300, 90, 5317, 92, 198, 220, 220, 220, 10781, 3712, 13300, 90, 48, 2127, 8134, 90, 30116, 11709, 198, 220, 220, 220, 28784, 17410, 3712, 30719, 90, 48, 2127, 8134, 90, 19197, 434, 17410, 11709, 198, 220, 220, 220, 28784, 6030, 3712, 13300, 90, 10100, 92, 198, 220, 220, 220, 20885, 3712, 13300, 90, 48, 2127, 8134, 90, 27, 25, 40291, 10267, 11709, 198, 220, 220, 220, 309, 87, 77, 10430, 3712, 13300, 90, 10430, 92, 198, 220, 220, 220, 26299, 3712, 38469, 90, 13949, 92, 198, 437, 198, 198, 31, 18206, 2488, 15883, 62, 12286, 62, 24396, 82, 720, 47651, 29568, 35, 713, 7, 198, 220, 220, 220, 1058, 43, 1127, 5218, 366, 13949, 1, 198, 4008, 198, 198, 2, 5994, 337, 5912, 198, 8818, 1994, 62, 1462, 62, 4906, 7, 2539, 3712, 10100, 8, 198, 220, 220, 220, 360, 713, 90, 10100, 11, 5994, 92, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 47651, 1, 5218, 27637, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 9487, 1, 5218, 5016, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 29733, 1453, 1, 5218, 36824, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 19197, 434, 17410, 1, 5218, 28784, 17410, 198, 220, 220, 220, 1267, 58, 2539, 60, 198, 437 ]
2.480144
1,108
function area_balance( psi_container::PSIContainer, expression::Symbol, area_mapping::Dict{String, Array{PSY.Bus, 1}}, branches, ) time_steps = model_time_steps(psi_container) remove_undef!(psi_container.expressions[expression]) nodal_net_balance = psi_container.expressions[expression] constraint_bal = JuMPConstraintArray(undef, keys(area_mapping), time_steps) participation_assignment_up = JuMPConstraintArray(undef, keys(area_mapping), time_steps) participation_assignment_dn = JuMPConstraintArray(undef, keys(area_mapping), time_steps) assign_constraint!(psi_container, "area_dispatch_balance", constraint_bal) area_balance = get_variable(psi_container, ActivePowerVariable, PSY.Area) for (k, buses_in_area) in area_mapping for t in time_steps area_net = model_has_parameters(psi_container) ? zero(PGAE) : JuMP.AffExpr(0.0) for b in buses_in_area JuMP.add_to_expression!(area_net, nodal_net_balance[PSY.get_number(b), t]) end constraint_bal[k, t] = JuMP.@constraint(psi_container.JuMPmodel, area_balance[k, t] == area_net) end end expr_up = get_expression(psi_container, :emergency_up) expr_dn = get_expression(psi_container, :emergency_dn) assign_constraint!( psi_container, "participation_assignment_up", participation_assignment_up, ) assign_constraint!( psi_container, "participation_assignment_dn", participation_assignment_dn, ) for area in keys(area_mapping), t in time_steps participation_assignment_up[area, t] = JuMP.@constraint(psi_container.JuMPmodel, expr_up[area, t] == 0) participation_assignment_dn[area, t] = JuMP.@constraint(psi_container.JuMPmodel, expr_dn[area, t] == 0) end return end
[ 8818, 1989, 62, 20427, 7, 198, 220, 220, 220, 46231, 62, 34924, 3712, 3705, 2149, 756, 10613, 11, 198, 220, 220, 220, 5408, 3712, 13940, 23650, 11, 198, 220, 220, 220, 1989, 62, 76, 5912, 3712, 35, 713, 90, 10100, 11, 15690, 90, 3705, 56, 13, 16286, 11, 352, 92, 5512, 198, 220, 220, 220, 13737, 11, 198, 8, 198, 220, 220, 220, 640, 62, 20214, 796, 2746, 62, 2435, 62, 20214, 7, 862, 72, 62, 34924, 8, 198, 220, 220, 220, 4781, 62, 917, 891, 0, 7, 862, 72, 62, 34924, 13, 42712, 507, 58, 38011, 12962, 198, 220, 220, 220, 18666, 282, 62, 3262, 62, 20427, 796, 46231, 62, 34924, 13, 42712, 507, 58, 38011, 60, 198, 220, 220, 220, 32315, 62, 6893, 796, 12585, 7378, 3103, 2536, 2913, 19182, 7, 917, 891, 11, 8251, 7, 20337, 62, 76, 5912, 828, 640, 62, 20214, 8, 198, 220, 220, 220, 10270, 62, 562, 16747, 62, 929, 796, 12585, 7378, 3103, 2536, 2913, 19182, 7, 917, 891, 11, 8251, 7, 20337, 62, 76, 5912, 828, 640, 62, 20214, 8, 198, 220, 220, 220, 10270, 62, 562, 16747, 62, 32656, 796, 12585, 7378, 3103, 2536, 2913, 19182, 7, 917, 891, 11, 8251, 7, 20337, 62, 76, 5912, 828, 640, 62, 20214, 8, 198, 220, 220, 220, 8333, 62, 1102, 2536, 2913, 0, 7, 862, 72, 62, 34924, 11, 366, 20337, 62, 6381, 17147, 62, 20427, 1600, 32315, 62, 6893, 8, 198, 220, 220, 220, 1989, 62, 20427, 796, 651, 62, 45286, 7, 862, 72, 62, 34924, 11, 14199, 13434, 43015, 11, 6599, 56, 13, 30547, 8, 198, 220, 220, 220, 329, 357, 74, 11, 16893, 62, 259, 62, 20337, 8, 287, 1989, 62, 76, 5912, 198, 220, 220, 220, 220, 220, 220, 220, 329, 256, 287, 640, 62, 20214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1989, 62, 3262, 796, 2746, 62, 10134, 62, 17143, 7307, 7, 862, 72, 62, 34924, 8, 5633, 6632, 7, 6968, 14242, 8, 1058, 12585, 7378, 13, 35191, 3109, 1050, 7, 15, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 275, 287, 16893, 62, 259, 62, 20337, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12585, 7378, 13, 2860, 62, 1462, 62, 38011, 0, 7, 20337, 62, 3262, 11, 18666, 282, 62, 3262, 62, 20427, 58, 3705, 56, 13, 1136, 62, 17618, 7, 65, 828, 256, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 32315, 62, 6893, 58, 74, 11, 256, 60, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12585, 7378, 13, 31, 1102, 2536, 2913, 7, 862, 72, 62, 34924, 13, 33018, 7378, 19849, 11, 1989, 62, 20427, 58, 74, 11, 256, 60, 6624, 1989, 62, 3262, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44052, 62, 929, 796, 651, 62, 38011, 7, 862, 72, 62, 34924, 11, 1058, 24677, 4949, 62, 929, 8, 198, 220, 220, 220, 44052, 62, 32656, 796, 651, 62, 38011, 7, 862, 72, 62, 34924, 11, 1058, 24677, 4949, 62, 32656, 8, 628, 220, 220, 220, 8333, 62, 1102, 2536, 2913, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 62, 34924, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 48013, 341, 62, 562, 16747, 62, 929, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 10270, 62, 562, 16747, 62, 929, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 8333, 62, 1102, 2536, 2913, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 62, 34924, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 48013, 341, 62, 562, 16747, 62, 32656, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 10270, 62, 562, 16747, 62, 32656, 11, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 329, 1989, 287, 8251, 7, 20337, 62, 76, 5912, 828, 256, 287, 640, 62, 20214, 198, 220, 220, 220, 220, 220, 220, 220, 10270, 62, 562, 16747, 62, 929, 58, 20337, 11, 256, 60, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12585, 7378, 13, 31, 1102, 2536, 2913, 7, 862, 72, 62, 34924, 13, 33018, 7378, 19849, 11, 44052, 62, 929, 58, 20337, 11, 256, 60, 6624, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 10270, 62, 562, 16747, 62, 32656, 58, 20337, 11, 256, 60, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12585, 7378, 13, 31, 1102, 2536, 2913, 7, 862, 72, 62, 34924, 13, 33018, 7378, 19849, 11, 44052, 62, 32656, 58, 20337, 11, 256, 60, 6624, 657, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 198, 437, 198 ]
2.294903
824
export Transition; struct Transition move::Move label::String end
[ 39344, 40658, 26, 198, 198, 7249, 40658, 198, 220, 1445, 3712, 21774, 198, 220, 6167, 3712, 10100, 198, 437, 628 ]
3.6
20
using ROCKS using Documenter makedocs(; modules = [ROCKS], authors = "Daymond Ling", repo = "https://github.com/DaymondLing/ROCKS.jl/blob/{commit}{path}#L{line}", sitename = "ROCKS.jl", format = Documenter.HTML(; prettyurls = get(ENV, "CI", "false") == "true", canonical = "https://DaymondLing.github.io/ROCKS.jl/stable", assets = String[], ), pages = [ "Home" => "index.md", "User's Guide" => [ "KS Test" => "man/kstest.md", "ROC" => "man/roc.md", "Plots and Tables" => "man/bcdiag.md", ], "Function Reference" => "Reference.md", ], ) deploydocs(; repo = "github.com/DaymondLing/ROCKS.jl.git", devbranch = "main")
[ 3500, 41320, 50, 198, 3500, 16854, 263, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 796, 685, 49, 11290, 50, 4357, 198, 220, 220, 220, 7035, 796, 366, 12393, 6327, 25116, 1600, 198, 220, 220, 220, 29924, 796, 366, 5450, 1378, 12567, 13, 785, 14, 12393, 6327, 43, 278, 14, 49, 11290, 50, 13, 20362, 14, 2436, 672, 14, 90, 41509, 18477, 6978, 92, 2, 43, 90, 1370, 92, 1600, 198, 220, 220, 220, 1650, 12453, 796, 366, 49, 11290, 50, 13, 20362, 1600, 198, 220, 220, 220, 5794, 796, 16854, 263, 13, 28656, 7, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2495, 6371, 82, 796, 651, 7, 1677, 53, 11, 366, 25690, 1600, 366, 9562, 4943, 6624, 366, 7942, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 40091, 796, 366, 5450, 1378, 12393, 6327, 43, 278, 13, 12567, 13, 952, 14, 49, 11290, 50, 13, 20362, 14, 31284, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 6798, 796, 10903, 58, 4357, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 5468, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 366, 16060, 1, 5218, 366, 9630, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 12982, 338, 10005, 1, 5218, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 27015, 6208, 1, 5218, 366, 805, 14, 74, 301, 395, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 49, 4503, 1, 5218, 366, 805, 14, 12204, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3646, 1747, 290, 33220, 1, 5218, 366, 805, 14, 65, 10210, 72, 363, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 16589, 198, 220, 220, 220, 220, 220, 220, 220, 366, 22203, 20984, 1, 5218, 366, 26687, 13, 9132, 1600, 198, 220, 220, 220, 16589, 198, 8, 198, 198, 2934, 1420, 31628, 7, 26, 29924, 796, 366, 12567, 13, 785, 14, 12393, 6327, 43, 278, 14, 49, 11290, 50, 13, 20362, 13, 18300, 1600, 1614, 1671, 3702, 796, 366, 12417, 4943, 198 ]
2.041322
363
include("1.2.1.1 (a+b x+c x^2)^p.jl") include("1.2.1.2 (d+e x)^m (a+b x+c x^2)^p.jl") include("1.2.1.3 (d+e x)^m (f+g x) (a+b x+c x^2)^p.jl") include("1.2.1.4 (d+e x)^m (f+g x)^n (a+b x+c x^2)^p.jl") include("1.2.1.5 (a+b x+c x^2)^p (d+e x+f x^2)^q.jl") include("1.2.1.6 (g+h x)^m (a+b x+c x^2)^p (d+e x+f x^2)^q.jl") include("1.2.1.7 (a+b x+c x^2)^p (d+e x+f x^2)^q (A+B x+C x^2).jl") include("1.2.1.8 P(x) (a+b x+c x^2)^p.jl") include("1.2.1.9 P(x) (d+e x)^m (a+b x+c x^2)^p.jl")
[ 17256, 7203, 16, 13, 17, 13, 16, 13, 16, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 17, 357, 67, 10, 68, 2124, 8, 61, 76, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 18, 357, 67, 10, 68, 2124, 8, 61, 76, 357, 69, 10, 70, 2124, 8, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 19, 357, 67, 10, 68, 2124, 8, 61, 76, 357, 69, 10, 70, 2124, 8, 61, 77, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 20, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 357, 67, 10, 68, 2124, 10, 69, 2124, 61, 17, 8, 61, 80, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 21, 357, 70, 10, 71, 2124, 8, 61, 76, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 357, 67, 10, 68, 2124, 10, 69, 2124, 61, 17, 8, 61, 80, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 22, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 357, 67, 10, 68, 2124, 10, 69, 2124, 61, 17, 8, 61, 80, 357, 32, 10, 33, 2124, 10, 34, 2124, 61, 17, 737, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 23, 350, 7, 87, 8, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198, 17256, 7203, 16, 13, 17, 13, 16, 13, 24, 350, 7, 87, 8, 357, 67, 10, 68, 2124, 8, 61, 76, 357, 64, 10, 65, 2124, 10, 66, 2124, 61, 17, 8, 61, 79, 13, 20362, 4943, 198 ]
1.397101
345
@testset "'Design' ............................. " begin srand(1234) function simonsDesign(r1, n1, r, n) nvec = [[n1 for x1 in 0:r1]; [n for x1 in (r1 + 1):n1]] cvec = [[Inf for x1 in 0:r1]; [r for x1 in (r1 + 1):n1]] return Design(nvec, cvec) end # Simon's designs for beta = .2, alpha = .05, p1 = p0 +0.2 # cf. Simon, R "Optimal Two-Stage Designs for Phase II Clinical Trials", # Controlled Clinical Trials 10:1-10 (1989). (p. 4) p0 = collect(linspace(.1, .7, 7)) sd = [ simonsDesign( 1, 10, 5, 29), # p0 = 0.1 simonsDesign( 3, 13, 12, 43), # p0 = 0.2 simonsDesign( 5, 15, 18, 46), # p0 = 0.3 simonsDesign( 7, 16, 23, 46), # p0 = 0.4 simonsDesign( 8, 15, 26, 43), # p0 = 0.5 simonsDesign( 7, 11, 30, 43), # p0 = 0.6 simonsDesign( 4, 6, 22, 27) # p0 = 0.7 ] @test typeof(sd[1]) == Design{typeof(1), typeof(Inf), NoParameters} @test DataFrames.DataFrame(sd[1]) == DataFrames.DataFrame( x1 = 0:interimsamplesize(sd[1]), n = samplesize(sd[1]), c = criticalvalue(sd[1]) ) @test interimsamplesize(sd[1]) == 10 @test parameters(sd[1]) == NoParameters() @test samplesize(sd[1]) == [[10 for x1 in 0:1]; [29 for x1 in (1 + 1):10]] @test samplesize(sd[1], 1) == 10 @test samplesize(sd[1], 2) == 29 @test criticalvalue(sd[1]) == [[Inf for x1 in 0:1]; [5 for x1 in (1 + 1):10]] @test criticalvalue(sd[1], 1) == Inf @test criticalvalue(sd[1], 2) == 5 supp_ = support(sd[1]) for p in linspace(0, 1, 11) @test pdf(sd[1], 1, 2, p) == 0.0 pdf_ = pdf.(sd[1], support(sd[1])[:,1], support(sd[1])[:,2], p) @test all(pdf_ .>= 0.0) @test isapprox(sum(pdf_), 1.0, atol = 0.00001) end @test power(sd[1], p0[1]) <= .05 @test power(sd[1], p0[1] + .2) >= .8 prior = p -> 1 @test expectedpower(sd[1], prior, mcrv = p0[1] + .1) < power(sd[1], .8) @test expectedpower(sd[1], prior, mcrv = p0[1] + .1) > power(sd[1], .2) @test expectedpower(sd[1], 1, prior, mcrv = p0[1] + .1) < expectedpower(sd[1], 2, prior, mcrv = p0[1] + .1) @test isapprox( stoppingforfutility(sd[1], .2), pdf(sd[1], 0, 0, .2) + pdf(sd[1], 1, 0, .2), atol = .00001 ) @test !test(sd[1], 0, 0) @test test(sd[1], 5, 11) sim_ = simulate(sd[1], p0[1], 1000) @test mean(sim_[:rejectedH0]) < .05 @test all(sim_[:n] .<= 29) @test all(sim_[:n] .>= 0) @test isapprox(quadgk(jeffreysprior(sd[1]), 0, 1)[1], 1.0, atol = 0.0001) save("test.jls", sd[1]) @test true rm("test.jls") writecsv("test.csv", sd[1]; label = "test") @test true rm("test.csv") end
[ 31, 9288, 2617, 24018, 23067, 6, 220, 27754, 12359, 366, 2221, 628, 220, 19677, 392, 7, 1065, 2682, 8, 628, 220, 2163, 985, 684, 23067, 7, 81, 16, 11, 299, 16, 11, 374, 11, 299, 8, 198, 220, 220, 220, 299, 35138, 796, 16410, 77, 16, 329, 2124, 16, 287, 657, 25, 81, 16, 11208, 685, 77, 329, 2124, 16, 287, 357, 81, 16, 1343, 352, 2599, 77, 16, 11907, 198, 220, 220, 220, 269, 35138, 796, 16410, 18943, 329, 2124, 16, 287, 657, 25, 81, 16, 11208, 685, 81, 329, 2124, 16, 287, 357, 81, 16, 1343, 352, 2599, 77, 16, 11907, 198, 220, 220, 220, 1441, 8495, 7, 77, 35138, 11, 269, 35138, 8, 198, 220, 886, 628, 220, 1303, 11288, 338, 9824, 329, 12159, 796, 764, 17, 11, 17130, 796, 764, 2713, 11, 279, 16, 796, 279, 15, 1343, 15, 13, 17, 198, 220, 1303, 30218, 13, 11288, 11, 371, 366, 27871, 4402, 4930, 12, 29391, 49282, 329, 18983, 2873, 21234, 28945, 1600, 198, 220, 1303, 43253, 21234, 28945, 838, 25, 16, 12, 940, 357, 25475, 737, 357, 79, 13, 604, 8, 198, 220, 279, 15, 796, 2824, 7, 21602, 10223, 7, 13, 16, 11, 764, 22, 11, 767, 4008, 198, 220, 45647, 796, 685, 198, 220, 220, 220, 985, 684, 23067, 7, 352, 11, 838, 11, 220, 642, 11, 2808, 828, 1303, 279, 15, 796, 657, 13, 16, 198, 220, 220, 220, 985, 684, 23067, 7, 513, 11, 1511, 11, 1105, 11, 5946, 828, 1303, 279, 15, 796, 657, 13, 17, 198, 220, 220, 220, 985, 684, 23067, 7, 642, 11, 1315, 11, 1248, 11, 6337, 828, 1303, 279, 15, 796, 657, 13, 18, 198, 220, 220, 220, 985, 684, 23067, 7, 767, 11, 1467, 11, 2242, 11, 6337, 828, 1303, 279, 15, 796, 657, 13, 19, 198, 220, 220, 220, 985, 684, 23067, 7, 807, 11, 1315, 11, 2608, 11, 5946, 828, 1303, 279, 15, 796, 657, 13, 20, 198, 220, 220, 220, 985, 684, 23067, 7, 767, 11, 1367, 11, 1542, 11, 5946, 828, 1303, 279, 15, 796, 657, 13, 21, 198, 220, 220, 220, 985, 684, 23067, 7, 604, 11, 220, 718, 11, 2534, 11, 2681, 8, 220, 1303, 279, 15, 796, 657, 13, 22, 198, 220, 2361, 628, 198, 220, 220, 198, 220, 2488, 9288, 2099, 1659, 7, 21282, 58, 16, 12962, 6624, 8495, 90, 4906, 1659, 7, 16, 828, 2099, 1659, 7, 18943, 828, 1400, 48944, 92, 628, 220, 2488, 9288, 6060, 35439, 13, 6601, 19778, 7, 21282, 58, 16, 12962, 6624, 6060, 35439, 13, 6601, 19778, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 796, 657, 25, 3849, 12078, 12629, 1096, 7, 21282, 58, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 299, 220, 796, 8405, 1096, 7, 21282, 58, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 269, 220, 796, 4688, 8367, 7, 21282, 58, 16, 12962, 198, 220, 220, 220, 1267, 628, 220, 2488, 9288, 987, 12078, 12629, 1096, 7, 21282, 58, 16, 12962, 6624, 838, 628, 220, 2488, 9288, 10007, 7, 21282, 58, 16, 12962, 6624, 1400, 48944, 3419, 628, 220, 2488, 9288, 8405, 1096, 7, 21282, 58, 16, 12962, 6624, 16410, 940, 329, 2124, 16, 287, 657, 25, 16, 11208, 685, 1959, 329, 2124, 16, 287, 357, 16, 1343, 352, 2599, 940, 11907, 198, 220, 2488, 9288, 8405, 1096, 7, 21282, 58, 16, 4357, 352, 8, 6624, 838, 198, 220, 2488, 9288, 8405, 1096, 7, 21282, 58, 16, 4357, 362, 8, 6624, 2808, 628, 220, 2488, 9288, 4688, 8367, 7, 21282, 58, 16, 12962, 6624, 16410, 18943, 329, 2124, 16, 287, 657, 25, 16, 11208, 685, 20, 329, 2124, 16, 287, 357, 16, 1343, 352, 2599, 940, 11907, 198, 220, 2488, 9288, 4688, 8367, 7, 21282, 58, 16, 4357, 352, 8, 6624, 4806, 198, 220, 2488, 9288, 4688, 8367, 7, 21282, 58, 16, 4357, 362, 8, 6624, 642, 628, 220, 802, 62, 796, 1104, 7, 21282, 58, 16, 12962, 198, 220, 329, 279, 287, 300, 1040, 10223, 7, 15, 11, 352, 11, 1367, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 37124, 7, 21282, 58, 16, 4357, 352, 11, 362, 11, 279, 8, 6624, 657, 13, 15, 198, 220, 220, 220, 37124, 62, 796, 37124, 12195, 21282, 58, 16, 4357, 1104, 7, 21282, 58, 16, 12962, 58, 45299, 16, 4357, 1104, 7, 21282, 58, 16, 12962, 58, 45299, 17, 4357, 279, 8, 198, 220, 220, 220, 2488, 9288, 477, 7, 12315, 62, 764, 29, 28, 657, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 16345, 7, 12315, 62, 828, 352, 13, 15, 11, 379, 349, 796, 657, 13, 2388, 16, 8, 628, 220, 886, 628, 220, 2488, 9288, 1176, 7, 21282, 58, 16, 4357, 279, 15, 58, 16, 12962, 19841, 764, 2713, 198, 220, 2488, 9288, 1176, 7, 21282, 58, 16, 4357, 279, 15, 58, 16, 60, 1343, 764, 17, 8, 18189, 764, 23, 628, 220, 3161, 796, 279, 4613, 352, 198, 220, 2488, 9288, 2938, 6477, 7, 21282, 58, 16, 4357, 3161, 11, 285, 6098, 85, 796, 279, 15, 58, 16, 60, 1343, 764, 16, 8, 1279, 1176, 7, 21282, 58, 16, 4357, 764, 23, 8, 198, 220, 2488, 9288, 2938, 6477, 7, 21282, 58, 16, 4357, 3161, 11, 285, 6098, 85, 796, 279, 15, 58, 16, 60, 1343, 764, 16, 8, 1875, 1176, 7, 21282, 58, 16, 4357, 764, 17, 8, 198, 220, 2488, 9288, 2938, 6477, 7, 21282, 58, 16, 4357, 352, 11, 3161, 11, 285, 6098, 85, 796, 279, 15, 58, 16, 60, 1343, 764, 16, 8, 1279, 2938, 6477, 7, 21282, 58, 16, 4357, 362, 11, 3161, 11, 285, 6098, 85, 796, 279, 15, 58, 16, 60, 1343, 764, 16, 8, 628, 220, 2488, 9288, 318, 1324, 13907, 7, 198, 220, 220, 220, 12225, 1640, 69, 315, 879, 7, 21282, 58, 16, 4357, 764, 17, 828, 37124, 7, 21282, 58, 16, 4357, 657, 11, 657, 11, 764, 17, 8, 1343, 37124, 7, 21282, 58, 16, 4357, 352, 11, 657, 11, 764, 17, 828, 379, 349, 796, 764, 2388, 16, 198, 220, 1267, 628, 220, 2488, 9288, 5145, 9288, 7, 21282, 58, 16, 4357, 657, 11, 657, 8, 198, 220, 2488, 9288, 1332, 7, 21282, 58, 16, 4357, 642, 11, 1367, 8, 628, 220, 985, 62, 796, 29308, 7, 21282, 58, 16, 4357, 279, 15, 58, 16, 4357, 8576, 8, 198, 220, 2488, 9288, 1612, 7, 14323, 62, 58, 25, 260, 35408, 39, 15, 12962, 1279, 764, 2713, 198, 220, 2488, 9288, 477, 7, 14323, 62, 58, 25, 77, 60, 764, 27, 28, 2808, 8, 198, 220, 2488, 9288, 477, 7, 14323, 62, 58, 25, 77, 60, 764, 29, 28, 657, 8, 628, 220, 2488, 9288, 318, 1324, 13907, 7, 47003, 70, 74, 7, 73, 14822, 46703, 3448, 273, 7, 21282, 58, 16, 46570, 657, 11, 352, 38381, 16, 4357, 352, 13, 15, 11, 379, 349, 796, 657, 13, 18005, 8, 628, 220, 3613, 7203, 9288, 13, 73, 7278, 1600, 45647, 58, 16, 12962, 198, 220, 2488, 9288, 2081, 198, 220, 42721, 7203, 9288, 13, 73, 7278, 4943, 198, 220, 3551, 40664, 7203, 9288, 13, 40664, 1600, 45647, 58, 16, 11208, 6167, 796, 366, 9288, 4943, 198, 220, 2488, 9288, 2081, 198, 220, 42721, 7203, 9288, 13, 40664, 4943, 198, 198, 437, 198 ]
2.126541
1,217
module MPSKit using TensorKit,KrylovKit,Parameters, Base.Threads,OptimKit using LinearAlgebra:diag,Diagonal; import LinearAlgebra #bells and whistles for mpses export InfiniteMPS,FiniteMPS,MPSComoving,PeriodicArray,MPSMultiline export transfer_left,transfer_right export leftorth,rightorth,leftorth!,rightorth!,poison!,uniform_leftorth,uniform_rightorth export r_LL,l_LL,r_RR,l_RR,r_RL,r_LR,l_RL,l_LR #should be properties export hamcat #useful utility functions? export spinmatrices,add_util_leg,full,nonsym_spintensors,nonsym_bosonictensors export max_Ds,virtualspace #hamiltonian things export Hamiltonian,Operator,Cache export MPOHamiltonian,contains,PeriodicMPO,ComAct,commutator,anticommutator export ac_prime,c_prime,params,ac2_prime,expectation_value,effective_excitation_hamiltonian export leftenv,rightenv #algos export find_groundstate, Vumps, Dmrg, Dmrg2, GradDesc, Idmrg1, Idmrg2, GradientGrassmann export leading_boundary, PowerMethod export quasiparticle_excitation export timestep,Tdvp,Tdvp2 export splitham,mpo2mps,mps2mpo,infinite_temperature export changebonds,VumpsSvdCut,OptimalExpand,SvdCut,UnionTrunc export entropy export dynamicaldmrg export fidelity_susceptibility #models export nonsym_xxz_ham,nonsym_ising_ham,su2_xxx_ham,nonsym_ising_mpo,u1_xxz_ham,su2u1_grossneveu #default settings module Defaults const eltype = ComplexF64 const maxiter = 100 const tolgauge = 1e-14 const tol = 1e-12 const verbose = true _finalize(iter,state,opp,pars) = (state,pars,true); end include("utility/periodicarray.jl") include("utility/utility.jl") #random utility functions #maybe we should introduce an abstract state type include("states/abstractmps.jl") include("states/transfer.jl") # mps transfer matrices include("states/infinitemps.jl") include("states/multiline.jl") include("states/finitemps.jl") include("states/comoving.jl") include("states/orthoview.jl") include("states/quasiparticle_state.jl") abstract type Operator end abstract type Hamiltonian <: Operator end include("operators/mpohamiltonian/mpohamiltonian.jl") #the mpohamiltonian objects include("operators/umpo.jl") include("operators/commutator.jl") abstract type Cache end #cache "manages" environments include("environments/FinEnv.jl") include("environments/abstractinfenv.jl") include("environments/permpoinfenv.jl") include("environments/mpohaminfenv.jl") include("environments/simpleenv.jl") include("environments/overlapenv.jl") include("environments/qpenv.jl") abstract type Algorithm end include("algorithms/derivatives.jl") include("algorithms/expval.jl") include("algorithms/toolbox.jl") #maybe move to utility, or move some utility functions to toolbox? include("algorithms/ortho.jl") include("algorithms/changebonds/optimalexpand.jl") include("algorithms/changebonds/vumpssvd.jl") include("algorithms/changebonds/svdcut.jl") include("algorithms/changebonds/union.jl") include("algorithms/timestep/tdvp.jl") include("algorithms/groundstate/vumps.jl") include("algorithms/groundstate/idmrg.jl") include("algorithms/groundstate/dmrg.jl") include("algorithms/groundstate/gradient_grassmann.jl") include("algorithms/propagator/corvector.jl") include("algorithms/excitation/quasiparticleexcitation.jl") include("algorithms/statmech/vumps.jl") include("algorithms/statmech/power.jl") include("algorithms/fidelity_susceptibility.jl") include("models/xxz.jl") include("models/ising.jl") include("models/grossneveu.jl") end
[ 21412, 337, 3705, 20827, 198, 220, 220, 220, 1262, 309, 22854, 20827, 11, 42, 563, 27086, 20827, 11, 48944, 11, 7308, 13, 16818, 82, 11, 27871, 320, 20827, 628, 220, 220, 220, 1262, 44800, 2348, 29230, 25, 10989, 363, 11, 18683, 27923, 26, 198, 220, 220, 220, 1330, 44800, 2348, 29230, 628, 220, 220, 220, 1303, 7923, 82, 290, 32262, 829, 329, 285, 862, 274, 198, 220, 220, 220, 10784, 22380, 44, 3705, 11, 37, 9504, 44, 3705, 11, 44, 3705, 5377, 5165, 11, 5990, 2101, 291, 19182, 11, 44, 3705, 15205, 346, 500, 198, 220, 220, 220, 10784, 4351, 62, 9464, 11, 39437, 62, 3506, 198, 220, 220, 220, 10784, 1364, 1506, 11, 3506, 1506, 11, 9464, 1506, 28265, 3506, 1506, 28265, 7501, 1653, 28265, 403, 6933, 62, 9464, 1506, 11, 403, 6933, 62, 3506, 1506, 198, 220, 220, 220, 10784, 374, 62, 3069, 11, 75, 62, 3069, 11, 81, 62, 21095, 11, 75, 62, 21095, 11, 81, 62, 7836, 11, 81, 62, 35972, 11, 75, 62, 7836, 11, 75, 62, 35972, 1303, 21754, 307, 6608, 198, 220, 220, 220, 10784, 8891, 9246, 628, 220, 220, 220, 1303, 1904, 913, 10361, 5499, 30, 198, 220, 220, 220, 10784, 7906, 6759, 45977, 11, 2860, 62, 22602, 62, 1455, 11, 12853, 11, 77, 684, 4948, 62, 2777, 600, 641, 669, 11, 77, 684, 4948, 62, 39565, 261, 713, 641, 669, 198, 220, 220, 220, 10784, 3509, 62, 30832, 11, 32844, 13200, 628, 220, 220, 220, 1303, 2763, 9044, 666, 1243, 198, 220, 220, 220, 10784, 11582, 666, 11, 18843, 1352, 11, 30562, 198, 220, 220, 220, 10784, 4904, 12096, 321, 9044, 666, 11, 3642, 1299, 11, 5990, 2101, 291, 7378, 46, 11, 5377, 6398, 11, 9503, 315, 1352, 11, 5109, 2002, 315, 1352, 198, 220, 220, 220, 10784, 936, 62, 35505, 11, 66, 62, 35505, 11, 37266, 11, 330, 17, 62, 35505, 11, 1069, 806, 341, 62, 8367, 11, 16803, 62, 41194, 3780, 62, 2763, 9044, 666, 198, 220, 220, 220, 10784, 1364, 24330, 11, 3506, 24330, 628, 220, 220, 220, 1303, 14016, 418, 198, 220, 220, 220, 10784, 1064, 62, 2833, 5219, 11, 569, 8142, 11, 360, 76, 41345, 11, 360, 76, 41345, 17, 11, 17701, 24564, 11, 5121, 76, 41345, 16, 11, 5121, 76, 41345, 17, 11, 17701, 1153, 8642, 562, 9038, 198, 220, 220, 220, 10784, 3756, 62, 7784, 560, 11, 4333, 17410, 198, 220, 220, 220, 10784, 627, 292, 541, 20205, 62, 41194, 3780, 198, 220, 220, 220, 10784, 4628, 395, 538, 11, 51, 67, 36133, 11, 51, 67, 36133, 17, 198, 220, 220, 220, 10784, 4328, 342, 321, 11, 3149, 78, 17, 76, 862, 11, 76, 862, 17, 3149, 78, 11, 10745, 9504, 62, 11498, 21069, 198, 220, 220, 220, 10784, 1487, 65, 24764, 11, 53, 8142, 50, 20306, 26254, 11, 27871, 4402, 16870, 392, 11, 50, 20306, 26254, 11, 38176, 2898, 19524, 198, 220, 220, 220, 10784, 40709, 198, 220, 220, 220, 10784, 6382, 605, 36020, 41345, 198, 220, 220, 220, 10784, 37744, 62, 82, 385, 984, 2247, 628, 220, 220, 220, 1303, 27530, 198, 220, 220, 220, 10784, 14011, 4948, 62, 5324, 89, 62, 2763, 11, 77, 684, 4948, 62, 1710, 62, 2763, 11, 2385, 17, 62, 31811, 62, 2763, 11, 77, 684, 4948, 62, 1710, 62, 3149, 78, 11, 84, 16, 62, 5324, 89, 62, 2763, 11, 2385, 17, 84, 16, 62, 47181, 710, 303, 84, 628, 220, 220, 220, 1303, 12286, 6460, 198, 220, 220, 220, 8265, 2896, 13185, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 1288, 4906, 796, 19157, 37, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 3509, 2676, 796, 1802, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 284, 75, 70, 559, 469, 796, 352, 68, 12, 1415, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 284, 75, 796, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 15942, 577, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 20311, 1096, 7, 2676, 11, 5219, 11, 10365, 11, 79, 945, 8, 796, 357, 5219, 11, 79, 945, 11, 7942, 1776, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2291, 7203, 315, 879, 14, 41007, 291, 18747, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 315, 879, 14, 315, 879, 13, 20362, 4943, 1303, 25120, 10361, 5499, 628, 220, 220, 220, 1303, 25991, 356, 815, 10400, 281, 12531, 1181, 2099, 198, 220, 220, 220, 2291, 7203, 27219, 14, 397, 8709, 76, 862, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 39437, 13, 20362, 4943, 1303, 285, 862, 4351, 2603, 45977, 198, 220, 220, 220, 2291, 7203, 27219, 14, 10745, 259, 9186, 862, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 16680, 346, 500, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 15643, 9186, 862, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 785, 5165, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 1506, 709, 769, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27219, 14, 421, 292, 541, 20205, 62, 5219, 13, 20362, 4943, 628, 220, 220, 220, 12531, 2099, 35946, 886, 198, 220, 220, 220, 12531, 2099, 11582, 666, 1279, 25, 35946, 886, 628, 220, 220, 220, 2291, 7203, 3575, 2024, 14, 3149, 1219, 321, 9044, 666, 14, 3149, 1219, 321, 9044, 666, 13, 20362, 4943, 1303, 1169, 29034, 1219, 321, 9044, 666, 5563, 198, 220, 220, 220, 2291, 7203, 3575, 2024, 14, 931, 78, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 3575, 2024, 14, 9503, 315, 1352, 13, 20362, 4943, 628, 220, 220, 220, 12531, 2099, 34088, 886, 1303, 23870, 366, 805, 1095, 1, 12493, 628, 220, 220, 220, 2291, 7203, 268, 12103, 14, 18467, 4834, 85, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 397, 8709, 10745, 24330, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 525, 3149, 78, 10745, 24330, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 3149, 1219, 5669, 69, 24330, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 36439, 24330, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 2502, 37796, 24330, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 268, 12103, 14, 80, 3617, 85, 13, 20362, 4943, 628, 220, 220, 220, 12531, 2099, 978, 42289, 886, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 1082, 452, 2929, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 11201, 2100, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 25981, 3524, 13, 20362, 4943, 1303, 25991, 1445, 284, 10361, 11, 393, 1445, 617, 10361, 5499, 284, 2891, 3524, 30, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 1506, 78, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 3803, 65, 24764, 14, 40085, 1000, 42372, 392, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 3803, 65, 24764, 14, 85, 931, 824, 20306, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 3803, 65, 24764, 14, 82, 20306, 8968, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 3803, 65, 24764, 14, 24592, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 16514, 395, 538, 14, 8671, 36133, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 2833, 5219, 14, 85, 8142, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 2833, 5219, 14, 312, 76, 41345, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 2833, 5219, 14, 36020, 41345, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 2833, 5219, 14, 49607, 62, 29815, 9038, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 22930, 363, 1352, 14, 10215, 31364, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 41194, 3780, 14, 421, 292, 541, 20205, 41194, 3780, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 14269, 1326, 354, 14, 85, 8142, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 14269, 1326, 354, 14, 6477, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 282, 7727, 907, 14, 69, 23091, 62, 82, 385, 984, 2247, 13, 20362, 4943, 628, 220, 220, 220, 2291, 7203, 27530, 14, 5324, 89, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27530, 14, 1710, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 27530, 14, 47181, 710, 303, 84, 13, 20362, 4943, 198, 437, 198 ]
2.601509
1,458
""" get_potential(kout, kin, P, s::ShapeParams) -> sigma_mu Given a shape `s` with `2N` discretization nodes, outer and inner wavenumbers `kout`,`kin`, and the cylindrical harmonics parameter `P`, returns the potential densities `sigma_mu`. Each column contains the response to a different harmonic, where the first `2N` entries contain the single-layer potential density (``\\sigma``), and the lower entries contain the double-layer density (``\\mu``). """ function get_potential(kout, kin, P, t, ft, dft) N = length(t) #N here is 2N elesewhere. A = SDNTpotentialsdiff(kout, kin, t, ft, dft) LU = lu(A) sigma_mu = Array{Complex{Float64}}(undef, 2*N, 2*P+1) #assuming the wave is sampled on the shape nz = sqrt.(sum(abs2, ft, dims=2)) θ = atan.(ft[:,2], ft[:,1]) ndz = sqrt.(sum(abs2, dft, dims=2)) nzndz = nz.*ndz wro = dft[:,2].*ft[:,1] - dft[:,1].*ft[:,2] zz = dft[:,1].*ft[:,1] + dft[:,2].*ft[:,2] bessp = besselj.(-P-1, kout*nz) bess = similar(bessp) du = Array{Complex{Float64}}(undef, length(bessp)) rhs = Array{Complex{Float64}}(undef, 2*length(bessp)) for p = -P:P bess[:] = besselj.(p, kout*nz) du[:] = kout*bessp.*wro - (p*bess./nz).*(wro + 1im*zz) rhs[:] = -[bess.*exp.(1.0im*p*θ); (du./nzndz).*exp.(1.0im*p*θ)] sigma_mu[:,p + P + 1] = LU\rhs copyto!(bessp, bess) end return sigma_mu end """ get_potential(kout, kin, P, t, ft, dft) -> sigma_mu Same, but with the `ShapeParams` supplied directly. """ get_potential(kout, kin, P, s::ShapeParams) = get_potential(kout, kin, P, s.t, s.ft, s.dft) function SDNTpotentialsdiff(k1, k2, t, ft, dft) #now just returns system matrix, utilizes similarities between upper and lower triangles iseven(length(t)) ? (N = div(length(t),2)) : (error("length(t) must be even")) (Rvec, kmlogvec) = KM_weights(N) A = Array{Complex{Float64}}(undef, 4*N, 4*N) ndft = sqrt.(vec(sum(abs2,dft,dims=2))) rij = Array{Float64}(undef, 2) for i=1:2*N, j=1:i if i == j T1 = -(k1^2 - k2^2) T2 = k1^2*(π*1im - 2MathConstants.γ + 1 - 2*log(k1*ndft[i]/2)) - k2^2*(π*1im - 2MathConstants.γ + 1 - 2*log(k2*ndft[i]/2)) A[i,j] = (-ndft[i]/2/N)*log(k1/k2) #dS (dM1=0) A[i,j+2*N] = 1 #dD (dL=0) A[i+2*N,j] = -1 #dN=0 A[i+2*N,j+2*N] = (ndft[i]/8π)*(Rvec[1]*T1 + (π/N)*T2) #dT continue end rij[1] = ft[i,1]-ft[j,1] rij[2] = ft[i,2]-ft[j,2] #ridiculous but much faster than ft[i,:]-ft[j,:] r = sqrt(rij[1]^2 + rij[2]^2) didj = dft[i,1]*dft[j,1] + dft[i,2]*dft[j,2] J01 = besselj(0, k1*r) J02 = besselj(0, k2*r) H01 = besselh(0, 1, k1*r) H02 = besselh(0, 1, k2*r) k2J0 = k1^2*J01 - k2^2*J02 k1J1 = k1*besselj(1,k1*r) - k2*besselj(1,k2*r) k2H0 = k1^2*H01 - k2^2*H02 k1H1 = k1*besselh(1,k1*r) - k2*besselh(1,k2*r) kmlog = kmlogvec[abs(i-j)+1] R = Rvec[abs(i-j)+1] N2 = 1im*pi*k1H1 - k1J1*kmlog P1 = (-didj/π)*k2J0 P2 = 1im*didj*k2H0 - P1*kmlog Qtilde = (dft[i,1]*rij[1] + dft[i,2]*rij[2])*(dft[j,1]*rij[1] + dft[j,2]*rij[2])/r^2 Q1 = (-Qtilde*k2J0 + (1/r)*k1J1*(2*Qtilde - didj))/π Q2 = 1im*Qtilde*k2H0 + (-1im/r)*k1H1*(2*Qtilde - didj) - Q1*kmlog M1 = (J02 - J01)/π L1 = k1J1/π M2 = 1im*(H01 - H02) - M1*kmlog L2 = 1im*k1H1 - L1*kmlog wro_ij = (dft[j,2]*rij[1] - dft[j,1]*rij[2])/r wro_ji = -(dft[i,2]*rij[1] - dft[i,1]*rij[2])/r cross_ij = -wro_ji*ndft[j]/ndft[i] cross_ji = -wro_ij*ndft[i]/ndft[j] #edited to remove division by wro which might be 0 A[i,j] = (0.25*ndft[j])*(R*M1 + (π/N)*M2) #dS A[j,i] = A[i,j]*(ndft[i]/ndft[j]) #dS A[i,j+2*N] = (0.25*wro_ij)*(R*L1 + (π/N)*L2) #dD A[j,i+2*N] = (0.25*wro_ji)*(R*L1 + (π/N)*L2) #dD A[i+2*N,j] = (-0.25*cross_ij/π)*(R*k1J1 + (π/N)*N2) #dN A[j+2*N,i] = (-0.25*cross_ji/π)*(R*k1J1 + (π/N)*N2) #dN A[i+2*N,j+2*N] = (R*(P1-Q1) + (π/N)*(P2-Q2))/(4*ndft[i]) #dT A[j+2*N,i+2*N] = A[i+2*N,j+2*N]*(ndft[i]/ndft[j]) #dT end any(isnan.(A)) && error("SDNTpotentialsdiff: encountered NaN, check data and division by ndft.") return A end function KM_weights(N) #computes the weights necessary for Kussmaul-Martensen quadrature (evenly #spaced). #Input: N (integer>=1) #Output: R,K (float vectors of length 2N) arg1 = Float64[cos(m*j*π/N)/m for m=1:N-1, j=0:2*N-1] R = vec((-2π/N)*sum(arg1,dims=1)) - (π/N^2)*Float64[cos(j*π) for j=0:2*N-1] K = Float64[2*log(2*sin(0.5π*j/N)) for j = 0:2*N-1] return (R,K) end """ get_potentialPW(kout, kin, s::ShapeParams, θ_i) -> sigma_mu Given a shape `s` with `2N` discretization nodes, outer and inner wavenumbers `kout`,`kin`, and an incident plane-wave angle, returns the potential densities vector `sigma_mu`. The first `2N` entries contain the single-layer potential density (``\\sigma``), and the lower entries contain the double-layer density (``\\mu``). """ function get_potentialPW(kout, kin, s, θ_i) N = length(s.t) #N here is different... A = SDNTpotentialsdiff(kout, kin, s.t, s.ft, s.dft) LU = lu(A) ndft = sqrt.(sum(abs2, s.dft, dims=2)) ui = exp.(1.0im*kout*(cos(θ_i)*s.ft[:,1] + sin(θ_i)*s.ft[:,2])) rhs = -[ui; (1.0im*kout*ui).*((cos(θ_i)*s.dft[:,2] - sin(θ_i)*s.dft[:,1])./ndft)] sigma_mu = LU\rhs end """ scatteredfield(sigma_mu, k, s::ShapeParams, p) -> u_s Computes field scattered by the particle `s` with pre-computed potential densities `sigma_mu` at points `p`. All points must either be inside `k = kin` or outside `k = kout` the particle. """ scatteredfield(sigma_mu, k, s::ShapeParams, p) = scatteredfield(sigma_mu, k, s.t, s.ft, s.dft, p) """ scatteredfield(sigma_mu, k, t, ft, dft, p) -> u_s Same, but with the `ShapeParams` supplied directly. Useful for computing `u_s` for rotated shapes. """ function scatteredfield(sigma_mu, k, t, ft, dft, p) #calculates the scattered field of a shape with parametrization ft(t),...,dft(t) #in space with wavenumber k at points p *off* the boundary. For field on the boundary, #SDpotentials function must be used. if size(p,2) == 1 #single point, rotate it p = transpose(p) end N = length(t) M = size(p,1) r = zeros(Float64,2) #loop is faster here: SDout = Array{Complex{Float64}}(undef, M, 2*N) for j = 1:N ndft = hypot(dft[j,1],dft[j,2]) for i = 1:M r[:] = [p[i,1] - ft[j,1];p[i,2] - ft[j,2]] nr = hypot(r[1],r[2]) if nr < eps() #TODO: use SDNTpotentialsdiff here @warn("Encountered singularity in scatteredfield.") SDout[i,j] = 0 SDout[i,j+N] = 0 continue end SDout[i,j] = (2*pi/N)*0.25im*besselh(0,1, k*nr)*ndft SDout[i,j+N] = (2*pi/N)*0.25im*k*besselh(1,1, k*nr)*(dft[j,2]*r[1] - dft[j,1]*r[2])/nr end end u_s = SDout*sigma_mu end function shapeMultipoleExpansion(k, t, ft, dft, P) #unlike others (so far), this does *not* assume t_j=pi*j/N N = div(length(t),2) nz = vec(sqrt.(sum(abs2, ft, dims=2))) θ = atan.(ft[:,2], ft[:,1]) ndz = vec(sqrt.(sum(abs2, dft, dims=2))) AB = Array{Complex{Float64}}(undef, 2*P + 1, 4*N) bessp = besselj.(-P-1,k*nz) bess = similar(bessp) for l = -P:0 bess[:] = besselj.(l,k*nz) for j = 1:2*N AB[l+P+1,j] = 0.25im*(π/N)*bess[j]*exp(-1.0im*l*θ[j])*ndz[j] l != 0 && (AB[-l+P+1,j] = 0.25im*((-1.0)^l*π/N)*bess[j]*exp(1.0im*l*θ[j])*ndz[j]) wro = ft[j,1]*dft[j,2] - ft[j,2]*dft[j,1] zdz = -1.0im*(ft[j,1]*dft[j,1] + ft[j,2]*dft[j,2]) b1 = (-l*bess[j]/nz[j])*(zdz + wro) b1_ = (-l*bess[j]/nz[j])*(zdz - wro) b2 = k*bessp[j]*wro AB[l+P+1,j+2*N] = 0.25im*(π/N)*(exp(-1.0im*l*θ[j])/nz[j])*(b1 + b2) l != 0 && (AB[-l+P+1,j+2*N] = 0.25im*((-1.0)^l*π/N)*(exp(1.0im*l*θ[j])/nz[j])*(-b1_ + b2)) end copyto!(bessp,bess) end return AB end function solvePotential_forError(kin, kout, shape, ls_pos, ls_amp, θ_i) #plane wave outside, line sources inside N = length(shape.t) #N here is different... A = SDNTpotentialsdiff(kout, kin, shape.t, shape.ft, shape.dft) LU = lu(A) ndft = sqrt.(sum(abs2, shape.dft, dims=2)) r = sqrt.((shape.ft[:,1] .- ls_pos[1,1]).^2 + (shape.ft[:,2] .- ls_pos[1,2]).^2) uls = (-ls_amp[1]*0.25im)*besselh.(0,kout*r) duls = (ls_amp[1]*0.25im*kout)*besselh.(1,kout*r).*((shape.ft[:,1].-ls_pos[1,1]).*shape.dft[:,2]-(shape.ft[:,2].-ls_pos[1,2]).*shape.dft[:,1])./r./ndft for i = 2:length(ls_amp) r = sqrt.((shape.ft[:,1] - ls_pos[i,1]).^2 + (shape.ft[:,2] - ls_pos[i,2]).^2) uls -= ls_amp[i]*0.25im*besselh.(0,kout*r) duls -= -ls_amp[i]*0.25im*kout*besselh.(1,kout*r).*((shape.ft[:,1]-ls_pos[i,1]).*shape.dft[:,2]-(shape.ft[:,2]-ls_pos[i,2]).*shape.dft[:,1])./r./ndft end #outer plane wave ui = exp.(1.0im*kin*(cos(θ_i)*shape.ft[:,1] + sin(θ_i)*shape.ft[:,2])) dui = (1.0im*kin)*(ui.*(cos(θ_i)*shape.dft[:,2] - sin(θ_i)*shape.dft[:,1])./ndft) rhs = -[ui+uls;dui+duls] sigma_mu = LU\rhs return sigma_mu end
[ 37811, 201, 198, 220, 220, 220, 651, 62, 13059, 1843, 7, 74, 448, 11, 18967, 11, 350, 11, 264, 3712, 33383, 10044, 4105, 8, 4613, 264, 13495, 62, 30300, 201, 198, 201, 198, 15056, 257, 5485, 4600, 82, 63, 351, 4600, 17, 45, 63, 1221, 1186, 1634, 13760, 11, 12076, 290, 8434, 2082, 574, 17024, 201, 198, 63, 74, 448, 47671, 63, 5116, 47671, 290, 262, 17327, 521, 8143, 25625, 873, 11507, 4600, 47, 47671, 5860, 262, 2785, 201, 198, 67, 641, 871, 4600, 82, 13495, 62, 30300, 44646, 5501, 5721, 4909, 262, 2882, 284, 257, 1180, 49239, 11, 201, 198, 3003, 262, 717, 4600, 17, 45, 63, 12784, 3994, 262, 2060, 12, 29289, 2785, 12109, 201, 198, 7, 15506, 6852, 82, 13495, 15506, 828, 290, 262, 2793, 12784, 3994, 262, 4274, 12, 29289, 12109, 357, 15506, 6852, 30300, 15506, 737, 201, 198, 37811, 201, 198, 8818, 651, 62, 13059, 1843, 7, 74, 448, 11, 18967, 11, 350, 11, 256, 11, 10117, 11, 288, 701, 8, 201, 198, 220, 220, 220, 399, 796, 4129, 7, 83, 8, 1303, 45, 994, 318, 362, 45, 304, 829, 413, 1456, 13, 201, 198, 201, 198, 220, 220, 220, 317, 796, 9834, 11251, 13059, 14817, 26069, 7, 74, 448, 11, 18967, 11, 256, 11, 10117, 11, 288, 701, 8, 201, 198, 220, 220, 220, 50168, 796, 300, 84, 7, 32, 8, 201, 198, 201, 198, 220, 220, 220, 264, 13495, 62, 30300, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 362, 9, 45, 11, 362, 9, 47, 10, 16, 8, 201, 198, 201, 198, 220, 220, 220, 1303, 32935, 262, 6769, 318, 35846, 319, 262, 5485, 201, 198, 220, 220, 220, 299, 89, 796, 19862, 17034, 12195, 16345, 7, 8937, 17, 11, 10117, 11, 5391, 82, 28, 17, 4008, 201, 198, 220, 220, 220, 7377, 116, 796, 379, 272, 12195, 701, 58, 45299, 17, 4357, 10117, 58, 45299, 16, 12962, 201, 198, 220, 220, 220, 299, 67, 89, 796, 19862, 17034, 12195, 16345, 7, 8937, 17, 11, 288, 701, 11, 5391, 82, 28, 17, 4008, 201, 198, 220, 220, 220, 299, 89, 358, 89, 796, 299, 89, 15885, 358, 89, 201, 198, 220, 220, 220, 266, 305, 796, 288, 701, 58, 45299, 17, 4083, 9, 701, 58, 45299, 16, 60, 532, 288, 701, 58, 45299, 16, 4083, 9, 701, 58, 45299, 17, 60, 201, 198, 197, 3019, 796, 288, 701, 58, 45299, 16, 4083, 9, 701, 58, 45299, 16, 60, 1343, 288, 701, 58, 45299, 17, 4083, 9, 701, 58, 45299, 17, 60, 201, 198, 201, 198, 220, 220, 220, 275, 408, 79, 796, 7284, 741, 73, 12195, 12, 47, 12, 16, 11, 479, 448, 9, 27305, 8, 201, 198, 220, 220, 220, 275, 408, 796, 2092, 7, 65, 408, 79, 8, 201, 198, 220, 220, 220, 7043, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 4129, 7, 65, 408, 79, 4008, 201, 198, 220, 220, 220, 9529, 82, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 362, 9, 13664, 7, 65, 408, 79, 4008, 201, 198, 220, 220, 220, 329, 279, 796, 532, 47, 25, 47, 201, 198, 220, 220, 220, 220, 220, 220, 220, 275, 408, 58, 47715, 796, 7284, 741, 73, 12195, 79, 11, 479, 448, 9, 27305, 8, 201, 198, 197, 197, 646, 58, 47715, 796, 479, 448, 9, 65, 408, 79, 15885, 86, 305, 532, 357, 79, 9, 65, 408, 19571, 27305, 737, 9, 7, 86, 305, 1343, 352, 320, 9, 3019, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 9529, 82, 58, 47715, 796, 532, 58, 65, 408, 15885, 11201, 12195, 16, 13, 15, 320, 9, 79, 9, 138, 116, 1776, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 646, 19571, 27305, 358, 89, 737, 9, 11201, 12195, 16, 13, 15, 320, 9, 79, 9, 138, 116, 15437, 201, 198, 220, 220, 220, 220, 220, 220, 220, 264, 13495, 62, 30300, 58, 45299, 79, 1343, 350, 1343, 352, 60, 796, 50168, 59, 81, 11994, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4866, 1462, 0, 7, 65, 408, 79, 11, 275, 408, 8, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1441, 264, 13495, 62, 30300, 201, 198, 437, 201, 198, 201, 198, 37811, 201, 198, 220, 220, 220, 651, 62, 13059, 1843, 7, 74, 448, 11, 18967, 11, 350, 11, 256, 11, 10117, 11, 288, 701, 8, 4613, 264, 13495, 62, 30300, 201, 198, 30556, 11, 475, 351, 262, 4600, 33383, 10044, 4105, 63, 14275, 3264, 13, 201, 198, 37811, 201, 198, 1136, 62, 13059, 1843, 7, 74, 448, 11, 18967, 11, 350, 11, 264, 3712, 33383, 10044, 4105, 8, 796, 201, 198, 220, 220, 220, 651, 62, 13059, 1843, 7, 74, 448, 11, 18967, 11, 350, 11, 264, 13, 83, 11, 264, 13, 701, 11, 264, 13, 67, 701, 8, 201, 198, 201, 198, 8818, 9834, 11251, 13059, 14817, 26069, 7, 74, 16, 11, 479, 17, 11, 256, 11, 10117, 11, 288, 701, 8, 201, 198, 220, 220, 220, 1303, 2197, 655, 5860, 1080, 17593, 11, 34547, 20594, 1022, 6727, 290, 2793, 44360, 201, 198, 220, 220, 220, 318, 10197, 7, 13664, 7, 83, 4008, 5633, 201, 198, 220, 220, 220, 357, 45, 796, 2659, 7, 13664, 7, 83, 828, 17, 4008, 1058, 357, 18224, 7203, 13664, 7, 83, 8, 1276, 307, 772, 48774, 201, 198, 201, 198, 220, 220, 220, 357, 49, 35138, 11, 479, 4029, 519, 35138, 8, 796, 46646, 62, 43775, 7, 45, 8, 201, 198, 220, 220, 220, 317, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 604, 9, 45, 11, 604, 9, 45, 8, 201, 198, 201, 198, 220, 220, 220, 299, 67, 701, 796, 19862, 17034, 12195, 35138, 7, 16345, 7, 8937, 17, 11, 67, 701, 11, 67, 12078, 28, 17, 22305, 201, 198, 220, 220, 220, 374, 2926, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 362, 8, 201, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 17, 9, 45, 11, 474, 28, 16, 25, 72, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 6624, 474, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 16, 796, 532, 7, 74, 16, 61, 17, 532, 479, 17, 61, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 17, 796, 479, 16, 61, 17, 9, 7, 46582, 9, 16, 320, 532, 362, 37372, 34184, 1187, 13, 42063, 1343, 352, 532, 362, 9, 6404, 7, 74, 16, 9, 358, 701, 58, 72, 60, 14, 17, 4008, 532, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 17, 61, 17, 9, 7, 46582, 9, 16, 320, 532, 362, 37372, 34184, 1187, 13, 42063, 1343, 352, 532, 362, 9, 6404, 7, 74, 17, 9, 358, 701, 58, 72, 60, 14, 17, 4008, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 60, 796, 13841, 358, 701, 58, 72, 60, 14, 17, 14, 45, 27493, 6404, 7, 74, 16, 14, 74, 17, 8, 1303, 67, 50, 357, 67, 44, 16, 28, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 10, 17, 9, 45, 60, 796, 352, 1303, 67, 35, 357, 45582, 28, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 10, 17, 9, 45, 11, 73, 60, 796, 532, 16, 1303, 67, 45, 28, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 10, 17, 9, 45, 11, 73, 10, 17, 9, 45, 60, 796, 357, 358, 701, 58, 72, 60, 14, 23, 46582, 27493, 7, 49, 35138, 58, 16, 60, 9, 51, 16, 1343, 357, 46582, 14, 45, 27493, 51, 17, 8, 1303, 67, 51, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 374, 2926, 58, 16, 60, 796, 10117, 58, 72, 11, 16, 45297, 701, 58, 73, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 374, 2926, 58, 17, 60, 796, 10117, 58, 72, 11, 17, 45297, 701, 58, 73, 11, 17, 60, 1303, 6058, 291, 6985, 475, 881, 5443, 621, 10117, 58, 72, 11, 25, 45297, 701, 58, 73, 11, 47715, 201, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 19862, 17034, 7, 380, 73, 58, 16, 60, 61, 17, 1343, 220, 374, 2926, 58, 17, 60, 61, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 750, 73, 796, 288, 701, 58, 72, 11, 16, 60, 9, 67, 701, 58, 73, 11, 16, 60, 1343, 288, 701, 58, 72, 11, 17, 60, 9, 67, 701, 58, 73, 11, 17, 60, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 449, 486, 796, 7284, 741, 73, 7, 15, 11, 479, 16, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 449, 2999, 796, 7284, 741, 73, 7, 15, 11, 479, 17, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 367, 486, 796, 7284, 741, 71, 7, 15, 11, 352, 11, 479, 16, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 367, 2999, 796, 7284, 741, 71, 7, 15, 11, 352, 11, 479, 17, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 479, 17, 41, 15, 796, 479, 16, 61, 17, 9, 41, 486, 532, 479, 17, 61, 17, 9, 41, 2999, 201, 198, 220, 220, 220, 220, 220, 220, 220, 479, 16, 41, 16, 796, 479, 16, 9, 65, 7878, 73, 7, 16, 11, 74, 16, 9, 81, 8, 532, 479, 17, 9, 65, 7878, 73, 7, 16, 11, 74, 17, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 479, 17, 39, 15, 796, 479, 16, 61, 17, 9, 39, 486, 532, 479, 17, 61, 17, 9, 39, 2999, 201, 198, 220, 220, 220, 220, 220, 220, 220, 479, 16, 39, 16, 796, 479, 16, 9, 65, 7878, 71, 7, 16, 11, 74, 16, 9, 81, 8, 532, 479, 17, 9, 65, 7878, 71, 7, 16, 11, 74, 17, 9, 81, 8, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 479, 4029, 519, 796, 479, 4029, 519, 35138, 58, 8937, 7, 72, 12, 73, 47762, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 371, 796, 371, 35138, 58, 8937, 7, 72, 12, 73, 47762, 16, 60, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 399, 17, 796, 352, 320, 9, 14415, 9, 74, 16, 39, 16, 532, 479, 16, 41, 16, 9, 74, 4029, 519, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 350, 16, 796, 13841, 20839, 73, 14, 46582, 27493, 74, 17, 41, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 350, 17, 796, 352, 320, 9, 20839, 73, 9, 74, 17, 39, 15, 532, 350, 16, 9, 74, 4029, 519, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 33734, 44725, 796, 357, 67, 701, 58, 72, 11, 16, 60, 9, 380, 73, 58, 16, 60, 1343, 288, 701, 58, 72, 11, 17, 60, 9, 380, 73, 58, 17, 12962, 9, 7, 67, 701, 58, 73, 11, 16, 60, 9, 380, 73, 58, 16, 60, 1343, 288, 701, 58, 73, 11, 17, 60, 9, 380, 73, 58, 17, 12962, 14, 81, 61, 17, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 16, 796, 13841, 48, 83, 44725, 9, 74, 17, 41, 15, 1343, 357, 16, 14, 81, 27493, 74, 16, 41, 16, 9, 7, 17, 9, 48, 83, 44725, 532, 750, 73, 4008, 14, 46582, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 17, 796, 352, 320, 9, 48, 83, 44725, 9, 74, 17, 39, 15, 1343, 13841, 16, 320, 14, 81, 27493, 74, 16, 39, 16, 9, 7, 17, 9, 48, 83, 44725, 532, 750, 73, 8, 532, 1195, 16, 9, 74, 4029, 519, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 337, 16, 796, 357, 41, 2999, 532, 449, 486, 20679, 46582, 201, 198, 220, 220, 220, 220, 220, 220, 220, 406, 16, 796, 479, 16, 41, 16, 14, 46582, 201, 198, 220, 220, 220, 220, 220, 220, 220, 337, 17, 796, 352, 320, 9, 7, 39, 486, 532, 367, 2999, 8, 532, 337, 16, 9, 74, 4029, 519, 201, 198, 220, 220, 220, 220, 220, 220, 220, 406, 17, 796, 352, 320, 9, 74, 16, 39, 16, 532, 406, 16, 9, 74, 4029, 519, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 266, 305, 62, 2926, 796, 220, 357, 67, 701, 58, 73, 11, 17, 60, 9, 380, 73, 58, 16, 60, 532, 288, 701, 58, 73, 11, 16, 60, 9, 380, 73, 58, 17, 12962, 14, 81, 201, 198, 220, 220, 220, 220, 220, 220, 220, 266, 305, 62, 7285, 796, 532, 7, 67, 701, 58, 72, 11, 17, 60, 9, 380, 73, 58, 16, 60, 532, 288, 701, 58, 72, 11, 16, 60, 9, 380, 73, 58, 17, 12962, 14, 81, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3272, 62, 2926, 796, 532, 86, 305, 62, 7285, 9, 358, 701, 58, 73, 60, 14, 358, 701, 58, 72, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3272, 62, 7285, 796, 532, 86, 305, 62, 2926, 9, 358, 701, 58, 72, 60, 14, 358, 701, 58, 73, 60, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 42131, 284, 4781, 7297, 416, 266, 305, 543, 1244, 307, 657, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 60, 796, 357, 15, 13, 1495, 9, 358, 701, 58, 73, 12962, 9, 7, 49, 9, 44, 16, 1343, 357, 46582, 14, 45, 27493, 44, 17, 8, 1303, 67, 50, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 73, 11, 72, 60, 796, 317, 58, 72, 11, 73, 60, 9, 7, 358, 701, 58, 72, 60, 14, 358, 701, 58, 73, 12962, 1303, 67, 50, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 10, 17, 9, 45, 60, 796, 357, 15, 13, 1495, 9, 86, 305, 62, 2926, 27493, 7, 49, 9, 43, 16, 1343, 357, 46582, 14, 45, 27493, 43, 17, 8, 1303, 67, 35, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 73, 11, 72, 10, 17, 9, 45, 60, 796, 357, 15, 13, 1495, 9, 86, 305, 62, 7285, 27493, 7, 49, 9, 43, 16, 1343, 357, 46582, 14, 45, 27493, 43, 17, 8, 1303, 67, 35, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 10, 17, 9, 45, 11, 73, 60, 796, 13841, 15, 13, 1495, 9, 19692, 62, 2926, 14, 46582, 27493, 7, 49, 9, 74, 16, 41, 16, 1343, 357, 46582, 14, 45, 27493, 45, 17, 8, 1303, 67, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 73, 10, 17, 9, 45, 11, 72, 60, 796, 13841, 15, 13, 1495, 9, 19692, 62, 7285, 14, 46582, 27493, 7, 49, 9, 74, 16, 41, 16, 1343, 357, 46582, 14, 45, 27493, 45, 17, 8, 1303, 67, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 10, 17, 9, 45, 11, 73, 10, 17, 9, 45, 60, 796, 357, 49, 9, 7, 47, 16, 12, 48, 16, 8, 1343, 357, 46582, 14, 45, 27493, 7, 47, 17, 12, 48, 17, 4008, 29006, 19, 9, 358, 701, 58, 72, 12962, 1303, 67, 51, 201, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 73, 10, 17, 9, 45, 11, 72, 10, 17, 9, 45, 60, 796, 317, 58, 72, 10, 17, 9, 45, 11, 73, 10, 17, 9, 45, 60, 9, 7, 358, 701, 58, 72, 60, 14, 358, 701, 58, 73, 12962, 1303, 67, 51, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 597, 7, 271, 12647, 12195, 32, 4008, 11405, 4049, 7203, 10305, 11251, 13059, 14817, 26069, 25, 12956, 11013, 45, 11, 2198, 1366, 290, 7297, 416, 299, 67, 701, 19570, 201, 198, 220, 220, 220, 1441, 317, 201, 198, 437, 201, 198, 201, 198, 8818, 46646, 62, 43775, 7, 45, 8, 201, 198, 220, 220, 220, 1303, 5589, 1769, 262, 19590, 3306, 329, 509, 1046, 76, 2518, 12, 13143, 18756, 15094, 81, 1300, 357, 10197, 306, 201, 198, 220, 220, 220, 1303, 2777, 2286, 737, 201, 198, 220, 220, 220, 1303, 20560, 25, 399, 357, 41433, 29, 28, 16, 8, 201, 198, 220, 220, 220, 1303, 26410, 25, 371, 11, 42, 357, 22468, 30104, 286, 4129, 362, 45, 8, 201, 198, 220, 220, 220, 1822, 16, 796, 48436, 2414, 58, 6966, 7, 76, 9, 73, 9, 46582, 14, 45, 20679, 76, 329, 285, 28, 16, 25, 45, 12, 16, 11, 474, 28, 15, 25, 17, 9, 45, 12, 16, 60, 201, 198, 220, 220, 220, 371, 796, 43030, 19510, 12, 17, 46582, 14, 45, 27493, 16345, 7, 853, 16, 11, 67, 12078, 28, 16, 4008, 532, 357, 46582, 14, 45, 61, 17, 27493, 43879, 2414, 58, 6966, 7, 73, 9, 46582, 8, 329, 474, 28, 15, 25, 17, 9, 45, 12, 16, 60, 201, 198, 201, 198, 220, 220, 220, 509, 796, 48436, 2414, 58, 17, 9, 6404, 7, 17, 9, 31369, 7, 15, 13, 20, 46582, 9, 73, 14, 45, 4008, 329, 474, 796, 657, 25, 17, 9, 45, 12, 16, 60, 201, 198, 220, 220, 220, 1441, 357, 49, 11, 42, 8, 201, 198, 437, 201, 198, 201, 198, 37811, 201, 198, 220, 220, 220, 651, 62, 13059, 1843, 47, 54, 7, 74, 448, 11, 18967, 11, 264, 3712, 33383, 10044, 4105, 11, 7377, 116, 62, 72, 8, 4613, 264, 13495, 62, 30300, 201, 198, 201, 198, 15056, 257, 5485, 4600, 82, 63, 351, 4600, 17, 45, 63, 1221, 1186, 1634, 13760, 11, 12076, 290, 8434, 2082, 574, 17024, 201, 198, 63, 74, 448, 47671, 63, 5116, 47671, 290, 281, 4519, 6614, 12, 19204, 9848, 11, 5860, 262, 2785, 201, 198, 67, 641, 871, 15879, 4600, 82, 13495, 62, 30300, 44646, 383, 717, 4600, 17, 45, 63, 12784, 3994, 262, 2060, 12, 29289, 201, 198, 13059, 1843, 12109, 357, 15506, 6852, 82, 13495, 15506, 828, 290, 262, 2793, 12784, 3994, 262, 4274, 12, 29289, 201, 198, 43337, 357, 15506, 6852, 30300, 15506, 737, 201, 198, 37811, 201, 198, 8818, 651, 62, 13059, 1843, 47, 54, 7, 74, 448, 11, 18967, 11, 264, 11, 7377, 116, 62, 72, 8, 201, 198, 220, 220, 220, 399, 796, 4129, 7, 82, 13, 83, 8, 1303, 45, 994, 318, 1180, 986, 201, 198, 201, 198, 220, 220, 220, 317, 796, 9834, 11251, 13059, 14817, 26069, 7, 74, 448, 11, 18967, 11, 264, 13, 83, 11, 264, 13, 701, 11, 264, 13, 67, 701, 8, 201, 198, 220, 220, 220, 50168, 796, 300, 84, 7, 32, 8, 201, 198, 201, 198, 197, 358, 701, 796, 19862, 17034, 12195, 16345, 7, 8937, 17, 11, 264, 13, 67, 701, 11, 5391, 82, 28, 17, 4008, 201, 198, 220, 220, 220, 334, 72, 796, 1033, 12195, 16, 13, 15, 320, 9, 74, 448, 9, 7, 6966, 7, 138, 116, 62, 72, 27493, 82, 13, 701, 58, 45299, 16, 60, 1343, 7813, 7, 138, 116, 62, 72, 27493, 82, 13, 701, 58, 45299, 17, 60, 4008, 201, 198, 220, 220, 220, 9529, 82, 796, 532, 58, 9019, 26, 201, 198, 197, 197, 197, 7, 16, 13, 15, 320, 9, 74, 448, 9, 9019, 737, 9, 19510, 6966, 7, 138, 116, 62, 72, 27493, 82, 13, 67, 701, 58, 45299, 17, 60, 532, 7813, 7, 138, 116, 62, 72, 27493, 82, 13, 67, 701, 58, 45299, 16, 35944, 14, 358, 701, 15437, 201, 198, 201, 198, 220, 220, 220, 264, 13495, 62, 30300, 796, 50168, 59, 81, 11994, 201, 198, 437, 201, 198, 201, 198, 201, 198, 37811, 201, 198, 220, 220, 220, 16830, 3245, 7, 82, 13495, 62, 30300, 11, 479, 11, 264, 3712, 33383, 10044, 4105, 11, 279, 8, 4613, 334, 62, 82, 201, 198, 201, 198, 7293, 1769, 2214, 16830, 416, 262, 18758, 4600, 82, 63, 351, 662, 12, 785, 17128, 2785, 201, 198, 67, 641, 871, 4600, 82, 13495, 62, 30300, 63, 379, 2173, 4600, 79, 44646, 1439, 2173, 1276, 2035, 307, 2641, 4600, 74, 796, 18967, 63, 201, 198, 273, 2354, 4600, 74, 796, 479, 448, 63, 262, 18758, 13, 201, 198, 37811, 201, 198, 1416, 10228, 3245, 7, 82, 13495, 62, 30300, 11, 479, 11, 264, 3712, 33383, 10044, 4105, 11, 279, 8, 796, 201, 198, 220, 220, 220, 16830, 3245, 7, 82, 13495, 62, 30300, 11, 479, 11, 264, 13, 83, 11, 264, 13, 701, 11, 264, 13, 67, 701, 11, 279, 8, 201, 198, 201, 198, 37811, 201, 198, 220, 220, 220, 16830, 3245, 7, 82, 13495, 62, 30300, 11, 479, 11, 256, 11, 10117, 11, 288, 701, 11, 279, 8, 4613, 334, 62, 82, 201, 198, 201, 198, 30556, 11, 475, 351, 262, 4600, 33383, 10044, 4105, 63, 14275, 3264, 13, 49511, 329, 14492, 4600, 84, 62, 82, 63, 201, 198, 1640, 38375, 15268, 13, 201, 198, 37811, 201, 198, 8818, 16830, 3245, 7, 82, 13495, 62, 30300, 11, 479, 11, 256, 11, 10117, 11, 288, 701, 11, 279, 8, 201, 198, 220, 220, 220, 1303, 9948, 3129, 689, 262, 16830, 2214, 286, 257, 5485, 351, 5772, 316, 47847, 341, 10117, 7, 83, 828, 986, 11, 67, 701, 7, 83, 8, 201, 198, 220, 220, 220, 1303, 259, 2272, 351, 2082, 574, 4494, 479, 379, 2173, 279, 1635, 2364, 9, 262, 18645, 13, 1114, 2214, 319, 262, 18645, 11, 201, 198, 220, 220, 220, 1303, 10305, 13059, 14817, 2163, 1276, 307, 973, 13, 201, 198, 220, 220, 220, 611, 2546, 7, 79, 11, 17, 8, 6624, 352, 1303, 29762, 966, 11, 23064, 340, 201, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 1007, 3455, 7, 79, 8, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 399, 796, 4129, 7, 83, 8, 201, 198, 220, 220, 220, 337, 796, 2546, 7, 79, 11, 16, 8, 201, 198, 220, 220, 220, 374, 796, 1976, 27498, 7, 43879, 2414, 11, 17, 8, 201, 198, 220, 220, 220, 1303, 26268, 318, 5443, 994, 25, 201, 198, 220, 220, 220, 9834, 448, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 337, 11, 362, 9, 45, 8, 201, 198, 220, 220, 220, 329, 474, 796, 352, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 299, 67, 701, 796, 8813, 7, 67, 701, 58, 73, 11, 16, 4357, 67, 701, 58, 73, 11, 17, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 44, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 58, 47715, 796, 685, 79, 58, 72, 11, 16, 60, 532, 10117, 58, 73, 11, 16, 11208, 79, 58, 72, 11, 17, 60, 532, 10117, 58, 73, 11, 17, 11907, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 81, 796, 8813, 7, 81, 58, 16, 4357, 81, 58, 17, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 299, 81, 1279, 304, 862, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 51, 3727, 46, 25, 779, 9834, 11251, 13059, 14817, 26069, 994, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 4834, 9127, 1068, 18032, 414, 287, 16830, 3245, 19570, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9834, 448, 58, 72, 11, 73, 60, 796, 657, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9834, 448, 58, 72, 11, 73, 10, 45, 60, 796, 657, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9834, 448, 58, 72, 11, 73, 60, 796, 357, 17, 9, 14415, 14, 45, 27493, 15, 13, 1495, 320, 9, 65, 7878, 71, 7, 15, 11, 16, 11, 479, 9, 48624, 27493, 358, 701, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9834, 448, 58, 72, 11, 73, 10, 45, 60, 796, 357, 17, 9, 14415, 14, 45, 27493, 15, 13, 1495, 320, 9, 74, 9, 65, 7878, 71, 7, 16, 11, 16, 11, 479, 9, 48624, 27493, 7, 67, 701, 58, 73, 11, 17, 60, 9, 81, 58, 16, 60, 532, 288, 701, 58, 73, 11, 16, 60, 9, 81, 58, 17, 12962, 14, 48624, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 334, 62, 82, 796, 9834, 448, 9, 82, 13495, 62, 30300, 201, 198, 437, 201, 198, 201, 198, 201, 198, 8818, 5485, 15205, 541, 2305, 16870, 5487, 7, 74, 11, 256, 11, 10117, 11, 288, 701, 11, 350, 8, 201, 198, 220, 220, 220, 1303, 403, 2339, 1854, 357, 568, 1290, 828, 428, 857, 1635, 1662, 9, 7048, 256, 62, 73, 28, 14415, 9, 73, 14, 45, 201, 198, 220, 220, 220, 399, 796, 2659, 7, 13664, 7, 83, 828, 17, 8, 201, 198, 220, 220, 220, 299, 89, 796, 43030, 7, 31166, 17034, 12195, 16345, 7, 8937, 17, 11, 10117, 11, 5391, 82, 28, 17, 22305, 201, 198, 220, 220, 220, 7377, 116, 796, 379, 272, 12195, 701, 58, 45299, 17, 4357, 10117, 58, 45299, 16, 12962, 201, 198, 220, 220, 220, 299, 67, 89, 796, 43030, 7, 31166, 17034, 12195, 16345, 7, 8937, 17, 11, 288, 701, 11, 5391, 82, 28, 17, 22305, 201, 198, 220, 220, 220, 9564, 796, 15690, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 362, 9, 47, 1343, 352, 11, 604, 9, 45, 8, 201, 198, 220, 220, 220, 275, 408, 79, 796, 7284, 741, 73, 12195, 12, 47, 12, 16, 11, 74, 9, 27305, 8, 201, 198, 220, 220, 220, 275, 408, 796, 2092, 7, 65, 408, 79, 8, 201, 198, 220, 220, 220, 329, 300, 796, 532, 47, 25, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 275, 408, 58, 47715, 796, 7284, 741, 73, 12195, 75, 11, 74, 9, 27305, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 17, 9, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9564, 58, 75, 10, 47, 10, 16, 11, 73, 60, 796, 657, 13, 1495, 320, 9, 7, 46582, 14, 45, 27493, 65, 408, 58, 73, 60, 9, 11201, 32590, 16, 13, 15, 320, 9, 75, 9, 138, 116, 58, 73, 12962, 9, 358, 89, 58, 73, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 14512, 657, 11405, 357, 6242, 58, 12, 75, 10, 47, 10, 16, 11, 73, 60, 796, 657, 13, 1495, 320, 9, 19510, 12, 16, 13, 15, 8, 61, 75, 9, 46582, 14, 45, 27493, 65, 408, 58, 73, 60, 9, 11201, 7, 16, 13, 15, 320, 9, 75, 9, 138, 116, 58, 73, 12962, 9, 358, 89, 58, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 305, 796, 10117, 58, 73, 11, 16, 60, 9, 67, 701, 58, 73, 11, 17, 60, 532, 10117, 58, 73, 11, 17, 60, 9, 67, 701, 58, 73, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 67, 89, 796, 532, 16, 13, 15, 320, 9, 7, 701, 58, 73, 11, 16, 60, 9, 67, 701, 58, 73, 11, 16, 60, 1343, 10117, 58, 73, 11, 17, 60, 9, 67, 701, 58, 73, 11, 17, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 16, 796, 13841, 75, 9, 65, 408, 58, 73, 60, 14, 27305, 58, 73, 12962, 9, 7, 89, 67, 89, 1343, 266, 305, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 16, 62, 796, 13841, 75, 9, 65, 408, 58, 73, 60, 14, 27305, 58, 73, 12962, 9, 7, 89, 67, 89, 532, 266, 305, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 17, 796, 479, 9, 65, 408, 79, 58, 73, 60, 9, 86, 305, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9564, 58, 75, 10, 47, 10, 16, 11, 73, 10, 17, 9, 45, 60, 796, 657, 13, 1495, 320, 9, 7, 46582, 14, 45, 27493, 7, 11201, 32590, 16, 13, 15, 320, 9, 75, 9, 138, 116, 58, 73, 12962, 14, 27305, 58, 73, 12962, 9, 7, 65, 16, 1343, 275, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 14512, 657, 11405, 357, 6242, 58, 12, 75, 10, 47, 10, 16, 11, 73, 10, 17, 9, 45, 60, 796, 657, 13, 1495, 320, 9, 19510, 12, 16, 13, 15, 8, 61, 75, 9, 46582, 14, 45, 27493, 7, 11201, 7, 16, 13, 15, 320, 9, 75, 9, 138, 116, 58, 73, 12962, 14, 27305, 58, 73, 12962, 9, 32590, 65, 16, 62, 1343, 275, 17, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4866, 1462, 0, 7, 65, 408, 79, 11, 65, 408, 8, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1441, 9564, 201, 198, 437, 201, 198, 201, 198, 8818, 8494, 25396, 1843, 62, 1640, 12331, 7, 5116, 11, 479, 448, 11, 5485, 11, 43979, 62, 1930, 11, 43979, 62, 696, 11, 7377, 116, 62, 72, 8, 201, 198, 220, 220, 220, 1303, 14382, 6769, 2354, 11, 1627, 4237, 2641, 201, 198, 220, 220, 220, 399, 796, 4129, 7, 43358, 13, 83, 8, 1303, 45, 994, 318, 1180, 986, 201, 198, 201, 198, 220, 220, 220, 317, 796, 9834, 11251, 13059, 14817, 26069, 7, 74, 448, 11, 18967, 11, 5485, 13, 83, 11, 5485, 13, 701, 11, 5485, 13, 67, 701, 8, 201, 198, 220, 220, 220, 50168, 796, 300, 84, 7, 32, 8, 201, 198, 201, 198, 197, 358, 701, 796, 19862, 17034, 12195, 16345, 7, 8937, 17, 11, 5485, 13, 67, 701, 11, 5391, 82, 28, 17, 4008, 201, 198, 201, 198, 220, 220, 220, 374, 796, 19862, 17034, 12195, 7, 43358, 13, 701, 58, 45299, 16, 60, 764, 12, 43979, 62, 1930, 58, 16, 11, 16, 35944, 61, 17, 1343, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 43358, 13, 701, 58, 45299, 17, 60, 764, 12, 43979, 62, 1930, 58, 16, 11, 17, 35944, 61, 17, 8, 201, 198, 201, 198, 220, 220, 220, 334, 7278, 796, 13841, 7278, 62, 696, 58, 16, 60, 9, 15, 13, 1495, 320, 27493, 65, 7878, 71, 12195, 15, 11, 74, 448, 9, 81, 8, 201, 198, 220, 220, 220, 288, 5753, 796, 357, 7278, 62, 696, 58, 16, 60, 9, 15, 13, 1495, 320, 9, 74, 448, 27493, 65, 7878, 71, 12195, 16, 11, 74, 448, 9, 81, 737, 9, 19510, 43358, 13, 701, 58, 45299, 16, 4083, 12, 7278, 62, 1930, 58, 16, 11, 16, 35944, 9, 43358, 13, 67, 701, 58, 45299, 17, 60, 30420, 43358, 13, 701, 58, 45299, 17, 4083, 12, 7278, 62, 1930, 58, 16, 11, 17, 35944, 9, 43358, 13, 67, 701, 58, 45299, 16, 35944, 14, 81, 19571, 358, 701, 201, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 13664, 7, 7278, 62, 696, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 19862, 17034, 12195, 7, 43358, 13, 701, 58, 45299, 16, 60, 532, 43979, 62, 1930, 58, 72, 11, 16, 35944, 61, 17, 1343, 357, 43358, 13, 701, 58, 45299, 17, 60, 532, 43979, 62, 1930, 58, 72, 11, 17, 35944, 61, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 334, 7278, 48185, 43979, 62, 696, 58, 72, 60, 9, 15, 13, 1495, 320, 9, 65, 7878, 71, 12195, 15, 11, 74, 448, 9, 81, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 5753, 48185, 532, 7278, 62, 696, 58, 72, 60, 9, 15, 13, 1495, 320, 9, 74, 448, 9, 65, 7878, 71, 12195, 16, 11, 74, 448, 9, 81, 737, 9, 19510, 43358, 13, 701, 58, 45299, 16, 45297, 7278, 62, 1930, 58, 72, 11, 16, 35944, 9, 43358, 13, 67, 701, 58, 45299, 17, 60, 30420, 43358, 13, 701, 58, 45299, 17, 45297, 7278, 62, 1930, 58, 72, 11, 17, 35944, 9, 43358, 13, 67, 701, 58, 45299, 16, 35944, 14, 81, 19571, 358, 701, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 1303, 39605, 6614, 6769, 201, 198, 220, 220, 220, 334, 72, 796, 1033, 12195, 16, 13, 15, 320, 9, 5116, 9, 7, 6966, 7, 138, 116, 62, 72, 27493, 43358, 13, 701, 58, 45299, 16, 60, 1343, 7813, 7, 138, 116, 62, 72, 27493, 43358, 13, 701, 58, 45299, 17, 60, 4008, 201, 198, 220, 220, 220, 7043, 72, 796, 357, 16, 13, 15, 320, 9, 5116, 27493, 7, 9019, 15885, 7, 6966, 7, 138, 116, 62, 72, 27493, 43358, 13, 67, 701, 58, 45299, 17, 60, 532, 7813, 7, 138, 116, 62, 72, 27493, 43358, 13, 67, 701, 58, 45299, 16, 35944, 14, 358, 701, 8, 201, 198, 201, 198, 220, 220, 220, 9529, 82, 796, 532, 58, 9019, 10, 5753, 26, 646, 72, 10, 67, 5753, 60, 201, 198, 220, 220, 220, 264, 13495, 62, 30300, 796, 50168, 59, 81, 11994, 201, 198, 220, 220, 220, 1441, 264, 13495, 62, 30300, 201, 198, 437, 201, 198 ]
1.700748
5,751
using LinearAlgebra using OpenCL const sum_kernel = " __kernel void sum(__global float *a, __global const float *b) { int gid = get_global_id(0); a[gid] = a[gid] + b[gid]; } " a = zeros(Float32, 50_000) b = ones(Float32, 50_000) device, ctx, queue = cl.create_compute_context() a_buff = cl.Buffer(Float32, ctx, (:rw, :copy), hostbuf=a) b_buff = cl.Buffer(Float32, ctx, (:r, :copy), hostbuf=b) p = cl.Program(ctx, source=sum_kernel) |> cl.build! k = cl.Kernel(p, "sum") queue(k, size(a), nothing, a_buff, b_buff) r = cl.read(queue, a_buff) if isapprox(r, fill(Float32(1), 50000)) @info "Success!" else @error "Norm should be 0.0f" end
[ 3500, 44800, 2348, 29230, 198, 3500, 4946, 5097, 198, 198, 9979, 2160, 62, 33885, 796, 366, 198, 220, 220, 11593, 33885, 7951, 2160, 7, 834, 20541, 12178, 1635, 64, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11593, 20541, 1500, 12178, 1635, 65, 8, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 493, 308, 312, 796, 651, 62, 20541, 62, 312, 7, 15, 1776, 198, 220, 220, 220, 220, 220, 257, 58, 70, 312, 60, 796, 257, 58, 70, 312, 60, 1343, 275, 58, 70, 312, 11208, 198, 220, 220, 220, 1782, 198, 1, 198, 64, 796, 1976, 27498, 7, 43879, 2624, 11, 2026, 62, 830, 8, 198, 65, 796, 3392, 7, 43879, 2624, 11, 2026, 62, 830, 8, 198, 198, 25202, 11, 269, 17602, 11, 16834, 796, 537, 13, 17953, 62, 5589, 1133, 62, 22866, 3419, 198, 198, 64, 62, 36873, 796, 537, 13, 28632, 7, 43879, 2624, 11, 269, 17602, 11, 357, 25, 31653, 11, 1058, 30073, 828, 2583, 29325, 28, 64, 8, 198, 65, 62, 36873, 796, 537, 13, 28632, 7, 43879, 2624, 11, 269, 17602, 11, 357, 25, 81, 11, 1058, 30073, 828, 2583, 29325, 28, 65, 8, 198, 198, 79, 796, 537, 13, 15167, 7, 49464, 11, 2723, 28, 16345, 62, 33885, 8, 930, 29, 537, 13, 11249, 0, 198, 74, 796, 537, 13, 42, 7948, 7, 79, 11, 366, 16345, 4943, 198, 198, 36560, 7, 74, 11, 2546, 7, 64, 828, 2147, 11, 257, 62, 36873, 11, 275, 62, 36873, 8, 198, 198, 81, 796, 537, 13, 961, 7, 36560, 11, 257, 62, 36873, 8, 198, 198, 361, 318, 1324, 13907, 7, 81, 11, 6070, 7, 43879, 2624, 7, 16, 828, 642, 2388, 4008, 198, 220, 220, 220, 2488, 10951, 366, 33244, 2474, 198, 17772, 198, 220, 220, 220, 2488, 18224, 366, 35393, 815, 307, 657, 13, 15, 69, 1, 198, 437 ]
2.129231
325
module TheEqualiser # # This module automatically adjusts taxes (it and ni, optionally) # so the net cost of benefit or other changes # is close to zero. # # TODO needs a lot of work: # # - more options - so basic rate only etc; # - use passed-in functions to equalise (like op_tax! below); # - check results are in sensible bounds (e.g. >= 0 < 100 tax rates). # using Roots using UUIDs using Observables using ScottishTaxBenefitModel using .Definitions using .Monitor using .Results using .Runner using .RunSettings using .STBOutput using .STBParameters using .Utils @enum EqTargets eq_it eq_ni eq_it_ni export EqTargets,eq_it,eq_ni,eq_it_ni export equalise # # Roots only allows 1 parameter, I think, so: # mutable struct RunParameters{T<:AbstractFloat} params :: TaxBenefitSystem{T} settings :: Settings base_cost :: T target :: EqTargets obs :: Observable end # TODO another possible approach is to pass in editing # functions such as: function op_tax!( sys :: TaxBenefitSystem{T}, r :: T ) where T <: AbstractFloat sys.it.non_savings_rates .+= r end function run( x :: T, rparams :: RunParameters{T} ) where T <: AbstractFloat nsr = deepcopy( rparams.params.it ) nsi = deepcopy( rparams.params.ni ) if rparams.target in [eq_it, eq_it_ni] rparams.params.it.non_savings_rates .+= x end # TODO check sensible it rates if rparams.target in [eq_ni, eq_it_ni] rparams.params.ni.primary_class_1_rates .+= x rparams.params.ni.class_4_rates .+= x end # TODO check sensible ni rates results = do_one_run(rparams.settings, [rparams.params], rparams.obs ) # restore rparams.params.it = nsr rparams.params.ni = nsi summary = summarise_frames(results, rparams.settings) nc = summary.income_summary[1][1,:net_cost] return round( nc - rparams.base_cost, digits=0 ) end """ Adjust the thing in `target` so that the net cost of the changes in `sys` is close to `base_cost` """ function equalise( target :: EqTargets, sys :: TaxBenefitSystem{T}, settings :: Settings, base_cost :: T, observer :: Observable ) :: T where T<:AbstractFloat zerorun = ZeroProblem( run, 0.0 ) # fixme guess at 0.0 ? rparams = RunParameters( sys, settings, base_cost, target, observer ) incch = solve( zerorun, rparams ) # # TODO test incch is sensible return incch end end # module
[ 21412, 383, 36, 13255, 5847, 198, 2, 198, 2, 770, 8265, 6338, 46094, 5704, 357, 270, 290, 37628, 11, 42976, 8, 198, 2, 523, 262, 2010, 1575, 286, 4414, 393, 584, 2458, 198, 2, 318, 1969, 284, 6632, 13, 198, 2, 220, 198, 2, 16926, 46, 2476, 257, 1256, 286, 670, 25, 198, 2, 220, 198, 2, 532, 517, 3689, 532, 523, 4096, 2494, 691, 3503, 26, 198, 2, 532, 779, 3804, 12, 259, 5499, 284, 4961, 786, 357, 2339, 1034, 62, 19290, 0, 2174, 1776, 198, 2, 532, 2198, 2482, 389, 287, 20586, 22303, 357, 68, 13, 70, 13, 18189, 657, 1279, 1802, 1687, 3965, 737, 198, 2, 220, 198, 3500, 34341, 198, 3500, 471, 27586, 82, 198, 3500, 19243, 2977, 198, 198, 3500, 11905, 27017, 42166, 270, 17633, 198, 3500, 764, 7469, 50101, 198, 3500, 764, 35479, 198, 3500, 764, 25468, 198, 3500, 764, 49493, 198, 3500, 764, 10987, 26232, 198, 3500, 764, 2257, 33, 26410, 198, 3500, 764, 2257, 33, 48944, 198, 3500, 764, 18274, 4487, 198, 198, 31, 44709, 412, 80, 51, 853, 1039, 37430, 62, 270, 37430, 62, 8461, 37430, 62, 270, 62, 8461, 198, 39344, 412, 80, 51, 853, 1039, 11, 27363, 62, 270, 11, 27363, 62, 8461, 11, 27363, 62, 270, 62, 8461, 198, 39344, 4961, 786, 198, 2, 198, 2, 34341, 691, 3578, 352, 11507, 11, 314, 892, 11, 523, 25, 198, 2, 198, 76, 18187, 2878, 5660, 48944, 90, 51, 27, 25, 23839, 43879, 92, 198, 220, 220, 220, 42287, 7904, 9241, 42166, 270, 11964, 90, 51, 92, 198, 220, 220, 220, 6460, 7904, 16163, 198, 197, 8692, 62, 15805, 7904, 309, 198, 220, 220, 220, 2496, 7904, 412, 80, 51, 853, 1039, 198, 220, 220, 220, 10201, 220, 220, 220, 7904, 19243, 540, 198, 437, 198, 198, 2, 16926, 46, 1194, 1744, 3164, 318, 284, 1208, 287, 12857, 198, 2, 5499, 884, 355, 25, 198, 8818, 1034, 62, 19290, 0, 7, 25064, 7904, 9241, 42166, 270, 11964, 90, 51, 5512, 374, 7904, 309, 1267, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 25064, 13, 270, 13, 13159, 62, 39308, 654, 62, 9700, 764, 47932, 374, 198, 437, 198, 198, 8818, 1057, 7, 2124, 7904, 309, 11, 374, 37266, 7904, 5660, 48944, 90, 51, 92, 1267, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 299, 27891, 796, 2769, 30073, 7, 374, 37266, 13, 37266, 13, 270, 1267, 198, 220, 220, 220, 299, 13396, 796, 2769, 30073, 7, 374, 37266, 13, 37266, 13, 8461, 1267, 198, 220, 220, 220, 611, 374, 37266, 13, 16793, 287, 685, 27363, 62, 270, 11, 37430, 62, 270, 62, 8461, 60, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37266, 13, 37266, 13, 270, 13, 13159, 62, 39308, 654, 62, 9700, 764, 47932, 2124, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 16926, 46, 2198, 20586, 340, 3965, 198, 220, 220, 220, 611, 374, 37266, 13, 16793, 287, 685, 27363, 62, 8461, 11, 37430, 62, 270, 62, 8461, 60, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37266, 13, 37266, 13, 8461, 13, 39754, 62, 4871, 62, 16, 62, 9700, 764, 47932, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37266, 13, 37266, 13, 8461, 13, 4871, 62, 19, 62, 9700, 764, 47932, 2124, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 16926, 46, 2198, 20586, 37628, 3965, 220, 220, 220, 220, 198, 220, 220, 220, 2482, 796, 466, 62, 505, 62, 5143, 7, 81, 37266, 13, 33692, 11, 685, 81, 37266, 13, 37266, 4357, 374, 37266, 13, 8158, 1267, 198, 220, 220, 220, 1303, 11169, 198, 220, 220, 220, 374, 37266, 13, 37266, 13, 270, 796, 299, 27891, 198, 220, 220, 220, 374, 37266, 13, 37266, 13, 8461, 796, 299, 13396, 198, 220, 220, 220, 10638, 796, 15676, 786, 62, 37805, 7, 43420, 11, 374, 37266, 13, 33692, 8, 198, 220, 220, 220, 299, 66, 796, 10638, 13, 12519, 62, 49736, 58, 16, 7131, 16, 11, 25, 3262, 62, 15805, 60, 198, 220, 220, 220, 1441, 2835, 7, 299, 66, 532, 374, 37266, 13, 8692, 62, 15805, 11, 19561, 28, 15, 1267, 198, 437, 198, 198, 37811, 198, 39668, 262, 1517, 287, 4600, 16793, 63, 523, 326, 262, 2010, 1575, 286, 262, 2458, 287, 4600, 17597, 63, 198, 271, 1969, 284, 4600, 8692, 62, 15805, 63, 198, 37811, 198, 8818, 4961, 786, 7, 220, 198, 220, 220, 220, 2496, 7904, 412, 80, 51, 853, 1039, 11, 198, 220, 220, 220, 25064, 7904, 9241, 42166, 270, 11964, 90, 51, 5512, 220, 198, 220, 220, 220, 6460, 7904, 16163, 11, 198, 220, 220, 220, 2779, 62, 15805, 7904, 309, 11, 198, 220, 220, 220, 22890, 7904, 19243, 540, 1267, 7904, 309, 810, 309, 27, 25, 23839, 43879, 220, 220, 198, 220, 220, 220, 1976, 263, 273, 403, 796, 12169, 40781, 7, 1057, 11, 657, 13, 15, 1267, 1303, 45199, 4724, 379, 657, 13, 15, 5633, 198, 220, 220, 220, 374, 37266, 796, 5660, 48944, 7, 25064, 11, 6460, 11, 2779, 62, 15805, 11, 2496, 11, 22890, 1267, 198, 220, 220, 220, 753, 354, 796, 8494, 7, 1976, 263, 273, 403, 11, 374, 37266, 1267, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 16926, 46, 1332, 753, 354, 318, 20586, 220, 198, 220, 220, 220, 1441, 753, 354, 198, 437, 198, 198, 437, 1303, 8265 ]
2.713483
890
include("hyperelasticity.jl") # ts = ExplicitSolverTime(Δt, NT) ubd, abd = compute_boundary_info(domain, globaldata, ts) Fext = compute_external_force(domain, globaldata, ts) d0 = zeros(2domain.nnodes) v0 = zeros(2domain.nnodes) a0 = zeros(2domain.nnodes) mode = "consistent_tangent" if length(ARGS)>=1 global mode = ARGS[1] end if mode=="linear" global Dc, nn_law Dc = Variable(rand(3,3)) Dc = spd(Dc) function nn_law(strain) strain_tensor = strain_voigt_to_tensor(strain) stress = strain*Dc stress end elseif mode=="consistent_tangent" global Dc, nn_law Dc = Variable(rand(3,3)) Dc = spd(Dc) function nn_law(strain) coef = ae(strain, [20,20,20,6]) coef = [coef constant(ones(size(coef,1), 1))] H = consistent_tangent_matrix(coef, Dc) stress = batch_matmul(H, strain) stress end elseif mode=="nn" global Dc, nn_law # general neural network function nn_law(ε) ae(ε, [20,20,20,3]) end elseif mode=="free_energy" global Dc, nn_law # free energy function nn_law(ε) φ = squeeze(ae(ε, [20,20,20,1])) tf.gradients(φ, ε)[1] end else error("$mode not valid") end d, v, a= ExplicitSolver(globaldata, domain, d0, v0, a0, Δt, NT, nn_law, Fext, ubd, abd; strain_type="finite") # test = open("test.txt", "w") sess = Session(); init(sess) # run(sess, d) idx = @. (0:n)*m + 1 idx = [idx; (@. idx + domain.nnodes)] loss = sum((d[:, idx] - d_[:, idx])^2) sess = Session(); init(sess) @info run(sess, loss) # error() !isdir(mode) && mkdir(mode) for i = 1:100 loss_ = BFGS!(sess, loss, 1000) d0 = run(sess, d) # visualize close("all") p = visualize_displacement(d0, domain) saveanim(p, "$mode/$i.gif") close("all") plot(d_[:,1], "-", color="C1") plot(d0[:,1], "--", color="C1") plot(d_[:,1+domain.nnodes], color="C2") plot(d0[:,1+domain.nnodes], "--", color="C2") savefig("$mode/$i.png") open("$mode/loss.txt", "a") do io writedlm(io, loss_) end ADCME.save(sess, "$mode/$i.mat") if length(loss_)<1000 break end end
[ 17256, 7203, 71, 2981, 2411, 3477, 414, 13, 20362, 4943, 198, 2, 220, 198, 912, 796, 11884, 50, 14375, 7575, 7, 138, 242, 83, 11, 24563, 8, 198, 549, 67, 11, 450, 67, 796, 24061, 62, 7784, 560, 62, 10951, 7, 27830, 11, 15095, 1940, 1045, 11, 40379, 8, 198, 37, 2302, 796, 24061, 62, 22615, 62, 3174, 7, 27830, 11, 15095, 1940, 1045, 11, 40379, 8, 220, 198, 198, 67, 15, 796, 1976, 27498, 7, 17, 27830, 13, 20471, 4147, 8, 198, 85, 15, 796, 1976, 27498, 7, 17, 27830, 13, 20471, 4147, 8, 198, 64, 15, 796, 1976, 27498, 7, 17, 27830, 13, 20471, 4147, 8, 628, 198, 14171, 796, 366, 5936, 7609, 62, 83, 648, 298, 1, 198, 361, 4129, 7, 1503, 14313, 8, 29, 28, 16, 198, 220, 3298, 4235, 796, 5923, 14313, 58, 16, 60, 198, 437, 198, 198, 361, 4235, 855, 1, 29127, 1, 198, 220, 3298, 360, 66, 11, 299, 77, 62, 6270, 198, 220, 360, 66, 796, 35748, 7, 25192, 7, 18, 11, 18, 4008, 198, 220, 360, 66, 796, 599, 67, 7, 35, 66, 8, 198, 220, 2163, 299, 77, 62, 6270, 7, 2536, 391, 8, 198, 220, 220, 220, 14022, 62, 83, 22854, 796, 14022, 62, 13038, 328, 83, 62, 1462, 62, 83, 22854, 7, 2536, 391, 8, 198, 220, 220, 220, 5503, 796, 14022, 9, 35, 66, 198, 220, 220, 220, 5503, 198, 220, 886, 198, 198, 17772, 361, 4235, 855, 1, 5936, 7609, 62, 83, 648, 298, 1, 198, 220, 3298, 360, 66, 11, 299, 77, 62, 6270, 198, 220, 360, 66, 796, 35748, 7, 25192, 7, 18, 11, 18, 4008, 198, 220, 360, 66, 796, 599, 67, 7, 35, 66, 8, 198, 220, 2163, 299, 77, 62, 6270, 7, 2536, 391, 8, 198, 220, 220, 220, 763, 891, 796, 257, 68, 7, 2536, 391, 11, 685, 1238, 11, 1238, 11, 1238, 11, 21, 12962, 198, 220, 220, 220, 763, 891, 796, 685, 1073, 891, 6937, 7, 1952, 7, 7857, 7, 1073, 891, 11, 16, 828, 352, 4008, 60, 198, 220, 220, 220, 367, 796, 6414, 62, 83, 648, 298, 62, 6759, 8609, 7, 1073, 891, 11, 360, 66, 8, 198, 220, 220, 220, 5503, 796, 15458, 62, 6759, 76, 377, 7, 39, 11, 14022, 8, 198, 220, 220, 220, 5503, 198, 220, 886, 198, 198, 17772, 361, 4235, 855, 1, 20471, 1, 198, 220, 3298, 360, 66, 11, 299, 77, 62, 6270, 198, 220, 1303, 2276, 17019, 3127, 220, 198, 220, 2163, 299, 77, 62, 6270, 7, 30950, 8, 198, 220, 220, 220, 257, 68, 7, 30950, 11, 685, 1238, 11, 1238, 11, 1238, 11, 18, 12962, 198, 220, 886, 198, 17772, 361, 4235, 855, 1, 5787, 62, 22554, 1, 198, 220, 3298, 360, 66, 11, 299, 77, 62, 6270, 198, 220, 1303, 1479, 2568, 220, 198, 220, 2163, 299, 77, 62, 6270, 7, 30950, 8, 198, 220, 220, 220, 18074, 228, 796, 21229, 7, 3609, 7, 30950, 11, 685, 1238, 11, 1238, 11, 1238, 11, 16, 60, 4008, 198, 220, 220, 220, 48700, 13, 9744, 2334, 7, 139, 228, 11, 7377, 113, 38381, 16, 60, 198, 220, 886, 198, 17772, 220, 198, 220, 4049, 7203, 3, 14171, 407, 4938, 4943, 198, 437, 198, 198, 67, 11, 410, 11, 257, 28, 11884, 50, 14375, 7, 4743, 672, 1940, 1045, 11, 7386, 11, 288, 15, 11, 410, 15, 11, 257, 15, 11, 37455, 83, 11, 24563, 11, 299, 77, 62, 6270, 11, 376, 2302, 11, 334, 17457, 11, 450, 67, 26, 14022, 62, 4906, 2625, 69, 9504, 4943, 198, 198, 2, 1332, 220, 796, 1280, 7203, 9288, 13, 14116, 1600, 366, 86, 4943, 198, 82, 408, 796, 23575, 9783, 2315, 7, 82, 408, 8, 198, 2, 1057, 7, 82, 408, 11, 288, 8, 198, 312, 87, 796, 2488, 13, 357, 15, 25, 77, 27493, 76, 1343, 352, 198, 312, 87, 796, 685, 312, 87, 26, 4275, 13, 4686, 87, 1343, 7386, 13, 20471, 4147, 15437, 198, 22462, 796, 2160, 19510, 67, 58, 45299, 4686, 87, 60, 532, 288, 62, 58, 45299, 4686, 87, 12962, 61, 17, 8, 198, 82, 408, 796, 23575, 9783, 2315, 7, 82, 408, 8, 198, 31, 10951, 1057, 7, 82, 408, 11, 2994, 8, 198, 2, 4049, 3419, 198, 198, 0, 9409, 343, 7, 14171, 8, 11405, 33480, 15908, 7, 14171, 8, 198, 198, 1640, 1312, 796, 352, 25, 3064, 198, 220, 2994, 62, 796, 41646, 14313, 0, 7, 82, 408, 11, 2994, 11, 8576, 8, 198, 220, 288, 15, 796, 1057, 7, 82, 408, 11, 288, 8, 628, 220, 1303, 38350, 198, 220, 1969, 7203, 439, 4943, 198, 220, 279, 796, 38350, 62, 6381, 489, 5592, 7, 67, 15, 11, 7386, 8, 198, 220, 3613, 11227, 7, 79, 11, 17971, 14171, 32624, 72, 13, 27908, 4943, 198, 220, 1969, 7203, 439, 4943, 198, 220, 7110, 7, 67, 62, 58, 45299, 16, 4357, 27444, 1600, 3124, 2625, 34, 16, 4943, 198, 220, 7110, 7, 67, 15, 58, 45299, 16, 4357, 366, 438, 1600, 3124, 2625, 34, 16, 4943, 198, 220, 7110, 7, 67, 62, 58, 45299, 16, 10, 27830, 13, 20471, 4147, 4357, 3124, 2625, 34, 17, 4943, 198, 220, 7110, 7, 67, 15, 58, 45299, 16, 10, 27830, 13, 20471, 4147, 4357, 366, 438, 1600, 3124, 2625, 34, 17, 4943, 198, 220, 3613, 5647, 7203, 3, 14171, 32624, 72, 13, 11134, 4943, 628, 220, 1280, 7203, 3, 14171, 14, 22462, 13, 14116, 1600, 366, 64, 4943, 466, 33245, 220, 198, 220, 220, 220, 1991, 276, 75, 76, 7, 952, 11, 2994, 62, 8, 198, 220, 886, 220, 220, 198, 220, 49169, 11682, 13, 21928, 7, 82, 408, 11, 17971, 14171, 32624, 72, 13, 6759, 4943, 198, 220, 611, 4129, 7, 22462, 62, 8, 27, 12825, 198, 220, 220, 220, 2270, 198, 220, 886, 198, 437, 198 ]
2.121495
963
@testset "Decreasing2LP: $(fct_type), dimension $(dim), $(T)" for fct_type in ["vector of variables", "vector affine function"], dim in [2, 3], T in [Int, Float64] mock = MOIU.MockOptimizer(MILPModel{T}()) model = COIB.Decreasing2LP{T}(mock) if T == Int @test MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) end @test MOI.supports_constraint( model, MOI.ScalarAffineFunction{T}, MOI.EqualTo{T}, ) @test MOIB.supports_bridging_constraint( model, MOI.VectorAffineFunction{T}, CP.Decreasing, ) if T == Int x, _ = MOI.add_constrained_variables(model, [MOI.Integer() for _ in 1:dim]) elseif T == Float64 x = MOI.add_variables(model, dim) end fct = if fct_type == "vector of variables" MOI.VectorOfVariables(x) elseif fct_type == "vector affine function" MOIU.vectorize(x) else @assert false end c = MOI.add_constraint(model, fct, CP.Decreasing(dim)) for i in 1:dim @test MOI.is_valid(model, x[i]) end @test MOI.is_valid(model, c) bridge = MOIBC.bridges(model)[MOI.ConstraintIndex{MOI.VectorOfVariables, CP.Decreasing}(-1)] @testset "Bridge properties" begin @test MOIBC.concrete_bridge_type(typeof(bridge), MOI.VectorOfVariables, CP.Decreasing) == typeof(bridge) @test MOIB.added_constrained_variable_types(typeof(bridge)) == Tuple{Type}[] @test MOIB.added_constraint_types(typeof(bridge)) == [(MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T})] @test MOI.get(bridge, MOI.NumberOfVariables()) == 0 @test MOI.get(bridge, MOI.NumberOfConstraints{MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T}}()) == dim - 1 @test Set(MOI.get(bridge, MOI.ListOfConstraintIndices{MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T}}())) == Set(collect(values(bridge.cons))) end @testset "Set of constraints" begin @test length(bridge.cons) == dim - 1 for i in 1:(dim - 1) @test MOI.is_valid(model, bridge.cons[i]) f = MOI.get(model, MOI.ConstraintFunction(), bridge.cons[i]) @test length(f.terms) == 2 @test MOI.get(model, MOI.ConstraintSet(), bridge.cons[i]) == MOI.GreaterThan(zero(T)) t1 = f.terms[1] @test t1.coefficient === one(T) @test t1.variable == x[i] t2 = f.terms[2] @test t2.coefficient === -one(T) @test t2.variable == x[i + 1] end end end
[ 31, 9288, 2617, 366, 43198, 2313, 17, 19930, 25, 29568, 69, 310, 62, 4906, 828, 15793, 29568, 27740, 828, 29568, 51, 16725, 329, 277, 310, 62, 4906, 287, 14631, 31364, 286, 9633, 1600, 366, 31364, 1527, 500, 2163, 33116, 5391, 287, 685, 17, 11, 513, 4357, 309, 287, 685, 5317, 11, 48436, 2414, 60, 198, 220, 220, 220, 15290, 796, 13070, 44958, 13, 44, 735, 27871, 320, 7509, 7, 44, 4146, 47, 17633, 90, 51, 92, 28955, 198, 220, 220, 220, 2746, 796, 7375, 9865, 13, 43198, 2313, 17, 19930, 90, 51, 92, 7, 76, 735, 8, 628, 220, 220, 220, 611, 309, 6624, 2558, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 18608, 2096, 62, 1102, 2536, 2913, 7, 19849, 11, 13070, 40, 13, 43015, 15732, 11, 13070, 40, 13, 46541, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 13070, 40, 13, 18608, 2096, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 3351, 282, 283, 35191, 500, 22203, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 36, 13255, 2514, 90, 51, 5512, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2488, 9288, 13070, 9865, 13, 18608, 2096, 62, 10236, 2667, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 16932, 13, 43198, 2313, 11, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 611, 309, 6624, 2558, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 11, 4808, 796, 13070, 40, 13, 2860, 62, 1102, 2536, 1328, 62, 25641, 2977, 7, 19849, 11, 685, 11770, 40, 13, 46541, 3419, 329, 4808, 287, 352, 25, 27740, 12962, 198, 220, 220, 220, 2073, 361, 309, 6624, 48436, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 13070, 40, 13, 2860, 62, 25641, 2977, 7, 19849, 11, 5391, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 277, 310, 796, 611, 277, 310, 62, 4906, 6624, 366, 31364, 286, 9633, 1, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 5189, 23907, 2977, 7, 87, 8, 198, 220, 220, 220, 2073, 361, 277, 310, 62, 4906, 6624, 366, 31364, 1527, 500, 2163, 1, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 44958, 13, 31364, 1096, 7, 87, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 3991, 198, 220, 220, 220, 886, 198, 220, 220, 220, 269, 796, 13070, 40, 13, 2860, 62, 1102, 2536, 2913, 7, 19849, 11, 277, 310, 11, 16932, 13, 43198, 2313, 7, 27740, 4008, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 27740, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 271, 62, 12102, 7, 19849, 11, 2124, 58, 72, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 13070, 40, 13, 271, 62, 12102, 7, 19849, 11, 269, 8, 628, 220, 220, 220, 7696, 796, 13070, 40, 2749, 13, 10236, 3212, 7, 19849, 38381, 11770, 40, 13, 3103, 2536, 2913, 15732, 90, 11770, 40, 13, 38469, 5189, 23907, 2977, 11, 16932, 13, 43198, 2313, 92, 32590, 16, 15437, 628, 220, 220, 220, 2488, 9288, 2617, 366, 37385, 6608, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 2749, 13, 1102, 38669, 62, 9458, 62, 4906, 7, 4906, 1659, 7, 9458, 828, 13070, 40, 13, 38469, 5189, 23907, 2977, 11, 16932, 13, 43198, 2313, 8, 6624, 2099, 1659, 7, 9458, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 9865, 13, 29373, 62, 1102, 2536, 1328, 62, 45286, 62, 19199, 7, 4906, 1659, 7, 9458, 4008, 6624, 309, 29291, 90, 6030, 92, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 9865, 13, 29373, 62, 1102, 2536, 2913, 62, 19199, 7, 4906, 1659, 7, 9458, 4008, 6624, 47527, 11770, 40, 13, 3351, 282, 283, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 13681, 263, 817, 272, 90, 51, 92, 15437, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 1136, 7, 9458, 11, 13070, 40, 13, 15057, 5189, 23907, 2977, 28955, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 1136, 7, 9458, 11, 13070, 40, 13, 15057, 5189, 3103, 2536, 6003, 90, 11770, 40, 13, 3351, 282, 283, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 13681, 263, 817, 272, 90, 51, 11709, 28955, 6624, 5391, 532, 352, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 5345, 7, 11770, 40, 13, 1136, 7, 9458, 11, 13070, 40, 13, 8053, 5189, 3103, 2536, 2913, 5497, 1063, 90, 11770, 40, 13, 3351, 282, 283, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 13681, 263, 817, 272, 90, 51, 11709, 3419, 4008, 6624, 5345, 7, 33327, 7, 27160, 7, 9458, 13, 5936, 22305, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 7248, 286, 17778, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 9458, 13, 5936, 8, 6624, 5391, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 37498, 27740, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 271, 62, 12102, 7, 19849, 11, 7696, 13, 5936, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 796, 13070, 40, 13, 1136, 7, 19849, 11, 13070, 40, 13, 3103, 2536, 2913, 22203, 22784, 7696, 13, 5936, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 69, 13, 38707, 8, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13070, 40, 13, 1136, 7, 19849, 11, 13070, 40, 13, 3103, 2536, 2913, 7248, 22784, 7696, 13, 5936, 58, 72, 12962, 6624, 13070, 40, 13, 13681, 263, 817, 272, 7, 22570, 7, 51, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 16, 796, 277, 13, 38707, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 256, 16, 13, 1073, 16814, 24844, 530, 7, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 256, 16, 13, 45286, 6624, 2124, 58, 72, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 17, 796, 277, 13, 38707, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 256, 17, 13, 1073, 16814, 24844, 532, 505, 7, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 256, 17, 13, 45286, 6624, 2124, 58, 72, 1343, 352, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.111296
1,204
using Statistics using Distributions using ProgressMeter #= References ---------- [1] Sobol, I. M. (2001). "Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates." Mathematics and Computers in Simulation, 55(1-3):271-280, doi:10.1016/S0378-4754(00)00270-6. [2] Saltelli, A. (2002). "Making best use of model evaluations to compute sensitivity indices." Computer Physics Communications, 145(2):280-297, doi:10.1016/S0010-4655(02)00280-1. [3] Saltelli, A., P. Annoni, I. Azzini, F. Campolongo, M. Ratto, and S. Tarantola (2010). "Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index." Computer Physics Communications, 181(2):259-270, doi:10.1016/j.cpc.2009.09.018. =# """ analyze(data::SobolData, model_output::AbstractArray{<:Number, S}; num_resamples::Union{Nothing, Int} = 1_000, conf_level::Union{Nothing, Number} = 0.95, progress_meter::Bool = true, N_override::Union{Nothing, Integer}=nothing) where S Performs a Sobol Analysis on the `model_output` produced with the problem defined by the information in `data` and returns the a dictionary of results with the sensitivity indices and respective confidence intervals for each of the parameters defined using the `num_resamples` and `conf_level` keyword args. If these are Nothing than no confidence intervals will be calculated. The `progress_meter` keyword argument indicates whether a progress meter will be displayed and defaults to true. The `N_override` keyword argument allows users to override the `N` used in a specific `analyze` call to analyze just a subset (useful for convergence graphs). """ function analyze(data::SobolData, model_output::AbstractArray{<:Number, S}; num_resamples::Union{Nothing, Int} = 1_000, conf_level::Union{Nothing, Number} = 0.95, progress_meter::Bool = true, N_override::Union{Nothing, Integer}=nothing) where S # handle confidence interval flag num_nothings = (num_resamples === nothing) + (conf_level === nothing) if num_nothings == 1 error("Number of resamples is $num_resamples, while confidence level is $conf_level ... either none or both must be nothing") elseif num_nothings == 2 conf_flag = false else conf_flag = true end # define constants calc_second_order = data.calc_second_order D = length(data.params) # number of uncertain parameters in problem # deal with overriding N if N_override === nothing N = data.N # number of samples else N_override > data.N ? error("N_override ($N_override) cannot be greater than original N used in sampling ($(data.N))") : nothing N = N_override # number of samples # reduce the output to just what should be considered for this N if data.calc_second_order lastrow = N * ((2 * D) + 2) else lastrow = N * (D + 2) end model_output = model_output[1:lastrow] end # values for CI calculations if conf_flag r = rand(1:N, N, num_resamples) Z = quantile(Normal(0.0, 1.0),1 - (1 - conf_level)/2) # calculate z* for CI end # normalize model output model_output = (model_output .- mean(model_output)) ./ std(model_output) # separate the model_output into results from matrices "A". "B" and "AB" A, B, AB, BA = split_output(model_output, N, D, calc_second_order) # preallocate arrays for indices firstorder = Array{Float64}(undef, D) totalorder = Array{Float64}(undef, D) calc_second_order ? secondorder = fill!(Array{Union{Float64, Missing}}(undef, D, D), missing) : nothing # preallocate arrays for confidence intervals if conf_flag firstorder_conf = Array{Float64}(undef, D) totalorder_conf = Array{Float64}(undef, D) calc_second_order ? secondorder_conf = fill!(Array{Union{Float64, Missing}}(undef, D, D), missing) : nothing end # set up progress meter counter = 0 progress_meter ? p = Progress(D, counter, "Calculating indices for $D parameters ...") : nothing for i in 1:D # increment progress meter counter += 1 progress_meter ? ProgressMeter.update!(p, counter) : nothing # first order and total order indices firstorder[i] = first_order(A, AB[:, i], B)[1] # array to scalar with [1] totalorder[i] = total_order(A, AB[:, i], B)[1] # array to scalar with [1] # first order and total order indice confidence intervals conf_flag ? firstorder_conf[i] = Z * std(first_order(A[r], AB[r, i], B[r])) : nothing conf_flag ? totalorder_conf[i] = Z * std(total_order(A[r], AB[r, i], B[r])) : nothing # second order indices if calc_second_order for j in (i+1):D secondorder[i, j] = second_order(A, AB[:, i], AB[:, j], BA[:, i], B)[1] # array to scalar with [1] conf_flag ? secondorder_conf[i,j] = Z * std(skipmissing(second_order(A[r], AB[r, i], AB[r, j], BA[r, i], B[r]))) : nothing end end end if calc_second_order if conf_flag results = Dict( :firstorder => firstorder, :firstorder_conf => firstorder_conf, :totalorder => totalorder, :totalorder_conf => totalorder_conf, :secondorder => secondorder, :secondorder_conf => secondorder_conf ) else results = Dict( :firstorder => firstorder, :totalorder => totalorder, :secondorder => secondorder, ) end else if conf_flag results = Dict( :firstorder => firstorder, :firstorder_conf => firstorder_conf, :totalorder => totalorder, :totalorder_conf => totalorder_conf ) else results = Dict( :firstorder => firstorder, :totalorder => totalorder, ) end end return results end """ first_order(A::AbstractArray{<:Number, N}, AB::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) Calculate the first order sensitivity indices for model outputs given model outputs separated out into `A`, `AB`, and `A` and normalize by the variance of `[A B]`. [Saltelli et al., 2010 Table 2 eq (b)] """ function first_order(A::AbstractArray{<:Number, N}, AB::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) where N return (mean(B .* (AB .- A), dims = 1) ./ var(vcat(A, B), dims = 1, corrected = false)) end """ second_order(A::AbstractArray{<:Number, N}, ABi::AbstractArray{<:Number, N}, ABj::AbstractArray{<:Number, N}, BAi::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) where N Calculate the second order sensitivity index between two parameters for model outputs given model outputs separated out into `A`, `AB`, `BA`, and `B` and normalize by the variance of `[A B]`. [Saltelli et al. , 2002] """ function second_order(A::AbstractArray{<:Number, N}, ABi::AbstractArray{<:Number, N}, ABj::AbstractArray{<:Number, N}, BAi::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) where N Vj = (mean(BAi .* ABj .- A .* B, dims = 1) ./ var(vcat(A, B), dims = 1, corrected = false)) Si = first_order(A, ABi, B) Sj = first_order(A, ABj, B) return Vj .- Si .- Sj end """ total_order(A::AbstractArray{<:Number, N}, AB::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) Calculate the total order sensitivity indices for model outputs given model outputs separated out into `A`, `AB`, and `A` and normalize by the variance of `[A B]`. [Saltelli et al., 2010 Table 2 eq (f)]. """ function total_order(A::AbstractArray{<:Number, N}, AB::AbstractArray{<:Number, N}, B::AbstractArray{<:Number, N}) where N return (0.5 * mean((A .- AB).^2, dims = 1) ./ var(vcat(A, B), dims = 1, corrected = false)) end """ split_output(model_output::AbstractArray{<:Number, S}, N, D, calc_second_order) Separate the `model_outputs` into matrices "A", "B", "AB", and "BA" for calculation of sensitvity indices and return those four matrices. If `calc_second_order` is `False`, `BA` will be `nothing`. """ function split_output(model_output::AbstractArray{<:Number, S}, N, D, calc_second_order::Bool) where S if calc_second_order stepsize = 2 * D + 2 else stepsize = D + 2 end A = model_output[1:stepsize:end] B = model_output[stepsize:stepsize:end] #preallocate AB = Array{Float64}(undef, N, D) if calc_second_order BA = Array{Float64}(undef, N, D) else BA = nothing end for i in 1:D AB[:, i] = model_output[i+1:stepsize:end, :] if calc_second_order BA[:, i] = model_output[i + D + 1:stepsize:end, :] end end return A, B, AB, BA end
[ 3500, 14370, 198, 3500, 46567, 507, 198, 3500, 18387, 44, 2357, 198, 198, 2, 28, 198, 19927, 198, 35937, 198, 220, 220, 220, 685, 16, 60, 36884, 349, 11, 314, 13, 337, 13, 357, 14585, 737, 220, 366, 22289, 14233, 36525, 329, 1729, 29127, 198, 220, 220, 220, 220, 220, 220, 220, 18069, 4981, 290, 511, 22489, 40089, 7746, 526, 220, 39448, 198, 220, 220, 220, 220, 220, 220, 220, 290, 22476, 364, 287, 41798, 11, 5996, 7, 16, 12, 18, 2599, 28977, 12, 21033, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23899, 25, 940, 13, 27956, 14, 50, 15, 30695, 12, 32576, 19, 7, 405, 8, 405, 20233, 12, 21, 13, 198, 220, 220, 220, 685, 17, 60, 4849, 660, 15516, 11, 317, 13, 357, 16942, 737, 220, 366, 23874, 1266, 779, 286, 2746, 34109, 284, 198, 220, 220, 220, 220, 220, 220, 220, 24061, 14233, 36525, 526, 220, 13851, 23123, 14620, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20299, 7, 17, 2599, 21033, 12, 26561, 11, 23899, 25, 940, 13, 27956, 14, 50, 37187, 12, 3510, 2816, 7, 2999, 8, 405, 21033, 12, 16, 13, 198, 220, 220, 220, 685, 18, 60, 4849, 660, 15516, 11, 317, 1539, 350, 13, 5506, 14651, 11, 314, 13, 317, 3019, 5362, 11, 376, 13, 5425, 349, 25162, 11, 337, 13, 371, 45807, 11, 290, 198, 220, 220, 220, 220, 220, 220, 220, 311, 13, 43693, 5708, 357, 10333, 737, 220, 366, 23907, 590, 1912, 14233, 3781, 286, 2746, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 13, 220, 8495, 290, 3959, 1352, 329, 262, 2472, 14233, 6376, 526, 198, 220, 220, 220, 220, 220, 220, 220, 13851, 23123, 14620, 11, 30110, 7, 17, 2599, 25191, 12, 20233, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23899, 25, 940, 13, 27956, 14, 73, 13, 13155, 66, 13, 10531, 13, 2931, 13, 29159, 13, 198, 46249, 198, 198, 37811, 198, 220, 220, 220, 16602, 7, 7890, 3712, 50, 672, 349, 6601, 11, 2746, 62, 22915, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 311, 19629, 997, 62, 411, 12629, 3712, 38176, 90, 18465, 11, 2558, 92, 796, 352, 62, 830, 11, 1013, 62, 5715, 3712, 38176, 90, 18465, 11, 7913, 92, 796, 657, 13, 3865, 11, 4371, 62, 27231, 3712, 33, 970, 796, 2081, 11, 399, 62, 2502, 13154, 3712, 38176, 90, 18465, 11, 34142, 92, 28, 22366, 8, 810, 311, 198, 198, 5990, 23914, 257, 36884, 349, 14691, 319, 262, 4600, 19849, 62, 22915, 63, 4635, 351, 262, 1917, 220, 198, 23211, 416, 262, 1321, 287, 4600, 7890, 63, 290, 5860, 262, 257, 22155, 286, 2482, 198, 4480, 262, 14233, 36525, 290, 11756, 6628, 20016, 329, 1123, 286, 262, 198, 17143, 7307, 5447, 1262, 262, 4600, 22510, 62, 411, 12629, 63, 290, 4600, 10414, 62, 5715, 63, 21179, 26498, 13, 1002, 777, 198, 533, 10528, 621, 645, 6628, 20016, 481, 307, 10488, 13, 383, 4600, 33723, 62, 27231, 63, 198, 2539, 4775, 4578, 9217, 1771, 257, 4371, 16430, 481, 307, 9066, 290, 26235, 198, 1462, 2081, 13, 383, 4600, 45, 62, 2502, 13154, 63, 21179, 4578, 3578, 2985, 284, 20957, 262, 4600, 45, 63, 973, 287, 198, 64, 2176, 4600, 38200, 2736, 63, 869, 284, 16602, 655, 257, 24637, 357, 1904, 913, 329, 40826, 28770, 737, 198, 37811, 198, 8818, 16602, 7, 7890, 3712, 50, 672, 349, 6601, 11, 2746, 62, 22915, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 311, 19629, 997, 62, 411, 12629, 3712, 38176, 90, 18465, 11, 2558, 92, 796, 352, 62, 830, 11, 1013, 62, 5715, 3712, 38176, 90, 18465, 11, 7913, 92, 796, 657, 13, 3865, 11, 4371, 62, 27231, 3712, 33, 970, 796, 2081, 11, 399, 62, 2502, 13154, 3712, 38176, 90, 18465, 11, 34142, 92, 28, 22366, 8, 810, 311, 628, 220, 220, 220, 1303, 5412, 6628, 16654, 6056, 198, 220, 220, 220, 997, 62, 77, 849, 654, 796, 357, 22510, 62, 411, 12629, 24844, 2147, 8, 1343, 357, 10414, 62, 5715, 24844, 2147, 8, 198, 220, 220, 220, 611, 997, 62, 77, 849, 654, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 15057, 286, 581, 12629, 318, 720, 22510, 62, 411, 12629, 11, 981, 6628, 1241, 318, 720, 10414, 62, 5715, 2644, 2035, 4844, 393, 1111, 1276, 307, 2147, 4943, 198, 220, 220, 220, 2073, 361, 997, 62, 77, 849, 654, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 1013, 62, 32109, 796, 3991, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1013, 62, 32109, 796, 2081, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 8160, 38491, 198, 220, 220, 220, 42302, 62, 12227, 62, 2875, 796, 1366, 13, 9948, 66, 62, 12227, 62, 2875, 220, 198, 220, 220, 220, 360, 796, 4129, 7, 7890, 13, 37266, 8, 1303, 1271, 286, 8627, 10007, 287, 1917, 628, 220, 220, 220, 1303, 1730, 351, 44987, 399, 198, 220, 220, 220, 611, 399, 62, 2502, 13154, 24844, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 399, 796, 1366, 13, 45, 1303, 1271, 286, 8405, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 399, 62, 2502, 13154, 1875, 1366, 13, 45, 5633, 4049, 7203, 45, 62, 2502, 13154, 7198, 45, 62, 2502, 13154, 8, 2314, 307, 3744, 621, 2656, 399, 973, 287, 19232, 7198, 7, 7890, 13, 45, 4008, 4943, 1058, 2147, 220, 198, 220, 220, 220, 220, 220, 220, 220, 399, 796, 399, 62, 2502, 13154, 1303, 1271, 286, 8405, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4646, 262, 5072, 284, 655, 644, 815, 307, 3177, 329, 428, 399, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 13, 9948, 66, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 938, 808, 796, 399, 1635, 14808, 17, 1635, 360, 8, 1343, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 938, 808, 796, 399, 1635, 357, 35, 1343, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 22915, 796, 2746, 62, 22915, 58, 16, 25, 12957, 808, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 3815, 329, 14514, 16765, 198, 220, 220, 220, 611, 1013, 62, 32109, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 43720, 7, 16, 25, 45, 11, 399, 11, 997, 62, 411, 12629, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1168, 796, 5554, 576, 7, 26447, 7, 15, 13, 15, 11, 352, 13, 15, 828, 16, 532, 357, 16, 532, 1013, 62, 5715, 20679, 17, 8, 1303, 15284, 1976, 9, 329, 14514, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 3487, 1096, 2746, 5072, 198, 220, 220, 220, 2746, 62, 22915, 796, 357, 19849, 62, 22915, 764, 12, 1612, 7, 19849, 62, 22915, 4008, 24457, 14367, 7, 19849, 62, 22915, 8, 628, 220, 220, 220, 1303, 4553, 262, 2746, 62, 22915, 656, 2482, 422, 2603, 45977, 366, 32, 1911, 366, 33, 1, 290, 366, 6242, 1, 220, 198, 220, 220, 220, 317, 11, 347, 11, 9564, 11, 23715, 796, 6626, 62, 22915, 7, 19849, 62, 22915, 11, 399, 11, 360, 11, 42302, 62, 12227, 62, 2875, 8, 628, 220, 220, 220, 1303, 662, 439, 13369, 26515, 329, 36525, 198, 220, 220, 220, 717, 2875, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 360, 8, 198, 220, 220, 220, 2472, 2875, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 360, 8, 198, 220, 220, 220, 42302, 62, 12227, 62, 2875, 5633, 1218, 2875, 796, 220, 6070, 0, 7, 19182, 90, 38176, 90, 43879, 2414, 11, 25639, 11709, 7, 917, 891, 11, 360, 11, 360, 828, 4814, 8, 1058, 2147, 628, 220, 220, 220, 1303, 662, 439, 13369, 26515, 329, 6628, 20016, 198, 220, 220, 220, 611, 1013, 62, 32109, 198, 220, 220, 220, 220, 220, 220, 220, 717, 2875, 62, 10414, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 360, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2472, 2875, 62, 10414, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 360, 8, 198, 220, 220, 220, 220, 220, 220, 220, 42302, 62, 12227, 62, 2875, 5633, 1218, 2875, 62, 10414, 796, 220, 6070, 0, 7, 19182, 90, 38176, 90, 43879, 2414, 11, 25639, 11709, 7, 917, 891, 11, 360, 11, 360, 828, 4814, 8, 1058, 2147, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 900, 510, 4371, 16430, 198, 220, 220, 220, 3753, 796, 657, 198, 220, 220, 220, 4371, 62, 27231, 5633, 279, 796, 18387, 7, 35, 11, 3753, 11, 366, 9771, 3129, 803, 36525, 329, 720, 35, 10007, 35713, 8, 1058, 2147, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 35, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 18703, 4371, 16430, 198, 220, 220, 220, 220, 220, 220, 220, 3753, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 4371, 62, 27231, 5633, 18387, 44, 2357, 13, 19119, 0, 7, 79, 11, 3753, 8, 1058, 2147, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 717, 1502, 290, 2472, 1502, 36525, 198, 220, 220, 220, 220, 220, 220, 220, 717, 2875, 58, 72, 60, 796, 717, 62, 2875, 7, 32, 11, 9564, 58, 45299, 1312, 4357, 347, 38381, 16, 60, 1303, 7177, 284, 16578, 283, 351, 685, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2472, 2875, 58, 72, 60, 796, 2472, 62, 2875, 7, 32, 11, 9564, 58, 45299, 1312, 4357, 347, 38381, 16, 60, 1303, 7177, 284, 16578, 283, 351, 685, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 717, 1502, 290, 2472, 1502, 773, 501, 6628, 20016, 198, 220, 220, 220, 220, 220, 220, 220, 1013, 62, 32109, 5633, 717, 2875, 62, 10414, 58, 72, 60, 796, 1168, 1635, 14367, 7, 11085, 62, 2875, 7, 32, 58, 81, 4357, 9564, 58, 81, 11, 1312, 4357, 347, 58, 81, 60, 4008, 1058, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 1013, 62, 32109, 5633, 2472, 2875, 62, 10414, 58, 72, 60, 796, 1168, 1635, 14367, 7, 23350, 62, 2875, 7, 32, 58, 81, 4357, 9564, 58, 81, 11, 1312, 4357, 347, 58, 81, 60, 4008, 1058, 2147, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1218, 1502, 36525, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42302, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 357, 72, 10, 16, 2599, 35, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1218, 2875, 58, 72, 11, 474, 60, 796, 1218, 62, 2875, 7, 32, 11, 9564, 58, 45299, 1312, 4357, 9564, 58, 45299, 474, 4357, 23715, 58, 45299, 1312, 4357, 347, 38381, 16, 60, 1303, 7177, 284, 16578, 283, 351, 685, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1013, 62, 32109, 5633, 1218, 2875, 62, 10414, 58, 72, 11, 73, 60, 796, 1168, 1635, 14367, 7, 48267, 45688, 7, 12227, 62, 2875, 7, 32, 58, 81, 4357, 9564, 58, 81, 11, 1312, 4357, 9564, 58, 81, 11, 474, 4357, 23715, 58, 81, 11, 1312, 4357, 347, 58, 81, 60, 22305, 1058, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 42302, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1013, 62, 32109, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 717, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 62, 10414, 220, 220, 220, 5218, 717, 2875, 62, 10414, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 2472, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 62, 10414, 220, 220, 220, 5218, 2472, 2875, 62, 10414, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 12227, 2875, 220, 220, 220, 220, 220, 220, 220, 5218, 1218, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 12227, 2875, 62, 10414, 220, 220, 5218, 1218, 2875, 62, 10414, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 717, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 2472, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 12227, 2875, 220, 220, 220, 220, 220, 220, 220, 5218, 1218, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1013, 62, 32109, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 717, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 62, 10414, 220, 220, 220, 5218, 717, 2875, 62, 10414, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 2472, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 62, 10414, 220, 220, 220, 5218, 2472, 2875, 62, 10414, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 11085, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 717, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23350, 2875, 220, 220, 220, 220, 220, 220, 220, 220, 5218, 2472, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2482, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 717, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 198, 198, 9771, 3129, 378, 262, 717, 1502, 14233, 36525, 329, 2746, 23862, 1813, 2746, 23862, 198, 25512, 515, 503, 656, 4600, 32, 47671, 4600, 6242, 47671, 290, 4600, 32, 63, 290, 3487, 1096, 416, 262, 24198, 286, 4600, 58, 32, 347, 60, 44646, 685, 19221, 660, 15516, 2123, 435, 1539, 220, 198, 10333, 8655, 362, 37430, 357, 65, 15437, 198, 37811, 198, 8818, 717, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 810, 399, 198, 220, 220, 220, 1441, 357, 32604, 7, 33, 764, 9, 357, 6242, 764, 12, 317, 828, 5391, 82, 796, 352, 8, 24457, 1401, 7, 85, 9246, 7, 32, 11, 347, 828, 5391, 82, 796, 352, 11, 19267, 796, 3991, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1218, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 72, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 73, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 23715, 72, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 810, 399, 198, 198, 9771, 3129, 378, 262, 1218, 1502, 14233, 6376, 1022, 734, 10007, 329, 2746, 23862, 220, 198, 35569, 2746, 23862, 11266, 503, 656, 4600, 32, 47671, 4600, 6242, 47671, 4600, 4339, 47671, 290, 4600, 33, 63, 290, 3487, 1096, 416, 220, 198, 1169, 24198, 286, 4600, 58, 32, 347, 60, 44646, 685, 19221, 660, 15516, 2123, 435, 13, 837, 6244, 60, 198, 37811, 198, 8818, 1218, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 72, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 73, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 23715, 72, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 810, 399, 628, 220, 220, 220, 569, 73, 796, 357, 32604, 7, 4339, 72, 764, 9, 9564, 73, 764, 12, 317, 764, 9, 347, 11, 5391, 82, 796, 352, 8, 24457, 1401, 7, 85, 9246, 7, 32, 11, 347, 828, 5391, 82, 796, 352, 11, 19267, 796, 3991, 4008, 198, 220, 220, 220, 15638, 796, 717, 62, 2875, 7, 32, 11, 9564, 72, 11, 347, 8, 198, 220, 220, 220, 311, 73, 796, 717, 62, 2875, 7, 32, 11, 9564, 73, 11, 347, 8, 628, 220, 220, 220, 1441, 569, 73, 764, 12, 15638, 764, 12, 311, 73, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2472, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 198, 198, 9771, 3129, 378, 262, 2472, 1502, 14233, 36525, 329, 2746, 23862, 1813, 2746, 23862, 198, 25512, 515, 503, 656, 4600, 32, 47671, 4600, 6242, 47671, 290, 4600, 32, 63, 290, 3487, 1096, 416, 262, 24198, 286, 4600, 58, 32, 347, 60, 44646, 685, 19221, 660, 15516, 2123, 435, 1539, 220, 198, 10333, 8655, 362, 37430, 357, 69, 25295, 198, 37811, 198, 8818, 2472, 62, 2875, 7, 32, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 9564, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 5512, 347, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 399, 30072, 810, 399, 198, 220, 220, 220, 1441, 357, 15, 13, 20, 1635, 1612, 19510, 32, 764, 12, 9564, 737, 61, 17, 11, 5391, 82, 796, 352, 8, 24457, 1401, 7, 85, 9246, 7, 32, 11, 347, 828, 5391, 82, 796, 352, 11, 19267, 796, 3991, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6626, 62, 22915, 7, 19849, 62, 22915, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 311, 5512, 399, 11, 360, 11, 42302, 62, 12227, 62, 2875, 8, 198, 198, 19117, 30748, 262, 4600, 19849, 62, 22915, 82, 63, 656, 2603, 45977, 366, 32, 1600, 366, 33, 1600, 366, 6242, 1600, 290, 366, 4339, 1, 329, 17952, 220, 198, 1659, 44752, 21319, 36525, 290, 1441, 883, 1440, 2603, 45977, 13, 1002, 4600, 9948, 66, 62, 12227, 62, 2875, 63, 318, 220, 198, 63, 25101, 47671, 4600, 4339, 63, 481, 307, 4600, 22366, 44646, 198, 37811, 198, 8818, 6626, 62, 22915, 7, 19849, 62, 22915, 3712, 23839, 19182, 90, 27, 25, 15057, 11, 311, 5512, 399, 11, 360, 11, 42302, 62, 12227, 62, 2875, 3712, 33, 970, 8, 810, 311, 628, 220, 220, 220, 611, 42302, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 4831, 1096, 796, 362, 1635, 360, 1343, 362, 220, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4831, 1096, 796, 360, 1343, 362, 198, 220, 220, 220, 886, 628, 220, 220, 220, 317, 796, 2746, 62, 22915, 58, 16, 25, 9662, 7857, 25, 437, 60, 198, 220, 220, 220, 347, 796, 2746, 62, 22915, 58, 9662, 7857, 25, 9662, 7857, 25, 437, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 3866, 439, 13369, 198, 220, 220, 220, 9564, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 399, 11, 360, 8, 198, 220, 220, 220, 611, 42302, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 23715, 796, 15690, 90, 43879, 2414, 92, 7, 917, 891, 11, 399, 11, 360, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 23715, 796, 2147, 198, 220, 220, 220, 886, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 35, 198, 220, 220, 220, 220, 220, 220, 220, 9564, 58, 45299, 1312, 60, 796, 2746, 62, 22915, 58, 72, 10, 16, 25, 9662, 7857, 25, 437, 11, 1058, 60, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42302, 62, 12227, 62, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23715, 58, 45299, 1312, 60, 796, 2746, 62, 22915, 58, 72, 1343, 360, 1343, 352, 25, 9662, 7857, 25, 437, 11, 1058, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 317, 11, 347, 11, 9564, 11, 23715, 198, 437, 198 ]
2.456966
3,718
@testset "Auxiliary Functions Test" begin @testset "check constant columns" begin @test_throws Exception PartialLeastSquaresRegressor.check_constant_cols([1.0 1;1 2;1 3]) @test_throws Exception PartialLeastSquaresRegressor.check_constant_cols([1.0;1;1][:,:]) @test_throws Exception PartialLeastSquaresRegressor.check_constant_cols([1.0 2 3]) @test_throws Exception PartialLeastSquaresRegressor.check_constant_cols([1.0; 1; 1][:,:]) @test PartialLeastSquaresRegressor.check_constant_cols([1.0 1;2 2;3 3]) @test PartialLeastSquaresRegressor.check_constant_cols([1.0;2;3][:,:]) end @testset "checkparams" begin #@test_logs PLSRegressor.check_params(2,1,"linear") @test_throws Exception PartialLeastSquaresRegressor.check_params(-1,2,"linear") @test_throws Exception PartialLeastSquaresRegressor.check_params(1,2,"x") @test PartialLeastSquaresRegressor.check_params(1,2,"linear") end @testset "checkdata" begin @test_throws Exception PartialLeastSquaresRegressor.check_data(zeros(0,0), 0) @test_throws Exception PartialLeastSquaresRegressor.check_data(zeros(1,1), 10) @test PartialLeastSquaresRegressor.check_data(zeros(1,1), 1) end end
[ 31, 9288, 2617, 366, 32, 2821, 28129, 40480, 6208, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 9122, 6937, 15180, 1, 2221, 198, 197, 197, 31, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 352, 26, 16, 362, 26, 16, 513, 12962, 198, 197, 197, 31, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 26, 16, 26, 16, 7131, 45299, 25, 12962, 198, 197, 197, 31, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 362, 513, 12962, 198, 197, 197, 31, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 26, 352, 26, 352, 7131, 45299, 25, 12962, 628, 197, 197, 31, 9288, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 352, 26, 17, 362, 26, 18, 513, 12962, 198, 197, 197, 31, 9288, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 9979, 415, 62, 4033, 82, 26933, 16, 13, 15, 26, 17, 26, 18, 7131, 45299, 25, 12962, 198, 197, 437, 628, 197, 31, 9288, 2617, 366, 9122, 37266, 1, 2221, 198, 197, 220, 220, 220, 220, 1303, 31, 9288, 62, 6404, 82, 350, 6561, 8081, 44292, 13, 9122, 62, 37266, 7, 17, 11, 16, 553, 29127, 4943, 198, 197, 197, 2488, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 37266, 32590, 16, 11, 17, 553, 29127, 4943, 198, 197, 197, 2488, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 37266, 7, 16, 11, 17, 553, 87, 4943, 628, 197, 197, 2488, 9288, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 37266, 7, 16, 11, 17, 553, 29127, 4943, 198, 197, 437, 628, 197, 31, 9288, 2617, 366, 9122, 7890, 1, 2221, 198, 197, 197, 2488, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 7890, 7, 9107, 418, 7, 15, 11, 15, 828, 657, 8, 198, 197, 197, 2488, 9288, 62, 400, 8516, 35528, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 7890, 7, 9107, 418, 7, 16, 11, 16, 828, 838, 8, 198, 197, 197, 2488, 9288, 43689, 3123, 459, 22266, 3565, 8081, 44292, 13, 9122, 62, 7890, 7, 9107, 418, 7, 16, 11, 16, 828, 352, 8, 198, 197, 437, 198, 437, 198 ]
2.632517
449
""" AdjustQuasiGLM(model, ϕ; level) Estimates dispersion parameter, adjusts original GLM to reflect the dispersion and returns results in a pretty DataFrame. Usage: ```julia-repl AdjustQuasiGLM(model, ϕ; level) ``` Arguments: - `model` : The `GLM` model. - `data` : The `DataFrame` containing data that was used as input to the model. - `level` : The desired degree of confidence. """ function AdjustQuasiGLM(model::StatsModels.TableRegressionModel, data::DataFrame; level::Real=0.95) # Calculate Pearson residuals resids = PearsonResiduals(model, data) # Estimate dispersion parameter ϕ and take √ to convert to multiplier ϕ = √EstimateDispersionParameter(resids, model) # Correct standard errors and calculate updated test statistics, p-values, and confidence intervals CorrectedOutputs = coefarray(model, ϕ; level) levstr = isinteger(level * 100) ? string(Integer(level * 100)) : string(level * 100) header = (["Parameter", "Estimate", "Std. Error", "t value", "Pr(>|t|)", "Lower $levstr%", "Upper $levstr%"]) #-------------------------------------------- # Organise results in a neat coeftable format #-------------------------------------------- # Table formatting ctf = TextFormat( up_right_corner = ' ', up_left_corner = ' ', bottom_left_corner = ' ', bottom_right_corner = ' ', up_intersection = '─', left_intersection = ' ', right_intersection = ' ', middle_intersection = '─', bottom_intersection = '─', column = ' ', hlines = [ :begin, :header, :end] ) # Render table println("\nCoefficients:") CorrectedOutputsPretty = PrettyTables.pretty_table(CorrectedOutputs; header = header, tf = ctf) # Return results in a DataFrame for further use CorrectedOutputs = DataFrame(CorrectedOutputs, :auto) CorrectedOutputs = rename!(CorrectedOutputs, [:x1, :x2, :x3, :x4, :x5, :x6, :x7] .=> [Symbol(header[1]), Symbol(header[2]), Symbol(header[3]), Symbol(header[4]), Symbol(header[5]), Symbol(header[6]), Symbol(header[7])]) # Recode column types from `Any` to `String` for parameter names and `Float64` for values columns for i in 2:size(header, 1) CorrectedOutputs[!, i] = convert(Array{Float64, 1}, CorrectedOutputs[!, i]) end CorrectedOutputs[!, 1] = convert(Array{String, 1}, CorrectedOutputs[!, 1]) return CorrectedOutputs end
[ 37811, 198, 220, 220, 220, 20292, 4507, 17053, 8763, 44, 7, 19849, 11, 18074, 243, 26, 1241, 8, 198, 22362, 26748, 4596, 6900, 11507, 11, 46094, 2656, 10188, 44, 284, 4079, 262, 4596, 6900, 290, 5860, 2482, 287, 257, 2495, 6060, 19778, 13, 198, 28350, 25, 198, 15506, 63, 73, 43640, 12, 35666, 198, 39668, 4507, 17053, 8763, 44, 7, 19849, 11, 18074, 243, 26, 1241, 8, 198, 15506, 63, 198, 28100, 2886, 25, 198, 12, 4600, 19849, 63, 1058, 383, 4600, 8763, 44, 63, 2746, 13, 198, 12, 4600, 7890, 63, 1058, 383, 4600, 6601, 19778, 63, 7268, 1366, 326, 373, 973, 355, 5128, 284, 262, 2746, 13, 198, 12, 4600, 5715, 63, 1058, 383, 10348, 4922, 286, 6628, 13, 198, 37811, 198, 198, 8818, 20292, 4507, 17053, 8763, 44, 7, 19849, 3712, 29668, 5841, 1424, 13, 10962, 8081, 2234, 17633, 11, 1366, 3712, 6601, 19778, 26, 1241, 3712, 15633, 28, 15, 13, 3865, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 27131, 378, 31074, 29598, 82, 628, 220, 220, 220, 581, 2340, 796, 31074, 4965, 312, 723, 82, 7, 19849, 11, 1366, 8, 628, 220, 220, 220, 1303, 10062, 1920, 4596, 6900, 11507, 18074, 243, 290, 1011, 18872, 248, 284, 10385, 284, 33090, 628, 220, 220, 220, 18074, 243, 796, 18872, 248, 22362, 1920, 7279, 79, 6900, 36301, 7, 411, 2340, 11, 2746, 8, 628, 220, 220, 220, 1303, 22941, 3210, 8563, 290, 15284, 6153, 1332, 7869, 11, 279, 12, 27160, 11, 290, 6628, 20016, 628, 220, 220, 220, 22941, 276, 26410, 82, 796, 763, 891, 18747, 7, 19849, 11, 18074, 243, 26, 1241, 8, 198, 220, 220, 220, 23145, 2536, 796, 318, 41433, 7, 5715, 1635, 1802, 8, 5633, 4731, 7, 46541, 7, 5715, 1635, 1802, 4008, 1058, 4731, 7, 5715, 1635, 1802, 8, 198, 220, 220, 220, 13639, 796, 357, 14692, 36301, 1600, 366, 22362, 1920, 1600, 366, 1273, 67, 13, 13047, 1600, 366, 83, 1988, 1600, 366, 6836, 7, 29, 91, 83, 91, 42501, 366, 31426, 720, 2768, 2536, 4, 1600, 366, 52, 2848, 720, 2768, 2536, 4, 8973, 8, 628, 220, 220, 220, 1303, 3880, 10541, 198, 220, 220, 220, 1303, 7221, 786, 2482, 287, 257, 15049, 763, 68, 701, 540, 5794, 198, 220, 220, 220, 1303, 3880, 10541, 628, 220, 220, 220, 1303, 8655, 33313, 628, 220, 220, 220, 269, 27110, 796, 8255, 26227, 7, 198, 220, 220, 220, 510, 62, 3506, 62, 10215, 1008, 796, 705, 46083, 198, 220, 220, 220, 510, 62, 9464, 62, 10215, 1008, 796, 705, 46083, 198, 220, 220, 220, 4220, 62, 9464, 62, 10215, 1008, 796, 705, 46083, 198, 220, 220, 220, 4220, 62, 3506, 62, 10215, 1008, 796, 705, 46083, 198, 220, 220, 220, 510, 62, 3849, 5458, 796, 705, 7280, 3256, 198, 220, 220, 220, 1364, 62, 3849, 5458, 796, 705, 46083, 198, 220, 220, 220, 826, 62, 3849, 5458, 796, 705, 46083, 198, 220, 220, 220, 3504, 62, 3849, 5458, 796, 705, 7280, 3256, 198, 220, 220, 220, 4220, 62, 3849, 5458, 796, 705, 7280, 3256, 198, 220, 220, 220, 5721, 796, 705, 46083, 198, 220, 220, 220, 289, 6615, 796, 685, 1058, 27471, 11, 1058, 25677, 11, 1058, 437, 60, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1303, 46722, 3084, 628, 220, 220, 220, 44872, 7203, 59, 77, 34, 2577, 2108, 2334, 25, 4943, 198, 220, 220, 220, 22941, 276, 26410, 82, 35700, 796, 20090, 51, 2977, 13, 37784, 62, 11487, 7, 42779, 276, 26410, 82, 26, 13639, 796, 13639, 11, 48700, 796, 269, 27110, 8, 628, 220, 220, 220, 1303, 8229, 2482, 287, 257, 6060, 19778, 329, 2252, 779, 628, 220, 220, 220, 22941, 276, 26410, 82, 796, 6060, 19778, 7, 42779, 276, 26410, 82, 11, 1058, 23736, 8, 628, 220, 220, 220, 22941, 276, 26410, 82, 796, 36265, 0, 7, 42779, 276, 26410, 82, 11, 685, 25, 87, 16, 11, 1058, 87, 17, 11, 1058, 87, 18, 11, 1058, 87, 19, 11, 1058, 87, 20, 11, 1058, 87, 21, 11, 1058, 87, 22, 60, 764, 14804, 220, 685, 13940, 23650, 7, 25677, 58, 16, 46570, 38357, 7, 25677, 58, 17, 46570, 38357, 7, 25677, 58, 18, 46570, 38357, 7, 25677, 58, 19, 46570, 38357, 7, 25677, 58, 20, 46570, 38357, 7, 25677, 58, 21, 46570, 38357, 7, 25677, 58, 22, 12962, 12962, 628, 220, 220, 220, 1303, 3311, 1098, 5721, 3858, 422, 4600, 7149, 63, 284, 4600, 10100, 63, 329, 11507, 3891, 290, 4600, 43879, 2414, 63, 329, 3815, 15180, 628, 220, 220, 220, 329, 1312, 287, 362, 25, 7857, 7, 25677, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 22941, 276, 26410, 82, 58, 28265, 1312, 60, 796, 10385, 7, 19182, 90, 43879, 2414, 11, 352, 5512, 22941, 276, 26410, 82, 58, 28265, 1312, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 22941, 276, 26410, 82, 58, 28265, 352, 60, 796, 10385, 7, 19182, 90, 10100, 11, 352, 5512, 22941, 276, 26410, 82, 58, 28265, 352, 12962, 198, 220, 220, 220, 1441, 22941, 276, 26410, 82, 198, 437, 198 ]
2.873659
839
struct Snowflake n::UInt64 end Snowflake(s::AbstractString) = Snowflake(parse(UInt64, s)) Base.show(io::IO, s::Snowflake) = print(io, string(s.n; base=10)) Base.:(==)(s::Snowflake, n::Integer) = s.n == n Base.:(==)(n::Integer, s::Snowflake) = n == s.n StructTypes.StructType(::Type{Snowflake}) = StructTypes.StringType() HTTP.escapeuri(s::Snowflake) = escapeuri(s.n) snowflake2datetime(s::Snowflake) = unix2datetime(((s.n >> 22) + 1420070400000) / 1000) worker_id(s::Snowflake) = (s.n & 0x3e0000) >> 17 process_id(s::Snowflake) = (s.n & 0x1f000) >> 12 increment(s::Snowflake) = s.n & 0xfff
[ 7249, 7967, 47597, 198, 220, 220, 220, 299, 3712, 52, 5317, 2414, 198, 437, 198, 198, 28974, 47597, 7, 82, 3712, 23839, 10100, 8, 796, 7967, 47597, 7, 29572, 7, 52, 5317, 2414, 11, 264, 4008, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 264, 3712, 28974, 47597, 8, 796, 3601, 7, 952, 11, 4731, 7, 82, 13, 77, 26, 2779, 28, 940, 4008, 198, 14881, 11207, 7, 855, 5769, 82, 3712, 28974, 47597, 11, 299, 3712, 46541, 8, 796, 264, 13, 77, 6624, 299, 198, 14881, 11207, 7, 855, 5769, 77, 3712, 46541, 11, 264, 3712, 28974, 47597, 8, 796, 299, 6624, 264, 13, 77, 198, 44909, 31431, 13, 44909, 6030, 7, 3712, 6030, 90, 28974, 47597, 30072, 796, 32112, 31431, 13, 10100, 6030, 3419, 198, 40717, 13, 41915, 9900, 7, 82, 3712, 28974, 47597, 8, 796, 6654, 9900, 7, 82, 13, 77, 8, 198, 198, 82, 2197, 47597, 17, 19608, 8079, 7, 82, 3712, 28974, 47597, 8, 796, 555, 844, 17, 19608, 8079, 19510, 7, 82, 13, 77, 9609, 2534, 8, 1343, 1478, 2167, 2154, 7029, 830, 8, 1220, 8576, 8, 198, 28816, 62, 312, 7, 82, 3712, 28974, 47597, 8, 796, 357, 82, 13, 77, 1222, 657, 87, 18, 68, 2388, 8, 9609, 1596, 198, 14681, 62, 312, 7, 82, 3712, 28974, 47597, 8, 796, 357, 82, 13, 77, 1222, 657, 87, 16, 69, 830, 8, 9609, 1105, 198, 24988, 434, 7, 82, 3712, 28974, 47597, 8, 796, 264, 13, 77, 1222, 657, 87, 20972, 198 ]
2.384
250
for quad_degree = 1:20 # Exceeding degree 20 seems unnecessary at this time @eval begin # Square @generated function gauss_quadrature(form::Val{:legendre}, shape::RefSquare, degree::Val{$quad_degree}, type::Type{T}) where {T} # Is there a way to use form and degree here instead? line_weights, line_points = gauss_quadrature(Val(:legendre), RefLine(), Val($quad_degree), T) weights = Expr[] points = Expr[] for i = 1:$quad_degree for j = 1:$quad_degree push!(weights, :($(line_weights[i]) * $(line_weights[j]))) push!(points, :(tuple($(line_points[i][1]), $(line_points[j][1])))) end end return quote return (SVector{$(length(line_weights)^2), $T}(tuple($(weights...))), SVector{$(length(line_weights)^2), NTuple{2,$T}}(tuple($(points...)))) end end # Cube @generated function gauss_quadrature(form::Val{:legendre}, shape::RefCube, degree::Val{$quad_degree}, type::Type{T}) where {T} # Is there a way to use form and degree here instead? line_weights, line_points = gauss_quadrature(Val(:legendre), RefLine(), Val($quad_degree), T) weights = Expr[] points = Expr[] for i = 1:$quad_degree for j = 1:$quad_degree for k = 1:$quad_degree push!(weights, :($(line_weights[i]) * $(line_weights[j]) * $(line_weights[k]) )) push!(points, :(tuple($(line_points[i][1]), $(line_points[j][1]), $(line_points[k][1]), ))) end end end return quote return (SVector{$(length(line_weights)^3), $T}(tuple($(weights...))), SVector{$(length(line_weights)^3), NTuple{3,$T}}(tuple($(points...)))) end end end end
[ 1640, 15094, 62, 16863, 796, 352, 25, 1238, 1303, 1475, 2707, 278, 4922, 1160, 2331, 13114, 379, 428, 640, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9276, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 27568, 2163, 31986, 1046, 62, 421, 41909, 1300, 7, 687, 3712, 7762, 90, 25, 1455, 437, 260, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5485, 3712, 8134, 48011, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4922, 3712, 7762, 90, 3, 47003, 62, 16863, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 3712, 6030, 90, 51, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1148, 612, 257, 835, 284, 779, 1296, 290, 4922, 994, 2427, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 62, 43775, 11, 1627, 62, 13033, 796, 31986, 1046, 62, 421, 41909, 1300, 7, 7762, 7, 25, 1455, 437, 260, 828, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6524, 13949, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3254, 16763, 47003, 62, 16863, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19590, 796, 1475, 1050, 21737, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 796, 1475, 1050, 21737, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 3, 47003, 62, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 3, 47003, 62, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 43775, 11, 1058, 16763, 7, 1370, 62, 43775, 58, 72, 12962, 1635, 29568, 1370, 62, 43775, 58, 73, 60, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 13033, 11, 36147, 83, 29291, 16763, 7, 1370, 62, 13033, 58, 72, 7131, 16, 46570, 29568, 1370, 62, 13033, 58, 73, 7131, 16, 60, 35514, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 50, 38469, 90, 3, 7, 13664, 7, 1370, 62, 43775, 8, 61, 17, 828, 720, 51, 92, 7, 83, 29291, 16763, 7, 43775, 986, 4008, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20546, 9250, 90, 3, 7, 13664, 7, 1370, 62, 43775, 8, 61, 17, 828, 24563, 29291, 90, 17, 11, 3, 51, 11709, 7, 83, 29291, 16763, 7, 13033, 986, 35514, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 23315, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 27568, 2163, 31986, 1046, 62, 421, 41909, 1300, 7, 687, 3712, 7762, 90, 25, 1455, 437, 260, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5485, 3712, 8134, 29071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4922, 3712, 7762, 90, 3, 47003, 62, 16863, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 3712, 6030, 90, 51, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1148, 612, 257, 835, 284, 779, 1296, 290, 4922, 994, 2427, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 62, 43775, 11, 1627, 62, 13033, 796, 31986, 1046, 62, 421, 41909, 1300, 7, 7762, 7, 25, 1455, 437, 260, 828, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6524, 13949, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3254, 16763, 47003, 62, 16863, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19590, 796, 1475, 1050, 21737, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 796, 1475, 1050, 21737, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 3, 47003, 62, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 3, 47003, 62, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 352, 25, 3, 47003, 62, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 43775, 11, 1058, 16763, 7, 1370, 62, 43775, 58, 72, 12962, 1635, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1370, 62, 43775, 58, 73, 12962, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1370, 62, 43775, 58, 74, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 13033, 11, 36147, 83, 29291, 16763, 7, 1370, 62, 13033, 58, 72, 7131, 16, 46570, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1370, 62, 13033, 58, 73, 7131, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1370, 62, 13033, 58, 74, 7131, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47282, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 50, 38469, 90, 3, 7, 13664, 7, 1370, 62, 43775, 8, 61, 18, 828, 720, 51, 92, 7, 83, 29291, 16763, 7, 43775, 986, 4008, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20546, 9250, 90, 3, 7, 13664, 7, 1370, 62, 43775, 8, 61, 18, 828, 24563, 29291, 90, 18, 11, 3, 51, 11709, 7, 83, 29291, 16763, 7, 13033, 986, 35514, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.522114
1,854
function _prepare(nodes::Matrix{T}, kernel::RK ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} n = size(nodes, 1) n_1 = size(nodes, 2) min_bound = Vector{T}(undef, n) compression::T = 0 @inbounds for i = 1:n min_bound[i] = nodes[i,1] maxx::T = nodes[i,1] for j = 2:n_1 min_bound[i] = min(min_bound[i], nodes[i,j]) maxx = max(maxx, nodes[i,j]) end compression = max(compression, maxx - min_bound[i]) end if compression <= eps(T(1.0)) error("Cannot prepare the spline: `nodes` data are not correct.") end t_nodes = similar(nodes) @inbounds for j = 1:n_1 for i = 1:n t_nodes[i,j] = (nodes[i,j] - min_bound[i]) / compression end end if T(kernel.ε) == T(0.0) ε = _estimate_ε(t_nodes) if isa(kernel, RK_H0) kernel = RK_H0(ε) elseif isa(kernel, RK_H1) ε *= T(1.5) kernel = RK_H1(ε) elseif isa(kernel, RK_H2) ε *= T(2.0) kernel = RK_H2(ε) else error("incorrect `kernel` type.") end end gram = _gram(t_nodes, kernel) chol = nothing try chol = cholesky(gram) catch error("Cannot prepare the spline: Gram matrix is degenerate.") end cond = _estimate_cond(gram, chol) spline = NormalSpline(kernel, compression, t_nodes, nothing, nothing, nothing, nothing, min_bound, gram, chol, nothing, cond ) return spline end function _construct(spline::NormalSpline{T, RK}, values::Vector{T}, cleanup::Bool = false ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} if(length(values) != size(spline._nodes, 2)) error("Number of data values does not correspond to the number of nodes.") end if isnothing(spline._chol) error("Gram matrix was not factorized.") end mu = Vector{T}(undef, size(spline._gram, 1)) ldiv!(mu, spline._chol, values) spline = NormalSpline(spline._kernel, spline._compression, spline._nodes, values, nothing, nothing, nothing, spline._min_bound, cleanup ? nothing : spline._gram, cleanup ? nothing : spline._chol, mu, spline._cond ) return spline end ################### function _prepare(nodes::Matrix{T}, d_nodes::Matrix{T}, es::Matrix{T}, kernel::RK ) where {T <: AbstractFloat, RK <: ReproducingKernel_1} n = size(nodes, 1) n_1 = size(nodes, 2) n_2 = size(d_nodes, 2) if(size(es, 2) != n_2) error("Number of derivative directions does not correspond to the number of derivative nodes.") end t_es = similar(es) try @inbounds for i = 1:n_2 t_es[:,i] = es[:,i] ./ norm(es[:,i]) end catch error("Cannot normalize derivative direction: zero direction vector.") end min_bound = Vector{T}(undef, n) compression::T = 0 @inbounds for i = 1:n min_bound[i] = nodes[i,1] maxx::T = nodes[i,1] for j = 2:n_1 min_bound[i] = min(min_bound[i], nodes[i,j]) maxx = max(maxx, nodes[i,j]) end for j = 1:n_2 min_bound[i] = min(min_bound[i], d_nodes[i,j]) maxx = max(maxx, d_nodes[i,j]) end compression = max(compression, maxx - min_bound[i]) end if compression <= eps(T(1.0)) error("Cannot prepare the spline: `nodes` data are not correct.") end t_nodes = similar(nodes) t_d_nodes = similar(d_nodes) @inbounds for j = 1:n_1 for i = 1:n t_nodes[i,j] = (nodes[i,j] - min_bound[i]) / compression end end @inbounds for j = 1:n_2 for i = 1:n t_d_nodes[i,j] = (d_nodes[i,j] - min_bound[i]) / compression end end if T(kernel.ε) == T(0.0) ε = _estimate_ε(t_nodes, t_d_nodes) if isa(kernel, RK_H1) ε *= T(2.0) kernel = RK_H1(ε) elseif isa(kernel, RK_H2) ε *= T(2.5) kernel = RK_H2(ε) else error("incorrect `kernel` type.") end end gram = _gram(t_nodes, t_d_nodes, t_es, kernel) chol = nothing try chol = cholesky(gram) catch error("Cannot prepare the spline: Gram matrix is degenerate.") end cond = _estimate_cond(gram, chol) spline = NormalSpline(kernel, compression, t_nodes, nothing, t_d_nodes, t_es, nothing, min_bound, gram, chol, nothing, cond ) return spline end function _construct(spline::NormalSpline{T, RK}, values::Vector{T}, d_values::Vector{T}, cleanup::Bool = false ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} if(length(values) != size(spline._nodes, 2)) error("Number of data values does not correspond to the number of nodes.") end if(length(d_values) != size(spline._d_nodes, 2)) error("Number of derivative values does not correspond to the number of derivative nodes.") end if isnothing(spline._chol) error("Gram matrix was not factorized.") end mu = Vector{T}(undef, size(spline._gram, 1)) ldiv!(mu, spline._chol, [values; spline._compression .* d_values]) spline = NormalSpline(spline._kernel, spline._compression, spline._nodes, values, spline._d_nodes, spline._es, d_values, spline._min_bound, cleanup ? nothing : spline._gram, cleanup ? nothing : spline._chol, mu, spline._cond ) return spline end function _evaluate(spline::NormalSpline{T, RK}, points::Matrix{T}, do_parallel::Bool = false ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} if isnothing(spline) error("Spline was not prepared.") end if isnothing(spline._mu) error("Spline coefficients were not calculated.") end if size(points, 1) != size(spline._nodes, 1) if size(points, 1) == 1 && size(points, 2) > 1 error("Incorrect first dimension of the `points` parameter (use 'evaluate_one' function for evaluating the spline at one point).") else error("Incorrect first dimension of the `points` parameter (the spline was built in the space of different dimension).") end end n = size(spline._nodes, 1) n_1 = size(spline._nodes, 2) m = size(points, 2) pts = similar(points) @inbounds for j = 1:m for i = 1:n pts[i,j] = (points[i,j] - spline._min_bound[i]) / spline._compression end end spline_values = Vector{T}(undef, m) iend1 = iend2 = iend3 = 0 istart2 = istart3 = istart4 = 0 mu = spline._mu[1:n_1] d_mu = spline._mu[(n_1 + 1):end] if do_parallel && m >= 1000 && Threads.nthreads() >= 4 step = m ÷ 4 iend1 = 1 + step istart2 = iend1 + 1 iend2 = istart2 + step istart3 = iend2 + 1 iend3 = (istart3 + step) < m ? (istart3 + step) : m istart4 = iend3 + 1 @inbounds Threads.@threads for t = 1:4 if t == 1 _do_work(1, iend1, pts, spline._nodes, mu, spline._kernel, spline_values) if !isnothing(spline._d_nodes) _do_work_d(1, iend1, pts, spline._d_nodes, spline._es, d_mu, spline._kernel, spline_values) end elseif t == 2 _do_work(istart2, iend2, pts, spline._nodes, mu, spline._kernel, spline_values) if !isnothing(spline._d_nodes) _do_work_d(istart2, iend2, pts, spline._d_nodes, spline._es, d_mu, spline._kernel, spline_values) end elseif t == 3 _do_work(istart3, iend3, pts, spline._nodes, mu, spline._kernel, spline_values) if !isnothing(spline._d_nodes) _do_work_d(istart3, iend3, pts, spline._d_nodes, spline._es, d_mu, spline._kernel, spline_values) end elseif t == 4 if istart4 <= m _do_work(istart4, m, pts, spline._nodes, mu, spline._kernel, spline_values) if !isnothing(spline._d_nodes) if istart4 <= m _do_work_d(istart4, m, pts, spline._d_nodes, spline._es, d_mu, spline._kernel, spline_values) end end end end end else _do_work(1, m, pts, spline._nodes, mu, spline._kernel, spline_values) if !isnothing(spline._d_nodes) _do_work_d(1, m, pts, spline._d_nodes, spline._es, d_mu, spline._kernel, spline_values) end end return spline_values end function _do_work(istart::Int, iend::Int, points::Matrix{T}, nodes::Matrix{T}, mu::Vector{T}, kernel::RK, spline_values::Vector{T} ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} n_1 = size(nodes, 2) h_values = Vector{T}(undef, n_1) @inbounds for p = istart:iend for i = 1:n_1 h_values[i] = _rk(kernel, points[:,p], nodes[:,i]) end spline_values[p] = sum(mu .* h_values) end end function _do_work_d(istart::Int, iend::Int, pts::Matrix{T}, d_nodes::Matrix{T}, es::Matrix{T}, d_mu::Vector{T}, kernel::RK, spline_values::Vector{T} ) where {T <: AbstractFloat, RK <: ReproducingKernel_1} n_2 = size(d_nodes, 2) d_h_values = Vector{T}(undef, n_2) @inbounds for p = istart:iend for i = 1:n_2 d_h_values[i] = _∂rk_∂e(kernel, pts[:,p], d_nodes[:,i], es[:,i]) end spline_values[p] += sum(d_mu .* d_h_values) end end function _evaluate_gradient(spline::NormalSpline{T, RK}, point::Vector{T} ) where {T <: AbstractFloat, RK <: ReproducingKernel_0} if isnothing(spline._mu) error("Spline coefficients were not calculated.") end n = size(spline._nodes, 1) n_1 = size(spline._nodes, 2) pt = Vector{T}(point) @inbounds for i = 1:n pt[i] = (point[i] - spline._min_bound[i]) / spline._compression end d_h_values = Vector{T}(undef, n_1) grad = Vector{T}(undef, n) mu = spline._mu[1:n_1] @inbounds for k = 1:n for i = 1:n_1 d_h_values[i] = _∂rk_∂η_k(spline._kernel, pt, spline._nodes[:,i], k) end grad[k] = sum(mu .* d_h_values) end if !isnothing(spline._d_nodes) n_2 = size(spline._d_nodes, 2) d_h_values = Vector{T}(undef, n_2) d_mu = spline._mu[n_1+1:end] @inbounds for k = 1:n for i = 1:n_2 d_h_values[i] = T(0.0) for l = 1:n d_h_values[i] += (_∂²rk_∂η_r_∂ξ_k(spline._kernel, pt, spline._d_nodes[:,i], k, l) * spline._es[l,i]) end end grad[k] += sum(d_mu .* d_h_values) end end @inbounds for k = 1:n grad[k] /= spline._compression end return grad end
[ 8818, 4808, 46012, 533, 7, 77, 4147, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 3712, 49, 42, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 299, 796, 2546, 7, 77, 4147, 11, 352, 8, 201, 198, 220, 220, 220, 299, 62, 16, 796, 2546, 7, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 220, 949, 62, 7784, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 8, 201, 198, 220, 220, 220, 19794, 3712, 51, 796, 657, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 58, 72, 60, 796, 13760, 58, 72, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 87, 3712, 51, 796, 13760, 58, 72, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 362, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 58, 72, 60, 796, 949, 7, 1084, 62, 7784, 58, 72, 4357, 13760, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 87, 796, 3509, 7, 9806, 87, 11, 13760, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 19794, 796, 3509, 7, 5589, 2234, 11, 3509, 87, 532, 949, 62, 7784, 58, 72, 12962, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 611, 19794, 19841, 304, 862, 7, 51, 7, 16, 13, 15, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 8335, 262, 4328, 500, 25, 4600, 77, 4147, 63, 1366, 389, 407, 3376, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 256, 62, 77, 4147, 796, 2092, 7, 77, 4147, 8, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 796, 352, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 77, 4147, 58, 72, 11, 73, 60, 796, 357, 77, 4147, 58, 72, 11, 73, 60, 532, 949, 62, 7784, 58, 72, 12962, 1220, 19794, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 611, 309, 7, 33885, 13, 30950, 8, 6624, 309, 7, 15, 13, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 796, 4808, 395, 1920, 62, 30950, 7, 83, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 64, 7, 33885, 11, 371, 42, 62, 39, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 796, 371, 42, 62, 39, 15, 7, 30950, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 33885, 11, 371, 42, 62, 39, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 1635, 28, 309, 7, 16, 13, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 796, 371, 42, 62, 39, 16, 7, 30950, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 33885, 11, 371, 42, 62, 39, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 1635, 28, 309, 7, 17, 13, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 796, 371, 42, 62, 39, 17, 7, 30950, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 1939, 47315, 4600, 33885, 63, 2099, 19570, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 14599, 796, 4808, 4546, 7, 83, 62, 77, 4147, 11, 9720, 8, 201, 198, 220, 220, 220, 442, 349, 796, 2147, 201, 198, 220, 220, 220, 1949, 201, 198, 220, 220, 220, 220, 220, 220, 220, 442, 349, 796, 442, 4316, 2584, 7, 4546, 8, 201, 198, 220, 220, 220, 4929, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 8335, 262, 4328, 500, 25, 20159, 17593, 318, 25419, 378, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 1779, 796, 4808, 395, 1920, 62, 17561, 7, 4546, 11, 442, 349, 8, 201, 198, 201, 198, 220, 220, 220, 4328, 500, 796, 14435, 26568, 500, 7, 33885, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19794, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14599, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 442, 349, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1779, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 201, 198, 220, 220, 220, 1441, 4328, 500, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 41571, 7, 22018, 500, 3712, 26447, 26568, 500, 90, 51, 11, 371, 42, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 3712, 38469, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 3712, 33, 970, 796, 3991, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 611, 7, 13664, 7, 27160, 8, 14512, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 362, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 15057, 286, 1366, 3815, 857, 407, 6053, 284, 262, 1271, 286, 13760, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 611, 318, 22366, 7, 22018, 500, 13557, 354, 349, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 38, 859, 17593, 373, 407, 5766, 1143, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 38779, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 2546, 7, 22018, 500, 13557, 4546, 11, 352, 4008, 201, 198, 220, 220, 220, 300, 7146, 0, 7, 30300, 11, 4328, 500, 13557, 354, 349, 11, 3815, 8, 201, 198, 201, 198, 220, 220, 220, 4328, 500, 796, 14435, 26568, 500, 7, 22018, 500, 13557, 33885, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 5589, 2234, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 1084, 62, 7784, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 5633, 2147, 1058, 4328, 500, 13557, 4546, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 5633, 2147, 1058, 4328, 500, 13557, 354, 349, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 17561, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 201, 198, 220, 220, 220, 1441, 4328, 500, 201, 198, 437, 201, 198, 201, 198, 14468, 21017, 201, 198, 201, 198, 8818, 4808, 46012, 533, 7, 77, 4147, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 77, 4147, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1658, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 3712, 49, 42, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 16, 92, 201, 198, 220, 220, 220, 299, 796, 2546, 7, 77, 4147, 11, 352, 8, 201, 198, 220, 220, 220, 299, 62, 16, 796, 2546, 7, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 220, 299, 62, 17, 796, 2546, 7, 67, 62, 77, 4147, 11, 362, 8, 201, 198, 201, 198, 220, 220, 220, 611, 7, 7857, 7, 274, 11, 362, 8, 14512, 299, 62, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 15057, 286, 27255, 11678, 857, 407, 6053, 284, 262, 1271, 286, 27255, 13760, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 256, 62, 274, 796, 2092, 7, 274, 8, 201, 198, 220, 220, 220, 1949, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 796, 352, 25, 77, 62, 17, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 274, 58, 45299, 72, 60, 796, 1658, 58, 45299, 72, 60, 24457, 2593, 7, 274, 58, 45299, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 4929, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 3487, 1096, 27255, 4571, 25, 6632, 4571, 15879, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 949, 62, 7784, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 8, 201, 198, 220, 220, 220, 19794, 3712, 51, 796, 657, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 58, 72, 60, 796, 13760, 58, 72, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 87, 3712, 51, 796, 13760, 58, 72, 11, 16, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 362, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 58, 72, 60, 796, 949, 7, 1084, 62, 7784, 58, 72, 4357, 13760, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 87, 796, 3509, 7, 9806, 87, 11, 13760, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 77, 62, 17, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 58, 72, 60, 796, 949, 7, 1084, 62, 7784, 58, 72, 4357, 288, 62, 77, 4147, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 87, 796, 3509, 7, 9806, 87, 11, 288, 62, 77, 4147, 58, 72, 11, 73, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 19794, 796, 3509, 7, 5589, 2234, 11, 3509, 87, 532, 949, 62, 7784, 58, 72, 12962, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 611, 19794, 19841, 304, 862, 7, 51, 7, 16, 13, 15, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 8335, 262, 4328, 500, 25, 4600, 77, 4147, 63, 1366, 389, 407, 3376, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 256, 62, 77, 4147, 796, 2092, 7, 77, 4147, 8, 201, 198, 220, 220, 220, 256, 62, 67, 62, 77, 4147, 796, 2092, 7, 67, 62, 77, 4147, 8, 201, 198, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 796, 352, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 77, 4147, 58, 72, 11, 73, 60, 796, 357, 77, 4147, 58, 72, 11, 73, 60, 532, 949, 62, 7784, 58, 72, 12962, 1220, 19794, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 796, 352, 25, 77, 62, 17, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 67, 62, 77, 4147, 58, 72, 11, 73, 60, 796, 357, 67, 62, 77, 4147, 58, 72, 11, 73, 60, 532, 949, 62, 7784, 58, 72, 12962, 1220, 19794, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 611, 309, 7, 33885, 13, 30950, 8, 6624, 309, 7, 15, 13, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 796, 4808, 395, 1920, 62, 30950, 7, 83, 62, 77, 4147, 11, 256, 62, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 64, 7, 33885, 11, 371, 42, 62, 39, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 1635, 28, 309, 7, 17, 13, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 796, 371, 42, 62, 39, 16, 7, 30950, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 33885, 11, 371, 42, 62, 39, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 1635, 28, 309, 7, 17, 13, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 796, 371, 42, 62, 39, 17, 7, 30950, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 1939, 47315, 4600, 33885, 63, 2099, 19570, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 14599, 796, 4808, 4546, 7, 83, 62, 77, 4147, 11, 256, 62, 67, 62, 77, 4147, 11, 256, 62, 274, 11, 9720, 8, 201, 198, 220, 220, 220, 442, 349, 796, 2147, 201, 198, 220, 220, 220, 1949, 201, 198, 220, 220, 220, 220, 220, 220, 220, 442, 349, 796, 442, 4316, 2584, 7, 4546, 8, 201, 198, 220, 220, 220, 4929, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 8335, 262, 4328, 500, 25, 20159, 17593, 318, 25419, 378, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 1779, 796, 4808, 395, 1920, 62, 17561, 7, 4546, 11, 442, 349, 8, 201, 198, 201, 198, 220, 220, 220, 4328, 500, 796, 14435, 26568, 500, 7, 33885, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19794, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 67, 62, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 274, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 7784, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14599, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 442, 349, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1779, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 201, 198, 220, 220, 220, 1441, 4328, 500, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 41571, 7, 22018, 500, 3712, 26447, 26568, 500, 90, 51, 11, 371, 42, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 3712, 38469, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 27160, 3712, 38469, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 3712, 33, 970, 796, 3991, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 611, 7, 13664, 7, 27160, 8, 14512, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 362, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 15057, 286, 1366, 3815, 857, 407, 6053, 284, 262, 1271, 286, 13760, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 611, 7, 13664, 7, 67, 62, 27160, 8, 14512, 2546, 7, 22018, 500, 13557, 67, 62, 77, 4147, 11, 362, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 15057, 286, 27255, 3815, 857, 407, 6053, 284, 262, 1271, 286, 27255, 13760, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 611, 318, 22366, 7, 22018, 500, 13557, 354, 349, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 38, 859, 17593, 373, 407, 5766, 1143, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 38779, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 2546, 7, 22018, 500, 13557, 4546, 11, 352, 4008, 201, 198, 220, 220, 220, 300, 7146, 0, 7, 30300, 11, 4328, 500, 13557, 354, 349, 11, 685, 27160, 26, 4328, 500, 13557, 5589, 2234, 764, 9, 288, 62, 27160, 12962, 201, 198, 201, 198, 220, 220, 220, 4328, 500, 796, 14435, 26568, 500, 7, 22018, 500, 13557, 33885, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 5589, 2234, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 67, 62, 77, 4147, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 274, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 27160, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 1084, 62, 7784, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 5633, 2147, 1058, 4328, 500, 13557, 4546, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27425, 5633, 2147, 1058, 4328, 500, 13557, 354, 349, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 13557, 17561, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 201, 198, 220, 220, 220, 1441, 4328, 500, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 49786, 7, 22018, 500, 3712, 26447, 26568, 500, 90, 51, 11, 371, 42, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 466, 62, 1845, 29363, 3712, 33, 970, 796, 3991, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 611, 318, 22366, 7, 22018, 500, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 26568, 500, 373, 407, 5597, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 611, 318, 22366, 7, 22018, 500, 13557, 30300, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 26568, 500, 44036, 547, 407, 10488, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 611, 2546, 7, 13033, 11, 352, 8, 14512, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 352, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2546, 7, 13033, 11, 352, 8, 6624, 352, 11405, 2546, 7, 13033, 11, 362, 8, 1875, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 818, 30283, 717, 15793, 286, 262, 4600, 13033, 63, 11507, 357, 1904, 705, 49786, 62, 505, 6, 2163, 329, 22232, 262, 4328, 500, 379, 530, 966, 8, 19570, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 818, 30283, 717, 15793, 286, 262, 4600, 13033, 63, 11507, 357, 1169, 4328, 500, 373, 3170, 287, 262, 2272, 286, 1180, 15793, 8, 19570, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 299, 796, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 352, 8, 201, 198, 220, 220, 220, 299, 62, 16, 796, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 220, 285, 796, 2546, 7, 13033, 11, 362, 8, 201, 198, 201, 198, 220, 220, 220, 43344, 796, 2092, 7, 13033, 8, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 796, 352, 25, 76, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43344, 58, 72, 11, 73, 60, 796, 357, 13033, 58, 72, 11, 73, 60, 532, 4328, 500, 13557, 1084, 62, 7784, 58, 72, 12962, 1220, 4328, 500, 13557, 5589, 2234, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 4328, 500, 62, 27160, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 285, 8, 201, 198, 220, 220, 220, 1312, 437, 16, 796, 1312, 437, 17, 796, 1312, 437, 18, 796, 657, 201, 198, 220, 220, 220, 318, 83, 433, 17, 796, 318, 83, 433, 18, 796, 318, 83, 433, 19, 796, 657, 201, 198, 220, 220, 220, 38779, 796, 4328, 500, 13557, 30300, 58, 16, 25, 77, 62, 16, 60, 201, 198, 220, 220, 220, 288, 62, 30300, 796, 4328, 500, 13557, 30300, 58, 7, 77, 62, 16, 1343, 352, 2599, 437, 60, 201, 198, 220, 220, 220, 611, 466, 62, 1845, 29363, 11405, 285, 18189, 8576, 11405, 14122, 82, 13, 77, 16663, 82, 3419, 18189, 604, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2239, 796, 285, 6184, 115, 604, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 16, 796, 352, 1343, 2239, 201, 198, 220, 220, 220, 220, 220, 220, 220, 318, 83, 433, 17, 796, 1312, 437, 16, 1343, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 17, 796, 318, 83, 433, 17, 1343, 2239, 201, 198, 220, 220, 220, 220, 220, 220, 220, 318, 83, 433, 18, 796, 1312, 437, 17, 1343, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 18, 796, 357, 396, 433, 18, 1343, 2239, 8, 1279, 285, 5633, 357, 396, 433, 18, 1343, 2239, 8, 1058, 285, 201, 198, 220, 220, 220, 220, 220, 220, 220, 318, 83, 433, 19, 796, 1312, 437, 18, 1343, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 14122, 82, 13, 31, 16663, 82, 329, 256, 796, 352, 25, 19, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 256, 6624, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 7, 16, 11, 1312, 437, 16, 11, 43344, 11, 4328, 500, 13557, 77, 4147, 11, 38779, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 62, 67, 7, 16, 11, 1312, 437, 16, 11, 43344, 11, 4328, 500, 13557, 67, 62, 77, 4147, 11, 4328, 500, 13557, 274, 11, 288, 62, 30300, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 256, 6624, 362, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 7, 396, 433, 17, 11, 1312, 437, 17, 11, 43344, 11, 4328, 500, 13557, 77, 4147, 11, 38779, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 62, 67, 7, 396, 433, 17, 11, 1312, 437, 17, 11, 43344, 11, 4328, 500, 13557, 67, 62, 77, 4147, 11, 4328, 500, 13557, 274, 11, 288, 62, 30300, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 256, 6624, 513, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 7, 396, 433, 18, 11, 1312, 437, 18, 11, 43344, 11, 4328, 500, 13557, 77, 4147, 11, 38779, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 62, 67, 7, 396, 433, 18, 11, 1312, 437, 18, 11, 43344, 11, 4328, 500, 13557, 67, 62, 77, 4147, 11, 4328, 500, 13557, 274, 11, 288, 62, 30300, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 256, 6624, 604, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 83, 433, 19, 19841, 285, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 7, 396, 433, 19, 11, 285, 11, 43344, 11, 4328, 500, 13557, 77, 4147, 11, 38779, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 83, 433, 19, 19841, 285, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 62, 67, 7, 396, 433, 19, 11, 285, 11, 43344, 11, 4328, 500, 13557, 67, 62, 77, 4147, 11, 4328, 500, 13557, 274, 11, 288, 62, 30300, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 2073, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 7, 16, 11, 285, 11, 43344, 11, 4328, 500, 13557, 77, 4147, 11, 38779, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4598, 62, 1818, 62, 67, 7, 16, 11, 285, 11, 43344, 11, 4328, 500, 13557, 67, 62, 77, 4147, 11, 4328, 500, 13557, 274, 11, 288, 62, 30300, 11, 4328, 500, 13557, 33885, 11, 4328, 500, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 1441, 4328, 500, 62, 27160, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 4598, 62, 1818, 7, 396, 433, 3712, 5317, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 3712, 5317, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13760, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 3712, 38469, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 3712, 49, 42, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 62, 27160, 3712, 38469, 90, 51, 92, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 299, 62, 16, 796, 2546, 7, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 220, 289, 62, 27160, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 62, 16, 8, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 279, 796, 318, 83, 433, 25, 72, 437, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 289, 62, 27160, 58, 72, 60, 796, 4808, 81, 74, 7, 33885, 11, 2173, 58, 45299, 79, 4357, 13760, 58, 45299, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 62, 27160, 58, 79, 60, 796, 2160, 7, 30300, 764, 9, 289, 62, 27160, 8, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 4598, 62, 1818, 62, 67, 7, 396, 433, 3712, 5317, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 3712, 5317, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43344, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 77, 4147, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1658, 3712, 46912, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 30300, 3712, 38469, 90, 51, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 3712, 49, 42, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4328, 500, 62, 27160, 3712, 38469, 90, 51, 92, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 16, 92, 201, 198, 220, 220, 299, 62, 17, 796, 2546, 7, 67, 62, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 288, 62, 71, 62, 27160, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 62, 17, 8, 201, 198, 220, 220, 2488, 259, 65, 3733, 329, 279, 796, 318, 83, 433, 25, 72, 437, 201, 198, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 62, 17, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 71, 62, 27160, 58, 72, 60, 796, 4808, 24861, 224, 81, 74, 62, 24861, 224, 68, 7, 33885, 11, 43344, 58, 45299, 79, 4357, 288, 62, 77, 4147, 58, 45299, 72, 4357, 1658, 58, 45299, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 4328, 500, 62, 27160, 58, 79, 60, 15853, 2160, 7, 67, 62, 30300, 764, 9, 288, 62, 71, 62, 27160, 8, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 201, 198, 8818, 4808, 49786, 62, 49607, 7, 22018, 500, 3712, 26447, 26568, 500, 90, 51, 11, 371, 42, 5512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 966, 3712, 38469, 90, 51, 92, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 371, 42, 1279, 25, 36551, 2259, 42, 7948, 62, 15, 92, 201, 198, 220, 220, 220, 611, 318, 22366, 7, 22018, 500, 13557, 30300, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 26568, 500, 44036, 547, 407, 10488, 19570, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 299, 796, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 352, 8, 201, 198, 220, 220, 220, 299, 62, 16, 796, 2546, 7, 22018, 500, 13557, 77, 4147, 11, 362, 8, 201, 198, 201, 198, 220, 220, 220, 42975, 796, 20650, 90, 51, 92, 7, 4122, 8, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 42975, 58, 72, 60, 796, 357, 4122, 58, 72, 60, 532, 4328, 500, 13557, 1084, 62, 7784, 58, 72, 12962, 1220, 4328, 500, 13557, 5589, 2234, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 288, 62, 71, 62, 27160, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 62, 16, 8, 201, 198, 220, 220, 220, 3915, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 8, 201, 198, 220, 220, 220, 38779, 796, 4328, 500, 13557, 30300, 58, 16, 25, 77, 62, 16, 60, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 479, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 62, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 71, 62, 27160, 58, 72, 60, 796, 4808, 24861, 224, 81, 74, 62, 24861, 224, 138, 115, 62, 74, 7, 22018, 500, 13557, 33885, 11, 42975, 11, 4328, 500, 13557, 77, 4147, 58, 45299, 72, 4357, 479, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3915, 58, 74, 60, 796, 2160, 7, 30300, 764, 9, 288, 62, 71, 62, 27160, 8, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 611, 5145, 271, 22366, 7, 22018, 500, 13557, 67, 62, 77, 4147, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 17, 796, 2546, 7, 22018, 500, 13557, 67, 62, 77, 4147, 11, 362, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 62, 71, 62, 27160, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 299, 62, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 62, 30300, 796, 4328, 500, 13557, 30300, 58, 77, 62, 16, 10, 16, 25, 437, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 479, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 62, 17, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 71, 62, 27160, 58, 72, 60, 796, 309, 7, 15, 13, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 300, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 62, 71, 62, 27160, 58, 72, 60, 15853, 44104, 24861, 224, 31185, 81, 74, 62, 24861, 224, 138, 115, 62, 81, 62, 24861, 224, 138, 122, 62, 74, 7, 22018, 500, 13557, 33885, 11, 42975, 11, 4328, 500, 13557, 67, 62, 77, 4147, 58, 45299, 72, 4357, 479, 11, 300, 8, 1635, 4328, 500, 13557, 274, 58, 75, 11, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3915, 58, 74, 60, 15853, 2160, 7, 67, 62, 30300, 764, 9, 288, 62, 71, 62, 27160, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 479, 796, 352, 25, 77, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3915, 58, 74, 60, 1220, 28, 4328, 500, 13557, 5589, 2234, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1441, 3915, 201, 198, 437, 201, 198 ]
1.689035
7,734
Mcdf(f,fmin,fmax) = (1.0./f - 1.0/fmax) ./ (1.0/fmin - 1.0/fmax) function selection(λ, f, tend, t1) #define the equation for selection as above s = (λ .* t1 + log.(f ./ (1 .- f))) ./ (λ .* (tend - t1)) return s end function selection2clone(λ, f1, f2, tend, t1, t2) #define the equation for selection as above s1 = zeros(Float64, length(f1)) s2 = zeros(Float64, length(f1)) for i in 1:length(f1) if (f2[i] + f1[i]) < 1.0 s1[i] = (λ .* t1[i] + log.(f1[i] ./ (1 - f1[i] - f2[i]))) ./ (λ .* (tend[i] - t1[i])) s2[i] = (λ .* t2[i] + log.(f2[i] ./ (1 - f1[i] - f2[i]))) ./ (λ .* (tend[i] - t2[i])) else s1[i] = (λ .* t1[i] + log.((f1[i] - f2[i]) ./ (1 - f1[i]))) ./ (λ .* (tend[i] - t1[i])) s2[i] = (λ .* t2[i] + log.(f2[i] ./ (1 - f1[i]))) ./ (λ .* (tend[i] - t2[i])) end end return s1, s2 end function collectoutput1clone(abcres; Nmax = 10^10) scmuts = map(x -> x.other[2], abcres.particles) scdivs = map(x -> x.other[3], abcres.particles) scfreq = map(x -> x.other[4], abcres.particles) mu = abcres.parameters[:, 1] weights = abcres.weights # eulergamma/log(2) is stochastic correction see Durrett Branching Process Models of Cancer, needed for selection calculation t1 = ((shuffle(scmuts) ./ mu) / (2 * log.(2))) .- MathConstants.eulergamma/log.(2) #shuffle so that t1 posterior is not correlated tend = (log.(Nmax .* (1 .- scfreq)) / log.(2)) s = selection(log.(2), scfreq, tend, t1) DF = DataFrame(mu = mu, clonalmutations = abcres.parameters[:, 2], s = s, t = t1, cellularity = abcres.parameters[:, 5], frequency = scfreq, scmuts = map(x -> Float64(x), scmuts), weight = weights) return DF end function swapvalues(x1, x2, indeces) swap1 = x1[indeces] swap2 = x2[indeces] x1[indeces] = swap2 x2[indeces] = swap1 return x1, x2 end function clonesize(scfreq1, scfreq2) #assume that if scfreq1 + scfreq2 > 1 then clones are nested freqfactor = zeros(Float64, length(scfreq1)) for i in 1:length(scfreq1) if (scfreq1[i] + scfreq2[i]) .> 1.0 freqfactor[i] = 1 - scfreq1[i] freqfactor[i] = maximum([0.001, freqfactor[i]]) else freqfactor[i] = 1 - scfreq1[i] - scfreq2[i] freqfactor[i] = maximum([0.001, freqfactor[i]]) end end return freqfactor end function collectoutput2clone(abcres; Nmax = 10^10) scmuts1 = map(x -> x.other[2], abcres.particles) scmuts2 = map(x -> x.other[3], abcres.particles) scdivs1 = map(x -> x.other[4], abcres.particles) scdivs2 = map(x -> x.other[5], abcres.particles) scfreq1 = map(x -> x.other[6], abcres.particles) scfreq2 = map(x -> x.other[7], abcres.particles) mu = abcres.parameters[:, 1] s1 = abcres.parameters[:, 3] t1 = abcres.parameters[:, 4] s2 = abcres.parameters[:, 5] t2 = abcres.parameters[:, 6] weights = abcres.weights scmuts1 = map(x -> Float64(x), scmuts1) scmuts2 = map(x -> Float64(x), scmuts2) indeces = .!(scfreq1 .> scfreq2) #identify subclone 1 as the highest frequency subclone scfreq1, scfreq2 = swapvalues(scfreq1, scfreq2, indeces) scmuts1, scmuts2 = swapvalues(scmuts1, scmuts2, indeces) scdivs1, scdivs2 = swapvalues(scdivs1, scdivs2, indeces) s1, s2 = swapvalues(s1, s2, indeces) t1, t2 = swapvalues(t1, t2, indeces) freqfactor = clonesize(scfreq1, scfreq2) t1a = ((shuffle(scmuts1) ./ mu) / (2 * log.(2))) .- MathConstants.eulergamma/log.(2) t1b = ((shuffle(scmuts2) ./ mu) / (2 * log.(2))) .- MathConstants.eulergamma/log.(2) tend = (log.(Nmax .* (freqfactor)) / log.(2)) s1, s2 = selection2clone(log.(2), scfreq1, scfreq2, tend, t1a, t1b) DF = DataFrame(mu = abcres.parameters[:, 1], clonalmutations = abcres.parameters[:, 2], s1 = s1, t1 = t1a, s2 = s2, t2 = t1b, cellularity = abcres.parameters[:, 7], frequency1 = scfreq1, frequency2 = scfreq2, scmuts1 = scmuts1, scmuts2 = scmuts2, weight = weights) return DF end function collectoutput0clone(abcres) mupost = abcres.parameters[:, 1] cmpost = abcres.parameters[:, 2] cellularity = abcres.parameters[:, 3] weights = abcres.weights DFpost = DataFrame(mu = mupost, clonalmutations = cmpost, cellularity = cellularity, weight = weights) end function cumulativedistribution(VAF; fmin = 0.1, fmax = 0.3) #calculate cumulative sum steps = fmax:-0.001:fmin cumsum = Array{Int64}(0) v = Array{Float64}(0) for i in steps push!(cumsum, sum(VAF .>= i)) push!(v, i) end cumsum = cumsum - cumsum[1] DF = DataFrame(cumsum = map(Float64, cumsum), v = v) DF[:invf] = 1 ./ DF[:v] - 1 ./ fmax DF[:theory] = Mcdf(DF[:v], fmin, fmax) DF[:normalized] = DF[:cumsum] ./ maximum(DF[:cumsum]) lmfit = fit(LinearModel, @formula(cumsum ~ invf + 0), DF) DF[:prediction] = predict(lmfit) return CancerSeqSim.AnalysedData(DF, VAF) end function averagehistogram(particles, model, VAF) x = 0.005:0.01:1.005 y = fit(Histogram, VAF, x, closed=:right) DFhist = DataFrame(VAF = x[1:end-1], freq = y.weights) particles = particles[map(x -> x.model, particles).==model] wts = map(x -> x.weight, particles) N = length(particles) M = zeros(Int64, 100, N) i = 1 for j in 1:N M[:, i] = convert(Array, particles[i].other[1][:freq]) i = i + 1 end mvalues = Float64[] meanvalues = Float64[] lquant = Float64[] lquart = Float64[] uquant = Float64[] uquart = Float64[] for i in 1:size(M, 1) push!(mvalues, median(vec(collect(M[i, :]')), weights(wts))) push!(meanvalues, mean(vec(collect(M[i, :]')), weights(wts))) push!(lquant, quantile(vec(collect(M[i, :]')), weights(wts), 0.025)) push!(uquant, quantile(vec(collect(M[i, :]')), weights(wts), 0.975)) push!(lquart, quantile(vec(collect(M[i, :]')), weights(wts), 0.25)) push!(uquart, quantile(vec(collect(M[i, :]')), weights(wts), 0.75)) end DFr = DataFrame(median = mvalues, mean = meanvalues, lowerq95 = lquant, upperq95 = uquant, lowerquartile = lquart, upperquartile = uquart, VAF = DFhist[:VAF], truecounts = DFhist[:freq]) return DFr end function saveresults(res::Results; resultsdirectory = "output") makedirectories(joinpath(resultsdirectory, res.SampleName, "finalpopulation")) getresults(res.ABCresults, resultsdirectory, res.SampleName, res.VAF, save = true) return end function getresults(abcres, resultsdirectory, sname, VAF; save = false, Nmaxinf = 10^10, savepopulations = false, popnum = 1) if savepopulations resultsdirectory = joinpath(resultsdirectory, sname, "populations", "population_$popnum") else resultsdirectory = joinpath(resultsdirectory, sname, "finalpopulation") end posteriors = Posterior[] #save model posterior DFmp = DataFrame(Model = map(x -> string(x),0:length(abcres.modelprob) - 1), Probability = abcres.modelprob) if abcres.modelprob[1] > 0.0 DFpost0 = collectoutput0clone(getmodel(abcres, 1)) DFr = averagehistogram(abcres.particles, 1, VAF) if save == true CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-parameters-clone0.csv"), DFpost0) CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-histogram-clone0.csv"), DFr) end push!(posteriors, Posterior(DFr, DFpost0, abcres.modelprob[1])) else push!(posteriors, Posterior(DataFrame(), DataFrame(), abcres.modelprob[1])) end if abcres.modelprob[2] > 0.0 DFpost1 = collectoutput1clone(getmodel(abcres, 2), Nmax = Nmaxinf) DFr = averagehistogram(abcres.particles, 2, VAF) if save == true CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-histogram-clone1.csv"), DFr) CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-parameters-clone1.csv"), DFpost1) end push!(posteriors, Posterior(DFr, DFpost1, abcres.modelprob[2])) else push!(posteriors, Posterior(DataFrame(), DataFrame(), abcres.modelprob[2])) end if (length(abcres.modelprob) > 2) && (abcres.modelprob[3] > 0.0) DFpost2 = collectoutput2clone(getmodel(abcres, 3), Nmax = Nmaxinf) DFr = averagehistogram(abcres.particles, 3, VAF) if save == true CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-parameters-clone2.csv"), DFpost2) CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-histogram-clone2.csv"), DFr) end push!(posteriors, Posterior(DFr, DFpost2, abcres.modelprob[3])) else if (length(abcres.modelprob) > 2) push!(posteriors, Posterior(DataFrame(), DataFrame(), abcres.modelprob[3])) end end DF = DataFrame(Model = map(x -> string(x),0:length(abcres.modelprob) - 1), Probability = abcres.modelprob) if save == true CSV.write(joinpath(resultsdirectory, "posterior", "$(sname)-modelprobabilities.csv"), DF) end return posteriors, DFmp end function makedirectories(resultsdirectory) if isdir(resultsdirectory) == false mkpath(resultsdirectory) end if isdir(joinpath(resultsdirectory, "plots")) == false mkpath(joinpath(resultsdirectory, "plots")) end if isdir(joinpath(resultsdirectory, "processed")) == false mkpath(joinpath(resultsdirectory, "processed")) end if isdir(joinpath(resultsdirectory, "posterior")) == false mkpath(joinpath(resultsdirectory, "posterior")) end if isdir(joinpath(resultsdirectory, "data")) == false mkpath(joinpath(resultsdirectory, "data")) end end function makeplotsdirectories(resultsdirectory) if isdir(joinpath(resultsdirectory)) == false mkpath(joinpath(resultsdirectory)) end if isdir(joinpath(resultsdirectory, "plots")) == false mkpath(joinpath(resultsdirectory, "plots")) end end function makedirectory(resultsdirectory) if isdir(joinpath(resultsdirectory)) == false mkpath(joinpath(resultsdirectory)) end end function show(io::IO, res::Results) show(res.ABCresults) end function show(io::IO, ABCresults::ApproxBayes.ABCSMCmodelresults) posteriors, DFmp = getresults(ABCresults, "nothing", "nothing", [1.0, 2.0]; save = false, Nmaxinf = ABCresults.setup.other) @printf("Total number of simulations: %.2e\n", sum(ABCresults.numsims)) println("Cumulative number of simulations = $(cumsum(ABCresults.numsims))") @printf("Acceptance ratio: %.2e\n\n", ABCresults.accratio) println("Tolerance schedule = $(round.(ABCresults.ϵ, digits = 2))\n") print("Model probabilities:\n") for j in 1:length(ABCresults.modelprob) @printf("\tModel %d (%d subclones): %.3f\n", j, j-1, ABCresults.modelprob[j]) end print("\nParameters:\n\n") for j in 1:length(ABCresults.parameters) if ABCresults.modelprob[j] > 0.0 print("Model $j ($(j-1) subclones)\n") upperci = zeros(Float64, size(posteriors[j].Parameters, 2) - 1) lowerci = zeros(Float64, size(posteriors[j].Parameters, 2) - 1) parametermeans = zeros(Float64, size(posteriors[j].Parameters, 2) - 1) parametermedians = zeros(Float64, size(posteriors[j].Parameters, 2) - 1) for i in 1:(size(posteriors[j].Parameters, 2) - 1) parametermeans[i] = mean(posteriors[j].Parameters[:, i], weights(posteriors[j].Parameters[:weight])) parametermedians[i] = median(posteriors[j].Parameters[:, i], weights(posteriors[j].Parameters[:weight])) (lowerci[i], upperci[i]) = quantile(posteriors[j].Parameters[:, i], weights(posteriors[j].Parameters[:weight]), [0.025,0.975]) end print("\tMedian (95% intervals):\n") for i in 1:length(parametermeans) if j == 1 parameternames = ["μ/β", "Clonal Mutations", "Cellularity"] elseif j == 2 parameternames = ["μ/β", "Clonal Mutations", "Fitness", "Time (tumour doublings)", "Cellularity", "Subclone Frequency", "Subclone Mutations"] elseif j == 3 parameternames = ["μ/β", "Clonal Mutations", "Fitness - Subclone 1", "Time (tumour doublings) - Subclone 1", "Fitness - Subclone 2", "Time (tumour doublings) - Subclone 2", "Cellularity", "Subclone 1 Frequency", "Subclone 2 Frequency", "Subclone 1 Mutations", "Subclone 2 Mutations"] end @printf("\tParameter %d - %s: %.2f (%.2f,%.2f)\n", i, parameternames[i], parametermedians[i], lowerci[i], upperci[i]) end end end end
[ 9742, 7568, 7, 69, 11, 69, 1084, 11, 69, 9806, 8, 796, 357, 16, 13, 15, 19571, 69, 532, 352, 13, 15, 14, 69, 9806, 8, 24457, 357, 16, 13, 15, 14, 69, 1084, 532, 352, 13, 15, 14, 69, 9806, 8, 198, 198, 8818, 6356, 7, 39377, 11, 277, 11, 4327, 11, 256, 16, 8, 198, 220, 220, 220, 1303, 13086, 262, 16022, 329, 6356, 355, 2029, 198, 220, 220, 220, 264, 796, 357, 39377, 764, 9, 256, 16, 1343, 2604, 12195, 69, 24457, 357, 16, 764, 12, 277, 22305, 24457, 357, 39377, 764, 9, 357, 83, 437, 532, 256, 16, 4008, 198, 220, 220, 220, 1441, 264, 198, 437, 198, 198, 8818, 6356, 17, 21018, 7, 39377, 11, 277, 16, 11, 277, 17, 11, 4327, 11, 256, 16, 11, 256, 17, 8, 198, 220, 220, 220, 1303, 13086, 262, 16022, 329, 6356, 355, 2029, 628, 220, 220, 220, 264, 16, 796, 1976, 27498, 7, 43879, 2414, 11, 4129, 7, 69, 16, 4008, 198, 220, 220, 220, 264, 17, 796, 1976, 27498, 7, 43879, 2414, 11, 4129, 7, 69, 16, 4008, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 69, 16, 8, 198, 220, 220, 220, 220, 220, 611, 357, 69, 17, 58, 72, 60, 1343, 277, 16, 58, 72, 12962, 1279, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 264, 16, 58, 72, 60, 796, 357, 39377, 764, 9, 256, 16, 58, 72, 60, 1343, 2604, 12195, 69, 16, 58, 72, 60, 24457, 357, 16, 532, 277, 16, 58, 72, 60, 532, 277, 17, 58, 72, 60, 22305, 24457, 357, 39377, 764, 9, 357, 83, 437, 58, 72, 60, 532, 256, 16, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 264, 17, 58, 72, 60, 796, 357, 39377, 764, 9, 256, 17, 58, 72, 60, 1343, 2604, 12195, 69, 17, 58, 72, 60, 24457, 357, 16, 532, 277, 16, 58, 72, 60, 532, 277, 17, 58, 72, 60, 22305, 24457, 357, 39377, 764, 9, 357, 83, 437, 58, 72, 60, 532, 256, 17, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 264, 16, 58, 72, 60, 796, 357, 39377, 764, 9, 256, 16, 58, 72, 60, 1343, 2604, 12195, 7, 69, 16, 58, 72, 60, 532, 277, 17, 58, 72, 12962, 24457, 357, 16, 532, 277, 16, 58, 72, 60, 22305, 24457, 357, 39377, 764, 9, 357, 83, 437, 58, 72, 60, 532, 256, 16, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 264, 17, 58, 72, 60, 796, 357, 39377, 764, 9, 256, 17, 58, 72, 60, 1343, 2604, 12195, 69, 17, 58, 72, 60, 24457, 357, 16, 532, 277, 16, 58, 72, 60, 22305, 24457, 357, 39377, 764, 9, 357, 83, 437, 58, 72, 60, 532, 256, 17, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 264, 16, 11, 264, 17, 198, 437, 198, 198, 8818, 2824, 22915, 16, 21018, 7, 39305, 411, 26, 399, 9806, 796, 838, 61, 940, 8, 628, 220, 220, 220, 629, 76, 5500, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 17, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 7146, 82, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 18, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 19503, 80, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 19, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 38779, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 352, 60, 198, 220, 220, 220, 19590, 796, 450, 66, 411, 13, 43775, 628, 220, 220, 220, 1303, 304, 377, 6422, 321, 2611, 14, 6404, 7, 17, 8, 318, 3995, 354, 3477, 17137, 766, 11164, 11489, 20551, 278, 10854, 32329, 286, 15523, 11, 2622, 329, 6356, 17952, 198, 220, 220, 220, 256, 16, 796, 14808, 1477, 18137, 7, 1416, 76, 5500, 8, 24457, 38779, 8, 1220, 357, 17, 1635, 2604, 12195, 17, 22305, 764, 12, 16320, 34184, 1187, 13, 68, 377, 6422, 321, 2611, 14, 6404, 12195, 17, 8, 1303, 1477, 18137, 523, 326, 256, 16, 34319, 318, 407, 23551, 198, 220, 220, 220, 4327, 796, 357, 6404, 12195, 45, 9806, 764, 9, 357, 16, 764, 12, 629, 19503, 80, 4008, 1220, 2604, 12195, 17, 4008, 198, 220, 220, 220, 264, 796, 6356, 7, 6404, 12195, 17, 828, 629, 19503, 80, 11, 4327, 11, 256, 16, 8, 628, 220, 220, 220, 36323, 796, 6060, 19778, 7, 30300, 796, 38779, 11, 198, 220, 220, 220, 537, 20996, 21973, 602, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 362, 4357, 198, 220, 220, 220, 264, 796, 264, 11, 198, 220, 220, 220, 256, 796, 256, 16, 11, 198, 220, 220, 220, 19824, 414, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 642, 4357, 198, 220, 220, 220, 8373, 796, 629, 19503, 80, 11, 198, 220, 220, 220, 629, 76, 5500, 796, 3975, 7, 87, 4613, 48436, 2414, 7, 87, 828, 629, 76, 5500, 828, 198, 220, 220, 220, 3463, 796, 19590, 8, 628, 220, 220, 220, 1441, 36323, 198, 437, 198, 198, 8818, 16075, 27160, 7, 87, 16, 11, 2124, 17, 11, 29077, 274, 8, 628, 220, 16075, 16, 796, 2124, 16, 58, 521, 721, 274, 60, 198, 220, 16075, 17, 796, 2124, 17, 58, 521, 721, 274, 60, 198, 220, 2124, 16, 58, 521, 721, 274, 60, 796, 16075, 17, 198, 220, 2124, 17, 58, 521, 721, 274, 60, 796, 16075, 16, 628, 220, 1441, 2124, 16, 11, 2124, 17, 198, 437, 198, 198, 8818, 32498, 1096, 7, 1416, 19503, 80, 16, 11, 629, 19503, 80, 17, 8, 198, 220, 1303, 562, 2454, 326, 611, 629, 19503, 80, 16, 1343, 629, 19503, 80, 17, 1875, 352, 788, 32498, 389, 28376, 198, 220, 2030, 80, 31412, 796, 1976, 27498, 7, 43879, 2414, 11, 4129, 7, 1416, 19503, 80, 16, 4008, 198, 220, 329, 1312, 287, 352, 25, 13664, 7, 1416, 19503, 80, 16, 8, 198, 220, 220, 220, 611, 357, 1416, 19503, 80, 16, 58, 72, 60, 1343, 629, 19503, 80, 17, 58, 72, 12962, 764, 29, 352, 13, 15, 198, 220, 220, 220, 220, 220, 2030, 80, 31412, 58, 72, 60, 796, 352, 532, 629, 19503, 80, 16, 58, 72, 60, 198, 220, 220, 220, 220, 220, 2030, 80, 31412, 58, 72, 60, 796, 5415, 26933, 15, 13, 8298, 11, 2030, 80, 31412, 58, 72, 11907, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 2030, 80, 31412, 58, 72, 60, 796, 352, 532, 629, 19503, 80, 16, 58, 72, 60, 532, 629, 19503, 80, 17, 58, 72, 60, 198, 220, 220, 220, 220, 220, 2030, 80, 31412, 58, 72, 60, 796, 5415, 26933, 15, 13, 8298, 11, 2030, 80, 31412, 58, 72, 11907, 8, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 1441, 2030, 80, 31412, 198, 437, 198, 198, 8818, 2824, 22915, 17, 21018, 7, 39305, 411, 26, 399, 9806, 796, 838, 61, 940, 8, 628, 220, 220, 220, 629, 76, 5500, 16, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 17, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 76, 5500, 17, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 18, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 7146, 82, 16, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 19, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 7146, 82, 17, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 20, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 19503, 80, 16, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 21, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 629, 19503, 80, 17, 796, 3975, 7, 87, 4613, 2124, 13, 847, 58, 22, 4357, 450, 66, 411, 13, 3911, 2983, 8, 198, 220, 220, 220, 38779, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 352, 60, 628, 220, 220, 220, 264, 16, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 513, 60, 198, 220, 220, 220, 256, 16, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 604, 60, 198, 220, 220, 220, 264, 17, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 642, 60, 198, 220, 220, 220, 256, 17, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 718, 60, 198, 220, 220, 220, 19590, 796, 450, 66, 411, 13, 43775, 628, 220, 220, 220, 629, 76, 5500, 16, 796, 3975, 7, 87, 4613, 48436, 2414, 7, 87, 828, 629, 76, 5500, 16, 8, 198, 220, 220, 220, 629, 76, 5500, 17, 796, 3975, 7, 87, 4613, 48436, 2414, 7, 87, 828, 629, 76, 5500, 17, 8, 628, 220, 220, 220, 29077, 274, 796, 764, 0, 7, 1416, 19503, 80, 16, 764, 29, 629, 19503, 80, 17, 8, 628, 220, 220, 220, 1303, 738, 1958, 850, 21018, 352, 355, 262, 4511, 8373, 850, 21018, 198, 220, 220, 220, 629, 19503, 80, 16, 11, 629, 19503, 80, 17, 796, 16075, 27160, 7, 1416, 19503, 80, 16, 11, 629, 19503, 80, 17, 11, 29077, 274, 8, 198, 220, 220, 220, 629, 76, 5500, 16, 11, 629, 76, 5500, 17, 796, 16075, 27160, 7, 1416, 76, 5500, 16, 11, 629, 76, 5500, 17, 11, 29077, 274, 8, 198, 220, 220, 220, 629, 7146, 82, 16, 11, 629, 7146, 82, 17, 796, 16075, 27160, 7, 1416, 7146, 82, 16, 11, 629, 7146, 82, 17, 11, 29077, 274, 8, 198, 220, 220, 220, 264, 16, 11, 264, 17, 796, 16075, 27160, 7, 82, 16, 11, 264, 17, 11, 29077, 274, 8, 198, 220, 220, 220, 256, 16, 11, 256, 17, 796, 16075, 27160, 7, 83, 16, 11, 256, 17, 11, 29077, 274, 8, 628, 220, 220, 220, 2030, 80, 31412, 796, 32498, 1096, 7, 1416, 19503, 80, 16, 11, 629, 19503, 80, 17, 8, 628, 220, 220, 220, 256, 16, 64, 796, 14808, 1477, 18137, 7, 1416, 76, 5500, 16, 8, 24457, 38779, 8, 1220, 357, 17, 1635, 2604, 12195, 17, 22305, 764, 12, 16320, 34184, 1187, 13, 68, 377, 6422, 321, 2611, 14, 6404, 12195, 17, 8, 198, 220, 220, 220, 256, 16, 65, 796, 14808, 1477, 18137, 7, 1416, 76, 5500, 17, 8, 24457, 38779, 8, 1220, 357, 17, 1635, 2604, 12195, 17, 22305, 764, 12, 16320, 34184, 1187, 13, 68, 377, 6422, 321, 2611, 14, 6404, 12195, 17, 8, 198, 220, 220, 220, 4327, 796, 357, 6404, 12195, 45, 9806, 764, 9, 357, 19503, 80, 31412, 4008, 1220, 2604, 12195, 17, 4008, 198, 220, 220, 220, 264, 16, 11, 264, 17, 796, 6356, 17, 21018, 7, 6404, 12195, 17, 828, 629, 19503, 80, 16, 11, 629, 19503, 80, 17, 11, 4327, 11, 256, 16, 64, 11, 256, 16, 65, 8, 628, 220, 220, 220, 36323, 796, 6060, 19778, 7, 30300, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 352, 4357, 198, 220, 220, 220, 537, 20996, 21973, 602, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 362, 4357, 198, 220, 220, 220, 264, 16, 796, 264, 16, 11, 198, 220, 220, 220, 256, 16, 796, 256, 16, 64, 11, 198, 220, 220, 220, 264, 17, 796, 264, 17, 11, 198, 220, 220, 220, 256, 17, 796, 256, 16, 65, 11, 198, 220, 220, 220, 19824, 414, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 767, 4357, 198, 220, 220, 220, 8373, 16, 796, 629, 19503, 80, 16, 11, 198, 220, 220, 220, 8373, 17, 796, 629, 19503, 80, 17, 11, 198, 220, 220, 220, 629, 76, 5500, 16, 796, 629, 76, 5500, 16, 11, 198, 220, 220, 220, 629, 76, 5500, 17, 796, 629, 76, 5500, 17, 11, 198, 220, 220, 220, 3463, 796, 19590, 8, 628, 220, 220, 220, 1441, 36323, 198, 437, 198, 198, 8818, 2824, 22915, 15, 21018, 7, 39305, 411, 8, 628, 220, 285, 929, 455, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 352, 60, 198, 220, 269, 3149, 455, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 362, 60, 198, 220, 19824, 414, 796, 450, 66, 411, 13, 17143, 7307, 58, 45299, 513, 60, 198, 220, 19590, 796, 450, 66, 411, 13, 43775, 628, 220, 36323, 7353, 796, 6060, 19778, 7, 30300, 796, 285, 929, 455, 11, 198, 220, 537, 20996, 21973, 602, 796, 269, 3149, 455, 11, 198, 220, 19824, 414, 796, 19824, 414, 11, 198, 220, 3463, 796, 19590, 8, 198, 437, 198, 198, 8818, 10973, 377, 265, 1572, 396, 3890, 7, 53, 8579, 26, 277, 1084, 796, 657, 13, 16, 11, 277, 9806, 796, 657, 13, 18, 8, 628, 220, 220, 220, 1303, 9948, 3129, 378, 23818, 2160, 198, 220, 220, 220, 4831, 796, 277, 9806, 21912, 15, 13, 8298, 25, 69, 1084, 198, 220, 220, 220, 269, 5700, 388, 796, 15690, 90, 5317, 2414, 92, 7, 15, 8, 198, 220, 220, 220, 410, 796, 15690, 90, 43879, 2414, 92, 7, 15, 8, 628, 220, 220, 220, 329, 1312, 287, 4831, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 66, 5700, 388, 11, 2160, 7, 53, 8579, 764, 29, 28, 1312, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 1312, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 269, 5700, 388, 796, 269, 5700, 388, 532, 269, 5700, 388, 58, 16, 60, 628, 220, 220, 220, 36323, 796, 6060, 19778, 7, 66, 5700, 388, 796, 3975, 7, 43879, 2414, 11, 269, 5700, 388, 828, 410, 796, 410, 8, 198, 220, 220, 220, 36323, 58, 25, 16340, 69, 60, 796, 352, 24457, 36323, 58, 25, 85, 60, 532, 352, 24457, 277, 9806, 628, 220, 220, 220, 36323, 58, 25, 1169, 652, 60, 796, 1982, 7568, 7, 8068, 58, 25, 85, 4357, 277, 1084, 11, 277, 9806, 8, 198, 220, 220, 220, 36323, 58, 25, 11265, 1143, 60, 796, 36323, 58, 25, 66, 5700, 388, 60, 24457, 5415, 7, 8068, 58, 25, 66, 5700, 388, 12962, 628, 220, 220, 220, 300, 76, 11147, 796, 4197, 7, 14993, 451, 17633, 11, 2488, 687, 4712, 7, 66, 5700, 388, 5299, 800, 69, 1343, 657, 828, 36323, 8, 198, 220, 220, 220, 36323, 58, 25, 28764, 2867, 60, 796, 4331, 7, 75, 76, 11147, 8, 628, 220, 220, 220, 1441, 15523, 4653, 80, 8890, 13, 2025, 47557, 6601, 7, 8068, 11, 569, 8579, 8, 198, 437, 198, 198, 8818, 2811, 10034, 21857, 7, 3911, 2983, 11, 2746, 11, 569, 8579, 8, 628, 220, 220, 220, 2124, 796, 657, 13, 22544, 25, 15, 13, 486, 25, 16, 13, 22544, 198, 220, 220, 220, 331, 796, 4197, 7, 13749, 21857, 11, 569, 8579, 11, 2124, 11, 4838, 28, 25, 3506, 8, 198, 220, 220, 220, 36323, 10034, 796, 6060, 19778, 7, 53, 8579, 796, 2124, 58, 16, 25, 437, 12, 16, 4357, 2030, 80, 796, 331, 13, 43775, 8, 628, 220, 220, 220, 13166, 796, 13166, 58, 8899, 7, 87, 4613, 2124, 13, 19849, 11, 13166, 737, 855, 19849, 60, 198, 220, 220, 220, 266, 912, 796, 3975, 7, 87, 4613, 2124, 13, 6551, 11, 13166, 8, 198, 220, 220, 220, 399, 796, 4129, 7, 3911, 2983, 8, 628, 220, 220, 220, 337, 796, 1976, 27498, 7, 5317, 2414, 11, 1802, 11, 399, 8, 198, 220, 220, 220, 1312, 796, 352, 628, 220, 220, 220, 329, 474, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 337, 58, 45299, 1312, 60, 796, 10385, 7, 19182, 11, 13166, 58, 72, 4083, 847, 58, 16, 7131, 25, 19503, 80, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 796, 1312, 1343, 352, 198, 220, 220, 220, 886, 628, 220, 220, 220, 285, 27160, 796, 48436, 2414, 21737, 198, 220, 220, 220, 1612, 27160, 796, 48436, 2414, 21737, 198, 220, 220, 220, 300, 40972, 796, 48436, 2414, 21737, 198, 220, 220, 220, 300, 36008, 796, 48436, 2414, 21737, 198, 220, 220, 220, 334, 40972, 796, 48436, 2414, 21737, 198, 220, 220, 220, 334, 36008, 796, 48436, 2414, 21737, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 7857, 7, 44, 11, 352, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 76, 27160, 11, 14288, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 22305, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 32604, 27160, 11, 1612, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 22305, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 75, 40972, 11, 5554, 576, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 828, 657, 13, 36629, 4008, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 84, 40972, 11, 5554, 576, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 828, 657, 13, 42716, 4008, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 75, 36008, 11, 5554, 576, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 828, 657, 13, 1495, 4008, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 84, 36008, 11, 5554, 576, 7, 35138, 7, 33327, 7, 44, 58, 72, 11, 1058, 60, 11537, 828, 19590, 7, 86, 912, 828, 657, 13, 2425, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 360, 6732, 796, 6060, 19778, 7, 1150, 666, 796, 285, 27160, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1612, 796, 1612, 27160, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2793, 80, 3865, 796, 300, 40972, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6727, 80, 3865, 796, 334, 40972, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2793, 36008, 576, 796, 300, 36008, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6727, 36008, 576, 796, 334, 36008, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 569, 8579, 796, 36323, 10034, 58, 25, 53, 8579, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2081, 9127, 82, 796, 36323, 10034, 58, 25, 19503, 80, 12962, 628, 220, 220, 220, 1441, 360, 6732, 198, 437, 198, 198, 8818, 3613, 43420, 7, 411, 3712, 25468, 26, 2482, 34945, 796, 366, 22915, 4943, 198, 220, 285, 4335, 1060, 1749, 7, 22179, 6978, 7, 43420, 34945, 11, 581, 13, 36674, 5376, 11, 366, 20311, 39748, 48774, 198, 220, 651, 43420, 7, 411, 13, 24694, 43420, 11, 2482, 34945, 11, 581, 13, 36674, 5376, 11, 581, 13, 53, 8579, 11, 3613, 796, 2081, 8, 198, 220, 1441, 198, 437, 198, 198, 8818, 651, 43420, 7, 39305, 411, 11, 2482, 34945, 11, 3013, 480, 11, 569, 8579, 26, 3613, 796, 3991, 11, 399, 9806, 10745, 796, 838, 61, 940, 11, 3613, 12924, 5768, 796, 3991, 11, 1461, 22510, 796, 352, 8, 628, 220, 611, 3613, 12924, 5768, 198, 220, 220, 220, 220, 220, 2482, 34945, 796, 4654, 6978, 7, 43420, 34945, 11, 3013, 480, 11, 366, 12924, 5768, 1600, 366, 39748, 62, 3, 12924, 22510, 4943, 198, 220, 2073, 198, 220, 220, 220, 220, 220, 2482, 34945, 796, 4654, 6978, 7, 43420, 34945, 11, 3013, 480, 11, 366, 20311, 39748, 4943, 198, 220, 886, 198, 220, 11968, 12706, 796, 44996, 1504, 21737, 198, 220, 1303, 21928, 2746, 34319, 198, 220, 36323, 3149, 796, 6060, 19778, 7, 17633, 796, 3975, 7, 87, 4613, 4731, 7, 87, 828, 15, 25, 13664, 7, 39305, 411, 13, 19849, 1676, 65, 8, 532, 352, 828, 30873, 1799, 796, 450, 66, 411, 13, 19849, 1676, 65, 8, 628, 220, 611, 450, 66, 411, 13, 19849, 1676, 65, 58, 16, 60, 1875, 657, 13, 15, 198, 220, 220, 220, 36323, 7353, 15, 796, 2824, 22915, 15, 21018, 7, 1136, 19849, 7, 39305, 411, 11, 352, 4008, 198, 220, 220, 220, 360, 6732, 796, 2811, 10034, 21857, 7, 39305, 411, 13, 3911, 2983, 11, 352, 11, 569, 8579, 8, 198, 220, 220, 220, 611, 3613, 6624, 2081, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 17143, 7307, 12, 21018, 15, 13, 40664, 12340, 36323, 7353, 15, 8, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 10034, 21857, 12, 21018, 15, 13, 40664, 12340, 360, 6732, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 35, 6732, 11, 36323, 7353, 15, 11, 450, 66, 411, 13, 19849, 1676, 65, 58, 16, 60, 4008, 198, 220, 2073, 198, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 6601, 19778, 22784, 6060, 19778, 22784, 450, 66, 411, 13, 19849, 1676, 65, 58, 16, 60, 4008, 198, 220, 886, 628, 220, 611, 450, 66, 411, 13, 19849, 1676, 65, 58, 17, 60, 1875, 657, 13, 15, 198, 220, 220, 220, 36323, 7353, 16, 796, 2824, 22915, 16, 21018, 7, 1136, 19849, 7, 39305, 411, 11, 362, 828, 399, 9806, 796, 399, 9806, 10745, 8, 198, 220, 220, 220, 360, 6732, 796, 2811, 10034, 21857, 7, 39305, 411, 13, 3911, 2983, 11, 362, 11, 569, 8579, 8, 198, 220, 220, 220, 611, 3613, 6624, 2081, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 10034, 21857, 12, 21018, 16, 13, 40664, 12340, 360, 6732, 8, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 17143, 7307, 12, 21018, 16, 13, 40664, 12340, 36323, 7353, 16, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 35, 6732, 11, 36323, 7353, 16, 11, 450, 66, 411, 13, 19849, 1676, 65, 58, 17, 60, 4008, 198, 220, 2073, 198, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 6601, 19778, 22784, 6060, 19778, 22784, 450, 66, 411, 13, 19849, 1676, 65, 58, 17, 60, 4008, 198, 220, 886, 628, 220, 611, 357, 13664, 7, 39305, 411, 13, 19849, 1676, 65, 8, 1875, 362, 8, 11405, 357, 39305, 411, 13, 19849, 1676, 65, 58, 18, 60, 1875, 657, 13, 15, 8, 198, 220, 220, 220, 36323, 7353, 17, 796, 2824, 22915, 17, 21018, 7, 1136, 19849, 7, 39305, 411, 11, 513, 828, 399, 9806, 796, 399, 9806, 10745, 8, 198, 220, 220, 220, 360, 6732, 796, 2811, 10034, 21857, 7, 39305, 411, 13, 3911, 2983, 11, 513, 11, 569, 8579, 8, 198, 220, 220, 220, 611, 3613, 6624, 2081, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 17143, 7307, 12, 21018, 17, 13, 40664, 12340, 36323, 7353, 17, 8, 198, 220, 220, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 10034, 21857, 12, 21018, 17, 13, 40664, 12340, 360, 6732, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 35, 6732, 11, 36323, 7353, 17, 11, 450, 66, 411, 13, 19849, 1676, 65, 58, 18, 60, 4008, 198, 220, 2073, 198, 220, 220, 220, 611, 357, 13664, 7, 39305, 411, 13, 19849, 1676, 65, 8, 1875, 362, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 79, 6197, 12706, 11, 44996, 1504, 7, 6601, 19778, 22784, 6060, 19778, 22784, 450, 66, 411, 13, 19849, 1676, 65, 58, 18, 60, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 36323, 796, 6060, 19778, 7, 17633, 796, 3975, 7, 87, 4613, 4731, 7, 87, 828, 15, 25, 13664, 7, 39305, 411, 13, 19849, 1676, 65, 8, 532, 352, 828, 30873, 1799, 796, 450, 66, 411, 13, 19849, 1676, 65, 8, 198, 220, 611, 3613, 6624, 2081, 198, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 1600, 17971, 7, 82, 3672, 13219, 19849, 1676, 65, 5738, 13, 40664, 12340, 36323, 8, 198, 220, 886, 628, 220, 1441, 11968, 12706, 11, 36323, 3149, 198, 437, 198, 198, 8818, 285, 4335, 1060, 1749, 7, 43420, 34945, 8, 628, 220, 611, 318, 15908, 7, 43420, 34945, 8, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 43420, 34945, 8, 198, 220, 886, 628, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 489, 1747, 48774, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 489, 1747, 48774, 198, 220, 886, 198, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 14681, 276, 48774, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 14681, 276, 48774, 198, 220, 886, 628, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 48774, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 79, 6197, 1504, 48774, 198, 220, 886, 628, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 7890, 48774, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 7890, 48774, 198, 220, 886, 198, 198, 437, 198, 198, 8818, 787, 489, 1747, 12942, 1749, 7, 43420, 34945, 8, 198, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 4008, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 4008, 198, 220, 886, 198, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 489, 1747, 48774, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 11, 366, 489, 1747, 48774, 198, 220, 886, 198, 437, 198, 198, 8818, 285, 4335, 1060, 652, 7, 43420, 34945, 8, 198, 220, 611, 318, 15908, 7, 22179, 6978, 7, 43420, 34945, 4008, 6624, 3991, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 43420, 34945, 4008, 198, 220, 886, 198, 437, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 581, 3712, 25468, 8, 198, 220, 905, 7, 411, 13, 24694, 43420, 8, 198, 437, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 9738, 43420, 3712, 4677, 13907, 15262, 274, 13, 24694, 50, 9655, 19849, 43420, 8, 628, 220, 11968, 12706, 11, 36323, 3149, 796, 651, 43420, 7, 24694, 43420, 11, 366, 22366, 1600, 366, 22366, 1600, 685, 16, 13, 15, 11, 362, 13, 15, 11208, 3613, 796, 3991, 11, 399, 9806, 10745, 796, 9738, 43420, 13, 40406, 13, 847, 8, 628, 220, 2488, 37435, 7203, 14957, 1271, 286, 27785, 25, 4064, 13, 17, 68, 59, 77, 1600, 2160, 7, 24694, 43420, 13, 77, 5700, 12078, 4008, 198, 220, 44872, 7203, 34, 388, 13628, 1271, 286, 27785, 796, 29568, 66, 5700, 388, 7, 24694, 43420, 13, 77, 5700, 12078, 4008, 4943, 198, 220, 2488, 37435, 7203, 38855, 590, 8064, 25, 4064, 13, 17, 68, 59, 77, 59, 77, 1600, 9738, 43420, 13, 4134, 10366, 952, 8, 198, 220, 44872, 7203, 51, 37668, 7269, 796, 29568, 744, 12195, 24694, 43420, 13, 139, 113, 11, 19561, 796, 362, 4008, 59, 77, 4943, 628, 220, 3601, 7203, 17633, 39522, 7479, 77, 4943, 198, 220, 329, 474, 287, 352, 25, 13664, 7, 24694, 43420, 13, 19849, 1676, 65, 8, 198, 220, 220, 220, 2488, 37435, 7203, 59, 83, 17633, 4064, 67, 37633, 67, 850, 565, 1952, 2599, 4064, 13, 18, 69, 59, 77, 1600, 474, 11, 474, 12, 16, 11, 9738, 43420, 13, 19849, 1676, 65, 58, 73, 12962, 198, 220, 886, 628, 220, 3601, 7203, 59, 77, 48944, 7479, 77, 59, 77, 4943, 628, 220, 329, 474, 287, 352, 25, 13664, 7, 24694, 43420, 13, 17143, 7307, 8, 198, 220, 220, 220, 611, 9738, 43420, 13, 19849, 1676, 65, 58, 73, 60, 1875, 657, 13, 15, 198, 220, 220, 220, 220, 220, 3601, 7203, 17633, 720, 73, 7198, 7, 73, 12, 16, 8, 850, 565, 1952, 19415, 77, 4943, 628, 220, 220, 220, 220, 220, 6727, 979, 796, 1976, 27498, 7, 43879, 2414, 11, 2546, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 11, 362, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 2793, 979, 796, 1976, 27498, 7, 43879, 2414, 11, 2546, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 11, 362, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 11507, 1326, 504, 796, 1976, 27498, 7, 43879, 2414, 11, 2546, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 11, 362, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 11507, 1150, 1547, 796, 1976, 27498, 7, 43879, 2414, 11, 2546, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 11, 362, 8, 532, 352, 8, 628, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 37498, 7857, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 11, 362, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 11507, 1326, 504, 58, 72, 60, 796, 1612, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 45299, 1312, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 19590, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 25, 6551, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 11507, 1150, 1547, 58, 72, 60, 796, 14288, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 45299, 1312, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 19590, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 25, 6551, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 357, 21037, 979, 58, 72, 4357, 6727, 979, 58, 72, 12962, 796, 5554, 576, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 45299, 1312, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 19590, 7, 79, 6197, 12706, 58, 73, 4083, 48944, 58, 25, 6551, 46570, 685, 15, 13, 36629, 11, 15, 13, 42716, 12962, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 3601, 7203, 59, 83, 9921, 666, 357, 3865, 4, 20016, 2599, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 17143, 2357, 1326, 504, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 474, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5772, 316, 1142, 1047, 796, 14631, 34703, 14, 26638, 1600, 366, 2601, 20996, 13859, 602, 1600, 366, 28780, 33737, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 474, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5772, 316, 1142, 1047, 796, 14631, 34703, 14, 26638, 1600, 366, 2601, 20996, 13859, 602, 1600, 366, 37, 3659, 1600, 366, 7575, 357, 83, 388, 454, 2255, 2436, 654, 42501, 366, 28780, 33737, 1600, 366, 7004, 21018, 31902, 1600, 366, 7004, 21018, 13859, 602, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 474, 6624, 513, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5772, 316, 1142, 1047, 796, 14631, 34703, 14, 26638, 1600, 366, 2601, 20996, 13859, 602, 1600, 366, 37, 3659, 532, 3834, 21018, 352, 1600, 366, 7575, 357, 83, 388, 454, 2255, 2436, 654, 8, 532, 3834, 21018, 352, 1600, 366, 37, 3659, 532, 3834, 21018, 362, 1600, 366, 7575, 357, 83, 388, 454, 2255, 2436, 654, 8, 532, 3834, 21018, 362, 1600, 366, 28780, 33737, 1600, 366, 7004, 21018, 352, 31902, 1600, 366, 7004, 21018, 362, 31902, 1600, 366, 7004, 21018, 352, 13859, 602, 1600, 366, 7004, 21018, 362, 13859, 602, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 59, 83, 36301, 4064, 67, 532, 4064, 82, 25, 4064, 13, 17, 69, 357, 7225, 17, 69, 11, 7225, 17, 69, 19415, 77, 1600, 1312, 11, 5772, 316, 1142, 1047, 58, 72, 4357, 11507, 1150, 1547, 58, 72, 4357, 2793, 979, 58, 72, 4357, 6727, 979, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198 ]
2.286287
5,491
# Bogumił Kamiński, 2022 # Codes for chapter 11 # Code for section 11.1 # deserialization of source data frame using DataFrames using Serialization walk = deserialize("walk.bin") # Code for a note on conversion x = [1.5] x[1] = 1 x # Code from section 11.1.1 Matrix(walk) Matrix{Any}(walk) Matrix{String}(walk) using Plots plot(walk) plot(Matrix(walk); labels=["x" "y"] , legend=:topleft) # Code from section 11.1.2 Tables.columntable(walk) using BenchmarkTools function mysum(table) s = 0 #A for v in table.x #B s += v end return s end df = DataFrame(x=1:1_000_000); @btime mysum($df) tab = Tables.columntable(df); @btime mysum($tab) @code_warntype mysum(df) @code_warntype mysum(tab) typeof(tab) function barrier_mysum2(x) s = 0 for v in x s += v end return s end mysum2(table) = barrier_mysum2(table.x) @btime mysum2($df) df = DataFrame(a=[1, 1, 2], b=[1, 1, 2]) unique(df) tab = Tables.columntable(df) unique(tab) # Code from section 11.1.3 Tables.rowtable(walk) nti = Tables.namedtupleiterator(walk) for v in nti println(v) end er = eachrow(walk) er[1] er[end] ec = eachcol(walk) ec[1] ec[end] identity.(eachcol(walk)) df = DataFrame(x=1:2, b=["a", "b"]) identity.(eachcol(df)) # Code from section 11.2 using CSV raw_data = """ city,date,rainfall Olecko,2020-11-16,2.9 Olecko,2020-11-17,4.1 Olecko,2020-11-19,4.3 Olecko,2020-11-20,2.0 Olecko,2020-11-21,0.6 Olecko,2020-11-22,1.0 Ełk,2020-11-16,3.9 Ełk,2020-11-19,1.2 Ełk,2020-11-20,2.0 Ełk,2020-11-22,2.0 """; rainfall_df = CSV.read(IOBuffer(raw_data), DataFrame) gdf_city = groupby(rainfall_df, "city") gdf_city_date = groupby(rainfall_df, Not("rainfall")) keys(gdf_city_date) gk1 = keys(gdf_city_date)[1] g1_t = Tuple(gk1) g1_nt = NamedTuple(gk1) g1_dict = Dict(gk1) gdf_city_date[1] gdf_city_date[gk1] gdf_city_date[g1_t] gdf_city_date[g1_nt] gdf_city_date[g1_dict] gdf_city[("Olecko",)] gdf_city[(city="Olecko",)] using BenchmarkTools bench_df = DataFrame(id=1:10^8); bench_gdf = groupby(bench_df, :id); @btime groupby($bench_df, :id); bench_i = 1_000_000; bench_gk = keys(bench_gdf)[bench_i]; bench_t = Tuple(bench_gk); bench_nt = NamedTuple(bench_gk); bench_dict = Dict(bench_gk); @btime $bench_gdf[$bench_i]; @btime $bench_gdf[$bench_gk]; @btime $bench_gdf[$bench_t]; @btime $bench_gdf[$bench_nt]; @btime $bench_gdf[$bench_dict]; gdf_city[[2, 1]] gdf_city[[1]] [nrow(df) for df in gdf_city] for p in pairs(gdf_city) println(p) end Dict(key.city => nrow(df) for (key, df) in pairs(gdf_city)) combine(gdf_city, nrow)
[ 2, 21555, 12994, 41615, 509, 6277, 129, 226, 20545, 11, 33160, 198, 198, 2, 44380, 329, 6843, 1367, 198, 198, 2, 6127, 329, 2665, 1367, 13, 16, 198, 198, 2, 748, 48499, 1634, 286, 2723, 1366, 5739, 198, 198, 3500, 6060, 35439, 198, 3500, 23283, 1634, 198, 11152, 796, 748, 48499, 1096, 7203, 11152, 13, 8800, 4943, 198, 198, 2, 6127, 329, 257, 3465, 319, 11315, 198, 198, 87, 796, 685, 16, 13, 20, 60, 198, 87, 58, 16, 60, 796, 352, 198, 87, 198, 198, 2, 6127, 422, 2665, 1367, 13, 16, 13, 16, 198, 198, 46912, 7, 11152, 8, 198, 46912, 90, 7149, 92, 7, 11152, 8, 198, 46912, 90, 10100, 92, 7, 11152, 8, 198, 198, 3500, 1345, 1747, 198, 29487, 7, 11152, 8, 198, 198, 29487, 7, 46912, 7, 11152, 1776, 14722, 28, 14692, 87, 1, 366, 88, 8973, 837, 8177, 28, 25, 83, 643, 701, 8, 198, 198, 2, 6127, 422, 2665, 1367, 13, 16, 13, 17, 198, 198, 51, 2977, 13, 4033, 388, 429, 540, 7, 11152, 8, 198, 198, 3500, 25187, 4102, 33637, 198, 8818, 616, 16345, 7, 11487, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 796, 657, 1303, 32, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 410, 287, 3084, 13, 87, 1303, 33, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 15853, 410, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 264, 198, 220, 220, 220, 220, 220, 220, 886, 198, 7568, 796, 6060, 19778, 7, 87, 28, 16, 25, 16, 62, 830, 62, 830, 1776, 198, 31, 65, 2435, 616, 16345, 16763, 7568, 8, 198, 198, 8658, 796, 33220, 13, 4033, 388, 429, 540, 7, 7568, 1776, 198, 31, 65, 2435, 616, 16345, 16763, 8658, 8, 198, 198, 31, 8189, 62, 5767, 429, 2981, 616, 16345, 7, 7568, 8, 198, 198, 31, 8189, 62, 5767, 429, 2981, 616, 16345, 7, 8658, 8, 198, 198, 4906, 1659, 7, 8658, 8, 198, 198, 8818, 13054, 62, 28744, 388, 17, 7, 87, 8, 198, 220, 220, 220, 264, 796, 657, 198, 220, 220, 220, 329, 410, 287, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 264, 15853, 410, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 264, 198, 437, 198, 28744, 388, 17, 7, 11487, 8, 796, 13054, 62, 28744, 388, 17, 7, 11487, 13, 87, 8, 198, 31, 65, 2435, 616, 16345, 17, 16763, 7568, 8, 198, 198, 7568, 796, 6060, 19778, 7, 64, 41888, 16, 11, 352, 11, 362, 4357, 275, 41888, 16, 11, 352, 11, 362, 12962, 198, 34642, 7, 7568, 8, 198, 198, 8658, 796, 33220, 13, 4033, 388, 429, 540, 7, 7568, 8, 198, 34642, 7, 8658, 8, 198, 198, 2, 6127, 422, 2665, 1367, 13, 16, 13, 18, 198, 198, 51, 2977, 13, 808, 11487, 7, 11152, 8, 198, 198, 429, 72, 796, 33220, 13, 13190, 83, 29291, 48727, 7, 11152, 8, 198, 1640, 410, 287, 299, 20259, 198, 220, 220, 220, 44872, 7, 85, 8, 198, 437, 198, 198, 263, 796, 1123, 808, 7, 11152, 8, 198, 263, 58, 16, 60, 198, 263, 58, 437, 60, 198, 721, 796, 1123, 4033, 7, 11152, 8, 198, 721, 58, 16, 60, 198, 721, 58, 437, 60, 198, 198, 738, 414, 12195, 27379, 4033, 7, 11152, 4008, 198, 198, 7568, 796, 6060, 19778, 7, 87, 28, 16, 25, 17, 11, 275, 28, 14692, 64, 1600, 366, 65, 8973, 8, 198, 738, 414, 12195, 27379, 4033, 7, 7568, 4008, 198, 198, 2, 6127, 422, 2665, 1367, 13, 17, 198, 198, 3500, 44189, 198, 1831, 62, 7890, 796, 37227, 198, 19205, 11, 4475, 11, 3201, 7207, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 1433, 11, 17, 13, 24, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 1558, 11, 19, 13, 16, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 1129, 11, 19, 13, 18, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 1238, 11, 17, 13, 15, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 2481, 11, 15, 13, 21, 198, 46, 293, 37549, 11, 42334, 12, 1157, 12, 1828, 11, 16, 13, 15, 198, 36, 41615, 74, 11, 42334, 12, 1157, 12, 1433, 11, 18, 13, 24, 198, 36, 41615, 74, 11, 42334, 12, 1157, 12, 1129, 11, 16, 13, 17, 198, 36, 41615, 74, 11, 42334, 12, 1157, 12, 1238, 11, 17, 13, 15, 198, 36, 41615, 74, 11, 42334, 12, 1157, 12, 1828, 11, 17, 13, 15, 198, 15931, 8172, 198, 3201, 7207, 62, 7568, 796, 44189, 13, 961, 7, 9399, 28632, 7, 1831, 62, 7890, 828, 6060, 19778, 8, 198, 198, 70, 7568, 62, 19205, 796, 1448, 1525, 7, 3201, 7207, 62, 7568, 11, 366, 19205, 4943, 198, 198, 70, 7568, 62, 19205, 62, 4475, 796, 1448, 1525, 7, 3201, 7207, 62, 7568, 11, 1892, 7203, 3201, 7207, 48774, 198, 198, 13083, 7, 70, 7568, 62, 19205, 62, 4475, 8, 198, 198, 70, 74, 16, 796, 8251, 7, 70, 7568, 62, 19205, 62, 4475, 38381, 16, 60, 198, 70, 16, 62, 83, 796, 309, 29291, 7, 70, 74, 16, 8, 198, 70, 16, 62, 429, 796, 34441, 51, 29291, 7, 70, 74, 16, 8, 198, 70, 16, 62, 11600, 796, 360, 713, 7, 70, 74, 16, 8, 198, 198, 70, 7568, 62, 19205, 62, 4475, 58, 16, 60, 198, 70, 7568, 62, 19205, 62, 4475, 58, 70, 74, 16, 60, 198, 70, 7568, 62, 19205, 62, 4475, 58, 70, 16, 62, 83, 60, 198, 70, 7568, 62, 19205, 62, 4475, 58, 70, 16, 62, 429, 60, 198, 70, 7568, 62, 19205, 62, 4475, 58, 70, 16, 62, 11600, 60, 198, 198, 70, 7568, 62, 19205, 58, 7203, 46, 293, 37549, 1600, 15437, 198, 70, 7568, 62, 19205, 58, 7, 19205, 2625, 46, 293, 37549, 1600, 15437, 198, 198, 3500, 25187, 4102, 33637, 198, 26968, 62, 7568, 796, 6060, 19778, 7, 312, 28, 16, 25, 940, 61, 23, 1776, 198, 26968, 62, 70, 7568, 796, 1448, 1525, 7, 26968, 62, 7568, 11, 1058, 312, 1776, 198, 31, 65, 2435, 1448, 1525, 16763, 26968, 62, 7568, 11, 1058, 312, 1776, 198, 26968, 62, 72, 796, 352, 62, 830, 62, 830, 26, 198, 26968, 62, 70, 74, 796, 8251, 7, 26968, 62, 70, 7568, 38381, 26968, 62, 72, 11208, 198, 26968, 62, 83, 796, 309, 29291, 7, 26968, 62, 70, 74, 1776, 198, 26968, 62, 429, 796, 34441, 51, 29291, 7, 26968, 62, 70, 74, 1776, 198, 26968, 62, 11600, 796, 360, 713, 7, 26968, 62, 70, 74, 1776, 198, 31, 65, 2435, 720, 26968, 62, 70, 7568, 58, 3, 26968, 62, 72, 11208, 198, 31, 65, 2435, 720, 26968, 62, 70, 7568, 58, 3, 26968, 62, 70, 74, 11208, 198, 31, 65, 2435, 720, 26968, 62, 70, 7568, 58, 3, 26968, 62, 83, 11208, 198, 31, 65, 2435, 720, 26968, 62, 70, 7568, 58, 3, 26968, 62, 429, 11208, 198, 31, 65, 2435, 720, 26968, 62, 70, 7568, 58, 3, 26968, 62, 11600, 11208, 198, 198, 70, 7568, 62, 19205, 30109, 17, 11, 352, 11907, 198, 70, 7568, 62, 19205, 30109, 16, 11907, 198, 198, 58, 77, 808, 7, 7568, 8, 329, 47764, 287, 308, 7568, 62, 19205, 60, 198, 198, 1640, 279, 287, 14729, 7, 70, 7568, 62, 19205, 8, 198, 220, 220, 220, 44872, 7, 79, 8, 198, 437, 198, 198, 35, 713, 7, 2539, 13, 19205, 5218, 299, 808, 7, 7568, 8, 329, 357, 2539, 11, 47764, 8, 287, 14729, 7, 70, 7568, 62, 19205, 4008, 198, 198, 24011, 500, 7, 70, 7568, 62, 19205, 11, 299, 808, 8, 198 ]
2.031857
1,287
#useful functions that do no directly call C code function getAllVertCoords() numV = num_entities[1] vertCoords = zeros(3, numV) # storage for all vertex coordinates coords_tmp = zeros(3,1) # temporary storage for vetex coordinates for i=1:numV apf.getVertCoords(coords_tmp, 3, 1) vertCoords[:, i] = coords_tmp incrementVertIt() end resetVertIt() return vertCoords end function makeSBPMatrix() # make matrix needed for summation by parts numEl = num_entities[4] # number of elements numPerEl = downward_counts[4, 1] # nodes per element coords_tmp = zeros(3, numPerEl) sbpMatrix = zeros(3, numPerEl, numEl) for i = 1:numEl apf.getElCoords( coords_tmp, 3, numPerEl) sbpMatrix[:, :, i] = coords_tmp incrementElIt() end resetElIt() return sbpMatrix end function incrementIt(dim::Int) # increment an iterator of a given dimension if (dim == 0) incrementVertIt() elseif (dim==1) incrementEdgeIt() elseif (dim == 2) incrementElIt() elseif (dim == 3) incrementElIt() end end # end function
[ 2, 1904, 913, 5499, 326, 466, 645, 3264, 869, 327, 2438, 198, 198, 8818, 651, 3237, 42369, 7222, 3669, 3419, 198, 22510, 53, 796, 997, 62, 298, 871, 58, 16, 60, 198, 198, 1851, 7222, 3669, 796, 1976, 27498, 7, 18, 11, 997, 53, 8, 220, 1303, 6143, 329, 477, 37423, 22715, 198, 1073, 3669, 62, 22065, 796, 1976, 27498, 7, 18, 11, 16, 8, 220, 1303, 8584, 6143, 329, 1569, 16886, 22715, 198, 198, 1640, 1312, 28, 16, 25, 22510, 53, 198, 220, 2471, 69, 13, 1136, 42369, 7222, 3669, 7, 1073, 3669, 62, 22065, 11, 513, 11, 352, 8, 198, 220, 9421, 7222, 3669, 58, 45299, 1312, 60, 796, 763, 3669, 62, 22065, 198, 220, 18703, 42369, 1026, 3419, 198, 437, 198, 198, 42503, 42369, 1026, 3419, 198, 198, 7783, 9421, 7222, 3669, 198, 437, 198, 198, 8818, 787, 16811, 5868, 265, 8609, 3419, 198, 2, 787, 17593, 2622, 329, 30114, 341, 416, 3354, 198, 198, 22510, 9527, 796, 997, 62, 298, 871, 58, 19, 60, 220, 1303, 1271, 286, 4847, 198, 22510, 5990, 9527, 796, 20841, 62, 9127, 82, 58, 19, 11, 352, 60, 220, 1303, 13760, 583, 5002, 220, 198, 198, 1073, 3669, 62, 22065, 796, 1976, 27498, 7, 18, 11, 997, 5990, 9527, 8, 198, 36299, 79, 46912, 796, 1976, 27498, 7, 18, 11, 997, 5990, 9527, 11, 997, 9527, 8, 198, 198, 1640, 1312, 796, 352, 25, 22510, 9527, 220, 198, 220, 220, 220, 2471, 69, 13, 1136, 9527, 7222, 3669, 7, 763, 3669, 62, 22065, 11, 513, 11, 220, 997, 5990, 9527, 8, 198, 220, 220, 220, 264, 46583, 46912, 58, 45299, 1058, 11, 1312, 60, 796, 763, 3669, 62, 22065, 198, 220, 220, 220, 18703, 9527, 1026, 3419, 198, 437, 198, 198, 42503, 9527, 1026, 3419, 198, 7783, 264, 46583, 46912, 198, 437, 198, 198, 8818, 18703, 1026, 7, 27740, 3712, 5317, 8, 198, 2, 18703, 281, 41313, 286, 257, 1813, 15793, 198, 361, 357, 27740, 6624, 657, 8, 198, 220, 18703, 42369, 1026, 3419, 198, 17772, 361, 357, 27740, 855, 16, 8, 198, 220, 18703, 37021, 1026, 3419, 198, 17772, 361, 357, 27740, 6624, 362, 8, 198, 220, 18703, 9527, 1026, 3419, 198, 17772, 361, 357, 27740, 6624, 513, 8, 198, 220, 18703, 9527, 1026, 3419, 198, 437, 198, 198, 437, 220, 1303, 886, 2163, 628 ]
2.672727
385
const hotkeys = Hotkey[ Hotkey( "ctrl + alt + shift + s", SettingsWindow.showSettings ), Hotkey( "ctrl + shift + s", showFileSaveDialog ), Hotkey( "ctrl + s", menuFileSave ), Hotkey( "ctrl + o", showFileOpenDialog ), Hotkey( "ctrl + n", createNewMap ), Hotkey( "ctrl + m", MetadataWindow.configureMetadata ), Hotkey( "ctrl + shift + t", RoomWindow.configureRoom ), Hotkey( "ctrl + t", RoomWindow.createRoom ), Hotkey( "ctrl + shift + z", History.redo! ), Hotkey( "ctrl + z", History.undo! ), Hotkey( "ctrl + f", focusFilterEntry! ), Hotkey( "ctrl + plus", zoomIn! ), Hotkey( "ctrl + minus", zoomOut! ) ]
[ 9979, 3024, 13083, 796, 6964, 2539, 58, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 5988, 1343, 6482, 1343, 264, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 16163, 27703, 13, 12860, 26232, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 6482, 1343, 264, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 905, 8979, 16928, 44204, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 264, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 6859, 8979, 16928, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 267, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 905, 8979, 11505, 44204, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 299, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 2251, 3791, 13912, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 285, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 3395, 14706, 27703, 13, 11250, 495, 9171, 14706, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 6482, 1343, 256, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 10096, 27703, 13, 11250, 495, 41178, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 256, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 10096, 27703, 13, 17953, 41178, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 6482, 1343, 1976, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 7443, 13, 48454, 0, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 1976, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 7443, 13, 41204, 0, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 277, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 2962, 22417, 30150, 0, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 5556, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 19792, 818, 0, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 6964, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44755, 1343, 20208, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 19792, 7975, 0, 198, 220, 220, 220, 1267, 198, 60 ]
1.815476
504
""" Abstract continuous filter. """ abstract type Filter end """ IdentityFilter() Identity filter, which does not filter. """ struct IdentityFilter <: Filter end """ TopHatFilter(width) Top hat filter, parameterized by a variable filter width. """ struct TopHatFilter <: Filter width::Function end """ ConvolutionalFilter(kernel) Convolutional filter, parameterized by a filter kernel. """ struct ConvolutionalFilter <: Filter width::Function kernel::Function end """ GaussianFilter(h, σ) -> ConvolutionalFilter GaussianFilter(σ) -> ConvolutionalFilter Create Gaussian ConvolutionalFilter with domain width `2h` and variance `σ^2`. """ GaussianFilter(h, σ) = ConvolutionalFilter(h, x -> 1 / √(2π * σ^2) * exp(-x^2 / 2σ^2)) GaussianFilter(σ) = GaussianFilter(x -> 10σ, σ)
[ 37811, 198, 23839, 12948, 8106, 13, 198, 37811, 198, 397, 8709, 2099, 25853, 886, 628, 198, 37811, 198, 220, 220, 220, 27207, 22417, 3419, 198, 198, 7390, 26858, 8106, 11, 543, 857, 407, 8106, 13, 198, 37811, 198, 7249, 27207, 22417, 1279, 25, 25853, 886, 628, 198, 37811, 198, 220, 220, 220, 5849, 40483, 22417, 7, 10394, 8, 198, 198, 9126, 6877, 8106, 11, 11507, 1143, 416, 257, 7885, 8106, 9647, 13, 198, 37811, 198, 7249, 5849, 40483, 22417, 1279, 25, 25853, 198, 220, 220, 220, 9647, 3712, 22203, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 34872, 2122, 282, 22417, 7, 33885, 8, 198, 198, 3103, 85, 2122, 282, 8106, 11, 11507, 1143, 416, 257, 8106, 9720, 13, 198, 37811, 198, 7249, 34872, 2122, 282, 22417, 1279, 25, 25853, 198, 220, 220, 220, 9647, 3712, 22203, 198, 220, 220, 220, 9720, 3712, 22203, 198, 437, 198, 198, 37811, 198, 35389, 31562, 22417, 7, 71, 11, 18074, 225, 8, 4613, 34872, 2122, 282, 22417, 198, 35389, 31562, 22417, 7, 38392, 8, 4613, 34872, 2122, 282, 22417, 198, 198, 16447, 12822, 31562, 34872, 2122, 282, 22417, 351, 7386, 9647, 4600, 17, 71, 63, 290, 24198, 4600, 38392, 61, 17, 44646, 198, 37811, 198, 35389, 31562, 22417, 7, 71, 11, 18074, 225, 8, 796, 34872, 2122, 282, 22417, 7, 71, 11, 2124, 4613, 352, 1220, 18872, 248, 7, 17, 46582, 1635, 18074, 225, 61, 17, 8, 1635, 1033, 32590, 87, 61, 17, 1220, 362, 38392, 61, 17, 4008, 198, 35389, 31562, 22417, 7, 38392, 8, 796, 12822, 31562, 22417, 7, 87, 4613, 838, 38392, 11, 18074, 225, 8, 198 ]
3.007463
268
# Converts a String to Languages.Language (using STR_TO_LANG) convert(::Type{L}, lang::S) where {L<:Languages.Language, S<:AbstractString} = begin TypeLang = get(STR_TO_LANG, strip(lowercase(lang)), Languages.English) return TypeLang() end # Converts Languages.Language to String (using LANG_TO_STR) convert(::Type{S}, lang::Type{L}) where {L<:Languages.Language, S<:AbstractString} = get(LANG_TO_STR, lang, string(L)) convert(::Type{S}, lang::L) where {L<:Languages.Language, S<:AbstractString} = convert(S, L) # Overload ismatch to work matching any value within a vector occursin(r::Regex, strings::T) where T<:AbstractArray{<:AbstractString} = any(occursin(r, si) for si in sv); # Overload lowercase function to work with vectors of strings lowercase(v::T) where T<:AbstractArray{S} where S<:AbstractString = Base.lowercase.(v) """ detect_language(text [; default=DEFAULT_LANGUAGE]) Detects the language of a piece of `text`. Returns a language of type `Languages.Language`. If the text is empty of the confidence is low, return the `default` language. """ function detect_language(text::AbstractString; default=DEFAULT_LANGUAGE) isempty(text) && return default detector = LanguageDetector() l, _, c = detector(text) # returns (language, script, confidence) if c < 0.15 return default() else return l end end """ summarize(sentences [;ns=1, flags=DEFAULT_SUMMARIZATION_STRIP_FLAGS]) Build a summary of the text's `sentences`. The resulting summary will be a `ns` sentence document; each sentence is pre-procesed using the `flags` option. """ function summarize(sentences::Vector{S}; ns::Int=1, flags::UInt32=DEFAULT_SUMMARIZATION_STRIP_FLAGS ) where S<:AbstractString # Get document term matrix s = prepare.(sentences, flags) filter!(d->occursin(r"[a-zA-Z0-9]", d), s) t = dtm(DocumentTermMatrix{Float32}(s)) tf_idf!(t) # Page rank α = 0.85 # damping factor n = 100 # number of iterations ϵ = 1.0e-6 # convergence threhshold G = Graph(t' * t) try p = pagerank(G, α, n, ϵ) # Sort sentences and return text_summary = sentences[sort(sortperm(p, rev=true)[1:min(ns, length(p))])] return text_summary catch @warn "Summarization failed during TextRank. No summarization done." return sentences end end """ Post-processes a string to fit a certain length, adding … if necessary at the end of its choped represenation. """ function chop_to_length(input, len) input = replace(input, "\n" => "") idxs = collect(eachindex(input)) _idx = findlast(Base.:<=(len), idxs) if _idx == nothing _len=0 else _len = idxs[findlast(Base.:<=(len), idxs)] end length(input) > len ? input[1:_len] * "…" : input end
[ 2, 1482, 24040, 257, 10903, 284, 42860, 13, 32065, 357, 3500, 19269, 62, 10468, 62, 43, 15567, 8, 198, 1102, 1851, 7, 3712, 6030, 90, 43, 5512, 42392, 3712, 50, 8, 810, 1391, 43, 27, 25, 43, 33213, 13, 32065, 11, 311, 27, 25, 23839, 10100, 92, 796, 2221, 198, 220, 220, 220, 5994, 43, 648, 796, 651, 7, 18601, 62, 10468, 62, 43, 15567, 11, 10283, 7, 21037, 7442, 7, 17204, 36911, 42860, 13, 15823, 8, 198, 220, 220, 220, 1441, 5994, 43, 648, 3419, 198, 437, 198, 198, 2, 1482, 24040, 42860, 13, 32065, 284, 10903, 357, 3500, 406, 15567, 62, 10468, 62, 18601, 8, 198, 1102, 1851, 7, 3712, 6030, 90, 50, 5512, 42392, 3712, 6030, 90, 43, 30072, 810, 1391, 43, 27, 25, 43, 33213, 13, 32065, 11, 311, 27, 25, 23839, 10100, 92, 796, 198, 220, 220, 220, 651, 7, 43, 15567, 62, 10468, 62, 18601, 11, 42392, 11, 4731, 7, 43, 4008, 198, 198, 1102, 1851, 7, 3712, 6030, 90, 50, 5512, 42392, 3712, 43, 8, 810, 1391, 43, 27, 25, 43, 33213, 13, 32065, 11, 311, 27, 25, 23839, 10100, 92, 796, 198, 220, 220, 220, 10385, 7, 50, 11, 406, 8, 628, 198, 2, 3827, 2220, 318, 15699, 284, 670, 12336, 597, 1988, 1626, 257, 15879, 198, 13966, 1834, 259, 7, 81, 3712, 3041, 25636, 11, 13042, 3712, 51, 8, 810, 309, 27, 25, 23839, 19182, 90, 27, 25, 23839, 10100, 92, 796, 198, 220, 220, 220, 597, 7, 13966, 1834, 259, 7, 81, 11, 33721, 8, 329, 33721, 287, 38487, 1776, 628, 198, 2, 3827, 2220, 2793, 7442, 2163, 284, 670, 351, 30104, 286, 13042, 198, 21037, 7442, 7, 85, 3712, 51, 8, 810, 309, 27, 25, 23839, 19182, 90, 50, 92, 810, 311, 27, 25, 23839, 10100, 796, 198, 220, 220, 220, 7308, 13, 21037, 7442, 12195, 85, 8, 628, 198, 37811, 198, 220, 220, 220, 4886, 62, 16129, 7, 5239, 685, 26, 4277, 28, 7206, 38865, 62, 43, 15567, 52, 11879, 12962, 198, 198, 47504, 82, 262, 3303, 286, 257, 3704, 286, 4600, 5239, 44646, 16409, 257, 3303, 286, 198, 4906, 4600, 43, 33213, 13, 32065, 44646, 1002, 262, 2420, 318, 6565, 286, 262, 6628, 198, 271, 1877, 11, 1441, 262, 4600, 12286, 63, 3303, 13, 198, 37811, 198, 8818, 4886, 62, 16129, 7, 5239, 3712, 23839, 10100, 26, 4277, 28, 7206, 38865, 62, 43, 15567, 52, 11879, 8, 198, 220, 220, 220, 318, 28920, 7, 5239, 8, 11405, 1441, 4277, 198, 220, 220, 220, 31029, 796, 15417, 11242, 9250, 3419, 198, 220, 220, 220, 300, 11, 4808, 11, 269, 796, 31029, 7, 5239, 8, 220, 1303, 5860, 357, 16129, 11, 4226, 11, 6628, 8, 198, 220, 220, 220, 611, 269, 1279, 657, 13, 1314, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4277, 3419, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 300, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 35743, 7, 34086, 3007, 685, 26, 5907, 28, 16, 11, 9701, 28, 7206, 38865, 62, 50, 5883, 40569, 14887, 6234, 62, 18601, 4061, 62, 38948, 50, 12962, 198, 198, 15580, 257, 10638, 286, 262, 2420, 338, 4600, 34086, 3007, 44646, 383, 7186, 10638, 481, 307, 198, 64, 4600, 5907, 63, 6827, 3188, 26, 1123, 6827, 318, 662, 12, 1676, 728, 276, 1262, 262, 198, 63, 33152, 63, 3038, 13, 198, 37811, 198, 8818, 35743, 7, 34086, 3007, 3712, 38469, 90, 50, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36545, 3712, 5317, 28, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9701, 3712, 52, 5317, 2624, 28, 7206, 38865, 62, 50, 5883, 40569, 14887, 6234, 62, 18601, 4061, 62, 38948, 50, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 311, 27, 25, 23839, 10100, 198, 220, 220, 220, 1303, 3497, 3188, 3381, 17593, 198, 220, 220, 220, 264, 796, 8335, 12195, 34086, 3007, 11, 9701, 8, 198, 220, 220, 220, 8106, 0, 7, 67, 3784, 13966, 1834, 259, 7, 81, 17912, 64, 12, 89, 32, 12, 57, 15, 12, 24, 60, 1600, 288, 828, 264, 8, 198, 220, 220, 220, 256, 796, 288, 17209, 7, 24941, 40596, 46912, 90, 43879, 2624, 92, 7, 82, 4008, 198, 220, 220, 220, 48700, 62, 312, 69, 0, 7, 83, 8, 198, 220, 220, 220, 1303, 7873, 4279, 198, 220, 220, 220, 26367, 796, 657, 13, 5332, 220, 1303, 21151, 278, 5766, 198, 220, 220, 220, 299, 796, 1802, 220, 1303, 1271, 286, 34820, 198, 220, 220, 220, 18074, 113, 796, 352, 13, 15, 68, 12, 21, 220, 1303, 40826, 294, 260, 71, 1477, 727, 198, 220, 220, 220, 402, 796, 29681, 7, 83, 6, 1635, 256, 8, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 279, 3536, 962, 7, 38, 11, 26367, 11, 299, 11, 18074, 113, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 33947, 13439, 290, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 2420, 62, 49736, 796, 13439, 58, 30619, 7, 30619, 16321, 7, 79, 11, 2710, 28, 7942, 38381, 16, 25, 1084, 7, 5907, 11, 4129, 7, 79, 4008, 12962, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2420, 62, 49736, 198, 220, 220, 220, 4929, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 366, 13065, 3876, 1634, 4054, 1141, 8255, 27520, 13, 1400, 15676, 1634, 1760, 526, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 13439, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 6307, 12, 14681, 274, 257, 4731, 284, 4197, 257, 1728, 4129, 11, 4375, 3926, 611, 3306, 198, 265, 262, 886, 286, 663, 442, 19458, 1128, 411, 268, 341, 13, 198, 37811, 198, 8818, 30506, 62, 1462, 62, 13664, 7, 15414, 11, 18896, 8, 198, 220, 220, 220, 220, 5128, 796, 6330, 7, 15414, 11, 37082, 77, 1, 5218, 366, 4943, 198, 220, 220, 220, 220, 4686, 34223, 796, 2824, 7, 27379, 9630, 7, 15414, 4008, 198, 220, 220, 220, 220, 4808, 312, 87, 796, 1064, 12957, 7, 14881, 11207, 27, 16193, 11925, 828, 4686, 34223, 8, 198, 220, 220, 220, 220, 611, 4808, 312, 87, 6624, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 11925, 28, 15, 198, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 11925, 796, 4686, 34223, 58, 19796, 12957, 7, 14881, 11207, 27, 16193, 11925, 828, 4686, 34223, 15437, 198, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 4129, 7, 15414, 8, 1875, 18896, 5633, 5128, 58, 16, 25, 62, 11925, 60, 1635, 366, 9962, 220, 1058, 5128, 198, 437, 198 ]
2.527972
1,144
""" Planet(optimizer, eager::Bool) Planet integrates a SAT solver (`PicoSAT.jl`) to find an activation pattern that maps a feasible input to an infeasible output. # Problem requirement 1. Network: any depth, ReLU activation 2. Input: hyperrectangle or bounded hpolytope 3. Output: PolytopeComplement # Return `BasicResult` # Method Binary search of activations (0/1) and pruning by optimization. Our implementation is non eager. - `optimizer` default `GLPKSolverMIP()`; - `eager` default `false`; # Property Sound and complete. # Reference [R. Ehlers, "Formal Verification of Piece-Wise Linear Feed-Forward Neural Networks," in *International Symposium on Automated Technology for Verification and Analysis*, 2017.](https://arxiv.org/abs/1705.01320) [https://github.com/progirep/planet](https://github.com/progirep/planet) """ @with_kw struct Planet <: Solver optimizer = GLPK.Optimizer eager::Bool = false end function solve(solver::Planet, problem::Problem) @assert ~solver.eager "Eager implementation not supported yet" isbounded(problem.input) || UnboundedInputError("Planet does not accept unbounded input sets.") # Refine bounds. The bounds are values after activation status, bounds = tighten_bounds(problem, solver.optimizer) status == OPTIMAL || return CounterExampleResult(:holds) ψ = init_ψ(problem.network, bounds) δ = PicoSAT.solve(ψ) opt = solver.optimizer # Main loop to compute the SAT problem while δ != :unsatisfiable status, conflict = elastic_filtering(problem, δ, bounds, opt) status == INFEASIBLE || return CounterExampleResult(:violated, conflict) push!(ψ, conflict) δ = PicoSAT.solve(ψ) end return CounterExampleResult(:holds) end function init_ψ(nnet::Network, bounds::Vector{Hyperrectangle}) ψ = Vector{Vector{Int64}}() index = 0 for i in 1:length(bounds)-1 index = set_activation_pattern!(ψ, nnet.layers[i], bounds[i], index) end return ψ end function set_activation_pattern!(ψ::Vector{Vector{Int64}}, L::Layer{ReLU}, bound::Hyperrectangle, index::Int64) before_act_bound = approximate_affine_map(L, bound) lower = low(before_act_bound) upper = high(before_act_bound) for j in 1:length(lower) index += 1 lower[j] > 0 && push!(ψ, [index]) upper[j] < 0 && push!(ψ, [-index]) lower[j] <= 0 <= upper[j] && push!(ψ, [index, -index]) end return index end function set_activation_pattern!(ψ::Vector{Vector{Int64}}, L::Layer{Id}, bound::Hyperrectangle, index::Int64) n = n_nodes(L) for j in 1:n index += 1 push!(ψ, [index]) end return index end function elastic_filtering(problem::Problem, δ::Vector{Vector{Bool}}, bounds::Vector{Hyperrectangle}, optimizer) model = Model(optimizer) model[:bounds] = bounds model[:δ] = δ z = init_vars(model, problem.network, :z, with_input=true) slack = init_vars(model, problem.network, :slack) add_set_constraint!(model, problem.input, first(z)) add_complementary_set_constraint!(model, problem.output, last(z)) encode_network!(model, problem.network, TriangularRelaxedLP()) encode_network!(model, problem.network, SlackLP()) min_sum!(model, slack) conflict = Vector{Int64}() act = get_activation(problem.network, bounds) while true optimize!(model) termination_status(model) == OPTIMAL || return (INFEASIBLE, conflict) (m, index) = max_slack(slack, act) m > 0.0 || return (:Feasible, value(first(z))) # activated z get a factor of (-1) coeff = δ[index[1]][index[2]] ? -1 : 1 node = coeff * get_node_id(problem.network, index) push!(conflict, node) @constraint(model, slack[index[1]][index[2]] == 0.0) end end function elastic_filtering(problem::Problem, list::Vector{Int64}, bounds::Vector{Hyperrectangle}, optimizer) return elastic_filtering(problem, get_assignment(problem.network, list), bounds, optimizer) end function max_slack(x::Vector{<:Vector}, act) m = 0.0 index = (0, 0) for i in 1:length(x), j in 1:length(x[i]) if act[i][j] == 0 # Only return undetermined nodes val = value(x[i][j]) if val > m m = val index = (i, j) end end end return (m, index) end # Only use tighten_bounds for feasibility check function tighten_bounds(problem::Problem, optimizer) model = Model(optimizer) model[:bounds] = bounds = get_bounds(problem) z = init_vars(model, problem.network, :z, with_input=true) add_set_constraint!(model, problem.input, first(z)) add_complementary_set_constraint!(model, problem.output, last(z)) encode_network!(model, problem.network, TriangularRelaxedLP()) new_bounds = Vector{Hyperrectangle}(undef, length(z)) for i in 1:length(z) lower = low(bounds[i]) upper = high(bounds[i]) for j in 1:length(z[i]) zᵢⱼ = z[i][j] @objective(model, Min, zᵢⱼ) optimize!(model) termination_status(model) == OPTIMAL || return (INFEASIBLE, bounds) lower[j] = value(zᵢⱼ) @objective(model, Max, zᵢⱼ) optimize!(model) upper[j] = value(zᵢⱼ) end new_bounds[i] = Hyperrectangle(low = lower, high = upper) end return (OPTIMAL, new_bounds) end function get_assignment(nnet::Network, list::Vector{Int64}) p = Vector{Vector{Bool}}(undef, length(nnet.layers)) ℓ_start = 1 for (i, layer) in enumerate(nnet.layers) ℓ_next = ℓ_start + n_nodes(layer) p[i] = get_assignment(layer, list[ℓ_start:ℓ_next-1]) ℓ_start = ℓ_next end return p end get_assignment(L::Layer{ReLU}, list::Vector{Int64}) = list .> 0 get_assignment(L::Layer{Id}, list::Vector{Int64}) = trues(length(list)) function get_node_id(nnet::Network, x::Tuple{Int64, Int64}) # All the nodes in the previous layers n = sum(n_nodes.(nnet.layers[1:x[1]-1])) # Plus the previous nodes in the current layer return n + x[2] end # NOTE: not used - # function get_node_id(nnet::Network, n::Int64) # i = 0 # j = n # while j > length(nnet.layers[i+1].bias) # i += 1 # j = j - length(nnet.layers[i].bias) # end # return (i, j) # end
[ 37811, 198, 220, 220, 220, 11397, 7, 40085, 7509, 11, 11069, 3712, 33, 970, 8, 198, 198, 41801, 48105, 257, 29020, 1540, 332, 357, 63, 47, 3713, 50, 1404, 13, 20362, 63, 8, 284, 1064, 281, 14916, 3912, 326, 8739, 257, 23498, 5128, 284, 281, 1167, 30412, 856, 5072, 13, 198, 198, 2, 20647, 9079, 198, 16, 13, 7311, 25, 597, 6795, 11, 797, 41596, 14916, 198, 17, 13, 23412, 25, 8718, 2554, 9248, 393, 49948, 27673, 3366, 83, 3008, 198, 18, 13, 25235, 25, 12280, 83, 3008, 5377, 26908, 198, 198, 2, 8229, 198, 63, 26416, 23004, 63, 198, 198, 2, 11789, 198, 33, 3219, 2989, 286, 1753, 602, 357, 15, 14, 16, 8, 290, 778, 46493, 416, 23989, 13, 3954, 7822, 318, 1729, 11069, 13, 198, 12, 4600, 40085, 7509, 63, 4277, 4600, 8763, 47, 27015, 14375, 44, 4061, 3419, 63, 26, 198, 12, 4600, 68, 3536, 63, 4277, 4600, 9562, 63, 26, 198, 198, 2, 14161, 198, 21369, 290, 1844, 13, 198, 198, 2, 20984, 198, 58, 49, 13, 31480, 8116, 11, 366, 37, 6636, 4643, 2649, 286, 27053, 12, 54, 786, 44800, 18272, 12, 39746, 47986, 27862, 553, 198, 259, 1635, 24274, 15845, 35864, 319, 17406, 515, 8987, 329, 4643, 2649, 290, 14691, 25666, 2177, 8183, 7, 5450, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 1558, 2713, 13, 486, 19504, 8, 198, 198, 58, 5450, 1378, 12567, 13, 785, 14, 1676, 70, 557, 79, 14, 47427, 16151, 5450, 1378, 12567, 13, 785, 14, 1676, 70, 557, 79, 14, 47427, 8, 198, 37811, 198, 31, 4480, 62, 46265, 2878, 11397, 1279, 25, 4294, 332, 198, 220, 220, 220, 6436, 7509, 796, 10188, 40492, 13, 27871, 320, 7509, 198, 220, 220, 220, 11069, 3712, 33, 970, 796, 3991, 198, 437, 198, 198, 8818, 8494, 7, 82, 14375, 3712, 41801, 11, 1917, 3712, 40781, 8, 198, 220, 220, 220, 2488, 30493, 5299, 82, 14375, 13, 68, 3536, 366, 36, 3536, 7822, 407, 4855, 1865, 1, 198, 220, 220, 220, 318, 65, 6302, 7, 45573, 13, 15414, 8, 8614, 791, 65, 6302, 20560, 12331, 7203, 41801, 857, 407, 2453, 22619, 6302, 5128, 5621, 19570, 198, 220, 220, 220, 1303, 6524, 500, 22303, 13, 383, 22303, 389, 3815, 706, 14916, 198, 220, 220, 220, 3722, 11, 22303, 796, 31833, 62, 65, 3733, 7, 45573, 11, 1540, 332, 13, 40085, 7509, 8, 198, 220, 220, 220, 3722, 6624, 39852, 3955, 1847, 8614, 1441, 15034, 16281, 23004, 7, 25, 2946, 82, 8, 198, 220, 220, 220, 18074, 230, 796, 2315, 62, 139, 230, 7, 45573, 13, 27349, 11, 22303, 8, 198, 220, 220, 220, 7377, 112, 796, 350, 3713, 50, 1404, 13, 82, 6442, 7, 139, 230, 8, 198, 220, 220, 220, 2172, 796, 1540, 332, 13, 40085, 7509, 198, 220, 220, 220, 1303, 8774, 9052, 284, 24061, 262, 29020, 1917, 198, 220, 220, 220, 981, 7377, 112, 14512, 1058, 13271, 17403, 3379, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 11, 5358, 796, 27468, 62, 10379, 20212, 7, 45573, 11, 7377, 112, 11, 22303, 11, 2172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 6624, 3268, 15112, 1921, 34563, 8614, 1441, 15034, 16281, 23004, 7, 25, 17069, 515, 11, 5358, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 139, 230, 11, 5358, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 796, 350, 3713, 50, 1404, 13, 82, 6442, 7, 139, 230, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 15034, 16281, 23004, 7, 25, 2946, 82, 8, 198, 437, 198, 198, 8818, 2315, 62, 139, 230, 7, 77, 3262, 3712, 26245, 11, 22303, 3712, 38469, 90, 38197, 2554, 9248, 30072, 198, 220, 220, 220, 18074, 230, 796, 20650, 90, 38469, 90, 5317, 2414, 11709, 3419, 198, 220, 220, 220, 6376, 796, 657, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 65, 3733, 13219, 16, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 900, 62, 48545, 62, 33279, 0, 7, 139, 230, 11, 299, 3262, 13, 75, 6962, 58, 72, 4357, 22303, 58, 72, 4357, 6376, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 18074, 230, 198, 437, 198, 8818, 900, 62, 48545, 62, 33279, 0, 7, 139, 230, 3712, 38469, 90, 38469, 90, 5317, 2414, 92, 5512, 406, 3712, 49925, 90, 3041, 41596, 5512, 5421, 3712, 38197, 2554, 9248, 11, 6376, 3712, 5317, 2414, 8, 198, 220, 220, 220, 878, 62, 529, 62, 7784, 796, 27665, 62, 2001, 500, 62, 8899, 7, 43, 11, 5421, 8, 198, 220, 220, 220, 2793, 796, 1877, 7, 19052, 62, 529, 62, 7784, 8, 198, 220, 220, 220, 6727, 796, 1029, 7, 19052, 62, 529, 62, 7784, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 13664, 7, 21037, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2793, 58, 73, 60, 1875, 657, 11405, 4574, 0, 7, 139, 230, 11, 685, 9630, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 6727, 58, 73, 60, 1279, 657, 11405, 4574, 0, 7, 139, 230, 11, 25915, 9630, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2793, 58, 73, 60, 19841, 657, 19841, 6727, 58, 73, 60, 11405, 4574, 0, 7, 139, 230, 11, 685, 9630, 11, 532, 9630, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 6376, 198, 437, 198, 8818, 900, 62, 48545, 62, 33279, 0, 7, 139, 230, 3712, 38469, 90, 38469, 90, 5317, 2414, 92, 5512, 406, 3712, 49925, 90, 7390, 5512, 5421, 3712, 38197, 2554, 9248, 11, 6376, 3712, 5317, 2414, 8, 198, 220, 220, 220, 299, 796, 299, 62, 77, 4147, 7, 43, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 139, 230, 11, 685, 9630, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 6376, 198, 437, 628, 198, 8818, 27468, 62, 10379, 20212, 7, 45573, 3712, 40781, 11, 7377, 112, 3712, 38469, 90, 38469, 90, 33, 970, 92, 5512, 22303, 3712, 38469, 90, 38197, 2554, 9248, 5512, 6436, 7509, 8, 198, 220, 220, 220, 2746, 796, 9104, 7, 40085, 7509, 8, 198, 220, 220, 220, 2746, 58, 25, 65, 3733, 60, 796, 22303, 198, 220, 220, 220, 2746, 58, 25, 138, 112, 60, 796, 7377, 112, 198, 220, 220, 220, 1976, 796, 2315, 62, 85, 945, 7, 19849, 11, 1917, 13, 27349, 11, 1058, 89, 11, 351, 62, 15414, 28, 7942, 8, 198, 220, 220, 220, 30740, 796, 2315, 62, 85, 945, 7, 19849, 11, 1917, 13, 27349, 11, 1058, 6649, 441, 8, 628, 220, 220, 220, 751, 62, 2617, 62, 1102, 2536, 2913, 0, 7, 19849, 11, 1917, 13, 15414, 11, 717, 7, 89, 4008, 198, 220, 220, 220, 751, 62, 785, 26908, 560, 62, 2617, 62, 1102, 2536, 2913, 0, 7, 19849, 11, 1917, 13, 22915, 11, 938, 7, 89, 4008, 198, 220, 220, 220, 37773, 62, 27349, 0, 7, 19849, 11, 1917, 13, 27349, 11, 7563, 21413, 6892, 897, 276, 19930, 28955, 198, 220, 220, 220, 37773, 62, 27349, 0, 7, 19849, 11, 1917, 13, 27349, 11, 36256, 19930, 28955, 198, 220, 220, 220, 949, 62, 16345, 0, 7, 19849, 11, 30740, 8, 628, 220, 220, 220, 5358, 796, 20650, 90, 5317, 2414, 92, 3419, 198, 220, 220, 220, 719, 796, 651, 62, 48545, 7, 45573, 13, 27349, 11, 22303, 8, 198, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 27183, 0, 7, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 19883, 62, 13376, 7, 19849, 8, 6624, 39852, 3955, 1847, 8614, 1441, 357, 1268, 15112, 1921, 34563, 11, 5358, 8, 198, 220, 220, 220, 220, 220, 220, 220, 357, 76, 11, 6376, 8, 796, 3509, 62, 6649, 441, 7, 6649, 441, 11, 719, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 1875, 657, 13, 15, 8614, 1441, 357, 25, 14304, 292, 856, 11, 1988, 7, 11085, 7, 89, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 13906, 1976, 651, 257, 5766, 286, 13841, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 763, 14822, 796, 7377, 112, 58, 9630, 58, 16, 60, 7131, 9630, 58, 17, 11907, 5633, 532, 16, 1058, 352, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 796, 763, 14822, 1635, 651, 62, 17440, 62, 312, 7, 45573, 13, 27349, 11, 6376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 10414, 13758, 11, 10139, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 30740, 58, 9630, 58, 16, 60, 7131, 9630, 58, 17, 11907, 6624, 657, 13, 15, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 27468, 62, 10379, 20212, 7, 45573, 3712, 40781, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1351, 3712, 38469, 90, 5317, 2414, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22303, 3712, 38469, 90, 38197, 2554, 9248, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6436, 7509, 8, 198, 220, 220, 220, 1441, 27468, 62, 10379, 20212, 7, 45573, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 651, 62, 562, 16747, 7, 45573, 13, 27349, 11, 1351, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22303, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6436, 7509, 8, 198, 437, 198, 198, 8818, 3509, 62, 6649, 441, 7, 87, 3712, 38469, 90, 27, 25, 38469, 5512, 719, 8, 198, 220, 220, 220, 285, 796, 657, 13, 15, 198, 220, 220, 220, 6376, 796, 357, 15, 11, 657, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 87, 828, 474, 287, 352, 25, 13664, 7, 87, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 611, 719, 58, 72, 7131, 73, 60, 6624, 657, 1303, 5514, 1441, 3318, 23444, 13760, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 1988, 7, 87, 58, 72, 7131, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1188, 1875, 285, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 796, 1188, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 357, 72, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 357, 76, 11, 6376, 8, 198, 437, 198, 198, 2, 5514, 779, 31833, 62, 65, 3733, 329, 40460, 2198, 198, 8818, 31833, 62, 65, 3733, 7, 45573, 3712, 40781, 11, 6436, 7509, 8, 198, 220, 220, 220, 2746, 796, 9104, 7, 40085, 7509, 8, 198, 220, 220, 220, 2746, 58, 25, 65, 3733, 60, 796, 22303, 796, 651, 62, 65, 3733, 7, 45573, 8, 198, 220, 220, 220, 1976, 796, 2315, 62, 85, 945, 7, 19849, 11, 1917, 13, 27349, 11, 1058, 89, 11, 351, 62, 15414, 28, 7942, 8, 198, 220, 220, 220, 751, 62, 2617, 62, 1102, 2536, 2913, 0, 7, 19849, 11, 1917, 13, 15414, 11, 717, 7, 89, 4008, 198, 220, 220, 220, 751, 62, 785, 26908, 560, 62, 2617, 62, 1102, 2536, 2913, 0, 7, 19849, 11, 1917, 13, 22915, 11, 938, 7, 89, 4008, 198, 220, 220, 220, 37773, 62, 27349, 0, 7, 19849, 11, 1917, 13, 27349, 11, 7563, 21413, 6892, 897, 276, 19930, 28955, 628, 220, 220, 220, 649, 62, 65, 3733, 796, 20650, 90, 38197, 2554, 9248, 92, 7, 917, 891, 11, 4129, 7, 89, 4008, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2793, 796, 1877, 7, 65, 3733, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 6727, 796, 1029, 7, 65, 3733, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 13664, 7, 89, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 39611, 95, 158, 109, 120, 796, 1976, 58, 72, 7131, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 15252, 425, 7, 19849, 11, 1855, 11, 1976, 39611, 95, 158, 109, 120, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27183, 0, 7, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19883, 62, 13376, 7, 19849, 8, 6624, 39852, 3955, 1847, 8614, 1441, 357, 1268, 15112, 1921, 34563, 11, 22303, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2793, 58, 73, 60, 796, 1988, 7, 89, 39611, 95, 158, 109, 120, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 15252, 425, 7, 19849, 11, 5436, 11, 1976, 39611, 95, 158, 109, 120, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27183, 0, 7, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6727, 58, 73, 60, 796, 1988, 7, 89, 39611, 95, 158, 109, 120, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 65, 3733, 58, 72, 60, 796, 15079, 2554, 9248, 7, 9319, 796, 2793, 11, 1029, 796, 6727, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 357, 3185, 51, 3955, 1847, 11, 649, 62, 65, 3733, 8, 198, 437, 628, 198, 8818, 651, 62, 562, 16747, 7, 77, 3262, 3712, 26245, 11, 1351, 3712, 38469, 90, 5317, 2414, 30072, 198, 220, 220, 220, 279, 796, 20650, 90, 38469, 90, 33, 970, 11709, 7, 917, 891, 11, 4129, 7, 77, 3262, 13, 75, 6962, 4008, 198, 220, 220, 220, 2343, 226, 241, 62, 9688, 796, 352, 198, 220, 220, 220, 329, 357, 72, 11, 7679, 8, 287, 27056, 378, 7, 77, 3262, 13, 75, 6962, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2343, 226, 241, 62, 19545, 796, 2343, 226, 241, 62, 9688, 1343, 299, 62, 77, 4147, 7, 29289, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 58, 72, 60, 796, 651, 62, 562, 16747, 7, 29289, 11, 1351, 58, 158, 226, 241, 62, 9688, 25, 158, 226, 241, 62, 19545, 12, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2343, 226, 241, 62, 9688, 796, 2343, 226, 241, 62, 19545, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 279, 198, 437, 198, 1136, 62, 562, 16747, 7, 43, 3712, 49925, 90, 3041, 41596, 5512, 1351, 3712, 38469, 90, 5317, 2414, 30072, 796, 1351, 764, 29, 657, 198, 1136, 62, 562, 16747, 7, 43, 3712, 49925, 90, 7390, 5512, 220, 220, 1351, 3712, 38469, 90, 5317, 2414, 30072, 796, 491, 947, 7, 13664, 7, 4868, 4008, 198, 198, 8818, 651, 62, 17440, 62, 312, 7, 77, 3262, 3712, 26245, 11, 2124, 3712, 51, 29291, 90, 5317, 2414, 11, 2558, 2414, 30072, 198, 220, 220, 220, 1303, 1439, 262, 13760, 287, 262, 2180, 11685, 198, 220, 220, 220, 299, 796, 2160, 7, 77, 62, 77, 4147, 12195, 77, 3262, 13, 75, 6962, 58, 16, 25, 87, 58, 16, 45297, 16, 60, 4008, 628, 220, 220, 220, 1303, 8227, 262, 2180, 13760, 287, 262, 1459, 7679, 198, 220, 220, 220, 1441, 299, 1343, 2124, 58, 17, 60, 198, 437, 198, 198, 2, 24550, 25, 407, 973, 532, 198, 2, 2163, 651, 62, 17440, 62, 312, 7, 77, 3262, 3712, 26245, 11, 299, 3712, 5317, 2414, 8, 198, 2, 220, 220, 220, 220, 1312, 796, 657, 198, 2, 220, 220, 220, 220, 474, 796, 299, 198, 2, 220, 220, 220, 220, 981, 474, 1875, 4129, 7, 77, 3262, 13, 75, 6962, 58, 72, 10, 16, 4083, 65, 4448, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 15853, 352, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 474, 532, 4129, 7, 77, 3262, 13, 75, 6962, 58, 72, 4083, 65, 4448, 8, 198, 2, 220, 220, 220, 220, 886, 198, 2, 220, 220, 220, 220, 1441, 357, 72, 11, 474, 8, 198, 2, 886 ]
2.289169
2,853
## Code dealing with Face mutable struct Face nvertex::Int64 X::Array{Float64,1} Y::Array{Float64,1} Z::Array{Float64,1} I::Array{Int64,1} J::Array{Int64,1} K::Array{Int64,1} end """Default Constructor for Face """ function Face() return Face(0,Float64[], Float64[],Float64[],Int64[],Int64[],Int64[]) end """ Add a vertex to a face Args f: Face x: x-vertex y: y-vertex z: z-vertex i: index of x j: index of y k: index of z """ function add_face_vertex(f::Face, x::Float64, y::Float64, z::Float64,i::Int64,j::Int64,k::Int64) push!(f.X,x) push!(f.Y,y) push!(f.Z,z) push!(f.I,i) push!(f.J,j) push!(f.K,k) f.nvertex+=1 end """ Check to see if two faces are the same by matching vertices Args f: another face Returns match_indices e.g. [[1,2],[1,4]] Face 1 matches Face 2, Face 1 matches Face 4 """ function match_face_indicies(f1::Face,f2::Face) tol = 1E-6 matchedIndices = Any[] for i in 1:f1.nvertex for j in 1:f1.nvertex dx = abs(f1.X[i] - f2.X[j]) dy = abs(f1.Y[i] - f2.Y[j]) dz = abs(f1.Z[i] - f2.Z[j]) if ((dx<tol) && (dy<tol) && (dz<tol)) push!(matchedIndices,[i j]) end end end return matchedIndices end Base.:(==)(lhs::Face, rhs::Face) = (length(match_face_indicies(lhs,rhs)) == rhs.nvertex) Base.:(!=)(lhs::Face, rhs::Face) = (length(match_face_indicies(lhs,rhs)) != lhs.nvertex) ## End Face
[ 2235, 6127, 7219, 351, 15399, 220, 198, 76, 18187, 2878, 15399, 198, 220, 220, 220, 299, 332, 16886, 3712, 5317, 2414, 198, 220, 220, 220, 1395, 3712, 19182, 90, 43879, 2414, 11, 16, 92, 198, 220, 220, 220, 575, 3712, 19182, 90, 43879, 2414, 11, 16, 92, 198, 220, 220, 220, 1168, 3712, 19182, 90, 43879, 2414, 11, 16, 92, 198, 220, 220, 220, 314, 3712, 19182, 90, 5317, 2414, 11, 16, 92, 198, 220, 220, 220, 449, 3712, 19182, 90, 5317, 2414, 11, 16, 92, 198, 220, 220, 220, 509, 3712, 19182, 90, 5317, 2414, 11, 16, 92, 220, 220, 198, 437, 198, 198, 37811, 19463, 28407, 273, 329, 15399, 220, 198, 37811, 198, 8818, 15399, 3419, 220, 220, 220, 220, 198, 220, 220, 220, 1441, 15399, 7, 15, 11, 43879, 2414, 58, 4357, 48436, 2414, 58, 4357, 43879, 2414, 58, 4357, 5317, 2414, 58, 4357, 5317, 2414, 58, 4357, 5317, 2414, 58, 12962, 198, 437, 198, 198, 37811, 3060, 257, 37423, 284, 257, 1986, 220, 198, 220, 220, 220, 943, 14542, 198, 220, 220, 220, 220, 220, 220, 220, 277, 25, 15399, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 25, 2124, 12, 332, 16886, 198, 220, 220, 220, 220, 220, 220, 220, 331, 25, 331, 12, 332, 16886, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 25, 1976, 12, 332, 16886, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 25, 6376, 286, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 474, 25, 6376, 286, 331, 198, 220, 220, 220, 220, 220, 220, 220, 479, 25, 6376, 286, 1976, 198, 37811, 198, 8818, 751, 62, 2550, 62, 332, 16886, 7, 69, 3712, 32388, 11, 2124, 3712, 43879, 2414, 11, 331, 3712, 43879, 2414, 11, 1976, 3712, 43879, 2414, 11, 72, 3712, 5317, 2414, 11, 73, 3712, 5317, 2414, 11, 74, 3712, 5317, 2414, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 55, 11, 87, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 56, 11, 88, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 57, 11, 89, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 40, 11, 72, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 41, 11, 73, 8, 198, 220, 220, 220, 4574, 0, 7, 69, 13, 42, 11, 74, 8, 198, 220, 220, 220, 277, 13, 77, 332, 16886, 47932, 16, 198, 437, 628, 198, 37811, 6822, 284, 766, 611, 734, 6698, 389, 262, 976, 416, 12336, 9421, 1063, 198, 220, 220, 220, 943, 14542, 198, 220, 220, 220, 220, 220, 220, 220, 277, 25, 1194, 1986, 198, 220, 220, 220, 16409, 198, 220, 220, 220, 220, 220, 220, 220, 2872, 62, 521, 1063, 304, 13, 70, 13, 16410, 16, 11, 17, 38430, 16, 11, 19, 11907, 15399, 352, 7466, 15399, 362, 11, 15399, 352, 7466, 15399, 604, 198, 37811, 198, 8818, 2872, 62, 2550, 62, 521, 291, 444, 7, 69, 16, 3712, 32388, 11, 69, 17, 3712, 32388, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 284, 75, 796, 352, 36, 12, 21, 198, 220, 220, 220, 14451, 5497, 1063, 796, 4377, 21737, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 69, 16, 13, 77, 332, 16886, 198, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 69, 16, 13, 77, 332, 16886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44332, 796, 2352, 7, 69, 16, 13, 55, 58, 72, 60, 532, 277, 17, 13, 55, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20268, 796, 2352, 7, 69, 16, 13, 56, 58, 72, 60, 532, 277, 17, 13, 56, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 89, 796, 2352, 7, 69, 16, 13, 57, 58, 72, 60, 532, 277, 17, 13, 57, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 14808, 34350, 27, 83, 349, 8, 11405, 357, 9892, 27, 83, 349, 8, 11405, 357, 67, 89, 27, 83, 349, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31409, 5497, 1063, 17414, 72, 474, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 14451, 5497, 1063, 198, 437, 198, 198, 14881, 11207, 7, 855, 5769, 75, 11994, 3712, 32388, 11, 9529, 82, 3712, 32388, 8, 796, 357, 13664, 7, 15699, 62, 2550, 62, 521, 291, 444, 7, 75, 11994, 11, 81, 11994, 4008, 6624, 9529, 82, 13, 77, 332, 16886, 8, 198, 14881, 11207, 7, 0, 28, 5769, 75, 11994, 3712, 32388, 11, 9529, 82, 3712, 32388, 8, 796, 357, 13664, 7, 15699, 62, 2550, 62, 521, 291, 444, 7, 75, 11994, 11, 81, 11994, 4008, 14512, 300, 11994, 13, 77, 332, 16886, 8, 198, 2235, 5268, 15399 ]
1.879952
833
""" reflect(v, n) Reflect direction `v` at plane with normal `n`. """ function reflect(v, n) @assert(abs(norm(n) - 1) < 1e-11, "surface normal must be normalized") return v - 2*dot(v, n)*n end """ refract(v, n, ni_over_nt) Compute direction of refracted ray according to Snell's law, or return `nothing` if no solution exists. """ function refract(v, n, ni_over_nt) @assert(abs(norm(v) - 1) < 1e-11, "input ray direction must be normalized") @assert(abs(norm(n) - 1) < 1e-11, "surface normal must be normalized") dt = dot(v, n) discriminant = 1 - ni_over_nt^2 * (1 - dt^2) if discriminant > 0 return ni_over_nt*(v - n*dt) - sqrt(discriminant)*n else return nothing end end """ schlick(cosine, ref_idx) Schlick's approximation of specular reflection coefficient. """ function schlick(cosine, ref_idx) r0 = ((1 - ref_idx) / (1 + ref_idx))^2 return r0 + (1 - r0) * (1 - cosine)^5 end abstract type Material end """ Lambertian surface (ideal diffusive reflection), specified by albedo (reflectance) per color channel. """ struct Lambertian <: Material albedo::Vector end """ scatter(lambertian, ray, rec) Compute scattered ray and color attenuation factors for a ray hitting a lambertian surface. """ function scatter(lambertian::Lambertian, ray::Ray, rec::HitRecord) scattered = Ray(rec.point, rec.normal + random_in_unit_sphere()) return (scattered, lambertian.albedo) end """ Metal surface, specified by albedo (reflectance) per color channel and fuzziness factor (scales random additive permutation of reflected ray). """ struct Metal <: Material # reflectance per color channel albedo::Vector # fuzziness factor fuzz::Real Metal(albedo, fuzz) = new(albedo, min(fuzz, 1)) end """ scatter(metal, ray, rec) Compute scattered ray and color attenuation factors for a ray hitting a metal surface. """ function scatter(metal::Metal, ray::Ray, rec::HitRecord) nraydir = unitvector(ray.direction) reflected = reflect(nraydir, rec.normal) scattered = Ray(rec.point, reflected + metal.fuzz*random_in_unit_sphere()) if dot(scattered.direction, rec.normal) > 0 return (scattered, metal.albedo) else return (nothing, metal.albedo) end end """ Dielectric surface, specified by ratio of the indices of refraction. """ struct Dielectric <: Material ref_idx::Real end """ scatter(dielectric, ray, rec) Compute scattered ray and color attenuation factors for a ray hitting a dielectric surface material. """ function scatter(dielectric::Dielectric, ray::Ray, rec::HitRecord) # normalized ray direction nraydir = unitvector(ray.direction) reflected = reflect(nraydir, rec.normal) cosine = dot(nraydir, rec.normal) if cosine > 0 refracted = refract(nraydir, -rec.normal, dielectric.ref_idx) else refracted = refract(nraydir, rec.normal, 1 / dielectric.ref_idx) cosine = -cosine end if refracted != nothing reflect_prob = schlick(cosine, dielectric.ref_idx) else reflect_prob = 1 end # randomly choose between reflection or refraction if rand() < reflect_prob return (Ray(rec.point, reflected), ones(3)) else return (Ray(rec.point, refracted), ones(3)) end end
[ 198, 37811, 198, 220, 220, 220, 4079, 7, 85, 11, 299, 8, 198, 198, 8134, 801, 4571, 4600, 85, 63, 379, 6614, 351, 3487, 4600, 77, 44646, 198, 37811, 198, 8818, 4079, 7, 85, 11, 299, 8, 198, 220, 220, 220, 2488, 30493, 7, 8937, 7, 27237, 7, 77, 8, 532, 352, 8, 1279, 352, 68, 12, 1157, 11, 366, 42029, 3487, 1276, 307, 39279, 4943, 198, 220, 220, 220, 1441, 410, 532, 362, 9, 26518, 7, 85, 11, 299, 27493, 77, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 1006, 974, 7, 85, 11, 299, 11, 37628, 62, 2502, 62, 429, 8, 198, 198, 7293, 1133, 4571, 286, 1006, 20216, 26842, 1864, 284, 5489, 695, 338, 1099, 11, 198, 273, 1441, 4600, 22366, 63, 611, 645, 4610, 7160, 13, 198, 37811, 198, 8818, 1006, 974, 7, 85, 11, 299, 11, 37628, 62, 2502, 62, 429, 8, 198, 220, 220, 220, 2488, 30493, 7, 8937, 7, 27237, 7, 85, 8, 532, 352, 8, 1279, 352, 68, 12, 1157, 11, 366, 15414, 26842, 4571, 1276, 307, 39279, 4943, 198, 220, 220, 220, 2488, 30493, 7, 8937, 7, 27237, 7, 77, 8, 532, 352, 8, 1279, 352, 68, 12, 1157, 11, 366, 42029, 3487, 1276, 307, 39279, 4943, 198, 220, 220, 220, 288, 83, 796, 16605, 7, 85, 11, 299, 8, 198, 220, 220, 220, 6534, 42483, 796, 352, 532, 37628, 62, 2502, 62, 429, 61, 17, 1635, 357, 16, 532, 288, 83, 61, 17, 8, 198, 220, 220, 220, 611, 6534, 42483, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 37628, 62, 2502, 62, 429, 9, 7, 85, 532, 299, 9, 28664, 8, 532, 19862, 17034, 7, 15410, 3036, 42483, 27493, 77, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2147, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 5513, 75, 624, 7, 6966, 500, 11, 1006, 62, 312, 87, 8, 198, 198, 14874, 75, 624, 338, 40874, 286, 1020, 934, 14580, 35381, 13, 198, 37811, 198, 8818, 5513, 75, 624, 7, 6966, 500, 11, 1006, 62, 312, 87, 8, 198, 220, 220, 220, 374, 15, 796, 14808, 16, 532, 1006, 62, 312, 87, 8, 1220, 357, 16, 1343, 1006, 62, 312, 87, 4008, 61, 17, 198, 220, 220, 220, 1441, 374, 15, 1343, 357, 16, 532, 374, 15, 8, 1635, 357, 16, 532, 8615, 500, 8, 61, 20, 198, 437, 628, 198, 397, 8709, 2099, 14633, 886, 628, 198, 37811, 198, 43, 321, 4835, 666, 4417, 357, 485, 282, 814, 11350, 14580, 828, 198, 23599, 416, 435, 3077, 78, 357, 35051, 590, 8, 583, 3124, 6518, 13, 198, 37811, 198, 7249, 36978, 666, 1279, 25, 14633, 198, 220, 220, 220, 435, 3077, 78, 3712, 38469, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 41058, 7, 2543, 4835, 666, 11, 26842, 11, 664, 8, 198, 198, 7293, 1133, 16830, 26842, 290, 3124, 31919, 2288, 5087, 329, 257, 26842, 9008, 257, 30592, 4835, 666, 4417, 13, 198, 37811, 198, 8818, 41058, 7, 2543, 4835, 666, 3712, 43, 321, 4835, 666, 11, 26842, 3712, 19591, 11, 664, 3712, 17889, 23739, 8, 198, 220, 220, 220, 16830, 796, 7760, 7, 8344, 13, 4122, 11, 664, 13, 11265, 1343, 4738, 62, 259, 62, 20850, 62, 2777, 1456, 28955, 198, 220, 220, 220, 1441, 357, 1416, 10228, 11, 30592, 4835, 666, 13, 282, 3077, 78, 8, 198, 437, 628, 198, 37811, 198, 36790, 4417, 11, 7368, 416, 435, 3077, 78, 357, 35051, 590, 8, 583, 3124, 6518, 198, 392, 26080, 1272, 5766, 357, 1416, 2040, 4738, 38298, 9943, 7094, 286, 12548, 26842, 737, 198, 37811, 198, 7249, 12136, 1279, 25, 14633, 198, 220, 220, 220, 1303, 4079, 590, 583, 3124, 6518, 198, 220, 220, 220, 435, 3077, 78, 3712, 38469, 198, 220, 220, 220, 1303, 26080, 1272, 5766, 198, 220, 220, 220, 26080, 3712, 15633, 628, 220, 220, 220, 12136, 7, 282, 3077, 78, 11, 26080, 8, 796, 649, 7, 282, 3077, 78, 11, 949, 7, 69, 4715, 11, 352, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 41058, 7, 28469, 11, 26842, 11, 664, 8, 198, 198, 7293, 1133, 16830, 26842, 290, 3124, 31919, 2288, 5087, 329, 257, 26842, 9008, 257, 6147, 4417, 13, 198, 37811, 198, 8818, 41058, 7, 28469, 3712, 36790, 11, 26842, 3712, 19591, 11, 664, 3712, 17889, 23739, 8, 198, 220, 220, 220, 299, 2433, 15908, 796, 4326, 31364, 7, 2433, 13, 37295, 8, 198, 220, 220, 220, 12548, 796, 4079, 7, 77, 2433, 15908, 11, 664, 13, 11265, 8, 198, 220, 220, 220, 16830, 796, 7760, 7, 8344, 13, 4122, 11, 12548, 1343, 6147, 13, 69, 4715, 9, 25120, 62, 259, 62, 20850, 62, 2777, 1456, 28955, 198, 220, 220, 220, 611, 16605, 7, 1416, 10228, 13, 37295, 11, 664, 13, 11265, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 1416, 10228, 11, 6147, 13, 282, 3077, 78, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 22366, 11, 6147, 13, 282, 3077, 78, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 32423, 801, 1173, 4417, 11, 7368, 416, 8064, 286, 262, 36525, 286, 1006, 7861, 13, 198, 37811, 198, 7249, 6733, 801, 1173, 1279, 25, 14633, 198, 220, 220, 220, 1006, 62, 312, 87, 3712, 15633, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 41058, 7, 11979, 801, 1173, 11, 26842, 11, 664, 8, 198, 198, 7293, 1133, 16830, 26842, 290, 3124, 31919, 2288, 5087, 329, 257, 26842, 9008, 257, 4656, 801, 1173, 4417, 2587, 13, 198, 37811, 198, 8818, 41058, 7, 11979, 801, 1173, 3712, 32423, 801, 1173, 11, 26842, 3712, 19591, 11, 664, 3712, 17889, 23739, 8, 198, 220, 220, 220, 1303, 39279, 26842, 4571, 198, 220, 220, 220, 299, 2433, 15908, 796, 4326, 31364, 7, 2433, 13, 37295, 8, 628, 220, 220, 220, 12548, 796, 4079, 7, 77, 2433, 15908, 11, 664, 13, 11265, 8, 628, 220, 220, 220, 8615, 500, 796, 16605, 7, 77, 2433, 15908, 11, 664, 13, 11265, 8, 198, 220, 220, 220, 611, 8615, 500, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1006, 20216, 796, 1006, 974, 7, 77, 2433, 15908, 11, 532, 8344, 13, 11265, 11, 4656, 801, 1173, 13, 5420, 62, 312, 87, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1006, 20216, 796, 1006, 974, 7, 77, 2433, 15908, 11, 664, 13, 11265, 11, 352, 1220, 4656, 801, 1173, 13, 5420, 62, 312, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 8615, 500, 796, 532, 6966, 500, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 1006, 20216, 14512, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 4079, 62, 1676, 65, 796, 5513, 75, 624, 7, 6966, 500, 11, 4656, 801, 1173, 13, 5420, 62, 312, 87, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4079, 62, 1676, 65, 796, 352, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 15456, 3853, 1022, 14580, 393, 1006, 7861, 198, 220, 220, 220, 611, 43720, 3419, 1279, 4079, 62, 1676, 65, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 19591, 7, 8344, 13, 4122, 11, 12548, 828, 3392, 7, 18, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 19591, 7, 8344, 13, 4122, 11, 1006, 20216, 828, 3392, 7, 18, 4008, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.662679
1,254
module SparseIR import PyCall: pyimport, PyNULL, PyVector, PyObject const sparse_ir = PyNULL() const pyspr = PyNULL() const pyaugment = PyNULL() const pysampling = PyNULL() function __init__() copy!(sparse_ir, pyimport_conda("sparse_ir", "sparse-ir", "spm-lab")) copy!(pyspr, pyimport("sparse_ir.spr")) copy!(pyaugment, pyimport("sparse_ir.augment")) copy!(pysampling, pyimport("sparse_ir.sampling")) return check_version_sparse_ir() end include("backend.jl") include("types.jl") include("kernel.jl") include("poly.jl") include("basis.jl") include("augment.jl") include("composite.jl") include("sampling.jl") include("spr.jl") include("basis_set.jl") include("exports.jl") end
[ 21412, 1338, 17208, 4663, 198, 198, 11748, 9485, 14134, 25, 12972, 11748, 11, 9485, 33991, 11, 9485, 38469, 11, 9485, 10267, 198, 198, 9979, 29877, 62, 343, 796, 9485, 33991, 3419, 198, 9979, 279, 893, 1050, 796, 9485, 33991, 3419, 198, 9979, 12972, 559, 5154, 796, 9485, 33991, 3419, 198, 9979, 279, 893, 321, 11347, 796, 9485, 33991, 3419, 198, 198, 8818, 11593, 15003, 834, 3419, 198, 220, 220, 220, 4866, 0, 7, 82, 29572, 62, 343, 11, 12972, 11748, 62, 66, 13533, 7203, 82, 29572, 62, 343, 1600, 366, 82, 29572, 12, 343, 1600, 366, 2777, 76, 12, 23912, 48774, 198, 220, 220, 220, 4866, 0, 7, 79, 893, 1050, 11, 12972, 11748, 7203, 82, 29572, 62, 343, 13, 34975, 48774, 198, 220, 220, 220, 4866, 0, 7, 9078, 559, 5154, 11, 12972, 11748, 7203, 82, 29572, 62, 343, 13, 559, 5154, 48774, 198, 220, 220, 220, 4866, 0, 7, 79, 893, 321, 11347, 11, 12972, 11748, 7203, 82, 29572, 62, 343, 13, 37687, 11347, 48774, 198, 220, 220, 220, 1441, 2198, 62, 9641, 62, 82, 29572, 62, 343, 3419, 198, 437, 198, 198, 17256, 7203, 1891, 437, 13, 20362, 4943, 198, 17256, 7203, 19199, 13, 20362, 4943, 198, 17256, 7203, 33885, 13, 20362, 4943, 198, 17256, 7203, 35428, 13, 20362, 4943, 198, 17256, 7203, 12093, 271, 13, 20362, 4943, 198, 17256, 7203, 559, 5154, 13, 20362, 4943, 198, 17256, 7203, 785, 1930, 578, 13, 20362, 4943, 198, 17256, 7203, 37687, 11347, 13, 20362, 4943, 198, 17256, 7203, 34975, 13, 20362, 4943, 198, 17256, 7203, 12093, 271, 62, 2617, 13, 20362, 4943, 198, 17256, 7203, 1069, 3742, 13, 20362, 4943, 198, 198, 437, 198 ]
2.552727
275
#= Instructions: - Pkg.add("PkgBenchmark.jl") - using PkgBenchmark - results = benchmarkpkg("IntervalArithmetic") - showall(results) - results = judge("IntervalArithmetic", "v0.9.1") # compare current version to that tag - showall(results) =# using IntervalArithmetic @benchgroup "Constructors" begin @bench "Interval" Interval(1, 2) end @benchgroup "@interval" begin @bench "@interval" @interval(0.1) @bench "pi" @interval(pi) @bench "expression" @interval(sin(0.1) + cos(0.2)) end @benchgroup "Arithmetic" begin a = Interval(1, 2) b = Interval(3, 4) for op in (+, -, *, /) @bench string(op) $(op)($a, $b) end end @benchgroup "Elementary functions" begin for op in (exp, log, sin, tan) @bench string(op) $(op)($a) end end @benchgroup "Sum" begin sum1(N) = sum(Interval(i, i+1) for i in 1:N) sum2(N) = (one = Interval(1.0); sum(one / (i^2) for i in 1:N) ) @bench "Sum1" sum1(1000) @bench "Sum2" sum2(1000) end
[ 2, 28, 27759, 25, 198, 198, 12, 350, 10025, 13, 2860, 7203, 47, 10025, 44199, 4102, 13, 20362, 4943, 198, 12, 1262, 350, 10025, 44199, 4102, 198, 198, 12, 2482, 796, 18335, 35339, 7203, 9492, 2100, 3163, 29848, 4943, 198, 12, 905, 439, 7, 43420, 8, 198, 198, 12, 2482, 796, 5052, 7203, 9492, 2100, 3163, 29848, 1600, 366, 85, 15, 13, 24, 13, 16, 4943, 220, 1303, 8996, 1459, 2196, 284, 326, 7621, 198, 12, 905, 439, 7, 43420, 8, 198, 46249, 628, 198, 3500, 4225, 2100, 3163, 29848, 198, 198, 31, 26968, 8094, 366, 42316, 669, 1, 2221, 198, 220, 220, 220, 2488, 26968, 366, 9492, 2100, 1, 4225, 2100, 7, 16, 11, 362, 8, 198, 437, 198, 198, 31, 26968, 8094, 44212, 3849, 2100, 1, 2221, 628, 220, 220, 220, 2488, 26968, 44212, 3849, 2100, 1, 2488, 3849, 2100, 7, 15, 13, 16, 8, 198, 220, 220, 220, 2488, 26968, 366, 14415, 1, 2488, 3849, 2100, 7, 14415, 8, 198, 220, 220, 220, 2488, 26968, 366, 38011, 1, 2488, 3849, 2100, 7, 31369, 7, 15, 13, 16, 8, 1343, 8615, 7, 15, 13, 17, 4008, 198, 437, 198, 198, 31, 26968, 8094, 366, 3163, 29848, 1, 2221, 628, 220, 220, 220, 257, 796, 4225, 2100, 7, 16, 11, 362, 8, 198, 220, 220, 220, 275, 796, 4225, 2100, 7, 18, 11, 604, 8, 628, 220, 220, 220, 329, 1034, 287, 11502, 11, 532, 11, 1635, 11, 1220, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 26968, 4731, 7, 404, 8, 29568, 404, 5769, 3, 64, 11, 720, 65, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 26968, 8094, 366, 20180, 560, 5499, 1, 2221, 198, 220, 220, 220, 329, 1034, 287, 357, 11201, 11, 2604, 11, 7813, 11, 25706, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 26968, 4731, 7, 404, 8, 29568, 404, 5769, 3, 64, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 26968, 8094, 366, 13065, 1, 2221, 628, 220, 220, 220, 2160, 16, 7, 45, 8, 796, 2160, 7, 9492, 2100, 7, 72, 11, 1312, 10, 16, 8, 329, 1312, 287, 352, 25, 45, 8, 198, 220, 220, 220, 2160, 17, 7, 45, 8, 796, 357, 505, 796, 4225, 2100, 7, 16, 13, 15, 1776, 2160, 7, 505, 1220, 357, 72, 61, 17, 8, 329, 1312, 287, 352, 25, 45, 8, 1267, 628, 220, 220, 220, 2488, 26968, 366, 13065, 16, 1, 2160, 16, 7, 12825, 8, 198, 220, 220, 220, 2488, 26968, 366, 13065, 17, 1, 2160, 17, 7, 12825, 8, 198, 437, 198 ]
2.310185
432
# Sequence rules over the [`SimData`](@ref) object, # calling [`maprule!`](@ref) for each individual `Rule`. function sequencerules!(simdata::AbstractSimData) newsimdata = sequencerules!(simdata, rules(simdata)) _maybemask!(grids(newsimdata)) newsimdata end function sequencerules!(simdata::AbstractSimData, rules::Tuple) # Mask writes to dest if a mask is provided, except for # CellRule which doesn't move values into masked areas rule = rules[1] rest = tail(rules) # Run the first rules newsimdata = maprule!(simdata, rule) # Run the rest of the rules recursively sequencerules!(newsimdata, rest) end sequencerules!(simdata::AbstractSimData, rules::Tuple{}) = simdata
[ 2, 45835, 3173, 625, 262, 685, 63, 8890, 6601, 63, 16151, 31, 5420, 8, 2134, 11, 198, 2, 4585, 685, 63, 8899, 25135, 0, 63, 16151, 31, 5420, 8, 329, 1123, 1981, 4600, 31929, 44646, 198, 8818, 4726, 12137, 5028, 0, 7, 14323, 7890, 3712, 23839, 8890, 6601, 8, 198, 220, 220, 220, 1705, 320, 7890, 796, 4726, 12137, 5028, 0, 7, 14323, 7890, 11, 3173, 7, 14323, 7890, 4008, 198, 220, 220, 220, 4808, 11261, 65, 368, 2093, 0, 7, 2164, 2340, 7, 10827, 320, 7890, 4008, 198, 220, 220, 220, 1705, 320, 7890, 198, 437, 198, 8818, 4726, 12137, 5028, 0, 7, 14323, 7890, 3712, 23839, 8890, 6601, 11, 3173, 3712, 51, 29291, 8, 198, 220, 220, 220, 1303, 18007, 6797, 284, 2244, 611, 257, 9335, 318, 2810, 11, 2845, 329, 198, 220, 220, 220, 1303, 12440, 31929, 543, 1595, 470, 1445, 3815, 656, 29229, 3006, 198, 220, 220, 220, 3896, 796, 3173, 58, 16, 60, 198, 220, 220, 220, 1334, 796, 7894, 7, 38785, 8, 198, 220, 220, 220, 1303, 5660, 262, 717, 3173, 198, 220, 220, 220, 1705, 320, 7890, 796, 3975, 25135, 0, 7, 14323, 7890, 11, 3896, 8, 198, 220, 220, 220, 1303, 5660, 262, 1334, 286, 262, 3173, 664, 1834, 2280, 198, 220, 220, 220, 4726, 12137, 5028, 0, 7, 10827, 320, 7890, 11, 1334, 8, 198, 437, 198, 3107, 12137, 5028, 0, 7, 14323, 7890, 3712, 23839, 8890, 6601, 11, 3173, 3712, 51, 29291, 90, 30072, 796, 985, 7890, 198 ]
2.883065
248
module InterfaceSymbolicUtilsModule using SymbolicUtils import ..CoreModule: CONST_TYPE, Node, Options import ..UtilsModule: isgood, isbad, @return_on_false const SYMBOLIC_UTILS_TYPES = Union{<:Number,SymbolicUtils.Symbolic{<:Number}} const SUPPORTED_OPS = (cos, sin, exp, cot, tan, csc, sec, +, -, *, /) function isgood(x::SymbolicUtils.Symbolic) return if SymbolicUtils.istree(x) all(isgood.([SymbolicUtils.operation(x); SymbolicUtils.arguments(x)])) else true end end subs_bad(x) = isgood(x) ? x : Inf function parse_tree_to_eqs(tree::Node, options::Options, index_functions::Bool=false) if tree.degree == 0 # Return constant if needed tree.constant && return subs_bad(tree.val) return SymbolicUtils.Sym{LiteralReal}(Symbol("x$(tree.feature)")) end # Collect the next children children = tree.degree >= 2 ? (tree.l, tree.r) : (tree.l,) # Get the operation op = tree.degree > 1 ? options.binops[tree.op] : options.unaops[tree.op] # Create an N tuple of Numbers for each argument dtypes = map(x -> Number, 1:(tree.degree)) # if !(op ∈ SUPPORTED_OPS) && index_functions op = SymbolicUtils.Sym{(SymbolicUtils.FnType){Tuple{dtypes...},Number}}(Symbol(op)) end return subs_bad( op(map(x -> parse_tree_to_eqs(x, options, index_functions), children)...) ) end # For operators which are indexed, we need to convert them back # using the string: function convert_to_function( x::SymbolicUtils.Sym{SymbolicUtils.FnType{T,Number}}, options::Options ) where {T<:Tuple} degree = length(T.types) if degree == 1 ind = findoperation(x.name, options.unaops) return options.unaops[ind] elseif degree == 2 ind = findoperation(x.name, options.binops) return options.binops[ind] else throw(AssertionError("Function $(String(x.name)) has degree > 2 !")) end end # For normal operators, simply return the function itself: convert_to_function(x, options::Options) = x # Split equation function split_eq( op, args, options::Options; varMap::Union{Array{String,1},Nothing}=nothing ) !(op ∈ (sum, prod, +, *)) && throw(error("Unsupported operation $op in expression!")) if Symbol(op) == Symbol(sum) ind = findoperation(+, options.binops) elseif Symbol(op) == Symbol(prod) ind = findoperation(*, options.binops) else ind = findoperation(op, options.binops) end return Node( ind, convert(Node, args[1], options; varMap=varMap), convert(Node, op(args[2:end]...), options; varMap=varMap), ) end function findoperation(op, ops) for (i, oi) in enumerate(ops) Symbol(oi) == Symbol(op) && return i end throw(error("Operation $(op) in expression not found in operations $(ops)!")) end function Base.convert( ::typeof(SymbolicUtils.Symbolic), tree::Node, options::Options; varMap::Union{Array{String,1},Nothing}=nothing, index_functions::Bool=false, ) return node_to_symbolic(tree, options; varMap=varMap, index_functions=index_functions) end function Base.convert( ::typeof(Node), x::Number, options::Options; varMap::Union{Array{String,1},Nothing}=nothing, ) return Node(CONST_TYPE(x)) end function Base.convert( ::typeof(Node), expr::SymbolicUtils.Symbolic, options::Options; varMap::Union{Array{String,1},Nothing}=nothing, ) if !SymbolicUtils.istree(expr) varMap === nothing && return Node(String(expr.name)) return Node(String(expr.name), varMap) end # First, we remove integer powers: y, good_return = multiply_powers(expr) if good_return expr = y end op = convert_to_function(SymbolicUtils.operation(expr), options) args = SymbolicUtils.arguments(expr) length(args) > 2 && return split_eq(op, args, options; varMap=varMap) ind = if length(args) == 2 findoperation(op, options.binops) else findoperation(op, options.unaops) end return Node(ind, map(x -> convert(Node, x, options; varMap=varMap), args)...) end """ node_to_symbolic(tree::Node, options::Options; varMap::Union{Array{String, 1}, Nothing}=nothing, index_functions::Bool=false) The interface to SymbolicUtils.jl. Passing a tree to this function will generate a symbolic equation in SymbolicUtils.jl format. ## Arguments - `tree::Node`: The equation to convert. - `options::Options`: Options, which contains the operators used in the equation. - `varMap::Union{Array{String, 1}, Nothing}=nothing`: What variable names to use for each feature. Default is [x1, x2, x3, ...]. - `index_functions::Bool=false`: Whether to generate special names for the operators, which then allows one to convert back to a `Node` format using `symbolic_to_node`. (CURRENTLY UNAVAILABLE - See https://github.com/MilesCranmer/SymbolicRegression.jl/pull/84). """ function node_to_symbolic( tree::Node, options::Options; varMap::Union{Array{String,1},Nothing}=nothing, index_functions::Bool=false, ) expr = subs_bad(parse_tree_to_eqs(tree, options, index_functions)) # Check for NaN and Inf @assert isgood(expr) "The recovered equation contains NaN or Inf." # Return if no varMap is given varMap === nothing && return expr # Create a substitution tuple subs = Dict( [ SymbolicUtils.Sym{LiteralReal}(Symbol("x$(i)")) => SymbolicUtils.Sym{LiteralReal}(Symbol(varMap[i])) for i in 1:length(varMap) ]..., ) return substitute(expr, subs) end function symbolic_to_node( eqn::T, options::Options; varMap::Union{Array{String,1},Nothing}=nothing )::Node where {T<:SymbolicUtils.Symbolic} return convert(Node, eqn, options; varMap=varMap) end # function Base.convert(::typeof(Node), x::Number, options::Options; varMap::Union{Array{String, 1}, Nothing}=nothing) # function Base.convert(::typeof(Node), expr::SymbolicUtils.Symbolic, options::Options; varMap::Union{Array{String, 1}, Nothing}=nothing) function multiply_powers(eqn::Number)::Tuple{SYMBOLIC_UTILS_TYPES,Bool} return eqn, true end function multiply_powers(eqn::SymbolicUtils.Symbolic)::Tuple{SYMBOLIC_UTILS_TYPES,Bool} if !SymbolicUtils.istree(eqn) return eqn, true end op = SymbolicUtils.operation(eqn) return multiply_powers(eqn, op) end function multiply_powers( eqn::SymbolicUtils.Symbolic, op::F )::Tuple{SYMBOLIC_UTILS_TYPES,Bool} where {F} args = SymbolicUtils.arguments(eqn) nargs = length(args) if nargs == 1 l, complete = multiply_powers(args[1]) @return_on_false complete eqn @return_on_false isgood(l) eqn return op(l), true elseif op == ^ l, complete = multiply_powers(args[1]) @return_on_false complete eqn @return_on_false isgood(l) eqn n = args[2] if typeof(n) <: Int if n == 1 return l, true elseif n == -1 return 1.0 / l, true elseif n > 1 return reduce(*, [l for i in 1:n]), true elseif n < -1 return reduce(/, vcat([1], [l for i in 1:abs(n)])), true else return 1.0, true end else r, complete2 = multiply_powers(args[2]) @return_on_false complete2 eqn return l^r, true end elseif nargs == 2 l, complete = multiply_powers(args[1]) @return_on_false complete eqn @return_on_false isgood(l) eqn r, complete2 = multiply_powers(args[2]) @return_on_false complete2 eqn @return_on_false isgood(r) eqn return op(l, r), true else # return mapreduce(multiply_powers, op, args) # ## reduce(op, map(multiply_powers, args)) out = map(multiply_powers, args) #vector of tuples for i in 1:size(out, 1) @return_on_false out[i][2] eqn @return_on_false isgood(out[i][1]) eqn end cumulator = out[1][1] for i in 2:size(out, 1) cumulator = op(cumulator, out[i][1]) @return_on_false isgood(cumulator) eqn end return cumulator, true end end end
[ 21412, 26491, 13940, 2022, 4160, 18274, 4487, 26796, 198, 198, 3500, 41327, 4160, 18274, 4487, 198, 11748, 11485, 14055, 26796, 25, 7102, 2257, 62, 25216, 11, 19081, 11, 18634, 198, 11748, 11485, 18274, 4487, 26796, 25, 318, 11274, 11, 318, 14774, 11, 2488, 7783, 62, 261, 62, 9562, 198, 198, 9979, 19704, 10744, 3535, 2149, 62, 3843, 45484, 62, 9936, 47, 1546, 796, 4479, 90, 27, 25, 15057, 11, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 90, 27, 25, 15057, 11709, 198, 198, 9979, 43333, 1961, 62, 30737, 796, 357, 6966, 11, 7813, 11, 1033, 11, 269, 313, 11, 25706, 11, 269, 1416, 11, 792, 11, 1343, 11, 532, 11, 1635, 11, 1220, 8, 198, 198, 8818, 318, 11274, 7, 87, 3712, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 8, 198, 220, 220, 220, 1441, 611, 41327, 4160, 18274, 4487, 13, 396, 631, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 477, 7, 271, 11274, 12195, 58, 13940, 2022, 4160, 18274, 4487, 13, 27184, 7, 87, 1776, 41327, 4160, 18274, 4487, 13, 853, 2886, 7, 87, 15437, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 198, 220, 220, 220, 886, 198, 437, 198, 7266, 82, 62, 14774, 7, 87, 8, 796, 318, 11274, 7, 87, 8, 5633, 2124, 1058, 4806, 198, 198, 8818, 21136, 62, 21048, 62, 1462, 62, 27363, 82, 7, 21048, 3712, 19667, 11, 3689, 3712, 29046, 11, 6376, 62, 12543, 2733, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 611, 5509, 13, 16863, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 8229, 6937, 611, 2622, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 13, 9979, 415, 11405, 1441, 6352, 62, 14774, 7, 21048, 13, 2100, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 41327, 4160, 18274, 4487, 13, 43094, 90, 43, 270, 1691, 15633, 92, 7, 13940, 23650, 7203, 87, 3, 7, 21048, 13, 30053, 16725, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 9745, 262, 1306, 1751, 198, 220, 220, 220, 1751, 796, 5509, 13, 16863, 18189, 362, 5633, 357, 21048, 13, 75, 11, 5509, 13, 81, 8, 1058, 357, 21048, 13, 75, 35751, 198, 220, 220, 220, 1303, 3497, 262, 4905, 198, 220, 220, 220, 1034, 796, 5509, 13, 16863, 1875, 352, 5633, 3689, 13, 8800, 2840, 58, 21048, 13, 404, 60, 1058, 3689, 13, 9613, 2840, 58, 21048, 13, 404, 60, 198, 220, 220, 220, 1303, 13610, 281, 399, 46545, 286, 27797, 329, 1123, 4578, 198, 220, 220, 220, 288, 19199, 796, 3975, 7, 87, 4613, 7913, 11, 352, 37498, 21048, 13, 16863, 4008, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 611, 5145, 7, 404, 18872, 230, 43333, 1961, 62, 30737, 8, 11405, 6376, 62, 12543, 2733, 198, 220, 220, 220, 220, 220, 220, 220, 1034, 796, 41327, 4160, 18274, 4487, 13, 43094, 90, 7, 13940, 2022, 4160, 18274, 4487, 13, 37, 77, 6030, 19953, 51, 29291, 90, 67, 19199, 986, 5512, 15057, 11709, 7, 13940, 23650, 7, 404, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 6352, 62, 14774, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1034, 7, 8899, 7, 87, 4613, 21136, 62, 21048, 62, 1462, 62, 27363, 82, 7, 87, 11, 3689, 11, 6376, 62, 12543, 2733, 828, 1751, 8, 23029, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 2, 1114, 12879, 543, 389, 41497, 11, 356, 761, 284, 10385, 606, 736, 198, 2, 1262, 262, 4731, 25, 198, 8818, 10385, 62, 1462, 62, 8818, 7, 198, 220, 220, 220, 2124, 3712, 13940, 2022, 4160, 18274, 4487, 13, 43094, 90, 13940, 2022, 4160, 18274, 4487, 13, 37, 77, 6030, 90, 51, 11, 15057, 92, 5512, 3689, 3712, 29046, 198, 8, 810, 1391, 51, 27, 25, 51, 29291, 92, 198, 220, 220, 220, 4922, 796, 4129, 7, 51, 13, 19199, 8, 198, 220, 220, 220, 611, 4922, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 27184, 7, 87, 13, 3672, 11, 3689, 13, 9613, 2840, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3689, 13, 9613, 2840, 58, 521, 60, 198, 220, 220, 220, 2073, 361, 4922, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 27184, 7, 87, 13, 3672, 11, 3689, 13, 8800, 2840, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3689, 13, 8800, 2840, 58, 521, 60, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 8021, 861, 295, 12331, 7203, 22203, 29568, 10100, 7, 87, 13, 3672, 4008, 468, 4922, 1875, 362, 220, 2474, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 1114, 3487, 12879, 11, 2391, 1441, 262, 2163, 2346, 25, 198, 1102, 1851, 62, 1462, 62, 8818, 7, 87, 11, 3689, 3712, 29046, 8, 796, 2124, 198, 198, 2, 27758, 16022, 198, 8818, 6626, 62, 27363, 7, 198, 220, 220, 220, 1034, 11, 26498, 11, 3689, 3712, 29046, 26, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 198, 8, 198, 220, 220, 220, 5145, 7, 404, 18872, 230, 357, 16345, 11, 40426, 11, 1343, 11, 1635, 4008, 11405, 3714, 7, 18224, 7203, 3118, 15999, 4905, 720, 404, 287, 5408, 2474, 4008, 198, 220, 220, 220, 611, 38357, 7, 404, 8, 6624, 38357, 7, 16345, 8, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 27184, 7, 28200, 3689, 13, 8800, 2840, 8, 198, 220, 220, 220, 2073, 361, 38357, 7, 404, 8, 6624, 38357, 7, 1676, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 27184, 7, 25666, 3689, 13, 8800, 2840, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 27184, 7, 404, 11, 3689, 13, 8800, 2840, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 19081, 7, 198, 220, 220, 220, 220, 220, 220, 220, 773, 11, 198, 220, 220, 220, 220, 220, 220, 220, 10385, 7, 19667, 11, 26498, 58, 16, 4357, 3689, 26, 1401, 13912, 28, 7785, 13912, 828, 198, 220, 220, 220, 220, 220, 220, 220, 10385, 7, 19667, 11, 1034, 7, 22046, 58, 17, 25, 437, 60, 986, 828, 3689, 26, 1401, 13912, 28, 7785, 13912, 828, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 1064, 27184, 7, 404, 11, 39628, 8, 198, 220, 220, 220, 329, 357, 72, 11, 267, 72, 8, 287, 27056, 378, 7, 2840, 8, 198, 220, 220, 220, 220, 220, 220, 220, 38357, 7, 23013, 8, 6624, 38357, 7, 404, 8, 11405, 1441, 1312, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3714, 7, 18224, 7203, 32180, 29568, 404, 8, 287, 5408, 407, 1043, 287, 4560, 29568, 2840, 8, 2474, 4008, 198, 437, 198, 198, 8818, 7308, 13, 1102, 1851, 7, 198, 220, 220, 220, 7904, 4906, 1659, 7, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 828, 198, 220, 220, 220, 5509, 3712, 19667, 11, 198, 220, 220, 220, 3689, 3712, 29046, 26, 198, 220, 220, 220, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 11, 198, 220, 220, 220, 6376, 62, 12543, 2733, 3712, 33, 970, 28, 9562, 11, 198, 8, 198, 220, 220, 220, 1441, 10139, 62, 1462, 62, 1837, 2022, 4160, 7, 21048, 11, 3689, 26, 1401, 13912, 28, 7785, 13912, 11, 6376, 62, 12543, 2733, 28, 9630, 62, 12543, 2733, 8, 198, 437, 198, 198, 8818, 7308, 13, 1102, 1851, 7, 198, 220, 220, 220, 7904, 4906, 1659, 7, 19667, 828, 198, 220, 220, 220, 2124, 3712, 15057, 11, 198, 220, 220, 220, 3689, 3712, 29046, 26, 198, 220, 220, 220, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 11, 198, 8, 198, 220, 220, 220, 1441, 19081, 7, 10943, 2257, 62, 25216, 7, 87, 4008, 198, 437, 198, 198, 8818, 7308, 13, 1102, 1851, 7, 198, 220, 220, 220, 7904, 4906, 1659, 7, 19667, 828, 198, 220, 220, 220, 44052, 3712, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 11, 198, 220, 220, 220, 3689, 3712, 29046, 26, 198, 220, 220, 220, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 11, 198, 8, 198, 220, 220, 220, 611, 5145, 13940, 2022, 4160, 18274, 4487, 13, 396, 631, 7, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 13912, 24844, 2147, 11405, 1441, 19081, 7, 10100, 7, 31937, 13, 3672, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 19081, 7, 10100, 7, 31937, 13, 3672, 828, 1401, 13912, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 3274, 11, 356, 4781, 18253, 5635, 25, 198, 220, 220, 220, 331, 11, 922, 62, 7783, 796, 29162, 62, 30132, 7, 31937, 8, 198, 220, 220, 220, 611, 922, 62, 7783, 198, 220, 220, 220, 220, 220, 220, 220, 44052, 796, 331, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1034, 796, 10385, 62, 1462, 62, 8818, 7, 13940, 2022, 4160, 18274, 4487, 13, 27184, 7, 31937, 828, 3689, 8, 198, 220, 220, 220, 26498, 796, 41327, 4160, 18274, 4487, 13, 853, 2886, 7, 31937, 8, 628, 220, 220, 220, 4129, 7, 22046, 8, 1875, 362, 11405, 1441, 6626, 62, 27363, 7, 404, 11, 26498, 11, 3689, 26, 1401, 13912, 28, 7785, 13912, 8, 198, 220, 220, 220, 773, 796, 611, 4129, 7, 22046, 8, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 1064, 27184, 7, 404, 11, 3689, 13, 8800, 2840, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1064, 27184, 7, 404, 11, 3689, 13, 9613, 2840, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 19081, 7, 521, 11, 3975, 7, 87, 4613, 10385, 7, 19667, 11, 2124, 11, 3689, 26, 1401, 13912, 28, 7785, 13912, 828, 26498, 8, 23029, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 10139, 62, 1462, 62, 1837, 2022, 4160, 7, 21048, 3712, 19667, 11, 3689, 3712, 29046, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 352, 5512, 10528, 92, 28, 22366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 62, 12543, 2733, 3712, 33, 970, 28, 9562, 8, 198, 198, 464, 7071, 284, 41327, 4160, 18274, 4487, 13, 20362, 13, 46389, 257, 5509, 284, 428, 2163, 198, 10594, 7716, 257, 18975, 16022, 287, 41327, 4160, 18274, 4487, 13, 20362, 5794, 13, 198, 198, 2235, 20559, 2886, 198, 198, 12, 4600, 21048, 3712, 19667, 63, 25, 383, 16022, 284, 10385, 13, 198, 12, 4600, 25811, 3712, 29046, 63, 25, 18634, 11, 543, 4909, 262, 12879, 973, 287, 262, 16022, 13, 198, 12, 4600, 7785, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 352, 5512, 10528, 92, 28, 22366, 63, 25, 1867, 7885, 3891, 284, 779, 329, 198, 220, 220, 220, 1123, 3895, 13, 15161, 318, 685, 87, 16, 11, 2124, 17, 11, 2124, 18, 11, 2644, 4083, 198, 12, 4600, 9630, 62, 12543, 2733, 3712, 33, 970, 28, 9562, 63, 25, 10127, 284, 7716, 2041, 3891, 329, 262, 198, 220, 220, 220, 12879, 11, 543, 788, 3578, 530, 284, 10385, 736, 284, 257, 4600, 19667, 63, 5794, 198, 220, 220, 220, 1262, 4600, 1837, 2022, 4160, 62, 1462, 62, 17440, 44646, 198, 220, 220, 220, 357, 34, 39237, 11319, 471, 4535, 11731, 4146, 17534, 532, 4091, 3740, 1378, 12567, 13, 785, 14, 44, 2915, 34, 2596, 647, 14, 13940, 2022, 4160, 8081, 2234, 13, 20362, 14, 31216, 14, 5705, 737, 198, 37811, 198, 8818, 10139, 62, 1462, 62, 1837, 2022, 4160, 7, 198, 220, 220, 220, 5509, 3712, 19667, 11, 198, 220, 220, 220, 3689, 3712, 29046, 26, 198, 220, 220, 220, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 11, 198, 220, 220, 220, 6376, 62, 12543, 2733, 3712, 33, 970, 28, 9562, 11, 198, 8, 198, 220, 220, 220, 44052, 796, 6352, 62, 14774, 7, 29572, 62, 21048, 62, 1462, 62, 27363, 82, 7, 21048, 11, 3689, 11, 6376, 62, 12543, 2733, 4008, 198, 220, 220, 220, 1303, 6822, 329, 11013, 45, 290, 4806, 198, 220, 220, 220, 2488, 30493, 318, 11274, 7, 31937, 8, 366, 464, 11911, 16022, 4909, 11013, 45, 393, 4806, 526, 198, 220, 220, 220, 1303, 8229, 611, 645, 1401, 13912, 318, 1813, 198, 220, 220, 220, 1401, 13912, 24844, 2147, 11405, 1441, 44052, 198, 220, 220, 220, 1303, 13610, 257, 32097, 46545, 198, 220, 220, 220, 6352, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41327, 4160, 18274, 4487, 13, 43094, 90, 43, 270, 1691, 15633, 92, 7, 13940, 23650, 7203, 87, 3, 7, 72, 16725, 4008, 5218, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41327, 4160, 18274, 4487, 13, 43094, 90, 43, 270, 1691, 15633, 92, 7, 13940, 23650, 7, 7785, 13912, 58, 72, 60, 4008, 329, 1312, 287, 352, 25, 13664, 7, 7785, 13912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 986, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 15373, 7, 31937, 11, 6352, 8, 198, 437, 198, 198, 8818, 18975, 62, 1462, 62, 17440, 7, 198, 220, 220, 220, 37430, 77, 3712, 51, 11, 3689, 3712, 29046, 26, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 16, 5512, 18465, 92, 28, 22366, 198, 2599, 25, 19667, 810, 1391, 51, 27, 25, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 92, 198, 220, 220, 220, 1441, 10385, 7, 19667, 11, 37430, 77, 11, 3689, 26, 1401, 13912, 28, 7785, 13912, 8, 198, 437, 198, 198, 2, 2163, 7308, 13, 1102, 1851, 7, 3712, 4906, 1659, 7, 19667, 828, 2124, 3712, 15057, 11, 3689, 3712, 29046, 26, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 352, 5512, 10528, 92, 28, 22366, 8, 198, 2, 2163, 7308, 13, 1102, 1851, 7, 3712, 4906, 1659, 7, 19667, 828, 44052, 3712, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 11, 3689, 3712, 29046, 26, 1401, 13912, 3712, 38176, 90, 19182, 90, 10100, 11, 352, 5512, 10528, 92, 28, 22366, 8, 198, 198, 8818, 29162, 62, 30132, 7, 27363, 77, 3712, 15057, 2599, 25, 51, 29291, 90, 23060, 10744, 3535, 2149, 62, 3843, 45484, 62, 9936, 47, 1546, 11, 33, 970, 92, 198, 220, 220, 220, 1441, 37430, 77, 11, 2081, 198, 437, 198, 198, 8818, 29162, 62, 30132, 7, 27363, 77, 3712, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 2599, 25, 51, 29291, 90, 23060, 10744, 3535, 2149, 62, 3843, 45484, 62, 9936, 47, 1546, 11, 33, 970, 92, 198, 220, 220, 220, 611, 5145, 13940, 2022, 4160, 18274, 4487, 13, 396, 631, 7, 27363, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 37430, 77, 11, 2081, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1034, 796, 41327, 4160, 18274, 4487, 13, 27184, 7, 27363, 77, 8, 198, 220, 220, 220, 1441, 29162, 62, 30132, 7, 27363, 77, 11, 1034, 8, 198, 437, 198, 198, 8818, 29162, 62, 30132, 7, 198, 220, 220, 220, 37430, 77, 3712, 13940, 2022, 4160, 18274, 4487, 13, 13940, 2022, 4160, 11, 1034, 3712, 37, 198, 2599, 25, 51, 29291, 90, 23060, 10744, 3535, 2149, 62, 3843, 45484, 62, 9936, 47, 1546, 11, 33, 970, 92, 810, 1391, 37, 92, 198, 220, 220, 220, 26498, 796, 41327, 4160, 18274, 4487, 13, 853, 2886, 7, 27363, 77, 8, 198, 220, 220, 220, 299, 22046, 796, 4129, 7, 22046, 8, 198, 220, 220, 220, 611, 299, 22046, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 1844, 796, 29162, 62, 30132, 7, 22046, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 1844, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 75, 8, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1034, 7, 75, 828, 2081, 198, 220, 220, 220, 2073, 361, 1034, 6624, 10563, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 1844, 796, 29162, 62, 30132, 7, 22046, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 1844, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 75, 8, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 26498, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2099, 1659, 7, 77, 8, 1279, 25, 2558, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 299, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 300, 11, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 6624, 532, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 13, 15, 1220, 300, 11, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 1875, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 4646, 7, 25666, 685, 75, 329, 1312, 287, 352, 25, 77, 46570, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 1279, 532, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 4646, 7, 47454, 410, 9246, 26933, 16, 4357, 685, 75, 329, 1312, 287, 352, 25, 8937, 7, 77, 8, 12962, 828, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 13, 15, 11, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 11, 1844, 17, 796, 29162, 62, 30132, 7, 22046, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 1844, 17, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 300, 61, 81, 11, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 361, 299, 22046, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 1844, 796, 29162, 62, 30132, 7, 22046, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 1844, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 75, 8, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 374, 11, 1844, 17, 796, 29162, 62, 30132, 7, 22046, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 1844, 17, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 81, 8, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1034, 7, 75, 11, 374, 828, 2081, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1441, 3975, 445, 7234, 7, 16680, 541, 306, 62, 30132, 11, 1034, 11, 26498, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 22492, 4646, 7, 404, 11, 3975, 7, 16680, 541, 306, 62, 30132, 11, 26498, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 3975, 7, 16680, 541, 306, 62, 30132, 11, 26498, 8, 1303, 31364, 286, 12777, 2374, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 7857, 7, 448, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 503, 58, 72, 7131, 17, 60, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 448, 58, 72, 7131, 16, 12962, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 10973, 8927, 796, 503, 58, 16, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 362, 25, 7857, 7, 448, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10973, 8927, 796, 1034, 7, 36340, 8927, 11, 503, 58, 72, 7131, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, 62, 261, 62, 9562, 318, 11274, 7, 36340, 8927, 8, 37430, 77, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10973, 8927, 11, 2081, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 198 ]
2.344498
3,553
fs1() @testset "LX input" begin set_curpath("index.md") mkpath(joinpath(F.PATHS[:assets], "index", "code", "output")) write(joinpath(F.PATHS[:assets], "index", "code", "s1.jl"), "println(1+1)") write(joinpath(F.PATHS[:assets], "index", "code", "output", "s1a.png"), "blah") write(joinpath(F.PATHS[:assets], "index", "code", "output", "s1.out"), "blih") st = raw""" Some string \input{julia}{s1.jl} Then maybe \output{s1.jl} Finally img: \input{plot:a}{s1.jl} done. """; F.def_GLOBAL_VARS!() F.def_GLOBAL_LXDEFS!() m = F.convert_md(st) h = F.convert_html(m) @test occursin("<p>Some string <pre><code class=\"language-julia\">$(read(joinpath(F.PATHS[:assets], "index", "code", "s1.jl"), String))</code></pre>", h) @test occursin("Then maybe <pre><code class=\"plaintext\">$(read(joinpath(F.PATHS[:assets], "index", "code", "output", "s1.out"), String))</code></pre>", h) @test occursin("Finally img: <img src=\"/assets/index/code/output/s1a.png\" alt=\"\"> done.", h) end @testset "Input MD" begin mkpath(joinpath(F.PATHS[:assets], "ccc")) fp = joinpath(F.PATHS[:assets], "ccc", "asset1.md") write(fp, "blah **blih**") st = raw""" Some string \textinput{ccc/asset1} """ @test isapproxstr(st |> conv, "<p>Some string blah <strong>blih</strong></p>") end fs2() @testset "LX input" begin set_curpath("index.md") mkpath(joinpath(F.PATHS[:site], "assets", "index", "code", "output")) write(joinpath(F.PATHS[:site], "assets", "index", "code", "s1.jl"), "println(1+1)") write(joinpath(F.PATHS[:site], "assets", "index", "code", "output", "s1a.png"), "blah") write(joinpath(F.PATHS[:site], "assets", "index", "code", "output", "s1.out"), "blih") st = raw""" Some string \input{julia}{s1.jl} Then maybe \output{s1.jl} Finally img: \input{plot:a}{s1.jl} done. """; F.def_GLOBAL_VARS!() F.def_GLOBAL_LXDEFS!() m = F.convert_md(st) h = F.convert_html(m) @test occursin("<p>Some string <pre><code class=\"language-julia\">$(read(joinpath(F.PATHS[:site], "assets", "index", "code", "s1.jl"), String))</code></pre>", h) @test occursin("Then maybe <pre><code class=\"plaintext\">$(read(joinpath(F.PATHS[:site], "assets", "index", "code", "output", "s1.out"), String))</code></pre>", h) @test occursin("Finally img: <img src=\"/assets/index/code/output/s1a.png\" alt=\"\"> done.", h) end @testset "Input MD" begin mkpath(joinpath(F.PATHS[:site], "assets", "ccc")) fp = joinpath(F.PATHS[:site], "assets", "ccc", "asset1.md") write(fp, "blah **blih**") st = raw""" Some string \textinput{ccc/asset1} """ @test isapproxstr(st |> conv, "<p>Some string blah <strong>blih</strong></p>") end @testset "Input err" begin gotd() s = raw""" AA \input{julia}{foo/baz} \input{plot}{foo/baz} \textinput{foo/bar} """ |> fd2html_td @test isapproxstr(s, """ <p>AA <p><span style="color:red;">// Couldn't find a file when trying to resolve an input request with relative path: `foo/baz`. //</span></p> <p><span style="color:red;">// Couldn't find an output directory associated with 'foo/baz' when trying to input a plot. //</span></p> <p><span style="color:red;">// Couldn't find a file when trying to resolve an input request with relative path: `foo/bar`. //</span></p></p> """) fs2() gotd() # table input mkpath(joinpath(td, "_assets", "index", "output")) write(joinpath(td, "_assets", "index", "output", "foo.csv"), "bar") s = raw""" @def fd_rpath = "index.md" \tableinput{}{./foo.csv} """ |> fd2html_td @test isapproxstr(s, """ <p><span style="color:red;">// Table matching '/assets/index/foo.csv' not found. //</span></p></p> """) end
[ 9501, 16, 3419, 198, 198, 31, 9288, 2617, 366, 43, 55, 5128, 1, 2221, 198, 220, 220, 220, 900, 62, 22019, 6978, 7203, 9630, 13, 9132, 4943, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 48774, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 366, 82, 16, 13, 20362, 12340, 366, 35235, 7, 16, 10, 16, 8, 4943, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 1600, 366, 82, 16, 64, 13, 11134, 12340, 366, 2436, 993, 4943, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 1600, 366, 82, 16, 13, 448, 12340, 366, 2436, 4449, 4943, 198, 220, 220, 220, 336, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2773, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 73, 43640, 18477, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 3244, 3863, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 22915, 90, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 9461, 33705, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 29487, 25, 64, 18477, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1760, 13, 198, 220, 220, 220, 220, 220, 220, 220, 13538, 8172, 628, 220, 220, 220, 376, 13, 4299, 62, 8763, 9864, 1847, 62, 53, 27415, 0, 3419, 198, 220, 220, 220, 376, 13, 4299, 62, 8763, 9864, 1847, 62, 43, 55, 7206, 10652, 0, 3419, 628, 220, 220, 220, 285, 796, 376, 13, 1102, 1851, 62, 9132, 7, 301, 8, 198, 220, 220, 220, 289, 796, 376, 13, 1102, 1851, 62, 6494, 7, 76, 8, 628, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 27, 79, 29, 4366, 4731, 1279, 3866, 6927, 8189, 1398, 17553, 16129, 12, 73, 43640, 38214, 3, 7, 961, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 366, 82, 16, 13, 20362, 12340, 10903, 4008, 3556, 8189, 12240, 3866, 29, 1600, 289, 8, 198, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 6423, 3863, 1279, 3866, 6927, 8189, 1398, 17553, 25638, 5239, 38214, 3, 7, 961, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 9630, 1600, 366, 8189, 1600, 220, 366, 22915, 1600, 366, 82, 16, 13, 448, 12340, 10903, 4008, 3556, 8189, 12240, 3866, 29, 1600, 289, 8, 198, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 11158, 33705, 25, 1279, 9600, 12351, 17553, 14, 19668, 14, 9630, 14, 8189, 14, 22915, 14, 82, 16, 64, 13, 11134, 7879, 5988, 17553, 38214, 1760, 33283, 289, 8, 198, 437, 198, 198, 31, 9288, 2617, 220, 366, 20560, 10670, 1, 2221, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 535, 66, 48774, 198, 220, 220, 220, 277, 79, 796, 4654, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 19668, 4357, 366, 535, 66, 1600, 366, 562, 316, 16, 13, 9132, 4943, 198, 220, 220, 220, 3551, 7, 46428, 11, 366, 2436, 993, 12429, 2436, 4449, 1174, 4943, 198, 220, 220, 220, 336, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2773, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 5239, 15414, 90, 535, 66, 14, 562, 316, 16, 92, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 2536, 7, 301, 930, 29, 3063, 11, 33490, 79, 29, 4366, 4731, 33367, 1279, 11576, 29, 2436, 4449, 3556, 11576, 12240, 79, 29, 4943, 198, 437, 628, 198, 9501, 17, 3419, 198, 198, 31, 9288, 2617, 366, 43, 55, 5128, 1, 2221, 198, 220, 220, 220, 900, 62, 22019, 6978, 7203, 9630, 13, 9132, 4943, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 48774, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 366, 82, 16, 13, 20362, 12340, 366, 35235, 7, 16, 10, 16, 8, 4943, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 1600, 366, 82, 16, 64, 13, 11134, 12340, 366, 2436, 993, 4943, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 366, 22915, 1600, 366, 82, 16, 13, 448, 12340, 366, 2436, 4449, 4943, 198, 220, 220, 220, 336, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2773, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 73, 43640, 18477, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 3244, 3863, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 22915, 90, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 9461, 33705, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 29487, 25, 64, 18477, 82, 16, 13, 20362, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1760, 13, 198, 220, 220, 220, 220, 220, 220, 220, 13538, 8172, 628, 220, 220, 220, 376, 13, 4299, 62, 8763, 9864, 1847, 62, 53, 27415, 0, 3419, 198, 220, 220, 220, 376, 13, 4299, 62, 8763, 9864, 1847, 62, 43, 55, 7206, 10652, 0, 3419, 628, 220, 220, 220, 285, 796, 376, 13, 1102, 1851, 62, 9132, 7, 301, 8, 198, 220, 220, 220, 289, 796, 376, 13, 1102, 1851, 62, 6494, 7, 76, 8, 628, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 27, 79, 29, 4366, 4731, 1279, 3866, 6927, 8189, 1398, 17553, 16129, 12, 73, 43640, 38214, 3, 7, 961, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 366, 82, 16, 13, 20362, 12340, 10903, 4008, 3556, 8189, 12240, 3866, 29, 1600, 289, 8, 198, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 6423, 3863, 1279, 3866, 6927, 8189, 1398, 17553, 25638, 5239, 38214, 3, 7, 961, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 9630, 1600, 366, 8189, 1600, 220, 366, 22915, 1600, 366, 82, 16, 13, 448, 12340, 10903, 4008, 3556, 8189, 12240, 3866, 29, 1600, 289, 8, 198, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 11158, 33705, 25, 1279, 9600, 12351, 17553, 14, 19668, 14, 9630, 14, 8189, 14, 22915, 14, 82, 16, 64, 13, 11134, 7879, 5988, 17553, 38214, 1760, 33283, 289, 8, 198, 437, 198, 198, 31, 9288, 2617, 366, 20560, 10670, 1, 2221, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 535, 66, 48774, 198, 220, 220, 220, 277, 79, 796, 4654, 6978, 7, 37, 13, 47, 1404, 7998, 58, 25, 15654, 4357, 366, 19668, 1600, 366, 535, 66, 1600, 366, 562, 316, 16, 13, 9132, 4943, 198, 220, 220, 220, 3551, 7, 46428, 11, 366, 2436, 993, 12429, 2436, 4449, 1174, 4943, 198, 220, 220, 220, 336, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2773, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 5239, 15414, 90, 535, 66, 14, 562, 316, 16, 92, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 2536, 7, 301, 930, 29, 3063, 11, 33490, 79, 29, 4366, 4731, 33367, 1279, 11576, 29, 2436, 4449, 3556, 11576, 12240, 79, 29, 4943, 198, 437, 198, 198, 31, 9288, 2617, 366, 20560, 11454, 1, 2221, 198, 220, 220, 220, 1392, 67, 3419, 198, 220, 220, 220, 264, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 15923, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 73, 43640, 18477, 21943, 14, 65, 1031, 92, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 15414, 90, 29487, 18477, 21943, 14, 65, 1031, 92, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 5239, 15414, 90, 21943, 14, 5657, 92, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 930, 29, 277, 67, 17, 6494, 62, 8671, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 2536, 7, 82, 11, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 79, 29, 3838, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 79, 6927, 12626, 3918, 2625, 8043, 25, 445, 26, 5320, 1003, 10347, 77, 470, 1064, 257, 2393, 618, 2111, 284, 10568, 281, 5128, 2581, 351, 3585, 3108, 25, 4600, 21943, 14, 65, 1031, 44646, 3373, 3556, 12626, 12240, 79, 29, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 79, 6927, 12626, 3918, 2625, 8043, 25, 445, 26, 5320, 1003, 10347, 77, 470, 1064, 281, 5072, 8619, 3917, 351, 705, 21943, 14, 65, 1031, 6, 618, 2111, 284, 5128, 257, 7110, 13, 3373, 3556, 12626, 12240, 79, 29, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 79, 6927, 12626, 3918, 2625, 8043, 25, 445, 26, 5320, 1003, 10347, 77, 470, 1064, 257, 2393, 618, 2111, 284, 10568, 281, 5128, 2581, 351, 3585, 3108, 25, 4600, 21943, 14, 5657, 44646, 3373, 3556, 12626, 12240, 79, 12240, 79, 29, 198, 220, 220, 220, 220, 220, 220, 220, 13538, 4943, 628, 220, 220, 220, 43458, 17, 3419, 198, 220, 220, 220, 1392, 67, 3419, 198, 220, 220, 220, 1303, 3084, 5128, 198, 220, 220, 220, 33480, 6978, 7, 22179, 6978, 7, 8671, 11, 45434, 19668, 1600, 366, 9630, 1600, 366, 22915, 48774, 198, 220, 220, 220, 3551, 7, 22179, 6978, 7, 8671, 11, 45434, 19668, 1600, 366, 9630, 1600, 366, 22915, 1600, 366, 21943, 13, 40664, 12340, 366, 5657, 4943, 198, 220, 220, 220, 264, 796, 8246, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 4299, 277, 67, 62, 81, 6978, 796, 366, 9630, 13, 9132, 1, 198, 220, 220, 220, 220, 220, 220, 220, 3467, 11487, 15414, 90, 18477, 19571, 21943, 13, 40664, 92, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 930, 29, 277, 67, 17, 6494, 62, 8671, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 2536, 7, 82, 11, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 79, 6927, 12626, 3918, 2625, 8043, 25, 445, 26, 5320, 1003, 8655, 12336, 31051, 19668, 14, 9630, 14, 21943, 13, 40664, 6, 407, 1043, 13, 3373, 3556, 12626, 12240, 79, 12240, 79, 29, 198, 220, 220, 220, 220, 220, 220, 220, 13538, 4943, 198, 437, 198 ]
2.15277
1,859
using Flux, CUDA, Test using Flux: pullback @testset "CUDNN BatchNorm" begin @testset "4D Input" begin x = Float64.(collect(reshape(1:12, 2, 2, 3, 1))) m = BatchNorm(3) cx = gpu(x) cm = gpu(m) y, back = pullback((m, x) -> m(x), m, x) cy, cback = pullback((m, x) -> m(x), cm, cx) @test cpu(cy) ≈ y Δ = randn(size(y)) dm, dx = back(Δ) cdm, cdx = cback(gpu(Δ)) @test dm[].γ ≈ cpu(cdm[].γ) @test dm[].β ≈ cpu(cdm[].β) @test dx ≈ cpu(cdx) end @testset "2D Input" begin x = Float64.(collect(reshape(1:12, 3, 4))) m = BatchNorm(3) cx = gpu(x) cm = gpu(m) y, back = pullback((m, x) -> m(x), m, x) cy, cback = pullback((m, x) -> m(x), cm, cx) @test cpu(cy) ≈ y Δ = randn(size(y)) dm, dx = back(Δ) cdm, cdx = cback(gpu(Δ)) @test dm[].γ ≈ cpu(cdm[].γ) @test dm[].β ≈ cpu(cdm[].β) @test dx ≈ cpu(cdx) end end
[ 3500, 1610, 2821, 11, 29369, 5631, 11, 6208, 198, 3500, 1610, 2821, 25, 2834, 1891, 198, 198, 31, 9288, 2617, 366, 34, 8322, 6144, 347, 963, 35393, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 19, 35, 23412, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 48436, 2414, 12195, 33327, 7, 3447, 1758, 7, 16, 25, 1065, 11, 362, 11, 362, 11, 513, 11, 352, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 347, 963, 35393, 7, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43213, 796, 308, 19944, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12067, 796, 308, 19944, 7, 76, 8, 628, 220, 220, 220, 220, 220, 220, 220, 331, 11, 736, 796, 2834, 1891, 19510, 76, 11, 2124, 8, 4613, 285, 7, 87, 828, 285, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3075, 11, 269, 1891, 796, 2834, 1891, 19510, 76, 11, 2124, 8, 4613, 285, 7, 87, 828, 12067, 11, 43213, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 42804, 7, 948, 8, 15139, 230, 331, 628, 220, 220, 220, 220, 220, 220, 220, 37455, 796, 43720, 77, 7, 7857, 7, 88, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 288, 76, 11, 44332, 796, 736, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 22927, 76, 11, 22927, 87, 796, 269, 1891, 7, 46999, 7, 138, 242, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 288, 76, 58, 4083, 42063, 15139, 230, 42804, 7, 10210, 76, 58, 4083, 42063, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 288, 76, 58, 4083, 26638, 15139, 230, 42804, 7, 10210, 76, 58, 4083, 26638, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 44332, 15139, 230, 42804, 7, 10210, 87, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 17, 35, 23412, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 48436, 2414, 12195, 33327, 7, 3447, 1758, 7, 16, 25, 1065, 11, 513, 11, 604, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 347, 963, 35393, 7, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43213, 796, 308, 19944, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12067, 796, 308, 19944, 7, 76, 8, 628, 220, 220, 220, 220, 220, 220, 220, 331, 11, 736, 796, 2834, 1891, 19510, 76, 11, 2124, 8, 4613, 285, 7, 87, 828, 285, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3075, 11, 269, 1891, 796, 2834, 1891, 19510, 76, 11, 2124, 8, 4613, 285, 7, 87, 828, 12067, 11, 43213, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 42804, 7, 948, 8, 15139, 230, 331, 628, 220, 220, 220, 220, 220, 220, 220, 37455, 796, 43720, 77, 7, 7857, 7, 88, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 288, 76, 11, 44332, 796, 736, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 22927, 76, 11, 22927, 87, 796, 269, 1891, 7, 46999, 7, 138, 242, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 288, 76, 58, 4083, 42063, 15139, 230, 42804, 7, 10210, 76, 58, 4083, 42063, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 288, 76, 58, 4083, 26638, 15139, 230, 42804, 7, 10210, 76, 58, 4083, 26638, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 44332, 15139, 230, 42804, 7, 10210, 87, 8, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.679153
614
const PAR_MAGIC = "PAR1" const SZ_PAR_MAGIC = length(PAR_MAGIC) const SZ_FOOTER = 4 const SZ_VALID_PAR = 2*SZ_PAR_MAGIC + SZ_FOOTER # page is the unit of compression mutable struct Page colchunk::ColumnChunk hdr::PageHeader pos::Int data::Vector{UInt8} end mutable struct PageLRU refs::Dict{ColumnChunk,DRef} function PageLRU() new(Dict{ColumnChunk,DRef}()) end end function cacheget(lru::PageLRU, chunk::ColumnChunk, nf) if chunk in keys(lru.refs) poolget(lru.refs[chunk]) else data = nf(chunk) lru.refs[chunk] = poolset(data) data end end # parquet file. # Keeps a handle to the open file and the file metadata. # Holds a LRU cache of raw bytes of the pages read. mutable struct ParFile path::AbstractString handle::IOStream meta::FileMetaData schema::Schema page_cache::PageLRU end function ParFile(path::AbstractString) f = open(path) try return ParFile(path, f) catch ex close(f) rethrow(ex) end end function ParFile(path::AbstractString, handle::IOStream; maxcache::Integer=10) # TODO: maxcache should become a parameter to MemPool is_par_file(handle) || error("Not a parquet format file: $path") meta_len = metadata_length(handle) meta = metadata(handle, path, meta_len) ParFile(path, handle, meta, Schema(meta.schema), PageLRU()) end ## # layer 1 access # can access raw (uncompressed) bytes from pages schema(par::ParFile) = par.schema schema(conv::T, par::ParFile, schema_name::Symbol) where {T<:SchemaConverter} = schema(conv, par.schema, schema_name) colname(col::ColumnChunk) = colname(col.meta_data) colname(col::ColumnMetaData) = join(col.path_in_schema, '.') colnames(rowgroup::RowGroup) = [colname(col) for col in rowgroup.columns] function colnames(par::ParFile) s = Set{AbstractString}() for rg in rowgroups(par) push!(s, colnames(rg)...) end collect(s) end ncols(par::ParFile) = length(colnames(par)) nrows(par::ParFile) = par.meta.num_rows coltype(col::ColumnChunk) = coltype(col.meta_data) coltype(col::ColumnMetaData) = col._type # return all rowgroups in the par file rowgroups(par::ParFile) = par.meta.row_groups # Return rowgroups that stores all the columns mentioned in `cnames`. # Returned row groups can be further queried to get the range of rows. rowgroups(par::ParFile, colname::AbstractString, rowrange::UnitRange=1:typemax(Int64)) = rowgroups(par, [colname], rowrange) function rowgroups(par::ParFile, cnames, rowrange::UnitRange=1:typemax(Int64)) R = RowGroup[] L = length(cnames) beginrow = 1 for rowgrp in rowgroups(par) cnamesrg = colnames(rowgrp) found = length(intersect(cnames, cnamesrg)) endrow = beginrow + rowgrp.num_rows - 1 (found == L) && (length(intersect(beginrow:endrow)) > 0) && push!(R, rowgrp) beginrow = endrow + 1 end R end columns(par::ParFile, rowgroupidx::Integer) = columns(par, rowgroups(par)[rowgroupidx]) columns(par::ParFile, rowgroup::RowGroup) = rowgroup.columns columns(par::ParFile, rowgroup::RowGroup, colname::AbstractString) = columns(par, rowgroup, [colname]) function columns(par::ParFile, rowgroup::RowGroup, cnames) R = ColumnChunk[] for col in columns(par, rowgroup) (colname(col) in cnames) && push!(R, col) end R end function _pagevec(par::ParFile, col::ColumnChunk) # read pages from the file pos = page_offset(col) endpos = end_offset(col) io = par.handle pagevec = Page[] while pos < endpos seek(io, pos) pagehdr = read_thrift(io, PageHeader) buff = Array{UInt8}(undef, page_size(pagehdr)) page_data_pos = position(io) data = read!(io, buff) page = Page(col, pagehdr, page_data_pos, data) push!(pagevec, page) pos = position(io) end pagevec end pages(par::ParFile, rowgroupidx::Integer, colidx::Integer) = pages(par, columns(par, rowgroupidx), colidx) pages(par::ParFile, cols::Vector{ColumnChunk}, colidx::Integer) = pages(par, cols[colidx]) pages(par::ParFile, col::ColumnChunk) = cacheget(par.page_cache, col, col->_pagevec(par,col)) function bytes(page::Page, uncompressed::Bool=true) data = page.data codec = page.colchunk.meta_data.codec if uncompressed && (codec != CompressionCodec.UNCOMPRESSED) uncompressed_sz = page.hdr.uncompressed_page_size if codec == CompressionCodec.SNAPPY data = Snappy.uncompress(data) elseif codec == CompressionCodec.GZIP data = transcode(GzipDecompressor, data) else error("Unknown compression codec for column chunk: $codec") end (length(data) == uncompressed_sz) || error("failed to uncompress page. expected $(uncompressed_sz), got $(length(data)) bytes") end data end ## # layer 2 access # can access decoded values from pages map_dict_vals(valdict::Vector{T1}, vals::Vector{T2}) where {T1, T2} = isempty(valdict) ? vals : [valdict[v+1] for v in vals] values(par::ParFile, rowgroupidx::Integer, colidx::Integer) = values(par, columns(par, rowgroupidx), colidx) values(par::ParFile, cols::Vector{ColumnChunk}, colidx::Integer) = values(par, cols[colidx]) function values(par::ParFile, col::ColumnChunk) ctype = coltype(col) pgs = pages(par, col) valdict = Int[] jtype = PLAIN_JTYPES[ctype+1] if (ctype == _Type.BYTE_ARRAY) || (ctype == _Type.FIXED_LEN_BYTE_ARRAY) jtype = Vector{jtype} end vals = Array{jtype}(undef, 0) defn_levels = Int[] repn_levels = Int[] for pg in pgs typ = pg.hdr._type valtup = values(par, pg) if (typ == PageType.DATA_PAGE) || (typ == PageType.DATA_PAGE_V2) @debug("reading a data page for columnchunk") _vals, _defn_levels, _repn_levels = valtup enc, defn_enc, rep_enc = page_encodings(pg) if enc == Encoding.PLAIN_DICTIONARY || enc == Encoding.RLE_DICTIONARY append!(vals, map_dict_vals(valdict, _vals)) else append!(vals, _vals) end append!(defn_levels, _defn_levels) append!(repn_levels, _repn_levels) elseif typ == PageType.DICTIONARY_PAGE _vals = valtup[1] @debug("read a dictionary page for columnchunk with $(length(_vals)) values") valdict = isempty(valdict) ? _vals : append!(valdict, _vals) end end vals, defn_levels, repn_levels end function read_levels(io::IO, max_val::Integer, enc::Int32, num_values::Integer) bw = bitwidth(max_val) (bw == 0) && (return Int[]) @debug("reading levels. enc:$enc ($(Thrift.enumstr(Encoding,enc))), max_val:$max_val, num_values:$num_values") if enc == Encoding.RLE read_hybrid(io, num_values, bw) elseif enc == Encoding.BIT_PACKED read_bitpacked_run_old(io, num_values, bw) elseif enc == Encoding.PLAIN # levels should never be of this type though read_plain_values(io, _Type.INT32, num_values) else error("unsupported encoding $enc ($(Thrift.enumstr(Encoding,enc))) for levels") end end function read_values(io::IO, enc::Int32, typ::Int32, num_values::Integer) @debug("reading values. enc:$enc ($(Thrift.enumstr(Encoding,enc))), num_values:$num_values") if enc == Encoding.PLAIN read_plain_values(io, num_values, typ) elseif enc == Encoding.PLAIN_DICTIONARY || enc == Encoding.RLE_DICTIONARY read_rle_dict(io, num_values) else error("unsupported encoding $enc for pages") #@debug("unsupported encoding $enc ($(Thrift.enumstr(Encoding,enc))) for pages") #return Int[] end end function values(par::ParFile, page::Page) ctype = coltype(page.colchunk) rawbytes = bytes(page) io = IOBuffer(rawbytes) encs = page_encodings(page) num_values = page_num_values(page) typ = page.hdr._type if (typ == PageType.DATA_PAGE) || (typ == PageType.DATA_PAGE_V2) read_levels_and_values(io, encs, ctype, num_values, par, page) elseif typ == PageType.DICTIONARY_PAGE (read_plain_values(io, num_values, ctype),) else () end end function read_levels_and_values(io::IO, encs::Tuple, ctype::Int32, num_values::Integer, par::ParFile, page::Page) cname = colname(page.colchunk) enc, defn_enc, rep_enc = encs #@debug("before reading defn levels bytesavailable in page: $(bytesavailable(io))") # read definition levels. skipped if column is required defn_levels = isrequired(par.schema, cname) ? Int[] : read_levels(io, max_definition_level(par.schema, cname), defn_enc, num_values) #@debug("before reading repn levels bytesavailable in page: $(bytesavailable(io))") # read repetition levels. skipped if all columns are at 1st level repn_levels = ('.' in cname) ? read_levels(io, max_repetition_level(par.schema, cname), rep_enc, num_values) : Int[] #@debug("before reading values bytesavailable in page: $(bytesavailable(io))") # read values vals = read_values(io, enc, ctype, num_values) vals, defn_levels, repn_levels end # column and page metadata open(par::ParFile, col::ColumnChunk) = open(par.handle, par.path, col) close(par::ParFile, col::ColumnChunk, io) = (par.handle == io) || close(io) function open(io, path::AbstractString, col::ColumnChunk) if isfilled(col, :file_path) @debug("opening file $(col.file_path) to read column metadata at $(col.file_offset)") open(col.file_path) else if io == nothing @debug("opening file $path to read column metadata at $(col.file_offset)") open(path) else @debug("reading column metadata at $(col.file_offset)") io end end end function metadata(io, path::AbstractString, col::ColumnChunk) fio = open(io, path, col) seek(fio, col.file_offset) meta = read_thrift(fio, ColumnMetaData) (fio !== io) && close(fio) meta end function page_offset(col::ColumnChunk) colmeta = col.meta_data offset = colmeta.data_page_offset Thrift.isfilled(colmeta, :index_page_offset) && (offset = min(offset, colmeta.index_page_offset)) Thrift.isfilled(colmeta, :dictionary_page_offset) && (offset = min(offset, colmeta.dictionary_page_offset)) offset end end_offset(col::ColumnChunk) = page_offset(col) + col.meta_data.total_compressed_size page_size(page::PageHeader) = Thrift.isfilled(page, :compressed_page_size) ? page.compressed_page_size : page.uncompressed_page_size page_encodings(page::Page) = page_encodings(page.hdr) function page_encodings(page::PageHeader) Thrift.isfilled(page, :data_page_header) ? page_encodings(page.data_page_header) : Thrift.isfilled(page, :data_page_header_v2) ? page_encodings(page.data_page_header_v2) : Thrift.isfilled(page, :dictionary_page_header) ? page_encodings(page.dictionary_page_header) : () end page_encodings(page::DictionaryPageHeader) = (page.encoding,) page_encodings(page::DataPageHeader) = (page.encoding, page.definition_level_encoding, page.repetition_level_encoding) page_encodings(page::DataPageHeaderV2) = (page.encoding, Encoding.RLE, Encoding.RLE) page_num_values(page::Page) = page_num_values(page.hdr) function page_num_values(page::PageHeader) Thrift.isfilled(page, :data_page_header) ? page_num_values(page.data_page_header) : Thrift.isfilled(page, :data_page_header_v2) ? page_num_values(page.data_page_header_v2) : Thrift.isfilled(page, :dictionary_page_header) ? page_num_values(page.dictionary_page_header) : 0 end page_num_values(page::Union{DataPageHeader,DataPageHeaderV2,DictionaryPageHeader}) = page.num_values # file metadata read_thrift(buff::Array{UInt8}, ::Type{T}) where {T} = read(TCompactProtocol(TMemoryTransport(buff)), T) read_thrift(io::IO, ::Type{T}) where {T} = read(TCompactProtocol(TFileTransport(io)), T) read_thrift(t::TR, ::Type{T}) where {TR<:TTransport,T} = read(TCompactProtocol(t), T) function metadata_length(io) sz = filesize(io) seek(io, sz - SZ_PAR_MAGIC - SZ_FOOTER) # read footer size as little endian signed Int32 ProtoBuf.read_fixed(io, Int32) end function metadata(io, path::AbstractString, len::Integer=metadata_length(io)) @debug("metadata len = $len") sz = filesize(io) seek(io, sz - SZ_PAR_MAGIC - SZ_FOOTER - len) meta = read_thrift(io, FileMetaData) # go through all column chunks and read metadata from file offsets if required for grp in meta.row_groups for col in grp.columns if !isfilled(col, :meta_data) # need to read metadata from an offset col.meta_data = metadata(io, path, col) end end end meta end metadata(par::ParFile) = par.meta # file format verification function is_par_file(fname::AbstractString) open(fname) do io return is_par_file(io) end end function is_par_file(io) sz = filesize(io) (sz > SZ_VALID_PAR) || return false seekstart(io) magic = Array{UInt8}(undef, 4) read!(io, magic) (String(magic) == PAR_MAGIC) || return false seek(io, sz - SZ_PAR_MAGIC) magic = Array{UInt8}(undef, 4) read!(io, magic) (String(magic) == PAR_MAGIC) || return false true end
[ 198, 9979, 29463, 62, 45820, 2149, 796, 366, 27082, 16, 1, 198, 9979, 311, 57, 62, 27082, 62, 45820, 2149, 796, 4129, 7, 27082, 62, 45820, 2149, 8, 198, 9979, 311, 57, 62, 6080, 2394, 1137, 796, 604, 198, 9979, 311, 57, 62, 23428, 2389, 62, 27082, 796, 362, 9, 50, 57, 62, 27082, 62, 45820, 2149, 1343, 311, 57, 62, 6080, 2394, 1137, 198, 198, 2, 2443, 318, 262, 4326, 286, 19794, 198, 76, 18187, 2878, 7873, 198, 220, 220, 220, 951, 354, 2954, 3712, 39470, 1925, 2954, 198, 220, 220, 220, 289, 7109, 3712, 9876, 39681, 198, 220, 220, 220, 1426, 3712, 5317, 198, 220, 220, 220, 1366, 3712, 38469, 90, 52, 5317, 23, 92, 198, 437, 198, 198, 76, 18187, 2878, 7873, 35972, 52, 198, 220, 220, 220, 1006, 82, 3712, 35, 713, 90, 39470, 1925, 2954, 11, 7707, 891, 92, 198, 220, 220, 220, 2163, 7873, 35972, 52, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 649, 7, 35, 713, 90, 39470, 1925, 2954, 11, 7707, 891, 92, 28955, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 12940, 1136, 7, 75, 622, 3712, 9876, 35972, 52, 11, 16058, 3712, 39470, 1925, 2954, 11, 299, 69, 8, 198, 220, 220, 220, 611, 16058, 287, 8251, 7, 75, 622, 13, 5420, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5933, 1136, 7, 75, 622, 13, 5420, 82, 58, 354, 2954, 12962, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 299, 69, 7, 354, 2954, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 622, 13, 5420, 82, 58, 354, 2954, 60, 796, 5933, 2617, 7, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 1582, 21108, 2393, 13, 198, 2, 9175, 82, 257, 5412, 284, 262, 1280, 2393, 290, 262, 2393, 20150, 13, 198, 2, 9340, 82, 257, 37491, 52, 12940, 286, 8246, 9881, 286, 262, 5468, 1100, 13, 198, 76, 18187, 2878, 2547, 8979, 198, 220, 220, 220, 3108, 3712, 23839, 10100, 198, 220, 220, 220, 5412, 3712, 9399, 12124, 198, 220, 220, 220, 13634, 3712, 8979, 48526, 6601, 198, 220, 220, 220, 32815, 3712, 27054, 2611, 198, 220, 220, 220, 2443, 62, 23870, 3712, 9876, 35972, 52, 198, 437, 198, 198, 8818, 2547, 8979, 7, 6978, 3712, 23839, 10100, 8, 198, 220, 220, 220, 277, 796, 1280, 7, 6978, 8, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2547, 8979, 7, 6978, 11, 277, 8, 198, 220, 220, 220, 4929, 409, 198, 220, 220, 220, 220, 220, 220, 220, 1969, 7, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 302, 16939, 7, 1069, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 2547, 8979, 7, 6978, 3712, 23839, 10100, 11, 5412, 3712, 9399, 12124, 26, 3509, 23870, 3712, 46541, 28, 940, 8, 198, 220, 220, 220, 1303, 16926, 46, 25, 3509, 23870, 815, 1716, 257, 11507, 284, 4942, 27201, 198, 220, 220, 220, 318, 62, 1845, 62, 7753, 7, 28144, 8, 8614, 4049, 7203, 3673, 257, 1582, 21108, 5794, 2393, 25, 720, 6978, 4943, 198, 220, 220, 220, 13634, 62, 11925, 796, 20150, 62, 13664, 7, 28144, 8, 198, 220, 220, 220, 13634, 796, 20150, 7, 28144, 11, 3108, 11, 13634, 62, 11925, 8, 198, 220, 220, 220, 2547, 8979, 7, 6978, 11, 5412, 11, 13634, 11, 10011, 2611, 7, 28961, 13, 15952, 2611, 828, 7873, 35972, 52, 28955, 198, 437, 198, 198, 2235, 198, 2, 7679, 352, 1895, 198, 2, 460, 1895, 8246, 357, 403, 5589, 2790, 8, 9881, 422, 5468, 198, 198, 15952, 2611, 7, 1845, 3712, 10044, 8979, 8, 796, 1582, 13, 15952, 2611, 198, 15952, 2611, 7, 42946, 3712, 51, 11, 1582, 3712, 10044, 8979, 11, 32815, 62, 3672, 3712, 13940, 23650, 8, 810, 1391, 51, 27, 25, 27054, 2611, 3103, 332, 353, 92, 796, 32815, 7, 42946, 11, 1582, 13, 15952, 2611, 11, 32815, 62, 3672, 8, 198, 198, 4033, 3672, 7, 4033, 3712, 39470, 1925, 2954, 8, 796, 951, 3672, 7, 4033, 13, 28961, 62, 7890, 8, 198, 4033, 3672, 7, 4033, 3712, 39470, 48526, 6601, 8, 796, 4654, 7, 4033, 13, 6978, 62, 259, 62, 15952, 2611, 11, 705, 2637, 8, 198, 4033, 14933, 7, 808, 8094, 3712, 25166, 13247, 8, 796, 685, 4033, 3672, 7, 4033, 8, 329, 951, 287, 5752, 8094, 13, 28665, 82, 60, 198, 8818, 951, 14933, 7, 1845, 3712, 10044, 8979, 8, 198, 220, 220, 220, 264, 796, 5345, 90, 23839, 10100, 92, 3419, 198, 220, 220, 220, 329, 48670, 287, 5752, 24432, 7, 1845, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 82, 11, 951, 14933, 7, 41345, 8, 23029, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2824, 7, 82, 8, 198, 437, 198, 198, 77, 4033, 82, 7, 1845, 3712, 10044, 8979, 8, 796, 4129, 7, 4033, 14933, 7, 1845, 4008, 198, 77, 8516, 7, 1845, 3712, 10044, 8979, 8, 796, 1582, 13, 28961, 13, 22510, 62, 8516, 198, 198, 4033, 4906, 7, 4033, 3712, 39470, 1925, 2954, 8, 796, 951, 4906, 7, 4033, 13, 28961, 62, 7890, 8, 198, 4033, 4906, 7, 4033, 3712, 39470, 48526, 6601, 8, 796, 951, 13557, 4906, 198, 198, 2, 1441, 477, 5752, 24432, 287, 262, 1582, 2393, 198, 808, 24432, 7, 1845, 3712, 10044, 8979, 8, 796, 1582, 13, 28961, 13, 808, 62, 24432, 198, 198, 2, 8229, 5752, 24432, 326, 7000, 477, 262, 15180, 4750, 287, 4600, 66, 14933, 44646, 198, 2, 8229, 276, 5752, 2628, 460, 307, 2252, 42517, 798, 284, 651, 262, 2837, 286, 15274, 13, 198, 808, 24432, 7, 1845, 3712, 10044, 8979, 11, 951, 3672, 3712, 23839, 10100, 11, 5752, 9521, 3712, 26453, 17257, 28, 16, 25, 28004, 368, 897, 7, 5317, 2414, 4008, 796, 5752, 24432, 7, 1845, 11, 685, 4033, 3672, 4357, 5752, 9521, 8, 198, 8818, 5752, 24432, 7, 1845, 3712, 10044, 8979, 11, 269, 14933, 11, 5752, 9521, 3712, 26453, 17257, 28, 16, 25, 28004, 368, 897, 7, 5317, 2414, 4008, 198, 220, 220, 220, 371, 796, 11314, 13247, 21737, 198, 220, 220, 220, 406, 796, 4129, 7, 66, 14933, 8, 198, 220, 220, 220, 2221, 808, 796, 352, 198, 220, 220, 220, 329, 5752, 2164, 79, 287, 5752, 24432, 7, 1845, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 14933, 41345, 796, 951, 14933, 7, 808, 2164, 79, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1043, 796, 4129, 7, 3849, 8831, 7, 66, 14933, 11, 269, 14933, 41345, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 808, 796, 2221, 808, 1343, 5752, 2164, 79, 13, 22510, 62, 8516, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 357, 9275, 6624, 406, 8, 11405, 357, 13664, 7, 3849, 8831, 7, 27471, 808, 25, 437, 808, 4008, 1875, 657, 8, 11405, 4574, 0, 7, 49, 11, 5752, 2164, 79, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2221, 808, 796, 886, 808, 1343, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 371, 198, 437, 198, 198, 28665, 82, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 312, 87, 3712, 46541, 8, 796, 15180, 7, 1845, 11, 5752, 24432, 7, 1845, 38381, 808, 8094, 312, 87, 12962, 198, 28665, 82, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 3712, 25166, 13247, 8, 796, 5752, 8094, 13, 28665, 82, 198, 28665, 82, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 3712, 25166, 13247, 11, 951, 3672, 3712, 23839, 10100, 8, 796, 15180, 7, 1845, 11, 5752, 8094, 11, 685, 4033, 3672, 12962, 198, 8818, 15180, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 3712, 25166, 13247, 11, 269, 14933, 8, 198, 220, 220, 220, 371, 796, 29201, 1925, 2954, 21737, 198, 220, 220, 220, 329, 951, 287, 15180, 7, 1845, 11, 5752, 8094, 8, 198, 220, 220, 220, 220, 220, 220, 220, 357, 4033, 3672, 7, 4033, 8, 287, 269, 14933, 8, 11405, 4574, 0, 7, 49, 11, 951, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 371, 198, 437, 198, 198, 8818, 4808, 7700, 35138, 7, 1845, 3712, 10044, 8979, 11, 951, 3712, 39470, 1925, 2954, 8, 198, 220, 220, 220, 1303, 1100, 5468, 422, 262, 2393, 198, 220, 220, 220, 1426, 796, 2443, 62, 28968, 7, 4033, 8, 198, 220, 220, 220, 886, 1930, 796, 886, 62, 28968, 7, 4033, 8, 198, 220, 220, 220, 33245, 796, 1582, 13, 28144, 198, 220, 220, 220, 2443, 35138, 796, 7873, 21737, 198, 220, 220, 220, 981, 1426, 1279, 886, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 5380, 7, 952, 11, 1426, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2443, 71, 7109, 796, 1100, 62, 400, 35357, 7, 952, 11, 7873, 39681, 8, 628, 220, 220, 220, 220, 220, 220, 220, 6940, 796, 15690, 90, 52, 5317, 23, 92, 7, 917, 891, 11, 2443, 62, 7857, 7, 7700, 71, 7109, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2443, 62, 7890, 62, 1930, 796, 2292, 7, 952, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1100, 0, 7, 952, 11, 6940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2443, 796, 7873, 7, 4033, 11, 2443, 71, 7109, 11, 2443, 62, 7890, 62, 1930, 11, 1366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 7700, 35138, 11, 2443, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1426, 796, 2292, 7, 952, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2443, 35138, 198, 437, 198, 31126, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 312, 87, 3712, 46541, 11, 951, 312, 87, 3712, 46541, 8, 796, 5468, 7, 1845, 11, 15180, 7, 1845, 11, 5752, 8094, 312, 87, 828, 951, 312, 87, 8, 198, 31126, 7, 1845, 3712, 10044, 8979, 11, 951, 82, 3712, 38469, 90, 39470, 1925, 2954, 5512, 951, 312, 87, 3712, 46541, 8, 796, 5468, 7, 1845, 11, 951, 82, 58, 4033, 312, 87, 12962, 198, 31126, 7, 1845, 3712, 10044, 8979, 11, 951, 3712, 39470, 1925, 2954, 8, 796, 12940, 1136, 7, 1845, 13, 7700, 62, 23870, 11, 951, 11, 951, 3784, 62, 7700, 35138, 7, 1845, 11, 4033, 4008, 198, 198, 8818, 9881, 7, 7700, 3712, 9876, 11, 34318, 2790, 3712, 33, 970, 28, 7942, 8, 198, 220, 220, 220, 1366, 796, 2443, 13, 7890, 198, 220, 220, 220, 40481, 796, 2443, 13, 4033, 354, 2954, 13, 28961, 62, 7890, 13, 19815, 721, 198, 220, 220, 220, 611, 34318, 2790, 11405, 357, 19815, 721, 14512, 3082, 2234, 43806, 721, 13, 4944, 9858, 32761, 1961, 8, 198, 220, 220, 220, 220, 220, 220, 220, 34318, 2790, 62, 82, 89, 796, 2443, 13, 71, 7109, 13, 403, 5589, 2790, 62, 7700, 62, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 611, 40481, 6624, 3082, 2234, 43806, 721, 13, 15571, 24805, 56, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 5489, 7774, 13, 403, 5589, 601, 7, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 40481, 6624, 3082, 2234, 43806, 721, 13, 38, 57, 4061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1007, 8189, 7, 38, 13344, 10707, 3361, 44292, 11, 1366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 20035, 19794, 40481, 329, 5721, 16058, 25, 720, 19815, 721, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 357, 13664, 7, 7890, 8, 6624, 34318, 2790, 62, 82, 89, 8, 8614, 4049, 7203, 47904, 284, 34318, 601, 2443, 13, 2938, 29568, 403, 5589, 2790, 62, 82, 89, 828, 1392, 29568, 13664, 7, 7890, 4008, 9881, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1366, 198, 437, 198, 198, 2235, 198, 2, 7679, 362, 1895, 198, 2, 460, 1895, 875, 9043, 3815, 422, 5468, 198, 198, 8899, 62, 11600, 62, 12786, 7, 85, 1940, 713, 3712, 38469, 90, 51, 16, 5512, 410, 874, 3712, 38469, 90, 51, 17, 30072, 810, 1391, 51, 16, 11, 309, 17, 92, 796, 318, 28920, 7, 85, 1940, 713, 8, 5633, 410, 874, 1058, 685, 85, 1940, 713, 58, 85, 10, 16, 60, 329, 410, 287, 410, 874, 60, 198, 198, 27160, 7, 1845, 3712, 10044, 8979, 11, 5752, 8094, 312, 87, 3712, 46541, 11, 951, 312, 87, 3712, 46541, 8, 796, 3815, 7, 1845, 11, 15180, 7, 1845, 11, 5752, 8094, 312, 87, 828, 951, 312, 87, 8, 198, 27160, 7, 1845, 3712, 10044, 8979, 11, 951, 82, 3712, 38469, 90, 39470, 1925, 2954, 5512, 951, 312, 87, 3712, 46541, 8, 796, 3815, 7, 1845, 11, 951, 82, 58, 4033, 312, 87, 12962, 198, 8818, 3815, 7, 1845, 3712, 10044, 8979, 11, 951, 3712, 39470, 1925, 2954, 8, 198, 220, 220, 220, 269, 4906, 796, 951, 4906, 7, 4033, 8, 198, 220, 220, 220, 279, 14542, 796, 5468, 7, 1845, 11, 951, 8, 198, 220, 220, 220, 1188, 11600, 796, 2558, 21737, 198, 220, 220, 220, 474, 4906, 796, 9297, 29833, 62, 41, 9936, 47, 1546, 58, 310, 2981, 10, 16, 60, 198, 220, 220, 220, 611, 357, 310, 2981, 6624, 4808, 6030, 13, 17513, 9328, 62, 1503, 30631, 8, 8614, 357, 310, 2981, 6624, 4808, 6030, 13, 47084, 1961, 62, 43, 1677, 62, 17513, 9328, 62, 1503, 30631, 8, 198, 220, 220, 220, 220, 220, 220, 220, 474, 4906, 796, 20650, 90, 73, 4906, 92, 198, 220, 220, 220, 886, 198, 220, 220, 220, 410, 874, 796, 15690, 90, 73, 4906, 92, 7, 917, 891, 11, 657, 8, 198, 220, 220, 220, 825, 77, 62, 46170, 796, 2558, 21737, 198, 220, 220, 220, 1128, 77, 62, 46170, 796, 2558, 21737, 628, 220, 220, 220, 329, 23241, 287, 279, 14542, 198, 220, 220, 220, 220, 220, 220, 220, 2170, 796, 23241, 13, 71, 7109, 13557, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 83, 929, 796, 3815, 7, 1845, 11, 23241, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 28004, 6624, 7873, 6030, 13, 26947, 62, 4537, 8264, 8, 8614, 357, 28004, 6624, 7873, 6030, 13, 26947, 62, 4537, 8264, 62, 53, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 7203, 25782, 257, 1366, 2443, 329, 5721, 354, 2954, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 12786, 11, 4808, 4299, 77, 62, 46170, 11, 4808, 7856, 77, 62, 46170, 796, 1188, 83, 929, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2207, 11, 825, 77, 62, 12685, 11, 1128, 62, 12685, 796, 2443, 62, 12685, 375, 654, 7, 6024, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2207, 6624, 14711, 7656, 13, 6489, 29833, 62, 35, 18379, 2849, 13153, 8614, 2207, 6624, 14711, 7656, 13, 49, 2538, 62, 35, 18379, 2849, 13153, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 12786, 11, 3975, 62, 11600, 62, 12786, 7, 85, 1940, 713, 11, 4808, 12786, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 12786, 11, 4808, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 4299, 77, 62, 46170, 11, 4808, 4299, 77, 62, 46170, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 7856, 77, 62, 46170, 11, 4808, 7856, 77, 62, 46170, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 2170, 6624, 7873, 6030, 13, 35, 18379, 2849, 13153, 62, 4537, 8264, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 12786, 796, 1188, 83, 929, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 7203, 961, 257, 22155, 2443, 329, 5721, 354, 2954, 351, 29568, 13664, 28264, 12786, 4008, 3815, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 11600, 796, 318, 28920, 7, 85, 1940, 713, 8, 5633, 4808, 12786, 1058, 24443, 0, 7, 85, 1940, 713, 11, 4808, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 410, 874, 11, 825, 77, 62, 46170, 11, 1128, 77, 62, 46170, 198, 437, 198, 198, 8818, 1100, 62, 46170, 7, 952, 3712, 9399, 11, 3509, 62, 2100, 3712, 46541, 11, 2207, 3712, 5317, 2624, 11, 997, 62, 27160, 3712, 46541, 8, 198, 220, 220, 220, 275, 86, 796, 1643, 10394, 7, 9806, 62, 2100, 8, 198, 220, 220, 220, 357, 65, 86, 6624, 657, 8, 11405, 357, 7783, 2558, 58, 12962, 198, 220, 220, 220, 2488, 24442, 7203, 25782, 2974, 13, 2207, 25, 3, 12685, 7198, 7, 817, 35357, 13, 44709, 2536, 7, 27195, 7656, 11, 12685, 4008, 828, 3509, 62, 2100, 25, 3, 9806, 62, 2100, 11, 997, 62, 27160, 25, 3, 22510, 62, 27160, 4943, 628, 220, 220, 220, 611, 2207, 6624, 14711, 7656, 13, 49, 2538, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 12114, 10236, 7, 952, 11, 997, 62, 27160, 11, 275, 86, 8, 198, 220, 220, 220, 2073, 361, 2207, 6624, 14711, 7656, 13, 26094, 62, 47, 8120, 1961, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 2545, 34860, 62, 5143, 62, 727, 7, 952, 11, 997, 62, 27160, 11, 275, 86, 8, 198, 220, 220, 220, 2073, 361, 2207, 6624, 14711, 7656, 13, 6489, 29833, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2974, 815, 1239, 307, 286, 428, 2099, 996, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 25638, 62, 27160, 7, 952, 11, 4808, 6030, 13, 12394, 2624, 11, 997, 62, 27160, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 403, 15999, 21004, 720, 12685, 7198, 7, 817, 35357, 13, 44709, 2536, 7, 27195, 7656, 11, 12685, 22305, 329, 2974, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1100, 62, 27160, 7, 952, 3712, 9399, 11, 2207, 3712, 5317, 2624, 11, 2170, 3712, 5317, 2624, 11, 997, 62, 27160, 3712, 46541, 8, 198, 220, 220, 220, 2488, 24442, 7203, 25782, 3815, 13, 2207, 25, 3, 12685, 7198, 7, 817, 35357, 13, 44709, 2536, 7, 27195, 7656, 11, 12685, 4008, 828, 997, 62, 27160, 25, 3, 22510, 62, 27160, 4943, 628, 220, 220, 220, 611, 2207, 6624, 14711, 7656, 13, 6489, 29833, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 25638, 62, 27160, 7, 952, 11, 997, 62, 27160, 11, 2170, 8, 198, 220, 220, 220, 2073, 361, 2207, 6624, 14711, 7656, 13, 6489, 29833, 62, 35, 18379, 2849, 13153, 8614, 2207, 6624, 14711, 7656, 13, 49, 2538, 62, 35, 18379, 2849, 13153, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 81, 293, 62, 11600, 7, 952, 11, 997, 62, 27160, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 403, 15999, 21004, 720, 12685, 329, 5468, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 24442, 7203, 403, 15999, 21004, 720, 12685, 7198, 7, 817, 35357, 13, 44709, 2536, 7, 27195, 7656, 11, 12685, 22305, 329, 5468, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7783, 2558, 21737, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 3815, 7, 1845, 3712, 10044, 8979, 11, 2443, 3712, 9876, 8, 198, 220, 220, 220, 269, 4906, 796, 951, 4906, 7, 7700, 13, 4033, 354, 2954, 8, 198, 220, 220, 220, 8246, 33661, 796, 9881, 7, 7700, 8, 198, 220, 220, 220, 33245, 796, 314, 9864, 13712, 7, 1831, 33661, 8, 198, 220, 220, 220, 2207, 82, 796, 2443, 62, 12685, 375, 654, 7, 7700, 8, 198, 220, 220, 220, 997, 62, 27160, 796, 2443, 62, 22510, 62, 27160, 7, 7700, 8, 198, 220, 220, 220, 2170, 796, 2443, 13, 71, 7109, 13557, 4906, 628, 220, 220, 220, 611, 357, 28004, 6624, 7873, 6030, 13, 26947, 62, 4537, 8264, 8, 8614, 357, 28004, 6624, 7873, 6030, 13, 26947, 62, 4537, 8264, 62, 53, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 46170, 62, 392, 62, 27160, 7, 952, 11, 2207, 82, 11, 269, 4906, 11, 997, 62, 27160, 11, 1582, 11, 2443, 8, 198, 220, 220, 220, 2073, 361, 2170, 6624, 7873, 6030, 13, 35, 18379, 2849, 13153, 62, 4537, 8264, 198, 220, 220, 220, 220, 220, 220, 220, 357, 961, 62, 25638, 62, 27160, 7, 952, 11, 997, 62, 27160, 11, 269, 4906, 828, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 7499, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1100, 62, 46170, 62, 392, 62, 27160, 7, 952, 3712, 9399, 11, 2207, 82, 3712, 51, 29291, 11, 269, 4906, 3712, 5317, 2624, 11, 997, 62, 27160, 3712, 46541, 11, 1582, 3712, 10044, 8979, 11, 2443, 3712, 9876, 8, 198, 220, 220, 220, 269, 3672, 796, 951, 3672, 7, 7700, 13, 4033, 354, 2954, 8, 198, 220, 220, 220, 2207, 11, 825, 77, 62, 12685, 11, 1128, 62, 12685, 796, 2207, 82, 628, 220, 220, 220, 1303, 31, 24442, 7203, 19052, 3555, 825, 77, 2974, 9881, 15182, 287, 2443, 25, 29568, 33661, 15182, 7, 952, 4008, 4943, 198, 220, 220, 220, 1303, 1100, 6770, 2974, 13, 26684, 611, 5721, 318, 2672, 198, 220, 220, 220, 825, 77, 62, 46170, 796, 318, 35827, 7, 1845, 13, 15952, 2611, 11, 269, 3672, 8, 5633, 2558, 21737, 1058, 1100, 62, 46170, 7, 952, 11, 3509, 62, 46758, 62, 5715, 7, 1845, 13, 15952, 2611, 11, 269, 3672, 828, 825, 77, 62, 12685, 11, 997, 62, 27160, 8, 628, 220, 220, 220, 1303, 31, 24442, 7203, 19052, 3555, 1128, 77, 2974, 9881, 15182, 287, 2443, 25, 29568, 33661, 15182, 7, 952, 4008, 4943, 198, 220, 220, 220, 1303, 1100, 29693, 2974, 13, 26684, 611, 477, 15180, 389, 379, 352, 301, 1241, 198, 220, 220, 220, 1128, 77, 62, 46170, 796, 19203, 2637, 287, 269, 3672, 8, 5633, 1100, 62, 46170, 7, 952, 11, 3509, 62, 260, 6449, 653, 62, 5715, 7, 1845, 13, 15952, 2611, 11, 269, 3672, 828, 1128, 62, 12685, 11, 997, 62, 27160, 8, 1058, 2558, 21737, 628, 220, 220, 220, 1303, 31, 24442, 7203, 19052, 3555, 3815, 9881, 15182, 287, 2443, 25, 29568, 33661, 15182, 7, 952, 4008, 4943, 198, 220, 220, 220, 1303, 1100, 3815, 198, 220, 220, 220, 410, 874, 796, 1100, 62, 27160, 7, 952, 11, 2207, 11, 269, 4906, 11, 997, 62, 27160, 8, 628, 220, 220, 220, 410, 874, 11, 825, 77, 62, 46170, 11, 1128, 77, 62, 46170, 198, 437, 628, 198, 2, 5721, 290, 2443, 20150, 198, 9654, 7, 1845, 3712, 10044, 8979, 11, 951, 3712, 39470, 1925, 2954, 8, 796, 1280, 7, 1845, 13, 28144, 11, 1582, 13, 6978, 11, 951, 8, 198, 19836, 7, 1845, 3712, 10044, 8979, 11, 951, 3712, 39470, 1925, 2954, 11, 33245, 8, 796, 357, 1845, 13, 28144, 6624, 33245, 8, 8614, 1969, 7, 952, 8, 198, 8818, 1280, 7, 952, 11, 3108, 3712, 23839, 10100, 11, 951, 3712, 39470, 1925, 2954, 8, 198, 220, 220, 220, 611, 318, 20286, 7, 4033, 11, 1058, 7753, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 7203, 29443, 2393, 29568, 4033, 13, 7753, 62, 6978, 8, 284, 1100, 5721, 20150, 379, 29568, 4033, 13, 7753, 62, 28968, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1280, 7, 4033, 13, 7753, 62, 6978, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 611, 33245, 6624, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 7203, 29443, 2393, 720, 6978, 284, 1100, 5721, 20150, 379, 29568, 4033, 13, 7753, 62, 28968, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 7203, 25782, 5721, 20150, 379, 29568, 4033, 13, 7753, 62, 28968, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33245, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 20150, 7, 952, 11, 3108, 3712, 23839, 10100, 11, 951, 3712, 39470, 1925, 2954, 8, 198, 220, 220, 220, 277, 952, 796, 1280, 7, 952, 11, 3108, 11, 951, 8, 198, 220, 220, 220, 5380, 7, 69, 952, 11, 951, 13, 7753, 62, 28968, 8, 198, 220, 220, 220, 13634, 796, 1100, 62, 400, 35357, 7, 69, 952, 11, 29201, 48526, 6601, 8, 198, 220, 220, 220, 357, 69, 952, 5145, 855, 33245, 8, 11405, 1969, 7, 69, 952, 8, 198, 220, 220, 220, 13634, 198, 437, 198, 198, 8818, 2443, 62, 28968, 7, 4033, 3712, 39470, 1925, 2954, 8, 198, 220, 220, 220, 951, 28961, 796, 951, 13, 28961, 62, 7890, 198, 220, 220, 220, 11677, 796, 951, 28961, 13, 7890, 62, 7700, 62, 28968, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 4033, 28961, 11, 1058, 9630, 62, 7700, 62, 28968, 8, 11405, 357, 28968, 796, 949, 7, 28968, 11, 951, 28961, 13, 9630, 62, 7700, 62, 28968, 4008, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 4033, 28961, 11, 1058, 67, 14188, 62, 7700, 62, 28968, 8, 11405, 357, 28968, 796, 949, 7, 28968, 11, 951, 28961, 13, 67, 14188, 62, 7700, 62, 28968, 4008, 198, 220, 220, 220, 11677, 198, 437, 198, 437, 62, 28968, 7, 4033, 3712, 39470, 1925, 2954, 8, 796, 2443, 62, 28968, 7, 4033, 8, 1343, 951, 13, 28961, 62, 7890, 13, 23350, 62, 5589, 2790, 62, 7857, 198, 198, 7700, 62, 7857, 7, 7700, 3712, 9876, 39681, 8, 796, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 5589, 2790, 62, 7700, 62, 7857, 8, 5633, 2443, 13, 5589, 2790, 62, 7700, 62, 7857, 1058, 2443, 13, 403, 5589, 2790, 62, 7700, 62, 7857, 198, 198, 7700, 62, 12685, 375, 654, 7, 7700, 3712, 9876, 8, 796, 2443, 62, 12685, 375, 654, 7, 7700, 13, 71, 7109, 8, 198, 8818, 2443, 62, 12685, 375, 654, 7, 7700, 3712, 9876, 39681, 8, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 7890, 62, 7700, 62, 25677, 8, 5633, 2443, 62, 12685, 375, 654, 7, 7700, 13, 7890, 62, 7700, 62, 25677, 8, 1058, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 7890, 62, 7700, 62, 25677, 62, 85, 17, 8, 5633, 2443, 62, 12685, 375, 654, 7, 7700, 13, 7890, 62, 7700, 62, 25677, 62, 85, 17, 8, 1058, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 67, 14188, 62, 7700, 62, 25677, 8, 5633, 2443, 62, 12685, 375, 654, 7, 7700, 13, 67, 14188, 62, 7700, 62, 25677, 8, 1058, 7499, 198, 437, 198, 7700, 62, 12685, 375, 654, 7, 7700, 3712, 35, 14188, 9876, 39681, 8, 796, 357, 7700, 13, 12685, 7656, 35751, 198, 7700, 62, 12685, 375, 654, 7, 7700, 3712, 6601, 9876, 39681, 8, 796, 357, 7700, 13, 12685, 7656, 11, 2443, 13, 46758, 62, 5715, 62, 12685, 7656, 11, 2443, 13, 260, 6449, 653, 62, 5715, 62, 12685, 7656, 8, 198, 7700, 62, 12685, 375, 654, 7, 7700, 3712, 6601, 9876, 39681, 53, 17, 8, 796, 357, 7700, 13, 12685, 7656, 11, 14711, 7656, 13, 49, 2538, 11, 14711, 7656, 13, 49, 2538, 8, 198, 198, 7700, 62, 22510, 62, 27160, 7, 7700, 3712, 9876, 8, 796, 2443, 62, 22510, 62, 27160, 7, 7700, 13, 71, 7109, 8, 198, 8818, 2443, 62, 22510, 62, 27160, 7, 7700, 3712, 9876, 39681, 8, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 7890, 62, 7700, 62, 25677, 8, 5633, 2443, 62, 22510, 62, 27160, 7, 7700, 13, 7890, 62, 7700, 62, 25677, 8, 1058, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 7890, 62, 7700, 62, 25677, 62, 85, 17, 8, 5633, 2443, 62, 22510, 62, 27160, 7, 7700, 13, 7890, 62, 7700, 62, 25677, 62, 85, 17, 8, 1058, 198, 220, 220, 220, 16283, 2135, 13, 4468, 2967, 7, 7700, 11, 1058, 67, 14188, 62, 7700, 62, 25677, 8, 5633, 2443, 62, 22510, 62, 27160, 7, 7700, 13, 67, 14188, 62, 7700, 62, 25677, 8, 1058, 657, 198, 437, 198, 7700, 62, 22510, 62, 27160, 7, 7700, 3712, 38176, 90, 6601, 9876, 39681, 11, 6601, 9876, 39681, 53, 17, 11, 35, 14188, 9876, 39681, 30072, 796, 2443, 13, 22510, 62, 27160, 198, 198, 2, 2393, 20150, 198, 961, 62, 400, 35357, 7, 36873, 3712, 19182, 90, 52, 5317, 23, 5512, 7904, 6030, 90, 51, 30072, 810, 1391, 51, 92, 796, 1100, 7, 4825, 3361, 529, 19703, 4668, 7, 51, 30871, 8291, 634, 7, 36873, 36911, 309, 8, 198, 961, 62, 400, 35357, 7, 952, 3712, 9399, 11, 7904, 6030, 90, 51, 30072, 810, 1391, 51, 92, 796, 1100, 7, 4825, 3361, 529, 19703, 4668, 7, 51, 8979, 8291, 634, 7, 952, 36911, 309, 8, 198, 961, 62, 400, 35357, 7, 83, 3712, 5446, 11, 7904, 6030, 90, 51, 30072, 810, 1391, 5446, 27, 25, 51, 8291, 634, 11, 51, 92, 796, 1100, 7, 4825, 3361, 529, 19703, 4668, 7, 83, 828, 309, 8, 198, 198, 8818, 20150, 62, 13664, 7, 952, 8, 198, 220, 220, 220, 264, 89, 796, 3696, 1096, 7, 952, 8, 198, 220, 220, 220, 5380, 7, 952, 11, 264, 89, 532, 311, 57, 62, 27082, 62, 45820, 2149, 532, 311, 57, 62, 6080, 2394, 1137, 8, 628, 220, 220, 220, 1303, 1100, 2366, 263, 2546, 355, 1310, 886, 666, 4488, 2558, 2624, 198, 220, 220, 220, 45783, 33, 3046, 13, 961, 62, 34021, 7, 952, 11, 2558, 2624, 8, 198, 437, 198, 198, 8818, 20150, 7, 952, 11, 3108, 3712, 23839, 10100, 11, 18896, 3712, 46541, 28, 38993, 62, 13664, 7, 952, 4008, 198, 220, 220, 220, 2488, 24442, 7203, 38993, 18896, 796, 720, 11925, 4943, 198, 220, 220, 220, 264, 89, 796, 3696, 1096, 7, 952, 8, 198, 220, 220, 220, 5380, 7, 952, 11, 264, 89, 532, 311, 57, 62, 27082, 62, 45820, 2149, 532, 311, 57, 62, 6080, 2394, 1137, 532, 18896, 8, 198, 220, 220, 220, 13634, 796, 1100, 62, 400, 35357, 7, 952, 11, 9220, 48526, 6601, 8, 198, 220, 220, 220, 1303, 467, 832, 477, 5721, 22716, 290, 1100, 20150, 422, 2393, 49005, 611, 2672, 198, 220, 220, 220, 329, 1036, 79, 287, 13634, 13, 808, 62, 24432, 198, 220, 220, 220, 220, 220, 220, 220, 329, 951, 287, 1036, 79, 13, 28665, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 4468, 2967, 7, 4033, 11, 1058, 28961, 62, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 761, 284, 1100, 20150, 422, 281, 11677, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 13, 28961, 62, 7890, 796, 20150, 7, 952, 11, 3108, 11, 951, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 13634, 198, 437, 198, 198, 38993, 7, 1845, 3712, 10044, 8979, 8, 796, 1582, 13, 28961, 198, 198, 2, 2393, 5794, 19637, 198, 8818, 318, 62, 1845, 62, 7753, 7, 69, 3672, 3712, 23839, 10100, 8, 198, 220, 220, 220, 1280, 7, 69, 3672, 8, 466, 33245, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 318, 62, 1845, 62, 7753, 7, 952, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 318, 62, 1845, 62, 7753, 7, 952, 8, 198, 220, 220, 220, 264, 89, 796, 3696, 1096, 7, 952, 8, 198, 220, 220, 220, 357, 82, 89, 1875, 311, 57, 62, 23428, 2389, 62, 27082, 8, 8614, 1441, 3991, 628, 220, 220, 220, 5380, 9688, 7, 952, 8, 198, 220, 220, 220, 5536, 796, 15690, 90, 52, 5317, 23, 92, 7, 917, 891, 11, 604, 8, 198, 220, 220, 220, 1100, 0, 7, 952, 11, 5536, 8, 198, 220, 220, 220, 357, 10100, 7, 32707, 8, 6624, 29463, 62, 45820, 2149, 8, 8614, 1441, 3991, 198, 220, 220, 220, 220, 198, 220, 220, 220, 5380, 7, 952, 11, 264, 89, 532, 311, 57, 62, 27082, 62, 45820, 2149, 8, 198, 220, 220, 220, 5536, 796, 15690, 90, 52, 5317, 23, 92, 7, 917, 891, 11, 604, 8, 198, 220, 220, 220, 1100, 0, 7, 952, 11, 5536, 8, 198, 220, 220, 220, 357, 10100, 7, 32707, 8, 6624, 29463, 62, 45820, 2149, 8, 8614, 1441, 3991, 628, 220, 220, 220, 2081, 198, 437, 198 ]
2.408476
5,545
# Author: Ritchie Lee, ritchie.lee@sv.cmu.@schedule # Date: 12/11/2014 module AbstractGenerativeModelImpl export AbstractGenerativeModel abstract AbstractGenerativeModel end #module module AbstractGenerativeModelInterfaces export get, isterminal function get() end function isterminal() end end #module
[ 2, 6434, 25, 371, 48423, 5741, 11, 374, 48423, 13, 7197, 31, 21370, 13, 11215, 84, 13, 31, 15952, 5950, 198, 2, 7536, 25, 1105, 14, 1157, 14, 4967, 628, 198, 21412, 27741, 8645, 876, 17633, 29710, 198, 198, 39344, 27741, 8645, 876, 17633, 198, 198, 397, 8709, 27741, 8645, 876, 17633, 198, 198, 437, 1303, 21412, 198, 198, 21412, 27741, 8645, 876, 17633, 9492, 32186, 198, 198, 39344, 651, 11, 198, 220, 220, 220, 220, 220, 220, 318, 23705, 282, 198, 198, 8818, 651, 3419, 886, 198, 198, 8818, 318, 23705, 282, 3419, 886, 198, 198, 437, 1303, 21412, 628, 198 ]
3.156863
102
@testset "ModelKit - SLP" begin @testset "CompiledHomotopy/InterpretedHomotopy" begin @var x y a b c f = [(2 * x^2 + b^2 * y^3 + 2 * a * x * y)^3, (a + c)^4 * x + y^2] @var s sp[1:3] sq[1:3] g = subs(f, [a, b, c] => s .* sp .+ (1 .- s) .* sq) h = Homotopy(g, [x, y], s, [sp; sq]) p = [5.2, -1.3, 9.3] q = [2.6, 3.3, 2.3] for H in [InterpretedHomotopy(h), CompiledHomotopy(h)] @test size(H) == (2, 2) v = [0.192, 2.21] t = 0.232 u = zeros(ComplexF64, 2) U = zeros(ComplexF64, 2, 2) evaluate!(u, H, v, t, [p; q]) @test u ≈ f([x, y] => v, [a, b, c] => t * p + (1 - t) * q) taylor!(u, Val(1), H, TaylorVector{1}(Matrix(v')), t, [p; q]) @test u ≈ let @var s sp[1:3] sq[1:3] pt = s .* sp .+ (1 .- s) .* sq differentiate(subs(f, [a, b, c] => pt), s)( [x, y] => v, sp => p, sq => q, s => t, ) end evaluate_and_jacobian!(u, U, H, v, t, [p; q]) @test U ≈ differentiate(f, [x, y])([x, y] => v, [a, b, c] => t * p + (1 - t) * q) end end @testset "Codegen helpers" begin @test ModelKit.sqr(3 + 2im) == (3 + 2im)^2 @test ModelKit.sqr(3) == 3^2 end @testset "Homotopy codegen (Katsura(3))" begin n = 3 @var x[0:n] ẋ[0:n] ẍ[0:n] x3[0:n] t γ K = [ ( sum(x[abs(l)+1] * x[abs(m - l)+1] for l = -n:n if abs(m - l) <= n) - x[m+1] for m = 0:n-1 )..., x[1] + 2 * sum(x[i+1] for i = 1:n) - 1, ] h = γ .* t .* [x[1:n] .^ 2 .- 1; x[n+1] - 1] + (1 - t) .* K H = ModelKit.Homotopy(h, x, t, [γ]) TH = CompiledHomotopy(H) tx3 = TaylorVector{4}(zeros(Expression, 4, 4)) y, y1, y2, y3 = vectors(tx3) y .= x y1 .= ẋ y2 .= ẍ y3 .= x3 dt1 = ModelKit.taylor!(zeros(Expression, 4), Val(1), TH, TaylorVector{1}(tx3), t, [γ]) dt2 = ModelKit.taylor!(zeros(Expression, 4), Val(2), TH, TaylorVector{2}(tx3), t, [γ]) dt3 = ModelKit.taylor!(zeros(Expression, 4), Val(3), TH, TaylorVector{3}(tx3), t, [γ]) dt4 = ModelKit.taylor!(zeros(Expression, 4), Val(4), TH, TaylorVector{4}(tx3), t, [γ]) @var λ Hd1 = subs(H.expressions, t => t + λ) true_dt1 = subs(differentiate(Hd1, λ, 1), λ => 0) Hd2 = subs(H.expressions, x => x .+ λ .* ẋ, t => t + λ) true_dt2 = subs(differentiate(Hd2, λ, 2), λ => 0) / 2 Hd3 = subs(H.expressions, x => x .+ λ .* ẋ .+ λ^2 .* ẍ, t => t + λ) true_dt3 = subs(differentiate(Hd3, λ, 3), λ => 0) / 6 Hd4 = subs(H.expressions, x => x .+ λ .* ẋ .+ λ^2 .* ẍ .+ λ^3 .* x3, t => t + λ) true_dt4 = subs(differentiate(Hd4, λ, 4), λ => 0) / 24 @test expand.(TH(x, t, [γ])) == expand.(h) @test expand.(ModelKit.jacobian(TH, x, t, [γ])) == expand.(differentiate(h, x)) @test expand.(dt1) == expand.(true_dt1) @test expand.(dt2) == expand.(true_dt2) @test expand.(dt3) == expand.(true_dt3) @test expand.(dt4) == expand.(true_dt4) end @testset "taylor! - system" begin @var x[1:2] ẋ[1:2] ẍ[1:2] x3[1:2] p[1:2] ṗ[1:2] f = [(x[1] + x[2])^3 + x[1]^2 + x[1] + 5 * x[2] + 3 * p[1], 2 * x[1]^2 + p[2]] F = System(f, x, p) TF = CompiledSystem(F) tx = TaylorVector{4}([x'; ẋ'; ẍ'; x3']) tv = TaylorVector{5}(Expression, 2) v, v1, v2, v3, v4 = vectors(tv) @var λ ModelKit.taylor!(TaylorVector{3}(tv), Val(2), TF, TaylorVector{2}(tx), p) Fd2 = subs(F.expressions, x => x .+ λ .* ẋ) true_v1 = subs(differentiate(Fd2, λ, 1), λ => 0) true_v2 = subs(differentiate(Fd2, λ, 2), λ => 0) / 2 @test expand.(v) == expand.(f) @test expand.(v1) == expand.(true_v1) @test expand.(v2) == expand.(true_v2) ModelKit.taylor!(TaylorVector{4}(tv), Val(3), TF, TaylorVector{3}(tx), p) Fd3 = subs(F.expressions, x => x .+ λ .* ẋ .+ λ^2 .* ẍ) true_v1 = subs(differentiate(Fd3, λ, 1), λ => 0) true_v2 = subs(differentiate(Fd3, λ, 2), λ => 0) / 2 true_v3 = subs(differentiate(Fd3, λ, 3), λ => 0) / 6 @test expand.(v) == expand.(f) @test expand.(v1) == expand.(true_v1) sub = variables(v2) => rand(1:10_000, 6) @test v2(sub) == true_v2(sub) @test v3(sub) == true_v3(sub) end @testset "Monomials" begin @var x y F = System([x^2 - 1, y]) u = zeros(ComplexF64, 2) U = zeros(ComplexF64, 2, 2) w = randn(ComplexF64, 2) evaluate_and_jacobian!(u, U, CompiledSystem(F), w) @test sum(abs, U) > 0 U .= 0 evaluate_and_jacobian!(u, U, InterpretedSystem(F), w) @test sum(abs, U) > 0 end @testset "Evaluation of Arb" begin @var x y # define the polynomials f₁ = (x^4 + y^4 - 1) * (x^2 + y^2 - 2) + x^5 * y f₂ = x^2 + 2x * y^2 - 2 * y^2 - 1 / 2 F = System([f₁, f₂]) for I in [ Arblib.AcbMatrix(randn(ComplexF64, 2, 1)), Arblib.AcbRefVector(randn(ComplexF64, 2)), ] @test all(!iszero, F(I)) @test F(real.(I)) isa Arblib.ArbVector @test all(!iszero, System(F)(real.(I))) u = Arblib.AcbVector(2) evaluate!(u, InterpretedSystem(System(F)), I) @test all(!iszero, u) v = Arblib.ArbVector(2) evaluate!(v, InterpretedSystem(System(F)), real.(I)) @test all(!iszero, v) U = Arblib.AcbMatrix(2, 2) jacobian!(U, InterpretedSystem(System(F)), I) @test all(!iszero, U) V = Arblib.ArbMatrix(2, 2) jacobian!(V, InterpretedSystem(System(F)), real.(I)) @test all(!iszero, V) end end end
[ 31, 9288, 2617, 366, 17633, 20827, 532, 12419, 47, 1, 2221, 628, 220, 220, 220, 2488, 9288, 2617, 366, 7293, 3902, 28718, 313, 11081, 14, 9492, 5310, 276, 28718, 313, 11081, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 2124, 331, 257, 275, 269, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 47527, 17, 1635, 2124, 61, 17, 1343, 275, 61, 17, 1635, 331, 61, 18, 1343, 362, 1635, 257, 1635, 2124, 1635, 331, 8, 61, 18, 11, 357, 64, 1343, 269, 8, 61, 19, 1635, 2124, 1343, 331, 61, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 264, 599, 58, 16, 25, 18, 60, 19862, 58, 16, 25, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 308, 796, 6352, 7, 69, 11, 685, 64, 11, 275, 11, 269, 60, 5218, 264, 764, 9, 599, 764, 10, 357, 16, 764, 12, 264, 8, 764, 9, 19862, 8, 628, 220, 220, 220, 220, 220, 220, 220, 289, 796, 8074, 313, 11081, 7, 70, 11, 685, 87, 11, 331, 4357, 264, 11, 685, 2777, 26, 19862, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 279, 796, 685, 20, 13, 17, 11, 532, 16, 13, 18, 11, 860, 13, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 796, 685, 17, 13, 21, 11, 513, 13, 18, 11, 362, 13, 18, 60, 628, 220, 220, 220, 220, 220, 220, 220, 329, 367, 287, 685, 9492, 5310, 276, 28718, 313, 11081, 7, 71, 828, 3082, 3902, 28718, 313, 11081, 7, 71, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2546, 7, 39, 8, 6624, 357, 17, 11, 362, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 796, 685, 15, 13, 17477, 11, 362, 13, 2481, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 796, 657, 13, 24339, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 334, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 362, 11, 362, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13446, 0, 7, 84, 11, 367, 11, 410, 11, 256, 11, 685, 79, 26, 10662, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 334, 15139, 230, 277, 26933, 87, 11, 331, 60, 5218, 410, 11, 685, 64, 11, 275, 11, 269, 60, 5218, 256, 1635, 279, 1343, 357, 16, 532, 256, 8, 1635, 10662, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 7167, 0, 7, 84, 11, 3254, 7, 16, 828, 367, 11, 8121, 38469, 90, 16, 92, 7, 46912, 7, 85, 11537, 828, 256, 11, 685, 79, 26, 10662, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 334, 15139, 230, 1309, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 264, 599, 58, 16, 25, 18, 60, 19862, 58, 16, 25, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42975, 796, 264, 764, 9, 599, 764, 10, 357, 16, 764, 12, 264, 8, 764, 9, 19862, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28754, 7, 7266, 82, 7, 69, 11, 685, 64, 11, 275, 11, 269, 60, 5218, 42975, 828, 264, 5769, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 87, 11, 331, 60, 5218, 410, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 599, 5218, 279, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19862, 5218, 10662, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 5218, 256, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13446, 62, 392, 62, 30482, 672, 666, 0, 7, 84, 11, 471, 11, 367, 11, 410, 11, 256, 11, 685, 79, 26, 10662, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 471, 15139, 230, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28754, 7, 69, 11, 685, 87, 11, 331, 60, 5769, 58, 87, 11, 331, 60, 5218, 410, 11, 685, 64, 11, 275, 11, 269, 60, 5218, 256, 1635, 279, 1343, 357, 16, 532, 256, 8, 1635, 10662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 10669, 5235, 49385, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 9104, 20827, 13, 31166, 81, 7, 18, 1343, 362, 320, 8, 6624, 357, 18, 1343, 362, 320, 8, 61, 17, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 9104, 20827, 13, 31166, 81, 7, 18, 8, 6624, 513, 61, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 28718, 313, 11081, 2438, 5235, 357, 42, 1381, 5330, 7, 18, 4008, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 513, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 2124, 58, 15, 25, 77, 60, 2124, 136, 229, 58, 15, 25, 77, 60, 2124, 136, 230, 58, 15, 25, 77, 60, 2124, 18, 58, 15, 25, 77, 60, 256, 7377, 111, 198, 220, 220, 220, 220, 220, 220, 220, 509, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2160, 7, 87, 58, 8937, 7, 75, 47762, 16, 60, 1635, 2124, 58, 8937, 7, 76, 532, 300, 47762, 16, 60, 329, 300, 796, 532, 77, 25, 77, 611, 2352, 7, 76, 532, 300, 8, 19841, 299, 8, 532, 2124, 58, 76, 10, 16, 60, 329, 285, 796, 657, 25, 77, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 986, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 16, 60, 1343, 362, 1635, 2160, 7, 87, 58, 72, 10, 16, 60, 329, 1312, 796, 352, 25, 77, 8, 532, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 628, 220, 220, 220, 220, 220, 220, 220, 289, 796, 7377, 111, 764, 9, 256, 764, 9, 685, 87, 58, 16, 25, 77, 60, 764, 61, 362, 764, 12, 352, 26, 2124, 58, 77, 10, 16, 60, 532, 352, 60, 1343, 357, 16, 532, 256, 8, 764, 9, 509, 198, 220, 220, 220, 220, 220, 220, 220, 367, 796, 9104, 20827, 13, 28718, 313, 11081, 7, 71, 11, 2124, 11, 256, 11, 685, 42063, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2320, 796, 3082, 3902, 28718, 313, 11081, 7, 39, 8, 628, 220, 220, 220, 220, 220, 220, 220, 27765, 18, 796, 8121, 38469, 90, 19, 92, 7, 9107, 418, 7, 16870, 2234, 11, 604, 11, 604, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 331, 11, 331, 16, 11, 331, 17, 11, 331, 18, 796, 30104, 7, 17602, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 764, 28, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 331, 16, 764, 28, 2124, 136, 229, 198, 220, 220, 220, 220, 220, 220, 220, 331, 17, 764, 28, 2124, 136, 230, 198, 220, 220, 220, 220, 220, 220, 220, 331, 18, 764, 28, 2124, 18, 628, 220, 220, 220, 220, 220, 220, 220, 288, 83, 16, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 9107, 418, 7, 16870, 2234, 11, 604, 828, 3254, 7, 16, 828, 2320, 11, 8121, 38469, 90, 16, 92, 7, 17602, 18, 828, 256, 11, 685, 42063, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 17, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 9107, 418, 7, 16870, 2234, 11, 604, 828, 3254, 7, 17, 828, 2320, 11, 8121, 38469, 90, 17, 92, 7, 17602, 18, 828, 256, 11, 685, 42063, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 18, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 9107, 418, 7, 16870, 2234, 11, 604, 828, 3254, 7, 18, 828, 2320, 11, 8121, 38469, 90, 18, 92, 7, 17602, 18, 828, 256, 11, 685, 42063, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 19, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 9107, 418, 7, 16870, 2234, 11, 604, 828, 3254, 7, 19, 828, 2320, 11, 8121, 38469, 90, 19, 92, 7, 17602, 18, 828, 256, 11, 685, 42063, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 7377, 119, 198, 220, 220, 220, 220, 220, 220, 220, 367, 67, 16, 796, 6352, 7, 39, 13, 42712, 507, 11, 256, 5218, 256, 1343, 7377, 119, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 28664, 16, 796, 6352, 7, 39799, 9386, 7, 39, 67, 16, 11, 7377, 119, 11, 352, 828, 7377, 119, 5218, 657, 8, 628, 220, 220, 220, 220, 220, 220, 220, 367, 67, 17, 796, 6352, 7, 39, 13, 42712, 507, 11, 2124, 5218, 2124, 764, 10, 7377, 119, 764, 9, 2124, 136, 229, 11, 256, 5218, 256, 1343, 7377, 119, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 28664, 17, 796, 6352, 7, 39799, 9386, 7, 39, 67, 17, 11, 7377, 119, 11, 362, 828, 7377, 119, 5218, 657, 8, 1220, 362, 628, 220, 220, 220, 220, 220, 220, 220, 367, 67, 18, 796, 6352, 7, 39, 13, 42712, 507, 11, 2124, 5218, 2124, 764, 10, 7377, 119, 764, 9, 2124, 136, 229, 764, 10, 7377, 119, 61, 17, 764, 9, 2124, 136, 230, 11, 256, 5218, 256, 1343, 7377, 119, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 28664, 18, 796, 6352, 7, 39799, 9386, 7, 39, 67, 18, 11, 7377, 119, 11, 513, 828, 7377, 119, 5218, 657, 8, 1220, 718, 628, 220, 220, 220, 220, 220, 220, 220, 367, 67, 19, 796, 6352, 7, 39, 13, 42712, 507, 11, 2124, 5218, 2124, 764, 10, 7377, 119, 764, 9, 2124, 136, 229, 764, 10, 7377, 119, 61, 17, 764, 9, 2124, 136, 230, 764, 10, 7377, 119, 61, 18, 764, 9, 2124, 18, 11, 256, 5218, 256, 1343, 7377, 119, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 28664, 19, 796, 6352, 7, 39799, 9386, 7, 39, 67, 19, 11, 7377, 119, 11, 604, 828, 7377, 119, 5218, 657, 8, 1220, 1987, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 4221, 7, 87, 11, 256, 11, 685, 42063, 60, 4008, 6624, 4292, 12195, 71, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 17633, 20827, 13, 30482, 672, 666, 7, 4221, 11, 2124, 11, 256, 11, 685, 42063, 60, 4008, 6624, 4292, 12195, 39799, 9386, 7, 71, 11, 2124, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 28664, 16, 8, 6624, 4292, 12195, 7942, 62, 28664, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 28664, 17, 8, 6624, 4292, 12195, 7942, 62, 28664, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 28664, 18, 8, 6624, 4292, 12195, 7942, 62, 28664, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 28664, 19, 8, 6624, 4292, 12195, 7942, 62, 28664, 19, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 83, 7167, 0, 532, 1080, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 2124, 58, 16, 25, 17, 60, 2124, 136, 229, 58, 16, 25, 17, 60, 2124, 136, 230, 58, 16, 25, 17, 60, 2124, 18, 58, 16, 25, 17, 60, 279, 58, 16, 25, 17, 60, 279, 136, 229, 58, 16, 25, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 47527, 87, 58, 16, 60, 1343, 2124, 58, 17, 12962, 61, 18, 1343, 2124, 58, 16, 60, 61, 17, 1343, 2124, 58, 16, 60, 1343, 642, 1635, 2124, 58, 17, 60, 1343, 513, 1635, 279, 58, 16, 4357, 362, 1635, 2124, 58, 16, 60, 61, 17, 1343, 279, 58, 17, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 4482, 7, 69, 11, 2124, 11, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 24958, 796, 3082, 3902, 11964, 7, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 27765, 796, 8121, 38469, 90, 19, 92, 26933, 87, 17020, 2124, 136, 229, 17020, 2124, 136, 230, 17020, 2124, 18, 6, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 31557, 796, 8121, 38469, 90, 20, 92, 7, 16870, 2234, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 11, 410, 16, 11, 410, 17, 11, 410, 18, 11, 410, 19, 796, 30104, 7, 14981, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 7377, 119, 628, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 29907, 38469, 90, 18, 92, 7, 14981, 828, 3254, 7, 17, 828, 24958, 11, 8121, 38469, 90, 17, 92, 7, 17602, 828, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 376, 67, 17, 796, 6352, 7, 37, 13, 42712, 507, 11, 2124, 5218, 2124, 764, 10, 7377, 119, 764, 9, 2124, 136, 229, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 85, 16, 796, 6352, 7, 39799, 9386, 7, 37, 67, 17, 11, 7377, 119, 11, 352, 828, 7377, 119, 5218, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 85, 17, 796, 6352, 7, 39799, 9386, 7, 37, 67, 17, 11, 7377, 119, 11, 362, 828, 7377, 119, 5218, 657, 8, 1220, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 85, 8, 6624, 4292, 12195, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 85, 16, 8, 6624, 4292, 12195, 7942, 62, 85, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 85, 17, 8, 6624, 4292, 12195, 7942, 62, 85, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 9104, 20827, 13, 83, 7167, 0, 7, 29907, 38469, 90, 19, 92, 7, 14981, 828, 3254, 7, 18, 828, 24958, 11, 8121, 38469, 90, 18, 92, 7, 17602, 828, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 376, 67, 18, 796, 6352, 7, 37, 13, 42712, 507, 11, 2124, 5218, 2124, 764, 10, 7377, 119, 764, 9, 2124, 136, 229, 764, 10, 7377, 119, 61, 17, 764, 9, 2124, 136, 230, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 85, 16, 796, 6352, 7, 39799, 9386, 7, 37, 67, 18, 11, 7377, 119, 11, 352, 828, 7377, 119, 5218, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 85, 17, 796, 6352, 7, 39799, 9386, 7, 37, 67, 18, 11, 7377, 119, 11, 362, 828, 7377, 119, 5218, 657, 8, 1220, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2081, 62, 85, 18, 796, 6352, 7, 39799, 9386, 7, 37, 67, 18, 11, 7377, 119, 11, 513, 828, 7377, 119, 5218, 657, 8, 1220, 718, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 85, 8, 6624, 4292, 12195, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4292, 12195, 85, 16, 8, 6624, 4292, 12195, 7942, 62, 85, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 850, 796, 9633, 7, 85, 17, 8, 5218, 43720, 7, 16, 25, 940, 62, 830, 11, 718, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 410, 17, 7, 7266, 8, 6624, 2081, 62, 85, 17, 7, 7266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 410, 18, 7, 7266, 8, 6624, 2081, 62, 85, 18, 7, 7266, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 44, 6326, 8231, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 2124, 331, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 4482, 26933, 87, 61, 17, 532, 352, 11, 331, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 334, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 471, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 362, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 266, 796, 43720, 77, 7, 5377, 11141, 37, 2414, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 13446, 62, 392, 62, 30482, 672, 666, 0, 7, 84, 11, 471, 11, 3082, 3902, 11964, 7, 37, 828, 266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2160, 7, 8937, 11, 471, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 471, 764, 28, 657, 198, 220, 220, 220, 220, 220, 220, 220, 13446, 62, 392, 62, 30482, 672, 666, 0, 7, 84, 11, 471, 11, 48907, 276, 11964, 7, 37, 828, 266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2160, 7, 8937, 11, 471, 8, 1875, 657, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 36, 2100, 2288, 286, 943, 65, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7785, 2124, 331, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 8160, 262, 745, 6213, 296, 8231, 198, 220, 220, 220, 220, 220, 220, 220, 277, 158, 224, 223, 796, 357, 87, 61, 19, 1343, 331, 61, 19, 532, 352, 8, 1635, 357, 87, 61, 17, 1343, 331, 61, 17, 532, 362, 8, 1343, 2124, 61, 20, 1635, 331, 198, 220, 220, 220, 220, 220, 220, 220, 277, 158, 224, 224, 796, 2124, 61, 17, 1343, 362, 87, 1635, 331, 61, 17, 532, 362, 1635, 331, 61, 17, 532, 352, 1220, 362, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 4482, 26933, 69, 158, 224, 223, 11, 277, 158, 224, 224, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 329, 314, 287, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 12832, 65, 46912, 7, 25192, 77, 7, 5377, 11141, 37, 2414, 11, 362, 11, 352, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 12832, 65, 8134, 38469, 7, 25192, 77, 7, 5377, 11141, 37, 2414, 11, 362, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 376, 7, 40, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 376, 7, 5305, 12195, 40, 4008, 318, 64, 943, 2436, 571, 13, 3163, 65, 38469, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 4482, 7, 37, 5769, 5305, 12195, 40, 22305, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 334, 796, 943, 2436, 571, 13, 12832, 65, 38469, 7, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13446, 0, 7, 84, 11, 48907, 276, 11964, 7, 11964, 7, 37, 36911, 314, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 334, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 796, 943, 2436, 571, 13, 3163, 65, 38469, 7, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13446, 0, 7, 85, 11, 48907, 276, 11964, 7, 11964, 7, 37, 36911, 1103, 12195, 40, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 410, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 796, 943, 2436, 571, 13, 12832, 65, 46912, 7, 17, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 330, 672, 666, 0, 7, 52, 11, 48907, 276, 11964, 7, 11964, 7, 37, 36911, 314, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 471, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 569, 796, 943, 2436, 571, 13, 3163, 65, 46912, 7, 17, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 330, 672, 666, 0, 7, 53, 11, 48907, 276, 11964, 7, 11964, 7, 37, 36911, 1103, 12195, 40, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 0, 271, 22570, 11, 569, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.675808
3,683
function addkey!(membernames, nam) if !haskey(membernames, nam) membernames[nam] = gensym() end membernames[nam] end onearg(e::Expr, f) = e.head == :call && length(e.args) == 2 && e.args[1] == f onearg(e, f) = false mapexpr(f, e) = Expr(e.head, map(f, e.args)...) replace_syms!(x, membernames) = x replace_syms!(q::QuoteNode, membernames) = replace_syms!(Meta.quot(q.value), membernames) replace_syms!(e::Expr, membernames) = if onearg(e, :^) e.args[2] elseif onearg(e, :_I_) @warn "_I_() for escaping variables is deprecated, use cols() instead" addkey!(membernames, :($(e.args[2]))) elseif onearg(e, :cols) addkey!(membernames, :($(e.args[2]))) elseif e.head == :quote addkey!(membernames, Meta.quot(e.args[1]) ) elseif e.head == :. replace_dotted!(e, membernames) else mapexpr(x -> replace_syms!(x, membernames), e) end is_simple_non_broadcast_call(x) = false function is_simple_non_broadcast_call(expr::Expr) expr.head == :call && length(expr.args) >= 2 && expr.args[1] isa Symbol && all(x -> x isa QuoteNode || onearg(x, :cols), expr.args[2:end]) end is_simple_broadcast_call(x) = false function is_simple_broadcast_call(expr::Expr) expr.head == :. && length(expr.args) == 2 && expr.args[1] isa Symbol && expr.args[2] isa Expr && expr.args[2].head == :tuple && all(x -> x isa QuoteNode || onearg(x, :cols), expr.args[2].args) end function args_to_selectors(v) t = map(v) do arg if arg isa QuoteNode arg elseif onearg(arg, :cols) arg.args[2] else throw(ArgumentError("This path should not be reached, arg: $(arg)")) end end :(DataFramesMeta.make_source_concrete($(Expr(:vect, t...)))) end is_macro_head(ex, name) = false is_macro_head(ex::Expr, name) = ex.head == :macrocall && ex.args[1] == Symbol(name) extract_macro_flags(ex, exprflags = (;Symbol("@byrow") => Ref(false),)) = (ex, exprflags) function extract_macro_flags(ex::Expr, exprflags = (;Symbol("@byrow") => Ref(false),)) if ex.head == :macrocall macroname = ex.args[1] if macroname in keys(exprflags) exprflag = exprflags[macroname] if exprflag[] == true throw(ArgumentError("Redundant flag $macroname used.")) end exprflag[] = true return extract_macro_flags(MacroTools.unblock(ex.args[3]), exprflags) else return (ex, exprflags) end end return (ex, exprflags) end """ get_source_fun(function_expr; wrap_byrow::Bool=false) Given an expression that may contain `QuoteNode`s (`:x`) and items wrapped in `cols`, return a function that is equivalent to that expression where the `QuoteNode`s and `cols` items are the inputs to the function. For fast compilation `get_source_fun` returns the name of a called function where possible. * `f(:x, :y)` will return `f` * `f.(:x, :y)` will return `ByRow(f)` * `:x .+ :y` will return `.+` `get_source_fun` also returns an expression representing the vector of inputs that will be used as the `src` in the `src => fun => dest` call later on. If `wrap_byrow=true` then the function gets wrapped in `ByRow`. If the expression begins with `@byrow`, then `get_source_fun` is recurively called on the expression that `@byrow` acts on, with `wrap_byrow=true`. ### Examples julia> using MacroTools julia> ex = :(:x + :y); julia> DataFramesMeta.get_source_fun(ex) (:(DataFramesMeta.make_source_concrete([:x, :y])), :+) julia> ex = quote :x .+ 1 .* :y end |> MacroTools.prettify julia> src, fun = DataFramesMeta.get_source_fun(ex); julia> MacroTools.prettify(fun) :((mammoth, goat)->mammoth .+ 1 .* goat) julia> ex = :(@byrow :x * :y); julia> src, fun = DataFramesMeta.get_source_fun(ex); julia> MacroTools.prettify(fun) :(ByRow(*)) ``` """ function get_source_fun(function_expr; wrap_byrow::Bool=false) function_expr = MacroTools.unblock(function_expr) if is_simple_non_broadcast_call(function_expr) source = args_to_selectors(function_expr.args[2:end]) fun_t = function_expr.args[1] # .+ to + if startswith(string(fun_t), '.') f_sym_without_dot = Symbol(chop(string(fun_t), head = 1, tail = 0)) fun = :(DataFrames.ByRow($f_sym_without_dot)) else fun = fun_t end elseif is_simple_broadcast_call(function_expr) # extract source symbols from quotenodes source = args_to_selectors(function_expr.args[2].args) fun_t = function_expr.args[1] fun = :(DataFrames.ByRow($fun_t)) else membernames = Dict{Any, Symbol}() body = replace_syms!(function_expr, membernames) source = :(DataFramesMeta.make_source_concrete($(Expr(:vect, keys(membernames)...)))) inputargs = Expr(:tuple, values(membernames)...) fun = quote $inputargs -> begin $body end end end if wrap_byrow fun = :(ByRow($fun)) end return source, fun end # `nolhs` needs to be `true` when we have syntax of the form # `@combine(gd, fun(:x, :y))` where `fun` returns a `table` object. # We don't create the "new name" pair because new names are # given by the table. # We need wrap_byrow as a keyword argument here in case someone # uses `@transform df @byrow begin ... end`, which we # deal with outside of this function. function fun_to_vec(ex::Expr; gensym_names::Bool=false, outer_flags::Union{NamedTuple, Nothing}=nothing, no_dest::Bool=false) # classify the type of expression # :x # handled via dispatch # cols(:x) # handled as though above # f(:x) # requires pass_as_is, for `@with` and `@subset` in future # y = :x # :x is a QuoteNode # y = cols(:x) # use cols on RHS # cols(:y) = :x # RHS in :block # cols(:y) = cols(:x) # y = f(:x) # re-write as simple call # y = f(cols(:x)) # re-write as simple call, use cols # y = :x + 1 # re-write as complicated call # y = cols(:x) + 1 # re-write as complicated call, with cols # cols(:y) = f(:x) # re-write as simple call, but RHS is :block # cols(:y) = f(cols(:x)) # re-write as simple call, RHS is block, use cols # cols(y) = :x + 1 # re-write as complicated col, but RHS is :block # cols(:y) = cols(:x) + 1 # re-write as complicated call, RHS is block, use cols # `@byrow` before any of the above ex, inner_flags = extract_macro_flags(MacroTools.unblock(ex)) # Use tuple syntax in future when we add more flags inner_wrap_byrow = inner_flags[Symbol("@byrow")][] outer_wrap_byrow = outer_flags === nothing ? false : outer_flags[Symbol("@byrow")][] if inner_wrap_byrow && outer_wrap_byrow throw(ArgumentError("Redundant @byrow calls.")) else wrap_byrow = inner_wrap_byrow || outer_wrap_byrow end if gensym_names ex = Expr(:kw, gensym(), ex) end # :x # handled below via dispatch on ::QuoteNode # cols(:x) if onearg(ex, :cols) return ex.args[2] end if no_dest source, fun = get_source_fun(ex, wrap_byrow = wrap_byrow) return quote $source => $fun end end @assert ex.head == :kw || ex.head == :(=) lhs = ex.args[1] rhs = MacroTools.unblock(ex.args[2]) if is_macro_head(rhs, "@byrow") s = "In keyword argument inputs, `@byrow` must be on the left hand side. " * "Did you write `y = @byrow f(:x)` instead of `@byrow y = f(:x)`?" throw(ArgumentError(s)) end # y = ... if lhs isa Symbol msg = "Using an un-quoted Symbol on the LHS is deprecated. " * "Write $(QuoteNode(lhs)) = ... instead." Base.depwarn(msg, "") lhs = QuoteNode(lhs) end # :y = :x if lhs isa QuoteNode && rhs isa QuoteNode source = rhs dest = lhs return quote $source => $dest end end # :y = cols(:x) if lhs isa QuoteNode && onearg(rhs, :cols) source = rhs.args[2] dest = lhs return quote $source => $dest end end # cols(:y) = :x if onearg(lhs, :cols) && rhs isa QuoteNode source = rhs dest = lhs.args[2] return quote $source => $dest end end # cols(:y) = cols(:x) if onearg(lhs, :cols) && onearg(rhs, :cols) source = rhs.args[2] dest = lhs.args[2] return quote $source => $dest end end # :y = f(:x) # :y = f(cols(:x)) # :y = :x + 1 # :y = cols(:x) + 1 source, fun = get_source_fun(rhs; wrap_byrow = wrap_byrow) if lhs isa QuoteNode dest = lhs return quote $source => $fun => $dest end end # cols(:y) = f(:x) if onearg(lhs, :cols) dest = lhs.args[2] return quote $source => $fun => $dest end end throw(ArgumentError("This path should not be reached")) end fun_to_vec(ex::QuoteNode; no_dest::Bool=false, gensym_names::Bool=false, outer_flags::Union{NamedTuple, Nothing}=nothing) = ex function make_source_concrete(x::AbstractVector) if isempty(x) || isconcretetype(eltype(x)) return x elseif all(t -> t isa Union{AbstractString, Symbol}, x) return Symbol.(x) else throw(ArgumentError("Column references must be either all the same " * "type or a a combination of `Symbol`s and strings")) end end protect_replace_syms!(e, membernames) = e function protect_replace_syms!(e::Expr, membernames) if e.head == :quote e else replace_syms!(e, membernames) end end function replace_dotted!(e, membernames) x_new = replace_syms!(e.args[1], membernames) y_new = protect_replace_syms!(e.args[2], membernames) Expr(:., x_new, y_new) end function create_args_vector(args...) create_args_vector(Expr(:block, args...)) end """ create_args_vector(arg) -> vec, outer_flags Given an expression return a vector of operations and a `NamedTuple` of the macro-flags that appear in the expression. If a `:block` expression, return the `args` of the block as an array. If a simple expression, wrap the expression in a one-element vector. """ function create_args_vector(arg) arg, outer_flags = extract_macro_flags(MacroTools.unblock(arg)) if arg isa Expr && arg.head == :block x = MacroTools.rmlines(arg).args else x = Any[arg] end return x, outer_flags end
[ 8818, 751, 2539, 0, 7, 19522, 14933, 11, 299, 321, 8, 198, 220, 220, 220, 611, 5145, 10134, 2539, 7, 19522, 14933, 11, 299, 321, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2888, 14933, 58, 7402, 60, 796, 308, 641, 4948, 3419, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2888, 14933, 58, 7402, 60, 198, 437, 198, 198, 261, 451, 70, 7, 68, 3712, 3109, 1050, 11, 277, 8, 796, 304, 13, 2256, 6624, 1058, 13345, 11405, 4129, 7, 68, 13, 22046, 8, 6624, 362, 11405, 304, 13, 22046, 58, 16, 60, 6624, 277, 198, 261, 451, 70, 7, 68, 11, 277, 8, 796, 3991, 198, 198, 76, 1758, 87, 1050, 7, 69, 11, 304, 8, 796, 1475, 1050, 7, 68, 13, 2256, 11, 3975, 7, 69, 11, 304, 13, 22046, 8, 23029, 198, 198, 33491, 62, 1837, 907, 0, 7, 87, 11, 2888, 14933, 8, 796, 2124, 198, 33491, 62, 1837, 907, 0, 7, 80, 3712, 25178, 19667, 11, 2888, 14933, 8, 796, 198, 220, 220, 220, 6330, 62, 1837, 907, 0, 7, 48526, 13, 421, 313, 7, 80, 13, 8367, 828, 2888, 14933, 8, 198, 33491, 62, 1837, 907, 0, 7, 68, 3712, 3109, 1050, 11, 2888, 14933, 8, 796, 198, 220, 220, 220, 611, 319, 451, 70, 7, 68, 11, 1058, 61, 8, 198, 220, 220, 220, 220, 220, 220, 220, 304, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 2073, 361, 319, 451, 70, 7, 68, 11, 1058, 62, 40, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 45434, 40, 62, 3419, 329, 25071, 9633, 318, 39224, 11, 779, 951, 82, 3419, 2427, 1, 198, 220, 220, 220, 220, 220, 220, 220, 751, 2539, 0, 7, 19522, 14933, 11, 1058, 16763, 7, 68, 13, 22046, 58, 17, 60, 22305, 198, 220, 220, 220, 2073, 361, 319, 451, 70, 7, 68, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 751, 2539, 0, 7, 19522, 14933, 11, 1058, 16763, 7, 68, 13, 22046, 58, 17, 60, 22305, 198, 220, 220, 220, 2073, 361, 304, 13, 2256, 6624, 1058, 22708, 198, 220, 220, 220, 220, 220, 220, 220, 751, 2539, 0, 7, 19522, 14933, 11, 30277, 13, 421, 313, 7, 68, 13, 22046, 58, 16, 12962, 1267, 198, 220, 220, 220, 2073, 361, 304, 13, 2256, 6624, 1058, 13, 198, 220, 220, 220, 220, 220, 220, 220, 6330, 62, 67, 8426, 0, 7, 68, 11, 2888, 14933, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 285, 1758, 87, 1050, 7, 87, 4613, 6330, 62, 1837, 907, 0, 7, 87, 11, 2888, 14933, 828, 304, 8, 198, 220, 220, 220, 886, 198, 198, 271, 62, 36439, 62, 13159, 62, 36654, 2701, 62, 13345, 7, 87, 8, 796, 3991, 198, 8818, 318, 62, 36439, 62, 13159, 62, 36654, 2701, 62, 13345, 7, 31937, 3712, 3109, 1050, 8, 198, 220, 220, 220, 44052, 13, 2256, 6624, 1058, 13345, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 4129, 7, 31937, 13, 22046, 8, 18189, 362, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 44052, 13, 22046, 58, 16, 60, 318, 64, 38357, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 477, 7, 87, 4613, 2124, 318, 64, 19879, 19667, 8614, 319, 451, 70, 7, 87, 11, 1058, 4033, 82, 828, 44052, 13, 22046, 58, 17, 25, 437, 12962, 198, 437, 198, 198, 271, 62, 36439, 62, 36654, 2701, 62, 13345, 7, 87, 8, 796, 3991, 198, 8818, 318, 62, 36439, 62, 36654, 2701, 62, 13345, 7, 31937, 3712, 3109, 1050, 8, 198, 220, 220, 220, 44052, 13, 2256, 6624, 1058, 13, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 4129, 7, 31937, 13, 22046, 8, 6624, 362, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 44052, 13, 22046, 58, 16, 60, 318, 64, 38357, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 44052, 13, 22046, 58, 17, 60, 318, 64, 1475, 1050, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 44052, 13, 22046, 58, 17, 4083, 2256, 6624, 1058, 83, 29291, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 477, 7, 87, 4613, 2124, 318, 64, 19879, 19667, 8614, 319, 451, 70, 7, 87, 11, 1058, 4033, 82, 828, 44052, 13, 22046, 58, 17, 4083, 22046, 8, 198, 437, 198, 198, 8818, 26498, 62, 1462, 62, 19738, 669, 7, 85, 8, 198, 220, 220, 220, 256, 796, 3975, 7, 85, 8, 466, 1822, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1822, 318, 64, 19879, 19667, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1822, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 319, 451, 70, 7, 853, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1822, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1212, 3108, 815, 407, 307, 4251, 11, 1822, 25, 29568, 853, 16725, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 36147, 6601, 35439, 48526, 13, 15883, 62, 10459, 62, 1102, 38669, 16763, 7, 3109, 1050, 7, 25, 303, 310, 11, 256, 986, 35514, 198, 437, 198, 198, 271, 62, 20285, 305, 62, 2256, 7, 1069, 11, 1438, 8, 796, 3991, 198, 271, 62, 20285, 305, 62, 2256, 7, 1069, 3712, 3109, 1050, 11, 1438, 8, 796, 409, 13, 2256, 6624, 1058, 20285, 12204, 439, 11405, 409, 13, 22046, 58, 16, 60, 6624, 38357, 7, 3672, 8, 198, 198, 2302, 974, 62, 20285, 305, 62, 33152, 7, 1069, 11, 44052, 33152, 796, 357, 26, 13940, 23650, 7203, 31, 1525, 808, 4943, 5218, 6524, 7, 9562, 828, 4008, 796, 357, 1069, 11, 44052, 33152, 8, 198, 8818, 7925, 62, 20285, 305, 62, 33152, 7, 1069, 3712, 3109, 1050, 11, 44052, 33152, 796, 357, 26, 13940, 23650, 7203, 31, 1525, 808, 4943, 5218, 6524, 7, 9562, 828, 4008, 198, 220, 220, 220, 611, 409, 13, 2256, 6624, 1058, 20285, 12204, 439, 198, 220, 220, 220, 220, 220, 220, 220, 8352, 1313, 480, 796, 409, 13, 22046, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8352, 1313, 480, 287, 8251, 7, 31937, 33152, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44052, 32109, 796, 44052, 33152, 58, 20285, 1313, 480, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 44052, 32109, 21737, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 7738, 917, 415, 6056, 720, 20285, 1313, 480, 973, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44052, 32109, 21737, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 7925, 62, 20285, 305, 62, 33152, 7, 14155, 305, 33637, 13, 403, 9967, 7, 1069, 13, 22046, 58, 18, 46570, 44052, 33152, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 1069, 11, 44052, 33152, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 357, 1069, 11, 44052, 33152, 8, 198, 437, 198, 37811, 198, 220, 220, 220, 651, 62, 10459, 62, 12543, 7, 8818, 62, 31937, 26, 14441, 62, 1525, 808, 3712, 33, 970, 28, 9562, 8, 198, 198, 15056, 281, 5408, 326, 743, 3994, 4600, 25178, 19667, 63, 82, 357, 63, 25, 87, 63, 8, 198, 392, 3709, 12908, 287, 4600, 4033, 82, 47671, 1441, 257, 2163, 198, 5562, 318, 7548, 284, 326, 5408, 810, 262, 198, 63, 25178, 19667, 63, 82, 290, 4600, 4033, 82, 63, 3709, 389, 262, 17311, 198, 1462, 262, 2163, 13, 198, 198, 1890, 3049, 23340, 4600, 1136, 62, 10459, 62, 12543, 63, 5860, 198, 1169, 1438, 286, 257, 1444, 2163, 810, 1744, 13, 198, 198, 9, 4600, 69, 7, 25, 87, 11, 1058, 88, 8, 63, 481, 1441, 4600, 69, 63, 198, 9, 4600, 69, 12195, 25, 87, 11, 1058, 88, 8, 63, 481, 1441, 4600, 3886, 25166, 7, 69, 8, 63, 198, 9, 4600, 25, 87, 764, 10, 1058, 88, 63, 481, 1441, 4600, 13, 10, 63, 198, 198, 63, 1136, 62, 10459, 62, 12543, 63, 635, 5860, 281, 5408, 198, 15603, 278, 262, 15879, 286, 17311, 326, 481, 307, 198, 1484, 355, 262, 4600, 10677, 63, 287, 262, 4600, 10677, 5218, 1257, 5218, 2244, 63, 198, 13345, 1568, 319, 13, 198, 198, 1532, 4600, 37150, 62, 1525, 808, 28, 7942, 63, 788, 262, 2163, 3011, 12908, 198, 259, 4600, 3886, 25166, 44646, 1002, 262, 5408, 6140, 351, 4600, 31, 1525, 808, 47671, 198, 8524, 4600, 1136, 62, 10459, 62, 12543, 63, 318, 664, 333, 2280, 1444, 319, 262, 198, 38011, 326, 4600, 31, 1525, 808, 63, 6529, 319, 11, 351, 4600, 37150, 62, 1525, 808, 28, 7942, 44646, 198, 198, 21017, 21066, 198, 198, 73, 43640, 29, 1262, 42755, 33637, 198, 198, 73, 43640, 29, 409, 796, 36147, 25, 87, 1343, 1058, 88, 1776, 198, 198, 73, 43640, 29, 6060, 35439, 48526, 13, 1136, 62, 10459, 62, 12543, 7, 1069, 8, 198, 7, 37498, 6601, 35439, 48526, 13, 15883, 62, 10459, 62, 1102, 38669, 26933, 25, 87, 11, 1058, 88, 12962, 828, 1058, 28988, 198, 198, 73, 43640, 29, 409, 796, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 87, 764, 10, 352, 764, 9, 1058, 88, 198, 220, 220, 220, 220, 220, 220, 886, 930, 29, 42755, 33637, 13, 3866, 926, 1958, 198, 198, 73, 43640, 29, 12351, 11, 1257, 796, 6060, 35439, 48526, 13, 1136, 62, 10459, 62, 12543, 7, 1069, 1776, 198, 198, 73, 43640, 29, 42755, 33637, 13, 3866, 926, 1958, 7, 12543, 8, 198, 25, 19510, 76, 6475, 849, 11, 26917, 8, 3784, 76, 6475, 849, 764, 10, 352, 764, 9, 26917, 8, 198, 198, 73, 43640, 29, 409, 796, 36147, 31, 1525, 808, 1058, 87, 1635, 1058, 88, 1776, 198, 198, 73, 43640, 29, 12351, 11, 1257, 796, 6060, 35439, 48526, 13, 1136, 62, 10459, 62, 12543, 7, 1069, 1776, 198, 198, 73, 43640, 29, 42755, 33637, 13, 3866, 926, 1958, 7, 12543, 8, 198, 37498, 3886, 25166, 46491, 4008, 198, 15506, 63, 198, 198, 37811, 198, 8818, 651, 62, 10459, 62, 12543, 7, 8818, 62, 31937, 26, 14441, 62, 1525, 808, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 2163, 62, 31937, 796, 42755, 33637, 13, 403, 9967, 7, 8818, 62, 31937, 8, 628, 220, 220, 220, 611, 318, 62, 36439, 62, 13159, 62, 36654, 2701, 62, 13345, 7, 8818, 62, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 26498, 62, 1462, 62, 19738, 669, 7, 8818, 62, 31937, 13, 22046, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 62, 83, 796, 2163, 62, 31937, 13, 22046, 58, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 764, 10, 284, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 611, 923, 2032, 342, 7, 8841, 7, 12543, 62, 83, 828, 705, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 37047, 62, 19419, 62, 26518, 796, 38357, 7, 354, 404, 7, 8841, 7, 12543, 62, 83, 828, 1182, 796, 352, 11, 7894, 796, 657, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 36147, 6601, 35439, 13, 3886, 25166, 16763, 69, 62, 37047, 62, 19419, 62, 26518, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 1257, 62, 83, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 361, 318, 62, 36439, 62, 36654, 2701, 62, 13345, 7, 8818, 62, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7925, 2723, 14354, 422, 23611, 268, 4147, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 26498, 62, 1462, 62, 19738, 669, 7, 8818, 62, 31937, 13, 22046, 58, 17, 4083, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 62, 83, 796, 2163, 62, 31937, 13, 22046, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 36147, 6601, 35439, 13, 3886, 25166, 16763, 12543, 62, 83, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2888, 14933, 796, 360, 713, 90, 7149, 11, 38357, 92, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1767, 796, 6330, 62, 1837, 907, 0, 7, 8818, 62, 31937, 11, 2888, 14933, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 36147, 6601, 35439, 48526, 13, 15883, 62, 10459, 62, 1102, 38669, 16763, 7, 3109, 1050, 7, 25, 303, 310, 11, 8251, 7, 19522, 14933, 26513, 35514, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 22046, 796, 1475, 1050, 7, 25, 83, 29291, 11, 3815, 7, 19522, 14933, 8, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 15414, 22046, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 2618, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 14441, 62, 1525, 808, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 36147, 3886, 25166, 16763, 12543, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2723, 11, 1257, 198, 437, 198, 198, 2, 4600, 77, 349, 11994, 63, 2476, 284, 307, 4600, 7942, 63, 618, 356, 423, 15582, 286, 262, 1296, 198, 2, 4600, 31, 24011, 500, 7, 21287, 11, 1257, 7, 25, 87, 11, 1058, 88, 4008, 63, 810, 4600, 12543, 63, 5860, 257, 4600, 11487, 63, 2134, 13, 198, 2, 775, 836, 470, 2251, 262, 366, 3605, 1438, 1, 5166, 780, 649, 3891, 389, 198, 2, 1813, 416, 262, 3084, 13, 198, 2, 775, 761, 14441, 62, 1525, 808, 355, 257, 21179, 4578, 994, 287, 1339, 2130, 198, 2, 3544, 4600, 31, 35636, 47764, 2488, 1525, 808, 2221, 2644, 886, 47671, 543, 356, 198, 2, 1730, 351, 2354, 286, 428, 2163, 13, 198, 8818, 1257, 62, 1462, 62, 35138, 7, 1069, 3712, 3109, 1050, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 641, 4948, 62, 14933, 3712, 33, 970, 28, 9562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12076, 62, 33152, 3712, 38176, 90, 45, 2434, 51, 29291, 11, 10528, 92, 28, 22366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 645, 62, 16520, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 1303, 36509, 262, 2099, 286, 5408, 198, 220, 220, 220, 1303, 1058, 87, 1303, 12118, 2884, 27965, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 87, 8, 1303, 12118, 355, 996, 2029, 198, 220, 220, 220, 1303, 277, 7, 25, 87, 8, 1303, 4433, 1208, 62, 292, 62, 271, 11, 329, 4600, 31, 4480, 63, 290, 4600, 31, 7266, 2617, 63, 287, 2003, 198, 220, 220, 220, 1303, 331, 796, 1058, 87, 1303, 1058, 87, 318, 257, 19879, 19667, 198, 220, 220, 220, 1303, 331, 796, 951, 82, 7, 25, 87, 8, 1303, 779, 951, 82, 319, 371, 7998, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 1058, 87, 1303, 371, 7998, 287, 1058, 9967, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 951, 82, 7, 25, 87, 8, 198, 220, 220, 220, 1303, 331, 796, 277, 7, 25, 87, 8, 1303, 302, 12, 13564, 355, 2829, 869, 198, 220, 220, 220, 1303, 331, 796, 277, 7, 4033, 82, 7, 25, 87, 4008, 1303, 302, 12, 13564, 355, 2829, 869, 11, 779, 951, 82, 198, 220, 220, 220, 1303, 331, 796, 1058, 87, 1343, 352, 1303, 302, 12, 13564, 355, 8253, 869, 198, 220, 220, 220, 1303, 331, 796, 951, 82, 7, 25, 87, 8, 1343, 352, 1303, 302, 12, 13564, 355, 8253, 869, 11, 351, 951, 82, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 277, 7, 25, 87, 8, 1303, 302, 12, 13564, 355, 2829, 869, 11, 475, 371, 7998, 318, 1058, 9967, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 277, 7, 4033, 82, 7, 25, 87, 4008, 1303, 302, 12, 13564, 355, 2829, 869, 11, 371, 7998, 318, 2512, 11, 779, 951, 82, 198, 220, 220, 220, 1303, 951, 82, 7, 88, 8, 796, 1058, 87, 1343, 352, 1303, 302, 12, 13564, 355, 8253, 951, 11, 475, 371, 7998, 318, 1058, 9967, 198, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 951, 82, 7, 25, 87, 8, 1343, 352, 1303, 302, 12, 13564, 355, 8253, 869, 11, 371, 7998, 318, 2512, 11, 779, 951, 82, 198, 220, 220, 220, 1303, 4600, 31, 1525, 808, 63, 878, 597, 286, 262, 2029, 198, 220, 220, 220, 409, 11, 8434, 62, 33152, 796, 7925, 62, 20285, 305, 62, 33152, 7, 14155, 305, 33637, 13, 403, 9967, 7, 1069, 4008, 628, 220, 220, 220, 1303, 5765, 46545, 15582, 287, 2003, 618, 356, 751, 517, 9701, 198, 220, 220, 220, 8434, 62, 37150, 62, 1525, 808, 796, 8434, 62, 33152, 58, 13940, 23650, 7203, 31, 1525, 808, 4943, 7131, 60, 198, 220, 220, 220, 12076, 62, 37150, 62, 1525, 808, 796, 12076, 62, 33152, 24844, 2147, 5633, 3991, 1058, 12076, 62, 33152, 58, 13940, 23650, 7203, 31, 1525, 808, 4943, 7131, 60, 628, 220, 220, 220, 611, 8434, 62, 37150, 62, 1525, 808, 11405, 12076, 62, 37150, 62, 1525, 808, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 7738, 917, 415, 2488, 1525, 808, 3848, 526, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 14441, 62, 1525, 808, 796, 8434, 62, 37150, 62, 1525, 808, 8614, 12076, 62, 37150, 62, 1525, 808, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 308, 641, 4948, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 409, 796, 1475, 1050, 7, 25, 46265, 11, 308, 641, 4948, 22784, 409, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1058, 87, 198, 220, 220, 220, 1303, 12118, 2174, 2884, 27965, 319, 7904, 25178, 19667, 628, 220, 220, 220, 1303, 951, 82, 7, 25, 87, 8, 198, 220, 220, 220, 611, 319, 451, 70, 7, 1069, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 409, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 645, 62, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 11, 1257, 796, 651, 62, 10459, 62, 12543, 7, 1069, 11, 14441, 62, 1525, 808, 796, 14441, 62, 1525, 808, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 12543, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 30493, 409, 13, 2256, 6624, 1058, 46265, 8614, 409, 13, 2256, 6624, 36147, 28, 8, 198, 220, 220, 220, 300, 11994, 796, 409, 13, 22046, 58, 16, 60, 198, 220, 220, 220, 9529, 82, 796, 42755, 33637, 13, 403, 9967, 7, 1069, 13, 22046, 58, 17, 12962, 628, 220, 220, 220, 611, 318, 62, 20285, 305, 62, 2256, 7, 81, 11994, 11, 44212, 1525, 808, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 366, 818, 21179, 4578, 17311, 11, 4600, 31, 1525, 808, 63, 1276, 307, 319, 262, 1364, 1021, 1735, 13, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11633, 345, 3551, 4600, 88, 796, 2488, 1525, 808, 277, 7, 25, 87, 8, 63, 2427, 286, 4600, 31, 1525, 808, 331, 796, 277, 7, 25, 87, 8, 63, 1701, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7, 82, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 331, 796, 2644, 198, 220, 220, 220, 611, 300, 11994, 318, 64, 38357, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 366, 12814, 281, 555, 12, 421, 5191, 38357, 319, 262, 406, 7998, 318, 39224, 13, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16594, 29568, 25178, 19667, 7, 75, 11994, 4008, 796, 2644, 2427, 526, 198, 220, 220, 220, 220, 220, 220, 220, 7308, 13, 10378, 40539, 7, 19662, 11, 366, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11994, 796, 19879, 19667, 7, 75, 11994, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1058, 88, 796, 1058, 87, 198, 220, 220, 220, 611, 300, 11994, 318, 64, 19879, 19667, 11405, 9529, 82, 318, 64, 19879, 19667, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 9529, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1058, 88, 796, 951, 82, 7, 25, 87, 8, 198, 220, 220, 220, 611, 300, 11994, 318, 64, 19879, 19667, 11405, 319, 451, 70, 7, 81, 11994, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 9529, 82, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 1058, 87, 198, 220, 220, 220, 611, 319, 451, 70, 7, 75, 11994, 11, 1058, 4033, 82, 8, 11405, 9529, 82, 318, 64, 19879, 19667, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 9529, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 13, 22046, 58, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 951, 82, 7, 25, 87, 8, 198, 220, 220, 220, 611, 319, 451, 70, 7, 75, 11994, 11, 1058, 4033, 82, 8, 11405, 319, 451, 70, 7, 81, 11994, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 796, 9529, 82, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 13, 22046, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1058, 88, 796, 277, 7, 25, 87, 8, 198, 220, 220, 220, 1303, 1058, 88, 796, 277, 7, 4033, 82, 7, 25, 87, 4008, 198, 220, 220, 220, 1303, 1058, 88, 796, 1058, 87, 1343, 352, 198, 220, 220, 220, 1303, 1058, 88, 796, 951, 82, 7, 25, 87, 8, 1343, 352, 198, 220, 220, 220, 2723, 11, 1257, 796, 651, 62, 10459, 62, 12543, 7, 81, 11994, 26, 14441, 62, 1525, 808, 796, 14441, 62, 1525, 808, 8, 198, 220, 220, 220, 611, 300, 11994, 318, 64, 19879, 19667, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 12543, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 951, 82, 7, 25, 88, 8, 796, 277, 7, 25, 87, 8, 198, 220, 220, 220, 611, 319, 451, 70, 7, 75, 11994, 11, 1058, 4033, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2244, 796, 300, 11994, 13, 22046, 58, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 10459, 5218, 720, 12543, 5218, 720, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1212, 3108, 815, 407, 307, 4251, 48774, 198, 437, 198, 12543, 62, 1462, 62, 35138, 7, 1069, 3712, 25178, 19667, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 645, 62, 16520, 3712, 33, 970, 28, 9562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 641, 4948, 62, 14933, 3712, 33, 970, 28, 9562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12076, 62, 33152, 3712, 38176, 90, 45, 2434, 51, 29291, 11, 10528, 92, 28, 22366, 8, 796, 409, 198, 198, 8818, 787, 62, 10459, 62, 1102, 38669, 7, 87, 3712, 23839, 38469, 8, 198, 220, 220, 220, 611, 318, 28920, 7, 87, 8, 8614, 318, 1102, 66, 1186, 2963, 431, 7, 417, 4906, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2124, 198, 220, 220, 220, 2073, 361, 477, 7, 83, 4613, 256, 318, 64, 4479, 90, 23839, 10100, 11, 38357, 5512, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 38357, 12195, 87, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 39470, 10288, 1276, 307, 2035, 477, 262, 976, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 393, 257, 257, 6087, 286, 4600, 13940, 23650, 63, 82, 290, 13042, 48774, 198, 220, 220, 220, 886, 198, 437, 198, 198, 35499, 62, 33491, 62, 1837, 907, 0, 7, 68, 11, 2888, 14933, 8, 796, 304, 198, 8818, 1805, 62, 33491, 62, 1837, 907, 0, 7, 68, 3712, 3109, 1050, 11, 2888, 14933, 8, 198, 220, 220, 220, 611, 304, 13, 2256, 6624, 1058, 22708, 198, 220, 220, 220, 220, 220, 220, 220, 304, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 6330, 62, 1837, 907, 0, 7, 68, 11, 2888, 14933, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 6330, 62, 67, 8426, 0, 7, 68, 11, 2888, 14933, 8, 198, 220, 220, 220, 2124, 62, 3605, 796, 6330, 62, 1837, 907, 0, 7, 68, 13, 22046, 58, 16, 4357, 2888, 14933, 8, 198, 220, 220, 220, 331, 62, 3605, 796, 1805, 62, 33491, 62, 1837, 907, 0, 7, 68, 13, 22046, 58, 17, 4357, 2888, 14933, 8, 198, 220, 220, 220, 1475, 1050, 7, 25, 1539, 2124, 62, 3605, 11, 331, 62, 3605, 8, 198, 437, 198, 198, 8818, 2251, 62, 22046, 62, 31364, 7, 22046, 23029, 198, 220, 220, 220, 2251, 62, 22046, 62, 31364, 7, 3109, 1050, 7, 25, 9967, 11, 26498, 986, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 2251, 62, 22046, 62, 31364, 7, 853, 8, 4613, 43030, 11, 12076, 62, 33152, 198, 198, 15056, 281, 5408, 1441, 257, 15879, 286, 4560, 198, 392, 257, 4600, 45, 2434, 51, 29291, 63, 286, 262, 15021, 12, 33152, 326, 1656, 198, 259, 262, 5408, 13, 198, 198, 1532, 257, 4600, 25, 9967, 63, 5408, 11, 1441, 262, 4600, 22046, 63, 286, 198, 1169, 2512, 355, 281, 7177, 13, 1002, 257, 2829, 5408, 11, 198, 37150, 262, 5408, 287, 257, 530, 12, 30854, 15879, 13, 198, 37811, 198, 8818, 2251, 62, 22046, 62, 31364, 7, 853, 8, 198, 220, 220, 220, 1822, 11, 12076, 62, 33152, 796, 7925, 62, 20285, 305, 62, 33152, 7, 14155, 305, 33637, 13, 403, 9967, 7, 853, 4008, 628, 220, 220, 220, 611, 1822, 318, 64, 1475, 1050, 11405, 1822, 13, 2256, 6624, 1058, 9967, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 42755, 33637, 13, 81, 4029, 1127, 7, 853, 737, 22046, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 4377, 58, 853, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2124, 11, 12076, 62, 33152, 198, 437, 198 ]
2.201633
4,900
using Downloads using SHA # this file downloads files which are used during testing the package # if they are already present and their checksum matches, they are not downloaded again REPO_URL = "https://github.com/yeesian/ArchGDALDatasets/blob/master/" # remote files with SHA-2 256 hash """ To add more files, follow the below steps to generate the SHA ``` julia> using SHA julia> open(filepath/filename) do f bytes2hex(sha256(f)) end ``` """ remotefiles = [ ( "data/road.zip", "058bdc549d0fc5bfb6deaef138e48758ca79ae20df79c2fb4c40cb878f48bfd8", ), ] function verify(path::AbstractString, hash::AbstractString) @assert occursin(r"^[0-9a-f]{64}$", hash) hash = lowercase(hash) if isfile(path) calc_hash = open(path) do file return bytes2hex(sha256(file)) end @assert occursin(r"^[0-9a-f]{64}$", calc_hash) if calc_hash != hash @error "Hash Mismatch! Expected: $hash, Calculated: $calc_hash\n" return false else return true end else error("File read error: $path") end end function download_verify( url::AbstractString, hash::Union{AbstractString,Nothing}, dest::AbstractString, ) file_existed = false # verify if file exists if isfile(dest) file_existed = true if hash !== nothing && verify(dest, hash) # hash verified return true else # either hash is nothing or couldn't pass the SHA test @error( "Failed to verify file: $dest with hash: $hash. Re-downloading file..." ) end end # if the file exists but some problem exists, we delete it to start from scratch file_existed && Base.rm(dest; force = true) # Make sure the containing folder exists mkpath(dirname(dest)) # downloads the file at dest Downloads.download(url, dest) # hash exists and verification fails if hash !== nothing && !verify(dest, hash) if file_existed # the file might be corrupted so we start from scracth Base.rm(dest; force = true) Downloads.download(url, dest) if hash !== nothing && !verify(dest, hash) error("Verification failed") end else error("Verification failed. File not created after download.") end end return !file_existed end for (f, sha) in remotefiles # create the directories if they don't exist currdir = dirname(f) isdir(currdir) || mkpath(currdir) # download the file if it is not there or if it has a different checksum currfile = normpath(joinpath(@__DIR__, f)) url = REPO_URL * f * "?raw=true" download_verify(url, sha, currfile) end
[ 3500, 50093, 198, 3500, 25630, 198, 198, 2, 428, 2393, 21333, 3696, 543, 389, 973, 1141, 4856, 262, 5301, 198, 2, 611, 484, 389, 1541, 1944, 290, 511, 8794, 388, 7466, 11, 484, 389, 407, 15680, 757, 198, 198, 2200, 16402, 62, 21886, 796, 366, 5450, 1378, 12567, 13, 785, 14, 88, 2841, 666, 14, 19895, 45113, 1847, 27354, 292, 1039, 14, 2436, 672, 14, 9866, 30487, 198, 198, 2, 6569, 3696, 351, 25630, 12, 17, 17759, 12234, 198, 37811, 198, 2514, 751, 517, 3696, 11, 1061, 262, 2174, 4831, 284, 7716, 262, 25630, 198, 15506, 63, 198, 73, 43640, 29, 1262, 25630, 198, 73, 43640, 29, 1280, 7, 7753, 6978, 14, 34345, 8, 466, 277, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9881, 17, 33095, 7, 26270, 11645, 7, 69, 4008, 198, 220, 220, 220, 220, 220, 220, 886, 198, 15506, 63, 198, 37811, 198, 2787, 313, 891, 2915, 796, 685, 198, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 14, 6344, 13, 13344, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 2713, 23, 17457, 66, 44966, 67, 15, 16072, 20, 19881, 65, 21, 2934, 64, 891, 20107, 68, 2780, 38569, 6888, 3720, 3609, 1238, 7568, 3720, 66, 17, 21855, 19, 66, 1821, 21101, 23, 3695, 69, 2780, 65, 16344, 23, 1600, 198, 220, 220, 220, 10612, 198, 60, 198, 198, 8818, 11767, 7, 6978, 3712, 23839, 10100, 11, 12234, 3712, 23839, 10100, 8, 198, 220, 220, 220, 2488, 30493, 8833, 259, 7, 81, 1, 61, 58, 15, 12, 24, 64, 12, 69, 60, 90, 2414, 92, 3, 1600, 12234, 8, 198, 220, 220, 220, 12234, 796, 2793, 7442, 7, 17831, 8, 198, 220, 220, 220, 611, 318, 7753, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 42302, 62, 17831, 796, 1280, 7, 6978, 8, 466, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 9881, 17, 33095, 7, 26270, 11645, 7, 7753, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 8833, 259, 7, 81, 1, 61, 58, 15, 12, 24, 64, 12, 69, 60, 90, 2414, 92, 3, 1600, 42302, 62, 17831, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42302, 62, 17831, 14512, 12234, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 26257, 337, 1042, 963, 0, 1475, 7254, 25, 720, 17831, 11, 27131, 515, 25, 720, 9948, 66, 62, 17831, 59, 77, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 8979, 1100, 4049, 25, 720, 6978, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 4321, 62, 332, 1958, 7, 198, 220, 220, 220, 19016, 3712, 23839, 10100, 11, 198, 220, 220, 220, 12234, 3712, 38176, 90, 23839, 10100, 11, 18465, 5512, 198, 220, 220, 220, 2244, 3712, 23839, 10100, 11, 198, 8, 198, 220, 220, 220, 2393, 62, 1069, 6347, 796, 3991, 198, 220, 220, 220, 1303, 11767, 611, 2393, 7160, 198, 220, 220, 220, 611, 318, 7753, 7, 16520, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 1069, 6347, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 611, 12234, 5145, 855, 2147, 11405, 11767, 7, 16520, 11, 12234, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12234, 19000, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2035, 12234, 318, 2147, 393, 3521, 470, 1208, 262, 25630, 1332, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 37, 6255, 284, 11767, 2393, 25, 720, 16520, 351, 12234, 25, 720, 17831, 13, 797, 12, 15002, 278, 2393, 9313, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 611, 262, 2393, 7160, 475, 617, 1917, 7160, 11, 356, 12233, 340, 284, 923, 422, 12692, 198, 220, 220, 220, 2393, 62, 1069, 6347, 11405, 7308, 13, 26224, 7, 16520, 26, 2700, 796, 2081, 8, 198, 220, 220, 220, 1303, 6889, 1654, 262, 7268, 9483, 7160, 198, 220, 220, 220, 33480, 6978, 7, 15908, 3672, 7, 16520, 4008, 198, 220, 220, 220, 1303, 21333, 262, 2393, 379, 2244, 198, 220, 220, 220, 50093, 13, 15002, 7, 6371, 11, 2244, 8, 198, 220, 220, 220, 1303, 12234, 7160, 290, 19637, 10143, 198, 220, 220, 220, 611, 12234, 5145, 855, 2147, 11405, 5145, 332, 1958, 7, 16520, 11, 12234, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2393, 62, 1069, 6347, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 262, 2393, 1244, 307, 26940, 523, 356, 923, 422, 629, 974, 71, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7308, 13, 26224, 7, 16520, 26, 2700, 796, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 50093, 13, 15002, 7, 6371, 11, 2244, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 12234, 5145, 855, 2147, 11405, 5145, 332, 1958, 7, 16520, 11, 12234, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 13414, 2649, 4054, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 13414, 2649, 4054, 13, 9220, 407, 2727, 706, 4321, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 5145, 7753, 62, 1069, 6347, 198, 437, 198, 198, 1640, 357, 69, 11, 427, 64, 8, 287, 816, 313, 891, 2915, 198, 220, 220, 220, 1303, 2251, 262, 29196, 611, 484, 836, 470, 2152, 198, 220, 220, 220, 1090, 4372, 343, 796, 26672, 3672, 7, 69, 8, 198, 220, 220, 220, 318, 15908, 7, 22019, 4372, 343, 8, 8614, 33480, 6978, 7, 22019, 4372, 343, 8, 198, 220, 220, 220, 1303, 4321, 262, 2393, 611, 340, 318, 407, 612, 393, 611, 340, 468, 257, 1180, 8794, 388, 198, 220, 220, 220, 1090, 81, 7753, 796, 2593, 6978, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 277, 4008, 198, 220, 220, 220, 19016, 796, 4526, 16402, 62, 21886, 1635, 277, 1635, 366, 30, 1831, 28, 7942, 1, 198, 220, 220, 220, 4321, 62, 332, 1958, 7, 6371, 11, 427, 64, 11, 1090, 81, 7753, 8, 198, 437, 198 ]
2.34609
1,202
@testset "eigenvalues/eigenvectors: $MatT" for MatT in (AcbMatrix, AcbRefMatrix) A = [ 0.6873474041954415 0.7282180564881044 0.07360652513458521 0.000835810121029068 0.9256166870757694 0.5363310989411239 0.07387174694790022 0.4050436025621329 0.20226010388885896 ] B = [ 0.8982563031334123 0.3029712969740874 0.8585014523679579 0.7583002736998279 0.8854763478184455 0.3031103325817668 0.2319572749472405 0.5769840251057949 0.5119507333628952 ] M = MatT(A + B * im, prec = 64) # M = MatT(rand(3, 3) + im * rand(3, 3), prec = 64) VecT = typeof(similar(M, 3)) @testset "approx_eig_qr" begin λs_a_r, revs_a = Arblib.approx_eig_qr(M, side = :right) @test λs_a_r isa VecT @test revs_a isa MatT ε = 1e-10 λs_a_l, revs_a = Arblib.approx_eig_qr(M, tol = Arblib.Mag(ε), side = :left) @test λs_a_l isa VecT @test revs_a isa MatT @test all(abs.(λs_a_r - λs_a_l) .< ε) λs_r = similar(M, size(M, 1)) Arblib.approx_eig_qr!(λs_r, M) @test Arblib.is_zero(λs_r - λs_a_r, length(λs_r)) end @testset "eig_simple" begin λs1, _ = Arblib.eig_simple_vdhoeven_mourrain(M, side = :right) λs2, _ = Arblib.eig_simple_vdhoeven_mourrain(M, side = :left) @test all(Arblib.containszero, λs1 - λs2) # λs1, _ = Arblib.eig_simple_rump(M, side = :right) # segfaults in acb_mat_solve at /workspace/srcdir/arb-2.18.1/acb_mat/solve.c:17 # Issue #321 in Arblib (fixed by #330) # λs2, _ = Arblib.eig_simple_rump(M, side=:left) # @test all(Arblib.containszero, λs1 - λs2) λs1, _ = Arblib.eig_simple(M, side = :right) λs2, _ = Arblib.eig_simple(M, side = :left) @test all(Arblib.containszero, λs1 - λs2) λs = similar(M, size(M, 1)) Arblib.eig_simple_vdhoeven_mourrain!(λs, M) @test all(Arblib.containszero, λs - λs1) λs = similar(M, size(M, 1)) Arblib.eig_simple_rump!(λs, M) @test all(Arblib.containszero, λs - λs1) λs = similar(M, size(M, 1)) Arblib.eig_simple!(λs, M) @test all(Arblib.containszero, λs - λs1) end N = similar(M) evs = [Arb(2.0), Arb(2.0), Arb(rand())] N[1, 1], N[2, 2], N[3, 3] = evs N = M * N * M^-1 @testset "enclosures" begin ε = Arblib.Mag() tol = 1e-12 λ_approx, R_approx = Arblib.approx_eig_qr(M, tol = tol) @test Arblib.eig_global_enclosure!( ε, M, λ_approx, R_approx; prec = precision(M), ) isa Arblib.Mag @test ε <= tol λs = similar(M, size(M, 1)) Arblib.eig_simple!(λs, M, λ_approx, R_approx) for λa in λ_approx a_real = let x = real(λa) m = Arblib.midref(x) r = Arblib.radref(x) Arblib.set_interval!(x, m - (r + ε), m + (r + ε)) end a_imag = let x = imag(λa) m = Arblib.midref(x) r = Arblib.radref(x) Arblib.set_interval!(x, m - (r + ε), m + (r + ε)) end a = Acb(a_real, a_imag) @test any(Arblib.containszero(a - λ) for λ in λs) end @test_throws Arblib.EigenvalueComputationError Arblib.eig_simple(N) λ_approx, R_approx = Arblib.approx_eig_qr(N) v = sortperm(λ_approx, by = abs, rev = true) λ = Acb(prec = precision(N)) R = similar(N, (3, 1)) Arblib.eig_enclosure_rump!(λ, R, N, λ_approx[v[1]], R_approx[:, v[1:1]]) @test !isfinite(λ) λ = Acb(prec = precision(N)) R = similar(N, (3, 1)) Arblib.eig_enclosure_rump!(λ, R, N, λ_approx[v[3]], R_approx[:, v[3:3]]) @test isfinite(λ) @test Arblib.contains_zero(λ - evs[3]) λ = Acb(prec = precision(N)) R = similar(N, (3, 2)) Arblib.eig_enclosure_rump!(λ, R, N, λ_approx[v[1]], R_approx[:, v[1:2]]) @test isfinite(λ) @test Arblib.contains_zero(λ - 2) @test all(Arblib.contains_zero.(N * R - R * λ)) λ = Acb(prec = precision(N)) R = similar(N, (3, 2)) J = similar(N, (2, 2)) Arblib.eig_enclosure_rump!(λ, J, R, N, λ_approx[v[2]], R_approx[:, v[1:2]]) @test Arblib.contains_zero(λ - 2) @test all(Arblib.contains_zero.(N * R - R * J)) end @testset "eig_multiple" begin λs = similar(N, 3) @test Arblib.eig_multiple_rump(N) isa VecT Arblib.eig_multiple_rump!(λs, N) v = sortperm(λs, by = abs, rev = true) @test all(Arblib.contains_zero.(λs[v] - evs)) @test Arblib.eig_multiple(N) isa VecT Arblib.eig_multiple!(λs, N) v = sortperm(λs, by = abs, rev = true) @test all(Arblib.contains_zero.(λs[v] - evs)) end end
[ 31, 9288, 2617, 366, 68, 9324, 27160, 14, 68, 9324, 303, 5217, 25, 720, 19044, 51, 1, 329, 6550, 51, 287, 357, 12832, 65, 46912, 11, 4013, 65, 8134, 46912, 8, 198, 220, 220, 220, 317, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 39925, 30995, 26429, 22186, 2598, 1314, 657, 13, 48524, 28727, 2713, 2414, 3459, 940, 2598, 657, 13, 2998, 15277, 2996, 1495, 1485, 2231, 5332, 2481, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 830, 23, 2327, 6659, 486, 21536, 24369, 3104, 657, 13, 24, 11645, 1433, 3104, 2154, 39251, 45214, 657, 13, 44468, 2091, 940, 42520, 3901, 1065, 2670, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 2998, 32220, 22985, 3388, 2857, 12865, 1828, 657, 13, 1821, 1120, 3559, 1899, 1495, 5237, 1485, 1959, 657, 13, 1238, 24909, 20943, 2548, 28011, 3365, 4846, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 347, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 23, 4089, 11645, 22572, 1485, 2682, 10163, 657, 13, 1270, 26561, 18741, 40035, 26200, 4524, 657, 13, 23, 3365, 33548, 2231, 1954, 37601, 41734, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 2425, 5999, 405, 1983, 2623, 34808, 26050, 657, 13, 44230, 35435, 2682, 3695, 22883, 30505, 657, 13, 1270, 3132, 940, 2091, 25600, 1558, 35809, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 1954, 1129, 3553, 1983, 2920, 2857, 1731, 2713, 657, 13, 3553, 39357, 1821, 1495, 940, 41734, 2920, 657, 13, 4349, 1129, 35378, 2091, 2623, 2078, 49234, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 337, 796, 6550, 51, 7, 32, 1343, 347, 1635, 545, 11, 3718, 796, 5598, 8, 198, 220, 220, 220, 1303, 337, 796, 6550, 51, 7, 25192, 7, 18, 11, 513, 8, 1343, 545, 1635, 43720, 7, 18, 11, 513, 828, 3718, 796, 5598, 8, 628, 220, 220, 220, 38692, 51, 796, 2099, 1659, 7, 38610, 7, 44, 11, 513, 4008, 628, 220, 220, 220, 2488, 9288, 2617, 366, 1324, 13907, 62, 68, 328, 62, 80, 81, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 62, 64, 62, 81, 11, 2710, 82, 62, 64, 796, 943, 2436, 571, 13, 1324, 13907, 62, 68, 328, 62, 80, 81, 7, 44, 11, 1735, 796, 1058, 3506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 7377, 119, 82, 62, 64, 62, 81, 318, 64, 38692, 51, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2710, 82, 62, 64, 318, 64, 6550, 51, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 796, 352, 68, 12, 940, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 62, 64, 62, 75, 11, 2710, 82, 62, 64, 796, 943, 2436, 571, 13, 1324, 13907, 62, 68, 328, 62, 80, 81, 7, 44, 11, 284, 75, 796, 943, 2436, 571, 13, 13436, 7, 30950, 828, 1735, 796, 1058, 9464, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 7377, 119, 82, 62, 64, 62, 75, 318, 64, 38692, 51, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2710, 82, 62, 64, 318, 64, 6550, 51, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 8937, 12195, 39377, 82, 62, 64, 62, 81, 532, 7377, 119, 82, 62, 64, 62, 75, 8, 764, 27, 7377, 113, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 62, 81, 796, 2092, 7, 44, 11, 2546, 7, 44, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 1324, 13907, 62, 68, 328, 62, 80, 81, 0, 7, 39377, 82, 62, 81, 11, 337, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 271, 62, 22570, 7, 39377, 82, 62, 81, 532, 7377, 119, 82, 62, 64, 62, 81, 11, 4129, 7, 39377, 82, 62, 81, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 68, 328, 62, 36439, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 16, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 20306, 38979, 574, 62, 76, 454, 3201, 7, 44, 11, 1735, 796, 1058, 3506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 17, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 20306, 38979, 574, 62, 76, 454, 3201, 7, 44, 11, 1735, 796, 1058, 9464, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 16, 532, 7377, 119, 82, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 7377, 119, 82, 16, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 81, 931, 7, 44, 11, 1735, 796, 1058, 3506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 384, 70, 69, 13185, 287, 936, 65, 62, 6759, 62, 82, 6442, 379, 1220, 5225, 10223, 14, 10677, 15908, 14, 38039, 12, 17, 13, 1507, 13, 16, 14, 330, 65, 62, 6759, 14, 82, 6442, 13, 66, 25, 1558, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 18232, 1303, 36453, 287, 943, 2436, 571, 357, 34021, 416, 1303, 26073, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7377, 119, 82, 17, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 81, 931, 7, 44, 11, 1735, 28, 25, 9464, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 16, 532, 7377, 119, 82, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 16, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 7, 44, 11, 1735, 796, 1058, 3506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 17, 11, 4808, 796, 943, 2436, 571, 13, 68, 328, 62, 36439, 7, 44, 11, 1735, 796, 1058, 9464, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 16, 532, 7377, 119, 82, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 796, 2092, 7, 44, 11, 2546, 7, 44, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 20306, 38979, 574, 62, 76, 454, 3201, 0, 7, 39377, 82, 11, 337, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 532, 7377, 119, 82, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 796, 2092, 7, 44, 11, 2546, 7, 44, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 36439, 62, 81, 931, 0, 7, 39377, 82, 11, 337, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 532, 7377, 119, 82, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 796, 2092, 7, 44, 11, 2546, 7, 44, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 36439, 0, 7, 39377, 82, 11, 337, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 11, 7377, 119, 82, 532, 7377, 119, 82, 16, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 399, 796, 2092, 7, 44, 8, 198, 220, 220, 220, 819, 82, 796, 685, 3163, 65, 7, 17, 13, 15, 828, 943, 65, 7, 17, 13, 15, 828, 943, 65, 7, 25192, 3419, 15437, 198, 220, 220, 220, 399, 58, 16, 11, 352, 4357, 399, 58, 17, 11, 362, 4357, 399, 58, 18, 11, 513, 60, 796, 819, 82, 628, 220, 220, 220, 399, 796, 337, 1635, 399, 1635, 337, 61, 12, 16, 628, 220, 220, 220, 2488, 9288, 2617, 366, 268, 565, 16091, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 796, 943, 2436, 571, 13, 13436, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 284, 75, 796, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 62, 1324, 13907, 11, 371, 62, 1324, 13907, 796, 943, 2436, 571, 13, 1324, 13907, 62, 68, 328, 62, 80, 81, 7, 44, 11, 284, 75, 796, 284, 75, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 68, 328, 62, 20541, 62, 268, 17966, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 62, 1324, 13907, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 62, 1324, 13907, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3718, 796, 15440, 7, 44, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 318, 64, 943, 2436, 571, 13, 13436, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 7377, 113, 19841, 284, 75, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 796, 2092, 7, 44, 11, 2546, 7, 44, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 36439, 0, 7, 39377, 82, 11, 337, 11, 7377, 119, 62, 1324, 13907, 11, 371, 62, 1324, 13907, 8, 628, 220, 220, 220, 220, 220, 220, 220, 329, 7377, 119, 64, 287, 7377, 119, 62, 1324, 13907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 62, 5305, 796, 1309, 2124, 796, 1103, 7, 39377, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 796, 943, 2436, 571, 13, 13602, 5420, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 943, 2436, 571, 13, 6335, 5420, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 2617, 62, 3849, 2100, 0, 7, 87, 11, 285, 532, 357, 81, 1343, 7377, 113, 828, 285, 1343, 357, 81, 1343, 7377, 113, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 62, 48466, 796, 1309, 2124, 796, 3590, 7, 39377, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 796, 943, 2436, 571, 13, 13602, 5420, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 943, 2436, 571, 13, 6335, 5420, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 2617, 62, 3849, 2100, 0, 7, 87, 11, 285, 532, 357, 81, 1343, 7377, 113, 828, 285, 1343, 357, 81, 1343, 7377, 113, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 796, 4013, 65, 7, 64, 62, 5305, 11, 257, 62, 48466, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 597, 7, 3163, 2436, 571, 13, 3642, 1299, 22570, 7, 64, 532, 7377, 119, 8, 329, 7377, 119, 287, 7377, 119, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 943, 2436, 571, 13, 36, 9324, 8367, 5377, 1996, 341, 12331, 943, 2436, 571, 13, 68, 328, 62, 36439, 7, 45, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 62, 1324, 13907, 11, 371, 62, 1324, 13907, 796, 943, 2436, 571, 13, 1324, 13907, 62, 68, 328, 62, 80, 81, 7, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 3297, 16321, 7, 39377, 62, 1324, 13907, 11, 416, 796, 2352, 11, 2710, 796, 2081, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 796, 4013, 65, 7, 3866, 66, 796, 15440, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 371, 796, 2092, 7, 45, 11, 357, 18, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 268, 17966, 62, 81, 931, 0, 7, 39377, 11, 371, 11, 399, 11, 7377, 119, 62, 1324, 13907, 58, 85, 58, 16, 60, 4357, 371, 62, 1324, 13907, 58, 45299, 410, 58, 16, 25, 16, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 5145, 4468, 9504, 7, 39377, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 796, 4013, 65, 7, 3866, 66, 796, 15440, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 371, 796, 2092, 7, 45, 11, 357, 18, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 268, 17966, 62, 81, 931, 0, 7, 39377, 11, 371, 11, 399, 11, 7377, 119, 62, 1324, 13907, 58, 85, 58, 18, 60, 4357, 371, 62, 1324, 13907, 58, 45299, 410, 58, 18, 25, 18, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 69, 9504, 7, 39377, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 3642, 1299, 62, 22570, 7, 39377, 532, 819, 82, 58, 18, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 796, 4013, 65, 7, 3866, 66, 796, 15440, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 371, 796, 2092, 7, 45, 11, 357, 18, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 268, 17966, 62, 81, 931, 0, 7, 39377, 11, 371, 11, 399, 11, 7377, 119, 62, 1324, 13907, 58, 85, 58, 16, 60, 4357, 371, 62, 1324, 13907, 58, 45299, 410, 58, 16, 25, 17, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 69, 9504, 7, 39377, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 3642, 1299, 62, 22570, 7, 39377, 532, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 62, 22570, 12195, 45, 1635, 371, 532, 371, 1635, 7377, 119, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 796, 4013, 65, 7, 3866, 66, 796, 15440, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 371, 796, 2092, 7, 45, 11, 357, 18, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 449, 796, 2092, 7, 45, 11, 357, 17, 11, 362, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 268, 17966, 62, 81, 931, 0, 7, 39377, 11, 449, 11, 371, 11, 399, 11, 7377, 119, 62, 1324, 13907, 58, 85, 58, 17, 60, 4357, 371, 62, 1324, 13907, 58, 45299, 410, 58, 16, 25, 17, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 3642, 1299, 62, 22570, 7, 39377, 532, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 62, 22570, 12195, 45, 1635, 371, 532, 371, 1635, 449, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 68, 328, 62, 48101, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 119, 82, 796, 2092, 7, 45, 11, 513, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 68, 328, 62, 48101, 62, 81, 931, 7, 45, 8, 318, 64, 38692, 51, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 48101, 62, 81, 931, 0, 7, 39377, 82, 11, 399, 8, 628, 220, 220, 220, 220, 220, 220, 220, 410, 796, 3297, 16321, 7, 39377, 82, 11, 416, 796, 2352, 11, 2710, 796, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 62, 22570, 12195, 39377, 82, 58, 85, 60, 532, 819, 82, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 943, 2436, 571, 13, 68, 328, 62, 48101, 7, 45, 8, 318, 64, 38692, 51, 198, 220, 220, 220, 220, 220, 220, 220, 943, 2436, 571, 13, 68, 328, 62, 48101, 0, 7, 39377, 82, 11, 399, 8, 628, 220, 220, 220, 220, 220, 220, 220, 410, 796, 3297, 16321, 7, 39377, 82, 11, 416, 796, 2352, 11, 2710, 796, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 3163, 2436, 571, 13, 3642, 1299, 62, 22570, 12195, 39377, 82, 58, 85, 60, 532, 819, 82, 4008, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.683111
2,919
module VortexHelperBowlPuffer using ..Ahorn, Maple @mapdef Entity "VortexHelper/BowlPuffer" BowlPuffer(x::Integer, y::Integer, noRespawn::Bool = false, explodeTimer::Number = 1.0) const placements = Ahorn.PlacementDict( "Pufferfish Bowl (Vortex Helper)" => Ahorn.EntityPlacement( BowlPuffer, "point" ), "Pufferfish Bowl (No Respawn) (Vortex Helper)" => Ahorn.EntityPlacement( BowlPuffer, "point", Dict{String, Any}( "noRespawn" => true ) ) ) pufferBowlSprite = "objects/VortexHelper/pufferBowl/idle00" function Ahorn.selection(entity::BowlPuffer) x, y = Ahorn.position(entity) return Ahorn.Rectangle(x - 11, y - 11, 21, 19) end function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::BowlPuffer, room::Maple.Room) Ahorn.drawSprite(ctx, pufferBowlSprite, 0, -3) end end
[ 21412, 49790, 47429, 33, 4883, 47, 13712, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 31, 8899, 4299, 20885, 366, 53, 26158, 47429, 14, 33, 4883, 47, 13712, 1, 8693, 47, 13712, 7, 87, 3712, 46541, 11, 331, 3712, 46541, 11, 645, 19309, 3832, 3712, 33, 970, 796, 3991, 11, 22818, 48801, 3712, 15057, 796, 352, 13, 15, 8, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, 198, 220, 220, 220, 366, 47, 13712, 11084, 8693, 357, 53, 26158, 5053, 525, 16725, 5218, 7900, 1211, 13, 32398, 3646, 5592, 7, 198, 220, 220, 220, 220, 220, 220, 220, 8693, 47, 13712, 11, 198, 197, 197, 1, 4122, 1, 198, 220, 220, 220, 10612, 198, 197, 1, 47, 13712, 11084, 8693, 357, 2949, 10328, 3832, 8, 357, 53, 26158, 5053, 525, 16725, 5218, 7900, 1211, 13, 32398, 3646, 5592, 7, 198, 220, 220, 220, 220, 220, 220, 220, 8693, 47, 13712, 11, 198, 197, 197, 1, 4122, 1600, 198, 197, 197, 35, 713, 90, 10100, 11, 4377, 92, 7, 198, 197, 197, 197, 1, 3919, 19309, 3832, 1, 5218, 2081, 198, 197, 197, 8, 198, 220, 220, 220, 1267, 198, 8, 198, 198, 79, 13712, 33, 4883, 38454, 578, 796, 366, 48205, 14, 53, 26158, 47429, 14, 79, 13712, 33, 4883, 14, 312, 293, 405, 1, 198, 198, 8818, 7900, 1211, 13, 49283, 7, 26858, 3712, 33, 4883, 47, 13712, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 7900, 1211, 13, 9150, 7, 26858, 8, 198, 220, 220, 220, 1441, 7900, 1211, 13, 45474, 9248, 7, 87, 532, 1367, 11, 331, 532, 1367, 11, 2310, 11, 678, 8, 198, 437, 198, 198, 8818, 7900, 1211, 13, 13287, 7, 49464, 3712, 10910, 1211, 13, 34, 18131, 13, 34, 18131, 21947, 11, 9312, 3712, 33, 4883, 47, 13712, 11, 2119, 3712, 13912, 293, 13, 41178, 8, 198, 220, 220, 220, 7900, 1211, 13, 19334, 38454, 578, 7, 49464, 11, 279, 13712, 33, 4883, 38454, 578, 11, 657, 11, 532, 18, 8, 198, 437, 198, 198, 437 ]
2.43695
341
# Testing: # # - computation of sufficient statistics # - distribution fitting (i.e. estimation) # using Distributions using Base.Test n0 = 100 N = 10^5 w = rand(n0) # DiscreteUniform x = rand(DiscreteUniform(10, 15), n0) d = fit(DiscreteUniform, x) @test isa(d, DiscreteUniform) @test minimum(d) == minimum(x) @test maximum(d) == maximum(x) d = fit(DiscreteUniform, rand(DiscreteUniform(10, 15), N)) @test minimum(d) == 10 @test maximum(d) == 15 # Bernoulli x = rand(Bernoulli(0.7), n0) ss = suffstats(Bernoulli, x) @test isa(ss, Distributions.BernoulliStats) @test ss.cnt0 == n0 - countnz(x) @test ss.cnt1 == countnz(x) ss = suffstats(Bernoulli, x, w) @test isa(ss, Distributions.BernoulliStats) @test_approx_eq ss.cnt0 sum(w[x .== 0]) @test_approx_eq ss.cnt1 sum(w[x .== 1]) d = fit(Bernoulli, x) p = countnz(x) / n0 @test isa(d, Bernoulli) @test_approx_eq mean(d) p d = fit(Bernoulli, x, w) p = sum(w[x .== 1]) / sum(w) @test isa(d, Bernoulli) @test_approx_eq mean(d) p d = fit(Bernoulli, rand(Bernoulli(0.7), N)) @test isa(d, Bernoulli) @test_approx_eq_eps mean(d) 0.7 0.01 # Beta d = fit(Beta, rand(Beta(1.3, 3.7), N)) @test isa(d, Beta) @test_approx_eq_eps d.α 1.3 0.1 @test_approx_eq_eps d.β 3.7 0.1 # Binomial x = rand(Binomial(100, 0.3), n0) ss = suffstats(Binomial, (100, x)) @test isa(ss, Distributions.BinomialStats) @test_approx_eq ss.ns sum(x) @test ss.ne == n0 @test ss.n == 100 ss = suffstats(Binomial, (100, x), w) @test isa(ss, Distributions.BinomialStats) @test_approx_eq ss.ns dot(Float64[xx for xx in x], w) @test_approx_eq ss.ne sum(w) @test ss.n == 100 d = fit(Binomial, (100, x)) @test isa(d, Binomial) @test ntrials(d) == 100 @test_approx_eq succprob(d) sum(x) / (n0 * 100) d = fit(Binomial, (100, x), w) @test isa(d, Binomial) @test ntrials(d) == 100 @test_approx_eq succprob(d) dot(x, w) / (sum(w) * 100) d = fit(Binomial, 100, rand(Binomial(100, 0.3), N)) @test isa(d, Binomial) @test ntrials(d) == 100 @test_approx_eq_eps succprob(d) 0.3 0.01 # Categorical p = [0.2, 0.5, 0.3] x = rand(Categorical(p), n0) ss = suffstats(Categorical, (3, x)) h = Float64[countnz(x .== i) for i = 1 : 3] @test isa(ss, Distributions.CategoricalStats) @test_approx_eq ss.h h d = fit(Categorical, (3, x)) @test isa(d, Categorical) @test d.K == 3 @test_approx_eq probs(d) h / sum(h) d2 = fit(Categorical, x) @test isa(d2, Categorical) @test probs(d2) == probs(d) ss = suffstats(Categorical, (3, x), w) h = Float64[sum(w[x .== i]) for i = 1 : 3] @test isa(ss, Distributions.CategoricalStats) @test_approx_eq ss.h h d = fit(Categorical, (3, x), w) @test isa(d, Categorical) @test_approx_eq probs(d) h / sum(h) d = fit(Categorical, suffstats(Categorical, 3, x, w)) @test isa(d, Categorical) @test_approx_eq probs(d) (h / sum(h)) d = fit(Categorical, rand(Categorical(p), N)) @test isa(d, Categorical) @test_approx_eq_eps probs(d) p 0.01 # Exponential x = rand(Exponential(0.5), n0) ss = suffstats(Exponential, x) @test isa(ss, Distributions.ExponentialStats) @test_approx_eq ss.sx sum(x) @test ss.sw == n0 ss = suffstats(Exponential, x, w) @test isa(ss, Distributions.ExponentialStats) @test_approx_eq ss.sx dot(x, w) @test ss.sw == sum(w) d = fit(Exponential, x) @test isa(d, Exponential) @test_approx_eq scale(d) mean(x) d = fit(Exponential, x, w) @test isa(d, Exponential) @test_approx_eq scale(d) dot(x, w) / sum(w) d = fit(Exponential, rand(Exponential(0.5), N)) @test isa(d, Exponential) @test_approx_eq_eps scale(d) 0.5 0.01 # Normal μ = 11.3 σ = 3.2 x = rand(Normal(μ, σ), n0) ss = suffstats(Normal, x) @test isa(ss, Distributions.NormalStats) @test_approx_eq ss.s sum(x) @test_approx_eq ss.m mean(x) @test_approx_eq ss.s2 sum((x .- ss.m).^2) @test_approx_eq ss.tw n0 ss = suffstats(Normal, x, w) @test isa(ss, Distributions.NormalStats) @test_approx_eq ss.s dot(x, w) @test_approx_eq ss.m dot(x, w) / sum(w) @test_approx_eq ss.s2 dot((x .- ss.m).^2, w) @test_approx_eq ss.tw sum(w) d = fit(Normal, x) @test isa(d, Normal) @test_approx_eq d.μ mean(x) @test_approx_eq d.σ sqrt(mean((x .- d.μ).^2)) d = fit(Normal, x, w) @test isa(d, Normal) @test_approx_eq d.μ dot(x, w) / sum(w) @test_approx_eq d.σ sqrt(dot((x .- d.μ).^2, w) / sum(w)) d = fit(Normal, rand(Normal(μ, σ), N)) @test isa(d, Normal) @test_approx_eq_eps d.μ μ 0.1 @test_approx_eq_eps d.σ σ 0.1 import Distributions.NormalKnownMu, Distributions.NormalKnownSigma ss = suffstats(NormalKnownMu(μ), x) @test isa(ss, Distributions.NormalKnownMuStats) @test ss.μ == μ @test_approx_eq ss.s2 sum((x .- μ).^2) @test_approx_eq ss.tw n0 ss = suffstats(NormalKnownMu(μ), x, w) @test isa(ss, Distributions.NormalKnownMuStats) @test ss.μ == μ @test_approx_eq ss.s2 dot((x .- μ).^2, w) @test_approx_eq ss.tw sum(w) d = fit_mle(Normal, x; mu=μ) @test isa(d, Normal) @test d.μ == μ @test_approx_eq d.σ sqrt(mean((x .- d.μ).^2)) d = fit_mle(Normal, x, w; mu=μ) @test isa(d, Normal) @test d.μ == μ @test_approx_eq d.σ sqrt(dot((x .- d.μ).^2, w) / sum(w)) ss = suffstats(NormalKnownSigma(σ), x) @test isa(ss, Distributions.NormalKnownSigmaStats) @test ss.σ == σ @test_approx_eq ss.sx sum(x) @test_approx_eq ss.tw n0 ss = suffstats(NormalKnownSigma(σ), x, w) @test isa(ss, Distributions.NormalKnownSigmaStats) @test ss.σ == σ @test_approx_eq ss.sx dot(x, w) @test_approx_eq ss.tw sum(w) d = fit_mle(Normal, x; sigma=σ) @test isa(d, Normal) @test d.σ == σ @test_approx_eq d.μ mean(x) d = fit_mle(Normal, x, w; sigma=σ) @test isa(d, Normal) @test d.σ == σ @test_approx_eq d.μ dot(x, w) / sum(w) # Uniform x = rand(Uniform(1.2, 5.8), n0) d = fit(Uniform, x) @test isa(d, Uniform) @test 1.2 <= minimum(d) <= maximum(d) <= 5.8 @test minimum(d) == minimum(x) @test maximum(d) == maximum(x) d = fit(Uniform, rand(Uniform(1.2, 5.8), N)) @test 1.2 <= minimum(d) <= maximum(d) <= 5.8 @test_approx_eq_eps minimum(d) 1.2 0.02 @test_approx_eq_eps maximum(d) 5.8 0.02 # Gamma x = rand(Gamma(3.9, 2.1), n0) ss = suffstats(Gamma, x) @test isa(ss, Distributions.GammaStats) @test_approx_eq ss.sx sum(x) @test_approx_eq ss.slogx sum(log(x)) @test_approx_eq ss.tw n0 ss = suffstats(Gamma, x, w) @test isa(ss, Distributions.GammaStats) @test_approx_eq ss.sx dot(x, w) @test_approx_eq ss.slogx dot(log(x), w) @test_approx_eq ss.tw sum(w) d = fit(Gamma, rand(Gamma(3.9, 2.1), N)) @test isa(d, Gamma) @test_approx_eq_eps shape(d) 3.9 0.1 @test_approx_eq_eps scale(d) 2.1 0.2 # Geometric x = rand(Geometric(0.3), n0) ss = suffstats(Geometric, x) @test isa(ss, Distributions.GeometricStats) @test_approx_eq ss.sx sum(x) @test_approx_eq ss.tw n0 ss = suffstats(Geometric, x, w) @test isa(ss, Distributions.GeometricStats) @test_approx_eq ss.sx dot(x, w) @test_approx_eq ss.tw sum(w) d = fit(Geometric, x) @test isa(d, Geometric) @test_approx_eq succprob(d) inv(1. + mean(x)) d = fit(Geometric, x, w) @test isa(d, Geometric) @test_approx_eq succprob(d) inv(1. + dot(x, w) / sum(w)) d = fit(Geometric, rand(Geometric(0.3), N)) @test isa(d, Geometric) @test_approx_eq_eps succprob(d) 0.3 0.01 # Laplace d = fit(Laplace, rand(Laplace(5.0, 3.0), N)) @test isa(d, Laplace) @test_approx_eq_eps location(d) 5.0 0.1 @test_approx_eq_eps scale(d) 3.0 0.2 # Poisson x = rand(Poisson(8.2), n0) ss = suffstats(Poisson, x) @test isa(ss, Distributions.PoissonStats) @test_approx_eq ss.sx sum(x) @test_approx_eq ss.tw n0 ss = suffstats(Poisson, x, w) @test isa(ss, Distributions.PoissonStats) @test_approx_eq ss.sx dot(x, w) @test_approx_eq ss.tw sum(w) d = fit(Poisson, x) @test isa(d, Poisson) @test_approx_eq mean(d) mean(x) d = fit(Poisson, x, w) @test isa(d, Poisson) @test_approx_eq mean(d) dot(Float64[xx for xx in x], w) / sum(w) d = fit(Poisson, rand(Poisson(8.2), N)) @test isa(d, Poisson) @test_approx_eq_eps mean(d) 8.2 0.2
[ 2, 23983, 25, 198, 2, 198, 2, 220, 532, 29964, 286, 6751, 7869, 198, 2, 220, 532, 6082, 15830, 357, 72, 13, 68, 13, 31850, 8, 198, 2, 198, 198, 3500, 46567, 507, 198, 3500, 7308, 13, 14402, 198, 198, 77, 15, 796, 1802, 198, 45, 796, 838, 61, 20, 198, 198, 86, 796, 43720, 7, 77, 15, 8, 198, 198, 2, 8444, 8374, 3118, 6933, 198, 198, 87, 796, 43720, 7, 15642, 8374, 3118, 6933, 7, 940, 11, 1315, 828, 299, 15, 8, 198, 67, 796, 4197, 7, 15642, 8374, 3118, 6933, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 8444, 8374, 3118, 6933, 8, 198, 31, 9288, 5288, 7, 67, 8, 6624, 5288, 7, 87, 8, 198, 31, 9288, 5415, 7, 67, 8, 6624, 5415, 7, 87, 8, 198, 198, 67, 796, 4197, 7, 15642, 8374, 3118, 6933, 11, 43720, 7, 15642, 8374, 3118, 6933, 7, 940, 11, 1315, 828, 399, 4008, 198, 31, 9288, 5288, 7, 67, 8, 6624, 838, 198, 31, 9288, 5415, 7, 67, 8, 6624, 1315, 628, 198, 2, 6206, 280, 15516, 198, 198, 87, 796, 43720, 7, 23927, 280, 15516, 7, 15, 13, 22, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 23927, 280, 15516, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 23927, 280, 15516, 29668, 8, 198, 31, 9288, 37786, 13, 66, 429, 15, 6624, 299, 15, 532, 954, 27305, 7, 87, 8, 198, 31, 9288, 37786, 13, 66, 429, 16, 6624, 954, 27305, 7, 87, 8, 198, 198, 824, 796, 3027, 34242, 7, 23927, 280, 15516, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 23927, 280, 15516, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 66, 429, 15, 2160, 7, 86, 58, 87, 764, 855, 657, 12962, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 66, 429, 16, 2160, 7, 86, 58, 87, 764, 855, 352, 12962, 198, 198, 67, 796, 4197, 7, 23927, 280, 15516, 11, 2124, 8, 198, 79, 796, 954, 27305, 7, 87, 8, 1220, 299, 15, 198, 31, 9288, 318, 64, 7, 67, 11, 6206, 280, 15516, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 1612, 7, 67, 8, 279, 198, 198, 67, 796, 4197, 7, 23927, 280, 15516, 11, 2124, 11, 266, 8, 198, 79, 796, 2160, 7, 86, 58, 87, 764, 855, 352, 12962, 1220, 2160, 7, 86, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 6206, 280, 15516, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 1612, 7, 67, 8, 279, 220, 198, 198, 67, 796, 4197, 7, 23927, 280, 15516, 11, 43720, 7, 23927, 280, 15516, 7, 15, 13, 22, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 6206, 280, 15516, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 1612, 7, 67, 8, 657, 13, 22, 657, 13, 486, 628, 198, 2, 17993, 198, 198, 67, 796, 4197, 7, 43303, 11, 43720, 7, 43303, 7, 16, 13, 18, 11, 513, 13, 22, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 17993, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 288, 13, 17394, 352, 13, 18, 657, 13, 16, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 288, 13, 26638, 513, 13, 22, 657, 13, 16, 628, 198, 2, 20828, 49070, 198, 198, 87, 796, 43720, 7, 33, 259, 49070, 7, 3064, 11, 657, 13, 18, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 33, 259, 49070, 11, 357, 3064, 11, 2124, 4008, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 33, 259, 49070, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 5907, 2160, 7, 87, 8, 198, 31, 9288, 37786, 13, 710, 6624, 299, 15, 198, 31, 9288, 37786, 13, 77, 6624, 1802, 198, 198, 824, 796, 3027, 34242, 7, 33, 259, 49070, 11, 357, 3064, 11, 2124, 828, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 33, 259, 49070, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 5907, 16605, 7, 43879, 2414, 58, 5324, 329, 31383, 287, 2124, 4357, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 710, 2160, 7, 86, 8, 198, 31, 9288, 37786, 13, 77, 6624, 1802, 198, 198, 67, 796, 4197, 7, 33, 259, 49070, 11, 357, 3064, 11, 2124, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 20828, 49070, 8, 198, 31, 9288, 299, 28461, 874, 7, 67, 8, 6624, 1802, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 17458, 1676, 65, 7, 67, 8, 2160, 7, 87, 8, 1220, 357, 77, 15, 1635, 1802, 8, 198, 198, 67, 796, 4197, 7, 33, 259, 49070, 11, 357, 3064, 11, 2124, 828, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 20828, 49070, 8, 198, 31, 9288, 299, 28461, 874, 7, 67, 8, 6624, 1802, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 17458, 1676, 65, 7, 67, 8, 16605, 7, 87, 11, 266, 8, 1220, 357, 16345, 7, 86, 8, 1635, 1802, 8, 198, 198, 67, 796, 4197, 7, 33, 259, 49070, 11, 1802, 11, 43720, 7, 33, 259, 49070, 7, 3064, 11, 657, 13, 18, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 20828, 49070, 8, 198, 31, 9288, 299, 28461, 874, 7, 67, 8, 6624, 1802, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 17458, 1676, 65, 7, 67, 8, 657, 13, 18, 657, 13, 486, 628, 198, 2, 327, 2397, 12409, 198, 198, 79, 796, 685, 15, 13, 17, 11, 657, 13, 20, 11, 657, 13, 18, 60, 198, 87, 796, 43720, 7, 34, 2397, 12409, 7, 79, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 34, 2397, 12409, 11, 357, 18, 11, 2124, 4008, 198, 71, 796, 48436, 2414, 58, 9127, 27305, 7, 87, 764, 855, 1312, 8, 329, 1312, 796, 352, 1058, 513, 60, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 34, 2397, 12409, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 71, 289, 198, 198, 67, 796, 4197, 7, 34, 2397, 12409, 11, 357, 18, 11, 2124, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 327, 2397, 12409, 8, 198, 31, 9288, 288, 13, 42, 6624, 513, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 386, 1443, 7, 67, 8, 289, 1220, 2160, 7, 71, 8, 198, 198, 67, 17, 796, 4197, 7, 34, 2397, 12409, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 17, 11, 327, 2397, 12409, 8, 198, 31, 9288, 386, 1443, 7, 67, 17, 8, 6624, 386, 1443, 7, 67, 8, 198, 198, 824, 796, 3027, 34242, 7, 34, 2397, 12409, 11, 357, 18, 11, 2124, 828, 266, 8, 198, 71, 796, 48436, 2414, 58, 16345, 7, 86, 58, 87, 764, 855, 1312, 12962, 329, 1312, 796, 352, 1058, 513, 60, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 34, 2397, 12409, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 71, 289, 198, 198, 67, 796, 4197, 7, 34, 2397, 12409, 11, 357, 18, 11, 2124, 828, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 327, 2397, 12409, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 386, 1443, 7, 67, 8, 289, 1220, 2160, 7, 71, 8, 198, 198, 67, 796, 4197, 7, 34, 2397, 12409, 11, 3027, 34242, 7, 34, 2397, 12409, 11, 513, 11, 2124, 11, 266, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 327, 2397, 12409, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 386, 1443, 7, 67, 8, 357, 71, 1220, 2160, 7, 71, 4008, 198, 198, 67, 796, 4197, 7, 34, 2397, 12409, 11, 43720, 7, 34, 2397, 12409, 7, 79, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 327, 2397, 12409, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 386, 1443, 7, 67, 8, 279, 657, 13, 486, 628, 198, 2, 5518, 35470, 198, 198, 87, 796, 43720, 7, 16870, 35470, 7, 15, 13, 20, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 16870, 35470, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 16870, 35470, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 2160, 7, 87, 8, 198, 31, 9288, 37786, 13, 2032, 6624, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 16870, 35470, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 16870, 35470, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 37786, 13, 2032, 6624, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 16870, 35470, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 5518, 35470, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 5046, 7, 67, 8, 1612, 7, 87, 8, 198, 198, 67, 796, 4197, 7, 16870, 35470, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 5518, 35470, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 5046, 7, 67, 8, 16605, 7, 87, 11, 266, 8, 1220, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 16870, 35470, 11, 43720, 7, 16870, 35470, 7, 15, 13, 20, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 5518, 35470, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5046, 7, 67, 8, 657, 13, 20, 657, 13, 486, 628, 198, 2, 14435, 198, 198, 34703, 796, 1367, 13, 18, 198, 38392, 796, 513, 13, 17, 198, 198, 87, 796, 43720, 7, 26447, 7, 34703, 11, 18074, 225, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 26447, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 2160, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 76, 1612, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 17, 2160, 19510, 87, 764, 12, 37786, 13, 76, 737, 61, 17, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 26447, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 76, 16605, 7, 87, 11, 266, 8, 1220, 2160, 7, 86, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 17, 16605, 19510, 87, 764, 12, 37786, 13, 76, 737, 61, 17, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 26447, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 34703, 1612, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 38392, 19862, 17034, 7, 32604, 19510, 87, 764, 12, 288, 13, 34703, 737, 61, 17, 4008, 198, 198, 67, 796, 4197, 7, 26447, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 34703, 16605, 7, 87, 11, 266, 8, 1220, 2160, 7, 86, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 38392, 19862, 17034, 7, 26518, 19510, 87, 764, 12, 288, 13, 34703, 737, 61, 17, 11, 266, 8, 1220, 2160, 7, 86, 4008, 198, 198, 67, 796, 4197, 7, 26447, 11, 43720, 7, 26447, 7, 34703, 11, 18074, 225, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 288, 13, 34703, 18919, 657, 13, 16, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 288, 13, 38392, 18074, 225, 657, 13, 16, 198, 198, 11748, 46567, 507, 13, 26447, 29870, 33239, 11, 46567, 507, 13, 26447, 29870, 50, 13495, 198, 198, 824, 796, 3027, 34242, 7, 26447, 29870, 33239, 7, 34703, 828, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29870, 33239, 29668, 8, 198, 31, 9288, 37786, 13, 34703, 6624, 18919, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 17, 2160, 19510, 87, 764, 12, 18919, 737, 61, 17, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 26447, 29870, 33239, 7, 34703, 828, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29870, 33239, 29668, 8, 198, 31, 9288, 37786, 13, 34703, 6624, 18919, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 17, 16605, 19510, 87, 764, 12, 18919, 737, 61, 17, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 62, 76, 293, 7, 26447, 11, 2124, 26, 38779, 28, 34703, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 288, 13, 34703, 6624, 18919, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 38392, 19862, 17034, 7, 32604, 19510, 87, 764, 12, 288, 13, 34703, 737, 61, 17, 4008, 198, 198, 67, 796, 4197, 62, 76, 293, 7, 26447, 11, 2124, 11, 266, 26, 38779, 28, 34703, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 288, 13, 34703, 6624, 18919, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 38392, 19862, 17034, 7, 26518, 19510, 87, 764, 12, 288, 13, 34703, 737, 61, 17, 11, 266, 8, 1220, 2160, 7, 86, 4008, 628, 198, 824, 796, 3027, 34242, 7, 26447, 29870, 50, 13495, 7, 38392, 828, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29870, 50, 13495, 29668, 8, 198, 31, 9288, 37786, 13, 38392, 6624, 18074, 225, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 2160, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 26447, 29870, 50, 13495, 7, 38392, 828, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 26447, 29870, 50, 13495, 29668, 8, 198, 31, 9288, 37786, 13, 38392, 6624, 18074, 225, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 62, 76, 293, 7, 26447, 11, 2124, 26, 264, 13495, 28, 38392, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 288, 13, 38392, 6624, 18074, 225, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 34703, 1612, 7, 87, 8, 198, 198, 67, 796, 4197, 62, 76, 293, 7, 26447, 11, 2124, 11, 266, 26, 264, 13495, 28, 38392, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 14435, 8, 198, 31, 9288, 288, 13, 38392, 6624, 18074, 225, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 288, 13, 34703, 16605, 7, 87, 11, 266, 8, 1220, 2160, 7, 86, 8, 628, 198, 2, 35712, 198, 198, 87, 796, 43720, 7, 3118, 6933, 7, 16, 13, 17, 11, 642, 13, 23, 828, 299, 15, 8, 198, 67, 796, 4197, 7, 3118, 6933, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 35712, 8, 198, 31, 9288, 352, 13, 17, 19841, 5288, 7, 67, 8, 19841, 5415, 7, 67, 8, 19841, 642, 13, 23, 198, 31, 9288, 5288, 7, 67, 8, 6624, 5288, 7, 87, 8, 198, 31, 9288, 5415, 7, 67, 8, 6624, 5415, 7, 87, 8, 198, 198, 67, 796, 4197, 7, 3118, 6933, 11, 43720, 7, 3118, 6933, 7, 16, 13, 17, 11, 642, 13, 23, 828, 399, 4008, 198, 31, 9288, 352, 13, 17, 19841, 5288, 7, 67, 8, 19841, 5415, 7, 67, 8, 19841, 642, 13, 23, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5288, 7, 67, 8, 352, 13, 17, 657, 13, 2999, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5415, 7, 67, 8, 642, 13, 23, 657, 13, 2999, 628, 198, 2, 43595, 198, 198, 87, 796, 43720, 7, 34777, 2611, 7, 18, 13, 24, 11, 362, 13, 16, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 34777, 2611, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 34777, 2611, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 2160, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 6404, 87, 2160, 7, 6404, 7, 87, 4008, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 34777, 2611, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 34777, 2611, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 6404, 87, 16605, 7, 6404, 7, 87, 828, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 34777, 2611, 11, 43720, 7, 34777, 2611, 7, 18, 13, 24, 11, 362, 13, 16, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 43595, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5485, 7, 67, 8, 513, 13, 24, 657, 13, 16, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5046, 7, 67, 8, 362, 13, 16, 657, 13, 17, 628, 198, 2, 2269, 16996, 198, 198, 87, 796, 43720, 7, 10082, 16996, 7, 15, 13, 18, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 10082, 16996, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 10082, 16996, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 2160, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 10082, 16996, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 10082, 16996, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 10082, 16996, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 2269, 16996, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 17458, 1676, 65, 7, 67, 8, 800, 7, 16, 13, 1343, 1612, 7, 87, 4008, 198, 198, 67, 796, 4197, 7, 10082, 16996, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 2269, 16996, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 17458, 1676, 65, 7, 67, 8, 800, 7, 16, 13, 1343, 16605, 7, 87, 11, 266, 8, 1220, 2160, 7, 86, 4008, 198, 198, 67, 796, 4197, 7, 10082, 16996, 11, 43720, 7, 10082, 16996, 7, 15, 13, 18, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 2269, 16996, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 17458, 1676, 65, 7, 67, 8, 657, 13, 18, 657, 13, 486, 628, 198, 2, 4689, 5372, 198, 198, 67, 796, 4197, 7, 14772, 5372, 11, 43720, 7, 14772, 5372, 7, 20, 13, 15, 11, 513, 13, 15, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 4689, 5372, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 4067, 7, 67, 8, 642, 13, 15, 657, 13, 16, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 5046, 7, 67, 8, 513, 13, 15, 657, 13, 17, 628, 198, 2, 7695, 30927, 198, 198, 87, 796, 43720, 7, 18833, 30927, 7, 23, 13, 17, 828, 299, 15, 8, 198, 198, 824, 796, 3027, 34242, 7, 18833, 30927, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 18833, 30927, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 2160, 7, 87, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 299, 15, 198, 198, 824, 796, 3027, 34242, 7, 18833, 30927, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 824, 11, 46567, 507, 13, 18833, 30927, 29668, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 82, 87, 16605, 7, 87, 11, 266, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 37786, 13, 4246, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 18833, 30927, 11, 2124, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 7695, 30927, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 1612, 7, 67, 8, 1612, 7, 87, 8, 198, 198, 67, 796, 4197, 7, 18833, 30927, 11, 2124, 11, 266, 8, 198, 31, 9288, 318, 64, 7, 67, 11, 7695, 30927, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 1612, 7, 67, 8, 16605, 7, 43879, 2414, 58, 5324, 329, 31383, 287, 2124, 4357, 266, 8, 1220, 2160, 7, 86, 8, 198, 198, 67, 796, 4197, 7, 18833, 30927, 11, 43720, 7, 18833, 30927, 7, 23, 13, 17, 828, 399, 4008, 198, 31, 9288, 318, 64, 7, 67, 11, 7695, 30927, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 1612, 7, 67, 8, 807, 13, 17, 657, 13, 17, 628 ]
2.092162
3,700
using DiffEqFlux, Flux using LinearAlgebra, Distributions using Optim, GalacticOptim using Test function run_test(f, layer, atol) data_train_vals = [rand(length(layer.model)) for k in 1:500] data_train_fn = f.(data_train_vals) function loss_function(component) data_pred = [layer(x,component) for x in data_train_vals] loss = sum(norm.(data_pred.-data_train_fn))/length(data_train_fn) return loss end function cb(p,l) @show l return false end optfunc = GalacticOptim.OptimizationFunction((x, p) -> loss_function(x), GalacticOptim.AutoZygote()) optprob = GalacticOptim.OptimizationProblem(optfunc, layer.p) res = GalacticOptim.solve(optprob, ADAM(0.1), cb=cb, maxiters = 100) optprob = GalacticOptim.OptimizationProblem(optfunc, res.minimizer) res = GalacticOptim.solve(optprob, ADAM(0.01), cb=cb, maxiters = 100) optprob = GalacticOptim.OptimizationProblem(optfunc, res.minimizer) res = GalacticOptim.solve(optprob, BFGS(), cb=cb, maxiters = 200) opt = res.minimizer data_validate_vals = [rand(length(layer.model)) for k in 1:100] data_validate_fn = f.(data_validate_vals) data_validate_pred = [layer(x,opt) for x in data_validate_vals] return sum(norm.(data_validate_pred.-data_validate_fn))/length(data_validate_fn) < atol end ##test 01: affine function, Chebyshev and Polynomial basis A = rand(2,2) b = rand(2) f = x -> A*x + b layer = TensorLayer([ChebyshevBasis(10), PolynomialBasis(10)], 2) @test run_test(f, layer, 0.05) ##test 02: non-linear function, Chebyshev and Legendre basis A = rand(2,2) b = rand(2) f = x -> A*x*norm(x)+ b*sin(norm(x)) layer = TensorLayer([ChebyshevBasis(7), FourierBasis(7)], 2) @test run_test(f, layer, 0.10)
[ 3500, 10631, 36, 80, 37, 22564, 11, 1610, 2821, 198, 3500, 44800, 2348, 29230, 11, 46567, 507, 198, 3500, 30011, 11, 23509, 27871, 320, 198, 3500, 6208, 198, 198, 8818, 1057, 62, 9288, 7, 69, 11, 7679, 11, 379, 349, 8, 628, 220, 220, 220, 1366, 62, 27432, 62, 12786, 796, 685, 25192, 7, 13664, 7, 29289, 13, 19849, 4008, 329, 479, 287, 352, 25, 4059, 60, 198, 220, 220, 220, 1366, 62, 27432, 62, 22184, 796, 277, 12195, 7890, 62, 27432, 62, 12786, 8, 628, 220, 220, 220, 2163, 2994, 62, 8818, 7, 42895, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 28764, 796, 685, 29289, 7, 87, 11, 42895, 8, 329, 2124, 287, 1366, 62, 27432, 62, 12786, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2994, 796, 2160, 7, 27237, 12195, 7890, 62, 28764, 7874, 7890, 62, 27432, 62, 22184, 4008, 14, 13664, 7, 7890, 62, 27432, 62, 22184, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2994, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2163, 269, 65, 7, 79, 11, 75, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 12860, 300, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2172, 20786, 796, 23509, 27871, 320, 13, 27871, 320, 1634, 22203, 19510, 87, 11, 279, 8, 4613, 2994, 62, 8818, 7, 87, 828, 23509, 27871, 320, 13, 27722, 57, 35641, 1258, 28955, 198, 220, 220, 220, 2172, 1676, 65, 796, 23509, 27871, 320, 13, 27871, 320, 1634, 40781, 7, 8738, 20786, 11, 7679, 13, 79, 8, 198, 220, 220, 220, 581, 796, 23509, 27871, 320, 13, 82, 6442, 7, 8738, 1676, 65, 11, 5984, 2390, 7, 15, 13, 16, 828, 269, 65, 28, 21101, 11, 3509, 270, 364, 796, 1802, 8, 198, 220, 220, 220, 2172, 1676, 65, 796, 23509, 27871, 320, 13, 27871, 320, 1634, 40781, 7, 8738, 20786, 11, 581, 13, 1084, 320, 7509, 8, 198, 220, 220, 220, 581, 796, 23509, 27871, 320, 13, 82, 6442, 7, 8738, 1676, 65, 11, 5984, 2390, 7, 15, 13, 486, 828, 269, 65, 28, 21101, 11, 3509, 270, 364, 796, 1802, 8, 198, 220, 220, 220, 2172, 1676, 65, 796, 23509, 27871, 320, 13, 27871, 320, 1634, 40781, 7, 8738, 20786, 11, 581, 13, 1084, 320, 7509, 8, 198, 220, 220, 220, 581, 796, 23509, 27871, 320, 13, 82, 6442, 7, 8738, 1676, 65, 11, 41646, 14313, 22784, 269, 65, 28, 21101, 11, 3509, 270, 364, 796, 939, 8, 198, 220, 220, 220, 2172, 796, 581, 13, 1084, 320, 7509, 628, 220, 220, 220, 1366, 62, 12102, 378, 62, 12786, 796, 685, 25192, 7, 13664, 7, 29289, 13, 19849, 4008, 329, 479, 287, 352, 25, 3064, 60, 198, 220, 220, 220, 1366, 62, 12102, 378, 62, 22184, 796, 277, 12195, 7890, 62, 12102, 378, 62, 12786, 8, 628, 220, 220, 220, 1366, 62, 12102, 378, 62, 28764, 796, 685, 29289, 7, 87, 11, 8738, 8, 329, 2124, 287, 1366, 62, 12102, 378, 62, 12786, 60, 628, 220, 220, 220, 1441, 2160, 7, 27237, 12195, 7890, 62, 12102, 378, 62, 28764, 7874, 7890, 62, 12102, 378, 62, 22184, 4008, 14, 13664, 7, 7890, 62, 12102, 378, 62, 22184, 8, 1279, 379, 349, 198, 437, 198, 198, 2235, 9288, 5534, 25, 1527, 500, 2163, 11, 2580, 48209, 258, 85, 290, 12280, 26601, 498, 4308, 198, 32, 796, 43720, 7, 17, 11, 17, 8, 198, 65, 796, 43720, 7, 17, 8, 198, 69, 796, 2124, 4613, 317, 9, 87, 1343, 275, 198, 29289, 796, 309, 22854, 49925, 26933, 7376, 48209, 258, 85, 15522, 271, 7, 940, 828, 12280, 26601, 498, 15522, 271, 7, 940, 8, 4357, 362, 8, 198, 31, 9288, 1057, 62, 9288, 7, 69, 11, 7679, 11, 657, 13, 2713, 8, 198, 198, 2235, 9288, 7816, 25, 1729, 12, 29127, 2163, 11, 2580, 48209, 258, 85, 290, 9883, 260, 4308, 198, 32, 796, 43720, 7, 17, 11, 17, 8, 198, 65, 796, 43720, 7, 17, 8, 198, 69, 796, 2124, 4613, 317, 9, 87, 9, 27237, 7, 87, 47762, 275, 9, 31369, 7, 27237, 7, 87, 4008, 198, 29289, 796, 309, 22854, 49925, 26933, 7376, 48209, 258, 85, 15522, 271, 7, 22, 828, 34296, 5277, 15522, 271, 7, 22, 8, 4357, 362, 8, 198, 31, 9288, 1057, 62, 9288, 7, 69, 11, 7679, 11, 657, 13, 940, 8, 198 ]
2.412568
732
# # This is the benefit/tax credit/IT/MinWage/NI rates from April 2021 # sys.it.savings_rates = [0.0, 20.0, 40.0, 45.0] sys.it.savings_thresholds = [5_000.0, 37_700.0, 150_000.0] sys.it.savings_basic_rate = 2 # above this counts as higher rate sys.it.non_savings_rates = [19.0,20.0,21.0,41.0,46.0] sys.it.non_savings_thresholds = [2_097, 12_726, 31_092, 150_000.0] sys.it.non_savings_basic_rate = 2 # above this counts as higher rate sys.it.dividend_rates = [0.0, 7.5,32.5,38.1] sys.it.dividend_thresholds = [2_000.0, 37_700.0, 150_000.0] sys.it.dividend_basic_rate = 2 # above this counts as higher rate sys.it.personal_allowance = 12_570.00 sys.it.personal_allowance_income_limit = 100_000.00 sys.it.personal_allowance_withdrawal_rate = 50.0 sys.it.blind_persons_allowance = 2_520.00 sys.it.married_couples_allowance = 9_125.00 sys.it.mca_minimum = 3_530.00 sys.it.mca_income_maximum = 29_600.00 sys.it.mca_credit_rate = 10.0 sys.it.mca_withdrawal_rate = 50.0 sys.it.marriage_allowance = 1_260.00 sys.it.personal_savings_allowance = 1_000.00 # FIXME better to have it straight from # the book with charges per CO2 range # and the data being an estimate of CO2 per type merge( sys.it.company_car_charge_by_CO2_emissions, Dict([ Missing_Fuel_Type=>0.1, No_Fuel=>0.1, Other=>0.1, Dont_know=>0.1, Petrol=>0.25, Diesel=>0.37, Hybrid_use_a_combination_of_petrol_and_electricity=>0.16, Electric=>0.02, LPG=>0.02, Biofuel_eg_E85_fuel=>0.02 ])) sys.it.fuel_imputation = 24_500.00 # 20/21 # # pensions # sys.it.pension_contrib_basic_amount = 3_600.00 sys.it.pension_contrib_annual_allowance = 40_000.00 sys.it.pension_contrib_annual_minimum = 4_000.00 sys.it.pension_contrib_threshold_income = 240_000.00 sys.it.pension_contrib_withdrawal_rate = 50.0 # sys.it.non_savings_income = NON_SAVINGS_INCOME # sys.it.all_taxable = ALL_TAXABLE_INCOME # sys.it.savings_income = SAVINGS_INCOME # sys.it.dividend_income = DIVIDEND_INCOME # sys.it.mca_date = MCA_DATE sys.ni.abolished = false sys.ni.primary_class_1_rates = [0.0, 0.0, 12.0, 2.0 ] sys.ni.primary_class_1_bands = [120.0, 184.0, 967.0, 9999999999999.9] # the '-1' here is because json can't write inf sys.ni.secondary_class_1_rates = [0.0, 13.8, 13.8 ] # keep 2 so sys.ni.secondary_class_1_bands = [170.0, 967.0, 99999999999999.9 ] sys.ni.state_pension_age = 66; # fixme move sys.ni.class_2_threshold = 6_515.0; sys.ni.class_2_rate = 3.05; sys.ni.class_4_rates = [0.0, 9.0, 2.0 ] sys.ni.class_4_bands = [9_569.0, 50_270.0, 99999999999999.9 ] # sys.ni.class_1_income = IncludedItems([WAGES],[PENSION_CONTRIBUTIONS_EMPLOYER]) # sys.ni.class_4_income = [SELF_EMPLOYMENT_INCOME] # sys.uc. sys.lmt.isa_jsa_esa_abolished = false sys.lmt.pen_credit_abolished = false ## FIXME we can't turn off pension credit individually here.. sys.lmt.premia.family = 17.65 sys.lmt.premia.family_lone_parent = 22.20 sys.lmt.premia.carer_single = 37.70 sys.lmt.premia.carer_couple = 2*37.70 sys.lmt.premia.disabled_child = 65.94 sys.lmt.premia.disability_single = 35.10 sys.lmt.premia.disability_couple = 50.05 sys.lmt.premia.enhanced_disability_child = 26.67 sys.lmt.premia.enhanced_disability_single = 17.20 sys.lmt.premia.enhanced_disability_couple = 24.60 sys.lmt.premia.severe_disability_single = 67.30 sys.lmt.premia.severe_disability_couple = 134.60 sys.lmt.premia.pensioner_is = 152.90 sys.lmt.allowances.age_18_24 = 59.20 sys.lmt.allowances.age_25_and_over = 74.70 sys.lmt.allowances.age_18_and_in_work_activity = 74.70 sys.lmt.allowances.over_pension_age = 191.15 # sys.lmt.allowances.lone_parent = 74.70 sys.lmt.allowances.lone_parent_over_pension_age = 191.15 sys.lmt.allowances.couple_both_under_18 = 59.20 sys.lmt.allowances.couple_both_over_18 = 117.40 sys.lmt.allowances.couple_over_pension_age = 286.05 sys.lmt.allowances.couple_one_over_18_high = 117.40 sys.lmt.allowances.couple_one_over_18_med = 74.70 sys.lmt.allowances.pa_couple_one_over_18_low = 59.20 sys.lmt.allowances.child = 68.60 sys.lmt.allowances.pc_mig_single = 177.10 sys.lmt.allowances.pc_mig_couple = 270.30 sys.lmt.allowances.pc_child = 54.60 # sys.lmt.income_rules. sys.lmt.income_rules.permitted_work =143.00 sys.lmt.income_rules.lone_parent_hb = 25.0 sys.lmt.income_rules.high = 20.0 sys.lmt.income_rules.low_couple = 10.0 sys.lmt.income_rules.low_single = 5.0 sys.lmt.income_rules.hb_additional = 17.10 sys.lmt.income_rules.childcare_max_1 = 175.0 sys.lmt.income_rules.childcare_max_2 = 300.0 sys.lmt.income_rules.incomes = LEGACY_MT_INCOME sys.lmt.income_rules.hb_incomes = LEGACY_HB_INCOME sys.lmt.income_rules.pc_incomes = LEGACY_PC_INCOME sys.lmt.income_rules.sc_incomes = LEGACY_SAVINGS_CREDIT_INCOME sys.lmt.income_rules.capital_min = 6_000.0 sys.lmt.income_rules.capital_max = 16_000.0 sys.lmt.income_rules.pc_capital_min = 10_000.0 sys.lmt.income_rules.pc_capital_max = 99999999999999.9 sys.lmt.income_rules.pensioner_capital_min = 10_000.0 sys.lmt.income_rules.pensioner_capital_max = 16_000.0 sys.lmt.income_rules.capital_tariff = 250 sys.lmt.income_rules.pensioner_tariff = 500 # FIXME why do we need a seperate copy of HoursLimits here? sys.lmt.hours_limits.lower = 16 sys.lmt.hours_limits.med = 24 sys.lmt.hours_limits.higher = 30 sys.lmt.savings_credit.abolished = false sys.lmt.savings_credit.withdrawal_rate = 60.0 sys.lmt.savings_credit.threshold_single = 153.70 sys.lmt.savings_credit.threshold_couple =244.12 sys.lmt.savings_credit.max_single = 14.04 sys.lmt.savings_credit.max_couple = 15.71 sys.lmt.savings_credit.available_till = Date( 2016, 04, 06 ) sys.lmt.child_tax_credit.abolished = false sys.lmt.child_tax_credit.family = 545.0 sys.lmt.child_tax_credit.child = 2_845.0 sys.lmt.child_tax_credit.disability = 3_435 sys.lmt.child_tax_credit.severe_disability = 4825 sys.lmt.child_tax_credit.threshold = 16_480.0 sys.lmt.working_tax_credit.basic = 2_005+1_045 # CAREFUL!! assuming 20 uplift still in place sys.lmt.working_tax_credit.lone_parent = 2_060 sys.lmt.working_tax_credit.couple = 2_060 sys.lmt.working_tax_credit.hours_ge_30 = 830 sys.lmt.working_tax_credit.disability = 3_240 sys.lmt.working_tax_credit.severe_disability = 1_400 sys.lmt.working_tax_credit.age_50_plus = 1_365.00 sys.lmt.working_tax_credit.age_50_plus_30_hrs = 2_030.00 sys.lmt.working_tax_credit.childcare_max_2_plus_children = 300.0 # pw sys.lmt.working_tax_credit.childcare_max_1_child = 175.0 sys.lmt.working_tax_credit.childcare_proportion = 70.0 sys.lmt.working_tax_credit.taper = 41.0 sys.lmt.working_tax_credit.threshold = 6_565.0 sys.lmt.working_tax_credit.non_earnings_minima = 300.0 # FIXME check sys.lmt.hb.taper = 65.0 sys.lmt.hb.ndd_deductions = [15.95,36.65,50.30,82.30,93.70,102.85] sys.lmt.hb.ndd_incomes = [149.0,217.0,283.0,377.0,469.0,99999999999999.9] sys.lmt.ctr.taper = 20.0 sys.lmt.ctr.ndd_deductions = [] sys.lmt.ctr.ndd_incomes = [] sys.uc.abolished = false sys.uc.threshold = 2_500.0 ## NOT USED sys.uc.age_18_24 = 344.00 sys.uc.age_25_and_over = 411.51 sys.uc.couple_both_under_25 = 490.60 sys.uc.couple_oldest_25_plus = 596.58 sys.uc.first_child = 282.50 sys.uc.subsequent_child = 237.08 sys.uc.disabled_child_lower = 128.89 sys.uc.disabled_child_higher = 402.41 sys.uc.limited_capcacity_for_work_activity = 343.63 sys.uc.carer = 163.73 sys.uc.ndd = 75.53 sys.uc.childcare_max_2_plus_children = 1_108.04 # pm sys.uc.childcare_max_1_child = 646.35 sys.uc.childcare_proportion = 85.0 # pct sys.uc.minimum_income_floor_hours = 35*WEEKS_PER_MONTH sys.uc.work_allowance_w_housing = 293.0 sys.uc.work_allowance_no_housing = 515.0 sys.uc.other_income = UC_OTHER_INCOME # sys.uc.earned_income :: IncludedItems = UC_EARNED_INCOME sys.uc.capital_min = 6_000.0 sys.uc.capital_max = 16_000.0 # £1 *per week* ≆ 4.35 pm FIXME make 4.35 WEEKS_PER_MONTH? sys.uc.capital_tariff = 250.0/4.35 sys.uc.taper = 63.0 sys.uc.ctr_taper = 20.0 sys.age_limits.state_pension_ages = pension_ages() sys.age_limits.savings_credit_to_new_state_pension = Date( 2016, 04, 06 ) sys.hours_limits.lower = 16 sys.hours_limits.med = 24 sys.hours_limits.higher = 30 sys.child_limits.max_children = 2 # THESE ARE TILL APRIL 2022 sys.minwage.ages = [16,18,21,23] sys.minwage.wage_per_hour = [4.62, 6.56, 8.36, 8.91] sys.minwage.apprentice_rate = 4.30 sys.hr.maximum_rooms = 4 sys.hr.rooms_rent_reduction = [14.0,25.0] sys.hr.single_room_age = 35 # # These are unchanged in 3 years; see: # https://www.gov.scot/publications/local-housing-allowance-rates-2021-2022/ # sys.hr.brmas = loadBRMAs( 4, T, DEFAULT_BRMA_2021 ) sys.nmt_bens.attendance_allowance.abolished = false sys.nmt_bens.attendance_allowance.higher = 89.60 sys.nmt_bens.attendance_allowance.lower = 60.00 sys.nmt_bens.child_benefit.abolished = false sys.nmt_bens.child_benefit.first_child = 21.15 sys.nmt_bens.child_benefit.other_children = 14.00 sys.nmt_bens.child_benefit.high_income_thresh = 50_000.0 sys.nmt_bens.child_benefit.withdrawal = 1/100 sys.nmt_bens.child_benefit.guardians_allowance = 18.00 sys.nmt_bens.dla.abolished = false sys.nmt_bens.dla.care_high = 89.60 sys.nmt_bens.dla.care_middle = 60.00 sys.nmt_bens.dla.care_low = 23.70 sys.nmt_bens.dla.mob_high = 62.55 sys.nmt_bens.dla.mob_low = 23.70 sys.nmt_bens.carers.abolished = false sys.nmt_bens.carers.allowance = 67.60 sys.nmt_bens.carers.scottish_supplement = 231.40 # FROM APRIL 2021 sys.nmt_bens.carers.hours :: Int = 35 sys.nmt_bens.carers.gainful_employment_min = 128.00 sys.nmt_bens.pip.abolished = false sys.nmt_bens.pip.dl_standard = 60.0 sys.nmt_bens.pip.dl_enhanced = 89.60 sys.nmt_bens.pip.mobility_standard = 23.70 sys.nmt_bens.pip.mobility_enhanced = 62.55 sys.nmt_bens.esa.abolished = false sys.nmt_bens.esa.assessment_u25 = 59.20 sys.nmt_bens.esa.assessment_25p = 74.70 sys.nmt_bens.esa.main = 74.70 sys.nmt_bens.esa.work = 29.70 sys.nmt_bens.esa.support = 39.40 sys.nmt_bens.jsa.abolished = false sys.nmt_bens.jsa.u25 = 59.20 sys.nmt_bens.jsa.o24 = 74.70 sys.nmt_bens.pensions.abolished = false sys.nmt_bens.pensions.new_state_pension = 179.60 # pension_start_date = Date( 2016, 04, 06 ) sys.nmt_bens.pensions.cat_a = 137.60 sys.nmt_bens.pensions.cat_b = 137.60 sys.nmt_bens.pensions.cat_b_survivor = 82.45 sys.nmt_bens.pensions.cat_d = 82.45 sys.nmt_bens.bereavement.abolished = false # higher effectively just means 'with children'; sys.nmt_bens.bereavement.lump_sum_higher = 3_500 sys.nmt_bens.bereavement.lump_sum_lower = 2_500 sys.nmt_bens.bereavement.higher = 350 sys.nmt_bens.bereavement.lower = 100 sys.nmt_bens.widows_pension.abolished = false sys.nmt_bens.widows_pension.industrial_higher = 137.60 sys.nmt_bens.widows_pension.industrial_lower = 41.28 sys.nmt_bens.widows_pension.standard_rate = 122.55 sys.nmt_bens.widows_pension.parent = 122.55 sys.nmt_bens.widows_pension.ages = collect(54:-1:45) sys.nmt_bens.widows_pension.age_amounts = [113.97,105.39,96.81,88.24,79.66,71.08,62.50,53.92,45.34,36.77] # # young carer grant sys.nmt_bens.maternity.abolished = false sys.nmt_bens.maternity.rate = 151.97 sys.nmt_bens.smp = 151.97 ## 90% of earn cpag 21/2 812 # = XX sys.bencap.abolished = false sys.bencap.outside_london_single = 257.69 sys.bencap.outside_london_couple = 384.62 # not really needed, but anyway .. sys.bencap.inside_london_single = 296.35 sys.bencap.inside_london_couple = 442.31 sys.bencap.uc_incomes_limit = 617 sys.scottish_child_payment.amount = 10.0 sys.scottish_child_payment.maximum_age = 5 sys.ubi.abolished = true sys.ubi.adult_amount = 4_800.0 sys.ubi.child_amount= 3_000.0 sys.ubi.universal_pension = 8_780.0 sys.ubi.adult_age = 17 sys.ubi.retirement_age = 66
[ 2, 198, 2, 770, 318, 262, 4414, 14, 19290, 3884, 14, 2043, 14, 9452, 54, 496, 14, 22125, 3965, 422, 3035, 33448, 198, 2, 198, 17597, 13, 270, 13, 39308, 654, 62, 9700, 220, 220, 796, 220, 685, 15, 13, 15, 11, 1160, 13, 15, 11, 2319, 13, 15, 11, 4153, 13, 15, 60, 198, 17597, 13, 270, 13, 39308, 654, 62, 400, 10126, 82, 220, 220, 796, 220, 685, 20, 62, 830, 13, 15, 11, 5214, 62, 9879, 13, 15, 11, 6640, 62, 830, 13, 15, 60, 198, 17597, 13, 270, 13, 39308, 654, 62, 35487, 62, 4873, 796, 362, 1303, 2029, 428, 9853, 355, 2440, 2494, 198, 198, 17597, 13, 270, 13, 13159, 62, 39308, 654, 62, 9700, 220, 796, 220, 685, 1129, 13, 15, 11, 1238, 13, 15, 11, 2481, 13, 15, 11, 3901, 13, 15, 11, 3510, 13, 15, 60, 198, 17597, 13, 270, 13, 13159, 62, 39308, 654, 62, 400, 10126, 82, 220, 796, 220, 685, 17, 62, 2931, 22, 11, 1105, 62, 22, 2075, 11, 3261, 62, 2931, 17, 11, 6640, 62, 830, 13, 15, 60, 198, 17597, 13, 270, 13, 13159, 62, 39308, 654, 62, 35487, 62, 4873, 796, 362, 1303, 2029, 428, 9853, 355, 2440, 2494, 198, 198, 17597, 13, 270, 13, 67, 1699, 437, 62, 9700, 220, 796, 220, 685, 15, 13, 15, 11, 767, 13, 20, 11, 2624, 13, 20, 11, 2548, 13, 16, 60, 198, 17597, 13, 270, 13, 67, 1699, 437, 62, 400, 10126, 82, 220, 796, 220, 685, 17, 62, 830, 13, 15, 11, 5214, 62, 9879, 13, 15, 11, 6640, 62, 830, 13, 15, 60, 198, 17597, 13, 270, 13, 67, 1699, 437, 62, 35487, 62, 4873, 796, 362, 1303, 2029, 428, 9853, 355, 2440, 2494, 198, 198, 17597, 13, 270, 13, 22682, 62, 12154, 590, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1105, 62, 39254, 13, 405, 198, 17597, 13, 270, 13, 22682, 62, 12154, 590, 62, 12519, 62, 32374, 796, 1802, 62, 830, 13, 405, 198, 17597, 13, 270, 13, 22682, 62, 12154, 590, 62, 4480, 19334, 282, 62, 4873, 796, 2026, 13, 15, 198, 17597, 13, 270, 13, 27461, 62, 19276, 684, 62, 12154, 590, 220, 220, 220, 220, 796, 362, 62, 31211, 13, 405, 198, 198, 17597, 13, 270, 13, 30526, 62, 66, 280, 2374, 62, 12154, 590, 220, 220, 796, 860, 62, 11623, 13, 405, 198, 17597, 13, 270, 13, 76, 6888, 62, 39504, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 513, 62, 38612, 13, 405, 198, 17597, 13, 270, 13, 76, 6888, 62, 12519, 62, 47033, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 2808, 62, 8054, 13, 405, 198, 17597, 13, 270, 13, 76, 6888, 62, 43082, 62, 4873, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 838, 13, 15, 198, 17597, 13, 270, 13, 76, 6888, 62, 4480, 19334, 282, 62, 4873, 220, 220, 220, 220, 220, 220, 220, 796, 2026, 13, 15, 198, 198, 17597, 13, 270, 13, 45394, 62, 12154, 590, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 352, 62, 21719, 13, 405, 198, 17597, 13, 270, 13, 22682, 62, 39308, 654, 62, 12154, 590, 220, 796, 352, 62, 830, 13, 405, 198, 198, 2, 44855, 11682, 1365, 284, 423, 340, 3892, 422, 198, 2, 262, 1492, 351, 4530, 583, 7375, 17, 2837, 198, 2, 290, 262, 1366, 852, 281, 8636, 286, 7375, 17, 583, 2099, 198, 647, 469, 7, 25064, 13, 270, 13, 39722, 62, 7718, 62, 10136, 62, 1525, 62, 8220, 17, 62, 368, 7717, 11, 198, 220, 220, 220, 360, 713, 26933, 220, 198, 220, 220, 220, 220, 220, 220, 220, 25639, 62, 42663, 62, 6030, 14804, 15, 13, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1400, 62, 42663, 14804, 15, 13, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3819, 14804, 15, 13, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 360, 756, 62, 16275, 14804, 15, 13, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4767, 3225, 14804, 15, 13, 1495, 11, 198, 220, 220, 220, 220, 220, 220, 220, 42718, 14804, 15, 13, 2718, 11, 198, 220, 220, 220, 220, 220, 220, 220, 29481, 62, 1904, 62, 64, 62, 24011, 1883, 62, 1659, 62, 6449, 3225, 62, 392, 62, 31067, 414, 14804, 15, 13, 1433, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13944, 14804, 15, 13, 2999, 11, 198, 220, 220, 220, 220, 220, 220, 220, 406, 6968, 14804, 15, 13, 2999, 11, 198, 220, 220, 220, 220, 220, 220, 220, 16024, 25802, 62, 1533, 62, 36, 5332, 62, 25802, 14804, 15, 13, 2999, 2361, 4008, 628, 220, 220, 220, 220, 198, 17597, 13, 270, 13, 25802, 62, 320, 1996, 341, 220, 796, 1987, 62, 4059, 13, 405, 1303, 1160, 14, 2481, 198, 198, 2, 198, 2, 27581, 198, 2, 198, 17597, 13, 270, 13, 79, 3004, 62, 3642, 822, 62, 35487, 62, 17287, 796, 513, 62, 8054, 13, 405, 198, 17597, 13, 270, 13, 79, 3004, 62, 3642, 822, 62, 1236, 723, 62, 12154, 590, 796, 2319, 62, 830, 13, 405, 198, 17597, 13, 270, 13, 79, 3004, 62, 3642, 822, 62, 1236, 723, 62, 39504, 796, 604, 62, 830, 13, 405, 198, 17597, 13, 270, 13, 79, 3004, 62, 3642, 822, 62, 400, 10126, 62, 12519, 796, 14956, 62, 830, 13, 405, 198, 17597, 13, 270, 13, 79, 3004, 62, 3642, 822, 62, 4480, 19334, 282, 62, 4873, 796, 2026, 13, 15, 198, 198, 2, 25064, 13, 270, 13, 13159, 62, 39308, 654, 62, 12519, 796, 44521, 62, 4090, 53, 20754, 62, 1268, 9858, 36, 198, 2, 25064, 13, 270, 13, 439, 62, 19290, 540, 796, 11096, 62, 5603, 55, 17534, 62, 1268, 9858, 36, 198, 2, 25064, 13, 270, 13, 39308, 654, 62, 12519, 796, 311, 10116, 20754, 62, 1268, 9858, 36, 198, 2, 25064, 13, 270, 13, 67, 1699, 437, 62, 12519, 796, 360, 3824, 2389, 10619, 62, 1268, 9858, 36, 198, 198, 2, 25064, 13, 270, 13, 76, 6888, 62, 4475, 796, 337, 8141, 62, 35, 6158, 628, 198, 198, 17597, 13, 8461, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 8461, 13, 39754, 62, 4871, 62, 16, 62, 9700, 220, 796, 685, 15, 13, 15, 11, 657, 13, 15, 11, 1105, 13, 15, 11, 362, 13, 15, 2361, 198, 17597, 13, 8461, 13, 39754, 62, 4871, 62, 16, 62, 21397, 220, 796, 685, 10232, 13, 15, 11, 28598, 13, 15, 11, 860, 3134, 13, 15, 11, 860, 24214, 24214, 24214, 13, 24, 60, 1303, 262, 705, 12, 16, 6, 994, 318, 780, 33918, 460, 470, 3551, 1167, 198, 17597, 13, 8461, 13, 38238, 62, 4871, 62, 16, 62, 9700, 220, 796, 685, 15, 13, 15, 11, 1511, 13, 23, 11, 1511, 13, 23, 2361, 1303, 1394, 362, 523, 198, 17597, 13, 8461, 13, 38238, 62, 4871, 62, 16, 62, 21397, 220, 796, 685, 17279, 13, 15, 11, 860, 3134, 13, 15, 11, 860, 24214, 24214, 2079, 17032, 13, 24, 2361, 198, 17597, 13, 8461, 13, 5219, 62, 79, 3004, 62, 496, 796, 7930, 26, 1303, 45199, 1445, 198, 17597, 13, 8461, 13, 4871, 62, 17, 62, 400, 10126, 796, 718, 62, 45969, 13, 15, 26, 198, 17597, 13, 8461, 13, 4871, 62, 17, 62, 4873, 796, 513, 13, 2713, 26, 198, 17597, 13, 8461, 13, 4871, 62, 19, 62, 9700, 220, 796, 685, 15, 13, 15, 11, 860, 13, 15, 11, 362, 13, 15, 2361, 198, 17597, 13, 8461, 13, 4871, 62, 19, 62, 21397, 220, 796, 685, 24, 62, 20, 3388, 13, 15, 11, 2026, 62, 20233, 13, 15, 11, 860, 24214, 24214, 2079, 17032, 13, 24, 2361, 198, 2, 25064, 13, 8461, 13, 4871, 62, 16, 62, 12519, 796, 34774, 23022, 26933, 54, 25552, 38430, 47, 16938, 2849, 62, 10943, 5446, 9865, 3843, 11053, 62, 3620, 6489, 21414, 1137, 12962, 198, 2, 25064, 13, 8461, 13, 4871, 62, 19, 62, 12519, 796, 685, 50, 37738, 62, 3620, 6489, 21414, 10979, 62, 1268, 9858, 36, 60, 198, 198, 2, 25064, 13, 1229, 13, 198, 198, 17597, 13, 75, 16762, 13, 9160, 62, 8457, 64, 62, 49183, 62, 28426, 1348, 796, 3991, 198, 17597, 13, 75, 16762, 13, 3617, 62, 43082, 62, 28426, 1348, 796, 3991, 198, 2235, 44855, 11682, 356, 460, 470, 1210, 572, 13553, 3884, 17033, 994, 492, 198, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 17989, 796, 1596, 13, 2996, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 17989, 62, 75, 505, 62, 8000, 796, 2534, 13, 1238, 220, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 6651, 81, 62, 29762, 796, 5214, 13, 2154, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 6651, 81, 62, 66, 43846, 796, 362, 9, 2718, 13, 2154, 220, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 47730, 62, 9410, 796, 6135, 13, 5824, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 6381, 1799, 62, 29762, 796, 3439, 13, 940, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 6381, 1799, 62, 66, 43846, 796, 2026, 13, 2713, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 16550, 2903, 62, 6381, 1799, 62, 9410, 796, 2608, 13, 3134, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 16550, 2903, 62, 6381, 1799, 62, 29762, 796, 1596, 13, 1238, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 16550, 2903, 62, 6381, 1799, 62, 66, 43846, 796, 1987, 13, 1899, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 43070, 62, 6381, 1799, 62, 29762, 796, 8275, 13, 1270, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 43070, 62, 6381, 1799, 62, 66, 43846, 796, 22352, 13, 1899, 198, 17597, 13, 75, 16762, 13, 31605, 544, 13, 79, 3004, 263, 62, 271, 796, 24848, 13, 3829, 198, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 496, 62, 1507, 62, 1731, 796, 7863, 13, 1238, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 496, 62, 1495, 62, 392, 62, 2502, 796, 8915, 13, 2154, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 496, 62, 1507, 62, 392, 62, 259, 62, 1818, 62, 21797, 796, 8915, 13, 2154, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 2502, 62, 79, 3004, 62, 496, 796, 31009, 13, 1314, 1303, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 75, 505, 62, 8000, 796, 8915, 13, 2154, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 75, 505, 62, 8000, 62, 2502, 62, 79, 3004, 62, 496, 796, 31009, 13, 1314, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 66, 43846, 62, 16885, 62, 4625, 62, 1507, 796, 7863, 13, 1238, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 66, 43846, 62, 16885, 62, 2502, 62, 1507, 796, 19048, 13, 1821, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 66, 43846, 62, 2502, 62, 79, 3004, 62, 496, 796, 39697, 13, 2713, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 66, 43846, 62, 505, 62, 2502, 62, 1507, 62, 8929, 796, 19048, 13, 1821, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 66, 43846, 62, 505, 62, 2502, 62, 1507, 62, 1150, 796, 8915, 13, 2154, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 8957, 62, 66, 43846, 62, 505, 62, 2502, 62, 1507, 62, 9319, 796, 7863, 13, 1238, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 9410, 796, 8257, 13, 1899, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 14751, 62, 76, 328, 62, 29762, 796, 26607, 13, 940, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 14751, 62, 76, 328, 62, 66, 43846, 796, 20479, 13, 1270, 198, 17597, 13, 75, 16762, 13, 12154, 1817, 13, 14751, 62, 9410, 796, 7175, 13, 1899, 198, 198, 2, 25064, 13, 75, 16762, 13, 12519, 62, 38785, 13, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 525, 3291, 62, 1818, 796, 21139, 13, 405, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 75, 505, 62, 8000, 62, 71, 65, 796, 1679, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 8929, 796, 1160, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 9319, 62, 66, 43846, 796, 838, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 9319, 62, 29762, 796, 642, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 71, 65, 62, 2860, 1859, 796, 1596, 13, 940, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 9410, 6651, 62, 9806, 62, 16, 796, 19038, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 9410, 6651, 62, 9806, 62, 17, 796, 5867, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 259, 8988, 220, 220, 220, 220, 796, 20978, 43300, 62, 13752, 62, 1268, 9858, 36, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 71, 65, 62, 259, 8988, 220, 796, 20978, 43300, 62, 32886, 62, 1268, 9858, 36, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 14751, 62, 259, 8988, 220, 796, 20978, 43300, 62, 5662, 62, 1268, 9858, 36, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 1416, 62, 259, 8988, 220, 796, 20978, 43300, 62, 4090, 53, 20754, 62, 9419, 24706, 62, 1268, 9858, 36, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 27544, 62, 1084, 796, 718, 62, 830, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 27544, 62, 9806, 796, 1467, 62, 830, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 14751, 62, 27544, 62, 1084, 796, 838, 62, 830, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 14751, 62, 27544, 62, 9806, 796, 860, 24214, 24214, 2079, 17032, 13, 24, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 79, 3004, 263, 62, 27544, 62, 1084, 796, 838, 62, 830, 13, 15, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 79, 3004, 263, 62, 27544, 62, 9806, 796, 1467, 62, 830, 13, 15, 198, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 27544, 62, 18870, 733, 796, 8646, 198, 17597, 13, 75, 16762, 13, 12519, 62, 38785, 13, 79, 3004, 263, 62, 18870, 733, 796, 5323, 198, 2, 44855, 11682, 1521, 466, 356, 761, 257, 384, 30052, 4866, 286, 19347, 19352, 896, 994, 30, 198, 198, 17597, 13, 75, 16762, 13, 24425, 62, 49196, 13, 21037, 796, 1467, 198, 17597, 13, 75, 16762, 13, 24425, 62, 49196, 13, 1150, 796, 1987, 198, 17597, 13, 75, 16762, 13, 24425, 62, 49196, 13, 46503, 796, 1542, 198, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 4480, 19334, 282, 62, 4873, 796, 3126, 13, 15, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 400, 10126, 62, 29762, 796, 24652, 13, 2154, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 400, 10126, 62, 66, 43846, 796, 25707, 13, 1065, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 9806, 62, 29762, 796, 1478, 13, 3023, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 9806, 62, 66, 43846, 796, 1315, 13, 4869, 198, 17597, 13, 75, 16762, 13, 39308, 654, 62, 43082, 13, 15182, 62, 83, 359, 796, 7536, 7, 1584, 11, 8702, 11, 9130, 1267, 198, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 17989, 796, 642, 2231, 13, 15, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 9410, 220, 796, 362, 62, 23, 2231, 13, 15, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 6381, 1799, 796, 513, 62, 40064, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 43070, 62, 6381, 1799, 796, 4764, 1495, 198, 17597, 13, 75, 16762, 13, 9410, 62, 19290, 62, 43082, 13, 400, 10126, 796, 1467, 62, 22148, 13, 15, 198, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 35487, 796, 362, 62, 22544, 10, 16, 62, 40350, 220, 1303, 47342, 46476, 3228, 13148, 1160, 28996, 2135, 991, 287, 1295, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 75, 505, 62, 8000, 796, 362, 62, 41322, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 66, 43846, 220, 796, 362, 62, 41322, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 24425, 62, 469, 62, 1270, 796, 807, 1270, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 6381, 1799, 796, 513, 62, 16102, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 43070, 62, 6381, 1799, 796, 352, 62, 7029, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 496, 62, 1120, 62, 9541, 220, 796, 352, 62, 24760, 13, 405, 220, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 496, 62, 1120, 62, 9541, 62, 1270, 62, 71, 3808, 796, 362, 62, 39101, 13, 405, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 9410, 6651, 62, 9806, 62, 17, 62, 9541, 62, 17197, 796, 5867, 13, 15, 1303, 279, 86, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 9410, 6651, 62, 9806, 62, 16, 62, 9410, 220, 796, 19038, 13, 15, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 9410, 6651, 62, 1676, 16864, 796, 4317, 13, 15, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 83, 2136, 796, 6073, 13, 15, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 400, 10126, 796, 718, 62, 47372, 13, 15, 198, 17597, 13, 75, 16762, 13, 16090, 62, 19290, 62, 43082, 13, 13159, 62, 451, 23400, 62, 1084, 8083, 796, 5867, 13, 15, 1303, 44855, 11682, 2198, 198, 198, 17597, 13, 75, 16762, 13, 71, 65, 13, 83, 2136, 796, 6135, 13, 15, 198, 17597, 13, 75, 16762, 13, 71, 65, 13, 358, 67, 62, 9395, 20847, 796, 685, 1314, 13, 3865, 11, 2623, 13, 2996, 11, 1120, 13, 1270, 11, 6469, 13, 1270, 11, 6052, 13, 2154, 11, 15377, 13, 5332, 60, 198, 17597, 13, 75, 16762, 13, 71, 65, 13, 358, 67, 62, 259, 8988, 796, 685, 19442, 13, 15, 11, 24591, 13, 15, 11, 30290, 13, 15, 11, 26514, 13, 15, 11, 42947, 13, 15, 11, 24214, 24214, 24214, 2079, 13, 24, 60, 198, 198, 17597, 13, 75, 16762, 13, 24087, 13, 83, 2136, 796, 1160, 13, 15, 198, 17597, 13, 75, 16762, 13, 24087, 13, 358, 67, 62, 9395, 20847, 796, 17635, 198, 17597, 13, 75, 16762, 13, 24087, 13, 358, 67, 62, 259, 8988, 796, 17635, 628, 198, 17597, 13, 1229, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 1229, 13, 400, 10126, 796, 362, 62, 4059, 13, 15, 22492, 5626, 1294, 1961, 198, 17597, 13, 1229, 13, 496, 62, 1507, 62, 1731, 796, 43686, 13, 405, 198, 17597, 13, 1229, 13, 496, 62, 1495, 62, 392, 62, 2502, 796, 43184, 13, 4349, 198, 198, 17597, 13, 1229, 13, 66, 43846, 62, 16885, 62, 4625, 62, 1495, 796, 45601, 13, 1899, 198, 17597, 13, 1229, 13, 66, 43846, 62, 727, 395, 62, 1495, 62, 9541, 796, 642, 4846, 13, 3365, 198, 198, 17597, 13, 1229, 13, 11085, 62, 9410, 220, 796, 41810, 13, 1120, 198, 17597, 13, 1229, 13, 7266, 44399, 62, 9410, 796, 34385, 13, 2919, 198, 17597, 13, 1229, 13, 47730, 62, 9410, 62, 21037, 796, 13108, 13, 4531, 198, 17597, 13, 1229, 13, 47730, 62, 9410, 62, 46503, 796, 42622, 13, 3901, 198, 17597, 13, 1229, 13, 10698, 62, 11128, 66, 4355, 62, 1640, 62, 1818, 62, 21797, 796, 37290, 13, 5066, 198, 17597, 13, 1229, 13, 6651, 81, 796, 26826, 13, 4790, 198, 198, 17597, 13, 1229, 13, 358, 67, 796, 5441, 13, 4310, 198, 198, 17597, 13, 1229, 13, 9410, 6651, 62, 9806, 62, 17, 62, 9541, 62, 17197, 220, 796, 352, 62, 15711, 13, 3023, 1303, 9114, 198, 17597, 13, 1229, 13, 9410, 6651, 62, 9806, 62, 16, 62, 9410, 220, 796, 718, 3510, 13, 2327, 198, 17597, 13, 1229, 13, 9410, 6651, 62, 1676, 16864, 796, 7600, 13, 15, 1303, 279, 310, 198, 198, 17597, 13, 1229, 13, 39504, 62, 12519, 62, 28300, 62, 24425, 796, 3439, 9, 54, 6500, 27015, 62, 18973, 62, 27857, 4221, 198, 198, 17597, 13, 1229, 13, 1818, 62, 12154, 590, 62, 86, 62, 50028, 796, 37224, 13, 15, 198, 17597, 13, 1229, 13, 1818, 62, 12154, 590, 62, 3919, 62, 50028, 796, 642, 1314, 13, 15, 198, 17597, 13, 1229, 13, 847, 62, 12519, 796, 14417, 62, 31858, 62, 1268, 9858, 36, 198, 2, 25064, 13, 1229, 13, 39123, 62, 12519, 7904, 34774, 23022, 796, 14417, 62, 17133, 45, 1961, 62, 1268, 9858, 36, 198, 17597, 13, 1229, 13, 27544, 62, 1084, 796, 718, 62, 830, 13, 15, 198, 17597, 13, 1229, 13, 27544, 62, 9806, 796, 1467, 62, 830, 13, 15, 198, 2, 4248, 16, 1635, 525, 1285, 9, 15139, 228, 604, 13, 2327, 9114, 44855, 11682, 787, 604, 13, 2327, 370, 6500, 27015, 62, 18973, 62, 27857, 4221, 30, 220, 198, 17597, 13, 1229, 13, 27544, 62, 18870, 733, 796, 8646, 13, 15, 14, 19, 13, 2327, 198, 17597, 13, 1229, 13, 83, 2136, 796, 8093, 13, 15, 198, 17597, 13, 1229, 13, 24087, 62, 83, 2136, 796, 1160, 13, 15, 198, 198, 17597, 13, 496, 62, 49196, 13, 5219, 62, 79, 3004, 62, 1095, 796, 13553, 62, 1095, 3419, 198, 17597, 13, 496, 62, 49196, 13, 39308, 654, 62, 43082, 62, 1462, 62, 3605, 62, 5219, 62, 79, 3004, 796, 7536, 7, 1584, 11, 8702, 11, 9130, 1267, 198, 198, 17597, 13, 24425, 62, 49196, 13, 21037, 796, 1467, 198, 17597, 13, 24425, 62, 49196, 13, 1150, 796, 1987, 198, 17597, 13, 24425, 62, 49196, 13, 46503, 796, 1542, 198, 198, 17597, 13, 9410, 62, 49196, 13, 9806, 62, 17197, 796, 362, 198, 198, 2, 48947, 15986, 309, 8267, 40410, 4146, 33160, 198, 17597, 13, 1084, 21482, 13, 1095, 796, 685, 1433, 11, 1507, 11, 2481, 11, 1954, 60, 198, 17597, 13, 1084, 21482, 13, 21482, 62, 525, 62, 9769, 796, 685, 19, 13, 5237, 11, 718, 13, 3980, 11, 807, 13, 2623, 11, 807, 13, 6420, 60, 198, 17597, 13, 1084, 21482, 13, 1324, 20098, 62, 4873, 796, 604, 13, 1270, 198, 198, 17597, 13, 11840, 13, 47033, 62, 9649, 796, 604, 198, 17597, 13, 11840, 13, 9649, 62, 1156, 62, 445, 8110, 796, 685, 1415, 13, 15, 11, 1495, 13, 15, 60, 198, 17597, 13, 11840, 13, 29762, 62, 3823, 62, 496, 796, 3439, 198, 2, 198, 2, 2312, 389, 21588, 287, 513, 812, 26, 766, 25, 198, 2, 3740, 1378, 2503, 13, 9567, 13, 1416, 313, 14, 11377, 602, 14, 12001, 12, 50028, 12, 12154, 590, 12, 9700, 12, 1238, 2481, 12, 1238, 1828, 14, 198, 2, 198, 17597, 13, 11840, 13, 1671, 5356, 796, 3440, 11473, 44, 1722, 7, 604, 11, 309, 11, 5550, 38865, 62, 11473, 5673, 62, 1238, 2481, 1267, 220, 628, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 1078, 437, 590, 62, 12154, 590, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 1078, 437, 590, 62, 12154, 590, 13, 46503, 796, 9919, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 1078, 437, 590, 62, 12154, 590, 13, 21037, 796, 3126, 13, 405, 628, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 11085, 62, 9410, 796, 2310, 13, 1314, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 847, 62, 17197, 796, 1478, 13, 405, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 8929, 62, 12519, 62, 400, 3447, 796, 2026, 62, 830, 13, 15, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 4480, 19334, 282, 796, 352, 14, 3064, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 9410, 62, 48649, 13, 14864, 1547, 62, 12154, 590, 796, 1248, 13, 405, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 6651, 62, 8929, 796, 9919, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 6651, 62, 27171, 220, 796, 3126, 13, 405, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 6651, 62, 9319, 220, 796, 2242, 13, 2154, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 39949, 62, 8929, 220, 796, 8190, 13, 2816, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 67, 5031, 13, 39949, 62, 9319, 220, 796, 2242, 13, 2154, 628, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 6651, 3808, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 6651, 3808, 13, 12154, 590, 796, 8275, 13, 1899, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 6651, 3808, 13, 1416, 1252, 680, 62, 18608, 1732, 796, 34598, 13, 1821, 1303, 16034, 40410, 4146, 33448, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 6651, 3808, 13, 24425, 7904, 2558, 796, 3439, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 6651, 3808, 13, 48544, 913, 62, 28812, 62, 1084, 796, 13108, 13, 405, 628, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 541, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 541, 13, 25404, 62, 20307, 796, 3126, 13, 15, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 541, 13, 25404, 62, 16550, 2903, 796, 9919, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 541, 13, 39949, 879, 62, 20307, 796, 2242, 13, 2154, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 541, 13, 39949, 879, 62, 16550, 2903, 796, 8190, 13, 2816, 198, 220, 220, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 562, 21687, 62, 84, 1495, 796, 7863, 13, 1238, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 562, 21687, 62, 1495, 79, 796, 8915, 13, 2154, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 12417, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8915, 13, 2154, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 1818, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 2808, 13, 2154, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 49183, 13, 11284, 220, 220, 220, 220, 220, 220, 220, 796, 5014, 13, 1821, 628, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 8457, 64, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 8457, 64, 13, 84, 1495, 796, 7863, 13, 1238, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 8457, 64, 13, 78, 1731, 796, 8915, 13, 2154, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 3605, 62, 5219, 62, 79, 3004, 796, 27228, 13, 1899, 198, 2, 13553, 62, 9688, 62, 4475, 796, 7536, 7, 1584, 11, 8702, 11, 9130, 1267, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 9246, 62, 64, 220, 220, 220, 220, 796, 21643, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 9246, 62, 65, 220, 220, 220, 220, 796, 21643, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 9246, 62, 65, 62, 48846, 452, 273, 796, 9415, 13, 2231, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 79, 5736, 13, 9246, 62, 67, 220, 220, 220, 220, 796, 9415, 13, 2231, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 65, 567, 44034, 13, 28426, 1348, 796, 3991, 198, 2, 2440, 6840, 655, 1724, 705, 4480, 1751, 17020, 220, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 65, 567, 44034, 13, 75, 931, 62, 16345, 62, 46503, 796, 513, 62, 4059, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 65, 567, 44034, 13, 75, 931, 62, 16345, 62, 21037, 220, 796, 362, 62, 4059, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 65, 567, 44034, 13, 46503, 796, 13803, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 65, 567, 44034, 13, 21037, 220, 796, 1802, 198, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 31130, 62, 46503, 796, 220, 21643, 13, 1899, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 31130, 62, 21037, 796, 6073, 13, 2078, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 20307, 62, 4873, 796, 220, 19409, 13, 2816, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 8000, 796, 220, 19409, 13, 2816, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 1095, 796, 2824, 7, 4051, 21912, 16, 25, 2231, 8, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 28029, 1666, 62, 79, 3004, 13, 496, 62, 17287, 82, 796, 685, 16616, 13, 5607, 11, 13348, 13, 2670, 11, 4846, 13, 6659, 11, 3459, 13, 1731, 11, 3720, 13, 2791, 11, 4869, 13, 2919, 11, 5237, 13, 1120, 11, 4310, 13, 5892, 11, 2231, 13, 2682, 11, 2623, 13, 3324, 60, 198, 198, 2, 220, 198, 2, 1862, 1337, 81, 7264, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 76, 17094, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 76, 17094, 13, 4873, 796, 25326, 13, 5607, 628, 198, 17597, 13, 77, 16762, 62, 65, 641, 13, 82, 3149, 796, 25326, 13, 5607, 22492, 4101, 4, 286, 5160, 31396, 363, 2310, 14, 17, 807, 1065, 198, 2, 796, 21044, 198, 198, 17597, 13, 11722, 11128, 13, 28426, 1348, 796, 3991, 198, 17597, 13, 11722, 11128, 13, 43435, 62, 75, 3391, 62, 29762, 796, 36100, 13, 3388, 198, 17597, 13, 11722, 11128, 13, 43435, 62, 75, 3391, 62, 66, 43846, 796, 40400, 13, 5237, 198, 2, 407, 1107, 2622, 11, 475, 6949, 11485, 198, 17597, 13, 11722, 11128, 13, 48787, 62, 75, 3391, 62, 29762, 796, 41922, 13, 2327, 198, 17597, 13, 11722, 11128, 13, 48787, 62, 75, 3391, 62, 66, 43846, 220, 796, 604, 3682, 13, 3132, 198, 17597, 13, 11722, 11128, 13, 1229, 62, 259, 8988, 62, 32374, 220, 796, 718, 1558, 198, 198, 17597, 13, 1416, 1252, 680, 62, 9410, 62, 37301, 13, 17287, 796, 838, 13, 15, 198, 17597, 13, 1416, 1252, 680, 62, 9410, 62, 37301, 13, 47033, 62, 496, 796, 642, 198, 198, 17597, 13, 29603, 13, 28426, 1348, 796, 2081, 198, 17597, 13, 29603, 13, 49922, 62, 17287, 796, 604, 62, 7410, 13, 15, 198, 17597, 13, 29603, 13, 9410, 62, 17287, 28, 513, 62, 830, 13, 15, 198, 17597, 13, 29603, 13, 40082, 62, 79, 3004, 796, 807, 62, 40873, 13, 15, 198, 17597, 13, 29603, 13, 49922, 62, 496, 796, 1596, 198, 17597, 13, 29603, 13, 1186, 24615, 62, 496, 796, 7930, 198 ]
2.207473
5,326
struct SymEGRQSMatrix{T,UT<:AbstractArray,VT<:AbstractArray,dT<:AbstractArray} <: AbstractMatrix{T} Ut::UT Vt::VT d::dT n::Int p::Int function SymEGRQSMatrix{T,UT,VT,dT}(Ut,Vt,d,n,p) where {T,UT<:AbstractArray,VT<:AbstractArray,dT<:AbstractArray} Up, Un = size(Ut) Vp, Vn = size(Vt) (Un == Vn && Up == Vp && Vn == length(d)) || throw(DimensionMismatch()) new(Ut,Vt,d,n,p) end end # Constuctor SymEGRQSMatrix(Ut::AbstractArray{T,N}, Vt::AbstractArray{T,N}, d::AbstractArray{T,M}) where {T,N,M}= SymEGRQSMatrix{T,typeof(Ut),typeof(Vt),typeof(d)}(Ut,Vt,d,size(Vt,2),size(Vt,1)); ######################################################################## #### Helpful properties. Not nessecarily computionally efficient #### ######################################################################## Matrix(K::SymEGRQSMatrix) = tril(K.Ut'*K.Vt) + triu(K.Vt'*K.Ut,1) + Diagonal(K.d) size(K::SymEGRQSMatrix) = (K.n, K.n) function getindex(K::SymEGRQSMatrix{T}, i::Int, j::Int) where T i > j && return dot(K.Ut[:,i],K.Vt[:,j]) j == i && return dot(K.Vt[:,i],K.Ut[:,j]) + K.d[i] return dot(K.Vt[:,i],K.Ut[:,j]) end Base.propertynames(F::SymEGRQSMatrix, private::Bool=false) = (private ? fieldnames(typeof(F)) : ()) ######################################################################## #### Linear Algebra routines #### ######################################################################## #### Matrix-matrix product #### function dss_mul_mat!(Y::Array, K::SymEGRQSMatrix, X::Array) Ut = K.Ut Vt = K.Vt d = getfield(K,:d) p, n = size(Ut); mx = size(X,2); Vbar = zeros(p,mx); Ubar = Ut*X; @inbounds for i = 1:n tmpV = Vt[:,i]; tmpU = Ut[:,i]; tmpX = X[i:i,:]; Ubar -= tmpU .* tmpX; Vbar += tmpV .* tmpX; Y[i,:] = tmpU'*Vbar + tmpV'*Ubar + d[i]*tmpX; end return Y end #### Log-determinant #### logdet(K::SymEGRQSMatrix) = 2.0*logdet(cholesky(K)) #### Determinant #### det(K::SymEGRQSMatrix) = det(cholesky(K))^2 mul!(y::AbstractVecOrMat, K::SymEGRQSMatrix, x::AbstractVecOrMat) = dss_mul_mat!(y,K,x) mul!(y::AbstractVecOrMat, K::Adjoint{<:Any,<:SymEGRQSMatrix}, x::AbstractVecOrMat) = dss_mul_mat!(y,K.parent,x) function (\)(K::SymEGRQSMatrix, x::AbstractVecOrMat) L = cholesky(K); return L'\(L\x) end
[ 7249, 15845, 7156, 49, 48, 12310, 265, 8609, 90, 51, 11, 3843, 27, 25, 23839, 19182, 11, 36392, 27, 25, 23839, 19182, 11, 67, 51, 27, 25, 23839, 19182, 92, 1279, 25, 27741, 46912, 90, 51, 92, 198, 220, 220, 220, 7273, 3712, 3843, 198, 220, 220, 220, 569, 83, 3712, 36392, 198, 220, 220, 220, 288, 3712, 67, 51, 198, 197, 77, 3712, 5317, 198, 197, 79, 3712, 5317, 198, 197, 8818, 15845, 7156, 49, 48, 12310, 265, 8609, 90, 51, 11, 3843, 11, 36392, 11, 67, 51, 92, 7, 18274, 11, 53, 83, 11, 67, 11, 77, 11, 79, 8, 810, 198, 197, 197, 197, 1391, 51, 11, 3843, 27, 25, 23839, 19182, 11, 36392, 27, 25, 23839, 19182, 11, 67, 51, 27, 25, 23839, 19182, 92, 198, 220, 220, 220, 220, 220, 220, 220, 3205, 11, 791, 796, 2546, 7, 18274, 8, 198, 197, 197, 53, 79, 11, 569, 77, 796, 2546, 7, 53, 83, 8, 198, 197, 197, 7, 3118, 6624, 569, 77, 11405, 3205, 6624, 569, 79, 11405, 569, 77, 6624, 4129, 7, 67, 4008, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 220, 220, 220, 197, 3605, 7, 18274, 11, 53, 83, 11, 67, 11, 77, 11, 79, 8, 198, 197, 437, 198, 437, 198, 198, 2, 4757, 33029, 198, 43094, 7156, 49, 48, 12310, 265, 8609, 7, 18274, 3712, 23839, 19182, 90, 51, 11, 45, 5512, 569, 83, 3712, 23839, 19182, 90, 51, 11, 45, 5512, 288, 3712, 23839, 19182, 90, 51, 11, 44, 30072, 810, 1391, 51, 11, 45, 11, 44, 92, 28, 198, 197, 43094, 7156, 49, 48, 12310, 265, 8609, 90, 51, 11, 4906, 1659, 7, 18274, 828, 4906, 1659, 7, 53, 83, 828, 4906, 1659, 7, 67, 38165, 7, 18274, 11, 53, 83, 11, 67, 11, 7857, 7, 53, 83, 11, 17, 828, 7857, 7, 53, 83, 11, 16, 18125, 628, 198, 29113, 29113, 7804, 198, 4242, 21656, 6608, 13, 1892, 299, 274, 2363, 3093, 552, 1009, 453, 6942, 220, 220, 220, 1303, 21017, 198, 29113, 29113, 7804, 198, 46912, 7, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 8, 796, 491, 346, 7, 42, 13, 18274, 6, 9, 42, 13, 53, 83, 8, 1343, 1333, 84, 7, 42, 13, 53, 83, 6, 9, 42, 13, 18274, 11, 16, 8, 1343, 6031, 27923, 7, 42, 13, 67, 8, 198, 198, 7857, 7, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 8, 796, 357, 42, 13, 77, 11, 509, 13, 77, 8, 198, 198, 8818, 651, 9630, 7, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 90, 51, 5512, 1312, 3712, 5317, 11, 474, 3712, 5317, 8, 810, 309, 198, 197, 72, 1875, 474, 11405, 1441, 16605, 7, 42, 13, 18274, 58, 45299, 72, 4357, 42, 13, 53, 83, 58, 45299, 73, 12962, 198, 197, 73, 6624, 1312, 11405, 1441, 16605, 7, 42, 13, 53, 83, 58, 45299, 72, 4357, 42, 13, 18274, 58, 45299, 73, 12962, 1343, 509, 13, 67, 58, 72, 60, 198, 197, 7783, 16605, 7, 42, 13, 53, 83, 58, 45299, 72, 4357, 42, 13, 18274, 58, 45299, 73, 12962, 198, 437, 198, 198, 14881, 13, 26745, 14933, 7, 37, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 11, 2839, 3712, 33, 970, 28, 9562, 8, 796, 198, 220, 220, 220, 357, 19734, 5633, 2214, 14933, 7, 4906, 1659, 7, 37, 4008, 1058, 32865, 628, 198, 198, 29113, 29113, 7804, 198, 4242, 44800, 978, 29230, 31878, 197, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 21017, 198, 29113, 29113, 7804, 198, 198, 4242, 24936, 12, 6759, 8609, 1720, 1303, 21017, 198, 8818, 288, 824, 62, 76, 377, 62, 6759, 0, 7, 56, 3712, 19182, 11, 509, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 11, 1395, 3712, 19182, 8, 198, 197, 18274, 796, 509, 13, 18274, 198, 197, 53, 83, 796, 509, 13, 53, 83, 198, 197, 67, 796, 651, 3245, 7, 42, 11, 25, 67, 8, 198, 220, 220, 220, 279, 11, 299, 796, 2546, 7, 18274, 1776, 198, 220, 220, 220, 285, 87, 796, 2546, 7, 55, 11, 17, 1776, 198, 220, 220, 220, 569, 5657, 796, 1976, 27498, 7, 79, 11, 36802, 1776, 198, 220, 220, 220, 471, 5657, 796, 7273, 9, 55, 26, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 796, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 53, 796, 569, 83, 58, 45299, 72, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 52, 796, 7273, 58, 45299, 72, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 55, 796, 1395, 58, 72, 25, 72, 11, 25, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 471, 5657, 48185, 45218, 52, 764, 9, 45218, 55, 26, 198, 220, 220, 220, 220, 220, 220, 220, 569, 5657, 15853, 45218, 53, 764, 9, 45218, 55, 26, 198, 220, 220, 220, 220, 220, 220, 220, 575, 58, 72, 11, 47715, 796, 45218, 52, 6, 9, 53, 5657, 1343, 45218, 53, 6, 9, 52, 5657, 1343, 288, 58, 72, 60, 9, 22065, 55, 26, 198, 220, 220, 220, 886, 198, 197, 7783, 575, 198, 437, 198, 198, 4242, 5972, 12, 67, 13221, 415, 1303, 21017, 198, 6404, 15255, 7, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 8, 796, 362, 13, 15, 9, 6404, 15255, 7, 354, 4316, 2584, 7, 42, 4008, 198, 198, 4242, 360, 13221, 415, 1303, 21017, 198, 15255, 7, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 8, 796, 1062, 7, 354, 4316, 2584, 7, 42, 4008, 61, 17, 628, 198, 76, 377, 0, 7, 88, 3712, 23839, 53, 721, 5574, 19044, 11, 509, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 11, 2124, 3712, 23839, 53, 721, 5574, 19044, 8, 796, 198, 197, 67, 824, 62, 76, 377, 62, 6759, 0, 7, 88, 11, 42, 11, 87, 8, 198, 76, 377, 0, 7, 88, 3712, 23839, 53, 721, 5574, 19044, 11, 509, 3712, 2782, 73, 1563, 90, 27, 25, 7149, 11, 27, 25, 43094, 7156, 49, 48, 12310, 265, 8609, 5512, 2124, 3712, 23839, 53, 721, 5574, 19044, 8, 796, 198, 197, 67, 824, 62, 76, 377, 62, 6759, 0, 7, 88, 11, 42, 13, 8000, 11, 87, 8, 198, 8818, 357, 59, 5769, 42, 3712, 43094, 7156, 49, 48, 12310, 265, 8609, 11, 2124, 3712, 23839, 53, 721, 5574, 19044, 8, 198, 197, 43, 796, 442, 4316, 2584, 7, 42, 1776, 198, 197, 7783, 406, 6, 59, 7, 43, 59, 87, 8, 198, 437, 198 ]
2.132194
1,112
using DataFrames using DuckDB using Test using Dates using UUIDs test_files = [ "test_appender.jl", "test_basic_queries.jl", "test_config.jl", "test_connection.jl", "test_df_scan.jl", "test_prepare.jl", "test_transaction.jl", "test_sqlite.jl", "test_replacement_scan.jl", "test_table_function.jl", "test_old_interface.jl", "test_all_types.jl" ] if size(ARGS)[1] > 0 filtered_test_files = [] for test_file in test_files if test_file == ARGS[1] push!(filtered_test_files, test_file) end end test_files = filtered_test_files end for fname in test_files println(fname) include(fname) end
[ 3500, 6060, 35439, 198, 3500, 21867, 11012, 198, 3500, 6208, 198, 3500, 44712, 198, 3500, 471, 27586, 82, 198, 198, 9288, 62, 16624, 796, 685, 198, 220, 220, 220, 366, 9288, 62, 1324, 2194, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 35487, 62, 421, 10640, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 11250, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 38659, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 7568, 62, 35836, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 46012, 533, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 7645, 2673, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 25410, 578, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 35666, 5592, 62, 35836, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 11487, 62, 8818, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 727, 62, 39994, 13, 20362, 1600, 198, 220, 220, 220, 366, 9288, 62, 439, 62, 19199, 13, 20362, 1, 198, 60, 198, 198, 361, 2546, 7, 1503, 14313, 38381, 16, 60, 1875, 657, 198, 220, 220, 220, 29083, 62, 9288, 62, 16624, 796, 17635, 198, 220, 220, 220, 329, 1332, 62, 7753, 287, 1332, 62, 16624, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1332, 62, 7753, 6624, 5923, 14313, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 10379, 4400, 62, 9288, 62, 16624, 11, 1332, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1332, 62, 16624, 796, 29083, 62, 9288, 62, 16624, 198, 437, 198, 198, 1640, 277, 3672, 287, 1332, 62, 16624, 198, 220, 220, 220, 44872, 7, 69, 3672, 8, 198, 220, 220, 220, 2291, 7, 69, 3672, 8, 198, 437, 198 ]
2.180952
315
# Portions translated from SLICOT-Reference distribution # Copyright (c) 2002-2020 NICONET e.V. function run_mb03bd(datfile, io=stdout) NIN = 5 NOUT = 6 KMAX = 6 NMAX = 50 LDA1 = NMAX LDA2 = NMAX LDQ1 = NMAX LDQ2 = NMAX LDWORK = KMAX + max( 2*NMAX, 8*KMAX ) LIWORK = 2*KMAX + NMAX QIND = Array{BlasInt,1}(undef, KMAX) S = Array{BlasInt,1}(undef, KMAX) A = Array{Float64,3}(undef, LDA1,LDA2,KMAX) Q = Array{Float64,3}(undef, LDQ1,LDQ2,KMAX) ALPHAR = Array{Float64,1}(undef, NMAX) ALPHAI = Array{Float64,1}(undef, NMAX) BETA = Array{Float64,1}(undef, NMAX) SCAL = Array{BlasInt,1}(undef, NMAX) IWORK = Array{BlasInt,1}(undef, LIWORK) DWORK = Array{Float64,1}(undef, LDWORK) f = open(datfile,"r") readline(f) vs = split(readline(f)) JOB = vs[1][1] DEFL = vs[2][1] COMPQ = vs[3][1] K = parse(BlasInt, vs[4]) N = parse(BlasInt, vs[5]) H = parse(BlasInt, vs[6]) ILO = parse(BlasInt, vs[7]) IHI = parse(BlasInt, vs[8]) if ( N<0 || N>NMAX ) @error "Illegal N=$N" end vs = String[] _isz = K while length(vs) < _isz append!(vs, replace.(split(readline(f)),'D'=>'E')) end S[1:_isz] .= parsex.(BlasInt, vs) vs = String[] _isz,_jsz,_ksz = (N,N,K) while length(vs) < _isz*_jsz*_ksz append!(vs, replace.(split(readline(f)),'D'=>'E')) end for k in 1:_ksz for i in 1:_isz _i0 = (i-1)*_jsz + (k-1)*_jsz*_isz A[i,1:_jsz,k] .= parsex.(Float64, vs[_i0+1:_i0+_jsz]) end end if ( LSAME( COMPQ, 'P' ) ) vs = String[] _isz = K while length(vs) < _isz append!(vs, replace.(split(readline(f)),'D'=>'E')) end QIND[1:_isz] .= parsex.(BlasInt, vs) end # if close(f) # interp call 1 INFO, IWARN = SLICOT.mb03bd!(JOB, DEFL, COMPQ, QIND, K, N, H, ILO, IHI, S, A, Q, ALPHAR, ALPHAI, BETA, SCAL, LIWORK, LDWORK) @test INFO == 0 println(io, "IWARN = $IWARN") if ( LSAME( JOB, 'S' ) || LSAME( JOB, 'T' ) ) # interp output 1 println(io, "A:") _nc = N _nr = N _nk = K show(io, "text/plain", A[1:_nr,1:_nc,1:_nk]) println(io) end # if if ( LSAME( COMPQ, 'U' ) || LSAME( COMPQ, 'I' ) ) # interp output 2 println(io, "Q:") _nc = N _nr = N _nk = K show(io, "text/plain", Q[1:_nr,1:_nc,1:_nk]) println(io) elseif ( LSAME( COMPQ, 'P' ) ) for L in 1:K if ( QIND[L]>0 ) println(io, "factor ",QIND[L]) # write QIND( L ) # unable to translate write loop: # write ( I, J, QIND( L ) ), J = 1, N # interp output 3 show(io, "text/plain", Q[1:N,1:N,QIND[L]]) println(io) end # if end # for end # if # interp output 4 println(io, "ALPHAR:") _nr = N show(io, "text/plain", ALPHAR[1:_nr]) println(io) # interp output 5 println(io, "ALPHAI:") _nr = N show(io, "text/plain", ALPHAI[1:_nr]) println(io) # interp output 6 println(io, "BETA:") _nr = N show(io, "text/plain", BETA[1:_nr]) println(io) # interp output 7 println(io, "SCAL:") _nr = N show(io, "text/plain", SCAL[1:_nr]) println(io) end # run_mb03bd()
[ 2, 4347, 507, 14251, 422, 12419, 2149, 2394, 12, 26687, 6082, 198, 2, 15069, 357, 66, 8, 6244, 12, 42334, 45593, 1340, 2767, 304, 13, 53, 13, 198, 8818, 1057, 62, 2022, 3070, 17457, 7, 19608, 7753, 11, 33245, 28, 19282, 448, 8, 198, 220, 220, 220, 399, 1268, 796, 642, 198, 220, 220, 220, 399, 12425, 796, 718, 198, 220, 220, 220, 509, 22921, 796, 718, 198, 220, 220, 220, 399, 22921, 796, 2026, 198, 220, 220, 220, 406, 5631, 16, 796, 399, 22921, 198, 220, 220, 220, 406, 5631, 17, 796, 399, 22921, 198, 220, 220, 220, 27178, 48, 16, 796, 399, 22921, 198, 220, 220, 220, 27178, 48, 17, 796, 399, 22921, 198, 220, 220, 220, 27178, 33249, 796, 509, 22921, 1343, 3509, 7, 362, 9, 45, 22921, 11, 807, 9, 42, 22921, 1267, 198, 220, 220, 220, 24653, 33249, 796, 362, 9, 42, 22921, 1343, 399, 22921, 198, 220, 220, 220, 1195, 12115, 796, 15690, 90, 3629, 292, 5317, 11, 16, 92, 7, 917, 891, 11, 509, 22921, 8, 198, 220, 220, 220, 311, 796, 15690, 90, 3629, 292, 5317, 11, 16, 92, 7, 917, 891, 11, 509, 22921, 8, 198, 220, 220, 220, 317, 796, 15690, 90, 43879, 2414, 11, 18, 92, 7, 917, 891, 11, 406, 5631, 16, 11, 43, 5631, 17, 11, 42, 22921, 8, 198, 220, 220, 220, 1195, 796, 15690, 90, 43879, 2414, 11, 18, 92, 7, 917, 891, 11, 27178, 48, 16, 11, 11163, 48, 17, 11, 42, 22921, 8, 198, 220, 220, 220, 8355, 11909, 1503, 796, 15690, 90, 43879, 2414, 11, 16, 92, 7, 917, 891, 11, 399, 22921, 8, 198, 220, 220, 220, 42674, 7801, 40, 796, 15690, 90, 43879, 2414, 11, 16, 92, 7, 917, 891, 11, 399, 22921, 8, 198, 220, 220, 220, 347, 20892, 796, 15690, 90, 43879, 2414, 11, 16, 92, 7, 917, 891, 11, 399, 22921, 8, 198, 220, 220, 220, 6374, 1847, 796, 15690, 90, 3629, 292, 5317, 11, 16, 92, 7, 917, 891, 11, 399, 22921, 8, 198, 220, 220, 220, 314, 33249, 796, 15690, 90, 3629, 292, 5317, 11, 16, 92, 7, 917, 891, 11, 24653, 33249, 8, 198, 220, 220, 220, 29652, 14670, 796, 15690, 90, 43879, 2414, 11, 16, 92, 7, 917, 891, 11, 27178, 33249, 8, 198, 220, 220, 220, 277, 796, 1280, 7, 19608, 7753, 553, 81, 4943, 198, 220, 220, 220, 1100, 1370, 7, 69, 8, 198, 220, 220, 220, 3691, 796, 6626, 7, 961, 1370, 7, 69, 4008, 198, 220, 220, 220, 449, 9864, 796, 220, 3691, 58, 16, 7131, 16, 60, 198, 220, 220, 220, 5550, 3697, 796, 220, 3691, 58, 17, 7131, 16, 60, 198, 220, 220, 220, 24301, 48, 796, 220, 3691, 58, 18, 7131, 16, 60, 198, 220, 220, 220, 509, 796, 21136, 7, 3629, 292, 5317, 11, 3691, 58, 19, 12962, 198, 220, 220, 220, 399, 796, 21136, 7, 3629, 292, 5317, 11, 3691, 58, 20, 12962, 198, 220, 220, 220, 367, 796, 21136, 7, 3629, 292, 5317, 11, 3691, 58, 21, 12962, 198, 220, 220, 220, 14639, 46, 796, 21136, 7, 3629, 292, 5317, 11, 3691, 58, 22, 12962, 198, 220, 220, 220, 314, 25374, 796, 21136, 7, 3629, 292, 5317, 11, 3691, 58, 23, 12962, 198, 220, 220, 220, 611, 357, 399, 27, 15, 8614, 399, 29, 45, 22921, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 33666, 18011, 399, 43641, 45, 1, 198, 220, 220, 220, 886, 628, 220, 220, 220, 3691, 796, 10903, 21737, 198, 220, 220, 220, 4808, 271, 89, 796, 509, 198, 220, 220, 220, 981, 4129, 7, 14259, 8, 1279, 4808, 271, 89, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 14259, 11, 6330, 12195, 35312, 7, 961, 1370, 7, 69, 36911, 6, 35, 6, 14804, 6, 36, 6, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 311, 58, 16, 25, 62, 271, 89, 60, 764, 28, 1582, 8044, 12195, 3629, 292, 5317, 11, 3691, 8, 628, 198, 220, 220, 220, 3691, 796, 10903, 21737, 198, 220, 220, 220, 4808, 271, 89, 11, 62, 8457, 89, 11, 62, 591, 89, 796, 357, 45, 11, 45, 11, 42, 8, 198, 220, 220, 220, 981, 4129, 7, 14259, 8, 1279, 4808, 271, 89, 9, 62, 8457, 89, 9, 62, 591, 89, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 14259, 11, 6330, 12195, 35312, 7, 961, 1370, 7, 69, 36911, 6, 35, 6, 14804, 6, 36, 6, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 479, 287, 352, 25, 62, 591, 89, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 62, 271, 89, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 72, 15, 796, 357, 72, 12, 16, 27493, 62, 8457, 89, 1343, 357, 74, 12, 16, 27493, 62, 8457, 89, 9, 62, 271, 89, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 16, 25, 62, 8457, 89, 11, 74, 60, 764, 28, 1582, 8044, 12195, 43879, 2414, 11, 3691, 29795, 72, 15, 10, 16, 25, 62, 72, 15, 10, 62, 8457, 89, 12962, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 357, 30948, 10067, 7, 24301, 48, 11, 705, 47, 6, 1267, 1267, 628, 220, 220, 220, 3691, 796, 10903, 21737, 198, 220, 220, 220, 4808, 271, 89, 796, 509, 220, 198, 220, 220, 220, 981, 4129, 7, 14259, 8, 1279, 4808, 271, 89, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 14259, 11, 6330, 12195, 35312, 7, 961, 1370, 7, 69, 36911, 6, 35, 6, 14804, 6, 36, 6, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1195, 12115, 58, 16, 25, 62, 271, 89, 60, 764, 28, 1582, 8044, 12195, 3629, 292, 5317, 11, 3691, 8, 628, 220, 220, 220, 886, 1303, 611, 198, 220, 220, 220, 1969, 7, 69, 8, 198, 2, 987, 79, 869, 352, 628, 220, 220, 220, 24890, 11, 314, 37771, 796, 12419, 2149, 2394, 13, 2022, 3070, 17457, 0, 7, 41, 9864, 11, 5550, 3697, 11, 24301, 48, 11, 1195, 12115, 11, 509, 11, 399, 11, 367, 11, 14639, 46, 11, 314, 25374, 11, 311, 11, 317, 11, 1195, 11, 8355, 11909, 1503, 11, 42674, 7801, 40, 11, 347, 20892, 11, 6374, 1847, 11, 24653, 33249, 11, 27178, 33249, 8, 198, 220, 220, 220, 2488, 9288, 24890, 6624, 657, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 40, 37771, 796, 720, 40, 37771, 4943, 628, 220, 220, 220, 611, 357, 30948, 10067, 7, 449, 9864, 11, 705, 50, 6, 1267, 8614, 30948, 10067, 7, 449, 9864, 11, 705, 51, 6, 1267, 1267, 198, 2, 987, 79, 5072, 352, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 32, 25, 4943, 198, 220, 220, 220, 4808, 10782, 796, 399, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 4808, 77, 74, 796, 509, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 317, 58, 16, 25, 62, 48624, 11, 16, 25, 62, 10782, 11, 16, 25, 62, 77, 74, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 628, 220, 220, 220, 886, 1303, 611, 198, 220, 220, 220, 611, 357, 30948, 10067, 7, 24301, 48, 11, 705, 52, 6, 1267, 8614, 30948, 10067, 7, 24301, 48, 11, 705, 40, 6, 1267, 1267, 198, 2, 987, 79, 5072, 362, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 48, 25, 4943, 198, 220, 220, 220, 4808, 10782, 796, 399, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 4808, 77, 74, 796, 509, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 1195, 58, 16, 25, 62, 48624, 11, 16, 25, 62, 10782, 11, 16, 25, 62, 77, 74, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 628, 220, 220, 220, 2073, 361, 357, 30948, 10067, 7, 24301, 48, 11, 705, 47, 6, 1267, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 329, 406, 287, 352, 25, 42, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 1195, 12115, 58, 43, 60, 29, 15, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 952, 11, 366, 31412, 33172, 48, 12115, 58, 43, 12962, 198, 2, 220, 220, 3551, 1195, 12115, 7, 406, 1267, 198, 2, 5906, 284, 15772, 3551, 9052, 25, 198, 2, 220, 3551, 357, 314, 11, 449, 11, 1195, 12115, 7, 406, 1267, 10612, 449, 796, 352, 11, 399, 220, 198, 2, 987, 79, 5072, 513, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 1195, 58, 16, 25, 45, 11, 16, 25, 45, 11, 48, 12115, 58, 43, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 952, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 611, 198, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 329, 198, 220, 220, 220, 886, 1303, 611, 198, 2, 987, 79, 5072, 604, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 1847, 11909, 1503, 25, 4943, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 8355, 11909, 1503, 58, 16, 25, 62, 48624, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 198, 198, 2, 987, 79, 5072, 642, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 1847, 47, 7801, 40, 25, 4943, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 42674, 7801, 40, 58, 16, 25, 62, 48624, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 198, 198, 2, 987, 79, 5072, 718, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 33, 20892, 25, 4943, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 347, 20892, 58, 16, 25, 62, 48624, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 198, 198, 2, 987, 79, 5072, 767, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 6173, 1847, 25, 4943, 198, 220, 220, 220, 4808, 48624, 796, 399, 198, 220, 220, 220, 905, 7, 952, 11, 366, 5239, 14, 25638, 1600, 6374, 1847, 58, 16, 25, 62, 48624, 12962, 198, 220, 220, 220, 44872, 7, 952, 8, 198, 437, 1303, 1057, 62, 2022, 3070, 17457, 3419, 198 ]
1.841868
1,777
# Do not share a stream between processes # The token would be shared so putting would give InvalidSequenceTokenException a lot struct CloudWatchLogHandler{F<:Formatter} <: Handler{F, Union{}} stream::CloudWatchLogStream channel::Channel{LogEvent} # only one task should read from this channel fmt::F end """ CloudWatchLogHandler( config::AWSConfig, log_group_name, log_stream_name, formatter::Memento.Formatter, ) Construct a Memento Handler for logging to a CloudWatch Log Stream. This constructor creates a task which asynchronously submits logs to the stream. A CloudWatch Log Event has only two properties: `timestamp` and `message`. If a `Record` has a `date` property it will be used as the `timestamp`, otherwise the current time will be captured when `Memento.emit` is called. All `DateTime`s will be assumed to be in UTC. The `message` will be generated by calling `Memento.format` on the `Record` with this handler's `formatter`. """ function CloudWatchLogHandler( config::AWSConfig, log_group_name::AbstractString, log_stream_name::AbstractString, formatter::F=DefaultFormatter(), ) where F<:Formatter ch = Channel{LogEvent}(Inf) handler = CloudWatchLogHandler( CloudWatchLogStream(config, log_group_name, log_stream_name), ch, formatter, ) tsk = @async process_logs!(handler) # channel will be closed if task fails, to avoid unknowingly discarding logs bind(ch, tsk) return handler end function process_available_logs!(handler::CloudWatchLogHandler) events = Vector{LogEvent}() batch_size = 0 while isready(handler.channel) && length(events) < MAX_BATCH_LENGTH event = fetch(handler.channel) batch_size += aws_size(event) if batch_size <= MAX_BATCH_SIZE take!(handler.channel) push!(events, event) else break end end if isempty(events) warn(LOGGER, string( "Channel was ready but no events were found. ", "Is there another task pulling logs from this handler?", )) end try @mock submit_logs(handler.stream, events) catch e warn(LOGGER, CapturedException(e, catch_backtrace())) end end """ process_logs!(handler::CloudWatchLogHandler) Continually pulls logs from the handler's channel and submits them to AWS. This function should terminate silently when the channel is closed. """ function process_logs!(handler::CloudWatchLogHandler) group = handler.stream.log_group_name stream = handler.stream.log_stream_name debug(LOGGER, "Handler for group '$group' stream '$stream' initiated") try while isopen(handler.channel) # might be able to avoid the error in this case wait(handler.channel) process_available_logs!(handler) sleep(PUTLOGEVENTS_RATE_LIMIT) # wait at least this long due to AWS rate limits end catch err if !(err isa InvalidStateException && err.state === :closed) log( LOGGER, :error, "Handler for group '$group' stream '$stream' terminated unexpectedly", ) error(LOGGER, CapturedException(err, catch_backtrace())) end end debug(LOGGER, "Handler for group '$group' stream '$stream' terminated normally") return nothing end function Memento.emit(handler::CloudWatchLogHandler, record::Record) dt = isdefined(record, :date) ? record.date : Dates.now(tz"UTC") message = format(handler.fmt, record) event = LogEvent(message, dt) put!(handler.channel, event) end
[ 2, 2141, 407, 2648, 257, 4269, 1022, 7767, 198, 2, 383, 11241, 561, 307, 4888, 523, 5137, 561, 1577, 17665, 44015, 594, 30642, 16922, 257, 1256, 198, 7249, 10130, 10723, 11187, 25060, 90, 37, 27, 25, 8479, 1436, 92, 1279, 25, 32412, 90, 37, 11, 4479, 90, 11709, 198, 220, 220, 220, 4269, 3712, 18839, 10723, 11187, 12124, 198, 220, 220, 220, 6518, 3712, 29239, 90, 11187, 9237, 92, 220, 1303, 691, 530, 4876, 815, 1100, 422, 428, 6518, 198, 220, 220, 220, 46996, 3712, 37, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 10130, 10723, 11187, 25060, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 3712, 12298, 50, 16934, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 62, 8094, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 62, 5532, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1296, 1436, 3712, 44, 972, 78, 13, 8479, 1436, 11, 198, 220, 220, 220, 1267, 198, 198, 42316, 257, 337, 972, 78, 32412, 329, 18931, 284, 257, 10130, 10723, 5972, 13860, 13, 198, 1212, 23772, 8075, 257, 4876, 543, 355, 24871, 3481, 850, 24883, 17259, 284, 262, 4269, 13, 198, 198, 32, 10130, 10723, 5972, 8558, 468, 691, 734, 6608, 25, 4600, 16514, 27823, 63, 290, 4600, 20500, 44646, 198, 198, 1532, 257, 4600, 23739, 63, 468, 257, 4600, 4475, 63, 3119, 340, 481, 307, 973, 355, 262, 4600, 16514, 27823, 47671, 4306, 262, 198, 14421, 640, 481, 307, 7907, 618, 4600, 44, 972, 78, 13, 368, 270, 63, 318, 1444, 13, 198, 3237, 4600, 10430, 7575, 63, 82, 481, 307, 9672, 284, 307, 287, 18119, 13, 198, 198, 464, 4600, 20500, 63, 481, 307, 7560, 416, 4585, 4600, 44, 972, 78, 13, 18982, 63, 319, 262, 4600, 23739, 63, 351, 428, 198, 30281, 338, 4600, 687, 1436, 44646, 198, 37811, 198, 8818, 10130, 10723, 11187, 25060, 7, 198, 220, 220, 220, 4566, 3712, 12298, 50, 16934, 11, 198, 220, 220, 220, 2604, 62, 8094, 62, 3672, 3712, 23839, 10100, 11, 198, 220, 220, 220, 2604, 62, 5532, 62, 3672, 3712, 23839, 10100, 11, 198, 220, 220, 220, 1296, 1436, 3712, 37, 28, 19463, 8479, 1436, 22784, 198, 8, 810, 376, 27, 25, 8479, 1436, 198, 220, 220, 220, 442, 796, 11102, 90, 11187, 9237, 92, 7, 18943, 8, 198, 220, 220, 220, 21360, 796, 10130, 10723, 11187, 25060, 7, 198, 220, 220, 220, 220, 220, 220, 220, 10130, 10723, 11187, 12124, 7, 11250, 11, 2604, 62, 8094, 62, 3672, 11, 2604, 62, 5532, 62, 3672, 828, 198, 220, 220, 220, 220, 220, 220, 220, 442, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1296, 1436, 11, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 256, 8135, 796, 2488, 292, 13361, 1429, 62, 6404, 82, 0, 7, 30281, 8, 198, 220, 220, 220, 1303, 6518, 481, 307, 4838, 611, 4876, 10143, 11, 284, 3368, 39472, 4420, 1221, 13493, 17259, 198, 220, 220, 220, 11007, 7, 354, 11, 256, 8135, 8, 628, 220, 220, 220, 1441, 21360, 198, 437, 198, 198, 8818, 1429, 62, 15182, 62, 6404, 82, 0, 7, 30281, 3712, 18839, 10723, 11187, 25060, 8, 198, 220, 220, 220, 2995, 796, 20650, 90, 11187, 9237, 92, 3419, 198, 220, 220, 220, 15458, 62, 7857, 796, 657, 628, 220, 220, 220, 981, 318, 1493, 7, 30281, 13, 17620, 8, 11405, 4129, 7, 31534, 8, 1279, 25882, 62, 33, 11417, 62, 43, 49494, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 21207, 7, 30281, 13, 17620, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15458, 62, 7857, 15853, 3253, 82, 62, 7857, 7, 15596, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 15458, 62, 7857, 19841, 25882, 62, 33, 11417, 62, 33489, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1011, 0, 7, 30281, 13, 17620, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 1785, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 318, 28920, 7, 31534, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9828, 7, 25294, 30373, 11, 4731, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 29239, 373, 3492, 475, 645, 2995, 547, 1043, 13, 33172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3792, 612, 1194, 4876, 10427, 17259, 422, 428, 21360, 35379, 198, 220, 220, 220, 220, 220, 220, 220, 15306, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 76, 735, 9199, 62, 6404, 82, 7, 30281, 13, 5532, 11, 2995, 8, 198, 220, 220, 220, 4929, 304, 198, 220, 220, 220, 220, 220, 220, 220, 9828, 7, 25294, 30373, 11, 6790, 1522, 16922, 7, 68, 11, 4929, 62, 1891, 40546, 3419, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1429, 62, 6404, 82, 0, 7, 30281, 3712, 18839, 10723, 11187, 25060, 8, 198, 198, 17875, 935, 16194, 17259, 422, 262, 21360, 338, 6518, 290, 850, 24883, 606, 284, 30865, 13, 198, 1212, 2163, 815, 23654, 24595, 618, 262, 6518, 318, 4838, 13, 198, 37811, 198, 8818, 1429, 62, 6404, 82, 0, 7, 30281, 3712, 18839, 10723, 11187, 25060, 8, 198, 220, 220, 220, 1448, 796, 21360, 13, 5532, 13, 6404, 62, 8094, 62, 3672, 198, 220, 220, 220, 4269, 796, 21360, 13, 5532, 13, 6404, 62, 5532, 62, 3672, 628, 220, 220, 220, 14257, 7, 25294, 30373, 11, 366, 25060, 329, 1448, 705, 3, 8094, 6, 4269, 705, 3, 5532, 6, 16862, 4943, 628, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 981, 318, 9654, 7, 30281, 13, 17620, 8, 220, 1303, 1244, 307, 1498, 284, 3368, 262, 4049, 287, 428, 1339, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4043, 7, 30281, 13, 17620, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1429, 62, 15182, 62, 6404, 82, 0, 7, 30281, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3993, 7, 30076, 25294, 20114, 15365, 62, 49, 6158, 62, 43, 3955, 2043, 8, 220, 1303, 4043, 379, 1551, 428, 890, 2233, 284, 30865, 2494, 7095, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 4929, 11454, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 7, 8056, 318, 64, 17665, 9012, 16922, 11405, 11454, 13, 5219, 24844, 1058, 20225, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 18224, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 25060, 329, 1448, 705, 3, 8094, 6, 4269, 705, 3, 5532, 6, 23083, 25884, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 25294, 30373, 11, 6790, 1522, 16922, 7, 8056, 11, 4929, 62, 1891, 40546, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 14257, 7, 25294, 30373, 11, 366, 25060, 329, 1448, 705, 3, 8094, 6, 4269, 705, 3, 5532, 6, 23083, 7685, 4943, 628, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 337, 972, 78, 13, 368, 270, 7, 30281, 3712, 18839, 10723, 11187, 25060, 11, 1700, 3712, 23739, 8, 198, 220, 220, 220, 288, 83, 796, 318, 23211, 7, 22105, 11, 1058, 4475, 8, 5633, 1700, 13, 4475, 1058, 44712, 13, 2197, 7, 22877, 1, 17429, 4943, 198, 220, 220, 220, 3275, 796, 5794, 7, 30281, 13, 69, 16762, 11, 1700, 8, 198, 220, 220, 220, 1785, 796, 5972, 9237, 7, 20500, 11, 288, 83, 8, 198, 220, 220, 220, 1234, 0, 7, 30281, 13, 17620, 11, 1785, 8, 198, 437, 198 ]
2.657081
1,391
##### multi dimensional advection ##### For incompressible model only ##### calculate tendencies in x direction @kernel function calc_Gcˣ_kernel!(Gc, c, u, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds Gc[ii, jj, kk] = adv_flux_x(ii, jj, kk, g, u, c, ΔT) end function calc_Gcsˣ!(Gcs, nut, u, g::AbstractGrid, ΔT, arch::Architecture) kernel! = calc_Gcˣ_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(Gcs[name].data, nut[name].data, u, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end ##### calculate tendencies in y direction @kernel function calc_Gcʸ_kernel!(Gc, c, v, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds Gc[ii, jj, kk] = adv_flux_y(ii, jj, kk, g, v, c, ΔT) end function calc_Gcsʸ!(Gcs, nut, v, g::AbstractGrid, ΔT, arch::Architecture) kernel! = calc_Gcʸ_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(Gcs[name].data, nut[name].data, v, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end ##### calculate tendencies in z direction @kernel function calc_Gcᶻ_kernel!(Gc, c, w, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds Gc[ii, jj, kk] = adv_flux_z(ii, jj, kk, g, w, c, ΔT) end function calc_Gcsᶻ!(Gcs, nut, w, g::AbstractGrid, ΔT, arch::Architecture) kernel! = calc_Gcᶻ_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(Gcs[name].data, nut[name].data, w, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end ##### apply the tendency in x direction to tracer c @kernel function multi_dim_x_kernel!(ctemp, Gc, c, u, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds ctemp[ii, jj, kk] -= ΔT / volume(ii, jj, kk, g) * (δx⁺(ii, jj, kk, Gc, g) - c[ii, jj, kk] * δx⁺(ii, jj, kk, g, Trans_x, u)) end function multi_dim_x!(nut_temp, Gcs, nut, u, g::AbstractGrid, ΔT, arch::Architecture) kernel! = multi_dim_x_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(nut_temp[name].data, Gcs[name].data, nut[name].data, u, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end ##### apply the tendency in y direction to tracer c @kernel function multi_dim_y_kernel!(ctemp, Gc, c, v, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds ctemp[ii, jj, kk] -= ΔT / volume(ii, jj, kk, g) * (δy⁺(ii, jj, kk, Gc, g) - c[ii, jj, kk] * δy⁺(ii, jj, kk, g, Trans_y, v )) end function multi_dim_y!(nut_temp, Gcs, nut, v, g::AbstractGrid, ΔT, arch::Architecture) kernel! = multi_dim_y_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(nut_temp[name].data, Gcs[name].data, nut[name].data, v, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end ##### apply the tendency in z direction to tracer c @kernel function multi_dim_z_kernel!(ctemp, Gc, c, w, g::AbstractGrid, ΔT) i, j, k = @index(Global, NTuple) ### offset index for halo points ii = i + g.Hx jj = j + g.Hy kk = k + g.Hz @inbounds ctemp[ii, jj, kk] -= ΔT / volume(ii, jj, kk, g) * (δz⁺(ii, jj, kk, Gc, g) - c[ii, jj, kk] * δz⁺(ii, jj, kk, g, Trans_z, w )) end function multi_dim_z!(nut_temp, Gcs, nut, w, g::AbstractGrid, ΔT, arch::Architecture) kernel! = multi_dim_z_kernel!(device(arch), (16,16), (g.Nx, g.Ny, g.Nz)) barrier = Event(device(arch)) events = [] for name in nut_names event = kernel!(nut_temp[name].data, Gcs[name].data, nut[name].data, w, g, ΔT, dependencies=barrier) push!(events,event) end wait(device(arch), MultiEvent(Tuple(events))) return nothing end function calc_nut_tendency!(a, b, c, ΔT) for name in nut_names @inbounds a[name].data .= b[name].data .- c[name].data end end function nut_advection!(nut, nut_temp, Gcs, vel, g::AbstractGrid, ΔT, arch::Architecture) for name in nut_names @inbounds nut_temp[name].data .= nut[name].data end ##### x direction calc_Gcsˣ!(Gcs, nut_temp, vel.u.data, g, ΔT, arch) fill_halo_Gcs!(Gcs, g) multi_dim_x!(nut_temp, Gcs, nut, vel.u.data, g, ΔT, arch) fill_halo_nut!(nut_temp, g) ##### y direction calc_Gcsʸ!(Gcs, nut_temp, vel.v.data, g, ΔT, arch) fill_halo_Gcs!(Gcs, g) multi_dim_y!(nut_temp, Gcs, nut, vel.v.data, g, ΔT, arch) fill_halo_nut!(nut_temp, g) ##### z direction calc_Gcsᶻ!(Gcs, nut_temp, vel.w.data, g, ΔT, arch) fill_halo_Gcs!(Gcs, g) multi_dim_z!(nut_temp, Gcs, nut, vel.w.data, g, ΔT, arch) fill_halo_nut!(nut_temp, g) calc_nut_tendency!(Gcs, nut_temp, nut, ΔT) end
[ 4242, 2, 5021, 38517, 512, 303, 596, 198, 4242, 2, 1114, 13352, 601, 856, 2746, 691, 198, 4242, 2, 15284, 25671, 287, 2124, 4571, 198, 31, 33885, 2163, 42302, 62, 38, 66, 135, 96, 62, 33885, 0, 7, 38, 66, 11, 269, 11, 334, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 402, 66, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 796, 1354, 62, 69, 22564, 62, 87, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 334, 11, 269, 11, 37455, 51, 8, 198, 437, 198, 8818, 42302, 62, 38, 6359, 135, 96, 0, 7, 38, 6359, 11, 6701, 11, 334, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 42302, 62, 38, 66, 135, 96, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 38, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 334, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 4242, 2, 15284, 25671, 287, 331, 4571, 198, 31, 33885, 2163, 42302, 62, 38, 66, 134, 116, 62, 33885, 0, 7, 38, 66, 11, 269, 11, 410, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 402, 66, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 796, 1354, 62, 69, 22564, 62, 88, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 410, 11, 269, 11, 37455, 51, 8, 198, 437, 198, 8818, 42302, 62, 38, 6359, 134, 116, 0, 7, 38, 6359, 11, 6701, 11, 410, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 42302, 62, 38, 66, 134, 116, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 38, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 410, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 4242, 2, 15284, 25671, 287, 1976, 4571, 198, 31, 33885, 2163, 42302, 62, 38, 66, 157, 114, 119, 62, 33885, 0, 7, 38, 66, 11, 269, 11, 266, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 402, 66, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 796, 1354, 62, 69, 22564, 62, 89, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 266, 11, 269, 11, 37455, 51, 8, 198, 437, 198, 8818, 42302, 62, 38, 6359, 157, 114, 119, 0, 7, 38, 6359, 11, 6701, 11, 266, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 42302, 62, 38, 66, 157, 114, 119, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 38, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 266, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 4242, 2, 4174, 262, 13542, 287, 2124, 4571, 284, 491, 11736, 269, 198, 31, 33885, 2163, 5021, 62, 27740, 62, 87, 62, 33885, 0, 7, 310, 45787, 11, 402, 66, 11, 269, 11, 334, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 269, 29510, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 48185, 37455, 51, 1220, 6115, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 8, 1635, 357, 138, 112, 87, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 402, 66, 11, 308, 8, 532, 269, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 1635, 7377, 112, 87, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 3602, 62, 87, 11, 334, 4008, 198, 437, 198, 8818, 5021, 62, 27740, 62, 87, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 334, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 5021, 62, 27740, 62, 87, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 14930, 62, 29510, 58, 3672, 4083, 7890, 11, 402, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 334, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 4242, 2, 4174, 262, 13542, 287, 331, 4571, 284, 491, 11736, 269, 198, 31, 33885, 2163, 5021, 62, 27740, 62, 88, 62, 33885, 0, 7, 310, 45787, 11, 402, 66, 11, 269, 11, 410, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 269, 29510, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 48185, 37455, 51, 1220, 6115, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 8, 1635, 357, 138, 112, 88, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 402, 66, 11, 308, 8, 532, 269, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 1635, 7377, 112, 88, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 3602, 62, 88, 11, 410, 15306, 198, 437, 198, 8818, 5021, 62, 27740, 62, 88, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 410, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 5021, 62, 27740, 62, 88, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 14930, 62, 29510, 58, 3672, 4083, 7890, 11, 402, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 410, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 4242, 2, 4174, 262, 13542, 287, 1976, 4571, 284, 491, 11736, 269, 198, 31, 33885, 2163, 5021, 62, 27740, 62, 89, 62, 33885, 0, 7, 310, 45787, 11, 402, 66, 11, 269, 11, 266, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 44386, 11677, 6376, 329, 289, 7335, 2173, 198, 220, 220, 220, 21065, 796, 1312, 1343, 308, 13, 39, 87, 198, 220, 220, 220, 474, 73, 796, 474, 1343, 308, 13, 21217, 198, 220, 220, 220, 479, 74, 796, 479, 1343, 308, 13, 7399, 198, 220, 220, 220, 2488, 259, 65, 3733, 269, 29510, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 48185, 37455, 51, 1220, 6115, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 8, 1635, 357, 138, 112, 89, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 402, 66, 11, 308, 8, 532, 269, 58, 4178, 11, 474, 73, 11, 479, 74, 60, 1635, 7377, 112, 89, 46256, 118, 7, 4178, 11, 474, 73, 11, 479, 74, 11, 308, 11, 3602, 62, 89, 11, 266, 15306, 198, 437, 198, 8818, 5021, 62, 27740, 62, 89, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 266, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 9720, 0, 796, 5021, 62, 27740, 62, 89, 62, 33885, 0, 7, 25202, 7, 998, 828, 357, 1433, 11, 1433, 828, 357, 70, 13, 45, 87, 11, 308, 13, 45, 88, 11, 308, 13, 45, 89, 4008, 198, 220, 220, 220, 13054, 796, 8558, 7, 25202, 7, 998, 4008, 198, 220, 220, 220, 2995, 796, 17635, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 1785, 796, 9720, 0, 7, 14930, 62, 29510, 58, 3672, 4083, 7890, 11, 402, 6359, 58, 3672, 4083, 7890, 11, 6701, 58, 3672, 4083, 7890, 11, 266, 11, 308, 11, 37455, 51, 11, 20086, 28, 5657, 5277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31534, 11, 15596, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4043, 7, 25202, 7, 998, 828, 15237, 9237, 7, 51, 29291, 7, 31534, 22305, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 42302, 62, 14930, 62, 83, 437, 1387, 0, 7, 64, 11, 275, 11, 269, 11, 37455, 51, 8, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 257, 58, 3672, 4083, 7890, 764, 28, 275, 58, 3672, 4083, 7890, 764, 12, 269, 58, 3672, 4083, 7890, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 6701, 62, 324, 303, 596, 0, 7, 14930, 11, 6701, 62, 29510, 11, 402, 6359, 11, 11555, 11, 308, 3712, 23839, 41339, 11, 37455, 51, 11, 3934, 3712, 19895, 5712, 495, 8, 198, 220, 220, 220, 329, 1438, 287, 6701, 62, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 6701, 62, 29510, 58, 3672, 4083, 7890, 764, 28, 6701, 58, 3672, 4083, 7890, 198, 220, 220, 220, 886, 198, 220, 220, 220, 46424, 2124, 4571, 198, 220, 220, 220, 42302, 62, 38, 6359, 135, 96, 0, 7, 38, 6359, 11, 6701, 62, 29510, 11, 11555, 13, 84, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 38, 6359, 0, 7, 38, 6359, 11, 308, 8, 198, 220, 220, 220, 5021, 62, 27740, 62, 87, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 11555, 13, 84, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 14930, 0, 7, 14930, 62, 29510, 11, 308, 8, 628, 220, 220, 220, 46424, 331, 4571, 198, 220, 220, 220, 42302, 62, 38, 6359, 134, 116, 0, 7, 38, 6359, 11, 6701, 62, 29510, 11, 11555, 13, 85, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 38, 6359, 0, 7, 38, 6359, 11, 308, 8, 198, 220, 220, 220, 5021, 62, 27740, 62, 88, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 11555, 13, 85, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 14930, 0, 7, 14930, 62, 29510, 11, 308, 8, 628, 220, 220, 220, 46424, 1976, 4571, 198, 220, 220, 220, 42302, 62, 38, 6359, 157, 114, 119, 0, 7, 38, 6359, 11, 6701, 62, 29510, 11, 11555, 13, 86, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 38, 6359, 0, 7, 38, 6359, 11, 308, 8, 198, 220, 220, 220, 5021, 62, 27740, 62, 89, 0, 7, 14930, 62, 29510, 11, 402, 6359, 11, 6701, 11, 11555, 13, 86, 13, 7890, 11, 308, 11, 37455, 51, 11, 3934, 8, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 14930, 0, 7, 14930, 62, 29510, 11, 308, 8, 628, 220, 220, 220, 42302, 62, 14930, 62, 83, 437, 1387, 0, 7, 38, 6359, 11, 6701, 62, 29510, 11, 6701, 11, 37455, 51, 8, 198, 198, 437 ]
2.133333
2,715
# Using the ZigZagBoomerang with Turing with the BouncyParticle sampler # (The approach taken here is retrieving the likelihood function from Turing and sampling # directly with ZigZagBoomerang and not using Turings `AbstractMCMC` ) using Turing using ZigZagBoomerang const ZZB = ZigZagBoomerang using LinearAlgebra const ∅ = nothing using DelimitedFiles include("plot_chain.jl") # simple visualization of chains with GLMakie # define Turing Logit regression model # following https://github.com/TuringLang/Turing.jl/blob/master/benchmarks/nuts/lr.jl @model lr_nuts(x, y, σ) = begin N,D = size(x) α ~ Normal(0, σ) β ~ MvNormal(zeros(D), ones(D)*σ) for n = 1:N y[n] ~ BinomialLogit(1, dot(x[n,:], β) + α) end end # read data function readlrdata() fname = joinpath(dirname(@__FILE__), "lr_nuts.data") z = readdlm(fname) x = z[:,1:end-1] y = z[:,end] .- 1 return x, y end x, y = readlrdata() # define problem model = lr_nuts(x, y, 100.0) # sample First with Turing and Nuts n_samples = 1_000 # Sampling parameter settings nuts_chain = @time sample(model, NUTS(0.65), n_samples) # (a bit frickle, sometimes adapts wrong) # sampling took 383 s # plot NUTS fig2 = plot_chain(1:n_samples, collect(eachrow(dropdims(nuts_chain[nuts_chain.name_map.parameters].value.data, dims=3)) )) save("lrnuts.png", fig2) # sample with ZigZagBoomerang using ForwardDiff using ForwardDiff: Dual, value """ make_gradient_and_dhessian_logp(turingmodel) -> ∇nlogp! Gradient of negative log-likelihood and second derivative in direction of movement Following https://github.com/TuringLang/Turing.jl/blob/master/src/core/ad.jl """ function make_gradient_and_dhessian_neglogp( model::Turing.Model, sampler=Turing.SampleFromPrior(), ctx::Turing.DynamicPPL.AbstractContext = DynamicPPL.DefaultContext() ) vi = Turing.VarInfo(model) # define function to compute log joint. function ℓ(θ) new_vi = Turing.VarInfo(vi, sampler, θ) model(new_vi, sampler, ctx) logp = Turing.getlogp(new_vi) return logp end return function (y, t, x, θ, args...) x_ = x + Dual{:hSrkahPmmC}(0.0, 1.0)*θ y_ = ForwardDiff.gradient(x->-ℓ(x), x_) y .= value.(y_) y, dot(θ, y_).partials[] end end ∇neglogp! = make_gradient_and_dhessian_neglogp(model) d = 1 + 24 # number of parameters t0 = 0.0 x0 = zeros(d) # starting point sampler θ0 = randn(d) # starting direction sampler T = 200. # end time (similar to number of samples in MCMC) c = 50.0 # initial guess for the bound # define BouncyParticle sampler (has two relevant parameters) Z = BouncyParticle(∅, ∅, # ignored 10.0, # momentum refreshment rate 0.95, # momentum correlation / only gradually change momentum in refreshment/momentum update 0.0 # ignored ) trace, final, (acc, num), cs = @time pdmp(∇neglogp!, # problem t0, x0, θ0, T, # initial state and duration ZZB.LocalBound(c), # use Hessian information Z; # sampler adapt=true, # adapt bound c progress=true, # show progress bar subsample=true # keep only samples at refreshment times ) # took 272 s # obtain direction change times and points of piecewise linear trace t, x = ZigZagBoomerang.sep(trace) # plot bouncy particle sampler fig3 = plot_chain(t, x, false) save("lrbouncy.png", fig3) # check visually # lines(mean(trace)) # lines!(mean(nuts_chain).nt[:mean]) # show both in one plot fig4 = plot_chain(1:n_samples, collect(eachrow(dropdims(nuts_chain[nuts_chain.name_map.parameters].value.data, dims=3)) ), color=:red, title="Green: Bouncy Particle. Red: NUTS.") fig4 = plot_chain!(fig4, t*n_samples/T, x, false, color=:green) save("lrboth.png", fig4)
[ 2, 8554, 262, 24992, 57, 363, 33, 4207, 263, 648, 351, 39141, 351, 262, 347, 977, 948, 7841, 1548, 6072, 20053, 198, 2, 357, 464, 3164, 2077, 994, 318, 50122, 262, 14955, 2163, 422, 39141, 290, 19232, 198, 2, 3264, 351, 24992, 57, 363, 33, 4207, 263, 648, 290, 407, 1262, 3831, 654, 4600, 23839, 9655, 9655, 63, 1267, 198, 198, 3500, 39141, 198, 3500, 24992, 57, 363, 33, 4207, 263, 648, 220, 198, 9979, 1168, 57, 33, 796, 24992, 57, 363, 33, 4207, 263, 648, 220, 198, 3500, 44800, 2348, 29230, 198, 9979, 18872, 227, 796, 2147, 198, 3500, 4216, 320, 863, 25876, 198, 198, 17256, 7203, 29487, 62, 7983, 13, 20362, 4943, 1303, 2829, 32704, 286, 14659, 351, 10188, 44, 461, 494, 198, 198, 2, 8160, 39141, 5972, 270, 20683, 2746, 220, 198, 2, 1708, 3740, 1378, 12567, 13, 785, 14, 51, 870, 43, 648, 14, 51, 870, 13, 20362, 14, 2436, 672, 14, 9866, 14, 26968, 14306, 14, 31381, 14, 14050, 13, 20362, 198, 31, 19849, 300, 81, 62, 31381, 7, 87, 11, 331, 11, 18074, 225, 8, 796, 2221, 628, 220, 220, 220, 399, 11, 35, 796, 2546, 7, 87, 8, 628, 220, 220, 220, 26367, 5299, 14435, 7, 15, 11, 18074, 225, 8, 198, 220, 220, 220, 27169, 5299, 337, 85, 26447, 7, 9107, 418, 7, 35, 828, 3392, 7, 35, 27493, 38392, 8, 628, 220, 220, 220, 329, 299, 796, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 331, 58, 77, 60, 5299, 20828, 49070, 11187, 270, 7, 16, 11, 16605, 7, 87, 58, 77, 11, 25, 4357, 27169, 8, 1343, 26367, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 1100, 1366, 198, 8818, 1100, 75, 4372, 1045, 3419, 198, 220, 220, 220, 277, 3672, 796, 4654, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, 366, 14050, 62, 31381, 13, 7890, 4943, 198, 220, 220, 220, 1976, 796, 1100, 25404, 76, 7, 69, 3672, 8, 198, 220, 220, 220, 2124, 796, 1976, 58, 45299, 16, 25, 437, 12, 16, 60, 198, 220, 220, 220, 331, 796, 1976, 58, 45299, 437, 60, 764, 12, 352, 198, 220, 220, 220, 1441, 2124, 11, 331, 198, 437, 198, 87, 11, 331, 796, 1100, 75, 4372, 1045, 3419, 198, 198, 2, 8160, 1917, 198, 19849, 796, 300, 81, 62, 31381, 7, 87, 11, 331, 11, 1802, 13, 15, 8, 628, 198, 2, 6291, 3274, 351, 39141, 290, 399, 5500, 198, 198, 77, 62, 82, 12629, 796, 352, 62, 830, 1303, 3409, 11347, 11507, 6460, 198, 31381, 62, 7983, 796, 2488, 2435, 6291, 7, 19849, 11, 399, 3843, 50, 7, 15, 13, 2996, 828, 299, 62, 82, 12629, 8, 1303, 357, 64, 1643, 1216, 39423, 11, 3360, 6068, 82, 2642, 8, 198, 2, 19232, 1718, 49814, 264, 220, 198, 198, 2, 7110, 399, 3843, 50, 198, 5647, 17, 796, 7110, 62, 7983, 7, 16, 25, 77, 62, 82, 12629, 11, 2824, 7, 27379, 808, 7, 14781, 67, 12078, 7, 31381, 62, 7983, 58, 31381, 62, 7983, 13, 3672, 62, 8899, 13, 17143, 7307, 4083, 8367, 13, 7890, 11, 5391, 82, 28, 18, 4008, 15306, 198, 21928, 7203, 14050, 31381, 13, 11134, 1600, 2336, 17, 8, 628, 198, 2, 6291, 351, 24992, 57, 363, 33, 4207, 263, 648, 198, 198, 3500, 19530, 28813, 198, 3500, 19530, 28813, 25, 20446, 11, 1988, 198, 37811, 198, 220, 220, 220, 787, 62, 49607, 62, 392, 62, 67, 33979, 666, 62, 6404, 79, 7, 83, 870, 19849, 8, 4613, 18872, 229, 77, 6404, 79, 0, 198, 198, 42731, 1153, 286, 4633, 2604, 12, 2339, 11935, 290, 1218, 27255, 287, 4571, 286, 3356, 220, 198, 198, 14291, 3740, 1378, 12567, 13, 785, 14, 51, 870, 43, 648, 14, 51, 870, 13, 20362, 14, 2436, 672, 14, 9866, 14, 10677, 14, 7295, 14, 324, 13, 20362, 198, 37811, 198, 8818, 787, 62, 49607, 62, 392, 62, 67, 33979, 666, 62, 710, 4743, 519, 79, 7, 198, 220, 220, 220, 2746, 3712, 51, 870, 13, 17633, 11, 198, 220, 220, 220, 6072, 20053, 28, 51, 870, 13, 36674, 4863, 22442, 22784, 198, 220, 220, 220, 269, 17602, 3712, 51, 870, 13, 44090, 47, 6489, 13, 23839, 21947, 796, 26977, 47, 6489, 13, 19463, 21947, 3419, 198, 8, 198, 220, 220, 220, 25357, 796, 39141, 13, 19852, 12360, 7, 19849, 8, 628, 220, 220, 220, 1303, 8160, 2163, 284, 24061, 2604, 6466, 13, 198, 220, 220, 220, 2163, 2343, 226, 241, 7, 138, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 8903, 796, 39141, 13, 19852, 12360, 7, 8903, 11, 6072, 20053, 11, 7377, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 7, 3605, 62, 8903, 11, 6072, 20053, 11, 269, 17602, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 79, 796, 39141, 13, 1136, 6404, 79, 7, 3605, 62, 8903, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 79, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2163, 357, 88, 11, 256, 11, 2124, 11, 7377, 116, 11, 26498, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 796, 2124, 1343, 20446, 90, 25, 71, 50, 81, 74, 993, 47, 3020, 34, 92, 7, 15, 13, 15, 11, 352, 13, 15, 27493, 138, 116, 198, 220, 220, 220, 220, 220, 220, 220, 331, 62, 796, 19530, 28813, 13, 49607, 7, 87, 3784, 12, 158, 226, 241, 7, 87, 828, 2124, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 764, 28, 1988, 12195, 88, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 11, 16605, 7, 138, 116, 11, 331, 62, 737, 3911, 8231, 21737, 198, 220, 220, 220, 886, 198, 437, 628, 198, 24861, 229, 710, 4743, 519, 79, 0, 796, 787, 62, 49607, 62, 392, 62, 67, 33979, 666, 62, 710, 4743, 519, 79, 7, 19849, 8, 198, 198, 67, 796, 352, 1343, 1987, 1303, 1271, 286, 10007, 220, 198, 83, 15, 796, 657, 13, 15, 198, 87, 15, 796, 1976, 27498, 7, 67, 8, 1303, 3599, 966, 6072, 20053, 198, 138, 116, 15, 796, 43720, 77, 7, 67, 8, 1303, 3599, 4571, 6072, 20053, 198, 51, 796, 939, 13, 1303, 886, 640, 357, 38610, 284, 1271, 286, 8405, 287, 13122, 9655, 8, 198, 66, 796, 2026, 13, 15, 1303, 4238, 4724, 329, 262, 5421, 198, 198, 2, 8160, 347, 977, 948, 7841, 1548, 6072, 20053, 357, 10134, 734, 5981, 10007, 8, 220, 198, 57, 796, 347, 977, 948, 7841, 1548, 7, 24861, 227, 11, 18872, 227, 11, 1303, 9514, 198, 220, 220, 220, 838, 13, 15, 11, 1303, 12858, 14976, 434, 2494, 220, 198, 220, 220, 220, 657, 13, 3865, 11, 1303, 12858, 16096, 1220, 691, 11835, 1487, 12858, 287, 14976, 434, 14, 32542, 298, 388, 4296, 198, 220, 220, 220, 657, 13, 15, 1303, 9514, 198, 8, 220, 198, 198, 40546, 11, 2457, 11, 357, 4134, 11, 997, 828, 50115, 796, 2488, 2435, 279, 67, 3149, 7, 24861, 229, 710, 4743, 519, 79, 28265, 1303, 1917, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15, 11, 2124, 15, 11, 7377, 116, 15, 11, 309, 11, 1303, 4238, 1181, 290, 9478, 198, 220, 220, 220, 220, 220, 220, 220, 1168, 57, 33, 13, 14565, 49646, 7, 66, 828, 1303, 779, 46305, 666, 1321, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1168, 26, 1303, 6072, 20053, 198, 220, 220, 220, 220, 220, 220, 220, 6068, 28, 7942, 11, 1303, 6068, 5421, 269, 198, 220, 220, 220, 220, 220, 220, 220, 4371, 28, 7942, 11, 1303, 905, 4371, 2318, 198, 220, 220, 220, 220, 220, 220, 220, 6352, 1403, 28, 7942, 1303, 1394, 691, 8405, 379, 14976, 434, 1661, 198, 8, 198, 2, 1718, 38107, 264, 198, 198, 2, 7330, 4571, 1487, 1661, 290, 2173, 286, 3704, 3083, 14174, 12854, 198, 83, 11, 2124, 796, 24992, 57, 363, 33, 4207, 263, 648, 13, 325, 79, 7, 40546, 8, 628, 198, 2, 7110, 31283, 948, 18758, 6072, 20053, 198, 5647, 18, 796, 7110, 62, 7983, 7, 83, 11, 2124, 11, 3991, 8, 198, 21928, 7203, 14050, 65, 977, 948, 13, 11134, 1600, 2336, 18, 8, 198, 198, 2, 2198, 22632, 220, 198, 2, 3951, 7, 32604, 7, 40546, 4008, 198, 2, 3951, 0, 7, 32604, 7, 31381, 62, 7983, 737, 429, 58, 25, 32604, 12962, 198, 198, 2, 905, 1111, 287, 530, 7110, 198, 5647, 19, 796, 7110, 62, 7983, 7, 16, 25, 77, 62, 82, 12629, 11, 2824, 7, 27379, 808, 7, 14781, 67, 12078, 7, 31381, 62, 7983, 58, 31381, 62, 7983, 13, 3672, 62, 8899, 13, 17143, 7307, 4083, 8367, 13, 7890, 11, 5391, 82, 28, 18, 4008, 10612, 220, 198, 220, 220, 220, 3124, 28, 25, 445, 11, 3670, 2625, 13719, 25, 347, 977, 948, 2142, 1548, 13, 2297, 25, 399, 3843, 50, 19570, 198, 5647, 19, 796, 7110, 62, 7983, 0, 7, 5647, 19, 11, 256, 9, 77, 62, 82, 12629, 14, 51, 11, 2124, 11, 3991, 11, 3124, 28, 25, 14809, 8, 198, 21928, 7203, 14050, 16885, 13, 11134, 1600, 2336, 19, 8, 220, 198 ]
2.486469
1,515
###################################################################### # Additional errors used in the library. # ----- # Licensed under MIT License export CancellationError struct CancellationError <: Exception what end CancellationError() = CancellationError(nothing) function Base.showerror(io::IO, err::CancellationError) print(io, "Cancelled") if err.what !== nothing print(io, ": ") print(io, err.what) end end export TimeoutError struct TimeoutError <: Exception message::String end TimeoutError() = TimeoutError("") function Base.showerror(io::IO, err::TimeoutError) if isempty(err.message) print(io, "Timeout") else print(io, "Timeout: $(err.message)") end end
[ 29113, 29113, 4242, 2235, 198, 2, 15891, 8563, 973, 287, 262, 5888, 13, 198, 2, 37404, 198, 2, 49962, 739, 17168, 13789, 198, 198, 39344, 43780, 297, 341, 12331, 198, 7249, 43780, 297, 341, 12331, 1279, 25, 35528, 198, 220, 220, 220, 644, 198, 437, 198, 34, 590, 297, 341, 12331, 3419, 796, 43780, 297, 341, 12331, 7, 22366, 8, 198, 198, 8818, 7308, 13, 1477, 789, 1472, 7, 952, 3712, 9399, 11, 11454, 3712, 34, 590, 297, 341, 12331, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 34, 590, 3353, 4943, 198, 220, 220, 220, 611, 11454, 13, 10919, 5145, 855, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 11454, 13, 10919, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 39344, 3862, 448, 12331, 198, 7249, 3862, 448, 12331, 1279, 25, 35528, 198, 220, 220, 220, 3275, 3712, 10100, 198, 437, 198, 48031, 12331, 3419, 796, 3862, 448, 12331, 7203, 4943, 198, 198, 8818, 7308, 13, 1477, 789, 1472, 7, 952, 3712, 9399, 11, 11454, 3712, 48031, 12331, 8, 198, 220, 220, 220, 611, 318, 28920, 7, 8056, 13, 20500, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 48031, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 48031, 25, 29568, 8056, 13, 20500, 8, 4943, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.882813
256
@inline function initialize!(integrator,cache::ExplicitRKConstantCache,f=integrator.f) integrator.kshortsize = 2 integrator.k = eltype(integrator.sol.k)(integrator.kshortsize) integrator.fsalfirst = f(integrator.t,integrator.uprev) end @inline function perform_step!(integrator,cache::ExplicitRKConstantCache,f=integrator.f) @unpack t,dt,uprev,u = integrator @unpack A,c,α,αEEst,stages = cache @unpack kk = cache # Calc First kk[1] = integrator.fsalfirst # Calc Middle for i = 2:stages-1 utilde = zero(kk[1]) for j = 1:i-1 utilde = @muladd utilde + A[j,i]*kk[j] end kk[i] = f(@muladd(t+c[i]*dt),@muladd(uprev+dt*utilde)); end #Calc Last utilde = zero(kk[1]) for j = 1:stages-1 utilde = @muladd utilde + A[j,end]*kk[j] end kk[end] = f(@muladd(t+c[end]*dt),@muladd(uprev+dt*utilde)); integrator.fsallast = kk[end] # Uses fsallast as temp even if not fsal # Accumulate Result utilde = α[1]*kk[1] for i = 2:stages utilde = @muladd utilde + α[i]*kk[i] end u = @muladd uprev + dt*utilde if integrator.opts.adaptive uEEst = αEEst[1]*kk[1] for i = 2:stages uEEst = @muladd uEEst + αEEst[i]*kk[i] end integrator.EEst = integrator.opts.internalnorm( dt*(utilde-uEEst)./@muladd(integrator.opts.abstol+max(abs.(uprev),abs.(u))*integrator.opts.reltol)) end if isfsal(integrator.alg.tableau) integrator.fsallast = kk[end] else integrator.fsallast = f(t+dt,u) end integrator.k[1] = integrator.fsalfirst integrator.k[2] = integrator.fsallast @pack integrator = t,dt,u end @inline function initialize!(integrator,cache::ExplicitRKCache,f=integrator.f) integrator.kshortsize = 2 integrator.fsallast = cache.fsallast integrator.fsalfirst = cache.kk[1] integrator.k = eltype(integrator.sol.k)(integrator.kshortsize) integrator.k[1] = integrator.fsalfirst integrator.k[2] = integrator.fsallast f(integrator.t,integrator.uprev,integrator.fsalfirst) # Pre-start fsal end @inline function perform_step!(integrator,cache::ExplicitRKCache,f=integrator.f) @unpack t,dt,uprev,u,k = integrator uidx = eachindex(integrator.uprev) @unpack A,c,α,αEEst,stages = cache.tab @unpack kk,utilde,tmp,atmp,uEEst = cache # Middle for i = 2:stages-1 for l in uidx utilde[l] = zero(kk[1][1]) end for j = 1:i-1 for l in uidx utilde[l] = @muladd utilde[l] + A[j,i]*kk[j][l] end end for l in uidx tmp[l] = @muladd uprev[l]+dt*utilde[l] end f(@muladd(t+c[i]*dt),tmp,kk[i]) end #Last for l in uidx utilde[l] = zero(kk[1][1]) end for j = 1:stages-1 for l in uidx utilde[l] = @muladd utilde[l] + A[j,end]*kk[j][l] end end for l in uidx u[l] = @muladd uprev[l]+dt*utilde[l] end f(@muladd(t+c[end]*dt),u,kk[end]) #fsallast is tmp even if not fsal #Accumulate if !isfsal(integrator.alg.tableau) for i in uidx utilde[i] = α[1]*kk[1][i] end for i = 2:stages for l in uidx utilde[l] = @muladd utilde[l] + α[i]*kk[i][l] end end for i in uidx u[i] = @muladd uprev[i] + dt*utilde[i] end end if integrator.opts.adaptive for i in uidx uEEst[i] = αEEst[1]*kk[1][i] end for i = 2:stages for j in uidx uEEst[j] = @muladd uEEst[j] + αEEst[i]*kk[i][j] end end for i in uidx atmp[i] = (dt*(utilde[i]-uEEst[i])./@muladd(integrator.opts.abstol+max(abs(uprev[i]),abs(u[i]))*integrator.opts.reltol)) end integrator.EEst = integrator.opts.internalnorm(atmp) end if !isfsal(integrator.alg.tableau) f(t+dt,u,integrator.fsallast) end @pack integrator = t,dt,u end
[ 31, 45145, 2163, 41216, 0, 7, 18908, 12392, 11, 23870, 3712, 18438, 3628, 49, 42, 3103, 18797, 30562, 11, 69, 28, 18908, 12392, 13, 69, 8, 198, 220, 4132, 12392, 13, 50133, 2096, 1096, 796, 362, 198, 220, 4132, 12392, 13, 74, 796, 1288, 4906, 7, 18908, 12392, 13, 34453, 13, 74, 5769, 18908, 12392, 13, 50133, 2096, 1096, 8, 198, 220, 4132, 12392, 13, 9501, 1604, 667, 796, 277, 7, 18908, 12392, 13, 83, 11, 18908, 12392, 13, 929, 18218, 8, 198, 437, 198, 198, 31, 45145, 2163, 1620, 62, 9662, 0, 7, 18908, 12392, 11, 23870, 3712, 18438, 3628, 49, 42, 3103, 18797, 30562, 11, 69, 28, 18908, 12392, 13, 69, 8, 198, 220, 2488, 403, 8002, 256, 11, 28664, 11, 929, 18218, 11, 84, 796, 4132, 12392, 198, 220, 2488, 403, 8002, 317, 11, 66, 11, 17394, 11, 17394, 6500, 301, 11, 301, 1095, 796, 12940, 198, 220, 2488, 403, 8002, 479, 74, 796, 12940, 198, 220, 1303, 2199, 66, 3274, 198, 220, 479, 74, 58, 16, 60, 796, 4132, 12392, 13, 9501, 1604, 667, 198, 220, 1303, 2199, 66, 6046, 198, 220, 329, 1312, 796, 362, 25, 301, 1095, 12, 16, 198, 220, 220, 220, 3384, 44725, 796, 6632, 7, 28747, 58, 16, 12962, 198, 220, 220, 220, 329, 474, 796, 352, 25, 72, 12, 16, 198, 220, 220, 220, 220, 220, 3384, 44725, 796, 2488, 76, 377, 2860, 3384, 44725, 1343, 317, 58, 73, 11, 72, 60, 9, 28747, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 479, 74, 58, 72, 60, 796, 277, 7, 31, 76, 377, 2860, 7, 83, 10, 66, 58, 72, 60, 9, 28664, 828, 31, 76, 377, 2860, 7, 929, 18218, 10, 28664, 9, 315, 44725, 18125, 198, 220, 886, 198, 220, 1303, 9771, 66, 4586, 198, 220, 3384, 44725, 796, 6632, 7, 28747, 58, 16, 12962, 198, 220, 329, 474, 796, 352, 25, 301, 1095, 12, 16, 198, 220, 220, 220, 3384, 44725, 796, 2488, 76, 377, 2860, 3384, 44725, 1343, 317, 58, 73, 11, 437, 60, 9, 28747, 58, 73, 60, 198, 220, 886, 198, 220, 479, 74, 58, 437, 60, 796, 277, 7, 31, 76, 377, 2860, 7, 83, 10, 66, 58, 437, 60, 9, 28664, 828, 31, 76, 377, 2860, 7, 929, 18218, 10, 28664, 9, 315, 44725, 18125, 4132, 12392, 13, 9501, 439, 459, 796, 479, 74, 58, 437, 60, 1303, 36965, 43458, 439, 459, 355, 20218, 772, 611, 407, 277, 21680, 198, 220, 1303, 6366, 388, 5039, 25414, 198, 220, 3384, 44725, 796, 26367, 58, 16, 60, 9, 28747, 58, 16, 60, 198, 220, 329, 1312, 796, 362, 25, 301, 1095, 198, 220, 220, 220, 3384, 44725, 796, 2488, 76, 377, 2860, 3384, 44725, 1343, 26367, 58, 72, 60, 9, 28747, 58, 72, 60, 198, 220, 886, 198, 220, 334, 796, 2488, 76, 377, 2860, 510, 18218, 1343, 288, 83, 9, 315, 44725, 198, 220, 611, 4132, 12392, 13, 404, 912, 13, 42552, 425, 198, 220, 220, 220, 334, 6500, 301, 796, 26367, 6500, 301, 58, 16, 60, 9, 28747, 58, 16, 60, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 301, 1095, 198, 220, 220, 220, 220, 220, 334, 6500, 301, 796, 2488, 76, 377, 2860, 334, 6500, 301, 1343, 26367, 6500, 301, 58, 72, 60, 9, 28747, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4132, 12392, 13, 6500, 301, 796, 4132, 12392, 13, 404, 912, 13, 32538, 27237, 7, 288, 83, 9, 7, 315, 44725, 12, 84, 6500, 301, 737, 14, 31, 76, 377, 2860, 7, 18908, 12392, 13, 404, 912, 13, 397, 301, 349, 10, 9806, 7, 8937, 12195, 929, 18218, 828, 8937, 12195, 84, 4008, 9, 18908, 12392, 13, 404, 912, 13, 2411, 83, 349, 4008, 198, 220, 886, 198, 220, 611, 318, 9501, 282, 7, 18908, 12392, 13, 14016, 13, 11487, 559, 8, 198, 220, 220, 220, 4132, 12392, 13, 9501, 439, 459, 796, 479, 74, 58, 437, 60, 198, 220, 2073, 198, 220, 220, 220, 4132, 12392, 13, 9501, 439, 459, 796, 277, 7, 83, 10, 28664, 11, 84, 8, 198, 220, 886, 198, 220, 4132, 12392, 13, 74, 58, 16, 60, 796, 4132, 12392, 13, 9501, 1604, 667, 198, 220, 4132, 12392, 13, 74, 58, 17, 60, 796, 4132, 12392, 13, 9501, 439, 459, 198, 220, 2488, 8002, 4132, 12392, 796, 256, 11, 28664, 11, 84, 198, 437, 198, 198, 31, 45145, 2163, 41216, 0, 7, 18908, 12392, 11, 23870, 3712, 18438, 3628, 49, 42, 30562, 11, 69, 28, 18908, 12392, 13, 69, 8, 198, 220, 4132, 12392, 13, 50133, 2096, 1096, 796, 362, 198, 220, 4132, 12392, 13, 9501, 439, 459, 796, 12940, 13, 9501, 439, 459, 198, 220, 4132, 12392, 13, 9501, 1604, 667, 796, 12940, 13, 28747, 58, 16, 60, 198, 220, 4132, 12392, 13, 74, 796, 1288, 4906, 7, 18908, 12392, 13, 34453, 13, 74, 5769, 18908, 12392, 13, 50133, 2096, 1096, 8, 198, 220, 4132, 12392, 13, 74, 58, 16, 60, 796, 4132, 12392, 13, 9501, 1604, 667, 198, 220, 4132, 12392, 13, 74, 58, 17, 60, 796, 4132, 12392, 13, 9501, 439, 459, 198, 220, 277, 7, 18908, 12392, 13, 83, 11, 18908, 12392, 13, 929, 18218, 11, 18908, 12392, 13, 9501, 1604, 667, 8, 1303, 3771, 12, 9688, 277, 21680, 198, 437, 198, 198, 31, 45145, 2163, 1620, 62, 9662, 0, 7, 18908, 12392, 11, 23870, 3712, 18438, 3628, 49, 42, 30562, 11, 69, 28, 18908, 12392, 13, 69, 8, 198, 220, 2488, 403, 8002, 256, 11, 28664, 11, 929, 18218, 11, 84, 11, 74, 796, 4132, 12392, 198, 220, 334, 312, 87, 796, 1123, 9630, 7, 18908, 12392, 13, 929, 18218, 8, 198, 220, 2488, 403, 8002, 317, 11, 66, 11, 17394, 11, 17394, 6500, 301, 11, 301, 1095, 796, 12940, 13, 8658, 198, 220, 2488, 403, 8002, 479, 74, 11, 315, 44725, 11, 22065, 11, 265, 3149, 11, 84, 6500, 301, 796, 12940, 198, 220, 1303, 6046, 198, 220, 329, 1312, 796, 362, 25, 301, 1095, 12, 16, 198, 220, 220, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 3384, 44725, 58, 75, 60, 796, 6632, 7, 28747, 58, 16, 7131, 16, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 474, 796, 352, 25, 72, 12, 16, 198, 220, 220, 220, 220, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 220, 220, 3384, 44725, 58, 75, 60, 796, 2488, 76, 377, 2860, 3384, 44725, 58, 75, 60, 1343, 317, 58, 73, 11, 72, 60, 9, 28747, 58, 73, 7131, 75, 60, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 45218, 58, 75, 60, 796, 2488, 76, 377, 2860, 510, 18218, 58, 75, 48688, 28664, 9, 315, 44725, 58, 75, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 277, 7, 31, 76, 377, 2860, 7, 83, 10, 66, 58, 72, 60, 9, 28664, 828, 22065, 11, 28747, 58, 72, 12962, 198, 220, 886, 198, 220, 1303, 5956, 198, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 3384, 44725, 58, 75, 60, 796, 6632, 7, 28747, 58, 16, 7131, 16, 12962, 198, 220, 886, 198, 220, 329, 474, 796, 352, 25, 301, 1095, 12, 16, 198, 220, 220, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 3384, 44725, 58, 75, 60, 796, 2488, 76, 377, 2860, 3384, 44725, 58, 75, 60, 1343, 317, 58, 73, 11, 437, 60, 9, 28747, 58, 73, 7131, 75, 60, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 334, 58, 75, 60, 796, 2488, 76, 377, 2860, 510, 18218, 58, 75, 48688, 28664, 9, 315, 44725, 58, 75, 60, 198, 220, 886, 198, 220, 277, 7, 31, 76, 377, 2860, 7, 83, 10, 66, 58, 437, 60, 9, 28664, 828, 84, 11, 28747, 58, 437, 12962, 1303, 9501, 439, 459, 318, 45218, 772, 611, 407, 277, 21680, 198, 220, 1303, 17320, 388, 5039, 198, 220, 611, 5145, 4468, 21680, 7, 18908, 12392, 13, 14016, 13, 11487, 559, 8, 198, 220, 220, 220, 329, 1312, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 3384, 44725, 58, 72, 60, 796, 26367, 58, 16, 60, 9, 28747, 58, 16, 7131, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 301, 1095, 198, 220, 220, 220, 220, 220, 329, 300, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 220, 220, 3384, 44725, 58, 75, 60, 796, 2488, 76, 377, 2860, 3384, 44725, 58, 75, 60, 1343, 26367, 58, 72, 60, 9, 28747, 58, 72, 7131, 75, 60, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 334, 58, 72, 60, 796, 2488, 76, 377, 2860, 510, 18218, 58, 72, 60, 1343, 288, 83, 9, 315, 44725, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 611, 4132, 12392, 13, 404, 912, 13, 42552, 425, 198, 220, 220, 220, 329, 1312, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 334, 6500, 301, 58, 72, 60, 796, 26367, 6500, 301, 58, 16, 60, 9, 28747, 58, 16, 7131, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 301, 1095, 198, 220, 220, 220, 220, 220, 329, 474, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 220, 220, 334, 6500, 301, 58, 73, 60, 796, 2488, 76, 377, 2860, 334, 6500, 301, 58, 73, 60, 1343, 26367, 6500, 301, 58, 72, 60, 9, 28747, 58, 72, 7131, 73, 60, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 287, 334, 312, 87, 198, 220, 220, 220, 220, 220, 379, 3149, 58, 72, 60, 796, 357, 28664, 9, 7, 315, 44725, 58, 72, 45297, 84, 6500, 301, 58, 72, 35944, 14, 31, 76, 377, 2860, 7, 18908, 12392, 13, 404, 912, 13, 397, 301, 349, 10, 9806, 7, 8937, 7, 929, 18218, 58, 72, 46570, 8937, 7, 84, 58, 72, 60, 4008, 9, 18908, 12392, 13, 404, 912, 13, 2411, 83, 349, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4132, 12392, 13, 6500, 301, 796, 4132, 12392, 13, 404, 912, 13, 32538, 27237, 7, 265, 3149, 8, 198, 220, 886, 198, 220, 611, 5145, 4468, 21680, 7, 18908, 12392, 13, 14016, 13, 11487, 559, 8, 198, 220, 220, 220, 277, 7, 83, 10, 28664, 11, 84, 11, 18908, 12392, 13, 9501, 439, 459, 8, 198, 220, 886, 198, 220, 2488, 8002, 4132, 12392, 796, 256, 11, 28664, 11, 84, 198, 437, 198 ]
2.027609
1,811
module FluspectMod #using GSL using Polynomials using Statistics # Matlab reading using MAT # Numerical integration package (Simson rule) using QuadGK # Is this OK? file_Opti = joinpath(dirname(pathof(FluspectMod)), "Optipar2017_ProspectD.mat") const minwle = 400.; # PAR range const maxwle = 700.; const minwlf = 650.; # SIF range const maxwlf = 850.; # Doubling Adding layers const ndub = 10 # Canopy Layers: const nl = 60 const xl = collect(0:-1/nl:-1) const lazitab = collect(5:10:355) const dx = 1.0/nl # Read in all optical data: opti = matread(file_Opti)["optipar"] nr_ = convert(Array{Float32}, opti["nr"]);nr = nr_ Km_ = convert(Array{Float32}, opti["Kdm"]);Km = Km_ Kab_ = convert(Array{Float32}, opti["Kab"]);Kab = Kab_ Kant_ = convert(Array{Float32}, opti["Kant"]);Kant =Kant_ Kcar_ = convert(Array{Float32}, opti["Kca"]);Kcar= Kcar_ Kw_ = convert(Array{Float32}, opti["Kw"]);Kw=Kw_ KBrown_ = convert(Array{Float32}, opti["Ks"]);KBrown=KBrown_ phi_ = convert(Array{Float32}, opti["phi"]);phi=phi_ KcaV_ = convert(Array{Float32}, opti["KcaV"]);KcaV=KcaV_ KcaZ_ = convert(Array{Float32}, opti["KcaZ"]);KcaZ =KcaZ_ lambda_ = convert(Array{Float32}, opti["wl"]);lambda = lambda_ # Enable downsampling spectral resolution to arbitrary grid (specify array with boundaries here) # Don't like global arrays yet, need to make sure this is not creating performance issues. function init(swl) global WL = swl # Stupid... global nr = zeros(length(swl)-1) global Km = zeros(length(swl)-1) global Kab = zeros(length(swl)-1) global Kant = zeros(length(swl)-1) global Kcar = zeros(length(swl)-1) global Kw = zeros(length(swl)-1) global KBrown = zeros(length(swl)-1) global phi = zeros(length(swl)-1) global KcaV = zeros(length(swl)-1) global KcaZ = zeros(length(swl)-1) global lambda = zeros(length(swl)-1) for i in 1:length(swl)-1 wo = findall((lambda_.>=swl[i]).&(lambda_.<swl[i+1]) ) #println(mean(nr_[wo])) nr[i] = mean(nr_[wo]) Km[i] = mean(Km_[wo]) Kab[i] = mean(Kab_[wo]) Kant[i] = mean(Kant_[wo]) Kcar[i] = mean(Kcar_[wo]) Kw[i] = mean(Kw_[wo]) KBrown[i] = mean(KBrown_[wo]) phi[i] = mean(phi_[wo]) KcaV[i] = mean(KcaV_[wo]) KcaZ[i] = mean(KcaZ_[wo]) lambda[i] = mean(lambda_[wo]) end end function fluspect(x::Vector; fqe::Number=0.0, Kab__=Kab, Kant__=Kant, KBrown__=KBrown, Kw__=Kw, Km__=Km, KcaV__=KcaV, KcaZ__=KcaZ) #println(fqe) # , Kab__=Kab, Kant__=Kant, KBrown__=KBrown, Kw__=Kw, Km__=Km, KcaV__=KcaV, KcaZ__=KcaZ) # *********************************************************************** # Jacquemoud S., Baret F. (1990), PROSPECT: a model of leaf optical # properties spectra; Remote Sens. Environ.; 34:75-91. # Reference: # Féret, Gitelson, Noble & Jacquemoud [2017]. PROSPECT-D: Towards modeling # leaf optical properties through a complete lifecycle # Remote Sensing of Environment; 193:204–215 # DOI: http://doi.org/10.1016/j.rse.2017.03.004 # The specific absorption coefficient corresponding to brown pigment is() # provided by Frederic Baret [EMMAH, INRA Avignon, baret@avignon.inra.fr] # & used with his autorization. # *********************************************************************** N = x[1] Cab = x[2] Car = x[3] Ant = x[4] Brown = x[5] Cw = x[6] Cm = x[7] Cx = x[8] Kcaro = (1.0-Cx).* KcaV__ + Cx .* KcaZ__; Kall = (Cab*Kab__.+Car*Kcaro.+Ant*Kant__.+Brown*KBrown__.+Cw*Kw__.+Cm*Km__)./N # Relative absorption by Chlorophyll only (drives SIF and GPP eventually) kChlrel = Cab*Kab./(Kall.*N.+eps()); # Adding eps() here to keep it stable and NOT set to 1 manually when Kall=0 (ForwardDiff won't work otherwise) tau = real.((1.0.-Kall).*exp.(-Kall) .+ Kall.^2.0.*expint.(Kall.+eps())) # *********************************************************************** # reflectance & transmittance of one layer # *********************************************************************** # Allen W.A., Gausman H.W., Richardson A.J., Thomas J.R. (1969) # Interaction of isotropic ligth with a compact plant leaf; J. Opt. # Soc. Am., 59[10]:1376-1379. # *********************************************************************** # reflectivity & transmissivity at the interface #------------------------------------------------- talf = calctav.(40.,nr) ralf = 1.0.-talf t12 = calctav.(90.,nr) r12 = 1.0.-t12 t21 = t12./(nr.^2) r21 = 1.0.-t21 # top surface side denom = 1.0.-r21.*r21.*tau.^2 Ta = talf.*tau.*t21./denom Ra = ralf.+r21.*tau.*Ta # bottom surface side t = t12.*tau.*t21./denom r = r12.+r21.*tau.*t # *********************************************************************** # reflectance & transmittance of N layers # Stokes equations to compute properties of next N-1 layers [N real] # Normal case() # *********************************************************************** # Stokes G.G. (1862), On the intensity of the light reflected from # | transmitted through a pile of plates; Proc. Roy. Soc. Lond. # 11:545-556. # *********************************************************************** D = sqrt.((1.0.+r.+t).*(1.0.+r.-t).*(1.0.-r.+t).*(1.0.-r.-t)) rq = r.^2 tq = t.^2 a = (1.0.+rq.-tq.+D)./(2r) b = (1.0.-rq.+tq.+D)./(2t) bNm1 = b.^(N.-1); # bN2 = bNm1.^2 a2 = a.^2 denom = a2.*bN2.-1 Rsub = a.*(bN2.-1)./denom Tsub = bNm1.*(a2.-1)./denom # Case of zero absorption j = findall(r.+t .>= 1) Tsub[j] = t[j]./(t[j]+(1.0.-t[j])*(N-1)) Rsub[j] = 1.0.-Tsub[j] # Reflectance & transmittance of the leaf: combine top layer with next N-1 layers denom = 1.0.-Rsub.*r tran = Ta.*Tsub./denom refl = Ra.+Ta.*Rsub.*t./denom RT = [refl tran] if fqe ==0.0 return RT end # FROM SCOPE notes: # From here a new path is taken: The doubling method used to calculate # fluoresence is now only applied to the part of the leaf where absorption # takes place, that is, the part exclusive of the leaf-air interfaces. The # reflectance (rho) and transmittance (tau) of this part of the leaf are # now determined by "subtracting" the interfaces # CF Note: All of the below takes about 10 times more time than the RT above. Need to rething speed and accuracy. (10nm is bringing it down a lot!) Rb = (refl.-ralf)./(talf.*t21+(refl.-ralf).*r21); # Remove the top interface Z = tran.*(1.0.-Rb.*r21)./(talf.*t21); # Derive Z from the transmittance rho = (Rb.-r21.*Z.^2)./(1.0.-(r21.*Z).^2); # Reflectance and transmittance tau = (1.0.-Rb.*r21)./(1.0.-(r21.*Z).^2).*Z; # of the leaf mesophyll layer t = tau; r = max.(rho,0.0); # Avoid negative r # Derive Kubelka-Munk s and k I_rt = findall((r.+t).<1); D[I_rt] = sqrt.((1 .+ r[I_rt] .+ t[I_rt]) .* (1 .+ r[I_rt] .- t[I_rt]) .* (1 .- r[I_rt] .+ t[I_rt]) .* (1 .- r[I_rt] .- t[I_rt])); a[I_rt] = (1 .+ r[I_rt].^2 .- t[I_rt].^2 .+ D[I_rt]) ./ (2r[I_rt]); b[I_rt] = (1 .- r[I_rt].^2 + t[I_rt].^2 .+ D[I_rt]) ./ (2t[I_rt]); a[(r.+t).>=1] .= 1.0; b[(r.+t).>=1] .= 1.0; s = r./t; I_a = findall((a.>1).&(a.!=Inf)); s[I_a] = 2 .*a[I_a] ./ (a[I_a].^2 .- 1) .* log.(b[I_a]); k = log.(b); k[I_a] = (a[I_a].-1) ./ (a[I_a].+1) .* log.(b[I_a]); kChl = kChlrel .* k; # indices of wle and wlf within wlp Iwle = findall((lambda.>=minwle) .& (lambda.<=maxwle)); Iwlf = findall((lambda.>=minwlf) .& (lambda.<=maxwlf)); wle = lambda[Iwle]; # excitation wavelengths, column wlf = lambda[Iwlf]; # fluorescence wavelengths, column epsi = 2.0^(-ndub); # initialisations te = 1 .-(k[Iwle].+s[Iwle]) .* epsi; tf = 1 .-(k[Iwlf].+s[Iwlf]) .* epsi; re = s[Iwle] .* epsi; rf = s[Iwlf] .* epsi; sigmoid = 1 ./(1 .+exp.(-wlf./10).*exp.(wle'./10)); # matrix computed as an outproduct #println(size(sigmoid)," ", size(phi), " ", size(kChl)," ", size(Iwle), " ", size(Iwlf), " ", size(kChl[Iwle])) Mf = Mb = fqe .* ((0.5*phi[Iwlf]).*epsi) .* kChl[Iwle]'.*sigmoid Ih = ones(1,length(te)); # row of ones Iv = ones(length(tf),1); # column of ones # Doubling routine for i = 1:ndub xe = te./(1 .-re.*re); ten = te.*xe; ren = re.*(1 .+ten); xf = tf./(1 .-rf.*rf); tfn = tf.*xf; rfn = rf.*(1 .+tfn); A11 = xf*Ih + Iv*xe'; A12 = (xf*xe').*(rf*Ih .+ Iv*re'); A21 = 1 .+(xf*xe').*(1 .+rf*re'); A22 = (xf.*rf)*Ih+Iv*(xe.*re)'; #println(size(A11)," ", size(A12), " ", size(Mf)," ", size(Mb), " ") Mfn = Mf .* A11 .+ Mb .* A12; Mbn = Mb .* A21 .+ Mf .* A22; te = ten; re = ren; tf = tfn; rf = rfn; Mf = Mfn; Mb = Mbn; end # Here we add the leaf-air interfaces again for obtaining the final # leaf level fluorescences. g = Mb; f = Mf; Rb = rho .+ tau.^2 .*r21./(1 .-rho.*r21); Xe = Iv * (talf[Iwle]./(1 .-r21[Iwle].*Rb[Iwle]))'; Xf = t21[Iwlf]./(1 .-r21[Iwlf].*Rb[Iwlf]) * Ih; Ye = Iv * (tau[Iwle].*r21[Iwle]./(1 .-rho[Iwle].*r21[Iwle]))'; Yf = tau[Iwlf].*r21[Iwlf]./(1 .-rho[Iwlf].*r21[Iwlf]) * Ih; A = Xe .* (1 .+ Ye.*Yf) .* Xf; B = Xe .* (Ye .+ Yf) .* Xf; gn = A .* g + B .* f; fn = A .* f + B .* g; Mb = gn; Mf = fn; return RT,Mf,Mb end function RTM_sail(x::Vector; LIDFa=-0.35, LIDFb=-0.15,q=0.05, tts=30, tto=0, psi=90, wl=lambda, TypeLidf=1) # State Vector X includes (in that order): #N,Cab,Car,Ant,Cbrown,Cw,Cm,Cx,lai,rsoil LAI = x[9] # Define soil as polynomial (depends on state vector size): pSoil = Polynomials.Poly(x[10:end]) rsoil = Polynomials.polyval(pSoil,wl.-mean(wl)); iLAI = LAI/nl; # [1] LAI of elementary layer (guess we can change that) # Size of wavelength array: nwl = length(wl) # Call Fluspect for Leaf optical properties (can be done outside later if needed) LRT = fluspect(x[1:8], fqe=0.0) ρ=LRT[:,1] τ=LRT[:,2] # Geometric quantities (need to check allocation cost!) cts = cos(deg2rad(tts)) cto = cos(deg2rad(tto)) sin_tts = sin(deg2rad(tts)); # sin solar angle ctscto = cts*cto; tants = tan(deg2rad(tts)); tanto = tan(deg2rad(tto)); cospsi = cos(deg2rad(psi)); dso = sqrt(tants*tants+tanto*tanto-2.0*tants*tanto*cospsi); # Generate leaf angle distribution: if TypeLidf==1 lidf,litab = dladgen(LIDFa,LIDFb); elseif TypeLidf==2 lidf,litab = campbell(LIDFa); end #println(lidf) cos_ttlo = cos.(deg2rad.(lazitab)); # cos leaf azimuth angles cos_ttli = cos.(deg2rad.(litab)); # cosine of normal of upperside of leaf sin_ttli = sin.(deg2rad.(litab)); # sine of normal of upperside of leaf # angular distance, compensation of shadow length # Calculate geometric factors associated with extinction and scattering #Initialise sums ks = 0.0; ko = 0.0; bf = 0.0; sob = 0.0; sof = 0.0; # Weighted sums over LIDF @simd for i=1:length(litab) # ttl = litab[i]; % leaf inclination discrete values ctl = cos(deg2rad(litab[i])); # SAIL volume scattering phase function gives interception and portions to be # multiplied by rho and tau chi_s,chi_o,frho,ftau=volscatt(tts,tto,psi,litab[i]); #******************************************************************************** #* SUITS SYSTEM COEFFICIENTS #* #* ks : Extinction coefficient for direct solar flux #* ko : Extinction coefficient for direct observed flux #* att : Attenuation coefficient for diffuse flux #* sigb : Backscattering coefficient of the diffuse downward flux #* sigf : Forwardscattering coefficient of the diffuse upward flux #* sf : Scattering coefficient of the direct solar flux for downward diffuse flux #* sb : Scattering coefficient of the direct solar flux for upward diffuse flux #* vf : Scattering coefficient of upward diffuse flux in the observed direction #* vb : Scattering coefficient of downward diffuse flux in the observed direction #* w : Bidirectional scattering coefficient #******************************************************************************** # Extinction coefficients ksli = chi_s./cts; koli = chi_o./cto; # Area scattering coefficient fractions sobli = frho*pi/ctscto; sofli = ftau*pi/ctscto; bfli = ctl*ctl; ks = ks+ksli*lidf[i]; ko = ko+koli*lidf[i]; bf = bf+bfli*lidf[i]; sob = sob+sobli*lidf[i]; sof = sof+sofli*lidf[i]; end #println(sob, " ", sof) # Geometric factors to be used later with rho and tau sdb = 0.5*(ks+bf); sdf = 0.5*(ks-bf); dob = 0.5*(ko+bf); dof = 0.5*(ko-bf); ddb = 0.5*(1 .+bf); ddf = 0.5*(1 .-bf); # Skipped SCOPE lines 186-213 here (catch up later) # 1.4 solar irradiance factor for all leaf orientations # See eq 19 in vdT 2009 Cs = cos_ttli.*cts; # [nli] pag 305 modified by Joris Ss = sin_ttli.*sin_tts; # [nli] pag 305 modified by Joris cos_deltas = Cs*ones(1,length(lazitab)) .+ Ss*cos_ttlo'; # [nli,nlazi] fs = abs.(cos_deltas./cts); # [nli,nlazi] pag 305 # 1.5 probabilities Ps, Po, Pso Ps = exp.(ks*xl*LAI); # [nl+1] p154{1} probability of viewing a leaf in solar dir Po = exp.(ko*xl*LAI); # [nl+1] p154{1} probability of viewing a leaf in observation dir Ps[1:nl] = Ps[1:nl] *(1 .-exp.(-ks*LAI*dx))/(ks*LAI*dx); # Correct Ps/Po for finite dx Po[1:nl] = Po[1:nl] *(1 .-exp.(-ko*LAI*dx))/(ko*LAI*dx); # Correct Ps/Po for finite dx #Pso: Probability of observing a sunlit leaf at depth x, see eq 31 in vdT 2009 Pso = similar(Po); for j=1:length(xl) #println(size(a), " ", size(Pso), " ", size(Po)) Pso[j] = quadgk(x -> Psofunction(ko,ks,LAI,q,dso,x), xl[j]-dx,xl[j], rtol=1e-2)[1]/dx #Pso[j,:]= quad(@(y)Psofunction(K,k,LAI,q,dso,y),xl(j)-dx,xl(j))/dx; %#ok<FREMO> end Pso[Pso.>Po]= minimum([Po[Pso.>Po] Ps[Pso.>Po]],dims=2); #takes care of rounding error Pso[Pso.>Ps]= minimum([Po[Pso.>Ps] Ps[Pso.>Ps]],dims=2); #takes care of rounding error # All with length of wavelengths: sigb = ddb.*ρ.+ddf.*τ; sigf = ddf.*ρ.+ddb.*τ; sb = sdb*ρ .+ sdf*τ; # [nwl] sb, p305{1} diffuse backscatter scattering coefficient for specular incidence sf = sdf*ρ .+ sdb*τ; # [nwl] sf, p305{1} diffuse forward scattering coefficient for specular incidence vb = dob*ρ .+ dof*τ; # [nwl] vb, p305{1} directional backscatter scattering coefficient for diffuse incidence vf = dof*ρ .+ dob*τ; # [nwl] vf, p305{1} directional forward scattering coefficient for diffuse incidence w = sob*ρ .+ sof*τ; # [nwl] w, p309{1} bidirectional scattering coefficent (directional-directional) a = 1 .-sigf; # [nwl] attenuation m = sqrt.(a.^2 .-sigb.^2); # [nwl] rinf = (a.-m)./sigb; # [nwl] rinf2= rinf.*rinf; # [nwl] #println(minimum(m), " ", min(ks)) # direct solar radiation J1k = calcJ1.(-1, m,ks,LAI); # [nwl] J2k = calcJ2.( 0, m,ks,LAI); # [nwl] J1K = calcJ1.(-1, m,ko,LAI); # [nwl] % added for calculation of rdo J2K = calcJ2.( 0, m,ko,LAI); # [nwl] % added for calculation of rdo e1 = exp.(-m.*LAI); # [nwl] e2 = e1.^2; # [nwl] re = rinf.*e1; # [nwl] denom = 1 .-rinf2.*e2; s1 = sf .+rinf.*sb; s2 = sf.*rinf+sb; v1 = vf.+rinf.*vb; v2 = vf.*rinf.+vb; Pss = s1.*J1k; # [nwl] Qss = s2.*J2k; # [nwl] Poo = v1.*J1K; # (nwl) % added for calculation of rdo Qoo = v2.*J2K; # [nwl] % added for calculation of rdo tau_ss = exp(-ks*LAI); # [1] tau_oo = exp(-ko*LAI); Z = (1 - tau_ss * tau_oo)/(ks + ko); # needed for analytic rso tau_dd = (1 .-rinf2).*e1 ./denom; # [nwl] rho_dd = rinf.*(1 .-e2) ./denom; # [nwl] tau_sd = (Pss.-re.*Qss) ./denom; # [nwl] tau_do = (Poo.-re.*Qoo) ./denom; # [nwl] rho_sd = (Qss.-re.*Pss) ./denom; # [nwl] rho_do = (Qoo.-re.*Poo) ./denom; # (nwl) T1 = v2.*s1.*(Z.-J1k*tau_oo)./(ko.+m).+v1.*s2.*(Z.-J1K*tau_ss)./(ks.+m); T2 = -(Qoo.*rho_sd+Poo.*tau_sd).*rinf; rho_sod = (T1+T2)./(1 .-rinf2); # Bidirectional reflectance # Single scattering contribution rho_sos = w.*iLAI.*sum(Pso[1:nl]); # Total canopy contribution rho_so=rho_sos.+rho_sod; #println(rho_so[100:120]) dn=1 .-rsoil.*rho_dd; # Total canopy contribution rso = rho_so .+ rsoil .* Pso[nl+1] .+ ((tau_sd.+tau_ss*rsoil.*rho_dd).*tau_oo.+(tau_sd.+tau_ss).*tau_do).*rsoil./denom; # SAIL analytical reflectances # rsd: directional-hemispherical reflectance factor for solar incident flux rsd = rho_sd .+ (tau_ss .+ tau_sd).*rsoil.*tau_dd./denom; # rdd: bi-hemispherical reflectance factor rdd = rho_dd .+ tau_dd.*rsoil.*tau_dd./denom; # rdo: bi-directional reflectance factor rdo = rho_do .+ (tau_oo .+ tau_do).*rsoil.*tau_dd./denom; #return [rso rsd rdd rdo # Dummy code here to track direct and diffuse light first, need to separate this into another function later Esun_ = zeros(nwl).+100 Esky_ = zeros(nwl).+100 Emin_ = zeros(nl+1,nwl) Eplu_ = zeros(nl+1,nwl) Eplu_1 = rsoil.*((tau_ss.+tau_sd).*Esun_.+tau_dd.*Esky_)./denom; Eplu0 = rho_sd.*Esun_ .+ rho_dd.*Esky_ .+ tau_dd.*Eplu_1; Emin_1 = tau_sd.*Esun_ .+ tau_dd.*Esky_ .+ rho_dd.*Eplu_1; delta1 = Esky_ .- rinf.*Eplu0; delta2 = Eplu_1 .- rinf.*Emin_1; # calculation of the fluxes in the canopy (this seems slow!) t1 = sf.+rinf.*sb t2 = sb+rinf.*sf # The order here mattered, now doing the loop over nl, not nwl! (faster) # This loop is time consuming, probably don't need high spectral resolution for the NIR part here, so it can be shortened a lot (say 100nm steps from 700-2500nm?) # We just need it for net energy balance and PAR here. return [rso rsd rdd rdo] for i = 1:nl+1 J1kx = calcJ1.(xl[i],m,ks,LAI); # [nl] J2kx = calcJ2.(xl[i],m,ks,LAI); # [nl] F1 = Esun_.*J1kx.*t1 .+ delta1.*exp.( m.*LAI.*xl[i]); #[nl] F2 = Esun_.*J2kx.*t2 .+ delta2.*exp.(-m.*LAI.*(xl[i].+1)); #[nl] Emin_[i,:] = (F1.+rinf.*F2)./(1 .-rinf2);# [nl,nwl] Eplu_[i,:] = (F2.+rinf.*F1)./(1 .-rinf2);# [nl,nwl] end end # Had to make this like the Prosail F90 function, forwardDiff didn't work otherwise. function calcJ1(x,m,k,LAI) del=(k-m)*LAI if abs(del)>1E-3; J1 = (exp(m*LAI*x)-exp(k*LAI*x))/(k-m); else J1 = -0.5*LAI*x*(exp(m*LAI*x)+exp(k*LAI*x))*(1.0-del^2/12.0); end return J1 end function calcJ2(x,m,k,LAI) return (exp(k*LAI*x)-exp(-k*LAI)*exp(-m*LAI*(1+x)))/(k+m); end # APPENDIX IV function Pso from SCOPE v1.73 function Psofunction(K,k,LAI,q,dso,xl) if dso!=0.0 alf = (dso/q) *2/(k+K); pso = exp((K+k)*LAI*xl + sqrt(K*k)*LAI/(alf )*(1-exp(xl*(alf ))));# [nl+1] factor for correlation of Ps and Po else pso = exp((K+k)*LAI*xl - sqrt(K*k)*LAI*xl);# [nl+1] factor for correlation of Ps and Po end return pso end # FROM SCOPE v1.73 APPENDIX II function volscat """******************************************************************************** !* tts = solar zenith !* tto = viewing zenith !* psi = azimuth !* ttl = leaf inclination angle !* chi_s = interception functions !* chi_o = interception functions !* frho = function to be multiplied by leaf reflectance rho !* ftau = functions to be multiplied by leaf transmittance tau !******************************************************************************** ! Compute volume scattering functions and interception coefficients ! for given solar zenith, viewing zenith, azimuth and leaf inclination angle. ! chi_s and chi_o are the interception functions. ! frho and ftau are the functions to be multiplied by leaf reflectance rho and ! leaf transmittance tau, respectively, in order to obtain the volume scattering ! function. """ function volscatt(tts,tto,psi,ttli) #Volscatt version 2. #created by W. Verhoef #edited by Joris Timmermans to matlab nomenclature. # date: 11 February 2008 #tts [1] Sun zenith angle in degrees #tto [1] Observation zenith angle in degrees #psi [1] Difference of azimuth angle between solar and viewing position #ttli [ttli] leaf inclination array nli = length(ttli); psi_rad = deg2rad(psi); cos_psi = cos(deg2rad(psi)); # cosine of relative azimuth angle cos_ttli = cos(deg2rad(ttli)); # cosine of normal of upperside of leaf sin_ttli = sin(deg2rad(ttli)); # sine of normal of upperside of leaf cos_tts = cos(deg2rad(tts)); # cosine of sun zenith angle sin_tts = sin(deg2rad(tts)); # sine of sun zenith angle cos_tto = cos(deg2rad(tto)); # cosine of observer zenith angle sin_tto = sin(deg2rad(tto)); # sine of observer zenith angle Cs = cos_ttli*cos_tts; # p305{1} Ss = sin_ttli*sin_tts; # p305{1} Co = cos_ttli*cos_tto; # p305{1} So = sin_ttli*sin_tto; # p305{1} As = maximum([Ss,Cs]); Ao = maximum([So,Co]); #println(-Cs./As, " ", Ss, " ", Cs) bts = acos.(-Cs./As); # p305{1} bto = acos.(-Co./Ao); # p305{2} chi_o = 2/pi*((bto-pi/2).*Co + sin(bto).*So); chi_s = 2/pi*((bts-pi/2).*Cs + sin(bts).*Ss); delta1 = abs(bts-bto); # p308{1} delta2 = pi-abs(bts + bto - pi); # p308{1} Tot = psi_rad + delta1 + delta2; # pag 130{1} bt1 = minimum([psi_rad,delta1]); bt3 = maximum([psi_rad,delta2]); bt2 = Tot - bt1 - bt3; T1 = 2Cs.*Co + Ss.*So.*cos_psi; T2 = sin(bt2).*(2As.*Ao + Ss.*So.*cos(bt1).*cos(bt3)); Jmin = ( bt2).*T1 - T2; Jplus = (pi-bt2).*T1 + T2; frho = Jplus/(2pi^2); ftau = -Jmin /(2pi^2); # pag.309 wl-> pag 135{1} frho = maximum([0.0,frho]); ftau = maximum([0.0,ftau]); #println(tts, " ",tto, " ",psi, " ",ttli) #println(chi_s, " ", chi_o, " ",frho, " ",ftau) return chi_s,chi_o,frho,ftau end function dladgen(a::Number,b::Number) litab=[5.,15.,25.,35.,45.,55.,65.,75.,81.,83.,85.,87.,89.]; freq = similar(litab) for i1=1:8 t = i1*10; freq[i1]=dcum(a,b,t); end for i2=9:12 t = 80.0+(i2-8)*2.; freq[i2]=dcum(a,b,t); end freq[13]=1; for i = 13:-1:2 freq[i]=freq[i]-freq[i-1]; end return freq,litab end function dcum(a::Number,b::Number,t::Number) y = 0.0 if a>=1 f = 1-cos(deg2rad(t)); else epsi=1e-8; delx=1; x=2*deg2rad(t); p=x; while (delx >= epsi) #println(delx) y = a*sin(x)+0.5*b*sin(2.0*x); dx=0.5*(y-x+p); x=x+dx; delx=abs(dx); end f = (2.0*y+p)/pi; end return f end """ From SCOPE v1.73: ******************************************************************************** * Campbell.f * * Computation of the leaf angle distribution function value (freq) * Ellipsoidal distribution function caracterised by the average leaf * inclination angle in degree (ala) * Campbell 1986 * ******************************************************************************** edit 2017 12 28: change sampling of angles to match with dladgen.m """ function campbell(ala) tx1=[10.,20.,30.,40.,50.,60.,70.,80.,82.,84.,86.,88.,90.]; tx2=[0.,10.,20.,30.,40.,50.,60.,70.,80.,82.,84.,86.,88.]; litab = (tx2.+tx1)./2.0; n=length(litab); tl1 = deg2rad(tx1) tl2 = deg2rad(tx2) excent = exp(-1.6184e-5*ala^3+2.1145e-3*ala^2-1.2390e-1*ala+3.2491); sum0 = 0; freq=zeros(n); for i=1:n x1 = excent./(sqrt(1 .+excent^2 .*tan(tl1(i)).^2)); x2 = excent./(sqrt(1 .+excent^2 .*tan(tl2(i)).^2)); if (excent==1) freq[i] = abs(cos(tl1(i))-cos(tl2(i))); else alpha = excent./sqrt(abs(1-excent.^2)); alpha2 = alpha.^2; x12 = x1.^2; x22 = x2.^2; if (excent>1) alpx1 = sqrt(alpha2(excent>1)+x12(excent>1)); alpx2[excent>1] = sqrt(alpha2(excent>1)+x22(excent>1)); dum = x1*alpx1+alpha2*log(x1+alpx1); freq[i] = abs(dum-(x2.*alpx2+alpha2.*log(x2+alpx2))); else almx1 = sqrt(alpha2-x12); almx2 = sqrt(alpha2-x22); dum = x1.*almx1+alpha2.*asin(x1./alpha); freq[i] = abs(dum-(x2.*almx2+alpha2.*asin(x2./alpha))); end end end sum0 = sum(freq,dims=2); freq0=freq./sum0; return freq0,litab end """ calctav(alfa, nr) *********************************************************************** From calctav.m in PROSPECT-D *********************************************************************** Stern F. (1964), Transmission of isotropic radiation across an interface between two dielectrics, Appl. Opt., 3(1):111-113. Allen W.A. (1973), Transmission of isotropic light across a dielectric surface in two and three dimensions, J. Opt. Soc. Am., 63(6):664-666. *********************************************************************** """ function calctav(α,nr) rd = pi/180 n2 = nr^2 np = n2+1 nm = n2-1 a = (nr+1)*(nr+1)/2 k = -(n2-1)*(n2-1)/4 sa = sin(α*rd) if α!=90.0 b1 = sqrt((sa^2-np/2).*(sa^2-np/2)+k) else b1 = 0 end b2 = sa^2-np/2 b = b1-b2 b3 = b^3 a3 = a^3 ts = (k^2.0/(6*b3)+k/b-b/2)-(k^2.0/(6*a3)+k/a-a/2) tp1 = -2*n2*(b-a)/(np^2) tp2 = -2*n2*np*log(b/a)/(nm^2) tp3 = n2*(1.0/b-1.0/a)/2 tp4 = 16*n2^2.0*(n2^2+1)*log((2*np*b-nm^2)/(2*np*a-nm^2))/(np^3.0*nm^2) tp5 = 16*n2^3.0*(1.0/(2*np*b-nm^2)-1.0/(2*np*a-nm^2))/(np^3) tp = tp1+tp2+tp3+tp4+tp5 tav = (ts+tp)/(2*sa^2) return tav end #function expint(x) # p = Poly([8.267661952366478e+00, -7.773807325735529e-01, -3.012432892762715e-01, -7.811863559248197e-02, -1.019573529845792e-02,-6.973790859534190e-04,-2.569498322115933e-05, -4.819538452140960e-07, -3.602693626336023e-09]) # polyv = polyval(p,real(x)); # k = findall( abs(imag(x)) <= polyv ); # -GSL.sf_expint_Ei(-x) #end # From Matlab! function expint(x) p = Polynomials.Poly([8.267661952366478e+00, -7.773807325735529e-01, -3.012432892762715e-01, -7.811863559248197e-02, -1.019573529845792e-02,-6.973790859534190e-04,-2.569498322115933e-05, -4.819538452140960e-07, -3.602693626336023e-09]) polyv = Polynomials.polyval(p,real(x)); if abs(imag(x)) <= polyv #initialization egamma=0.57721566490153286061; xk = x; yk = -egamma - log(xk); j = 1; pterm = xk; term = xk; while abs(term) > (eps(yk)) yk = yk + term; j = j + 1; pterm = -xk.*pterm/j; term = pterm/j; end # end of the while loop y = yk; else n = 1.0; xk = x; am2 = 0.0 bm2 = 1.0 am1 = 1.0 bm1 = xk f = am1 / bm1; oldf = Inf; j = 2; while abs(f-oldf) > (100*eps()*abs(f)) alpha = n-1+(j/2); # note: beta= 1 #calculate A(j), B(j), and f(j) a = am1 + alpha * am2; b = bm1 + alpha * bm2; # save new normalized variables for next pass through the loop # note: normalization to avoid overflow or underflow am2 = am1 / b; bm2 = bm1 / b; am1 = a / b; bm1 = 1.0; f = am1; j = j+1; # calculate the coefficients for j odd alpha = (j-1)/2; beta = xk; a = beta * am1 + alpha * am2; b = beta * bm1 + alpha * bm2; am2 = am1 / b; bm2 = bm1 / b; am1 = a / b; bm1 = 1; oldf = f; f = am1; j = j+1; end y= exp(-xk) * f - 1im*pi*((real(xk)<0)&(imag(xk)==0)); end return y end end
[ 21412, 1610, 385, 806, 5841, 198, 2, 3500, 46326, 198, 3500, 12280, 26601, 8231, 198, 3500, 14370, 198, 2, 6550, 23912, 3555, 198, 3500, 36775, 198, 2, 399, 6975, 605, 11812, 5301, 357, 8890, 1559, 3896, 8, 198, 3500, 20648, 38, 42, 198, 198, 2, 1148, 428, 7477, 30, 198, 7753, 62, 27871, 72, 796, 4654, 6978, 7, 15908, 3672, 7, 6978, 1659, 7, 7414, 385, 806, 5841, 36911, 366, 27871, 541, 283, 5539, 62, 2964, 4443, 35, 13, 6759, 4943, 198, 198, 9979, 949, 86, 293, 220, 796, 7337, 15089, 1303, 29463, 2837, 198, 9979, 3509, 86, 293, 220, 796, 13037, 15089, 198, 9979, 949, 86, 1652, 220, 796, 22626, 15089, 1303, 311, 5064, 2837, 198, 9979, 3509, 86, 1652, 220, 796, 30607, 15089, 198, 198, 2, 5728, 11108, 18247, 11685, 198, 9979, 299, 67, 549, 796, 838, 198, 198, 2, 1680, 11081, 406, 6962, 25, 198, 9979, 299, 75, 796, 3126, 198, 9979, 2124, 75, 796, 2824, 7, 15, 21912, 16, 14, 21283, 21912, 16, 8, 198, 9979, 37296, 270, 397, 796, 2824, 7, 20, 25, 940, 25, 28567, 8, 198, 9979, 44332, 796, 352, 13, 15, 14, 21283, 198, 198, 2, 4149, 287, 477, 18480, 1366, 25, 198, 8738, 72, 796, 2603, 961, 7, 7753, 62, 27871, 72, 8, 14692, 8738, 541, 283, 8973, 198, 48624, 62, 220, 220, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 48624, 8973, 1776, 48624, 796, 299, 81, 62, 198, 42, 76, 62, 220, 220, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 36020, 8973, 1776, 42, 76, 796, 509, 76, 62, 198, 42, 397, 62, 220, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 397, 8973, 1776, 42, 397, 796, 28793, 62, 198, 42, 415, 62, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 415, 8973, 1776, 42, 415, 796, 42, 415, 62, 198, 42, 7718, 62, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 6888, 8973, 1776, 42, 7718, 28, 509, 7718, 62, 198, 42, 86, 62, 220, 220, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 86, 8973, 1776, 42, 86, 28, 42, 86, 62, 198, 42, 20644, 62, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 82, 8973, 1776, 42, 20644, 28, 42, 20644, 62, 198, 34846, 62, 220, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 34846, 8973, 1776, 34846, 28, 34846, 62, 198, 42, 6888, 53, 62, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 6888, 53, 8973, 1776, 42, 6888, 53, 28, 42, 6888, 53, 62, 198, 42, 6888, 57, 62, 220, 220, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 42, 6888, 57, 8973, 1776, 42, 6888, 57, 796, 42, 6888, 57, 62, 198, 50033, 62, 796, 220, 10385, 7, 19182, 90, 43879, 2624, 5512, 2172, 72, 14692, 40989, 8973, 1776, 50033, 796, 37456, 62, 628, 198, 2, 27882, 21838, 321, 11347, 37410, 6323, 284, 14977, 10706, 357, 16684, 1958, 7177, 351, 13215, 994, 8, 198, 2, 2094, 470, 588, 3298, 26515, 1865, 11, 761, 284, 787, 1654, 428, 318, 407, 4441, 2854, 2428, 13, 198, 8818, 2315, 7, 2032, 75, 8, 198, 220, 220, 220, 3298, 370, 43, 796, 1509, 75, 198, 220, 220, 220, 1303, 42930, 986, 198, 220, 220, 220, 3298, 299, 81, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 509, 76, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 28793, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 29576, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 509, 7718, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 31767, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 14204, 2053, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 872, 72, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 509, 6888, 53, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 509, 6888, 57, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 3298, 37456, 796, 1976, 27498, 7, 13664, 7, 2032, 75, 13219, 16, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 2032, 75, 13219, 16, 198, 220, 220, 220, 220, 220, 220, 220, 24486, 796, 1064, 439, 19510, 50033, 44807, 29, 28, 2032, 75, 58, 72, 35944, 5, 7, 50033, 62, 29847, 2032, 75, 58, 72, 10, 16, 12962, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 32604, 7, 48624, 62, 58, 21638, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 299, 81, 58, 72, 60, 220, 220, 796, 220, 1612, 7, 48624, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 509, 76, 58, 72, 60, 220, 796, 220, 1612, 7, 42, 76, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 28793, 58, 72, 60, 220, 796, 220, 1612, 7, 42, 397, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 29576, 58, 72, 60, 796, 220, 1612, 7, 42, 415, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 509, 7718, 58, 72, 60, 220, 796, 220, 1612, 7, 42, 7718, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 31767, 58, 72, 60, 220, 220, 796, 220, 1612, 7, 42, 86, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 14204, 2053, 58, 72, 60, 796, 1612, 7, 42, 20644, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 872, 72, 58, 72, 60, 220, 796, 220, 1612, 7, 34846, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 509, 6888, 53, 58, 72, 60, 796, 1612, 7, 42, 6888, 53, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 509, 6888, 57, 58, 72, 60, 796, 1612, 7, 42, 6888, 57, 62, 58, 21638, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 37456, 58, 72, 60, 796, 1612, 7, 50033, 62, 58, 21638, 12962, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 781, 385, 806, 7, 87, 3712, 38469, 26, 277, 80, 68, 3712, 15057, 28, 15, 13, 15, 11, 28793, 834, 28, 42, 397, 11, 29576, 834, 28, 42, 415, 11, 14204, 2053, 834, 28, 42, 20644, 11, 31767, 834, 28, 42, 86, 11, 509, 76, 834, 28, 42, 76, 11, 509, 6888, 53, 834, 28, 42, 6888, 53, 11, 509, 6888, 57, 834, 28, 42, 6888, 57, 8, 198, 220, 220, 220, 1303, 35235, 7, 69, 80, 68, 8, 198, 2, 837, 28793, 834, 28, 42, 397, 11, 29576, 834, 28, 42, 415, 11, 14204, 2053, 834, 28, 42, 20644, 11, 31767, 834, 28, 42, 86, 11, 509, 76, 834, 28, 42, 76, 11, 509, 6888, 53, 834, 28, 42, 6888, 53, 11, 509, 6888, 57, 834, 28, 42, 6888, 57, 8, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 44726, 368, 2778, 311, 1539, 347, 8984, 376, 13, 357, 19891, 828, 4810, 47053, 9782, 25, 257, 2746, 286, 12835, 18480, 198, 2, 6608, 5444, 430, 26, 21520, 14173, 13, 2039, 2268, 15089, 4974, 25, 2425, 12, 6420, 13, 198, 2, 20984, 25, 198, 2, 376, 2634, 1186, 11, 15151, 10151, 11, 20833, 1222, 44726, 368, 2778, 685, 5539, 4083, 4810, 47053, 9782, 12, 35, 25, 49953, 21128, 198, 2, 12835, 18480, 6608, 832, 257, 1844, 3868, 47510, 198, 2, 21520, 14173, 278, 286, 9344, 26, 29691, 25, 18638, 126, 244, 23349, 198, 2, 40722, 25, 2638, 1378, 34023, 13, 2398, 14, 940, 13, 27956, 14, 73, 13, 81, 325, 13, 5539, 13, 3070, 13, 22914, 198, 2, 383, 2176, 24774, 35381, 11188, 284, 7586, 43385, 318, 3419, 198, 2, 2810, 416, 18669, 291, 347, 8984, 685, 3620, 5673, 39, 11, 3268, 3861, 5184, 570, 261, 11, 6247, 83, 31, 615, 570, 261, 13, 259, 430, 13, 8310, 60, 198, 2, 1222, 973, 351, 465, 1960, 273, 1634, 13, 198, 2, 41906, 17174, 2466, 8162, 198, 45, 796, 2124, 58, 16, 60, 198, 34, 397, 796, 2124, 58, 17, 60, 198, 9914, 796, 2124, 58, 18, 60, 198, 13217, 796, 2124, 58, 19, 60, 198, 20644, 796, 2124, 58, 20, 60, 198, 34, 86, 796, 2124, 58, 21, 60, 198, 34, 76, 796, 2124, 58, 22, 60, 198, 34, 87, 796, 2124, 58, 23, 60, 198, 42, 7718, 78, 796, 357, 16, 13, 15, 12, 34, 87, 737, 9, 509, 6888, 53, 834, 1343, 327, 87, 764, 9, 509, 6888, 57, 834, 26, 198, 198, 42, 439, 220, 220, 220, 796, 357, 34, 397, 9, 42, 397, 834, 13, 10, 9914, 9, 42, 7718, 78, 13, 10, 13217, 9, 42, 415, 834, 13, 10, 20644, 9, 42, 20644, 834, 13, 10, 34, 86, 9, 42, 86, 834, 13, 10, 34, 76, 9, 42, 76, 834, 737, 14, 45, 198, 2, 45344, 24774, 416, 609, 4685, 16982, 297, 691, 357, 7553, 1158, 311, 5064, 290, 402, 10246, 4191, 8, 198, 74, 1925, 75, 2411, 220, 796, 15976, 9, 42, 397, 19571, 7, 42, 439, 15885, 45, 13, 10, 25386, 35430, 198, 198, 2, 18247, 304, 862, 3419, 994, 284, 1394, 340, 8245, 290, 5626, 900, 284, 352, 14500, 618, 509, 439, 28, 15, 357, 39746, 28813, 1839, 470, 670, 4306, 8, 198, 83, 559, 796, 1103, 12195, 7, 16, 13, 15, 7874, 42, 439, 737, 9, 11201, 12195, 12, 42, 439, 8, 764, 10, 509, 439, 13, 61, 17, 13, 15, 15885, 11201, 600, 12195, 42, 439, 13, 10, 25386, 3419, 4008, 198, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 4079, 590, 1222, 1007, 20124, 590, 286, 530, 7679, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 9659, 370, 13, 32, 1539, 402, 8717, 805, 367, 13, 54, 1539, 21679, 317, 13, 41, 1539, 5658, 449, 13, 49, 13, 357, 38391, 8, 198, 2, 4225, 2673, 286, 31624, 1773, 291, 26106, 400, 351, 257, 16001, 4618, 12835, 26, 449, 13, 13123, 13, 198, 2, 3345, 13, 1703, 1539, 7863, 58, 940, 5974, 1485, 4304, 12, 1485, 3720, 13, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 4079, 3458, 1222, 1007, 3927, 3458, 379, 262, 7071, 198, 2, 47232, 12, 198, 83, 1604, 220, 220, 220, 796, 2386, 310, 615, 12195, 1821, 1539, 48624, 8, 198, 1373, 69, 220, 220, 220, 796, 352, 13, 15, 7874, 83, 1604, 198, 83, 1065, 220, 220, 220, 220, 796, 2386, 310, 615, 12195, 3829, 1539, 48624, 8, 198, 81, 1065, 220, 220, 220, 220, 796, 352, 13, 15, 7874, 83, 1065, 198, 83, 2481, 220, 220, 220, 220, 796, 256, 1065, 19571, 7, 48624, 13, 61, 17, 8, 198, 81, 2481, 220, 220, 220, 220, 796, 352, 13, 15, 7874, 83, 2481, 198, 198, 2, 1353, 4417, 1735, 198, 6559, 296, 220, 220, 796, 352, 13, 15, 7874, 81, 2481, 15885, 81, 2481, 15885, 83, 559, 13, 61, 17, 198, 38586, 220, 220, 220, 220, 220, 796, 256, 1604, 15885, 83, 559, 15885, 83, 2481, 19571, 6559, 296, 198, 21762, 220, 220, 220, 220, 220, 796, 374, 1604, 13, 10, 81, 2481, 15885, 83, 559, 15885, 38586, 198, 198, 2, 4220, 4417, 1735, 198, 83, 220, 220, 220, 220, 220, 220, 796, 256, 1065, 15885, 83, 559, 15885, 83, 2481, 19571, 6559, 296, 198, 81, 220, 220, 220, 220, 220, 220, 796, 374, 1065, 13, 10, 81, 2481, 15885, 83, 559, 15885, 83, 198, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 4079, 590, 1222, 1007, 20124, 590, 286, 399, 11685, 198, 2, 520, 3369, 27490, 284, 24061, 6608, 286, 1306, 399, 12, 16, 11685, 685, 45, 1103, 60, 198, 2, 14435, 1339, 3419, 198, 2, 41906, 17174, 2466, 8162, 198, 2, 520, 3369, 402, 13, 38, 13, 357, 1507, 5237, 828, 1550, 262, 12245, 286, 262, 1657, 12548, 422, 198, 2, 930, 18307, 832, 257, 14540, 286, 13375, 26, 31345, 13, 9817, 13, 3345, 13, 406, 623, 13, 198, 2, 1367, 25, 45326, 12, 37864, 13, 198, 2, 41906, 17174, 2466, 8162, 198, 35, 220, 220, 220, 220, 220, 220, 796, 19862, 17034, 12195, 7, 16, 13, 15, 13, 10, 81, 13, 10, 83, 737, 9, 7, 16, 13, 15, 13, 10, 81, 7874, 83, 737, 9, 7, 16, 13, 15, 7874, 81, 13, 10, 83, 737, 9, 7, 16, 13, 15, 7874, 81, 7874, 83, 4008, 198, 81, 80, 220, 220, 220, 220, 220, 796, 374, 13, 61, 17, 198, 83, 80, 220, 220, 220, 220, 220, 796, 256, 13, 61, 17, 198, 64, 220, 220, 220, 220, 220, 220, 796, 357, 16, 13, 15, 13, 10, 81, 80, 7874, 83, 80, 13, 10, 35, 737, 29006, 17, 81, 8, 198, 65, 220, 220, 220, 220, 220, 220, 796, 357, 16, 13, 15, 7874, 81, 80, 13, 10, 83, 80, 13, 10, 35, 737, 29006, 17, 83, 8, 198, 198, 65, 45, 76, 16, 220, 220, 220, 796, 275, 13, 61, 7, 45, 7874, 16, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 65, 45, 17, 220, 220, 220, 220, 796, 275, 45, 76, 16, 13, 61, 17, 198, 64, 17, 220, 220, 220, 220, 220, 796, 257, 13, 61, 17, 198, 6559, 296, 220, 220, 796, 257, 17, 15885, 65, 45, 17, 7874, 16, 198, 49, 7266, 220, 220, 220, 796, 257, 15885, 7, 65, 45, 17, 7874, 16, 737, 14, 6559, 296, 198, 51, 7266, 220, 220, 220, 796, 275, 45, 76, 16, 15885, 7, 64, 17, 7874, 16, 737, 14, 6559, 296, 198, 198, 2, 8913, 286, 6632, 24774, 198, 73, 220, 220, 220, 220, 220, 220, 796, 1064, 439, 7, 81, 13, 10, 83, 764, 29, 28, 352, 8, 198, 51, 7266, 58, 73, 60, 796, 256, 58, 73, 4083, 29006, 83, 58, 73, 60, 33747, 16, 13, 15, 7874, 83, 58, 73, 12962, 9, 7, 45, 12, 16, 4008, 198, 49, 7266, 58, 73, 60, 197, 28, 352, 13, 15, 7874, 51, 7266, 58, 73, 60, 198, 198, 2, 36901, 590, 1222, 1007, 20124, 590, 286, 262, 12835, 25, 12082, 1353, 7679, 351, 1306, 399, 12, 16, 11685, 198, 6559, 296, 220, 220, 796, 352, 13, 15, 7874, 49, 7266, 15885, 81, 198, 2213, 272, 220, 220, 220, 796, 11940, 15885, 51, 7266, 19571, 6559, 296, 198, 260, 2704, 220, 220, 220, 796, 7567, 13, 10, 38586, 15885, 49, 7266, 15885, 83, 19571, 6559, 296, 198, 198, 14181, 220, 220, 220, 220, 796, 685, 260, 2704, 491, 272, 60, 198, 361, 277, 80, 68, 6624, 15, 13, 15, 198, 220, 220, 220, 1441, 11923, 198, 437, 198, 2, 16034, 6374, 32135, 4710, 25, 198, 2, 3574, 994, 257, 649, 3108, 318, 2077, 25, 383, 26862, 2446, 973, 284, 15284, 198, 2, 6562, 2850, 594, 318, 783, 691, 5625, 284, 262, 636, 286, 262, 12835, 810, 24774, 198, 2, 2753, 1295, 11, 326, 318, 11, 262, 636, 8568, 286, 262, 12835, 12, 958, 20314, 13, 383, 198, 2, 4079, 590, 357, 81, 8873, 8, 290, 1007, 20124, 590, 357, 83, 559, 8, 286, 428, 636, 286, 262, 12835, 389, 198, 2, 783, 5295, 416, 366, 7266, 83, 974, 278, 1, 262, 20314, 198, 2, 18551, 5740, 25, 1439, 286, 262, 2174, 2753, 546, 838, 1661, 517, 640, 621, 262, 11923, 2029, 13, 10664, 284, 302, 1197, 2866, 290, 9922, 13, 357, 940, 21533, 318, 6079, 340, 866, 257, 1256, 8133, 198, 198, 49, 65, 220, 796, 357, 260, 2704, 7874, 1373, 69, 737, 29006, 83, 1604, 15885, 83, 2481, 33747, 260, 2704, 7874, 1373, 69, 737, 9, 81, 2481, 1776, 220, 1303, 17220, 262, 1353, 7071, 198, 57, 220, 220, 796, 491, 272, 15885, 7, 16, 13, 15, 7874, 49, 65, 15885, 81, 2481, 737, 29006, 83, 1604, 15885, 83, 2481, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9626, 425, 1168, 422, 262, 1007, 20124, 590, 198, 198, 81, 8873, 796, 357, 49, 65, 7874, 81, 2481, 15885, 57, 13, 61, 17, 737, 29006, 16, 13, 15, 7874, 7, 81, 2481, 15885, 57, 737, 61, 17, 1776, 220, 220, 220, 220, 220, 1303, 36901, 590, 290, 1007, 20124, 590, 198, 83, 559, 796, 357, 16, 13, 15, 7874, 49, 65, 15885, 81, 2481, 737, 29006, 16, 13, 15, 7874, 7, 81, 2481, 15885, 57, 737, 61, 17, 737, 9, 57, 26, 220, 220, 220, 1303, 286, 262, 12835, 18842, 16982, 297, 7679, 198, 83, 220, 220, 796, 220, 220, 256, 559, 26, 198, 81, 220, 220, 796, 220, 220, 3509, 12195, 81, 8873, 11, 15, 13, 15, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 24390, 4633, 374, 198, 198, 2, 9626, 425, 24921, 417, 4914, 12, 44, 2954, 264, 290, 479, 198, 40, 62, 17034, 220, 220, 220, 220, 796, 220, 220, 1064, 439, 19510, 81, 13, 10, 83, 737, 27, 16, 1776, 198, 35, 58, 40, 62, 17034, 60, 220, 796, 220, 220, 19862, 17034, 12195, 7, 16, 764, 10, 374, 58, 40, 62, 17034, 60, 764, 10, 256, 58, 40, 62, 17034, 12962, 764, 9, 357, 16, 764, 10, 374, 58, 40, 62, 17034, 60, 764, 12, 256, 58, 40, 62, 17034, 12962, 764, 9, 357, 16, 764, 12, 374, 58, 40, 62, 17034, 60, 764, 10, 256, 58, 40, 62, 17034, 12962, 764, 9, 220, 357, 16, 764, 12, 374, 58, 40, 62, 17034, 60, 764, 12, 256, 58, 40, 62, 17034, 12962, 1776, 198, 64, 58, 40, 62, 17034, 60, 220, 796, 220, 220, 357, 16, 764, 10, 374, 58, 40, 62, 17034, 4083, 61, 17, 764, 12, 256, 58, 40, 62, 17034, 4083, 61, 17, 764, 10, 360, 58, 40, 62, 17034, 12962, 24457, 357, 17, 81, 58, 40, 62, 17034, 36563, 198, 65, 58, 40, 62, 17034, 60, 220, 796, 220, 220, 357, 16, 764, 12, 374, 58, 40, 62, 17034, 4083, 61, 17, 1343, 256, 58, 40, 62, 17034, 4083, 61, 17, 764, 10, 360, 58, 40, 62, 17034, 12962, 24457, 357, 17, 83, 58, 40, 62, 17034, 36563, 198, 64, 58, 7, 81, 13, 10, 83, 737, 29, 28, 16, 60, 764, 28, 220, 220, 352, 13, 15, 26, 198, 65, 58, 7, 81, 13, 10, 83, 737, 29, 28, 16, 60, 764, 28, 220, 220, 352, 13, 15, 26, 198, 198, 82, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 374, 19571, 83, 26, 198, 40, 62, 64, 220, 220, 220, 220, 220, 796, 220, 220, 1064, 439, 19510, 64, 13, 29, 16, 737, 5, 7, 64, 13, 0, 28, 18943, 18125, 198, 82, 58, 40, 62, 64, 60, 220, 220, 796, 220, 220, 362, 764, 9, 64, 58, 40, 62, 64, 60, 24457, 357, 64, 58, 40, 62, 64, 4083, 61, 17, 764, 12, 352, 8, 764, 9, 2604, 12195, 65, 58, 40, 62, 64, 36563, 198, 198, 74, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 2604, 12195, 65, 1776, 198, 74, 58, 40, 62, 64, 60, 220, 220, 796, 220, 220, 357, 64, 58, 40, 62, 64, 4083, 12, 16, 8, 24457, 357, 64, 58, 40, 62, 64, 4083, 10, 16, 8, 764, 9, 2604, 12195, 65, 58, 40, 62, 64, 36563, 198, 74, 1925, 75, 220, 220, 220, 220, 796, 220, 220, 479, 1925, 75, 2411, 764, 9, 479, 26, 198, 198, 2, 36525, 286, 266, 293, 290, 266, 1652, 1626, 266, 34431, 198, 40, 86, 293, 220, 220, 796, 1064, 439, 19510, 50033, 13, 29, 28, 1084, 86, 293, 8, 764, 5, 357, 50033, 29847, 28, 9806, 86, 293, 18125, 198, 40, 86, 1652, 220, 220, 796, 1064, 439, 19510, 50033, 13, 29, 28, 1084, 86, 1652, 8, 764, 5, 357, 50033, 29847, 28, 9806, 86, 1652, 18125, 198, 86, 293, 220, 220, 220, 796, 37456, 58, 40, 86, 293, 11208, 220, 220, 220, 1303, 2859, 3780, 45656, 11, 220, 5721, 198, 86, 1652, 220, 220, 220, 796, 37456, 58, 40, 86, 1652, 11208, 220, 220, 220, 1303, 6562, 48699, 45656, 11, 220, 5721, 198, 538, 13396, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 13, 15, 61, 32590, 358, 549, 1776, 198, 198, 2, 4238, 38189, 198, 660, 220, 220, 220, 220, 796, 352, 764, 30420, 74, 58, 40, 86, 293, 4083, 10, 82, 58, 40, 86, 293, 12962, 764, 9, 304, 862, 72, 26, 198, 27110, 220, 220, 220, 220, 796, 352, 764, 30420, 74, 58, 40, 86, 1652, 4083, 10, 82, 58, 40, 86, 1652, 12962, 764, 9, 304, 862, 72, 26, 198, 260, 220, 220, 220, 220, 796, 264, 58, 40, 86, 293, 60, 764, 9, 304, 862, 72, 26, 198, 41871, 220, 220, 220, 220, 796, 264, 58, 40, 86, 1652, 60, 764, 9, 304, 862, 72, 26, 198, 198, 82, 17225, 1868, 220, 220, 220, 220, 796, 352, 24457, 7, 16, 764, 10, 11201, 12195, 12, 86, 1652, 19571, 940, 737, 9, 11201, 12195, 86, 293, 4458, 14, 940, 18125, 220, 1303, 17593, 29231, 355, 281, 503, 11167, 198, 2, 35235, 7, 7857, 7, 82, 17225, 1868, 27267, 33172, 2546, 7, 34846, 828, 366, 33172, 2546, 7, 74, 1925, 75, 27267, 33172, 2546, 7, 40, 86, 293, 828, 366, 33172, 2546, 7, 40, 86, 1652, 828, 366, 33172, 2546, 7, 74, 1925, 75, 58, 40, 86, 293, 60, 4008, 198, 198, 44, 69, 796, 40001, 796, 277, 80, 68, 764, 9, 14808, 15, 13, 20, 9, 34846, 58, 40, 86, 1652, 35944, 9, 538, 13396, 8, 764, 9, 479, 1925, 75, 58, 40, 86, 293, 60, 4458, 9, 82, 17225, 1868, 198, 198, 40, 71, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 3392, 7, 16, 11, 13664, 7, 660, 18125, 220, 220, 220, 220, 1303, 5752, 286, 3392, 198, 45766, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 3392, 7, 13664, 7, 27110, 828, 16, 1776, 220, 220, 220, 220, 1303, 5721, 286, 3392, 198, 198, 2, 5728, 11108, 8027, 198, 1640, 1312, 796, 352, 25, 358, 549, 198, 220, 220, 220, 2124, 68, 796, 573, 19571, 7, 16, 764, 12, 260, 15885, 260, 1776, 220, 3478, 796, 573, 15885, 27705, 26, 220, 8851, 796, 302, 15885, 7, 16, 764, 10, 1452, 1776, 198, 220, 220, 220, 2124, 69, 796, 48700, 19571, 7, 16, 764, 12, 41871, 15885, 41871, 1776, 220, 256, 22184, 796, 48700, 15885, 26152, 26, 220, 374, 22184, 796, 374, 69, 15885, 7, 16, 764, 10, 83, 22184, 1776, 628, 220, 220, 220, 317, 1157, 220, 796, 2124, 69, 9, 40, 71, 1343, 16975, 9, 27705, 17020, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1065, 796, 357, 26152, 9, 27705, 27691, 9, 7, 41871, 9, 40, 71, 764, 10, 16975, 9, 260, 24036, 198, 220, 220, 220, 317, 2481, 220, 796, 352, 764, 33747, 26152, 9, 27705, 27691, 9, 7, 16, 764, 10, 41871, 9, 260, 24036, 220, 220, 317, 1828, 796, 357, 26152, 15885, 41871, 27493, 40, 71, 10, 45766, 9, 7, 27705, 15885, 260, 8, 17020, 198, 220, 220, 220, 1303, 35235, 7, 7857, 7, 32, 1157, 27267, 33172, 2546, 7, 32, 1065, 828, 366, 33172, 2546, 7, 44, 69, 27267, 33172, 2546, 7, 44, 65, 828, 366, 366, 8, 198, 220, 220, 220, 337, 22184, 220, 220, 796, 337, 69, 220, 764, 9, 317, 1157, 764, 10, 40001, 220, 764, 9, 317, 1065, 26, 198, 220, 220, 220, 337, 9374, 220, 220, 796, 40001, 220, 764, 9, 317, 2481, 764, 10, 337, 69, 220, 764, 9, 317, 1828, 26, 628, 220, 220, 220, 573, 220, 220, 796, 3478, 26, 220, 302, 220, 796, 8851, 26, 220, 220, 48700, 220, 220, 796, 256, 22184, 26, 220, 220, 374, 69, 220, 220, 796, 374, 22184, 26, 198, 220, 220, 220, 337, 69, 220, 796, 337, 22184, 26, 40001, 796, 337, 9374, 26, 198, 437, 198, 198, 2, 3423, 356, 751, 262, 12835, 12, 958, 20314, 757, 329, 16727, 262, 2457, 198, 2, 12835, 1241, 6562, 45166, 3007, 13, 198, 70, 796, 40001, 26, 277, 796, 337, 69, 26, 198, 198, 49, 65, 796, 374, 8873, 764, 10, 256, 559, 13, 61, 17, 764, 9, 81, 2481, 19571, 7, 16, 764, 12, 81, 8873, 15885, 81, 2481, 1776, 198, 198, 55, 68, 796, 16975, 1635, 357, 83, 1604, 58, 40, 86, 293, 4083, 29006, 16, 764, 12, 81, 2481, 58, 40, 86, 293, 4083, 9, 49, 65, 58, 40, 86, 293, 60, 4008, 17020, 198, 55, 69, 796, 256, 2481, 58, 40, 86, 1652, 4083, 29006, 16, 764, 12, 81, 2481, 58, 40, 86, 1652, 4083, 9, 49, 65, 58, 40, 86, 1652, 12962, 1635, 314, 71, 26, 198, 35543, 796, 16975, 1635, 357, 83, 559, 58, 40, 86, 293, 4083, 9, 81, 2481, 58, 40, 86, 293, 4083, 29006, 16, 764, 12, 81, 8873, 58, 40, 86, 293, 4083, 9, 81, 2481, 58, 40, 86, 293, 60, 4008, 17020, 198, 56, 69, 796, 256, 559, 58, 40, 86, 1652, 4083, 9, 81, 2481, 58, 40, 86, 1652, 4083, 29006, 16, 764, 12, 81, 8873, 58, 40, 86, 1652, 4083, 9, 81, 2481, 58, 40, 86, 1652, 12962, 1635, 314, 71, 26, 198, 198, 32, 796, 1395, 68, 764, 9, 357, 16, 764, 10, 11609, 15885, 56, 69, 8, 764, 9, 1395, 69, 26, 198, 33, 796, 1395, 68, 764, 9, 357, 35543, 764, 10, 575, 69, 8, 764, 9, 1395, 69, 26, 198, 198, 4593, 796, 317, 764, 9, 308, 1343, 347, 764, 9, 277, 26, 198, 22184, 796, 317, 764, 9, 277, 1343, 347, 764, 9, 308, 26, 198, 198, 44, 65, 220, 796, 19967, 26, 198, 44, 69, 220, 796, 24714, 26, 198, 7783, 220, 11923, 11, 44, 69, 11, 44, 65, 198, 437, 198, 198, 8818, 11923, 44, 62, 82, 603, 7, 87, 3712, 38469, 26, 406, 2389, 50110, 10779, 15, 13, 2327, 11, 406, 2389, 37, 65, 10779, 15, 13, 1314, 11, 80, 28, 15, 13, 2713, 11, 256, 912, 28, 1270, 11, 256, 1462, 28, 15, 11, 46231, 28, 3829, 11, 266, 75, 28, 50033, 11, 5994, 43, 312, 69, 28, 16, 8, 628, 220, 220, 220, 1303, 1812, 20650, 1395, 3407, 357, 259, 326, 1502, 2599, 198, 220, 220, 220, 1303, 45, 11, 34, 397, 11, 9914, 11, 13217, 11, 34, 33282, 11, 34, 86, 11, 34, 76, 11, 34, 87, 11, 75, 1872, 11, 81, 568, 346, 198, 220, 220, 220, 9131, 40, 796, 2124, 58, 24, 60, 628, 220, 220, 220, 1303, 2896, 500, 9260, 355, 745, 6213, 49070, 357, 10378, 2412, 319, 1181, 15879, 2546, 2599, 198, 220, 220, 220, 279, 2396, 346, 796, 220, 12280, 26601, 8231, 13, 34220, 7, 87, 58, 940, 25, 437, 12962, 198, 220, 220, 220, 374, 568, 346, 796, 12280, 26601, 8231, 13, 35428, 2100, 7, 79, 2396, 346, 11, 40989, 7874, 32604, 7, 40989, 18125, 628, 220, 220, 220, 1312, 13534, 40, 220, 220, 220, 796, 9131, 40, 14, 21283, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 16, 60, 9131, 40, 286, 19823, 7679, 357, 5162, 408, 356, 460, 1487, 326, 8, 628, 220, 220, 220, 1303, 12849, 286, 28400, 7177, 25, 198, 220, 220, 220, 299, 40989, 796, 4129, 7, 40989, 8, 628, 220, 220, 220, 1303, 4889, 1610, 385, 806, 329, 14697, 18480, 6608, 357, 5171, 307, 1760, 2354, 1568, 611, 2622, 8, 198, 220, 220, 220, 406, 14181, 796, 781, 385, 806, 7, 87, 58, 16, 25, 23, 4357, 277, 80, 68, 28, 15, 13, 15, 8, 198, 220, 220, 220, 18074, 223, 28, 43, 14181, 58, 45299, 16, 60, 198, 220, 220, 220, 46651, 28, 43, 14181, 58, 45299, 17, 60, 628, 220, 220, 220, 1303, 2269, 16996, 17794, 357, 31227, 284, 2198, 20157, 1575, 8133, 198, 220, 220, 220, 269, 912, 796, 8615, 7, 13500, 17, 6335, 7, 83, 912, 4008, 198, 220, 220, 220, 269, 1462, 796, 8615, 7, 13500, 17, 6335, 7, 33955, 4008, 198, 220, 220, 220, 7813, 62, 83, 912, 220, 796, 7813, 7, 13500, 17, 6335, 7, 83, 912, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7813, 6591, 220, 220, 220, 220, 220, 220, 9848, 198, 220, 220, 220, 269, 912, 310, 78, 796, 269, 912, 9, 310, 78, 26, 198, 220, 220, 220, 256, 1187, 197, 28, 25706, 7, 13500, 17, 6335, 7, 83, 912, 18125, 198, 220, 220, 220, 256, 14723, 197, 28, 25706, 7, 13500, 17, 6335, 7, 33955, 18125, 198, 220, 220, 220, 8615, 862, 72, 197, 28, 8615, 7, 13500, 17, 6335, 7, 862, 72, 18125, 628, 198, 220, 220, 220, 288, 568, 197, 197, 28, 19862, 17034, 7, 83, 1187, 9, 83, 1187, 10, 83, 14723, 9, 83, 14723, 12, 17, 13, 15, 9, 83, 1187, 9, 83, 14723, 9, 6966, 862, 72, 1776, 628, 220, 220, 220, 1303, 2980, 378, 12835, 9848, 6082, 25, 198, 220, 220, 220, 611, 5994, 43, 312, 69, 855, 16, 198, 220, 220, 220, 220, 220, 220, 220, 19789, 69, 11, 18250, 397, 796, 288, 9435, 5235, 7, 43, 2389, 50110, 11, 43, 2389, 37, 65, 1776, 198, 220, 220, 220, 2073, 361, 5994, 43, 312, 69, 855, 17, 198, 220, 220, 220, 220, 220, 220, 220, 19789, 69, 11, 18250, 397, 796, 1413, 7923, 7, 43, 2389, 50110, 1776, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 35235, 7, 75, 312, 69, 8, 628, 220, 220, 220, 8615, 62, 926, 5439, 220, 220, 220, 796, 8615, 12195, 13500, 17, 6335, 12195, 75, 1031, 270, 397, 18125, 220, 1303, 220, 220, 8615, 12835, 35560, 320, 1071, 18333, 198, 220, 220, 220, 8615, 62, 926, 4528, 220, 220, 220, 796, 8615, 12195, 13500, 17, 6335, 12195, 18250, 397, 18125, 220, 220, 220, 1303, 220, 220, 8615, 500, 286, 3487, 286, 334, 11799, 485, 286, 12835, 198, 220, 220, 220, 7813, 62, 926, 4528, 220, 220, 220, 796, 7813, 12195, 13500, 17, 6335, 12195, 18250, 397, 18125, 220, 220, 220, 1303, 220, 220, 264, 500, 220, 220, 286, 3487, 286, 334, 11799, 485, 286, 12835, 628, 220, 220, 220, 1303, 32558, 5253, 11, 9836, 286, 9082, 4129, 198, 220, 220, 220, 1303, 27131, 378, 38445, 5087, 3917, 351, 21935, 290, 45765, 198, 220, 220, 220, 1303, 24243, 786, 21784, 198, 220, 220, 220, 479, 82, 197, 28, 657, 13, 15, 26, 198, 220, 220, 220, 41727, 197, 28, 657, 13, 15, 26, 198, 220, 220, 220, 275, 69, 197, 28, 657, 13, 15, 26, 198, 220, 220, 220, 27355, 197, 28, 657, 13, 15, 26, 198, 220, 220, 220, 523, 69, 197, 28, 657, 13, 15, 26, 628, 220, 220, 220, 1303, 197, 25844, 276, 21784, 625, 406, 2389, 37, 198, 197, 31, 14323, 67, 329, 1312, 28, 16, 25, 13664, 7, 18250, 397, 8, 198, 197, 197, 2, 256, 28781, 796, 6578, 397, 58, 72, 11208, 197, 4, 12835, 36793, 28810, 3815, 198, 197, 197, 34168, 796, 8615, 7, 13500, 17, 6335, 7, 18250, 397, 58, 72, 12962, 1776, 198, 197, 197, 2, 197, 4090, 4146, 6115, 45765, 7108, 2163, 3607, 28759, 290, 16690, 284, 307, 198, 197, 197, 2, 197, 47945, 798, 416, 374, 8873, 290, 256, 559, 198, 197, 197, 11072, 62, 82, 11, 11072, 62, 78, 11, 8310, 8873, 11, 701, 559, 28, 10396, 1416, 1078, 7, 83, 912, 11, 33955, 11, 862, 72, 11, 18250, 397, 58, 72, 36563, 628, 197, 197, 2, 17174, 17174, 8412, 198, 197, 197, 2, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13558, 29722, 36230, 7375, 37267, 2149, 40, 15365, 198, 197, 197, 2, 9, 198, 197, 197, 2, 9, 197, 591, 220, 1058, 5683, 9438, 35381, 329, 1277, 6591, 28462, 198, 197, 197, 2, 9, 197, 7204, 220, 1058, 5683, 9438, 35381, 329, 1277, 6515, 28462, 198, 197, 197, 2, 9, 197, 1078, 1058, 3460, 268, 2288, 35381, 329, 42864, 28462, 198, 197, 197, 2, 9, 197, 82, 328, 65, 1058, 5157, 1416, 16475, 35381, 286, 262, 42864, 20841, 28462, 198, 197, 197, 2, 9, 197, 82, 328, 69, 1058, 19530, 1416, 16475, 35381, 286, 262, 42864, 18644, 28462, 198, 197, 197, 2, 9, 197, 28202, 220, 1058, 1446, 16475, 35381, 286, 262, 1277, 6591, 28462, 329, 20841, 42864, 28462, 198, 197, 197, 2, 9, 197, 36299, 220, 1058, 1446, 16475, 35381, 286, 262, 1277, 6591, 28462, 329, 18644, 42864, 28462, 198, 197, 197, 2, 9, 197, 85, 69, 220, 220, 1058, 1446, 16475, 35381, 286, 18644, 42864, 28462, 287, 262, 6515, 4571, 198, 197, 197, 2, 9, 197, 85, 65, 220, 220, 1058, 1446, 16475, 35381, 286, 20841, 42864, 28462, 287, 262, 6515, 4571, 198, 197, 197, 2, 9, 197, 86, 220, 220, 1058, 43484, 4154, 282, 45765, 35381, 198, 197, 197, 2, 17174, 17174, 8412, 628, 197, 197, 2, 197, 11627, 9438, 44036, 198, 197, 197, 591, 4528, 796, 33166, 62, 82, 19571, 310, 82, 26, 198, 197, 197, 74, 11106, 796, 33166, 62, 78, 19571, 310, 78, 26, 628, 197, 197, 2, 197, 30547, 45765, 35381, 49876, 198, 197, 197, 568, 2436, 72, 197, 28, 1216, 8873, 9, 14415, 14, 310, 82, 310, 78, 26, 198, 197, 197, 568, 2704, 72, 197, 28, 10117, 559, 9, 14415, 14, 310, 82, 310, 78, 26, 198, 197, 197, 65, 2704, 72, 197, 28, 269, 28781, 9, 34168, 26, 198, 197, 197, 591, 197, 28, 479, 82, 10, 591, 4528, 9, 75, 312, 69, 58, 72, 11208, 198, 197, 197, 7204, 197, 28, 41727, 10, 74, 11106, 9, 75, 312, 69, 58, 72, 11208, 198, 197, 197, 19881, 197, 28, 275, 69, 10, 65, 2704, 72, 9, 75, 312, 69, 58, 72, 11208, 198, 197, 197, 568, 65, 197, 28, 27355, 10, 568, 2436, 72, 9, 75, 312, 69, 58, 72, 11208, 198, 197, 197, 568, 69, 197, 28, 523, 69, 10, 568, 2704, 72, 9, 75, 312, 69, 58, 72, 11208, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 35235, 7, 568, 65, 11, 366, 33172, 523, 69, 8, 198, 220, 220, 220, 1303, 197, 10082, 16996, 5087, 284, 307, 973, 1568, 351, 374, 8873, 290, 256, 559, 198, 197, 82, 9945, 197, 28, 657, 13, 20, 9, 7, 591, 10, 19881, 1776, 198, 197, 82, 7568, 197, 28, 657, 13, 20, 9, 7, 591, 12, 19881, 1776, 198, 197, 67, 672, 197, 28, 657, 13, 20, 9, 7, 7204, 10, 19881, 1776, 198, 197, 67, 1659, 197, 28, 657, 13, 20, 9, 7, 7204, 12, 19881, 1776, 198, 197, 1860, 65, 197, 28, 657, 13, 20, 9, 7, 16, 764, 10, 19881, 1776, 198, 197, 1860, 69, 197, 28, 657, 13, 20, 9, 7, 16, 764, 12, 19881, 1776, 198, 220, 220, 220, 1303, 3661, 3949, 6374, 32135, 3951, 28481, 12, 26427, 994, 357, 40198, 510, 1568, 8, 198, 220, 220, 220, 1303, 352, 13, 19, 6591, 47537, 3610, 5766, 329, 477, 12835, 11367, 602, 198, 220, 220, 220, 1303, 4091, 37430, 678, 287, 410, 67, 51, 3717, 198, 220, 220, 220, 327, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 62, 926, 4528, 15885, 310, 82, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 4528, 60, 220, 220, 220, 220, 42208, 32747, 9518, 416, 449, 37279, 198, 220, 220, 220, 311, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 62, 926, 4528, 15885, 31369, 62, 83, 912, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 4528, 60, 220, 220, 220, 220, 42208, 32747, 9518, 416, 449, 37279, 628, 220, 220, 220, 8615, 62, 67, 2120, 292, 220, 796, 327, 82, 9, 1952, 7, 16, 11, 13664, 7, 75, 1031, 270, 397, 4008, 764, 10, 311, 82, 9, 6966, 62, 926, 5439, 17020, 220, 220, 1303, 685, 77, 4528, 11, 21283, 7761, 60, 198, 220, 220, 220, 43458, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 2352, 12195, 6966, 62, 67, 2120, 292, 19571, 310, 82, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 4528, 11, 21283, 7761, 60, 42208, 32747, 628, 220, 220, 220, 1303, 352, 13, 20, 39522, 33610, 11, 7695, 11, 350, 568, 198, 220, 220, 220, 33610, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 1033, 12195, 591, 9, 87, 75, 9, 13534, 40, 1776, 220, 220, 220, 220, 1303, 685, 21283, 10, 16, 60, 220, 279, 21526, 90, 16, 92, 12867, 286, 11681, 257, 12835, 287, 6591, 26672, 198, 220, 220, 220, 7695, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 1033, 12195, 7204, 9, 87, 75, 9, 13534, 40, 1776, 220, 220, 220, 220, 1303, 685, 21283, 10, 16, 60, 220, 279, 21526, 90, 16, 92, 12867, 286, 11681, 257, 12835, 287, 13432, 26672, 628, 220, 220, 220, 33610, 58, 16, 25, 21283, 60, 220, 220, 220, 796, 220, 220, 33610, 58, 16, 25, 21283, 60, 1635, 7, 16, 764, 12, 11201, 12195, 12, 591, 9, 13534, 40, 9, 34350, 4008, 29006, 591, 9, 13534, 40, 9, 34350, 1776, 220, 220, 1303, 22941, 33610, 14, 18833, 329, 27454, 44332, 198, 220, 220, 220, 7695, 58, 16, 25, 21283, 60, 220, 220, 220, 796, 220, 220, 7695, 58, 16, 25, 21283, 60, 1635, 7, 16, 764, 12, 11201, 12195, 12, 7204, 9, 13534, 40, 9, 34350, 4008, 29006, 7204, 9, 13534, 40, 9, 34350, 1776, 220, 220, 1303, 22941, 33610, 14, 18833, 329, 27454, 44332, 628, 628, 220, 220, 220, 1303, 47, 568, 25, 30873, 1799, 286, 21769, 257, 4252, 18250, 12835, 379, 6795, 2124, 11, 766, 37430, 3261, 287, 410, 67, 51, 3717, 198, 220, 220, 220, 350, 568, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 2092, 7, 18833, 1776, 198, 220, 220, 220, 329, 474, 28, 16, 25, 13664, 7, 87, 75, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 7857, 7, 64, 828, 366, 33172, 2546, 7, 47, 568, 828, 366, 33172, 2546, 7, 18833, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 350, 568, 58, 73, 60, 796, 15094, 70, 74, 7, 87, 4613, 350, 568, 8818, 7, 7204, 11, 591, 11, 13534, 40, 11, 80, 11, 67, 568, 11, 87, 828, 2124, 75, 58, 73, 45297, 34350, 11, 87, 75, 58, 73, 4357, 374, 83, 349, 28, 16, 68, 12, 17, 38381, 16, 60, 14, 34350, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 47, 568, 58, 73, 11, 25, 22241, 220, 220, 15094, 7, 31, 7, 88, 8, 47, 568, 8818, 7, 42, 11, 74, 11, 13534, 40, 11, 80, 11, 67, 568, 11, 88, 828, 87, 75, 7, 73, 13219, 34350, 11, 87, 75, 7, 73, 4008, 14, 34350, 26, 4064, 2, 482, 27, 37, 2200, 11770, 29, 198, 220, 220, 220, 886, 628, 220, 220, 220, 350, 568, 58, 47, 568, 13, 29, 18833, 22241, 5288, 26933, 18833, 58, 47, 568, 13, 29, 18833, 60, 33610, 58, 47, 568, 13, 29, 18833, 60, 4357, 67, 12078, 28, 17, 1776, 220, 220, 220, 1303, 83, 1124, 1337, 286, 38185, 4049, 198, 220, 220, 220, 350, 568, 58, 47, 568, 13, 29, 12016, 22241, 5288, 26933, 18833, 58, 47, 568, 13, 29, 12016, 60, 33610, 58, 47, 568, 13, 29, 12016, 60, 4357, 67, 12078, 28, 17, 1776, 220, 220, 220, 1303, 83, 1124, 1337, 286, 38185, 4049, 628, 198, 220, 220, 220, 1303, 1439, 351, 4129, 286, 45656, 25, 198, 220, 220, 220, 43237, 65, 796, 288, 9945, 15885, 33643, 13, 10, 1860, 69, 15885, 32830, 26, 198, 197, 82, 328, 69, 796, 288, 7568, 15885, 33643, 13, 10, 1860, 65, 15885, 32830, 26, 198, 220, 220, 220, 264, 65, 220, 220, 796, 264, 9945, 9, 33643, 764, 10, 264, 7568, 9, 32830, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 264, 65, 11, 220, 220, 220, 220, 279, 22515, 90, 16, 92, 42864, 220, 220, 220, 220, 736, 1416, 1436, 45765, 35381, 329, 1020, 934, 18349, 198, 220, 220, 220, 264, 69, 220, 220, 796, 264, 7568, 9, 33643, 764, 10, 264, 9945, 9, 32830, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 264, 69, 11, 220, 220, 220, 220, 279, 22515, 90, 16, 92, 42864, 220, 220, 220, 220, 2651, 220, 220, 220, 220, 45765, 35381, 329, 1020, 934, 18349, 198, 220, 220, 220, 410, 65, 220, 220, 796, 466, 65, 9, 33643, 764, 10, 466, 69, 9, 32830, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 410, 65, 11, 220, 220, 220, 220, 279, 22515, 90, 16, 92, 47424, 736, 1416, 1436, 45765, 35381, 329, 42864, 220, 18349, 198, 220, 220, 220, 410, 69, 220, 220, 796, 466, 69, 9, 33643, 764, 10, 466, 65, 9, 32830, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 410, 69, 11, 220, 220, 220, 220, 279, 22515, 90, 16, 92, 47424, 2651, 220, 220, 220, 220, 45765, 35381, 329, 42864, 220, 18349, 198, 220, 220, 220, 266, 220, 220, 220, 796, 27355, 9, 33643, 764, 10, 523, 69, 9, 32830, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 266, 11, 220, 220, 220, 220, 220, 279, 26895, 90, 16, 92, 8406, 4154, 282, 45765, 763, 24531, 298, 357, 37295, 282, 12, 37295, 282, 8, 198, 220, 220, 220, 257, 220, 220, 220, 796, 352, 764, 12, 82, 328, 69, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 220, 220, 31919, 2288, 198, 220, 220, 220, 285, 220, 220, 220, 796, 19862, 17034, 12195, 64, 13, 61, 17, 764, 12, 82, 328, 65, 13, 61, 17, 1776, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 374, 10745, 796, 357, 64, 7874, 76, 737, 14, 82, 328, 65, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 374, 10745, 17, 28, 374, 10745, 15885, 81, 10745, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 1303, 35235, 7, 39504, 7, 76, 828, 366, 33172, 949, 7, 591, 4008, 198, 220, 220, 220, 1303, 1277, 6591, 11881, 198, 220, 220, 220, 449, 16, 74, 220, 220, 220, 220, 220, 220, 220, 796, 42302, 41, 16, 12195, 12, 16, 11, 285, 11, 591, 11, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 449, 17, 74, 220, 220, 220, 220, 220, 220, 220, 796, 42302, 41, 17, 12195, 657, 11, 285, 11, 591, 11, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 449, 16, 42, 220, 220, 220, 220, 220, 220, 220, 796, 42302, 41, 16, 12195, 12, 16, 11, 285, 11, 7204, 11, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 4064, 2087, 329, 17952, 286, 374, 4598, 198, 220, 220, 220, 449, 17, 42, 220, 220, 220, 220, 220, 220, 220, 796, 42302, 41, 17, 12195, 657, 11, 285, 11, 7204, 11, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 4064, 2087, 329, 17952, 286, 374, 4598, 198, 220, 220, 220, 304, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1033, 12195, 12, 76, 15885, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 304, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 304, 16, 13, 61, 17, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 302, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 374, 10745, 15885, 68, 16, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 628, 220, 220, 220, 2853, 296, 220, 220, 220, 220, 220, 220, 796, 352, 764, 12, 81, 10745, 17, 15885, 68, 17, 26, 198, 220, 220, 220, 264, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 264, 69, 764, 10, 81, 10745, 15885, 36299, 26, 198, 220, 220, 220, 264, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 264, 69, 15885, 81, 10745, 10, 36299, 26, 198, 220, 220, 220, 410, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 410, 69, 13, 10, 81, 10745, 15885, 85, 65, 26, 198, 220, 220, 220, 410, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 410, 69, 15885, 81, 10745, 13, 10, 85, 65, 26, 628, 220, 220, 220, 350, 824, 220, 220, 220, 220, 220, 220, 220, 220, 796, 264, 16, 15885, 41, 16, 74, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 1195, 824, 220, 220, 220, 220, 220, 220, 220, 220, 796, 264, 17, 15885, 41, 17, 74, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 628, 220, 220, 220, 41778, 220, 220, 220, 220, 220, 220, 220, 220, 796, 410, 16, 15885, 41, 16, 42, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 77, 40989, 8, 220, 220, 4064, 2087, 329, 17952, 286, 374, 4598, 198, 220, 220, 220, 1195, 2238, 220, 220, 220, 220, 220, 220, 220, 220, 796, 410, 17, 15885, 41, 17, 42, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 220, 220, 4064, 2087, 329, 17952, 286, 374, 4598, 628, 220, 220, 220, 256, 559, 62, 824, 220, 220, 220, 220, 220, 796, 1033, 32590, 591, 9, 13534, 40, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 16, 60, 198, 220, 220, 220, 256, 559, 62, 2238, 220, 220, 220, 220, 220, 796, 1033, 32590, 7204, 9, 13534, 40, 1776, 628, 220, 220, 220, 1168, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 357, 16, 532, 256, 559, 62, 824, 1635, 256, 559, 62, 2238, 20679, 7, 591, 1343, 41727, 1776, 220, 1303, 2622, 329, 49166, 374, 568, 628, 220, 220, 220, 256, 559, 62, 1860, 220, 220, 220, 220, 220, 796, 357, 16, 764, 12, 81, 10745, 17, 737, 9, 68, 16, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 374, 8873, 62, 1860, 220, 220, 220, 220, 220, 796, 374, 10745, 15885, 7, 16, 764, 12, 68, 17, 8, 220, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 256, 559, 62, 21282, 220, 220, 220, 220, 220, 796, 357, 47, 824, 7874, 260, 15885, 48, 824, 8, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 256, 559, 62, 4598, 220, 220, 220, 220, 220, 796, 357, 47, 2238, 7874, 260, 15885, 48, 2238, 8, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 374, 8873, 62, 21282, 220, 220, 220, 220, 220, 796, 357, 48, 824, 7874, 260, 15885, 47, 824, 8, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 77, 40989, 60, 198, 220, 220, 220, 374, 8873, 62, 4598, 220, 220, 220, 220, 220, 796, 357, 48, 2238, 7874, 260, 15885, 47, 2238, 8, 24457, 6559, 296, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 77, 40989, 8, 628, 220, 220, 220, 309, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 410, 17, 15885, 82, 16, 15885, 7, 57, 7874, 41, 16, 74, 9, 83, 559, 62, 2238, 737, 29006, 7204, 13, 10, 76, 737, 10, 85, 16, 15885, 82, 17, 15885, 7, 57, 7874, 41, 16, 42, 9, 83, 559, 62, 824, 737, 29006, 591, 13, 10, 76, 1776, 198, 220, 220, 220, 309, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 532, 7, 48, 2238, 15885, 81, 8873, 62, 21282, 10, 47, 2238, 15885, 83, 559, 62, 21282, 737, 9, 81, 10745, 26, 198, 220, 220, 220, 374, 8873, 62, 82, 375, 220, 220, 220, 220, 796, 357, 51, 16, 10, 51, 17, 737, 29006, 16, 764, 12, 81, 10745, 17, 1776, 628, 220, 220, 220, 1303, 197, 33, 312, 4154, 282, 4079, 590, 198, 220, 220, 220, 1303, 197, 28008, 45765, 10156, 198, 220, 220, 220, 374, 8873, 62, 82, 418, 796, 266, 15885, 72, 13534, 40, 15885, 16345, 7, 47, 568, 58, 16, 25, 21283, 36563, 198, 220, 220, 220, 1303, 197, 14957, 39418, 10156, 198, 220, 220, 220, 374, 8873, 62, 568, 28, 81, 8873, 62, 82, 418, 13, 10, 81, 8873, 62, 82, 375, 26, 198, 220, 220, 220, 1303, 35235, 7, 81, 8873, 62, 568, 58, 3064, 25, 10232, 12962, 628, 220, 220, 220, 288, 77, 28, 16, 764, 12, 81, 568, 346, 15885, 81, 8873, 62, 1860, 26, 198, 220, 220, 220, 1303, 7472, 39418, 10156, 198, 220, 220, 220, 374, 568, 220, 220, 220, 220, 220, 220, 220, 220, 796, 374, 8873, 62, 568, 764, 10, 374, 568, 346, 764, 9, 350, 568, 58, 21283, 10, 16, 60, 764, 10, 14808, 83, 559, 62, 21282, 13, 10, 83, 559, 62, 824, 9, 81, 568, 346, 15885, 81, 8873, 62, 1860, 737, 9, 83, 559, 62, 2238, 13, 33747, 83, 559, 62, 21282, 13, 10, 83, 559, 62, 824, 737, 9, 83, 559, 62, 4598, 737, 9, 81, 568, 346, 19571, 6559, 296, 26, 198, 220, 220, 220, 1303, 14719, 4146, 30063, 4079, 1817, 198, 220, 220, 220, 1303, 374, 21282, 25, 47424, 12, 4411, 8802, 37910, 4079, 590, 5766, 329, 6591, 4519, 28462, 198, 220, 220, 220, 374, 21282, 220, 220, 220, 220, 796, 374, 8873, 62, 21282, 764, 10, 357, 83, 559, 62, 824, 764, 10, 256, 559, 62, 21282, 737, 9, 81, 568, 346, 15885, 83, 559, 62, 1860, 19571, 6559, 296, 26, 198, 220, 220, 220, 1303, 374, 1860, 25, 3182, 12, 4411, 8802, 37910, 4079, 590, 5766, 198, 220, 220, 220, 374, 1860, 220, 220, 220, 220, 796, 374, 8873, 62, 1860, 764, 10, 256, 559, 62, 1860, 15885, 81, 568, 346, 15885, 83, 559, 62, 1860, 19571, 6559, 296, 26, 198, 220, 220, 220, 1303, 374, 4598, 25, 3182, 12, 37295, 282, 4079, 590, 5766, 198, 220, 220, 220, 374, 4598, 220, 220, 220, 220, 796, 374, 8873, 62, 4598, 764, 10, 357, 83, 559, 62, 2238, 764, 10, 256, 559, 62, 4598, 737, 9, 81, 568, 346, 15885, 83, 559, 62, 1860, 19571, 6559, 296, 26, 198, 220, 220, 220, 1303, 7783, 685, 81, 568, 374, 21282, 374, 1860, 374, 4598, 628, 220, 220, 220, 1303, 360, 13513, 2438, 994, 284, 2610, 1277, 290, 42864, 1657, 717, 11, 761, 284, 4553, 428, 656, 1194, 2163, 1568, 198, 220, 220, 220, 8678, 403, 62, 796, 1976, 27498, 7, 77, 40989, 737, 10, 3064, 198, 220, 220, 220, 8678, 2584, 62, 796, 1976, 27498, 7, 77, 40989, 737, 10, 3064, 198, 220, 220, 220, 37912, 62, 796, 1976, 27498, 7, 21283, 10, 16, 11, 77, 40989, 8, 198, 220, 220, 220, 412, 489, 84, 62, 796, 1976, 27498, 7, 21283, 10, 16, 11, 77, 40989, 8, 198, 220, 220, 220, 412, 489, 84, 62, 16, 220, 220, 220, 220, 220, 796, 374, 568, 346, 15885, 19510, 83, 559, 62, 824, 13, 10, 83, 559, 62, 21282, 737, 9, 36, 19155, 44807, 10, 83, 559, 62, 1860, 15885, 36, 15688, 62, 737, 14, 6559, 296, 26, 198, 220, 220, 220, 412, 489, 84, 15, 220, 220, 220, 220, 220, 220, 796, 374, 8873, 62, 21282, 15885, 36, 19155, 62, 764, 10, 374, 8873, 62, 1860, 15885, 36, 15688, 62, 764, 10, 256, 559, 62, 1860, 15885, 36, 489, 84, 62, 16, 26, 198, 220, 220, 220, 37912, 62, 16, 220, 220, 220, 220, 220, 796, 256, 559, 62, 21282, 15885, 36, 19155, 62, 764, 10, 256, 559, 62, 1860, 15885, 36, 15688, 62, 764, 10, 374, 8873, 62, 1860, 15885, 36, 489, 84, 62, 16, 26, 198, 220, 220, 220, 25979, 16, 220, 220, 220, 220, 220, 796, 8678, 2584, 62, 220, 764, 12, 374, 10745, 15885, 36, 489, 84, 15, 26, 198, 220, 220, 220, 25979, 17, 220, 220, 220, 220, 220, 796, 412, 489, 84, 62, 16, 764, 12, 374, 10745, 15885, 36, 1084, 62, 16, 26, 628, 220, 220, 220, 1303, 17952, 286, 262, 28462, 274, 287, 262, 39418, 357, 5661, 2331, 3105, 8133, 198, 220, 220, 220, 256, 16, 796, 264, 69, 13, 10, 81, 10745, 15885, 36299, 198, 220, 220, 220, 256, 17, 796, 264, 65, 10, 81, 10745, 15885, 28202, 198, 220, 220, 220, 1303, 383, 1502, 994, 33343, 11, 783, 1804, 262, 9052, 625, 299, 75, 11, 407, 299, 40989, 0, 357, 69, 1603, 8, 198, 220, 220, 220, 1303, 770, 9052, 318, 640, 18587, 11, 2192, 836, 470, 761, 1029, 37410, 6323, 329, 262, 399, 4663, 636, 994, 11, 523, 340, 460, 307, 34464, 257, 1256, 357, 16706, 1802, 21533, 4831, 422, 13037, 12, 44688, 21533, 10091, 198, 220, 220, 220, 1303, 775, 655, 761, 340, 329, 2010, 2568, 5236, 290, 29463, 994, 13, 198, 220, 220, 220, 1441, 685, 81, 568, 374, 21282, 374, 1860, 374, 4598, 60, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 21283, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 449, 16, 74, 87, 220, 796, 42302, 41, 16, 12195, 87, 75, 58, 72, 4357, 76, 11, 591, 11, 13534, 40, 1776, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 21283, 60, 198, 220, 220, 220, 220, 220, 220, 220, 449, 17, 74, 87, 220, 796, 42302, 41, 17, 12195, 87, 75, 58, 72, 4357, 76, 11, 591, 11, 13534, 40, 1776, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 21283, 60, 198, 220, 220, 220, 220, 220, 220, 220, 376, 16, 220, 220, 220, 796, 8678, 403, 62, 15885, 41, 16, 74, 87, 15885, 83, 16, 764, 10, 25979, 16, 15885, 11201, 12195, 285, 15885, 13534, 40, 15885, 87, 75, 58, 72, 36563, 220, 220, 220, 220, 220, 1303, 58, 21283, 60, 198, 220, 220, 220, 220, 220, 220, 220, 376, 17, 220, 220, 220, 796, 8678, 403, 62, 15885, 41, 17, 74, 87, 15885, 83, 17, 764, 10, 25979, 17, 15885, 11201, 12195, 12, 76, 15885, 13534, 40, 15885, 7, 87, 75, 58, 72, 4083, 10, 16, 18125, 220, 1303, 58, 21283, 60, 198, 220, 220, 220, 220, 220, 220, 220, 37912, 62, 58, 72, 11, 47715, 220, 796, 357, 37, 16, 13, 10, 81, 10745, 15885, 37, 17, 737, 29006, 16, 764, 12, 81, 10745, 17, 1776, 2, 220, 220, 220, 220, 220, 220, 220, 685, 21283, 11, 77, 40989, 60, 198, 220, 220, 220, 220, 220, 220, 220, 412, 489, 84, 62, 58, 72, 11, 47715, 220, 796, 357, 37, 17, 13, 10, 81, 10745, 15885, 37, 16, 737, 29006, 16, 764, 12, 81, 10745, 17, 1776, 2, 220, 220, 220, 220, 220, 220, 220, 685, 21283, 11, 77, 40989, 60, 198, 220, 220, 220, 886, 628, 198, 437, 198, 198, 2, 11161, 284, 787, 428, 588, 262, 27631, 603, 376, 3829, 2163, 11, 2651, 28813, 1422, 470, 670, 4306, 13, 198, 8818, 42302, 41, 16, 7, 87, 11, 76, 11, 74, 11, 13534, 40, 8, 198, 220, 220, 220, 1619, 16193, 74, 12, 76, 27493, 13534, 40, 198, 220, 220, 220, 611, 2352, 7, 12381, 8, 29, 16, 36, 12, 18, 26, 198, 220, 220, 220, 220, 220, 220, 220, 449, 16, 796, 357, 11201, 7, 76, 9, 13534, 40, 9, 87, 13219, 11201, 7, 74, 9, 13534, 40, 9, 87, 4008, 29006, 74, 12, 76, 1776, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 449, 16, 796, 532, 15, 13, 20, 9, 13534, 40, 9, 87, 9, 7, 11201, 7, 76, 9, 13534, 40, 9, 87, 47762, 11201, 7, 74, 9, 13534, 40, 9, 87, 4008, 9, 7, 16, 13, 15, 12, 12381, 61, 17, 14, 1065, 13, 15, 1776, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 449, 16, 198, 437, 198, 198, 8818, 42302, 41, 17, 7, 87, 11, 76, 11, 74, 11, 13534, 40, 8, 198, 220, 220, 220, 1441, 357, 11201, 7, 74, 9, 13534, 40, 9, 87, 13219, 11201, 32590, 74, 9, 13534, 40, 27493, 11201, 32590, 76, 9, 13534, 40, 9, 7, 16, 10, 87, 4008, 20679, 7, 74, 10, 76, 1776, 198, 437, 628, 198, 2, 43504, 10619, 10426, 8363, 2163, 350, 568, 422, 6374, 32135, 410, 16, 13, 4790, 198, 8818, 350, 568, 8818, 7, 42, 11, 74, 11, 13534, 40, 11, 80, 11, 67, 568, 11, 87, 75, 8, 198, 220, 220, 220, 611, 288, 568, 0, 28, 15, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 435, 69, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 357, 67, 568, 14, 80, 8, 1635, 17, 29006, 74, 10, 42, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 279, 568, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 1033, 19510, 42, 10, 74, 27493, 13534, 40, 9, 87, 75, 1343, 19862, 17034, 7, 42, 9, 74, 27493, 13534, 40, 29006, 1604, 220, 1267, 9, 7, 16, 12, 11201, 7, 87, 75, 9, 7, 1604, 220, 47282, 1776, 2, 685, 21283, 10, 16, 60, 220, 5766, 329, 16096, 286, 33610, 290, 7695, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 279, 568, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 1033, 19510, 42, 10, 74, 27493, 13534, 40, 9, 87, 75, 532, 19862, 17034, 7, 42, 9, 74, 27493, 13534, 40, 9, 87, 75, 1776, 2, 685, 21283, 10, 16, 60, 220, 5766, 329, 16096, 286, 33610, 290, 7695, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 279, 568, 198, 437, 198, 198, 2, 16034, 6374, 32135, 410, 16, 13, 4790, 43504, 10619, 10426, 2873, 2163, 2322, 1416, 265, 198, 37811, 17174, 17174, 8412, 198, 0, 9, 197, 83, 912, 197, 197, 28, 6591, 1976, 268, 342, 198, 0, 9, 197, 33955, 197, 197, 28, 11681, 1976, 268, 342, 198, 0, 9, 197, 862, 72, 197, 197, 28, 35560, 320, 1071, 198, 0, 9, 197, 926, 75, 197, 197, 28, 12835, 36793, 9848, 198, 0, 9, 197, 11072, 62, 82, 197, 28, 28759, 5499, 198, 0, 9, 197, 11072, 62, 78, 197, 28, 28759, 5499, 198, 0, 9, 197, 8310, 8873, 197, 28, 2163, 284, 307, 33096, 416, 12835, 4079, 590, 374, 8873, 198, 0, 9, 197, 701, 559, 197, 28, 5499, 284, 307, 33096, 416, 12835, 1007, 20124, 590, 256, 559, 198, 0, 17174, 17174, 8412, 198, 198, 0, 197, 7293, 1133, 6115, 45765, 5499, 290, 28759, 44036, 198, 0, 197, 1640, 1813, 6591, 1976, 268, 342, 11, 11681, 1976, 268, 342, 11, 35560, 320, 1071, 290, 12835, 36793, 9848, 13, 198, 198, 0, 197, 11072, 62, 82, 290, 33166, 62, 78, 389, 262, 28759, 5499, 13, 198, 0, 197, 8310, 8873, 290, 10117, 559, 389, 262, 5499, 284, 307, 33096, 416, 12835, 4079, 590, 374, 8873, 290, 198, 0, 197, 33201, 1007, 20124, 590, 256, 559, 11, 8148, 11, 287, 1502, 284, 7330, 262, 6115, 45765, 198, 0, 197, 8818, 13, 198, 37811, 198, 8818, 2322, 1416, 1078, 7, 83, 912, 11, 33955, 11, 862, 72, 11, 926, 4528, 8, 198, 220, 220, 220, 1303, 16598, 1416, 1078, 2196, 362, 13, 198, 220, 220, 220, 1303, 25598, 416, 370, 13, 4643, 8873, 891, 198, 220, 220, 220, 1303, 42131, 416, 449, 37279, 5045, 647, 16221, 284, 2603, 23912, 299, 3674, 565, 1300, 13, 198, 220, 220, 220, 1303, 3128, 25, 1367, 3945, 3648, 198, 220, 220, 220, 1303, 83, 912, 220, 220, 220, 685, 16, 60, 220, 220, 220, 220, 220, 220, 220, 220, 3825, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 268, 342, 9848, 287, 7370, 198, 220, 220, 220, 1303, 33955, 220, 220, 220, 685, 16, 60, 220, 220, 220, 220, 220, 220, 220, 220, 11086, 13208, 220, 220, 220, 1976, 268, 342, 9848, 287, 7370, 198, 220, 220, 220, 1303, 862, 72, 220, 220, 220, 685, 16, 60, 220, 220, 220, 220, 220, 220, 220, 220, 43795, 286, 220, 35560, 320, 1071, 9848, 1022, 6591, 290, 11681, 2292, 198, 220, 220, 220, 1303, 926, 4528, 220, 220, 685, 926, 4528, 60, 220, 220, 220, 220, 220, 12835, 36793, 7177, 628, 220, 220, 220, 299, 4528, 220, 220, 220, 220, 796, 4129, 7, 926, 4528, 1776, 628, 220, 220, 220, 46231, 62, 6335, 220, 220, 220, 220, 220, 220, 220, 220, 796, 3396, 17, 6335, 7, 862, 72, 1776, 198, 220, 220, 220, 8615, 62, 862, 72, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 7, 13500, 17, 6335, 7, 862, 72, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 8615, 500, 286, 3585, 35560, 320, 1071, 9848, 198, 220, 220, 220, 8615, 62, 926, 4528, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 7, 13500, 17, 6335, 7, 926, 4528, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 8615, 500, 286, 3487, 286, 334, 11799, 485, 286, 12835, 198, 220, 220, 220, 7813, 62, 926, 4528, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 7, 13500, 17, 6335, 7, 926, 4528, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 264, 500, 220, 220, 286, 3487, 286, 334, 11799, 485, 286, 12835, 198, 220, 220, 220, 8615, 62, 83, 912, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 7, 13500, 17, 6335, 7, 83, 912, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 8615, 500, 286, 4252, 1976, 268, 342, 9848, 198, 220, 220, 220, 7813, 62, 83, 912, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 7, 13500, 17, 6335, 7, 83, 912, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 264, 500, 220, 220, 286, 4252, 1976, 268, 342, 9848, 198, 220, 220, 220, 8615, 62, 33955, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 7, 13500, 17, 6335, 7, 33955, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 8615, 500, 286, 22890, 1976, 268, 342, 9848, 198, 220, 220, 220, 7813, 62, 33955, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 7, 13500, 17, 6335, 7, 33955, 18125, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 264, 500, 220, 220, 286, 22890, 1976, 268, 342, 9848, 198, 220, 220, 220, 327, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 62, 926, 4528, 9, 6966, 62, 83, 912, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 16, 92, 198, 220, 220, 220, 311, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 62, 926, 4528, 9, 31369, 62, 83, 912, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 16, 92, 198, 220, 220, 220, 1766, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 8615, 62, 926, 4528, 9, 6966, 62, 33955, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 16, 92, 198, 220, 220, 220, 1406, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 62, 926, 4528, 9, 31369, 62, 33955, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 16, 92, 198, 220, 220, 220, 1081, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5415, 26933, 50, 82, 11, 32274, 36563, 198, 220, 220, 220, 27378, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5415, 26933, 2396, 11, 7222, 36563, 198, 220, 220, 220, 1303, 35235, 32590, 32274, 19571, 1722, 11, 366, 33172, 311, 82, 11, 366, 33172, 327, 82, 8, 198, 220, 220, 220, 275, 912, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 936, 418, 12195, 12, 32274, 19571, 1722, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 16, 92, 198, 220, 220, 220, 275, 1462, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 936, 418, 12195, 12, 7222, 19571, 32, 78, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 22515, 90, 17, 92, 198, 220, 220, 220, 33166, 62, 78, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 14, 14415, 9, 19510, 65, 1462, 12, 14415, 14, 17, 737, 9, 7222, 1343, 7813, 7, 65, 1462, 737, 9, 2396, 1776, 198, 220, 220, 220, 33166, 62, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 14, 14415, 9, 19510, 65, 912, 12, 14415, 14, 17, 737, 9, 32274, 1343, 7813, 7, 65, 912, 737, 9, 50, 82, 1776, 198, 220, 220, 220, 25979, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 2352, 7, 65, 912, 12, 65, 1462, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 21495, 90, 16, 92, 198, 220, 220, 220, 25979, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 31028, 12, 8937, 7, 65, 912, 1343, 275, 1462, 532, 31028, 1776, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 279, 21495, 90, 16, 92, 628, 220, 220, 220, 20323, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 46231, 62, 6335, 1343, 25979, 16, 1343, 25979, 17, 26, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 42208, 11323, 90, 16, 92, 628, 220, 220, 220, 275, 83, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5288, 26933, 862, 72, 62, 6335, 11, 67, 12514, 16, 36563, 198, 220, 220, 220, 275, 83, 18, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5415, 26933, 862, 72, 62, 6335, 11, 67, 12514, 17, 36563, 198, 220, 220, 220, 275, 83, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 20323, 532, 275, 83, 16, 532, 275, 83, 18, 26, 628, 220, 220, 220, 309, 16, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 32274, 15885, 7222, 1343, 311, 82, 15885, 2396, 15885, 6966, 62, 862, 72, 26, 198, 220, 220, 220, 309, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 7813, 7, 18347, 17, 737, 9, 7, 17, 1722, 15885, 32, 78, 1343, 311, 82, 15885, 2396, 15885, 6966, 7, 18347, 16, 737, 9, 6966, 7, 18347, 18, 18125, 628, 220, 220, 220, 449, 1084, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 357, 220, 220, 275, 83, 17, 737, 9, 51, 16, 532, 309, 17, 26, 198, 220, 220, 220, 449, 9541, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 357, 14415, 12, 18347, 17, 737, 9, 51, 16, 1343, 309, 17, 26, 628, 220, 220, 220, 1216, 8873, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 449, 9541, 29006, 17, 14415, 61, 17, 1776, 198, 220, 220, 220, 10117, 559, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 532, 41, 1084, 1220, 7, 17, 14415, 61, 17, 1776, 628, 220, 220, 220, 1303, 42208, 13, 26895, 266, 75, 3784, 42208, 17501, 90, 16, 92, 198, 220, 220, 220, 1216, 8873, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5415, 26933, 15, 13, 15, 11, 8310, 8873, 36563, 198, 220, 220, 220, 10117, 559, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 5415, 26933, 15, 13, 15, 11, 701, 559, 36563, 198, 220, 220, 220, 1303, 35235, 7, 83, 912, 11, 366, 33172, 33955, 11, 366, 33172, 862, 72, 11, 366, 33172, 926, 4528, 8, 198, 220, 220, 220, 1303, 35235, 7, 11072, 62, 82, 11, 366, 33172, 33166, 62, 78, 11, 366, 33172, 8310, 8873, 11, 366, 33172, 701, 559, 8, 198, 220, 220, 220, 1441, 33166, 62, 82, 11, 11072, 62, 78, 11, 8310, 8873, 11, 701, 559, 198, 437, 198, 198, 8818, 288, 9435, 5235, 7, 64, 3712, 15057, 11, 65, 3712, 15057, 8, 198, 220, 220, 220, 6578, 397, 41888, 20, 1539, 1314, 1539, 1495, 1539, 2327, 1539, 2231, 1539, 2816, 1539, 2996, 1539, 2425, 1539, 6659, 1539, 5999, 1539, 5332, 1539, 5774, 1539, 4531, 8183, 26, 198, 220, 220, 220, 2030, 80, 796, 2092, 7, 18250, 397, 8, 198, 220, 220, 220, 329, 1312, 16, 28, 16, 25, 23, 198, 220, 220, 220, 220, 220, 220, 220, 256, 220, 220, 796, 1312, 16, 9, 940, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 16, 22241, 17896, 388, 7, 64, 11, 65, 11, 83, 1776, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 17, 28, 24, 25, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 256, 220, 220, 796, 4019, 13, 15, 33747, 72, 17, 12, 23, 27493, 17, 15089, 198, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 17, 22241, 17896, 388, 7, 64, 11, 65, 11, 83, 1776, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2030, 80, 58, 1485, 22241, 16, 26, 198, 220, 220, 220, 329, 1312, 220, 220, 796, 1511, 21912, 16, 25, 17, 198, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 22241, 19503, 80, 58, 72, 45297, 19503, 80, 58, 72, 12, 16, 11208, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2030, 80, 11, 18250, 397, 198, 437, 198, 198, 8818, 30736, 388, 7, 64, 3712, 15057, 11, 65, 3712, 15057, 11, 83, 3712, 15057, 8, 198, 220, 220, 220, 331, 796, 657, 13, 15, 198, 220, 220, 220, 611, 257, 29, 28, 16, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 352, 12, 6966, 7, 13500, 17, 6335, 7, 83, 18125, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 304, 862, 72, 28, 16, 68, 12, 23, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 87, 28, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 17, 9, 13500, 17, 6335, 7, 83, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 279, 28, 87, 26, 198, 220, 220, 220, 220, 197, 4514, 357, 12381, 87, 18189, 304, 862, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 12381, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 796, 257, 9, 31369, 7, 87, 47762, 15, 13, 20, 9, 65, 9, 31369, 7, 17, 13, 15, 9, 87, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44332, 28, 15, 13, 20, 9, 7, 88, 12, 87, 10, 79, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 87, 10, 34350, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 87, 28, 8937, 7, 34350, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 197, 69, 796, 357, 17, 13, 15, 9, 88, 10, 79, 20679, 14415, 26, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 277, 198, 437, 198, 198, 37811, 198, 4863, 6374, 32135, 410, 16, 13, 4790, 25, 198, 17174, 17174, 8412, 198, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14327, 13, 69, 198, 9, 198, 9, 220, 220, 220, 22476, 341, 286, 262, 12835, 9848, 6082, 2163, 1988, 357, 19503, 80, 8, 198, 9, 220, 220, 220, 7122, 541, 568, 11624, 6082, 2163, 1097, 7321, 1417, 416, 262, 2811, 12835, 198, 9, 220, 220, 220, 36793, 9848, 287, 4922, 357, 6081, 8, 198, 9, 220, 220, 220, 14327, 12113, 198, 9, 198, 17174, 17174, 8412, 198, 4370, 2177, 1105, 2579, 25, 1487, 19232, 286, 18333, 284, 2872, 351, 288, 9435, 5235, 13, 76, 198, 37811, 198, 8818, 1413, 7923, 7, 6081, 8, 198, 220, 220, 220, 27765, 16, 41888, 940, 1539, 1238, 1539, 1270, 1539, 1821, 1539, 1120, 1539, 1899, 1539, 2154, 1539, 1795, 1539, 6469, 1539, 5705, 1539, 4521, 1539, 3459, 1539, 3829, 8183, 26, 198, 220, 220, 220, 27765, 17, 41888, 15, 1539, 940, 1539, 1238, 1539, 1270, 1539, 1821, 1539, 1120, 1539, 1899, 1539, 2154, 1539, 1795, 1539, 6469, 1539, 5705, 1539, 4521, 1539, 3459, 8183, 26, 628, 220, 220, 220, 6578, 397, 220, 220, 796, 357, 17602, 17, 13, 10, 17602, 16, 737, 14, 17, 13, 15, 26, 198, 220, 220, 220, 299, 28, 13664, 7, 18250, 397, 1776, 198, 220, 220, 220, 256, 75, 16, 220, 220, 220, 220, 796, 3396, 17, 6335, 7, 17602, 16, 8, 198, 220, 220, 220, 256, 75, 17, 220, 220, 220, 220, 796, 3396, 17, 6335, 7, 17602, 17, 8, 198, 220, 220, 220, 409, 1087, 220, 796, 1033, 32590, 16, 13, 21, 22883, 68, 12, 20, 9, 6081, 61, 18, 10, 17, 13, 1157, 2231, 68, 12, 18, 9, 6081, 61, 17, 12, 16, 13, 1954, 3829, 68, 12, 16, 9, 6081, 10, 18, 13, 1731, 6420, 1776, 198, 220, 220, 220, 2160, 15, 220, 220, 220, 796, 657, 26, 628, 220, 220, 220, 2030, 80, 28, 9107, 418, 7, 77, 1776, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 220, 796, 409, 1087, 19571, 7, 31166, 17034, 7, 16, 764, 10, 1069, 1087, 61, 17, 764, 9, 38006, 7, 28781, 16, 7, 72, 29720, 61, 17, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 17, 220, 796, 409, 1087, 19571, 7, 31166, 17034, 7, 16, 764, 10, 1069, 1087, 61, 17, 764, 9, 38006, 7, 28781, 17, 7, 72, 29720, 61, 17, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 1069, 1087, 855, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 60, 796, 2352, 7, 6966, 7, 28781, 16, 7, 72, 4008, 12, 6966, 7, 28781, 17, 7, 72, 4008, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17130, 220, 796, 409, 1087, 19571, 31166, 17034, 7, 8937, 7, 16, 12, 1069, 1087, 13, 61, 17, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17130, 17, 796, 17130, 13, 61, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 1065, 796, 2124, 16, 13, 61, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 1828, 796, 2124, 17, 13, 61, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 1069, 1087, 29, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 8416, 16, 796, 19862, 17034, 7, 26591, 17, 7, 1069, 1087, 29, 16, 47762, 87, 1065, 7, 1069, 1087, 29, 16, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 8416, 17, 58, 1069, 1087, 29, 16, 60, 796, 19862, 17034, 7, 26591, 17, 7, 1069, 1087, 29, 16, 47762, 87, 1828, 7, 1069, 1087, 29, 16, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 388, 220, 220, 796, 2124, 16, 9, 282, 8416, 16, 10, 26591, 17, 9, 6404, 7, 87, 16, 10, 282, 8416, 16, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 60, 796, 2352, 7, 67, 388, 30420, 87, 17, 15885, 282, 8416, 17, 10, 26591, 17, 15885, 6404, 7, 87, 17, 10, 282, 8416, 17, 4008, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 36802, 16, 796, 19862, 17034, 7, 26591, 17, 12, 87, 1065, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 36802, 17, 796, 19862, 17034, 7, 26591, 17, 12, 87, 1828, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 388, 220, 220, 796, 2124, 16, 15885, 282, 36802, 16, 10, 26591, 17, 15885, 47337, 7, 87, 16, 19571, 26591, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2030, 80, 58, 72, 60, 796, 2352, 7, 67, 388, 30420, 87, 17, 15885, 282, 36802, 17, 10, 26591, 17, 15885, 47337, 7, 87, 17, 19571, 26591, 4008, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2160, 15, 796, 2160, 7, 19503, 80, 11, 67, 12078, 28, 17, 1776, 198, 220, 220, 220, 2030, 80, 15, 28, 19503, 80, 19571, 16345, 15, 26, 198, 7783, 2030, 80, 15, 11, 18250, 397, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2386, 310, 615, 7, 1604, 64, 11, 299, 81, 8, 628, 220, 220, 220, 41906, 17174, 2466, 8162, 198, 220, 220, 220, 3574, 2386, 310, 615, 13, 76, 287, 4810, 47053, 9782, 12, 35, 198, 220, 220, 220, 41906, 17174, 2466, 8162, 198, 220, 220, 220, 22990, 376, 13, 357, 46477, 828, 41653, 286, 31624, 1773, 291, 11881, 1973, 281, 198, 220, 220, 220, 7071, 1022, 734, 4656, 801, 10466, 11, 39100, 13, 13123, 1539, 513, 7, 16, 2599, 16243, 12, 16616, 13, 198, 220, 220, 220, 9659, 370, 13, 32, 13, 357, 40220, 828, 41653, 286, 31624, 1773, 291, 1657, 1973, 257, 198, 220, 220, 220, 4656, 801, 1173, 4417, 287, 734, 290, 1115, 15225, 11, 449, 13, 13123, 13, 3345, 13, 1703, 1539, 198, 220, 220, 220, 8093, 7, 21, 2599, 21, 2414, 12, 27310, 13, 198, 220, 220, 220, 41906, 17174, 2466, 8162, 198, 198, 37811, 198, 8818, 2386, 310, 615, 7, 17394, 11, 48624, 8, 198, 220, 220, 220, 374, 67, 220, 796, 31028, 14, 15259, 198, 220, 220, 220, 299, 17, 220, 796, 299, 81, 61, 17, 198, 220, 220, 220, 45941, 220, 796, 299, 17, 10, 16, 198, 220, 220, 220, 28642, 220, 796, 299, 17, 12, 16, 198, 220, 220, 220, 257, 220, 220, 796, 357, 48624, 10, 16, 27493, 7, 48624, 10, 16, 20679, 17, 198, 220, 220, 220, 479, 220, 220, 796, 532, 7, 77, 17, 12, 16, 27493, 7, 77, 17, 12, 16, 20679, 19, 198, 220, 220, 220, 473, 220, 796, 7813, 7, 17394, 9, 4372, 8, 198, 220, 220, 220, 611, 26367, 0, 28, 3829, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 275, 16, 220, 796, 19862, 17034, 19510, 11400, 61, 17, 12, 37659, 14, 17, 737, 9, 7, 11400, 61, 17, 12, 37659, 14, 17, 47762, 74, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 275, 16, 796, 657, 198, 220, 220, 220, 886, 198, 220, 220, 220, 275, 17, 220, 796, 473, 61, 17, 12, 37659, 14, 17, 198, 220, 220, 220, 275, 220, 220, 796, 275, 16, 12, 65, 17, 198, 220, 220, 220, 275, 18, 220, 796, 275, 61, 18, 198, 220, 220, 220, 257, 18, 220, 796, 257, 61, 18, 198, 220, 220, 220, 40379, 220, 796, 357, 74, 61, 17, 13, 15, 29006, 21, 9, 65, 18, 47762, 74, 14, 65, 12, 65, 14, 17, 13219, 7, 74, 61, 17, 13, 15, 29006, 21, 9, 64, 18, 47762, 74, 14, 64, 12, 64, 14, 17, 8, 198, 220, 220, 220, 256, 79, 16, 796, 532, 17, 9, 77, 17, 9, 7, 65, 12, 64, 20679, 7, 37659, 61, 17, 8, 198, 220, 220, 220, 256, 79, 17, 796, 532, 17, 9, 77, 17, 9, 37659, 9, 6404, 7, 65, 14, 64, 20679, 7, 21533, 61, 17, 8, 198, 220, 220, 220, 256, 79, 18, 796, 299, 17, 9, 7, 16, 13, 15, 14, 65, 12, 16, 13, 15, 14, 64, 20679, 17, 198, 220, 220, 220, 256, 79, 19, 796, 1467, 9, 77, 17, 61, 17, 13, 15, 9, 7, 77, 17, 61, 17, 10, 16, 27493, 6404, 19510, 17, 9, 37659, 9, 65, 12, 21533, 61, 17, 20679, 7, 17, 9, 37659, 9, 64, 12, 21533, 61, 17, 4008, 29006, 37659, 61, 18, 13, 15, 9, 21533, 61, 17, 8, 198, 220, 220, 220, 256, 79, 20, 796, 1467, 9, 77, 17, 61, 18, 13, 15, 9, 7, 16, 13, 15, 29006, 17, 9, 37659, 9, 65, 12, 21533, 61, 17, 13219, 16, 13, 15, 29006, 17, 9, 37659, 9, 64, 12, 21533, 61, 17, 4008, 29006, 37659, 61, 18, 8, 198, 220, 220, 220, 256, 79, 220, 796, 256, 79, 16, 10, 34788, 17, 10, 34788, 18, 10, 34788, 19, 10, 34788, 20, 198, 220, 220, 220, 256, 615, 796, 357, 912, 10, 34788, 20679, 7, 17, 9, 11400, 61, 17, 8, 198, 220, 220, 220, 1441, 256, 615, 198, 437, 198, 198, 2, 8818, 1033, 600, 7, 87, 8, 198, 2, 220, 220, 220, 279, 796, 12280, 26933, 23, 13, 25674, 2791, 22186, 24940, 2414, 3695, 68, 10, 405, 11, 532, 22, 13, 3324, 23734, 4790, 28676, 28567, 1959, 68, 12, 486, 11, 532, 18, 13, 486, 26660, 27693, 27988, 1983, 1314, 68, 12, 486, 11, 532, 22, 13, 23, 1157, 4521, 2327, 3270, 23045, 24991, 68, 12, 2999, 11, 532, 16, 13, 30484, 3553, 2327, 27728, 2231, 48156, 68, 12, 2999, 12095, 21, 13, 5607, 29088, 2919, 35124, 2682, 19782, 68, 12, 3023, 12095, 17, 13, 20, 3388, 2920, 5999, 1828, 1157, 3270, 2091, 68, 12, 2713, 11, 532, 19, 13, 23, 22186, 2548, 2231, 22291, 2931, 1899, 68, 12, 2998, 11, 220, 532, 18, 13, 1899, 26276, 2623, 2075, 2091, 1899, 1954, 68, 12, 2931, 12962, 198, 2, 220, 220, 220, 7514, 85, 796, 7514, 2100, 7, 79, 11, 5305, 7, 87, 18125, 198, 2, 220, 220, 220, 479, 796, 1064, 439, 7, 2352, 7, 48466, 7, 87, 4008, 19841, 7514, 85, 5619, 198, 2, 220, 220, 220, 532, 38, 8634, 13, 28202, 62, 11201, 600, 62, 36, 72, 32590, 87, 8, 198, 2, 437, 198, 2, 3574, 6550, 23912, 0, 198, 8818, 1033, 600, 7, 87, 8, 198, 220, 220, 220, 279, 796, 12280, 26601, 8231, 13, 34220, 26933, 23, 13, 25674, 2791, 22186, 24940, 2414, 3695, 68, 10, 405, 11, 532, 22, 13, 3324, 23734, 4790, 28676, 28567, 1959, 68, 12, 486, 11, 532, 18, 13, 486, 26660, 27693, 27988, 1983, 1314, 68, 12, 486, 11, 532, 22, 13, 23, 1157, 4521, 2327, 3270, 23045, 24991, 68, 12, 2999, 11, 532, 16, 13, 30484, 3553, 2327, 27728, 2231, 48156, 68, 12, 2999, 12095, 21, 13, 5607, 29088, 2919, 35124, 2682, 19782, 68, 12, 3023, 12095, 17, 13, 20, 3388, 2920, 5999, 1828, 1157, 3270, 2091, 68, 12, 2713, 11, 532, 19, 13, 23, 22186, 2548, 2231, 22291, 2931, 1899, 68, 12, 2998, 11, 220, 532, 18, 13, 1899, 26276, 2623, 2075, 2091, 1899, 1954, 68, 12, 2931, 12962, 198, 220, 220, 220, 7514, 85, 796, 12280, 26601, 8231, 13, 35428, 2100, 7, 79, 11, 5305, 7, 87, 18125, 198, 220, 220, 220, 611, 2352, 7, 48466, 7, 87, 4008, 19841, 7514, 85, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 36733, 1634, 198, 220, 220, 220, 220, 220, 220, 220, 304, 28483, 2611, 28, 15, 13, 20, 43571, 21599, 33300, 486, 4310, 2078, 1899, 5333, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 74, 796, 2124, 26, 198, 220, 220, 220, 220, 220, 220, 220, 331, 74, 796, 532, 1533, 321, 2611, 532, 2604, 7, 87, 74, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 474, 796, 352, 26, 198, 220, 220, 220, 220, 220, 220, 220, 279, 4354, 796, 2124, 74, 26, 198, 220, 220, 220, 220, 220, 220, 220, 3381, 796, 2124, 74, 26, 198, 220, 220, 220, 220, 220, 220, 220, 981, 2352, 7, 4354, 8, 1875, 357, 25386, 7, 48361, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 74, 796, 331, 74, 1343, 3381, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 474, 1343, 352, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 4354, 796, 532, 87, 74, 15885, 79, 4354, 14, 73, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3381, 796, 279, 4354, 14, 73, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 886, 286, 262, 981, 9052, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 331, 74, 26, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 352, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 74, 796, 2124, 26, 198, 220, 220, 220, 220, 220, 220, 220, 716, 17, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 275, 76, 17, 796, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 716, 16, 796, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 275, 76, 16, 796, 2124, 74, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 716, 16, 1220, 275, 76, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1468, 69, 796, 4806, 26, 198, 220, 220, 220, 220, 220, 220, 220, 474, 796, 362, 26, 198, 220, 220, 220, 220, 220, 220, 220, 981, 2352, 7, 69, 12, 727, 69, 8, 1875, 357, 3064, 9, 25386, 3419, 9, 8937, 7, 69, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17130, 796, 299, 12, 16, 33747, 73, 14, 17, 1776, 1303, 3465, 25, 12159, 28, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9948, 3129, 378, 317, 7, 73, 828, 347, 7, 73, 828, 290, 277, 7, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 796, 716, 16, 1343, 17130, 1635, 716, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 796, 275, 76, 16, 1343, 17130, 1635, 275, 76, 17, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3613, 649, 39279, 9633, 329, 1306, 1208, 832, 262, 9052, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 3465, 25, 3487, 1634, 284, 3368, 30343, 393, 739, 11125, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 716, 17, 796, 716, 16, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 76, 17, 796, 275, 76, 16, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 716, 16, 796, 257, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 76, 16, 796, 352, 13, 15, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 796, 716, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 474, 10, 16, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15284, 262, 44036, 329, 474, 5629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17130, 796, 357, 73, 12, 16, 20679, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12159, 796, 2124, 74, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 796, 12159, 1635, 716, 16, 1343, 17130, 1635, 716, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 796, 12159, 1635, 275, 76, 16, 1343, 17130, 1635, 275, 76, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 716, 17, 796, 716, 16, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 76, 17, 796, 275, 76, 16, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 716, 16, 796, 257, 1220, 275, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 76, 16, 796, 352, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1468, 69, 796, 277, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 796, 716, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 474, 10, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 331, 28, 1033, 32590, 87, 74, 8, 1635, 277, 532, 352, 320, 9, 14415, 9, 19510, 5305, 7, 87, 74, 8, 27, 15, 8, 5, 7, 48466, 7, 87, 74, 8, 855, 15, 18125, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 331, 198, 437, 628, 198, 437, 198 ]
1.92491
15,355
using MyPkgDemo using Documenter makedocs(; modules=[MyPkgDemo], authors="MegamindHenry", repo="https://github.com/MegamindHenry/MyPkgDemo.jl/blob/{commit}{path}#L{line}", sitename="MyPkgDemo.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", canonical="https://MegamindHenry.github.io/MyPkgDemo.jl", assets=String[], ), pages=[ "Home" => "index.md", "Add Nums" => "add_nums.md", "Cat Str" => "cat_str.md" ], ) deploydocs(; repo="github.com/MegamindHenry/MyPkgDemo.jl", )
[ 3500, 2011, 47, 10025, 11522, 78, 198, 3500, 16854, 263, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 3666, 47, 10025, 11522, 78, 4357, 198, 220, 220, 220, 7035, 2625, 42672, 321, 521, 32476, 1600, 198, 220, 220, 220, 29924, 2625, 5450, 1378, 12567, 13, 785, 14, 42672, 321, 521, 32476, 14, 3666, 47, 10025, 11522, 78, 13, 20362, 14, 2436, 672, 14, 90, 41509, 18477, 6978, 92, 2, 43, 90, 1370, 92, 1600, 198, 220, 220, 220, 1650, 12453, 2625, 3666, 47, 10025, 11522, 78, 13, 20362, 1600, 198, 220, 220, 220, 5794, 28, 24941, 263, 13, 28656, 7, 26, 198, 220, 220, 220, 220, 220, 220, 220, 2495, 6371, 82, 28, 1136, 7, 1677, 53, 11, 366, 25690, 1600, 366, 9562, 4943, 6624, 366, 7942, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 40091, 2625, 5450, 1378, 42672, 321, 521, 32476, 13, 12567, 13, 952, 14, 3666, 47, 10025, 11522, 78, 13, 20362, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 6798, 28, 10100, 58, 4357, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 5468, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 366, 16060, 1, 5218, 366, 9630, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 4550, 399, 5700, 1, 5218, 366, 2860, 62, 77, 5700, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 21979, 4285, 1, 5218, 366, 9246, 62, 2536, 13, 9132, 1, 198, 220, 220, 220, 16589, 198, 8, 198, 198, 2934, 1420, 31628, 7, 26, 198, 220, 220, 220, 29924, 2625, 12567, 13, 785, 14, 42672, 321, 521, 32476, 14, 3666, 47, 10025, 11522, 78, 13, 20362, 1600, 198, 8, 198 ]
2.038462
286
#***************************************************************************** # Written by Ritchie Lee, ritchie.lee@sv.cmu.edu # ***************************************************************************** # Copyright ã 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. The Reinforcement Learning Encounter Simulator (RLES) # platform is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. You # may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable # law or agreed to in writing, software distributed under the License is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the specific language # governing permissions and limitations under the License. # _____________________________________________________________________________ # Reinforcement Learning Encounter Simulator (RLES) includes the following # third party software. The SISLES.jl package is licensed under the MIT Expat # License: Copyright (c) 2014: Youngjun Kim. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED # "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT # NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ***************************************************************************** """ Experiment 4 test combined time series and binary logical operations """ module NNGrammarExpt4 export circuit4, restarts import Compat.ASCIIString using TFTools using Datasets using TensorFlow using TensorFlow.CoreTypes #DT_FLOAT32, DT_BOOL, PyVectorType using TensorFlow.API: l2_loss, AdamOptimizer, GradientDescentOptimizer, cast, round_, reshape_, l2_normalize, RMSPropOptimizer, reduce_max, reduce_min, minimum_, maximum_, transpose_, less_, greater, expand_dims, tile, shape, mul, reduce_sum, moments, conv2d, truncated_normal, concat, sub_, matmul, clip_by_value using TensorFlow.API.TfNn: sigmoid using StatsBase using RLESUtils, Confusion using PyCall @pyimport tensorflow as tf function restarts(f::Function, N::Int64; kwargs...) [f(; kwargs...) for i = 1:N] end function circuit4(; dataname::AbstractString="vhdist3", labelfield::AbstractString="nmac", #"F_x1_lt_100_and_x2_lt_500", learning_rate::Float64=0.001, max_training_epochs::Int64=500, target_cost::Float64=0.001, batch_size::Int64=4820, mux_hidden_units::Vector{Int64}=Int64[50,30], display_step::Int64=1, b_debug::Bool=false, nshow::Int64=1) Dl = dataset(dataname, :nmac; transform=x->Float32(x)) #DFSetLabeled val_inputs = constant(Float32[0, 50, 100, 250, 500, 1000, 3000, 5000]) data_set = TFDataset(Dl) # Construct model (n_examples, n_steps, n_feats) = size(Dl) n_featsflat = n_steps * n_feats n_vals = get_shape(val_inputs)[1] # inputs feats = Placeholder(DT_FLOAT32, [-1, n_steps, n_feats]) inputs = Tensor(feats) normalizer = Normalizer(data_set; converttype=Float32) normed_input = normalize01(normalizer, inputs) feats_flat = reshape_(normed_input, constant(Int32[-1, n_featsflat])) #softness parameter softness = collect(linspace(0.1, 1.0, max_training_epochs)) softness_pl = Placeholder(DT_FLOAT32, [1]) #toggle hard or soft output harden_pl = Placeholder(DT_BOOL, [1]) # common (embedding) layer #embed_in = constant(rand(Float32, 1, 5)) #embed_hidden_units = [5] #embed_blk = ReluStack(embed_in, embed_hidden_units) #embed_out = out(embed_blk) # mux select input #muxselect = feats_flat #simple flatten #muxselect = constant(ones(Float32, 1, 1)) #constant 1 #muxselect = embed_out #relustack embedding overrides = zeros(Int64, 8) #overrides = [1, 2, 3, 5, 1, 1, 1, 1] #overrides = [0, 2, 0, 5, 0, 1, 1, 0] #convolution stuff HT = 3 WT = 2 STRIDES = PyVectorType([1, 1, 1, 1]) filt_weights = Variable(truncated_normal(constant([HT, WT, 1, 1]), constant(0.0), constant(5e-2))) conv1 = conv2d(expand_dims(Tensor(normed_input), constant(3)), Tensor(filt_weights), STRIDES, "SAME") muxselect = reshape_(conv1, constant(Int32[-1, n_featsflat])) # f1 feat select f1_in = inputs f1_mux = SoftMux(n_feats, mux_hidden_units, f1_in, muxselect, Tensor(harden_pl), Tensor(softness_pl); override=overrides[1]) f1_out = out(f1_mux) # f2 feat select f2_in = inputs f2_mux = SoftMux(n_feats, mux_hidden_units, f2_in, muxselect, Tensor(harden_pl), Tensor(softness_pl); override=overrides[2]) f2_out = hardout(f2_mux) # v1 value select #v1_in = val_inputs n_vals=1 v1_in = constant(Float32[100.0]) v1_mux = SoftMux(n_vals, mux_hidden_units, v1_in, muxselect, Tensor(harden_pl); override=overrides[3]) v1_out = out(v1_mux) # v2 value select #v2_in = val_inputs n_vals = 1 v2_in = constant(Float32[500.0]) v2_mux = SoftMux(n_vals, mux_hidden_units, v2_in, muxselect, Tensor(harden_pl); override=overrides[4]) v2_out = hardout(v2_mux) compare_ops = [op_lt, op_gt] logical_ops = [op_and, op_or] temporal_ops = [op_F, op_G] # a1 float op block a1_in = (f1_out, v1_out) a1_blk = SoftOpsMux(a1_in, compare_ops, mux_hidden_units, muxselect, Tensor(harden_pl), Tensor(softness_pl); opargs=Any[Tensor(softness_pl)], override=overrides[5]) a1_out = out(a1_blk) # a2 float op block a2_in = (f2_out, v2_out) a2_blk = SoftOpsMux(a2_in, compare_ops, mux_hidden_units, muxselect, Tensor(harden_pl), Tensor(softness_pl); opargs=Any[Tensor(softness_pl)], override=overrides[6]) a2_out = hardout(a2_blk) # l1 logical op block l1_in = (a1_out, a2_out) l1_blk = SoftOpsMux(l1_in, logical_ops, mux_hidden_units, muxselect, Tensor(harden_pl), Tensor(softness_pl); override=overrides[7]) l1_out = hardout(l1_blk) # t1 temporal op block t1_in = (l1_out,) #t1_in = (constant(rand(Float32, shape(l1_out))), ) t1_blk = SoftOpsMux(t1_in, temporal_ops, mux_hidden_units, muxselect, Tensor(harden_pl), Tensor(softness_pl); override=overrides[8]) t1_out = out(t1_blk) # outputs pred = t1_out labels = Placeholder(DT_FLOAT32, [-1]) #take nnout of batch, compute moments, take variance component and sum f1_var = reduce_sum(moments(f1_mux.nnout, Tensor(Int32[0]))[2], Tensor(0)) v1_var = reduce_sum(moments(v1_mux.nnout, Tensor(Int32[0]))[2], Tensor(0)) f2_var = reduce_sum(moments(f2_mux.nnout, Tensor(Int32[0]))[2], Tensor(0)) v2_var = reduce_sum(moments(v2_mux.nnout, Tensor(Int32[0]))[2], Tensor(0)) a1_var = reduce_sum(moments(a1_blk.softmux.nnout, Tensor(Int32[0]))[2], Tensor(0)) a2_var = reduce_sum(moments(a2_blk.softmux.nnout, Tensor(Int32[0]))[2], Tensor(0)) l1_var = reduce_sum(moments(l1_blk.softmux.nnout, Tensor(Int32[0]))[2], Tensor(0)) t1_var = reduce_sum(moments(t1_blk.softmux.nnout, Tensor(Int32[0]))[2], Tensor(0)) sum_var = f1_var + v1_var + f2_var + v2_var + constant(300.0) .* a1_var + constant(300.0) .* a2_var + constant(300.0) .* l1_var + constant(300.0) .* t1_var #packed_nnouts = concat(Tensor(1), Tensor([f1_mux.nnout, v1_mux.nnout, f2_mux.nnout, v2_mux.nnout, a1_blk.softmux.nnout, a2_blk.softmux.nnout, l1_blk.softmux.nnout, t1_blk.softmux.nnout])) #m = matmul(packed_nnouts, packed_nnouts, false, true) #allpairs_cossim = reduce_sum(sub_(constant(8.0), m)) # Define loss and optimizer #cost = l2_loss(pred - labels) # Squared loss cost = l2_loss(pred - labels) + constant(1.0) .* sum_var #cost = l2_loss(pred - labels) + constant(1.0) .* allpairs_cossim #optimizer #optimizer = minimize(AdamOptimizer(learning_rate), cost) opt = Optimizer(tf.train[:GradientDescentOptimizer](learning_rate)) gvs = opt.x[:compute_gradients](cost.x) capped_gvs = [(tf.nn[:l2_normalize](tf.clip_by_value(grad, -1.0, 1.0), 0), var) for (grad, var) in gvs] optimizer = Operation(opt.x[:apply_gradients](capped_gvs)) #compiled hardselect ckt = Circuit([ f1_mux, v1_mux, f2_mux, v2_mux, a1_blk, a2_blk, l1_blk, t1_blk, ], Vector{ASCIIString}[ ["alt", "range"], ["0", "50", "100", "250", "500", "1000", "3000", "5000"], ["alt", "range"], ["0", "50", "100", "250", "500", "1000", "3000", "5000"], ["<", ">"], ["<", ">"], ["and", "or"], ["F", "G"]]) #debug f1_grad = gradient_tensor(cost, f1_mux.weight) v1_grad = gradient_tensor(cost, v1_mux.weight) f2_grad = gradient_tensor(cost, f2_mux.weight) v2_grad = gradient_tensor(cost, v2_mux.weight) a1_grad = gradient_tensor(cost, a1_blk.softmux.weight) a2_grad = gradient_tensor(cost, a2_blk.softmux.weight) l1_grad = gradient_tensor(cost, l1_blk.softmux.weight) t1_grad = gradient_tensor(cost, t1_blk.softmux.weight) #/debug # Iniuializing the variables init = initialize_all_variables() # Rock and roll println("Optimization Start: $(now())") sess = Session() run(sess, init) #debug #fd = FeedDict(feats => data_set.X, labels => data_set.Y) #run(sess, normed_input, fd) #/debug # Training cycle for epoch in 1:max_training_epochs avg_cost = 0.0 total_batch = div(num_examples(data_set), batch_size) #Loop over all batches for i in 1:total_batch batch_xs, batch_ys = next_batch(data_set, batch_size) fd = FeedDict(feats => batch_xs, labels => batch_ys, softness_pl => [softness[epoch]], harden_pl => [false]) # Fit training using batch data run(sess, optimizer, fd) #debug #softsel = softselect_by_example(sess, ckt, fd) #grads = run(sess, Tensor([f1_grad, v1_grad, f2_grad, v2_grad, a1_grad, a2_grad, l1_grad, t1_grad]), fd) #conv1_out = run(sess, conv1, fd) #@show run(sess, pred, fd) #@show run(sess, pred - labels, fd) #@show run(sess, muxselect, fd) #@show run(sess, f1_grad, fd) #@show run(sess, v1_grad, fd) #/debug # Compute average loss batch_average_cost = run(sess, cost, fd) avg_cost += batch_average_cost / (total_batch * batch_size) end # Display logs per epoch step if epoch % display_step == 0 #softsel = softselect_by_example(sess, ckt, fd) #grads = run(sess, Tensor([f1_grad, v1_grad, f2_grad, v2_grad, a1_grad, a2_grad, l1_grad, t1_grad]), fd) #println(softsel) #println(capped_gvs) #grads = Tensor([grad for (grad, var) in capped_gvs]) println("Epoch $(epoch) cost=$(avg_cost)") #println("Norm=$(norm(grads))") if avg_cost < Float32(target_cost) break; end end end println("Optimization Finished: $(now())") # Test model correct_prediction = (round_(pred) == labels) # Calculate accuracy accuracy = mean(cast(correct_prediction, DT_FLOAT32)) #reload data_set to recover original order (next_batch will internally shuffle) data_set = TFDataset(Dl) X = data_set.X Y = data_set.Y #soft metrics fd = FeedDict(feats => data_set.X, labels => data_set.Y, softness_pl => [softness[end]], harden_pl => [false]) Ypred_soft = run(sess, round_(pred), fd) acc_soft = run(sess, accuracy, fd) stringout = simplestring(sess, ckt, fd; order=[8,1,5,2,7,3,6,4]) top5 = topstrings(stringout, 5) softsel = softselect_by_example(sess, ckt, fd) grads = run(sess, Tensor([f1_grad, v1_grad, f2_grad, v2_grad, a1_grad, a2_grad, l1_grad, t1_grad]), fd) conf = confusion(Ypred_soft.==1.0, Y.==1.0) conf_indices = confusion_indices(Ypred_soft.==1.0, Y.==1.0) #hard metrics fd = FeedDict(feats => data_set.X, labels => data_set.Y, softness_pl => [softness[end]], harden_pl => [true]) Ypred_hard = run(sess, round_(pred), fd) acc_hard = run(sess, accuracy, fd) println("Soft Accuracy:", acc_soft) println("Hard Accuracy:", acc_hard) println(top5) d=Dict{ASCIIString,Any}() top5, acc_hard end op_F(x::Tensor) = reduce_max(x, Tensor(1)) op_G(x::Tensor) = reduce_min(x, Tensor(1)) op_and(x::Tensor, y::Tensor) = minimum_(x, y) #element-wise op_or(x::Tensor, y::Tensor) = maximum_(x, y) #element-wise #TODO: move these to a central location function op_gt(x::Tensor, y::Tensor, W::Tensor=constant(1.0/100.0)) tmp = expand_dims(y, Tensor(1)) ytiled = tile(tmp, Tensor([1, get_shape(x)[2]])) result = sigmoid(mul(W, x - ytiled)) result end function op_lt(x::Tensor, y::Tensor, W::Tensor=constant(1.0/100.0)) tmp = expand_dims(y, Tensor(1)) ytiled = tile(tmp, Tensor([1, get_shape(x)[2]])) result = sigmoid(mul(W, ytiled - x)) end end #module
[ 2, 17174, 17174, 4557, 35625, 198, 2, 22503, 416, 371, 48423, 5741, 11, 374, 48423, 13, 7197, 31, 21370, 13, 11215, 84, 13, 15532, 198, 2, 41906, 17174, 4557, 35625, 198, 2, 15069, 6184, 96, 1853, 11, 1578, 1829, 5070, 11, 355, 7997, 416, 262, 198, 2, 22998, 286, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 13, 1439, 198, 2, 2489, 10395, 13, 220, 383, 22299, 13442, 18252, 40998, 13942, 357, 7836, 1546, 8, 198, 2, 3859, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 198, 2, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 13, 17486, 2672, 416, 9723, 198, 2, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 9387, 739, 262, 13789, 318, 198, 2, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 198, 2, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 13789, 329, 262, 2176, 3303, 198, 2, 15030, 21627, 290, 11247, 739, 262, 13789, 13, 198, 2, 220, 27193, 2602, 29343, 198, 2, 22299, 13442, 18252, 40998, 13942, 357, 7836, 1546, 8, 3407, 262, 1708, 198, 2, 2368, 2151, 3788, 13, 383, 311, 1797, 28378, 13, 20362, 5301, 318, 11971, 739, 262, 17168, 5518, 265, 198, 2, 13789, 25, 15069, 357, 66, 8, 1946, 25, 6960, 29741, 6502, 13, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 198, 2, 1730, 287, 262, 10442, 1231, 17504, 11, 1390, 1231, 17385, 262, 198, 2, 2489, 284, 779, 11, 4866, 11, 13096, 11, 20121, 11, 7715, 11, 14983, 11, 850, 43085, 11, 290, 14, 273, 198, 2, 3677, 9088, 286, 262, 10442, 11, 290, 284, 8749, 6506, 284, 4150, 262, 10442, 318, 198, 2, 30760, 284, 466, 523, 11, 2426, 284, 262, 1708, 3403, 25, 198, 2, 383, 2029, 6634, 4003, 290, 428, 7170, 4003, 2236, 307, 3017, 287, 198, 2, 477, 9088, 393, 8904, 16690, 286, 262, 10442, 13, 3336, 47466, 3180, 36592, 2389, 1961, 198, 2, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 8959, 49094, 11, 47783, 2751, 21728, 198, 2, 5626, 40880, 5390, 3336, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 11, 376, 46144, 7473, 317, 16652, 2149, 37232, 198, 2, 33079, 48933, 5357, 44521, 1268, 10913, 2751, 12529, 13, 3268, 8005, 49261, 50163, 3336, 37195, 20673, 6375, 27975, 38162, 9947, 198, 2, 367, 15173, 4877, 9348, 43031, 19146, 7473, 15529, 47666, 3955, 11, 29506, 25552, 6375, 25401, 43031, 25382, 11, 7655, 2767, 16879, 3268, 3537, 198, 2, 40282, 3963, 27342, 10659, 11, 309, 9863, 6375, 25401, 54, 24352, 11, 5923, 1797, 2751, 16034, 11, 16289, 3963, 6375, 3268, 198, 2, 7102, 45, 24565, 13315, 3336, 47466, 6375, 3336, 23210, 6375, 25401, 5550, 1847, 20754, 3268, 3336, 47466, 13, 198, 2, 41906, 17174, 4557, 35625, 198, 198, 37811, 198, 20468, 3681, 604, 198, 9288, 5929, 640, 2168, 290, 13934, 12219, 4560, 198, 37811, 198, 21412, 399, 10503, 859, 3876, 3109, 457, 19, 198, 198, 39344, 10349, 19, 11, 1334, 5889, 198, 198, 11748, 3082, 265, 13, 42643, 3978, 10100, 198, 3500, 309, 9792, 10141, 198, 3500, 16092, 292, 1039, 198, 3500, 309, 22854, 37535, 198, 3500, 309, 22854, 37535, 13, 14055, 31431, 1303, 24544, 62, 3697, 46, 1404, 2624, 11, 24311, 62, 8202, 3535, 11, 9485, 38469, 6030, 198, 3500, 309, 22854, 37535, 13, 17614, 25, 300, 17, 62, 22462, 11, 7244, 27871, 320, 7509, 11, 17701, 1153, 5960, 1087, 27871, 320, 7509, 11, 3350, 11, 220, 198, 220, 220, 220, 2835, 62, 11, 27179, 1758, 62, 11, 300, 17, 62, 11265, 1096, 11, 29820, 4303, 1773, 27871, 320, 7509, 11, 198, 220, 220, 220, 4646, 62, 9806, 11, 4646, 62, 1084, 11, 5288, 62, 11, 5415, 62, 11, 1007, 3455, 62, 11, 1342, 62, 11, 3744, 11, 198, 220, 220, 220, 4292, 62, 67, 12078, 11, 17763, 11, 5485, 11, 35971, 11, 4646, 62, 16345, 11, 7188, 11, 3063, 17, 67, 11, 40122, 515, 62, 11265, 11, 198, 220, 220, 220, 1673, 265, 11, 850, 62, 11, 2603, 76, 377, 11, 10651, 62, 1525, 62, 8367, 198, 3500, 309, 22854, 37535, 13, 17614, 13, 51, 69, 45, 77, 25, 264, 17225, 1868, 198, 3500, 20595, 14881, 198, 3500, 371, 28378, 18274, 4487, 11, 7326, 4241, 198, 198, 3500, 9485, 14134, 198, 31, 9078, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 8818, 1334, 5889, 7, 69, 3712, 22203, 11, 399, 3712, 5317, 2414, 26, 479, 86, 22046, 23029, 198, 220, 220, 685, 69, 7, 26, 479, 86, 22046, 23029, 329, 1312, 796, 352, 25, 45, 60, 198, 437, 198, 198, 8818, 10349, 19, 7, 26, 198, 220, 220, 220, 4818, 272, 480, 3712, 23839, 10100, 2625, 85, 71, 17080, 18, 1600, 198, 220, 220, 220, 6167, 3245, 3712, 23839, 10100, 2625, 77, 20285, 1600, 1303, 1, 37, 62, 87, 16, 62, 2528, 62, 3064, 62, 392, 62, 87, 17, 62, 2528, 62, 4059, 1600, 198, 220, 220, 220, 4673, 62, 4873, 3712, 43879, 2414, 28, 15, 13, 8298, 11, 198, 220, 220, 220, 3509, 62, 34409, 62, 538, 5374, 82, 3712, 5317, 2414, 28, 4059, 11, 198, 220, 220, 220, 2496, 62, 15805, 3712, 43879, 2414, 28, 15, 13, 8298, 11, 198, 220, 220, 220, 15458, 62, 7857, 3712, 5317, 2414, 28, 2780, 1238, 11, 198, 220, 220, 220, 285, 2821, 62, 30342, 62, 41667, 3712, 38469, 90, 5317, 2414, 92, 28, 5317, 2414, 58, 1120, 11, 1270, 4357, 198, 220, 220, 220, 3359, 62, 9662, 3712, 5317, 2414, 28, 16, 11, 198, 220, 220, 220, 275, 62, 24442, 3712, 33, 970, 28, 9562, 11, 198, 220, 220, 220, 299, 12860, 3712, 5317, 2414, 28, 16, 8, 628, 220, 220, 220, 360, 75, 796, 27039, 7, 19608, 272, 480, 11, 1058, 77, 20285, 26, 6121, 28, 87, 3784, 43879, 2624, 7, 87, 4008, 1303, 8068, 7248, 33986, 276, 198, 220, 220, 220, 1188, 62, 15414, 82, 796, 6937, 7, 43879, 2624, 58, 15, 11, 2026, 11, 1802, 11, 8646, 11, 5323, 11, 8576, 11, 20343, 11, 23336, 12962, 198, 220, 220, 220, 1366, 62, 2617, 796, 24958, 27354, 292, 316, 7, 35, 75, 8, 628, 220, 220, 220, 1303, 28407, 2746, 198, 220, 220, 220, 357, 77, 62, 1069, 12629, 11, 299, 62, 20214, 11, 299, 62, 5036, 1381, 8, 796, 2546, 7, 35, 75, 8, 198, 220, 220, 220, 299, 62, 5036, 1381, 38568, 796, 299, 62, 20214, 1635, 299, 62, 5036, 1381, 220, 198, 220, 220, 220, 299, 62, 12786, 796, 651, 62, 43358, 7, 2100, 62, 15414, 82, 38381, 16, 60, 628, 220, 220, 220, 1303, 17311, 198, 220, 220, 220, 35664, 796, 8474, 13829, 7, 24544, 62, 3697, 46, 1404, 2624, 11, 25915, 16, 11, 299, 62, 20214, 11, 299, 62, 5036, 1381, 12962, 198, 220, 220, 220, 17311, 796, 309, 22854, 7, 5036, 1381, 8, 628, 220, 220, 220, 3487, 7509, 796, 14435, 7509, 7, 7890, 62, 2617, 26, 10385, 4906, 28, 43879, 2624, 8, 198, 220, 220, 220, 2593, 276, 62, 15414, 796, 3487, 1096, 486, 7, 11265, 7509, 11, 17311, 8, 198, 220, 220, 220, 35664, 62, 38568, 796, 27179, 1758, 41052, 27237, 276, 62, 15414, 11, 6937, 7, 5317, 2624, 58, 12, 16, 11, 299, 62, 5036, 1381, 38568, 60, 4008, 628, 220, 220, 220, 1303, 4215, 1108, 11507, 198, 220, 220, 220, 2705, 1108, 796, 2824, 7, 21602, 10223, 7, 15, 13, 16, 11, 352, 13, 15, 11, 3509, 62, 34409, 62, 538, 5374, 82, 4008, 198, 220, 220, 220, 2705, 1108, 62, 489, 796, 8474, 13829, 7, 24544, 62, 3697, 46, 1404, 2624, 11, 685, 16, 12962, 628, 220, 220, 220, 1303, 44256, 1327, 393, 2705, 5072, 198, 220, 220, 220, 1327, 268, 62, 489, 796, 8474, 13829, 7, 24544, 62, 8202, 3535, 11, 685, 16, 12962, 628, 220, 220, 220, 1303, 2219, 357, 20521, 12083, 8, 7679, 198, 220, 220, 220, 1303, 20521, 62, 259, 796, 6937, 7, 25192, 7, 43879, 2624, 11, 352, 11, 642, 4008, 198, 220, 220, 220, 1303, 20521, 62, 30342, 62, 41667, 796, 685, 20, 60, 198, 220, 220, 220, 1303, 20521, 62, 2436, 74, 796, 4718, 84, 25896, 7, 20521, 62, 259, 11, 11525, 62, 30342, 62, 41667, 8, 198, 220, 220, 220, 1303, 20521, 62, 448, 796, 503, 7, 20521, 62, 2436, 74, 8, 628, 220, 220, 220, 1303, 285, 2821, 2922, 5128, 198, 220, 220, 220, 1303, 76, 2821, 19738, 796, 35664, 62, 38568, 1303, 36439, 27172, 268, 198, 220, 220, 220, 1303, 76, 2821, 19738, 796, 6937, 7, 1952, 7, 43879, 2624, 11, 352, 11, 352, 4008, 1303, 9979, 415, 352, 198, 220, 220, 220, 1303, 76, 2821, 19738, 796, 11525, 62, 448, 1303, 2411, 436, 441, 11525, 12083, 628, 220, 220, 220, 23170, 1460, 796, 1976, 27498, 7, 5317, 2414, 11, 807, 8, 198, 220, 220, 220, 1303, 2502, 81, 1460, 796, 685, 16, 11, 362, 11, 513, 11, 642, 11, 352, 11, 352, 11, 352, 11, 352, 60, 198, 220, 220, 220, 1303, 2502, 81, 1460, 796, 685, 15, 11, 362, 11, 657, 11, 642, 11, 657, 11, 352, 11, 352, 11, 657, 60, 628, 220, 220, 220, 1303, 42946, 2122, 3404, 198, 220, 220, 220, 7154, 796, 513, 220, 198, 220, 220, 220, 41281, 796, 362, 198, 220, 220, 220, 19269, 42538, 796, 9485, 38469, 6030, 26933, 16, 11, 352, 11, 352, 11, 352, 12962, 198, 220, 220, 220, 1226, 83, 62, 43775, 796, 35748, 7, 2213, 19524, 515, 62, 11265, 7, 9979, 415, 26933, 6535, 11, 41281, 11, 352, 11, 352, 46570, 6937, 7, 15, 13, 15, 828, 6937, 7, 20, 68, 12, 17, 22305, 198, 220, 220, 220, 3063, 16, 796, 3063, 17, 67, 7, 11201, 392, 62, 67, 12078, 7, 51, 22854, 7, 27237, 276, 62, 15414, 828, 6937, 7, 18, 36911, 309, 22854, 7, 69, 2326, 62, 43775, 828, 19269, 42538, 11, 366, 50, 10067, 4943, 198, 220, 220, 220, 285, 2821, 19738, 796, 27179, 1758, 41052, 42946, 16, 11, 6937, 7, 5317, 2624, 58, 12, 16, 11, 299, 62, 5036, 1381, 38568, 60, 4008, 628, 220, 220, 220, 1303, 277, 16, 2218, 2922, 198, 220, 220, 220, 277, 16, 62, 259, 796, 17311, 220, 198, 220, 220, 220, 277, 16, 62, 76, 2821, 796, 8297, 44, 2821, 7, 77, 62, 5036, 1381, 11, 285, 2821, 62, 30342, 62, 41667, 11, 277, 16, 62, 259, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 16, 12962, 198, 220, 220, 220, 277, 16, 62, 448, 796, 503, 7, 69, 16, 62, 76, 2821, 8, 220, 628, 220, 220, 220, 1303, 277, 17, 2218, 2922, 198, 220, 220, 220, 277, 17, 62, 259, 796, 17311, 220, 198, 220, 220, 220, 277, 17, 62, 76, 2821, 796, 8297, 44, 2821, 7, 77, 62, 5036, 1381, 11, 285, 2821, 62, 30342, 62, 41667, 11, 277, 17, 62, 259, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 17, 12962, 198, 220, 220, 220, 277, 17, 62, 448, 796, 1327, 448, 7, 69, 17, 62, 76, 2821, 8, 220, 628, 220, 220, 220, 1303, 410, 16, 1988, 2922, 198, 220, 220, 220, 1303, 85, 16, 62, 259, 796, 1188, 62, 15414, 82, 220, 198, 220, 220, 220, 299, 62, 12786, 28, 16, 198, 220, 220, 220, 410, 16, 62, 259, 796, 6937, 7, 43879, 2624, 58, 3064, 13, 15, 12962, 198, 220, 220, 220, 410, 16, 62, 76, 2821, 796, 8297, 44, 2821, 7, 77, 62, 12786, 11, 285, 2821, 62, 30342, 62, 41667, 11, 410, 16, 62, 259, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 18, 12962, 198, 220, 220, 220, 410, 16, 62, 448, 796, 503, 7, 85, 16, 62, 76, 2821, 8, 220, 628, 220, 220, 220, 1303, 410, 17, 1988, 2922, 198, 220, 220, 220, 1303, 85, 17, 62, 259, 796, 1188, 62, 15414, 82, 220, 198, 220, 220, 220, 299, 62, 12786, 796, 352, 198, 220, 220, 220, 410, 17, 62, 259, 796, 6937, 7, 43879, 2624, 58, 4059, 13, 15, 12962, 198, 220, 220, 220, 410, 17, 62, 76, 2821, 796, 8297, 44, 2821, 7, 77, 62, 12786, 11, 285, 2821, 62, 30342, 62, 41667, 11, 410, 17, 62, 259, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 19, 12962, 198, 220, 220, 220, 410, 17, 62, 448, 796, 1327, 448, 7, 85, 17, 62, 76, 2821, 8, 220, 628, 220, 220, 220, 8996, 62, 2840, 796, 685, 404, 62, 2528, 11, 1034, 62, 13655, 60, 198, 220, 220, 220, 12219, 62, 2840, 796, 685, 404, 62, 392, 11, 1034, 62, 273, 60, 198, 220, 220, 220, 21964, 62, 2840, 796, 685, 404, 62, 37, 11, 1034, 62, 38, 60, 628, 220, 220, 220, 1303, 257, 16, 12178, 1034, 2512, 198, 220, 220, 220, 257, 16, 62, 259, 796, 357, 69, 16, 62, 448, 11, 410, 16, 62, 448, 8, 198, 220, 220, 220, 257, 16, 62, 2436, 74, 796, 8297, 41472, 44, 2821, 7, 64, 16, 62, 259, 11, 8996, 62, 2840, 11, 285, 2821, 62, 30342, 62, 41667, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 1034, 22046, 28, 7149, 58, 51, 22854, 7, 4215, 1108, 62, 489, 8, 4357, 20957, 28, 2502, 81, 1460, 58, 20, 12962, 198, 220, 220, 220, 257, 16, 62, 448, 796, 503, 7, 64, 16, 62, 2436, 74, 8, 220, 628, 220, 220, 220, 1303, 257, 17, 12178, 1034, 2512, 198, 220, 220, 220, 257, 17, 62, 259, 796, 357, 69, 17, 62, 448, 11, 410, 17, 62, 448, 8, 198, 220, 220, 220, 257, 17, 62, 2436, 74, 796, 8297, 41472, 44, 2821, 7, 64, 17, 62, 259, 11, 8996, 62, 2840, 11, 285, 2821, 62, 30342, 62, 41667, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 1034, 22046, 28, 7149, 58, 51, 22854, 7, 4215, 1108, 62, 489, 8, 4357, 20957, 28, 2502, 81, 1460, 58, 21, 12962, 198, 220, 220, 220, 257, 17, 62, 448, 796, 1327, 448, 7, 64, 17, 62, 2436, 74, 8, 220, 628, 220, 220, 220, 1303, 300, 16, 12219, 1034, 2512, 198, 220, 220, 220, 300, 16, 62, 259, 796, 357, 64, 16, 62, 448, 11, 257, 17, 62, 448, 8, 198, 220, 220, 220, 300, 16, 62, 2436, 74, 796, 8297, 41472, 44, 2821, 7, 75, 16, 62, 259, 11, 12219, 62, 2840, 11, 285, 2821, 62, 30342, 62, 41667, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 22, 12962, 198, 220, 220, 220, 300, 16, 62, 448, 796, 1327, 448, 7, 75, 16, 62, 2436, 74, 8, 220, 628, 220, 220, 220, 1303, 256, 16, 21964, 1034, 2512, 198, 220, 220, 220, 256, 16, 62, 259, 796, 357, 75, 16, 62, 448, 35751, 198, 220, 220, 220, 1303, 83, 16, 62, 259, 796, 357, 9979, 415, 7, 25192, 7, 43879, 2624, 11, 5485, 7, 75, 16, 62, 448, 4008, 828, 1267, 198, 220, 220, 220, 256, 16, 62, 2436, 74, 796, 8297, 41472, 44, 2821, 7, 83, 16, 62, 259, 11, 21964, 62, 2840, 11, 285, 2821, 62, 30342, 62, 41667, 11, 285, 2821, 19738, 11, 309, 22854, 7, 71, 5872, 62, 489, 828, 309, 22854, 7, 4215, 1108, 62, 489, 1776, 20957, 28, 2502, 81, 1460, 58, 23, 12962, 198, 220, 220, 220, 256, 16, 62, 448, 796, 503, 7, 83, 16, 62, 2436, 74, 8, 220, 628, 220, 220, 220, 1303, 23862, 198, 220, 220, 220, 2747, 796, 256, 16, 62, 448, 198, 220, 220, 220, 14722, 796, 8474, 13829, 7, 24544, 62, 3697, 46, 1404, 2624, 11, 25915, 16, 12962, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 20657, 299, 77, 448, 286, 15458, 11, 24061, 7188, 11, 1011, 24198, 7515, 290, 2160, 198, 220, 220, 220, 277, 16, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 69, 16, 62, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 410, 16, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 85, 16, 62, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 277, 17, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 69, 17, 62, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 410, 17, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 85, 17, 62, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 257, 16, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 64, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 257, 17, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 64, 17, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 300, 16, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 75, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 256, 16, 62, 7785, 796, 4646, 62, 16345, 7, 32542, 658, 7, 83, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 309, 22854, 7, 5317, 2624, 58, 15, 60, 4008, 58, 17, 4357, 309, 22854, 7, 15, 4008, 198, 220, 220, 220, 2160, 62, 7785, 796, 277, 16, 62, 7785, 1343, 410, 16, 62, 7785, 1343, 277, 17, 62, 7785, 1343, 410, 17, 62, 7785, 1343, 6937, 7, 6200, 13, 15, 8, 764, 9, 257, 16, 62, 7785, 1343, 6937, 7, 6200, 13, 15, 8, 764, 9, 257, 17, 62, 7785, 1343, 6937, 7, 6200, 13, 15, 8, 764, 9, 300, 16, 62, 7785, 1343, 6937, 7, 6200, 13, 15, 8, 764, 9, 256, 16, 62, 7785, 628, 220, 220, 220, 1303, 34860, 62, 20471, 5269, 796, 1673, 265, 7, 51, 22854, 7, 16, 828, 309, 22854, 26933, 69, 16, 62, 76, 2821, 13, 20471, 448, 11, 410, 16, 62, 76, 2821, 13, 20471, 448, 11, 277, 17, 62, 76, 2821, 13, 20471, 448, 11, 410, 17, 62, 76, 2821, 13, 20471, 448, 11, 257, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 257, 17, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 300, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 11, 256, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 20471, 448, 60, 4008, 198, 220, 220, 220, 1303, 76, 796, 2603, 76, 377, 7, 34860, 62, 20471, 5269, 11, 11856, 62, 20471, 5269, 11, 3991, 11, 2081, 8, 198, 220, 220, 220, 1303, 439, 79, 3468, 62, 66, 793, 320, 796, 4646, 62, 16345, 7, 7266, 41052, 9979, 415, 7, 23, 13, 15, 828, 285, 4008, 628, 220, 220, 220, 1303, 2896, 500, 2994, 290, 6436, 7509, 198, 220, 220, 220, 1303, 15805, 796, 300, 17, 62, 22462, 7, 28764, 532, 14722, 8, 1303, 5056, 1144, 2994, 198, 220, 220, 220, 1575, 796, 300, 17, 62, 22462, 7, 28764, 532, 14722, 8, 1343, 6937, 7, 16, 13, 15, 8, 764, 9, 2160, 62, 7785, 198, 220, 220, 220, 1303, 15805, 796, 300, 17, 62, 22462, 7, 28764, 532, 14722, 8, 1343, 6937, 7, 16, 13, 15, 8, 764, 9, 477, 79, 3468, 62, 66, 793, 320, 628, 198, 220, 220, 220, 1303, 40085, 7509, 198, 220, 220, 220, 1303, 40085, 7509, 796, 17775, 7, 23159, 27871, 320, 7509, 7, 40684, 62, 4873, 828, 1575, 8, 220, 198, 220, 220, 220, 2172, 796, 30011, 7509, 7, 27110, 13, 27432, 58, 25, 42731, 1153, 5960, 1087, 27871, 320, 7509, 16151, 40684, 62, 4873, 4008, 198, 220, 220, 220, 308, 14259, 796, 2172, 13, 87, 58, 25, 5589, 1133, 62, 9744, 2334, 16151, 15805, 13, 87, 8, 220, 198, 220, 220, 220, 28490, 62, 70, 14259, 796, 47527, 27110, 13, 20471, 58, 25, 75, 17, 62, 11265, 1096, 16151, 27110, 13, 15036, 62, 1525, 62, 8367, 7, 9744, 11, 532, 16, 13, 15, 11, 352, 13, 15, 828, 657, 828, 1401, 8, 329, 357, 9744, 11, 1401, 8, 287, 308, 14259, 60, 198, 220, 220, 220, 6436, 7509, 796, 14680, 7, 8738, 13, 87, 58, 25, 39014, 62, 9744, 2334, 16151, 66, 6320, 62, 70, 14259, 4008, 628, 220, 220, 220, 1303, 5589, 3902, 1327, 19738, 198, 220, 220, 220, 269, 21841, 796, 13588, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 277, 16, 62, 76, 2821, 11, 410, 16, 62, 76, 2821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 17, 62, 76, 2821, 11, 410, 17, 62, 76, 2821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 257, 16, 62, 2436, 74, 11, 257, 17, 62, 2436, 74, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 300, 16, 62, 2436, 74, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 256, 16, 62, 2436, 74, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 16589, 220, 198, 220, 220, 220, 220, 220, 220, 220, 20650, 90, 42643, 3978, 10100, 92, 58, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 2501, 1600, 366, 9521, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 15, 1600, 366, 1120, 1600, 366, 3064, 1600, 366, 9031, 1600, 366, 4059, 1600, 366, 12825, 1600, 366, 23924, 1600, 366, 27641, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 2501, 1600, 366, 9521, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 15, 1600, 366, 1120, 1600, 366, 3064, 1600, 366, 9031, 1600, 366, 4059, 1600, 366, 12825, 1600, 366, 23924, 1600, 366, 27641, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 27, 1600, 366, 24618, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 27, 1600, 366, 24618, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 392, 1600, 366, 273, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 37, 1600, 366, 38, 8973, 12962, 628, 220, 220, 220, 1303, 24442, 198, 220, 220, 220, 277, 16, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 277, 16, 62, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 410, 16, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 410, 16, 62, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 277, 17, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 277, 17, 62, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 410, 17, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 410, 17, 62, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 257, 16, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 257, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 257, 17, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 257, 17, 62, 2436, 74, 13, 4215, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 300, 16, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 300, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 256, 16, 62, 9744, 796, 31312, 62, 83, 22854, 7, 15805, 11, 256, 16, 62, 2436, 74, 13, 4215, 76, 2821, 13, 6551, 8, 198, 220, 220, 220, 1303, 14, 24442, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 554, 16115, 498, 2890, 262, 9633, 198, 220, 220, 220, 2315, 796, 41216, 62, 439, 62, 25641, 2977, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 4631, 290, 4836, 198, 220, 220, 220, 44872, 7203, 27871, 320, 1634, 7253, 25, 29568, 2197, 28955, 4943, 198, 220, 220, 220, 264, 408, 796, 23575, 3419, 198, 220, 220, 220, 1057, 7, 82, 408, 11, 2315, 8, 628, 220, 220, 220, 1303, 24442, 198, 220, 220, 220, 1303, 16344, 796, 18272, 35, 713, 7, 5036, 1381, 5218, 1366, 62, 2617, 13, 55, 11, 14722, 5218, 1366, 62, 2617, 13, 56, 8, 198, 220, 220, 220, 1303, 5143, 7, 82, 408, 11, 2593, 276, 62, 15414, 11, 277, 67, 8, 198, 220, 220, 220, 1303, 14, 24442, 628, 220, 220, 220, 1303, 13614, 6772, 198, 220, 220, 220, 329, 36835, 287, 352, 25, 9806, 62, 34409, 62, 538, 5374, 82, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 15805, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 43501, 796, 2659, 7, 22510, 62, 1069, 12629, 7, 7890, 62, 2617, 828, 15458, 62, 7857, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 39516, 625, 477, 37830, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 23350, 62, 43501, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15458, 62, 34223, 11, 15458, 62, 893, 796, 1306, 62, 43501, 7, 7890, 62, 2617, 11, 15458, 62, 7857, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 67, 796, 18272, 35, 713, 7, 5036, 1381, 5218, 15458, 62, 34223, 11, 14722, 5218, 15458, 62, 893, 11, 2705, 1108, 62, 489, 5218, 685, 4215, 1108, 58, 538, 5374, 60, 4357, 1327, 268, 62, 489, 5218, 685, 9562, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 25048, 3047, 1262, 15458, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1057, 7, 82, 408, 11, 6436, 7509, 11, 277, 67, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 24442, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4215, 741, 796, 2705, 19738, 62, 1525, 62, 20688, 7, 82, 408, 11, 269, 21841, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2164, 5643, 796, 1057, 7, 82, 408, 11, 309, 22854, 26933, 69, 16, 62, 9744, 11, 410, 16, 62, 9744, 11, 277, 17, 62, 9744, 11, 410, 17, 62, 9744, 11, 257, 16, 62, 9744, 11, 257, 17, 62, 9744, 11, 300, 16, 62, 9744, 11, 256, 16, 62, 9744, 46570, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 42946, 16, 62, 448, 796, 1057, 7, 82, 408, 11, 3063, 16, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 12860, 1057, 7, 82, 408, 11, 2747, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 12860, 1057, 7, 82, 408, 11, 2747, 532, 14722, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 12860, 1057, 7, 82, 408, 11, 285, 2821, 19738, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 12860, 1057, 7, 82, 408, 11, 277, 16, 62, 9744, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 12860, 1057, 7, 82, 408, 11, 410, 16, 62, 9744, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14, 24442, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3082, 1133, 2811, 2994, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15458, 62, 23913, 62, 15805, 796, 1057, 7, 82, 408, 11, 1575, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 15805, 15853, 15458, 62, 23913, 62, 15805, 1220, 357, 23350, 62, 43501, 1635, 15458, 62, 7857, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16531, 17259, 583, 36835, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 611, 36835, 4064, 3359, 62, 9662, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4215, 741, 796, 2705, 19738, 62, 1525, 62, 20688, 7, 82, 408, 11, 269, 21841, 11, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2164, 5643, 796, 1057, 7, 82, 408, 11, 309, 22854, 26933, 69, 16, 62, 9744, 11, 410, 16, 62, 9744, 11, 277, 17, 62, 9744, 11, 410, 17, 62, 9744, 11, 257, 16, 62, 9744, 11, 257, 17, 62, 9744, 11, 300, 16, 62, 9744, 11, 256, 16, 62, 9744, 46570, 277, 67, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 4215, 741, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 66, 6320, 62, 70, 14259, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2164, 5643, 796, 309, 22854, 26933, 9744, 329, 357, 9744, 11, 1401, 8, 287, 28490, 62, 70, 14259, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 13807, 5374, 29568, 538, 5374, 8, 220, 1575, 43641, 7, 615, 70, 62, 15805, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 35393, 43641, 7, 27237, 7, 2164, 5643, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 42781, 62, 15805, 1279, 48436, 2624, 7, 16793, 62, 15805, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7203, 27871, 320, 1634, 42931, 25, 29568, 2197, 28955, 4943, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 6208, 2746, 198, 220, 220, 220, 3376, 62, 28764, 2867, 796, 357, 744, 41052, 28764, 8, 6624, 14722, 8, 198, 220, 220, 220, 1303, 27131, 378, 9922, 198, 220, 220, 220, 9922, 796, 1612, 7, 2701, 7, 30283, 62, 28764, 2867, 11, 24311, 62, 3697, 46, 1404, 2624, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 260, 2220, 1366, 62, 2617, 284, 8551, 2656, 1502, 357, 19545, 62, 43501, 481, 20947, 36273, 8, 198, 220, 220, 220, 1366, 62, 2617, 796, 24958, 27354, 292, 316, 7, 35, 75, 8, 198, 220, 220, 220, 1395, 796, 1366, 62, 2617, 13, 55, 198, 220, 220, 220, 575, 796, 1366, 62, 2617, 13, 56, 628, 220, 220, 220, 1303, 4215, 20731, 198, 220, 220, 220, 277, 67, 796, 18272, 35, 713, 7, 5036, 1381, 5218, 1366, 62, 2617, 13, 55, 11, 14722, 5218, 1366, 62, 2617, 13, 56, 11, 2705, 1108, 62, 489, 5218, 685, 4215, 1108, 58, 437, 60, 4357, 1327, 268, 62, 489, 5218, 685, 9562, 12962, 198, 220, 220, 220, 575, 28764, 62, 4215, 796, 1057, 7, 82, 408, 11, 2835, 41052, 28764, 828, 277, 67, 8, 198, 220, 220, 220, 697, 62, 4215, 796, 1057, 7, 82, 408, 11, 9922, 11, 277, 67, 8, 198, 220, 220, 220, 4731, 448, 796, 24043, 1806, 7, 82, 408, 11, 269, 21841, 11, 277, 67, 26, 1502, 41888, 23, 11, 16, 11, 20, 11, 17, 11, 22, 11, 18, 11, 21, 11, 19, 12962, 198, 220, 220, 220, 1353, 20, 796, 1353, 37336, 7, 8841, 448, 11, 642, 8, 198, 220, 220, 220, 2705, 741, 796, 2705, 19738, 62, 1525, 62, 20688, 7, 82, 408, 11, 269, 21841, 11, 277, 67, 8, 198, 220, 220, 220, 3915, 82, 796, 1057, 7, 82, 408, 11, 309, 22854, 26933, 69, 16, 62, 9744, 11, 410, 16, 62, 9744, 11, 277, 17, 62, 9744, 11, 410, 17, 62, 9744, 11, 257, 16, 62, 9744, 11, 257, 17, 62, 9744, 11, 300, 16, 62, 9744, 11, 256, 16, 62, 9744, 46570, 277, 67, 8, 198, 220, 220, 220, 1013, 796, 10802, 7, 56, 28764, 62, 4215, 13, 855, 16, 13, 15, 11, 575, 13, 855, 16, 13, 15, 8, 198, 220, 220, 220, 1013, 62, 521, 1063, 796, 10802, 62, 521, 1063, 7, 56, 28764, 62, 4215, 13, 855, 16, 13, 15, 11, 575, 13, 855, 16, 13, 15, 8, 628, 220, 220, 220, 1303, 10424, 20731, 198, 220, 220, 220, 277, 67, 796, 18272, 35, 713, 7, 5036, 1381, 5218, 1366, 62, 2617, 13, 55, 11, 14722, 5218, 1366, 62, 2617, 13, 56, 11, 2705, 1108, 62, 489, 5218, 685, 4215, 1108, 58, 437, 60, 4357, 1327, 268, 62, 489, 5218, 685, 7942, 12962, 198, 220, 220, 220, 575, 28764, 62, 10424, 796, 1057, 7, 82, 408, 11, 2835, 41052, 28764, 828, 277, 67, 8, 198, 220, 220, 220, 697, 62, 10424, 796, 1057, 7, 82, 408, 11, 9922, 11, 277, 67, 8, 628, 220, 220, 220, 44872, 7203, 18380, 33222, 25, 1600, 697, 62, 4215, 8, 198, 220, 220, 220, 44872, 7203, 17309, 33222, 25, 1600, 697, 62, 10424, 8, 198, 220, 220, 220, 44872, 7, 4852, 20, 8, 198, 220, 220, 220, 288, 28, 35, 713, 90, 42643, 3978, 10100, 11, 7149, 92, 3419, 628, 220, 220, 220, 1353, 20, 11, 697, 62, 10424, 198, 437, 198, 198, 404, 62, 37, 7, 87, 3712, 51, 22854, 8, 796, 4646, 62, 9806, 7, 87, 11, 309, 22854, 7, 16, 4008, 198, 404, 62, 38, 7, 87, 3712, 51, 22854, 8, 796, 4646, 62, 1084, 7, 87, 11, 309, 22854, 7, 16, 4008, 198, 404, 62, 392, 7, 87, 3712, 51, 22854, 11, 331, 3712, 51, 22854, 8, 796, 5288, 41052, 87, 11, 331, 8, 1303, 30854, 12, 3083, 198, 404, 62, 273, 7, 87, 3712, 51, 22854, 11, 331, 3712, 51, 22854, 8, 796, 5415, 41052, 87, 11, 331, 8, 1303, 30854, 12, 3083, 198, 198, 2, 51, 3727, 46, 25, 1445, 777, 284, 257, 4318, 4067, 198, 8818, 1034, 62, 13655, 7, 87, 3712, 51, 22854, 11, 331, 3712, 51, 22854, 11, 370, 3712, 51, 22854, 28, 9979, 415, 7, 16, 13, 15, 14, 3064, 13, 15, 4008, 220, 198, 220, 220, 220, 45218, 796, 4292, 62, 67, 12078, 7, 88, 11, 309, 22854, 7, 16, 4008, 198, 220, 220, 220, 331, 83, 3902, 796, 17763, 7, 22065, 11, 309, 22854, 26933, 16, 11, 651, 62, 43358, 7, 87, 38381, 17, 11907, 4008, 198, 220, 220, 220, 1255, 796, 264, 17225, 1868, 7, 76, 377, 7, 54, 11, 2124, 532, 331, 83, 3902, 4008, 198, 220, 220, 220, 1255, 198, 437, 198, 8818, 1034, 62, 2528, 7, 87, 3712, 51, 22854, 11, 331, 3712, 51, 22854, 11, 370, 3712, 51, 22854, 28, 9979, 415, 7, 16, 13, 15, 14, 3064, 13, 15, 4008, 220, 220, 198, 220, 220, 220, 45218, 796, 4292, 62, 67, 12078, 7, 88, 11, 309, 22854, 7, 16, 4008, 198, 220, 220, 220, 331, 83, 3902, 796, 17763, 7, 22065, 11, 309, 22854, 26933, 16, 11, 651, 62, 43358, 7, 87, 38381, 17, 11907, 4008, 198, 220, 220, 220, 1255, 796, 264, 17225, 1868, 7, 76, 377, 7, 54, 11, 331, 83, 3902, 532, 2124, 4008, 198, 437, 198, 198, 437, 1303, 21412, 198 ]
2.309822
6,068
# Does not test leafsize # Does not test different metrics import Distances.evaluate @testset "knn" begin @testset "metric" for metric in metrics @testset "tree type" for TreeType in trees_with_brute # 8 node rectangle data = [0.0 0.0 0.0 0.5 0.5 1.0 1.0 1.0; 0.0 0.5 1.0 0.0 1.0 0.0 0.5 1.0] tree = TreeType(data, metric; leafsize=2) idxs, dists = knn(tree, [0.8, 0.8], 1) @test idxs[1] == 8 # Should be closest to top right corner @test evaluate(metric, [0.2, 0.2], zeros(2)) ≈ dists[1] idxs, dists = knn(tree, [0.1, 0.8], 3, true) @test idxs == [3, 2, 5] idxs, dists = knn(tree, [0.8 0.1; 0.8 0.8], 1, true) @test idxs[1][1] == 8 @test idxs[2][1] == 3 idxs, dists = knn(tree, [SVector{2, Float64}(0.8,0.8), SVector{2, Float64}(0.1,0.8)], 1, true) @test idxs[1][1] == 8 @test idxs[2][1] == 3 idxs, dists = knn(tree, [1//10, 8//10], 3, true) @test idxs == [3, 2, 5] @test_throws ArgumentError knn(tree, [0.1, 0.8], 10) # k > n_points @test_throws ArgumentError knn(tree, [0.1], 10) # n_dim != trees dim end end end @testset "knn skip" begin @testset "tree type" for TreeType in trees_with_brute data = rand(2, 1000) tree = TreeType(data) idxs, dists = knn(tree, data[:, 10], 2, true) first_idx = idxs[1] second_idx = idxs[2] idxs, dists = knn(tree, data[:, 10], 2, true, i -> i == first_idx) @test idxs[1] == second_idx end end
[ 2, 8314, 407, 1332, 12835, 7857, 198, 2, 8314, 407, 1332, 1180, 20731, 198, 11748, 4307, 1817, 13, 49786, 198, 198, 31, 9288, 2617, 366, 15418, 77, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 4164, 1173, 1, 329, 18663, 287, 20731, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 21048, 2099, 1, 329, 12200, 6030, 287, 7150, 62, 4480, 62, 1671, 1133, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 807, 10139, 35991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 685, 15, 13, 15, 657, 13, 15, 657, 13, 15, 657, 13, 20, 657, 13, 20, 352, 13, 15, 352, 13, 15, 352, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 657, 13, 20, 352, 13, 15, 657, 13, 15, 352, 13, 15, 657, 13, 15, 657, 13, 20, 352, 13, 15, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12200, 6030, 7, 7890, 11, 18663, 26, 12835, 7857, 28, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 685, 15, 13, 23, 11, 657, 13, 23, 4357, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 16, 60, 6624, 807, 1303, 10358, 307, 11706, 284, 1353, 826, 5228, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 13446, 7, 4164, 1173, 11, 685, 15, 13, 17, 11, 657, 13, 17, 4357, 1976, 27498, 7, 17, 4008, 15139, 230, 288, 1023, 58, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 685, 15, 13, 16, 11, 657, 13, 23, 4357, 513, 11, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 6624, 685, 18, 11, 362, 11, 642, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 685, 15, 13, 23, 657, 13, 16, 26, 657, 13, 23, 657, 13, 23, 4357, 352, 11, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 16, 7131, 16, 60, 6624, 807, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 17, 7131, 16, 60, 6624, 513, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 685, 50, 38469, 90, 17, 11, 48436, 2414, 92, 7, 15, 13, 23, 11, 15, 13, 23, 828, 20546, 9250, 90, 17, 11, 48436, 2414, 92, 7, 15, 13, 16, 11, 15, 13, 23, 8, 4357, 352, 11, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 16, 7131, 16, 60, 6624, 807, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 17, 7131, 16, 60, 6624, 513, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 685, 16, 1003, 940, 11, 807, 1003, 940, 4357, 513, 11, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 6624, 685, 18, 11, 362, 11, 642, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 638, 77, 7, 21048, 11, 685, 15, 13, 16, 11, 657, 13, 23, 4357, 838, 8, 1303, 479, 1875, 299, 62, 13033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 638, 77, 7, 21048, 11, 685, 15, 13, 16, 4357, 838, 8, 1303, 299, 62, 27740, 14512, 7150, 5391, 628, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 9288, 2617, 366, 15418, 77, 14267, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 21048, 2099, 1, 329, 12200, 6030, 287, 7150, 62, 4480, 62, 1671, 1133, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 43720, 7, 17, 11, 8576, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12200, 6030, 7, 7890, 8, 628, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 1366, 58, 45299, 838, 4357, 362, 11, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 717, 62, 312, 87, 796, 4686, 34223, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1218, 62, 312, 87, 796, 4686, 34223, 58, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 11, 288, 1023, 796, 638, 77, 7, 21048, 11, 1366, 58, 45299, 838, 4357, 362, 11, 2081, 11, 1312, 4613, 1312, 6624, 717, 62, 312, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4686, 34223, 58, 16, 60, 6624, 1218, 62, 312, 87, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.843854
903
""" ObjectSetting The current settings of an [`Object`](@ref) which are saved in `object.current_setting`. # Fields - `line_width::Float64`: the current line width - `mul_line_width::Float64`: the current multiplier for line width. The actual line width is then: `mul_line_width * line_width` - `opacity::Float64`: the current opacity - `mul_opacity::Float64`: the current multiplier for opacity. The actual opacity is then: `mul_opacity * opacity` - `fontsize::Float64` the current font size - `show_object::Bool` is set to false if scale would be 0.0 which is forbidden by Cairo - `current_scale::Tuple{Float64, Float64}`: the current scale - `desired_scale::Tuple{Float64, Float64}`: the new desired scale - `mul_scale::Float64`: the multiplier for the new desired scale. The actual new scale is then: `mul_scale * desired_scale` """ mutable struct ObjectSetting line_width::Float64 mul_line_width::Float64 # the multiplier of line width is between 0 and 1 opacity::Float64 mul_opacity::Float64 # the multiplier of opacity is between 0 and 1 fontsize::Float64 # scale has three fields instead of just the normal two # current scale # desired scale and scale multiplier => `desired_scale*mul_scale` is the new desired scale # the scale change needs to be computed using `current_scale` and the desired scale # current_scale should never be 0 as this breaks scaleto has various other bad effects # see: https://github.com/JuliaGraphics/Luxor.jl/issues/114 # in this case show will be set to false and the object will not be called show_object::Bool current_scale::Scale desired_scale::Scale mul_scale::Float64 # the multiplier of scale is between 0 and 1 ObjectSetting() = new(2.0, 1.0, 1.0, 1.0, 10.0, true, Scale(1.0, 1.0), Scale(1.0, 1.0), 1.0) end """ update_ObjectSetting!(as::ObjectSetting, by::ObjectSetting) Set the fields of `as` to the same as `by`. Basically copying them over. """ function update_ObjectSetting!(as::ObjectSetting, by::ObjectSetting) as.line_width = by.line_width as.mul_line_width = by.mul_line_width as.opacity = by.opacity as.mul_opacity = by.mul_opacity as.fontsize = by.fontsize as.show_object = by.show_object as.current_scale = by.current_scale as.desired_scale = by.desired_scale as.mul_scale = by.mul_scale end function update_background_settings!(setting::ObjectSetting, object::AbstractObject) in_global_layer = get(object.opts, :in_global_layer, false) if in_global_layer update_ObjectSetting!(setting, object.current_setting) end end function update_object_settings!(object::AbstractObject, setting::ObjectSetting) update_ObjectSetting!(object.current_setting, setting) end
[ 37811, 198, 220, 220, 220, 9515, 34149, 198, 198, 464, 1459, 6460, 286, 281, 685, 63, 10267, 63, 16151, 31, 5420, 8, 543, 389, 7448, 287, 4600, 15252, 13, 14421, 62, 33990, 44646, 198, 198, 2, 23948, 198, 12, 4600, 1370, 62, 10394, 3712, 43879, 2414, 63, 25, 262, 1459, 1627, 9647, 198, 12, 4600, 76, 377, 62, 1370, 62, 10394, 3712, 43879, 2414, 63, 25, 262, 1459, 33090, 329, 1627, 9647, 13, 198, 220, 220, 220, 383, 4036, 1627, 9647, 318, 788, 25, 4600, 76, 377, 62, 1370, 62, 10394, 1635, 1627, 62, 10394, 63, 198, 12, 4600, 404, 4355, 3712, 43879, 2414, 63, 25, 262, 1459, 45912, 198, 12, 4600, 76, 377, 62, 404, 4355, 3712, 43879, 2414, 63, 25, 262, 1459, 33090, 329, 45912, 13, 198, 220, 220, 220, 383, 4036, 45912, 318, 788, 25, 4600, 76, 377, 62, 404, 4355, 1635, 45912, 63, 198, 12, 4600, 10331, 7857, 3712, 43879, 2414, 63, 262, 1459, 10369, 2546, 198, 12, 4600, 12860, 62, 15252, 3712, 33, 970, 63, 318, 900, 284, 3991, 611, 5046, 561, 307, 657, 13, 15, 543, 318, 19467, 416, 23732, 198, 12, 4600, 14421, 62, 9888, 3712, 51, 29291, 90, 43879, 2414, 11, 48436, 2414, 92, 63, 25, 262, 1459, 5046, 198, 12, 4600, 8906, 1202, 62, 9888, 3712, 51, 29291, 90, 43879, 2414, 11, 48436, 2414, 92, 63, 25, 262, 649, 10348, 5046, 198, 12, 4600, 76, 377, 62, 9888, 3712, 43879, 2414, 63, 25, 262, 33090, 329, 262, 649, 10348, 5046, 13, 198, 220, 220, 220, 383, 4036, 649, 5046, 318, 788, 25, 4600, 76, 377, 62, 9888, 1635, 10348, 62, 9888, 63, 198, 37811, 198, 76, 18187, 2878, 9515, 34149, 198, 220, 220, 220, 1627, 62, 10394, 3712, 43879, 2414, 198, 220, 220, 220, 35971, 62, 1370, 62, 10394, 3712, 43879, 2414, 1303, 262, 33090, 286, 1627, 9647, 318, 1022, 657, 290, 352, 198, 220, 220, 220, 45912, 3712, 43879, 2414, 198, 220, 220, 220, 35971, 62, 404, 4355, 3712, 43879, 2414, 1303, 262, 33090, 286, 45912, 318, 1022, 657, 290, 352, 198, 220, 220, 220, 10369, 7857, 3712, 43879, 2414, 198, 220, 220, 220, 1303, 5046, 468, 1115, 7032, 2427, 286, 655, 262, 3487, 734, 198, 220, 220, 220, 1303, 1459, 5046, 198, 220, 220, 220, 1303, 10348, 5046, 290, 5046, 33090, 5218, 4600, 8906, 1202, 62, 9888, 9, 76, 377, 62, 9888, 63, 318, 262, 649, 10348, 5046, 198, 220, 220, 220, 1303, 262, 5046, 1487, 2476, 284, 307, 29231, 1262, 4600, 14421, 62, 9888, 63, 290, 262, 10348, 5046, 198, 220, 220, 220, 1303, 1459, 62, 9888, 815, 1239, 307, 657, 355, 428, 9457, 16578, 27206, 468, 2972, 584, 2089, 3048, 198, 220, 220, 220, 1303, 766, 25, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 18172, 14, 43, 2821, 273, 13, 20362, 14, 37165, 14, 16562, 198, 220, 220, 220, 1303, 287, 428, 1339, 905, 481, 307, 900, 284, 3991, 290, 262, 2134, 481, 407, 307, 1444, 198, 220, 220, 220, 905, 62, 15252, 3712, 33, 970, 198, 220, 220, 220, 1459, 62, 9888, 3712, 29990, 198, 220, 220, 220, 10348, 62, 9888, 3712, 29990, 198, 220, 220, 220, 35971, 62, 9888, 3712, 43879, 2414, 1303, 262, 33090, 286, 5046, 318, 1022, 657, 290, 352, 628, 220, 220, 220, 9515, 34149, 3419, 796, 198, 220, 220, 220, 220, 220, 220, 220, 649, 7, 17, 13, 15, 11, 352, 13, 15, 11, 352, 13, 15, 11, 352, 13, 15, 11, 838, 13, 15, 11, 2081, 11, 21589, 7, 16, 13, 15, 11, 352, 13, 15, 828, 21589, 7, 16, 13, 15, 11, 352, 13, 15, 828, 352, 13, 15, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4296, 62, 10267, 34149, 0, 7, 292, 3712, 10267, 34149, 11, 416, 3712, 10267, 34149, 8, 198, 198, 7248, 262, 7032, 286, 4600, 292, 63, 284, 262, 976, 355, 4600, 1525, 44646, 20759, 23345, 606, 625, 13, 198, 37811, 198, 8818, 4296, 62, 10267, 34149, 0, 7, 292, 3712, 10267, 34149, 11, 416, 3712, 10267, 34149, 8, 198, 220, 220, 220, 355, 13, 1370, 62, 10394, 796, 416, 13, 1370, 62, 10394, 198, 220, 220, 220, 355, 13, 76, 377, 62, 1370, 62, 10394, 796, 416, 13, 76, 377, 62, 1370, 62, 10394, 198, 220, 220, 220, 355, 13, 404, 4355, 796, 416, 13, 404, 4355, 198, 220, 220, 220, 355, 13, 76, 377, 62, 404, 4355, 796, 416, 13, 76, 377, 62, 404, 4355, 198, 220, 220, 220, 355, 13, 10331, 7857, 796, 416, 13, 10331, 7857, 198, 220, 220, 220, 355, 13, 12860, 62, 15252, 796, 416, 13, 12860, 62, 15252, 198, 220, 220, 220, 355, 13, 14421, 62, 9888, 796, 416, 13, 14421, 62, 9888, 198, 220, 220, 220, 355, 13, 8906, 1202, 62, 9888, 796, 416, 13, 8906, 1202, 62, 9888, 198, 220, 220, 220, 355, 13, 76, 377, 62, 9888, 796, 416, 13, 76, 377, 62, 9888, 198, 437, 198, 198, 8818, 4296, 62, 25249, 62, 33692, 0, 7, 33990, 3712, 10267, 34149, 11, 2134, 3712, 23839, 10267, 8, 198, 220, 220, 220, 287, 62, 20541, 62, 29289, 796, 651, 7, 15252, 13, 404, 912, 11, 1058, 259, 62, 20541, 62, 29289, 11, 3991, 8, 198, 220, 220, 220, 611, 287, 62, 20541, 62, 29289, 198, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 10267, 34149, 0, 7, 33990, 11, 2134, 13, 14421, 62, 33990, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 4296, 62, 15252, 62, 33692, 0, 7, 15252, 3712, 23839, 10267, 11, 4634, 3712, 10267, 34149, 8, 198, 220, 220, 220, 4296, 62, 10267, 34149, 0, 7, 15252, 13, 14421, 62, 33990, 11, 4634, 8, 198, 437, 198 ]
2.953241
941
#------------------------------------------------------------------------------ """ excise(x...) Remove all lines where the is a NaN/missing in any of the x arrays # Examples - `x1 = excise(x)` - `(y1,x1) = excise(y,x)` """ function excise(x...) n = length(x) vv = FindNNPs(x...) #find rows with NaN/missing z = ntuple(i->copy(selectdim(x[i],1,vv)),n) #create a tuple of arrays (n==1) && (z = z[1]) #if a single array in the tuple return z end #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ """ FindNNPs(x...;Keepdim=1) Find rows (if Keepdim==1) which have no NaNs missing in other dimensions (eg. in no columns). # Input - `z::Array`: one or several numerical arrays - `Keepdim::Int`: (keyword) 1 if check rows, 2 if check columns, etc # Output - `vvb::BitVector`: vector, element t is true if row (if Keepdim==1) t has no NaN or missing # Notice - Set Keepdim=2 if we should instead look for NaNs/missings along rows (and other dimensions). - For heterogenous arrays like `x=[x1,x1]`, use `FindNNPs(x...)` Paul.Soderlind@unisg.ch """ function FindNNPs(x...;Keepdim=1) N = length(x) T = size(x[1],Keepdim) #length of output xDims = maximum(ndims,x) #max of ndims(x[i]) for i=1:N dims = setdiff(1:xDims,Keepdim) #dimensions to check vvM = falses(T,N) for i = 1:N #loop over inputs vvM[:,i] = any(z -> ismissing(z) || isnan(z),x[i],dims=dims) #this order is important end vvb = vec(.!any(vvM,dims=2)) #rows witout NaN/missing in any of the x matrices return vvb end #------------------------------------------------------------------------------
[ 2, 10097, 26171, 198, 37811, 198, 220, 220, 220, 47547, 7, 87, 23029, 198, 198, 27914, 477, 3951, 810, 262, 318, 257, 11013, 45, 14, 45688, 287, 597, 286, 262, 2124, 26515, 198, 198, 2, 21066, 198, 12, 4600, 87, 16, 796, 47547, 7, 87, 8, 63, 198, 12, 4600, 7, 88, 16, 11, 87, 16, 8, 796, 47547, 7, 88, 11, 87, 8, 63, 198, 198, 37811, 198, 8818, 47547, 7, 87, 23029, 198, 220, 299, 220, 796, 4129, 7, 87, 8, 198, 220, 410, 85, 796, 9938, 6144, 12016, 7, 87, 23029, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 19796, 15274, 351, 11013, 45, 14, 45688, 198, 220, 1976, 796, 299, 83, 29291, 7, 72, 3784, 30073, 7, 19738, 27740, 7, 87, 58, 72, 4357, 16, 11, 25093, 36911, 77, 8, 220, 220, 220, 1303, 17953, 257, 46545, 286, 26515, 198, 220, 357, 77, 855, 16, 8, 11405, 357, 89, 796, 1976, 58, 16, 12962, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 361, 257, 2060, 7177, 287, 262, 46545, 198, 220, 1441, 1976, 198, 437, 198, 2, 10097, 26171, 628, 198, 2, 10097, 26171, 198, 37811, 198, 220, 220, 220, 9938, 6144, 12016, 7, 87, 986, 26, 15597, 27740, 28, 16, 8, 198, 198, 16742, 15274, 357, 361, 9175, 27740, 855, 16, 8, 543, 423, 645, 11013, 47503, 4814, 287, 584, 15225, 357, 1533, 13, 287, 645, 15180, 737, 198, 198, 2, 23412, 198, 12, 4600, 89, 3712, 19182, 63, 25, 530, 393, 1811, 29052, 26515, 198, 12, 4600, 15597, 27740, 3712, 5317, 63, 25, 357, 2539, 4775, 8, 352, 611, 2198, 15274, 11, 362, 611, 2198, 15180, 11, 3503, 198, 198, 2, 25235, 198, 12, 4600, 25093, 65, 3712, 13128, 38469, 63, 25, 15879, 11, 5002, 256, 318, 2081, 611, 5752, 357, 361, 9175, 27740, 855, 16, 8, 256, 468, 645, 11013, 45, 393, 4814, 198, 198, 2, 17641, 198, 12, 5345, 9175, 27740, 28, 17, 611, 356, 815, 2427, 804, 329, 11013, 47503, 14, 3927, 654, 1863, 15274, 357, 392, 584, 15225, 737, 198, 12, 1114, 14445, 27897, 26515, 588, 4600, 87, 41888, 87, 16, 11, 87, 16, 60, 47671, 779, 4600, 16742, 6144, 12016, 7, 87, 23029, 63, 198, 198, 12041, 13, 50, 12342, 75, 521, 31, 403, 271, 70, 13, 354, 198, 198, 37811, 198, 8818, 9938, 6144, 12016, 7, 87, 986, 26, 15597, 27740, 28, 16, 8, 628, 220, 399, 220, 796, 4129, 7, 87, 8, 198, 220, 309, 220, 220, 220, 220, 796, 2546, 7, 87, 58, 16, 4357, 15597, 27740, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13664, 286, 5072, 628, 220, 2124, 35, 12078, 796, 5415, 7, 358, 12078, 11, 87, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9806, 286, 299, 67, 12078, 7, 87, 58, 72, 12962, 329, 1312, 28, 16, 25, 45, 198, 220, 5391, 82, 220, 796, 900, 26069, 7, 16, 25, 87, 35, 12078, 11, 15597, 27740, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 27740, 5736, 284, 2198, 628, 220, 410, 85, 44, 796, 27807, 274, 7, 51, 11, 45, 8, 198, 220, 329, 1312, 796, 352, 25, 45, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 26268, 625, 17311, 198, 220, 220, 220, 410, 85, 44, 58, 45299, 72, 60, 796, 597, 7, 89, 4613, 318, 45688, 7, 89, 8, 8614, 2125, 272, 7, 89, 828, 87, 58, 72, 4357, 67, 12078, 28, 67, 12078, 8, 220, 220, 1303, 5661, 1502, 318, 1593, 198, 220, 886, 628, 220, 410, 85, 65, 796, 43030, 7, 13, 0, 1092, 7, 25093, 44, 11, 67, 12078, 28, 17, 4008, 220, 220, 220, 220, 220, 1303, 8516, 20868, 448, 11013, 45, 14, 45688, 287, 597, 286, 262, 2124, 2603, 45977, 628, 220, 1441, 410, 85, 65, 198, 198, 437, 198, 2, 10097, 26171, 198 ]
2.637016
697
# Implementation of reverse-mode sensitivities for `getindex`. import Base.getindex for i = 1:7 T = Expr(:curly, :Tuple, fill(:Any, i)...) is_node = Expr(:vect, true, fill(false, i - 1)...) @eval @explicit_intercepts getindex $T $is_node end function ∇(Ā, ::typeof(getindex), ::Type{Arg{1}}, p, y, ȳ, A, inds...) Ā[inds...] += ȳ return Ā end function ∇(Ā, ::typeof(getindex), ::Type{Arg{1}}, p, y::AbstractArray, ȳ::AbstractArray, A, inds...) @views Ā[inds...] .+= reshape(ȳ, size(y)...) return Ā end function ∇(::typeof(getindex), ::Type{Arg{1}}, p, y, ȳ, A, inds...) return ∇(zerod_container(A), getindex, Arg{1}, p, y, ȳ, A, inds...) end # # Implementation of reverse-mode sensitivities for `view`. Not currently in use because # `view` turns out to actually be a bit awkward. # eval(DiffBase, add_intercept(:view, :(Base.view), :(Tuple{Any, Vararg}))) # @inline function ∇(Ā, ::typeof(view), ::Type{Arg{1}}, p, y, ȳ, A, inds...) # return Base.setindex!(Ā, ȳ, inds...) # end # @inline function ∇(::typeof(view), ::Type{Arg{1}}, p, y, ȳ, A, inds...) # return ∇(zeros(A), view, Arg{1}, p, y, ȳ, A, inds...) # end
[ 2, 46333, 286, 9575, 12, 14171, 44752, 28720, 329, 4600, 1136, 9630, 44646, 198, 11748, 7308, 13, 1136, 9630, 198, 1640, 1312, 796, 352, 25, 22, 198, 220, 220, 220, 309, 796, 1475, 1050, 7, 25, 22019, 306, 11, 1058, 51, 29291, 11, 6070, 7, 25, 7149, 11, 1312, 8, 23029, 198, 220, 220, 220, 318, 62, 17440, 796, 1475, 1050, 7, 25, 303, 310, 11, 2081, 11, 6070, 7, 9562, 11, 1312, 532, 352, 8, 23029, 198, 220, 220, 220, 2488, 18206, 2488, 20676, 3628, 62, 3849, 984, 82, 651, 9630, 720, 51, 720, 271, 62, 17440, 198, 437, 198, 198, 8818, 18872, 229, 7, 32, 136, 226, 11, 7904, 4906, 1659, 7, 1136, 9630, 828, 7904, 6030, 90, 28100, 90, 16, 92, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 220, 220, 220, 317, 136, 226, 58, 521, 82, 22345, 15853, 331, 136, 226, 198, 220, 220, 220, 1441, 317, 136, 226, 198, 437, 198, 8818, 18872, 229, 7, 32, 136, 226, 11, 7904, 4906, 1659, 7, 1136, 9630, 828, 7904, 6030, 90, 28100, 90, 16, 92, 5512, 279, 11, 331, 3712, 23839, 19182, 11, 331, 136, 226, 3712, 23839, 19182, 11, 317, 11, 773, 82, 23029, 198, 220, 220, 220, 2488, 33571, 317, 136, 226, 58, 521, 82, 22345, 764, 47932, 27179, 1758, 7, 88, 136, 226, 11, 2546, 7, 88, 8, 23029, 198, 220, 220, 220, 1441, 317, 136, 226, 198, 437, 198, 8818, 18872, 229, 7, 3712, 4906, 1659, 7, 1136, 9630, 828, 7904, 6030, 90, 28100, 90, 16, 92, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 220, 220, 220, 1441, 18872, 229, 7, 9107, 375, 62, 34924, 7, 32, 828, 651, 9630, 11, 20559, 90, 16, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 437, 198, 198, 2, 1303, 46333, 286, 9575, 12, 14171, 44752, 28720, 329, 4600, 1177, 44646, 1892, 3058, 287, 779, 780, 198, 2, 4600, 1177, 63, 4962, 503, 284, 1682, 307, 257, 1643, 13006, 13, 198, 2, 5418, 7, 28813, 14881, 11, 751, 62, 3849, 984, 7, 25, 1177, 11, 36147, 14881, 13, 1177, 828, 36147, 51, 29291, 90, 7149, 11, 12372, 853, 92, 22305, 198, 2, 2488, 45145, 2163, 18872, 229, 7, 32, 136, 226, 11, 7904, 4906, 1659, 7, 1177, 828, 7904, 6030, 90, 28100, 90, 16, 92, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 2, 220, 220, 220, 220, 1441, 7308, 13, 2617, 9630, 0, 7, 32, 136, 226, 11, 331, 136, 226, 11, 773, 82, 23029, 198, 2, 886, 198, 2, 2488, 45145, 2163, 18872, 229, 7, 3712, 4906, 1659, 7, 1177, 828, 7904, 6030, 90, 28100, 90, 16, 92, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 2, 220, 220, 220, 220, 1441, 18872, 229, 7, 9107, 418, 7, 32, 828, 1570, 11, 20559, 90, 16, 5512, 279, 11, 331, 11, 331, 136, 226, 11, 317, 11, 773, 82, 23029, 198, 2, 886, 198 ]
2.275194
516
module WaveFD using Base.Threads, CvxCompress, DSP, Distributed, DistributedArrays, FFTW, LinearAlgebra, NearestNeighbors, Random, SpecialFunctions, StaticArrays, Statistics, WaveFD_jll import Base.convert, Base.copy, Base.get, Base.min, Base.max, Base.maximum, Base.show, Base.size abstract type Language end struct LangC <: Language end struct LangJulia <: Language end show(io::IO, l::LangC) = write(io, "C") show(io::IO, l::LangJulia) = write(io, "Julia") abstract type ImagingCondition end struct ImagingConditionStandard <: ImagingCondition end struct ImagingConditionWaveFieldSeparationFWI <: ImagingCondition end struct ImagingConditionWaveFieldSeparationRTM <: ImagingCondition end include("stencil.jl") include("spacetime.jl") include("compressedio.jl") include("wavelet.jl") include("absorb.jl") include("illumination.jl") include("prop2DAcoIsoDenQ_DEO2_FDTD.jl") include("prop2DAcoTTIDenQ_DEO2_FDTD.jl") include("prop2DAcoVTIDenQ_DEO2_FDTD.jl") include("prop3DAcoIsoDenQ_DEO2_FDTD.jl") include("prop3DAcoTTIDenQ_DEO2_FDTD.jl") include("prop3DAcoVTIDenQ_DEO2_FDTD.jl") export dtmod, Prop2DAcoIsoDenQ_DEO2_FDTD, Prop2DAcoTTIDenQ_DEO2_FDTD, Prop2DAcoVTIDenQ_DEO2_FDTD, Prop3DAcoIsoDenQ_DEO2_FDTD, Prop3DAcoTTIDenQ_DEO2_FDTD, Prop3DAcoVTIDenQ_DEO2_FDTD, fieldfile!, free, Ginsu, linearadjoint, linearforward, nonlinearforward, ntmod, reportfreq!, sourceillum!, sourceillum, traces, Wavelet, WaveletDerivRicker, WaveletMinPhaseRicker, WaveletCausalRicker, WaveletOrmsby, WaveletMinPhaseOrmsby, WaveletRicker, WaveletSine end
[ 21412, 17084, 26009, 198, 198, 3500, 7308, 13, 16818, 82, 11, 327, 85, 87, 7293, 601, 11, 360, 4303, 11, 4307, 6169, 11, 4307, 6169, 3163, 20477, 11, 376, 9792, 54, 11, 44800, 2348, 29230, 11, 3169, 12423, 46445, 32289, 11, 14534, 11, 6093, 24629, 2733, 11, 36125, 3163, 20477, 11, 14370, 11, 17084, 26009, 62, 73, 297, 198, 198, 11748, 198, 14881, 13, 1102, 1851, 11, 198, 14881, 13, 30073, 11, 198, 14881, 13, 1136, 11, 198, 14881, 13, 1084, 11, 198, 14881, 13, 9806, 11, 198, 14881, 13, 47033, 11, 198, 14881, 13, 12860, 11, 198, 14881, 13, 7857, 198, 198, 397, 8709, 2099, 15417, 886, 198, 7249, 16332, 34, 1279, 25, 15417, 886, 198, 7249, 16332, 16980, 544, 1279, 25, 15417, 886, 198, 12860, 7, 952, 3712, 9399, 11, 300, 3712, 43, 648, 34, 8, 796, 3551, 7, 952, 11, 366, 34, 4943, 198, 12860, 7, 952, 3712, 9399, 11, 300, 3712, 43, 648, 16980, 544, 8, 796, 3551, 7, 952, 11, 366, 16980, 544, 4943, 198, 198, 397, 8709, 2099, 48656, 48362, 886, 198, 7249, 48656, 48362, 23615, 1279, 25, 48656, 48362, 886, 198, 7249, 48656, 48362, 39709, 15878, 19117, 10186, 24160, 40, 1279, 25, 48656, 48362, 886, 198, 7249, 48656, 48362, 39709, 15878, 19117, 10186, 14181, 44, 1279, 25, 48656, 48362, 886, 198, 198, 17256, 7203, 26400, 2856, 13, 20362, 4943, 198, 17256, 7203, 2777, 330, 8079, 13, 20362, 4943, 198, 17256, 7203, 5589, 2790, 952, 13, 20362, 4943, 198, 17256, 7203, 19204, 1616, 13, 20362, 4943, 198, 17256, 7203, 8937, 27688, 13, 20362, 4943, 198, 17256, 7203, 359, 388, 1883, 13, 20362, 4943, 198, 198, 17256, 7203, 22930, 17, 5631, 1073, 40, 568, 21306, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 17256, 7203, 22930, 17, 5631, 1073, 15751, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 17256, 7203, 22930, 17, 5631, 1073, 36392, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 198, 17256, 7203, 22930, 18, 5631, 1073, 40, 568, 21306, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 17256, 7203, 22930, 18, 5631, 1073, 15751, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 17256, 7203, 22930, 18, 5631, 1073, 36392, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 13, 20362, 4943, 198, 198, 39344, 198, 28664, 4666, 11, 198, 24331, 17, 5631, 1073, 40, 568, 21306, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 24331, 17, 5631, 1073, 15751, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 24331, 17, 5631, 1073, 36392, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 24331, 18, 5631, 1073, 40, 568, 21306, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 24331, 18, 5631, 1073, 15751, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 24331, 18, 5631, 1073, 36392, 2389, 268, 48, 62, 35, 4720, 17, 62, 26009, 21016, 11, 198, 3245, 7753, 28265, 198, 5787, 11, 198, 38, 1040, 84, 11, 198, 29127, 41255, 1563, 11, 198, 29127, 11813, 11, 198, 13159, 29127, 11813, 11, 198, 429, 4666, 11, 198, 13116, 19503, 80, 28265, 198, 10459, 359, 388, 28265, 198, 10459, 359, 388, 11, 198, 2213, 2114, 11, 198, 39709, 1616, 11, 198, 39709, 1616, 28532, 452, 49, 15799, 11, 198, 39709, 1616, 9452, 35645, 49, 15799, 11, 198, 39709, 1616, 24334, 6775, 49, 15799, 11, 198, 39709, 1616, 5574, 907, 1525, 11, 198, 39709, 1616, 9452, 35645, 5574, 907, 1525, 11, 198, 39709, 1616, 49, 15799, 11, 198, 39709, 1616, 50, 500, 198, 198, 437, 198 ]
2.509772
614
using AMQPClient const VIRTUALHOST = "/" const HOST = "127.0.0.1" function send() # 1. Create a connection to the localhost or 127.0.0.1 of virtualhost '/' connection(; virtualhost=VIRTUALHOST, host=HOST) do conn # 2. Create a channel to send messages channel(conn, AMQPClient.UNUSED_CHANNEL, true) do chan # 3. Declare exchange exchange = "direct_logs" exchange_declare(chan, exchange, EXCHANGE_TYPE_DIRECT) # 4. Get severity and message if length(Base.ARGS) >= 3 severity = Base.ARGS[1] received = join(Base.ARGS[2:end], ' ') else severity = "info" received = "Hello World" end data = convert(Vector{UInt8}, codeunits(received)) msg = Message(data, content_type="text/plain", delivery_mode=PERSISTENT) # 5. Publish the message basic_publish(chan, msg; exchange=exchange, routing_key=severity) println("Message sent: $received, Severity: $severity") end end end send()
[ 3500, 3001, 48, 47, 11792, 198, 9979, 569, 48771, 25620, 39, 10892, 796, 12813, 1, 198, 9979, 367, 10892, 796, 366, 16799, 13, 15, 13, 15, 13, 16, 1, 628, 198, 8818, 3758, 3419, 198, 220, 220, 220, 1303, 352, 13, 13610, 257, 4637, 284, 262, 1957, 4774, 393, 18112, 13, 15, 13, 15, 13, 16, 286, 7166, 4774, 31051, 6, 198, 220, 220, 220, 4637, 7, 26, 7166, 4774, 28, 53, 48771, 25620, 39, 10892, 11, 2583, 28, 39, 10892, 8, 466, 48260, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 362, 13, 13610, 257, 6518, 284, 3758, 6218, 198, 220, 220, 220, 220, 220, 220, 220, 6518, 7, 37043, 11, 3001, 48, 47, 11792, 13, 4944, 2937, 1961, 62, 3398, 22846, 3698, 11, 2081, 8, 466, 442, 272, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 513, 13, 16691, 533, 5163, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5163, 796, 366, 12942, 62, 6404, 82, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5163, 62, 32446, 533, 7, 3147, 11, 5163, 11, 7788, 3398, 27746, 62, 25216, 62, 17931, 23988, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 604, 13, 3497, 19440, 290, 3275, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 14881, 13, 1503, 14313, 8, 18189, 513, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19440, 796, 7308, 13, 1503, 14313, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2722, 796, 4654, 7, 14881, 13, 1503, 14313, 58, 17, 25, 437, 4357, 705, 705, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19440, 796, 366, 10951, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2722, 796, 366, 15496, 2159, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 10385, 7, 38469, 90, 52, 5317, 23, 5512, 2438, 41667, 7, 47844, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 16000, 7, 7890, 11, 2695, 62, 4906, 2625, 5239, 14, 25638, 1600, 7585, 62, 14171, 28, 47, 4877, 8808, 3525, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 642, 13, 8525, 1836, 262, 3275, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4096, 62, 12984, 1836, 7, 3147, 11, 31456, 26, 5163, 28, 1069, 3803, 11, 28166, 62, 2539, 28, 28116, 414, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 12837, 1908, 25, 720, 47844, 11, 26434, 414, 25, 720, 28116, 414, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 21280, 3419, 198 ]
2.11553
528
# Question # What is the largest prime factor of the number 600851475143 ? # Time # O(n) any better solution?? function sieve(a) # find all the prime numbers less than or equal to a sieve = collect(1:a) # now from this iterate from 2 and remove all their multiples index = ones(Bool, a) while true end end function main() val = 600851475143 sq = convert(Int, floor(sqrt(val))) # now search for all the factors which # we could use sieve of erosthenes to findout the prime numbers sieve(sq) println(sq) end @time main()
[ 2, 18233, 198, 2, 1867, 318, 262, 4387, 6994, 5766, 286, 262, 1271, 10053, 5332, 1415, 2425, 21139, 5633, 198, 198, 2, 3862, 198, 2, 440, 7, 77, 8, 597, 1365, 4610, 3548, 198, 8818, 264, 12311, 7, 64, 8, 198, 220, 220, 220, 1303, 1064, 477, 262, 6994, 3146, 1342, 621, 393, 4961, 284, 257, 198, 220, 220, 220, 264, 12311, 796, 2824, 7, 16, 25, 64, 8, 198, 220, 220, 220, 1303, 783, 422, 428, 11629, 378, 422, 362, 290, 4781, 477, 511, 5021, 2374, 198, 220, 220, 220, 6376, 796, 3392, 7, 33, 970, 11, 257, 8, 198, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 886, 198, 198, 437, 198, 198, 8818, 1388, 3419, 198, 220, 220, 220, 1188, 796, 10053, 5332, 1415, 2425, 21139, 198, 220, 220, 220, 19862, 796, 10385, 7, 5317, 11, 4314, 7, 31166, 17034, 7, 2100, 22305, 198, 220, 220, 220, 1303, 783, 2989, 329, 477, 262, 5087, 543, 220, 198, 220, 220, 220, 1303, 356, 714, 779, 264, 12311, 286, 1931, 455, 831, 274, 284, 1064, 448, 262, 6994, 3146, 198, 220, 220, 220, 264, 12311, 7, 31166, 8, 198, 220, 220, 220, 44872, 7, 31166, 8, 198, 437, 198, 198, 31, 2435, 1388, 3419, 198 ]
2.689815
216
abstract type AbstractModelSet end # using CSV # using DataFrames """ WindFarmModelSet(wakedeficitmodel, wake_deflection_model, wake_combination_model, local_ti_model) Container for objects defining models to use in wind farm calculations # Arguments - `wake_defiict_model::AbstractWakeDeficitModel`: contains a struct defining the desired wake deficit model - `wake_deflection_model::AbstractWakeDeflectionModel`: contains a struct defining the desired wake deflection model - `wake_combination_model::AbstractWakeCombinationModel`: contains a struct defining the desired wake combination model - `local_ti_model::AbstractTurbulenceIntensityModel`: contains a struct defining the desired turbulence intensity model """ struct WindFarmModelSet{DTM,DNM,CM,TIM} <: AbstractModelSet wake_deficit_model::DTM wake_deflection_model::DNM wake_combination_model::CM local_ti_model::TIM end """ point_velocity(loc, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, wtvelocities, wind_resource, model_set::AbstractModelSet; wind_farm_state_id=1, downwind_turbine_id=0) Calculates the wind speed at a given point for a given state # Arguments - `loc::Array{TF,3}`: Location of interest - `turbine_x::Array{TF,nTurbines}`: turbine east-west locations in the state reference frame - `turbine_y::Array{TF,nTurbines}`: turbine north-south locations in the state reference frame - `turbine_z::Array{TF,nTurbines}`: turbine base height in the state reference frame - `turbine_yaw::Array{TF,nTurbines}`: turbine yaw for the given wind direction in radians - `turbine_ct::Array{TF,nTurbines}`: turbine thrust coefficients for the given state - `turbine_ai::Array{TF,nTurbines}`: turbine axial induction for the given state - `rotor_diameter::Array{TF,nTurbines}`: turbine rotor diameters - `hub_height::Array{TF,nTurbines}`: turbine hub heights - `turbine_local_ti::Array{TF,nTurbines}`: turbine local turbulence intensity for the given state - `sorted_turbine_index::Array{TF,nTurbines}`: array containing indices of wind turbines from most upwind to most downwind turbine in the given state - `wtvelocities::Array{TF,nTurbines}`: effective inflow wind speed for given state - `wind_resource::DiscretizedWindResource`: contains wind resource discreption (directions, speeds, frequencies, etc) - `wind_farm_state_id::Int`: index to correct state to use from wind resource provided. Defaults to 1 - `downwind_turbine_id::Int`: index of wind turbine of interest (if any). If not a point for calculating effective wind speed of a turbine, then provide 0 (default) """ function point_velocity(locx, locy, locz, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, wtvelocities, wind_resource, model_set::AbstractModelSet; wind_farm_state_id=1, downwind_turbine_id=0) wakedeficitmodel = model_set.wake_deficit_model wakedeflectionmodel = model_set.wake_deflection_model wakecombinationmodel = model_set.wake_combination_model # extract flow information wind_speed = wind_resource.wind_speeds[wind_farm_state_id] reference_height = wind_resource.measurement_heights[wind_farm_state_id] # set ground height ground_height = wind_resource.wind_shear_model.ground_height # TODO: allow topology to be given # find order for wind shear and deficit calculations shear_order = wind_resource.wind_shear_model.shear_order # adjust wind speed for wind shear if shear_order == "nothing" wind_speed_internal = wind_speed elseif shear_order == "first" wind_speed_internal = adjust_for_wind_shear(locz, wind_speed, reference_height, ground_height, wind_resource.wind_shear_model) else wind_speed_internal = wind_speed end # get number of turbines nturbines = length(turbine_x) # initialize deficit summation term to zero deficit_sum = 0.0 # loop through all turbines for u=1:nturbines # get index of upstream turbine upwind_turb_id = Int(sorted_turbine_index[u]) # don't allow turbine to impact itself if upwind_turb_id == downwind_turbine_id; continue; end # downstream distance between upstream turbine and point x = locx - turbine_x[upwind_turb_id] # check turbine relative locations if x > 1E-6 # skip this loop if it would include a turbine's impact on itself) if upwind_turb_id==downwind_turbine_id; continue; end # calculate wake deflection of the current wake at the point of interest horizontal_deflection = wake_deflection_model(locx, locy, locz, turbine_x, turbine_yaw, turbine_ct, upwind_turb_id, rotor_diameter, turbine_local_ti, wakedeflectionmodel) vertical_deflection = 0.0 # velocity difference in the wake deltav = wake_deficit_model(locx, locy, locz, turbine_x, turbine_y, turbine_z, horizontal_deflection, vertical_deflection, upwind_turb_id, downwind_turbine_id, hub_height, rotor_diameter, turbine_ai, turbine_local_ti, turbine_ct, turbine_yaw, wakedeficitmodel) # combine deficits according to selected wake combination method deficit_sum = wake_combination_model(deltav, wind_speed_internal, wtvelocities[upwind_turb_id], deficit_sum, wakecombinationmodel) # println(deficit_sum, " ", downwind_turbine_id, " ", upwind_turb_id) end end # find velocity at point without shear point_velocity = wind_speed_internal - deficit_sum if shear_order == "nothing" point_velocity_out = point_velocity elseif shear_order == "first" point_velocity_out = point_velocity else point_velocity_out = adjust_for_wind_shear(locz, point_velocity, reference_height, ground_height, wind_resource.wind_shear_model) end return point_velocity_out end """ point_velocity(turbine_x, turbine_y, turbine_z, rotor_diameter, hub_height, turbine_yaw, sorted_turbine_index, ct_model, rotor_sample_points_y, rotor_sample_points_z, wind_resource, model_set::AbstractModelSet; wind_farm_state_id=1) Calculates the wind speed at a given point for a given state # Arguments - `turbine_x::Array{TF,nTurbines}`: turbine east-west locations in the state reference frame - `turbine_y::Array{TF,nTurbines}`: turbine north-south locations in the state reference frame - `turbine_z::Array{TF,nTurbines}`: turbine base height in the state reference frame - `rotor_diameter::Array{TF,nTurbines}`: turbine rotor diameters - `hub_height::Array{TF,nTurbines}`: turbine hub heights - `turbine_yaw::Array{TF,nTurbines}`: turbine yaw for the given wind direction in radians - `sorted_turbine_index::Array{TF,nTurbines}`: turbine sorted order upstream to downstream for given state - `ct_model::AbstractThrustCoefficientModel`: defines how the thrust coefficient changes with state etc - rotor_sample_points_y::Array{TF,N}`: horizontal wind location of points to sample across the rotor swept area when calculating the effective wind speed for the wind turbine. Points are centered at the hub (0,0) and scaled by the radius (1=tip of blades) - rotor_sample_points_z::Array{TF,N}`: vertical wind location of points to sample across the rotor swept area when calculating the effective wind speed for the wind turbine. Points are centered at the hub (0,0) and scaled by the radius (1=tip of blades) - `wind_resource::DiscretizedWindResource`: wind resource discreption (directions, speeds, frequencies, etc) - `model_set::AbstractModelSet`: defines wake-realated models to be used in analysis - `wind_farm_state_id::Int`: index to correct state to use from wind resource provided. Defaults to 1 """ function turbine_velocities_one_direction(turbine_x, turbine_y, turbine_z, rotor_diameter, hub_height, turbine_yaw, sorted_turbine_index, ct_model, rotor_sample_points_y, rotor_sample_points_z, wind_resource, model_set::AbstractModelSet; wind_farm_state_id=1, velocity_only=true) # get number of turbines and rotor sample point n_turbines = length(turbine_x) n_rotor_sample_points = length(rotor_sample_points_y) # initialize correct array types arr_type = promote_type(typeof(turbine_x[1]),typeof(turbine_y[1]),typeof(turbine_z[1]),typeof(rotor_diameter[1]), typeof(hub_height[1]),typeof(turbine_yaw[1])) # initialize arrays turbine_velocities = zeros(arr_type, n_turbines) turbine_ct = zeros(arr_type, n_turbines) turbine_ai = zeros(arr_type, n_turbines) turbine_local_ti = zeros(arr_type, n_turbines) # loop over all turbines for d=1:n_turbines # get index of downstream turbine downwind_turbine_id = Int(sorted_turbine_index[d]) # initialize downstream wind turbine velocity to zero # println("start array: ", turbine_velocities[downwind_turbine_id]) # wind_turbine_velocity = typeof(turbine_velocities[downwind_turbine_id])(0.0) wind_turbine_velocity = 0.0 # turbine_velocities[downwind_turbine_id] = 0.0 # loop over all rotor sample points to approximate the effective inflow velocity for p=1:n_rotor_sample_points # scale rotor sample point coordinate by rotor diameter (in rotor hub ref. frame) local_rotor_sample_point_y = rotor_sample_points_y[p]*0.5*rotor_diameter[downwind_turbine_id] local_rotor_sample_point_z = rotor_sample_points_z[p]*0.5*rotor_diameter[downwind_turbine_id] # put rotor sample points in wind direction coordinate system, and account for yaw locx = turbine_x[downwind_turbine_id] .+ local_rotor_sample_point_y*sin(turbine_yaw[downwind_turbine_id]) locy = turbine_y[downwind_turbine_id] .+ local_rotor_sample_point_y*cos(turbine_yaw[downwind_turbine_id]) locz = turbine_z[downwind_turbine_id] .+ hub_height[downwind_turbine_id] + local_rotor_sample_point_z # calculate the velocity at given point point_velocity_with_shear = point_velocity(locx, locy, locz, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, turbine_velocities, wind_resource, model_set, wind_farm_state_id=wind_farm_state_id, downwind_turbine_id=downwind_turbine_id) # add sample point velocity to turbine velocity to be averaged later wind_turbine_velocity += point_velocity_with_shear end # final velocity calculation for downstream turbine (average equally across all points) wind_turbine_velocity /= n_rotor_sample_points turbine_velocities[downwind_turbine_id] = deepcopy(wind_turbine_velocity) # update thrust coefficient for downstream turbine turbine_ct[downwind_turbine_id] = calculate_ct(turbine_velocities[downwind_turbine_id], ct_model[downwind_turbine_id]) # update axial induction for downstream turbine turbine_ai[downwind_turbine_id] = _ct_to_axial_ind_func(turbine_ct[downwind_turbine_id]) # get local turbulence intensity for this wind state ambient_ti = wind_resource.ambient_tis[wind_farm_state_id] # update local turbulence intensity for downstream turbine turbine_local_ti[downwind_turbine_id] = calculate_local_ti(turbine_x, turbine_y, ambient_ti, rotor_diameter, hub_height, turbine_yaw, turbine_local_ti, sorted_turbine_index, turbine_velocities, turbine_ct, model_set.local_ti_model; turbine_id=downwind_turbine_id, tol=1E-6) # println("local ti turb 9: ", turbine_local_ti[downwind_turbine_id]) end # df = DataFrame(ID=1:n_turbines, V=turbine_velocities, TI=turbine_local_ti, CT=turbine_ct) # CSV.write("internaldata.txt", df) if velocity_only return turbine_velocities else return turbine_velocities, turbine_ct, turbine_ai, turbine_local_ti end end function turbine_velocities_one_direction(x, turbine_z, rotor_diameter, hub_height, turbine_yaw, sorted_turbine_index, ct_model, rotor_sample_points_y, rotor_sample_points_z, wind_resource, model_set::AbstractModelSet; wind_farm_state_id=1, velocity_only=true) n_turbines = Int(length(x)/2) # println(typeof(x), n_turbines) turbine_x = x[1:n_turbines] turbine_y = x[n_turbines+1:end] # println(turbine_x) # println("turbine_x type ", typeof(turbine_x)) # println("type of x ", typeof(x)) # get number of turbines and rotor sample point # n_turbines = length(turbine_x) n_rotor_sample_points = length(rotor_sample_points_y) arr_type = promote_type(typeof(turbine_x[1]),typeof(turbine_y[1]),typeof(turbine_z[1]),typeof(rotor_diameter[1]), typeof(hub_height[1]),typeof(turbine_yaw[1])) turbine_velocities = zeros(arr_type, n_turbines) turbine_ct = zeros(arr_type, n_turbines) turbine_ai = zeros(arr_type, n_turbines) turbine_local_ti = zeros(arr_type, n_turbines) for d=1:n_turbines # get index of downstream turbine downwind_turbine_id = Int(sorted_turbine_index[d]) # initialize downstream wind turbine velocity to zero # println("start array: ", turbine_velocities[downwind_turbine_id]) # wind_turbine_velocity = typeof(turbine_velocities[downwind_turbine_id])(0.0) wind_turbine_velocity = 0.0 # turbine_velocities[downwind_turbine_id] = 0.0 for p=1:n_rotor_sample_points # scale rotor sample point coordinate by rotor diameter (in rotor hub ref. frame) local_rotor_sample_point_y = rotor_sample_points_y[p]*0.5*rotor_diameter[downwind_turbine_id] local_rotor_sample_point_z = rotor_sample_points_z[p]*0.5*rotor_diameter[downwind_turbine_id] locx = turbine_x[downwind_turbine_id] .+ local_rotor_sample_point_y*sin(turbine_yaw[downwind_turbine_id]) locy = turbine_y[downwind_turbine_id] .+ local_rotor_sample_point_y*cos(turbine_yaw[downwind_turbine_id]) locz = turbine_z[downwind_turbine_id] .+ hub_height[downwind_turbine_id] + local_rotor_sample_point_z # calculate the velocity at given point point_velocity_with_shear = point_velocity(locx, locy, locz, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, turbine_velocities, wind_resource, model_set, wind_farm_state_id=wind_farm_state_id, downwind_turbine_id=downwind_turbine_id) # add sample point velocity to turbine velocity to be averaged later wind_turbine_velocity += point_velocity_with_shear end # final velocity calculation for downstream turbine (average equally across all points) wind_turbine_velocity /= n_rotor_sample_points turbine_velocities[downwind_turbine_id] = deepcopy(wind_turbine_velocity) # update thrust coefficient for downstream turbine turbine_ct[downwind_turbine_id] = calculate_ct(turbine_velocities[downwind_turbine_id], ct_model[downwind_turbine_id]) # update axial induction for downstream turbine turbine_ai[downwind_turbine_id] = _ct_to_axial_ind_func(turbine_ct[downwind_turbine_id]) # update local turbulence intensity for downstream turbine ambient_ti = wind_resource.ambient_tis[wind_farm_state_id] turbine_local_ti[downwind_turbine_id] = calculate_local_ti(turbine_x, turbine_y, ambient_ti, rotor_diameter, hub_height, turbine_yaw, turbine_local_ti, sorted_turbine_index, turbine_velocities, turbine_ct, model_set.local_ti_model; turbine_id=downwind_turbine_id, tol=1E-6) end if velocity_only return turbine_velocities else return turbine_velocities, turbine_ct, turbine_ai, turbine_local_ti end end # turbine_velocities_one_direction!(model_set::AbstractModelSet, problem_description::AbstractWindFarmProblem; wind_farm_state_id=1) = turbine_velocities_one_direction!([0.0], [0.0], # model_set::AbstractModelSet, problem_description::AbstractWindFarmProblem; wind_farm_state_id=1) """ calculate_flow_field(xrange, yrange, zrange, model_set::AbstractModelSet, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, wtvelocities, wind_resource; wind_farm_state_id=1) Generates a flow field for a given state and cross section # Arguments - `xrange::Range`: range defining east-west locations to sample in global reference frame - `yrange::Range`: range defining north-west locations to sample in global reference frame - `zrange::Range`: range defining vertical locations to sample in global reference frame - `model_set::AbstractModelSet`: defines wake-realated models to be used in analysis - `turbine_x::Array{TF,nTurbines}`: turbine east-west locations in the global reference frame - `turbine_y::Array{TF,nTurbines}`: turbine north-south locations in the global reference frame - `turbine_z::Array{TF,nTurbines}`: turbine base height in the global reference frame - `turbine_yaw::Array{TF,nTurbines}`: turbine yaw for the given wind direction in radians - `turbine_ct::Array{TF,nTurbines}`: thrust coefficient of each turbine for the given state - `turbine_ai::Array{TF,nTurbines}`: turbine axial induction for the given state - `rotor_diameter::Array{TF,nTurbines}`: turbine rotor diameters - `hub_height::Array{TF,nTurbines}`: turbine hub heights - `turbine_local_ti::Array{TF,nTurbines}`: turbine local turbulence intensity for the given state - `sorted_turbine_index::Array{TF,nTurbines}`: turbine north-south locations in the global reference frame - `wtvelocities::Array{TF,nTurbines}`: effective inflow wind speed for given state - `wind_resource::DiscretizedWindResource`: wind resource discreption (directions, speeds, frequencies, etc) - `wind_farm_state_id::Int`: index to correct state to use from wind resource provided. Defaults to 1 """ function calculate_flow_field(xrange, yrange, zrange, model_set::AbstractModelSet, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, wtvelocities, wind_resource; wind_farm_state_id=1) xlen = length(xrange) ylen = length(yrange) zlen = length(zrange) npoints = xlen*ylen*zlen point_velocities = zeros(npoints) point_velocities = reshape(point_velocities, (zlen, ylen, xlen)) # rotate to direction frame for velocity calculations rot_tx, rot_ty = rotate_to_wind_direction(turbine_x, turbine_y, wind_resource.wind_directions[wind_farm_state_id]) # sort the turbines sorted_turbine_index = sortperm(rot_tx) for zi in 1:zlen for yi in 1:ylen for xi in 1:xlen locx = xrange[xi] locy = yrange[yi] locz = zrange[zi] locx, locy = rotate_to_wind_direction(locx, locy, wind_resource.wind_directions[wind_farm_state_id]) point_velocities[zi, yi, xi] = point_velocity(locx, locy, locz, rot_tx, rot_ty, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, wtvelocities, wind_resource, model_set, wind_farm_state_id=wind_farm_state_id, downwind_turbine_id=0) end end end # if zlen == 1 # return point_velocities[1,1:ylen,1:xlen] # elseif ylen == 1 # return point_velocities[1:zlen,1,1:xlen] # elseif xlen == 1 # return point_velocities[1:zlen,1:ylen,1] # else return point_velocities[1:zlen,1:ylen,1:xlen] # end end function calculate_flow_field(xrange, yrange, zrange, model_set::AbstractModelSet, turbine_x, turbine_y, turbine_z, turbine_yaw, rotor_diameter, hub_height, ct_models, rotor_sample_points_y, rotor_sample_points_z, wind_resource; wind_farm_state_id=1) # rotate to direction frame for velocity calculations rot_tx, rot_ty = rotate_to_wind_direction(turbine_x, turbine_y, wind_resource.wind_directions[wind_farm_state_id]) # sort the turbines sorted_turbine_index = sortperm(rot_tx) turbine_velocities, turbine_ct, turbine_ai, turbine_local_ti = turbine_velocities_one_direction(rot_tx, rot_ty, turbine_z, rotor_diameter, hub_height, turbine_yaw, sorted_turbine_index, ct_models, rotor_sample_points_y, rotor_sample_points_z, wind_resource, model_set, wind_farm_state_id=wind_farm_state_id, velocity_only=false) return calculate_flow_field(xrange, yrange, zrange, model_set, turbine_x, turbine_y, turbine_z, turbine_yaw, turbine_ct, turbine_ai, rotor_diameter, hub_height, turbine_local_ti, sorted_turbine_index, turbine_velocities, wind_resource, wind_farm_state_id=wind_farm_state_id) end
[ 397, 8709, 2099, 27741, 17633, 7248, 886, 198, 2, 1262, 44189, 198, 2, 1262, 6060, 35439, 198, 198, 37811, 198, 220, 220, 220, 3086, 48412, 17633, 7248, 7, 86, 4335, 891, 3628, 19849, 11, 7765, 62, 4299, 1564, 62, 19849, 11, 7765, 62, 24011, 1883, 62, 19849, 11, 1957, 62, 20259, 62, 19849, 8, 198, 198, 29869, 329, 5563, 16215, 4981, 284, 779, 287, 2344, 5318, 16765, 198, 198, 2, 20559, 2886, 198, 12, 4600, 48530, 62, 4299, 72, 713, 62, 19849, 3712, 23839, 54, 539, 7469, 3628, 17633, 63, 25, 4909, 257, 2878, 16215, 262, 10348, 7765, 11807, 2746, 198, 12, 4600, 48530, 62, 4299, 1564, 62, 19849, 3712, 23839, 54, 539, 7469, 1564, 17633, 63, 25, 4909, 257, 2878, 16215, 262, 10348, 7765, 825, 1564, 2746, 198, 12, 4600, 48530, 62, 24011, 1883, 62, 19849, 3712, 23839, 54, 539, 20575, 1883, 17633, 63, 25, 4909, 257, 2878, 16215, 262, 10348, 7765, 6087, 2746, 198, 12, 4600, 12001, 62, 20259, 62, 19849, 3712, 23839, 51, 5945, 32401, 5317, 6377, 17633, 63, 25, 4909, 257, 2878, 16215, 262, 10348, 47741, 12245, 2746, 198, 37811, 198, 7249, 3086, 48412, 17633, 7248, 90, 35, 15972, 11, 35, 32755, 11, 24187, 11, 51, 3955, 92, 1279, 25, 27741, 17633, 7248, 628, 220, 220, 220, 7765, 62, 4299, 3628, 62, 19849, 3712, 35, 15972, 198, 220, 220, 220, 7765, 62, 4299, 1564, 62, 19849, 3712, 35, 32755, 198, 220, 220, 220, 7765, 62, 24011, 1883, 62, 19849, 3712, 24187, 198, 220, 220, 220, 1957, 62, 20259, 62, 19849, 3712, 51, 3955, 198, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 966, 62, 626, 11683, 7, 17946, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 266, 83, 626, 420, 871, 11, 198, 220, 220, 220, 2344, 62, 31092, 11, 2746, 62, 2617, 3712, 23839, 17633, 7248, 26, 198, 220, 220, 220, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 28, 15, 8, 198, 198, 9771, 3129, 689, 262, 2344, 2866, 379, 257, 1813, 966, 329, 257, 1813, 1181, 198, 198, 2, 20559, 2886, 198, 12, 4600, 17946, 3712, 19182, 90, 10234, 11, 18, 92, 63, 25, 13397, 286, 1393, 198, 12, 4600, 83, 5945, 500, 62, 87, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 7627, 12, 7038, 7064, 287, 262, 1181, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 88, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 5093, 12, 35782, 7064, 287, 262, 1181, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 89, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 2779, 6001, 287, 262, 1181, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 88, 707, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 331, 707, 329, 262, 1813, 2344, 4571, 287, 220, 198, 220, 220, 220, 2511, 1547, 198, 12, 4600, 83, 5945, 500, 62, 310, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 14613, 44036, 329, 262, 1813, 1181, 198, 12, 4600, 83, 5945, 500, 62, 1872, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 7877, 498, 28471, 329, 262, 1813, 1181, 198, 12, 4600, 10599, 273, 62, 67, 13173, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 44883, 48428, 7307, 198, 12, 4600, 40140, 62, 17015, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 12575, 23245, 198, 12, 4600, 83, 5945, 500, 62, 12001, 62, 20259, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 1957, 47741, 12245, 329, 220, 198, 220, 220, 220, 262, 1813, 1181, 198, 12, 4600, 82, 9741, 62, 83, 5945, 500, 62, 9630, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 7177, 7268, 36525, 286, 2344, 35658, 220, 198, 220, 220, 220, 422, 749, 510, 7972, 284, 749, 866, 7972, 36489, 287, 262, 1813, 1181, 198, 12, 4600, 46569, 626, 420, 871, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 4050, 1167, 9319, 2344, 2866, 329, 1813, 1181, 198, 12, 4600, 7972, 62, 31092, 3712, 15642, 1186, 1143, 8731, 26198, 63, 25, 4909, 2344, 8271, 1221, 260, 1159, 357, 12942, 507, 11, 198, 220, 220, 220, 12055, 11, 19998, 11, 3503, 8, 198, 12, 4600, 7972, 62, 43323, 62, 5219, 62, 312, 3712, 5317, 63, 25, 6376, 284, 3376, 1181, 284, 779, 422, 2344, 8271, 2810, 13, 198, 220, 220, 220, 2896, 13185, 284, 352, 198, 12, 4600, 2902, 7972, 62, 83, 5945, 500, 62, 312, 3712, 5317, 63, 25, 6376, 286, 2344, 36489, 286, 1393, 357, 361, 597, 737, 1002, 407, 257, 966, 329, 198, 220, 220, 220, 26019, 4050, 2344, 2866, 286, 257, 36489, 11, 788, 2148, 657, 357, 12286, 8, 198, 37811, 198, 8818, 966, 62, 626, 11683, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 266, 83, 626, 420, 871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 31092, 11, 2746, 62, 2617, 3712, 23839, 17633, 7248, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 28, 15, 8, 628, 220, 220, 220, 266, 4335, 891, 3628, 19849, 796, 2746, 62, 2617, 13, 48530, 62, 4299, 3628, 62, 19849, 198, 220, 220, 220, 266, 4335, 891, 1564, 19849, 796, 2746, 62, 2617, 13, 48530, 62, 4299, 1564, 62, 19849, 198, 220, 220, 220, 7765, 24011, 1883, 19849, 796, 2746, 62, 2617, 13, 48530, 62, 24011, 1883, 62, 19849, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 7925, 5202, 1321, 198, 220, 220, 220, 2344, 62, 12287, 796, 2344, 62, 31092, 13, 7972, 62, 4125, 5379, 58, 7972, 62, 43323, 62, 5219, 62, 312, 60, 198, 220, 220, 220, 4941, 62, 17015, 796, 2344, 62, 31092, 13, 1326, 5015, 434, 62, 258, 2337, 58, 7972, 62, 43323, 62, 5219, 62, 312, 60, 628, 220, 220, 220, 1303, 900, 2323, 6001, 220, 198, 220, 220, 220, 2323, 62, 17015, 796, 2344, 62, 31092, 13, 7972, 62, 7091, 283, 62, 19849, 13, 2833, 62, 17015, 220, 220, 220, 1303, 16926, 46, 25, 1249, 1353, 1435, 284, 307, 1813, 628, 220, 220, 220, 1303, 1064, 1502, 329, 2344, 673, 283, 290, 11807, 16765, 198, 220, 220, 220, 673, 283, 62, 2875, 796, 2344, 62, 31092, 13, 7972, 62, 7091, 283, 62, 19849, 13, 7091, 283, 62, 2875, 628, 220, 220, 220, 1303, 4532, 2344, 2866, 329, 2344, 673, 283, 198, 220, 220, 220, 611, 673, 283, 62, 2875, 6624, 366, 22366, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 12287, 62, 32538, 796, 2344, 62, 12287, 198, 220, 220, 220, 2073, 361, 673, 283, 62, 2875, 6624, 366, 11085, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 12287, 62, 32538, 796, 4532, 62, 1640, 62, 7972, 62, 7091, 283, 7, 17946, 89, 11, 2344, 62, 12287, 11, 4941, 62, 17015, 11, 2323, 62, 17015, 11, 2344, 62, 31092, 13, 7972, 62, 7091, 283, 62, 19849, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 12287, 62, 32538, 796, 2344, 62, 12287, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 651, 1271, 286, 35658, 198, 220, 220, 220, 299, 83, 5945, 1127, 796, 4129, 7, 83, 5945, 500, 62, 87, 8, 628, 220, 220, 220, 1303, 41216, 11807, 30114, 341, 3381, 284, 6632, 198, 220, 220, 220, 11807, 62, 16345, 796, 657, 13, 15, 628, 220, 220, 220, 1303, 9052, 832, 477, 35658, 198, 220, 220, 220, 329, 334, 28, 16, 25, 429, 5945, 1127, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 6376, 286, 28717, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 510, 7972, 62, 83, 5945, 62, 312, 796, 2558, 7, 82, 9741, 62, 83, 5945, 500, 62, 9630, 58, 84, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 836, 470, 1249, 36489, 284, 2928, 2346, 198, 220, 220, 220, 220, 220, 220, 220, 611, 510, 7972, 62, 83, 5945, 62, 312, 6624, 866, 7972, 62, 83, 5945, 500, 62, 312, 26, 2555, 26, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 33218, 5253, 1022, 28717, 36489, 290, 966, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 1179, 87, 532, 36489, 62, 87, 58, 929, 7972, 62, 83, 5945, 62, 312, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 36489, 3585, 7064, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2124, 1875, 352, 36, 12, 21, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14267, 428, 9052, 611, 340, 561, 2291, 257, 36489, 338, 2928, 319, 2346, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 510, 7972, 62, 83, 5945, 62, 312, 855, 2902, 7972, 62, 83, 5945, 500, 62, 312, 26, 2555, 26, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15284, 7765, 825, 1564, 286, 262, 1459, 7765, 379, 262, 966, 286, 1393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16021, 62, 4299, 1564, 796, 7765, 62, 4299, 1564, 62, 19849, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 36489, 62, 87, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 510, 7972, 62, 83, 5945, 62, 312, 11, 44883, 62, 67, 13173, 11, 36489, 62, 12001, 62, 20259, 11, 266, 4335, 891, 1564, 19849, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11723, 62, 4299, 1564, 796, 657, 13, 15, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15432, 3580, 287, 262, 7765, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 83, 615, 796, 7765, 62, 4299, 3628, 62, 19849, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 16021, 62, 4299, 1564, 11, 11723, 62, 4299, 1564, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 510, 7972, 62, 83, 5945, 62, 312, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 11, 12575, 62, 17015, 11, 44883, 62, 67, 13173, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 12001, 62, 20259, 11, 36489, 62, 310, 11, 36489, 62, 88, 707, 11, 266, 4335, 891, 3628, 19849, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12082, 22729, 1864, 284, 6163, 7765, 6087, 2446, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11807, 62, 16345, 796, 7765, 62, 24011, 1883, 62, 19849, 7, 67, 2120, 615, 11, 2344, 62, 12287, 62, 32538, 11, 266, 83, 626, 420, 871, 58, 929, 7972, 62, 83, 5945, 62, 312, 4357, 11807, 62, 16345, 11, 7765, 24011, 1883, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7, 4299, 3628, 62, 16345, 11, 366, 33172, 866, 7972, 62, 83, 5945, 500, 62, 312, 11, 366, 33172, 510, 7972, 62, 83, 5945, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1064, 15432, 379, 966, 1231, 673, 283, 198, 220, 220, 220, 966, 62, 626, 11683, 796, 2344, 62, 12287, 62, 32538, 532, 11807, 62, 16345, 628, 220, 220, 220, 611, 673, 283, 62, 2875, 6624, 366, 22366, 1, 198, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 11683, 62, 448, 796, 966, 62, 626, 11683, 198, 220, 220, 220, 2073, 361, 673, 283, 62, 2875, 6624, 366, 11085, 1, 198, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 11683, 62, 448, 796, 966, 62, 626, 11683, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 11683, 62, 448, 796, 4532, 62, 1640, 62, 7972, 62, 7091, 283, 7, 17946, 89, 11, 966, 62, 626, 11683, 11, 4941, 62, 17015, 11, 2323, 62, 17015, 11, 2344, 62, 31092, 13, 7972, 62, 7091, 283, 62, 19849, 8, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 966, 62, 626, 11683, 62, 448, 198, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 966, 62, 626, 11683, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 198, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 11, 269, 83, 62, 19849, 11, 44883, 62, 39873, 62, 13033, 62, 88, 11, 44883, 62, 39873, 62, 13033, 62, 89, 11, 2344, 62, 31092, 11, 198, 220, 220, 220, 2746, 62, 2617, 3712, 23839, 17633, 7248, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 198, 198, 9771, 3129, 689, 262, 2344, 2866, 379, 257, 1813, 966, 329, 257, 1813, 1181, 198, 198, 2, 20559, 2886, 198, 12, 4600, 83, 5945, 500, 62, 87, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 7627, 12, 7038, 7064, 287, 262, 1181, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 88, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 5093, 12, 35782, 7064, 287, 262, 1181, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 89, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 2779, 6001, 287, 262, 1181, 4941, 5739, 198, 12, 4600, 10599, 273, 62, 67, 13173, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 44883, 48428, 7307, 198, 12, 4600, 40140, 62, 17015, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 12575, 23245, 198, 12, 4600, 83, 5945, 500, 62, 88, 707, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 331, 707, 329, 262, 1813, 2344, 4571, 287, 220, 198, 220, 220, 220, 2511, 1547, 198, 12, 4600, 82, 9741, 62, 83, 5945, 500, 62, 9630, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 23243, 1502, 28717, 284, 33218, 220, 198, 220, 220, 220, 329, 1813, 1181, 198, 12, 4600, 310, 62, 19849, 3712, 23839, 817, 11469, 34, 2577, 5632, 17633, 63, 25, 15738, 703, 262, 14613, 35381, 2458, 220, 198, 220, 220, 220, 351, 1181, 3503, 198, 12, 44883, 62, 39873, 62, 13033, 62, 88, 3712, 19182, 90, 10234, 11, 45, 92, 63, 25, 16021, 2344, 4067, 286, 2173, 284, 6291, 1973, 220, 198, 220, 220, 220, 262, 44883, 17676, 1989, 618, 26019, 262, 4050, 2344, 2866, 329, 262, 2344, 36489, 13, 220, 198, 220, 220, 220, 11045, 389, 19254, 379, 262, 12575, 357, 15, 11, 15, 8, 290, 27464, 416, 262, 16874, 357, 16, 28, 22504, 286, 20784, 8, 220, 198, 12, 44883, 62, 39873, 62, 13033, 62, 89, 3712, 19182, 90, 10234, 11, 45, 92, 63, 25, 11723, 2344, 4067, 286, 2173, 284, 6291, 1973, 262, 220, 198, 220, 220, 220, 44883, 17676, 1989, 618, 26019, 262, 4050, 2344, 2866, 329, 262, 2344, 36489, 13, 11045, 198, 220, 220, 220, 389, 19254, 379, 262, 12575, 357, 15, 11, 15, 8, 290, 27464, 416, 262, 16874, 357, 16, 28, 22504, 286, 20784, 8, 198, 12, 4600, 7972, 62, 31092, 3712, 15642, 1186, 1143, 8731, 26198, 63, 25, 2344, 8271, 1221, 260, 1159, 357, 12942, 507, 11, 12055, 11, 220, 198, 220, 220, 220, 19998, 11, 3503, 8, 198, 12, 4600, 19849, 62, 2617, 3712, 23839, 17633, 7248, 63, 25, 15738, 7765, 12, 5305, 515, 4981, 284, 307, 973, 287, 3781, 198, 12, 4600, 7972, 62, 43323, 62, 5219, 62, 312, 3712, 5317, 63, 25, 6376, 284, 3376, 1181, 284, 779, 422, 2344, 8271, 2810, 13, 198, 220, 220, 220, 2896, 13185, 284, 352, 198, 37811, 198, 8818, 36489, 62, 626, 420, 871, 62, 505, 62, 37295, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 11, 269, 83, 62, 19849, 11, 44883, 62, 39873, 62, 13033, 62, 88, 11, 44883, 62, 39873, 62, 13033, 62, 89, 11, 2344, 62, 31092, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 2617, 3712, 23839, 17633, 7248, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 11, 15432, 62, 8807, 28, 7942, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 651, 1271, 286, 35658, 290, 44883, 6291, 966, 198, 220, 220, 220, 299, 62, 83, 5945, 1127, 796, 4129, 7, 83, 5945, 500, 62, 87, 8, 198, 220, 220, 220, 299, 62, 10599, 273, 62, 39873, 62, 13033, 796, 4129, 7, 10599, 273, 62, 39873, 62, 13033, 62, 88, 8, 628, 220, 220, 220, 1303, 41216, 3376, 7177, 3858, 198, 220, 220, 220, 5240, 62, 4906, 796, 7719, 62, 4906, 7, 4906, 1659, 7, 83, 5945, 500, 62, 87, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 88, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 89, 58, 16, 46570, 4906, 1659, 7, 10599, 273, 62, 67, 13173, 58, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 1659, 7, 40140, 62, 17015, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 88, 707, 58, 16, 60, 4008, 628, 220, 220, 220, 1303, 41216, 26515, 198, 220, 220, 220, 36489, 62, 626, 420, 871, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 310, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 1872, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 12001, 62, 20259, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 628, 220, 220, 220, 1303, 9052, 625, 477, 35658, 198, 220, 220, 220, 329, 288, 28, 16, 25, 77, 62, 83, 5945, 1127, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 6376, 286, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 866, 7972, 62, 83, 5945, 500, 62, 312, 796, 2558, 7, 82, 9741, 62, 83, 5945, 500, 62, 9630, 58, 67, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 41216, 33218, 2344, 36489, 15432, 284, 6632, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 9688, 7177, 25, 33172, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2344, 62, 83, 5945, 500, 62, 626, 11683, 796, 2099, 1659, 7, 83, 5945, 500, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 5769, 15, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 657, 13, 15, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 9052, 625, 477, 44883, 6291, 2173, 284, 27665, 262, 4050, 1167, 9319, 15432, 198, 220, 220, 220, 220, 220, 220, 220, 329, 279, 28, 16, 25, 77, 62, 10599, 273, 62, 39873, 62, 13033, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5046, 44883, 6291, 966, 20435, 416, 44883, 14753, 357, 259, 44883, 12575, 1006, 13, 5739, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 796, 44883, 62, 39873, 62, 13033, 62, 88, 58, 79, 60, 9, 15, 13, 20, 9, 10599, 273, 62, 67, 13173, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 89, 796, 44883, 62, 39873, 62, 13033, 62, 89, 58, 79, 60, 9, 15, 13, 20, 9, 10599, 273, 62, 67, 13173, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1234, 44883, 6291, 2173, 287, 2344, 4571, 20435, 1080, 11, 290, 1848, 329, 331, 707, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 87, 796, 36489, 62, 87, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 9, 31369, 7, 83, 5945, 500, 62, 88, 707, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 88, 796, 36489, 62, 88, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 9, 6966, 7, 83, 5945, 500, 62, 88, 707, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 89, 796, 36489, 62, 89, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 12575, 62, 17015, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 1343, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 89, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15284, 262, 15432, 379, 1813, 966, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 11683, 62, 4480, 62, 7091, 283, 796, 966, 62, 626, 11683, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 36489, 62, 626, 420, 871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 31092, 11, 2746, 62, 2617, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 43323, 62, 5219, 62, 312, 28, 7972, 62, 43323, 62, 5219, 62, 312, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 28, 2902, 7972, 62, 83, 5945, 500, 62, 312, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 751, 6291, 966, 15432, 284, 36489, 15432, 284, 307, 16449, 1568, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 15853, 966, 62, 626, 11683, 62, 4480, 62, 7091, 283, 628, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2457, 15432, 17952, 329, 33218, 36489, 357, 23913, 8603, 1973, 477, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 1220, 28, 299, 62, 10599, 273, 62, 39873, 62, 13033, 628, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 2769, 30073, 7, 7972, 62, 83, 5945, 500, 62, 626, 11683, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 14613, 35381, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 310, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 15284, 62, 310, 7, 83, 5945, 500, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 4357, 269, 83, 62, 19849, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 7877, 498, 28471, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 1872, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 4808, 310, 62, 1462, 62, 897, 498, 62, 521, 62, 20786, 7, 83, 5945, 500, 62, 310, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 1957, 47741, 12245, 329, 428, 2344, 1181, 198, 220, 220, 220, 220, 220, 220, 220, 25237, 62, 20259, 796, 2344, 62, 31092, 13, 4131, 1153, 62, 48010, 58, 7972, 62, 43323, 62, 5219, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 1957, 47741, 12245, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 12001, 62, 20259, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 15284, 62, 12001, 62, 20259, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 25237, 62, 20259, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 626, 420, 871, 11, 36489, 62, 310, 11, 2746, 62, 2617, 13, 12001, 62, 20259, 62, 19849, 26, 36489, 62, 312, 28, 2902, 7972, 62, 83, 5945, 500, 62, 312, 11, 284, 75, 28, 16, 36, 12, 21, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 12001, 46668, 14830, 860, 25, 33172, 36489, 62, 12001, 62, 20259, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 47764, 796, 6060, 19778, 7, 2389, 28, 16, 25, 77, 62, 83, 5945, 1127, 11, 569, 28, 83, 5945, 500, 62, 626, 420, 871, 11, 31598, 28, 83, 5945, 500, 62, 12001, 62, 20259, 11, 16356, 28, 83, 5945, 500, 62, 310, 8, 198, 220, 220, 220, 1303, 44189, 13, 13564, 7203, 23124, 1940, 1045, 13, 14116, 1600, 47764, 8, 628, 220, 220, 220, 611, 15432, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36489, 62, 626, 420, 871, 220, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36489, 62, 626, 420, 871, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 36489, 62, 12001, 62, 20259, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 36489, 62, 626, 420, 871, 62, 505, 62, 37295, 7, 87, 11, 36489, 62, 89, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 198, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 11, 269, 83, 62, 19849, 11, 44883, 62, 39873, 62, 13033, 62, 88, 11, 44883, 62, 39873, 62, 13033, 62, 89, 11, 2344, 62, 31092, 11, 198, 220, 220, 220, 2746, 62, 2617, 3712, 23839, 17633, 7248, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 11, 15432, 62, 8807, 28, 7942, 8, 628, 220, 220, 220, 299, 62, 83, 5945, 1127, 796, 2558, 7, 13664, 7, 87, 20679, 17, 8, 198, 220, 220, 220, 1303, 44872, 7, 4906, 1659, 7, 87, 828, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 87, 796, 2124, 58, 16, 25, 77, 62, 83, 5945, 1127, 60, 220, 198, 220, 220, 220, 36489, 62, 88, 796, 2124, 58, 77, 62, 83, 5945, 1127, 10, 16, 25, 437, 60, 198, 220, 220, 220, 1303, 44872, 7, 83, 5945, 500, 62, 87, 8, 198, 220, 220, 220, 1303, 44872, 7203, 83, 5945, 500, 62, 87, 2099, 33172, 2099, 1659, 7, 83, 5945, 500, 62, 87, 4008, 198, 220, 220, 220, 1303, 44872, 7203, 4906, 286, 2124, 33172, 2099, 1659, 7, 87, 4008, 628, 220, 220, 220, 1303, 651, 1271, 286, 35658, 290, 44883, 6291, 966, 198, 220, 220, 220, 1303, 299, 62, 83, 5945, 1127, 796, 4129, 7, 83, 5945, 500, 62, 87, 8, 198, 220, 220, 220, 299, 62, 10599, 273, 62, 39873, 62, 13033, 796, 4129, 7, 10599, 273, 62, 39873, 62, 13033, 62, 88, 8, 628, 220, 220, 220, 5240, 62, 4906, 796, 7719, 62, 4906, 7, 4906, 1659, 7, 83, 5945, 500, 62, 87, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 88, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 89, 58, 16, 46570, 4906, 1659, 7, 10599, 273, 62, 67, 13173, 58, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 1659, 7, 40140, 62, 17015, 58, 16, 46570, 4906, 1659, 7, 83, 5945, 500, 62, 88, 707, 58, 16, 60, 4008, 198, 220, 220, 220, 36489, 62, 626, 420, 871, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 310, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 1872, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 198, 220, 220, 220, 36489, 62, 12001, 62, 20259, 796, 1976, 27498, 7, 3258, 62, 4906, 11, 299, 62, 83, 5945, 1127, 8, 628, 220, 220, 220, 329, 288, 28, 16, 25, 77, 62, 83, 5945, 1127, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 6376, 286, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 866, 7972, 62, 83, 5945, 500, 62, 312, 796, 2558, 7, 82, 9741, 62, 83, 5945, 500, 62, 9630, 58, 67, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 41216, 33218, 2344, 36489, 15432, 284, 6632, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 9688, 7177, 25, 33172, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2344, 62, 83, 5945, 500, 62, 626, 11683, 796, 2099, 1659, 7, 83, 5945, 500, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 5769, 15, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 657, 13, 15, 628, 220, 220, 220, 220, 220, 220, 220, 329, 279, 28, 16, 25, 77, 62, 10599, 273, 62, 39873, 62, 13033, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5046, 44883, 6291, 966, 20435, 416, 44883, 14753, 357, 259, 44883, 12575, 1006, 13, 5739, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 796, 44883, 62, 39873, 62, 13033, 62, 88, 58, 79, 60, 9, 15, 13, 20, 9, 10599, 273, 62, 67, 13173, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 89, 796, 44883, 62, 39873, 62, 13033, 62, 89, 58, 79, 60, 9, 15, 13, 20, 9, 10599, 273, 62, 67, 13173, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 87, 796, 36489, 62, 87, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 9, 31369, 7, 83, 5945, 500, 62, 88, 707, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 88, 796, 36489, 62, 88, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 88, 9, 6966, 7, 83, 5945, 500, 62, 88, 707, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 89, 796, 36489, 62, 89, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 764, 10, 12575, 62, 17015, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 1343, 1957, 62, 10599, 273, 62, 39873, 62, 4122, 62, 89, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15284, 262, 15432, 379, 1813, 966, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 11683, 62, 4480, 62, 7091, 283, 796, 966, 62, 626, 11683, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 36489, 62, 626, 420, 871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 31092, 11, 2746, 62, 2617, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 43323, 62, 5219, 62, 312, 28, 7972, 62, 43323, 62, 5219, 62, 312, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 28, 2902, 7972, 62, 83, 5945, 500, 62, 312, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 751, 6291, 966, 15432, 284, 36489, 15432, 284, 307, 16449, 1568, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 15853, 966, 62, 626, 11683, 62, 4480, 62, 7091, 283, 628, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2457, 15432, 17952, 329, 33218, 36489, 357, 23913, 8603, 1973, 477, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 83, 5945, 500, 62, 626, 11683, 1220, 28, 299, 62, 10599, 273, 62, 39873, 62, 13033, 628, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 2769, 30073, 7, 7972, 62, 83, 5945, 500, 62, 626, 11683, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 14613, 35381, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 310, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 15284, 62, 310, 7, 83, 5945, 500, 62, 626, 420, 871, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 4357, 269, 83, 62, 19849, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 7877, 498, 28471, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 1872, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 4808, 310, 62, 1462, 62, 897, 498, 62, 521, 62, 20786, 7, 83, 5945, 500, 62, 310, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4296, 1957, 47741, 12245, 329, 33218, 36489, 198, 220, 220, 220, 220, 220, 220, 220, 25237, 62, 20259, 796, 2344, 62, 31092, 13, 4131, 1153, 62, 48010, 58, 7972, 62, 43323, 62, 5219, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 12001, 62, 20259, 58, 2902, 7972, 62, 83, 5945, 500, 62, 312, 60, 796, 15284, 62, 12001, 62, 20259, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 25237, 62, 20259, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36489, 62, 626, 420, 871, 11, 36489, 62, 310, 11, 2746, 62, 2617, 13, 12001, 62, 20259, 62, 19849, 26, 36489, 62, 312, 28, 2902, 7972, 62, 83, 5945, 500, 62, 312, 11, 284, 75, 28, 16, 36, 12, 21, 8, 628, 220, 220, 220, 886, 628, 220, 220, 220, 611, 15432, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36489, 62, 626, 420, 871, 220, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36489, 62, 626, 420, 871, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 36489, 62, 12001, 62, 20259, 198, 220, 220, 220, 886, 198, 198, 437, 198, 198, 2, 36489, 62, 626, 420, 871, 62, 505, 62, 37295, 0, 7, 19849, 62, 2617, 3712, 23839, 17633, 7248, 11, 1917, 62, 11213, 3712, 23839, 8731, 48412, 40781, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 796, 36489, 62, 626, 420, 871, 62, 505, 62, 37295, 0, 26933, 15, 13, 15, 4357, 685, 15, 13, 15, 4357, 198, 2, 2746, 62, 2617, 3712, 23839, 17633, 7248, 11, 1917, 62, 11213, 3712, 23839, 8731, 48412, 40781, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 198, 198, 37811, 198, 9948, 3129, 378, 62, 11125, 62, 3245, 7, 87, 9521, 11, 331, 9521, 11, 1976, 9521, 11, 2746, 62, 2617, 3712, 23839, 17633, 7248, 11, 36489, 62, 87, 11, 220, 198, 220, 220, 220, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 220, 198, 220, 220, 220, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 266, 83, 626, 420, 871, 11, 2344, 62, 31092, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 198, 198, 8645, 689, 257, 5202, 2214, 329, 257, 1813, 1181, 290, 3272, 2665, 198, 198, 2, 20559, 2886, 198, 12, 4600, 87, 9521, 3712, 17257, 63, 25, 2837, 16215, 7627, 12, 7038, 7064, 284, 6291, 287, 3298, 4941, 5739, 198, 12, 4600, 2417, 858, 3712, 17257, 63, 25, 2837, 16215, 5093, 12, 7038, 7064, 284, 6291, 287, 3298, 4941, 5739, 198, 12, 4600, 89, 9521, 3712, 17257, 63, 25, 2837, 16215, 11723, 7064, 284, 6291, 287, 3298, 4941, 5739, 198, 12, 4600, 19849, 62, 2617, 3712, 23839, 17633, 7248, 63, 25, 15738, 7765, 12, 5305, 515, 4981, 284, 307, 973, 287, 3781, 198, 12, 4600, 83, 5945, 500, 62, 87, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 7627, 12, 7038, 7064, 287, 262, 3298, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 88, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 5093, 12, 35782, 7064, 287, 262, 3298, 220, 198, 220, 220, 220, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 89, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 2779, 6001, 287, 262, 3298, 4941, 5739, 198, 12, 4600, 83, 5945, 500, 62, 88, 707, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 331, 707, 329, 262, 1813, 2344, 4571, 287, 220, 198, 220, 220, 220, 2511, 1547, 198, 12, 4600, 83, 5945, 500, 62, 310, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 14613, 35381, 286, 1123, 36489, 329, 262, 1813, 1181, 198, 12, 4600, 83, 5945, 500, 62, 1872, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 7877, 498, 28471, 329, 262, 1813, 1181, 198, 12, 4600, 10599, 273, 62, 67, 13173, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 44883, 48428, 7307, 198, 12, 4600, 40140, 62, 17015, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 12575, 23245, 198, 12, 4600, 83, 5945, 500, 62, 12001, 62, 20259, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 1957, 47741, 12245, 329, 220, 198, 220, 220, 220, 262, 1813, 1181, 198, 12, 4600, 82, 9741, 62, 83, 5945, 500, 62, 9630, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 36489, 5093, 12, 35782, 7064, 287, 262, 220, 198, 220, 220, 220, 3298, 4941, 5739, 198, 12, 4600, 46569, 626, 420, 871, 3712, 19182, 90, 10234, 11, 77, 51, 5945, 1127, 92, 63, 25, 4050, 1167, 9319, 2344, 2866, 329, 1813, 1181, 198, 12, 4600, 7972, 62, 31092, 3712, 15642, 1186, 1143, 8731, 26198, 63, 25, 2344, 8271, 1221, 260, 1159, 357, 12942, 507, 11, 12055, 11, 220, 198, 220, 220, 220, 19998, 11, 3503, 8, 198, 12, 4600, 7972, 62, 43323, 62, 5219, 62, 312, 3712, 5317, 63, 25, 6376, 284, 3376, 1181, 284, 779, 422, 2344, 8271, 2810, 13, 198, 220, 220, 220, 2896, 13185, 284, 352, 198, 37811, 198, 8818, 15284, 62, 11125, 62, 3245, 7, 87, 9521, 11, 331, 9521, 11, 1976, 9521, 11, 198, 220, 220, 220, 2746, 62, 2617, 3712, 23839, 17633, 7248, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 266, 83, 626, 420, 871, 11, 198, 220, 220, 220, 2344, 62, 31092, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 628, 220, 220, 220, 2124, 11925, 796, 4129, 7, 87, 9521, 8, 198, 220, 220, 220, 331, 11925, 796, 4129, 7, 2417, 858, 8, 198, 220, 220, 220, 1976, 11925, 796, 4129, 7, 89, 9521, 8, 198, 220, 220, 220, 299, 13033, 796, 2124, 11925, 9, 2645, 268, 9, 89, 11925, 198, 220, 220, 220, 966, 62, 626, 420, 871, 796, 1976, 27498, 7, 77, 13033, 8, 198, 220, 220, 220, 966, 62, 626, 420, 871, 796, 27179, 1758, 7, 4122, 62, 626, 420, 871, 11, 357, 89, 11925, 11, 331, 11925, 11, 2124, 11925, 4008, 628, 220, 220, 220, 1303, 23064, 284, 4571, 5739, 329, 15432, 16765, 198, 220, 220, 220, 5724, 62, 17602, 11, 5724, 62, 774, 796, 23064, 62, 1462, 62, 7972, 62, 37295, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 2344, 62, 31092, 13, 7972, 62, 12942, 507, 58, 7972, 62, 43323, 62, 5219, 62, 312, 12962, 628, 220, 220, 220, 1303, 3297, 262, 35658, 198, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 796, 3297, 16321, 7, 10599, 62, 17602, 8, 628, 220, 220, 220, 329, 1976, 72, 287, 352, 25, 89, 11925, 198, 220, 220, 220, 220, 220, 220, 220, 329, 331, 72, 287, 352, 25, 2645, 268, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 72, 287, 352, 25, 87, 11925, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 87, 796, 2124, 9521, 58, 29992, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 88, 796, 331, 9521, 58, 48111, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 89, 796, 1976, 9521, 58, 17027, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1179, 87, 11, 1179, 88, 796, 23064, 62, 1462, 62, 7972, 62, 37295, 7, 17946, 87, 11, 1179, 88, 11, 2344, 62, 31092, 13, 7972, 62, 12942, 507, 58, 7972, 62, 43323, 62, 5219, 62, 312, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 966, 62, 626, 420, 871, 58, 17027, 11, 331, 72, 11, 2124, 72, 60, 796, 966, 62, 626, 11683, 7, 17946, 87, 11, 1179, 88, 11, 1179, 89, 11, 5724, 62, 17602, 11, 5724, 62, 774, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 266, 83, 626, 420, 871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 31092, 11, 2746, 62, 2617, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 43323, 62, 5219, 62, 312, 28, 7972, 62, 43323, 62, 5219, 62, 312, 11, 866, 7972, 62, 83, 5945, 500, 62, 312, 28, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 220, 628, 220, 220, 220, 1303, 611, 1976, 11925, 6624, 352, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1441, 966, 62, 626, 420, 871, 58, 16, 11, 16, 25, 2645, 268, 11, 16, 25, 87, 11925, 60, 198, 220, 220, 220, 1303, 2073, 361, 331, 11925, 6624, 352, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1441, 966, 62, 626, 420, 871, 58, 16, 25, 89, 11925, 11, 16, 11, 16, 25, 87, 11925, 60, 198, 220, 220, 220, 1303, 2073, 361, 2124, 11925, 6624, 352, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1441, 966, 62, 626, 420, 871, 58, 16, 25, 89, 11925, 11, 16, 25, 2645, 268, 11, 16, 60, 198, 220, 220, 220, 1303, 2073, 198, 220, 220, 220, 1441, 966, 62, 626, 420, 871, 58, 16, 25, 89, 11925, 11, 16, 25, 2645, 268, 11, 16, 25, 87, 11925, 60, 198, 220, 220, 220, 1303, 886, 198, 198, 437, 198, 198, 8818, 15284, 62, 11125, 62, 3245, 7, 87, 9521, 11, 331, 9521, 11, 1976, 9521, 11, 198, 220, 220, 220, 2746, 62, 2617, 3712, 23839, 17633, 7248, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 198, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 269, 83, 62, 27530, 11, 44883, 62, 39873, 62, 13033, 62, 88, 11, 44883, 62, 39873, 62, 13033, 62, 89, 11, 198, 220, 220, 220, 2344, 62, 31092, 26, 2344, 62, 43323, 62, 5219, 62, 312, 28, 16, 8, 628, 220, 220, 220, 1303, 23064, 284, 4571, 5739, 329, 15432, 16765, 198, 220, 220, 220, 5724, 62, 17602, 11, 5724, 62, 774, 796, 23064, 62, 1462, 62, 7972, 62, 37295, 7, 83, 5945, 500, 62, 87, 11, 36489, 62, 88, 11, 2344, 62, 31092, 13, 7972, 62, 12942, 507, 58, 7972, 62, 43323, 62, 5219, 62, 312, 12962, 628, 220, 220, 220, 1303, 3297, 262, 35658, 198, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 796, 3297, 16321, 7, 10599, 62, 17602, 8, 628, 220, 220, 220, 36489, 62, 626, 420, 871, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 36489, 62, 12001, 62, 20259, 796, 36489, 62, 626, 420, 871, 62, 505, 62, 37295, 7, 10599, 62, 17602, 11, 5724, 62, 774, 11, 36489, 62, 89, 11, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 88, 707, 11, 198, 220, 220, 220, 23243, 62, 83, 5945, 500, 62, 9630, 11, 269, 83, 62, 27530, 11, 44883, 62, 39873, 62, 13033, 62, 88, 11, 44883, 62, 39873, 62, 13033, 62, 89, 11, 2344, 62, 31092, 11, 198, 220, 220, 220, 2746, 62, 2617, 11, 2344, 62, 43323, 62, 5219, 62, 312, 28, 7972, 62, 43323, 62, 5219, 62, 312, 11, 15432, 62, 8807, 28, 9562, 8, 628, 220, 220, 220, 1441, 15284, 62, 11125, 62, 3245, 7, 87, 9521, 11, 331, 9521, 11, 1976, 9521, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 2617, 11, 36489, 62, 87, 11, 36489, 62, 88, 11, 36489, 62, 89, 11, 36489, 62, 88, 707, 11, 36489, 62, 310, 11, 36489, 62, 1872, 11, 198, 220, 220, 220, 220, 220, 220, 220, 44883, 62, 67, 13173, 11, 12575, 62, 17015, 11, 36489, 62, 12001, 62, 20259, 11, 23243, 62, 83, 5945, 500, 62, 9630, 11, 36489, 62, 626, 420, 871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2344, 62, 31092, 11, 2344, 62, 43323, 62, 5219, 62, 312, 28, 7972, 62, 43323, 62, 5219, 62, 312, 8, 198, 198, 437 ]
2.520294
8,574
""" SeisSort(in, out;<keyword arguments>) Sort a seis file using its header words # Arguments * `in`: input filename >> a text file with information about data extent, data and header file names; a binary file containing data and a binary file containing headers. * `out`: output filename # Keyword arguments * `key=["imx","imy"]` * `rev=false` : sort headers in decreasing order * `ntrace=1000` : number of traces to read at a time # Output file `out` is created with data sorted. *Credits: AS, 2015* """ function SeisSort(in, out;key=["imx","imy"],rev=false,ntrace=100000) filename_h = ParseHeaderName(in) stream_h = open(filename_h) seek(stream_h, header_count["n1"]) nt = read(stream_h,Int32) nx = convert(Int64,filesize(stream_h)/(4*length(fieldnames(Header)))) h = Header[] # find min and max for each key h1 = GrabHeader(stream_h,1) minval = Array(Float32,length(key)) for ikey=1:length(key) minval[ikey] = getfield(h1,Symbol(key[ikey])) end for j=2:nx h1 = GrabHeader(stream_h,j) for ikey=1:length(key) key_val = abs(getfield(h1,Symbol(key[ikey]))) if (key_val < minval[ikey]) minval[ikey] = key_val end end end mykey = vec(zeros(Float64,nx)) seekstart(stream_h) for j=1:nx h1 = GrabHeader(stream_h,j) for ikey=1:length(key) mykey[j] += ((getfield(h1,Symbol(key[ikey])) + minval[ikey] + 1)* (10^(6*(length(key)-ikey)))) end end close(stream_h) p = convert(Array{Int32,1},sortperm(mykey,rev=rev)) DATAPATH = get(ENV,"DATAPATH",join([pwd(),"/"])) filename_d_out = join([DATAPATH out "@data@"]) filename_h_out = join([DATAPATH out "@headers@"]) nhead = length(fieldnames(Header)) stream_h = open(filename_h_out) nx = Int(floor(filesize(stream_h)/(nhead*4))) close(stream_h) extent = ReadTextHeader(in) extent.n2 = nx extent.n3 = 1 extent.n4 = 1 extent.n5 = 1 WriteTextHeader(out,extent,"native_float",4,filename_d_out,filename_h_out) FetchHeaders(filename_h,out,p,nx) Seismic.FetchTraces(in,out) tmp = join(["tmp_SeisSort_",string(Int(floor(rand()*100000)))]) cp(out,tmp,remove_destination=true); @compat SeisProcessHeaders(out, tmp, [UpdateHeader], [Dict(:itmin=>1,:itmax=>nt)]) filename_h_tmp = join([DATAPATH tmp "@headers@"]) filename_h_out = join([DATAPATH out "@headers@"]) cp(filename_h_tmp,filename_h_out,remove_destination=true); rm(filename_h_tmp); rm(tmp); end function FetchHeaders(filename_h_in::AbstractString, filename_out::AbstractString, p::Array{Int32,1}, nx) stream_h = open(filename_h_in) h = Header[] for j = 1:nx append!(h,[GrabHeader(stream_h,p[j])]) end SeisWriteHeaders(filename_out,h,update_tracenum=false) end
[ 37811, 198, 220, 220, 220, 1001, 271, 42758, 7, 259, 11, 503, 26, 27, 2539, 4775, 7159, 43734, 198, 198, 42758, 257, 384, 271, 2393, 1262, 663, 13639, 2456, 198, 198, 2, 20559, 2886, 198, 9, 4600, 259, 63, 25, 5128, 29472, 9609, 257, 2420, 2393, 351, 1321, 546, 1366, 6287, 11, 1366, 290, 13639, 2393, 3891, 26, 257, 13934, 2393, 7268, 1366, 290, 257, 13934, 2393, 7268, 24697, 13, 198, 9, 4600, 448, 63, 25, 5072, 29472, 198, 198, 2, 7383, 4775, 7159, 198, 9, 4600, 2539, 28, 14692, 320, 87, 2430, 320, 88, 8973, 63, 198, 9, 4600, 18218, 28, 9562, 63, 1058, 3297, 24697, 287, 24030, 1502, 198, 9, 4600, 429, 16740, 28, 12825, 63, 1058, 1271, 286, 20675, 284, 1100, 379, 257, 640, 198, 198, 2, 25235, 198, 7753, 4600, 448, 63, 318, 2727, 351, 1366, 23243, 13, 198, 198, 9, 42855, 25, 7054, 11, 1853, 9, 198, 37811, 198, 8818, 1001, 271, 42758, 7, 259, 11, 503, 26, 2539, 28, 14692, 320, 87, 2430, 320, 88, 33116, 18218, 28, 9562, 11, 429, 16740, 28, 3064, 830, 8, 198, 220, 220, 220, 29472, 62, 71, 796, 2547, 325, 39681, 5376, 7, 259, 8, 198, 220, 220, 220, 4269, 62, 71, 796, 1280, 7, 34345, 62, 71, 8, 198, 220, 220, 220, 5380, 7, 5532, 62, 71, 11, 13639, 62, 9127, 14692, 77, 16, 8973, 8, 198, 220, 220, 220, 299, 83, 796, 1100, 7, 5532, 62, 71, 11, 5317, 2624, 8, 198, 220, 220, 220, 299, 87, 796, 10385, 7, 5317, 2414, 11, 16624, 1096, 7, 5532, 62, 71, 20679, 7, 19, 9, 13664, 7, 3245, 14933, 7, 39681, 35514, 198, 220, 220, 220, 289, 796, 48900, 21737, 198, 220, 220, 220, 1303, 1064, 949, 290, 3509, 329, 1123, 1994, 198, 220, 220, 220, 289, 16, 796, 25339, 39681, 7, 5532, 62, 71, 11, 16, 8, 198, 220, 220, 220, 949, 2100, 796, 15690, 7, 43879, 2624, 11, 13664, 7, 2539, 4008, 628, 220, 220, 220, 329, 220, 522, 88, 28, 16, 25, 13664, 7, 2539, 8, 198, 197, 1084, 2100, 58, 522, 88, 60, 796, 651, 3245, 7, 71, 16, 11, 13940, 23650, 7, 2539, 58, 522, 88, 60, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 474, 28, 17, 25, 77, 87, 198, 197, 71, 16, 796, 25339, 39681, 7, 5532, 62, 71, 11, 73, 8, 198, 197, 1640, 220, 522, 88, 28, 16, 25, 13664, 7, 2539, 8, 198, 197, 220, 220, 220, 1994, 62, 2100, 796, 2352, 7, 1136, 3245, 7, 71, 16, 11, 13940, 23650, 7, 2539, 58, 522, 88, 60, 22305, 198, 197, 220, 220, 220, 611, 357, 2539, 62, 2100, 1279, 949, 2100, 58, 522, 88, 12962, 198, 197, 197, 1084, 2100, 58, 522, 88, 60, 796, 1994, 62, 2100, 198, 197, 220, 220, 220, 886, 198, 197, 437, 198, 220, 220, 220, 886, 198, 220, 220, 220, 616, 2539, 796, 43030, 7, 9107, 418, 7, 43879, 2414, 11, 77, 87, 4008, 198, 220, 220, 220, 5380, 9688, 7, 5532, 62, 71, 8, 198, 220, 220, 220, 329, 474, 28, 16, 25, 77, 87, 198, 197, 71, 16, 796, 25339, 39681, 7, 5532, 62, 71, 11, 73, 8, 198, 197, 1640, 220, 522, 88, 28, 16, 25, 13664, 7, 2539, 8, 198, 197, 220, 220, 220, 616, 2539, 58, 73, 60, 15853, 14808, 1136, 3245, 7, 71, 16, 11, 13940, 23650, 7, 2539, 58, 522, 88, 60, 4008, 1343, 949, 2100, 58, 522, 88, 60, 1343, 352, 27493, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 940, 61, 7, 21, 9, 7, 13664, 7, 2539, 13219, 522, 88, 35514, 198, 197, 437, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1969, 7, 5532, 62, 71, 8, 198, 220, 220, 220, 279, 796, 10385, 7, 19182, 90, 5317, 2624, 11, 16, 5512, 30619, 16321, 7, 1820, 2539, 11, 18218, 28, 18218, 4008, 198, 220, 220, 220, 360, 1404, 2969, 12599, 796, 651, 7, 1677, 53, 553, 35, 1404, 2969, 12599, 1600, 22179, 26933, 79, 16993, 3419, 553, 14, 8973, 4008, 198, 220, 220, 220, 29472, 62, 67, 62, 448, 796, 4654, 26933, 35, 1404, 2969, 12599, 503, 44212, 7890, 31, 8973, 8, 198, 220, 220, 220, 29472, 62, 71, 62, 448, 796, 4654, 26933, 35, 1404, 2969, 12599, 503, 44212, 50145, 31, 8973, 8, 198, 220, 220, 220, 299, 2256, 796, 4129, 7, 3245, 14933, 7, 39681, 4008, 198, 220, 220, 220, 4269, 62, 71, 796, 1280, 7, 34345, 62, 71, 62, 448, 8, 198, 220, 220, 220, 299, 87, 796, 2558, 7, 28300, 7, 16624, 1096, 7, 5532, 62, 71, 20679, 7, 77, 2256, 9, 19, 22305, 198, 220, 220, 220, 1969, 7, 5532, 62, 71, 8, 198, 220, 220, 220, 6287, 796, 4149, 8206, 39681, 7, 259, 8, 198, 220, 220, 220, 6287, 13, 77, 17, 796, 299, 87, 198, 220, 220, 220, 6287, 13, 77, 18, 796, 352, 198, 220, 220, 220, 6287, 13, 77, 19, 796, 352, 198, 220, 220, 220, 6287, 13, 77, 20, 796, 352, 198, 220, 220, 220, 19430, 8206, 39681, 7, 448, 11, 2302, 298, 553, 30191, 62, 22468, 1600, 19, 11, 34345, 62, 67, 62, 448, 11, 34345, 62, 71, 62, 448, 8, 198, 220, 220, 220, 376, 7569, 13847, 364, 7, 34345, 62, 71, 11, 448, 11, 79, 11, 77, 87, 8, 198, 220, 220, 220, 1001, 1042, 291, 13, 37, 7569, 2898, 2114, 7, 259, 11, 448, 8, 198, 220, 220, 220, 45218, 796, 4654, 7, 14692, 22065, 62, 4653, 271, 42758, 62, 1600, 8841, 7, 5317, 7, 28300, 7, 25192, 3419, 9, 3064, 830, 22305, 12962, 198, 220, 220, 220, 31396, 7, 448, 11, 22065, 11, 28956, 62, 16520, 1883, 28, 7942, 1776, 198, 220, 220, 220, 2488, 5589, 265, 1001, 271, 18709, 13847, 364, 7, 448, 11, 45218, 11, 685, 10260, 39681, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 35, 713, 7, 25, 270, 1084, 14804, 16, 11, 25, 270, 9806, 14804, 429, 8, 12962, 198, 220, 220, 220, 29472, 62, 71, 62, 22065, 796, 4654, 26933, 35, 1404, 2969, 12599, 45218, 44212, 50145, 31, 8973, 8, 198, 220, 220, 220, 29472, 62, 71, 62, 448, 796, 4654, 26933, 35, 1404, 2969, 12599, 503, 44212, 50145, 31, 8973, 8, 198, 220, 220, 220, 31396, 7, 34345, 62, 71, 62, 22065, 11, 34345, 62, 71, 62, 448, 11, 28956, 62, 16520, 1883, 28, 7942, 1776, 198, 220, 220, 220, 42721, 7, 34345, 62, 71, 62, 22065, 1776, 198, 220, 220, 220, 42721, 7, 22065, 1776, 198, 437, 198, 198, 8818, 376, 7569, 13847, 364, 7, 34345, 62, 71, 62, 259, 3712, 23839, 10100, 11, 29472, 62, 448, 3712, 23839, 10100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 3712, 19182, 90, 5317, 2624, 11, 16, 5512, 299, 87, 8, 198, 220, 220, 220, 4269, 62, 71, 796, 1280, 7, 34345, 62, 71, 62, 259, 8, 198, 220, 220, 220, 289, 796, 48900, 21737, 198, 220, 220, 220, 329, 474, 796, 352, 25, 77, 87, 198, 197, 33295, 0, 7, 71, 17414, 48400, 39681, 7, 5532, 62, 71, 11, 79, 58, 73, 12962, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1001, 271, 16594, 13847, 364, 7, 34345, 62, 448, 11, 71, 11, 19119, 62, 2213, 330, 44709, 28, 9562, 8, 198, 437, 198 ]
2.241542
1,271
using Printf, Distributions, IterTools newv(n::Int, p::Float64) = rand(Bernoulli(p), n) runs(v::Vector{Int}) = sum((a & ~b) for (a, b) in zip(v, IterTools.chain(v[2:end], v[1]))) mrd(n::Int, p::Float64) = runs(newv(n, p)) / n nrep = 500 for p in 0.1:0.2:1 lim = p * (1 - p) println() for ex in 10:2:14 n = 2 ^ ex sim = mean(mrd.(n, p) for _ in 1:nrep) @printf("nrep = %3i\tp = %4.2f\tn = %5i\np · (1 - p) = %5.3f\tsim = %5.3f\tΔ = %3.1f%%\n", nrep, p, n, lim, sim, lim > 0 ? abs(sim - lim) / lim * 100 : sim * 100) end end
[ 3500, 12578, 69, 11, 46567, 507, 11, 40806, 33637, 198, 198, 3605, 85, 7, 77, 3712, 5317, 11, 279, 3712, 43879, 2414, 8, 796, 43720, 7, 23927, 280, 15516, 7, 79, 828, 299, 8, 198, 48381, 7, 85, 3712, 38469, 90, 5317, 30072, 796, 2160, 19510, 64, 1222, 5299, 65, 8, 329, 357, 64, 11, 275, 8, 287, 19974, 7, 85, 11, 40806, 33637, 13, 7983, 7, 85, 58, 17, 25, 437, 4357, 410, 58, 16, 60, 22305, 198, 198, 76, 4372, 7, 77, 3712, 5317, 11, 279, 3712, 43879, 2414, 8, 796, 4539, 7, 3605, 85, 7, 77, 11, 279, 4008, 1220, 299, 198, 198, 77, 7856, 796, 5323, 198, 198, 1640, 279, 287, 657, 13, 16, 25, 15, 13, 17, 25, 16, 198, 220, 220, 220, 1761, 796, 279, 1635, 357, 16, 532, 279, 8, 628, 220, 220, 220, 44872, 3419, 198, 220, 220, 220, 329, 409, 287, 838, 25, 17, 25, 1415, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 362, 10563, 409, 198, 220, 220, 220, 220, 220, 220, 220, 985, 796, 1612, 7, 76, 4372, 12195, 77, 11, 279, 8, 329, 4808, 287, 352, 25, 77, 7856, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 77, 7856, 796, 4064, 18, 72, 59, 34788, 796, 4064, 19, 13, 17, 69, 59, 34106, 796, 4064, 20, 72, 59, 37659, 14128, 357, 16, 532, 279, 8, 796, 4064, 20, 13, 18, 69, 59, 912, 320, 796, 4064, 20, 13, 18, 69, 59, 83, 138, 242, 796, 4064, 18, 13, 16, 69, 16626, 59, 77, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 7856, 11, 279, 11, 299, 11, 1761, 11, 985, 11, 1761, 1875, 657, 5633, 2352, 7, 14323, 532, 1761, 8, 1220, 1761, 1635, 1802, 1058, 985, 1635, 1802, 8, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.842271
317
export discreteApprox!, discreteApprox, discreteNormalApprox, discreteNormalApprox! # ----------------------- objective functions for max entropy calcs -------------------------- function expΔTx!(tmpvec::Vector, ΔT::AbstractMatrix, x::AbstractVector) mul!(tmpvec, ΔT, x) tmpvec .= exp.(tmpvec) end # objective function entropyObjective_f!(tmpvec::Vector, x::Vector, q::Vector, ΔT::AbstractMatrix) expΔTx!(tmpvec, ΔT, x) return dot(q, tmpvec) end # gradient function entropyObjective_g!(grad::Vector, tmpvec::Vector, x::Vector, q::Vector, ΔT::AbstractMatrix) n,L = size(ΔT) expΔTx!(tmpvec, ΔT, x) tmpvec .*= q for l = 1:L grad[l] = dot(tmpvec, @view(ΔT[:,l])) end end function entropyObjective_fg!(grad::Vector, tmpvec::Vector, x::Vector, q::Vector, ΔT::AbstractMatrix) entropyObjective_g!(grad, tmpvec, x, q, ΔT) return sum(tmpvec) end function entropyObjective_h!(hess::Matrix{T}, tmpvec::Vector, x::Vector, q::Vector, ΔT::AbstractMatrix) where {T} n,L = size(ΔT) expΔTx!(tmpvec, ΔT, x) tmpvec .*= q fill!(hess, zero(T)) for k = 1:L for l = 1:L hess[l,k] = sum(@view(ΔT[:,l]) .* tmpvec .* @view(ΔT[:,k])) end end end # ----------------------- wrappers -------------------------- function discreteApprox!(p::AbstractVector, λfinal::AbstractVector, err::AbstractVector, tmp::Vector, q0::Vector, ΔT::AbstractMatrix{T}) where {T} l = length(λfinal) n = length(q0) (n,l) == size(ΔT) || throw(DimensionMismatch()) n == length(p) || throw(DimensionMismatch()) l == length(err) || throw(DimensionMismatch()) n == length(tmp) || throw(DimensionMismatch()) # test that initial value is finite λ0 = zeros(T,l) grad = zeros(T,l) f0 = entropyObjective_fg!(grad, tmp, λ0, q0, ΔT) !isfinite(f0) && return Inf !all(isfinite.(grad)) && return Inf tdf = TwiceDifferentiable( (x::Vector) -> entropyObjective_f!( tmp, x, q0, ΔT), (grad::Vector, x::Vector) -> entropyObjective_g!( grad, tmp, x, q0, ΔT), (grad::Vector, x::Vector) -> entropyObjective_fg!(grad, tmp, x, q0, ΔT), (hess::Matrix, x::Vector) -> entropyObjective_h!( hess, tmp, x, q0, ΔT), λ0 ) opt = Optim.optimize(tdf, λ0, Newton()) λ1 = opt.minimizer J = opt.minimum # update gradient entropyObjective_g!(grad, tmp, λ1, q0, ΔT) if norm(grad, Inf) < 1e-9 && all(isfinite.(grad)) && all(isfinite.(λ1)) && 0.0 < J < Inf && maximum(abs.(grad ./ J)) < 1e-5 λfinal .= λ1 expΔTx!(tmp, ΔT, λ1) p .= q0 .* tmp ./ J err .= grad ./ J return J else return Inf end end function ΔTmat!(ΔT::Matrix, dev::AbstractVector, Tbar::Vector) n,L = size(ΔT) length(dev) == n || throw(DimensionMismatch()) length(Tbar) == L || throw(DimensionMismatch()) ΔT[:,1] .= dev for j = 2:L ΔT[:,j] .= ΔT[:,j-1] .* dev end for j = 1:L ΔT[:,j] .-= Tbar[j] end end function discreteApprox!(P::AbstractMatrix, y::AbstractVector{T}, S::Union{AbstractVector, Base.Iterators.ProductIterator}, zval::Function, pdffun::Function, scaled_moments::Vector, scale_factor::Real, maxMoments::Integer, κ::Real) where {T<:Real} nS = length(S) n = length(y) 0 < maxMoments < n || throw(error("Must use 1 to $n-1 moments or fewer")) (nS,n) == size(P) || throw(DimensionMismatch()) # Initialize elements that will be returned Λ = zeros(T, nS, maxMoments) JN = zeros(T, nS) approxErr = zeros(T, nS, maxMoments) numMoments = zeros(Int, nS) # preallocate these, which will be updated each iteration ΔT = Array{T}(undef,n, maxMoments) z = Array{T}(undef,n) q = Array{T}(undef,n) tmp = Array{T}(undef,n) for (i,st) in enumerate(S) z .= zval.(y, st) q .= max.(pdffun.(z), κ) z ./= scale_factor ΔTmat!(ΔT, z, scaled_moments) updated = false for l in maxMoments:-1:2 J = discreteApprox!(@view(P[i,:]), @view(Λ[i,1:l]), @view(approxErr[i,1:l]), tmp, q, @view(ΔT[:,1:l])) if isfinite(J) JN[i], numMoments[i] = (J, l) updated = true break end end if !updated sumq = sum(q) P[i,:] .= q ./ sumq end end return JN, Λ, numMoments, approxErr end # ----------------------- wrappers -------------------------- function discreteApprox(y::AbstractVector{T}, S::Union{AbstractVector, Base.Iterators.ProductIterator}, zval::Function, pdffun::Function, scaled_moments::Vector, scale_factor::Real, maxMoments::Integer, κ::Real) where {T<:Real} n = length(y) nS = length(S) P = Array{T}(nS,n) return (P, discreteApprox!(P, y, S, zval, pdffun, scaled_moments, scale_factor, maxMoments, κ)...) end function discreteNormalApprox!(P::AbstractMatrix, y::AbstractVector, S::Union{AbstractVector, Base.Iterators.ProductIterator}, zval::Function, maxMoments::Integer, κ::Real) scale_factor = maximum(abs.(y)) scaled_moments = [m for m in NormCentralMoment(maxMoments, 1.0/scale_factor)] discreteApprox!(P, y, S, zval, normpdf, scaled_moments, scale_factor, maxMoments, κ) end function discreteNormalApprox(y::AbstractVector{T}, S::Union{AbstractVector, Base.Iterators.ProductIterator}, zval::Function, maxMoments::Integer=2, κ::Real=1e-8) where {T} n = length(y) P = Matrix{T}(undef,n,n) out = discreteNormalApprox!(P, y, S, zval, maxMoments, κ) return (P, out...) end
[ 39344, 28810, 4677, 13907, 28265, 28810, 4677, 13907, 11, 28810, 26447, 4677, 13907, 11, 28810, 26447, 4677, 13907, 0, 198, 198, 2, 41436, 6329, 9432, 5499, 329, 3509, 40709, 2386, 6359, 220, 22369, 438, 198, 198, 8818, 1033, 138, 242, 46047, 0, 7, 22065, 35138, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 11, 2124, 3712, 23839, 38469, 8, 198, 220, 35971, 0, 7, 22065, 35138, 11, 37455, 51, 11, 2124, 8, 198, 220, 45218, 35138, 764, 28, 1033, 12195, 22065, 35138, 8, 198, 437, 198, 198, 2, 9432, 198, 8818, 40709, 10267, 425, 62, 69, 0, 7, 22065, 35138, 3712, 38469, 11, 2124, 3712, 38469, 11, 10662, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 8, 198, 220, 1033, 138, 242, 46047, 0, 7, 22065, 35138, 11, 37455, 51, 11, 2124, 8, 198, 220, 1441, 16605, 7, 80, 11, 45218, 35138, 8, 198, 437, 198, 198, 2, 31312, 198, 8818, 40709, 10267, 425, 62, 70, 0, 7, 9744, 3712, 38469, 11, 45218, 35138, 3712, 38469, 11, 2124, 3712, 38469, 11, 10662, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 8, 198, 220, 299, 11, 43, 796, 2546, 7, 138, 242, 51, 8, 198, 220, 1033, 138, 242, 46047, 0, 7, 22065, 35138, 11, 37455, 51, 11, 2124, 8, 198, 220, 45218, 35138, 764, 9, 28, 10662, 198, 220, 329, 300, 796, 352, 25, 43, 198, 220, 220, 220, 3915, 58, 75, 60, 796, 16605, 7, 22065, 35138, 11, 2488, 1177, 7, 138, 242, 51, 58, 45299, 75, 60, 4008, 198, 220, 886, 198, 437, 198, 198, 8818, 40709, 10267, 425, 62, 40616, 0, 7, 9744, 3712, 38469, 11, 45218, 35138, 3712, 38469, 11, 2124, 3712, 38469, 11, 10662, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 8, 198, 220, 40709, 10267, 425, 62, 70, 0, 7, 9744, 11, 45218, 35138, 11, 2124, 11, 10662, 11, 37455, 51, 8, 198, 220, 1441, 2160, 7, 22065, 35138, 8, 198, 437, 198, 198, 8818, 40709, 10267, 425, 62, 71, 0, 7, 33979, 3712, 46912, 90, 51, 5512, 45218, 35138, 3712, 38469, 11, 2124, 3712, 38469, 11, 10662, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 8, 810, 1391, 51, 92, 198, 220, 299, 11, 43, 796, 2546, 7, 138, 242, 51, 8, 198, 220, 1033, 138, 242, 46047, 0, 7, 22065, 35138, 11, 37455, 51, 11, 2124, 8, 198, 220, 45218, 35138, 764, 9, 28, 10662, 198, 220, 6070, 0, 7, 33979, 11, 6632, 7, 51, 4008, 198, 220, 329, 479, 796, 352, 25, 43, 198, 220, 220, 220, 329, 300, 796, 352, 25, 43, 198, 220, 220, 220, 220, 220, 339, 824, 58, 75, 11, 74, 60, 796, 2160, 7, 31, 1177, 7, 138, 242, 51, 58, 45299, 75, 12962, 764, 9, 45218, 35138, 764, 9, 2488, 1177, 7, 138, 242, 51, 58, 45299, 74, 60, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198, 198, 2, 41436, 6329, 7917, 11799, 220, 22369, 438, 628, 198, 8818, 28810, 4677, 13907, 0, 7, 79, 3712, 23839, 38469, 11, 7377, 119, 20311, 3712, 23839, 38469, 11, 11454, 3712, 23839, 38469, 11, 45218, 3712, 38469, 11, 10662, 15, 3712, 38469, 11, 37455, 51, 3712, 23839, 46912, 90, 51, 30072, 810, 1391, 51, 92, 628, 220, 300, 796, 4129, 7, 39377, 20311, 8, 198, 220, 299, 796, 4129, 7, 80, 15, 8, 198, 220, 357, 77, 11, 75, 8, 6624, 2546, 7, 138, 242, 51, 8, 220, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 299, 6624, 4129, 7, 79, 8, 220, 220, 220, 220, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 300, 6624, 4129, 7, 8056, 8, 220, 220, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 299, 6624, 4129, 7, 22065, 8, 220, 220, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 628, 198, 220, 1303, 1332, 326, 4238, 1988, 318, 27454, 198, 220, 7377, 119, 15, 796, 1976, 27498, 7, 51, 11, 75, 8, 198, 220, 3915, 796, 1976, 27498, 7, 51, 11, 75, 8, 198, 220, 277, 15, 796, 40709, 10267, 425, 62, 40616, 0, 7, 9744, 11, 45218, 11, 7377, 119, 15, 11, 10662, 15, 11, 37455, 51, 8, 198, 220, 5145, 4468, 9504, 7, 69, 15, 8, 220, 220, 220, 220, 220, 220, 220, 220, 11405, 1441, 4806, 198, 220, 5145, 439, 7, 4468, 9504, 12195, 9744, 4008, 11405, 1441, 4806, 628, 220, 256, 7568, 796, 41217, 40341, 3379, 7, 198, 220, 220, 220, 357, 87, 3712, 38469, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4613, 40709, 10267, 425, 62, 69, 0, 7, 220, 220, 220, 220, 220, 220, 45218, 11, 2124, 11, 10662, 15, 11, 37455, 51, 828, 198, 220, 220, 220, 357, 9744, 3712, 38469, 11, 2124, 3712, 38469, 8, 4613, 40709, 10267, 425, 62, 70, 0, 7, 3915, 11, 45218, 11, 2124, 11, 10662, 15, 11, 37455, 51, 828, 198, 220, 220, 220, 357, 9744, 3712, 38469, 11, 2124, 3712, 38469, 8, 4613, 40709, 10267, 425, 62, 40616, 0, 7, 9744, 11, 45218, 11, 2124, 11, 10662, 15, 11, 37455, 51, 828, 198, 220, 220, 220, 357, 33979, 3712, 46912, 11, 2124, 3712, 38469, 8, 4613, 40709, 10267, 425, 62, 71, 0, 7, 339, 824, 11, 45218, 11, 2124, 11, 10662, 15, 11, 37455, 51, 828, 198, 220, 220, 220, 7377, 119, 15, 198, 220, 1267, 628, 220, 2172, 796, 30011, 13, 40085, 1096, 7, 83, 7568, 11, 7377, 119, 15, 11, 17321, 28955, 198, 220, 7377, 119, 16, 796, 2172, 13, 1084, 320, 7509, 198, 220, 449, 796, 2172, 13, 39504, 628, 220, 1303, 4296, 31312, 198, 220, 40709, 10267, 425, 62, 70, 0, 7, 9744, 11, 45218, 11, 7377, 119, 16, 11, 10662, 15, 11, 37455, 51, 8, 628, 220, 611, 2593, 7, 9744, 11, 4806, 8, 1279, 352, 68, 12, 24, 11405, 477, 7, 4468, 9504, 12195, 9744, 4008, 11405, 477, 7, 4468, 9504, 12195, 39377, 16, 4008, 11405, 657, 13, 15, 1279, 449, 1279, 4806, 11405, 5415, 7, 8937, 12195, 9744, 24457, 449, 4008, 1279, 352, 68, 12, 20, 198, 220, 220, 220, 7377, 119, 20311, 764, 28, 7377, 119, 16, 198, 220, 220, 220, 1033, 138, 242, 46047, 0, 7, 22065, 11, 37455, 51, 11, 7377, 119, 16, 8, 198, 220, 220, 220, 279, 764, 28, 10662, 15, 764, 9, 45218, 24457, 449, 198, 220, 220, 220, 11454, 764, 28, 3915, 24457, 449, 198, 220, 220, 220, 1441, 449, 198, 220, 2073, 198, 220, 220, 220, 1441, 4806, 198, 220, 886, 198, 198, 437, 628, 198, 8818, 37455, 51, 6759, 0, 7, 138, 242, 51, 3712, 46912, 11, 1614, 3712, 23839, 38469, 11, 309, 5657, 3712, 38469, 8, 198, 220, 299, 11, 43, 796, 2546, 7, 138, 242, 51, 8, 198, 220, 4129, 7, 7959, 8, 6624, 299, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 4129, 7, 51, 5657, 8, 6624, 406, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 628, 220, 37455, 51, 58, 45299, 16, 60, 764, 28, 1614, 198, 220, 329, 474, 796, 362, 25, 43, 198, 220, 220, 220, 37455, 51, 58, 45299, 73, 60, 764, 28, 37455, 51, 58, 45299, 73, 12, 16, 60, 764, 9, 1614, 198, 220, 886, 198, 220, 329, 474, 796, 352, 25, 43, 198, 220, 220, 220, 37455, 51, 58, 45299, 73, 60, 764, 12, 28, 309, 5657, 58, 73, 60, 198, 220, 886, 198, 437, 628, 198, 198, 8818, 28810, 4677, 13907, 0, 7, 47, 3712, 23839, 46912, 11, 331, 3712, 23839, 38469, 90, 51, 5512, 311, 3712, 38176, 90, 23839, 38469, 11, 7308, 13, 29993, 2024, 13, 15667, 37787, 5512, 1976, 2100, 3712, 22203, 11, 279, 67, 487, 403, 3712, 22203, 11, 27464, 62, 32542, 658, 3712, 38469, 11, 5046, 62, 31412, 3712, 15633, 11, 3509, 29252, 658, 3712, 46541, 11, 7377, 118, 3712, 15633, 8, 810, 1391, 51, 27, 25, 15633, 92, 628, 220, 299, 50, 796, 4129, 7, 50, 8, 198, 220, 299, 796, 4129, 7, 88, 8, 198, 220, 657, 1279, 3509, 29252, 658, 1279, 299, 8614, 3714, 7, 18224, 7203, 34320, 779, 352, 284, 720, 77, 12, 16, 7188, 393, 7380, 48774, 198, 220, 357, 77, 50, 11, 77, 8, 6624, 2546, 7, 47, 8, 220, 8614, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 628, 220, 1303, 20768, 1096, 4847, 326, 481, 307, 4504, 198, 220, 7377, 249, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1976, 27498, 7, 51, 11, 299, 50, 11, 3509, 29252, 658, 8, 198, 220, 449, 45, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1976, 27498, 7, 51, 11, 299, 50, 8, 198, 220, 5561, 9139, 81, 220, 796, 1976, 27498, 7, 51, 11, 299, 50, 11, 3509, 29252, 658, 8, 198, 220, 997, 29252, 658, 796, 1976, 27498, 7, 5317, 11, 299, 50, 8, 628, 220, 1303, 662, 439, 13369, 777, 11, 543, 481, 307, 6153, 1123, 24415, 198, 220, 37455, 51, 220, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 77, 11, 3509, 29252, 658, 8, 198, 220, 1976, 220, 220, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 77, 8, 198, 220, 10662, 220, 220, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 77, 8, 198, 220, 45218, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 77, 8, 628, 220, 329, 357, 72, 11, 301, 8, 287, 27056, 378, 7, 50, 8, 198, 220, 220, 220, 1976, 764, 28, 1976, 2100, 12195, 88, 11, 336, 8, 198, 220, 220, 220, 10662, 764, 28, 3509, 12195, 30094, 487, 403, 12195, 89, 828, 7377, 118, 8, 198, 220, 220, 220, 1976, 24457, 28, 5046, 62, 31412, 198, 220, 220, 220, 37455, 51, 6759, 0, 7, 138, 242, 51, 11, 1976, 11, 27464, 62, 32542, 658, 8, 198, 220, 220, 220, 6153, 796, 3991, 198, 220, 220, 220, 329, 300, 287, 3509, 29252, 658, 21912, 16, 25, 17, 198, 220, 220, 220, 220, 220, 449, 796, 28810, 4677, 13907, 0, 7, 31, 1177, 7, 47, 58, 72, 11, 25, 46570, 2488, 1177, 7, 138, 249, 58, 72, 11, 16, 25, 75, 46570, 2488, 1177, 7, 1324, 13907, 9139, 81, 58, 72, 11, 16, 25, 75, 46570, 45218, 11, 10662, 11, 2488, 1177, 7, 138, 242, 51, 58, 45299, 16, 25, 75, 60, 4008, 198, 220, 220, 220, 220, 220, 611, 318, 69, 9504, 7, 41, 8, 198, 220, 220, 220, 220, 220, 220, 220, 449, 45, 58, 72, 4357, 997, 29252, 658, 58, 72, 60, 796, 357, 41, 11, 300, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6153, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 5145, 43162, 198, 220, 220, 220, 220, 220, 2160, 80, 796, 2160, 7, 80, 8, 198, 220, 220, 220, 220, 220, 350, 58, 72, 11, 47715, 764, 28, 10662, 24457, 2160, 80, 198, 220, 220, 220, 886, 628, 220, 886, 628, 220, 1441, 449, 45, 11, 7377, 249, 11, 997, 29252, 658, 11, 5561, 9139, 81, 198, 437, 198, 198, 2, 41436, 6329, 7917, 11799, 220, 22369, 438, 198, 198, 8818, 28810, 4677, 13907, 7, 88, 3712, 23839, 38469, 90, 51, 5512, 311, 3712, 38176, 90, 23839, 38469, 11, 7308, 13, 29993, 2024, 13, 15667, 37787, 5512, 1976, 2100, 3712, 22203, 11, 279, 67, 487, 403, 3712, 22203, 11, 27464, 62, 32542, 658, 3712, 38469, 11, 5046, 62, 31412, 3712, 15633, 11, 3509, 29252, 658, 3712, 46541, 11, 7377, 118, 3712, 15633, 8, 810, 1391, 51, 27, 25, 15633, 92, 198, 220, 299, 796, 4129, 7, 88, 8, 198, 220, 299, 50, 796, 4129, 7, 50, 8, 198, 220, 350, 796, 15690, 90, 51, 92, 7, 77, 50, 11, 77, 8, 198, 220, 1441, 357, 47, 11, 28810, 4677, 13907, 0, 7, 47, 11, 331, 11, 311, 11, 1976, 2100, 11, 279, 67, 487, 403, 11, 27464, 62, 32542, 658, 11, 5046, 62, 31412, 11, 3509, 29252, 658, 11, 7377, 118, 8, 23029, 198, 437, 628, 198, 198, 8818, 28810, 26447, 4677, 13907, 0, 7, 47, 3712, 23839, 46912, 11, 331, 3712, 23839, 38469, 11, 311, 3712, 38176, 90, 23839, 38469, 11, 7308, 13, 29993, 2024, 13, 15667, 37787, 5512, 1976, 2100, 3712, 22203, 11, 3509, 29252, 658, 3712, 46541, 11, 7377, 118, 3712, 15633, 8, 198, 220, 5046, 62, 31412, 796, 5415, 7, 8937, 12195, 88, 4008, 198, 220, 27464, 62, 32542, 658, 796, 685, 76, 329, 285, 287, 11220, 30645, 29252, 298, 7, 9806, 29252, 658, 11, 352, 13, 15, 14, 9888, 62, 31412, 15437, 198, 220, 28810, 4677, 13907, 0, 7, 47, 11, 331, 11, 311, 11, 1976, 2100, 11, 2593, 12315, 11, 27464, 62, 32542, 658, 11, 5046, 62, 31412, 11, 3509, 29252, 658, 11, 7377, 118, 8, 198, 437, 198, 198, 8818, 28810, 26447, 4677, 13907, 7, 88, 3712, 23839, 38469, 90, 51, 5512, 311, 3712, 38176, 90, 23839, 38469, 11, 7308, 13, 29993, 2024, 13, 15667, 37787, 5512, 1976, 2100, 3712, 22203, 11, 3509, 29252, 658, 3712, 46541, 28, 17, 11, 7377, 118, 3712, 15633, 28, 16, 68, 12, 23, 8, 810, 1391, 51, 92, 198, 220, 299, 796, 4129, 7, 88, 8, 198, 220, 350, 796, 24936, 90, 51, 92, 7, 917, 891, 11, 77, 11, 77, 8, 198, 220, 503, 796, 28810, 26447, 4677, 13907, 0, 7, 47, 11, 331, 11, 311, 11, 1976, 2100, 11, 3509, 29252, 658, 11, 7377, 118, 8, 198, 220, 1441, 357, 47, 11, 503, 23029, 198, 437, 198 ]
2.373108
2,246
mutable struct zmp_com_observer_state_t <: LCMType utime::Int64 com::SVector{2, Float64} comd::SVector{2, Float64} ground_plane_height::Float64 end @lcmtypesetup(zmp_com_observer_state_t)
[ 76, 18187, 2878, 1976, 3149, 62, 785, 62, 672, 15388, 62, 5219, 62, 83, 1279, 25, 22228, 44, 6030, 198, 220, 220, 220, 3384, 524, 3712, 5317, 2414, 198, 220, 220, 220, 401, 3712, 50, 38469, 90, 17, 11, 48436, 2414, 92, 198, 220, 220, 220, 401, 67, 3712, 50, 38469, 90, 17, 11, 48436, 2414, 92, 198, 220, 220, 220, 2323, 62, 14382, 62, 17015, 3712, 43879, 2414, 198, 437, 198, 198, 31, 75, 11215, 19199, 316, 929, 7, 89, 3149, 62, 785, 62, 672, 15388, 62, 5219, 62, 83, 8, 198 ]
2.204301
93
function save_data!(A::Array{T,1}, dset::HDF5Dataset, src_ind::AbstractRange{Int}, dest_ind::AbstractRange{Int}) where T dsel_id = HDF5.hyperslab(dset, src_ind) V = view(A, dest_ind) memtype = HDF5.datatype(A) memspace = HDF5.dataspace(V) HDF5.h5d_write(dset.id, memtype.id, memspace.id, dsel_id, dset.xfer, V) HDF5.close(memtype) HDF5.close(memspace) HDF5.h5s_close(dsel_id) return nothing end
[ 8818, 3613, 62, 7890, 0, 7, 32, 3712, 19182, 90, 51, 11, 16, 5512, 288, 2617, 3712, 39, 8068, 20, 27354, 292, 316, 11, 12351, 62, 521, 3712, 23839, 17257, 90, 5317, 5512, 2244, 62, 521, 3712, 23839, 17257, 90, 5317, 30072, 810, 309, 198, 220, 288, 741, 62, 312, 796, 5572, 37, 20, 13, 36362, 364, 23912, 7, 67, 2617, 11, 12351, 62, 521, 8, 198, 220, 569, 796, 1570, 7, 32, 11, 2244, 62, 521, 8, 198, 220, 1066, 4906, 796, 5572, 37, 20, 13, 19608, 265, 2981, 7, 32, 8, 198, 220, 1066, 13200, 796, 5572, 37, 20, 13, 19608, 5126, 558, 7, 53, 8, 198, 220, 5572, 37, 20, 13, 71, 20, 67, 62, 13564, 7, 67, 2617, 13, 312, 11, 1066, 4906, 13, 312, 11, 1066, 13200, 13, 312, 11, 288, 741, 62, 312, 11, 288, 2617, 13, 87, 2232, 11, 569, 8, 198, 220, 5572, 37, 20, 13, 19836, 7, 11883, 4906, 8, 198, 220, 5572, 37, 20, 13, 19836, 7, 11883, 13200, 8, 198, 220, 5572, 37, 20, 13, 71, 20, 82, 62, 19836, 7, 67, 741, 62, 312, 8, 198, 220, 1441, 2147, 198, 437, 198 ]
2.128866
194
const DEBUG_ENABLED = Ref(false) const DEBUG_CALLBACK = Ref{Function}() @export struct GLDebugInfo <: Iterable type::String source::String message::String severity::String end function debug_message_callback( _source::GLenum, _type::GLenum, ::GLuint, _severity::GLenum, ::GLsizei, _msg::Ptr{GLchar}, ::Ptr{Cvoid} )::Cvoid message = unsafe_string(_msg) source = get(DebugSource, _source, "Unknown") type = get(DebugType, _type, "Unknown") severity = get(DebugSeverity, _severity, "Unknown") if isassigned(DEBUG_CALLBACK) GLDebugInfo( type, source, message, severity, ) |> DEBUG_CALLBACK[] end return nothing end """ ondebug_msg(callback::Function) Enables debugging of OpenGL functions and sets the OpenGL debug message `callback` function. `callback` only accepts one parameter of type [`GLDebugInfo`](@ref), that contains the information about the debug message. """ @export function ondebug_msg(callback::Function) @assert hasmethod(callback, Tuple{GLDebugInfo}) " The `ondebug_msg` function expects a `callback` that accepts a single parameter of type `GLDebugInfo` : `callback(info::GLDebugInfo)` " DEBUG_CALLBACK[] = callback if DEBUG_ENABLED[] == false DEBUG_ENABLED[] = true ptr_debug_callback = @cfunction(debug_message_callback, Cvoid, ( GLenum, GLenum, GLuint, GLenum, GLsizei, Ptr{GLchar}, Ptr{Cvoid} )) glEnable(GL_DEBUG_OUTPUT) glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS) GC.@preserve ptr_debug_callback begin glDebugMessageCallback(ptr_debug_callback, C_NULL) ids = Cuint(0) @c glDebugMessageControl( GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, &ids, GL_TRUE, ) end end end
[ 9979, 16959, 62, 1677, 6242, 30465, 796, 6524, 7, 9562, 8, 198, 9979, 16959, 62, 34, 7036, 31098, 796, 6524, 90, 22203, 92, 3419, 198, 198, 31, 39344, 2878, 10188, 27509, 12360, 1279, 25, 40806, 540, 198, 220, 220, 2099, 3712, 10100, 198, 220, 220, 2723, 3712, 10100, 198, 220, 220, 3275, 3712, 10100, 198, 220, 220, 19440, 3712, 10100, 198, 437, 198, 198, 8818, 14257, 62, 20500, 62, 47423, 7, 198, 220, 220, 4808, 10459, 3712, 8763, 44709, 11, 220, 198, 220, 220, 4808, 4906, 3712, 8763, 44709, 11, 220, 198, 220, 220, 7904, 8763, 28611, 11, 220, 198, 220, 220, 4808, 28116, 414, 3712, 8763, 44709, 11, 220, 198, 220, 220, 7904, 8763, 7857, 72, 11, 220, 198, 220, 220, 4808, 19662, 3712, 46745, 90, 8763, 10641, 5512, 220, 198, 220, 220, 7904, 46745, 90, 34, 19382, 92, 198, 2599, 25, 34, 19382, 220, 198, 220, 220, 3275, 220, 796, 21596, 62, 8841, 28264, 19662, 8, 198, 220, 220, 2723, 220, 220, 796, 651, 7, 27509, 7416, 11, 4808, 10459, 11, 366, 20035, 4943, 198, 220, 220, 2099, 220, 220, 220, 220, 796, 651, 7, 27509, 6030, 11, 4808, 4906, 11, 366, 20035, 4943, 198, 220, 220, 19440, 796, 651, 7, 27509, 50, 964, 414, 11, 4808, 28116, 414, 11, 366, 20035, 4943, 628, 220, 220, 611, 318, 562, 3916, 7, 30531, 62, 34, 7036, 31098, 8, 198, 220, 220, 220, 220, 220, 10188, 27509, 12360, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 19440, 11, 198, 220, 220, 220, 220, 220, 1267, 930, 29, 16959, 62, 34, 7036, 31098, 21737, 198, 220, 220, 886, 628, 220, 220, 1441, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 220, 220, 319, 24442, 62, 19662, 7, 47423, 3712, 22203, 8, 198, 198, 4834, 2977, 28769, 286, 30672, 5499, 290, 5621, 262, 30672, 14257, 3275, 4600, 47423, 63, 2163, 13, 198, 198, 63, 47423, 63, 691, 18178, 530, 11507, 286, 2099, 685, 63, 8763, 27509, 12360, 63, 16151, 31, 5420, 828, 220, 198, 5562, 4909, 262, 1321, 546, 262, 14257, 3275, 13, 198, 37811, 198, 31, 39344, 2163, 319, 24442, 62, 19662, 7, 47423, 3712, 22203, 8, 198, 220, 220, 2488, 30493, 468, 24396, 7, 47423, 11, 309, 29291, 90, 8763, 27509, 12360, 30072, 366, 198, 220, 220, 220, 220, 220, 383, 4600, 623, 1765, 1018, 62, 19662, 63, 2163, 13423, 257, 4600, 47423, 63, 326, 18178, 220, 198, 220, 220, 220, 220, 220, 257, 2060, 11507, 286, 2099, 4600, 8763, 27509, 12360, 63, 1058, 4600, 47423, 7, 10951, 3712, 8763, 27509, 12360, 8, 63, 198, 220, 220, 366, 628, 220, 220, 16959, 62, 34, 7036, 31098, 21737, 796, 23838, 198, 220, 220, 220, 198, 220, 220, 611, 16959, 62, 1677, 6242, 30465, 21737, 6624, 3991, 198, 220, 220, 220, 220, 220, 16959, 62, 1677, 6242, 30465, 21737, 796, 2081, 628, 220, 220, 220, 220, 220, 50116, 62, 24442, 62, 47423, 796, 2488, 66, 8818, 7, 24442, 62, 20500, 62, 47423, 11, 327, 19382, 11, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 44709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 44709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 28611, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 44709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 7857, 72, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 8763, 10641, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 34, 19382, 92, 198, 220, 220, 220, 220, 220, 15306, 198, 220, 220, 220, 198, 220, 220, 220, 220, 220, 1278, 36695, 7, 8763, 62, 30531, 62, 2606, 7250, 3843, 8, 198, 220, 220, 220, 220, 220, 1278, 36695, 7, 8763, 62, 30531, 62, 2606, 7250, 3843, 62, 23060, 45, 37846, 1340, 20958, 8, 198, 220, 220, 220, 198, 220, 220, 220, 220, 220, 20145, 13, 31, 18302, 3760, 50116, 62, 24442, 62, 47423, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1278, 27509, 12837, 47258, 7, 20692, 62, 24442, 62, 47423, 11, 327, 62, 33991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 796, 14496, 600, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 1278, 27509, 12837, 15988, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 62, 35, 35830, 62, 34, 12203, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 62, 35, 35830, 62, 34, 12203, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 62, 35, 35830, 62, 34, 12203, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1222, 2340, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10188, 62, 5446, 8924, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 886, 198, 437 ]
2.23269
881
function sqlite3_errmsg() return ccall( (:sqlite3_errmsg, sqlite3_lib), Ptr{Uint8}, () ) end function sqlite3_errmsg(db::Ptr{Void}) @NULLCHECK db return ccall( (:sqlite3_errmsg, sqlite3_lib), Ptr{Uint8}, (Ptr{Void},), db ) end function sqlite3_open(file::AbstractString, handle::Vector{Ptr{Void}}) return ccall( (:sqlite3_open, sqlite3_lib), Cint, (Ptr{Uint8}, Ptr{Void}), file, handle ) end function sqlite3_open16(file::UTF16String, handle::Array{Ptr{Void},1}) return ccall( (:sqlite3_open16, sqlite3_lib), Cint, (Ptr{Uint16}, Ptr{Void}), file, handle ) end function sqlite3_close(handle::Ptr{Void}) @NULLCHECK handle return ccall( (:sqlite3_close, sqlite3_lib), Cint, (Ptr{Void},), handle ) end function sqlite3_close_v2(handle::Ptr{Void}) @NULLCHECK handle try return ccall( (:sqlite3_close_v2, sqlite3_lib), Cint, (Ptr{Void},), handle ) catch # Older versions of the library don't have this, abort to other close warn("sqlite3_close_v2 not available.") sqlite3_close(handle) end end function sqlite3_next_stmt(db::Ptr{Void}, stmt::Ptr{Void}) @NULLCHECK db return ccall( (:sqlite3_next_stmt, sqlite3_lib), Ptr{Void}, (Ptr{Void}, Ptr{Void}), db, stmt ) end function sqlite3_prepare_v2(handle::Ptr{Void}, query::AbstractString, stmt::Array{Ptr{Void},1}, unused::Array{Ptr{Void},1}) @NULLCHECK handle return ccall( (:sqlite3_prepare_v2, sqlite3_lib), Cint, (Ptr{Void}, Ptr{Uint8}, Cint, Ptr{Void}, Ptr{Void}), handle, query, sizeof(query), stmt, unused ) end function sqlite3_prepare16_v2(handle::Ptr{Void}, query::AbstractString, stmt::Array{Ptr{Void},1}, unused::Array{Ptr{Void},1}) @NULLCHECK handle return ccall( (:sqlite3_prepare16_v2, sqlite3_lib), Cint, (Ptr{Void}, Ptr{Uint16}, Cint, Ptr{Void}, Ptr{Void}), handle, query, sizeof(query), stmt, unused ) end function sqlite3_finalize(stmt::Ptr{Void}) @NULLCHECK stmt return ccall( (:sqlite3_finalize, sqlite3_lib), Cint, (Ptr{Void},), stmt ) end function sqlite3_step(stmt::Ptr{Void}) @NULLCHECK stmt return ccall( (:sqlite3_step, sqlite3_lib), Cint, (Ptr{Void},), stmt ) end function sqlite3_column_count(stmt::Ptr{Void}) @NULLCHECK stmt return ccall( (:sqlite3_column_count, sqlite3_lib), Cint, (Ptr{Void},), stmt ) end function sqlite3_column_type(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_type, sqlite3_lib), Cint, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_name(stmt::Ptr{Void},n::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_name, sqlite3_lib), Ptr{Uint8}, (Ptr{Void}, Cint), stmt, n ) end function sqlite3_reset(stmt::Ptr{Void}) @NULLCHECK stmt return ccall( (:sqlite3_reset, sqlite3_lib), Cint, (Ptr{Void},), stmt ) end function sqlite3_column_blob(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_blob, sqlite3_lib), Ptr{Void}, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_bytes(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_bytes, sqlite3_lib), Cint, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_bytes16(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_bytes16, sqlite3_lib), Cint, (Ptr{Void}, Cint), stmt, col ) end @inline function sqlite3_column_double(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_double, sqlite3_lib), Cdouble, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_int(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_int, sqlite3_lib), Cint, (Ptr{Void}, Cint), stmt, col ) end @inline function sqlite3_column_int64(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_int64, sqlite3_lib), Clonglong, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_text(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_text, sqlite3_lib), Ptr{Uint8}, (Ptr{Void}, Cint), stmt, col ) end function sqlite3_column_text16(stmt::Ptr{Void},col::Int) @NULLCHECK stmt return ccall( (:sqlite3_column_text16, sqlite3_lib), Ptr{Void}, (Ptr{Void}, Cint), stmt, col ) end # SQLITE_API void sqlite3_result_double(sqlite3_context*, double); function sqlite3_result_double(context::Ptr{Void},value::Float64) return ccall( (:sqlite3_result_double, sqlite3_lib), Void, (Ptr{Void}, Float64), context, value ) end # SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int) function sqlite3_result_error(context::Ptr{Void},msg::AbstractString) return ccall( (:sqlite3_result_error, sqlite3_lib), Void, (Ptr{Void}, Ptr{Uint8}, Cint), context, value, sizeof(msg) + 1 ) end # SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int) function sqlite3_result_error(context::Ptr{Void},msg::UTF16String) return ccall( (:sqlite3_result_error16, sqlite3_lib), Void, (Ptr{Void}, Ptr{Uint16}, Cint), context, value, sizeof(msg) + 1 ) end # SQLITE_API void sqlite3_result_int(sqlite3_context*, int); function sqlite3_result_int(context::Ptr{Void},value::Int32) return ccall( (:sqlite3_result_int, sqlite3_lib), Void, (Ptr{Void}, Int32), context, value ) end # SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); function sqlite3_result_int64(context::Ptr{Void},value::Int64) return ccall( (:sqlite3_result_int64, sqlite3_lib), Void, (Ptr{Void}, Int64), context, value ) end # SQLITE_API void sqlite3_result_null(sqlite3_context*); function sqlite3_result_null(context::Ptr{Void}) return ccall( (:sqlite3_result_null, sqlite3_lib), Void, (Ptr{Void},), context ) end # SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int n, void(*)(void*)); function sqlite3_result_text(context::Ptr{Void},value::AbstractString) return ccall( (:sqlite3_result_text, sqlite3_lib), Void, (Ptr{Void}, Ptr{Uint8}, Cint, Ptr{Void}), context, value, sizeof(value) + 1, SQLITE_TRANSIENT ) end # SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); function sqlite3_result_text16(context::Ptr{Void},value::UTF16String) return ccall( (:sqlite3_result_text, sqlite3_lib), Void, (Ptr{Void}, Ptr{Uint16}, Cint, Ptr{Void}), context, value, sizeof(value) + 1, SQLITE_TRANSIENT ) end # SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int n, void(*)(void*)); function sqlite3_result_blob(context::Ptr{Void},value) return ccall( (:sqlite3_result_blob, sqlite3_lib), Void, (Ptr{Void}, Ptr{Uint8}, Cint,Ptr{Void}), context, value, sizeof(value), SQLITE_TRANSIENT ) end function sqlite3_initialize() return ccall( (:sqlite3_initialize, sqlite3_lib), Cint, (), ) end function sqlite3_shutdown() return ccall( (:sqlite3_shutdown, sqlite3_lib), Cint, (), ) end sqlite3_types = Dict{Int, DataType}( 1 => Int, 2 => Float64, 3 => UTF8String, 4 => Any, 5 => Nullable, )
[ 198, 8818, 44161, 578, 18, 62, 8056, 19662, 3419, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 8056, 19662, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 52, 600, 23, 5512, 7499, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 8056, 19662, 7, 9945, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 20613, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 8056, 19662, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 52, 600, 23, 5512, 357, 46745, 90, 53, 1868, 5512, 828, 20613, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 9654, 7, 7753, 3712, 23839, 10100, 11, 5412, 3712, 38469, 90, 46745, 90, 53, 1868, 11709, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 9654, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 11, 5412, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 9654, 1433, 7, 7753, 3712, 48504, 1433, 10100, 11, 5412, 3712, 19182, 90, 46745, 90, 53, 1868, 5512, 16, 30072, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 9654, 1433, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 52, 600, 1433, 5512, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 11, 5412, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 19836, 7, 28144, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 5412, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 19836, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 5412, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 19836, 62, 85, 17, 7, 28144, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 5412, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 19836, 62, 85, 17, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 5412, 1267, 198, 220, 220, 220, 4929, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 35527, 6300, 286, 262, 5888, 836, 470, 423, 428, 11, 15614, 284, 584, 1969, 198, 220, 220, 220, 220, 220, 220, 220, 9828, 7203, 25410, 578, 18, 62, 19836, 62, 85, 17, 407, 1695, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 44161, 578, 18, 62, 19836, 7, 28144, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 19545, 62, 301, 16762, 7, 9945, 3712, 46745, 90, 53, 1868, 5512, 336, 16762, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 20613, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 19545, 62, 301, 16762, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 53, 1868, 5512, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20613, 11, 336, 16762, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 46012, 533, 62, 85, 17, 7, 28144, 3712, 46745, 90, 53, 1868, 5512, 12405, 3712, 23839, 10100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 3712, 19182, 90, 46745, 90, 53, 1868, 5512, 16, 5512, 21958, 3712, 19182, 90, 46745, 90, 53, 1868, 5512, 16, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 5412, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 46012, 533, 62, 85, 17, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 23, 5512, 327, 600, 11, 350, 2213, 90, 53, 1868, 5512, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5412, 11, 12405, 11, 39364, 7, 22766, 828, 336, 16762, 11, 21958, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 46012, 533, 1433, 62, 85, 17, 7, 28144, 3712, 46745, 90, 53, 1868, 5512, 12405, 3712, 23839, 10100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 3712, 19182, 90, 46745, 90, 53, 1868, 5512, 16, 5512, 21958, 3712, 19182, 90, 46745, 90, 53, 1868, 5512, 16, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 5412, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 46012, 533, 1433, 62, 85, 17, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 1433, 5512, 327, 600, 11, 350, 2213, 90, 53, 1868, 5512, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5412, 11, 12405, 11, 39364, 7, 22766, 828, 336, 16762, 11, 21958, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 20311, 1096, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20311, 1096, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 336, 16762, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 9662, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 9662, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 336, 16762, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 28665, 62, 9127, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 9127, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 336, 16762, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 28665, 62, 4906, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 4906, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 28665, 62, 3672, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 77, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 3672, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 52, 600, 23, 5512, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 299, 1267, 198, 437, 628, 198, 8818, 44161, 578, 18, 62, 42503, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 42503, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 828, 336, 16762, 1267, 198, 437, 628, 198, 8818, 44161, 578, 18, 62, 28665, 62, 2436, 672, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 2436, 672, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 53, 1868, 5512, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 28665, 62, 33661, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 33661, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 28665, 62, 33661, 1433, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 33661, 1433, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 31, 45145, 2163, 44161, 578, 18, 62, 28665, 62, 23352, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 23352, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 23352, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 28665, 62, 600, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 600, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 31, 45145, 2163, 44161, 578, 18, 62, 28665, 62, 600, 2414, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 600, 2414, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1012, 506, 6511, 11, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 28665, 62, 5239, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 5239, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 52, 600, 23, 5512, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 28665, 62, 5239, 1433, 7, 301, 16762, 3712, 46745, 90, 53, 1868, 5512, 4033, 3712, 5317, 8, 198, 220, 220, 220, 2488, 33991, 50084, 336, 16762, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 28665, 62, 5239, 1433, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 2213, 90, 53, 1868, 5512, 357, 46745, 90, 53, 1868, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 16762, 11, 951, 1267, 198, 437, 198, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 23352, 7, 25410, 578, 18, 62, 22866, 25666, 4274, 1776, 198, 8818, 44161, 578, 18, 62, 20274, 62, 23352, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 3712, 43879, 2414, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 23352, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 48436, 2414, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 18224, 7, 25410, 578, 18, 62, 22866, 25666, 1500, 1149, 25666, 493, 8, 198, 8818, 44161, 578, 18, 62, 20274, 62, 18224, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 19662, 3712, 23839, 10100, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 18224, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 23, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 11, 39364, 7, 19662, 8, 1343, 352, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 18224, 1433, 7, 25410, 578, 18, 62, 22866, 25666, 1500, 7951, 25666, 493, 8, 198, 8818, 44161, 578, 18, 62, 20274, 62, 18224, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 19662, 3712, 48504, 1433, 10100, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 18224, 1433, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 1433, 5512, 327, 600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 11, 39364, 7, 19662, 8, 1343, 352, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 600, 7, 25410, 578, 18, 62, 22866, 25666, 493, 1776, 198, 8818, 44161, 578, 18, 62, 20274, 62, 600, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 3712, 5317, 2624, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 600, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 2558, 2624, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 600, 2414, 7, 25410, 578, 18, 62, 22866, 25666, 44161, 578, 18, 62, 600, 2414, 1776, 198, 8818, 44161, 578, 18, 62, 20274, 62, 600, 2414, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 3712, 5317, 2414, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 600, 2414, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 2558, 2414, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 8423, 7, 25410, 578, 18, 62, 22866, 9, 1776, 198, 8818, 44161, 578, 18, 62, 20274, 62, 8423, 7, 22866, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 8423, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 5239, 7, 25410, 578, 18, 62, 22866, 25666, 1500, 1149, 25666, 493, 299, 11, 7951, 46491, 5769, 19382, 9, 18125, 198, 8818, 44161, 578, 18, 62, 20274, 62, 5239, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 3712, 23839, 10100, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 5239, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 23, 5512, 327, 600, 11, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 11, 39364, 7, 8367, 8, 1343, 352, 11, 16363, 12709, 62, 5446, 1565, 11584, 3525, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 5239, 1433, 7, 25410, 578, 18, 62, 22866, 25666, 1500, 7951, 25666, 493, 11, 7951, 46491, 5769, 19382, 9, 18125, 198, 8818, 44161, 578, 18, 62, 20274, 62, 5239, 1433, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 3712, 48504, 1433, 10100, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 5239, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 1433, 5512, 327, 600, 11, 350, 2213, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 11, 39364, 7, 8367, 8, 1343, 352, 11, 16363, 12709, 62, 5446, 1565, 11584, 3525, 1267, 198, 437, 198, 2, 16363, 12709, 62, 17614, 7951, 44161, 578, 18, 62, 20274, 62, 2436, 672, 7, 25410, 578, 18, 62, 22866, 25666, 1500, 7951, 25666, 493, 299, 11, 7951, 46491, 5769, 19382, 9, 18125, 198, 8818, 44161, 578, 18, 62, 20274, 62, 2436, 672, 7, 22866, 3712, 46745, 90, 53, 1868, 5512, 8367, 8, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 20274, 62, 2436, 672, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 52, 600, 23, 5512, 327, 600, 11, 46745, 90, 53, 1868, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 11, 1988, 11, 39364, 7, 8367, 828, 16363, 12709, 62, 5446, 1565, 11584, 3525, 1267, 198, 437, 198, 198, 8818, 44161, 578, 18, 62, 36733, 1096, 3419, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 36733, 1096, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 29994, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 437, 198, 8818, 44161, 578, 18, 62, 49625, 2902, 3419, 198, 220, 220, 220, 1441, 269, 13345, 7, 357, 25, 25410, 578, 18, 62, 49625, 2902, 11, 44161, 578, 18, 62, 8019, 828, 198, 220, 220, 220, 220, 220, 220, 220, 327, 600, 11, 29994, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 437, 198, 198, 25410, 578, 18, 62, 19199, 796, 360, 713, 90, 5317, 11, 6060, 6030, 92, 7, 198, 220, 220, 220, 352, 5218, 2558, 11, 198, 220, 220, 220, 362, 5218, 48436, 2414, 11, 198, 220, 220, 220, 513, 5218, 41002, 23, 10100, 11, 198, 220, 220, 220, 604, 5218, 4377, 11, 198, 220, 220, 220, 642, 5218, 35886, 540, 11, 198, 8, 198 ]
2.01475
4,000
type Job cmd :: AbstractString jobid :: Int pbs_id :: Int end function ex(job) output = "$(job.pbs_id)-$(myid()-1).out" err = "$(job.pbs_id)-$(myid()-1).err" println("start $(job.jobid)-th job on process $(myid()-1).") open(io->println(io, "start $(job.jobid)-th job on process $(myid()-1)."), output, "a") open(io->println(io, "start $(job.jobid)-th job on process $(myid()-1)."), err, "a") tic() run(pipeline(`sh -c $(job.cmd)`, stdout = output, stderr = err, append=true)) t = toq() println("finish $(job.jobid)-th job on process $(myid()-1) ($t sec)") open(io->println(io, "finish $(job.jobid)-th job on process $(myid()-1) ($t sec)"), output, "a") open(io->println(io, "finish $(job.jobid)-th job on process $(myid()-1) ($t sec)"), err, "a") return nothing end
[ 4906, 15768, 198, 220, 220, 220, 23991, 7904, 27741, 10100, 198, 220, 220, 220, 1693, 312, 7904, 2558, 198, 220, 220, 220, 279, 1443, 62, 312, 7904, 2558, 198, 437, 198, 198, 8818, 409, 7, 21858, 8, 198, 220, 220, 220, 5072, 796, 17971, 7, 21858, 13, 79, 1443, 62, 312, 13219, 3, 7, 1820, 312, 3419, 12, 16, 737, 448, 1, 198, 220, 220, 220, 11454, 796, 17971, 7, 21858, 13, 79, 1443, 62, 312, 13219, 3, 7, 1820, 312, 3419, 12, 16, 737, 8056, 1, 198, 220, 220, 220, 44872, 7203, 9688, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 8, 19570, 198, 220, 220, 220, 1280, 7, 952, 3784, 35235, 7, 952, 11, 366, 9688, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 21387, 828, 5072, 11, 366, 64, 4943, 198, 220, 220, 220, 1280, 7, 952, 3784, 35235, 7, 952, 11, 366, 9688, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 21387, 828, 11454, 11, 366, 64, 4943, 198, 220, 220, 220, 256, 291, 3419, 198, 220, 220, 220, 1057, 7, 79, 541, 4470, 7, 63, 1477, 532, 66, 29568, 21858, 13, 28758, 8, 47671, 14367, 448, 796, 5072, 11, 336, 1082, 81, 796, 11454, 11, 24443, 28, 7942, 4008, 198, 220, 220, 220, 256, 796, 284, 80, 3419, 198, 220, 220, 220, 44872, 7203, 15643, 680, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 8, 7198, 83, 792, 8, 4943, 198, 220, 220, 220, 1280, 7, 952, 3784, 35235, 7, 952, 11, 366, 15643, 680, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 8, 7198, 83, 792, 8, 12340, 5072, 11, 366, 64, 4943, 198, 220, 220, 220, 1280, 7, 952, 3784, 35235, 7, 952, 11, 366, 15643, 680, 29568, 21858, 13, 21858, 312, 13219, 400, 1693, 319, 1429, 29568, 1820, 312, 3419, 12, 16, 8, 7198, 83, 792, 8, 12340, 11454, 11, 366, 64, 4943, 198, 220, 220, 220, 1441, 2147, 198, 437, 628 ]
2.3
360
export rot, plshift, prshift, arshift """ rot(a, b, θ) rotate variables `a` and `b` by an angle `θ` """ function rot(a, b, θ) s, c = sincos(θ) a*c-b*s, a*s+b*c end """ plshift(x, n) periodic left shift. """ plshift(x, n) = (x << n) | (x >> (sizeof(x)*8-n)) """ plshift(x, n) periodic right shift. """ prshift(x, n) = (x >> n) | (x << (sizeof(x)*8-n)) """ arshift(x, n) right shift, sign extending. """ arshift(x::T, n) where T = (x >> n) | (x & (T(1) << (sizeof(x)*8-1)))
[ 39344, 5724, 11, 458, 30846, 11, 778, 30846, 11, 610, 30846, 198, 198, 37811, 198, 220, 220, 220, 5724, 7, 64, 11, 275, 11, 7377, 116, 8, 198, 198, 10599, 378, 9633, 4600, 64, 63, 290, 4600, 65, 63, 416, 281, 9848, 4600, 138, 116, 63, 198, 37811, 198, 8818, 5724, 7, 64, 11, 275, 11, 7377, 116, 8, 198, 220, 220, 220, 264, 11, 269, 796, 264, 1939, 418, 7, 138, 116, 8, 198, 220, 220, 220, 257, 9, 66, 12, 65, 9, 82, 11, 257, 9, 82, 10, 65, 9, 66, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 458, 30846, 7, 87, 11, 299, 8, 198, 198, 41007, 291, 1364, 6482, 13, 198, 37811, 198, 489, 30846, 7, 87, 11, 299, 8, 796, 357, 87, 9959, 299, 8, 930, 357, 87, 9609, 357, 7857, 1659, 7, 87, 27493, 23, 12, 77, 4008, 198, 198, 37811, 198, 220, 220, 220, 458, 30846, 7, 87, 11, 299, 8, 198, 198, 41007, 291, 826, 6482, 13, 198, 37811, 198, 1050, 30846, 7, 87, 11, 299, 8, 796, 357, 87, 9609, 299, 8, 930, 357, 87, 9959, 357, 7857, 1659, 7, 87, 27493, 23, 12, 77, 4008, 198, 198, 37811, 198, 220, 220, 220, 610, 30846, 7, 87, 11, 299, 8, 198, 198, 3506, 6482, 11, 1051, 16610, 13, 198, 37811, 198, 5406, 2135, 7, 87, 3712, 51, 11, 299, 8, 810, 309, 796, 357, 87, 9609, 299, 8, 930, 357, 87, 1222, 357, 51, 7, 16, 8, 9959, 357, 7857, 1659, 7, 87, 27493, 23, 12, 16, 22305, 198 ]
1.938462
260
struct VolumePartsIter{ TM<:AbstractMatrix, TV<:AbstractVector, Tg <: AbstractVector, Tts<:AbstractVector, Texpand<:NamedTuple, T<:Real} <: AbstractVolumePartsIter{TM, TV, T} #parameters A::TM Ã::TM #factored A, used in regressions G::TM g::Tg #vector version by referene of G, should be equivelent ts::Tts tsM1::Tts expand::Texpand dims::NamedTuple #inner constructor needed to identify elTΠ function VolumePartsIter( A::TM, Ã::TM, G::TM, g::Tg, ts::Tts, tsM1::Tts, expand::Texpand, ::Type{TV} = typeof(similar(A,1))) where { TM, TV, Tg, Tts, Texpand} return new{TM, TV, Tg, Tts, Texpand, eltype(TM)}(A,Ã,G,g,ts,tsM1, expand) end end #pre-allocates for the vpexpand function VolumePartsIter(A::TA, Ã::TA, G::TA, ts::Tts, tsM1::Tts=ts.-1,#= ::Type{TM}, ::Type{TV}, ::Type{T}=eltype(TM)=#) where { TA<:AbstractMatrix, TM, TV, T, Tts<:AbstractVector} g = vec(G) expand = ( A = view(A, :, ts), LA = view(A, :, tsM1), à = view(Ã, :, ts), Là = view(Ã, :, tsM1), G = view(G, :, tsM1), index = ( A = to_indices(A, (:, ts)), LA = to_indices(A, (:, tsM1)), à = to_indices(Ã, (:, ts)), Là = to_indices(Ã, (:, tsM1)), G = to_indices(G, (:, tsM1)), )) Θ = VolumePartsIter(A, Ã, G, g, ts, tsM1, expand) return Θ end #basic constructor from dimension arguments function VolumePartsIter(T::Int, K::Int, ts::Vector{Int}, ::Type{Tvp}=PARAM[:itertype], ::Type{TM}=PARAM[:itergpu] ? CUDA.CuMatrix{Tvp} : Matrix{Tvp}, ::Type{TV}=PARAM[:itergpu] ? CUDA.CuVector{Tvp} : Vector{Tvp}, ) where {Tvp<:Real, TV<:AbstractVector{Tvp}, TM<:AbstractMatrix{Tvp}} A = TM(abs.(randn(Tvp, K,T))) à = TM(abs.(randn(Tvp, K,T))) G = TM(ones(Tvp, K, T-1)) return VolumePartsIter(A, Ã, G, ts, #=TM, TV, Tvp=#) end #needed due to the segemented array structure function Base.deepcopy(Θ::VolumePartsIter) A = deepcopy(Θ.A) à = deepcopy(Θ.Ã) G = deepcopy(Θ.G) return VolumePartsIter(A,Ã,G,Θ.ts,Θ.tsM1) end #invididual functions for computing volume constriubtions #genabsμₖ(Aᵢ, LAᵢ, wsᵢ, Rtwsᵢ, RLwsᵢ) = abs(LAᵢ*(Rtwsᵢ - RLwsᵢ)) + abs(Aᵢ*wsᵢ-LAᵢ*Rtwsᵢ) genabsμₖ(Aᵢ, LAᵢ, wsᵢ, RLwsᵢ) = abs(Aᵢ * wsᵢ - LAᵢ * RLwsᵢ) genabsμₖ(Aᵢ, LAᵢ, wsᵢ, Rtwsᵢ, RLwsᵢ) = genabsμₖ(Aᵢ, LAᵢ, wsᵢ, RLwsᵢ) signabsμₖ(Aᵢ, LAᵢ, wsᵢ, Rtwsᵢ, RLwsᵢ) = sign(Aᵢ*wsᵢ-LAᵢ*Rtwsᵢ) #derivitive #project the volume at a particular time t #WARNING- the below only works when sum(Lwsₜ)==sum(wsₜ). If this is not true, need to carry #an extra vector for the previous weights function projectt(Aᵢ, LAᵢ, wsₜ, Rtwsₜ, RLwsₜ, Mₜ) return Mₜ * genabsμₖ.(Aᵢ', LAᵢ', wsₜ, Rtwsₜ, RLwsₜ,) end function projectt(Aᵢ, LAᵢ, wsₜ, Rtwsₜ, RLwsₜ, ::Nothing) return genabsμₖ.(Aᵢ', LAᵢ', wsₜ, Rtwsₜ, RLwsₜ,) end #projectt(Aᵢ, LAᵢ, wsₜ, RLwsₜ, ::Nothing) = genabsμₖ.(Aᵢ', LAᵢ', wsₜ, RLwsₜ, 1.0 +sum(RLwsₜ)-sum(wsₜ)) #project the volume for each time t function projectbyt(A, xsection) dims = (K = size(A,1), T = size(A,2)) @unpack xws, xRtws, xRLws, xM = xsection #project the volume at each time t, then concatenate the results factored = reduce(vcat, broadcast(1:(dims.T-1), xws, xRtws,xRLws, xM) do t, xwsₜ, xRtwsₜ, xRLwsₜ, xMₜ projectt(A[:,t+1], A[:,t], xwsₜ, xRtwsₜ, xRLwsₜ, xMₜ) end) return factored end #the below is used to get the active volume genμₖ(Aᵢ, LAᵢ, wsᵢ, RLwsᵢ) = Aᵢ * wsᵢ - LAᵢ * RLwsᵢ genμₖ(Aᵢ, LAᵢ, wsᵢ, Rtwsᵢ, RLwsᵢ) = genμₖ(Aᵢ, LAᵢ, wsᵢ, RLwsᵢ) function projectpurchasest(Aᵢ, LAᵢ, wsₜ, Rtwsₜ, RLwsₜ, Mₜ) return Mₜ * genμₖ.(Aᵢ', LAᵢ', wsₜ, Rtwsₜ, RLwsₜ,) end function projectpurchasest(Aᵢ, LAᵢ, wsₜ, Rtwsₜ, RLwsₜ, ::Nothing) return genμₖ.(Aᵢ', LAᵢ', wsₜ, Rtwsₜ, RLwsₜ,) end function projectpurchasesbyt(A, xsection) dims = (K = size(A,1), T = size(A,2)) @unpack xws, xRtws, xRLws, xM = xsection #project the volume at each time t, then concatenate the results factored = reduce(vcat, broadcast(1:(dims.T-1), xws, xRtws,xRLws, xM) do t, xwsₜ, xRtwsₜ, xRLwsₜ, xMₜ projectpurchasest(A[:,t+1], A[:,t], xwsₜ, xRtwsₜ, xRLwsₜ, xMₜ) end) return factored end #this just runs the regression for the purposes of extracting the coefficients function coef(Θ::AbstractVolumePartsIter{TM,TV,T}, Xv::XYIterControl, RegressionType::Val) where {TM, TV, T} @unpack G,Ã,A = Θ dims = (K = size(A,1), T = size(A,2)) initializeÃandG!(Θ, Xv) RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) β = reg(RHS, Xv.ṽ, RegressionType) return β end #version that performs cross-sectional regressions as needed function (Θ::AbstractVolumePartsIter{TM,TV,T})(Xv::XYIterControl, RegressionType::Val) where {TM,TV,T} @unpack G,Ã,A = Θ dims = (K = size(A,1), T = size(A,2)) #set à to the cumulative product of G initializeÃandG!(Θ, Xv) #@info "type of Xv: $(typeof(Xv))" RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) #run the regression for A₁ β = reg(RHS, Xv.ṽ, RegressionType) #below shoudl be equivelent to A[:,1] .= β[1:dims.K] #β = (b->ifelse(b>0, b, b-100.)).(β) |> TV copyto!(A, 1, β, 1, dims.K) #A[:,1] .= parent(β)[1:dims.K] #absμ .= vec(sum(absμₖ,dims=2)) #@eval Main controlbeta = $(β |> Vector) absμ = RHS * β return absμ end function (Θ::AbstractVolumePartsIter{TM,TV,T})(Xv::XYIterControl, RegressionType::Val{:none}, noregressionbase::T = T(PARAM[:iternoregressionbase])) where {TM,TV,T} @unpack G,Ã,A = Θ dims = (K = size(A,1), T = size(A,2)) #set à to the cumulative product of G initializeÃandG!(Θ, Xv) #@info "type of Xv: $(typeof(Xv))" RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) #run the regression for A₁ βW̃ = (size(Xv.W̃,2) > 0) ? reg(Xv.W̃, Xv.ṽ, Val{:cholesky}()) : TV() β = [TV(ones(T, dims.K) .* noregressionbase); βW̃] #below shoudl be equivelent to A[:,1] .= β[1:dims.K] copyto!(A, 1, β, 1, dims.K) #A[:,1] .= parent(β)[1:dims.K] #absμ .= vec(sum(absμₖ,dims=2)) #@eval Main controlbeta = $(β |> Vector) absμ = RHS * β return absμ end #we can probably dispatch all of this just from Xv #NOTE: this is mainly for ZYGOTE function (Θ::AbstractVolumePartsIter{TM,TV,T})(G::Matrix{T}, Xv::XYIterControl, RegressionType::Val) where {TM,TV,T} dims = (K=size(Θ.A,1), T = size(Θ.A,2)) someones = ones(T, dims.K, 1) prodmatG = cumprodbyrow(G) à = hcat(someones, prodmatG) |> TM RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) #run the regression for A₁ β = reg(RHS, Xv.ṽ, RegressionType) #β = (b->ifelse(b>0, b, b-100.)).(β) |> TV #β = ones(size(RHS,2)) absμ = RHS * β return absμ end #we can probably dispatch all of this just from Xv #NOTE: this is mainly for ZYGOTE function (Θ::AbstractVolumePartsIter{TM,TV,T})(G::Matrix{T}, Xv::XYIterControl, RegressionType::Val{:none}, noregressionbase::T = T(PARAM[:iternoregressionbase])) where {TM,TV,T} dims = (K=size(Θ.A,1), T = size(Θ.A,2)) someones = ones(T, dims.K, 1) prodmatG = cumprodbyrow(G) à = hcat(someones, prodmatG) |> TM RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) #run the regression for A₁ βW̃ = (size(Xv.W̃,2) > 0) ? reg(Xv.W̃, Xv.ṽ, Val{:choleskyzygote}()) : TV() β = [TV(ones(T, dims.K) .* noregressionbase); βW̃] absμ = RHS * β return absμ end #NOTE: this is mainly for ZYGOTE function (Θ::AbstractVolumePartsIter{TM,TV,T})(G::Matrix{T}, Xv::XYIterControl, RegressionType::Val{:zygotefallbackreg}) where {TM,TV,T} dims = (K=size(Θ.A,1), T = size(Θ.A,2)) someones = ones(T, dims.K, 1) prodmatG = cumprodbyrow(G, limitA=true) à = hcat(someones, prodmatG) |> TM RHS::TM = hcat(projectbyt(Ã, Xv.xsection), Xv.W̃) #run the regression for A₁ β = reg(RHS, Xv.ṽ, RegressionType) #β = (b->ifelse(b>0, b, b-100.)).(β) |> TV absμ = RHS * β return absμ end function lossforzygote(G::Matrix{T}, Θ::AbstractVolumePartsIter{TM,TV,T}, Xv::XYIterControl,; RegressionType::Val=Val{PARAM[:iterregressiontypezygote]}()) where {TM,TV,T} #throw("hello") #ε = factored * Aₜ .- Xv.ṽ Σε2 = sum((Θ(G, Xv, RegressionType) .- Xv.ṽ).^2) #0.3ms return Σε2 end function ∇lossforzygote(Θ, Xv::AbstractXYIter{TM,TV,T}, GrowthType::Val; RegressionType=Val(PARAM[:iterregressiontypezygote]), GradType=Val(PARAM[:itergradtype])) where {TM,TV,T} #the actual gradient function function ∇loss(G::Matrix, GradType::Val{:zygote}) local grad try grad = gradient((G)->lossforzygote(G, Θ, Xv, RegressionType=RegressionType), G)[1] catch err (err == InterruptException()) && throw(err) errmessage = "$err" errmessage = length(errmessage) > 1000 ? errmessage[1:1000] : errmessage @warn "Gradient failed with error $errmessage\nAttempting fallback method" try grad = gradient((G)->lossforzygote(G, Θ, Xv, RegressionType=Val{:zygotefallbackreg}()), G)[1] catch err2 @error "Gradient failed with error $errmessage" exception=(err, catch_backtrace()) errmessage2 = "$err2" errmessage2 = length(errmessage2) > 1000 ? errmessage2[1:1000] : errmessage2 @error "Gradient fallback also failed with error $errmessage2" exception=(err2, catch_backtrace()) end end end function ∇loss(G::Matrix, GradType::Val{:ag}) return ∇lossag(G, Θ, Xv) end ∇loss(G::Matrix) = ∇loss(G::Matrix, GradType) function ∇vec!(out, x::TV, ::Val{:identity}) where TV <: Vector if !(x===Θ.g) #if they are the same array, no need to update copyto!(Θ.g, x) end copyto!(out, ∇loss(Θ.G)) #converts to TV return nothing end function ∇vec!(out, x::TV, ::Val{:identity}) where TV <: CuVector copyto!(Θ.g, x) G = Θ.G |> Matrix copyto!(out, ∇loss(G)) #converts to TV return nothing end function ∇vec!(out, x::TV, ::Val{:log}) where TV <: Vector #@info "∇vec! log" (x ≡ Θ.g) && throw("x and g should not be the same vector if growthtype≠identity") copyto!(Θ.g, exp.(x)) copyto!(out, ∇loss(Θ.G) .* Θ.G) #adjust by G since d(expy)/dx=expy*dy/dx return nothing end function ∇vec!(out, x::TV, ::Val{:log}) where TV <: CuVector (x ≡ Θ.g) && throw("x and g should not be the same vector if growthtype≠identity") copyto!(Θ.g, exp.(x)) G = Θ.G |> Matrix copyto!(out, ∇loss(G) .* G) #@info "sumabsout: $(sum(abs.(out)))" end ∇vec!(out, x) = ∇vec!(out, x |> TV, GrowthType) #this version performs the conversion ∇vec!(out, x::TV) = ∇vec!(out, x, GrowthType) return ∇vec! end #Updates G based on values of A #of course, this changes the RHS side of teh regressions, so any #factored cross-sections need to be recalculated updateGfromA!(args...;kwargs...) = throw("I dropped updateGfromA!. If needed, just replace with Θ.A[:,2:end] ./ Θ.A[:,1:(end-1)] (though be careful about à vs A)") #uses a base value of A and the G matrix to update all other values of A function updateAfromGAₜ!(Θ::VolumePartsIter, Xv::AbstractXYIter{TM,TV,T},t::Int) where {TM,TV,T} local A₀::TV local Aₜ::TV = Θ.A[:,t] dims = (T=size(Θ.A,2),K=size(Θ.A,1)) #compute the cumulative growth ΠG::TM = similar(Θ.A) ΠG[:,1] .= T(1.0) ΠG[:,2:end] .= cumprodbyrow(Θ.G) A₀ = Aₜ ./ ΠG[:,t] #identify the intial value of assets Θ.A .= A₀ .* ΠG #use the growth to compute A (vec(Θ.A[:,t]) ≈ Aₜ) || throw("vec(Θ.A[:,t]) ($(vec(Θ.A[:,t]))) ≠ Aₜ ($(Aₜ))! ") #quick integrity check Θ.A[:,t] .= Aₜ #preserve exact values to partly mitigate roundoff error return nothing end function updateAfromGAₜ!(Θ::VolumePartsIter, Xv::AbstractXYIter{TM,TV,T}, t::Int) where {TM<:CuMatrix,TV<:CuVector,T} local Aₜ::TV = Θ.A[:,t] dims = (T=size(Θ.A,2),K=size(Θ.A,1)) #compute the cumulative growth ΠG::TM = similar(Θ.A) ΠG[:,1] .= T(1.0) ΠG[:,2:end] .= cumprodbyrow(Θ.G) #ΠG .= hcat(CUDA.ones(T, dims.K, 1), cumprod(Θ.G,dims=2)) #A₀ = Aₜ ./ ΠG[:,t] #identify the intial value of assets #Θ.A .= A₀ .* ΠG A = (Aₜ ./ ΠG[:,t]) .* ΠG copyto!(Θ.A, A) #use the growth to compute A #@assert vec(Θ.A[:,t]) ≈ Aₜ #quick integrity check Θ.A[:,t] .= Aₜ #preserve exact values to partly mitigate roundoff error return nothing end #computs the loss, but does so #given the current values of A irrespective of G function lossfromA(Θ::AbstractVolumePartsIter{TM,TV,T}, Xv::XYIterControl, RegressionType::Val ) where {TM,TV,T} @unpack G,Ã,A = Θ dims = (K = size(A,1), T = size(A,2)) RHS::TM = hcat(projectbyt(A, Xv.xsection), Xv.W̃) #NOTE the use of A, not à β = reg(RHS, Xv.ṽ, RegressionType) absμ = RHS * β loss = sum((Xv.ṽ .- absμ) .^2 ) return loss end #NOTE: could be used in some future GPU version cudaGᵢ(Aᵢ,LAᵢ)= Aᵢ/LAᵢ cudafactorAᵢ(wsᵢ, RLwsᵢ, Gᵢ) = CUDA.abs(wsᵢ - RLwsᵢ/Gᵢ) cudafactorLAᵢ(wsᵢ, RLwsᵢ, Gᵢ) = CUDA.abs(Gᵢ*wsᵢ - RLwsᵢ) #takes a volume part object and writes the results to a df function formresults(panel::AbstractDataFrame, ms::MeasureSpec, Θ::AbstractVolumeParts{TM,TV,T}, Xv::XYIterControl, ::Val{:iter}) where {TM,TV,T} grossexposures = (Θ.A |> Matrix)' .* grossleverages(ms)' growthrates = vcat(zeros(eltype(grossexposures), size(grossexposures,2))', (Θ.G|>Matrix!)') Fcoefs::Vector{Symbol} = ms.Fξs Fgcoefs::Vector{Symbol} = (s->replace(string(s),r"^Z"=>"G_") |> Symbol).(Fcoefs) FWcoefs::Vector{Symbol} = [ms.FW...;] if length(Fcoefs) ≠ size(Θ.A,1) throw("Coeffcients not in expected form. Fcoefs: $Fcoefs") end resultsgrossexposures = DataFrame(grossexposures,Fcoefs) resultsgrowthrates = DataFrame(growthrates,Fgcoefs) tidx::Dict = gettidx(panel, ms) tidxinv::Vector{Date} = sort(collect(keys(tidx))) results::DataFrame = DataFrame(date=tidxinv) results = [results resultsgrossexposures resultsgrowthrates] return results end
[ 198, 198, 7249, 14701, 42670, 29993, 90, 198, 220, 220, 220, 21232, 27, 25, 23839, 46912, 11, 198, 220, 220, 220, 3195, 27, 25, 23839, 38469, 11, 198, 220, 220, 220, 309, 70, 1279, 25, 27741, 38469, 11, 198, 220, 220, 220, 309, 912, 27, 25, 23839, 38469, 11, 198, 220, 220, 220, 3567, 79, 392, 27, 25, 45, 2434, 51, 29291, 11, 198, 220, 220, 220, 309, 27, 25, 15633, 92, 1279, 25, 27741, 31715, 42670, 29993, 90, 15972, 11, 3195, 11, 309, 92, 628, 220, 1303, 17143, 7307, 198, 220, 317, 3712, 15972, 198, 220, 317, 136, 225, 3712, 15972, 1303, 22584, 1850, 317, 11, 973, 287, 50252, 507, 198, 220, 402, 3712, 15972, 628, 220, 308, 3712, 51, 70, 1303, 31364, 2196, 416, 6773, 710, 286, 402, 11, 815, 307, 1602, 425, 75, 298, 628, 220, 40379, 3712, 51, 912, 198, 220, 40379, 44, 16, 3712, 51, 912, 198, 220, 4292, 3712, 51, 11201, 392, 628, 220, 5391, 82, 3712, 45, 2434, 51, 29291, 628, 220, 1303, 5083, 23772, 2622, 284, 5911, 1288, 51, 138, 254, 198, 220, 2163, 14701, 42670, 29993, 7, 198, 220, 220, 220, 317, 3712, 15972, 11, 317, 136, 225, 3712, 15972, 11, 402, 3712, 15972, 11, 308, 3712, 51, 70, 11, 40379, 3712, 51, 912, 11, 40379, 44, 16, 3712, 51, 912, 11, 4292, 3712, 51, 11201, 392, 11, 198, 220, 220, 220, 7904, 6030, 90, 6849, 92, 796, 2099, 1659, 7, 38610, 7, 32, 11, 16, 22305, 810, 1391, 198, 220, 220, 220, 220, 220, 21232, 11, 3195, 11, 309, 70, 11, 309, 912, 11, 3567, 79, 392, 92, 628, 220, 220, 220, 1441, 649, 90, 15972, 11, 3195, 11, 309, 70, 11, 309, 912, 11, 3567, 79, 392, 11, 1288, 4906, 7, 15972, 38165, 7, 32, 11, 32, 136, 225, 11, 38, 11, 70, 11, 912, 11, 912, 44, 16, 11, 4292, 8, 198, 220, 886, 198, 437, 198, 198, 2, 3866, 12, 32332, 689, 329, 262, 410, 24900, 79, 392, 198, 8818, 14701, 42670, 29993, 7, 32, 3712, 5603, 11, 220, 317, 136, 225, 3712, 5603, 11, 402, 3712, 5603, 11, 40379, 3712, 51, 912, 11, 40379, 44, 16, 3712, 51, 912, 28, 912, 7874, 16, 11, 2, 28, 198, 220, 7904, 6030, 90, 15972, 5512, 7904, 6030, 90, 6849, 5512, 7904, 6030, 90, 51, 92, 28, 417, 4906, 7, 15972, 8, 46249, 8, 810, 1391, 198, 220, 220, 220, 21664, 27, 25, 23839, 46912, 11, 21232, 11, 3195, 11, 309, 11, 309, 912, 27, 25, 23839, 38469, 92, 628, 220, 308, 796, 43030, 7, 38, 8, 628, 220, 4292, 796, 357, 198, 220, 220, 220, 317, 796, 1570, 7, 32, 11, 1058, 11, 40379, 828, 198, 220, 220, 220, 9131, 796, 1570, 7, 32, 11, 1058, 11, 40379, 44, 16, 828, 198, 220, 220, 220, 317, 136, 225, 796, 1570, 7, 32, 136, 225, 11, 1058, 11, 40379, 828, 198, 220, 220, 220, 9131, 136, 225, 796, 1570, 7, 32, 136, 225, 11, 1058, 11, 40379, 44, 16, 828, 198, 220, 220, 220, 402, 796, 1570, 7, 38, 11, 1058, 11, 40379, 44, 16, 828, 198, 220, 220, 220, 6376, 220, 796, 357, 198, 220, 220, 220, 220, 220, 317, 796, 284, 62, 521, 1063, 7, 32, 11, 357, 45299, 40379, 36911, 198, 220, 220, 220, 220, 220, 9131, 796, 284, 62, 521, 1063, 7, 32, 11, 357, 45299, 40379, 44, 16, 36911, 198, 220, 220, 220, 220, 220, 317, 136, 225, 796, 284, 62, 521, 1063, 7, 32, 136, 225, 11, 357, 45299, 40379, 36911, 198, 220, 220, 220, 220, 220, 9131, 136, 225, 796, 284, 62, 521, 1063, 7, 32, 136, 225, 11, 357, 45299, 40379, 44, 16, 36911, 198, 220, 220, 220, 220, 220, 402, 796, 284, 62, 521, 1063, 7, 38, 11, 357, 45299, 40379, 44, 16, 36911, 198, 220, 220, 220, 15306, 628, 220, 7377, 246, 796, 14701, 42670, 29993, 7, 32, 11, 317, 136, 225, 11, 402, 11, 308, 11, 40379, 11, 40379, 44, 16, 11, 4292, 8, 198, 220, 1441, 7377, 246, 198, 437, 628, 198, 2, 35487, 23772, 422, 15793, 7159, 198, 8818, 14701, 42670, 29993, 7, 51, 3712, 5317, 11, 509, 3712, 5317, 11, 40379, 3712, 38469, 90, 5317, 5512, 7904, 6030, 90, 51, 36133, 92, 28, 27082, 2390, 58, 25, 2676, 4906, 4357, 198, 220, 7904, 6030, 90, 15972, 92, 28, 27082, 2390, 58, 25, 2676, 46999, 60, 5633, 29369, 5631, 13, 46141, 46912, 90, 51, 36133, 92, 1058, 24936, 90, 51, 36133, 5512, 198, 220, 7904, 6030, 90, 6849, 92, 28, 27082, 2390, 58, 25, 2676, 46999, 60, 5633, 29369, 5631, 13, 46141, 38469, 90, 51, 36133, 92, 1058, 20650, 90, 51, 36133, 5512, 198, 220, 220, 220, 1267, 810, 1391, 51, 36133, 27, 25, 15633, 11, 3195, 27, 25, 23839, 38469, 90, 51, 36133, 5512, 21232, 27, 25, 23839, 46912, 90, 51, 36133, 11709, 628, 220, 317, 796, 21232, 7, 8937, 12195, 25192, 77, 7, 51, 36133, 11, 509, 11, 51, 22305, 198, 220, 317, 136, 225, 796, 21232, 7, 8937, 12195, 25192, 77, 7, 51, 36133, 11, 509, 11, 51, 22305, 198, 220, 402, 796, 21232, 7, 1952, 7, 51, 36133, 11, 509, 11, 309, 12, 16, 4008, 628, 220, 1441, 14701, 42670, 29993, 7, 32, 11, 317, 136, 225, 11, 402, 11, 40379, 11, 1303, 28, 15972, 11, 3195, 11, 309, 36133, 46249, 8, 198, 437, 198, 198, 2, 27938, 2233, 284, 262, 384, 16025, 276, 7177, 4645, 198, 8818, 7308, 13, 22089, 30073, 7, 138, 246, 3712, 31715, 42670, 29993, 8, 198, 220, 317, 220, 796, 2769, 30073, 7, 138, 246, 13, 32, 8, 198, 220, 317, 136, 225, 796, 2769, 30073, 7, 138, 246, 13, 32, 136, 225, 8, 198, 220, 402, 796, 2769, 30073, 7, 138, 246, 13, 38, 8, 628, 198, 220, 1441, 14701, 42670, 29993, 7, 32, 11, 32, 136, 225, 11, 38, 11, 138, 246, 13, 912, 11, 138, 246, 13, 912, 44, 16, 8, 198, 437, 198, 198, 2, 16340, 312, 312, 723, 5499, 329, 14492, 6115, 1500, 380, 549, 45240, 198, 2, 5235, 8937, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 371, 4246, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 796, 2352, 7, 13534, 39611, 95, 9, 7, 49, 4246, 82, 39611, 95, 532, 45715, 18504, 39611, 95, 4008, 1343, 2352, 7, 32, 39611, 95, 9, 18504, 39611, 95, 12, 13534, 39611, 95, 9, 49, 4246, 82, 39611, 95, 8, 198, 5235, 8937, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 796, 2352, 7, 32, 39611, 95, 1635, 266, 82, 39611, 95, 532, 9131, 39611, 95, 1635, 45715, 18504, 39611, 95, 8, 198, 5235, 8937, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 371, 4246, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 220, 796, 2429, 8937, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 198, 12683, 8937, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 371, 4246, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 796, 1051, 7, 32, 39611, 95, 9, 18504, 39611, 95, 12, 13534, 39611, 95, 9, 49, 4246, 82, 39611, 95, 8, 1303, 1082, 452, 1800, 198, 198, 2, 16302, 262, 6115, 379, 257, 1948, 640, 256, 198, 2, 31502, 12, 262, 2174, 691, 2499, 618, 2160, 7, 43, 18504, 158, 224, 250, 8, 855, 16345, 7, 18504, 158, 224, 250, 737, 1002, 428, 318, 407, 2081, 11, 761, 284, 3283, 198, 2, 272, 3131, 15879, 329, 262, 2180, 19590, 198, 8818, 1628, 83, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 220, 337, 158, 224, 250, 8, 628, 220, 1441, 337, 158, 224, 250, 1635, 2429, 8937, 34703, 158, 224, 244, 12195, 32, 39611, 95, 3256, 9131, 39611, 95, 3256, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 35751, 198, 437, 198, 8818, 1628, 83, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 7904, 18465, 8, 198, 220, 1441, 2429, 8937, 34703, 158, 224, 244, 12195, 32, 39611, 95, 3256, 9131, 39611, 95, 3256, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 35751, 198, 437, 198, 198, 2, 16302, 83, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 7904, 18465, 8, 796, 2429, 8937, 34703, 158, 224, 244, 12195, 32, 39611, 95, 3256, 9131, 39611, 95, 3256, 266, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 352, 13, 15, 1343, 16345, 7, 7836, 18504, 158, 224, 250, 13219, 16345, 7, 18504, 158, 224, 250, 4008, 198, 198, 2, 16302, 262, 6115, 329, 1123, 640, 256, 198, 8818, 1628, 1525, 83, 7, 32, 11, 2124, 5458, 8, 198, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 198, 220, 2488, 403, 8002, 2124, 18504, 11, 2124, 49, 4246, 82, 11, 2124, 7836, 18504, 11, 2124, 44, 796, 2124, 5458, 628, 220, 1303, 16302, 262, 6115, 379, 1123, 640, 256, 11, 788, 1673, 36686, 378, 262, 2482, 198, 220, 1109, 1850, 796, 220, 4646, 7, 85, 9246, 11, 7025, 7, 16, 37498, 67, 12078, 13, 51, 12, 16, 828, 2124, 18504, 11, 2124, 49, 4246, 82, 11, 87, 7836, 18504, 11, 2124, 44, 8, 466, 256, 11, 2124, 18504, 158, 224, 250, 11, 2124, 49, 4246, 82, 158, 224, 250, 11, 2124, 7836, 18504, 158, 224, 250, 11, 2124, 44, 158, 224, 250, 198, 220, 220, 220, 1628, 83, 7, 32, 58, 45299, 83, 10, 16, 4357, 317, 58, 45299, 83, 4357, 2124, 18504, 158, 224, 250, 11, 2124, 49, 4246, 82, 158, 224, 250, 11, 2124, 7836, 18504, 158, 224, 250, 11, 2124, 44, 158, 224, 250, 8, 198, 220, 886, 8, 628, 220, 1441, 1109, 1850, 198, 437, 198, 198, 2, 1169, 2174, 318, 973, 284, 651, 262, 4075, 6115, 198, 5235, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 796, 317, 39611, 95, 1635, 266, 82, 39611, 95, 532, 9131, 39611, 95, 1635, 45715, 18504, 39611, 95, 198, 5235, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 371, 4246, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 220, 796, 2429, 34703, 158, 224, 244, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 39611, 95, 11, 45715, 18504, 39611, 95, 8, 198, 8818, 1628, 79, 2575, 292, 395, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 220, 337, 158, 224, 250, 8, 628, 220, 1441, 337, 158, 224, 250, 1635, 2429, 34703, 158, 224, 244, 12195, 32, 39611, 95, 3256, 9131, 39611, 95, 3256, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 35751, 198, 437, 198, 8818, 1628, 79, 2575, 292, 395, 7, 32, 39611, 95, 11, 9131, 39611, 95, 11, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 11, 7904, 18465, 8, 198, 220, 1441, 2429, 34703, 158, 224, 244, 12195, 32, 39611, 95, 3256, 9131, 39611, 95, 3256, 266, 82, 158, 224, 250, 11, 371, 4246, 82, 158, 224, 250, 11, 45715, 18504, 158, 224, 250, 35751, 198, 437, 198, 8818, 1628, 79, 2575, 1386, 1525, 83, 7, 32, 11, 2124, 5458, 8, 198, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 198, 220, 2488, 403, 8002, 2124, 18504, 11, 2124, 49, 4246, 82, 11, 2124, 7836, 18504, 11, 2124, 44, 796, 2124, 5458, 628, 220, 1303, 16302, 262, 6115, 379, 1123, 640, 256, 11, 788, 1673, 36686, 378, 262, 2482, 198, 220, 1109, 1850, 796, 220, 4646, 7, 85, 9246, 11, 7025, 7, 16, 37498, 67, 12078, 13, 51, 12, 16, 828, 2124, 18504, 11, 2124, 49, 4246, 82, 11, 87, 7836, 18504, 11, 2124, 44, 8, 466, 256, 11, 2124, 18504, 158, 224, 250, 11, 2124, 49, 4246, 82, 158, 224, 250, 11, 2124, 7836, 18504, 158, 224, 250, 11, 2124, 44, 158, 224, 250, 198, 220, 220, 220, 1628, 79, 2575, 292, 395, 7, 32, 58, 45299, 83, 10, 16, 4357, 317, 58, 45299, 83, 4357, 2124, 18504, 158, 224, 250, 11, 2124, 49, 4246, 82, 158, 224, 250, 11, 2124, 7836, 18504, 158, 224, 250, 11, 2124, 44, 158, 224, 250, 8, 198, 220, 886, 8, 628, 220, 1441, 1109, 1850, 198, 437, 628, 198, 2, 5661, 655, 4539, 262, 20683, 329, 262, 4959, 286, 37895, 262, 44036, 198, 8818, 763, 891, 7, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 1395, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 3310, 2234, 6030, 3712, 7762, 8, 810, 1391, 15972, 11, 3195, 11, 309, 92, 628, 220, 2488, 403, 8002, 402, 11, 32, 136, 225, 11, 32, 796, 7377, 246, 198, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 198, 220, 41216, 5746, 392, 38, 0, 7, 138, 246, 11, 1395, 85, 8, 198, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 27169, 796, 842, 7, 49, 7998, 11, 1395, 85, 13, 85, 136, 225, 11, 3310, 2234, 6030, 8, 198, 220, 1441, 27169, 198, 437, 628, 198, 2, 9641, 326, 17706, 3272, 12, 44330, 50252, 507, 355, 2622, 198, 8818, 357, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 92, 5769, 55, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 3310, 2234, 6030, 3712, 7762, 8, 810, 1391, 15972, 11, 6849, 11, 51, 92, 198, 220, 2488, 403, 8002, 402, 11, 32, 136, 225, 11, 32, 796, 7377, 246, 628, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 628, 220, 1303, 2617, 317, 136, 225, 284, 262, 23818, 1720, 286, 402, 198, 220, 41216, 5746, 392, 38, 0, 7, 138, 246, 11, 1395, 85, 8, 198, 220, 1303, 31, 10951, 366, 4906, 286, 1395, 85, 25, 29568, 4906, 1659, 7, 55, 85, 4008, 1, 628, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 1303, 5143, 262, 20683, 329, 317, 158, 224, 223, 198, 220, 27169, 796, 842, 7, 49, 7998, 11, 1395, 85, 13, 85, 136, 225, 11, 3310, 2234, 6030, 8, 198, 220, 1303, 35993, 427, 2778, 75, 307, 1602, 425, 75, 298, 284, 317, 58, 45299, 16, 60, 764, 28, 27169, 58, 16, 25, 67, 12078, 13, 42, 60, 198, 220, 1303, 26638, 796, 357, 65, 3784, 361, 17772, 7, 65, 29, 15, 11, 275, 11, 275, 12, 3064, 2014, 737, 7, 26638, 8, 930, 29, 3195, 628, 220, 4866, 1462, 0, 7, 32, 11, 352, 11, 27169, 11, 352, 11, 5391, 82, 13, 42, 8, 198, 220, 1303, 32, 58, 45299, 16, 60, 764, 28, 2560, 7, 26638, 38381, 16, 25, 67, 12078, 13, 42, 60, 628, 198, 220, 1303, 8937, 34703, 764, 28, 43030, 7, 16345, 7, 8937, 34703, 158, 224, 244, 11, 67, 12078, 28, 17, 4008, 198, 220, 1303, 31, 18206, 8774, 1630, 31361, 796, 29568, 26638, 930, 29, 20650, 8, 198, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 198, 220, 1441, 2352, 34703, 198, 437, 198, 198, 8818, 357, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 92, 5769, 55, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 3310, 2234, 6030, 3712, 7762, 90, 25, 23108, 5512, 198, 220, 299, 382, 32383, 8692, 3712, 51, 796, 309, 7, 27082, 2390, 58, 25, 270, 1142, 382, 32383, 8692, 60, 4008, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 2488, 403, 8002, 402, 11, 32, 136, 225, 11, 32, 796, 7377, 246, 628, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 628, 220, 1303, 2617, 317, 136, 225, 284, 262, 23818, 1720, 286, 402, 198, 220, 41216, 5746, 392, 38, 0, 7, 138, 246, 11, 1395, 85, 8, 198, 220, 1303, 31, 10951, 366, 4906, 286, 1395, 85, 25, 29568, 4906, 1659, 7, 55, 85, 4008, 1, 628, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 1303, 5143, 262, 20683, 329, 317, 158, 224, 223, 628, 220, 27169, 54, 136, 225, 796, 357, 7857, 7, 55, 85, 13, 54, 136, 225, 11, 17, 8, 1875, 657, 8, 5633, 842, 7, 55, 85, 13, 54, 136, 225, 11, 1395, 85, 13, 85, 136, 225, 11, 3254, 90, 25, 354, 4316, 2584, 92, 28955, 1058, 3195, 3419, 198, 220, 27169, 796, 685, 6849, 7, 1952, 7, 51, 11, 5391, 82, 13, 42, 8, 764, 9, 299, 382, 32383, 8692, 1776, 27169, 54, 136, 225, 60, 198, 220, 1303, 35993, 427, 2778, 75, 307, 1602, 425, 75, 298, 284, 317, 58, 45299, 16, 60, 764, 28, 27169, 58, 16, 25, 67, 12078, 13, 42, 60, 198, 220, 4866, 1462, 0, 7, 32, 11, 352, 11, 27169, 11, 352, 11, 5391, 82, 13, 42, 8, 198, 220, 1303, 32, 58, 45299, 16, 60, 764, 28, 2560, 7, 26638, 38381, 16, 25, 67, 12078, 13, 42, 60, 628, 198, 220, 1303, 8937, 34703, 764, 28, 43030, 7, 16345, 7, 8937, 34703, 158, 224, 244, 11, 67, 12078, 28, 17, 4008, 198, 220, 1303, 31, 18206, 8774, 1630, 31361, 796, 29568, 26638, 930, 29, 20650, 8, 198, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 198, 220, 1441, 2352, 34703, 198, 437, 198, 198, 2, 732, 460, 2192, 27965, 477, 286, 428, 655, 422, 1395, 85, 198, 2, 16580, 25, 428, 318, 8384, 329, 1168, 56, 38, 23051, 198, 8818, 357, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 92, 5769, 38, 3712, 46912, 90, 51, 5512, 198, 220, 220, 220, 1395, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 220, 220, 3310, 2234, 6030, 3712, 7762, 8, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 5391, 82, 796, 357, 42, 28, 7857, 7, 138, 246, 13, 32, 11, 16, 828, 309, 796, 2546, 7, 138, 246, 13, 32, 11, 17, 4008, 628, 220, 617, 1952, 796, 3392, 7, 51, 11, 5391, 82, 13, 42, 11, 352, 8, 198, 220, 40426, 6759, 38, 796, 269, 931, 14892, 1525, 808, 7, 38, 8, 198, 220, 317, 136, 225, 796, 289, 9246, 7, 11246, 1952, 11, 40426, 6759, 38, 8, 930, 29, 21232, 628, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 1303, 5143, 262, 20683, 329, 317, 158, 224, 223, 198, 220, 27169, 796, 842, 7, 49, 7998, 11, 1395, 85, 13, 85, 136, 225, 11, 3310, 2234, 6030, 8, 198, 220, 1303, 26638, 796, 357, 65, 3784, 361, 17772, 7, 65, 29, 15, 11, 275, 11, 275, 12, 3064, 2014, 737, 7, 26638, 8, 930, 29, 3195, 628, 220, 1303, 26638, 796, 3392, 7, 7857, 7, 49, 7998, 11, 17, 4008, 198, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 198, 220, 1441, 2352, 34703, 198, 437, 198, 198, 2, 732, 460, 2192, 27965, 477, 286, 428, 655, 422, 1395, 85, 198, 2, 16580, 25, 428, 318, 8384, 329, 1168, 56, 38, 23051, 198, 8818, 357, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 92, 5769, 38, 3712, 46912, 90, 51, 5512, 198, 220, 220, 220, 1395, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 220, 220, 3310, 2234, 6030, 3712, 7762, 90, 25, 23108, 5512, 198, 220, 220, 220, 299, 382, 32383, 8692, 3712, 51, 796, 309, 7, 27082, 2390, 58, 25, 270, 1142, 382, 32383, 8692, 60, 4008, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 5391, 82, 796, 357, 42, 28, 7857, 7, 138, 246, 13, 32, 11, 16, 828, 309, 796, 2546, 7, 138, 246, 13, 32, 11, 17, 4008, 628, 220, 617, 1952, 796, 3392, 7, 51, 11, 5391, 82, 13, 42, 11, 352, 8, 198, 220, 40426, 6759, 38, 796, 269, 931, 14892, 1525, 808, 7, 38, 8, 198, 220, 317, 136, 225, 796, 289, 9246, 7, 11246, 1952, 11, 40426, 6759, 38, 8, 930, 29, 21232, 628, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 1303, 5143, 262, 20683, 329, 317, 158, 224, 223, 198, 220, 27169, 54, 136, 225, 796, 357, 7857, 7, 55, 85, 13, 54, 136, 225, 11, 17, 8, 1875, 657, 8, 5633, 842, 7, 55, 85, 13, 54, 136, 225, 11, 1395, 85, 13, 85, 136, 225, 11, 3254, 90, 25, 354, 4316, 2584, 7357, 70, 1258, 92, 28955, 1058, 3195, 3419, 198, 220, 27169, 796, 685, 6849, 7, 1952, 7, 51, 11, 5391, 82, 13, 42, 8, 764, 9, 299, 382, 32383, 8692, 1776, 27169, 54, 136, 225, 60, 628, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 198, 220, 1441, 2352, 34703, 198, 437, 198, 198, 2, 16580, 25, 428, 318, 8384, 329, 1168, 56, 38, 23051, 198, 8818, 357, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 92, 5769, 38, 3712, 46912, 90, 51, 5512, 198, 220, 220, 220, 1395, 85, 3712, 34278, 29993, 15988, 11, 198, 220, 220, 220, 3310, 2234, 6030, 3712, 7762, 90, 25, 7357, 23442, 891, 439, 1891, 2301, 30072, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 5391, 82, 796, 357, 42, 28, 7857, 7, 138, 246, 13, 32, 11, 16, 828, 309, 796, 2546, 7, 138, 246, 13, 32, 11, 17, 4008, 628, 220, 617, 1952, 796, 3392, 7, 51, 11, 5391, 82, 13, 42, 11, 352, 8, 198, 220, 40426, 6759, 38, 796, 269, 931, 14892, 1525, 808, 7, 38, 11, 4179, 32, 28, 7942, 8, 198, 220, 317, 136, 225, 796, 289, 9246, 7, 11246, 1952, 11, 40426, 6759, 38, 8, 930, 29, 21232, 628, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 136, 225, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 628, 220, 1303, 5143, 262, 20683, 329, 317, 158, 224, 223, 198, 220, 27169, 796, 842, 7, 49, 7998, 11, 1395, 85, 13, 85, 136, 225, 11, 3310, 2234, 6030, 8, 198, 220, 1303, 26638, 796, 357, 65, 3784, 361, 17772, 7, 65, 29, 15, 11, 275, 11, 275, 12, 3064, 2014, 737, 7, 26638, 8, 930, 29, 3195, 628, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 198, 220, 1441, 2352, 34703, 198, 437, 198, 198, 8818, 2994, 1640, 7357, 70, 1258, 7, 38, 3712, 46912, 90, 51, 5512, 7377, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 1395, 85, 3712, 34278, 29993, 15988, 11, 26, 198, 220, 3310, 2234, 6030, 3712, 7762, 28, 7762, 90, 27082, 2390, 58, 25, 2676, 2301, 2234, 4906, 7357, 70, 1258, 48999, 28955, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 1303, 16939, 7203, 31373, 4943, 628, 220, 1303, 30950, 796, 1109, 1850, 1635, 317, 158, 224, 250, 764, 12, 1395, 85, 13, 85, 136, 225, 198, 220, 7377, 96, 30950, 17, 796, 2160, 19510, 138, 246, 7, 38, 11, 1395, 85, 11, 3310, 2234, 6030, 8, 764, 12, 1395, 85, 13, 85, 136, 225, 737, 61, 17, 8, 1303, 15, 13, 18, 907, 628, 220, 1441, 7377, 96, 30950, 17, 198, 437, 198, 198, 8818, 18872, 229, 22462, 1640, 7357, 70, 1258, 7, 138, 246, 11, 1395, 85, 3712, 23839, 34278, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 220, 19045, 6030, 3712, 7762, 26, 198, 220, 220, 220, 3310, 2234, 6030, 28, 7762, 7, 27082, 2390, 58, 25, 2676, 2301, 2234, 4906, 7357, 70, 1258, 46570, 198, 220, 220, 220, 17701, 6030, 28, 7762, 7, 27082, 2390, 58, 25, 2676, 9744, 4906, 60, 4008, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 1303, 1169, 4036, 31312, 2163, 628, 220, 2163, 18872, 229, 22462, 7, 38, 3712, 46912, 11, 17701, 6030, 3712, 7762, 90, 25, 7357, 70, 1258, 30072, 198, 220, 220, 220, 1957, 3915, 628, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 3915, 796, 31312, 19510, 38, 8, 3784, 22462, 1640, 7357, 70, 1258, 7, 38, 11, 7377, 246, 11, 1395, 85, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3310, 2234, 6030, 28, 8081, 2234, 6030, 828, 402, 38381, 16, 60, 198, 220, 220, 220, 4929, 11454, 198, 220, 220, 220, 220, 220, 357, 8056, 6624, 4225, 3622, 16922, 28955, 11405, 3714, 7, 8056, 8, 198, 220, 220, 220, 220, 220, 11454, 20500, 796, 17971, 8056, 1, 198, 220, 220, 220, 220, 220, 11454, 20500, 796, 4129, 7, 8056, 20500, 8, 220, 1875, 8576, 5633, 11454, 20500, 58, 16, 25, 12825, 60, 1058, 11454, 20500, 198, 220, 220, 220, 220, 220, 2488, 40539, 366, 42731, 1153, 4054, 351, 4049, 720, 8056, 20500, 59, 77, 37177, 278, 2121, 1891, 2446, 1, 198, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 3915, 796, 31312, 19510, 38, 8, 3784, 22462, 1640, 7357, 70, 1258, 7, 38, 11, 7377, 246, 11, 1395, 85, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3310, 2234, 6030, 28, 7762, 90, 25, 7357, 23442, 891, 439, 1891, 2301, 92, 3419, 828, 402, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 4929, 11454, 17, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 42731, 1153, 4054, 351, 4049, 720, 8056, 20500, 1, 6631, 16193, 8056, 11, 4929, 62, 1891, 40546, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 20500, 17, 796, 17971, 8056, 17, 1, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 20500, 17, 796, 4129, 7, 8056, 20500, 17, 8, 220, 1875, 8576, 5633, 11454, 20500, 17, 58, 16, 25, 12825, 60, 1058, 11454, 20500, 17, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 42731, 1153, 2121, 1891, 635, 4054, 351, 4049, 720, 8056, 20500, 17, 1, 6631, 16193, 8056, 17, 11, 4929, 62, 1891, 40546, 28955, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 886, 628, 220, 2163, 18872, 229, 22462, 7, 38, 3712, 46912, 11, 17701, 6030, 3712, 7762, 90, 25, 363, 30072, 198, 220, 220, 1441, 18872, 229, 22462, 363, 7, 38, 11, 7377, 246, 11, 1395, 85, 8, 198, 220, 886, 628, 198, 220, 18872, 229, 22462, 7, 38, 3712, 46912, 8, 796, 18872, 229, 22462, 7, 38, 3712, 46912, 11, 17701, 6030, 8, 628, 198, 220, 2163, 18872, 229, 35138, 0, 7, 448, 11, 2124, 3712, 6849, 11, 7904, 7762, 90, 25, 738, 414, 30072, 810, 3195, 1279, 25, 20650, 628, 220, 220, 220, 611, 5145, 7, 87, 18604, 138, 246, 13, 70, 8, 1303, 361, 484, 389, 262, 976, 7177, 11, 645, 761, 284, 4296, 198, 220, 220, 220, 220, 220, 4866, 1462, 0, 7, 138, 246, 13, 70, 11, 2124, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 4866, 1462, 0, 7, 448, 11, 18872, 229, 22462, 7, 138, 246, 13, 38, 4008, 1303, 1102, 24040, 284, 3195, 628, 220, 220, 220, 1441, 2147, 198, 220, 886, 628, 220, 2163, 18872, 229, 35138, 0, 7, 448, 11, 2124, 3712, 6849, 11, 7904, 7762, 90, 25, 738, 414, 30072, 810, 3195, 1279, 25, 14496, 38469, 628, 220, 220, 220, 4866, 1462, 0, 7, 138, 246, 13, 70, 11, 2124, 8, 198, 220, 220, 220, 402, 796, 7377, 246, 13, 38, 930, 29, 24936, 198, 220, 220, 220, 4866, 1462, 0, 7, 448, 11, 18872, 229, 22462, 7, 38, 4008, 1303, 1102, 24040, 284, 3195, 628, 220, 220, 220, 1441, 2147, 198, 220, 886, 628, 220, 2163, 18872, 229, 35138, 0, 7, 448, 11, 2124, 3712, 6849, 11, 7904, 7762, 90, 25, 6404, 30072, 810, 3195, 1279, 25, 20650, 198, 220, 220, 220, 1303, 31, 10951, 366, 24861, 229, 35138, 0, 2604, 1, 198, 220, 220, 220, 357, 87, 38243, 7377, 246, 13, 70, 8, 11405, 3714, 7203, 87, 290, 308, 815, 407, 307, 262, 976, 15879, 611, 3349, 4906, 35705, 254, 738, 414, 4943, 198, 220, 220, 220, 4866, 1462, 0, 7, 138, 246, 13, 70, 11, 1033, 12195, 87, 4008, 628, 220, 220, 220, 4866, 1462, 0, 7, 448, 11, 18872, 229, 22462, 7, 138, 246, 13, 38, 8, 764, 9, 7377, 246, 13, 38, 8, 1303, 23032, 416, 402, 1201, 288, 7, 1069, 9078, 20679, 34350, 28, 1069, 9078, 9, 9892, 14, 34350, 628, 220, 220, 220, 1441, 2147, 198, 220, 886, 628, 220, 2163, 18872, 229, 35138, 0, 7, 448, 11, 2124, 3712, 6849, 11, 7904, 7762, 90, 25, 6404, 30072, 810, 3195, 1279, 25, 14496, 38469, 198, 220, 220, 220, 357, 87, 38243, 7377, 246, 13, 70, 8, 11405, 3714, 7203, 87, 290, 308, 815, 407, 307, 262, 976, 15879, 611, 3349, 4906, 35705, 254, 738, 414, 4943, 198, 220, 220, 220, 4866, 1462, 0, 7, 138, 246, 13, 70, 11, 1033, 12195, 87, 4008, 198, 220, 220, 220, 402, 796, 7377, 246, 13, 38, 930, 29, 24936, 198, 220, 220, 220, 4866, 1462, 0, 7, 448, 11, 18872, 229, 22462, 7, 38, 8, 764, 9, 402, 8, 198, 220, 220, 220, 1303, 31, 10951, 366, 16345, 8937, 448, 25, 29568, 16345, 7, 8937, 12195, 448, 4008, 16725, 198, 220, 886, 628, 198, 220, 18872, 229, 35138, 0, 7, 448, 11, 2124, 8, 796, 18872, 229, 35138, 0, 7, 448, 11, 2124, 930, 29, 3195, 11, 19045, 6030, 8, 1303, 5661, 2196, 17706, 262, 11315, 198, 220, 18872, 229, 35138, 0, 7, 448, 11, 2124, 3712, 6849, 8, 796, 18872, 229, 35138, 0, 7, 448, 11, 2124, 11, 19045, 6030, 8, 628, 220, 1441, 18872, 229, 35138, 0, 198, 437, 198, 198, 2, 4933, 19581, 402, 1912, 319, 3815, 286, 317, 198, 2, 1659, 1781, 11, 428, 2458, 262, 371, 7998, 1735, 286, 573, 71, 50252, 507, 11, 523, 597, 198, 2, 22584, 1850, 3272, 12, 23946, 761, 284, 307, 42653, 49262, 198, 19119, 38, 6738, 32, 0, 7, 22046, 986, 26, 46265, 22046, 23029, 796, 3714, 7203, 40, 5710, 4296, 38, 6738, 32, 43179, 1002, 2622, 11, 655, 6330, 198, 220, 351, 7377, 246, 13, 32, 58, 45299, 17, 25, 437, 60, 24457, 7377, 246, 13, 32, 58, 45299, 16, 37498, 437, 12, 16, 15437, 357, 2016, 307, 8161, 546, 317, 136, 225, 3691, 317, 8, 4943, 628, 198, 2, 2664, 257, 2779, 1988, 286, 317, 290, 262, 402, 17593, 284, 4296, 477, 584, 3815, 286, 317, 198, 8818, 4296, 32, 6738, 9273, 158, 224, 250, 0, 7, 138, 246, 3712, 31715, 42670, 29993, 11, 1395, 85, 3712, 23839, 34278, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 83, 3712, 5317, 8, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 1957, 317, 158, 224, 222, 3712, 6849, 198, 220, 1957, 317, 158, 224, 250, 3712, 6849, 796, 7377, 246, 13, 32, 58, 45299, 83, 60, 198, 220, 5391, 82, 796, 357, 51, 28, 7857, 7, 138, 246, 13, 32, 11, 17, 828, 42, 28, 7857, 7, 138, 246, 13, 32, 11, 16, 4008, 628, 220, 1303, 5589, 1133, 262, 23818, 3349, 198, 220, 7377, 254, 38, 3712, 15972, 796, 2092, 7, 138, 246, 13, 32, 8, 198, 220, 7377, 254, 38, 58, 45299, 16, 60, 764, 28, 309, 7, 16, 13, 15, 8, 198, 220, 7377, 254, 38, 58, 45299, 17, 25, 437, 60, 764, 28, 269, 931, 14892, 1525, 808, 7, 138, 246, 13, 38, 8, 628, 198, 220, 317, 158, 224, 222, 796, 317, 158, 224, 250, 24457, 7377, 254, 38, 58, 45299, 83, 60, 1303, 738, 1958, 262, 493, 498, 1988, 286, 6798, 628, 220, 7377, 246, 13, 32, 764, 28, 317, 158, 224, 222, 764, 9, 7377, 254, 38, 1303, 1904, 262, 3349, 284, 24061, 317, 198, 220, 357, 35138, 7, 138, 246, 13, 32, 58, 45299, 83, 12962, 15139, 230, 317, 158, 224, 250, 8, 8614, 3714, 7203, 35138, 7, 138, 246, 13, 32, 58, 45299, 83, 12962, 7198, 7, 35138, 7, 138, 246, 13, 32, 58, 45299, 83, 60, 22305, 15139, 254, 317, 158, 224, 250, 7198, 7, 32, 158, 224, 250, 4008, 0, 366, 8, 1303, 24209, 11540, 2198, 198, 220, 7377, 246, 13, 32, 58, 45299, 83, 60, 764, 28, 317, 158, 224, 250, 1303, 18302, 3760, 2748, 3815, 284, 11476, 24237, 2835, 2364, 4049, 628, 220, 1441, 2147, 198, 437, 198, 198, 8818, 4296, 32, 6738, 9273, 158, 224, 250, 0, 7, 138, 246, 3712, 31715, 42670, 29993, 11, 1395, 85, 3712, 23839, 34278, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 198, 220, 256, 3712, 5317, 8, 810, 1391, 15972, 27, 25, 46141, 46912, 11, 6849, 27, 25, 46141, 38469, 11, 51, 92, 628, 220, 1957, 317, 158, 224, 250, 3712, 6849, 796, 7377, 246, 13, 32, 58, 45299, 83, 60, 198, 220, 5391, 82, 796, 357, 51, 28, 7857, 7, 138, 246, 13, 32, 11, 17, 828, 42, 28, 7857, 7, 138, 246, 13, 32, 11, 16, 4008, 628, 220, 1303, 5589, 1133, 262, 23818, 3349, 198, 220, 7377, 254, 38, 3712, 15972, 796, 2092, 7, 138, 246, 13, 32, 8, 198, 220, 7377, 254, 38, 58, 45299, 16, 60, 764, 28, 309, 7, 16, 13, 15, 8, 198, 220, 7377, 254, 38, 58, 45299, 17, 25, 437, 60, 764, 28, 269, 931, 14892, 1525, 808, 7, 138, 246, 13, 38, 8, 198, 220, 1303, 138, 254, 38, 764, 28, 289, 9246, 7, 43633, 5631, 13, 1952, 7, 51, 11, 5391, 82, 13, 42, 11, 352, 828, 269, 931, 14892, 7, 138, 246, 13, 38, 11, 67, 12078, 28, 17, 4008, 628, 220, 1303, 32, 158, 224, 222, 796, 317, 158, 224, 250, 24457, 7377, 254, 38, 58, 45299, 83, 60, 1303, 738, 1958, 262, 493, 498, 1988, 286, 6798, 198, 220, 1303, 138, 246, 13, 32, 764, 28, 317, 158, 224, 222, 764, 9, 7377, 254, 38, 198, 220, 317, 796, 357, 32, 158, 224, 250, 24457, 7377, 254, 38, 58, 45299, 83, 12962, 764, 9, 7377, 254, 38, 198, 220, 4866, 1462, 0, 7, 138, 246, 13, 32, 11, 317, 8, 1303, 1904, 262, 3349, 284, 24061, 317, 198, 220, 1303, 31, 30493, 43030, 7, 138, 246, 13, 32, 58, 45299, 83, 12962, 15139, 230, 317, 158, 224, 250, 1303, 24209, 11540, 2198, 198, 220, 7377, 246, 13, 32, 58, 45299, 83, 60, 764, 28, 317, 158, 224, 250, 1303, 18302, 3760, 2748, 3815, 284, 11476, 24237, 2835, 2364, 4049, 628, 220, 1441, 2147, 198, 437, 198, 198, 2, 785, 1996, 82, 262, 2994, 11, 475, 857, 523, 198, 2, 35569, 262, 1459, 3815, 286, 317, 40611, 286, 402, 198, 8818, 2994, 6738, 32, 7, 138, 246, 3712, 23839, 31715, 42670, 29993, 90, 15972, 11, 6849, 11, 51, 5512, 1395, 85, 3712, 34278, 29993, 15988, 11, 3310, 2234, 6030, 3712, 7762, 198, 220, 220, 220, 1267, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 2488, 403, 8002, 402, 11, 32, 136, 225, 11, 32, 796, 7377, 246, 198, 220, 5391, 82, 796, 357, 42, 796, 2546, 7, 32, 11, 16, 828, 309, 796, 2546, 7, 32, 11, 17, 4008, 198, 220, 371, 7998, 3712, 15972, 796, 289, 9246, 7, 16302, 1525, 83, 7, 32, 11, 1395, 85, 13, 87, 5458, 828, 1395, 85, 13, 54, 136, 225, 8, 1303, 16580, 262, 779, 286, 317, 11, 407, 317, 136, 225, 198, 220, 27169, 796, 842, 7, 49, 7998, 11, 1395, 85, 13, 85, 136, 225, 11, 3310, 2234, 6030, 8, 198, 220, 2352, 34703, 796, 371, 7998, 1635, 27169, 628, 220, 2994, 796, 2160, 19510, 55, 85, 13, 85, 136, 225, 764, 12, 2352, 34703, 8, 764, 61, 17, 1267, 628, 220, 1441, 2994, 198, 437, 628, 198, 198, 2, 16580, 25, 714, 307, 973, 287, 617, 2003, 11362, 2196, 198, 66, 15339, 38, 39611, 95, 7, 32, 39611, 95, 11, 13534, 39611, 95, 47505, 317, 39611, 95, 14, 13534, 39611, 95, 198, 66, 463, 1878, 11218, 32, 39611, 95, 7, 18504, 39611, 95, 11, 45715, 18504, 39611, 95, 11, 402, 39611, 95, 8, 796, 29369, 5631, 13, 8937, 7, 18504, 39611, 95, 532, 45715, 18504, 39611, 95, 14, 38, 39611, 95, 8, 198, 66, 463, 1878, 11218, 13534, 39611, 95, 7, 18504, 39611, 95, 11, 45715, 18504, 39611, 95, 11, 402, 39611, 95, 8, 796, 29369, 5631, 13, 8937, 7, 38, 39611, 95, 9, 18504, 39611, 95, 532, 45715, 18504, 39611, 95, 8, 628, 198, 2, 83, 1124, 257, 6115, 636, 2134, 290, 6797, 262, 2482, 284, 257, 47764, 198, 8818, 1296, 43420, 7, 35330, 3712, 23839, 6601, 19778, 11, 13845, 3712, 47384, 22882, 11, 7377, 246, 3712, 23839, 31715, 42670, 90, 15972, 11, 6849, 11, 51, 5512, 198, 220, 220, 220, 1395, 85, 3712, 34278, 29993, 15988, 11, 220, 7904, 7762, 90, 25, 2676, 30072, 810, 1391, 15972, 11, 6849, 11, 51, 92, 628, 220, 308, 4951, 8044, 1930, 942, 796, 357, 138, 246, 13, 32, 930, 29, 24936, 33047, 764, 9, 10319, 293, 23118, 7, 907, 33047, 198, 220, 3349, 9700, 796, 410, 9246, 7, 9107, 418, 7, 417, 4906, 7, 70, 4951, 8044, 1930, 942, 828, 2546, 7, 70, 4951, 8044, 1930, 942, 11, 17, 4008, 3256, 357, 138, 246, 13, 38, 91, 29, 46912, 8133, 11537, 628, 220, 376, 1073, 891, 82, 3712, 38469, 90, 13940, 23650, 92, 796, 13845, 13, 37, 138, 122, 82, 198, 220, 376, 70, 1073, 891, 82, 3712, 38469, 90, 13940, 23650, 92, 796, 357, 82, 3784, 33491, 7, 8841, 7, 82, 828, 81, 1, 61, 57, 1, 14804, 1, 38, 62, 4943, 930, 29, 38357, 737, 7, 37, 1073, 891, 82, 8, 198, 220, 48849, 1073, 891, 82, 3712, 38469, 90, 13940, 23650, 92, 796, 685, 907, 13, 24160, 986, 26, 60, 628, 220, 611, 4129, 7, 37, 1073, 891, 82, 8, 15139, 254, 2546, 7, 138, 246, 13, 32, 11, 16, 8, 198, 220, 220, 220, 3714, 7203, 34, 2577, 487, 35611, 407, 287, 2938, 1296, 13, 376, 1073, 891, 82, 25, 720, 37, 1073, 891, 82, 4943, 198, 220, 886, 628, 220, 2482, 70, 4951, 8044, 1930, 942, 796, 6060, 19778, 7, 70, 4951, 8044, 1930, 942, 11, 37, 1073, 891, 82, 8, 198, 220, 2482, 27922, 9700, 796, 6060, 19778, 7, 27922, 9700, 11, 37, 70, 1073, 891, 82, 8, 628, 220, 29770, 87, 3712, 35, 713, 796, 651, 83, 312, 87, 7, 35330, 11, 13845, 8, 198, 220, 29770, 87, 16340, 3712, 38469, 90, 10430, 92, 796, 3297, 7, 33327, 7, 13083, 7, 83, 312, 87, 22305, 628, 198, 220, 2482, 3712, 6601, 19778, 796, 6060, 19778, 7, 4475, 28, 83, 312, 87, 16340, 8, 628, 220, 2482, 796, 685, 43420, 2482, 70, 4951, 8044, 1930, 942, 2482, 27922, 9700, 60, 628, 220, 1441, 2482, 198, 198, 437, 198 ]
2.066796
6,677
# =============================================================== # Discretize using the correction hull of the matrix exponential # =============================================================== """ CorrectionHull{EM} <: AbstractApproximationModel Discretization using the correction hull of the matrix exponential. ### Fields - `exp` -- exponentiation method - `order` -- order of the Taylor series expansion of the matrix exponential ### Algorithm For the homogeneous case, this method implements the transformation: ```math Ω_0 = CH(X_0, e^{Aδ} X_0) ⊕ FX_0 ``` where ``F`` is the correction (interval) matrix. For the inhomogeneous case, ``x' = Ax + u``, ``x ∈ X, u ∈ U``, implements ``Ω_0 = CH(X_0, exp(Aδ) X0) ⊕ FX0`` where ``F`` is the correction (interval) matrix. In both cases, if ``A`` is an interval matrix, the exponential is overapproximated using methods from `IntervalMatrices.jl`. """ struct CorrectionHull{EM} <: AbstractApproximationModel order::Int exp::EM end # convenience constructor using symbols function CorrectionHull(; order::Int=10, exp=IntervalExpAlg(order)) return CorrectionHull(order, _alias(exp)) end function Base.show(io::IO, alg::CorrectionHull) print(io, "`CorrectionHull` approximation model with: \n") print(io, " - exponentiation method: $(alg.exp) \n") print(io, " - order: $(alg.order)\n") end Base.show(io::IO, m::MIME"text/plain", alg::CorrectionHull) = print(io, alg) # ----------------------------------------------------------------- # Correction hull: homogeneous case x' = Ax, x in X # ----------------------------------------------------------------- function discretize(ivp::IVP{<:CLCS, <:LazySet}, δ, alg::CorrectionHull) A = state_matrix(ivp) X0 = initial_state(ivp) X = stateset(ivp) # compute exp(A*δ) * X0 Φ = _exp(A, δ, alg.exp) # compute Ω0 = CH(X0, ΦX0) ⊕ FX0 Ω0 = _discretize_chull(A, Φ, X0, δ, alg) Sdis = ConstrainedLinearDiscreteSystem(Φ, X) return InitialValueProblem(Sdis, Ω0) end function _discretize_chull(A, Φ::IntervalMatrix, X0, δ, alg) X0z = _convert_or_overapproximate(X0, Zonotope) Y = _overapproximate(Φ * X0z, Zonotope) H = overapproximate(CH(X0z, Y), Zonotope) F = correction_hull(A, δ, alg.order) R = _overapproximate(F * X0z, Zonotope) Ω0 = minkowski_sum(H, R) return Ω0 end # F(δ) without the E(δ) correction term function _correction_hull_without_E(A, δ, p) timeint(δ, i) = interval((i^(-i / (i-1)) - i^(-1 / (i-1))) * δ^i, 0) F = sum(map(x -> timeint(δ, i) * x, A^i / factorial(i)) for i in 2:p) return IntervalMatrix(F) end function _discretize_chull(A, Φ::AbstractMatrix, X0, δ, alg) X0z = _convert_or_overapproximate(X0, Zonotope) Y = linear_map(Φ, X0z) H = overapproximate(CH(X0z, Y), Zonotope) F = _correction_hull_without_E(A, δ, alg.order) R = _overapproximate(F * X0z, Zonotope) Ω0 = minkowski_sum(H, R) return Ω0 end # ----------------------------------------------------------------- # Correction hull: inhomogeneous case x' = Ax + u, x in X, u ∈ U # ----------------------------------------------------------------- function discretize(ivp::IVP{<:CLCCS, <:LazySet}, δ, alg::CorrectionHull) A = state_matrix(ivp) X0 = initial_state(ivp) X = stateset(ivp) U = next_set(inputset(ivp), 1) # inputset(ivp) n = size(A, 1) # here U is an interval matrix map of a lazyset, TODO refactor / dispatch if isa(U, LinearMap) Uz = _convert_or_overapproximate(Zonotope, LazySets.set(U)) B = matrix(U) Uz = isinterval(B) ? _overapproximate(B * Uz, Zonotope) : linear_map(B, Uz) else # LazySet Uz = _convert_or_overapproximate(Zonotope, U) end if zeros(dim(U)) ∉ Uz error("this function is not implemented, see issue #253") end # TODO refactor Ω0_homog # TODO refactor / dispatch X0z = _convert_or_overapproximate(Zonotope, X0) Φ = _exp(A, δ, alg.exp) if isinterval(Φ) Y = _overapproximate(Φ * X0z, Zonotope) else Y = linear_map(Φ, X0z) end H = overapproximate(CH(X0z, Y), Zonotope) F = correction_hull(A, δ, alg.order) R = _overapproximate(F * X0z, Zonotope) Ω0_homog = minkowski_sum(H, R) # compute C(δ) * U Cδ = _Cδ(A, δ, alg.order) Ud = _overapproximate(Cδ * Uz, Zonotope) Ω0 = minkowski_sum(Ω0_homog, Ud) # Ω0 = _apply_setops(Ω0, alg.setops) # TODO requires to add `setops` field to the struct Idn = Φ # IntervalMatrix(one(A)) or IdentityMultiple(one(eltype(A)), n) # FIXME Sdis = ConstrainedLinearControlDiscreteSystem(Φ, Idn, X, Ud) return InitialValueProblem(Sdis, Ω0) end
[ 2, 46111, 4770, 25609, 855, 198, 2, 8444, 1186, 1096, 1262, 262, 17137, 23644, 286, 262, 17593, 39682, 198, 2, 46111, 4770, 25609, 855, 198, 198, 37811, 198, 220, 220, 220, 35074, 39, 724, 90, 3620, 92, 1279, 25, 27741, 4677, 13907, 18991, 17633, 198, 198, 15642, 1186, 1634, 1262, 262, 17137, 23644, 286, 262, 17593, 39682, 13, 198, 198, 21017, 23948, 198, 198, 12, 4600, 11201, 63, 220, 220, 1377, 28622, 3920, 2446, 198, 12, 4600, 2875, 63, 1377, 1502, 286, 262, 8121, 2168, 7118, 286, 262, 17593, 39682, 198, 198, 21017, 978, 42289, 198, 198, 1890, 262, 3488, 32269, 1339, 11, 428, 2446, 23986, 262, 13389, 25, 198, 198, 15506, 63, 11018, 198, 138, 102, 62, 15, 796, 5870, 7, 55, 62, 15, 11, 304, 36796, 32, 138, 112, 92, 220, 1395, 62, 15, 8, 2343, 232, 243, 19534, 62, 15, 198, 15506, 63, 198, 3003, 7559, 37, 15506, 318, 262, 17137, 357, 3849, 2100, 8, 17593, 13, 198, 198, 1890, 262, 25783, 296, 32269, 1339, 11, 7559, 87, 6, 796, 12176, 1343, 334, 15506, 11, 220, 7559, 87, 18872, 230, 1395, 11, 334, 18872, 230, 471, 15506, 11, 23986, 198, 15506, 138, 102, 62, 15, 796, 5870, 7, 55, 62, 15, 11, 1033, 7, 32, 138, 112, 8, 220, 1395, 15, 8, 2343, 232, 243, 19534, 15, 15506, 810, 7559, 37, 15506, 318, 262, 17137, 357, 3849, 2100, 8, 17593, 13, 198, 198, 818, 1111, 2663, 11, 611, 7559, 32, 15506, 318, 281, 16654, 17593, 11, 262, 39682, 318, 625, 1324, 13907, 15655, 198, 3500, 5050, 422, 4600, 9492, 2100, 19044, 45977, 13, 20362, 44646, 198, 37811, 198, 7249, 35074, 39, 724, 90, 3620, 92, 1279, 25, 27741, 4677, 13907, 18991, 17633, 198, 220, 220, 1502, 3712, 5317, 198, 220, 220, 1033, 3712, 3620, 198, 437, 198, 198, 2, 15607, 23772, 1262, 14354, 198, 8818, 35074, 39, 724, 7, 26, 1502, 3712, 5317, 28, 940, 11, 1033, 28, 9492, 2100, 16870, 2348, 70, 7, 2875, 4008, 198, 220, 220, 220, 1441, 35074, 39, 724, 7, 2875, 11, 4808, 26011, 7, 11201, 4008, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 435, 70, 3712, 43267, 39, 724, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 63, 43267, 39, 724, 63, 40874, 2746, 351, 25, 3467, 77, 4943, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 220, 220, 220, 532, 28622, 3920, 2446, 25, 29568, 14016, 13, 11201, 8, 3467, 77, 4943, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 220, 220, 220, 532, 1502, 25, 29568, 14016, 13, 2875, 19415, 77, 4943, 198, 437, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 285, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 435, 70, 3712, 43267, 39, 724, 8, 796, 3601, 7, 952, 11, 435, 70, 8, 198, 198, 2, 16529, 12, 198, 2, 35074, 23644, 25, 3488, 32269, 1339, 2124, 6, 796, 12176, 11, 2124, 287, 1395, 198, 2, 16529, 12, 198, 198, 8818, 1221, 1186, 1096, 7, 452, 79, 3712, 3824, 47, 90, 27, 25, 5097, 7902, 11, 1279, 25, 43, 12582, 7248, 5512, 7377, 112, 11, 435, 70, 3712, 43267, 39, 724, 8, 198, 220, 220, 220, 317, 796, 1181, 62, 6759, 8609, 7, 452, 79, 8, 198, 220, 220, 220, 1395, 15, 796, 4238, 62, 5219, 7, 452, 79, 8, 198, 220, 220, 220, 1395, 796, 2585, 316, 7, 452, 79, 8, 628, 220, 220, 220, 1303, 24061, 1033, 7, 32, 9, 138, 112, 8, 1635, 1395, 15, 198, 220, 220, 220, 7377, 99, 796, 4808, 11201, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 11201, 8, 628, 220, 220, 220, 1303, 24061, 7377, 102, 15, 796, 5870, 7, 55, 15, 11, 7377, 99, 55, 15, 8, 2343, 232, 243, 19534, 15, 198, 220, 220, 220, 7377, 102, 15, 796, 4808, 15410, 1186, 1096, 62, 354, 724, 7, 32, 11, 7377, 99, 11, 1395, 15, 11, 7377, 112, 11, 435, 70, 8, 628, 220, 220, 220, 311, 6381, 796, 1482, 2536, 1328, 14993, 451, 15642, 8374, 11964, 7, 138, 99, 11, 1395, 8, 198, 220, 220, 220, 1441, 20768, 11395, 40781, 7, 50, 6381, 11, 7377, 102, 15, 8, 198, 437, 198, 198, 8818, 4808, 15410, 1186, 1096, 62, 354, 724, 7, 32, 11, 7377, 99, 3712, 9492, 2100, 46912, 11, 1395, 15, 11, 7377, 112, 11, 435, 70, 8, 198, 220, 220, 220, 1395, 15, 89, 796, 4808, 1102, 1851, 62, 273, 62, 2502, 1324, 13907, 1920, 7, 55, 15, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 575, 796, 4808, 2502, 1324, 13907, 1920, 7, 138, 99, 1635, 1395, 15, 89, 11, 1168, 261, 313, 3008, 8, 628, 220, 220, 220, 367, 796, 625, 1324, 13907, 1920, 7, 3398, 7, 55, 15, 89, 11, 575, 828, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 376, 796, 17137, 62, 71, 724, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 2875, 8, 198, 220, 220, 220, 371, 796, 4808, 2502, 1324, 13907, 1920, 7, 37, 1635, 1395, 15, 89, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 7377, 102, 15, 796, 285, 676, 12079, 62, 16345, 7, 39, 11, 371, 8, 198, 220, 220, 220, 1441, 7377, 102, 15, 198, 437, 198, 198, 2, 376, 7, 138, 112, 8, 1231, 262, 412, 7, 138, 112, 8, 17137, 3381, 198, 8818, 4808, 10215, 8243, 62, 71, 724, 62, 19419, 62, 36, 7, 32, 11, 7377, 112, 11, 279, 8, 198, 220, 220, 220, 640, 600, 7, 138, 112, 11, 1312, 8, 796, 16654, 19510, 72, 61, 32590, 72, 1220, 357, 72, 12, 16, 4008, 532, 1312, 61, 32590, 16, 1220, 357, 72, 12, 16, 22305, 1635, 7377, 112, 61, 72, 11, 657, 8, 198, 220, 220, 220, 376, 796, 2160, 7, 8899, 7, 87, 4613, 640, 600, 7, 138, 112, 11, 1312, 8, 1635, 2124, 11, 317, 61, 72, 1220, 1109, 5132, 7, 72, 4008, 329, 1312, 287, 362, 25, 79, 8, 198, 220, 220, 220, 1441, 4225, 2100, 46912, 7, 37, 8, 198, 437, 198, 198, 8818, 4808, 15410, 1186, 1096, 62, 354, 724, 7, 32, 11, 7377, 99, 3712, 23839, 46912, 11, 1395, 15, 11, 7377, 112, 11, 435, 70, 8, 198, 220, 220, 220, 1395, 15, 89, 796, 4808, 1102, 1851, 62, 273, 62, 2502, 1324, 13907, 1920, 7, 55, 15, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 575, 796, 14174, 62, 8899, 7, 138, 99, 11, 1395, 15, 89, 8, 628, 220, 220, 220, 367, 796, 625, 1324, 13907, 1920, 7, 3398, 7, 55, 15, 89, 11, 575, 828, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 376, 796, 4808, 10215, 8243, 62, 71, 724, 62, 19419, 62, 36, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 2875, 8, 198, 220, 220, 220, 371, 796, 4808, 2502, 1324, 13907, 1920, 7, 37, 1635, 1395, 15, 89, 11, 1168, 261, 313, 3008, 8, 628, 220, 220, 220, 7377, 102, 15, 796, 285, 676, 12079, 62, 16345, 7, 39, 11, 371, 8, 198, 220, 220, 220, 1441, 7377, 102, 15, 198, 437, 198, 198, 2, 16529, 12, 198, 2, 35074, 23644, 25, 25783, 296, 32269, 1339, 2124, 6, 796, 12176, 1343, 334, 11, 2124, 287, 1395, 11, 334, 18872, 230, 471, 198, 2, 16529, 12, 198, 8818, 1221, 1186, 1096, 7, 452, 79, 3712, 3824, 47, 90, 27, 25, 5097, 4093, 50, 11, 1279, 25, 43, 12582, 7248, 5512, 7377, 112, 11, 435, 70, 3712, 43267, 39, 724, 8, 198, 220, 220, 220, 317, 796, 1181, 62, 6759, 8609, 7, 452, 79, 8, 198, 220, 220, 220, 1395, 15, 796, 4238, 62, 5219, 7, 452, 79, 8, 198, 220, 220, 220, 1395, 796, 2585, 316, 7, 452, 79, 8, 198, 220, 220, 220, 471, 796, 1306, 62, 2617, 7, 15414, 2617, 7, 452, 79, 828, 352, 8, 1303, 5128, 2617, 7, 452, 79, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 32, 11, 352, 8, 628, 220, 220, 220, 1303, 994, 471, 318, 281, 16654, 17593, 3975, 286, 257, 37296, 893, 316, 11, 16926, 46, 1006, 11218, 1220, 27965, 198, 220, 220, 220, 611, 318, 64, 7, 52, 11, 44800, 13912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 40919, 796, 4808, 1102, 1851, 62, 273, 62, 2502, 1324, 13907, 1920, 7, 57, 261, 313, 3008, 11, 406, 12582, 50, 1039, 13, 2617, 7, 52, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 347, 796, 17593, 7, 52, 8, 198, 220, 220, 220, 220, 220, 220, 220, 40919, 796, 318, 3849, 2100, 7, 33, 8, 5633, 4808, 2502, 1324, 13907, 1920, 7, 33, 1635, 40919, 11, 1168, 261, 313, 3008, 8, 1058, 14174, 62, 8899, 7, 33, 11, 40919, 8, 198, 220, 220, 220, 2073, 1303, 406, 12582, 7248, 198, 220, 220, 220, 220, 220, 220, 220, 40919, 796, 4808, 1102, 1851, 62, 273, 62, 2502, 1324, 13907, 1920, 7, 57, 261, 313, 3008, 11, 471, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 1976, 27498, 7, 27740, 7, 52, 4008, 18872, 231, 40919, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 5661, 2163, 318, 407, 9177, 11, 766, 2071, 1303, 28592, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 16926, 46, 1006, 11218, 7377, 102, 15, 62, 26452, 519, 198, 220, 220, 220, 1303, 16926, 46, 1006, 11218, 1220, 27965, 198, 220, 220, 220, 1395, 15, 89, 796, 4808, 1102, 1851, 62, 273, 62, 2502, 1324, 13907, 1920, 7, 57, 261, 313, 3008, 11, 1395, 15, 8, 628, 220, 220, 220, 7377, 99, 796, 4808, 11201, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 11201, 8, 198, 220, 220, 220, 611, 318, 3849, 2100, 7, 138, 99, 8, 198, 220, 220, 220, 220, 220, 220, 220, 575, 796, 4808, 2502, 1324, 13907, 1920, 7, 138, 99, 1635, 1395, 15, 89, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 575, 796, 14174, 62, 8899, 7, 138, 99, 11, 1395, 15, 89, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 367, 796, 625, 1324, 13907, 1920, 7, 3398, 7, 55, 15, 89, 11, 575, 828, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 376, 796, 17137, 62, 71, 724, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 2875, 8, 198, 220, 220, 220, 371, 796, 4808, 2502, 1324, 13907, 1920, 7, 37, 1635, 1395, 15, 89, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 7377, 102, 15, 62, 26452, 519, 796, 285, 676, 12079, 62, 16345, 7, 39, 11, 371, 8, 628, 220, 220, 220, 1303, 24061, 327, 7, 138, 112, 8, 1635, 471, 198, 220, 220, 220, 327, 138, 112, 796, 4808, 34, 138, 112, 7, 32, 11, 7377, 112, 11, 435, 70, 13, 2875, 8, 198, 220, 220, 220, 35774, 796, 4808, 2502, 1324, 13907, 1920, 7, 34, 138, 112, 1635, 40919, 11, 1168, 261, 313, 3008, 8, 198, 220, 220, 220, 7377, 102, 15, 796, 285, 676, 12079, 62, 16345, 7, 138, 102, 15, 62, 26452, 519, 11, 35774, 8, 198, 220, 220, 220, 1303, 7377, 102, 15, 796, 4808, 39014, 62, 2617, 2840, 7, 138, 102, 15, 11, 435, 70, 13, 2617, 2840, 8, 1303, 16926, 46, 4433, 284, 751, 4600, 2617, 2840, 63, 2214, 284, 262, 2878, 198, 220, 220, 220, 5121, 77, 796, 7377, 99, 1303, 4225, 2100, 46912, 7, 505, 7, 32, 4008, 393, 27207, 31217, 7, 505, 7, 417, 4906, 7, 32, 36911, 299, 8, 1303, 44855, 11682, 198, 220, 220, 220, 311, 6381, 796, 1482, 2536, 1328, 14993, 451, 15988, 15642, 8374, 11964, 7, 138, 99, 11, 5121, 77, 11, 1395, 11, 35774, 8, 198, 220, 220, 220, 1441, 20768, 11395, 40781, 7, 50, 6381, 11, 7377, 102, 15, 8, 198, 437, 198 ]
2.388522
1,969
module PIPS_NLP # package code goes here end # module include("ParPipsNlp.jl") include("PipsNlp.jl")
[ 21412, 30434, 3705, 62, 45, 19930, 198, 198, 2, 5301, 2438, 2925, 994, 628, 198, 437, 1303, 8265, 198, 198, 17256, 7203, 10044, 47, 2419, 45, 34431, 13, 20362, 4943, 198, 17256, 7203, 47, 2419, 45, 34431, 13, 20362, 4943 ]
2.6
40
# %% Sensititivy to trajectory length using DrWatson @quickactivate :FractalDimension # uses DynamicalSystems, PyPlot include(srcdir("style.jl")) using DynamicalSystems, PyPlot # %% N = 1*10^5 systems = [:koch, :henon_chaotic] slabels = ["Koch", "Hénon"] qs = 2:4 Cmethod = "standard" # bueno or standard. Decides εmax for correlation sum. eHs, eCs, Hs, Cs = [Vector{Float64}[] for i in 1:4] for data in systems for q in qs qH = qC = q @show (q, data) # Here we simply pack all parameters into a dictionary # (other parameters are (probably) globals) params = @strdict N qH qC data if data == :standardmap_chaotic params["k"] = 1.0 # elseif data == :henon_chaotic # params["z"] = -4 end params["theiler"] = 0 if Cmethod ≠ "standard" params["Cmethod"] = Cmethod end # This is the main call that calculates everything output, s = produce_or_load( datadir("main"), params, make_C_H; prefix = string(data), suffix = "jld2", force = false, ignores = ["data"], storepatch = false ) @unpack eH, eC, H, C = output push!(eHs, eH); push!(Hs, H); push!(eCs, eC); push!(Cs, C) end end legendtitle = "impact of order \$q\$" labels = [s*" \$q=$(q)\$" for s in slabels for q in qs] fig, axs = mainplot( Hs, Cs, eHs, eCs, labels, legendtitle; qH = "q", qC = "q", tol = 0.25, offsets = range(0; length = 6, step = 1.5), dimension_fit_C = FractalDimension.linear_regression_fit_glm, ) wsave(plotsdir("paper", "orderq"), fig)
[ 2, 43313, 14173, 270, 270, 452, 88, 284, 22942, 4129, 198, 3500, 1583, 54, 13506, 198, 31, 24209, 39022, 1058, 37, 974, 282, 29271, 3004, 1303, 3544, 14970, 605, 11964, 82, 11, 9485, 43328, 198, 17256, 7, 10677, 15908, 7203, 7635, 13, 20362, 48774, 198, 3500, 14970, 605, 11964, 82, 11, 9485, 43328, 198, 198, 2, 43313, 198, 45, 796, 352, 9, 940, 61, 20, 198, 10057, 82, 796, 685, 25, 74, 5374, 11, 1058, 831, 261, 62, 11693, 6210, 60, 198, 6649, 397, 1424, 796, 14631, 42, 5374, 1600, 366, 39, 2634, 13159, 8973, 198, 48382, 796, 362, 25, 19, 198, 34, 24396, 796, 366, 20307, 1, 1303, 809, 23397, 393, 3210, 13, 4280, 1460, 7377, 113, 9806, 329, 16096, 2160, 13, 198, 198, 68, 39, 82, 11, 304, 32274, 11, 367, 82, 11, 327, 82, 796, 685, 38469, 90, 43879, 2414, 92, 21737, 329, 1312, 287, 352, 25, 19, 60, 198, 1640, 1366, 287, 3341, 198, 220, 220, 220, 329, 10662, 287, 10662, 82, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 39, 796, 10662, 34, 796, 10662, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 12860, 357, 80, 11, 1366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3423, 356, 2391, 2353, 477, 10007, 656, 257, 22155, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 847, 10007, 389, 357, 26949, 8, 15095, 874, 8, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 2488, 2536, 11600, 399, 10662, 39, 10662, 34, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 6624, 1058, 20307, 8899, 62, 11693, 6210, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 14692, 74, 8973, 796, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 361, 1366, 6624, 1058, 831, 261, 62, 11693, 6210, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 42287, 14692, 89, 8973, 796, 532, 19, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 14692, 1169, 5329, 8973, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 611, 327, 24396, 15139, 254, 366, 20307, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 14692, 34, 24396, 8973, 796, 327, 24396, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 770, 318, 262, 1388, 869, 326, 43707, 2279, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 11, 264, 796, 4439, 62, 273, 62, 2220, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4818, 324, 343, 7203, 12417, 12340, 42287, 11, 787, 62, 34, 62, 39, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21231, 796, 4731, 7, 7890, 828, 35488, 796, 366, 73, 335, 17, 1600, 2700, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24245, 796, 14631, 7890, 33116, 3650, 17147, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 403, 8002, 304, 39, 11, 304, 34, 11, 367, 11, 327, 796, 5072, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 68, 39, 82, 11, 304, 39, 1776, 4574, 0, 7, 39, 82, 11, 367, 1776, 4574, 0, 7, 68, 32274, 11, 304, 34, 1776, 4574, 0, 7, 32274, 11, 327, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 1455, 437, 7839, 796, 366, 48240, 286, 1502, 3467, 3, 80, 59, 3, 1, 198, 23912, 1424, 796, 685, 82, 9, 1, 3467, 3, 80, 43641, 7, 80, 19415, 3, 1, 329, 264, 287, 38677, 1424, 329, 10662, 287, 10662, 82, 60, 198, 198, 5647, 11, 7877, 82, 796, 1388, 29487, 7, 198, 220, 220, 220, 367, 82, 11, 327, 82, 11, 304, 39, 82, 11, 304, 32274, 11, 14722, 11, 8177, 7839, 26, 220, 198, 220, 220, 220, 10662, 39, 796, 366, 80, 1600, 10662, 34, 796, 366, 80, 1600, 284, 75, 796, 657, 13, 1495, 11, 220, 198, 220, 220, 220, 49005, 796, 2837, 7, 15, 26, 4129, 796, 718, 11, 2239, 796, 352, 13, 20, 828, 198, 220, 220, 220, 15793, 62, 11147, 62, 34, 796, 40548, 282, 29271, 3004, 13, 29127, 62, 2301, 2234, 62, 11147, 62, 4743, 76, 11, 198, 8, 198, 198, 18504, 1015, 7, 489, 1747, 15908, 7203, 20189, 1600, 366, 2875, 80, 12340, 2336, 8, 198 ]
2.175066
754
macro shared_fields_stanmodels() return esc(:( name::AbstractString; # Name of the Stan program model::AbstractString; # Stan language model program n_chains::Vector{Int64}; # Number of chains seed::StanBase.RandomSeed; # Seed section of cmd to run cmdstan init::StanBase.Init; # Init section of cmd to run cmdstan output::StanBase.Output; # Output section of cmd to run cmdstan tmpdir::AbstractString; # Holds all below copied/created files output_base::AbstractString; # Used for naming failes to be created exec_path::AbstractString; # Path to the cmdstan excutable data_file::Vector{String}; # Array of data files input to cmdstan init_file::Vector{String}; # Array of init files input to cmdstan cmds::Vector{Cmd}; # Array of cmds to be spawned/pipelined sample_file::Vector{String}; # Sample file array created by cmdstan log_file::Vector{String}; # Log file array created by cmdstan diagnostic_file::Vector{String}; # Diagnostic file array created by cmdstan summary::Bool; # Store cmdstan's summary as a .csv file printsummary::Bool; # Print the summary cmdstan_home::AbstractString; # Directory where cmdstan can be found )) end
[ 20285, 305, 4888, 62, 25747, 62, 14192, 27530, 3419, 198, 220, 1441, 3671, 7, 37498, 198, 220, 220, 220, 1438, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6530, 286, 262, 7299, 1430, 198, 220, 220, 220, 2746, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7299, 3303, 2746, 1430, 198, 220, 220, 220, 299, 62, 38861, 3712, 38469, 90, 5317, 2414, 19629, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7913, 286, 14659, 198, 220, 220, 220, 9403, 3712, 32140, 14881, 13, 29531, 50, 2308, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 23262, 2665, 286, 23991, 284, 1057, 23991, 14192, 198, 220, 220, 220, 2315, 3712, 32140, 14881, 13, 31768, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44707, 2665, 286, 23991, 284, 1057, 23991, 14192, 198, 220, 220, 220, 5072, 3712, 32140, 14881, 13, 26410, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 25235, 2665, 286, 23991, 284, 1057, 23991, 14192, 198, 220, 220, 220, 45218, 15908, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9340, 82, 477, 2174, 18984, 14, 25598, 3696, 198, 220, 220, 220, 5072, 62, 8692, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 220, 1303, 16718, 329, 19264, 2038, 274, 284, 307, 2727, 198, 220, 220, 220, 2452, 62, 6978, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10644, 284, 262, 23991, 14192, 2859, 18187, 198, 220, 220, 220, 1366, 62, 7753, 3712, 38469, 90, 10100, 19629, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15690, 286, 1366, 3696, 5128, 284, 23991, 14192, 198, 220, 220, 220, 2315, 62, 7753, 3712, 38469, 90, 10100, 19629, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15690, 286, 2315, 3696, 5128, 284, 23991, 14192, 198, 220, 220, 220, 23991, 82, 3712, 38469, 90, 40109, 19629, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15690, 286, 23991, 82, 284, 307, 29013, 14, 79, 40634, 1389, 198, 220, 220, 220, 6291, 62, 7753, 3712, 38469, 90, 10100, 19629, 220, 220, 220, 220, 220, 220, 1303, 27565, 2393, 7177, 2727, 416, 23991, 14192, 198, 220, 220, 220, 2604, 62, 7753, 3712, 38469, 90, 10100, 19629, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5972, 2393, 7177, 2727, 416, 23991, 14192, 198, 220, 220, 220, 23584, 62, 7753, 3712, 38469, 90, 10100, 19629, 220, 220, 1303, 31549, 15132, 2393, 7177, 2727, 416, 23991, 14192, 198, 220, 220, 220, 10638, 3712, 33, 970, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9363, 23991, 14192, 338, 10638, 355, 257, 764, 40664, 2393, 198, 220, 220, 220, 3601, 49736, 3712, 33, 970, 26, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12578, 262, 10638, 198, 220, 220, 220, 23991, 14192, 62, 11195, 3712, 23839, 10100, 26, 220, 220, 220, 220, 220, 1303, 27387, 810, 23991, 14192, 460, 307, 1043, 198, 220, 15306, 198, 437, 198 ]
2.54562
548
@ms include("solvers/annealing.jl") function loop_annealing(args) instances = [ # "02", # "03", # "05", # "08", # "09", # "10", # "11", "12", # "13" ] println("Instance n° & Cost & Time") for instance_name in instances instance_path = "data/$instance_name.alp" inst = Instance(instance_path) sol = Solution(inst) initial_sort!(sol) sv = AnnealingSolver( inst; temp_init_rate=0.8, step_size=1, startsol=sol, temp_coef=0.985, ) ms_start = ms() # nb secondes depuis démarrage avec précision à la ms solve(sv, swap_close_planes!, durationmax=15*60) ms_stop = ms() bestsol = sv.bestsol nb_calls = bestsol.solver.nb_calls nb_infeasable = bestsol.solver.nb_infeasable nb_sec = round(ms_stop - ms_start, digits=3) nb_call_per_sec = round(nb_calls/nb_sec, digits=3) println("Performance: ") println(" nb_calls=$nb_calls") println(" nb_infeasable=$nb_infeasable") println(" nb_sec=$nb_sec") println(" => nb_call_per_sec = $nb_call_per_sec call/sec") println("$instance_name & $(bestsol.cost) & $nb_sec") end end loop_annealing(Args.args)
[ 31, 907, 2291, 7203, 34453, 690, 14, 21952, 4272, 13, 20362, 4943, 198, 198, 8818, 9052, 62, 21952, 4272, 7, 22046, 8, 198, 220, 220, 220, 10245, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 2999, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 3070, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 2713, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 2919, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 2931, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 940, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 1157, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 1065, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 366, 1485, 1, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 44872, 7203, 33384, 299, 7200, 1222, 6446, 1222, 3862, 4943, 198, 220, 220, 220, 329, 4554, 62, 3672, 287, 10245, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 62, 6978, 796, 366, 7890, 32624, 39098, 62, 3672, 13, 282, 79, 1, 198, 220, 220, 220, 220, 220, 220, 220, 916, 796, 2262, 590, 7, 39098, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1540, 796, 28186, 7, 8625, 8, 628, 220, 220, 220, 220, 220, 220, 220, 4238, 62, 30619, 0, 7, 34453, 8, 628, 220, 220, 220, 220, 220, 220, 220, 38487, 796, 15397, 4272, 50, 14375, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 916, 26, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 15003, 62, 4873, 28, 15, 13, 23, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2239, 62, 7857, 28, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4940, 349, 28, 34453, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 1073, 891, 28, 15, 13, 42250, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 13845, 62, 9688, 796, 13845, 3419, 1303, 299, 65, 1218, 274, 1207, 84, 271, 39073, 76, 3258, 496, 257, 35138, 778, 2634, 16005, 28141, 8591, 13845, 198, 220, 220, 220, 220, 220, 220, 220, 8494, 7, 21370, 11, 16075, 62, 19836, 62, 22587, 28265, 9478, 9806, 28, 1314, 9, 1899, 8, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 62, 11338, 796, 13845, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1266, 34453, 796, 38487, 13, 65, 3558, 349, 628, 220, 220, 220, 220, 220, 220, 220, 299, 65, 62, 66, 5691, 796, 1266, 34453, 13, 82, 14375, 13, 46803, 62, 66, 5691, 198, 220, 220, 220, 220, 220, 220, 220, 299, 65, 62, 259, 5036, 292, 540, 796, 1266, 34453, 13, 82, 14375, 13, 46803, 62, 259, 5036, 292, 540, 198, 220, 220, 220, 220, 220, 220, 220, 299, 65, 62, 2363, 796, 2835, 7, 907, 62, 11338, 532, 13845, 62, 9688, 11, 19561, 28, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 65, 62, 13345, 62, 525, 62, 2363, 796, 2835, 7, 46803, 62, 66, 5691, 14, 46803, 62, 2363, 11, 19561, 28, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 32273, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 220, 299, 65, 62, 66, 5691, 43641, 46803, 62, 66, 5691, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 220, 299, 65, 62, 259, 5036, 292, 540, 43641, 46803, 62, 259, 5036, 292, 540, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 220, 299, 65, 62, 2363, 43641, 46803, 62, 2363, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 220, 5218, 299, 65, 62, 13345, 62, 525, 62, 2363, 796, 720, 46803, 62, 13345, 62, 525, 62, 2363, 869, 14, 2363, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3, 39098, 62, 3672, 1222, 29568, 65, 3558, 349, 13, 15805, 8, 1222, 720, 46803, 62, 2363, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 437, 198, 198, 26268, 62, 21952, 4272, 7, 42035, 13, 22046, 8, 198 ]
1.893855
716
# Julia 0.6 function singleNumber(vector) reduce(xor, vector) end a = [1,1,2,3,3] println(singleNumber(a))
[ 2, 22300, 657, 13, 21, 198, 8818, 2060, 15057, 7, 31364, 8, 198, 197, 445, 7234, 7, 87, 273, 11, 15879, 8, 198, 437, 198, 198, 64, 796, 685, 16, 11, 16, 11, 17, 11, 18, 11, 18, 60, 198, 35235, 7, 29762, 15057, 7, 64, 4008, 198 ]
2.270833
48
using TimeSeries, MarketData, Base.Dates FactCheck.setstyle(:compact) FactCheck.onlystats(true) facts("collapse operations") do context("collapse squishes correctly") do @fact collapse(cl, week, first).values[2] --> 97.75 @fact collapse(cl, week, first).timestamp[2] --> Date(2000,1,10) @fact collapse(cl, week, first, last).values[2] --> 100.44 @fact collapse(cl, week, first, last).timestamp[2] --> Date(2000,1,10) @fact collapse(cl, month, first).values[2] --> 100.25 @fact collapse(cl, month, first).timestamp[2] --> Date(2000,2,1) @fact collapse(ohlc, week, first).values[2, :] --> [102.0, 102.25, 94.75, 97.75] @fact collapse(ohlc, week, first).timestamp[2] --> Date(2000,1,10) @fact collapse(ohlc, week, first, last).values[2, :] --> [100.0, 102.25, 99.38, 100.44] @fact collapse(ohlc, week, first, last).timestamp[2] --> Date(2000,1,10) @fact collapse(ohlc, month, first).values[2, :] --> [104.0, 105.0, 100.0, 100.25] @fact collapse(ohlc, month, first).timestamp[2] --> Date(2000,2,1) end end facts("merge works correctly") do cl1 = cl[1:3] op1 = cl[2:4] aapl = tail(AAPL) ba = tail(BA) context("takes colnames kwarg correctly") do @fact merge(cl, ohlc["High", "Low"], colnames=["a","b","c"]).colnames --> ["a", "b", "c"] @fact merge(cl, op, colnames=["a","b"]).colnames --> ["a", "b"] @fact_throws merge(cl, op, colnames=["a"]) @fact_throws merge(cl, op, colnames=["a","b","c"]) @fact merge(cl, ohlc["High", "Low"], :inner, colnames=["a","b","c"]).colnames --> ["a", "b", "c"] @fact merge(cl, op, :inner, colnames=["a","b"]).colnames --> ["a", "b"] @fact_throws merge(cl, op, :inner, colnames=["a"]) @fact_throws merge(cl, op, :inner, colnames=["a","b","c"]) @fact merge(cl, ohlc["High", "Low"], :left, colnames=["a","b","c"]).colnames --> ["a", "b", "c"] @fact merge(cl, op, :left, colnames=["a","b"]).colnames --> ["a", "b"] @fact_throws merge(cl, op, :left, colnames=["a"]) @fact_throws merge(cl, op, :left, colnames=["a","b","c"]) @fact merge(cl, ohlc["High", "Low"], :right, colnames=["a","b","c"]).colnames --> ["a", "b", "c"] @fact merge(cl, op, :right, colnames=["a","b"]).colnames --> ["a", "b"] @fact_throws merge(cl, op, :right, colnames=["a"]) @fact_throws merge(cl, op, :right, colnames=["a","b","c"]) @fact merge(cl, ohlc["High", "Low"], :outer, colnames=["a","b","c"]).colnames --> ["a", "b", "c"] @fact merge(cl, op, :outer, colnames=["a","b"]).colnames --> ["a", "b"] @fact_throws merge(cl, op, :outer, colnames=["a"]) @fact_throws merge(cl, op, :outer, colnames=["a","b","c"]) end context("returns correct alignment with Dates and values") do @fact merge(cl,op).values --> merge(cl,op, :inner).values @fact merge(cl,op).values[2,1] --> cl.values[2,1] @fact merge(cl,op).values[2,2] --> op.values[2,1] end context("aligns with disparate sized objects") do @fact merge(cl, op[2:5]).values[1,1] --> cl.values[2,1] @fact merge(cl, op[2:5]).values[1,2] --> op.values[2,1] @fact merge(cl, op[2:5]).timestamp[1] --> Date(2000,1,4) @fact length(merge(cl, op[2:5])) --> 4 @fact length(merge(cl1, op1, :inner)) --> 2 @fact merge(cl1,op1, :inner).values[2,1] --> cl1.values[3,1] @fact merge(cl1,op1, :inner).values[2,2] --> op1.values[2,1] @fact length(merge(cl1, op1, :left)) --> 3 @fact merge(cl1,op1, :left).values[1,2] --> isnan @fact merge(cl1,op1, :left).values[2,1] --> cl1.values[2,1] @fact merge(cl1,op1, :left).values[2,2] --> op1.values[1,1] @fact length(merge(cl1, op1, :right)) --> 3 @fact merge(cl1,op1, :right).values[2,1] --> cl1.values[3,1] @fact merge(cl1,op1, :right).values[2,2] --> op1.values[2,1] @fact merge(cl1,op1, :right).values[3,1] --> isnan @fact length(merge(cl1, op1, :outer)) --> 4 @fact merge(cl1,op1, :outer).values[1,2] --> isnan @fact merge(cl1,op1, :outer).values[2,1] --> cl1.values[2,1] @fact merge(cl1,op1, :outer).values[2,2] --> op1.values[1,1] @fact merge(cl1,op1, :outer).values[4,1] --> isnan end context("column names match the correct values") do @fact merge(cl, op[2:5]).colnames --> ["Close", "Open"] @fact merge(op[2:5], cl).colnames --> ["Open", "Close"] @fact merge(cl, op[2:5], :inner).colnames --> ["Close", "Open"] @fact merge(op[2:5], cl, :inner).colnames --> ["Open", "Close"] @fact merge(cl, op[2:5], :left).colnames --> ["Close", "Open"] @fact merge(op[2:5], cl, :left).colnames --> ["Open", "Close"] @fact merge(cl, op[2:5], :right).colnames --> ["Close", "Open"] @fact merge(op[2:5], cl, :right).colnames --> ["Open", "Close"] @fact merge(cl, op[2:5], :outer).colnames --> ["Close", "Open"] @fact merge(op[2:5], cl, :outer).colnames --> ["Open", "Close"] end end facts("vcat works correctly") do context("concatenates time series correctly in 1D") do a = TimeArray([Date(2015, 10, 01), Date(2015, 11, 01)], [15, 16], ["Number"]) b = TimeArray([Date(2015, 12, 01)], [17], ["Number"]) c = vcat(a, b) @fact length(c) --> length(a) + length(b) @fact c.colnames --> a.colnames @fact c.colnames --> b.colnames @fact c.values --> [15, 16, 17] end context("concatenates time series correctly in 2D") do a = TimeArray([Date(2015, 09, 01), Date(2015, 10, 01), Date(2015, 11, 01)], [[15 16]; [17 18]; [19 20]], ["Number 1", "Number 2"]) b = TimeArray([Date(2015, 12, 01)], [18 18], ["Number 1", "Number 2"]) c = vcat(a, b) @fact length(c) --> length(a) + length(b) @fact c.colnames --> a.colnames @fact c.colnames --> b.colnames @fact c.values --> [[15 16]; [17 18]; [19 20]; [18 18]] end context("rejects when column names do not match") do a = TimeArray([Date(2015, 10, 01), Date(2015, 11, 01)], [15, 16], ["Number"]) b = TimeArray([Date(2015, 12, 01)], [17], ["Data does not match number"]) @fact_throws vcat(a, b) end context("rejects when metas do not match") do a = TimeArray([Date(2015, 10, 01), Date(2015, 11, 01)], [15, 16], ["Number"], :FirstMeta) b = TimeArray([Date(2015, 12, 01)], [17], ["Number"], :SecondMeta) @fact_throws vcat(a, b) end context("rejects when dates overlap") do a = TimeArray([Date(2015, 10, 01), Date(2015, 11, 01)], [15, 16], ["Number"]) b = TimeArray([Date(2015, 11, 01)], [17], ["Number"]) @fact_throws vcat(a, b) end context("still works when dates are mixed") do a = TimeArray([Date(2015, 10, 01), Date(2015, 12, 01)], [15, 17], ["Number"]) b = TimeArray([Date(2015, 11, 01)], [16], ["Number"]) c = vcat(a, b) @fact length(c) --> length(a) + length(b) @fact c.colnames --> a.colnames @fact c.colnames --> b.colnames @fact c.values --> [15, 16, 17] @fact c.timestamp --> issorted end end facts("map works correctly") do context("works on both time stamps and 1D values") do a = TimeArray([Date(2015, 10, 01), Date(2015, 11, 01)], [15, 16], ["Number"], :Something) b = map((timestamp, values) -> (timestamp + Dates.Year(1), values - 1), a) @fact length(b) --> length(a) @fact b.colnames --> a.colnames @fact Dates.year(b.timestamp[1]) --> Dates.year(a.timestamp[1]) + 1 @fact b.values[1] --> a.values[1] - 1 @fact b.meta --> a.meta end context("works on both time stamps and 2D values") do a = TimeArray([Date(2015, 09, 01), Date(2015, 10, 01), Date(2015, 11, 01)], [[15 16]; [17 18]; [19 20]], ["Number 1", "Number 2"]) b = map((timestamp, values) -> (timestamp + Dates.Year(1), [values[1] + 2, values[2] - 1]), a) @fact length(b) --> length(a) @fact b.colnames --> a.colnames @fact Dates.year(b.timestamp[1]) --> Dates.year(a.timestamp[1]) + 1 @fact b.values[1, 1] --> a.values[1, 1] + 2 @fact b.values[1, 2] --> a.values[1, 2] - 1 end context("works with order of elements that varies after modifications") do a = TimeArray([Date(2015, 10, 01), Date(2015, 12, 01)], [15, 16], ["Number"]) b = map((timestamp, values) -> (timestamp + Dates.Year((timestamp >= Date(2015, 11, 01)) ? -1 : 1), values), a) @fact length(b) --> length(a) @fact b.timestamp --> issorted end end
[ 3500, 3862, 27996, 11, 220, 5991, 6601, 11, 7308, 13, 35, 689, 198, 29054, 9787, 13, 2617, 7635, 7, 25, 5589, 529, 8, 198, 29054, 9787, 13, 8807, 34242, 7, 7942, 8, 198, 198, 37473, 7203, 26000, 7512, 4560, 4943, 466, 628, 220, 220, 220, 4732, 7203, 26000, 7512, 2809, 5614, 9380, 4943, 466, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1285, 11, 717, 737, 27160, 58, 17, 60, 220, 220, 220, 220, 14610, 10111, 13, 2425, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1285, 11, 717, 737, 16514, 27823, 58, 17, 60, 220, 14610, 7536, 7, 11024, 11, 16, 11, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1285, 11, 717, 11, 938, 737, 27160, 58, 17, 60, 220, 220, 220, 220, 14610, 1802, 13, 2598, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1285, 11, 717, 11, 938, 737, 16514, 27823, 58, 17, 60, 220, 14610, 7536, 7, 11024, 11, 16, 11, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1227, 11, 717, 737, 27160, 58, 17, 60, 220, 220, 220, 14610, 1802, 13, 1495, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 565, 11, 1227, 11, 717, 737, 16514, 27823, 58, 17, 60, 14610, 7536, 7, 11024, 11, 17, 11, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1285, 11, 717, 737, 27160, 58, 17, 11, 1058, 60, 220, 14610, 685, 15377, 13, 15, 11, 15143, 13, 1495, 11, 10048, 13, 2425, 11, 10111, 13, 2425, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1285, 11, 717, 737, 16514, 27823, 58, 17, 60, 220, 14610, 7536, 7, 11024, 11, 16, 11, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1285, 11, 717, 11, 938, 737, 27160, 58, 17, 11, 1058, 60, 220, 14610, 685, 3064, 13, 15, 11, 15143, 13, 1495, 11, 7388, 13, 2548, 11, 1802, 13, 2598, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1285, 11, 717, 11, 938, 737, 16514, 27823, 58, 17, 60, 220, 14610, 7536, 7, 11024, 11, 16, 11, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1227, 11, 717, 737, 27160, 58, 17, 11, 1058, 60, 14610, 685, 13464, 13, 15, 11, 13343, 13, 15, 11, 1802, 13, 15, 11, 1802, 13, 1495, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 9807, 7, 1219, 44601, 11, 1227, 11, 717, 737, 16514, 27823, 58, 17, 60, 14610, 7536, 7, 11024, 11, 17, 11, 16, 8, 628, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37473, 7203, 647, 469, 2499, 9380, 4943, 466, 628, 220, 220, 220, 537, 16, 220, 796, 537, 58, 16, 25, 18, 60, 198, 220, 220, 220, 1034, 16, 220, 796, 537, 58, 17, 25, 19, 60, 198, 220, 220, 220, 257, 64, 489, 796, 7894, 7, 32, 2969, 43, 8, 198, 220, 220, 220, 26605, 220, 220, 796, 7894, 7, 4339, 8, 628, 220, 220, 220, 4732, 7203, 83, 1124, 951, 14933, 479, 86, 853, 9380, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 11752, 44601, 14692, 11922, 1600, 366, 20535, 33116, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 737, 4033, 14933, 14610, 14631, 64, 1600, 366, 65, 1600, 366, 66, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 11, 951, 14933, 28, 14692, 64, 2430, 65, 8973, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 64, 1600, 366, 65, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 951, 14933, 28, 14692, 64, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 11752, 44601, 14692, 11922, 1600, 366, 20535, 33116, 1058, 5083, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 737, 4033, 14933, 14610, 14631, 64, 1600, 366, 65, 1600, 366, 66, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 11, 1058, 5083, 11, 951, 14933, 28, 14692, 64, 2430, 65, 8973, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 64, 1600, 366, 65, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 5083, 11, 951, 14933, 28, 14692, 64, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 5083, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 11752, 44601, 14692, 11922, 1600, 366, 20535, 33116, 1058, 9464, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 737, 4033, 14933, 14610, 14631, 64, 1600, 366, 65, 1600, 366, 66, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 11, 1058, 9464, 11, 951, 14933, 28, 14692, 64, 2430, 65, 8973, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 64, 1600, 366, 65, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 9464, 11, 951, 14933, 28, 14692, 64, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 9464, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 11752, 44601, 14692, 11922, 1600, 366, 20535, 33116, 1058, 3506, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 737, 4033, 14933, 14610, 14631, 64, 1600, 366, 65, 1600, 366, 66, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 11, 1058, 3506, 11, 951, 14933, 28, 14692, 64, 2430, 65, 8973, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 64, 1600, 366, 65, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 3506, 11, 951, 14933, 28, 14692, 64, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 3506, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 11752, 44601, 14692, 11922, 1600, 366, 20535, 33116, 1058, 39605, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 737, 4033, 14933, 14610, 14631, 64, 1600, 366, 65, 1600, 366, 66, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 11, 1058, 39605, 11, 951, 14933, 28, 14692, 64, 2430, 65, 8973, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 64, 1600, 366, 65, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 39605, 11, 951, 14933, 28, 14692, 64, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 20121, 7, 565, 11, 1034, 11, 1058, 39605, 11, 951, 14933, 28, 14692, 64, 2430, 65, 2430, 66, 8973, 8, 198, 220, 220, 220, 886, 198, 220, 220, 198, 220, 220, 220, 4732, 7203, 7783, 82, 3376, 19114, 351, 44712, 290, 3815, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 404, 737, 27160, 14610, 20121, 7, 565, 11, 404, 11, 1058, 5083, 737, 27160, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 404, 737, 27160, 58, 17, 11, 16, 60, 14610, 537, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 404, 737, 27160, 58, 17, 11, 17, 60, 14610, 1034, 13, 27160, 58, 17, 11, 16, 60, 628, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4732, 7203, 31494, 82, 351, 37433, 19943, 5563, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 35944, 27160, 58, 16, 11, 16, 60, 220, 14610, 537, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 35944, 27160, 58, 16, 11, 17, 60, 220, 14610, 1034, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 35944, 16514, 27823, 58, 16, 60, 14610, 7536, 7, 11024, 11, 16, 11, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 647, 469, 7, 565, 11, 1034, 58, 17, 25, 20, 60, 4008, 220, 220, 220, 220, 220, 14610, 604, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 647, 469, 7, 565, 16, 11, 1034, 16, 11, 1058, 5083, 4008, 220, 220, 220, 14610, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 5083, 737, 27160, 58, 17, 11, 16, 60, 14610, 537, 16, 13, 27160, 58, 18, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 5083, 737, 27160, 58, 17, 11, 17, 60, 14610, 1034, 16, 13, 27160, 58, 17, 11, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 647, 469, 7, 565, 16, 11, 1034, 16, 11, 1058, 9464, 4008, 220, 220, 220, 220, 14610, 513, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 9464, 737, 27160, 58, 16, 11, 17, 60, 220, 14610, 2125, 272, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 9464, 737, 27160, 58, 17, 11, 16, 60, 220, 14610, 537, 16, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 9464, 737, 27160, 58, 17, 11, 17, 60, 220, 14610, 1034, 16, 13, 27160, 58, 16, 11, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 647, 469, 7, 565, 16, 11, 1034, 16, 11, 1058, 3506, 4008, 220, 220, 220, 14610, 513, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 3506, 737, 27160, 58, 17, 11, 16, 60, 14610, 537, 16, 13, 27160, 58, 18, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 3506, 737, 27160, 58, 17, 11, 17, 60, 14610, 1034, 16, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 3506, 737, 27160, 58, 18, 11, 16, 60, 14610, 2125, 272, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 647, 469, 7, 565, 16, 11, 1034, 16, 11, 1058, 39605, 4008, 220, 220, 220, 14610, 604, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 39605, 737, 27160, 58, 16, 11, 17, 60, 14610, 2125, 272, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 39605, 737, 27160, 58, 17, 11, 16, 60, 14610, 537, 16, 13, 27160, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 39605, 737, 27160, 58, 17, 11, 17, 60, 14610, 1034, 16, 13, 27160, 58, 16, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 16, 11, 404, 16, 11, 1058, 39605, 737, 27160, 58, 19, 11, 16, 60, 14610, 2125, 272, 198, 220, 220, 220, 886, 628, 220, 220, 220, 4732, 7203, 28665, 3891, 2872, 262, 3376, 3815, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 35944, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 26125, 1600, 366, 11505, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 404, 58, 17, 25, 20, 4357, 537, 737, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 14631, 11505, 1600, 366, 26125, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 4357, 1058, 5083, 737, 4033, 14933, 220, 14610, 14631, 26125, 1600, 366, 11505, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 404, 58, 17, 25, 20, 4357, 537, 11, 1058, 5083, 737, 4033, 14933, 220, 14610, 14631, 11505, 1600, 366, 26125, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 4357, 1058, 9464, 737, 4033, 14933, 220, 220, 14610, 14631, 26125, 1600, 366, 11505, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 404, 58, 17, 25, 20, 4357, 537, 11, 1058, 9464, 737, 4033, 14933, 220, 220, 14610, 14631, 11505, 1600, 366, 26125, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 4357, 1058, 3506, 737, 4033, 14933, 220, 14610, 14631, 26125, 1600, 366, 11505, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 404, 58, 17, 25, 20, 4357, 537, 11, 1058, 3506, 737, 4033, 14933, 220, 14610, 14631, 11505, 1600, 366, 26125, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 565, 11, 1034, 58, 17, 25, 20, 4357, 1058, 39605, 737, 4033, 14933, 220, 14610, 14631, 26125, 1600, 366, 11505, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 20121, 7, 404, 58, 17, 25, 20, 4357, 537, 11, 1058, 39605, 737, 4033, 14933, 220, 14610, 14631, 11505, 1600, 366, 26125, 8973, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37473, 7203, 85, 9246, 2499, 9380, 4943, 466, 198, 220, 220, 220, 4732, 7203, 1102, 9246, 268, 689, 640, 2168, 9380, 287, 352, 35, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1558, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 66, 8, 220, 14610, 4129, 7, 64, 8, 1343, 4129, 7, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 14610, 257, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 14610, 275, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 27160, 220, 220, 14610, 685, 1314, 11, 1467, 11, 1596, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4732, 7203, 1102, 9246, 268, 689, 640, 2168, 9380, 287, 362, 35, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 7769, 11, 5534, 828, 7536, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 16410, 1314, 1467, 11208, 685, 1558, 1248, 11208, 685, 1129, 1160, 60, 4357, 14631, 15057, 352, 1600, 366, 15057, 362, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1507, 1248, 4357, 14631, 15057, 352, 1600, 366, 15057, 362, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 66, 8, 220, 14610, 4129, 7, 64, 8, 1343, 4129, 7, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 14610, 257, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 14610, 275, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 27160, 220, 220, 14610, 16410, 1314, 1467, 11208, 685, 1558, 1248, 11208, 685, 1129, 1160, 11208, 685, 1507, 1248, 11907, 198, 220, 220, 220, 886, 198, 220, 220, 198, 220, 220, 220, 4732, 7203, 260, 752, 82, 618, 5721, 3891, 466, 407, 2872, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1558, 4357, 14631, 6601, 857, 407, 2872, 1271, 8973, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 886, 198, 220, 220, 198, 220, 220, 220, 4732, 7203, 260, 752, 82, 618, 1138, 292, 466, 407, 2872, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 33116, 1058, 5962, 48526, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1558, 4357, 14631, 15057, 33116, 1058, 12211, 48526, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 886, 198, 220, 220, 198, 220, 220, 220, 4732, 7203, 260, 752, 82, 618, 9667, 21721, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1558, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 62, 400, 8516, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 886, 198, 220, 220, 198, 220, 220, 220, 4732, 7203, 24219, 2499, 618, 9667, 389, 7668, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1314, 11, 1596, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1433, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 410, 9246, 7, 64, 11, 275, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 66, 8, 220, 220, 220, 14610, 4129, 7, 64, 8, 1343, 4129, 7, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 220, 220, 14610, 257, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 4033, 14933, 220, 220, 14610, 275, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 27160, 220, 220, 220, 220, 14610, 685, 1314, 11, 1467, 11, 1596, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 269, 13, 16514, 27823, 220, 14610, 1189, 9741, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37473, 7203, 8899, 2499, 9380, 4943, 466, 198, 220, 220, 220, 4732, 7203, 5225, 319, 1111, 640, 25560, 290, 352, 35, 3815, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 33116, 1058, 22210, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3975, 19510, 16514, 27823, 11, 3815, 8, 4613, 357, 16514, 27823, 1343, 44712, 13, 17688, 7, 16, 828, 3815, 532, 352, 828, 257, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 65, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 4129, 7, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 44712, 13, 1941, 7, 65, 13, 16514, 27823, 58, 16, 12962, 14610, 44712, 13, 1941, 7, 64, 13, 16514, 27823, 58, 16, 12962, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 27160, 58, 16, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 27160, 58, 16, 60, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 28961, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 28961, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4732, 7203, 5225, 319, 1111, 640, 25560, 290, 362, 35, 3815, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 7769, 11, 5534, 828, 7536, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1367, 11, 5534, 8, 4357, 16410, 1314, 1467, 11208, 685, 1558, 1248, 11208, 685, 1129, 1160, 60, 4357, 14631, 15057, 352, 1600, 366, 15057, 362, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3975, 19510, 16514, 27823, 11, 3815, 8, 4613, 357, 16514, 27823, 1343, 44712, 13, 17688, 7, 16, 828, 685, 27160, 58, 16, 60, 1343, 362, 11, 3815, 58, 17, 60, 532, 352, 46570, 257, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 65, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 4129, 7, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 4033, 14933, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 4033, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 44712, 13, 1941, 7, 65, 13, 16514, 27823, 58, 16, 12962, 14610, 44712, 13, 1941, 7, 64, 13, 16514, 27823, 58, 16, 12962, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 27160, 58, 16, 11, 352, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 27160, 58, 16, 11, 352, 60, 1343, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 27160, 58, 16, 11, 362, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14610, 257, 13, 27160, 58, 16, 11, 362, 60, 532, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4732, 7203, 5225, 351, 1502, 286, 4847, 326, 17806, 706, 19008, 4943, 466, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 3862, 19182, 26933, 10430, 7, 4626, 11, 838, 11, 5534, 828, 7536, 7, 4626, 11, 1105, 11, 5534, 8, 4357, 685, 1314, 11, 1467, 4357, 14631, 15057, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 3975, 19510, 16514, 27823, 11, 3815, 8, 4613, 357, 16514, 27823, 1343, 44712, 13, 17688, 19510, 16514, 27823, 18189, 7536, 7, 4626, 11, 1367, 11, 5534, 4008, 5633, 532, 16, 1058, 352, 828, 3815, 828, 257, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 4129, 7, 65, 8, 220, 220, 220, 14610, 4129, 7, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 22584, 275, 13, 16514, 27823, 220, 14610, 1189, 9741, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.092393
4,351
export FoldSet, FOLD_TRAIN, FOLD_TEST, foldset_match, foldset_withhold, check_fold_match ######################################### const FOLD_TRAIN = 1 const FOLD_TEST = 2 immutable FoldSet assignment::Vector{Int} # assignment[i] = j means the ith element is assigned to fold j fold::Int # target fold we either want to match or withhold, based on `match_fold` match_fold::Bool end foldset_match(assignment::Vector{Int}, fold::Int) = FoldSet(assignment, fold, true) foldset_withhold(assignment::Vector{Int}, fold::Int) = FoldSet(assignment, fold, false) function check_fold_match(fold::Integer, fold_assignment::Integer, match_fold::Bool) (fold != 0) && (fold_assignment != 0) && # NOTE(tim): zero never matches ((match_fold && fold_assignment == fold) || (!match_fold && fold_assignment != fold)) end check_fold_match(value::Integer, foldset::FoldSet) = check_fold_match(foldset.fold, value, foldset.match_fold) ######################################### # Iterator function _find_next_valid_fold_match(foldset::FoldSet, state::Int) while state < length(foldset.assignment) state += 1 if check_fold_match(foldset.assignment[state], foldset) return state end end state + 1 # returns length(foldset.assignment) + 1 on fail end Base.start(foldset::FoldSet) = _find_next_valid_fold_match(foldset, 0) Base.done(foldset::FoldSet, state::Int) = state > length(foldset.assignment) function Base.next(foldset::FoldSet, state::Int) @assert(check_fold_match(foldset.assignment[state], foldset)) state, _find_next_valid_fold_match(foldset, state) end function Base.length(foldset::FoldSet) len = 0 state = start(foldset) while !done(foldset, state) item, state = next(foldset, state) len += 1 end len end function Base.collect(foldset::FoldSet) len = length(foldset) retval = Array{Int}(len) for (i,j) in enumerate(foldset) retval[i] = j end retval end
[ 39344, 198, 220, 220, 220, 39957, 7248, 11, 628, 220, 220, 220, 376, 15173, 62, 51, 3861, 1268, 11, 198, 220, 220, 220, 376, 15173, 62, 51, 6465, 11, 628, 220, 220, 220, 5591, 2617, 62, 15699, 11, 198, 220, 220, 220, 5591, 2617, 62, 4480, 2946, 11, 628, 220, 220, 220, 2198, 62, 11379, 62, 15699, 198, 198, 29113, 7804, 2, 198, 198, 9979, 376, 15173, 62, 51, 3861, 1268, 796, 352, 198, 9979, 376, 15173, 62, 51, 6465, 796, 362, 198, 198, 8608, 18187, 39957, 7248, 198, 220, 220, 220, 16237, 3712, 38469, 90, 5317, 92, 1303, 16237, 58, 72, 60, 796, 474, 1724, 262, 340, 71, 5002, 318, 8686, 284, 5591, 474, 198, 220, 220, 220, 5591, 3712, 5317, 1303, 2496, 5591, 356, 2035, 765, 284, 2872, 393, 34224, 11, 1912, 319, 4600, 15699, 62, 11379, 63, 198, 220, 220, 220, 2872, 62, 11379, 3712, 33, 970, 198, 437, 198, 11379, 2617, 62, 15699, 7, 562, 16747, 3712, 38469, 90, 5317, 5512, 5591, 3712, 5317, 8, 796, 39957, 7248, 7, 562, 16747, 11, 5591, 11, 2081, 8, 198, 11379, 2617, 62, 4480, 2946, 7, 562, 16747, 3712, 38469, 90, 5317, 5512, 5591, 3712, 5317, 8, 796, 39957, 7248, 7, 562, 16747, 11, 5591, 11, 3991, 8, 198, 198, 8818, 2198, 62, 11379, 62, 15699, 7, 11379, 3712, 46541, 11, 5591, 62, 562, 16747, 3712, 46541, 11, 2872, 62, 11379, 3712, 33, 970, 8, 198, 220, 220, 220, 357, 11379, 14512, 657, 8, 11405, 357, 11379, 62, 562, 16747, 14512, 657, 8, 11405, 1303, 24550, 7, 16514, 2599, 6632, 1239, 7466, 198, 220, 220, 220, 220, 220, 220, 220, 14808, 15699, 62, 11379, 11405, 5591, 62, 562, 16747, 6624, 5591, 8, 8614, 22759, 15699, 62, 11379, 11405, 5591, 62, 562, 16747, 14512, 5591, 4008, 198, 437, 198, 9122, 62, 11379, 62, 15699, 7, 8367, 3712, 46541, 11, 5591, 2617, 3712, 37, 727, 7248, 8, 796, 2198, 62, 11379, 62, 15699, 7, 11379, 2617, 13, 11379, 11, 1988, 11, 5591, 2617, 13, 15699, 62, 11379, 8, 198, 198, 29113, 7804, 2, 198, 2, 40806, 1352, 198, 198, 8818, 4808, 19796, 62, 19545, 62, 12102, 62, 11379, 62, 15699, 7, 11379, 2617, 3712, 37, 727, 7248, 11, 1181, 3712, 5317, 8, 198, 220, 220, 220, 981, 1181, 1279, 4129, 7, 11379, 2617, 13, 562, 16747, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2198, 62, 11379, 62, 15699, 7, 11379, 2617, 13, 562, 16747, 58, 5219, 4357, 5591, 2617, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1181, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1181, 1343, 352, 1303, 5860, 4129, 7, 11379, 2617, 13, 562, 16747, 8, 1343, 352, 319, 2038, 198, 437, 198, 14881, 13, 9688, 7, 11379, 2617, 3712, 37, 727, 7248, 8, 796, 4808, 19796, 62, 19545, 62, 12102, 62, 11379, 62, 15699, 7, 11379, 2617, 11, 657, 8, 198, 14881, 13, 28060, 7, 11379, 2617, 3712, 37, 727, 7248, 11, 1181, 3712, 5317, 8, 796, 1181, 1875, 4129, 7, 11379, 2617, 13, 562, 16747, 8, 198, 8818, 7308, 13, 19545, 7, 11379, 2617, 3712, 37, 727, 7248, 11, 1181, 3712, 5317, 8, 198, 220, 220, 220, 2488, 30493, 7, 9122, 62, 11379, 62, 15699, 7, 11379, 2617, 13, 562, 16747, 58, 5219, 4357, 5591, 2617, 4008, 198, 220, 220, 220, 1181, 11, 4808, 19796, 62, 19545, 62, 12102, 62, 11379, 62, 15699, 7, 11379, 2617, 11, 1181, 8, 198, 437, 198, 8818, 7308, 13, 13664, 7, 11379, 2617, 3712, 37, 727, 7248, 8, 198, 220, 220, 220, 18896, 796, 657, 198, 220, 220, 220, 1181, 796, 923, 7, 11379, 2617, 8, 198, 220, 220, 220, 981, 5145, 28060, 7, 11379, 2617, 11, 1181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2378, 11, 1181, 796, 1306, 7, 11379, 2617, 11, 1181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18896, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 18896, 198, 437, 198, 8818, 7308, 13, 33327, 7, 11379, 2617, 3712, 37, 727, 7248, 8, 198, 220, 220, 220, 18896, 796, 4129, 7, 11379, 2617, 8, 198, 220, 220, 220, 1005, 2100, 796, 15690, 90, 5317, 92, 7, 11925, 8, 198, 220, 220, 220, 329, 357, 72, 11, 73, 8, 287, 27056, 378, 7, 11379, 2617, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 2100, 58, 72, 60, 796, 474, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1005, 2100, 198, 437 ]
2.640052
764
#=############################################################################################## Filename: solve_rotor.jl Author: Ryan Anderson Contact: rymanderson@gmail.com README: define an `Action` object to solve a CCBlade rotor =############################################################################################### """ solve_rotor(aircraft, parameters, freestream, environment, step_range, stepi, step_symbol) Action function. # Arguments: * `aircraft::Aircraft` : `Aircraft` system object * `parameters<:Parameters` `Parameters` struct * `freestream::Freestream` : `Freestream` object * `environment::Environment` `Environment` object * `step_range::AbstractArray` : array of times for which the simulation is run * `stepi::Int` : index of the current step * `step_symbol::String` : defines the step, e.g. `alpha` or `time` NOTE: `omegas` is commanded while `Js` is calculated `parameters <: Parameters` requires the following elements: * `omegas::Vector{Float64}` : a vector of rotational speeds in rad/s at the current step (commanded) * `Js::Array{Float64,2}` : each i,jth element is the advance ratio of the ith rotor at the jth step (calculated) * `Ts::Array{Float64,2}` : each i,jth element is the thrust of the ith rotor at the jth step * `Qs::Array{Float64,2}` : each i,jth element is the torque of the ith rotor at the jth step * `Ps::Array{Float64,2}`: [i,j]th element is the power of the ith rotor at the jth step * `us::Vector{Vector{Vector{Float64}}}` : each [i][j][k]th element is the axial induced velocity at ith step of the jth rotor at the kth radial section * `vs::Vector{Vector{Vector{Float64}}}` : each [i][j][k]th element is the swirl induced velocity at ith step of the jth rotor at the kth radial section """ function solve_rotor(aircraft, parameters, freestream, environment, step_range, stepi, step_symbol) # extract parameters omegas = parameters.omegas[stepi] Js = parameters.Js[:,stepi] Ts = parameters.Ts[:,stepi] Qs = parameters.Qs[:,stepi] Ps = parameters.Ps[:,stepi] us = parameters.us[stepi] vs = parameters.vs[stepi] solve_rotors!(Js, Ts, Qs, Ps, us, vs, aircraft.rotor_system, omegas, freestream, environment) return false end """ solve_rotor(aircraft, step_range) Method returns initialized elements required for the `parameters <: Parameters` struct during simulation. # Arguments: * `aircraft::Aircraft`: system to be simulated * `step_range::AbstractArray`: defines each step of the simulation # Returns: * `omegas::Array{Float64,2}`: [i,j]th elemnt is the rotational speeds in rad/s of the ith rotor at the jth step * `Js::Array{Float64,2}`: [i,j]th element is the advance ratio of the ith rotor at the jth step * `Ts::Array{Float64,2}`: [i,j]th element is the thrust of the ith rotor at the jth step * `Qs::Array{Float64,2}`: [i,j]th element is the torque of the ith rotor at the jth step * `Ps::Array{Float64,2}`: [i,j]th element is the power of the ith rotor at the jth step * `us::Vector{Vector{Vector{Float64}}}`: each [i][j][k]th element is the axial induced velocity at ith step of the jth rotor at the kth radial section * `vs::Vector{Vector{Vector{Float64}}}`: each [i][j][k]th element is the swirl induced velocity at ith step of the jth rotor at the kth radial section """ function solve_rotor(aircraft, step_range) nrotors = length(aircraft.rotor_system.index) # number of rotors omegas = ones(Float64, nrotors, length(step_range)) Js = zeros(nrotors, length(step_range)) Ts = zeros(nrotors, length(step_range)) Qs = zeros(nrotors, length(step_range)) Ps = zeros(nrotors, length(step_range)) us = [[zeros(length(aircraft.rotor_system.rlists[i])) for i in aircraft.rotor_system.index] for _ in 1:length(step_range)] vs = deepcopy(us) return omegas, Js, Ts, Qs, Ps, us, vs end # # prepare solutionkeys and solutioninits for this particular system and simulation # solutionkeys = [ # "thrust", # "torque", # "efficiency", # "u", # "v" # ]
[ 2, 28, 29113, 29113, 14468, 7804, 4242, 2235, 198, 35063, 25, 8494, 62, 10599, 273, 13, 20362, 198, 13838, 25, 6047, 9918, 198, 17829, 25, 374, 4948, 392, 882, 31, 14816, 13, 785, 198, 15675, 11682, 25, 8160, 281, 4600, 12502, 63, 2134, 284, 8494, 257, 12624, 47520, 44883, 198, 28, 29113, 29113, 14468, 7804, 4242, 21017, 198, 198, 37811, 198, 220, 220, 220, 8494, 62, 10599, 273, 7, 958, 3323, 11, 10007, 11, 2030, 395, 1476, 11, 2858, 11, 2239, 62, 9521, 11, 2239, 72, 11, 2239, 62, 1837, 23650, 8, 198, 198, 12502, 2163, 13, 198, 198, 2, 20559, 2886, 25, 198, 198, 9, 4600, 958, 3323, 3712, 32, 27002, 63, 1058, 4600, 32, 27002, 63, 1080, 2134, 198, 9, 4600, 17143, 7307, 27, 25, 48944, 63, 4600, 48944, 63, 2878, 198, 9, 4600, 19503, 395, 1476, 3712, 20366, 395, 1476, 63, 1058, 4600, 20366, 395, 1476, 63, 2134, 198, 9, 4600, 38986, 3712, 31441, 63, 4600, 31441, 63, 2134, 198, 9, 4600, 9662, 62, 9521, 3712, 23839, 19182, 63, 1058, 7177, 286, 1661, 329, 543, 262, 18640, 318, 1057, 198, 9, 4600, 9662, 72, 3712, 5317, 63, 1058, 6376, 286, 262, 1459, 2239, 198, 9, 4600, 9662, 62, 1837, 23650, 3712, 10100, 63, 1058, 15738, 262, 2239, 11, 304, 13, 70, 13, 4600, 26591, 63, 393, 4600, 2435, 63, 198, 198, 16580, 25, 4600, 462, 22649, 63, 318, 22419, 981, 4600, 49044, 63, 318, 10488, 198, 198, 63, 17143, 7307, 1279, 25, 40117, 63, 4433, 262, 1708, 4847, 25, 198, 198, 9, 4600, 462, 22649, 3712, 38469, 90, 43879, 2414, 92, 63, 1058, 257, 15879, 286, 5724, 864, 12055, 287, 2511, 14, 82, 379, 262, 1459, 2239, 357, 9503, 12249, 8, 198, 9, 4600, 49044, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 1058, 1123, 1312, 11, 73, 400, 5002, 318, 262, 5963, 8064, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 357, 9948, 49262, 8, 198, 9, 4600, 33758, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 1058, 1123, 1312, 11, 73, 400, 5002, 318, 262, 14613, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 48, 82, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 1058, 1123, 1312, 11, 73, 400, 5002, 318, 262, 26415, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 12016, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 5002, 318, 262, 1176, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 385, 3712, 38469, 90, 38469, 90, 38469, 90, 43879, 2414, 42535, 63, 1058, 1123, 685, 72, 7131, 73, 7131, 74, 60, 400, 5002, 318, 262, 7877, 498, 18268, 15432, 379, 340, 71, 2239, 286, 262, 474, 400, 44883, 379, 262, 479, 400, 44503, 2665, 198, 9, 4600, 14259, 3712, 38469, 90, 38469, 90, 38469, 90, 43879, 2414, 42535, 63, 1058, 1123, 685, 72, 7131, 73, 7131, 74, 60, 400, 5002, 318, 262, 42835, 18268, 15432, 379, 340, 71, 2239, 286, 262, 474, 400, 44883, 379, 262, 479, 400, 44503, 2665, 198, 198, 37811, 198, 8818, 8494, 62, 10599, 273, 7, 958, 3323, 11, 10007, 11, 2030, 395, 1476, 11, 2858, 11, 2239, 62, 9521, 11, 2239, 72, 11, 2239, 62, 1837, 23650, 8, 628, 220, 220, 220, 1303, 7925, 10007, 198, 220, 220, 220, 267, 1326, 22649, 796, 10007, 13, 462, 22649, 58, 9662, 72, 60, 198, 220, 220, 220, 449, 82, 796, 10007, 13, 49044, 58, 45299, 9662, 72, 60, 198, 220, 220, 220, 13146, 796, 10007, 13, 33758, 58, 45299, 9662, 72, 60, 198, 220, 220, 220, 1195, 82, 796, 10007, 13, 48, 82, 58, 45299, 9662, 72, 60, 198, 220, 220, 220, 33610, 796, 10007, 13, 12016, 58, 45299, 9662, 72, 60, 198, 220, 220, 220, 514, 796, 10007, 13, 385, 58, 9662, 72, 60, 198, 220, 220, 220, 3691, 796, 10007, 13, 14259, 58, 9662, 72, 60, 628, 220, 220, 220, 8494, 62, 10599, 669, 0, 7, 49044, 11, 13146, 11, 1195, 82, 11, 33610, 11, 514, 11, 3691, 11, 6215, 13, 10599, 273, 62, 10057, 11, 267, 1326, 22649, 11, 2030, 395, 1476, 11, 2858, 8, 628, 220, 220, 220, 1441, 3991, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 8494, 62, 10599, 273, 7, 958, 3323, 11, 2239, 62, 9521, 8, 198, 198, 17410, 5860, 23224, 4847, 2672, 329, 262, 4600, 17143, 7307, 1279, 25, 40117, 63, 2878, 1141, 18640, 13, 198, 198, 2, 20559, 2886, 25, 198, 198, 9, 4600, 958, 3323, 3712, 32, 27002, 63, 25, 1080, 284, 307, 28590, 198, 9, 4600, 9662, 62, 9521, 3712, 23839, 19182, 63, 25, 15738, 1123, 2239, 286, 262, 18640, 198, 198, 2, 16409, 25, 198, 198, 9, 4600, 462, 22649, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 9766, 76, 429, 318, 262, 5724, 864, 12055, 287, 2511, 14, 82, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 49044, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 5002, 318, 262, 5963, 8064, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 33758, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 5002, 318, 262, 14613, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 48, 82, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 5002, 318, 262, 26415, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 12016, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 63, 25, 685, 72, 11, 73, 60, 400, 5002, 318, 262, 1176, 286, 262, 340, 71, 44883, 379, 262, 474, 400, 2239, 198, 9, 4600, 385, 3712, 38469, 90, 38469, 90, 38469, 90, 43879, 2414, 42535, 63, 25, 1123, 685, 72, 7131, 73, 7131, 74, 60, 400, 5002, 318, 262, 7877, 498, 18268, 15432, 379, 340, 71, 2239, 286, 262, 474, 400, 44883, 379, 262, 479, 400, 44503, 2665, 198, 9, 4600, 14259, 3712, 38469, 90, 38469, 90, 38469, 90, 43879, 2414, 42535, 63, 25, 1123, 685, 72, 7131, 73, 7131, 74, 60, 400, 5002, 318, 262, 42835, 18268, 15432, 379, 340, 71, 2239, 286, 262, 474, 400, 44883, 379, 262, 479, 400, 44503, 2665, 198, 198, 37811, 198, 8818, 8494, 62, 10599, 273, 7, 958, 3323, 11, 2239, 62, 9521, 8, 628, 220, 220, 220, 299, 10599, 669, 796, 4129, 7, 958, 3323, 13, 10599, 273, 62, 10057, 13, 9630, 8, 1303, 1271, 286, 5724, 669, 198, 220, 220, 220, 267, 1326, 22649, 796, 3392, 7, 43879, 2414, 11, 299, 10599, 669, 11, 4129, 7, 9662, 62, 9521, 4008, 198, 220, 220, 220, 449, 82, 796, 1976, 27498, 7, 77, 10599, 669, 11, 4129, 7, 9662, 62, 9521, 4008, 198, 220, 220, 220, 13146, 796, 1976, 27498, 7, 77, 10599, 669, 11, 4129, 7, 9662, 62, 9521, 4008, 198, 220, 220, 220, 1195, 82, 796, 1976, 27498, 7, 77, 10599, 669, 11, 4129, 7, 9662, 62, 9521, 4008, 198, 220, 220, 220, 33610, 796, 1976, 27498, 7, 77, 10599, 669, 11, 4129, 7, 9662, 62, 9521, 4008, 198, 220, 220, 220, 514, 796, 16410, 9107, 418, 7, 13664, 7, 958, 3323, 13, 10599, 273, 62, 10057, 13, 81, 20713, 58, 72, 60, 4008, 329, 1312, 287, 6215, 13, 10599, 273, 62, 10057, 13, 9630, 60, 329, 4808, 287, 352, 25, 13664, 7, 9662, 62, 9521, 15437, 198, 220, 220, 220, 3691, 796, 2769, 30073, 7, 385, 8, 628, 220, 220, 220, 1441, 267, 1326, 22649, 11, 449, 82, 11, 13146, 11, 1195, 82, 11, 33610, 11, 514, 11, 3691, 198, 437, 198, 198, 2, 1303, 8335, 4610, 13083, 290, 4610, 259, 896, 329, 428, 1948, 1080, 290, 18640, 198, 2, 4610, 13083, 796, 685, 198, 2, 220, 220, 220, 220, 366, 400, 11469, 1600, 198, 2, 220, 220, 220, 220, 366, 13165, 4188, 1600, 198, 2, 220, 220, 220, 220, 366, 45888, 1600, 198, 2, 220, 220, 220, 220, 366, 84, 1600, 198, 2, 220, 220, 220, 220, 366, 85, 1, 198, 2, 2361, 198 ]
2.957447
1,363
module SpecialMatrices import Base: getindex, size, * struct JordanBlock{T<:Number} <: AbstractMatrix{T} blocks::Vector{Int} diag::T end size(A::JordanBlock) = Tuple([1; 1] * sum(A.blocks)) function getindex(A::JordanBlock{T}, i::Int, j::Int) where T <: Number if i == j A.diag elseif i > j || j > i + 1 zero(T) else if i in cumsum(A.blocks) zero(T) else one(T) end end end function *(J::JordanBlock, A::AbstractMatrix) n = size(J, 2) na, ma = size(A) n == na || error("dimension mismatch") M = A * J.diag for i = 1:n-1 if J[i,i+1] != 0 M[i,:] += A[i+1,:] end end M end end #module
[ 198, 21412, 6093, 19044, 45977, 198, 198, 11748, 7308, 25, 220, 651, 9630, 11, 2546, 11, 1635, 198, 198, 7249, 8078, 12235, 90, 51, 27, 25, 15057, 92, 1279, 25, 27741, 46912, 90, 51, 92, 198, 220, 7021, 3712, 38469, 90, 5317, 92, 198, 220, 2566, 363, 3712, 51, 198, 437, 198, 198, 7857, 7, 32, 3712, 34522, 12235, 8, 796, 309, 29291, 26933, 16, 26, 352, 60, 1635, 2160, 7, 32, 13, 27372, 4008, 198, 198, 8818, 651, 9630, 7, 32, 3712, 34522, 12235, 90, 51, 5512, 1312, 3712, 5317, 11, 474, 3712, 5317, 8, 810, 309, 1279, 25, 7913, 198, 220, 611, 1312, 6624, 474, 198, 220, 220, 220, 317, 13, 10989, 363, 198, 220, 2073, 361, 1312, 1875, 474, 8614, 474, 1875, 1312, 1343, 352, 198, 220, 220, 220, 6632, 7, 51, 8, 198, 220, 2073, 198, 220, 220, 220, 611, 1312, 287, 269, 5700, 388, 7, 32, 13, 27372, 8, 198, 220, 220, 220, 220, 220, 6632, 7, 51, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 530, 7, 51, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198, 198, 8818, 1635, 7, 41, 3712, 34522, 12235, 11, 317, 3712, 23839, 46912, 8, 198, 220, 299, 796, 2546, 7, 41, 11, 362, 8, 198, 220, 12385, 11, 17266, 796, 2546, 7, 32, 8, 198, 220, 299, 6624, 12385, 8614, 4049, 7203, 46156, 46318, 4943, 198, 220, 337, 796, 317, 1635, 449, 13, 10989, 363, 198, 220, 329, 1312, 796, 352, 25, 77, 12, 16, 198, 220, 220, 220, 611, 449, 58, 72, 11, 72, 10, 16, 60, 14512, 657, 198, 220, 220, 220, 220, 220, 337, 58, 72, 11, 47715, 15853, 317, 58, 72, 10, 16, 11, 47715, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 337, 198, 437, 198, 198, 437, 1303, 21412, 628, 198 ]
2.148867
309