content
stringlengths
6
1.03M
input_ids
sequencelengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<filename>test/runtests.jl # assert file to test polynomial implementation using Test using LinearAlgebra using Polynomials using SpecialFunctions using RecipesBase: apply_recipe import SparseArrays: sparse, nnz using OffsetArrays @testset "Standard basis" begin include("StandardBasis.jl") end @testset "ChebyshevT" begin include("ChebyshevT.jl") end @testset "Poly, Pade (compatability)" begin include("Poly.jl") end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 2, 6818, 2393, 284, 1332, 745, 6213, 49070, 7822, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 12280, 26601, 8231, 198, 3500, 6093, 24629, 2733, 198, 3500, 44229, 14881, 25, 4174, 62, 29102, 431, 198, 198, 11748, 1338, 17208, 3163, 20477, 25, 29877, 11, 299, 27305, 198, 3500, 3242, 2617, 3163, 20477, 198, 198, 31, 9288, 2617, 366, 23615, 4308, 1, 2221, 2291, 7203, 23615, 15522, 271, 13, 20362, 4943, 886, 198, 31, 9288, 2617, 366, 7376, 48209, 258, 85, 51, 1, 2221, 2291, 7203, 7376, 48209, 258, 85, 51, 13, 20362, 4943, 886, 198, 31, 9288, 2617, 366, 34220, 11, 350, 671, 357, 5589, 265, 1799, 16725, 2221, 2291, 7203, 34220, 13, 20362, 4943, 886, 198 ]
3.238462
130
""" free_energy!(model, config) Compute the free energy of the SCFT polymer model. The chemical potential is also returned. Only applicable to two-chain two-component system, e.g. AB/A, AB3/A etc. """ function free_energy!(model, config) cellopt = uppercase(config["Algorithm_Cell_Optimization"]["algorithm"]) if cellopt == "SINGLE" F = run!(model, config) elseif cellopt == "BRENT" || cellopt == "AUTO" res = optimize_cell!(model, config) config["Algorithm_Cell_Optimization"]["cell_guess"][1] = Optim.minimizer(res) # F = minimum(res) end return Polyorder.H(model)+Polyorder.Hi(model), Polyorder.mu(model) end """ grand_potential(ϕ₁, ϕ₂, ϕ₀, model1, config1; model2=nothing, config2=nothing) Compute the grand potential and its first order derivatives. Note the same polymer model is assumed is for model1 and model2 but for different phases and chain volume fractions. If model2 and config2 are also specified. Theire consistency with model1 and config1 is not checked! Please make sure they describe the same polymer model! Only applicable to two-chain two-component system, e.g. AB/A, AB3/A etc. This method is deprecated and replaced by PhaseDiagram.jl: gibbs_free_energy. """ function grand_potential(ϕ₁, ϕ₂, ϕ₀, model1, config1; model2=nothing, config2=nothing) if model2 === nothing model2 = model1 end if config2 === nothing config2 = config1 end v₁ = (ϕ₀ - ϕ₂) / (ϕ₁ - ϕ₂) v₂ = 1 - v₁ config1["Model"]["phi"][1] = 1 - ϕ₁ config1["Model"]["phi"][2] = ϕ₁ F₁, μ₁ = free_energy!(model1, config1) config2["Model"]["phi"][1] = 1 - ϕ₂ config2["Model"]["phi"][2] = ϕ₂ F₂, μ₂ = free_energy!(model2, config2) G = v₁ * F₁ + v₂ * F₂ fs = config1["Model"]["f"] α = fs[1] * fs[end] dG1 = v₁ * (F₂ - F₁) / (ϕ₁ - ϕ₂) + v₁ * μ₁ / α dG2 = v₂ * (F₂ - F₁) / (ϕ₁ - ϕ₂) + v₂ * μ₂ / α return G, dG1, dG2 end
[ 37811, 198, 220, 220, 220, 1479, 62, 22554, 0, 7, 19849, 11, 4566, 8, 198, 198, 7293, 1133, 262, 1479, 2568, 286, 262, 6374, 9792, 30528, 2746, 13, 383, 5931, 2785, 318, 635, 4504, 13, 198, 198, 10049, 9723, 284, 734, 12, 7983, 734, 12, 42895, 1080, 11, 304, 13, 70, 13, 9564, 14, 32, 11, 9564, 18, 14, 32, 3503, 13, 198, 37811, 198, 8818, 1479, 62, 22554, 0, 7, 19849, 11, 4566, 8, 198, 220, 220, 220, 2685, 8738, 796, 334, 39921, 589, 7, 11250, 14692, 2348, 42289, 62, 28780, 62, 27871, 320, 1634, 1, 7131, 1, 282, 42289, 8973, 8, 198, 220, 220, 220, 611, 2685, 8738, 6624, 366, 50, 2751, 2538, 1, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 1057, 0, 7, 19849, 11, 4566, 8, 198, 220, 220, 220, 2073, 361, 2685, 8738, 6624, 366, 11473, 3525, 1, 8614, 2685, 8738, 6624, 366, 39371, 46, 1, 198, 220, 220, 220, 220, 220, 220, 220, 581, 796, 27183, 62, 3846, 0, 7, 19849, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 14692, 2348, 42289, 62, 28780, 62, 27871, 320, 1634, 1, 7131, 1, 3846, 62, 5162, 408, 1, 7131, 16, 60, 796, 30011, 13, 1084, 320, 7509, 7, 411, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 376, 796, 5288, 7, 411, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 12280, 2875, 13, 39, 7, 19849, 47762, 34220, 2875, 13, 17250, 7, 19849, 828, 12280, 2875, 13, 30300, 7, 19849, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4490, 62, 13059, 1843, 7, 139, 243, 158, 224, 223, 11, 18074, 243, 158, 224, 224, 11, 18074, 243, 158, 224, 222, 11, 2746, 16, 11, 4566, 16, 26, 2746, 17, 28, 22366, 11, 4566, 17, 28, 22366, 8, 198, 198, 7293, 1133, 262, 4490, 2785, 290, 663, 717, 1502, 28486, 13, 5740, 262, 976, 30528, 2746, 318, 9672, 318, 329, 2746, 16, 290, 2746, 17, 475, 329, 1180, 21164, 290, 6333, 6115, 49876, 13, 1002, 2746, 17, 290, 4566, 17, 389, 635, 7368, 13, 383, 557, 15794, 351, 2746, 16, 290, 4566, 16, 318, 407, 10667, 0, 4222, 787, 1654, 484, 6901, 262, 976, 30528, 2746, 0, 198, 198, 10049, 9723, 284, 734, 12, 7983, 734, 12, 42895, 1080, 11, 304, 13, 70, 13, 9564, 14, 32, 11, 9564, 18, 14, 32, 3503, 13, 198, 198, 1212, 2446, 318, 39224, 290, 6928, 416, 18983, 18683, 6713, 13, 20362, 25, 46795, 1443, 62, 5787, 62, 22554, 13, 198, 37811, 198, 8818, 4490, 62, 13059, 1843, 7, 139, 243, 158, 224, 223, 11, 18074, 243, 158, 224, 224, 11, 18074, 243, 158, 224, 222, 11, 2746, 16, 11, 4566, 16, 26, 2746, 17, 28, 22366, 11, 4566, 17, 28, 22366, 8, 198, 220, 220, 220, 611, 2746, 17, 24844, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 17, 796, 2746, 16, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 4566, 17, 24844, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 17, 796, 4566, 16, 198, 220, 220, 220, 886, 198, 220, 220, 220, 410, 158, 224, 223, 796, 357, 139, 243, 158, 224, 222, 532, 18074, 243, 158, 224, 224, 8, 1220, 357, 139, 243, 158, 224, 223, 532, 18074, 243, 158, 224, 224, 8, 198, 220, 220, 220, 410, 158, 224, 224, 796, 352, 532, 410, 158, 224, 223, 198, 220, 220, 220, 4566, 16, 14692, 17633, 1, 7131, 1, 34846, 1, 7131, 16, 60, 796, 352, 532, 18074, 243, 158, 224, 223, 198, 220, 220, 220, 4566, 16, 14692, 17633, 1, 7131, 1, 34846, 1, 7131, 17, 60, 796, 18074, 243, 158, 224, 223, 198, 220, 220, 220, 376, 158, 224, 223, 11, 18919, 158, 224, 223, 796, 1479, 62, 22554, 0, 7, 19849, 16, 11, 4566, 16, 8, 198, 220, 220, 220, 4566, 17, 14692, 17633, 1, 7131, 1, 34846, 1, 7131, 16, 60, 796, 352, 532, 18074, 243, 158, 224, 224, 198, 220, 220, 220, 4566, 17, 14692, 17633, 1, 7131, 1, 34846, 1, 7131, 17, 60, 796, 18074, 243, 158, 224, 224, 198, 220, 220, 220, 376, 158, 224, 224, 11, 18919, 158, 224, 224, 796, 1479, 62, 22554, 0, 7, 19849, 17, 11, 4566, 17, 8, 198, 220, 220, 220, 402, 796, 410, 158, 224, 223, 1635, 376, 158, 224, 223, 1343, 410, 158, 224, 224, 1635, 376, 158, 224, 224, 198, 220, 220, 220, 43458, 796, 4566, 16, 14692, 17633, 1, 7131, 1, 69, 8973, 198, 220, 220, 220, 26367, 796, 43458, 58, 16, 60, 1635, 43458, 58, 437, 60, 198, 220, 220, 220, 288, 38, 16, 796, 410, 158, 224, 223, 1635, 357, 37, 158, 224, 224, 532, 376, 158, 224, 223, 8, 1220, 357, 139, 243, 158, 224, 223, 532, 18074, 243, 158, 224, 224, 8, 1343, 410, 158, 224, 223, 1635, 18919, 158, 224, 223, 1220, 26367, 198, 220, 220, 220, 288, 38, 17, 796, 410, 158, 224, 224, 1635, 357, 37, 158, 224, 224, 532, 376, 158, 224, 223, 8, 1220, 357, 139, 243, 158, 224, 223, 532, 18074, 243, 158, 224, 224, 8, 1343, 410, 158, 224, 224, 1635, 18919, 158, 224, 224, 1220, 26367, 198, 220, 220, 220, 1441, 402, 11, 288, 38, 16, 11, 288, 38, 17, 198, 437 ]
2.205882
884
abstract AbstractRemoteSegments remotesegments(p::AbstractPolicy,m::AbstractModel,s::AbstractSampler,nproposals::Int) = _remotesegments(p,m,s,nproposals) numsegments(s::AbstractRemoteSegments) = s.numsegments numproposalspersegment(s::AbstractRemoteSegments) = s.numproposalspersegment numtotalproposals(s::AbstractRemoteSegments) = s.numsegments*s.numproposalspersegment @inline _numjobsegments(::Type{Val{:procs}}) = nprocs() @inline _numjobsegments(::Type{Val{:workers}}) = nworkers() @inline _numjobsegments(::Type{Val{:test}}) = 3 @inline _processnumbers(::Type{Val{:procs}}) = procs() @inline _processnumbers(::Type{Val{:workers}}) = workers() @inline _processnumbers(::Type{Val{:test}}) = workers() @inline _numproposalspersegment(nproposals::Int,njobsegments::Int) = ceil(Int,nproposals/njobsegments)
[ 397, 8709, 27741, 36510, 41030, 902, 198, 198, 2787, 6421, 1533, 902, 7, 79, 3712, 23839, 36727, 11, 76, 3712, 23839, 17633, 11, 82, 3712, 23839, 16305, 20053, 11, 77, 1676, 1930, 874, 3712, 5317, 8, 796, 4808, 2787, 6421, 1533, 902, 7, 79, 11, 76, 11, 82, 11, 77, 1676, 1930, 874, 8, 198, 198, 22510, 325, 11726, 7, 82, 3712, 23839, 36510, 41030, 902, 8, 796, 264, 13, 22510, 325, 11726, 198, 77, 931, 1773, 418, 874, 38696, 5154, 7, 82, 3712, 23839, 36510, 41030, 902, 8, 796, 264, 13, 77, 931, 1773, 418, 874, 38696, 5154, 198, 22510, 23350, 1676, 1930, 874, 7, 82, 3712, 23839, 36510, 41030, 902, 8, 796, 264, 13, 22510, 325, 11726, 9, 82, 13, 77, 931, 1773, 418, 874, 38696, 5154, 198, 198, 31, 45145, 4808, 22510, 21858, 325, 11726, 7, 3712, 6030, 90, 7762, 90, 25, 1676, 6359, 11709, 8, 796, 299, 1676, 6359, 3419, 198, 31, 45145, 4808, 22510, 21858, 325, 11726, 7, 3712, 6030, 90, 7762, 90, 25, 22896, 11709, 8, 796, 299, 22896, 3419, 198, 31, 45145, 4808, 22510, 21858, 325, 11726, 7, 3712, 6030, 90, 7762, 90, 25, 9288, 11709, 8, 796, 513, 198, 198, 31, 45145, 4808, 14681, 77, 17024, 7, 3712, 6030, 90, 7762, 90, 25, 1676, 6359, 11709, 8, 796, 386, 6359, 3419, 198, 31, 45145, 4808, 14681, 77, 17024, 7, 3712, 6030, 90, 7762, 90, 25, 22896, 11709, 8, 796, 3259, 3419, 198, 31, 45145, 4808, 14681, 77, 17024, 7, 3712, 6030, 90, 7762, 90, 25, 9288, 11709, 8, 796, 3259, 3419, 198, 198, 31, 45145, 4808, 77, 931, 1773, 418, 874, 38696, 5154, 7, 77, 1676, 1930, 874, 3712, 5317, 11, 77, 21858, 325, 11726, 3712, 5317, 8, 796, 2906, 346, 7, 5317, 11, 77, 1676, 1930, 874, 14, 77, 21858, 325, 11726, 8, 198 ]
2.686469
303
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct IoK8sApiCoreV1HTTPGetAction <: SwaggerModel host::Any # spec type: Union{ Nothing, String } # spec name: host httpHeaders::Any # spec type: Union{ Nothing, Vector{IoK8sApiCoreV1HTTPHeader} } # spec name: httpHeaders path::Any # spec type: Union{ Nothing, String } # spec name: path port::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgUtilIntstrIntOrString } # spec name: port scheme::Any # spec type: Union{ Nothing, String } # spec name: scheme function IoK8sApiCoreV1HTTPGetAction(;host=nothing, httpHeaders=nothing, path=nothing, port=nothing, scheme=nothing) o = new() validate_property(IoK8sApiCoreV1HTTPGetAction, Symbol("host"), host) setfield!(o, Symbol("host"), host) validate_property(IoK8sApiCoreV1HTTPGetAction, Symbol("httpHeaders"), httpHeaders) setfield!(o, Symbol("httpHeaders"), httpHeaders) validate_property(IoK8sApiCoreV1HTTPGetAction, Symbol("path"), path) setfield!(o, Symbol("path"), path) validate_property(IoK8sApiCoreV1HTTPGetAction, Symbol("port"), port) setfield!(o, Symbol("port"), port) validate_property(IoK8sApiCoreV1HTTPGetAction, Symbol("scheme"), scheme) setfield!(o, Symbol("scheme"), scheme) o end end # type IoK8sApiCoreV1HTTPGetAction const _property_map_IoK8sApiCoreV1HTTPGetAction = Dict{Symbol,Symbol}(Symbol("host")=>Symbol("host"), Symbol("httpHeaders")=>Symbol("httpHeaders"), Symbol("path")=>Symbol("path"), Symbol("port")=>Symbol("port"), Symbol("scheme")=>Symbol("scheme")) const _property_types_IoK8sApiCoreV1HTTPGetAction = Dict{Symbol,String}(Symbol("host")=>"String", Symbol("httpHeaders")=>"Vector{IoK8sApiCoreV1HTTPHeader}", Symbol("path")=>"String", Symbol("port")=>"IoK8sApimachineryPkgUtilIntstrIntOrString", Symbol("scheme")=>"String") Base.propertynames(::Type{ IoK8sApiCoreV1HTTPGetAction }) = collect(keys(_property_map_IoK8sApiCoreV1HTTPGetAction)) Swagger.property_type(::Type{ IoK8sApiCoreV1HTTPGetAction }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_IoK8sApiCoreV1HTTPGetAction[name]))} Swagger.field_name(::Type{ IoK8sApiCoreV1HTTPGetAction }, property_name::Symbol) = _property_map_IoK8sApiCoreV1HTTPGetAction[property_name] function check_required(o::IoK8sApiCoreV1HTTPGetAction) (getproperty(o, Symbol("port")) === nothing) && (return false) true end function validate_property(::Type{ IoK8sApiCoreV1HTTPGetAction }, name::Symbol, val) end
[ 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20855, 2427, 13, 628, 198, 198, 76, 18187, 2878, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 1279, 25, 2451, 7928, 17633, 198, 220, 220, 220, 2583, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 10903, 1782, 1303, 1020, 1438, 25, 2583, 198, 220, 220, 220, 2638, 13847, 364, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 20650, 90, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 39681, 92, 1782, 1303, 1020, 1438, 25, 2638, 13847, 364, 198, 220, 220, 220, 3108, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 10903, 1782, 1303, 1020, 1438, 25, 3108, 198, 220, 220, 220, 2493, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 27853, 42, 23, 82, 25189, 320, 620, 15451, 47, 10025, 18274, 346, 5317, 2536, 5317, 5574, 10100, 1782, 1303, 1020, 1438, 25, 2493, 198, 220, 220, 220, 7791, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 10903, 1782, 1303, 1020, 1438, 25, 7791, 628, 220, 220, 220, 2163, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 7, 26, 4774, 28, 22366, 11, 2638, 13847, 364, 28, 22366, 11, 3108, 28, 22366, 11, 2493, 28, 22366, 11, 7791, 28, 22366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 649, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 11, 38357, 7203, 4774, 12340, 2583, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 4774, 12340, 2583, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 11, 38357, 7203, 4023, 13847, 364, 12340, 2638, 13847, 364, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 4023, 13847, 364, 12340, 2638, 13847, 364, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 11, 38357, 7203, 6978, 12340, 3108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 6978, 12340, 3108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 11, 38357, 7203, 634, 12340, 2493, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 634, 12340, 2493, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 11, 38357, 7203, 15952, 1326, 12340, 7791, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 15952, 1326, 12340, 7791, 8, 198, 220, 220, 220, 220, 220, 220, 220, 267, 198, 220, 220, 220, 886, 198, 437, 1303, 2099, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 198, 198, 9979, 4808, 26745, 62, 8899, 62, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 796, 360, 713, 90, 13940, 23650, 11, 13940, 23650, 92, 7, 13940, 23650, 7203, 4774, 4943, 14804, 13940, 23650, 7203, 4774, 12340, 38357, 7203, 4023, 13847, 364, 4943, 14804, 13940, 23650, 7203, 4023, 13847, 364, 12340, 38357, 7203, 6978, 4943, 14804, 13940, 23650, 7203, 6978, 12340, 38357, 7203, 634, 4943, 14804, 13940, 23650, 7203, 634, 12340, 38357, 7203, 15952, 1326, 4943, 14804, 13940, 23650, 7203, 15952, 1326, 48774, 198, 9979, 4808, 26745, 62, 19199, 62, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 796, 360, 713, 90, 13940, 23650, 11, 10100, 92, 7, 13940, 23650, 7203, 4774, 4943, 14804, 1, 10100, 1600, 38357, 7203, 4023, 13847, 364, 4943, 14804, 1, 38469, 90, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 39681, 92, 1600, 38357, 7203, 6978, 4943, 14804, 1, 10100, 1600, 38357, 7203, 634, 4943, 14804, 1, 40, 78, 42, 23, 82, 25189, 320, 620, 15451, 47, 10025, 18274, 346, 5317, 2536, 5317, 5574, 10100, 1600, 38357, 7203, 15952, 1326, 4943, 14804, 1, 10100, 4943, 198, 14881, 13, 26745, 14933, 7, 3712, 6030, 90, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 32092, 796, 2824, 7, 13083, 28264, 26745, 62, 8899, 62, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 4008, 198, 10462, 7928, 13, 26745, 62, 4906, 7, 3712, 6030, 90, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 8964, 1438, 3712, 13940, 23650, 8, 796, 4479, 90, 18465, 11, 18206, 7, 48526, 13, 29572, 28264, 26745, 62, 19199, 62, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 58, 3672, 60, 4008, 92, 198, 10462, 7928, 13, 3245, 62, 3672, 7, 3712, 6030, 90, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 8964, 3119, 62, 3672, 3712, 13940, 23650, 8, 796, 220, 4808, 26745, 62, 8899, 62, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 58, 26745, 62, 3672, 60, 198, 198, 8818, 2198, 62, 35827, 7, 78, 3712, 40, 78, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 8, 198, 220, 220, 220, 357, 1136, 26745, 7, 78, 11, 38357, 7203, 634, 48774, 24844, 2147, 8, 11405, 357, 7783, 3991, 8, 198, 220, 220, 220, 2081, 198, 437, 198, 198, 8818, 26571, 62, 26745, 7, 3712, 6030, 90, 27853, 42, 23, 82, 32, 14415, 14055, 53, 16, 40717, 3855, 12502, 8964, 1438, 3712, 13940, 23650, 11, 1188, 8, 198, 437, 198 ]
2.653885
991
import DataStructures import AVLTrees using BenchmarkTools include("../src/soalight.jl") include("../src/allocator.jl") include("../src/tree_iter.jl") function testbase1(n) tree = Set{Int}() for j in 1:n[] push!(tree, j) push!(tree, -j) end @assert !(0 in tree) for j in 1:n[] @assert j in tree @assert -j in tree end @assert !(n[] + 1 in tree) @assert !(-n[] - 1 in tree) for j in 1:n[] @assert j in tree @assert -j in tree pop!(tree, j) pop!(tree, -j) @assert !(j in tree) @assert !(-j in tree) end end function testbase2(n) tree = DataStructures.SortedSet{Int}() for j in 1:n[] push!(tree, j) push!(tree, -j) end @assert !haskey(tree, 0) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) end @assert !haskey(tree, n[] + 1) @assert !haskey(tree, -n[] - 1) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) pop!(tree, j) pop!(tree, -j) @assert !haskey(tree, j) @assert !haskey(tree, -j) end end function testbase3(n) tree = DataStructures.AVLTree{Int}() for j in 1:n[] insert!(tree, j) insert!(tree, -j) end @assert !haskey(tree, 0) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) end @assert !haskey(tree, n[] + 1) @assert !haskey(tree, -n[] - 1) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) delete!(tree, j) delete!(tree, -j) @assert !haskey(tree, j) @assert !haskey(tree, -j) end end function testbase4(n) tree = DataStructures.RBTree{Int}() for j in 1:n[] insert!(tree, j) insert!(tree, -j) end @assert !haskey(tree, 0) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) end @assert !haskey(tree, n[] + 1) @assert !haskey(tree, -n[] - 1) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) delete!(tree, j) delete!(tree, -j) @assert !haskey(tree, j) @assert !haskey(tree, -j) end end function testbase5(n) tree = DataStructures.SplayTree{Int}() for j in 1:n[] push!(tree, j) push!(tree, -j) end @assert !haskey(tree, 0) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) end @assert !haskey(tree, n[] + 1) @assert !haskey(tree, -n[] - 1) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) delete!(tree, j) delete!(tree, -j) @assert !haskey(tree, j) @assert !haskey(tree, -j) end end function testbase6(n) tree = AVLTrees.AVLSet{Int}() for j in 1:n[] push!(tree, j) push!(tree, -j) end @assert !(0 in tree) for j in 1:n[] @assert j in tree @assert -j in tree end @assert !(n[] + 1 in tree) @assert !(-n[] - 1 in tree) for j in 1:n[] @assert j in tree @assert -j in tree delete!(tree, j) delete!(tree, -j) @assert !(j in tree) @assert !(-j in tree) end end function testbase7(n) tree = nil() for j in 1:n[] tree = insert(tree, j, nothing) tree = insert(tree, -j, nothing) end @assert !haskey(tree, 0) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) end @assert !haskey(tree, n[] + 1) @assert !haskey(tree, -n[] - 1) for j in 1:n[] @assert haskey(tree, j) @assert haskey(tree, -j) tree = delete(tree, j) tree = delete(tree, -j) @assert !haskey(tree, j) @assert !haskey(tree, -j) end end function testalloc(n, alloc) tree = nil(alloc) for j in 1:n[] tree = insert(tree, j, nothing, alloc) tree = insert(tree, -j, nothing, alloc) end @assert !haskey(tree, 0, alloc) for j in 1:n[] @assert haskey(tree, j, alloc) @assert haskey(tree, -j, alloc) end @assert !haskey(tree, n[] + 1, alloc) @assert !haskey(tree, -n[] - 1, alloc) for j in 1:n[] @assert haskey(tree, j, alloc) @assert haskey(tree, -j, alloc) tree = delete(tree, j, alloc) tree = delete(tree, -j, alloc) @assert !haskey(tree, j, alloc) @assert !haskey(tree, -j, alloc) end emptyend!(alloc) end function testfree(n, alloc) tree = nil(alloc) for j in 1:n[] tree = insert(tree, j, nothing, alloc) tree = insert(tree, -j, nothing, alloc) end @assert !haskey(tree, 0, alloc) for j in 1:n[] @assert haskey(tree, j, alloc) @assert haskey(tree, -j, alloc) end @assert !haskey(tree, n[] + 1, alloc) @assert !haskey(tree, -n[] - 1, alloc) for j in 1:n[] @assert haskey(tree, j, alloc) @assert haskey(tree, -j, alloc) tree = delete(tree, j, alloc) tree = delete(tree, -j, alloc) @assert !haskey(tree, j, alloc) @assert !haskey(tree, -j, alloc) end @assert isempty(alloc) end ans = nothing for n in [100000, 1000, 10] println(n, " elements") print(" Set ") @btime ($ans = testbase1(Ref($n))) GC.gc() print(" DataStructures.SortedSet ") @btime ($ans = testbase2(Ref($n))) GC.gc() print(" DataStructures.AVLTree ") @btime ($ans = testbase3(Ref($n))) GC.gc() print(" DataStructures.RBTree ") @btime ($ans = testbase4(Ref($n))) GC.gc() print(" DataStructures.SplayTree ") @btime ($ans = testbase5(Ref($n))) GC.gc() print(" AVLTrees.AVLSet ") @btime ($ans = testbase6(Ref($n))) GC.gc() print(" Tree without allocator ") @btime ($ans = testbase7(Ref($n))) GC.gc() print(" with fixed allocator ") alloc = Allocator{TreeNode{Int, Int, Nothing}, Int}(2 * n) @btime ($ans = testalloc(Ref($n), $alloc)) GC.gc() print(" with resizable allocator ") alloc = Allocator{TreeNode{Int, Int, Nothing}, Int}(nothing) @btime ($ans = testalloc(Ref($n), $alloc)) GC.gc() print(" with fixed free list allocator ") alloc = FreeListAllocator{TreeNode{Int, Int, Nothing}, Int}(2 * n) @btime ($ans = testfree(Ref($n), $alloc)) GC.gc() print(" with resizable free list allocator ") alloc = FreeListAllocator{TreeNode{Int, Int, Nothing}, Int}(nothing) @btime ($ans = testfree(Ref($n), $alloc)) GC.gc() print(" with fixed SOA allocator ") store = TupleVector{TreeNode{Int, Int, Nothing}}(2 * n) alloc = SOAllocator{TreeNode{Int, Int, Nothing}, Int, typeof(store)}(store, 2 * n) @btime ($ans = testalloc(Ref($n), $alloc)) GC.gc() print(" with resizable SOA allocator ") store = TupleVector{TreeNode{Int, Int, Nothing}}(N) alloc = SOAllocator{TreeNode{Int, Int, Nothing}, Int, typeof(store)}(store, nothing) @btime ($ans = testalloc(Ref($n), $alloc)) GC.gc() print(" with fixed free list SOA allocator ") store = TupleVector{TreeNode{Int, Int, Nothing}}(2 * n) alloc = FreeListSOAllocator{TreeNode{Int, Int, Nothing}, Int, typeof(store)}(store, 2 * n) @btime ($ans = testfree(Ref($n), $alloc)) GC.gc() print(" with resizable free list SOA allocator ") store = TupleVector{TreeNode{Int, Int, Nothing}}(N) alloc = FreeListSOAllocator{TreeNode{Int, Int, Nothing}, Int, typeof(store)}(store, nothing) @btime ($ans = testfree(Ref($n), $alloc)) end
[ 11748, 6060, 44909, 942, 198, 11748, 14661, 27734, 6037, 198, 3500, 25187, 4102, 33637, 198, 198, 17256, 7203, 40720, 10677, 14, 568, 282, 432, 13, 20362, 4943, 198, 17256, 7203, 40720, 10677, 14, 32332, 1352, 13, 20362, 4943, 198, 17256, 7203, 40720, 10677, 14, 21048, 62, 2676, 13, 20362, 4943, 198, 198, 8818, 1332, 8692, 16, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 5345, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 7, 15, 287, 5509, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 474, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 532, 73, 287, 5509, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 7, 77, 21737, 1343, 352, 287, 5509, 8, 198, 220, 220, 220, 2488, 30493, 5145, 32590, 77, 21737, 532, 352, 287, 5509, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 474, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 532, 73, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 7, 73, 287, 5509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 32590, 73, 287, 5509, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 17, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 6060, 44909, 942, 13, 50, 9741, 7248, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 18, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 6060, 44909, 942, 13, 10116, 43, 27660, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 7550, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7550, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 19, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 6060, 44909, 942, 13, 49, 19313, 631, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 7550, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7550, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 20, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 6060, 44909, 942, 13, 50, 1759, 27660, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 21, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 14661, 27734, 6037, 13, 10116, 6561, 316, 90, 5317, 92, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 7, 15, 287, 5509, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 474, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 532, 73, 287, 5509, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 7, 77, 21737, 1343, 352, 287, 5509, 8, 198, 220, 220, 220, 2488, 30493, 5145, 32590, 77, 21737, 532, 352, 287, 5509, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 474, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 532, 73, 287, 5509, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12233, 0, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 7, 73, 287, 5509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 32590, 73, 287, 5509, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 8692, 22, 7, 77, 8, 198, 220, 220, 220, 5509, 796, 18038, 3419, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 474, 11, 2147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 532, 73, 11, 2147, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 32332, 7, 77, 11, 36836, 8, 198, 220, 220, 220, 5509, 796, 18038, 7, 32332, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 474, 11, 2147, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 532, 73, 11, 2147, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 11, 36836, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 11, 36836, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 11, 36836, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 6565, 437, 0, 7, 32332, 8, 198, 437, 198, 198, 8818, 1332, 5787, 7, 77, 11, 36836, 8, 198, 220, 220, 220, 5509, 796, 18038, 7, 32332, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 474, 11, 2147, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 7550, 7, 21048, 11, 532, 73, 11, 2147, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 657, 11, 36836, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 299, 21737, 1343, 352, 11, 36836, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 77, 21737, 532, 352, 11, 36836, 8, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 468, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5509, 796, 12233, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 474, 11, 36836, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 21048, 11, 532, 73, 11, 36836, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 318, 28920, 7, 32332, 8, 198, 437, 198, 198, 504, 796, 2147, 198, 1640, 299, 287, 685, 3064, 830, 11, 8576, 11, 838, 60, 198, 220, 220, 220, 44872, 7, 77, 11, 366, 4847, 4943, 628, 220, 220, 220, 3601, 7203, 220, 5345, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 16, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 6060, 44909, 942, 13, 50, 9741, 7248, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 17, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 6060, 44909, 942, 13, 10116, 43, 27660, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 18, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 6060, 44909, 942, 13, 49, 19313, 631, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 19, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 6060, 44909, 942, 13, 50, 1759, 27660, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 20, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 14661, 27734, 6037, 13, 10116, 6561, 316, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 21, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 12200, 1231, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 8692, 22, 7, 8134, 16763, 77, 22305, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 5969, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 36836, 796, 1439, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 92, 7, 17, 1635, 299, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 32332, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 581, 13821, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 36836, 796, 1439, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 92, 7, 22366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 32332, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 5969, 1479, 1351, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 36836, 796, 3232, 8053, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 92, 7, 17, 1635, 299, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 5787, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 581, 13821, 1479, 1351, 36836, 1352, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 36836, 796, 3232, 8053, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 92, 7, 22366, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 5787, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 5969, 12809, 32, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 3650, 796, 309, 29291, 38469, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 11709, 7, 17, 1635, 299, 8, 198, 220, 220, 220, 36836, 796, 12809, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 11, 2099, 1659, 7, 8095, 38165, 7, 8095, 11, 362, 1635, 299, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 32332, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 581, 13821, 12809, 32, 36836, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 3650, 796, 309, 29291, 38469, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 11709, 7, 45, 8, 198, 220, 220, 220, 36836, 796, 12809, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 11, 2099, 1659, 7, 8095, 38165, 7, 8095, 11, 2147, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 32332, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 5969, 1479, 1351, 12809, 32, 36836, 1352, 220, 220, 220, 220, 366, 8, 198, 220, 220, 220, 3650, 796, 309, 29291, 38469, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 11709, 7, 17, 1635, 299, 8, 198, 220, 220, 220, 36836, 796, 3232, 8053, 15821, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 11, 2099, 1659, 7, 8095, 38165, 7, 8095, 11, 362, 1635, 299, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 5787, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 628, 220, 220, 220, 20145, 13, 36484, 3419, 628, 220, 220, 220, 3601, 7203, 220, 351, 581, 13821, 1479, 1351, 12809, 32, 36836, 1352, 366, 8, 198, 220, 220, 220, 3650, 796, 309, 29291, 38469, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 11709, 7, 45, 8, 198, 220, 220, 220, 36836, 796, 3232, 8053, 15821, 3237, 420, 1352, 90, 27660, 19667, 90, 5317, 11, 2558, 11, 10528, 5512, 2558, 11, 2099, 1659, 7, 8095, 38165, 7, 8095, 11, 2147, 8, 198, 220, 220, 220, 2488, 65, 2435, 7198, 504, 796, 1332, 5787, 7, 8134, 16763, 77, 828, 720, 32332, 4008, 198, 437, 198 ]
2.014341
3,905
<gh_stars>0 using Random using Printf include("Algencan/AlgencanWrapper.jl") include("sh.jl") import Voronoi import Covering drawing = (haskey(ENV, "DRAW") && ENV["DRAW"] != "" && ENV["DRAW"] != "0") drawingAll = (haskey(ENV, "DRAWALL") && ENV["DRAWALL"] != "" && ENV["DRAWALL"] != "0") TRIES = 100 WIDTH = 1.0 HEIGHT = 1.0 INSTANCE = 1 As = [ Array{Covering.Section, 1}([ Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.1, 0.1), (0.9, 0.1), (0.9, 0.9), (0.1, 0.9), ])), ]), Array{Covering.Section, 1}([ Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.5, 0.5), (0.4, 0.4), (0.5, 0.1), (0.6, 0.4), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.5, 0.5), (0.6, 0.4), (0.9, 0.5), (0.6, 0.6), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.5, 0.5), (0.6, 0.6), (0.5, 0.9), (0.4, 0.6), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.5, 0.5), (0.4, 0.6), (0.1, 0.5), (0.4, 0.4), ])), ]), Array{Covering.Section, 1}([ Covering.Section(Array{Tuple{Real, Real}, 1}([ (0, 0.125), (0.75, 0.5), (1 ,0.875), (0.25, 0.5), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0, 1), (0, 0.5), (0.5, 1), ])) ]), Array{Covering.Section, 1}([ Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.1, 0.1), (0.2, 0.2), (0.2, 0.8), (0.1, 0.9), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.1, 0.1), (0.9, 0.1), (0.8, 0.2), (0.2, 0.2), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.9, 0.1), (0.9, 0.9), (0.8, 0.8), (0.8, 0.2), ])), Covering.Section(Array{Tuple{Real, Real}, 1}([ (0.9, 0.9), (0.1, 0.9), (0.2, 0.8), (0.8, 0.8), ])), ]), ] if haskey(ENV, "INSTANCE") INSTANCE = parse(Int, ENV["INSTANCE"]) end A = As[INSTANCE] function calculateArea() total_area = 0 for Aⱼ in A t, _, _ = Covering.areaAndGradient(Aⱼ, 0) total_area += t end return total_area end total_area = calculateArea() function draw(WIDTH, HEIGHT, r, points, n) if !drawing return end if length(points) == 0 return end V = Voronoi.Fortune.compute(points, WIDTH, HEIGHT) Voronoi.Intersect.intersect(V, Voronoi.Intersect.Rectangle(WIDTH, HEIGHT)) Draw.init(WIDTH, HEIGHT) for Aⱼ in A W = SH.intersect(V, Aⱼ, r) #Draw.coveringPartition(W, "xkcd:pink") Draw.coveringPartition(W, nothing) Draw.filledPolygon(Aⱼ, "blue") end Draw.circles(r, points) Draw.commit() Draw.savefig("bateria/" * string(INSTANCE) * "/" * string(n)) println("...") end function coverWithCircles(n, WIDTH, HEIGHT, r, points) function pack(r, points) x = zeros(2n + 1) x[1] = r for (i, p) in enumerate(points) x[2i] = p[1] x[2i + 1] = p[2] end return x end function unpack(x) r = x[1] points = Array{Tuple{Real, Real}}([]) for i in 1:n append!(points, [(x[2i], x[2i + 1])]) end return r, points end function draw(r, points) if !drawing return end V = Voronoi.Fortune.compute(points, WIDTH, HEIGHT) Voronoi.Intersect.intersect(V, Voronoi.Intersect.Rectangle(WIDTH, HEIGHT)) Draw.init(WIDTH, HEIGHT) for Aⱼ in A W = SH.intersect(V, Aⱼ, r) Draw.coveringPartition(W, "xkcd:pink") Draw.filledPolygon(Aⱼ, "xkcd:black") end Draw.circles(r, points) Draw.commit() print("") end function f(x) r, points = unpack(x) if drawing && drawingAll draw(r, points) end #println("R: ", r) return r end function ∇f(x) grad = zeros(2n + 1) grad[1] = 1 #println("GRAD: ", grad) return grad end function ∇∇f(x) return [], [], [] end function c(ind, x) r, points = unpack(x) #points, repeats = avoidRepeats(points) V = Voronoi.Fortune.compute(points, WIDTH, HEIGHT) Voronoi.Intersect.intersect(V, Voronoi.Intersect.Rectangle(WIDTH, HEIGHT)) uncovered_area = total_area for Aⱼ in A W = SH.intersect(V, Aⱼ, r) area, _, _ = Covering.areaAndGradient(W) uncovered_area -= area end #println("C: ", uncovered_area) return uncovered_area end function ∇c(ind, x) r, points = unpack(x) #points, repeats = avoidRepeats(points) V = Voronoi.Fortune.compute(points, WIDTH, HEIGHT) Voronoi.Intersect.intersect(V, Voronoi.Intersect.Rectangle(WIDTH, HEIGHT)) gᵣ = 0 gₛ = fill((0.0, 0.0), n) for Aⱼ in A W = SH.intersect(V, Aⱼ, r) _, gᵣⱼ, gₛⱼ = Covering.areaAndGradient(W) gᵣ += gᵣⱼ for i in 1:n gₛ[i] = (gₛ[i][1] + gₛⱼ[i][1], gₛ[i][2] + gₛⱼ[i][2]) end end #for i in repeats # push!(gₛ, (0, 0)) #end #println("GRAD C.: ", pack(gᵣ, gₛ)) #println("Aperte Enter pra continuar") #readline(stdin) return collect(1:2n+1), pack(gᵣ, gₛ) end l = zeros(2n + 1) l[1] = 1e-14 u = zeros(2n + 1) u[1] = 10e20 for i in 2:2n+1 u[i] = 1.0 end #draw(r, points) #println("Aperte Enter pra continuar") #readline(stdin) try x, fx = AlgencanWrapper.optimize(n = 2n + 1, m = 1, f = f, g = ∇f,# h = ∇∇f, equatn = [1], c = c, jac = ∇c, x = pack(r, points), l = l, u = u, nvparam = 2, vparam = [ "ITERATIONS-OUTPUT-DETAIL 10", "PENALTY-PARAMETER-INITIAL-VALUE 1000" ], #checkder = 1, epsopt = 1.0e-6, epsfeas = 1.0e-6 ) r, points = unpack(x) #draw(r, points) println("\n\n=================\nRESULTADO\n=================\n") println("r = ", r) println("s = ", 1/r) println("pontos: ") for p in points println("(", p[1], ", ", p[2], ")") end #if drawing # println("Digite ENTER para sair.") # readline(stdin) #end return r, points catch exc println("Exception: ", exc) return 1e10, [] end end function randf(start, finish, n) v = rand(n) return map(x -> start + x*(finish-start), v) end if drawing import Draw end function main() n = tryparse(Int64, ARGS[1]) WIDTH = 1.0 HEIGHT = 1.0 rmin = 1e10 pointsmin = [] #total_area, _, _ = Covering.areaAndGradient(A, 0) ϵ = 10e-4 Random.seed!(1) for k in 1:TRIES #println("Tentativa ", k) points = convert(Array{Tuple{Real, Real}}, collect(zip(randf(1, WIDTH-1, n), randf(1, HEIGHT-1, n)))) function insideHalfSpace(point, p, q) pq = Voronoi.Geometry.subVector(q, p) v = Voronoi.Geometry.rotateVectorCCW(pq) function dot(a, b) return a[1]*b[1] + a[2]*b[2] end u = Voronoi.Geometry.subVector(point, p) return (dot(u, v) >= 0) end function pointIsInsideConvexPolygon(point, polygon) p = polygon.borderHead first = true while p != polygon.borderHead || first first = false q = p.next if !insideHalfSpace(point, p.origin, q.origin) return false end p = p.next end return true end function pointIsInsideSomeConvexPolygon(point, polygons) for polygon in polygons if pointIsInsideConvexPolygon(point, polygon) return true end end return false end for (i, p) in enumerate(points) while !pointIsInsideSomeConvexPolygon(points[i], A) #println("Ponto $i ainda está fora. Re-sorteando.") points[i] = (randf(1, WIDTH-1, 1)[1], randf(1, HEIGHT-1, 1)[1]) end end r = (0.5 + (rand(1)[1]))/n try r, points = coverWithCircles(n, WIDTH, HEIGHT, r, points) #@info "points: $(points)" catch exc println("Exception: ", exc) return 1e10, [] end #draw(WIDTH, HEIGHT, r, points, n) @info "n = $(n); k = $(k); rmin = $(rmin); r = $(r)" if r < rmin V = Voronoi.Fortune.compute(points, WIDTH, HEIGHT) Voronoi.Intersect.intersect(V, Voronoi.Intersect.Rectangle(WIDTH, HEIGHT)) uncovered_area = total_area for Aⱼ in A W = SH.intersect(V, Aⱼ, r) area, _, _ = Covering.areaAndGradient(W) uncovered_area -= area end if uncovered_area < ϵ rmin = r pointsmin = points else @warn "UNFEASIBLE" end end end println("\n\n=================\nRESULTADO (n = " * string(n) * ")\n=================\n") println("r = ", rmin) println("s = ", 1/rmin) println("pontos: ") for p in pointsmin println("(", p[1], ", ", p[2], ")") end println("") if drawing draw(WIDTH, HEIGHT, rmin, pointsmin, n) #readline(stdin) end end main()
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 14534, 198, 3500, 12578, 69, 198, 198, 17256, 7203, 2348, 5235, 5171, 14, 2348, 5235, 5171, 36918, 2848, 13, 20362, 4943, 198, 17256, 7203, 1477, 13, 20362, 4943, 198, 198, 11748, 44143, 261, 23013, 198, 11748, 17546, 278, 198, 198, 19334, 278, 796, 357, 10134, 2539, 7, 1677, 53, 11, 366, 35, 20530, 4943, 11405, 12964, 53, 14692, 35, 20530, 8973, 14512, 13538, 11405, 12964, 53, 14692, 35, 20530, 8973, 14512, 366, 15, 4943, 198, 19334, 278, 3237, 796, 357, 10134, 2539, 7, 1677, 53, 11, 366, 35, 20530, 7036, 4943, 11405, 12964, 53, 14692, 35, 20530, 7036, 8973, 14512, 13538, 11405, 12964, 53, 14692, 35, 20530, 7036, 8973, 14512, 366, 15, 4943, 198, 198, 5446, 11015, 796, 1802, 198, 54, 2389, 4221, 796, 352, 13, 15, 198, 13909, 9947, 796, 352, 13, 15, 198, 38604, 19240, 796, 352, 198, 198, 1722, 796, 685, 198, 220, 220, 220, 220, 220, 15690, 90, 27245, 278, 13, 16375, 11, 352, 92, 26933, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 2361, 828, 198, 220, 220, 220, 220, 220, 15690, 90, 27245, 278, 13, 16375, 11, 352, 92, 26933, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 19, 11, 657, 13, 19, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 21, 11, 657, 13, 19, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 21, 11, 657, 13, 19, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 21, 11, 657, 13, 21, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 21, 11, 657, 13, 21, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 19, 11, 657, 13, 21, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 19, 11, 657, 13, 21, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 19, 11, 657, 13, 19, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 2361, 828, 198, 220, 220, 220, 220, 220, 15690, 90, 27245, 278, 13, 16375, 11, 352, 92, 26933, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 11, 657, 13, 11623, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 2425, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 16, 837, 15, 13, 31360, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 1495, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 11, 352, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 11, 657, 13, 20, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 20, 11, 352, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 4008, 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, 2361, 828, 198, 220, 220, 220, 220, 220, 15690, 90, 27245, 278, 13, 16375, 11, 352, 92, 26933, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 17, 11, 657, 13, 17, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 17, 11, 657, 13, 23, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 23, 11, 657, 13, 17, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 17, 11, 657, 13, 17, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 16, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 23, 11, 657, 13, 23, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 23, 11, 657, 13, 17, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 17546, 278, 13, 16375, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 5512, 352, 92, 26933, 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, 220, 220, 220, 220, 220, 357, 15, 13, 24, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 16, 11, 657, 13, 24, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 17, 11, 657, 13, 23, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 15, 13, 23, 11, 657, 13, 23, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33761, 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, 2361, 828, 198, 220, 220, 220, 220, 2361, 198, 198, 361, 468, 2539, 7, 1677, 53, 11, 366, 38604, 19240, 4943, 198, 220, 220, 220, 40589, 19240, 796, 21136, 7, 5317, 11, 12964, 53, 14692, 38604, 19240, 8973, 8, 198, 437, 198, 32, 796, 1081, 58, 38604, 19240, 60, 198, 198, 8818, 15284, 30547, 3419, 198, 220, 220, 220, 2472, 62, 20337, 796, 657, 198, 220, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 220, 256, 11, 4808, 11, 4808, 796, 17546, 278, 13, 20337, 1870, 42731, 1153, 7, 32, 158, 109, 120, 11, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 20337, 15853, 256, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2472, 62, 20337, 198, 437, 198, 23350, 62, 20337, 796, 15284, 30547, 3419, 198, 198, 8818, 3197, 7, 54, 2389, 4221, 11, 11179, 9947, 11, 374, 11, 2173, 11, 299, 8, 198, 220, 220, 611, 5145, 19334, 278, 198, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 886, 628, 220, 220, 611, 4129, 7, 13033, 8, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 886, 628, 220, 220, 569, 796, 44143, 261, 23013, 13, 21926, 1726, 13, 5589, 1133, 7, 13033, 11, 370, 2389, 4221, 11, 11179, 9947, 8, 198, 220, 220, 44143, 261, 23013, 13, 9492, 8831, 13, 3849, 8831, 7, 53, 11, 44143, 261, 23013, 13, 9492, 8831, 13, 45474, 9248, 7, 54, 2389, 4221, 11, 11179, 9947, 4008, 628, 220, 220, 15315, 13, 15003, 7, 54, 2389, 4221, 11, 11179, 9947, 8, 628, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 370, 796, 6006, 13, 3849, 8831, 7, 53, 11, 317, 158, 109, 120, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 1303, 25302, 13, 9631, 278, 7841, 653, 7, 54, 11, 366, 87, 74, 10210, 25, 79, 676, 4943, 198, 220, 220, 220, 220, 220, 220, 15315, 13, 9631, 278, 7841, 653, 7, 54, 11, 2147, 8, 198, 220, 220, 220, 220, 220, 220, 15315, 13, 20286, 34220, 14520, 7, 32, 158, 109, 120, 11, 366, 17585, 4943, 198, 220, 220, 886, 628, 220, 220, 15315, 13, 66, 343, 5427, 7, 81, 11, 2173, 8, 198, 220, 220, 15315, 13, 41509, 3419, 198, 220, 220, 15315, 13, 21928, 5647, 7203, 65, 729, 544, 30487, 1635, 4731, 7, 38604, 19240, 8, 1635, 12813, 1, 1635, 4731, 7, 77, 4008, 198, 220, 220, 44872, 7203, 9313, 8, 198, 437, 628, 198, 8818, 3002, 3152, 34, 343, 5427, 7, 77, 11, 370, 2389, 4221, 11, 11179, 9947, 11, 374, 11, 2173, 8, 198, 220, 220, 2163, 2353, 7, 81, 11, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 2124, 796, 1976, 27498, 7, 17, 77, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 2124, 58, 16, 60, 796, 374, 198, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 279, 8, 287, 27056, 378, 7, 13033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 17, 72, 60, 796, 279, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 17, 72, 1343, 352, 60, 796, 279, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 1441, 2124, 198, 220, 220, 886, 628, 220, 220, 2163, 555, 8002, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 374, 796, 2124, 58, 16, 60, 628, 220, 220, 220, 220, 220, 220, 2173, 796, 15690, 90, 51, 29291, 90, 15633, 11, 6416, 11709, 26933, 12962, 628, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 13033, 11, 47527, 87, 58, 17, 72, 4357, 2124, 58, 17, 72, 1343, 352, 12962, 12962, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 1441, 374, 11, 2173, 198, 220, 220, 886, 628, 220, 220, 2163, 3197, 7, 81, 11, 2173, 8, 611, 5145, 19334, 278, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 569, 796, 44143, 261, 23013, 13, 21926, 1726, 13, 5589, 1133, 7, 13033, 11, 370, 2389, 4221, 11, 11179, 9947, 8, 198, 220, 220, 220, 220, 220, 220, 44143, 261, 23013, 13, 9492, 8831, 13, 3849, 8831, 7, 53, 11, 44143, 261, 23013, 13, 9492, 8831, 13, 45474, 9248, 7, 54, 2389, 4221, 11, 11179, 9947, 4008, 628, 220, 220, 220, 220, 220, 220, 15315, 13, 15003, 7, 54, 2389, 4221, 11, 11179, 9947, 8, 628, 220, 220, 220, 220, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 370, 796, 6006, 13, 3849, 8831, 7, 53, 11, 317, 158, 109, 120, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15315, 13, 9631, 278, 7841, 653, 7, 54, 11, 366, 87, 74, 10210, 25, 79, 676, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15315, 13, 20286, 34220, 14520, 7, 32, 158, 109, 120, 11, 366, 87, 74, 10210, 25, 13424, 4943, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 15315, 13, 66, 343, 5427, 7, 81, 11, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 15315, 13, 41509, 3419, 198, 220, 220, 220, 220, 220, 220, 3601, 7203, 4943, 198, 220, 220, 886, 628, 220, 220, 2163, 277, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 374, 11, 2173, 796, 555, 8002, 7, 87, 8, 628, 220, 220, 220, 220, 220, 220, 611, 8263, 11405, 8263, 3237, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3197, 7, 81, 11, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 49, 25, 33172, 374, 8, 198, 220, 220, 220, 220, 220, 220, 1441, 374, 198, 220, 220, 886, 628, 220, 220, 2163, 18872, 229, 69, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 3915, 796, 1976, 27498, 7, 17, 77, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 3915, 58, 16, 60, 796, 352, 198, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 10761, 2885, 25, 33172, 3915, 8, 198, 220, 220, 220, 220, 220, 220, 1441, 3915, 198, 220, 220, 886, 628, 220, 220, 2163, 18872, 229, 24861, 229, 69, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 1441, 685, 4357, 685, 4357, 17635, 198, 220, 220, 886, 628, 220, 220, 2163, 269, 7, 521, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 374, 11, 2173, 796, 555, 8002, 7, 87, 8, 628, 220, 220, 220, 220, 220, 220, 1303, 13033, 11, 29819, 796, 3368, 47541, 1381, 7, 13033, 8, 628, 220, 220, 220, 220, 220, 220, 569, 796, 44143, 261, 23013, 13, 21926, 1726, 13, 5589, 1133, 7, 13033, 11, 370, 2389, 4221, 11, 11179, 9947, 8, 198, 220, 220, 220, 220, 220, 220, 44143, 261, 23013, 13, 9492, 8831, 13, 3849, 8831, 7, 53, 11, 44143, 261, 23013, 13, 9492, 8831, 13, 45474, 9248, 7, 54, 2389, 4221, 11, 11179, 9947, 4008, 628, 220, 220, 220, 220, 220, 220, 18838, 62, 20337, 796, 2472, 62, 20337, 198, 220, 220, 220, 220, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 370, 796, 6006, 13, 3849, 8831, 7, 53, 11, 317, 158, 109, 120, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1989, 11, 4808, 11, 4808, 796, 17546, 278, 13, 20337, 1870, 42731, 1153, 7, 54, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18838, 62, 20337, 48185, 1989, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 34, 25, 33172, 18838, 62, 20337, 8, 198, 220, 220, 220, 220, 220, 220, 1441, 18838, 62, 20337, 198, 220, 220, 886, 628, 220, 220, 2163, 18872, 229, 66, 7, 521, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 374, 11, 2173, 796, 555, 8002, 7, 87, 8, 628, 220, 220, 220, 220, 220, 220, 1303, 13033, 11, 29819, 796, 3368, 47541, 1381, 7, 13033, 8, 628, 220, 220, 220, 220, 220, 220, 569, 796, 44143, 261, 23013, 13, 21926, 1726, 13, 5589, 1133, 7, 13033, 11, 370, 2389, 4221, 11, 11179, 9947, 8, 198, 220, 220, 220, 220, 220, 220, 44143, 261, 23013, 13, 9492, 8831, 13, 3849, 8831, 7, 53, 11, 44143, 261, 23013, 13, 9492, 8831, 13, 45474, 9248, 7, 54, 2389, 4221, 11, 11179, 9947, 4008, 628, 220, 220, 220, 220, 220, 220, 308, 39611, 96, 796, 657, 198, 220, 220, 220, 220, 220, 220, 308, 158, 224, 249, 796, 6070, 19510, 15, 13, 15, 11, 657, 13, 15, 828, 299, 8, 198, 220, 220, 220, 220, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 370, 796, 6006, 13, 3849, 8831, 7, 53, 11, 317, 158, 109, 120, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 11, 308, 39611, 96, 158, 109, 120, 11, 308, 158, 224, 249, 158, 109, 120, 796, 17546, 278, 13, 20337, 1870, 42731, 1153, 7, 54, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 39611, 96, 15853, 308, 39611, 96, 158, 109, 120, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 158, 224, 249, 58, 72, 60, 796, 357, 70, 158, 224, 249, 58, 72, 7131, 16, 60, 1343, 308, 158, 224, 249, 158, 109, 120, 58, 72, 7131, 16, 4357, 308, 158, 224, 249, 58, 72, 7131, 17, 60, 1343, 308, 158, 224, 249, 158, 109, 120, 58, 72, 7131, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 1303, 1640, 1312, 287, 29819, 198, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 4574, 0, 7, 70, 158, 224, 249, 11, 357, 15, 11, 657, 4008, 198, 220, 220, 220, 220, 220, 220, 1303, 437, 198, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 10761, 2885, 327, 11207, 33172, 2353, 7, 70, 39611, 96, 11, 308, 158, 224, 249, 4008, 198, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 32, 525, 660, 6062, 7201, 11143, 283, 4943, 198, 220, 220, 220, 220, 220, 220, 1303, 961, 1370, 7, 19282, 259, 8, 628, 220, 220, 220, 220, 220, 220, 1441, 2824, 7, 16, 25, 17, 77, 10, 16, 828, 2353, 7, 70, 39611, 96, 11, 308, 158, 224, 249, 8, 198, 220, 220, 886, 628, 220, 220, 300, 796, 1976, 27498, 7, 17, 77, 1343, 352, 8, 198, 220, 220, 300, 58, 16, 60, 796, 352, 68, 12, 1415, 628, 220, 220, 334, 796, 1976, 27498, 7, 17, 77, 1343, 352, 8, 198, 220, 220, 334, 58, 16, 60, 796, 838, 68, 1238, 198, 220, 220, 329, 1312, 287, 362, 25, 17, 77, 10, 16, 198, 220, 220, 220, 220, 220, 220, 334, 58, 72, 60, 796, 352, 13, 15, 198, 220, 220, 886, 628, 220, 220, 1303, 19334, 7, 81, 11, 2173, 8, 198, 220, 220, 1303, 35235, 7203, 32, 525, 660, 6062, 7201, 11143, 283, 4943, 198, 220, 220, 1303, 961, 1370, 7, 19282, 259, 8, 628, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 2124, 11, 277, 87, 796, 978, 5235, 5171, 36918, 2848, 13, 40085, 1096, 7, 77, 796, 362, 77, 1343, 352, 11, 285, 796, 352, 11, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 796, 277, 11, 308, 796, 18872, 229, 69, 11, 2, 289, 796, 18872, 229, 24861, 229, 69, 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, 1602, 265, 77, 796, 685, 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, 269, 796, 269, 11, 474, 330, 796, 18872, 229, 66, 11, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2353, 7, 81, 11, 2173, 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, 300, 796, 300, 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, 334, 796, 334, 11, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 85, 17143, 796, 362, 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, 410, 17143, 796, 685, 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, 366, 2043, 1137, 18421, 12, 2606, 7250, 3843, 12, 35, 20892, 4146, 838, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 47, 1677, 1847, 9936, 12, 27082, 2390, 2767, 1137, 12, 1268, 2043, 12576, 12, 39488, 8576, 1, 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, 16589, 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, 1303, 9122, 1082, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 862, 8738, 796, 352, 13, 15, 68, 12, 21, 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, 304, 862, 5036, 292, 796, 352, 13, 15, 68, 12, 21, 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, 1267, 628, 220, 220, 220, 220, 220, 220, 374, 11, 2173, 796, 555, 8002, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 1303, 19334, 7, 81, 11, 2173, 8, 628, 220, 220, 220, 220, 220, 220, 44872, 7203, 59, 77, 59, 77, 4770, 28, 59, 77, 19535, 16724, 2885, 46, 59, 77, 4770, 28, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 220, 44872, 7203, 81, 796, 33172, 374, 8, 198, 220, 220, 220, 220, 220, 220, 44872, 7203, 82, 796, 33172, 352, 14, 81, 8, 198, 220, 220, 220, 220, 220, 220, 44872, 7203, 79, 756, 418, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 329, 279, 287, 2173, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 7, 1600, 279, 58, 16, 4357, 33172, 33172, 279, 58, 17, 4357, 366, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 1303, 361, 8263, 198, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 44872, 7203, 19511, 578, 46962, 31215, 473, 343, 19570, 198, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 1100, 1370, 7, 19282, 259, 8, 198, 220, 220, 220, 220, 220, 220, 1303, 437, 628, 220, 220, 220, 220, 220, 220, 1441, 374, 11, 2173, 198, 220, 220, 4929, 2859, 198, 220, 220, 220, 220, 220, 220, 44872, 7203, 16922, 25, 33172, 2859, 8, 198, 220, 220, 220, 220, 220, 220, 1441, 352, 68, 940, 11, 17635, 198, 220, 220, 886, 198, 437, 628, 628, 628, 198, 8818, 43720, 69, 7, 9688, 11, 5461, 11, 299, 8, 198, 220, 220, 220, 410, 796, 43720, 7, 77, 8, 198, 220, 220, 220, 1441, 3975, 7, 87, 4613, 923, 1343, 2124, 9, 7, 15643, 680, 12, 9688, 828, 410, 8, 198, 437, 198, 198, 361, 8263, 198, 220, 220, 220, 1330, 15315, 198, 437, 628, 198, 8818, 1388, 3419, 198, 220, 220, 220, 299, 796, 1949, 29572, 7, 5317, 2414, 11, 5923, 14313, 58, 16, 12962, 198, 220, 220, 220, 370, 2389, 4221, 796, 352, 13, 15, 198, 220, 220, 220, 11179, 9947, 796, 352, 13, 15, 628, 220, 220, 220, 374, 1084, 796, 352, 68, 940, 198, 220, 220, 220, 2173, 1084, 796, 17635, 628, 220, 220, 220, 1303, 23350, 62, 20337, 11, 4808, 11, 4808, 796, 17546, 278, 13, 20337, 1870, 42731, 1153, 7, 32, 11, 657, 8, 198, 220, 220, 220, 18074, 113, 796, 838, 68, 12, 19, 198, 220, 220, 220, 220, 198, 220, 220, 220, 14534, 13, 28826, 0, 7, 16, 8, 628, 220, 220, 220, 329, 479, 287, 352, 25, 5446, 11015, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 51, 298, 265, 12151, 33172, 479, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2173, 796, 10385, 7, 19182, 90, 51, 29291, 90, 15633, 11, 6416, 92, 5512, 2824, 7, 13344, 7, 25192, 69, 7, 16, 11, 370, 2389, 4221, 12, 16, 11, 299, 828, 43720, 69, 7, 16, 11, 11179, 9947, 12, 16, 11, 299, 35514, 628, 220, 220, 220, 220, 220, 220, 220, 2163, 2641, 31305, 14106, 7, 4122, 11, 279, 11, 10662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 80, 796, 44143, 261, 23013, 13, 10082, 15748, 13, 7266, 38469, 7, 80, 11, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 796, 44143, 261, 23013, 13, 10082, 15748, 13, 10599, 378, 38469, 4093, 54, 7, 79, 80, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2163, 16605, 7, 64, 11, 275, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 257, 58, 16, 60, 9, 65, 58, 16, 60, 1343, 257, 58, 17, 60, 9, 65, 58, 17, 60, 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, 334, 796, 44143, 261, 23013, 13, 10082, 15748, 13, 7266, 38469, 7, 4122, 11, 279, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 26518, 7, 84, 11, 410, 8, 18189, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2163, 966, 3792, 24441, 3103, 303, 87, 34220, 14520, 7, 4122, 11, 7514, 14520, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 7514, 14520, 13, 20192, 13847, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 717, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 279, 14512, 7514, 14520, 13, 20192, 13847, 8614, 717, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 717, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10662, 796, 279, 13, 19545, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 48787, 31305, 14106, 7, 4122, 11, 279, 13, 47103, 11, 10662, 13, 47103, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 279, 13, 19545, 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, 1441, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2163, 966, 3792, 24441, 4366, 3103, 303, 87, 34220, 14520, 7, 4122, 11, 25052, 684, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 7514, 14520, 287, 25052, 684, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 966, 3792, 24441, 3103, 303, 87, 34220, 14520, 7, 4122, 11, 7514, 14520, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 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, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 279, 8, 287, 27056, 378, 7, 13033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 5145, 4122, 3792, 24441, 4366, 3103, 303, 87, 34220, 14520, 7, 13033, 58, 72, 4357, 317, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7203, 47, 5957, 720, 72, 257, 22261, 1556, 6557, 329, 64, 13, 797, 12, 30619, 68, 25440, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 58, 72, 60, 796, 357, 25192, 69, 7, 16, 11, 370, 2389, 4221, 12, 16, 11, 352, 38381, 16, 4357, 43720, 69, 7, 16, 11, 11179, 9947, 12, 16, 11, 352, 38381, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 374, 796, 357, 15, 13, 20, 1343, 357, 25192, 7, 16, 38381, 16, 60, 4008, 14, 77, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 11, 2173, 796, 3002, 3152, 34, 343, 5427, 7, 77, 11, 370, 2389, 4221, 11, 11179, 9947, 11, 374, 11, 2173, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 31, 10951, 366, 13033, 25, 29568, 13033, 16725, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 2859, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 16922, 25, 33172, 2859, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 68, 940, 11, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 19334, 7, 54, 2389, 4221, 11, 11179, 9947, 11, 374, 11, 2173, 11, 299, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 77, 796, 29568, 77, 1776, 479, 796, 29568, 74, 1776, 374, 1084, 796, 29568, 81, 1084, 1776, 374, 796, 29568, 81, 16725, 198, 220, 220, 220, 220, 220, 220, 220, 611, 374, 1279, 374, 1084, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 569, 796, 44143, 261, 23013, 13, 21926, 1726, 13, 5589, 1133, 7, 13033, 11, 370, 2389, 4221, 11, 11179, 9947, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44143, 261, 23013, 13, 9492, 8831, 13, 3849, 8831, 7, 53, 11, 44143, 261, 23013, 13, 9492, 8831, 13, 45474, 9248, 7, 54, 2389, 4221, 11, 11179, 9947, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18838, 62, 20337, 796, 2472, 62, 20337, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 317, 158, 109, 120, 287, 317, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 370, 796, 6006, 13, 3849, 8831, 7, 53, 11, 317, 158, 109, 120, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1989, 11, 4808, 11, 4808, 796, 17546, 278, 13, 20337, 1870, 42731, 1153, 7, 54, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18838, 62, 20337, 48185, 1989, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18838, 62, 20337, 1279, 18074, 113, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 1084, 796, 374, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2173, 1084, 796, 2173, 198, 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, 2488, 40539, 366, 4944, 15112, 1921, 34563, 1, 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, 628, 220, 220, 220, 44872, 7203, 59, 77, 59, 77, 4770, 28, 59, 77, 19535, 16724, 2885, 46, 357, 77, 796, 366, 1635, 4731, 7, 77, 8, 1635, 366, 19415, 77, 4770, 28, 59, 77, 4943, 198, 220, 220, 220, 44872, 7203, 81, 796, 33172, 374, 1084, 8, 198, 220, 220, 220, 44872, 7203, 82, 796, 33172, 352, 14, 81, 1084, 8, 198, 220, 220, 220, 44872, 7203, 79, 756, 418, 25, 366, 8, 198, 220, 220, 220, 329, 279, 287, 2173, 1084, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 7, 1600, 279, 58, 16, 4357, 33172, 33172, 279, 58, 17, 4357, 366, 8, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7203, 4943, 628, 220, 220, 220, 611, 8263, 198, 220, 220, 220, 220, 220, 220, 220, 3197, 7, 54, 2389, 4221, 11, 11179, 9947, 11, 374, 1084, 11, 2173, 1084, 11, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 961, 1370, 7, 19282, 259, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 12417, 3419, 198 ]
1.412656
10,367
<gh_stars>1-10 include("../src/hypergraph-affinity-functions.jl") using MAT using Plots M = matread("Total_Ns.mat") Ng = M["Ng"] Nf = M["Nf"] Nw = M["Nw"] r = 10 ## Run all for j = 1:3 for k = 2:4 if j == 1 N = Nf elseif j == 2 N = Nw else N = Ng end alpha = 1/2 Hw, Hm = affinities_from_N(N) alpha = 1/2 Bw = baselines(r,alpha) Bm = baselines(r,1-alpha) R1 = Hw./Bw R2 = Hm./Bm ## Counting balance between men and women N = Nw T = 2*sum(N[2,:]) + 3*sum(N[3,:]) + 4*sum(N[4,:]) women = N[2,2] + 2*N[2,3] + N[3,2] + 2*N[3,3] + 3*N[3,4] + N[4,2] + 2*N[4,3] + 3*N[4,4] + 4*N[4] @show women/T ## Plot s1 = 375 s2 = 300 gfs = 18 tfs = 18 titlesize = 18 color1 = :green color2 = :blue title = "" leg = false if j == 3 xlab = "Affinity type t" else xlab = "" end if k == 2 yl = [.2,1.7] elseif k ==3 yl = [.2,2] elseif k == 4 yl = [.1,2.5] end if k == 2 ylab = "Affinity / Baseline" else ylab = "" end p = Plots.plot([1; k],[1; 1],yscale = :identity,fontfamily = "helvetica",linewidth = 2,legend = false,grid = false, size = (s1,s2),color = :gray) title!(p,title,titlefontsize = titlesize) xaxis!(p,xlab, xticks = 1:k,tickfontsize=tfs,guidefontsize = gfs) yaxis!(p,ylab,tickfontsize=tfs,guidefontsize = gfs,ylim = yl) plot!(p,1:k,R1[k,1:k],color = color1, linewidth = lw, markersize = ms, markershape = :circle,markerstrokecolor = color1, label = class1) plot!(p,1:k,R2[k,1:k],color = color2, linewidth = lw, markersize = ms, markershape = :circle, markerstrokecolor = color2, label = class2) savefig("Figures/Ratios_$(k)_$(j).pdf") end end ## Compute pairs in the clique projection N = Nw In1 = 0 In2 = 0 Cross = 0 r = 10 for k = 2:r global In1, In2, Cross for j = 1:k+1 i = j-1 # number of women in this type hyperedge Hik = N[k,j] # number of hyperedges of this type In1 += binomial(i,2)*Hik # number of extra edges of this type In2 += binomial(k-i,2)*Hik Cross += Hik*i*(k-i) # println("$k, $i") end end hw = round(2*In1/(2*In1 + Cross),digits = 3) hm = round(2*In2/(2*In2 + Cross),digits = 3) println("Clique expansion homophily scores: women = $hw, men = $hm") println("$hw & $hm")
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 17256, 7203, 40720, 10677, 14, 49229, 34960, 12, 2001, 6269, 12, 12543, 2733, 13, 20362, 4943, 198, 3500, 36775, 198, 198, 3500, 1345, 1747, 198, 44, 796, 2603, 961, 7203, 14957, 62, 47503, 13, 6759, 4943, 198, 45, 70, 796, 337, 14692, 45, 70, 8973, 198, 45, 69, 796, 337, 14692, 45, 69, 8973, 198, 45, 86, 796, 337, 14692, 45, 86, 8973, 198, 81, 796, 838, 198, 198, 2235, 5660, 477, 198, 1640, 474, 796, 352, 25, 18, 198, 1640, 479, 796, 362, 25, 19, 198, 361, 220, 474, 6624, 352, 198, 220, 220, 220, 399, 796, 399, 69, 198, 17772, 361, 474, 6624, 362, 198, 220, 220, 220, 399, 796, 399, 86, 198, 17772, 198, 220, 220, 220, 399, 796, 34786, 198, 437, 198, 198, 26591, 796, 352, 14, 17, 198, 39, 86, 11, 367, 76, 796, 1527, 259, 871, 62, 6738, 62, 45, 7, 45, 8, 198, 26591, 796, 352, 14, 17, 198, 33, 86, 796, 1615, 20655, 7, 81, 11, 26591, 8, 198, 33, 76, 796, 1615, 20655, 7, 81, 11, 16, 12, 26591, 8, 198, 49, 16, 796, 367, 86, 19571, 33, 86, 198, 49, 17, 796, 367, 76, 19571, 33, 76, 198, 198, 2235, 2764, 278, 5236, 1022, 1450, 290, 1466, 198, 198, 45, 796, 399, 86, 198, 51, 796, 362, 9, 16345, 7, 45, 58, 17, 11, 25, 12962, 1343, 513, 9, 16345, 7, 45, 58, 18, 11, 25, 12962, 1343, 604, 9, 16345, 7, 45, 58, 19, 11, 25, 12962, 198, 25878, 796, 399, 58, 17, 11, 17, 60, 1343, 362, 9, 45, 58, 17, 11, 18, 60, 1343, 399, 58, 18, 11, 17, 60, 1343, 362, 9, 45, 58, 18, 11, 18, 60, 1343, 513, 9, 45, 58, 18, 11, 19, 60, 1343, 399, 58, 19, 11, 17, 60, 1343, 362, 9, 45, 58, 19, 11, 18, 60, 1343, 513, 9, 45, 58, 19, 11, 19, 60, 1343, 604, 9, 45, 58, 19, 60, 198, 31, 12860, 1466, 14, 51, 198, 198, 2235, 28114, 198, 82, 16, 796, 29414, 198, 82, 17, 796, 5867, 198, 70, 9501, 796, 1248, 198, 83, 9501, 796, 1248, 198, 83, 30540, 1096, 796, 1248, 198, 8043, 16, 796, 1058, 14809, 198, 8043, 17, 796, 1058, 17585, 198, 7839, 796, 13538, 198, 1455, 796, 3991, 198, 361, 474, 6624, 513, 198, 220, 220, 220, 2124, 23912, 796, 366, 35191, 6269, 2099, 256, 1, 198, 17772, 198, 220, 220, 220, 2124, 23912, 796, 13538, 198, 437, 198, 198, 361, 479, 6624, 362, 198, 220, 220, 220, 331, 75, 796, 685, 13, 17, 11, 16, 13, 22, 60, 198, 17772, 361, 479, 6624, 18, 198, 220, 220, 220, 331, 75, 796, 685, 13, 17, 11, 17, 60, 198, 17772, 361, 479, 6624, 604, 198, 220, 220, 220, 331, 75, 796, 685, 13, 16, 11, 17, 13, 20, 60, 198, 437, 198, 198, 361, 479, 6624, 362, 198, 220, 220, 220, 331, 23912, 796, 366, 35191, 6269, 1220, 6455, 4470, 1, 198, 17772, 198, 220, 220, 220, 331, 23912, 796, 13538, 198, 437, 198, 79, 796, 1345, 1747, 13, 29487, 26933, 16, 26, 479, 38430, 16, 26, 352, 4357, 28349, 1000, 796, 1058, 738, 414, 11, 10331, 17989, 796, 366, 2978, 16809, 3970, 1600, 2815, 413, 5649, 796, 362, 11, 1455, 437, 796, 3991, 11, 25928, 796, 3991, 11, 2546, 796, 357, 82, 16, 11, 82, 17, 828, 8043, 796, 1058, 44605, 8, 198, 7839, 0, 7, 79, 11, 7839, 11, 7839, 10331, 7857, 796, 8714, 1096, 8, 198, 87, 22704, 0, 7, 79, 11, 87, 23912, 11, 220, 742, 3378, 796, 352, 25, 74, 11, 42298, 10331, 7857, 28, 83, 9501, 11, 41311, 10331, 7857, 796, 308, 9501, 8, 198, 88, 22704, 0, 7, 79, 11, 2645, 397, 11, 42298, 10331, 7857, 28, 83, 9501, 11, 41311, 10331, 7857, 796, 308, 9501, 11, 88, 2475, 796, 331, 75, 8, 198, 29487, 0, 7, 79, 11, 16, 25, 74, 11, 49, 16, 58, 74, 11, 16, 25, 74, 4357, 8043, 796, 3124, 16, 11, 9493, 413, 5649, 796, 300, 86, 11, 19736, 1096, 796, 13845, 11, 198, 220, 220, 220, 19736, 71, 1758, 796, 1058, 45597, 11, 4102, 263, 30757, 8043, 796, 3124, 16, 11, 6167, 796, 1398, 16, 8, 198, 29487, 0, 7, 79, 11, 16, 25, 74, 11, 49, 17, 58, 74, 11, 16, 25, 74, 4357, 8043, 796, 3124, 17, 11, 9493, 413, 5649, 796, 300, 86, 11, 19736, 1096, 796, 13845, 11, 198, 220, 220, 220, 19736, 71, 1758, 796, 1058, 45597, 11, 18364, 30757, 8043, 796, 3124, 17, 11, 6167, 796, 1398, 17, 8, 198, 198, 21928, 5647, 7203, 14989, 942, 14, 29665, 4267, 62, 3, 7, 74, 8, 62, 3, 7, 73, 737, 12315, 4943, 198, 198, 437, 198, 198, 437, 628, 198, 2235, 3082, 1133, 14729, 287, 262, 537, 2350, 20128, 198, 45, 796, 399, 86, 198, 818, 16, 796, 657, 198, 818, 17, 796, 657, 198, 21544, 796, 657, 198, 81, 796, 838, 198, 1640, 479, 796, 362, 25, 81, 198, 220, 220, 220, 3298, 554, 16, 11, 554, 17, 11, 6372, 198, 220, 220, 220, 329, 474, 796, 352, 25, 74, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 796, 474, 12, 16, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1271, 286, 1466, 287, 428, 2099, 2537, 13653, 469, 198, 220, 220, 220, 220, 220, 220, 220, 39790, 796, 399, 58, 74, 11, 73, 60, 220, 220, 220, 1303, 1271, 286, 2537, 13653, 3212, 286, 428, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 554, 16, 15853, 9874, 49070, 7, 72, 11, 17, 27493, 39, 1134, 220, 220, 220, 1303, 1271, 286, 3131, 13015, 286, 428, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 554, 17, 15853, 9874, 49070, 7, 74, 12, 72, 11, 17, 27493, 39, 1134, 198, 220, 220, 220, 220, 220, 220, 220, 6372, 15853, 39790, 9, 72, 9, 7, 74, 12, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 3, 74, 11, 720, 72, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 36599, 796, 2835, 7, 17, 9, 818, 16, 29006, 17, 9, 818, 16, 1343, 6372, 828, 12894, 896, 796, 513, 8, 198, 23940, 796, 2835, 7, 17, 9, 818, 17, 29006, 17, 9, 818, 17, 1343, 6372, 828, 12894, 896, 796, 513, 8, 198, 35235, 7203, 2601, 2350, 7118, 3488, 2522, 813, 8198, 25, 1466, 796, 720, 36599, 11, 1450, 796, 720, 23940, 4943, 198, 35235, 7203, 3, 36599, 1222, 720, 23940, 4943, 198 ]
2.029277
1,093
<gh_stars>0 module AlignedSpans using Dates, Intervals, Onda using TimeSpans: TimeSpans, start, stop, format_duration using StructTypes, ArrowTypes export SpanRoundingMode, RoundInward, RoundSpanDown, ConstantSamplesRoundingMode export AlignedSpan, consecutive_subspans, n_samples # Make our own method so we can add methods for Intervals without piracy duration(span) = TimeSpans.duration(span) ##### ##### Types and rounding modes ##### """ SpanRoundingMode(start::RoundingMode, stop::RoundingMode) Creates a rounding object for [`AlignedSpan`](@ref) to indicate how the `AlignedSpan`'s endpoints should be determined from a given `span`s endpoints'. """ struct SpanRoundingMode start::RoundingMode stop::RoundingMode end """ ConstantSamplesRoundingMode(start::RoundingMode) Creates a rounding object for [`AlignedSpan`](@ref) to indicate the `AlignedSpan` should be constructed by the `start` and `duration` of the `span`, without regard to its `stop`. If two `span`s have the same duration, then the resulting `AlignedSpan`'s will have the same number of samples when constructed with this rounding mode. See also [`AlignedSpan(sample_rate, span, mode::ConstantSamplesRoundingMode)`](@ref). """ struct ConstantSamplesRoundingMode start::RoundingMode end """ RoundInward = SpanRoundingMode(RoundUp, RoundDown) This is a rounding mode where both ends of the continuous time interval are rounded "inwards" to construct the largest span of indices such that all samples are entirely contained within it. ## Example Consider a signal with sample rate 1 Hz. ``` Index 1 2 3 4 5 Time (s) 0 1 2 3 4 ``` Now, consider the time span 1.5s (inclusive) to 2.5s (exclusive). Using brackets to highlight this span: ``` Index 1 2 3 4 5 Time (s) 0 1 [ 2 ) 3 4 ``` In code, this span is described by ```jldoctest RoundInward julia> using AlignedSpans, Dates, TimeSpans julia> ts = TimeSpan(Millisecond(1500), Millisecond(2500)) TimeSpan(00:00:01.500000000, 00:00:02.500000000) ``` The only sample within the span is at index 3. And indeed, ```jldoctest RoundInward julia> aligned = AlignedSpan(1, ts, RoundInward) AlignedSpan(1.0, 3, 3) julia> AlignedSpans.indices(aligned) 3:3 ``` gives an `AlignedSpan` with indices `3:3`. """ const RoundInward = SpanRoundingMode(RoundUp, RoundDown) """ RoundSpanDown = SpanRoundingMode(RoundDown, RoundDown) This is a rounding mode where *both* ends of the continuous time interval are rounded downwards. ## Example Consider a signal with sample rate 1 Hz. ``` Index 1 2 3 4 5 Time (s) 0 1 2 3 4 ``` Now, consider the time span 1.5s (inclusive) to 2.5s (exclusive). Using brackets to highlight this span: ``` Index 1 2 3 4 5 Time (s) 0 1 [ 2 ) 3 4 ``` In code, this span is described by ```jldoctest RoundSpanDown julia> using AlignedSpans, Dates, TimeSpans julia> ts = TimeSpan(Millisecond(1500), Millisecond(2500)) TimeSpan(00:00:01.500000000, 00:00:02.500000000) ``` If we round both ends of the interval down to the nearest sample, the start of the interval becomes 1s, and the stop of the interval becomes 2s. Thus, the associated samples are at indices `2:3`. And indeed, ```jldoctest RoundSpanDown julia> aligned = AlignedSpan(1, ts, RoundSpanDown) AlignedSpan(1.0, 2, 3) julia> AlignedSpans.indices(aligned) 2:3 ``` gives an `AlignedSpan` with indices `2:3`. """ const RoundSpanDown = SpanRoundingMode(RoundDown, RoundDown) """ AlignedSpan(sample_rate::Number, first_index::Int, last_index::Int) Construct an `AlignedSpan` directly from a `sample_rate` and indices. """ struct AlignedSpan sample_rate::Float64 first_index::Int64 last_index::Int64 function AlignedSpan(sample_rate::Number, first_index::Int, last_index::Int) if last_index < first_index throw(ArgumentError("Cannot create `AlignedSpan` with right-endpoint (`last_index=$(last_index)`) strictly smaller than left endpoint (`first_index=$(first_index)`)")) end return new(convert(Float64, sample_rate), first_index, last_index) end end ##### ##### Continuous -> discrete interface ##### # Methods for these API functions are provided in `interop.jl`. """ AlignedSpans.start_index_from_time(sample_rate, span, rounding_mode) Returns the index of a sample object obtained by rounding the start of `span` according to `rounding_mode`. See also [`AlignedSpan(sample_rate, span, mode::SpanRoundingMode)`](@ref) and [`AlignedSpan(sample_rate, span, mode::ConstantSamplesRoundingMode)`](@ref). """ function start_index_from_time end """ AlignedSpans.stop_index_from_time(sample_rate, span, rounding_mode) Returns the index of a sample object obtained by rounding the stop of `span` according to `rounding_mode`. See also [`AlignedSpan(sample_rate, span, mode::SpanRoundingMode)`](@ref). """ function stop_index_from_time end ##### ##### Continuous -> discrete conversions ##### """ AlignedSpan(sample_rate, span, mode::SpanRoundingMode) Creates an `AlignedSpan` by rounding the left endpoint according to `mode.start`, and the right endpoint by `mode.stop`. If `mode.start==RoundUp`, then the left index of the resulting span is guaranteed to be inside `span`. This is accomplished by checking if the left endpoint of the span is exclusive, and if so, incrementing the index after rounding when necessary. Likewise, if `mode.start==RoundDown`, then the right index of the resulting span is guaranteed to be inside `span`. This is accomplished by checking if the right endpoint of the span is exclusive, and if so, decrementing the index after rounding when necessary. Note: `span` may be of any type which which provides methods for `AlignedSpans.start_index_from_time` and `AlignedSpans.stop_index_from_time`. """ function AlignedSpan(sample_rate, span, mode::SpanRoundingMode) first_index = start_index_from_time(sample_rate, span, mode.start) last_index = stop_index_from_time(sample_rate, span, mode.stop) if last_index < first_index throw(ArgumentError("No samples lie within `span`")) end return AlignedSpan(sample_rate, first_index, last_index) end """ AlignedSpan(sample_rate, span, mode::ConstantSamplesRoundingMode) Creates an `AlignedSpan` whose left endpoint is rounded according to `mode.start`, and whose right endpoint is determined so by the left endpoint and the number of samples, given by `AlignedSpans.n_samples(sample_rate, duration(span))`. Interface: `span` may be of any type which which provides a method for [`AlignedSpans.start_index_from_time`](@ref) and `TimeSpans.duration`. ## More detailed information This is designed so that if `AlignedSpan(sample_rate, span, mode::ConstantSamplesRoundingMode)` is applied to multiple `span`s, with the same `sample_rate`, and the same durations, then the resulting `AlignedSpan`'s will have the same number of samples. For this reason, we ask for `TimeSpans.duration(span)` to be defined, rather than a `n_samples(span)` function: the idea is that we want to only using the duration and the starting time, rather than the *actual* number of samples in this particular `span`. In contrast, `AlignedSpan(sample_rate, span, RoundInward)` provides an `AlignedSpan` which includes only (and exactly) the samples contained within `span`. If one wants to create a collection of consecutive, non-overlapping, `AlignedSpans` each with the same number of samples, then use [`consecutive_subspans`](@ref) instead. """ function AlignedSpan(sample_rate, span, mode::ConstantSamplesRoundingMode) first_index = start_index_from_time(sample_rate, span, mode.start) n = n_samples(sample_rate, duration(span)) last_index = first_index + n - 1 return AlignedSpan(sample_rate, first_index, last_index) end include("time_index_conversions.jl") include("interop.jl") include("utilities.jl") end
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 978, 3916, 4561, 504, 198, 198, 3500, 44712, 11, 4225, 12786, 11, 440, 45658, 198, 3500, 3862, 4561, 504, 25, 3862, 4561, 504, 11, 923, 11, 2245, 11, 5794, 62, 32257, 198, 3500, 32112, 31431, 11, 19408, 31431, 198, 198, 39344, 49101, 49, 9969, 19076, 11, 10485, 818, 904, 11, 10485, 4561, 272, 8048, 11, 20217, 50, 12629, 49, 9969, 19076, 198, 39344, 978, 3916, 4561, 272, 11, 12785, 62, 7266, 2777, 504, 11, 299, 62, 82, 12629, 198, 198, 2, 6889, 674, 898, 2446, 523, 356, 460, 751, 5050, 329, 4225, 12786, 1231, 30955, 198, 32257, 7, 12626, 8, 796, 3862, 4561, 504, 13, 32257, 7, 12626, 8, 198, 198, 4242, 2, 198, 4242, 2, 24897, 290, 38185, 12881, 198, 4242, 2, 198, 198, 37811, 198, 220, 220, 220, 49101, 49, 9969, 19076, 7, 9688, 3712, 49, 9969, 19076, 11, 2245, 3712, 49, 9969, 19076, 8, 198, 198, 16719, 274, 257, 38185, 2134, 329, 685, 63, 2348, 3916, 4561, 272, 63, 16151, 31, 5420, 8, 284, 7603, 703, 262, 4600, 2348, 3916, 4561, 272, 63, 6, 82, 198, 437, 13033, 815, 307, 5295, 422, 257, 1813, 4600, 12626, 63, 82, 886, 13033, 4458, 198, 37811, 198, 7249, 49101, 49, 9969, 19076, 198, 220, 220, 220, 923, 3712, 49, 9969, 19076, 198, 220, 220, 220, 2245, 3712, 49, 9969, 19076, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 20217, 50, 12629, 49, 9969, 19076, 7, 9688, 3712, 49, 9969, 19076, 8, 198, 198, 16719, 274, 257, 38185, 2134, 329, 685, 63, 2348, 3916, 4561, 272, 63, 16151, 31, 5420, 8, 284, 7603, 262, 4600, 2348, 3916, 4561, 272, 63, 198, 21754, 307, 12006, 416, 262, 4600, 9688, 63, 290, 4600, 32257, 63, 286, 262, 4600, 12626, 47671, 1231, 2754, 284, 663, 4600, 11338, 44646, 198, 198, 1532, 734, 4600, 12626, 63, 82, 423, 262, 976, 9478, 11, 788, 262, 7186, 4600, 2348, 3916, 4561, 272, 63, 6, 82, 481, 423, 262, 976, 198, 17618, 286, 8405, 618, 12006, 351, 428, 38185, 4235, 13, 198, 198, 6214, 635, 685, 63, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 3103, 18797, 50, 12629, 49, 9969, 19076, 8, 63, 16151, 31, 5420, 737, 198, 37811, 198, 7249, 20217, 50, 12629, 49, 9969, 19076, 198, 220, 220, 220, 923, 3712, 49, 9969, 19076, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 10485, 818, 904, 796, 49101, 49, 9969, 19076, 7, 22685, 4933, 11, 10485, 8048, 8, 198, 198, 1212, 318, 257, 38185, 4235, 810, 1111, 5645, 286, 262, 12948, 640, 16654, 389, 19273, 366, 259, 2017, 1, 198, 1462, 5678, 262, 4387, 11506, 286, 36525, 884, 326, 477, 8405, 389, 5000, 7763, 1626, 340, 13, 198, 198, 2235, 17934, 198, 198, 19626, 257, 6737, 351, 6291, 2494, 352, 26109, 13, 198, 198, 15506, 63, 198, 15732, 220, 220, 220, 220, 220, 220, 352, 220, 220, 362, 220, 220, 513, 220, 220, 604, 220, 220, 642, 198, 7575, 357, 82, 8, 220, 220, 220, 657, 220, 220, 352, 220, 220, 362, 220, 220, 513, 220, 220, 604, 198, 15506, 63, 198, 198, 3844, 11, 2074, 262, 640, 11506, 352, 13, 20, 82, 357, 259, 5731, 8, 284, 362, 13, 20, 82, 357, 41195, 737, 198, 12814, 28103, 284, 7238, 428, 11506, 25, 198, 198, 15506, 63, 198, 15732, 220, 220, 220, 220, 220, 220, 352, 220, 220, 362, 220, 220, 220, 220, 513, 220, 220, 220, 220, 604, 220, 220, 642, 198, 7575, 357, 82, 8, 220, 220, 220, 657, 220, 220, 352, 220, 685, 220, 362, 220, 1267, 220, 513, 220, 220, 604, 198, 15506, 63, 198, 198, 818, 2438, 11, 428, 11506, 318, 3417, 416, 198, 198, 15506, 63, 73, 335, 38441, 395, 10485, 818, 904, 198, 73, 43640, 29, 1262, 978, 3916, 4561, 504, 11, 44712, 11, 3862, 4561, 504, 198, 198, 73, 43640, 29, 40379, 796, 3862, 4561, 272, 7, 22603, 27866, 623, 7, 33698, 828, 9212, 27866, 623, 7, 44688, 4008, 198, 7575, 4561, 272, 7, 405, 25, 405, 25, 486, 13, 20, 8269, 11, 3571, 25, 405, 25, 2999, 13, 20, 8269, 8, 198, 15506, 63, 198, 198, 464, 691, 6291, 1626, 262, 11506, 318, 379, 6376, 513, 13, 843, 5600, 11, 198, 15506, 63, 73, 335, 38441, 395, 10485, 818, 904, 198, 73, 43640, 29, 19874, 796, 978, 3916, 4561, 272, 7, 16, 11, 40379, 11, 10485, 818, 904, 8, 198, 2348, 3916, 4561, 272, 7, 16, 13, 15, 11, 513, 11, 513, 8, 198, 198, 73, 43640, 29, 978, 3916, 4561, 504, 13, 521, 1063, 7, 41634, 8, 198, 18, 25, 18, 198, 15506, 63, 198, 70, 1083, 281, 4600, 2348, 3916, 4561, 272, 63, 351, 36525, 4600, 18, 25, 18, 44646, 198, 37811, 198, 9979, 10485, 818, 904, 796, 49101, 49, 9969, 19076, 7, 22685, 4933, 11, 10485, 8048, 8, 198, 198, 37811, 198, 220, 220, 220, 10485, 4561, 272, 8048, 796, 49101, 49, 9969, 19076, 7, 22685, 8048, 11, 10485, 8048, 8, 198, 198, 1212, 318, 257, 38185, 4235, 810, 1635, 16885, 9, 5645, 286, 262, 12948, 640, 16654, 389, 19273, 198, 2902, 2017, 13, 198, 198, 2235, 17934, 198, 198, 19626, 257, 6737, 351, 6291, 2494, 352, 26109, 13, 198, 198, 15506, 63, 198, 15732, 220, 220, 220, 220, 220, 220, 352, 220, 220, 362, 220, 220, 513, 220, 220, 604, 220, 220, 642, 198, 7575, 357, 82, 8, 220, 220, 220, 657, 220, 220, 352, 220, 220, 362, 220, 220, 513, 220, 220, 604, 198, 15506, 63, 198, 198, 3844, 11, 2074, 262, 640, 11506, 352, 13, 20, 82, 357, 259, 5731, 8, 284, 362, 13, 20, 82, 357, 41195, 737, 198, 12814, 28103, 284, 7238, 428, 11506, 25, 198, 198, 15506, 63, 198, 15732, 220, 220, 220, 220, 220, 220, 352, 220, 220, 362, 220, 220, 220, 220, 513, 220, 220, 220, 220, 604, 220, 220, 642, 198, 7575, 357, 82, 8, 220, 220, 220, 657, 220, 220, 352, 220, 685, 220, 362, 220, 1267, 220, 513, 220, 220, 604, 198, 15506, 63, 198, 198, 818, 2438, 11, 428, 11506, 318, 3417, 416, 198, 198, 15506, 63, 73, 335, 38441, 395, 10485, 4561, 272, 8048, 198, 73, 43640, 29, 1262, 978, 3916, 4561, 504, 11, 44712, 11, 3862, 4561, 504, 198, 198, 73, 43640, 29, 40379, 796, 3862, 4561, 272, 7, 22603, 27866, 623, 7, 33698, 828, 9212, 27866, 623, 7, 44688, 4008, 198, 7575, 4561, 272, 7, 405, 25, 405, 25, 486, 13, 20, 8269, 11, 3571, 25, 405, 25, 2999, 13, 20, 8269, 8, 198, 15506, 63, 198, 198, 1532, 356, 2835, 1111, 5645, 286, 262, 16654, 866, 284, 262, 16936, 6291, 11, 198, 1169, 923, 286, 262, 16654, 4329, 352, 82, 11, 290, 262, 2245, 286, 262, 16654, 198, 9423, 2586, 362, 82, 13, 6660, 11, 262, 3917, 8405, 389, 379, 36525, 4600, 17, 25, 18, 44646, 843, 5600, 11, 198, 15506, 63, 73, 335, 38441, 395, 10485, 4561, 272, 8048, 198, 73, 43640, 29, 19874, 796, 978, 3916, 4561, 272, 7, 16, 11, 40379, 11, 10485, 4561, 272, 8048, 8, 198, 2348, 3916, 4561, 272, 7, 16, 13, 15, 11, 362, 11, 513, 8, 198, 198, 73, 43640, 29, 978, 3916, 4561, 504, 13, 521, 1063, 7, 41634, 8, 198, 17, 25, 18, 198, 15506, 63, 198, 70, 1083, 281, 4600, 2348, 3916, 4561, 272, 63, 351, 36525, 4600, 17, 25, 18, 44646, 198, 37811, 198, 9979, 10485, 4561, 272, 8048, 796, 49101, 49, 9969, 19076, 7, 22685, 8048, 11, 10485, 8048, 8, 198, 198, 37811, 198, 220, 220, 220, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 3712, 15057, 11, 717, 62, 9630, 3712, 5317, 11, 938, 62, 9630, 3712, 5317, 8, 198, 198, 42316, 281, 4600, 2348, 3916, 4561, 272, 63, 3264, 422, 257, 4600, 39873, 62, 4873, 63, 290, 36525, 13, 198, 37811, 198, 7249, 978, 3916, 4561, 272, 198, 220, 220, 220, 6291, 62, 4873, 3712, 43879, 2414, 198, 220, 220, 220, 717, 62, 9630, 3712, 5317, 2414, 198, 220, 220, 220, 938, 62, 9630, 3712, 5317, 2414, 198, 220, 220, 220, 2163, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 3712, 15057, 11, 717, 62, 9630, 3712, 5317, 11, 938, 62, 9630, 3712, 5317, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 938, 62, 9630, 1279, 717, 62, 9630, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 34, 34574, 2251, 4600, 2348, 3916, 4561, 272, 63, 351, 826, 12, 437, 4122, 357, 63, 12957, 62, 9630, 43641, 7, 12957, 62, 9630, 8, 63, 8, 14084, 4833, 621, 1364, 36123, 357, 63, 11085, 62, 9630, 43641, 7, 11085, 62, 9630, 8, 63, 16725, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 7, 1102, 1851, 7, 43879, 2414, 11, 6291, 62, 4873, 828, 717, 62, 9630, 11, 938, 62, 9630, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 4242, 2, 198, 4242, 2, 45012, 4613, 28810, 7071, 198, 4242, 2, 198, 198, 2, 25458, 329, 777, 7824, 5499, 389, 2810, 287, 4600, 3849, 404, 13, 20362, 44646, 198, 198, 37811, 198, 220, 220, 220, 978, 3916, 4561, 504, 13, 9688, 62, 9630, 62, 6738, 62, 2435, 7, 39873, 62, 4873, 11, 11506, 11, 38185, 62, 14171, 8, 198, 198, 35561, 262, 6376, 286, 257, 6291, 2134, 6492, 416, 38185, 262, 923, 286, 4600, 12626, 63, 1864, 284, 4600, 744, 278, 62, 14171, 44646, 198, 198, 6214, 635, 685, 63, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 4561, 272, 49, 9969, 19076, 8, 63, 16151, 31, 5420, 8, 290, 198, 58, 63, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 3103, 18797, 50, 12629, 49, 9969, 19076, 8, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 923, 62, 9630, 62, 6738, 62, 2435, 886, 198, 198, 37811, 198, 220, 220, 220, 978, 3916, 4561, 504, 13, 11338, 62, 9630, 62, 6738, 62, 2435, 7, 39873, 62, 4873, 11, 11506, 11, 38185, 62, 14171, 8, 198, 198, 35561, 262, 6376, 286, 257, 6291, 2134, 6492, 416, 38185, 262, 2245, 286, 4600, 12626, 63, 1864, 284, 4600, 744, 278, 62, 14171, 44646, 198, 198, 6214, 635, 685, 63, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 4561, 272, 49, 9969, 19076, 8, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 2245, 62, 9630, 62, 6738, 62, 2435, 886, 198, 198, 4242, 2, 198, 4242, 2, 45012, 4613, 28810, 32626, 198, 4242, 2, 198, 198, 37811, 198, 220, 220, 220, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 4561, 272, 49, 9969, 19076, 8, 198, 198, 16719, 274, 281, 4600, 2348, 3916, 4561, 272, 63, 416, 38185, 262, 1364, 36123, 1864, 284, 4600, 14171, 13, 9688, 47671, 198, 392, 262, 826, 36123, 416, 4600, 14171, 13, 11338, 44646, 198, 198, 1532, 4600, 14171, 13, 9688, 855, 22685, 4933, 47671, 788, 262, 1364, 6376, 286, 262, 7186, 11506, 318, 11462, 198, 1462, 307, 2641, 4600, 12626, 44646, 770, 318, 13013, 416, 10627, 611, 262, 1364, 36123, 286, 262, 11506, 198, 271, 8568, 11, 290, 611, 523, 11, 18703, 278, 262, 6376, 706, 38185, 618, 3306, 13, 198, 198, 45872, 11, 611, 4600, 14171, 13, 9688, 855, 22685, 8048, 47671, 788, 262, 826, 6376, 286, 262, 7186, 11506, 318, 11462, 198, 1462, 307, 2641, 4600, 12626, 44646, 770, 318, 13013, 416, 10627, 611, 262, 826, 36123, 286, 262, 11506, 198, 271, 8568, 11, 290, 611, 523, 11, 5255, 434, 278, 262, 6376, 706, 38185, 618, 3306, 13, 198, 198, 6425, 25, 4600, 12626, 63, 743, 307, 286, 597, 2099, 543, 543, 3769, 5050, 329, 4600, 2348, 3916, 4561, 504, 13, 9688, 62, 9630, 62, 6738, 62, 2435, 63, 290, 4600, 2348, 3916, 4561, 504, 13, 11338, 62, 9630, 62, 6738, 62, 2435, 44646, 198, 37811, 198, 8818, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 4561, 272, 49, 9969, 19076, 8, 198, 220, 220, 220, 717, 62, 9630, 796, 923, 62, 9630, 62, 6738, 62, 2435, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 13, 9688, 8, 198, 220, 220, 220, 938, 62, 9630, 796, 2245, 62, 9630, 62, 6738, 62, 2435, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 13, 11338, 8, 198, 220, 220, 220, 611, 938, 62, 9630, 1279, 717, 62, 9630, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 2949, 8405, 6486, 1626, 4600, 12626, 63, 48774, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 717, 62, 9630, 11, 938, 62, 9630, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 3103, 18797, 50, 12629, 49, 9969, 19076, 8, 198, 198, 16719, 274, 281, 4600, 2348, 3916, 4561, 272, 63, 3025, 1364, 36123, 318, 19273, 1864, 284, 4600, 14171, 13, 9688, 47671, 198, 392, 3025, 826, 36123, 318, 5295, 523, 416, 262, 1364, 36123, 290, 262, 1271, 286, 8405, 11, 198, 35569, 416, 4600, 2348, 3916, 4561, 504, 13, 77, 62, 82, 12629, 7, 39873, 62, 4873, 11, 9478, 7, 12626, 4008, 44646, 198, 198, 39317, 25, 4600, 12626, 63, 743, 307, 286, 597, 2099, 543, 543, 3769, 257, 2446, 329, 685, 63, 2348, 3916, 4561, 504, 13, 9688, 62, 9630, 62, 6738, 62, 2435, 63, 16151, 31, 5420, 8, 290, 4600, 7575, 4561, 504, 13, 32257, 44646, 198, 198, 2235, 3125, 6496, 1321, 198, 198, 1212, 318, 3562, 523, 326, 611, 4600, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 3103, 18797, 50, 12629, 49, 9969, 19076, 8, 63, 318, 5625, 284, 3294, 4600, 12626, 63, 82, 11, 351, 262, 976, 4600, 39873, 62, 4873, 47671, 290, 262, 976, 288, 20074, 11, 788, 262, 7186, 4600, 2348, 3916, 4561, 272, 63, 6, 82, 481, 423, 262, 976, 1271, 286, 8405, 13, 198, 198, 1890, 428, 1738, 11, 356, 1265, 329, 4600, 7575, 4561, 504, 13, 32257, 7, 12626, 8, 63, 284, 307, 5447, 11, 2138, 621, 257, 4600, 77, 62, 82, 12629, 7, 12626, 8, 63, 2163, 25, 262, 2126, 318, 326, 356, 765, 284, 691, 1262, 262, 9478, 290, 262, 3599, 640, 11, 2138, 621, 262, 1635, 50039, 9, 1271, 286, 8405, 287, 428, 1948, 4600, 12626, 44646, 198, 198, 818, 6273, 11, 4600, 2348, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 10485, 818, 904, 8, 63, 3769, 281, 4600, 2348, 3916, 4561, 272, 63, 543, 3407, 691, 357, 392, 3446, 8, 262, 8405, 7763, 1626, 4600, 12626, 44646, 198, 198, 1532, 530, 3382, 284, 2251, 257, 4947, 286, 12785, 11, 1729, 12, 2502, 75, 5912, 11, 4600, 2348, 3916, 4561, 504, 63, 1123, 351, 262, 976, 1271, 286, 8405, 11, 788, 779, 685, 63, 1102, 4552, 425, 62, 7266, 2777, 504, 63, 16151, 31, 5420, 8, 2427, 13, 198, 37811, 198, 8818, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 3712, 3103, 18797, 50, 12629, 49, 9969, 19076, 8, 198, 220, 220, 220, 717, 62, 9630, 796, 923, 62, 9630, 62, 6738, 62, 2435, 7, 39873, 62, 4873, 11, 11506, 11, 4235, 13, 9688, 8, 198, 220, 220, 220, 299, 796, 299, 62, 82, 12629, 7, 39873, 62, 4873, 11, 9478, 7, 12626, 4008, 198, 220, 220, 220, 938, 62, 9630, 796, 717, 62, 9630, 1343, 299, 532, 352, 198, 220, 220, 220, 1441, 978, 3916, 4561, 272, 7, 39873, 62, 4873, 11, 717, 62, 9630, 11, 938, 62, 9630, 8, 198, 437, 198, 198, 17256, 7203, 2435, 62, 9630, 62, 1102, 47178, 13, 20362, 4943, 198, 17256, 7203, 3849, 404, 13, 20362, 4943, 198, 17256, 7203, 315, 2410, 13, 20362, 4943, 198, 198, 437, 198 ]
3.004917
2,644
type Layer{T} data::T options::Dict{Symbol, Any} end function Layer{T}( data::T; cmap::String = "nothing", color::Union{String,Symbol} = "blue", alpha::Union{Real,Symbol} = 0.5, markersize::Union{Real,Symbol} = 3.0, borderwidth::Real = 2.0, geom::Symbol = :geometry0 # default for geojson(::DataFrame) ) options = Dict( :cmap => cmap, :color => color, :alpha => alpha, :markersize => markersize, :borderwidth => borderwidth, :geom => geom ) Layer(data, options) end
[ 4906, 34398, 90, 51, 92, 198, 220, 220, 220, 1366, 3712, 51, 198, 220, 220, 220, 3689, 3712, 35, 713, 90, 13940, 23650, 11, 4377, 92, 198, 437, 198, 198, 8818, 34398, 90, 51, 92, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 3712, 51, 26, 198, 220, 220, 220, 220, 220, 220, 220, 269, 8899, 3712, 10100, 796, 366, 22366, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 3124, 3712, 38176, 90, 10100, 11, 13940, 23650, 92, 796, 366, 17585, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 17130, 3712, 38176, 90, 15633, 11, 13940, 23650, 92, 796, 657, 13, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19736, 1096, 3712, 38176, 90, 15633, 11, 13940, 23650, 92, 796, 513, 13, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4865, 10394, 3712, 15633, 796, 362, 13, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4903, 296, 3712, 13940, 23650, 796, 1058, 469, 15748, 15, 1303, 4277, 329, 4903, 13210, 1559, 7, 3712, 6601, 19778, 8, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3689, 796, 360, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 66, 8899, 5218, 269, 8899, 11, 1058, 8043, 5218, 3124, 11, 1058, 26591, 5218, 17130, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4102, 364, 1096, 5218, 19736, 1096, 11, 1058, 20192, 10394, 5218, 4865, 10394, 11, 1058, 469, 296, 5218, 4903, 296, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 34398, 7, 7890, 11, 3689, 8, 198, 437, 198 ]
2.148855
262
module CalliopeJuMP export build_julia_model, model_dict # Import external modules using NCDatasets; using JuMP; using AxisArrays; using YAML; include("Util.jl") include("Variables.jl") include("Objective.jl") module load_constraints export load_capacity_constraints, load_costs_constraints, load_dispatch_constraints, load_energy_balance_constraints, load_milp_constraints, load_network_constraints, load_conversion_constraints, load_conversion_plus_constraints, load_export_constraints include(joinpath("constraints", "capacity.jl")) include(joinpath("constraints", "costs.jl")) include(joinpath("constraints", "dispatch.jl")) include(joinpath("constraints", "energy_balance.jl")) include(joinpath("constraints", "milp.jl")) include(joinpath("constraints", "network.jl")) include(joinpath("constraints", "conversion.jl")) include(joinpath("constraints", "conversion_plus.jl")) include(joinpath("constraints", "export.jl")) end function build_julia_model(path_to_dataset) # Bring in Dataset dataset = NCDatasets.Dataset(path_to_dataset); # ## Sets # sets = Dict() parameters = Dict() dimensions = [NCDatasets.nc_inq_dimname(dataset.ncid, i) for i in NCDatasets.nc_inq_dimids(dataset.ncid, false)] for var in keys(dataset) show(var) if var in dimensions if var == "timesteps" show(dataset[var][1]) end sets[var] = dataset[var][:] else parameters[var] = get_variable(dataset, var) end end # Create JuMP model, including assigning a solver run_solver = dataset.attrib["run.solver"] if run_solver == "cplex" using CPLEX solver = CplexSolver elseif run_solver == "gurobi" using Gurobi solver = GurobiSolver elseif run_solver == "glpk" using GLPKMathProgInterface if haskey(sets, "loc_techs_milp") || haskey(sets, "loc_techs_purchase") solver = GLPKSolverMIP else solver = GLPKSolverLP end else throw("unknown solver", run_solver) end backend_model = JuMP.Model(solver = solver()); model_dict = Dict("backend_model"=>backend_model, "parameters"=>parameters, "defaults"=>YAML.load(dataset.attrib["defaults"]), "sets"=>sets, "dataset"=>dataset) # ## Variables # model_dict["variables"] = initialize_decision_variables(model_dict); # ## Expressions # model_dict["expressions"] = Dict() # ## Constraints # model_dict["constraints"] = merge( load_constraints.load_capacity_constraints(model_dict), load_constraints.load_cost_constraints(model_dict), load_constraints.load_dispatch_constraints(model_dict), load_constraints.load_energy_balance_constraints(model_dict), load_constraints.load_network_constraints(model_dict) ) if haskey(sets, "loc_techs_conversion") model_dict["constraints"] = merge( model_dict["constraints"], load_constraints.load_conversion_constraints(model_dict) ) end if haskey(sets, "loc_techs_conversion_plus") model_dict["constraints"] = merge( model_dict["constraints"], load_constraints.load_conversion_plus_constraints(model_dict) ) end if haskey(sets, "loc_techs_milp") || haskey(sets, "loc_techs_purchase") model_dict["constraints"] = merge( model_dict["constraints"], load_constraints.load_milp_constraints(model_dict) ) end if haskey(sets, "loc_techs_export") model_dict["constraints"] = merge( model_dict["constraints"], load_constraints.load_export_constraints(model_dict) ) end # ## Objective # cost_minimization(model_dict) solve(model_dict["backend_model"]) return model_dict end end
[ 21412, 4889, 72, 3008, 33018, 7378, 198, 198, 39344, 1382, 62, 73, 43640, 62, 19849, 11, 2746, 62, 11600, 198, 198, 2, 17267, 7097, 13103, 198, 3500, 399, 8610, 265, 292, 1039, 26, 1262, 12585, 7378, 26, 1262, 38349, 3163, 20477, 26, 1262, 575, 2390, 43, 26, 198, 198, 17256, 7203, 18274, 346, 13, 20362, 4943, 198, 17256, 7203, 23907, 2977, 13, 20362, 4943, 198, 17256, 7203, 10267, 425, 13, 20362, 4943, 198, 198, 21412, 3440, 62, 1102, 2536, 6003, 628, 220, 220, 220, 10784, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 42404, 62, 1102, 2536, 6003, 11, 3440, 62, 15805, 82, 62, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 6381, 17147, 62, 1102, 2536, 6003, 11, 3440, 62, 22554, 62, 20427, 62, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 25433, 79, 62, 1102, 2536, 6003, 11, 3440, 62, 27349, 62, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 9641, 62, 1102, 2536, 6003, 11, 3440, 62, 1102, 9641, 62, 9541, 62, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 39344, 62, 1102, 2536, 6003, 628, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 42404, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 15805, 82, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 6381, 17147, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 22554, 62, 20427, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 25433, 79, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 27349, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 1102, 9641, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 1102, 9641, 62, 9541, 13, 20362, 48774, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 1102, 2536, 6003, 1600, 366, 39344, 13, 20362, 48774, 198, 198, 437, 198, 198, 8818, 1382, 62, 73, 43640, 62, 19849, 7, 6978, 62, 1462, 62, 19608, 292, 316, 8, 628, 220, 220, 220, 1303, 24347, 287, 16092, 292, 316, 198, 220, 220, 220, 27039, 796, 399, 8610, 265, 292, 1039, 13, 27354, 292, 316, 7, 6978, 62, 1462, 62, 19608, 292, 316, 1776, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 22492, 21394, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 5621, 796, 360, 713, 3419, 198, 220, 220, 220, 10007, 796, 360, 713, 3419, 198, 220, 220, 220, 15225, 796, 685, 7792, 27354, 292, 1039, 13, 10782, 62, 259, 80, 62, 27740, 3672, 7, 19608, 292, 316, 13, 10782, 312, 11, 1312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 399, 8610, 265, 292, 1039, 13, 10782, 62, 259, 80, 62, 27740, 2340, 7, 19608, 292, 316, 13, 10782, 312, 11, 3991, 15437, 628, 220, 220, 220, 329, 1401, 287, 8251, 7, 19608, 292, 316, 8, 198, 220, 220, 220, 220, 220, 220, 220, 905, 7, 7785, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1401, 287, 15225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1401, 6624, 366, 16514, 395, 25386, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 7, 19608, 292, 316, 58, 7785, 7131, 16, 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, 5621, 58, 7785, 60, 796, 27039, 58, 7785, 7131, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10007, 58, 7785, 60, 796, 651, 62, 45286, 7, 19608, 292, 316, 11, 1401, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 13610, 12585, 7378, 2746, 11, 1390, 38875, 257, 1540, 332, 628, 220, 220, 220, 1057, 62, 82, 14375, 796, 27039, 13, 1078, 822, 14692, 5143, 13, 82, 14375, 8973, 198, 220, 220, 220, 611, 1057, 62, 82, 14375, 6624, 366, 66, 11141, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1262, 327, 16437, 55, 198, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 327, 11141, 50, 14375, 198, 220, 220, 220, 2073, 361, 1057, 62, 82, 14375, 6624, 366, 70, 1434, 8482, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1262, 402, 1434, 8482, 198, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 402, 1434, 8482, 50, 14375, 198, 220, 220, 220, 2073, 361, 1057, 62, 82, 14375, 6624, 366, 4743, 79, 74, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1262, 10188, 40492, 37372, 2964, 70, 39317, 198, 220, 220, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 25433, 79, 4943, 8614, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 79, 18737, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 10188, 47, 27015, 14375, 44, 4061, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 10188, 47, 27015, 14375, 19930, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7203, 34680, 1540, 332, 1600, 1057, 62, 82, 14375, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 30203, 62, 19849, 796, 12585, 7378, 13, 17633, 7, 82, 14375, 796, 1540, 332, 35430, 628, 220, 220, 220, 2746, 62, 11600, 796, 360, 713, 7203, 1891, 437, 62, 19849, 1, 14804, 1891, 437, 62, 19849, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17143, 7307, 1, 14804, 17143, 7307, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 12286, 82, 1, 14804, 56, 2390, 43, 13, 2220, 7, 19608, 292, 316, 13, 1078, 822, 14692, 12286, 82, 8973, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 28709, 1, 14804, 28709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 19608, 292, 316, 1, 14804, 19608, 292, 316, 8, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 22492, 15965, 2977, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 2746, 62, 11600, 14692, 25641, 2977, 8973, 796, 41216, 62, 12501, 1166, 62, 25641, 2977, 7, 19849, 62, 11600, 1776, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 22492, 10604, 507, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 2746, 62, 11600, 14692, 42712, 507, 8973, 796, 360, 713, 3419, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 22492, 1482, 2536, 6003, 198, 220, 220, 220, 1303, 628, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 8973, 796, 20121, 7, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 42404, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 15805, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 6381, 17147, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 22554, 62, 20427, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 828, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 27349, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 8, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 611, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 1102, 9641, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 8973, 796, 20121, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 1102, 9641, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 1102, 9641, 62, 9541, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 8973, 796, 20121, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 1102, 9641, 62, 9541, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 25433, 79, 4943, 8614, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 79, 18737, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 8973, 796, 20121, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 25433, 79, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 468, 2539, 7, 28709, 11, 366, 17946, 62, 13670, 82, 62, 39344, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 8973, 796, 20121, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 11600, 14692, 1102, 2536, 6003, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 1102, 2536, 6003, 13, 2220, 62, 39344, 62, 1102, 2536, 6003, 7, 19849, 62, 11600, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 22492, 37092, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1575, 62, 1084, 320, 1634, 7, 19849, 62, 11600, 8, 628, 220, 220, 220, 8494, 7, 19849, 62, 11600, 14692, 1891, 437, 62, 19849, 8973, 8, 198, 220, 220, 220, 1441, 2746, 62, 11600, 198, 198, 437, 198, 198, 437 ]
2.167725
1,890
<reponame>yiminllin/ESDG-PosLimit using Revise # reduce recompilation time using Plots # using Documenter using LinearAlgebra using SparseArrays using BenchmarkTools using UnPack push!(LOAD_PATH, "./src") using CommonUtils using Basis1D using SetupDG push!(LOAD_PATH, "./examples/EntropyStableEuler.jl/src") using EntropyStableEuler using EntropyStableEuler.Fluxes1D function wavespeed_1D(rho,rhou,E) p = pfun_nd(rho,(rhou,),E) cvel = @. sqrt(γ*p/rho) return @. abs(rhou/rho) + cvel end unorm(U) = sum(map((x->x.^2),U)) function pfun_nd(rho, rhoU, E) rhoUnorm2 = unorm(rhoU)./rho return @. (γ-1)*(E - .5*rhoUnorm2) end function primitive_to_conservative_hardcode(rho,U,p) rhoU = rho.*U Unorm = unorm(U) E = @. p/(γ-1) + .5*rho*Unorm return (rho,rhoU,E) end const TOL = 1e-16 "Approximation parameters" N = 3 # The order of approximation K = 50 T = 1.0 T = 6.0 #T = 0.0039 # # Sod shocktube # const γ = 1.4 # const Bl = -0.5 # const Br = 0.5 # const rhoL = 1.0 # const rhoR = 0.125 # const pL = 1.0 # const pR = 0.1 # const xC = 0.0 # const GIFINTERVAL = 20 # T = 0.2 # Leblanc shocktube const γ = 5/3 const Bl = 0.0 const Br = 9.0 const rhoL = 1.0 const rhoR = 0.001 const pL = 0.1 const pR = 1e-7 const xC = 3.0 const GIFINTERVAL = 600 T = 6.0 "Mesh related variables" VX = LinRange(Bl,Br,K+1) EToV = transpose(reshape(sort([1:K; 2:K+1]),2,K)) "Initialize reference element" r,_ = gauss_lobatto_quad(0,0,N) # Reference nodes VDM = vandermonde_1D(N,r) # modal to nodal Dr = grad_vandermonde_1D(N,r)/VDM # nodal differentiation V1 = vandermonde_1D(1,r)/vandermonde_1D(1,[-1;1]) # nodal linear interpolation Nq = N rq,wq = gauss_lobatto_quad(0,0,Nq) Vq = vandermonde_1D(N,rq)/VDM M = Vq'*diagm(wq)*Vq Mlump = zeros(size(M)) Mlump_inv = zeros(size(M)) for i = 1:Nq+1 Mlump[i,i] = sum(M[i,:]) Mlump_inv[i,i] = 1.0/Mlump[i,i] end # operators Qr = M*Dr B = zeros(N+1,N+1) B[1,1] = -1 B[end,end] = 1 L = Array(spdiagm(0=>-2*ones(N+1), 1=>ones(N), -1=>ones(N))) L[1,1] = -1 L[end,end] = -1 psi = pinv(L)*-1/2*B*ones(N+1) S0 = zeros(N+1,N+1) for i = 1:N+1 for j = 1:N+1 if L[i,j] != 0 S0[i,j] = psi[j] - psi[i] end end end Qr0 = S0+1/2*B # Drop zeros Qr = Matrix(droptol!(sparse(Qr),TOL)) Qr0 = Matrix(droptol!(sparse(Qr0),TOL)) B = Matrix(droptol!(sparse(B),TOL)) L = Matrix(droptol!(sparse(L),TOL)) S0 = Matrix(droptol!(sparse(S0),TOL)) S = Matrix(droptol!(sparse((Qr-Qr')/2),TOL)) rf = [-1.0;1.0] nrJ = [-1.0;1.0] Vf = vandermonde_1D(N,rf)/VDM """High order mesh""" x = V1*VX[transpose(EToV)] xf = Vf*x mapM = reshape(1:2*K,2,K) mapP = copy(mapM) mapP[1,2:end] .= mapM[2,1:end-1] mapP[2,1:end-1] .= mapM[1,2:end] # """Periodic""" # mapP[1] = mapM[end] # mapP[end] = mapP[1] """Geometric factors""" J = repeat(transpose(diff(VX)/2),N+1,1) nxJ = repeat([-1;1],1,K) rxJ = 1.0 # """Low order mesh""" # VX0 = [x[1:end-1,:][:]; x[end]] # #EToV = transpose(reshape(sort([1:K; 2:K+1]),2,K) # EToV0 = transpose(reshape(sort([1:N*K; 2:N*K+1]),2,N*K)) # x0 = VX0[transpose(EToV0)] # xf0 = x0 # mapM0 = reshape(1:2*N*K,2,N*K) # mapP0 = copy(mapM0) # mapP0[1,2:end] .= mapM0[2,1:end-1] # mapP0[2,1:end-1] .= mapM0[1,2:end] """Geometric factors""" J = repeat(transpose(diff(VX)/2),N+1,1) nxJ = repeat([-1;1],1,K) rxJ = 1.0 """Initial condition""" rho_x(x) = (x <= xC) ? rhoL : rhoR u_x(x) = 0.0 p_x(x) = (x <= xC) ? pL : pR rho = @. rho_x(x) u = @. u_x(x) p = @. p_x(x) U = primitive_to_conservative_hardcode(rho,u,p) function limiting_param(U_low, P_ij) l = 1.0 # Limit density if U_low[1] + P_ij[1] < -TOL l = min(abs(U_low[1])/(abs(P_ij[1])+1e-14), 1.0) end # limiting internal energy (via quadratic function) a = P_ij[1]*P_ij[3]-1.0/2.0*P_ij[2]^2 b = U_low[3]*P_ij[1]+U_low[1]*P_ij[3]-U_low[2]*P_ij[2] c = U_low[3]*U_low[1]-1.0/2.0*U_low[2]^2 l_eps_ij = 1.0 if b^2-4*a*c >= 0 r1 = (-b+sqrt(b^2-4*a*c))/(2*a) r2 = (-b-sqrt(b^2-4*a*c))/(2*a) if r1 > TOL && r2 > TOL l_eps_ij = min(r1,r2) elseif r1 > TOL && r2 < -TOL l_eps_ij = r1 elseif r2 > TOL && r1 < -TOL l_eps_ij = r2 end end l = min(l,l_eps_ij) return l end function flux_lowIDP(U_i,U_j,f_i,f_j,c_ij,wavespd) return c_ij*(f_i+f_j)-abs(c_ij)*wavespd*(U_j-U_i) end function flux_high(f_i,f_j,c_ij) return c_ij*(f_i+f_j) end function rhs_IDP(U,K,N,wq,S,S0,dt,Mlump_inv) p = pfun_nd.(U[1],U[2],U[3]) flux = zero.(U) @. flux[1] = U[2] @. flux[2] = U[2]^2/U[1]+p @. flux[3] = U[3]*U[2]/U[1]+p*U[2]/U[1] J = (Br-Bl)/K/2 # assume uniform interval # Low order and high order algebraic fluxes F_low = [zeros(N+1,N+1),zeros(N+1,N+1),zeros(N+1,N+1)] F_high = [zeros(N+1,N+1),zeros(N+1,N+1),zeros(N+1,N+1)] F_low_P = [zeros(2),zeros(2),zeros(2)] # 1: left boundary, 2: right boundary F_high_P = [zeros(2),zeros(2),zeros(2)] L = zeros(N+1,N+1) # Array of limiting params L_P = zeros(K-1) # limiting params at left/right boundary rhsU = [zeros(N+1,K),zeros(N+1,K),zeros(N+1,K)] # Determine dt wavespd_arr = zeros(N+1,K) for k = 1:K for i = 1:N+1 wavespd_arr[i,k] = wavespeed_1D(U[1][i,k],U[2][i,k],U[3][i,k]) end end for k = 1:K # Assemble matrix of low and high order algebraic fluxes # interior of the element for i = 1:N+1 for j = 1:N+1 if i != j # skip diagonal wavespd = max(wavespd_arr[i,k],wavespd_arr[j,k]) for c = 1:3 F_low[c][i,j] = flux_lowIDP(U[c][i,k],U[c][j,k],flux[c][i,k],flux[c][j,k],S0[i,j],wavespd) F_high[c][i,j] = flux_high(flux[c][i,k],flux[c][j,k],S[i,j]) end end end end # Assemble matrix of low and high order algebraic fluxes # interface of the element U_left = (k == 1) ? [rhoL; 0.0; pL/(γ-1)] : [U[1][end,k-1]; U[2][end,k-1]; U[3][end,k-1]] f_left = (k == 1) ? [0.0; pL; 0.0] : [flux[1][end,k-1]; flux[2][end,k-1]; flux[3][end,k-1]] U_right = (k == K) ? [rhoR; 0.0; pR/(γ-1)] : [U[1][1,k+1]; U[2][1,k+1]; U[3][1,k+1]] f_right = (k == K) ? [0.0; pR; 0.0] : [flux[1][1,k+1]; flux[2][1,k+1]; flux[3][1,k+1]] wavespd_l = max(wavespd_arr[1,k],wavespeed_1D(U_left[1],U_left[2],U_left[3])) wavespd_r = max(wavespd_arr[end,k],wavespeed_1D(U_right[1],U_right[2],U_right[3])) for c = 1:3 F_low_P[c][1] = flux_lowIDP(U[c][1,k],U_left[c],flux[c][1,k],f_left[c],-0.5,wavespd_l) F_low_P[c][2] = flux_lowIDP(U[c][end,k],U_right[c],flux[c][end,k],f_right[c],0.5,wavespd_r) F_high_P[c][1] = flux_high(flux[c][1,k],f_left[c],-0.5) F_high_P[c][2] = flux_high(flux[c][end,k],f_right[c],0.5) end # Calculate limiting parameters over interior of the element P_ij = zeros(3,1) # TODO: redundant U_low = [zeros(N+1,1),zeros(N+1,1),zeros(N+1,1)] for c = 1:3 U_low[c] .= sum(-F_low[c],dims=2) U_low[c][1] -= F_low_P[c][1] U_low[c][end] -= F_low_P[c][2] U_low[c] .= U[c][:,k]+dt/J*Mlump_inv*U_low[c] end for i = 1:N+1 lambda_j = (i >= 2 && i <= N) ? 1/N : 1/(N+1) m_i = J*wq[i] for j = 1:N+1 if i != j for c = 1:3 P_ij[c] = dt/(m_i*lambda_j)*(F_low[c][i,j]-F_high[c][i,j]) end L[i,j] = limiting_param([U_low[1][i]; U_low[2][i]; U_low[3][i]],P_ij) end end end # Symmetrize limiting parameters for i = 1:N+1 for j = 1:N+1 if i != j l_ij = min(L[i,j],L[j,i]) L[i,j] = l_ij L[j,i] = l_ij end end end # Limiting parameters at the interface if k <= K-1 lambda_j = 1/(N+1) rhs_low = zeros(3,1) U_lowP = [U_low[1][end]; U_low[2][end]; U_low[3][end]] # current element m_i = wq[end]*J for c = 1:3 P_ij[c] = dt/(m_i*lambda_j)*(F_low_P[c][2]-F_high_P[c][2]) end L_P[k] = limiting_param(U_lowP, P_ij) # next element U_lowP = zeros(3,1) P_ij = zeros(3,1) m_i = wq[1]*J lambda_j = 1/(N+1) # TODO: Very awkward... need to repeat the calculation for the next element F_low_tmp = [zeros(1,N+1),zeros(1,N+1),zeros(1,N+1)] F_high_tmp = [zeros(1,N+1),zeros(1,N+1),zeros(1,N+1)] F_lowP_tmp = zeros(3,1) F_highP_tmp = zeros(3,1) i = 1 for j = 1:N+1 if i != j # skip diagonal wavespd = max(wavespd_arr[i,k+1],wavespd_arr[j,k+1]) for c = 1:3 F_low_tmp[c][i,j] = flux_lowIDP(U[c][i,k+1],U[c][j,k+1],flux[c][i,k+1],flux[c][j,k+1],S0[i,j],wavespd) F_high_tmp[c][i,j] = flux_high(flux[c][i,k+1],flux[c][j,k+1],S[i,j]) end end end U_left = [U[1][end,k]; U[2][end,k]; U[3][end,k]] f_left = [flux[1][end,k]; flux[2][end,k]; flux[3][end,k]] wavespd_l = max(wavespd_arr[1,k+1],wavespeed_1D(U_left[1],U_left[2],U_left[3])) for c = 1:3 F_lowP_tmp[c] = flux_lowIDP(U[c][1,k+1],U_left[c],flux[c][1,k+1],f_left[c],-0.5,wavespd_l) F_highP_tmp[c] = flux_high(flux[c][1,k+1],f_left[c],-0.5) end U_low = zeros(3,1) for c = 1:3 U_low[c] = sum(-F_low_tmp[c])-F_lowP_tmp[c][1] U_low[c] = U[c][1,k+1]+dt*1/J*Mlump_inv[1]*U_low[c] end for c = 1:3 P_ij[c] = dt/(m_i*lambda_j)*(F_lowP_tmp[c]-F_highP_tmp[c]) end Ltmp = limiting_param([U_low[1]; U_low[2]; U_low[3]],P_ij) L_P[k] = min(Ltmp,L_P[k]) end # construct rhs for c = 1:3 # With limiting rhsU[c][:,k] = sum((L.-1).*F_low[c] - L.*F_high[c],dims=2) if k > 1 rhsU[c][1,k] += (L_P[k-1]-1)*F_low_P[c][1] - L_P[k-1]*F_high_P[c][1] else rhsU[c][1,k] += -F_low_P[c][1] end if k < K rhsU[c][N+1,k] += (L_P[k]-1)*F_low_P[c][2] - L_P[k]*F_high_P[c][2] else rhsU[c][N+1,k] += -F_low_P[c][2] end rhsU[c][:,k] .= 1/J*Mlump_inv*rhsU[c][:,k] end end return rhsU end function rhs_IDPlow(U,K,N,Mlump_inv,p,flux,J) dfdx = (zeros(N+1,K),zeros(N+1,K),zeros(N+1,K)) for i = 2:K*(N+1)-1 for c = 1:3 dfdx[c][i] = 1/2*(flux[c][mod1(i+1,K*(N+1))] - flux[c][mod1(i-1,K*(N+1))]) end end dfdx[1][1] = 1/2*(flux[1][2] - 0.0) dfdx[2][1] = 1/2*(flux[2][2] - pL) dfdx[3][1] = 1/2*(flux[3][2] - 0.0) dfdx[1][end] = 1/2*(0.0 - flux[1][end-1]) dfdx[2][end] = 1/2*(pR - flux[2][end-1]) dfdx[3][end] = 1/2*(0.0 - flux[3][end-1]) visc = (zeros(N+1,K),zeros(N+1,K),zeros(N+1,K)) for i = 2:K*(N+1)-1 wavespd_curr = wavespeed_1D(U[1][i],U[2][i],U[3][i]) wavespd_R = wavespeed_1D(U[1][mod1(i+1,K*(N+1))],U[2][mod1(i+1,K*(N+1))],U[3][mod1(i+1,K*(N+1))]) wavespd_L = wavespeed_1D(U[1][mod1(i-1,K*(N+1))],U[2][mod1(i-1,K*(N+1))],U[3][mod1(i-1,K*(N+1))]) dL = 1/2*max(wavespd_curr,wavespd_L) dR = 1/2*max(wavespd_curr,wavespd_R) for c = 1:3 visc[c][i] = dL*(U[c][mod1(i-1,K*(N+1))]-U[c][i]) + dR*(U[c][mod1(i+1,K*(N+1))]-U[c][i]) end end # i = 1 wavespd_curr = wavespeed_1D(U[1][1],U[2][1],U[3][1]) wavespd_R = wavespeed_1D(U[1][2],U[2][2],U[3][2]) wavespd_L = wavespeed_1D(rhoL,0.0,pL/(γ-1)) dL = 1/2*max(wavespd_curr,wavespd_L) dR = 1/2*max(wavespd_curr,wavespd_R) visc[1][1] = dL*(rhoL-U[1][1]) + dR*(U[1][2]-U[1][1]) visc[2][1] = dL*(0.0-U[2][1]) + dR*(U[2][2]-U[2][1]) visc[3][1] = dL*(pL/(γ-1)-U[3][1]) + dR*(U[3][2]-U[3][1]) # i = end wavespd_curr = wavespeed_1D(U[1][end],U[2][end],U[3][end]) wavespd_R = wavespeed_1D(rhoR,0.0,pR/(γ-1)) wavespd_L = wavespeed_1D(U[1][end-1],U[2][end-1],U[3][end-1]) dL = 1/2*max(wavespd_curr,wavespd_L) dR = 1/2*max(wavespd_curr,wavespd_R) visc[1][end] = dL*(U[1][end-1]-U[1][end]) + dR*(rhoR-U[1][end]) visc[2][end] = dL*(U[2][end-1]-U[2][end]) + dR*(0.0-U[2][end]) visc[3][end] = dL*(U[3][end-1]-U[3][end]) + dR*(pR/(γ-1)-U[3][end]) rhsU = (x->1/J*Mlump_inv*x).(.-dfdx.+visc) return rhsU end function rhs_high(U,K,N,Mlump_inv,S,p,flux,J) dfdx = (zeros(N+1,K),zeros(N+1,K),zeros(N+1,K)) for k = 1:K for i = 1:N+1 for j = 1:N+1 if i != j for c = 1:3 dfdx[c][i,k] += S[i,j]*(flux[c][i,k]+flux[c][j,k]) end end end end fLB = [0.0;pL;0.0] fRB = [0.0;pR;0.0] # At interfaces for c = 1:3 fL = (k > 1) ? flux[c][end,k-1] : fLB[c] fR = (k < K) ? flux[c][1,k+1] : fRB[c] dfdx[c][1,k] += -1.0/2.0*(flux[c][1,k]+fL) dfdx[c][end,k] += 1.0/2.0*(flux[c][end,k]+fR) end end rhsU = (x->-1/J*Mlump_inv*x).(dfdx) return rhsU end # Time stepping "Time integration" t = 0.0 U = collect(U) resU = [zeros(size(x)),zeros(size(x)),zeros(size(x))] # # Forward Euler # while t < T # dt = 0.0001 # rhsU = rhs_IDP(U,K,N,wq,S,S0,dt,Mlump_inv) # @. U = U + dt*rhsU # global t = t + dt # println("Current time $t with time step size $dt, and final time $T") # end # Vp = vandermonde_1D(N,LinRange(-1,1,10))/VDM # gr(size=(300,300),ylims=(0,1.2),legend=false,markerstrokewidth=1,markersize=2) # plt = plot(Vp*x,Vp*U[1]) Vp = vandermonde_1D(N,LinRange(-1,1,10))/VDM gr(size=(300,300),ylims=(0,1.2),legend=false,markerstrokewidth=1,markersize=2) plot() dt = 0.0001 Nsteps = Int(T/dt) @gif for i = 1:Nsteps rhsU = rhs_IDP(U,K,N,wq,S,S0,dt,Mlump_inv) @. U = U + dt*rhsU global t = t + dt println("Current time $t with time step size $dt, and final time $T") if i % GIFINTERVAL == 0 plot(Vp*x,Vp*U[1]) end end every GIFINTERVAL
[ 27, 7856, 261, 480, 29, 88, 320, 259, 297, 259, 14, 1546, 35, 38, 12, 21604, 39184, 198, 3500, 5416, 786, 1303, 4646, 48765, 10520, 640, 198, 3500, 1345, 1747, 198, 2, 1262, 16854, 263, 198, 3500, 44800, 2348, 29230, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 25187, 4102, 33637, 198, 3500, 791, 11869, 628, 198, 14689, 0, 7, 35613, 62, 34219, 11, 366, 19571, 10677, 4943, 198, 3500, 8070, 18274, 4487, 198, 3500, 6455, 271, 16, 35, 198, 198, 3500, 31122, 35, 38, 198, 198, 14689, 0, 7, 35613, 62, 34219, 11, 366, 19571, 1069, 12629, 14, 14539, 28338, 1273, 540, 36, 18173, 13, 20362, 14, 10677, 4943, 198, 3500, 7232, 28338, 1273, 540, 36, 18173, 198, 3500, 7232, 28338, 1273, 540, 36, 18173, 13, 37, 22564, 274, 16, 35, 198, 198, 8818, 9813, 39492, 62, 16, 35, 7, 81, 8873, 11, 81, 15710, 11, 36, 8, 198, 220, 220, 220, 279, 796, 279, 12543, 62, 358, 7, 81, 8873, 11, 7, 81, 15710, 11, 828, 36, 8, 198, 220, 220, 220, 269, 626, 796, 2488, 13, 19862, 17034, 7, 42063, 9, 79, 14, 81, 8873, 8, 198, 220, 220, 220, 1441, 2488, 13, 2352, 7, 81, 15710, 14, 81, 8873, 8, 1343, 269, 626, 198, 437, 198, 403, 579, 7, 52, 8, 796, 2160, 7, 8899, 19510, 87, 3784, 87, 13, 61, 17, 828, 52, 4008, 198, 8818, 279, 12543, 62, 358, 7, 81, 8873, 11, 374, 8873, 52, 11, 412, 8, 198, 220, 220, 220, 374, 8873, 3118, 579, 17, 796, 555, 579, 7, 81, 8873, 52, 737, 14, 81, 8873, 198, 220, 220, 220, 1441, 2488, 13, 357, 42063, 12, 16, 27493, 7, 36, 532, 764, 20, 9, 81, 8873, 3118, 579, 17, 8, 198, 437, 198, 198, 8818, 20049, 62, 1462, 62, 43218, 62, 10424, 8189, 7, 81, 8873, 11, 52, 11, 79, 8, 198, 220, 220, 220, 374, 8873, 52, 796, 374, 8873, 15885, 52, 198, 220, 220, 220, 791, 579, 796, 555, 579, 7, 52, 8, 198, 220, 220, 220, 412, 796, 2488, 13, 279, 29006, 42063, 12, 16, 8, 1343, 764, 20, 9, 81, 8873, 9, 3118, 579, 198, 220, 220, 220, 1441, 357, 81, 8873, 11, 81, 8873, 52, 11, 36, 8, 198, 437, 628, 198, 9979, 309, 3535, 796, 352, 68, 12, 1433, 198, 1, 4677, 13907, 18991, 10007, 1, 198, 45, 796, 513, 1303, 383, 1502, 286, 40874, 198, 42, 796, 2026, 198, 51, 796, 352, 13, 15, 198, 51, 796, 718, 13, 15, 198, 2, 51, 796, 657, 13, 405, 2670, 198, 198, 2, 1303, 43829, 6380, 29302, 198, 2, 1500, 7377, 111, 796, 352, 13, 19, 198, 2, 1500, 1086, 796, 532, 15, 13, 20, 198, 2, 1500, 1709, 796, 657, 13, 20, 198, 2, 1500, 374, 8873, 43, 796, 352, 13, 15, 198, 2, 1500, 374, 8873, 49, 796, 657, 13, 11623, 198, 2, 1500, 279, 43, 796, 352, 13, 15, 198, 2, 1500, 279, 49, 796, 657, 13, 16, 198, 2, 1500, 2124, 34, 796, 657, 13, 15, 198, 2, 1500, 24984, 41358, 23428, 796, 1160, 198, 2, 309, 796, 657, 13, 17, 198, 198, 2, 1004, 2436, 1192, 6380, 29302, 198, 9979, 7377, 111, 796, 642, 14, 18, 198, 9979, 1086, 796, 657, 13, 15, 198, 9979, 1709, 796, 860, 13, 15, 198, 9979, 374, 8873, 43, 796, 352, 13, 15, 198, 9979, 374, 8873, 49, 796, 657, 13, 8298, 198, 9979, 279, 43, 796, 657, 13, 16, 198, 9979, 279, 49, 796, 352, 68, 12, 22, 198, 9979, 2124, 34, 796, 513, 13, 15, 198, 9979, 24984, 41358, 23428, 796, 10053, 198, 51, 796, 718, 13, 15, 198, 198, 1, 37031, 3519, 9633, 1, 198, 53, 55, 796, 5164, 17257, 7, 3629, 11, 9414, 11, 42, 10, 16, 8, 198, 36, 2514, 53, 796, 1007, 3455, 7, 3447, 1758, 7, 30619, 26933, 16, 25, 42, 26, 362, 25, 42, 10, 16, 46570, 17, 11, 42, 4008, 198, 198, 1, 24243, 1096, 4941, 5002, 1, 198, 81, 11, 62, 796, 31986, 1046, 62, 75, 672, 45807, 62, 47003, 7, 15, 11, 15, 11, 45, 8, 220, 220, 1303, 20984, 13760, 198, 8898, 44, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 81, 8, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 953, 282, 284, 18666, 282, 198, 6187, 796, 3915, 62, 85, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 81, 20679, 8898, 44, 1303, 18666, 282, 32488, 198, 53, 16, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 16, 11, 81, 20679, 85, 4066, 6327, 68, 62, 16, 35, 7, 16, 17414, 12, 16, 26, 16, 12962, 1303, 18666, 282, 14174, 39555, 341, 198, 198, 45, 80, 796, 399, 198, 81, 80, 11, 86, 80, 796, 31986, 1046, 62, 75, 672, 45807, 62, 47003, 7, 15, 11, 15, 11, 45, 80, 8, 198, 53, 80, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 81, 80, 20679, 8898, 44, 198, 44, 796, 569, 80, 6, 9, 10989, 363, 76, 7, 86, 80, 27493, 53, 80, 198, 44, 75, 931, 796, 1976, 27498, 7, 7857, 7, 44, 4008, 198, 44, 75, 931, 62, 16340, 796, 1976, 27498, 7, 7857, 7, 44, 4008, 198, 1640, 1312, 796, 352, 25, 45, 80, 10, 16, 198, 220, 220, 220, 337, 75, 931, 58, 72, 11, 72, 60, 796, 2160, 7, 44, 58, 72, 11, 25, 12962, 198, 220, 220, 220, 337, 75, 931, 62, 16340, 58, 72, 11, 72, 60, 796, 352, 13, 15, 14, 44, 75, 931, 58, 72, 11, 72, 60, 198, 437, 198, 198, 2, 12879, 198, 48, 81, 796, 337, 9, 6187, 198, 33, 796, 1976, 27498, 7, 45, 10, 16, 11, 45, 10, 16, 8, 198, 33, 58, 16, 11, 16, 60, 796, 532, 16, 198, 33, 58, 437, 11, 437, 60, 796, 352, 198, 43, 796, 15690, 7, 2777, 10989, 363, 76, 7, 15, 14804, 12, 17, 9, 1952, 7, 45, 10, 16, 828, 352, 14804, 1952, 7, 45, 828, 532, 16, 14804, 1952, 7, 45, 22305, 198, 43, 58, 16, 11, 16, 60, 796, 532, 16, 198, 43, 58, 437, 11, 437, 60, 796, 532, 16, 198, 862, 72, 796, 6757, 85, 7, 43, 27493, 12, 16, 14, 17, 9, 33, 9, 1952, 7, 45, 10, 16, 8, 198, 50, 15, 796, 1976, 27498, 7, 45, 10, 16, 11, 45, 10, 16, 8, 198, 1640, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 611, 406, 58, 72, 11, 73, 60, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 311, 15, 58, 72, 11, 73, 60, 796, 46231, 58, 73, 60, 532, 46231, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 48, 81, 15, 796, 311, 15, 10, 16, 14, 17, 9, 33, 198, 198, 2, 14258, 1976, 27498, 220, 198, 48, 81, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 7, 48, 81, 828, 51, 3535, 4008, 198, 48, 81, 15, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 7, 48, 81, 15, 828, 51, 3535, 4008, 198, 33, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 7, 33, 828, 51, 3535, 4008, 198, 43, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 7, 43, 828, 51, 3535, 4008, 198, 50, 15, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 7, 50, 15, 828, 51, 3535, 4008, 198, 50, 796, 24936, 7, 22285, 457, 349, 0, 7, 82, 29572, 19510, 48, 81, 12, 48, 81, 11537, 14, 17, 828, 51, 3535, 4008, 198, 198, 41871, 796, 25915, 16, 13, 15, 26, 16, 13, 15, 60, 198, 48624, 41, 796, 25915, 16, 13, 15, 26, 16, 13, 15, 60, 198, 53, 69, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 41871, 20679, 8898, 44, 198, 198, 37811, 11922, 1502, 19609, 37811, 198, 87, 796, 569, 16, 9, 53, 55, 58, 7645, 3455, 7, 36, 2514, 53, 15437, 198, 26152, 796, 569, 69, 9, 87, 198, 8899, 44, 796, 27179, 1758, 7, 16, 25, 17, 9, 42, 11, 17, 11, 42, 8, 198, 8899, 47, 796, 4866, 7, 8899, 44, 8, 198, 8899, 47, 58, 16, 11, 17, 25, 437, 60, 764, 28, 3975, 44, 58, 17, 11, 16, 25, 437, 12, 16, 60, 198, 8899, 47, 58, 17, 11, 16, 25, 437, 12, 16, 60, 764, 28, 3975, 44, 58, 16, 11, 17, 25, 437, 60, 198, 198, 2, 37227, 5990, 2101, 291, 37811, 198, 2, 3975, 47, 58, 16, 60, 796, 3975, 44, 58, 437, 60, 198, 2, 3975, 47, 58, 437, 60, 796, 3975, 47, 58, 16, 60, 198, 198, 37811, 10082, 16996, 5087, 37811, 198, 41, 796, 9585, 7, 7645, 3455, 7, 26069, 7, 53, 55, 20679, 17, 828, 45, 10, 16, 11, 16, 8, 198, 77, 87, 41, 796, 9585, 26933, 12, 16, 26, 16, 4357, 16, 11, 42, 8, 198, 40914, 41, 796, 352, 13, 15, 628, 198, 2, 37227, 20535, 1502, 19609, 37811, 198, 2, 569, 55, 15, 796, 685, 87, 58, 16, 25, 437, 12, 16, 11, 25, 7131, 25, 11208, 2124, 58, 437, 11907, 198, 2, 1303, 36, 2514, 53, 796, 1007, 3455, 7, 3447, 1758, 7, 30619, 26933, 16, 25, 42, 26, 362, 25, 42, 10, 16, 46570, 17, 11, 42, 8, 198, 2, 412, 2514, 53, 15, 796, 1007, 3455, 7, 3447, 1758, 7, 30619, 26933, 16, 25, 45, 9, 42, 26, 362, 25, 45, 9, 42, 10, 16, 46570, 17, 11, 45, 9, 42, 4008, 198, 2, 2124, 15, 796, 569, 55, 15, 58, 7645, 3455, 7, 36, 2514, 53, 15, 15437, 198, 2, 2124, 69, 15, 796, 2124, 15, 220, 198, 2, 3975, 44, 15, 796, 27179, 1758, 7, 16, 25, 17, 9, 45, 9, 42, 11, 17, 11, 45, 9, 42, 8, 198, 2, 3975, 47, 15, 796, 4866, 7, 8899, 44, 15, 8, 198, 2, 3975, 47, 15, 58, 16, 11, 17, 25, 437, 60, 764, 28, 3975, 44, 15, 58, 17, 11, 16, 25, 437, 12, 16, 60, 198, 2, 3975, 47, 15, 58, 17, 11, 16, 25, 437, 12, 16, 60, 764, 28, 3975, 44, 15, 58, 16, 11, 17, 25, 437, 60, 198, 198, 37811, 10082, 16996, 5087, 37811, 198, 41, 796, 9585, 7, 7645, 3455, 7, 26069, 7, 53, 55, 20679, 17, 828, 45, 10, 16, 11, 16, 8, 198, 77, 87, 41, 796, 9585, 26933, 12, 16, 26, 16, 4357, 16, 11, 42, 8, 198, 40914, 41, 796, 352, 13, 15, 198, 198, 37811, 24243, 4006, 37811, 198, 81, 8873, 62, 87, 7, 87, 8, 796, 357, 87, 19841, 2124, 34, 8, 5633, 374, 8873, 43, 1058, 374, 8873, 49, 198, 84, 62, 87, 7, 87, 8, 796, 657, 13, 15, 198, 79, 62, 87, 7, 87, 8, 796, 357, 87, 19841, 2124, 34, 8, 5633, 279, 43, 1058, 279, 49, 220, 198, 198, 81, 8873, 796, 2488, 13, 374, 8873, 62, 87, 7, 87, 8, 198, 84, 796, 2488, 13, 334, 62, 87, 7, 87, 8, 198, 79, 796, 2488, 13, 279, 62, 87, 7, 87, 8, 198, 52, 796, 20049, 62, 1462, 62, 43218, 62, 10424, 8189, 7, 81, 8873, 11, 84, 11, 79, 8, 198, 198, 8818, 15637, 62, 17143, 7, 52, 62, 9319, 11, 350, 62, 2926, 8, 198, 220, 220, 220, 300, 796, 352, 13, 15, 198, 220, 220, 220, 1303, 27272, 12109, 198, 220, 220, 220, 611, 471, 62, 9319, 58, 16, 60, 1343, 350, 62, 2926, 58, 16, 60, 1279, 532, 51, 3535, 198, 220, 220, 220, 220, 220, 220, 220, 300, 796, 949, 7, 8937, 7, 52, 62, 9319, 58, 16, 12962, 29006, 8937, 7, 47, 62, 2926, 58, 16, 12962, 10, 16, 68, 12, 1415, 828, 352, 13, 15, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 15637, 5387, 2568, 357, 8869, 15094, 81, 1512, 2163, 8, 198, 220, 220, 220, 257, 796, 350, 62, 2926, 58, 16, 60, 9, 47, 62, 2926, 58, 18, 45297, 16, 13, 15, 14, 17, 13, 15, 9, 47, 62, 2926, 58, 17, 60, 61, 17, 198, 220, 220, 220, 275, 796, 471, 62, 9319, 58, 18, 60, 9, 47, 62, 2926, 58, 16, 48688, 52, 62, 9319, 58, 16, 60, 9, 47, 62, 2926, 58, 18, 45297, 52, 62, 9319, 58, 17, 60, 9, 47, 62, 2926, 58, 17, 60, 198, 220, 220, 220, 269, 796, 471, 62, 9319, 58, 18, 60, 9, 52, 62, 9319, 58, 16, 45297, 16, 13, 15, 14, 17, 13, 15, 9, 52, 62, 9319, 58, 17, 60, 61, 17, 628, 220, 220, 220, 300, 62, 25386, 62, 2926, 796, 352, 13, 15, 198, 220, 220, 220, 611, 275, 61, 17, 12, 19, 9, 64, 9, 66, 18189, 657, 220, 198, 220, 220, 220, 220, 220, 220, 220, 374, 16, 796, 13841, 65, 10, 31166, 17034, 7, 65, 61, 17, 12, 19, 9, 64, 9, 66, 4008, 29006, 17, 9, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 17, 796, 13841, 65, 12, 31166, 17034, 7, 65, 61, 17, 12, 19, 9, 64, 9, 66, 4008, 29006, 17, 9, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 374, 16, 1875, 309, 3535, 11405, 374, 17, 1875, 309, 3535, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 62, 25386, 62, 2926, 796, 949, 7, 81, 16, 11, 81, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 374, 16, 1875, 309, 3535, 11405, 374, 17, 1279, 532, 51, 3535, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 62, 25386, 62, 2926, 796, 374, 16, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 374, 17, 1875, 309, 3535, 11405, 374, 16, 1279, 532, 51, 3535, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 62, 25386, 62, 2926, 796, 374, 17, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 220, 628, 220, 220, 220, 300, 796, 949, 7, 75, 11, 75, 62, 25386, 62, 2926, 8, 198, 220, 220, 220, 1441, 300, 198, 437, 198, 198, 8818, 28462, 62, 9319, 2389, 47, 7, 52, 62, 72, 11, 52, 62, 73, 11, 69, 62, 72, 11, 69, 62, 73, 11, 66, 62, 2926, 11, 32569, 30094, 8, 198, 220, 220, 220, 1441, 269, 62, 2926, 9, 7, 69, 62, 72, 10, 69, 62, 73, 13219, 8937, 7, 66, 62, 2926, 27493, 32569, 30094, 9, 7, 52, 62, 73, 12, 52, 62, 72, 8, 198, 437, 198, 198, 8818, 28462, 62, 8929, 7, 69, 62, 72, 11, 69, 62, 73, 11, 66, 62, 2926, 8, 198, 220, 220, 220, 1441, 269, 62, 2926, 9, 7, 69, 62, 72, 10, 69, 62, 73, 8, 198, 437, 198, 198, 8818, 9529, 82, 62, 2389, 47, 7, 52, 11, 42, 11, 45, 11, 86, 80, 11, 50, 11, 50, 15, 11, 28664, 11, 44, 75, 931, 62, 16340, 8, 198, 220, 220, 220, 279, 796, 279, 12543, 62, 358, 12195, 52, 58, 16, 4357, 52, 58, 17, 4357, 52, 58, 18, 12962, 198, 220, 220, 220, 28462, 796, 6632, 12195, 52, 8, 198, 220, 220, 220, 2488, 13, 28462, 58, 16, 60, 796, 471, 58, 17, 60, 198, 220, 220, 220, 2488, 13, 28462, 58, 17, 60, 796, 471, 58, 17, 60, 61, 17, 14, 52, 58, 16, 48688, 79, 198, 220, 220, 220, 2488, 13, 28462, 58, 18, 60, 796, 471, 58, 18, 60, 9, 52, 58, 17, 60, 14, 52, 58, 16, 48688, 79, 9, 52, 58, 17, 60, 14, 52, 58, 16, 60, 628, 220, 220, 220, 449, 796, 357, 9414, 12, 3629, 20679, 42, 14, 17, 1303, 7048, 8187, 16654, 628, 220, 220, 220, 1303, 7754, 1502, 290, 1029, 1502, 37139, 291, 28462, 274, 198, 220, 220, 220, 376, 62, 9319, 220, 220, 220, 220, 220, 220, 796, 685, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 15437, 198, 220, 220, 220, 376, 62, 8929, 220, 220, 220, 220, 220, 796, 685, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 45, 10, 16, 15437, 198, 220, 220, 220, 376, 62, 9319, 62, 47, 220, 220, 220, 220, 796, 685, 9107, 418, 7, 17, 828, 9107, 418, 7, 17, 828, 9107, 418, 7, 17, 15437, 1303, 352, 25, 1364, 18645, 11, 362, 25, 826, 18645, 198, 220, 220, 220, 376, 62, 8929, 62, 47, 220, 220, 220, 796, 685, 9107, 418, 7, 17, 828, 9107, 418, 7, 17, 828, 9107, 418, 7, 17, 15437, 198, 220, 220, 220, 406, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1976, 27498, 7, 45, 10, 16, 11, 45, 10, 16, 8, 1303, 15690, 286, 15637, 42287, 198, 220, 220, 220, 406, 62, 47, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1976, 27498, 7, 42, 12, 16, 8, 1303, 15637, 42287, 379, 1364, 14, 3506, 18645, 198, 220, 220, 220, 9529, 82, 52, 220, 220, 220, 220, 220, 220, 220, 796, 685, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 15437, 628, 220, 220, 220, 1303, 45559, 3810, 288, 83, 198, 220, 220, 220, 9813, 30094, 62, 3258, 796, 1976, 27498, 7, 45, 10, 16, 11, 42, 8, 198, 220, 220, 220, 329, 479, 796, 352, 25, 42, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 3258, 58, 72, 11, 74, 60, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 72, 11, 74, 4357, 52, 58, 17, 7131, 72, 11, 74, 4357, 52, 58, 18, 7131, 72, 11, 74, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 329, 479, 796, 352, 25, 42, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1081, 15140, 17593, 286, 1877, 290, 1029, 1502, 37139, 291, 28462, 274, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11087, 286, 262, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 14512, 474, 1303, 14267, 40039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 796, 3509, 7, 32569, 30094, 62, 3258, 58, 72, 11, 74, 4357, 32569, 30094, 62, 3258, 58, 73, 11, 74, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 58, 66, 7131, 72, 11, 73, 60, 220, 796, 28462, 62, 9319, 2389, 47, 7, 52, 58, 66, 7131, 72, 11, 74, 4357, 52, 58, 66, 7131, 73, 11, 74, 4357, 69, 22564, 58, 66, 7131, 72, 11, 74, 4357, 69, 22564, 58, 66, 7131, 73, 11, 74, 4357, 50, 15, 58, 72, 11, 73, 4357, 32569, 30094, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 58, 66, 7131, 72, 11, 73, 60, 796, 28462, 62, 8929, 7, 69, 22564, 58, 66, 7131, 72, 11, 74, 4357, 69, 22564, 58, 66, 7131, 73, 11, 74, 4357, 50, 58, 72, 11, 73, 12962, 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, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1081, 15140, 17593, 286, 1877, 290, 1029, 1502, 37139, 291, 28462, 274, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7071, 286, 262, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9464, 796, 357, 74, 6624, 352, 8, 220, 5633, 685, 81, 8873, 43, 26, 657, 13, 15, 26, 279, 43, 29006, 42063, 12, 16, 15437, 1058, 685, 52, 58, 16, 7131, 437, 11, 74, 12, 16, 11208, 471, 58, 17, 7131, 437, 11, 74, 12, 16, 11208, 471, 58, 18, 7131, 437, 11, 74, 12, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 277, 62, 9464, 796, 357, 74, 6624, 352, 8, 220, 5633, 685, 15, 13, 15, 26, 279, 43, 26, 657, 13, 15, 60, 220, 220, 220, 220, 220, 220, 220, 1058, 685, 69, 22564, 58, 16, 7131, 437, 11, 74, 12, 16, 11208, 28462, 58, 17, 7131, 437, 11, 74, 12, 16, 11208, 28462, 58, 18, 7131, 437, 11, 74, 12, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 471, 62, 3506, 796, 357, 74, 6624, 509, 8, 5633, 685, 81, 8873, 49, 26, 657, 13, 15, 26, 279, 49, 29006, 42063, 12, 16, 15437, 1058, 685, 52, 58, 16, 7131, 16, 11, 74, 10, 16, 11208, 471, 58, 17, 7131, 16, 11, 74, 10, 16, 11208, 471, 58, 18, 7131, 16, 11, 74, 10, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 277, 62, 3506, 796, 357, 74, 6624, 509, 8, 5633, 685, 15, 13, 15, 26, 279, 49, 26, 657, 13, 15, 60, 220, 220, 220, 220, 220, 220, 220, 1058, 685, 69, 22564, 58, 16, 7131, 16, 11, 74, 10, 16, 11208, 28462, 58, 17, 7131, 16, 11, 74, 10, 16, 11208, 28462, 58, 18, 7131, 16, 11, 74, 10, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 75, 796, 3509, 7, 32569, 30094, 62, 3258, 58, 16, 11, 74, 4357, 32569, 39492, 62, 16, 35, 7, 52, 62, 9464, 58, 16, 4357, 52, 62, 9464, 58, 17, 4357, 52, 62, 9464, 58, 18, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 81, 796, 3509, 7, 32569, 30094, 62, 3258, 58, 437, 11, 74, 4357, 32569, 39492, 62, 16, 35, 7, 52, 62, 3506, 58, 16, 4357, 52, 62, 3506, 58, 17, 4357, 52, 62, 3506, 58, 18, 60, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 62, 47, 58, 66, 7131, 16, 60, 796, 28462, 62, 9319, 2389, 47, 7, 52, 58, 66, 7131, 16, 11, 74, 4357, 52, 62, 9464, 58, 66, 4357, 69, 22564, 58, 66, 7131, 16, 11, 74, 4357, 69, 62, 9464, 58, 66, 4357, 12, 15, 13, 20, 11, 32569, 30094, 62, 75, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 62, 47, 58, 66, 7131, 17, 60, 796, 28462, 62, 9319, 2389, 47, 7, 52, 58, 66, 7131, 437, 11, 74, 4357, 52, 62, 3506, 58, 66, 4357, 69, 22564, 58, 66, 7131, 437, 11, 74, 4357, 69, 62, 3506, 58, 66, 4357, 15, 13, 20, 11, 32569, 30094, 62, 81, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 62, 47, 58, 66, 7131, 16, 60, 796, 28462, 62, 8929, 7, 69, 22564, 58, 66, 7131, 16, 11, 74, 4357, 69, 62, 9464, 58, 66, 4357, 12, 15, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 62, 47, 58, 66, 7131, 17, 60, 796, 28462, 62, 8929, 7, 69, 22564, 58, 66, 7131, 437, 11, 74, 4357, 69, 62, 3506, 58, 66, 4357, 15, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 27131, 378, 15637, 10007, 625, 11087, 286, 262, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 350, 62, 2926, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 30806, 198, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 796, 220, 685, 9107, 418, 7, 45, 10, 16, 11, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 16, 828, 9107, 418, 7, 45, 10, 16, 11, 16, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 60, 764, 28, 2160, 32590, 37, 62, 9319, 58, 66, 4357, 67, 12078, 28, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 7131, 16, 60, 48185, 376, 62, 9319, 62, 47, 58, 66, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 7131, 437, 60, 48185, 376, 62, 9319, 62, 47, 58, 66, 7131, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 60, 764, 28, 471, 58, 66, 7131, 45299, 74, 48688, 28664, 14, 41, 9, 44, 75, 931, 62, 16340, 9, 52, 62, 9319, 58, 66, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37456, 62, 73, 796, 357, 72, 18189, 362, 11405, 1312, 19841, 399, 8, 5633, 352, 14, 45, 1058, 352, 29006, 45, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 62, 72, 796, 449, 9, 86, 80, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 14512, 474, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 62, 2926, 58, 66, 60, 796, 288, 83, 29006, 76, 62, 72, 9, 50033, 62, 73, 27493, 7, 37, 62, 9319, 58, 66, 7131, 72, 11, 73, 45297, 37, 62, 8929, 58, 66, 7131, 72, 11, 73, 12962, 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, 220, 220, 220, 220, 406, 58, 72, 11, 73, 60, 796, 15637, 62, 17143, 26933, 52, 62, 9319, 58, 16, 7131, 72, 11208, 471, 62, 9319, 58, 17, 7131, 72, 11208, 471, 62, 9319, 58, 18, 7131, 72, 60, 4357, 47, 62, 2926, 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, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1632, 3020, 316, 380, 2736, 15637, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 14512, 474, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 62, 2926, 796, 949, 7, 43, 58, 72, 11, 73, 4357, 43, 58, 73, 11, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 406, 58, 72, 11, 73, 60, 796, 300, 62, 2926, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 406, 58, 73, 11, 72, 60, 796, 300, 62, 2926, 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, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7576, 1780, 10007, 379, 262, 7071, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 479, 19841, 509, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37456, 62, 73, 796, 352, 29006, 45, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9529, 82, 62, 9319, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 47, 796, 685, 52, 62, 9319, 58, 16, 7131, 437, 11208, 471, 62, 9319, 58, 17, 7131, 437, 11208, 471, 62, 9319, 58, 18, 7131, 437, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1459, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 62, 72, 796, 266, 80, 58, 437, 60, 9, 41, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 62, 2926, 58, 66, 60, 796, 288, 83, 29006, 76, 62, 72, 9, 50033, 62, 73, 27493, 7, 37, 62, 9319, 62, 47, 58, 66, 7131, 17, 45297, 37, 62, 8929, 62, 47, 58, 66, 7131, 17, 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, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 406, 62, 47, 58, 74, 60, 796, 15637, 62, 17143, 7, 52, 62, 9319, 47, 11, 350, 62, 2926, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1306, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 47, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 62, 2926, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 62, 72, 796, 266, 80, 58, 16, 60, 9, 41, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37456, 62, 73, 796, 352, 29006, 45, 10, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 9576, 13006, 986, 761, 284, 9585, 262, 17952, 329, 262, 1306, 5002, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 62, 22065, 796, 685, 9107, 418, 7, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 16, 11, 45, 10, 16, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 62, 22065, 796, 685, 9107, 418, 7, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 16, 11, 45, 10, 16, 828, 9107, 418, 7, 16, 11, 45, 10, 16, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 47, 62, 22065, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 47, 62, 22065, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 14512, 474, 1303, 14267, 40039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 796, 3509, 7, 32569, 30094, 62, 3258, 58, 72, 11, 74, 10, 16, 4357, 32569, 30094, 62, 3258, 58, 73, 11, 74, 10, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 62, 22065, 58, 66, 7131, 72, 11, 73, 60, 796, 28462, 62, 9319, 2389, 47, 7, 52, 58, 66, 7131, 72, 11, 74, 10, 16, 4357, 52, 58, 66, 7131, 73, 11, 74, 10, 16, 4357, 69, 22564, 58, 66, 7131, 72, 11, 74, 10, 16, 4357, 69, 22564, 58, 66, 7131, 73, 11, 74, 10, 16, 4357, 50, 15, 58, 72, 11, 73, 4357, 32569, 30094, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 62, 22065, 58, 66, 7131, 72, 11, 73, 60, 796, 28462, 62, 8929, 7, 69, 22564, 58, 66, 7131, 72, 11, 74, 10, 16, 4357, 69, 22564, 58, 66, 7131, 73, 11, 74, 10, 16, 4357, 50, 58, 72, 11, 73, 12962, 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, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9464, 796, 685, 52, 58, 16, 7131, 437, 11, 74, 11208, 471, 58, 17, 7131, 437, 11, 74, 11208, 471, 58, 18, 7131, 437, 11, 74, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 9464, 796, 685, 69, 22564, 58, 16, 7131, 437, 11, 74, 11208, 28462, 58, 17, 7131, 437, 11, 74, 11208, 28462, 58, 18, 7131, 437, 11, 74, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 75, 796, 3509, 7, 32569, 30094, 62, 3258, 58, 16, 11, 74, 10, 16, 4357, 32569, 39492, 62, 16, 35, 7, 52, 62, 9464, 58, 16, 4357, 52, 62, 9464, 58, 17, 4357, 52, 62, 9464, 58, 18, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 9319, 47, 62, 22065, 58, 66, 60, 796, 28462, 62, 9319, 2389, 47, 7, 52, 58, 66, 7131, 16, 11, 74, 10, 16, 4357, 52, 62, 9464, 58, 66, 4357, 69, 22564, 58, 66, 7131, 16, 11, 74, 10, 16, 4357, 69, 62, 9464, 58, 66, 4357, 12, 15, 13, 20, 11, 32569, 30094, 62, 75, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 62, 8929, 47, 62, 22065, 58, 66, 60, 796, 28462, 62, 8929, 7, 69, 22564, 58, 66, 7131, 16, 11, 74, 10, 16, 4357, 69, 62, 9464, 58, 66, 4357, 12, 15, 13, 20, 8, 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, 471, 62, 9319, 796, 1976, 27498, 7, 18, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 60, 796, 2160, 32590, 37, 62, 9319, 62, 22065, 58, 66, 12962, 12, 37, 62, 9319, 47, 62, 22065, 58, 66, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 62, 9319, 58, 66, 60, 796, 471, 58, 66, 7131, 16, 11, 74, 10, 16, 48688, 28664, 9, 16, 14, 41, 9, 44, 75, 931, 62, 16340, 58, 16, 60, 9, 52, 62, 9319, 58, 66, 60, 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, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 62, 2926, 58, 66, 60, 796, 288, 83, 29006, 76, 62, 72, 9, 50033, 62, 73, 27493, 7, 37, 62, 9319, 47, 62, 22065, 58, 66, 45297, 37, 62, 8929, 47, 62, 22065, 58, 66, 12962, 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, 19090, 3149, 796, 15637, 62, 17143, 26933, 52, 62, 9319, 58, 16, 11208, 471, 62, 9319, 58, 17, 11208, 471, 62, 9319, 58, 18, 60, 4357, 47, 62, 2926, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 406, 62, 47, 58, 74, 60, 796, 949, 7, 43, 22065, 11, 43, 62, 47, 58, 74, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5678, 9529, 82, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2080, 15637, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9529, 82, 52, 58, 66, 7131, 45299, 74, 60, 796, 2160, 19510, 43, 7874, 16, 737, 9, 37, 62, 9319, 58, 66, 60, 532, 406, 15885, 37, 62, 8929, 58, 66, 4357, 67, 12078, 28, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 479, 1875, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9529, 82, 52, 58, 66, 7131, 16, 11, 74, 60, 15853, 357, 43, 62, 47, 58, 74, 12, 16, 45297, 16, 27493, 37, 62, 9319, 62, 47, 58, 66, 7131, 16, 60, 532, 406, 62, 47, 58, 74, 12, 16, 60, 9, 37, 62, 8929, 62, 47, 58, 66, 7131, 16, 60, 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, 9529, 82, 52, 58, 66, 7131, 16, 11, 74, 60, 15853, 532, 37, 62, 9319, 62, 47, 58, 66, 7131, 16, 60, 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, 611, 479, 1279, 509, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9529, 82, 52, 58, 66, 7131, 45, 10, 16, 11, 74, 60, 15853, 357, 43, 62, 47, 58, 74, 45297, 16, 27493, 37, 62, 9319, 62, 47, 58, 66, 7131, 17, 60, 532, 406, 62, 47, 58, 74, 60, 9, 37, 62, 8929, 62, 47, 58, 66, 7131, 17, 60, 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, 9529, 82, 52, 58, 66, 7131, 45, 10, 16, 11, 74, 60, 15853, 532, 37, 62, 9319, 62, 47, 58, 66, 7131, 17, 60, 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, 9529, 82, 52, 58, 66, 7131, 45299, 74, 60, 764, 28, 352, 14, 41, 9, 44, 75, 931, 62, 16340, 9, 81, 11994, 52, 58, 66, 7131, 45299, 74, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 9529, 82, 52, 198, 437, 198, 198, 8818, 9529, 82, 62, 2389, 3646, 322, 7, 52, 11, 42, 11, 45, 11, 44, 75, 931, 62, 16340, 11, 79, 11, 69, 22564, 11, 41, 8, 198, 220, 220, 220, 288, 16344, 87, 796, 357, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 4008, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 42, 9, 7, 45, 10, 16, 13219, 16, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 16344, 87, 58, 66, 7131, 72, 60, 796, 352, 14, 17, 9, 7, 69, 22564, 58, 66, 7131, 4666, 16, 7, 72, 10, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 60, 532, 28462, 58, 66, 7131, 4666, 16, 7, 72, 12, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 288, 16344, 87, 58, 16, 7131, 16, 60, 796, 352, 14, 17, 9, 7, 69, 22564, 58, 16, 7131, 17, 60, 532, 657, 13, 15, 8, 198, 220, 220, 220, 288, 16344, 87, 58, 17, 7131, 16, 60, 796, 352, 14, 17, 9, 7, 69, 22564, 58, 17, 7131, 17, 60, 532, 279, 43, 8, 198, 220, 220, 220, 288, 16344, 87, 58, 18, 7131, 16, 60, 796, 352, 14, 17, 9, 7, 69, 22564, 58, 18, 7131, 17, 60, 532, 657, 13, 15, 8, 198, 220, 220, 220, 288, 16344, 87, 58, 16, 7131, 437, 60, 796, 352, 14, 17, 9, 7, 15, 13, 15, 532, 28462, 58, 16, 7131, 437, 12, 16, 12962, 198, 220, 220, 220, 288, 16344, 87, 58, 17, 7131, 437, 60, 796, 352, 14, 17, 9, 7, 79, 49, 532, 28462, 58, 17, 7131, 437, 12, 16, 12962, 198, 220, 220, 220, 288, 16344, 87, 58, 18, 7131, 437, 60, 796, 352, 14, 17, 9, 7, 15, 13, 15, 532, 28462, 58, 18, 7131, 437, 12, 16, 12962, 628, 220, 220, 220, 31116, 796, 357, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 4008, 198, 220, 220, 220, 329, 1312, 796, 362, 25, 42, 9, 7, 45, 10, 16, 13219, 16, 198, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 22019, 81, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 72, 4357, 52, 58, 17, 7131, 72, 4357, 52, 58, 18, 7131, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 49, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 4666, 16, 7, 72, 10, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 4357, 52, 58, 17, 7131, 4666, 16, 7, 72, 10, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 4357, 52, 58, 18, 7131, 4666, 16, 7, 72, 10, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 9813, 30094, 62, 43, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 4666, 16, 7, 72, 12, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 4357, 52, 58, 17, 7131, 4666, 16, 7, 72, 12, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 4357, 52, 58, 18, 7131, 4666, 16, 7, 72, 12, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 288, 43, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 43, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 49, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 49, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31116, 58, 66, 7131, 72, 60, 796, 288, 43, 9, 7, 52, 58, 66, 7131, 4666, 16, 7, 72, 12, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 45297, 52, 58, 66, 7131, 72, 12962, 1343, 288, 49, 9, 7, 52, 58, 66, 7131, 4666, 16, 7, 72, 10, 16, 11, 42, 9, 7, 45, 10, 16, 4008, 45297, 52, 58, 66, 7131, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1312, 796, 352, 198, 220, 220, 220, 9813, 30094, 62, 22019, 81, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 16, 4357, 52, 58, 17, 7131, 16, 4357, 52, 58, 18, 7131, 16, 12962, 198, 220, 220, 220, 9813, 30094, 62, 49, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 17, 4357, 52, 58, 17, 7131, 17, 4357, 52, 58, 18, 7131, 17, 12962, 198, 220, 220, 220, 9813, 30094, 62, 43, 796, 9813, 39492, 62, 16, 35, 7, 81, 8873, 43, 11, 15, 13, 15, 11, 79, 43, 29006, 42063, 12, 16, 4008, 198, 220, 220, 220, 288, 43, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 43, 8, 198, 220, 220, 220, 288, 49, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 49, 8, 198, 220, 220, 220, 31116, 58, 16, 7131, 16, 60, 796, 288, 43, 9, 7, 81, 8873, 43, 12, 52, 58, 16, 7131, 16, 12962, 1343, 288, 49, 9, 7, 52, 58, 16, 7131, 17, 45297, 52, 58, 16, 7131, 16, 12962, 198, 220, 220, 220, 31116, 58, 17, 7131, 16, 60, 796, 288, 43, 9, 7, 15, 13, 15, 12, 52, 58, 17, 7131, 16, 12962, 1343, 288, 49, 9, 7, 52, 58, 17, 7131, 17, 45297, 52, 58, 17, 7131, 16, 12962, 198, 220, 220, 220, 31116, 58, 18, 7131, 16, 60, 796, 288, 43, 9, 7, 79, 43, 29006, 42063, 12, 16, 13219, 52, 58, 18, 7131, 16, 12962, 1343, 288, 49, 9, 7, 52, 58, 18, 7131, 17, 45297, 52, 58, 18, 7131, 16, 12962, 628, 220, 220, 220, 1303, 1312, 796, 886, 198, 220, 220, 220, 9813, 30094, 62, 22019, 81, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 437, 4357, 52, 58, 17, 7131, 437, 4357, 52, 58, 18, 7131, 437, 12962, 198, 220, 220, 220, 9813, 30094, 62, 49, 796, 9813, 39492, 62, 16, 35, 7, 81, 8873, 49, 11, 15, 13, 15, 11, 79, 49, 29006, 42063, 12, 16, 4008, 198, 220, 220, 220, 9813, 30094, 62, 43, 796, 9813, 39492, 62, 16, 35, 7, 52, 58, 16, 7131, 437, 12, 16, 4357, 52, 58, 17, 7131, 437, 12, 16, 4357, 52, 58, 18, 7131, 437, 12, 16, 12962, 198, 220, 220, 220, 288, 43, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 43, 8, 198, 220, 220, 220, 288, 49, 796, 352, 14, 17, 9, 9806, 7, 32569, 30094, 62, 22019, 81, 11, 32569, 30094, 62, 49, 8, 198, 220, 220, 220, 31116, 58, 16, 7131, 437, 60, 796, 288, 43, 9, 7, 52, 58, 16, 7131, 437, 12, 16, 45297, 52, 58, 16, 7131, 437, 12962, 1343, 288, 49, 9, 7, 81, 8873, 49, 12, 52, 58, 16, 7131, 437, 12962, 198, 220, 220, 220, 31116, 58, 17, 7131, 437, 60, 796, 288, 43, 9, 7, 52, 58, 17, 7131, 437, 12, 16, 45297, 52, 58, 17, 7131, 437, 12962, 1343, 288, 49, 9, 7, 15, 13, 15, 12, 52, 58, 17, 7131, 437, 12962, 198, 220, 220, 220, 31116, 58, 18, 7131, 437, 60, 796, 288, 43, 9, 7, 52, 58, 18, 7131, 437, 12, 16, 45297, 52, 58, 18, 7131, 437, 12962, 1343, 288, 49, 9, 7, 79, 49, 29006, 42063, 12, 16, 13219, 52, 58, 18, 7131, 437, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 9529, 82, 52, 796, 357, 87, 3784, 16, 14, 41, 9, 44, 75, 931, 62, 16340, 9, 87, 737, 7, 7874, 7568, 34350, 13, 10, 85, 2304, 8, 198, 220, 220, 220, 1441, 9529, 82, 52, 198, 437, 198, 198, 8818, 9529, 82, 62, 8929, 7, 52, 11, 42, 11, 45, 11, 44, 75, 931, 62, 16340, 11, 50, 11, 79, 11, 69, 22564, 11, 41, 8, 198, 220, 220, 220, 288, 16344, 87, 796, 357, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 828, 9107, 418, 7, 45, 10, 16, 11, 42, 4008, 198, 220, 220, 220, 329, 479, 796, 352, 25, 42, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 45, 10, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 14512, 474, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 16344, 87, 58, 66, 7131, 72, 11, 74, 60, 15853, 311, 58, 72, 11, 73, 60, 9, 7, 69, 22564, 58, 66, 7131, 72, 11, 74, 48688, 69, 22564, 58, 66, 7131, 73, 11, 74, 12962, 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, 886, 628, 220, 220, 220, 220, 220, 220, 220, 277, 30501, 796, 685, 15, 13, 15, 26, 79, 43, 26, 15, 13, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 277, 27912, 796, 685, 15, 13, 15, 26, 79, 49, 26, 15, 13, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1629, 20314, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 796, 352, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 43, 796, 357, 74, 1875, 352, 8, 5633, 28462, 58, 66, 7131, 437, 11, 74, 12, 16, 60, 1058, 277, 30501, 58, 66, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 49, 796, 357, 74, 1279, 509, 8, 5633, 28462, 58, 66, 7131, 16, 11, 74, 10, 16, 60, 220, 220, 1058, 277, 27912, 58, 66, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 16344, 87, 58, 66, 7131, 16, 11, 74, 60, 15853, 532, 16, 13, 15, 14, 17, 13, 15, 9, 7, 69, 22564, 58, 66, 7131, 16, 11, 74, 48688, 69, 43, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 16344, 87, 58, 66, 7131, 437, 11, 74, 60, 15853, 352, 13, 15, 14, 17, 13, 15, 9, 7, 69, 22564, 58, 66, 7131, 437, 11, 74, 48688, 69, 49, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 198, 220, 220, 220, 9529, 82, 52, 796, 357, 87, 3784, 12, 16, 14, 41, 9, 44, 75, 931, 62, 16340, 9, 87, 737, 7, 7568, 34350, 8, 198, 220, 220, 220, 1441, 9529, 82, 52, 198, 437, 628, 198, 2, 3862, 17413, 198, 1, 7575, 11812, 1, 198, 83, 796, 657, 13, 15, 198, 52, 796, 2824, 7, 52, 8, 198, 411, 52, 796, 685, 9107, 418, 7, 7857, 7, 87, 36911, 9107, 418, 7, 7857, 7, 87, 36911, 9107, 418, 7, 7857, 7, 87, 4008, 60, 198, 198, 2, 1303, 19530, 412, 18173, 198, 2, 981, 256, 1279, 309, 198, 2, 220, 220, 220, 220, 288, 83, 796, 657, 13, 18005, 198, 2, 220, 220, 220, 220, 9529, 82, 52, 796, 9529, 82, 62, 2389, 47, 7, 52, 11, 42, 11, 45, 11, 86, 80, 11, 50, 11, 50, 15, 11, 28664, 11, 44, 75, 931, 62, 16340, 8, 198, 2, 220, 220, 220, 220, 2488, 13, 471, 796, 471, 1343, 288, 83, 9, 81, 11994, 52, 198, 2, 220, 220, 220, 220, 3298, 256, 796, 256, 1343, 288, 83, 198, 2, 220, 220, 220, 220, 44872, 7203, 11297, 640, 720, 83, 351, 640, 2239, 2546, 720, 28664, 11, 290, 2457, 640, 720, 51, 4943, 198, 2, 886, 198, 198, 2, 569, 79, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 14993, 17257, 32590, 16, 11, 16, 11, 940, 4008, 14, 8898, 44, 198, 2, 1036, 7, 7857, 16193, 6200, 11, 6200, 828, 88, 2475, 82, 16193, 15, 11, 16, 13, 17, 828, 1455, 437, 28, 9562, 11, 4102, 263, 30757, 10394, 28, 16, 11, 4102, 364, 1096, 28, 17, 8, 198, 2, 458, 83, 796, 7110, 7, 53, 79, 9, 87, 11, 53, 79, 9, 52, 58, 16, 12962, 628, 198, 53, 79, 796, 410, 4066, 6327, 68, 62, 16, 35, 7, 45, 11, 14993, 17257, 32590, 16, 11, 16, 11, 940, 4008, 14, 8898, 44, 198, 2164, 7, 7857, 16193, 6200, 11, 6200, 828, 88, 2475, 82, 16193, 15, 11, 16, 13, 17, 828, 1455, 437, 28, 9562, 11, 4102, 263, 30757, 10394, 28, 16, 11, 4102, 364, 1096, 28, 17, 8, 198, 29487, 3419, 198, 198, 28664, 796, 657, 13, 18005, 198, 45, 20214, 796, 2558, 7, 51, 14, 28664, 8, 198, 31, 27908, 329, 1312, 796, 352, 25, 45, 20214, 198, 220, 220, 220, 9529, 82, 52, 796, 9529, 82, 62, 2389, 47, 7, 52, 11, 42, 11, 45, 11, 86, 80, 11, 50, 11, 50, 15, 11, 28664, 11, 44, 75, 931, 62, 16340, 8, 198, 220, 220, 220, 2488, 13, 471, 796, 471, 1343, 288, 83, 9, 81, 11994, 52, 198, 220, 220, 220, 3298, 256, 796, 256, 1343, 288, 83, 198, 220, 220, 220, 44872, 7203, 11297, 640, 720, 83, 351, 640, 2239, 2546, 720, 28664, 11, 290, 2457, 640, 720, 51, 4943, 220, 220, 198, 220, 220, 220, 611, 1312, 4064, 24984, 41358, 23428, 6624, 657, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 7110, 7, 53, 79, 9, 87, 11, 53, 79, 9, 52, 58, 16, 12962, 198, 220, 220, 220, 886, 198, 437, 790, 24984, 41358, 23428, 628 ]
1.58513
9,321
# apply is operations over substitution #include("primitives.jl") """ apply substitution to a term, substitution """ function apply(vars::Vlist, sym::Number, subst::Tlist) return sym end function apply(vars::Vlist, sym::Symbol, subst::Tlist) for i in 1:length(vars) if sym == vars[i]; return subst[i] end end return sym end """ apply: ΣxΣ → Σ """ function apply(vars::Vlist, subst1::Tlist, subst2::Tlist) nterm = [] for arg in subst1 narg = apply(vars, arg, subst2) if isempty(nterm) nterm = [narg] elseif ndims(subst1) == 1 nterm = vcat(nterm, [narg]) else nterm = hcat(nterm, [narg]) end end nterm end function apply(vars::Vlist, term::Expr, subst::Tlist) nterm = deepcopy(term) for i in 1:length(term.args) arg = term.args[i] narg = apply(vars, arg, subst) nterm.args[i] = narg end nterm end """ apply sigma2 to sigma1 simply make v<-t in σ1 to v<-t*σ2 """ function apply2(vars::Vlist, σ1::Tlist, σ2::Tlist) map(s->apply(vars, s, σ2), σ1) end
[ 2, 4174, 318, 4560, 625, 32097, 198, 198, 2, 17256, 7203, 19795, 20288, 13, 20362, 4943, 198, 198, 37811, 198, 39014, 32097, 284, 257, 3381, 11, 32097, 198, 37811, 198, 8818, 4174, 7, 85, 945, 3712, 53, 4868, 11, 5659, 3712, 15057, 11, 3293, 3712, 51, 4868, 8, 198, 1441, 5659, 198, 437, 198, 198, 8818, 4174, 7, 85, 945, 3712, 53, 4868, 11, 5659, 3712, 13940, 23650, 11, 3293, 3712, 51, 4868, 8, 198, 329, 1312, 287, 352, 25, 13664, 7, 85, 945, 8, 198, 220, 611, 5659, 6624, 410, 945, 58, 72, 11208, 1441, 3293, 58, 72, 60, 886, 198, 886, 198, 1441, 5659, 198, 437, 198, 198, 37811, 198, 39014, 25, 7377, 96, 87, 138, 96, 15168, 7377, 96, 198, 37811, 198, 8818, 4174, 7, 85, 945, 3712, 53, 4868, 11, 3293, 16, 3712, 51, 4868, 11, 3293, 17, 3712, 51, 4868, 8, 198, 299, 4354, 796, 17635, 198, 329, 1822, 287, 3293, 16, 198, 220, 299, 853, 796, 4174, 7, 85, 945, 11, 1822, 11, 3293, 17, 8, 198, 220, 611, 318, 28920, 7, 77, 4354, 8, 198, 220, 220, 299, 4354, 796, 685, 77, 853, 60, 198, 220, 2073, 361, 299, 67, 12078, 7, 7266, 301, 16, 8, 6624, 352, 198, 220, 220, 220, 220, 299, 4354, 796, 410, 9246, 7, 77, 4354, 11, 685, 77, 853, 12962, 198, 220, 2073, 198, 220, 220, 220, 220, 299, 4354, 796, 289, 9246, 7, 77, 4354, 11, 685, 77, 853, 12962, 198, 220, 886, 198, 886, 198, 299, 4354, 198, 437, 198, 198, 8818, 4174, 7, 85, 945, 3712, 53, 4868, 11, 3381, 3712, 3109, 1050, 11, 3293, 3712, 51, 4868, 8, 198, 299, 4354, 796, 2769, 30073, 7, 4354, 8, 198, 329, 1312, 287, 352, 25, 13664, 7, 4354, 13, 22046, 8, 198, 220, 1822, 796, 3381, 13, 22046, 58, 72, 60, 198, 220, 299, 853, 796, 4174, 7, 85, 945, 11, 1822, 11, 3293, 8, 198, 220, 299, 4354, 13, 22046, 58, 72, 60, 796, 299, 853, 198, 886, 198, 299, 4354, 198, 437, 198, 198, 37811, 198, 39014, 264, 13495, 17, 284, 264, 13495, 16, 198, 14323, 2145, 787, 410, 27, 12, 83, 287, 18074, 225, 16, 284, 410, 27, 12, 83, 9, 38392, 17, 198, 37811, 198, 8818, 4174, 17, 7, 85, 945, 3712, 53, 4868, 11, 18074, 225, 16, 3712, 51, 4868, 11, 18074, 225, 17, 3712, 51, 4868, 8, 198, 220, 3975, 7, 82, 3784, 39014, 7, 85, 945, 11, 264, 11, 18074, 225, 17, 828, 18074, 225, 16, 8, 198, 437, 628 ]
2.364929
422
# Laplace distribution export Laplace @parameterized Laplace() ≪ (1/2) * Lebesgue(ℝ) for N in AFFINEPARS @eval begin proxy(d::Laplace{$N}) = affine(params(d), Laplace()) logdensity(d::Laplace{$N}, x) = logdensity(proxy(d), x) basemeasure(d::Laplace{$N}) = basemeasure(proxy(d)) end end # @affinepars Laplace function logdensity(d::Laplace{()} , x) return -abs(x) end Base.rand(rng::AbstractRNG, μ::Laplace{()}) = rand(rng, Dists.Laplace()) ≪(::Laplace, ::Lebesgue{X}) where X <: Real = true TV.as(::Laplace) = asℝ distproxy(::Laplace{()}) = Dists.Laplace() distproxy(d::Laplace{(:μ,)}) = Dists.Laplace(d.μ, 1.0) distproxy(d::Laplace{(:σ,)}) = Dists.Laplace(0.0, d.σ) distproxy(d::Laplace{(:μ,:σ)}) = Dists.Laplace(d.μ, d.σ) distproxy(d::Laplace{(:ω,)}) = Dists.Laplace(0.0, inv(d.ω)) distproxy(d::Laplace{(:μ,:ω)}) = Dists.Laplace(d.μ, inv(d.ω))
[ 198, 2, 4689, 5372, 6082, 198, 198, 39344, 4689, 5372, 198, 198, 31, 17143, 2357, 1143, 4689, 5372, 3419, 15139, 103, 357, 16, 14, 17, 8, 1635, 1004, 12636, 18701, 7, 158, 226, 251, 8, 198, 198, 1640, 399, 287, 317, 5777, 8881, 27082, 50, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 15741, 7, 67, 3712, 14772, 5372, 90, 3, 45, 30072, 796, 1527, 500, 7, 37266, 7, 67, 828, 4689, 5372, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 43337, 7, 67, 3712, 14772, 5372, 90, 3, 45, 5512, 2124, 8, 796, 2604, 43337, 7, 36436, 7, 67, 828, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1615, 34755, 5015, 7, 67, 3712, 14772, 5372, 90, 3, 45, 30072, 796, 1615, 34755, 5015, 7, 36436, 7, 67, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 2488, 2001, 500, 79, 945, 4689, 5372, 628, 198, 8818, 2604, 43337, 7, 67, 3712, 14772, 5372, 90, 3419, 92, 837, 2124, 8, 198, 220, 220, 220, 1441, 532, 8937, 7, 87, 8, 198, 437, 198, 198, 14881, 13, 25192, 7, 81, 782, 3712, 23839, 49, 10503, 11, 18919, 3712, 14772, 5372, 90, 3419, 30072, 796, 43720, 7, 81, 782, 11, 360, 1023, 13, 14772, 5372, 28955, 198, 198, 35705, 103, 7, 3712, 14772, 5372, 11, 7904, 43, 1765, 274, 18701, 90, 55, 30072, 810, 1395, 1279, 25, 6416, 796, 2081, 198, 198, 6849, 13, 292, 7, 3712, 14772, 5372, 8, 796, 355, 158, 226, 251, 198, 198, 17080, 36436, 7, 3712, 14772, 5372, 90, 3419, 30072, 796, 360, 1023, 13, 14772, 5372, 3419, 198, 17080, 36436, 7, 67, 3712, 14772, 5372, 90, 7, 25, 34703, 35751, 30072, 796, 360, 1023, 13, 14772, 5372, 7, 67, 13, 34703, 11, 352, 13, 15, 8, 198, 17080, 36436, 7, 67, 3712, 14772, 5372, 90, 7, 25, 38392, 35751, 30072, 796, 360, 1023, 13, 14772, 5372, 7, 15, 13, 15, 11, 288, 13, 38392, 8, 198, 17080, 36436, 7, 67, 3712, 14772, 5372, 90, 7, 25, 34703, 11, 25, 38392, 8, 30072, 796, 360, 1023, 13, 14772, 5372, 7, 67, 13, 34703, 11, 288, 13, 38392, 8, 198, 17080, 36436, 7, 67, 3712, 14772, 5372, 90, 7, 25, 49535, 35751, 30072, 796, 360, 1023, 13, 14772, 5372, 7, 15, 13, 15, 11, 800, 7, 67, 13, 49535, 4008, 198, 17080, 36436, 7, 67, 3712, 14772, 5372, 90, 7, 25, 34703, 11, 25, 49535, 8, 30072, 796, 360, 1023, 13, 14772, 5372, 7, 67, 13, 34703, 11, 800, 7, 67, 13, 49535, 4008, 198 ]
2.071926
431
#---------------------------------------- #-- Import or declare all the tools and types #-- to represent a taxi problem and its solutions #---------------------------------------- typealias Network DiGraph typealias Road Edge # Implementations of Networks must have a "graph" element, #and "ShortestPath" object, "generateCustomers" and "generateTaxis" methods. immutable Customer id::Int orig::Int dest::Int tcall::Int tmin::Int tmaxt::Int tmax::Int price::Float64 end immutable Taxi id::Int initPos::Int end #------------------------ #-- TaxiProblem: All data needed for simulation #-- has to include: #---- network::Network (graph of city) #---- roadTime::SparseMatrixCSC{Int,Int} Time to cross a road #---- roadCost::SparseMatrixCSC{Float64,Int} Cost to cross a road #---- custs::Array{Customer,1} (customers) #---- taxis::Array{Taxi,1} (taxis) #---- nTime::Int number of timesteps #---- waitingCost::Float64 cost of waiting #---- sp::ShortPaths Shortest paths (time, cost and structure) abstract TaxiProblem #Represent the assignement of a customer #taxi == 0 <=> unassigned immutable CustomerAssignment id::Int timeIn::Int timeOut::Int end #Represent the actions of a taxi during a simulation #at each time, the road on which the taxi is, and the __ordered__ list of its #taken customers immutable TaxiActions path::Vector{Edge} custs::Vector{ CustomerAssignment} #customer in order: (id, pickup, dropoff) end #Represent the solution of a simulation (paths of taxis, customers, and cost) immutable TaxiSolution taxis::Array{TaxiActions, 1} notTaken::BitVector cost::Float64 end immutable ShortPaths traveltime::Array{Float64,2} travelcost::Array{Float64,2} previous::Array{Int,2} end ShortPaths() = ShortPaths( Array(Float64, (0,0)), Array(Float64, (0,0)), Array(Int, (0,0))) immutable RealPaths previous::Array{Int,2} traveltime::Array{Float64,2} real_destinations::Array{Int, 2} end # define heap entry data type immutable DijkstraEntry{Float64} vertex::Int dist::Float64 cost::Float64 end # define appropriate comparators for heap entries <(e1::DijkstraEntry, e2::DijkstraEntry) = e1.dist < e2.dist Base.isless(e1::DijkstraEntry, e2::DijkstraEntry) = e1.dist < e2.dist #Represent an assigned customer (not fixed time-windows) type AssignedCustomer id::Int tInf::Int tSup::Int end #represent a time-window solution type IntervalSolution custs::Vector{Vector{AssignedCustomer}} notTaken::BitVector cost::Float64 end
[ 2, 3880, 982, 198, 2, 438, 17267, 393, 13627, 477, 262, 4899, 290, 3858, 198, 2, 438, 220, 284, 2380, 257, 17536, 1917, 290, 663, 8136, 198, 2, 3880, 982, 198, 198, 4906, 26011, 7311, 220, 220, 6031, 37065, 198, 4906, 26011, 5567, 220, 220, 220, 220, 220, 13113, 198, 198, 2, 48282, 602, 286, 27862, 1276, 423, 257, 366, 34960, 1, 5002, 11, 198, 2, 392, 366, 16438, 395, 15235, 1, 2134, 11, 366, 8612, 378, 15022, 364, 1, 290, 366, 8612, 378, 51, 22704, 1, 5050, 13, 198, 198, 8608, 18187, 22092, 198, 220, 4686, 3712, 5317, 198, 220, 1796, 3712, 5317, 198, 220, 2244, 3712, 5317, 198, 220, 256, 13345, 3712, 5317, 198, 220, 256, 1084, 3712, 5317, 198, 220, 256, 2611, 742, 3712, 5317, 198, 220, 256, 9806, 3712, 5317, 198, 220, 2756, 3712, 43879, 2414, 198, 437, 198, 198, 8608, 18187, 49227, 198, 220, 4686, 3712, 5317, 198, 220, 2315, 21604, 3712, 5317, 198, 437, 198, 198, 2, 22369, 198, 2, 438, 49227, 40781, 25, 1439, 1366, 2622, 329, 18640, 198, 2, 438, 468, 284, 2291, 25, 198, 2, 650, 3127, 3712, 26245, 357, 34960, 286, 1748, 8, 198, 2, 650, 2975, 7575, 3712, 50, 29572, 46912, 34, 6173, 90, 5317, 11, 5317, 92, 3862, 284, 3272, 257, 2975, 198, 2, 650, 2975, 13729, 3712, 50, 29572, 46912, 34, 6173, 90, 43879, 2414, 11, 5317, 92, 6446, 284, 3272, 257, 2975, 198, 2, 650, 9378, 82, 3712, 19182, 90, 44939, 11, 16, 92, 357, 23144, 364, 8, 198, 2, 650, 45049, 3712, 19182, 90, 27017, 72, 11, 16, 92, 357, 19290, 271, 8, 198, 2, 650, 299, 7575, 3712, 5317, 1271, 286, 4628, 395, 25386, 198, 2, 650, 4953, 13729, 3712, 43879, 2414, 1575, 286, 4953, 198, 2, 650, 599, 3712, 16438, 15235, 82, 10073, 395, 13532, 357, 2435, 11, 1575, 290, 4645, 8, 198, 198, 397, 8709, 49227, 40781, 198, 198, 2, 40171, 262, 8333, 972, 286, 257, 6491, 198, 2, 19290, 72, 6624, 657, 1279, 14804, 555, 562, 3916, 198, 8608, 18187, 22092, 8021, 16747, 198, 220, 4686, 3712, 5317, 198, 220, 640, 818, 3712, 5317, 198, 220, 640, 7975, 3712, 5317, 198, 437, 198, 198, 2, 40171, 262, 4028, 286, 257, 17536, 1141, 257, 18640, 198, 2, 265, 1123, 640, 11, 262, 2975, 319, 543, 262, 17536, 318, 11, 290, 262, 11593, 24071, 834, 1351, 286, 663, 198, 2, 83, 1685, 4297, 198, 8608, 18187, 49227, 32, 2733, 198, 220, 3108, 3712, 38469, 90, 37021, 92, 198, 220, 9378, 82, 3712, 38469, 90, 22092, 8021, 16747, 92, 1303, 23144, 263, 287, 1502, 25, 357, 312, 11, 19422, 11, 4268, 2364, 8, 198, 437, 198, 198, 2, 40171, 262, 4610, 286, 257, 18640, 357, 6978, 82, 286, 45049, 11, 4297, 11, 290, 1575, 8, 198, 8608, 18187, 49227, 46344, 198, 220, 45049, 3712, 19182, 90, 27017, 72, 32, 2733, 11, 352, 92, 198, 220, 407, 51, 1685, 3712, 13128, 38469, 198, 220, 1575, 3712, 43879, 2414, 198, 437, 198, 198, 8608, 18187, 10073, 15235, 82, 198, 220, 3067, 2435, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 198, 220, 3067, 15805, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 198, 220, 2180, 3712, 19182, 90, 5317, 11, 17, 92, 198, 437, 198, 198, 16438, 15235, 82, 3419, 796, 10073, 15235, 82, 7, 15690, 7, 43879, 2414, 11, 357, 15, 11, 15, 36911, 15690, 7, 43879, 2414, 11, 357, 15, 11, 15, 36911, 15690, 7, 5317, 11, 357, 15, 11, 15, 22305, 198, 198, 8608, 18187, 6416, 15235, 82, 198, 220, 2180, 3712, 19182, 90, 5317, 11, 17, 92, 198, 220, 3067, 2435, 3712, 19182, 90, 43879, 2414, 11, 17, 92, 198, 220, 1103, 62, 16520, 7352, 3712, 19182, 90, 5317, 11, 362, 92, 198, 437, 198, 198, 2, 8160, 24575, 5726, 1366, 2099, 198, 8608, 18187, 360, 45961, 12044, 30150, 90, 43879, 2414, 92, 198, 220, 37423, 3712, 5317, 198, 220, 1233, 3712, 43879, 2414, 198, 220, 1575, 3712, 43879, 2414, 198, 437, 198, 198, 2, 8160, 5035, 4616, 2024, 329, 24575, 12784, 198, 27, 7, 68, 16, 3712, 35, 45961, 12044, 30150, 11, 304, 17, 3712, 35, 45961, 12044, 30150, 8, 796, 304, 16, 13, 17080, 1279, 304, 17, 13, 17080, 198, 14881, 13, 271, 1203, 7, 68, 16, 3712, 35, 45961, 12044, 30150, 11, 304, 17, 3712, 35, 45961, 12044, 30150, 8, 796, 304, 16, 13, 17080, 1279, 304, 17, 13, 17080, 198, 198, 2, 40171, 281, 8686, 6491, 357, 1662, 5969, 640, 12, 28457, 8, 198, 4906, 2195, 3916, 44939, 198, 220, 4686, 3712, 5317, 198, 220, 256, 18943, 3712, 5317, 198, 220, 256, 40784, 3712, 5317, 198, 437, 198, 198, 2, 15603, 257, 640, 12, 17497, 4610, 198, 4906, 4225, 2100, 46344, 198, 220, 9378, 82, 3712, 38469, 90, 38469, 90, 8021, 3916, 44939, 11709, 198, 220, 407, 51, 1685, 3712, 13128, 38469, 198, 220, 1575, 3712, 43879, 2414, 198, 437, 198 ]
3.091021
813
<filename>julia-programming/6-control-flow/short-circuit-evaluation.jl conTRUE() = (println("Condition is evaluated and is TRUE"); true) conFALSE() = (println("Condition is evaluated and is FALSE"); false) # Short Circuit && conTRUE() && conTRUE() conTRUE() && conFALSE() conFALSE() && conTRUE() conFALSE() && conFALSE() # Short Circuit || conTRUE() || conTRUE() conTRUE() || conFALSE() conFALSE() || conTRUE() conFALSE() || conFALSE() # Ternary x = 5 x >= 0 || println("x less than 0") x = -1 x >= 0 || println("x less than 0")
[ 27, 34345, 29, 73, 43640, 12, 23065, 2229, 14, 21, 12, 13716, 12, 11125, 14, 19509, 12, 21170, 5013, 12, 18206, 2288, 13, 20362, 198, 1102, 5446, 8924, 3419, 796, 357, 35235, 7203, 48362, 318, 16726, 290, 318, 26751, 15341, 2081, 8, 198, 1102, 37, 23719, 3419, 796, 357, 35235, 7203, 48362, 318, 16726, 290, 318, 26563, 15341, 3991, 8, 198, 198, 2, 10073, 13588, 11405, 198, 1102, 5446, 8924, 3419, 11405, 369, 5446, 8924, 3419, 198, 1102, 5446, 8924, 3419, 11405, 369, 37, 23719, 3419, 198, 1102, 37, 23719, 3419, 11405, 369, 5446, 8924, 3419, 198, 1102, 37, 23719, 3419, 11405, 369, 37, 23719, 3419, 198, 198, 2, 10073, 13588, 8614, 198, 1102, 5446, 8924, 3419, 8614, 369, 5446, 8924, 3419, 198, 1102, 5446, 8924, 3419, 8614, 369, 37, 23719, 3419, 198, 1102, 37, 23719, 3419, 8614, 369, 5446, 8924, 3419, 198, 1102, 37, 23719, 3419, 8614, 369, 37, 23719, 3419, 198, 198, 2, 309, 1142, 560, 198, 198, 87, 796, 642, 198, 87, 18189, 657, 8614, 44872, 7203, 87, 1342, 621, 657, 4943, 198, 198, 87, 796, 532, 16, 198, 87, 18189, 657, 8614, 44872, 7203, 87, 1342, 621, 657, 4943 ]
2.761658
193
<filename>src/ZirconAge/ZirconAges.jl module ZirconAges # Julia translation of a R-script provided by <NAME> & <NAME> to compute zircon ages from Tt paths # Used in the Nat. Comm. publication "Estimating the current size and state of subvolcanic magma reservoirs" # 15/04/2022, <NAME> & <NAME> import Base.Threads using Parameters using Loess, Statistics, StatsBase, KernelDensity, Loess export ZirconAgeData, compute_zircon_age_PDF, compute_zircons_Ttpath, # calculation routines zircon_age_PDF, compute_zircons_convert_vecs2mat """ Declare function to calculate zircon fraction as function of a temperature profile """ function zircon_fraction(T::AbstractArray{_T}, max_x_zr::_T) where _T A = (1.62.-1.8*(10^4)*exp.((-10^4)./(T .+ 273.15))).*max_x_zr A[A .<= 0.0] .= 0.0 return A end """ ZirconAgeData Struct that holds default parameters for the calculations """ @with_kw_noshow struct ZirconAgeData Tsat::Float64 = 825.0 # Maximum zircon saturation temperature [C] Tmin::Float64 = 690.0 # [C] Minimum zircon saturation Temperature [C] Tsol::Float64 = 690.0 # [C] Solidus temperature [C] Tcal_max::Float64 = 800.0 # max temperature to calculate zircon fraction Tcal_step::Float64 = 1.0 # temperature step to caclulate zircon fraction (resolution of Zircon saturation curve discretization) max_x_zr::Float64 = 0.001 # max fraction zircons at solidus zircon_number::Int64 = 100.0 # number of required zircons time_zr_growth::Float64 = 0.7e6 # Minimum time within T saturation range (This is what the method used in the R script, boils down too) # -> remain in the Zr saturation zone more than 1/3 of the time the Tt path with the longest time in the saturation zone end """ Loess fit of zircon number over saturation range """ function loess_fit_zircon_sat(ZirconData::ZirconAgeData) @unpack Tsol, Tcal_step, Tcal_max, Tsat, max_x_zr, zircon_number, Tmin = ZirconData # Get cumulative Zircon fraction (after Tierney et al., 2016; Geology) T = range(Tsol, stop = Tcal_max, step = Tcal_step ) Tfit = range(Tsol, stop = Tsat, length = length(T)) x_zircon = zircon_fraction(T,max_x_zr) # compute zircon fraction n_zircon = zero(x_zircon) # number of zircons n_zircon[2:end] = -diff(x_zircon) # differentiate zircon fraction n_zircon[1] = n_zircon[2] # set first value n_zircon = ceil.(( (n_zircon*zircon_number)/maximum(n_zircon)).-minimum(floor.((n_zircon*zircon_number)/maximum(n_zircon)))) # fit n_zircon_N with loess regression n_zircon_N_fit = loess(Tfit, n_zircon, span=1.0) return n_zircon_N_fit end """ This employs a loess fit function to compute the number of zircons for each of the Tt paths """ function compute_number_zircons!(n_zr::AbstractArray{_T,N}, Tt_paths_Temp::AbstractArray{_T,N}, ZirconData::ZirconAgeData) where {_T,N} @unpack Tmin, Tsat, Tsol = ZirconData n_zircon_N_fit = loess_fit_zircon_sat(ZirconData) # loess fit through zircon saturation Threads.@threads for i in 1:size(Tt_paths_Temp,2) for j in 1:size(Tt_paths_Temp,1) T = Tt_paths_Temp[j,i] if (T > Tsol) & (T < Tsat) # The following line takes a lot of time, because Loess is not type-stable. # There is an open PR in the package that may fix it dat::_T = Loess.predict(n_zircon_N_fit, T) n_zr[j,i] = floor(dat) else n_zr[j,i] = 0.0 end end end nothing end """ prob, ages_eruptible, number_zircons, T_av_time, T_sd_time compute_zircons_Ttpath(time_years::AbstractArray{Float64,1}, Tt_paths_Temp::AbstractArray{Float64,2}; ZirconData::ZirconAgeData) This computes the number of zircons produced from a series of temperature-time path's. The Tt-paths are stored in a 2D matrix `Tt_paths_Temp` with rows being the temperature at time `time_years`. Input: ==== - `time_years` : vector of length `nt` with the time in years (since the beginning of the simulation) of the points provided - `Tt_paths_Temp` : array of size `(nt,npaths)`` with the temperature of every path. Output: - `prob` : a vector that gives the relative probability that a zircon with a given age exists - `ages_eruptible` : age of eruptble magma - `number_zircons` : 2D array of size `(nt,)` - `T_av_time`: vector of size `nt` that contains the average T of the paths - `T_sd_time`: vector of size `nt` that contains the standard deviation of the T of the paths This routine was developed based on an R-routine provided as electronic supplement in the paper: - <NAME>., <NAME>., <NAME>., <NAME>., 2020. Determining the current size and state of subvolcanic magma reservoirs. Nat Commun 11, 5477. https://doi.org/10.1038/s41467-020-19084-2 """ function compute_zircons_Ttpath(time_years::AbstractArray{_T,1}, Tt_paths_Temp::AbstractArray{_T,2}; ZirconData::ZirconAgeData = ZirconAgeData()) where _T @unpack Tmin, Tsat, Tsol, time_zr_growth = ZirconData Tt_paths_Temp1 = copy(Tt_paths_Temp) Δt = diff(time_years)[1] # timestep [yrs] time_er_min = maximum(time_years) # backward count # find all the Tt paths that go through the zircon saturation range & are at the end of the path still below Tsat (otherwise Zr are not yet crystallized) ID_col_er = findall( (maximum(Tt_paths_Temp1,dims=1).>Tmin) .& (Tt_paths_Temp1[end,:]' .< Tsat)) n_zr = zero(Tt_paths_Temp1) compute_number_zircons!(n_zr, Tt_paths_Temp1, ZirconData) # computes the number of zircons for every path # find the number of timesteps for every path, during which the temperature is > Tmin and < Tsat length_trace = Vector{Float64}(undef,length(ID_col_er)) for i in 1:length(ID_col_er) length_trace[i] = length( findall( (Tt_paths_Temp1[:,ID_col_er[i][2]] .> Tmin) .& (Tt_paths_Temp1[:,ID_col_er[i][2]] .< Tsat)) ) end # the next several lines can likely be achieved in a more elegant way... id = findall( length_trace .== maximum(length_trace)) ID_col_lgst_tr = ID_col_er[ id[1] ][2] id = findall( Tt_paths_Temp1[:,ID_col_lgst_tr] .< Tsat) VALID_min_time = findmin( Tt_paths_Temp1[id,ID_col_lgst_tr]) ID_min_time = VALID_min_time[2] max_age_spread = maximum(length_trace)*Δt # This is defined among all selected paths T_av_time_1 = replace!(Tt_paths_Temp1, 0.0 => NaN) T_av_time = zeros(size(T_av_time_1,1)) T_sd_time = zeros(size(T_av_time_1,1)) # get the average temperature of the Tt paths and the standard deviation for i in 1:size(Tt_paths_Temp1,1) T_av_time[i] = mean(filter(!isnan, T_av_time_1[i,:])) T_sd_time[i] = std(filter( !isnan, T_av_time_1[i,:])) end # I clarified the R function because the minimum step length to grow a zircon is simply a ratio of the maximum trace between Tmin and Tsol # This makes sense as we only deal with fractions here. Because no mass is provided the real zircon size cannot possibly be determined min_step_n = floor( (time_zr_growth/max_age_spread)*(max_age_spread/Δt) ) # find the Tt paths that have a number of timesteps in the saturation range greater than the defined min_step_n () # this is to mimic that it takes some time to grow zircons id = findall( length_trace .> min_step_n) if isempty(id) max_Ptpath = maximum(length_trace)*Δt error("I don't have a single Pt-path that is sufficiently long within time_zr_growth (=$(time_zr_growth) yrs). The Longest Pt-path I have is $(max_Ptpath) years. Decrease this value within the ZirconDataAge struct with ZirconData=ZirconAgeData(time_zr_growth=0.1e6) & rerun.") end ID_col_er_1 = getindex.(ID_col_er[id], [2]) int_zr_sat = collect(Float64, ID_min_time:1.0:(time_er_min/Δt)-min_step_n) int_zr_sat = floor.(Int64,int_zr_sat) T_av_time_slct = Vector{Float64}(undef,length(int_zr_sat)-1) .= 0.0 for i in 1:(size(int_zr_sat,1)-1) id2 = ID_col_er_1[ findall( (Tt_paths_Temp1[int_zr_sat[i],ID_col_er_1[:]] .> Tmin) .& (Tt_paths_Temp1[int_zr_sat[i],ID_col_er_1[:]] .< Tsat)) ] if isempty(id2) == true T_av_time_slct[i] = NaN else T_av_time_slct[i] = median(filter(!isnan, Tt_paths_Temp1[int_zr_sat[i],id2])) end end replace!(Tt_paths_Temp1, NaN => 0.0) ID_col_er = getindex.(ID_col_er, [2]) for i in 1:length(ID_col_er) ind = findall( (Tt_paths_Temp1[:,ID_col_er[i]]) .== 0.0 ); if ~isempty(ind) k = maximum(ind) Tt_paths_Temp1[1:k,ID_col_er[i]] .= 0.0 end end zr_select = zero(Tt_paths_Temp1) zr_select[Tt_paths_Temp1 .> 0.0] .= 1.0 n_zrc2_0 = zr_select.*n_zr # filters out those Tt path that are still >Tsat @ the end number_zircons = n_zrc2_0[:,ID_col_er_1]; n_measurable_ages = sum(number_zircons, dims=2) sz = size(number_zircons,1) ages_eruptible = collect(Float64, 1.0:Δt:sz*Δt) # probability that a certain zircon is sampled, dependens on how many of a given age ara available: prob = n_measurable_ages/sum(n_measurable_ages) prob = prob[:,1] return prob, ages_eruptible, number_zircons, T_av_time, T_sd_time end """ time_years, prob, ages_eruptible, number_zircons, T_av_time, T_sd_time = compute_zircons_Ttpath(time_years::Vector{Vector{Float64}}, Tt_paths_Temp::Vector{Vector{Float64}}; ZirconData::ZirconAgeData = ZirconAgeData()) This accepts Vector{Vector} as input for time and temperature of each Tt-path. Here, the length of the vector can be variable between different points. Internally, we interpolate this into a 2D matrix and a longer vector that includes all paths and a single vector with times """ function compute_zircons_Ttpath(time_years_vecs::Vector{Vector{_T}}, Tt_paths_Temp_vecs::Vector{Vector{_T}}; ZirconData::ZirconAgeData = ZirconAgeData()) where _T # convert to a vector with time & matrix with T values at every timestep time_years, Tt_paths_Temp = compute_zircons_convert_vecs2mat(time_years_vecs, Tt_paths_Temp_vecs) # call main routine prob, ages_eruptible, number_zircons, T_av_time, T_sd_time = compute_zircons_Ttpath(time_years, Tt_paths_Temp, ZirconData=ZirconData) # return, including time_years return time_years, prob, ages_eruptible, number_zircons, T_av_time, T_sd_time end """ time_years, Ttpaths_mat = compute_zircons_convert_vecs2mat(time_years_vecs::Vector{Vector{Float64}}, Tt_paths_Temp_vecs::Vector{Vector{Float64}}) This converts a vector with Vectors contain time and temperature path's to a single time vector and a matrix that combines all vectors """ function compute_zircons_convert_vecs2mat(time_years_vecs::Vector{Vector{_T}}, Tt_paths_Temp_vecs::Vector{Vector{_T}}) where _T # Create a single vector with the time values: time_years = unique(reduce(vcat,unique(time_years_vecs))); # Add the vectors to an array with T values Tt_paths_mat = zeros(_T,length(time_years), length(Tt_paths_Temp_vecs)) for i in eachindex(Tt_paths_Temp_vecs) istart = findall(time_years .== time_years_vecs[i][1]) iend = findall(time_years .== time_years_vecs[i][end]) Tt_paths_mat[istart[1]:iend[1], i] .= Tt_paths_Temp_vecs[i] end return time_years, Tt_paths_mat end """ zircon_age_PDF(ages_eruptible::AbstractArray{Float64,1}, number_zircons::AbstractArray{Float64,2}, bandwidth=1e5, n_analyses=300) Compute probability density functions for zircon age path's describes in `number_zircons` with age `ages_eruptible` (both computed ). `bandwidth` is the smoothening window of the resulting curves (in years), whereas `n_analyses` are the number of analyses done. """ function zircon_age_PDF(ages_eruptible::AbstractArray{_T,1}, number_zircons::AbstractArray{_T,2}; bandwidth=1e5, n_analyses=300) where _T # compute PDF for each of the zircon Tt-paths: PDF_zircons = [] time_Ma = []; for i in 1:size(number_zircons,2) n_meas = number_zircons[:,i] px = n_meas/sum(n_meas) # probability to have a certain age # random numbers selected according to the probability smp = sample( (maximum(ages_eruptible) .- ages_eruptible)/1e6, Weights(px), n_analyses, replace=true) y = kde(smp, bandwidth=bandwidth/1e6) # store data push!(PDF_zircons, y.density) push!(time_Ma, y.x) end n_measurable_ages = sum(number_zircons, dims=2) pxAv = n_measurable_ages[:,1]./sum(n_measurable_ages[:,1]) smpAv = sample( (maximum(ages_eruptible) .- ages_eruptible)/1e6, Weights(pxAv), n_analyses, replace=true) yAv = kde(smpAv, bandwidth=bandwidth/1e6) time_Ma_average = Vector(yAv.x); PDF_zircon_average = Vector(yAv.density); return time_Ma, PDF_zircons, time_Ma_average, PDF_zircon_average end """ time_Ma, PDF_zircons, time_Ma_average, PDF_zircon_average, time_years, prob, ages_eruptible, number_zircons, T_av_time, T_sd_time = compute_zircon_age_PDF(time_years_vecs::Vector{Vector}, Tt_paths_Temp_vecs::Vector{Vector}; ZirconData::ZirconAgeData = ZirconAgeData(), bandwidth=bandwidth, n_analyses=300) This computes the PDF (probability density function) with zircon age data from Vectors with Tt-paths """ function compute_zircon_age_PDF(time_years_vecs::Vector{Vector{_T}}, Tt_paths_Temp_vecs::Vector{Vector{_T}}; ZirconData::ZirconAgeData = ZirconAgeData(), bandwidth=1e5, n_analyses=300) where _T # Compute the probability that a zircon of certain age is sampled: time_years, prob, ages_eruptible, number_zircons, T_av_time, T_sd_time = compute_zircons_Ttpath(time_years_vecs, Tt_paths_Temp_vecs, ZirconData=ZirconData); # Use this to compute PDF curves: time_Ma, PDF_zircons, time_Ma_average, PDF_zircon_average = zircon_age_PDF(ages_eruptible, number_zircons, bandwidth=bandwidth, n_analyses=n_analyses) return time_Ma, PDF_zircons, time_Ma_average, PDF_zircon_average, time_years, prob, ages_eruptible, number_zircons, T_av_time, T_sd_time end end
[ 27, 34345, 29, 10677, 14, 57, 343, 1102, 23396, 14, 57, 343, 1102, 32, 3212, 13, 20362, 198, 21412, 1168, 343, 1102, 32, 3212, 198, 198, 2, 22300, 11059, 286, 257, 371, 12, 12048, 2810, 416, 1279, 20608, 29, 1222, 1279, 20608, 29, 284, 24061, 1976, 343, 1102, 9337, 422, 309, 83, 13532, 198, 2, 16718, 287, 262, 14393, 13, 1520, 13, 9207, 366, 22362, 39204, 262, 1459, 2546, 290, 1181, 286, 850, 10396, 5171, 291, 2153, 2611, 46637, 1, 198, 2, 1315, 14, 3023, 14, 1238, 1828, 11, 1279, 20608, 29, 1222, 1279, 20608, 29, 198, 198, 11748, 7308, 13, 16818, 82, 198, 3500, 40117, 198, 3500, 6706, 408, 11, 14370, 11, 20595, 14881, 11, 32169, 35, 6377, 11, 6706, 408, 198, 198, 39344, 220, 1168, 343, 1102, 23396, 6601, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 24061, 62, 89, 343, 1102, 62, 496, 62, 20456, 11, 220, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 11, 220, 1303, 17952, 31878, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 343, 1102, 62, 496, 62, 20456, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 24061, 62, 89, 1980, 684, 62, 1102, 1851, 62, 303, 6359, 17, 6759, 198, 220, 220, 220, 220, 198, 37811, 198, 220, 220, 220, 16691, 533, 2163, 284, 15284, 1976, 343, 1102, 13390, 355, 2163, 286, 257, 5951, 7034, 198, 37811, 198, 8818, 1976, 343, 1102, 62, 69, 7861, 7, 51, 3712, 23839, 19182, 90, 62, 51, 5512, 3509, 62, 87, 62, 89, 81, 3712, 62, 51, 8, 220, 197, 3003, 4808, 51, 198, 220, 220, 220, 317, 796, 357, 16, 13, 5237, 7874, 16, 13, 23, 9, 7, 940, 61, 19, 27493, 11201, 12195, 32590, 940, 61, 19, 737, 29006, 51, 764, 10, 38549, 13, 1314, 4008, 737, 9, 9806, 62, 87, 62, 89, 81, 220, 198, 220, 220, 220, 317, 58, 32, 764, 27, 28, 657, 13, 15, 60, 764, 28, 657, 13, 15, 628, 220, 220, 220, 1441, 317, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1168, 343, 1102, 23396, 6601, 198, 198, 44909, 326, 6622, 4277, 10007, 329, 262, 16765, 198, 37811, 198, 31, 4480, 62, 46265, 62, 77, 3768, 322, 2878, 1168, 343, 1102, 23396, 6601, 198, 220, 220, 220, 13146, 265, 3712, 43879, 2414, 220, 197, 197, 197, 28, 807, 1495, 13, 15, 197, 197, 2, 22246, 1976, 343, 1102, 36275, 5951, 685, 34, 60, 198, 220, 220, 220, 309, 1084, 3712, 43879, 2414, 220, 197, 197, 197, 28, 718, 3829, 13, 15, 220, 197, 2, 685, 34, 60, 26265, 1976, 343, 1102, 36275, 34467, 685, 34, 60, 198, 220, 220, 220, 13146, 349, 3712, 43879, 2414, 220, 197, 197, 197, 28, 718, 3829, 13, 15, 197, 197, 2, 685, 34, 60, 15831, 385, 5951, 685, 34, 60, 198, 220, 220, 220, 309, 9948, 62, 9806, 3712, 43879, 2414, 197, 197, 28, 10460, 13, 15, 197, 197, 2, 3509, 5951, 284, 15284, 1976, 343, 1102, 13390, 198, 220, 220, 220, 309, 9948, 62, 9662, 3712, 43879, 2414, 220, 197, 197, 28, 352, 13, 15, 197, 197, 2, 5951, 2239, 284, 269, 37779, 5039, 1976, 343, 1102, 13390, 357, 29268, 286, 1168, 343, 1102, 36275, 12133, 1221, 1186, 1634, 8, 198, 220, 220, 220, 3509, 62, 87, 62, 89, 81, 3712, 43879, 2414, 220, 197, 197, 28, 657, 13, 8298, 197, 197, 2, 3509, 13390, 1976, 1980, 684, 379, 4735, 385, 198, 220, 220, 220, 1976, 343, 1102, 62, 17618, 3712, 5317, 2414, 220, 220, 220, 796, 1802, 13, 15, 197, 197, 2, 1271, 286, 2672, 1976, 1980, 684, 220, 198, 220, 220, 220, 640, 62, 89, 81, 62, 27922, 3712, 43879, 2414, 796, 657, 13, 22, 68, 21, 197, 197, 2, 26265, 640, 1626, 309, 36275, 2837, 357, 1212, 318, 644, 262, 2446, 973, 287, 262, 371, 4226, 11, 40169, 866, 1165, 8, 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, 1303, 4613, 3520, 287, 262, 1168, 81, 36275, 6516, 517, 621, 352, 14, 18, 286, 262, 640, 262, 309, 83, 3108, 351, 262, 14069, 640, 287, 262, 36275, 6516, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6706, 408, 4197, 286, 1976, 343, 1102, 1271, 625, 36275, 2837, 198, 37811, 198, 8818, 2376, 408, 62, 11147, 62, 89, 343, 1102, 62, 49720, 7, 57, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 8, 198, 220, 220, 220, 2488, 403, 8002, 13146, 349, 11, 309, 9948, 62, 9662, 11, 309, 9948, 62, 9806, 11, 13146, 265, 11, 3509, 62, 87, 62, 89, 81, 11, 1976, 343, 1102, 62, 17618, 11, 309, 1084, 796, 1168, 343, 1102, 6601, 197, 197, 197, 197, 197, 197, 197, 197, 628, 220, 220, 220, 1303, 3497, 23818, 1168, 343, 1102, 13390, 357, 8499, 15917, 1681, 2123, 435, 1539, 1584, 26, 2269, 1435, 8, 198, 220, 220, 220, 309, 220, 197, 197, 197, 197, 28, 2837, 7, 33758, 349, 11, 2245, 796, 309, 9948, 62, 9806, 11, 2239, 796, 309, 9948, 62, 9662, 220, 1267, 198, 220, 220, 220, 309, 11147, 220, 197, 197, 197, 28, 2837, 7, 33758, 349, 11, 2245, 796, 13146, 265, 11, 220, 197, 220, 220, 4129, 796, 4129, 7, 51, 4008, 628, 220, 220, 220, 2124, 62, 89, 343, 1102, 220, 197, 197, 28, 1976, 343, 1102, 62, 69, 7861, 7, 51, 11, 9806, 62, 87, 62, 89, 81, 8, 197, 197, 197, 2, 24061, 1976, 343, 1102, 13390, 220, 198, 220, 220, 220, 299, 62, 89, 343, 1102, 220, 197, 197, 28, 6632, 7, 87, 62, 89, 343, 1102, 8, 197, 197, 197, 197, 197, 197, 2, 1271, 286, 1976, 1980, 684, 628, 220, 220, 220, 299, 62, 89, 343, 1102, 58, 17, 25, 437, 60, 796, 532, 26069, 7, 87, 62, 89, 343, 1102, 8, 197, 197, 197, 197, 197, 197, 2, 28754, 1976, 343, 1102, 13390, 198, 220, 220, 220, 299, 62, 89, 343, 1102, 58, 16, 60, 220, 197, 28, 299, 62, 89, 343, 1102, 58, 17, 60, 197, 197, 197, 197, 197, 197, 197, 2, 900, 717, 1988, 628, 220, 220, 220, 299, 62, 89, 343, 1102, 197, 197, 28, 2906, 346, 12195, 7, 357, 77, 62, 89, 343, 1102, 9, 89, 343, 1102, 62, 17618, 20679, 47033, 7, 77, 62, 89, 343, 1102, 29720, 12, 39504, 7, 28300, 12195, 7, 77, 62, 89, 343, 1102, 9, 89, 343, 1102, 62, 17618, 20679, 47033, 7, 77, 62, 89, 343, 1102, 35514, 628, 220, 220, 220, 1303, 4197, 299, 62, 89, 343, 1102, 62, 45, 351, 2376, 408, 20683, 198, 220, 220, 220, 299, 62, 89, 343, 1102, 62, 45, 62, 11147, 220, 197, 28, 2376, 408, 7, 51, 11147, 11, 299, 62, 89, 343, 1102, 11, 11506, 28, 16, 13, 15, 8, 628, 220, 220, 220, 1441, 299, 62, 89, 343, 1102, 62, 45, 62, 11147, 198, 437, 198, 198, 37811, 198, 198, 1212, 24803, 257, 2376, 408, 4197, 2163, 284, 24061, 262, 1271, 286, 1976, 1980, 684, 329, 1123, 286, 262, 309, 83, 13532, 198, 37811, 198, 8818, 220, 24061, 62, 17618, 62, 89, 1980, 684, 0, 7, 77, 62, 89, 81, 3712, 23839, 19182, 90, 62, 51, 11, 45, 5512, 309, 83, 62, 6978, 82, 62, 30782, 3712, 23839, 19182, 90, 62, 51, 11, 45, 5512, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 8, 810, 1391, 62, 51, 11, 45, 92, 198, 220, 220, 220, 2488, 403, 8002, 309, 1084, 11, 13146, 265, 11, 13146, 349, 796, 1168, 343, 1102, 6601, 198, 220, 220, 220, 220, 198, 220, 220, 220, 299, 62, 89, 343, 1102, 62, 45, 62, 11147, 220, 796, 220, 197, 5439, 408, 62, 11147, 62, 89, 343, 1102, 62, 49720, 7, 57, 343, 1102, 6601, 8, 197, 197, 197, 2, 2376, 408, 4197, 832, 1976, 343, 1102, 36275, 198, 220, 220, 220, 14122, 82, 13, 31, 16663, 82, 329, 1312, 287, 352, 25, 7857, 7, 51, 83, 62, 6978, 82, 62, 30782, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 7857, 7, 51, 83, 62, 6978, 82, 62, 30782, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 83, 62, 6978, 82, 62, 30782, 58, 73, 11, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 51, 1875, 13146, 349, 8, 1222, 357, 51, 1279, 13146, 265, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 383, 1708, 1627, 2753, 257, 1256, 286, 640, 11, 780, 6706, 408, 318, 407, 2099, 12, 31284, 13, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1318, 318, 281, 1280, 4810, 287, 262, 5301, 326, 743, 4259, 340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4818, 3712, 62, 51, 220, 220, 220, 220, 220, 796, 6706, 408, 13, 79, 17407, 7, 77, 62, 89, 343, 1102, 62, 45, 62, 11147, 11, 309, 8, 197, 197, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 62, 89, 81, 58, 73, 11, 72, 60, 220, 220, 220, 796, 4314, 7, 19608, 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, 299, 62, 89, 81, 58, 73, 11, 72, 60, 220, 220, 220, 796, 657, 13, 15, 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, 198, 220, 220, 220, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 220, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 3712, 23839, 19182, 90, 43879, 2414, 11, 16, 5512, 309, 83, 62, 6978, 82, 62, 30782, 3712, 23839, 19182, 90, 43879, 2414, 11, 17, 19629, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 8, 198, 198, 1212, 552, 1769, 262, 1271, 286, 1976, 1980, 684, 4635, 422, 257, 2168, 286, 5951, 12, 2435, 3108, 338, 13, 220, 198, 464, 309, 83, 12, 6978, 82, 389, 8574, 287, 257, 362, 35, 17593, 4600, 51, 83, 62, 6978, 82, 62, 30782, 63, 351, 15274, 852, 262, 5951, 379, 640, 4600, 2435, 62, 19002, 44646, 198, 198, 20560, 25, 198, 1421, 198, 12, 4600, 2435, 62, 19002, 63, 1058, 15879, 286, 4129, 4600, 429, 63, 351, 262, 640, 287, 812, 357, 20777, 262, 3726, 286, 262, 18640, 8, 286, 262, 2173, 2810, 198, 12, 4600, 51, 83, 62, 6978, 82, 62, 30782, 63, 1058, 7177, 286, 2546, 4600, 7, 429, 11, 77, 6978, 82, 8, 15506, 351, 262, 5951, 286, 790, 3108, 13, 198, 198, 26410, 25, 198, 12, 4600, 1676, 65, 63, 1058, 257, 15879, 326, 3607, 262, 3585, 12867, 326, 257, 1976, 343, 1102, 351, 257, 1813, 2479, 7160, 198, 12, 4600, 1095, 62, 263, 37623, 856, 63, 1058, 2479, 286, 17866, 903, 2153, 2611, 198, 12, 4600, 17618, 62, 89, 1980, 684, 63, 1058, 362, 35, 7177, 286, 2546, 4600, 7, 429, 35751, 63, 198, 12, 4600, 51, 62, 615, 62, 2435, 63, 25, 15879, 286, 2546, 4600, 429, 63, 326, 4909, 262, 2811, 309, 286, 262, 13532, 198, 12, 4600, 51, 62, 21282, 62, 2435, 63, 25, 15879, 286, 2546, 4600, 429, 63, 326, 4909, 262, 3210, 28833, 286, 262, 309, 286, 262, 13532, 198, 198, 1212, 8027, 373, 4166, 1912, 319, 281, 371, 12, 81, 28399, 2810, 355, 7914, 10327, 287, 262, 3348, 25, 198, 12, 1279, 20608, 29, 1539, 1279, 20608, 29, 1539, 1279, 20608, 29, 1539, 1279, 20608, 29, 1539, 12131, 13, 360, 13221, 278, 262, 1459, 2546, 290, 1181, 286, 850, 10396, 5171, 291, 2153, 2611, 46637, 13, 14393, 4440, 1367, 11, 642, 32883, 13, 3740, 1378, 34023, 13, 2398, 14, 940, 13, 940, 2548, 14, 82, 37309, 3134, 12, 33618, 12, 1129, 2919, 19, 12, 17, 198, 198, 37811, 198, 8818, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 3712, 23839, 19182, 90, 62, 51, 11, 16, 5512, 309, 83, 62, 6978, 82, 62, 30782, 3712, 23839, 19182, 90, 62, 51, 11, 17, 19629, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 796, 1168, 343, 1102, 23396, 6601, 28955, 810, 4808, 51, 628, 220, 220, 220, 2488, 403, 8002, 309, 1084, 11, 13146, 265, 11, 13146, 349, 11, 640, 62, 89, 81, 62, 27922, 796, 1168, 343, 1102, 6601, 198, 220, 220, 220, 220, 198, 220, 220, 220, 309, 83, 62, 6978, 82, 62, 30782, 16, 796, 4866, 7, 51, 83, 62, 6978, 82, 62, 30782, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 37455, 83, 220, 197, 197, 197, 197, 28, 197, 26069, 7, 2435, 62, 19002, 38381, 16, 60, 197, 197, 197, 197, 197, 197, 197, 2, 4628, 395, 538, 685, 48489, 60, 198, 220, 220, 220, 640, 62, 263, 62, 1084, 220, 197, 28, 220, 197, 47033, 7, 2435, 62, 19002, 8, 197, 197, 197, 197, 197, 197, 197, 2, 19528, 954, 628, 220, 220, 220, 1303, 1064, 477, 262, 309, 83, 13532, 326, 467, 832, 262, 1976, 343, 1102, 36275, 2837, 1222, 389, 379, 262, 886, 286, 262, 3108, 991, 2174, 13146, 265, 357, 847, 3083, 1168, 81, 389, 407, 1865, 31578, 1143, 8, 198, 220, 220, 220, 4522, 62, 4033, 62, 263, 220, 197, 197, 28, 1064, 439, 7, 357, 47033, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 11, 67, 12078, 28, 16, 737, 29, 51, 1084, 8, 764, 5, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 437, 11, 47715, 6, 764, 27, 13146, 265, 4008, 198, 220, 220, 220, 299, 62, 89, 81, 197, 197, 197, 28, 6632, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 8, 198, 220, 220, 220, 24061, 62, 17618, 62, 89, 1980, 684, 0, 7, 77, 62, 89, 81, 11, 309, 83, 62, 6978, 82, 62, 30782, 16, 11, 1168, 343, 1102, 6601, 8, 197, 197, 2, 552, 1769, 262, 1271, 286, 1976, 1980, 684, 329, 790, 3108, 628, 220, 220, 220, 1303, 1064, 262, 1271, 286, 4628, 395, 25386, 329, 790, 3108, 11, 1141, 543, 262, 5951, 318, 1875, 309, 1084, 290, 1279, 13146, 265, 198, 220, 220, 220, 4129, 62, 40546, 220, 197, 28, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 13664, 7, 2389, 62, 4033, 62, 263, 4008, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 2389, 62, 4033, 62, 263, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4129, 62, 40546, 58, 72, 60, 220, 220, 220, 796, 4129, 7, 1064, 439, 7, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 45299, 2389, 62, 4033, 62, 263, 58, 72, 7131, 17, 11907, 764, 29, 309, 1084, 8, 764, 5, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 45299, 2389, 62, 4033, 62, 263, 58, 72, 7131, 17, 11907, 764, 27, 13146, 265, 4008, 1267, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 262, 1306, 1811, 3951, 460, 1884, 307, 8793, 287, 257, 517, 19992, 835, 986, 198, 220, 220, 220, 4686, 197, 197, 197, 197, 28, 1064, 439, 7, 4129, 62, 40546, 764, 855, 5415, 7, 13664, 62, 40546, 4008, 220, 198, 220, 220, 220, 4522, 62, 4033, 62, 75, 70, 301, 62, 2213, 220, 197, 28, 4522, 62, 4033, 62, 263, 58, 4686, 58, 16, 60, 41832, 17, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4686, 220, 197, 197, 197, 197, 28, 1064, 439, 7, 309, 83, 62, 6978, 82, 62, 30782, 16, 58, 45299, 2389, 62, 4033, 62, 75, 70, 301, 62, 2213, 60, 764, 27, 13146, 265, 8, 220, 198, 220, 220, 220, 26173, 2389, 62, 1084, 62, 2435, 220, 197, 28, 1064, 1084, 7, 309, 83, 62, 6978, 82, 62, 30782, 16, 58, 312, 11, 2389, 62, 4033, 62, 75, 70, 301, 62, 2213, 12962, 220, 198, 220, 220, 220, 4522, 62, 1084, 62, 2435, 197, 197, 28, 26173, 2389, 62, 1084, 62, 2435, 58, 17, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3509, 62, 496, 62, 43639, 197, 28, 5415, 7, 13664, 62, 40546, 27493, 138, 242, 83, 197, 197, 197, 197, 197, 2, 770, 318, 5447, 1871, 477, 6163, 13532, 198, 220, 220, 220, 220, 198, 220, 220, 220, 309, 62, 615, 62, 2435, 62, 16, 220, 197, 28, 6330, 0, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 11, 657, 13, 15, 5218, 11013, 45, 8, 198, 220, 220, 220, 309, 62, 615, 62, 2435, 220, 197, 197, 28, 1976, 27498, 7, 7857, 7, 51, 62, 615, 62, 2435, 62, 16, 11, 16, 4008, 198, 220, 220, 220, 309, 62, 21282, 62, 2435, 220, 197, 197, 28, 1976, 27498, 7, 7857, 7, 51, 62, 615, 62, 2435, 62, 16, 11, 16, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 651, 262, 2811, 5951, 286, 262, 309, 83, 13532, 290, 262, 3210, 28833, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 7857, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 309, 62, 615, 62, 2435, 58, 72, 60, 197, 28, 1612, 7, 24455, 7, 0, 271, 12647, 11, 309, 62, 615, 62, 2435, 62, 16, 58, 72, 11, 47715, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 309, 62, 21282, 62, 2435, 58, 72, 60, 197, 28, 14367, 7, 24455, 7, 5145, 271, 12647, 11, 309, 62, 615, 62, 2435, 62, 16, 58, 72, 11, 47715, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 314, 28464, 262, 371, 2163, 780, 262, 5288, 2239, 4129, 284, 1663, 257, 1976, 343, 1102, 318, 2391, 257, 8064, 286, 262, 5415, 12854, 1022, 309, 1084, 290, 13146, 349, 198, 220, 220, 220, 1303, 770, 1838, 2565, 355, 356, 691, 1730, 351, 49876, 994, 13, 4362, 645, 2347, 318, 2810, 262, 1103, 1976, 343, 1102, 2546, 2314, 5457, 307, 5295, 198, 220, 220, 220, 949, 62, 9662, 62, 77, 197, 197, 28, 4314, 7, 357, 2435, 62, 89, 81, 62, 27922, 14, 9806, 62, 496, 62, 43639, 27493, 7, 9806, 62, 496, 62, 43639, 14, 138, 242, 83, 8, 1267, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 1064, 262, 309, 83, 13532, 326, 423, 257, 1271, 286, 4628, 395, 25386, 287, 262, 36275, 2837, 3744, 621, 262, 5447, 949, 62, 9662, 62, 77, 7499, 198, 220, 220, 220, 1303, 428, 318, 284, 26332, 326, 340, 2753, 617, 640, 284, 1663, 1976, 1980, 684, 198, 220, 220, 220, 4686, 197, 197, 197, 197, 28, 1064, 439, 7, 4129, 62, 40546, 764, 29, 949, 62, 9662, 62, 77, 8, 220, 198, 220, 220, 220, 611, 318, 28920, 7, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 47, 83, 6978, 796, 5415, 7, 13664, 62, 40546, 27493, 138, 242, 83, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 40, 836, 470, 423, 257, 2060, 34352, 12, 6978, 326, 318, 17338, 890, 1626, 640, 62, 89, 81, 62, 27922, 357, 43641, 7, 2435, 62, 89, 81, 62, 27922, 8, 331, 3808, 737, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 5882, 395, 34352, 12, 6978, 314, 423, 318, 29568, 9806, 62, 47, 83, 6978, 8, 812, 13, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36400, 589, 428, 1988, 1626, 262, 1168, 343, 1102, 6601, 23396, 2878, 351, 1168, 343, 1102, 6601, 28, 57, 343, 1102, 23396, 6601, 7, 2435, 62, 89, 81, 62, 27922, 28, 15, 13, 16, 68, 21, 8, 1222, 302, 5143, 19570, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4522, 62, 4033, 62, 263, 62, 16, 197, 197, 28, 651, 9630, 12195, 2389, 62, 4033, 62, 263, 58, 312, 4357, 685, 17, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 493, 62, 89, 81, 62, 49720, 197, 197, 28, 2824, 7, 43879, 2414, 11, 220, 4522, 62, 1084, 62, 2435, 25, 16, 13, 15, 37498, 2435, 62, 263, 62, 1084, 14, 138, 242, 83, 13219, 1084, 62, 9662, 62, 77, 8, 198, 220, 220, 220, 493, 62, 89, 81, 62, 49720, 197, 197, 28, 4314, 12195, 5317, 2414, 11, 600, 62, 89, 81, 62, 49720, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 309, 62, 615, 62, 2435, 62, 6649, 310, 220, 197, 28, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 13664, 7, 600, 62, 89, 81, 62, 49720, 13219, 16, 8, 764, 28, 657, 13, 15, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 1312, 287, 352, 37498, 7857, 7, 600, 62, 89, 81, 62, 49720, 11, 16, 13219, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 17, 197, 197, 197, 197, 28, 4522, 62, 4033, 62, 263, 62, 16, 58, 1064, 439, 7, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 600, 62, 89, 81, 62, 49720, 58, 72, 4357, 2389, 62, 4033, 62, 263, 62, 16, 58, 25, 11907, 764, 29, 309, 1084, 8, 764, 5, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 600, 62, 89, 81, 62, 49720, 58, 72, 4357, 2389, 62, 4033, 62, 263, 62, 16, 58, 25, 11907, 764, 27, 13146, 265, 4008, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 28920, 7, 312, 17, 8, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 62, 615, 62, 2435, 62, 6649, 310, 58, 72, 60, 796, 11013, 45, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 62, 615, 62, 2435, 62, 6649, 310, 58, 72, 60, 796, 14288, 7, 24455, 7, 0, 271, 12647, 11, 309, 83, 62, 6978, 82, 62, 30782, 16, 58, 600, 62, 89, 81, 62, 49720, 58, 72, 4357, 312, 17, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 6330, 0, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 11, 11013, 45, 5218, 657, 13, 15, 8, 198, 220, 220, 220, 4522, 62, 4033, 62, 263, 197, 197, 197, 28, 651, 9630, 12195, 2389, 62, 4033, 62, 263, 11, 685, 17, 12962, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 2389, 62, 4033, 62, 263, 8, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 1064, 439, 7, 357, 51, 83, 62, 6978, 82, 62, 30782, 16, 58, 45299, 2389, 62, 4033, 62, 263, 58, 72, 11907, 8, 764, 855, 657, 13, 15, 5619, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5299, 271, 28920, 7, 521, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 220, 197, 197, 197, 197, 28, 5415, 7, 521, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 83, 62, 6978, 82, 62, 30782, 16, 58, 16, 25, 74, 11, 2389, 62, 4033, 62, 263, 58, 72, 11907, 764, 28, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 220, 198, 220, 220, 220, 1976, 81, 62, 19738, 197, 197, 197, 28, 6632, 7, 51, 83, 62, 6978, 82, 62, 30782, 16, 8, 198, 220, 220, 220, 1976, 81, 62, 19738, 58, 51, 83, 62, 6978, 82, 62, 30782, 16, 764, 29, 657, 13, 15, 60, 764, 28, 352, 13, 15, 197, 198, 220, 220, 220, 299, 62, 89, 6015, 17, 62, 15, 197, 197, 197, 28, 1976, 81, 62, 19738, 15885, 77, 62, 89, 81, 197, 197, 197, 197, 197, 197, 2, 16628, 503, 883, 309, 83, 3108, 326, 389, 991, 1875, 33758, 265, 2488, 262, 886, 220, 198, 220, 220, 220, 1271, 62, 89, 1980, 684, 220, 220, 220, 220, 220, 796, 299, 62, 89, 6015, 17, 62, 15, 58, 45299, 2389, 62, 4033, 62, 263, 62, 16, 11208, 198, 220, 220, 220, 299, 62, 1326, 292, 11970, 62, 1095, 220, 197, 28, 2160, 7, 17618, 62, 89, 1980, 684, 11, 5391, 82, 28, 17, 8, 197, 198, 220, 220, 220, 264, 89, 220, 197, 197, 197, 197, 197, 28, 2546, 7, 17618, 62, 89, 1980, 684, 11, 16, 8, 198, 220, 220, 220, 9337, 62, 263, 37623, 856, 197, 197, 28, 2824, 7, 43879, 2414, 11, 220, 352, 13, 15, 25, 138, 242, 83, 25, 82, 89, 9, 138, 242, 83, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 12867, 326, 257, 1728, 1976, 343, 1102, 318, 35846, 11, 4745, 641, 319, 703, 867, 286, 257, 1813, 2479, 257, 430, 1695, 25, 198, 220, 220, 220, 1861, 220, 197, 197, 197, 197, 28, 299, 62, 1326, 292, 11970, 62, 1095, 14, 16345, 7, 77, 62, 1326, 292, 11970, 62, 1095, 8, 198, 220, 220, 220, 1861, 220, 197, 197, 197, 197, 28, 1861, 58, 45299, 16, 60, 628, 220, 220, 220, 1441, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 640, 62, 19002, 11, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 220, 796, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 3712, 38469, 90, 38469, 90, 43879, 2414, 92, 5512, 309, 83, 62, 6978, 82, 62, 30782, 3712, 38469, 90, 38469, 90, 43879, 2414, 11709, 26, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 796, 1168, 343, 1102, 23396, 6601, 28955, 198, 198, 1212, 18178, 20650, 90, 38469, 92, 355, 5128, 329, 640, 290, 5951, 286, 1123, 309, 83, 12, 6978, 13, 3423, 11, 262, 4129, 286, 262, 15879, 460, 307, 7885, 1022, 1180, 2173, 13, 198, 198, 15865, 453, 11, 356, 39555, 378, 428, 656, 257, 362, 35, 17593, 290, 257, 2392, 15879, 326, 3407, 477, 13532, 290, 257, 2060, 15879, 351, 1661, 220, 198, 198, 37811, 198, 8818, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 92, 5512, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 11709, 26, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 796, 1168, 343, 1102, 23396, 6601, 28955, 810, 4808, 51, 628, 220, 220, 220, 1303, 10385, 284, 257, 15879, 351, 640, 1222, 17593, 351, 309, 3815, 379, 790, 4628, 395, 538, 198, 220, 220, 220, 640, 62, 19002, 11, 309, 83, 62, 6978, 82, 62, 30782, 796, 24061, 62, 89, 1980, 684, 62, 1102, 1851, 62, 303, 6359, 17, 6759, 7, 2435, 62, 19002, 62, 303, 6359, 11, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 8, 628, 220, 220, 220, 1303, 869, 1388, 8027, 198, 220, 220, 220, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 796, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 11, 309, 83, 62, 6978, 82, 62, 30782, 11, 1168, 343, 1102, 6601, 28, 57, 343, 1102, 6601, 8, 628, 220, 220, 220, 1303, 1441, 11, 1390, 640, 62, 19002, 198, 220, 220, 220, 1441, 640, 62, 19002, 11, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 220, 198, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 640, 62, 19002, 11, 309, 83, 6978, 82, 62, 6759, 796, 24061, 62, 89, 1980, 684, 62, 1102, 1851, 62, 303, 6359, 17, 6759, 7, 2435, 62, 19002, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 43879, 2414, 92, 5512, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 43879, 2414, 11709, 8, 220, 220, 220, 220, 220, 198, 198, 1212, 26161, 257, 15879, 351, 569, 478, 669, 3994, 640, 290, 5951, 3108, 338, 284, 257, 2060, 640, 15879, 290, 257, 17593, 326, 21001, 477, 30104, 198, 37811, 198, 8818, 24061, 62, 89, 1980, 684, 62, 1102, 1851, 62, 303, 6359, 17, 6759, 7, 2435, 62, 19002, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 92, 5512, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 11709, 8, 810, 4808, 51, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 13610, 257, 2060, 15879, 351, 262, 640, 3815, 25, 198, 220, 220, 220, 640, 62, 19002, 796, 3748, 7, 445, 7234, 7, 85, 9246, 11, 34642, 7, 2435, 62, 19002, 62, 303, 6359, 4008, 1776, 220, 628, 220, 220, 220, 1303, 3060, 262, 30104, 284, 281, 7177, 351, 309, 3815, 198, 220, 220, 220, 309, 83, 62, 6978, 82, 62, 6759, 796, 1976, 27498, 28264, 51, 11, 13664, 7, 2435, 62, 19002, 828, 4129, 7, 51, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 4008, 198, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 51, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 8, 198, 220, 220, 220, 220, 220, 220, 220, 318, 83, 433, 796, 1064, 439, 7, 2435, 62, 19002, 764, 855, 640, 62, 19002, 62, 303, 6359, 58, 72, 7131, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 437, 220, 220, 796, 1064, 439, 7, 2435, 62, 19002, 764, 855, 640, 62, 19002, 62, 303, 6359, 58, 72, 7131, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 309, 83, 62, 6978, 82, 62, 6759, 58, 396, 433, 58, 16, 5974, 72, 437, 58, 16, 4357, 1312, 60, 764, 28, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 58, 72, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 640, 62, 19002, 11, 309, 83, 62, 6978, 82, 62, 6759, 198, 198, 437, 628, 628, 198, 37811, 198, 220, 220, 220, 1976, 343, 1102, 62, 496, 62, 20456, 7, 1095, 62, 263, 37623, 856, 3712, 23839, 19182, 90, 43879, 2414, 11, 16, 5512, 1271, 62, 89, 1980, 684, 3712, 23839, 19182, 90, 43879, 2414, 11, 17, 5512, 19484, 28, 16, 68, 20, 11, 299, 62, 272, 43710, 28, 6200, 8, 198, 198, 7293, 1133, 12867, 12109, 5499, 329, 1976, 343, 1102, 2479, 3108, 338, 8477, 287, 4600, 17618, 62, 89, 1980, 684, 63, 351, 2479, 4600, 1095, 62, 263, 37623, 856, 63, 357, 16885, 29231, 6739, 198, 63, 3903, 10394, 63, 318, 262, 32746, 258, 768, 4324, 286, 262, 7186, 23759, 357, 259, 812, 828, 9472, 4600, 77, 62, 272, 43710, 63, 389, 262, 1271, 286, 13523, 1760, 13, 220, 197, 198, 198, 37811, 198, 8818, 1976, 343, 1102, 62, 496, 62, 20456, 7, 1095, 62, 263, 37623, 856, 3712, 23839, 19182, 90, 62, 51, 11, 16, 5512, 1271, 62, 89, 1980, 684, 3712, 23839, 19182, 90, 62, 51, 11, 17, 19629, 19484, 28, 16, 68, 20, 11, 299, 62, 272, 43710, 28, 6200, 8, 810, 4808, 51, 628, 220, 220, 220, 1303, 24061, 12960, 329, 1123, 286, 262, 1976, 343, 1102, 309, 83, 12, 6978, 82, 25, 198, 220, 220, 220, 12960, 62, 89, 1980, 684, 796, 17635, 198, 220, 220, 220, 640, 62, 21467, 796, 25787, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 7857, 7, 17618, 62, 89, 1980, 684, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 1326, 292, 220, 197, 197, 197, 796, 1271, 62, 89, 1980, 684, 58, 45299, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 279, 87, 197, 220, 220, 197, 197, 197, 796, 299, 62, 1326, 292, 14, 16345, 7, 77, 62, 1326, 292, 8, 197, 197, 2, 12867, 284, 423, 257, 1728, 2479, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4738, 3146, 6163, 1864, 284, 262, 12867, 198, 220, 220, 220, 220, 220, 220, 220, 895, 79, 197, 197, 197, 197, 796, 6291, 7, 357, 47033, 7, 1095, 62, 263, 37623, 856, 8, 764, 12, 9337, 62, 263, 37623, 856, 20679, 16, 68, 21, 11, 775, 2337, 7, 8416, 828, 299, 62, 272, 43710, 11, 6330, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 220, 197, 197, 197, 197, 796, 479, 2934, 7, 82, 3149, 11, 19484, 28, 3903, 10394, 14, 16, 68, 21, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3650, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 20456, 62, 89, 1980, 684, 11, 220, 197, 88, 13, 43337, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 2435, 62, 21467, 11, 220, 197, 197, 88, 13, 87, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 299, 62, 1326, 292, 11970, 62, 1095, 220, 220, 796, 2160, 7, 17618, 62, 89, 1980, 684, 11, 5391, 82, 28, 17, 8, 198, 220, 220, 220, 279, 87, 7355, 197, 220, 220, 197, 197, 197, 28, 299, 62, 1326, 292, 11970, 62, 1095, 58, 45299, 16, 4083, 14, 16345, 7, 77, 62, 1326, 292, 11970, 62, 1095, 58, 45299, 16, 12962, 198, 220, 220, 220, 895, 79, 7355, 197, 197, 197, 197, 28, 6291, 7, 357, 47033, 7, 1095, 62, 263, 37623, 856, 8, 764, 12, 9337, 62, 263, 37623, 856, 20679, 16, 68, 21, 11, 775, 2337, 7, 8416, 7355, 828, 299, 62, 272, 43710, 11, 6330, 28, 7942, 8, 198, 220, 220, 220, 331, 7355, 220, 197, 197, 197, 197, 28, 479, 2934, 7, 82, 3149, 7355, 11, 19484, 28, 3903, 10394, 14, 16, 68, 21, 8, 198, 220, 220, 220, 640, 62, 21467, 62, 23913, 220, 220, 220, 220, 796, 20650, 7, 88, 7355, 13, 87, 1776, 198, 220, 220, 220, 12960, 62, 89, 343, 1102, 62, 23913, 220, 796, 20650, 7, 88, 7355, 13, 43337, 1776, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1441, 640, 62, 21467, 11, 12960, 62, 89, 1980, 684, 11, 640, 62, 21467, 62, 23913, 11, 12960, 62, 89, 343, 1102, 62, 23913, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 640, 62, 21467, 11, 12960, 62, 89, 1980, 684, 11, 640, 62, 21467, 62, 23913, 11, 12960, 62, 89, 343, 1102, 62, 23913, 11, 640, 62, 19002, 11, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 796, 24061, 62, 89, 343, 1102, 62, 496, 62, 20456, 7, 2435, 62, 19002, 62, 303, 6359, 3712, 38469, 90, 38469, 5512, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 3712, 38469, 90, 38469, 19629, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 796, 1168, 343, 1102, 23396, 6601, 22784, 19484, 28, 3903, 10394, 11, 299, 62, 272, 43710, 28, 6200, 8, 198, 198, 1212, 552, 1769, 262, 12960, 357, 1676, 65, 1799, 12109, 2163, 8, 351, 1976, 343, 1102, 2479, 1366, 422, 569, 478, 669, 351, 309, 83, 12, 6978, 82, 197, 198, 198, 37811, 198, 8818, 24061, 62, 89, 343, 1102, 62, 496, 62, 20456, 7, 2435, 62, 19002, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 92, 5512, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 3712, 38469, 90, 38469, 90, 62, 51, 11709, 26, 1168, 343, 1102, 6601, 3712, 57, 343, 1102, 23396, 6601, 796, 1168, 343, 1102, 23396, 6601, 22784, 19484, 28, 16, 68, 20, 11, 299, 62, 272, 43710, 28, 6200, 8, 810, 4808, 51, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 3082, 1133, 262, 12867, 326, 257, 1976, 343, 1102, 286, 1728, 2479, 318, 35846, 25, 198, 220, 220, 220, 640, 62, 19002, 11, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 796, 24061, 62, 89, 1980, 684, 62, 51, 83, 6978, 7, 2435, 62, 19002, 62, 303, 6359, 11, 309, 83, 62, 6978, 82, 62, 30782, 62, 303, 6359, 11, 1168, 343, 1102, 6601, 28, 57, 343, 1102, 6601, 1776, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 5765, 428, 284, 24061, 12960, 23759, 25, 220, 198, 220, 220, 220, 640, 62, 21467, 11, 12960, 62, 89, 1980, 684, 11, 640, 62, 21467, 62, 23913, 11, 12960, 62, 89, 343, 1102, 62, 23913, 220, 796, 1976, 343, 1102, 62, 496, 62, 20456, 7, 1095, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 19484, 28, 3903, 10394, 11, 299, 62, 272, 43710, 28, 77, 62, 272, 43710, 8, 628, 220, 220, 220, 1441, 640, 62, 21467, 11, 12960, 62, 89, 1980, 684, 11, 640, 62, 21467, 62, 23913, 11, 12960, 62, 89, 343, 1102, 62, 23913, 11, 640, 62, 19002, 11, 1861, 11, 9337, 62, 263, 37623, 856, 11, 1271, 62, 89, 1980, 684, 11, 309, 62, 615, 62, 2435, 11, 309, 62, 21282, 62, 2435, 198, 198, 437, 198, 198, 437 ]
2.299809
6,284
using Oceananigans.Operators tracer_diffusivities(tracers, κ::Union{Number, Function}) = with_tracers(tracers, NamedTuple(), (tracers, init) -> κ) tracer_diffusivities(tracers, ::Nothing) = nothing function tracer_diffusivities(tracers, κ::NamedTuple) all(name ∈ propertynames(κ) for name in tracers) || throw(ArgumentError("Tracer diffusivities or diffusivity parameters must either be a constants or a `NamedTuple` with a value for every tracer!")) return κ end convert_diffusivity(FT, κ, discrete) = κ # fallback convert_diffusivity(FT, κ::Number, discrete) = convert(FT, κ) convert_diffusivity(FT, κ::F, ::Val{true}) where F<:Function = DiscreteDiffusionFunction(κ) convert_diffusivity(FT, κ::F, ::Val{false}) where F<:Function = κ function convert_diffusivity(FT, κ::NamedTuple, discrete) κ_names = propertynames(κ) return NamedTuple{κ_names}(Tuple(convert_diffusivity(FT, κi, discrete) for κi in κ)) end @inline geo_mean_Δᶠ(i, j, k, grid::AbstractGrid) = cbrt(Δxᶜᶜᶜ(i, j, k, grid) * Δyᶜᶜᶜ(i, j, k, grid) * Δzᶜᶜᶜ(i, j, k, grid)) @kernel function calculate_nonlinear_viscosity!(νₑ, grid, closure, buoyancy, U, C) i, j, k = @index(Global, NTuple) @inbounds νₑ[i, j, k] = νᶜᶜᶜ(i, j, k, grid, closure, buoyancy, U, C) end
[ 3500, 10692, 272, 34090, 13, 18843, 2024, 198, 198, 2213, 11736, 62, 26069, 385, 28720, 7, 2213, 49908, 11, 7377, 118, 3712, 38176, 90, 15057, 11, 15553, 30072, 796, 351, 62, 2213, 49908, 7, 2213, 49908, 11, 34441, 51, 29291, 22784, 357, 2213, 49908, 11, 2315, 8, 4613, 7377, 118, 8, 198, 2213, 11736, 62, 26069, 385, 28720, 7, 2213, 49908, 11, 7904, 18465, 8, 796, 2147, 198, 198, 8818, 491, 11736, 62, 26069, 385, 28720, 7, 2213, 49908, 11, 7377, 118, 3712, 45, 2434, 51, 29291, 8, 628, 220, 220, 220, 477, 7, 3672, 18872, 230, 3119, 14933, 7, 43000, 8, 329, 1438, 287, 491, 49908, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 2898, 11736, 814, 385, 28720, 393, 814, 385, 3458, 10007, 1276, 2035, 307, 257, 38491, 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, 393, 257, 4600, 45, 2434, 51, 29291, 63, 351, 257, 1988, 329, 790, 491, 11736, 2474, 4008, 628, 220, 220, 220, 1441, 7377, 118, 198, 437, 198, 198, 1102, 1851, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 11, 28810, 8, 796, 7377, 118, 1303, 2121, 1891, 198, 1102, 1851, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 3712, 15057, 11, 28810, 8, 796, 10385, 7, 9792, 11, 7377, 118, 8, 198, 1102, 1851, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 3712, 37, 11, 7904, 7762, 90, 7942, 30072, 220, 810, 376, 27, 25, 22203, 796, 8444, 8374, 28813, 4241, 22203, 7, 43000, 8, 220, 198, 1102, 1851, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 3712, 37, 11, 7904, 7762, 90, 9562, 30072, 810, 376, 27, 25, 22203, 796, 7377, 118, 198, 198, 8818, 10385, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 3712, 45, 2434, 51, 29291, 11, 28810, 8, 198, 220, 220, 220, 7377, 118, 62, 14933, 796, 3119, 14933, 7, 43000, 8, 198, 220, 220, 220, 1441, 34441, 51, 29291, 90, 43000, 62, 14933, 92, 7, 51, 29291, 7, 1102, 1851, 62, 26069, 385, 3458, 7, 9792, 11, 7377, 118, 72, 11, 28810, 8, 329, 7377, 118, 72, 287, 7377, 118, 4008, 198, 437, 198, 198, 31, 45145, 40087, 62, 32604, 62, 138, 242, 157, 114, 254, 7, 72, 11, 474, 11, 479, 11, 10706, 3712, 23839, 41339, 8, 796, 198, 220, 220, 220, 269, 1671, 83, 7, 138, 242, 87, 157, 114, 250, 157, 114, 250, 157, 114, 250, 7, 72, 11, 474, 11, 479, 11, 10706, 8, 1635, 37455, 88, 157, 114, 250, 157, 114, 250, 157, 114, 250, 7, 72, 11, 474, 11, 479, 11, 10706, 8, 1635, 37455, 89, 157, 114, 250, 157, 114, 250, 157, 114, 250, 7, 72, 11, 474, 11, 479, 11, 10706, 4008, 198, 198, 31, 33885, 2163, 15284, 62, 13159, 29127, 62, 85, 2304, 16579, 0, 7, 26180, 158, 224, 239, 11, 10706, 11, 16512, 11, 36675, 3883, 11, 471, 11, 327, 8, 198, 220, 220, 220, 1312, 11, 474, 11, 479, 796, 2488, 9630, 7, 22289, 11, 24563, 29291, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 7377, 121, 158, 224, 239, 58, 72, 11, 474, 11, 479, 60, 796, 7377, 121, 157, 114, 250, 157, 114, 250, 157, 114, 250, 7, 72, 11, 474, 11, 479, 11, 10706, 11, 16512, 11, 36675, 3883, 11, 471, 11, 327, 8, 198, 437, 198 ]
2.240069
579
<reponame>jw3126/Interpolations.jl """ The `extrap_prep` function is used by `getindex_impl` to generate the body of the `getindex` function for extrapolation objects. The methods of `extrap_prep` work in "layers", iteratively working out the exact expression needed. The first layer takes a specification of the extrapolation scheme(s) to be used and a `Val` object that specifies the dimensionality of the extrapolation object: `extrap_prep{T,N}(::Type{T}, Val{N})`. These methods only dispatch to the second layer, and need not be extended for new schemes. The second layer also takes a `Val` object that specifies a single dimension on which to work: `extrap_prep{T,N,d}(::Type{T}, ::Val{N}, ::Val{d}). The methods with this signature in src/extrapolation/extrap_prep.jl simply expand into a block with sub-expressions for handling too-low and too-high values separately (the third layer), but specific interpolation schemes can provide more specific methods for this layer that handle both ends simultaneously. For example, the `Flat` scheme has a layer-2 method that uses `clamp` to restrict the coordinate when used in both directions, but uses `min` and `max` when handling each end separately. The third layer, to which the second dispatches if no scheme-specific method is found, adds a final `Val` object with a symbol `:lo` or `:hi`: `extrap_prep{T,N,d,l}(::Type{T}, ::Val{N}, ::Val{d}, ::Val{l})`. These methods must be specified for each extrapolation scheme. However, the general framework takes care of expanding all possible tuple combinations, so individual schemes need only care about e.g. `T==Flat`. In addition to these methods, there is a similar three-layer method hierarchy for gradient evaluation, in which a `Val{:gradient}` is prepended to the other arguments: `extrap_prep{T,N,d,l}(::Val{:gradient}`, ::Type{T}, ::Val{N}, ::Val{d}, ::Val{l})` If nothing else is specified for the individual schemes, these methods forward to the same methods without the `:gradient` argument, i.e. the same behavior as for value extrapolation. This works well with all schemes that are simple coordinate transformations, but for anything else methods for the low- and high- value cases need to be implemented for each scheme. """ extrap_prep extrap_prep{T}(::Type{T}, n::Val{1}) = extrap_prep(T, n, Val{1}()) extrap_prep{T}(::Type{Tuple{T}}, n::Val{1}) = extrap_prep(T, n) extrap_prep{T}(::Type{Tuple{T,T}}, n::Val{1}) = extrap_prep(T, n) extrap_prep{T}(::Type{Tuple{Tuple{T,T}}}, n::Val{1}) = extrap_prep(T, n) function extrap_prep{S,T}(::Type{Tuple{S,T}}, n::Val{1}) quote $(extrap_prep(S, n, Val{1}(), Val{:lo}())) $(extrap_prep(T, n, Val{1}(), Val{:hi}())) end end extrap_prep{S,T}(::Type{Tuple{Tuple{S,T}}}, n::Val{1}) = extrap_prep(Tuple{S,T}, n) # needed for ambiguity resolution extrap_prep{T<:Tuple}(::Type{T}, ::Val{1}) = :(throw(ArgumentError("The 1-dimensional extrap configuration $T is not supported"))) function extrap_prep{T,N}(::Type{T}, n::Val{N}) exprs = Expr[] for d in 1:N push!(exprs, extrap_prep(T, n, Val{d}())) end return Expr(:block, exprs...) end function extrap_prep{N,T<:Tuple}(::Type{T}, n::Val{N}) length(T.parameters) == N || return :(throw(ArgumentError("The $N-dimensional extrap configuration $T is not supported - must be a tuple of length $N (was length $(lenght(T.parameters)))"))) exprs = Expr[] for d in 1:N Tdim = T.parameters[d] if Tdim <: Tuple length(Tdim.parameters) == 2 || return :(throw(ArgumentError("The extrap configuration $Tdim for dimension $d is not supported - must be a tuple of length 2 or a simple configuration type"))) if Tdim.parameters[1] != Tdim.parameters[2] push!(exprs, extrap_prep(Tdim, n, Val{d}())) else push!(exprs, extrap_prep(Tdim.parameters[1], n, Val{d}())) end else push!(exprs, extrap_prep(Tdim, n, Val{d}())) end end return Expr(:block, exprs...) end extrap_prep{T,N,d}(::Type{T}, n::Val{N}, dim::Val{d}) = extrap_prep(Tuple{T,T}, n, dim) function extrap_prep{S,T,N,d}(::Type{Tuple{S,T}}, n::Val{N}, dim::Val{d}) quote $(extrap_prep(S, n, dim, Val{:lo}())) $(extrap_prep(T, n, dim, Val{:hi}())) end end
[ 27, 7856, 261, 480, 29, 73, 86, 18, 19420, 14, 9492, 16104, 602, 13, 20362, 198, 37811, 198, 464, 4600, 2302, 2416, 62, 46012, 63, 2163, 318, 973, 416, 4600, 1136, 9630, 62, 23928, 63, 284, 7716, 262, 1767, 286, 198, 1169, 4600, 1136, 9630, 63, 2163, 329, 36804, 21417, 5563, 13, 198, 198, 464, 5050, 286, 4600, 2302, 2416, 62, 46012, 63, 670, 287, 366, 75, 6962, 1600, 11629, 9404, 1762, 503, 262, 2748, 198, 38011, 2622, 13, 198, 198, 464, 717, 7679, 2753, 257, 20855, 286, 262, 36804, 21417, 7791, 7, 82, 8, 284, 307, 973, 198, 392, 257, 4600, 7762, 63, 2134, 326, 26052, 262, 15793, 1483, 286, 262, 36804, 21417, 2134, 25, 198, 63, 2302, 2416, 62, 46012, 90, 51, 11, 45, 92, 7, 3712, 6030, 90, 51, 5512, 3254, 90, 45, 30072, 44646, 2312, 5050, 691, 27965, 284, 262, 1218, 198, 29289, 11, 290, 761, 407, 307, 7083, 329, 649, 16546, 13, 198, 198, 464, 1218, 7679, 635, 2753, 257, 4600, 7762, 63, 2134, 326, 26052, 257, 2060, 15793, 319, 198, 4758, 284, 670, 25, 4600, 2302, 2416, 62, 46012, 90, 51, 11, 45, 11, 67, 92, 7, 3712, 6030, 90, 51, 5512, 7904, 7762, 90, 45, 5512, 7904, 7762, 90, 67, 92, 737, 383, 5050, 198, 4480, 428, 9877, 287, 12351, 14, 2302, 2416, 21417, 14, 2302, 2416, 62, 46012, 13, 20362, 2391, 4292, 656, 257, 198, 9967, 351, 850, 12, 42712, 507, 329, 9041, 1165, 12, 9319, 290, 1165, 12, 8929, 3815, 13869, 198, 7, 1169, 2368, 7679, 828, 475, 2176, 39555, 341, 16546, 460, 2148, 517, 2176, 198, 24396, 82, 329, 428, 7679, 326, 5412, 1111, 5645, 11640, 13, 1114, 1672, 11, 262, 198, 63, 7414, 265, 63, 7791, 468, 257, 7679, 12, 17, 2446, 326, 3544, 4600, 565, 696, 63, 284, 4239, 262, 20435, 198, 12518, 973, 287, 1111, 11678, 11, 475, 3544, 4600, 1084, 63, 290, 4600, 9806, 63, 618, 9041, 1123, 886, 198, 25512, 1286, 13, 198, 198, 464, 2368, 7679, 11, 284, 543, 262, 1218, 4596, 20981, 611, 645, 7791, 12, 11423, 2446, 318, 198, 9275, 11, 6673, 257, 2457, 4600, 7762, 63, 2134, 351, 257, 6194, 4600, 25, 5439, 63, 393, 4600, 25, 5303, 63, 25, 198, 63, 2302, 2416, 62, 46012, 90, 51, 11, 45, 11, 67, 11, 75, 92, 7, 3712, 6030, 90, 51, 5512, 7904, 7762, 90, 45, 5512, 7904, 7762, 90, 67, 5512, 7904, 7762, 90, 75, 30072, 44646, 2312, 5050, 198, 27238, 307, 7368, 329, 1123, 36804, 21417, 7791, 13, 2102, 11, 262, 2276, 9355, 198, 83, 1124, 1337, 286, 11581, 477, 1744, 46545, 17790, 11, 523, 1981, 16546, 198, 31227, 691, 1337, 546, 304, 13, 70, 13, 4600, 51, 855, 7414, 265, 44646, 198, 198, 818, 3090, 284, 777, 5050, 11, 612, 318, 257, 2092, 1115, 12, 29289, 2446, 18911, 198, 1640, 31312, 12660, 11, 287, 543, 257, 4600, 7762, 90, 25, 49607, 92, 63, 318, 3143, 1631, 284, 262, 584, 198, 853, 2886, 25, 198, 63, 2302, 2416, 62, 46012, 90, 51, 11, 45, 11, 67, 11, 75, 92, 7, 3712, 7762, 90, 25, 49607, 92, 47671, 7904, 6030, 90, 51, 5512, 7904, 7762, 90, 45, 5512, 7904, 7762, 90, 67, 5512, 7904, 7762, 90, 75, 30072, 63, 198, 1532, 2147, 2073, 318, 7368, 329, 262, 1981, 16546, 11, 777, 5050, 2651, 198, 1462, 262, 976, 5050, 1231, 262, 4600, 25, 49607, 63, 4578, 11, 1312, 13, 68, 13, 262, 976, 4069, 355, 198, 1640, 1988, 36804, 21417, 13, 770, 2499, 880, 351, 477, 16546, 326, 389, 2829, 198, 37652, 4559, 38226, 11, 475, 329, 1997, 2073, 5050, 329, 262, 1877, 12, 290, 1029, 12, 198, 8367, 2663, 761, 284, 307, 9177, 329, 1123, 7791, 13, 198, 37811, 36804, 62, 46012, 198, 198, 2302, 2416, 62, 46012, 90, 51, 92, 7, 3712, 6030, 90, 51, 5512, 299, 3712, 7762, 90, 16, 30072, 796, 36804, 62, 46012, 7, 51, 11, 299, 11, 3254, 90, 16, 92, 28955, 198, 2302, 2416, 62, 46012, 90, 51, 92, 7, 3712, 6030, 90, 51, 29291, 90, 51, 92, 5512, 299, 3712, 7762, 90, 16, 30072, 796, 36804, 62, 46012, 7, 51, 11, 299, 8, 198, 2302, 2416, 62, 46012, 90, 51, 92, 7, 3712, 6030, 90, 51, 29291, 90, 51, 11, 51, 92, 5512, 299, 3712, 7762, 90, 16, 30072, 796, 36804, 62, 46012, 7, 51, 11, 299, 8, 198, 2302, 2416, 62, 46012, 90, 51, 92, 7, 3712, 6030, 90, 51, 29291, 90, 51, 29291, 90, 51, 11, 51, 11709, 5512, 299, 3712, 7762, 90, 16, 30072, 796, 36804, 62, 46012, 7, 51, 11, 299, 8, 198, 8818, 36804, 62, 46012, 90, 50, 11, 51, 92, 7, 3712, 6030, 90, 51, 29291, 90, 50, 11, 51, 92, 5512, 299, 3712, 7762, 90, 16, 30072, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 29568, 2302, 2416, 62, 46012, 7, 50, 11, 299, 11, 3254, 90, 16, 92, 22784, 3254, 90, 25, 5439, 92, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 29568, 2302, 2416, 62, 46012, 7, 51, 11, 299, 11, 3254, 90, 16, 92, 22784, 3254, 90, 25, 5303, 92, 3419, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 2302, 2416, 62, 46012, 90, 50, 11, 51, 92, 7, 3712, 6030, 90, 51, 29291, 90, 51, 29291, 90, 50, 11, 51, 11709, 5512, 299, 3712, 7762, 90, 16, 30072, 796, 36804, 62, 46012, 7, 51, 29291, 90, 50, 11, 51, 5512, 299, 8, 198, 198, 2, 2622, 329, 33985, 6323, 198, 2302, 2416, 62, 46012, 90, 51, 27, 25, 51, 29291, 92, 7, 3712, 6030, 90, 51, 5512, 7904, 7762, 90, 16, 30072, 796, 36147, 16939, 7, 28100, 1713, 12331, 7203, 464, 352, 12, 19577, 36804, 8398, 720, 51, 318, 407, 4855, 1, 22305, 198, 198, 8818, 36804, 62, 46012, 90, 51, 11, 45, 92, 7, 3712, 6030, 90, 51, 5512, 299, 3712, 7762, 90, 45, 30072, 198, 220, 220, 220, 1033, 3808, 796, 1475, 1050, 21737, 198, 220, 220, 220, 329, 288, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31937, 82, 11, 36804, 62, 46012, 7, 51, 11, 299, 11, 3254, 90, 67, 92, 3419, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1475, 1050, 7, 25, 9967, 11, 1033, 3808, 23029, 198, 437, 198, 8818, 36804, 62, 46012, 90, 45, 11, 51, 27, 25, 51, 29291, 92, 7, 3712, 6030, 90, 51, 5512, 299, 3712, 7762, 90, 45, 30072, 198, 220, 220, 220, 4129, 7, 51, 13, 17143, 7307, 8, 6624, 399, 8614, 1441, 36147, 16939, 7, 28100, 1713, 12331, 7203, 464, 720, 45, 12, 19577, 36804, 8398, 720, 51, 318, 407, 4855, 532, 1276, 307, 257, 46545, 286, 4129, 720, 45, 357, 9776, 4129, 29568, 11925, 456, 83, 7, 51, 13, 17143, 7307, 4008, 16725, 22305, 198, 220, 220, 220, 1033, 3808, 796, 1475, 1050, 21737, 198, 220, 220, 220, 329, 288, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 309, 27740, 796, 309, 13, 17143, 7307, 58, 67, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 309, 27740, 1279, 25, 309, 29291, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4129, 7, 51, 27740, 13, 17143, 7307, 8, 6624, 362, 8614, 1441, 36147, 16939, 7, 28100, 1713, 12331, 7203, 464, 36804, 8398, 720, 51, 27740, 329, 15793, 720, 67, 318, 407, 4855, 532, 1276, 307, 257, 46545, 286, 4129, 362, 393, 257, 2829, 8398, 2099, 1, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 309, 27740, 13, 17143, 7307, 58, 16, 60, 14512, 309, 27740, 13, 17143, 7307, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 31937, 82, 11, 36804, 62, 46012, 7, 51, 27740, 11, 299, 11, 3254, 90, 67, 92, 3419, 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, 4574, 0, 7, 31937, 82, 11, 36804, 62, 46012, 7, 51, 27740, 13, 17143, 7307, 58, 16, 4357, 299, 11, 3254, 90, 67, 92, 3419, 4008, 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, 4574, 0, 7, 31937, 82, 11, 36804, 62, 46012, 7, 51, 27740, 11, 299, 11, 3254, 90, 67, 92, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1475, 1050, 7, 25, 9967, 11, 1033, 3808, 23029, 198, 437, 198, 2302, 2416, 62, 46012, 90, 51, 11, 45, 11, 67, 92, 7, 3712, 6030, 90, 51, 5512, 299, 3712, 7762, 90, 45, 5512, 5391, 3712, 7762, 90, 67, 30072, 796, 36804, 62, 46012, 7, 51, 29291, 90, 51, 11, 51, 5512, 299, 11, 5391, 8, 198, 8818, 36804, 62, 46012, 90, 50, 11, 51, 11, 45, 11, 67, 92, 7, 3712, 6030, 90, 51, 29291, 90, 50, 11, 51, 92, 5512, 299, 3712, 7762, 90, 45, 5512, 5391, 3712, 7762, 90, 67, 30072, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 29568, 2302, 2416, 62, 46012, 7, 50, 11, 299, 11, 5391, 11, 3254, 90, 25, 5439, 92, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 29568, 2302, 2416, 62, 46012, 7, 51, 11, 299, 11, 5391, 11, 3254, 90, 25, 5303, 92, 3419, 4008, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.691397
1,604
<filename>test/runtests.jl using BranchTests using Test Code = quote @testbranch "Vector" begin println("in 'Vector'") v = Vector{Int}() @test isempty(v) @testbranch "adds one element" begin println("in 'adds one element'") push!(v, 1) @test length(v) == 1 @testbranch "adds another element" begin println("in 'adds another element'") push!(v, 2) @test length(v) == 2 end @testbranch DefaultTestSet "removes one" begin # test set type println("in 'removes one'") pop!(v) @test isempty(v) end end @testbranch begin # no name println("in 'equality'") @test v == v end end end eval(Code) #@testset "vector" begin # v = Vector{Int}() # # @testset "adds one element" begin # push!(v, 1) # @test length(v) == 1 # # @testset "adds another element" begin # push!(v, 1) # @test length(v) == 2 # end # # @testset "removes - empty" begin # pop!(v) # @test isempty(v) # end # end #end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 20551, 51, 3558, 198, 3500, 6208, 198, 198, 10669, 796, 9577, 198, 220, 220, 220, 2488, 9288, 1671, 3702, 366, 38469, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 259, 705, 38469, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 20650, 90, 5317, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 28920, 7, 85, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1671, 3702, 366, 2860, 82, 530, 5002, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 259, 705, 2860, 82, 530, 5002, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 85, 8, 6624, 352, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1671, 3702, 366, 2860, 82, 1194, 5002, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 259, 705, 2860, 82, 1194, 5002, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 85, 8, 6624, 362, 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, 2488, 9288, 1671, 3702, 15161, 14402, 7248, 366, 2787, 5241, 530, 1, 2221, 1303, 1332, 900, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 259, 705, 2787, 5241, 530, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 85, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 28920, 7, 85, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1671, 3702, 2221, 1303, 645, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 259, 705, 48203, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 410, 6624, 410, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 18206, 7, 10669, 8, 198, 198, 2, 31, 9288, 2617, 366, 31364, 1, 2221, 198, 2, 220, 220, 220, 410, 796, 20650, 90, 5317, 92, 3419, 198, 2, 198, 2, 220, 220, 220, 2488, 9288, 2617, 366, 2860, 82, 530, 5002, 1, 2221, 198, 2, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 352, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 85, 8, 6624, 352, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 2860, 82, 1194, 5002, 1, 2221, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 352, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4129, 7, 85, 8, 6624, 362, 198, 2, 220, 220, 220, 220, 220, 220, 220, 886, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 2787, 5241, 532, 6565, 1, 2221, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 85, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 28920, 7, 85, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 886, 198, 2, 220, 220, 220, 886, 198, 2, 437, 198 ]
1.811953
686
<filename>test/exceptions.jl using TimeZones: ParseNextError @testset "Exceptions" begin # Test exception messages tz = VariableTimeZone( "Imaginary/Zone", [Transition(DateTime(1800,1,1), FixedTimeZone("IST",0,0))], DateTime(1980,1,1), ) @test sprint(showerror, AmbiguousTimeError(DateTime(2015,1,1), tz)) == "AmbiguousTimeError: Local DateTime 2015-01-01T00:00:00 is ambiguous within Imaginary/Zone" @test sprint(showerror, NonExistentTimeError(DateTime(2015,1,1), tz)) == "NonExistentTimeError: Local DateTime 2015-01-01T00:00:00 does not exist within Imaginary/Zone" @test sprint(showerror, UnhandledTimeError(tz)) == "UnhandledTimeError: TimeZone Imaginary/Zone does not handle dates on or after 1980-01-01T00:00:00 UTC" end @testset "ParseNextError" begin sshowerror(x) = sprint(showerror, x; context=:color => true) @test ParseNextError("", "", 1) == ParseNextError("", "", 1, 0) @test ParseNextError("", "A", 1) == ParseNextError("", "A", 1, 1) @test sshowerror(ParseNextError("", "A", 1)) == "$ParseNextError: \"\e[4mA\e[24m\"" @test sshowerror(ParseNextError("Fail", "A", 1)) == "$ParseNextError: Fail: \"\e[4mA\e[24m\"" @test sshowerror(ParseNextError("", "", 1)) == "$ParseNextError: \"\e[4m\"\e[24m" @test sshowerror(ParseNextError("", "0:A:0", 3, 3)) == "$ParseNextError: \"0:\e[4mA\e[24m:0\"" @test sshowerror(ParseNextError("", "<>", 2, 0)) == "$ParseNextError: \"<\e[4m>\e[24m\"" @test sshowerror(ParseNextError("", "<>", 2, 4)) == "$ParseNextError: \"<\e[4m>\e[24m\"" end
[ 27, 34345, 29, 9288, 14, 1069, 11755, 13, 20362, 198, 3500, 3862, 57, 1952, 25, 2547, 325, 10019, 12331, 198, 198, 31, 9288, 2617, 366, 3109, 11755, 1, 2221, 198, 220, 220, 220, 1303, 6208, 6631, 6218, 198, 220, 220, 220, 256, 89, 796, 35748, 7575, 26961, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3546, 363, 3219, 14, 26961, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 685, 8291, 653, 7, 10430, 7575, 7, 39188, 11, 16, 11, 16, 828, 10832, 7575, 26961, 7203, 8808, 1600, 15, 11, 15, 4008, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 7536, 7575, 7, 23664, 11, 16, 11, 16, 828, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 2488, 9288, 18553, 7, 1477, 789, 1472, 11, 12457, 29709, 7575, 12331, 7, 10430, 7575, 7, 4626, 11, 16, 11, 16, 828, 256, 89, 4008, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 366, 35649, 29709, 7575, 12331, 25, 10714, 7536, 7575, 1853, 12, 486, 12, 486, 51, 405, 25, 405, 25, 405, 318, 27102, 1626, 39440, 3219, 14, 26961, 1, 198, 220, 220, 220, 2488, 9288, 18553, 7, 1477, 789, 1472, 11, 8504, 3109, 7609, 7575, 12331, 7, 10430, 7575, 7, 4626, 11, 16, 11, 16, 828, 256, 89, 4008, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15419, 3109, 7609, 7575, 12331, 25, 10714, 7536, 7575, 1853, 12, 486, 12, 486, 51, 405, 25, 405, 25, 405, 857, 407, 2152, 1626, 39440, 3219, 14, 26961, 1, 198, 220, 220, 220, 2488, 9288, 18553, 7, 1477, 789, 1472, 11, 791, 38788, 7575, 12331, 7, 22877, 4008, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3118, 38788, 7575, 12331, 25, 3862, 26961, 39440, 3219, 14, 26961, 857, 407, 5412, 9667, 319, 393, 706, 7169, 12, 486, 12, 486, 51, 405, 25, 405, 25, 405, 18119, 1, 198, 437, 198, 198, 31, 9288, 2617, 366, 10044, 325, 10019, 12331, 1, 2221, 198, 220, 220, 220, 26678, 789, 1472, 7, 87, 8, 796, 18553, 7, 1477, 789, 1472, 11, 2124, 26, 4732, 28, 25, 8043, 5218, 2081, 8, 628, 220, 220, 220, 2488, 9288, 2547, 325, 10019, 12331, 7203, 1600, 366, 1600, 352, 8, 6624, 2547, 325, 10019, 12331, 7203, 1600, 366, 1600, 352, 11, 657, 8, 198, 220, 220, 220, 2488, 9288, 2547, 325, 10019, 12331, 7203, 1600, 366, 32, 1600, 352, 8, 6624, 2547, 325, 10019, 12331, 7203, 1600, 366, 32, 1600, 352, 11, 352, 8, 628, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 1600, 366, 32, 1600, 352, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 19990, 59, 68, 58, 19, 42646, 59, 68, 58, 1731, 76, 7879, 1, 198, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 39044, 1600, 366, 32, 1600, 352, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 18448, 25, 19990, 59, 68, 58, 19, 42646, 59, 68, 58, 1731, 76, 7879, 1, 198, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 1600, 366, 1600, 352, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 19990, 59, 68, 58, 19, 76, 7879, 59, 68, 58, 1731, 76, 1, 198, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 1600, 366, 15, 25, 32, 25, 15, 1600, 513, 11, 513, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 19990, 15, 7479, 68, 58, 19, 42646, 59, 68, 58, 1731, 76, 25, 15, 7879, 1, 628, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 1600, 33490, 29, 1600, 362, 11, 657, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 19990, 27, 59, 68, 58, 19, 76, 29, 59, 68, 58, 1731, 76, 7879, 1, 198, 220, 220, 220, 2488, 9288, 26678, 789, 1472, 7, 10044, 325, 10019, 12331, 7203, 1600, 33490, 29, 1600, 362, 11, 604, 4008, 6624, 17971, 10044, 325, 10019, 12331, 25, 19990, 27, 59, 68, 58, 19, 76, 29, 59, 68, 58, 1731, 76, 7879, 1, 198, 437, 198 ]
2.357353
680
struct FreqRange{T} range::T end function FreqRange(; min, max) return FreqRange([min, max]) end Base.first(r::FreqRange) = first(r.range) Base.last(r::FreqRange) = last(r.range) @with_kw struct DispersionModel{S<:AbstractSusceptibility} inf = 1.0 inf_diag = inf * [1, 1, 1] inf_offdiag = [0, 0, 0] susceptibilities::Vector{S} valid_freq_range::FreqRange end function eval_dispersion_model(m::DispersionModel, f) @unpack inf, inf_diag, inf_offdiag, susceptibilities, valid_freq_range = m f_min = first(valid_freq_range) f_max = last(valid_freq_range) if !(f_min ≤ f ≤ f_max) throw("frequency outside the model valid range $(f_min):$(f_max)") end val = [ inf_diag[1] inf_offdiag[1] inf_offdiag[2] inf_offdiag[1] inf_diag[2] inf_offdiag[3] inf_offdiag[2] inf_offdiag[3] inf_diag[3] ] for sus in susceptibilities val += eval_susceptibility(sus, f) end return val end epsilon(model::DispersionModel, freq) = eval_dispersion_model(model, freq) mu(model::DispersionModel, freq) = eval_dispersion_model(model, freq) @recipe function plot(model::DispersionModel; comp = 1, transform_epsilon = real, transform_freq = inv, nfreq = 100, xlabel = "λ[μm]", ylabel = "Re[ϵᵣ]", label = "ϵ_11" ) xlabel --> xlabel ylabel --> ylabel label --> label freq_range = model.valid_freq_range.range fmin = first(freq_range) fmax = last(freq_range) freq_points = LinRange(fmin, fmax, nfreq) ϵ_freqs = map(f -> eval_dispersion_model(model, f)[:], freq_points) m = reduce(hcat, ϵ_freqs)' transform_freq.(freq_points), transform_epsilon.(m[:, Int(comp)]) end
[ 7249, 4848, 80, 17257, 90, 51, 92, 198, 220, 220, 220, 2837, 3712, 51, 198, 437, 198, 8818, 4848, 80, 17257, 7, 26, 949, 11, 3509, 8, 198, 220, 220, 220, 1441, 4848, 80, 17257, 26933, 1084, 11, 3509, 12962, 198, 437, 198, 14881, 13, 11085, 7, 81, 3712, 20366, 80, 17257, 8, 796, 717, 7, 81, 13, 9521, 8, 198, 14881, 13, 12957, 7, 81, 3712, 20366, 80, 17257, 8, 796, 938, 7, 81, 13, 9521, 8, 628, 198, 31, 4480, 62, 46265, 2878, 36060, 6900, 17633, 90, 50, 27, 25, 23839, 30746, 984, 2247, 92, 198, 220, 220, 220, 1167, 796, 352, 13, 15, 198, 220, 220, 220, 1167, 62, 10989, 363, 796, 1167, 1635, 685, 16, 11, 352, 11, 352, 60, 198, 220, 220, 220, 1167, 62, 2364, 10989, 363, 796, 685, 15, 11, 657, 11, 657, 60, 198, 220, 220, 220, 18163, 7992, 3712, 38469, 90, 50, 92, 198, 220, 220, 220, 4938, 62, 19503, 80, 62, 9521, 3712, 20366, 80, 17257, 198, 437, 198, 198, 8818, 5418, 62, 6381, 79, 6900, 62, 19849, 7, 76, 3712, 7279, 79, 6900, 17633, 11, 277, 8, 198, 220, 220, 220, 2488, 403, 8002, 1167, 11, 1167, 62, 10989, 363, 11, 1167, 62, 2364, 10989, 363, 11, 18163, 7992, 11, 4938, 62, 19503, 80, 62, 9521, 796, 285, 198, 220, 220, 220, 277, 62, 1084, 796, 717, 7, 12102, 62, 19503, 80, 62, 9521, 8, 198, 220, 220, 220, 277, 62, 9806, 796, 938, 7, 12102, 62, 19503, 80, 62, 9521, 8, 198, 220, 220, 220, 611, 5145, 7, 69, 62, 1084, 41305, 277, 41305, 277, 62, 9806, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7203, 35324, 2354, 262, 2746, 4938, 2837, 29568, 69, 62, 1084, 2599, 3, 7, 69, 62, 9806, 8, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1188, 796, 198, 220, 220, 220, 220, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1167, 62, 10989, 363, 58, 16, 60, 1167, 62, 2364, 10989, 363, 58, 16, 60, 1167, 62, 2364, 10989, 363, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1167, 62, 2364, 10989, 363, 58, 16, 60, 1167, 62, 10989, 363, 58, 17, 60, 1167, 62, 2364, 10989, 363, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1167, 62, 2364, 10989, 363, 58, 17, 60, 1167, 62, 2364, 10989, 363, 58, 18, 60, 1167, 62, 10989, 363, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 329, 2341, 287, 18163, 7992, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 15853, 5418, 62, 82, 385, 984, 2247, 7, 82, 385, 11, 277, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1188, 198, 437, 628, 198, 198, 538, 18217, 261, 7, 19849, 3712, 7279, 79, 6900, 17633, 11, 2030, 80, 8, 796, 5418, 62, 6381, 79, 6900, 62, 19849, 7, 19849, 11, 2030, 80, 8, 198, 30300, 7, 19849, 3712, 7279, 79, 6900, 17633, 11, 2030, 80, 8, 796, 5418, 62, 6381, 79, 6900, 62, 19849, 7, 19849, 11, 2030, 80, 8, 628, 628, 198, 31, 29102, 431, 2163, 7110, 7, 19849, 3712, 7279, 79, 6900, 17633, 26, 198, 220, 220, 220, 552, 796, 352, 11, 198, 220, 220, 220, 6121, 62, 538, 18217, 261, 796, 1103, 11, 198, 220, 220, 220, 6121, 62, 19503, 80, 796, 800, 11, 198, 220, 220, 220, 299, 19503, 80, 796, 1802, 11, 198, 220, 220, 220, 2124, 18242, 796, 366, 39377, 58, 34703, 76, 60, 1600, 198, 220, 220, 220, 331, 18242, 796, 366, 3041, 58, 139, 113, 39611, 96, 60, 1600, 198, 220, 220, 220, 6167, 796, 366, 139, 113, 62, 1157, 1, 198, 8, 198, 220, 220, 220, 2124, 18242, 14610, 2124, 18242, 198, 220, 220, 220, 331, 18242, 14610, 331, 18242, 198, 220, 220, 220, 6167, 14610, 6167, 628, 220, 220, 220, 2030, 80, 62, 9521, 796, 2746, 13, 12102, 62, 19503, 80, 62, 9521, 13, 9521, 628, 220, 220, 220, 277, 1084, 796, 717, 7, 19503, 80, 62, 9521, 8, 198, 220, 220, 220, 277, 9806, 796, 938, 7, 19503, 80, 62, 9521, 8, 628, 220, 220, 220, 2030, 80, 62, 13033, 796, 5164, 17257, 7, 69, 1084, 11, 277, 9806, 11, 299, 19503, 80, 8, 628, 220, 220, 220, 18074, 113, 62, 19503, 48382, 796, 3975, 7, 69, 4613, 5418, 62, 6381, 79, 6900, 62, 19849, 7, 19849, 11, 277, 38381, 25, 4357, 2030, 80, 62, 13033, 8, 198, 220, 220, 220, 285, 796, 4646, 7, 71, 9246, 11, 18074, 113, 62, 19503, 48382, 33047, 198, 220, 220, 220, 6121, 62, 19503, 80, 12195, 19503, 80, 62, 13033, 828, 6121, 62, 538, 18217, 261, 12195, 76, 58, 45299, 2558, 7, 5589, 8, 12962, 198, 437, 628 ]
2.154321
810
using Chemostat_EColi using Test @testset "Chemostat_EColi.jl" begin # Write your tests here. end
[ 3500, 2580, 1712, 265, 62, 2943, 11106, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 7376, 1712, 265, 62, 2943, 11106, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437, 198 ]
2.641026
39
# # Constraint interface and implementations # import Base: clamp, show using LinearAlgebra: dot, norm, normalize, logabsdet, logdet using StatsFuns: logit, logistic """ VariableConstraint{NC,NF} Abstract type for transformations on constrained variables represented with `NC`-dimensional vectors that produce `NF`-dimensional free (unconstrained) vectors. The supported interface is the 4 functions `constrain`, `free`, `constrain_with_pushlogpdf` and `constrain_with_pushlogpdf_grad`. To implement a new constraint, simply create a new type of `VariableConstraint` and implement `constrain` and `free`. Various internal functions are used to provide efficient and accurate defaults; these may be overriden for increased efficiency when analytical gradients/jacobian determinants are known. The most common override is `constrain_with_logpdf_correction`. """ abstract type VariableConstraint{NC,NF} end """ OneToOneConstraint{N} Alias for dispatch on one-to-one constraints `f: ℝⁿ → ℝⁿ`. """ const OneToOneConstraint{N} = VariableConstraint{N,N} """ UnivariateConstraint Alias for dispatch on univariate constraints `f: ℝ → ℝ`. Univariate constraints can take scalar inputs and produce scalar outputs. """ const UnivariateConstraint = OneToOneConstraint{1} ### ### Basic interface for constraints ### """ free_dimension(c::VariableConstraint) Get the number of dimensions (length) of the freed vector. """ free_dimension(::VariableConstraint{NC,NF}) where {NC,NF} = NF """ constrain_dimension(c::VariableConstraint) Get the number of dimensions (length) of the constrained vector. """ constrain_dimension(::VariableConstraint{NC}) where {NC} = NC """ clamp(c::VariableConstraint, x) Return `x`, ensuring that its value satisfies the constraint. This is useful to avoid numerical instability when a value nears the boundary condition. The clamp is invisible during differentiation. """ function clamp end # Passthrough adjoints for clamp Zygote.@adjoint clamp(c::VariableConstraint, x) = clamp(c, x), Δ -> (nothing, Δ) """ free(c::VariableConstraint, x) From constrained variable `x`, construct free variable. """ function free end Base.@propagate_inbounds function free(c::UnivariateConstraint, x::AbstractVector) return [free(c, x[1])] end """ constrain(c::VariableConstraint, y) From free variable `y`, construct constrained variable. """ function constrain end Base.@propagate_inbounds function constrain(c::UnivariateConstraint, y::AbstractVector) return [constrain(c, y[1])] end """ constrain_with_logpdf_correction(c::VariableConstraint, y) From free variable `y = f(x)` get the constrained variable `x` and the addtive correction to the log density `log π(x)` to get `log π(x)`. See [`free_logpdf_correction`](@free_logpdf_correction). """ function constrain_with_logpdf_correction(c, y) x = constrain(c, y) logdetJ = free_logpdf_correction(c, y) return x, logdetJ end Base.@propagate_inbounds function constrain_with_logpdf_correction( c::UnivariateConstraint, y::AbstractVector ) x, logdetJ = constrain_with_logpdf_correction(c, y[1]) return [x], logdetJ end """ constrain_with_pushlogpdf(c::VariableConstraint, y) From free variable `y = f(x)` get the constrained variable `x` and a new function that pushes forward the log density `log π(x)` with respect to `x` and to the corresponding log density `log π(y)` with respect to `y`. ```julia x, pushlogpdf = constrain_with_pushlogpdf(c, y) logπx = ... # Compute density in constrained space logπy = pushlogpdf(logπx) ``` """ function constrain_with_pushlogpdf(c, y) x, logdetJ = constrain_with_logpdf_correction(c, y) return x, logπx -> logπx + logdetJ end Base.@propagate_inbounds function constrain_with_pushlogpdf( c::UnivariateConstraint, y::AbstractVector ) x, pushlogpdf = constrain_with_pushlogpdf(c, y[1]) return [x], pushlogpdf end """ constrain_with_pushlogpdf_grad(c::VariableConstraint, y) From free variable `y = f(x)` get the constrained variable `x` and a new function that pushes forward the log density `log π(x)` with respect to `x` and its gradient to the corresponding log density `log π(y)` with respect to `y` and its gradient. ```julia x, pushlogpdf_grad = constrain_with_pushlogpdf_grad(c, y) logπx, ∇x_logπx = ... # Compute density and its gradient in constrained space logπy, ∇y_logπy = pushlogpdf_grad(logπx, ∇x_logπx) ``` """ function constrain_with_pushlogpdf_grad(c, y) (x, logdetJ), back = Zygote.pullback(constrain_with_logpdf_correction, c, y) nf = free_dimension(c) return x, function (logπx, ∇x_logπx) s = Zygote.sensitivity(logdetJ) logπy = logπx + logdetJ T = eltype(logπy) ∇y_logπy = similar(∇x_logπx, T, nf) copyto!(∇y_logπy, back((∇x_logπx, s))[2]) return logπy, ∇y_logπy end end function constrain_with_pushlogpdf_grad(c::UnivariateConstraint, y::Real) (x, logdetJ), back = Zygote.pullback(constrain_with_logpdf_correction, c, y) return x, function (logπx, ∇x_logπx::Real) s = Zygote.sensitivity(logdetJ) logπy = logπx + logdetJ ∇y_logπy = back((∇x_logπx, s))[2] return logπy, ∇y_logπy end end Base.@propagate_inbounds function constrain_with_pushlogpdf_grad( c::UnivariateConstraint, y::AbstractVector ) x, pushlogpdf_grad = constrain_with_pushlogpdf_grad(c, y[1]) return [x], function (logπx, ∇x_logπx::AbstractVector) logπy, ∇y_logπy = pushlogpdf_grad(logπx, ∇x_logπx[1]) return logπy, [∇y_logπy] end end """ constrain_jacobian(c::VariableConstraint, y) From free vector `y = f(x)`, compute the Jacobian matrix of the inverse transformation `x = f⁻¹(y)` with entries `Jᵢⱼ = ∂xᵢ/∂yⱼ`. """ function constrain_jacobian(c, y) nf = free_dimension(c) # NOTE: work-around to make forward_jacobian type-inferrable # see https://github.com/FluxML/Zygote.jl/issues/299 v = Val(min(nf, ForwardDiff.DEFAULT_CHUNK_THRESHOLD)) # NOTE: Zygote's (reverse-mode) Jacobians are adjoints J′ = last(Zygote.forward_jacobian(y -> constrain(c, y), y, v)) return adjoint(J′) end # NOTE: Workaround until Zygote supports nesting Jacobians # see https://github.com/FluxML/Zygote.jl/issues/305 Zygote.@adjoint function constrain_jacobian(c, y::AbstractVector) nf = free_dimension(c) nc = constrain_dimension(c) jac(y) = ForwardDiff.jacobian(y->constrain(c, y), y) J = similar(y, (nc, nf)) diffres = DiffResults.JacobianResult(J, y) diffres = ForwardDiff.jacobian!(diffres, jac, y) J = DiffResults.value(diffres) ∇y_J = reshape(DiffResults.jacobian(diffres), (nc, nf, nf)) return J, function (J̄) @einsum ȳ[k] := J̄[i,j] * ∇y_J[i,j,k] return (nothing, ȳ) end end """ constrain_jacobian(c::UnivariateConstraint, y) From free scalar `y = f(x)`, compute the derivative of the inverse transformation `x = f⁻¹(y)`, `dx/dy`. """ function constrain_jacobian(c::UnivariateConstraint, y) dx_dy = Zygote.gradient(constrain, c, y)[2] return dx_dy end Base.@propagate_inbounds function constrain_jacobian( c::UnivariateConstraint, y::AbstractArray ) return [constrain_jacobian(c, y[1])] end """ halflogdetmul(x::AbstractMatrix) For a matrix `x`, compute `½log(det (x' x))`. """ halflogdetmul(x) = logdet(x' * x) / 2 # custom adjoint for slight speed-up Zygote.@adjoint function halflogdetmul(x::AbstractArray) s = x' * x return logdet(s) / 2, Δ -> (Δ * (x * inv(s)),) # `Δ * x⁺ᵀ` end """ free_logpdf_correction(c::VariableConstraint, y) From free vector `y`, compute correction to log pdf for transformation. Given a transformation `f: x ↦ y`, its inverse `f⁻¹: y ↦ x`, and pdf `π(x)`, the log pdf of the transformed density is `log π(y) = log π(f⁻¹(y)) + ½log(det G)`, where `det G` is the determinant of the matrix `G = Jᵀ J`, and `J` is the Jacobian matrix of the inverse transformation with entries `Jᵢⱼ = ∂xᵢ/∂yⱼ`. This result is known as the area formula. This function returns `½log(det G)` for the general case of `f: ℝᵐ → ℝⁿ`. """ function free_logpdf_correction(c, y) @assert free_dimension(c) <= constrain_dimension(c) J = constrain_jacobian(c, y) return halflogdetmul(J) end _logabsdet(x) = first(logabsdet(x)) _logabsdet(x::Real) = log(abs(x)) """ free_logpdf_correction(c::OneToOneConstraint, y) From free variable `y`, compute correction to log pdf for transformation. For a one-to-one transformation with a square Jacobian, the correction simplifies to `log |det J|`. """ function free_logpdf_correction(c::OneToOneConstraint, y::AbstractVector) J = constrain_jacobian(c, y) return first(logabsdet(J)) end ### ### Constraint implementations ### """ IdentityConstraint{N} <: OneToOneConstraint{N} Do-nothing constraint on `ℝⁿ`, corresponding to the identity function on `n`-dimensional variables. Included for convenient bundling of constrained with unconstrained variables. # Constructor IdentityConstraint(n::Int) """ struct IdentityConstraint{N} <: OneToOneConstraint{N} end IdentityConstraint(n) = IdentityConstraint{n}() function Base.show(io::IO, mime::MIME"text/plain", c::IdentityConstraint{N}) where {N} print(io, "IdentityConstraint($N)") end clamp(::IdentityConstraint, x) = x clamp(::IdentityConstraint, x::ForwardDiff.Dual) = x free(::IdentityConstraint{1}, x::Real) = x free(::IdentityConstraint, x::AbstractVector) = x constrain(::IdentityConstraint{1}, y::Real) = y constrain(::IdentityConstraint, y::AbstractVector) = y free_logpdf_correction(::IdentityConstraint{1}, y::Real) = zero(eltype(y)) free_logpdf_correction(::IdentityConstraint, y::AbstractVector) = zero(eltype(y)) constrain_with_pushlogpdf(::IdentityConstraint{1}, y::Real) = y, identity constrain_with_pushlogpdf(::IdentityConstraint, y::AbstractVector) = y, identity function constrain_with_pushlogpdf_grad(::IdentityConstraint{1}, y::Real) return y, (logπx, ∇x_logπx) -> (logπx, ∇x_logπx) end function constrain_with_pushlogpdf_grad(::IdentityConstraint, y::AbstractVector) return y, (logπx, ∇x_logπx) -> (logπx, ∇x_logπx) end """ LowerBoundedConstraint{T} <: UnivariateConstraint Constraint on a scalar that is strictly greater than a lower bound. # Constructor LowerBoundedConstraint(lb) """ struct LowerBoundedConstraint{T} <: UnivariateConstraint lb::T end function Base.show(io::IO, mime::MIME"text/plain", c::LowerBoundedConstraint) print(io, "LowerBoundedConstraint($(c.lb))") end clamp(c::LowerBoundedConstraint, x::Real) = max(x, c.lb + eps(x)) clamp(::LowerBoundedConstraint, x::ForwardDiff.Dual) = x free(c::LowerBoundedConstraint, x::Real) = log(clamp(c, x) - c.lb) constrain(c::LowerBoundedConstraint, y::Real) = clamp(c, exp(y) + c.lb) free_logpdf_correction(c::LowerBoundedConstraint, y::Real) = y """ UpperBoundedConstraint{T} <: UnivariateConstraint Constraint on a scalar that is strictly less than an upper bound. # Constructor UpperBoundedConstraint(ub) """ struct UpperBoundedConstraint{T} <: UnivariateConstraint ub::T end function Base.show(io::IO, mime::MIME"text/plain", c::UpperBoundedConstraint) print(io, "UpperBoundedConstraint($(c.ub))") end clamp(c::UpperBoundedConstraint, x::Real) = min(x, c.ub - eps(x)) clamp(::UpperBoundedConstraint, x::ForwardDiff.Dual) = x free(c::UpperBoundedConstraint, x::Real) = log(c.ub - clamp(c, x)) constrain(c::UpperBoundedConstraint, y::Real) = clamp(c, c.ub - exp(y)) free_logpdf_correction(c::UpperBoundedConstraint, y::Real) = y """ BoundedConstraint{TL,TU,TD} <: UnivariateConstraint Constraint on a scalar that is has both an upper and lower bound. # Constructor BoundedConstraint(lb, ub) """ struct BoundedConstraint{TL,TU,TD} <: UnivariateConstraint lb::TL ub::TU delta::TD end function Base.show(io::IO, mime::MIME"text/plain", c::BoundedConstraint) print(io, "BoundedConstraint($(c.lb), $(c.ub))") end function BoundedConstraint(lb::Real, ub::Real) @assert lb < ub return BoundedConstraint(lb, ub, ub - lb) end clamp(c::BoundedConstraint, x::Real) = clamp(x, c.lb + eps(x), c.ub - eps(x)) clamp(::BoundedConstraint, x::ForwardDiff.Dual) = x free(c::BoundedConstraint, x::Real) = logit((clamp(c, x) - c.lb) / c.delta) constrain(c::BoundedConstraint, y::Real) = clamp(c, c.delta * logistic(y) + c.lb) function constrain_with_logpdf_correction(c::BoundedConstraint, y::Real) z = logistic(y) delz = c.delta * z x = delz + c.lb dx_dy = delz * (1 - z) return clamp(c, x), log(dx_dy) end """ TransformConstraint(lb::Real, ub::Real) Convenient constructor for lower-, upper-, lower- and upper-, and un-bounded univariate constraints. The correct type is chosen based on the arguments. """ function TransformConstraint(lb=-Inf, ub=Inf) @assert lb < ub has_lb, has_ub = isfinite(lb), isfinite(ub) if has_lb && has_ub return BoundedConstraint(lb, ub) elseif has_lb return LowerBoundedConstraint(lb) elseif has_ub return UpperBoundedConstraint(ub) else return IdentityConstraint(1) end end """ UnitVectorConstraint{N} <: OneToOneConstraint{N} Transformation from an `n`-dimensional unit-vector to an unconstrained `n`-dimensional vector. Note that in this case the inverse transformation (ℓ²-normalization) is not unique, and therefore the pushforward density cannot be obtained using the usual Jacobian technique. However, using the fact that a standard multivariate normally distributed vector when normalized is uniformly distributed on a sphere, we can push forward the uniform measure on the sphere by applying a standard multivariate normal prior to `y`. The corresponding log density correction is `-½ yᵀ y = -½ |y|²`. The Jacobian of the inverse transformation is a normalized projection matrix onto the tangent space to the sphere at `x`: `J = Πₓ / |y|`, where `Πₓ = I - xᵀ x`. # Constructor UnitVectorConstraint(n::Int) """ struct UnitVectorConstraint{N} <: OneToOneConstraint{N} end UnitVectorConstraint(n) = UnitVectorConstraint{n}() function Base.show(io::IO, mime::MIME"text/plain", c::UnitVectorConstraint{N}) where {N} print(io, "UnitVectorConstraint($N)") end clamp(::UnitVectorConstraint, x) = normalize(x) clamp(::UnitVectorConstraint, x::AbstractArray{<:ForwardDiff.Dual}) = x free(c::UnitVectorConstraint, x) = clamp(c, x) function constrain(::UnitVectorConstraint, y) x = y ./ norm(y) return x end function normalize_with_norm(y) ny = norm(y) return y ./ ny, ny end Zygote.@adjoint function normalize_with_norm(y) x, ny = normalize_with_norm(y) return (x, ny), function (Δ) x̄, n̄ȳ = Δ return (x̄ ./ ny .- x .* (dot(x, x̄) / ny - n̄ȳ),) end end function constrain_with_logpdf_correction(::UnitVectorConstraint, y) x, ny = normalize_with_norm(y) logdetJ = -ny^2 / 2 return x, logdetJ end """ UnitVectorScaledConstraint{N} <: OneToOneConstraint{N} Transformation from an `n`-dimensional unit-vector to an unconstrained `n`-dimensional vector, scaled by a factor of ``r``. ``r`` is interpreted as a radius. This is intended to bring directional/quaternion vectors to the same approximate initial scale as other variables. # Constructor UnitVectorScaledConstraint(n::Int, r = 1) """ struct UnitVectorScaledConstraint{N,T<:Real} <: OneToOneConstraint{N} r::T function UnitVectorScaledConstraint{N,T}(r::T) where {N,T} isinteger(N) && N > 0 || throw(DomainError("N must be a positive integer.")) r > 0 || throw(DomainError("r must be strictly positive.")) return new{N,T}(r) end end UnitVectorScaledConstraint(n, r = 1.0) = UnitVectorScaledConstraint{n,typeof(r)}(r) function Base.show(io::IO, mime::MIME"text/plain", c::UnitVectorScaledConstraint{N}) where {N} print(io, "UnitVectorScaledConstraint($N, c.r)") end clamp(::UnitVectorScaledConstraint, x) = normalize(x) clamp(::UnitVectorScaledConstraint, x::AbstractArray{<:ForwardDiff.Dual}) = x free(c::UnitVectorScaledConstraint, x) = normalize(x) .* c.r function constrain(::UnitVectorScaledConstraint, y) x = y ./ norm(y) return x end function constrain_with_logpdf_correction(c::UnitVectorScaledConstraint, y) x, ny = normalize_with_norm(y) logdetJ = -(ny / c.r)^2 / 2 return x, logdetJ end """ UnitSimplexConstraint{N,M} <: VariableConstraint{N,M} Transformation from an `n`-dimensional vector of positive reals with a unit ℓ¹-norm to an unconstrained `m = n - 1`-dimensional vector. This constraint uses the stick-breaking process to define the transformation. See https://en.wikipedia.org/wiki/Dirichlet_process#The_stick-breaking_process for more details. # Constructor UnitSimplexConstraint(n::Int) """ struct UnitSimplexConstraint{N,M} <: VariableConstraint{N,M} end UnitSimplexConstraint(n::Int) = UnitSimplexConstraint{n,n-1}() function Base.show(io::IO, mime::MIME"text/plain", c::UnitSimplexConstraint{N}) where {N} print(io, "UnitSimplexConstraint($N)") end """ stick_ratio(x, Σx) Break a piece of length `x` off of a unit-length stick off of which pieces of total length `Σx` have already been broken. Return the ratio of the length `x` to the remaining length of the stick. """ stick_ratio(x, Σx) = x / (1 - Σx) """ stick_length(r, Σx) Inverse of `stick_ratio`. """ stick_length(r, Σx) = r * (1 - Σx) """ constrain_stick_ratio(k, y, K) Constrain the free variable `y` to the `k`th of `K` stick ratios. """ constrain_stick_ratio(k, y, K) = logistic(y - log(K - k)) """ free_stick_ratio(k, r, K) Free the `k`th stick ratio `r` of `K` stick ratios to an unconstrained variable. """ free_stick_ratio(k, r, K) = logit(r) + log(K - k) function clamp(::UnitSimplexConstraint, x) ϵ = eps(eltype(x)) return normalize(clamp.(x, ϵ, 1 - ϵ), 1) end clamp(::UnitSimplexConstraint, x::AbstractArray{<:ForwardDiff.Dual}) = x function free(c::UnitSimplexConstraint, x) K = constrain_dimension(c) @assert length(x) == K x = clamp(c, x) T = eltype(x) y = similar(x, K - 1) Σx = zero(T) @inbounds begin y[1] = free_stick_ratio(1, x[1], K) @simd for k = 2:(K - 1) Σx += x[k - 1] zₖ = stick_ratio(x[k], Σx) y[k] = free_stick_ratio(k, zₖ, K) end end return y end function constrain(c::UnitSimplexConstraint, y) K = constrain_dimension(c) @assert length(y) == free_dimension(c) x = Zygote.Buffer(y, K) Σx = zero(eltype(y)) @inbounds begin for k = 1:(K - 1) zₖ = constrain_stick_ratio(k, y[k], K) xₖ = stick_length(zₖ, Σx) x[k] = xₖ Σx += xₖ end x[K] = 1 - Σx end return clamp(c, copy(x)) end function constrain_with_logpdf_correction(c::UnitSimplexConstraint, y) K = constrain_dimension(c) @assert length(y) == free_dimension(c) T = eltype(y) x = Zygote.Buffer(y, K) Σx = zero(eltype(y)) logdetJ = log(K) / 2 @inbounds begin for k = 1:(K - 1) zₖ = constrain_stick_ratio(k, y[k], K) xₖ = stick_length(zₖ, Σx) x[k] = xₖ logdetJ += log(xₖ * (1 - zₖ)) Σx += xₖ end x[K] = 1 - Σx end return clamp(c, copy(x)), logdetJ end function constrain_with_pushlogpdf_grad( c::UnitSimplexConstraint, y::SubArray ) return constrain_with_pushlogpdf_grad(c, collect(y)) end """ JointConstraint{TC,RC,RF,NC,NF} <: VariableConstraint{NC,NF} Joint transformation on a series of constraints. This constraint type conveniently binds together a series of transformations on non-overlapping subarrays of a longer parameter array. # Constructor JointConstraint(constraints::VariableConstraint...) """ struct JointConstraint{TC,CR,CF,NC,NF} <: VariableConstraint{NC,NF} constraints::TC cranges::CR franges::CF function JointConstraint(constraints...) cs = merge_constraints(constraints...) ncs = map(constrain_dimension, cs) nc = sum(ncs) cranges = _ranges_from_lengths(ncs) nfs = map(free_dimension, cs) nf = sum(nfs) franges = _ranges_from_lengths(nfs) return new{typeof(cs),typeof(cranges),typeof(franges),nc,nf}(cs, cranges, franges) end end JointConstraint(c) = c """ merge_constraints(cs::VariableConstraint...) Merge adjacent constraints that can be merged. For example, `IdentityConstraint(3)` and `IdentityConstraint(2)` can be merged into a single `IdentityConstraint(5)`. """ merge_constraints(c1, c2, cs...) = reduce(merge_constraints, (c1, c2, cs...)) @inline merge_constraints(c1) = (c1,) @inline merge_constraints(c1, c2) = (c1, c2) @inline function merge_constraints(c1, c2::Tuple) return (merge_constraints(c1, c2[1])..., Base.tail(c2)...) end @inline function merge_constraints(c1::Tuple, c2) return (Base.front(c1)..., merge_constraints(c1[end], c2)...) end @inline function merge_constraints(c1::Tuple, c2::Tuple) return (Base.front(c1)..., merge_constraints(c1[end], c2[1])..., Base.tail(c2)...) end @inline function merge_constraints(::IdentityConstraint{M}, ::IdentityConstraint{N}) where {M,N} return (IdentityConstraint(M + N),) end function _ranges_from_lengths(lengths) ranges = UnitRange{Int}[] k = 1 for len in lengths push!(ranges, k:(k + len - 1)) k += len end return tuple(ranges...) end function Base.show(io::IO, mime::MIME"text/plain", jc::JointConstraint) print(io, "JointConstraint(") nconstraints = length(jc.constraints) if nconstraints > 0 print(io, "$(repr(mime, jc.constraints[1]))") if nconstraints > 10 print(io, ", $(repr(mime, jc.constraints[2]))") print(io, ", ...") print(io, ", $(repr(mime, jc.constraints[end-1]))") print(io, ", $(repr(mime, jc.constraints[end]))") else for i in 2:nconstraints print(io, ", $(repr(mime, jc.constraints[i]))") end end end print(io, ")") end function _parallel_free(cs, cranges, franges, nf, x) y = similar(x, nf) @simd for i in 1:length(cs) @inbounds begin xᵢ = view(x, cranges[i]) setindex!(y, free(cs[i], xᵢ), franges[i]) end end return y end function free(jc::JointConstraint, x) @assert length(x) == constrain_dimension(jc) return _parallel_free( jc.constraints, jc.cranges, jc.franges, free_dimension(jc), x ) end function _parallel_constrain(cs, cranges, franges, nc, y) x = similar(y, nc) @simd for i in 1:length(cs) @inbounds begin yᵢ = view(y, franges[i]) setindex!(x, constrain(cs[i], yᵢ), cranges[i]) end end return x end function constrain(jc::JointConstraint, y) @assert length(y) == free_dimension(jc) return _parallel_constrain( jc.constraints, jc.cranges, jc.franges, constrain_dimension(jc), y ) end function _parallel_constrain_with_logpdf_correction(cs, cranges, franges, nc, nf, y) x = similar(y, nc) TL = eltype(y) cinds = 1:length(cs) logdetJ = zero(TL) @simd for i in cinds @inbounds begin yᵢ = view(y, franges[i]) xᵢ, logdetJᵢ = constrain_with_logpdf_correction(cs[i], yᵢ) setindex!(x, xᵢ, cranges[i]) end logdetJ += logdetJᵢ end return x, logdetJ end Zygote.@adjoint function _parallel_constrain_with_logpdf_correction(cs, cranges, franges, nc, nf, y) x = similar(y, nc) TL = eltype(y) cinds = 1:length(cs) backs = [] logdetJ = zero(TL) @simd for i in cinds @inbounds begin yᵢ = view(y, franges[i]) (xᵢ, logdetJᵢ), backᵢ = ( Zygote.pullback(constrain_with_logpdf_correction, cs[i], yᵢ) ) setindex!(x, xᵢ, cranges[i]) end push!(backs, backᵢ) logdetJ += logdetJᵢ end return (x, logdetJ), function (Δ) x̄, logdetJ̄ = Δ TA = Base.promote_eltypeof(x̄, logdetJ̄) ȳ = similar(x̄, TA, nf) @simd for i in cinds @inbounds begin x̄ᵢ = view(x̄, cranges[i]) backᵢ = backs[i] ȳᵢ = backᵢ((x̄ᵢ, logdetJ̄))[2] setindex!(ȳ, ȳᵢ, franges[i]) end end return (nothing, nothing, nothing, nothing, nothing, ȳ) end end function constrain_with_logpdf_correction(jc::JointConstraint, y) nf = free_dimension(jc) @assert length(y) == nf return _parallel_constrain_with_logpdf_correction( jc.constraints, jc.cranges, jc.franges, constrain_dimension(jc), nf, y ) end function _parallel_constrain_with_pushlogpdf(cs, cranges, franges, nc, nf, y) x = similar(y, nc) pushes = [] cinds = 1:length(cs) logdetJs = [] @simd for i in cinds @inbounds begin yᵢ = view(y, franges[i]) xᵢ, pushᵢ = constrain_with_pushlogpdf(cs[i], yᵢ)::Tuple setindex!(x, xᵢ, cranges[i]) end push!(pushes, pushᵢ) end y1 = @inbounds y[1] function pushlogpdf(logπx) TL = Base.promote_eltypeof(y1, logπx) logdetJ = zero(TL) @simd for i in cinds @inbounds pushᵢ = pushes[i] logdetJᵢ = pushᵢ(zero(TL)) logdetJ += logdetJᵢ end logπy::TL = logπx + logdetJ return logπy end return x, pushlogpdf end function constrain_with_pushlogpdf(jc::JointConstraint, y) @assert length(y) == free_dimension(jc) return _parallel_constrain_with_pushlogpdf( jc.constraints, jc.cranges, jc.franges, constrain_dimension(jc), free_dimension(jc), y ) end function _parallel_constrain_with_pushlogpdf_grad(cs, cranges, franges, nc, nf, y) x = similar(y, nc) pushes = [] cinds = 1:length(cs) @simd for i in cinds @inbounds begin yᵢ = view(y, franges[i]) xᵢ, pushᵢ = constrain_with_pushlogpdf_grad(cs[i], yᵢ)::Tuple setindex!(x, xᵢ, cranges[i]) end push!(pushes, pushᵢ) end y1 = @inbounds y[1] function pushlogpdf_grad(logπx, ∇x_logπx) TL = Base.promote_eltypeof(y1, logπx, ∇x_logπx) ∇y_logπy = similar(∇x_logπx, nf) logdetJ = zero(TL) @simd for i in cinds @inbounds begin ∇x_logπxᵢ = view(∇x_logπx, cranges[i]) pushᵢ = pushes[i] logdetJᵢ, ∇y_logπyᵢ = pushᵢ(zero(logπx), ∇x_logπxᵢ)::Tuple setindex!(∇y_logπy, ∇y_logπyᵢ, franges[i]) end logdetJ += logdetJᵢ end logπy::TL = logπx + logdetJ return logπy, ∇y_logπy end return x, pushlogpdf_grad end function constrain_with_pushlogpdf_grad(jc::JointConstraint, y) @assert length(y) == free_dimension(jc) return _parallel_constrain_with_pushlogpdf_grad( jc.constraints, jc.cranges, jc.franges, constrain_dimension(jc), free_dimension(jc), y ) end
[ 2, 198, 2, 1482, 2536, 2913, 7071, 290, 25504, 198, 2, 198, 198, 11748, 7308, 25, 29405, 11, 198, 220, 220, 220, 905, 198, 3500, 44800, 2348, 29230, 25, 198, 220, 220, 220, 16605, 11, 198, 220, 220, 220, 2593, 11, 198, 220, 220, 220, 3487, 1096, 11, 198, 220, 220, 220, 2604, 8937, 15255, 11, 198, 220, 220, 220, 2604, 15255, 198, 3500, 20595, 37, 13271, 25, 198, 220, 220, 220, 2604, 270, 11, 198, 220, 220, 220, 2604, 2569, 198, 198, 37811, 198, 220, 220, 220, 35748, 3103, 2536, 2913, 90, 7792, 11, 21870, 92, 198, 198, 23839, 2099, 329, 38226, 319, 31070, 9633, 7997, 351, 198, 63, 7792, 63, 12, 19577, 30104, 326, 4439, 4600, 21870, 63, 12, 19577, 1479, 357, 403, 1102, 2536, 1328, 8, 198, 303, 5217, 13, 198, 198, 464, 4855, 7071, 318, 262, 604, 5499, 4600, 1102, 2536, 391, 47671, 4600, 5787, 47671, 198, 63, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 63, 290, 4600, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 44646, 198, 198, 2514, 3494, 257, 649, 32315, 11, 2391, 2251, 257, 649, 2099, 286, 4600, 43015, 3103, 2536, 2913, 63, 198, 392, 3494, 4600, 1102, 2536, 391, 63, 290, 4600, 5787, 44646, 26386, 5387, 5499, 389, 973, 284, 198, 15234, 485, 6942, 290, 7187, 26235, 26, 777, 743, 307, 625, 6058, 268, 329, 3220, 198, 45888, 618, 30063, 3915, 2334, 14, 30482, 672, 666, 3416, 1187, 389, 1900, 13, 383, 749, 198, 11321, 20957, 318, 4600, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 44646, 198, 37811, 198, 397, 8709, 2099, 35748, 3103, 2536, 2913, 90, 7792, 11, 21870, 92, 886, 198, 198, 37811, 198, 220, 220, 220, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 198, 198, 40489, 329, 27965, 319, 530, 12, 1462, 12, 505, 17778, 4600, 69, 25, 2343, 226, 251, 46256, 123, 15168, 2343, 226, 251, 46256, 123, 44646, 198, 37811, 198, 9979, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 796, 35748, 3103, 2536, 2913, 90, 45, 11, 45, 92, 198, 198, 37811, 198, 220, 220, 220, 791, 42524, 3103, 2536, 2913, 198, 198, 40489, 329, 27965, 319, 555, 42524, 17778, 4600, 69, 25, 2343, 226, 251, 15168, 2343, 226, 251, 44646, 791, 42524, 198, 1102, 2536, 6003, 460, 1011, 16578, 283, 17311, 290, 4439, 16578, 283, 23862, 13, 198, 37811, 198, 9979, 791, 42524, 3103, 2536, 2913, 796, 1881, 2514, 3198, 3103, 2536, 2913, 90, 16, 92, 628, 198, 21017, 198, 21017, 14392, 7071, 329, 17778, 198, 21017, 198, 198, 37811, 198, 220, 220, 220, 1479, 62, 46156, 7, 66, 3712, 43015, 3103, 2536, 2913, 8, 198, 198, 3855, 262, 1271, 286, 15225, 357, 13664, 8, 286, 262, 13459, 15879, 13, 198, 37811, 198, 5787, 62, 46156, 7, 3712, 43015, 3103, 2536, 2913, 90, 7792, 11, 21870, 30072, 810, 1391, 7792, 11, 21870, 92, 796, 41288, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 46156, 7, 66, 3712, 43015, 3103, 2536, 2913, 8, 198, 198, 3855, 262, 1271, 286, 15225, 357, 13664, 8, 286, 262, 31070, 15879, 13, 198, 37811, 198, 1102, 2536, 391, 62, 46156, 7, 3712, 43015, 3103, 2536, 2913, 90, 7792, 30072, 810, 1391, 7792, 92, 796, 8823, 198, 198, 37811, 198, 220, 220, 220, 29405, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 2124, 8, 198, 198, 13615, 4600, 87, 47671, 13359, 326, 663, 1988, 45104, 262, 32315, 13, 770, 318, 4465, 198, 1462, 3368, 29052, 24842, 618, 257, 1988, 1474, 82, 262, 18645, 4006, 13, 198, 464, 29405, 318, 14836, 1141, 32488, 13, 198, 37811, 198, 8818, 29405, 886, 198, 198, 2, 17454, 48476, 740, 9224, 1563, 82, 329, 29405, 198, 57, 35641, 1258, 13, 31, 41255, 1563, 29405, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 2124, 8, 796, 29405, 7, 66, 11, 2124, 828, 37455, 4613, 357, 22366, 11, 37455, 8, 198, 198, 37811, 198, 220, 220, 220, 1479, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 2124, 8, 198, 198, 4863, 31070, 7885, 4600, 87, 47671, 5678, 1479, 7885, 13, 198, 37811, 198, 8818, 1479, 886, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1479, 7, 66, 3712, 3118, 42524, 3103, 2536, 2913, 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, 2124, 3712, 23839, 38469, 8, 198, 220, 220, 220, 1441, 685, 5787, 7, 66, 11, 2124, 58, 16, 12962, 60, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 7885, 4600, 88, 47671, 5678, 31070, 7885, 13, 198, 37811, 198, 8818, 1500, 3201, 886, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1500, 3201, 7, 66, 3712, 3118, 42524, 3103, 2536, 2913, 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, 331, 3712, 23839, 38469, 8, 198, 220, 220, 220, 1441, 685, 1102, 2536, 391, 7, 66, 11, 331, 58, 16, 12962, 60, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 7885, 4600, 88, 796, 277, 7, 87, 8, 63, 651, 262, 31070, 7885, 4600, 87, 63, 290, 262, 198, 2860, 83, 425, 17137, 284, 262, 2604, 12109, 4600, 6404, 18074, 222, 7, 87, 8, 63, 284, 651, 4600, 6404, 18074, 222, 7, 87, 8, 44646, 4091, 198, 58, 63, 5787, 62, 6404, 12315, 62, 10215, 8243, 63, 16151, 31, 5787, 62, 6404, 12315, 62, 10215, 8243, 737, 198, 37811, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 1500, 3201, 7, 66, 11, 331, 8, 198, 220, 220, 220, 2604, 15255, 41, 796, 1479, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 11, 331, 8, 198, 220, 220, 220, 1441, 2124, 11, 2604, 15255, 41, 198, 437, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 198, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 3118, 42524, 3103, 2536, 2913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 3712, 23839, 38469, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2124, 11, 2604, 15255, 41, 796, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 11, 331, 58, 16, 12962, 198, 220, 220, 220, 1441, 685, 87, 4357, 2604, 15255, 41, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 7885, 4600, 88, 796, 277, 7, 87, 8, 63, 651, 262, 31070, 7885, 4600, 87, 63, 290, 257, 649, 198, 8818, 326, 20070, 2651, 262, 2604, 12109, 4600, 6404, 18074, 222, 7, 87, 8, 63, 351, 2461, 284, 4600, 87, 63, 290, 198, 1462, 262, 11188, 2604, 12109, 4600, 6404, 18074, 222, 7, 88, 8, 63, 351, 2461, 284, 4600, 88, 44646, 198, 198, 15506, 63, 73, 43640, 198, 87, 11, 4574, 6404, 12315, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 66, 11, 331, 8, 198, 6404, 46582, 87, 796, 2644, 1303, 3082, 1133, 12109, 287, 31070, 2272, 198, 6404, 46582, 88, 796, 4574, 6404, 12315, 7, 6404, 46582, 87, 8, 198, 15506, 63, 198, 37811, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 66, 11, 331, 8, 198, 220, 220, 220, 2124, 11, 2604, 15255, 41, 796, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 11, 331, 8, 198, 220, 220, 220, 1441, 2124, 11, 2604, 46582, 87, 4613, 2604, 46582, 87, 1343, 2604, 15255, 41, 198, 437, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 198, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 3118, 42524, 3103, 2536, 2913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 3712, 23839, 38469, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2124, 11, 4574, 6404, 12315, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 66, 11, 331, 58, 16, 12962, 198, 220, 220, 220, 1441, 685, 87, 4357, 4574, 6404, 12315, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 7885, 4600, 88, 796, 277, 7, 87, 8, 63, 651, 262, 31070, 7885, 4600, 87, 63, 290, 257, 649, 198, 8818, 326, 20070, 2651, 262, 2604, 12109, 4600, 6404, 18074, 222, 7, 87, 8, 63, 351, 2461, 284, 4600, 87, 63, 290, 198, 896, 31312, 284, 262, 11188, 2604, 12109, 4600, 6404, 18074, 222, 7, 88, 8, 63, 351, 2461, 284, 4600, 88, 63, 290, 198, 896, 31312, 13, 198, 198, 15506, 63, 73, 43640, 198, 87, 11, 4574, 6404, 12315, 62, 9744, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 11, 331, 8, 198, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 796, 2644, 1303, 3082, 1133, 12109, 290, 663, 31312, 287, 31070, 2272, 198, 6404, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 796, 4574, 6404, 12315, 62, 9744, 7, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 15506, 63, 198, 37811, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 11, 331, 8, 198, 220, 220, 220, 357, 87, 11, 2604, 15255, 41, 828, 736, 796, 1168, 35641, 1258, 13, 31216, 1891, 7, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 11, 269, 11, 331, 8, 198, 220, 220, 220, 299, 69, 796, 1479, 62, 46156, 7, 66, 8, 628, 220, 220, 220, 1441, 2124, 11, 2163, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 1168, 35641, 1258, 13, 82, 40545, 7, 6404, 15255, 41, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 46582, 88, 796, 2604, 46582, 87, 1343, 2604, 15255, 41, 198, 220, 220, 220, 220, 220, 220, 220, 309, 796, 1288, 4906, 7, 6404, 46582, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 88, 62, 6404, 46582, 88, 796, 2092, 7, 24861, 229, 87, 62, 6404, 46582, 87, 11, 309, 11, 299, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4866, 1462, 0, 7, 24861, 229, 88, 62, 6404, 46582, 88, 11, 736, 19510, 24861, 229, 87, 62, 6404, 46582, 87, 11, 264, 4008, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 3712, 3118, 42524, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 198, 220, 220, 220, 357, 87, 11, 2604, 15255, 41, 828, 736, 796, 1168, 35641, 1258, 13, 31216, 1891, 7, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 11, 269, 11, 331, 8, 628, 220, 220, 220, 1441, 2124, 11, 2163, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 3712, 15633, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 1168, 35641, 1258, 13, 82, 40545, 7, 6404, 15255, 41, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 46582, 88, 796, 2604, 46582, 87, 1343, 2604, 15255, 41, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 88, 62, 6404, 46582, 88, 796, 736, 19510, 24861, 229, 87, 62, 6404, 46582, 87, 11, 264, 4008, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 198, 220, 220, 220, 886, 198, 437, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 198, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 3118, 42524, 3103, 2536, 2913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 3712, 23839, 38469, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2124, 11, 4574, 6404, 12315, 62, 9744, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 11, 331, 58, 16, 12962, 198, 220, 220, 220, 1441, 685, 87, 4357, 2163, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 3712, 23839, 38469, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 796, 4574, 6404, 12315, 62, 9744, 7, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 46582, 88, 11, 685, 24861, 229, 88, 62, 6404, 46582, 88, 60, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 30482, 672, 666, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 15879, 4600, 88, 796, 277, 7, 87, 8, 47671, 24061, 262, 12806, 666, 17593, 286, 262, 34062, 198, 7645, 1161, 4600, 87, 796, 277, 46256, 119, 126, 117, 7, 88, 8, 63, 351, 12784, 4600, 41, 39611, 95, 158, 109, 120, 796, 18872, 224, 87, 39611, 95, 14, 24861, 224, 88, 158, 109, 120, 44646, 198, 37811, 198, 8818, 1500, 3201, 62, 30482, 672, 666, 7, 66, 11, 331, 8, 198, 220, 220, 220, 299, 69, 796, 1479, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 1303, 24550, 25, 670, 12, 14145, 284, 787, 2651, 62, 30482, 672, 666, 2099, 12, 259, 2232, 81, 540, 198, 220, 220, 220, 1303, 766, 3740, 1378, 12567, 13, 785, 14, 37, 22564, 5805, 14, 57, 35641, 1258, 13, 20362, 14, 37165, 14, 22579, 198, 220, 220, 220, 410, 796, 3254, 7, 1084, 7, 77, 69, 11, 19530, 28813, 13, 7206, 38865, 62, 3398, 4944, 42, 62, 4221, 19535, 39, 15173, 4008, 198, 220, 220, 220, 1303, 24550, 25, 1168, 35641, 1258, 338, 357, 50188, 12, 14171, 8, 12806, 1547, 389, 9224, 1563, 82, 198, 220, 220, 220, 449, 17478, 796, 938, 7, 57, 35641, 1258, 13, 11813, 62, 30482, 672, 666, 7, 88, 4613, 1500, 3201, 7, 66, 11, 331, 828, 331, 11, 410, 4008, 198, 220, 220, 220, 1441, 9224, 1563, 7, 41, 17478, 8, 198, 437, 198, 198, 2, 24550, 25, 5521, 14145, 1566, 1168, 35641, 1258, 6971, 46282, 12806, 1547, 198, 2, 766, 3740, 1378, 12567, 13, 785, 14, 37, 22564, 5805, 14, 57, 35641, 1258, 13, 20362, 14, 37165, 14, 22515, 198, 57, 35641, 1258, 13, 31, 41255, 1563, 2163, 1500, 3201, 62, 30482, 672, 666, 7, 66, 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, 331, 3712, 23839, 38469, 8, 198, 220, 220, 220, 299, 69, 796, 1479, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 299, 66, 796, 1500, 3201, 62, 46156, 7, 66, 8, 628, 220, 220, 220, 474, 330, 7, 88, 8, 796, 19530, 28813, 13, 30482, 672, 666, 7, 88, 3784, 1102, 2536, 391, 7, 66, 11, 331, 828, 331, 8, 198, 220, 220, 220, 449, 796, 2092, 7, 88, 11, 357, 10782, 11, 299, 69, 4008, 198, 220, 220, 220, 814, 411, 796, 10631, 25468, 13, 46751, 666, 23004, 7, 41, 11, 331, 8, 198, 220, 220, 220, 814, 411, 796, 19530, 28813, 13, 30482, 672, 666, 0, 7, 26069, 411, 11, 474, 330, 11, 331, 8, 198, 220, 220, 220, 449, 796, 10631, 25468, 13, 8367, 7, 26069, 411, 8, 198, 220, 220, 220, 18872, 229, 88, 62, 41, 796, 27179, 1758, 7, 28813, 25468, 13, 30482, 672, 666, 7, 26069, 411, 828, 357, 10782, 11, 299, 69, 11, 299, 69, 4008, 628, 220, 220, 220, 1441, 449, 11, 2163, 357, 41, 136, 226, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 68, 1040, 388, 331, 136, 226, 58, 74, 60, 19039, 449, 136, 226, 58, 72, 11, 73, 60, 1635, 18872, 229, 88, 62, 41, 58, 72, 11, 73, 11, 74, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 22366, 11, 331, 136, 226, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 30482, 672, 666, 7, 66, 3712, 3118, 42524, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 16578, 283, 4600, 88, 796, 277, 7, 87, 8, 47671, 24061, 262, 27255, 286, 262, 34062, 198, 7645, 1161, 4600, 87, 796, 277, 46256, 119, 126, 117, 7, 88, 8, 47671, 4600, 34350, 14, 9892, 44646, 198, 37811, 198, 8818, 1500, 3201, 62, 30482, 672, 666, 7, 66, 3712, 3118, 42524, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 44332, 62, 9892, 796, 1168, 35641, 1258, 13, 49607, 7, 1102, 2536, 391, 11, 269, 11, 331, 38381, 17, 60, 198, 220, 220, 220, 1441, 44332, 62, 9892, 198, 437, 198, 198, 14881, 13, 31, 22930, 37861, 62, 259, 65, 3733, 2163, 1500, 3201, 62, 30482, 672, 666, 7, 198, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 3118, 42524, 3103, 2536, 2913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 3712, 23839, 19182, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 685, 1102, 2536, 391, 62, 30482, 672, 666, 7, 66, 11, 331, 58, 16, 12962, 60, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2063, 6404, 15255, 76, 377, 7, 87, 3712, 23839, 46912, 8, 198, 198, 1890, 257, 17593, 4600, 87, 47671, 24061, 4600, 23141, 6404, 7, 15255, 357, 87, 6, 2124, 4008, 44646, 198, 37811, 198, 13959, 6404, 15255, 76, 377, 7, 87, 8, 796, 2604, 15255, 7, 87, 6, 1635, 2124, 8, 1220, 362, 198, 198, 2, 2183, 9224, 1563, 329, 3731, 2866, 12, 929, 198, 57, 35641, 1258, 13, 31, 41255, 1563, 2163, 2063, 6404, 15255, 76, 377, 7, 87, 3712, 23839, 19182, 8, 198, 220, 220, 220, 264, 796, 2124, 6, 1635, 2124, 198, 220, 220, 220, 1441, 2604, 15255, 7, 82, 8, 1220, 362, 11, 37455, 4613, 357, 138, 242, 1635, 357, 87, 1635, 800, 7, 82, 36911, 8, 1303, 4600, 138, 242, 1635, 2124, 46256, 118, 39611, 222, 63, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1479, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 43015, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 15879, 4600, 88, 47671, 24061, 17137, 284, 2604, 37124, 329, 13389, 13, 11259, 198, 64, 13389, 4600, 69, 25, 2124, 17804, 99, 331, 47671, 663, 34062, 4600, 69, 46256, 119, 126, 117, 25, 331, 17804, 99, 2124, 47671, 290, 37124, 4600, 46582, 7, 87, 8, 47671, 262, 2604, 198, 12315, 286, 262, 14434, 12109, 318, 198, 198, 63, 6404, 18074, 222, 7, 88, 8, 796, 2604, 18074, 222, 7, 69, 46256, 119, 126, 117, 7, 88, 4008, 1343, 25208, 6404, 7, 15255, 402, 8, 47671, 198, 198, 3003, 4600, 15255, 402, 63, 318, 262, 3416, 415, 286, 262, 17593, 4600, 38, 796, 449, 39611, 222, 449, 47671, 290, 4600, 41, 63, 318, 262, 198, 46751, 666, 17593, 286, 262, 34062, 13389, 351, 12784, 4600, 41, 39611, 95, 158, 109, 120, 796, 18872, 224, 87, 39611, 95, 14, 24861, 224, 88, 158, 109, 120, 44646, 198, 1212, 1255, 318, 1900, 355, 262, 1989, 10451, 13, 198, 198, 1212, 2163, 5860, 4600, 23141, 6404, 7, 15255, 402, 8, 63, 329, 262, 2276, 1339, 286, 4600, 69, 25, 2343, 226, 251, 39611, 238, 15168, 2343, 226, 251, 46256, 123, 44646, 198, 37811, 198, 8818, 1479, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 11, 331, 8, 198, 220, 220, 220, 2488, 30493, 1479, 62, 46156, 7, 66, 8, 19841, 1500, 3201, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 449, 796, 1500, 3201, 62, 30482, 672, 666, 7, 66, 11, 331, 8, 198, 220, 220, 220, 1441, 2063, 6404, 15255, 76, 377, 7, 41, 8, 198, 437, 198, 198, 62, 6404, 8937, 15255, 7, 87, 8, 796, 717, 7, 6404, 8937, 15255, 7, 87, 4008, 198, 62, 6404, 8937, 15255, 7, 87, 3712, 15633, 8, 796, 2604, 7, 8937, 7, 87, 4008, 198, 198, 37811, 198, 220, 220, 220, 1479, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 3198, 2514, 3198, 3103, 2536, 2913, 11, 331, 8, 198, 198, 4863, 1479, 7885, 4600, 88, 47671, 24061, 17137, 284, 2604, 37124, 329, 13389, 13, 1114, 198, 64, 530, 12, 1462, 12, 505, 13389, 351, 257, 6616, 12806, 666, 11, 262, 17137, 7106, 6945, 198, 1462, 4600, 6404, 930, 15255, 449, 91, 44646, 198, 37811, 198, 8818, 1479, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 3198, 2514, 3198, 3103, 2536, 2913, 11, 331, 3712, 23839, 38469, 8, 198, 220, 220, 220, 449, 796, 1500, 3201, 62, 30482, 672, 666, 7, 66, 11, 331, 8, 198, 220, 220, 220, 1441, 717, 7, 6404, 8937, 15255, 7, 41, 4008, 198, 437, 628, 198, 21017, 198, 21017, 1482, 2536, 2913, 25504, 198, 21017, 198, 198, 37811, 198, 220, 220, 220, 27207, 3103, 2536, 2913, 90, 45, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 198, 198, 5211, 12, 22366, 32315, 319, 4600, 158, 226, 251, 46256, 123, 47671, 11188, 284, 262, 5369, 2163, 319, 198, 63, 77, 63, 12, 19577, 9633, 13, 34774, 329, 11282, 12207, 1359, 286, 31070, 198, 4480, 21254, 2536, 1328, 9633, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 27207, 3103, 2536, 2913, 7, 77, 3712, 5317, 8, 198, 37811, 198, 7249, 27207, 3103, 2536, 2913, 90, 45, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 886, 198, 198, 7390, 26858, 3103, 2536, 2913, 7, 77, 8, 796, 27207, 3103, 2536, 2913, 90, 77, 92, 3419, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 7390, 26858, 3103, 2536, 2913, 90, 45, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 7390, 26858, 3103, 2536, 2913, 16763, 45, 8, 4943, 198, 437, 198, 198, 565, 696, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 2124, 8, 796, 2124, 198, 565, 696, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 2124, 3712, 39746, 28813, 13, 36248, 8, 796, 2124, 198, 198, 5787, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 16, 5512, 2124, 3712, 15633, 8, 796, 2124, 198, 5787, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 2124, 3712, 23839, 38469, 8, 796, 2124, 198, 198, 1102, 2536, 391, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 16, 5512, 331, 3712, 15633, 8, 796, 331, 198, 1102, 2536, 391, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 331, 3712, 23839, 38469, 8, 796, 331, 198, 198, 5787, 62, 6404, 12315, 62, 10215, 8243, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 16, 5512, 331, 3712, 15633, 8, 796, 6632, 7, 417, 4906, 7, 88, 4008, 198, 5787, 62, 6404, 12315, 62, 10215, 8243, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 331, 3712, 23839, 38469, 8, 796, 6632, 7, 417, 4906, 7, 88, 4008, 198, 198, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 16, 5512, 331, 3712, 15633, 8, 796, 331, 11, 5369, 198, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 331, 3712, 23839, 38469, 8, 796, 331, 11, 5369, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 16, 5512, 331, 3712, 15633, 8, 198, 220, 220, 220, 1441, 331, 11, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 4613, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 3712, 7390, 26858, 3103, 2536, 2913, 11, 331, 3712, 23839, 38469, 8, 198, 220, 220, 220, 1441, 331, 11, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 4613, 357, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 16048, 33, 6302, 3103, 2536, 2913, 90, 51, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 198, 3103, 2536, 2913, 319, 257, 16578, 283, 326, 318, 14084, 3744, 621, 257, 2793, 5421, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 16048, 33, 6302, 3103, 2536, 2913, 7, 23160, 8, 198, 37811, 198, 7249, 16048, 33, 6302, 3103, 2536, 2913, 90, 51, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 220, 220, 220, 18360, 3712, 51, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 269, 3712, 31426, 33, 6302, 3103, 2536, 2913, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 31426, 33, 6302, 3103, 2536, 2913, 16763, 7, 66, 13, 23160, 4008, 4943, 198, 437, 198, 198, 565, 696, 7, 66, 3712, 31426, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 3509, 7, 87, 11, 269, 13, 23160, 1343, 304, 862, 7, 87, 4008, 198, 565, 696, 7, 3712, 31426, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 39746, 28813, 13, 36248, 8, 796, 2124, 198, 198, 5787, 7, 66, 3712, 31426, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 2604, 7, 565, 696, 7, 66, 11, 2124, 8, 532, 269, 13, 23160, 8, 198, 198, 1102, 2536, 391, 7, 66, 3712, 31426, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 796, 29405, 7, 66, 11, 1033, 7, 88, 8, 1343, 269, 13, 23160, 8, 198, 198, 5787, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 31426, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 796, 331, 628, 198, 37811, 198, 220, 220, 220, 20390, 33, 6302, 3103, 2536, 2913, 90, 51, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 198, 3103, 2536, 2913, 319, 257, 16578, 283, 326, 318, 14084, 1342, 621, 281, 6727, 5421, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 20390, 33, 6302, 3103, 2536, 2913, 7, 549, 8, 198, 37811, 198, 7249, 20390, 33, 6302, 3103, 2536, 2913, 90, 51, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 220, 220, 220, 20967, 3712, 51, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 269, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 52, 2848, 33, 6302, 3103, 2536, 2913, 16763, 7, 66, 13, 549, 4008, 4943, 198, 437, 198, 198, 565, 696, 7, 66, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 949, 7, 87, 11, 269, 13, 549, 532, 304, 862, 7, 87, 4008, 198, 565, 696, 7, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 39746, 28813, 13, 36248, 8, 796, 2124, 198, 198, 5787, 7, 66, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 2604, 7, 66, 13, 549, 532, 29405, 7, 66, 11, 2124, 4008, 198, 198, 1102, 2536, 391, 7, 66, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 796, 29405, 7, 66, 11, 269, 13, 549, 532, 1033, 7, 88, 4008, 198, 198, 5787, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 52, 2848, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 796, 331, 628, 198, 37811, 198, 220, 220, 220, 347, 6302, 3103, 2536, 2913, 90, 14990, 11, 51, 52, 11, 21016, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 198, 3103, 2536, 2913, 319, 257, 16578, 283, 326, 318, 468, 1111, 281, 6727, 290, 2793, 5421, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 347, 6302, 3103, 2536, 2913, 7, 23160, 11, 20967, 8, 198, 37811, 198, 7249, 347, 6302, 3103, 2536, 2913, 90, 14990, 11, 51, 52, 11, 21016, 92, 1279, 25, 791, 42524, 3103, 2536, 2913, 198, 220, 220, 220, 18360, 3712, 14990, 198, 220, 220, 220, 20967, 3712, 51, 52, 198, 220, 220, 220, 25979, 3712, 21016, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 269, 3712, 33, 6302, 3103, 2536, 2913, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 33, 6302, 3103, 2536, 2913, 16763, 7, 66, 13, 23160, 828, 29568, 66, 13, 549, 4008, 4943, 198, 437, 198, 198, 8818, 347, 6302, 3103, 2536, 2913, 7, 23160, 3712, 15633, 11, 20967, 3712, 15633, 8, 198, 220, 220, 220, 2488, 30493, 18360, 1279, 20967, 198, 220, 220, 220, 1441, 347, 6302, 3103, 2536, 2913, 7, 23160, 11, 20967, 11, 20967, 532, 18360, 8, 198, 437, 198, 198, 565, 696, 7, 66, 3712, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 29405, 7, 87, 11, 269, 13, 23160, 1343, 304, 862, 7, 87, 828, 269, 13, 549, 532, 304, 862, 7, 87, 4008, 198, 565, 696, 7, 3712, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 39746, 28813, 13, 36248, 8, 796, 2124, 198, 198, 5787, 7, 66, 3712, 33, 6302, 3103, 2536, 2913, 11, 2124, 3712, 15633, 8, 796, 2604, 270, 19510, 565, 696, 7, 66, 11, 2124, 8, 532, 269, 13, 23160, 8, 1220, 269, 13, 67, 12514, 8, 198, 198, 1102, 2536, 391, 7, 66, 3712, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 796, 29405, 7, 66, 11, 269, 13, 67, 12514, 1635, 2604, 2569, 7, 88, 8, 1343, 269, 13, 23160, 8, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 33, 6302, 3103, 2536, 2913, 11, 331, 3712, 15633, 8, 198, 220, 220, 220, 1976, 796, 2604, 2569, 7, 88, 8, 198, 220, 220, 220, 1619, 89, 796, 269, 13, 67, 12514, 1635, 1976, 198, 220, 220, 220, 2124, 796, 1619, 89, 1343, 269, 13, 23160, 198, 220, 220, 220, 44332, 62, 9892, 796, 1619, 89, 1635, 357, 16, 532, 1976, 8, 198, 220, 220, 220, 1441, 29405, 7, 66, 11, 2124, 828, 2604, 7, 34350, 62, 9892, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 26981, 3103, 2536, 2913, 7, 23160, 3712, 15633, 11, 20967, 3712, 15633, 8, 198, 198, 3103, 48109, 23772, 329, 2793, 20995, 6727, 20995, 2793, 12, 290, 6727, 20995, 290, 555, 12, 65, 6302, 198, 403, 42524, 17778, 13, 383, 3376, 2099, 318, 7147, 1912, 319, 262, 7159, 13, 198, 37811, 198, 8818, 26981, 3103, 2536, 2913, 7, 23160, 10779, 18943, 11, 20967, 28, 18943, 8, 198, 220, 220, 220, 2488, 30493, 18360, 1279, 20967, 198, 220, 220, 220, 468, 62, 23160, 11, 468, 62, 549, 796, 318, 69, 9504, 7, 23160, 828, 318, 69, 9504, 7, 549, 8, 198, 220, 220, 220, 611, 468, 62, 23160, 11405, 468, 62, 549, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 347, 6302, 3103, 2536, 2913, 7, 23160, 11, 20967, 8, 198, 220, 220, 220, 2073, 361, 468, 62, 23160, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 16048, 33, 6302, 3103, 2536, 2913, 7, 23160, 8, 198, 220, 220, 220, 2073, 361, 468, 62, 549, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 20390, 33, 6302, 3103, 2536, 2913, 7, 549, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 27207, 3103, 2536, 2913, 7, 16, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 11801, 38469, 3103, 2536, 2913, 90, 45, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 198, 198, 8291, 1161, 422, 281, 4600, 77, 63, 12, 19577, 4326, 12, 31364, 284, 281, 21254, 2536, 1328, 198, 63, 77, 63, 12, 19577, 15879, 13, 5740, 326, 287, 428, 1339, 262, 34062, 13389, 198, 7, 158, 226, 241, 31185, 12, 11265, 1634, 8, 318, 407, 3748, 11, 290, 4361, 262, 4574, 11813, 12109, 2314, 198, 1350, 6492, 1262, 262, 6678, 12806, 666, 8173, 13, 198, 198, 4864, 11, 1262, 262, 1109, 326, 257, 3210, 1963, 42524, 7685, 9387, 198, 31364, 618, 39279, 318, 42096, 9387, 319, 257, 16558, 11, 356, 460, 4574, 198, 11813, 262, 8187, 3953, 319, 262, 16558, 416, 11524, 257, 3210, 1963, 42524, 198, 11265, 3161, 284, 4600, 88, 44646, 383, 11188, 2604, 12109, 17137, 318, 4600, 12, 23141, 331, 39611, 222, 331, 796, 532, 23141, 198, 91, 88, 91, 31185, 44646, 198, 198, 464, 12806, 666, 286, 262, 34062, 13389, 318, 257, 39279, 20128, 17593, 198, 5957, 262, 13875, 298, 2272, 284, 262, 16558, 379, 4600, 87, 63, 25, 4600, 41, 796, 7377, 254, 158, 224, 241, 1220, 930, 88, 91, 47671, 810, 198, 63, 138, 254, 158, 224, 241, 796, 314, 532, 2124, 39611, 222, 2124, 44646, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 11801, 38469, 3103, 2536, 2913, 7, 77, 3712, 5317, 8, 198, 37811, 198, 7249, 11801, 38469, 3103, 2536, 2913, 90, 45, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 886, 198, 198, 26453, 38469, 3103, 2536, 2913, 7, 77, 8, 796, 11801, 38469, 3103, 2536, 2913, 90, 77, 92, 3419, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 26453, 38469, 3103, 2536, 2913, 90, 45, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 26453, 38469, 3103, 2536, 2913, 16763, 45, 8, 4943, 198, 437, 198, 198, 565, 696, 7, 3712, 26453, 38469, 3103, 2536, 2913, 11, 2124, 8, 796, 3487, 1096, 7, 87, 8, 198, 565, 696, 7, 3712, 26453, 38469, 3103, 2536, 2913, 11, 2124, 3712, 23839, 19182, 90, 27, 25, 39746, 28813, 13, 36248, 30072, 796, 2124, 198, 198, 5787, 7, 66, 3712, 26453, 38469, 3103, 2536, 2913, 11, 2124, 8, 796, 29405, 7, 66, 11, 2124, 8, 198, 198, 8818, 1500, 3201, 7, 3712, 26453, 38469, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 331, 24457, 2593, 7, 88, 8, 198, 220, 220, 220, 1441, 2124, 198, 437, 198, 198, 8818, 3487, 1096, 62, 4480, 62, 27237, 7, 88, 8, 198, 220, 220, 220, 299, 88, 796, 2593, 7, 88, 8, 198, 220, 220, 220, 1441, 331, 24457, 299, 88, 11, 299, 88, 198, 437, 198, 198, 57, 35641, 1258, 13, 31, 41255, 1563, 2163, 3487, 1096, 62, 4480, 62, 27237, 7, 88, 8, 198, 220, 220, 220, 2124, 11, 299, 88, 796, 3487, 1096, 62, 4480, 62, 27237, 7, 88, 8, 198, 220, 220, 220, 1441, 357, 87, 11, 299, 88, 828, 2163, 357, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 136, 226, 11, 299, 136, 226, 88, 136, 226, 796, 37455, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 87, 136, 226, 24457, 299, 88, 764, 12, 2124, 764, 9, 357, 26518, 7, 87, 11, 2124, 136, 226, 8, 1220, 299, 88, 532, 299, 136, 226, 88, 136, 226, 828, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 3712, 26453, 38469, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2124, 11, 299, 88, 796, 3487, 1096, 62, 4480, 62, 27237, 7, 88, 8, 198, 220, 220, 220, 2604, 15255, 41, 796, 532, 3281, 61, 17, 1220, 362, 198, 220, 220, 220, 1441, 2124, 11, 2604, 15255, 41, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 11801, 38469, 3351, 3021, 3103, 2536, 2913, 90, 45, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 198, 198, 8291, 1161, 422, 281, 4600, 77, 63, 12, 19577, 4326, 12, 31364, 284, 281, 21254, 2536, 1328, 198, 63, 77, 63, 12, 19577, 15879, 11, 27464, 416, 257, 5766, 286, 7559, 81, 15506, 13, 198, 198, 15506, 81, 15506, 318, 16173, 355, 257, 16874, 13, 770, 318, 5292, 284, 2222, 47424, 14, 421, 9205, 295, 198, 303, 5217, 284, 262, 976, 27665, 4238, 5046, 355, 584, 9633, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 11801, 38469, 3351, 3021, 3103, 2536, 2913, 7, 77, 3712, 5317, 11, 374, 796, 352, 8, 198, 37811, 198, 7249, 11801, 38469, 3351, 3021, 3103, 2536, 2913, 90, 45, 11, 51, 27, 25, 15633, 92, 1279, 25, 1881, 2514, 3198, 3103, 2536, 2913, 90, 45, 92, 198, 220, 220, 220, 374, 3712, 51, 628, 220, 220, 220, 2163, 11801, 38469, 3351, 3021, 3103, 2536, 2913, 90, 45, 11, 51, 92, 7, 81, 3712, 51, 8, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 220, 220, 220, 220, 318, 41433, 7, 45, 8, 11405, 399, 1875, 657, 8614, 3714, 7, 43961, 12331, 7203, 45, 1276, 307, 257, 3967, 18253, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 374, 1875, 657, 8614, 3714, 7, 43961, 12331, 7203, 81, 1276, 307, 14084, 3967, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 45, 11, 51, 92, 7, 81, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 7, 77, 11, 374, 796, 352, 13, 15, 8, 796, 11801, 38469, 3351, 3021, 3103, 2536, 2913, 90, 77, 11, 4906, 1659, 7, 81, 38165, 7, 81, 8, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 90, 45, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 16763, 45, 11, 269, 13, 81, 8, 4943, 198, 437, 198, 198, 565, 696, 7, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 11, 2124, 8, 796, 3487, 1096, 7, 87, 8, 198, 565, 696, 7, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 11, 2124, 3712, 23839, 19182, 90, 27, 25, 39746, 28813, 13, 36248, 30072, 796, 2124, 198, 198, 5787, 7, 66, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 11, 2124, 8, 796, 3487, 1096, 7, 87, 8, 764, 9, 269, 13, 81, 198, 198, 8818, 1500, 3201, 7, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 331, 24457, 2593, 7, 88, 8, 198, 220, 220, 220, 1441, 2124, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 26453, 38469, 3351, 3021, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2124, 11, 299, 88, 796, 3487, 1096, 62, 4480, 62, 27237, 7, 88, 8, 198, 220, 220, 220, 2604, 15255, 41, 796, 532, 7, 3281, 1220, 269, 13, 81, 8, 61, 17, 1220, 362, 198, 220, 220, 220, 1441, 2124, 11, 2604, 15255, 41, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 11801, 8890, 11141, 3103, 2536, 2913, 90, 45, 11, 44, 92, 1279, 25, 35748, 3103, 2536, 2913, 90, 45, 11, 44, 92, 198, 198, 8291, 1161, 422, 281, 4600, 77, 63, 12, 19577, 15879, 286, 3967, 302, 874, 351, 257, 4326, 198, 158, 226, 241, 126, 117, 12, 27237, 284, 281, 21254, 2536, 1328, 4600, 76, 796, 299, 532, 352, 63, 12, 19577, 15879, 13, 198, 198, 1212, 32315, 3544, 262, 4859, 12, 13395, 1429, 284, 8160, 262, 13389, 13, 198, 6214, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 35277, 488, 1616, 62, 14681, 2, 464, 62, 13915, 12, 13395, 62, 14681, 198, 1640, 517, 3307, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 11801, 8890, 11141, 3103, 2536, 2913, 7, 77, 3712, 5317, 8, 198, 37811, 198, 7249, 11801, 8890, 11141, 3103, 2536, 2913, 90, 45, 11, 44, 92, 1279, 25, 35748, 3103, 2536, 2913, 90, 45, 11, 44, 92, 886, 198, 198, 26453, 8890, 11141, 3103, 2536, 2913, 7, 77, 3712, 5317, 8, 796, 11801, 8890, 11141, 3103, 2536, 2913, 90, 77, 11, 77, 12, 16, 92, 3419, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 90, 45, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 26453, 8890, 11141, 3103, 2536, 2913, 16763, 45, 8, 4943, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4859, 62, 10366, 952, 7, 87, 11, 7377, 96, 87, 8, 198, 198, 31737, 257, 3704, 286, 4129, 4600, 87, 63, 572, 286, 257, 4326, 12, 13664, 4859, 572, 286, 543, 5207, 286, 198, 23350, 4129, 4600, 138, 96, 87, 63, 423, 1541, 587, 5445, 13, 8229, 262, 8064, 286, 262, 4129, 4600, 87, 63, 198, 1462, 262, 5637, 4129, 286, 262, 4859, 13, 198, 37811, 198, 13915, 62, 10366, 952, 7, 87, 11, 7377, 96, 87, 8, 796, 2124, 1220, 357, 16, 532, 7377, 96, 87, 8, 198, 198, 37811, 198, 220, 220, 220, 4859, 62, 13664, 7, 81, 11, 7377, 96, 87, 8, 198, 198, 818, 4399, 286, 4600, 13915, 62, 10366, 952, 44646, 198, 37811, 198, 13915, 62, 13664, 7, 81, 11, 7377, 96, 87, 8, 796, 374, 1635, 357, 16, 532, 7377, 96, 87, 8, 198, 198, 37811, 198, 220, 220, 220, 1500, 3201, 62, 13915, 62, 10366, 952, 7, 74, 11, 331, 11, 509, 8, 198, 198, 3103, 2536, 391, 262, 1479, 7885, 4600, 88, 63, 284, 262, 4600, 74, 63, 400, 286, 4600, 42, 63, 4859, 22423, 13, 198, 37811, 198, 1102, 2536, 391, 62, 13915, 62, 10366, 952, 7, 74, 11, 331, 11, 509, 8, 796, 2604, 2569, 7, 88, 532, 2604, 7, 42, 532, 479, 4008, 198, 198, 37811, 198, 220, 220, 220, 1479, 62, 13915, 62, 10366, 952, 7, 74, 11, 374, 11, 509, 8, 198, 198, 11146, 262, 4600, 74, 63, 400, 4859, 8064, 4600, 81, 63, 286, 4600, 42, 63, 4859, 22423, 284, 281, 21254, 2536, 1328, 7885, 13, 198, 37811, 198, 5787, 62, 13915, 62, 10366, 952, 7, 74, 11, 374, 11, 509, 8, 796, 2604, 270, 7, 81, 8, 1343, 2604, 7, 42, 532, 479, 8, 198, 198, 8818, 29405, 7, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 2124, 8, 198, 220, 220, 220, 18074, 113, 796, 304, 862, 7, 417, 4906, 7, 87, 4008, 198, 220, 220, 220, 1441, 3487, 1096, 7, 565, 696, 12195, 87, 11, 18074, 113, 11, 352, 532, 18074, 113, 828, 352, 8, 198, 437, 198, 198, 565, 696, 7, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 2124, 3712, 23839, 19182, 90, 27, 25, 39746, 28813, 13, 36248, 30072, 796, 2124, 198, 198, 8818, 1479, 7, 66, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 2124, 8, 198, 220, 220, 220, 509, 796, 1500, 3201, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 87, 8, 6624, 509, 628, 220, 220, 220, 2124, 796, 29405, 7, 66, 11, 2124, 8, 198, 220, 220, 220, 309, 796, 1288, 4906, 7, 87, 8, 198, 220, 220, 220, 331, 796, 2092, 7, 87, 11, 509, 532, 352, 8, 198, 220, 220, 220, 7377, 96, 87, 796, 6632, 7, 51, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 331, 58, 16, 60, 796, 1479, 62, 13915, 62, 10366, 952, 7, 16, 11, 2124, 58, 16, 4357, 509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 14323, 67, 329, 479, 796, 362, 37498, 42, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 87, 15853, 2124, 58, 74, 532, 352, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 158, 224, 244, 796, 4859, 62, 10366, 952, 7, 87, 58, 74, 4357, 7377, 96, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 58, 74, 60, 796, 1479, 62, 13915, 62, 10366, 952, 7, 74, 11, 1976, 158, 224, 244, 11, 509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 331, 198, 437, 198, 198, 8818, 1500, 3201, 7, 66, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 509, 796, 1500, 3201, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 1479, 62, 46156, 7, 66, 8, 628, 220, 220, 220, 2124, 796, 1168, 35641, 1258, 13, 28632, 7, 88, 11, 509, 8, 198, 220, 220, 220, 7377, 96, 87, 796, 6632, 7, 417, 4906, 7, 88, 4008, 198, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 352, 37498, 42, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 158, 224, 244, 796, 1500, 3201, 62, 13915, 62, 10366, 952, 7, 74, 11, 331, 58, 74, 4357, 509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 158, 224, 244, 796, 4859, 62, 13664, 7, 89, 158, 224, 244, 11, 7377, 96, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 74, 60, 796, 2124, 158, 224, 244, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 87, 15853, 2124, 158, 224, 244, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 42, 60, 796, 352, 532, 7377, 96, 87, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 29405, 7, 66, 11, 4866, 7, 87, 4008, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 66, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 509, 796, 1500, 3201, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 1479, 62, 46156, 7, 66, 8, 198, 220, 220, 220, 309, 796, 1288, 4906, 7, 88, 8, 628, 220, 220, 220, 2124, 796, 1168, 35641, 1258, 13, 28632, 7, 88, 11, 509, 8, 198, 220, 220, 220, 7377, 96, 87, 796, 6632, 7, 417, 4906, 7, 88, 4008, 198, 220, 220, 220, 2604, 15255, 41, 796, 2604, 7, 42, 8, 1220, 362, 198, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 352, 37498, 42, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 158, 224, 244, 796, 1500, 3201, 62, 13915, 62, 10366, 952, 7, 74, 11, 331, 58, 74, 4357, 509, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 158, 224, 244, 796, 4859, 62, 13664, 7, 89, 158, 224, 244, 11, 7377, 96, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 74, 60, 796, 2124, 158, 224, 244, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 15853, 2604, 7, 87, 158, 224, 244, 1635, 357, 16, 532, 1976, 158, 224, 244, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 87, 15853, 2124, 158, 224, 244, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 42, 60, 796, 352, 532, 7377, 96, 87, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 29405, 7, 66, 11, 4866, 7, 87, 36911, 2604, 15255, 41, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 198, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 26453, 8890, 11141, 3103, 2536, 2913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 3712, 7004, 19182, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 66, 11, 2824, 7, 88, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 16798, 3103, 2536, 2913, 90, 4825, 11, 7397, 11, 32754, 11, 7792, 11, 21870, 92, 1279, 25, 35748, 3103, 2536, 2913, 90, 7792, 11, 21870, 92, 198, 198, 41, 1563, 13389, 319, 257, 2168, 286, 17778, 13, 770, 32315, 2099, 198, 1102, 48109, 306, 37354, 1978, 257, 2168, 286, 38226, 319, 1729, 12, 2502, 75, 5912, 198, 7266, 3258, 592, 286, 257, 2392, 11507, 7177, 13, 198, 198, 2, 28407, 273, 628, 220, 220, 220, 16798, 3103, 2536, 2913, 7, 1102, 2536, 6003, 3712, 43015, 3103, 2536, 2913, 23029, 198, 37811, 198, 7249, 16798, 3103, 2536, 2913, 90, 4825, 11, 9419, 11, 22495, 11, 7792, 11, 21870, 92, 1279, 25, 35748, 3103, 2536, 2913, 90, 7792, 11, 21870, 92, 198, 220, 220, 220, 17778, 3712, 4825, 198, 220, 220, 220, 1067, 6231, 3712, 9419, 198, 220, 220, 220, 1216, 6231, 3712, 22495, 628, 220, 220, 220, 2163, 16798, 3103, 2536, 2913, 7, 1102, 2536, 6003, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 50115, 796, 20121, 62, 1102, 2536, 6003, 7, 1102, 2536, 6003, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 299, 6359, 796, 3975, 7, 1102, 2536, 391, 62, 46156, 11, 50115, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 66, 796, 2160, 7, 77, 6359, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1067, 6231, 796, 4808, 81, 6231, 62, 6738, 62, 13664, 82, 7, 77, 6359, 8, 628, 220, 220, 220, 220, 220, 220, 220, 299, 9501, 796, 3975, 7, 5787, 62, 46156, 11, 50115, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 69, 796, 2160, 7, 77, 9501, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1216, 6231, 796, 4808, 81, 6231, 62, 6738, 62, 13664, 82, 7, 77, 9501, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 4906, 1659, 7, 6359, 828, 4906, 1659, 7, 6098, 6231, 828, 4906, 1659, 7, 8310, 6231, 828, 10782, 11, 77, 69, 92, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 41, 1563, 3103, 2536, 2913, 7, 66, 8, 796, 269, 198, 198, 37811, 198, 220, 220, 220, 20121, 62, 1102, 2536, 6003, 7, 6359, 3712, 43015, 3103, 2536, 2913, 23029, 198, 198, 13102, 469, 15909, 17778, 326, 460, 307, 23791, 13, 1114, 1672, 11, 198, 63, 7390, 26858, 3103, 2536, 2913, 7, 18, 8, 63, 290, 4600, 7390, 26858, 3103, 2536, 2913, 7, 17, 8, 63, 460, 307, 23791, 656, 257, 2060, 198, 63, 7390, 26858, 3103, 2536, 2913, 7, 20, 8, 44646, 198, 37811, 198, 647, 469, 62, 1102, 2536, 6003, 7, 66, 16, 11, 269, 17, 11, 50115, 23029, 796, 4646, 7, 647, 469, 62, 1102, 2536, 6003, 11, 357, 66, 16, 11, 269, 17, 11, 50115, 986, 4008, 198, 198, 31, 45145, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 8, 796, 357, 66, 16, 35751, 198, 198, 31, 45145, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 11, 269, 17, 8, 796, 357, 66, 16, 11, 269, 17, 8, 198, 198, 31, 45145, 2163, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 11, 269, 17, 3712, 51, 29291, 8, 198, 220, 220, 220, 1441, 357, 647, 469, 62, 1102, 2536, 6003, 7, 66, 16, 11, 269, 17, 58, 16, 12962, 986, 11, 7308, 13, 13199, 7, 66, 17, 8, 23029, 198, 437, 198, 198, 31, 45145, 2163, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 3712, 51, 29291, 11, 269, 17, 8, 198, 220, 220, 220, 1441, 357, 14881, 13, 8534, 7, 66, 16, 26513, 11, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 58, 437, 4357, 269, 17, 8, 23029, 198, 437, 198, 198, 31, 45145, 2163, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 3712, 51, 29291, 11, 269, 17, 3712, 51, 29291, 8, 198, 220, 220, 220, 1441, 357, 14881, 13, 8534, 7, 66, 16, 26513, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20121, 62, 1102, 2536, 6003, 7, 66, 16, 58, 437, 4357, 269, 17, 58, 16, 12962, 986, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7308, 13, 13199, 7, 66, 17, 8, 23029, 198, 437, 198, 198, 31, 45145, 2163, 20121, 62, 1102, 2536, 6003, 7, 3712, 7390, 26858, 3103, 2536, 2913, 90, 44, 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, 220, 7904, 7390, 26858, 3103, 2536, 2913, 90, 45, 30072, 810, 1391, 44, 11, 45, 92, 198, 220, 220, 220, 1441, 357, 7390, 26858, 3103, 2536, 2913, 7, 44, 1343, 399, 828, 8, 198, 437, 198, 198, 8818, 4808, 81, 6231, 62, 6738, 62, 13664, 82, 7, 13664, 82, 8, 198, 220, 220, 220, 16069, 796, 11801, 17257, 90, 5317, 92, 21737, 198, 220, 220, 220, 479, 796, 352, 198, 220, 220, 220, 329, 18896, 287, 20428, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 81, 6231, 11, 479, 37498, 74, 1343, 18896, 532, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 479, 15853, 18896, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 46545, 7, 81, 6231, 23029, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 524, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 474, 66, 3712, 41, 1563, 3103, 2536, 2913, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 41, 1563, 3103, 2536, 2913, 7, 4943, 198, 220, 220, 220, 299, 1102, 2536, 6003, 796, 4129, 7, 48055, 13, 1102, 2536, 6003, 8, 198, 220, 220, 220, 611, 299, 1102, 2536, 6003, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 17971, 7, 260, 1050, 7, 76, 524, 11, 474, 66, 13, 1102, 2536, 6003, 58, 16, 60, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 299, 1102, 2536, 6003, 1875, 838, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 33172, 29568, 260, 1050, 7, 76, 524, 11, 474, 66, 13, 1102, 2536, 6003, 58, 17, 60, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 33172, 35713, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 33172, 29568, 260, 1050, 7, 76, 524, 11, 474, 66, 13, 1102, 2536, 6003, 58, 437, 12, 16, 60, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 33172, 29568, 260, 1050, 7, 76, 524, 11, 474, 66, 13, 1102, 2536, 6003, 58, 437, 60, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 362, 25, 77, 1102, 2536, 6003, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 33172, 29568, 260, 1050, 7, 76, 524, 11, 474, 66, 13, 1102, 2536, 6003, 58, 72, 60, 4008, 4943, 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, 3601, 7, 952, 11, 366, 8, 4943, 198, 437, 198, 198, 8818, 4808, 1845, 29363, 62, 5787, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 69, 11, 2124, 8, 198, 220, 220, 220, 331, 796, 2092, 7, 87, 11, 299, 69, 8, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 352, 25, 13664, 7, 6359, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 39611, 95, 796, 1570, 7, 87, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 88, 11, 1479, 7, 6359, 58, 72, 4357, 2124, 39611, 95, 828, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 331, 198, 437, 198, 198, 8818, 1479, 7, 48055, 3712, 41, 1563, 3103, 2536, 2913, 11, 2124, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 87, 8, 6624, 1500, 3201, 62, 46156, 7, 48055, 8, 198, 220, 220, 220, 1441, 4808, 1845, 29363, 62, 5787, 7, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 6098, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 8310, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1479, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 4808, 1845, 29363, 62, 1102, 2536, 391, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 66, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 2092, 7, 88, 11, 299, 66, 8, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 352, 25, 13664, 7, 6359, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 39611, 95, 796, 1570, 7, 88, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 87, 11, 1500, 3201, 7, 6359, 58, 72, 4357, 331, 39611, 95, 828, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2124, 198, 437, 198, 198, 8818, 1500, 3201, 7, 48055, 3712, 41, 1563, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 1479, 62, 46156, 7, 48055, 8, 198, 220, 220, 220, 1441, 4808, 1845, 29363, 62, 1102, 2536, 391, 7, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 6098, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 8310, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 3201, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 331, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 66, 11, 299, 69, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 2092, 7, 88, 11, 299, 66, 8, 628, 220, 220, 220, 24811, 796, 1288, 4906, 7, 88, 8, 198, 220, 220, 220, 269, 521, 82, 796, 352, 25, 13664, 7, 6359, 8, 628, 220, 220, 220, 2604, 15255, 41, 796, 6632, 7, 14990, 8, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 39611, 95, 796, 1570, 7, 88, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 39611, 95, 11, 2604, 15255, 41, 39611, 95, 796, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 6359, 58, 72, 4357, 331, 39611, 95, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 87, 11, 2124, 39611, 95, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 15853, 2604, 15255, 41, 39611, 95, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2124, 11, 2604, 15255, 41, 198, 437, 198, 198, 57, 35641, 1258, 13, 31, 41255, 1563, 2163, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 66, 11, 299, 69, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 2092, 7, 88, 11, 299, 66, 8, 628, 220, 220, 220, 24811, 796, 1288, 4906, 7, 88, 8, 198, 220, 220, 220, 269, 521, 82, 796, 352, 25, 13664, 7, 6359, 8, 628, 220, 220, 220, 12983, 796, 17635, 198, 220, 220, 220, 2604, 15255, 41, 796, 6632, 7, 14990, 8, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 39611, 95, 796, 1570, 7, 88, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 87, 39611, 95, 11, 2604, 15255, 41, 39611, 95, 828, 736, 39611, 95, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 35641, 1258, 13, 31216, 1891, 7, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 11, 50115, 58, 72, 4357, 331, 39611, 95, 8, 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, 900, 9630, 0, 7, 87, 11, 2124, 39611, 95, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 10146, 11, 736, 39611, 95, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 15853, 2604, 15255, 41, 39611, 95, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 357, 87, 11, 2604, 15255, 41, 828, 2163, 357, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 136, 226, 11, 2604, 15255, 41, 136, 226, 796, 37455, 198, 220, 220, 220, 220, 220, 220, 220, 21664, 796, 7308, 13, 16963, 1258, 62, 417, 4906, 1659, 7, 87, 136, 226, 11, 2604, 15255, 41, 136, 226, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 136, 226, 796, 2092, 7, 87, 136, 226, 11, 21664, 11, 299, 69, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 136, 226, 39611, 95, 796, 1570, 7, 87, 136, 226, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 736, 39611, 95, 796, 12983, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 136, 226, 39611, 95, 796, 736, 39611, 95, 19510, 87, 136, 226, 39611, 95, 11, 2604, 15255, 41, 136, 226, 4008, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 88, 136, 226, 11, 331, 136, 226, 39611, 95, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 22366, 11, 2147, 11, 2147, 11, 2147, 11, 2147, 11, 331, 136, 226, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 48055, 3712, 41, 1563, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 299, 69, 796, 1479, 62, 46156, 7, 48055, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 299, 69, 198, 220, 220, 220, 1441, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 6404, 12315, 62, 10215, 8243, 7, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 6098, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 8310, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 3201, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 299, 69, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 66, 11, 299, 69, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 2092, 7, 88, 11, 299, 66, 8, 198, 220, 220, 220, 20070, 796, 17635, 198, 220, 220, 220, 269, 521, 82, 796, 352, 25, 13664, 7, 6359, 8, 198, 220, 220, 220, 2604, 15255, 49044, 796, 17635, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 39611, 95, 796, 1570, 7, 88, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 39611, 95, 11, 4574, 39611, 95, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 6359, 58, 72, 4357, 331, 39611, 95, 2599, 25, 51, 29291, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 87, 11, 2124, 39611, 95, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 79, 17237, 11, 4574, 39611, 95, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 331, 16, 796, 2488, 259, 65, 3733, 331, 58, 16, 60, 628, 220, 220, 220, 2163, 4574, 6404, 12315, 7, 6404, 46582, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 24811, 796, 7308, 13, 16963, 1258, 62, 417, 4906, 1659, 7, 88, 16, 11, 2604, 46582, 87, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 796, 6632, 7, 14990, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 4574, 39611, 95, 796, 20070, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 39611, 95, 796, 4574, 39611, 95, 7, 22570, 7, 14990, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 15853, 2604, 15255, 41, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2604, 46582, 88, 3712, 14990, 796, 2604, 46582, 87, 1343, 2604, 15255, 41, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 46582, 88, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2124, 11, 4574, 6404, 12315, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 7, 48055, 3712, 41, 1563, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 1479, 62, 46156, 7, 48055, 8, 198, 220, 220, 220, 1441, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 7, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 6098, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 8310, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 3201, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1479, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 331, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 6359, 11, 1067, 6231, 11, 1216, 6231, 11, 299, 66, 11, 299, 69, 11, 331, 8, 198, 220, 220, 220, 2124, 796, 2092, 7, 88, 11, 299, 66, 8, 198, 220, 220, 220, 20070, 796, 17635, 198, 220, 220, 220, 269, 521, 82, 796, 352, 25, 13664, 7, 6359, 8, 198, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 39611, 95, 796, 1570, 7, 88, 11, 1216, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 39611, 95, 11, 4574, 39611, 95, 796, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 6359, 58, 72, 4357, 331, 39611, 95, 2599, 25, 51, 29291, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 87, 11, 2124, 39611, 95, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 79, 17237, 11, 4574, 39611, 95, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 331, 16, 796, 2488, 259, 65, 3733, 331, 58, 16, 60, 628, 220, 220, 220, 2163, 4574, 6404, 12315, 62, 9744, 7, 6404, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 24811, 796, 7308, 13, 16963, 1258, 62, 417, 4906, 1659, 7, 88, 16, 11, 2604, 46582, 87, 11, 18872, 229, 87, 62, 6404, 46582, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 88, 62, 6404, 46582, 88, 796, 2092, 7, 24861, 229, 87, 62, 6404, 46582, 87, 11, 299, 69, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 796, 6632, 7, 14990, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 14323, 67, 329, 1312, 287, 269, 521, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 87, 62, 6404, 46582, 87, 39611, 95, 796, 1570, 7, 24861, 229, 87, 62, 6404, 46582, 87, 11, 1067, 6231, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 39611, 95, 796, 20070, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 15255, 41, 39611, 95, 11, 18872, 229, 88, 62, 6404, 46582, 88, 39611, 95, 796, 4574, 39611, 95, 7, 22570, 7, 6404, 46582, 87, 828, 18872, 229, 87, 62, 6404, 46582, 87, 39611, 95, 2599, 25, 51, 29291, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 9630, 0, 7, 24861, 229, 88, 62, 6404, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 39611, 95, 11, 1216, 6231, 58, 72, 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, 2604, 15255, 41, 15853, 2604, 15255, 41, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2604, 46582, 88, 3712, 14990, 796, 2604, 46582, 87, 1343, 2604, 15255, 41, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 46582, 88, 11, 18872, 229, 88, 62, 6404, 46582, 88, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2124, 11, 4574, 6404, 12315, 62, 9744, 198, 437, 198, 198, 8818, 1500, 3201, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 48055, 3712, 41, 1563, 3103, 2536, 2913, 11, 331, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 88, 8, 6624, 1479, 62, 46156, 7, 48055, 8, 198, 220, 220, 220, 1441, 4808, 1845, 29363, 62, 1102, 2536, 391, 62, 4480, 62, 14689, 6404, 12315, 62, 9744, 7, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 1102, 2536, 6003, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 6098, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 474, 66, 13, 8310, 6231, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1500, 3201, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1479, 62, 46156, 7, 48055, 828, 198, 220, 220, 220, 220, 220, 220, 220, 331, 198, 220, 220, 220, 1267, 198, 437, 198 ]
2.239881
12,402
<filename>train.jl ENV["COLUMNS"]=72 import Base.GC.gc using DSP.Periodograms: stft, nextfastfft using DSP.Windows: hanning using HDF5 using Base.Iterators: flatten, cycle, take, partition using Statistics: mean, std using Random: shuffle! using Knet using Knet: Data, KnetArray using LinearAlgebra: diag function epsnormalise(x::AbstractArray{T}; dims=1, ϵ=eps(T)) where T μ = mean(x, dims = dims) σ = std(x, dims = dims, mean = μ, corrected=false) σ = map((x) -> abs(x) < ϵ ? ϵ : x, σ) return (x .- μ) ./ σ end function make_batch(data, labels, idxs, minibatch_size, cat_mapping; divider = 1, n = 512, noverlap = div(n, 2)) nfft = nextfastfft(n) sz = div(div(size(data, 1), noverlap), divider) - 1 X_batch = Array{Float32}(undef, div(nfft, 2) + 1, sz, 1, length(idxs)) Y_batch = Array{UInt8}(undef, length(idxs)) win = hanning(nfft) data_ind = 1:div(size(data, 1), divider) for i in 1:length(idxs) st = abs.(stft(Float32.(data[data_ind,idxs[i]][:]./typemax(Int16)), n, noverlap, window=win, nfft=nfft)) X_batch[:, :, 1, i] = epsnormalise(20*log10.(max.(st, eps(Float32)))) Y_batch[i] = cat_mapping[labels[idxs[i]][1]] end return minibatch(convert(KnetArray, X_batch), Y_batch, minibatch_size) end function confusion(model, data, no_categories, no_labels=no_categories) conf = zeros(no_categories, no_labels) sz = 0 for mbatch in data pred = convert(Array, model(mbatch[1])) for ind = 1:length(mbatch[2]) conf[findmax(pred[:, ind])[2], mbatch[2][ind]] += 1 end end return conf end function squish_confusion(conf_ex, cat_mapping) vals = sort(collect(values(cat_mapping))) no_categories = length(unique(vals)) conf = zeros(no_categories, no_categories) for i = 1:length(vals) conf[:, vals[i]] += conf_ex[:, i] end conf end function get_idxs(size, batch_size, cat_mapping, start_idx=1) idxs = Vector{Vector{Int}}() no_categories = length(unique(values(cat_mapping))) no_labels = length(cat_mapping) cat_lengths = zeros(no_categories) for val in values(cat_mapping) cat_lengths[val] += 1 end cat_idxs = zeros(no_categories) batch_i = 1 lab_i = start_idx push!(idxs, Vector{UInt}()) while batch_i <= size/batch_size for i = 1:length(cat_lengths) push!(idxs[batch_i], lab_i + sum(cat_lengths[1:(i-1)]) + cat_idxs[i]) cat_idxs[i] = mod(cat_idxs[i] + 1, cat_lengths[i]) if length(idxs[batch_i]) == batch_size batch_i += 1 if batch_i > size/batch_size break else push!(idxs, Vector{UInt}()) end end end lab_i += no_labels end idxs end cat_mapping = Dict{Int8, UInt8}(0 => 1, # WAV 11 => 2, # MP3 320 12 => 3, # MP3 192 13 => 4, # MP3 128 21 => 5, # AAC 320 22 => 6, # AAC 192 23 => 7, # AAC 128 31 => 8, # OGG 320 32 => 9, # OGG 192 33 => 10, # OGG 128 41 => 11, # WMA 320 42 => 12, # WMA 192 43 => 13, # WMA 128 51 => 14, # AC3 320 52 => 15, # AC3 192 53 => 16, # AC3 128 ) minibatch_size = 2 train_batch_size = 16 test_batch_size = 512 train_size = 5120 test_size = 2560 all_mapping = Dict{Int8, UInt8}([(key, i) for (i, key) in enumerate(sort(collect(keys(cat_mapping))))]) no_categories = length(unique(values(cat_mapping))) no_labels = length(cat_mapping) train_batch_idxs = get_idxs(train_size, train_batch_size, cat_mapping) test_batch_idxs = get_idxs(test_size, test_batch_size, cat_mapping, ceil(Int, train_batch_idxs[end][end]/no_labels)*no_labels + 1) struct Conv; w; b; f; p; end (c::Conv)(x) = c.f.(pool(conv4(c.w, dropout(x,c.p)) .+ c.b)) Conv(w1::Int,w2::Int,cx::Int,cy::Int,f=relu;pdrop=0) = Conv(param(w1,w2,cx,cy), param0(1,1,cy,1), f, pdrop) struct Dense; w; b; f; p; end (d::Dense)(x) = d.f.(d.w * mat(dropout(x,d.p)) .+ d.b) # mat reshapes 4-D tensor to 2-D matrix so we can use matmul Dense(i::Int,o::Int,f=relu;pdrop=0) = Dense(param(o,i), param0(o), f, pdrop) struct Chain; layers; Chain(layers...) = new(layers); end (c::Chain)(x) = (for l in c.layers; x = l(x); end; x) (c::Chain)(x,y) = nll(c(x),y) (c::Chain)(d::Data) = mean(c(x,y) for (x,y) in d) function train!(epochs, load=true, filename="model.jld2", train=true, test=true) gc() Knet.gc() model, test_confs = if load lf = Knet.load(filename) lf["model"], lf["test_confs"] else Chain(Conv(3, 3, 1, 16), Conv(3, 3, 16, 16), Conv(3, 3, 16, 16), Dense(102240, 300, pdrop=0.3), Dense(300, 300, pdrop=0.2), Dense(300, no_categories, identity, pdrop=0.2)), Array{Array{Float32, 2}, 1}() end best_acc = length(test_confs) > 0 ? sum(diag(test_confs[end]))/test_size : 0 h5open("./dataset.h5") do file data = file["data"] labels = file["labels"] for epoch in 1:epochs @info "Epoch: $epoch" shuffle!(train_batch_idxs) if train for idx in progress(train_batch_idxs) let dtrn = make_batch(data, labels, idx, minibatch_size, cat_mapping) for a in adam(model, dtrn); end end end end if test test_conf = zeros(no_categories, no_labels) for idx in progress(test_batch_idxs) let dtst = make_batch(data, labels, idx, minibatch_size, all_mapping) test_conf .+= confusion(model, dtst, no_categories, no_labels) end end push!(test_confs, test_conf) acc = sum(diag(squish_confusion(test_conf, cat_mapping)))/test_size println("Confusion Matrix:") display(test_conf) println("Accuracy: $acc") else acc = best_acc + 1 end if train if acc > best_acc best_acc = acc Knet.save(filename, "model", model, "test_confs", test_confs) end end end end return model, test_confs end
[ 27, 34345, 29, 27432, 13, 20362, 198, 1677, 53, 14692, 25154, 5883, 8035, 8973, 28, 4761, 198, 11748, 7308, 13, 15916, 13, 36484, 198, 3500, 360, 4303, 13, 5990, 2101, 26836, 25, 336, 701, 11, 1306, 7217, 487, 83, 198, 3500, 360, 4303, 13, 11209, 25, 289, 272, 768, 198, 3500, 5572, 37, 20, 198, 3500, 7308, 13, 29993, 2024, 25, 27172, 268, 11, 6772, 11, 1011, 11, 18398, 198, 3500, 14370, 25, 1612, 11, 14367, 198, 3500, 14534, 25, 36273, 0, 198, 3500, 509, 3262, 198, 3500, 509, 3262, 25, 6060, 11, 509, 3262, 19182, 198, 3500, 44800, 2348, 29230, 25, 2566, 363, 198, 198, 8818, 304, 862, 11265, 786, 7, 87, 3712, 23839, 19182, 90, 51, 19629, 5391, 82, 28, 16, 11, 18074, 113, 28, 25386, 7, 51, 4008, 810, 309, 198, 220, 220, 220, 18919, 796, 1612, 7, 87, 11, 5391, 82, 796, 5391, 82, 8, 198, 220, 220, 220, 18074, 225, 796, 14367, 7, 87, 11, 5391, 82, 796, 5391, 82, 11, 1612, 796, 18919, 11, 19267, 28, 9562, 8, 198, 220, 220, 220, 18074, 225, 796, 3975, 19510, 87, 8, 4613, 2352, 7, 87, 8, 1279, 18074, 113, 5633, 18074, 113, 1058, 2124, 11, 18074, 225, 8, 198, 220, 220, 220, 1441, 357, 87, 764, 12, 18919, 8, 24457, 18074, 225, 198, 437, 198, 198, 8818, 787, 62, 43501, 7, 7890, 11, 14722, 11, 4686, 34223, 11, 949, 571, 963, 62, 7857, 11, 3797, 62, 76, 5912, 26, 2659, 1304, 796, 352, 11, 299, 796, 22243, 11, 645, 332, 37796, 796, 2659, 7, 77, 11, 362, 4008, 198, 220, 220, 220, 299, 487, 83, 796, 1306, 7217, 487, 83, 7, 77, 8, 198, 220, 220, 220, 264, 89, 796, 2659, 7, 7146, 7, 7857, 7, 7890, 11, 352, 828, 645, 332, 37796, 828, 2659, 1304, 8, 532, 352, 198, 220, 220, 220, 1395, 62, 43501, 796, 15690, 90, 43879, 2624, 92, 7, 917, 891, 11, 2659, 7, 77, 487, 83, 11, 362, 8, 1343, 352, 11, 264, 89, 11, 352, 11, 4129, 7, 312, 34223, 4008, 198, 220, 220, 220, 575, 62, 43501, 796, 15690, 90, 52, 5317, 23, 92, 7, 917, 891, 11, 4129, 7, 312, 34223, 4008, 198, 220, 220, 220, 1592, 796, 289, 272, 768, 7, 77, 487, 83, 8, 198, 220, 220, 220, 1366, 62, 521, 796, 352, 25, 7146, 7, 7857, 7, 7890, 11, 352, 828, 2659, 1304, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 220, 220, 336, 796, 2352, 12195, 301, 701, 7, 43879, 2624, 12195, 7890, 58, 7890, 62, 521, 11, 312, 34223, 58, 72, 60, 7131, 25, 4083, 14, 28004, 368, 897, 7, 5317, 1433, 36911, 299, 11, 645, 332, 37796, 11, 4324, 28, 5404, 11, 299, 487, 83, 28, 77, 487, 83, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 62, 43501, 58, 45299, 1058, 11, 352, 11, 1312, 60, 796, 304, 862, 11265, 786, 7, 1238, 9, 6404, 940, 12195, 9806, 12195, 301, 11, 304, 862, 7, 43879, 2624, 35514, 198, 220, 220, 220, 220, 220, 220, 220, 575, 62, 43501, 58, 72, 60, 796, 3797, 62, 76, 5912, 58, 23912, 1424, 58, 312, 34223, 58, 72, 60, 7131, 16, 11907, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 949, 571, 963, 7, 1102, 1851, 7, 42, 3262, 19182, 11, 1395, 62, 43501, 828, 575, 62, 43501, 11, 949, 571, 963, 62, 7857, 8, 198, 437, 198, 198, 8818, 10802, 7, 19849, 11, 1366, 11, 645, 62, 66, 26129, 11, 645, 62, 23912, 1424, 28, 3919, 62, 66, 26129, 8, 198, 220, 220, 220, 1013, 796, 1976, 27498, 7, 3919, 62, 66, 26129, 11, 645, 62, 23912, 1424, 8, 198, 220, 220, 220, 264, 89, 796, 657, 198, 220, 220, 220, 329, 285, 43501, 287, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 796, 10385, 7, 19182, 11, 2746, 7, 2022, 963, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 773, 796, 352, 25, 13664, 7, 2022, 963, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1013, 58, 19796, 9806, 7, 28764, 58, 45299, 773, 12962, 58, 17, 4357, 285, 43501, 58, 17, 7131, 521, 11907, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1013, 198, 437, 198, 198, 8818, 2809, 680, 62, 10414, 4241, 7, 10414, 62, 1069, 11, 3797, 62, 76, 5912, 8, 198, 220, 220, 220, 410, 874, 796, 3297, 7, 33327, 7, 27160, 7, 9246, 62, 76, 5912, 22305, 198, 220, 220, 220, 645, 62, 66, 26129, 796, 4129, 7, 34642, 7, 12786, 4008, 198, 220, 220, 220, 1013, 796, 1976, 27498, 7, 3919, 62, 66, 26129, 11, 645, 62, 66, 26129, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1013, 58, 45299, 410, 874, 58, 72, 11907, 15853, 1013, 62, 1069, 58, 45299, 1312, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1013, 198, 437, 198, 198, 8818, 651, 62, 312, 34223, 7, 7857, 11, 15458, 62, 7857, 11, 3797, 62, 76, 5912, 11, 923, 62, 312, 87, 28, 16, 8, 198, 220, 220, 220, 4686, 34223, 796, 20650, 90, 38469, 90, 5317, 11709, 3419, 198, 220, 220, 220, 645, 62, 66, 26129, 796, 4129, 7, 34642, 7, 27160, 7, 9246, 62, 76, 5912, 22305, 198, 220, 220, 220, 645, 62, 23912, 1424, 796, 4129, 7, 9246, 62, 76, 5912, 8, 198, 220, 220, 220, 3797, 62, 13664, 82, 796, 1976, 27498, 7, 3919, 62, 66, 26129, 8, 198, 220, 220, 220, 329, 1188, 287, 3815, 7, 9246, 62, 76, 5912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3797, 62, 13664, 82, 58, 2100, 60, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3797, 62, 312, 34223, 796, 1976, 27498, 7, 3919, 62, 66, 26129, 8, 628, 220, 220, 220, 15458, 62, 72, 796, 352, 198, 220, 220, 220, 2248, 62, 72, 796, 923, 62, 312, 87, 198, 220, 220, 220, 4574, 0, 7, 312, 34223, 11, 20650, 90, 52, 5317, 92, 28955, 198, 220, 220, 220, 981, 15458, 62, 72, 19841, 2546, 14, 43501, 62, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 9246, 62, 13664, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 312, 34223, 58, 43501, 62, 72, 4357, 2248, 62, 72, 1343, 2160, 7, 9246, 62, 13664, 82, 58, 16, 37498, 72, 12, 16, 8, 12962, 1343, 3797, 62, 312, 34223, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3797, 62, 312, 34223, 58, 72, 60, 796, 953, 7, 9246, 62, 312, 34223, 58, 72, 60, 1343, 352, 11, 3797, 62, 13664, 82, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 312, 34223, 58, 43501, 62, 72, 12962, 6624, 15458, 62, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15458, 62, 72, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 15458, 62, 72, 1875, 2546, 14, 43501, 62, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 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, 220, 220, 220, 220, 4574, 0, 7, 312, 34223, 11, 20650, 90, 52, 5317, 92, 28955, 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, 220, 220, 220, 220, 2248, 62, 72, 15853, 645, 62, 23912, 1424, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4686, 34223, 198, 437, 198, 198, 9246, 62, 76, 5912, 796, 198, 35, 713, 90, 5317, 23, 11, 471, 5317, 23, 92, 7, 15, 220, 5218, 352, 11, 220, 1303, 370, 10116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1367, 5218, 362, 11, 220, 1303, 4904, 18, 20959, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1105, 5218, 513, 11, 220, 1303, 4904, 18, 17817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1511, 5218, 604, 11, 220, 1303, 4904, 18, 13108, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2310, 5218, 642, 11, 220, 1303, 47943, 20959, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2534, 5218, 718, 11, 220, 1303, 47943, 17817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2242, 5218, 767, 11, 220, 1303, 47943, 13108, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3261, 5218, 807, 11, 220, 1303, 440, 11190, 20959, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3933, 5218, 860, 11, 220, 1303, 440, 11190, 17817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4747, 5218, 838, 11, 1303, 440, 11190, 13108, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6073, 5218, 1367, 11, 1303, 370, 5673, 20959, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5433, 5218, 1105, 11, 1303, 370, 5673, 17817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5946, 5218, 1511, 11, 1303, 370, 5673, 13108, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6885, 5218, 1478, 11, 1303, 7125, 18, 20959, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6740, 5218, 1315, 11, 1303, 7125, 18, 17817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7192, 5218, 1467, 11, 1303, 7125, 18, 13108, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 220, 198, 198, 1084, 571, 963, 62, 7857, 796, 362, 198, 27432, 62, 43501, 62, 7857, 796, 1467, 198, 9288, 62, 43501, 62, 7857, 796, 22243, 198, 27432, 62, 7857, 796, 642, 10232, 198, 9288, 62, 7857, 796, 1679, 1899, 198, 198, 439, 62, 76, 5912, 796, 198, 35, 713, 90, 5317, 23, 11, 471, 5317, 23, 92, 26933, 7, 2539, 11, 1312, 8, 329, 357, 72, 11, 1994, 8, 287, 27056, 378, 7, 30619, 7, 33327, 7, 13083, 7, 9246, 62, 76, 5912, 35514, 12962, 198, 198, 3919, 62, 66, 26129, 796, 4129, 7, 34642, 7, 27160, 7, 9246, 62, 76, 5912, 22305, 198, 3919, 62, 23912, 1424, 796, 4129, 7, 9246, 62, 76, 5912, 8, 198, 198, 27432, 62, 43501, 62, 312, 34223, 796, 651, 62, 312, 34223, 7, 27432, 62, 7857, 11, 4512, 62, 43501, 62, 7857, 11, 3797, 62, 76, 5912, 8, 198, 9288, 62, 43501, 62, 312, 34223, 796, 651, 62, 312, 34223, 7, 9288, 62, 7857, 11, 1332, 62, 43501, 62, 7857, 11, 3797, 62, 76, 5912, 11, 2906, 346, 7, 5317, 11, 4512, 62, 43501, 62, 312, 34223, 58, 437, 7131, 437, 60, 14, 3919, 62, 23912, 1424, 27493, 3919, 62, 23912, 1424, 1343, 352, 8, 198, 198, 7249, 34872, 26, 266, 26, 275, 26, 277, 26, 279, 26, 886, 198, 7, 66, 3712, 3103, 85, 5769, 87, 8, 796, 269, 13, 69, 12195, 7742, 7, 42946, 19, 7, 66, 13, 86, 11, 4268, 448, 7, 87, 11, 66, 13, 79, 4008, 764, 10, 269, 13, 65, 4008, 198, 3103, 85, 7, 86, 16, 3712, 5317, 11, 86, 17, 3712, 5317, 11, 66, 87, 3712, 5317, 11, 948, 3712, 5317, 11, 69, 28, 260, 2290, 26, 79, 14781, 28, 15, 8, 796, 34872, 7, 17143, 7, 86, 16, 11, 86, 17, 11, 66, 87, 11, 948, 828, 5772, 15, 7, 16, 11, 16, 11, 948, 11, 16, 828, 277, 11, 279, 14781, 8, 198, 198, 7249, 360, 1072, 26, 266, 26, 275, 26, 277, 26, 279, 26, 886, 198, 7, 67, 3712, 35, 1072, 5769, 87, 8, 796, 288, 13, 69, 12195, 67, 13, 86, 1635, 2603, 7, 14781, 448, 7, 87, 11, 67, 13, 79, 4008, 764, 10, 288, 13, 65, 8, 1303, 2603, 27179, 7916, 604, 12, 35, 11192, 273, 284, 362, 12, 35, 17593, 523, 356, 460, 779, 2603, 76, 377, 198, 35, 1072, 7, 72, 3712, 5317, 11, 78, 3712, 5317, 11, 69, 28, 260, 2290, 26, 79, 14781, 28, 15, 8, 796, 360, 1072, 7, 17143, 7, 78, 11, 72, 828, 5772, 15, 7, 78, 828, 277, 11, 279, 14781, 8, 198, 198, 7249, 21853, 26, 11685, 26, 21853, 7, 75, 6962, 23029, 796, 649, 7, 75, 6962, 1776, 886, 198, 7, 66, 3712, 35491, 5769, 87, 8, 796, 357, 1640, 300, 287, 269, 13, 75, 6962, 26, 2124, 796, 300, 7, 87, 1776, 886, 26, 2124, 8, 198, 7, 66, 3712, 35491, 5769, 87, 11, 88, 8, 796, 299, 297, 7, 66, 7, 87, 828, 88, 8, 198, 7, 66, 3712, 35491, 5769, 67, 3712, 6601, 8, 796, 1612, 7, 66, 7, 87, 11, 88, 8, 329, 357, 87, 11, 88, 8, 287, 288, 8, 198, 198, 8818, 4512, 0, 7, 538, 5374, 82, 11, 3440, 28, 7942, 11, 29472, 2625, 19849, 13, 73, 335, 17, 1600, 4512, 28, 7942, 11, 1332, 28, 7942, 8, 198, 220, 220, 220, 308, 66, 3419, 198, 220, 220, 220, 509, 3262, 13, 36484, 3419, 628, 220, 220, 220, 2746, 11, 1332, 62, 1102, 9501, 796, 611, 3440, 198, 220, 220, 220, 220, 220, 220, 220, 300, 69, 796, 509, 3262, 13, 2220, 7, 34345, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 69, 14692, 19849, 33116, 300, 69, 14692, 9288, 62, 1102, 9501, 8973, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 21853, 7, 3103, 85, 7, 18, 11, 513, 11, 352, 11, 1467, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34872, 7, 18, 11, 513, 11, 1467, 11, 1467, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34872, 7, 18, 11, 513, 11, 1467, 11, 1467, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 360, 1072, 7, 15377, 16102, 11, 5867, 11, 279, 14781, 28, 15, 13, 18, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 360, 1072, 7, 6200, 11, 5867, 11, 279, 14781, 28, 15, 13, 17, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 360, 1072, 7, 6200, 11, 645, 62, 66, 26129, 11, 5369, 11, 279, 14781, 28, 15, 13, 17, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 15690, 90, 19182, 90, 43879, 2624, 11, 362, 5512, 352, 92, 3419, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1266, 62, 4134, 796, 4129, 7, 9288, 62, 1102, 9501, 8, 1875, 657, 5633, 2160, 7, 10989, 363, 7, 9288, 62, 1102, 9501, 58, 437, 60, 4008, 14, 9288, 62, 7857, 1058, 657, 628, 220, 220, 220, 289, 20, 9654, 7, 1911, 14, 19608, 292, 316, 13, 71, 20, 4943, 466, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 2393, 14692, 7890, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 14722, 796, 2393, 14692, 23912, 1424, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 329, 36835, 287, 352, 25, 538, 5374, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 13807, 5374, 25, 720, 538, 5374, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36273, 0, 7, 27432, 62, 43501, 62, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 4686, 87, 287, 4371, 7, 27432, 62, 43501, 62, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1309, 288, 2213, 77, 796, 787, 62, 43501, 7, 7890, 11, 14722, 11, 4686, 87, 11, 949, 571, 963, 62, 7857, 11, 3797, 62, 76, 5912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 257, 287, 23197, 7, 19849, 11, 288, 2213, 77, 1776, 886, 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, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1332, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 10414, 796, 1976, 27498, 7, 3919, 62, 66, 26129, 11, 645, 62, 23912, 1424, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 4686, 87, 287, 4371, 7, 9288, 62, 43501, 62, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1309, 288, 83, 301, 796, 787, 62, 43501, 7, 7890, 11, 14722, 11, 4686, 87, 11, 949, 571, 963, 62, 7857, 11, 477, 62, 76, 5912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 10414, 764, 47932, 10802, 7, 19849, 11, 288, 83, 301, 11, 645, 62, 66, 26129, 11, 645, 62, 23912, 1424, 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, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 9288, 62, 1102, 9501, 11, 1332, 62, 10414, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 697, 796, 2160, 7, 10989, 363, 7, 16485, 680, 62, 10414, 4241, 7, 9288, 62, 10414, 11, 3797, 62, 76, 5912, 4008, 20679, 9288, 62, 7857, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 18546, 4241, 24936, 25, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3359, 7, 9288, 62, 10414, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 17320, 23843, 25, 720, 4134, 4943, 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, 697, 796, 1266, 62, 4134, 1343, 352, 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, 611, 4512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 697, 1875, 1266, 62, 4134, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 4134, 796, 697, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 509, 3262, 13, 21928, 7, 34345, 11, 366, 19849, 1600, 2746, 11, 366, 9288, 62, 1102, 9501, 1600, 1332, 62, 1102, 9501, 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, 628, 220, 220, 220, 1441, 2746, 11, 1332, 62, 1102, 9501, 198, 437, 628 ]
1.88081
3,507
<gh_stars>0 struct OperationModelResults variables::Dict{Symbol, DataFrames.DataFrame} total_cost::Dict{Symbol, Any} optimizer_log::Dict{Symbol, Any} time_stamp::DataFrames.DataFrame end function get_variable(res_model::OperationModelResults, key::Symbol) try !isnothing(res_model.variables) catch error("No variable with key $(key) has been found.") end return get(res_model.variables, key, nothing) end function get_optimizer_log(res_model::OperationModelResults) return res_model.optimizer_log end function get_time_stamp(res_model::OperationModelResults, key::Symbol) return res_model.time_stamp end """ results = load_operation_results(path, folder_name) This function can be used to load results from a folder of results from a single-step problem, or for a single foulder within a simulation. # Arguments -`path::AbstractString = folder path` -`directory::AbstractString = "2019-10-03T09-18-00"`: the foulder name that contains feather files of the results. # Example ```julia results = load_operation_results("/Users/test/", "2019-10-03T09-18-00") ``` """ function load_operation_results(path::AbstractString, directory::AbstractString) if isfile(path) path = dirname(path) end folder_path = joinpath(path, directory) files_in_folder = collect(readdir(folder_path)) variables = setdiff(files_in_folder, ["time_stamp.feather", "optimizer_log.feather"]) variable_dict = Dict{Symbol, DataFrames.DataFrame}() for i in 1:length(variables) variable = variables[i] variable_name = split("$variable", ".feather")[1] file_path = joinpath(folder_path,"$variable_name.feather") variable_dict[Symbol(variable_name)] = Feather.read("$file_path") #change key to variable end file_path = joinpath(folder_path,"optimizer_log.feather") optimizer = Dict{Symbol, Any}(eachcol(Feather.read("$file_path"),true)) file_path = joinpath(folder_path,"time_stamp.feather") temp_time_stamp = Feather.read("$file_path") time_stamp = temp_time_stamp[1:(size(temp_time_stamp,1)-1),:] obj_value = Dict{Symbol, Any}(:OBJECTIVE_FUNCTION => optimizer[:obj_value]) results = OperationModelResults(variable_dict, obj_value, optimizer, time_stamp) return results end # This function returns the length of time_stamp for each step # that is unique to that step and not overlapping with the next. function _count_time_overlap(stage::String, variable::Array, references::Dict{Any,Any}) date_df = references[stage][variable[1]] ref = DataFrames.DataFrame() for (ix,time) in enumerate(date_df.Date) try file_path = date_df[ix, :File_Path] time_file_path = joinpath(dirname(file_path), "time_stamp.feather") temp_time_stamp = DataFrames.DataFrame(Feather.read("$time_file_path")) t = size(temp_time_stamp, 1) append!(ref,temp_time_stamp[(1:t-1),:]) catch @warn "The given date_range is outside the results time stamp." end end if size(unique(ref),2) == size(ref,2) return 0.0 else extra_time_length = size(unique(ref),1)./(length(step)+1) return extra_time_length end end """ results = load_simulation_results(stage, step, date_range,variable,references) This function goes through the reference table of file paths and aggregates the results over time into a struct of type OperationModelResults **Note:** the array of steps should match the date range provided. # Arguments -`stage::String = "stage-1"``: The stage of the results getting parsed, stage-1 or stage-2 -`step::Array{String} = ["step-1", "step-2", "step-3"]`: the steps of the results getting parsed -`date_range::StepRange = 2020/01/01T:00:00:00 : 2020/01/03:00:00:00`: the date range to be parsed -`variable::Array{Symbol} = [:P_ThermalStandard, :P_RenewableDispatch]`: the variables to be parsed # Example ```julia date_range = (Dates.DateTime(2020, April, 4):Dates.Hour(24):Dates.DateTime(2020, April, 6)) stage = "stage-1" step = ["step-1","step-2", "step-3"] # has to match the date range variable = [:P_ThermalStandard, :P_RenewableDispatch] results = load_simulation_results(stage,step, date_range, variable, references) ``` """ function load_simulation_results(stage::String, references::Dict{Any,Any}; kwargs...) variable_dict = Dict() variable = collect(keys(references[stage])) time_stamp = DataFrames.DataFrame(Range = Dates.DateTime[]) extra_time_length = _count_time_overlap(stage, variable, references) for l in 1:length(variable) date_df = references[stage][variable[l]] variable_dict[(variable[l])] = DataFrames.DataFrame() for (ix,time) in enumerate(date_df.Date) file_path = date_df[ix, :File_Path] var = Feather.read("$file_path") correct_var_length = size(1:(size(var,1) - extra_time_length),1) variable_dict[(variable[l])] = vcat(variable_dict[(variable[l])],var[1:correct_var_length,:]) if l == 1 time_file_path = joinpath(dirname(file_path), "time_stamp.feather") temp_time_stamp = DataFrames.DataFrame(Feather.read("$time_file_path")) non_overlap = size((1:size(temp_time_stamp, 1) - extra_time_length - 1),1) time_stamp = vcat(time_stamp,temp_time_stamp[(1:non_overlap),:]) end end end # first_file = references[stage][variable[1]] # file_path = first_file[first_file.Date .== date_range[1], :File_Path][1] # opt_file_path = joinpath(dirname(file_path),"optimizer_log.feather") optimizer = Dict{Symbol, Any}() obj_value = Dict{Symbol, Any}(:OBJECTIVE_FUNCTION => 0.0) results = OperationModelResults(variable_dict, obj_value, optimizer, time_stamp) file_path = references[stage][variable[1]][1,:File_Path] if (:write in keys(kwargs)) == true write_model_results(results, dirname(dirname(dirname(dirname(file_path)))),"results") end return results end
[ 27, 456, 62, 30783, 29, 15, 198, 7249, 14680, 17633, 25468, 198, 220, 220, 220, 9633, 3712, 35, 713, 90, 13940, 23650, 11, 6060, 35439, 13, 6601, 19778, 92, 198, 220, 220, 220, 2472, 62, 15805, 3712, 35, 713, 90, 13940, 23650, 11, 4377, 92, 198, 220, 220, 220, 6436, 7509, 62, 6404, 3712, 35, 713, 90, 13940, 23650, 11, 4377, 92, 198, 220, 220, 220, 640, 62, 301, 696, 3712, 6601, 35439, 13, 6601, 19778, 198, 198, 437, 198, 198, 8818, 651, 62, 45286, 7, 411, 62, 19849, 3712, 32180, 17633, 25468, 11, 1994, 3712, 13940, 23650, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 22366, 7, 411, 62, 19849, 13, 25641, 2977, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 2949, 7885, 351, 1994, 29568, 2539, 8, 468, 587, 1043, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 651, 7, 411, 62, 19849, 13, 25641, 2977, 11, 1994, 11, 2147, 8, 198, 437, 198, 198, 8818, 651, 62, 40085, 7509, 62, 6404, 7, 411, 62, 19849, 3712, 32180, 17633, 25468, 8, 198, 220, 220, 220, 1441, 581, 62, 19849, 13, 40085, 7509, 62, 6404, 198, 437, 198, 198, 8818, 651, 62, 2435, 62, 301, 696, 7, 411, 62, 19849, 3712, 32180, 17633, 25468, 11, 1994, 3712, 13940, 23650, 8, 198, 220, 220, 220, 1441, 581, 62, 19849, 13, 2435, 62, 301, 696, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2482, 796, 3440, 62, 27184, 62, 43420, 7, 6978, 11, 9483, 62, 3672, 8, 198, 198, 1212, 2163, 460, 307, 973, 284, 3440, 2482, 422, 257, 9483, 198, 1659, 2482, 422, 257, 2060, 12, 9662, 1917, 11, 393, 329, 257, 2060, 277, 17601, 198, 33479, 257, 18640, 13, 198, 198, 2, 20559, 2886, 198, 12, 63, 6978, 3712, 23839, 10100, 796, 9483, 3108, 63, 220, 198, 12, 63, 34945, 3712, 23839, 10100, 796, 366, 23344, 12, 940, 12, 3070, 51, 2931, 12, 1507, 12, 405, 1, 63, 25, 262, 277, 17601, 1438, 326, 4909, 198, 5036, 1032, 3696, 286, 262, 2482, 13, 198, 198, 2, 17934, 198, 15506, 63, 73, 43640, 198, 43420, 796, 3440, 62, 27184, 62, 43420, 7203, 14, 14490, 14, 9288, 14, 1600, 366, 23344, 12, 940, 12, 3070, 51, 2931, 12, 1507, 12, 405, 4943, 198, 15506, 63, 198, 37811, 198, 198, 8818, 3440, 62, 27184, 62, 43420, 7, 6978, 3712, 23839, 10100, 11, 8619, 3712, 23839, 10100, 8, 628, 220, 220, 220, 611, 318, 7753, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 26672, 3672, 7, 6978, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 9483, 62, 6978, 796, 4654, 6978, 7, 6978, 11, 8619, 8, 198, 220, 220, 220, 3696, 62, 259, 62, 43551, 796, 2824, 7, 961, 15908, 7, 43551, 62, 6978, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 9633, 796, 900, 26069, 7, 16624, 62, 259, 62, 43551, 11, 14631, 2435, 62, 301, 696, 13, 5036, 1032, 1600, 366, 40085, 7509, 62, 6404, 13, 5036, 1032, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7885, 62, 11600, 796, 360, 713, 90, 13940, 23650, 11, 6060, 35439, 13, 6601, 19778, 92, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 25641, 2977, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7885, 796, 9633, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7885, 62, 3672, 796, 6626, 7203, 3, 45286, 1600, 27071, 5036, 1032, 4943, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 4654, 6978, 7, 43551, 62, 6978, 553, 3, 45286, 62, 3672, 13, 5036, 1032, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7885, 62, 11600, 58, 13940, 23650, 7, 45286, 62, 3672, 15437, 796, 34501, 13, 961, 7203, 3, 7753, 62, 6978, 4943, 1303, 3803, 1994, 284, 7885, 628, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 4654, 6978, 7, 43551, 62, 6978, 553, 40085, 7509, 62, 6404, 13, 5036, 1032, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 6436, 7509, 796, 360, 713, 90, 13940, 23650, 11, 4377, 92, 7, 27379, 4033, 7, 14304, 1032, 13, 961, 7203, 3, 7753, 62, 6978, 12340, 7942, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 4654, 6978, 7, 43551, 62, 6978, 553, 2435, 62, 301, 696, 13, 5036, 1032, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 2435, 62, 301, 696, 796, 34501, 13, 961, 7203, 3, 7753, 62, 6978, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 640, 62, 301, 696, 796, 20218, 62, 2435, 62, 301, 696, 58, 16, 37498, 7857, 7, 29510, 62, 2435, 62, 301, 696, 11, 16, 13219, 16, 828, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 8367, 796, 360, 713, 90, 13940, 23650, 11, 4377, 92, 7, 25, 9864, 23680, 9306, 62, 42296, 4177, 2849, 5218, 6436, 7509, 58, 25, 26801, 62, 8367, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 14680, 17633, 25468, 7, 45286, 62, 11600, 11, 26181, 62, 8367, 11, 6436, 7509, 11, 640, 62, 301, 696, 8, 628, 220, 220, 220, 1441, 2482, 198, 198, 437, 198, 2, 770, 2163, 5860, 262, 4129, 286, 640, 62, 301, 696, 329, 1123, 2239, 198, 2, 326, 318, 3748, 284, 326, 2239, 290, 407, 32997, 351, 262, 1306, 13, 198, 198, 8818, 4808, 9127, 62, 2435, 62, 2502, 37796, 7, 14247, 3712, 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, 7885, 3712, 19182, 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, 10288, 3712, 35, 713, 90, 7149, 11, 7149, 30072, 628, 220, 220, 220, 220, 198, 220, 220, 220, 3128, 62, 7568, 796, 10288, 58, 14247, 7131, 45286, 58, 16, 11907, 198, 220, 220, 220, 1006, 796, 6060, 35439, 13, 6601, 19778, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 357, 844, 11, 2435, 8, 287, 27056, 378, 7, 4475, 62, 7568, 13, 10430, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 220, 3128, 62, 7568, 58, 844, 11, 1058, 8979, 62, 15235, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 62, 7753, 62, 6978, 796, 4654, 6978, 7, 15908, 3672, 7, 7753, 62, 6978, 828, 366, 2435, 62, 301, 696, 13, 5036, 1032, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 2435, 62, 301, 696, 796, 6060, 35439, 13, 6601, 19778, 7, 14304, 1032, 13, 961, 7203, 3, 2435, 62, 7753, 62, 6978, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 796, 2546, 7, 29510, 62, 2435, 62, 301, 696, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 5420, 11, 29510, 62, 2435, 62, 301, 696, 58, 7, 16, 25, 83, 12, 16, 828, 25, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 366, 464, 1813, 3128, 62, 9521, 318, 2354, 262, 2482, 640, 17977, 526, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 2546, 7, 34642, 7, 5420, 828, 17, 8, 6624, 2546, 7, 5420, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 13, 15, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3131, 62, 2435, 62, 13664, 796, 2546, 7, 34642, 7, 5420, 828, 16, 737, 29006, 13664, 7, 9662, 47762, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3131, 62, 2435, 62, 13664, 198, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 198, 37811, 198, 220, 220, 220, 2482, 796, 3440, 62, 14323, 1741, 62, 43420, 7, 14247, 11, 2239, 11, 3128, 62, 9521, 11, 45286, 11, 5420, 4972, 8, 198, 1212, 2163, 2925, 832, 262, 4941, 3084, 286, 2393, 13532, 290, 198, 9460, 2301, 689, 262, 2482, 625, 640, 656, 257, 2878, 286, 2099, 14680, 17633, 25468, 198, 1174, 6425, 25, 1174, 262, 7177, 286, 4831, 815, 2872, 262, 3128, 2837, 2810, 13, 198, 2, 20559, 2886, 198, 12, 63, 14247, 3712, 10100, 796, 366, 14247, 12, 16, 1, 15506, 25, 383, 3800, 286, 262, 2482, 1972, 44267, 11, 3800, 12, 16, 393, 3800, 12, 17, 198, 12, 63, 9662, 3712, 19182, 90, 10100, 92, 796, 14631, 9662, 12, 16, 1600, 366, 9662, 12, 17, 1600, 366, 9662, 12, 18, 8973, 63, 25, 262, 4831, 286, 262, 2482, 1972, 44267, 198, 12, 63, 4475, 62, 9521, 3712, 8600, 17257, 796, 12131, 14, 486, 14, 486, 51, 25, 405, 25, 405, 25, 405, 1058, 12131, 14, 486, 14, 3070, 25, 405, 25, 405, 25, 405, 63, 25, 262, 3128, 2837, 284, 307, 44267, 198, 12, 63, 45286, 3712, 19182, 90, 13940, 23650, 92, 796, 685, 25, 47, 62, 35048, 7617, 23615, 11, 1058, 47, 62, 26764, 413, 540, 49354, 60, 63, 25, 262, 9633, 284, 307, 44267, 198, 2, 17934, 198, 15506, 63, 73, 43640, 198, 4475, 62, 9521, 796, 357, 35, 689, 13, 10430, 7575, 7, 42334, 11, 3035, 11, 604, 2599, 35, 689, 13, 43223, 7, 1731, 2599, 35, 689, 13, 10430, 7575, 7, 42334, 11, 3035, 11, 718, 4008, 198, 14247, 796, 366, 14247, 12, 16, 1, 198, 9662, 796, 14631, 9662, 12, 16, 2430, 9662, 12, 17, 1600, 366, 9662, 12, 18, 8973, 1303, 468, 284, 2872, 262, 3128, 2837, 198, 45286, 796, 685, 25, 47, 62, 35048, 7617, 23615, 11, 1058, 47, 62, 26764, 413, 540, 49354, 60, 198, 43420, 796, 3440, 62, 14323, 1741, 62, 43420, 7, 14247, 11, 9662, 11, 3128, 62, 9521, 11, 7885, 11, 10288, 8, 198, 15506, 63, 198, 37811, 198, 8818, 3440, 62, 14323, 1741, 62, 43420, 7, 14247, 3712, 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, 220, 220, 220, 10288, 3712, 35, 713, 90, 7149, 11, 7149, 19629, 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, 479, 86, 22046, 23029, 628, 220, 220, 220, 220, 198, 220, 220, 220, 7885, 62, 11600, 796, 360, 713, 3419, 198, 220, 220, 220, 7885, 796, 2824, 7, 13083, 7, 5420, 4972, 58, 14247, 60, 4008, 198, 220, 220, 220, 640, 62, 301, 696, 796, 6060, 35439, 13, 6601, 19778, 7, 17257, 796, 44712, 13, 10430, 7575, 58, 12962, 198, 220, 220, 220, 3131, 62, 2435, 62, 13664, 796, 4808, 9127, 62, 2435, 62, 2502, 37796, 7, 14247, 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, 7885, 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, 10288, 8, 198, 220, 220, 220, 329, 300, 287, 352, 25, 13664, 7, 45286, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3128, 62, 7568, 796, 10288, 58, 14247, 7131, 45286, 58, 75, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 7885, 62, 11600, 58, 7, 45286, 58, 75, 12962, 60, 796, 6060, 35439, 13, 6601, 19778, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 844, 11, 2435, 8, 287, 27056, 378, 7, 4475, 62, 7568, 13, 10430, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 3128, 62, 7568, 58, 844, 11, 1058, 8979, 62, 15235, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1401, 796, 34501, 13, 961, 7203, 3, 7753, 62, 6978, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3376, 62, 7785, 62, 13664, 796, 2546, 7, 16, 37498, 7857, 7, 7785, 11, 16, 8, 532, 3131, 62, 2435, 62, 13664, 828, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7885, 62, 11600, 58, 7, 45286, 58, 75, 12962, 60, 796, 410, 9246, 7, 45286, 62, 11600, 58, 7, 45286, 58, 75, 12962, 4357, 7785, 58, 16, 25, 30283, 62, 7785, 62, 13664, 11, 25, 12962, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 300, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 62, 7753, 62, 6978, 796, 4654, 6978, 7, 15908, 3672, 7, 7753, 62, 6978, 828, 366, 2435, 62, 301, 696, 13, 5036, 1032, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 2435, 62, 301, 696, 796, 6060, 35439, 13, 6601, 19778, 7, 14304, 1032, 13, 961, 7203, 3, 2435, 62, 7753, 62, 6978, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1729, 62, 2502, 37796, 796, 2546, 19510, 16, 25, 7857, 7, 29510, 62, 2435, 62, 301, 696, 11, 352, 8, 532, 3131, 62, 2435, 62, 13664, 532, 352, 828, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 62, 301, 696, 796, 410, 9246, 7, 2435, 62, 301, 696, 11, 29510, 62, 2435, 62, 301, 696, 58, 7, 16, 25, 13159, 62, 2502, 37796, 828, 25, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 220, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 717, 62, 7753, 796, 10288, 58, 14247, 7131, 45286, 58, 16, 11907, 198, 220, 220, 220, 1303, 2393, 62, 6978, 796, 717, 62, 7753, 58, 11085, 62, 7753, 13, 10430, 764, 855, 3128, 62, 9521, 58, 16, 4357, 1058, 8979, 62, 15235, 7131, 16, 60, 198, 220, 220, 220, 1303, 2172, 62, 7753, 62, 6978, 796, 4654, 6978, 7, 15908, 3672, 7, 7753, 62, 6978, 27267, 40085, 7509, 62, 6404, 13, 5036, 1032, 4943, 198, 220, 220, 220, 6436, 7509, 796, 360, 713, 90, 13940, 23650, 11, 4377, 92, 3419, 198, 220, 220, 220, 26181, 62, 8367, 796, 360, 713, 90, 13940, 23650, 11, 4377, 92, 7, 25, 9864, 23680, 9306, 62, 42296, 4177, 2849, 5218, 657, 13, 15, 8, 198, 220, 220, 220, 2482, 796, 14680, 17633, 25468, 7, 45286, 62, 11600, 11, 26181, 62, 8367, 11, 6436, 7509, 11, 640, 62, 301, 696, 8, 198, 220, 220, 220, 2393, 62, 6978, 796, 10288, 58, 14247, 7131, 45286, 58, 16, 60, 7131, 16, 11, 25, 8979, 62, 15235, 60, 198, 220, 220, 220, 611, 357, 25, 13564, 287, 8251, 7, 46265, 22046, 4008, 6624, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 62, 19849, 62, 43420, 7, 43420, 11, 26672, 3672, 7, 15908, 3672, 7, 15908, 3672, 7, 15908, 3672, 7, 7753, 62, 6978, 35514, 553, 43420, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2482, 198, 198, 437, 198 ]
2.34031
2,771
#!/usr/bin/env julia using ArgParse import SpikeSorter #set up arguments s = ArgParseSettings() @add_arg_table s begin "--session" help = "The name of the session to be checked" "--channel" help = "The channel to be processed" arg_type = Int "--chunk" help = "The chunk for process" arg_type = Int "--dir" help = "Directory to run from" "files" action = :store_arg nargs = '*' arg_type = String help = "Files to be processed" end D = parse_args(ARGS,s) if isempty(D["files"]) ss = D["session"] if !isempty(D["channel"]) ch = @sprintf "%04d" D["channel"] else ch = "*" end if !isempty(D["chunk"]) chunk = @sprintf "%04d" D["chunk"] else chunk = "*" end cwd = get(D, "dir", ".") _files = readchomp(`find $cwd -name "$(ss)_templatesg$(ch).$(chunk).hdf5" -depth 1`) if isempty(_files) exit(1) end files = split(_files, "\n") else #files = convert(Array{ASCIIString,1},D["files"]) files = D["files"] end gfiles = filter(SpikeSorter.is_valid_template_file,files) if isempty(gfiles) exit(1) end println(join(gfiles,"\n")) exit(0)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 3500, 20559, 10044, 325, 198, 11748, 26309, 50, 4337, 198, 2, 2617, 510, 7159, 198, 82, 796, 20559, 10044, 325, 26232, 3419, 198, 31, 2860, 62, 853, 62, 11487, 264, 2221, 198, 197, 1, 438, 29891, 1, 198, 197, 197, 16794, 796, 366, 464, 1438, 286, 262, 6246, 284, 307, 10667, 1, 198, 197, 1, 438, 17620, 1, 198, 197, 197, 16794, 796, 366, 464, 6518, 284, 307, 13686, 1, 198, 197, 197, 853, 62, 4906, 796, 2558, 198, 197, 1, 438, 354, 2954, 1, 198, 197, 197, 16794, 796, 366, 464, 16058, 329, 1429, 1, 198, 197, 197, 853, 62, 4906, 796, 2558, 198, 197, 1, 438, 15908, 1, 198, 197, 197, 16794, 796, 366, 43055, 284, 1057, 422, 1, 198, 197, 1, 16624, 1, 198, 197, 197, 2673, 796, 1058, 8095, 62, 853, 198, 197, 197, 77, 22046, 796, 705, 9, 6, 198, 197, 197, 853, 62, 4906, 796, 10903, 198, 197, 197, 16794, 796, 366, 25876, 284, 307, 13686, 1, 198, 437, 198, 198, 35, 796, 21136, 62, 22046, 7, 1503, 14313, 11, 82, 8, 198, 361, 318, 28920, 7, 35, 14692, 16624, 8973, 8, 198, 197, 824, 796, 360, 14692, 29891, 8973, 198, 197, 361, 5145, 271, 28920, 7, 35, 14692, 17620, 8973, 8, 198, 197, 197, 354, 220, 796, 2488, 82, 37435, 36521, 3023, 67, 1, 360, 14692, 17620, 8973, 198, 197, 17772, 198, 197, 197, 354, 796, 366, 9, 1, 198, 197, 437, 198, 197, 361, 5145, 271, 28920, 7, 35, 14692, 354, 2954, 8973, 8, 198, 197, 197, 354, 2954, 796, 2488, 82, 37435, 36521, 3023, 67, 1, 360, 14692, 354, 2954, 8973, 198, 197, 17772, 198, 197, 197, 354, 2954, 796, 366, 9, 1, 198, 197, 437, 198, 197, 66, 16993, 796, 651, 7, 35, 11, 366, 15908, 1600, 366, 19570, 198, 197, 62, 16624, 796, 1100, 354, 3361, 7, 63, 19796, 720, 66, 16993, 532, 3672, 17971, 7, 824, 8, 62, 11498, 17041, 70, 3, 7, 354, 737, 3, 7, 354, 2954, 737, 71, 7568, 20, 1, 532, 18053, 352, 63, 8, 198, 197, 361, 318, 28920, 28264, 16624, 8, 198, 197, 197, 37023, 7, 16, 8, 198, 197, 437, 198, 197, 16624, 796, 6626, 28264, 16624, 11, 37082, 77, 4943, 198, 198, 17772, 198, 197, 2, 16624, 796, 10385, 7, 19182, 90, 42643, 3978, 10100, 11, 16, 5512, 35, 14692, 16624, 8973, 8, 198, 197, 16624, 796, 360, 14692, 16624, 8973, 198, 437, 198, 70, 16624, 796, 8106, 7, 4561, 522, 50, 4337, 13, 271, 62, 12102, 62, 28243, 62, 7753, 11, 16624, 8, 198, 361, 318, 28920, 7, 70, 16624, 8, 198, 197, 37023, 7, 16, 8, 198, 437, 198, 35235, 7, 22179, 7, 70, 16624, 553, 59, 77, 48774, 198, 37023, 7, 15, 8, 198 ]
2.304069
467
Vcheckbounds(A::Operator,kr::Colon) = nothing checkbounds(A::Operator,kr) = (maximum(kr) > length(A) || minimum(kr) < 1) && throw(BoundsError(A,kr)) checkbounds(A::Operator,kr::Union{Colon,InfRanges},jr::Union{Colon,InfRanges}) = nothing checkbounds(A::Operator,kr::Union{Colon,InfRanges},jr) = (maximum(jr) > size(A,2) || minimum(jr) < 1) && throw(BoundsError(A,(kr,jr))) checkbounds(A::Operator,kr,jr::Union{Colon,InfRanges}) = (maximum(kr) > size(A,1) || minimum(kr) < 1 ) && throw(BoundsError(A,(kr,jr))) checkbounds(A::Operator,kr,jr) = (!isempty(kr) && (maximum(kr) > size(A,1) || minimum(kr) < 1)) || (!isempty(jr) && (maximum(jr) > size(A,2) || minimum(jr) < 1)) && throw(BoundsError(A,(kr,jr))) checkbounds(A::Operator,K::Block,J::Block) = 1 ≤ first(K.n[1]) ≤ length(blocklengths(rangespace(A))) && 1 ≤ first(J.n[1]) ≤ length(blocklengths(domainspace(A))) checkbounds(A::Operator,K::BlockRange{1},J::BlockRange{1}) = isempty(K) || isempty(J) || checkbounds(A, Block(maximum(K.indices[1])), Block(maximum(J.indices[1]))) ## SubOperator struct SubOperator{T,B,I,DI,BI} <: Operator{T} parent::B indexes::I dims::DI bandwidths::BI end function SubOperator(A,inds,dims,lu) checkbounds(A,inds...) SubOperator{eltype(A),typeof(A),typeof(inds), typeof(dims),typeof(lu)}(A,inds,dims,lu) end # work around strange bug with bool size SubOperator(A,inds,dims::Tuple{Bool,Bool},lu) = SubOperator(A,inds,Int.(dims),lu) function SubOperator(A,inds::Tuple{Block,Block},lu) checkbounds(A,inds...) SubOperator(A,inds,(blocklengths(rangespace(A))[inds[1].n[1]],blocklengths(domainspace(A))[inds[2].n[1]]),lu) end SubOperator(A, inds::Tuple{Block,Block}) = SubOperator(A,inds,subblockbandwidths(A)) function SubOperator(A, inds::Tuple{BlockRange{1,R},BlockRange{1,R}}) where R checkbounds(A,inds...) dims = (sum(blocklengths(rangespace(A))[inds[1].indices[1]]), sum(blocklengths(domainspace(A))[inds[2].indices[1]])) SubOperator(A,inds,dims,(dims[1]-1,dims[2]-1)) end # cannot infer ranges SubOperator(A,inds,dims) = SubOperator(A,inds,dims,(dims[1]-1,dims[2]-1)) SubOperator(A,inds) = SubOperator(A,inds,map(length,inds)) convert(::Type{Operator{T}},SO::SubOperator) where {T} = SubOperator(Operator{T}(SO.parent),SO.indexes,SO.dims,SO.bandwidths)::Operator{T} function view(A::Operator,kr::InfRanges,jr::InfRanges) @assert isinf(size(A,1)) && isinf(size(A,2)) st=step(kr) if isbanded(A) && st==step(jr) # Otherwise, its not a banded operator kr1=first(kr) jr1=first(jr) l,u=(bandwidth(A,1)+jr1-kr1)÷st,(bandwidth(A,2)+kr1-jr1)÷st else l,u=∞,∞ end SubOperator(A,(kr,jr),size(A),(l,u)) end view(V::SubOperator, kr::AbstractRange, jr::AbstractRange) = view(V.parent,reindex(V,parentindices(V),(kr,jr))...) function view(A::Operator, kr::AbstractRange, jr::AbstractRange) st=step(kr) if isbanded(A) && st == step(jr) kr1=first(kr) jr1=first(jr) l,u=(bandwidth(A,1)+jr1-kr1)÷st,(bandwidth(A,2)+kr1-jr1)÷st SubOperator(A,(kr,jr),(length(kr),length(jr)),(l,u)) else SubOperator(A,(kr,jr)) end end function view(A::Operator,kr::UnitRange,jr::UnitRange) if isbanded(A) shft=first(kr)-first(jr) l,u=bandwidth(A,1)-shft,bandwidth(A,2)+shft SubOperator(A,(kr,jr),(length(kr),length(jr)),(l,u)) else SubOperator(A,(kr,jr)) end end view(A::Operator,::Colon,::Colon) = view(A,1:size(A,1),1:size(A,2)) view(A::Operator,::Colon,jr) = view(A,1:size(A,1),jr) view(A::Operator,kr,::Colon) = view(A,kr,1:size(A,2)) view(A::Operator,K::Block,J::Block) = SubOperator(A,(K,J)) view(A::Operator,K::Block,j::Colon) = view(A,blockrows(A,K),j) view(A::Operator,k::Colon,J::Block) = view(A,k,blockcols(A,J)) view(A::Operator, K::Block, j) = view(A,blockrows(A,Int(K)),j) view(A::Operator, k, J::Block) = view(A,k,blockcols(A,Int(J))) #TODO: fix view view(A::Operator,KR::BlockRange,JR::BlockRange) = SubOperator(A,(KR,JR)) view(A::Operator,k,j) = SubOperator(A,(k,j)) defaultgetindex(B::Operator,k::InfRanges, j::InfRanges) = view(B, k, j) defaultgetindex(B::Operator,k::AbstractRange, j::InfRanges) = view(B, k, j) defaultgetindex(B::Operator,k::InfRanges, j::AbstractRange) = view(B, k, j) reindex(A::Operator, B::Tuple{Block,Any}, kj::Tuple{Any,Any}) = (reindex(rangespace(A),(B[1],), (kj[1],))[1], reindex(domainspace(A),tail(B), tail(kj))[1]) # always reindex left-to-right, so if we have only a single tuple, then # we must be the domainspace reindex(A::Operator, B::Tuple{Block{1}}, kj::Tuple{Any}) = reindex(domainspace(A),B,kj) reindex(A::Operator, B::Tuple{BlockRange1,Any}, kj::Tuple{Any,Any}) = (reindex(rangespace(A),(B[1],), (kj[1],))[1], reindex(domainspace(A),tail(B), tail(kj))[1]) # always reindex left-to-right, so if we have only a single tuple, then # we must be the domainspace reindex(A::Operator, B::Tuple{BlockRange1}, kj::Tuple{Any}) = reindex(domainspace(A),B,kj) # Blocks are preserved under ranges for TYP in (:Block,:BlockRange1,:(AbstractVector{Block{1}})) @eval begin reindex(A::Operator, B::Tuple{AbstractVector{Int},Any}, kj::Tuple{$TYP,Any}) = (reindex(rangespace(A), (B[1],), (kj[1],))[1], reindex(domainspace(A),tail(B), tail(kj))[1]) reindex(A::Operator, B::Tuple{AbstractVector{Int}}, kj::Tuple{$TYP}) = reindex(domainspace(A),B,kj) end end view(V::SubOperator,kr::UnitRange,jr::UnitRange) = view(V.parent,reindex(V,parentindices(V),(kr,jr))...) view(V::SubOperator,K::Block,J::Block) = view(V.parent,reindex(V,parentindices(V),(K,J))...) view(V::SubOperator,KR::BlockRange,JR::BlockRange) = view(V.parent, reindex(V,parentindices(V),(KR,JR))...) function view(V::SubOperator,::Type{FiniteRange},jr::AbstractVector{Int}) cs = (isbanded(V) || isblockbandedbelow(V)) ? colstop(V,maximum(jr)) : mapreduce(j->colstop(V,j),max,jr) view(V,1:cs,jr) end view(V::SubOperator, kr, jr) = view(V.parent,reindex(V,parentindices(V),(kr,jr))...) view(V::SubOperator,kr::InfRanges,jr::InfRanges) = view(V.parent,reindex(V,parentindices(V),(kr,jr))...) bandwidths(S::SubOperator) = S.bandwidths function colstop(S::SubOperator{T,OP,Tuple{UnitRange{Int},UnitRange{Int}}},j::Integer) where {T,OP} cs = colstop(parent(S),parentindices(S)[2][j]) kr = parentindices(S)[1] n = size(S,1) if cs < first(kr) 0 elseif cs ≥ last(kr) n else min(n,findfirst(isequal(cs),kr)) end end colstart(S::SubOperator{T,OP,Tuple{UnitRange{Int},UnitRange{Int}}},j::Integer) where {T,OP} = max(findfirst(parentindices(S)[1],colstart(parent(S),parentindices(S)[2][j])),1) rowstart(S::SubOperator{T,OP,Tuple{UnitRange{Int},UnitRange{Int}}},j::Integer) where {T,OP} = max(1,findfirst(parentindices(S)[2],rowstart(parent(S),parentindices(S)[1][j]))) rowstop(S::SubOperator{T,OP,Tuple{UnitRange{Int},UnitRange{Int}}},j::Integer) where {T,OP} = findfirst(parentindices(S)[2],rowstop(parent(S),parentindices(S)[1][j])) # blocks don't change blockcolstop(S::SubOperator{T,OP,Tuple{II,JJ}},J::Integer) where {T,OP,II<:AbstractRange{Int},JJ<:AbstractRange{Int}} = blockcolstop(parent(S),J) israggedbelow(S::SubOperator) = israggedbelow(parent(S)) # since blocks don't change with indexex, neither do blockbandwidths blockbandwidths(S::SubOperator{T,OP,Tuple{II,JJ}}) where {T,OP,II<:AbstractRange{Int},JJ<:AbstractRange{Int}} = blockbandwidths(parent(S)) function blockbandwidths(S::SubOperator{T,B,Tuple{BlockRange1,BlockRange1}}) where {T,B} KR,JR = parentindices(S) l,u = blockbandwidths(parent(S)) sh = first(KR).n[1]-first(JR).n[1] l-sh,u+sh end isblockbanded(S::SubOperator{T,B,Tuple{Block,Block}}) where {T,B} = false isbanded(S::SubOperator{T,B,Tuple{Block,Block}}) where {T,B} = isbandedblockbanded(parent(S)) bandwidths(S::SubOperator{T,B,Tuple{Block,Block}}) where {T,B} = subblockbandwidths(parent(S)) blockbandwidths(S::SubOperator{T,B,Tuple{Block,Block}}) where {T,B} = 0,0 function BandedBlockBandedMatrix(::Type{Zeros}, S::SubOperator) kr,jr=parentindices(S) KO=parent(S) l,u=blockbandwidths(KO) λ,μ=subblockbandwidths(KO) rt=rangespace(KO) dt=domainspace(KO) k1,j1=isempty(kr) || isempty(jr) ? (first(kr),first(jr)) : reindex(S,parentindices(S),(1,1)) # each row/column that we differ from the the block start shifts # the sub block inds J = block(dt,j1) K = block(rt,k1) jsh=j1-blockstart(dt,J) ksh=k1-blockstart(rt,K) rows,cols = blocklengths(rangespace(S)), blocklengths(domainspace(S)) BandedBlockBandedMatrix(Zeros{eltype(KO)}(sum(rows),sum(cols)), (rows,cols), (l,u), (λ-jsh,μ+ksh)) end function BandedBlockBandedMatrix(::Type{Zeros}, S::SubOperator{T,B,Tuple{BlockRange1,BlockRange1}}) where {T,B} KR,JR = parentindices(S) KO = parent(S) l,u = blockbandwidths(KO)::Tuple{Int,Int} λ,μ = subblockbandwidths(KO)::Tuple{Int,Int} rt = rangespace(KO) dt = domainspace(KO) J = first(JR) K = first(KR) bl_sh = Int(J) - Int(K) KBR = blocklengthrange(rt,KR) KJR = blocklengthrange(dt,JR) BandedBlockBandedMatrix(Zeros{eltype(KO)}(sum(KBR),sum(KJR)), (AbstractVector{Int}(KBR),AbstractVector{Int}(KJR)), (l+bl_sh,u-bl_sh), (λ,μ)) end function domainspace(S::SubOperator) P =parent(S) sp=domainspace(P) kr=parentindices(S)[2] SubSpace{typeof(sp),typeof(kr),domaintype(sp),rangetype(sp)}(sp,kr) end function rangespace(S::SubOperator) P =parent(S) sp=rangespace(P) kr=parentindices(S)[1] SubSpace{typeof(sp),typeof(kr),domaintype(sp),rangetype(sp)}(sp,kr) end size(V::SubOperator) = V.dims size(V::SubOperator,k::Int) = V.dims[k] unsafe_getindex(V::SubOperator,k::Integer,j::Integer) = V.parent[reindex(V,parentindices(V),(k,j))...] getindex(V::SubOperator,k::Integer,j::Integer) = V.parent[reindex(V,parentindices(V),(k,j))...] getindex(V::SubOperator,k::Integer,j::AbstractRange) = V.parent[reindex(V,parentindices(V),(k,j))...] getindex(V::SubOperator,k::AbstractRange,j::Integer) = V.parent[reindex(V,parentindices(V),(k,j))...] getindex(V::SubOperator,k::AbstractRange,j::AbstractRange) = V.parent[reindex(V,parentindices(V),(k,j))...] Base.parent(S::SubOperator) = S.parent Base.parentindices(S::SubOperator) = S.indexes for OP in (:isblockbanded,:isblockbandedabove,:isblockbandedbelow, :isbandedblockbanded,:isbandedblockbandedabove, :isbandedblockbandedbelow) @eval $OP(S::SubOperator) = $OP(parent(S)) end # TODO: These should be removed as the general purpose case will work, # once the notion of bandedness of finite dimensional operators is made sense of _colstops(V) = Int[max(0,colstop(V,j)) for j=1:size(V,2)] for TYP in (:RaggedMatrix, :Matrix) def_TYP = Meta.parse("default_" * string(TYP)) @eval begin function $TYP(V::SubOperator) if isinf(size(V,1)) || isinf(size(V,2)) error("Cannot convert $V to a $TYP") end A = parent(V) if isbanded(A) $TYP(BandedMatrix(V)) else $def_TYP(V) end end function $TYP(V::SubOperator{T,BB,NTuple{2,UnitRange{Int}}}) where {T,BB} if isinf(size(V,1)) || isinf(size(V,2)) error("Cannot convert $V to a $TYP") end A = parent(V) if isbanded(A) $TYP(BandedMatrix(V)) elseif isbandedblockbanded(A) N = block(rangespace(A), last(parentindices(V)[1])) M = block(domainspace(A), last(parentindices(V)[2])) B = A[Block(1):N, Block(1):M] RaggedMatrix(view(B, parentindices(V)...), _colstops(V)) else $def_TYP(V) end end end end # fast converts to banded matrices would be based on indices, not blocks function BandedMatrix(S::SubOperator{T,B,Tuple{BlockRange1,BlockRange1}}) where {T,B} A = parent(S) ds = domainspace(A) rs = rangespace(A) KR,JR = parentindices(S) BandedMatrix(view(A, blockstart(rs,first(KR)):blockstop(rs,last(KR)), blockstart(ds,first(JR)):blockstop(ds,last(JR)))) end function mul_coefficients(A::SubOperator{T,B,Tuple{UnitRange{Int},UnitRange{Int}}},b) where {T,B} if size(A,2) == length(b) AbstractMatrix(A)*b else view(A,:,1:length(b))*b end end
[ 53, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 3712, 5216, 261, 8, 796, 2147, 198, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 8, 796, 198, 220, 220, 220, 357, 47033, 7, 38584, 8, 1875, 4129, 7, 32, 8, 8614, 5288, 7, 38584, 8, 1279, 352, 8, 11405, 3714, 7, 33, 3733, 12331, 7, 32, 11, 38584, 4008, 628, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 3712, 38176, 90, 5216, 261, 11, 18943, 49, 6231, 5512, 73, 81, 3712, 38176, 90, 5216, 261, 11, 18943, 49, 6231, 30072, 796, 2147, 198, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 3712, 38176, 90, 5216, 261, 11, 18943, 49, 6231, 5512, 73, 81, 8, 796, 198, 220, 220, 220, 357, 47033, 7, 73, 81, 8, 1875, 2546, 7, 32, 11, 17, 8, 8614, 5288, 7, 73, 81, 8, 1279, 352, 8, 11405, 3714, 7, 33, 3733, 12331, 7, 32, 11, 7, 38584, 11, 73, 81, 22305, 198, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 11, 73, 81, 3712, 38176, 90, 5216, 261, 11, 18943, 49, 6231, 30072, 796, 198, 220, 220, 220, 357, 47033, 7, 38584, 8, 1875, 2546, 7, 32, 11, 16, 8, 220, 8614, 5288, 7, 38584, 8, 1279, 352, 1267, 11405, 3714, 7, 33, 3733, 12331, 7, 32, 11, 7, 38584, 11, 73, 81, 22305, 198, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 38584, 11, 73, 81, 8, 796, 198, 220, 220, 220, 22759, 271, 28920, 7, 38584, 8, 11405, 357, 47033, 7, 38584, 8, 1875, 2546, 7, 32, 11, 16, 8, 8614, 5288, 7, 38584, 8, 1279, 352, 4008, 8614, 198, 220, 220, 220, 22759, 271, 28920, 7, 73, 81, 8, 11405, 357, 47033, 7, 73, 81, 8, 1875, 2546, 7, 32, 11, 17, 8, 8614, 5288, 7, 73, 81, 8, 1279, 352, 4008, 11405, 198, 220, 220, 220, 3714, 7, 33, 3733, 12331, 7, 32, 11, 7, 38584, 11, 73, 81, 22305, 628, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 42, 3712, 12235, 11, 41, 3712, 12235, 8, 796, 198, 220, 220, 220, 220, 352, 41305, 1849, 11085, 7, 42, 13, 77, 58, 16, 12962, 41305, 1849, 13664, 7, 9967, 13664, 82, 7, 81, 6231, 10223, 7, 32, 22305, 11405, 198, 220, 220, 220, 220, 352, 41305, 1849, 11085, 7, 41, 13, 77, 58, 16, 12962, 41305, 1849, 13664, 7, 9967, 13664, 82, 7, 3438, 1299, 10223, 7, 32, 22305, 198, 198, 9122, 65, 3733, 7, 32, 3712, 18843, 1352, 11, 42, 3712, 12235, 17257, 90, 16, 5512, 41, 3712, 12235, 17257, 90, 16, 30072, 796, 198, 220, 220, 220, 318, 28920, 7, 42, 8, 8614, 318, 28920, 7, 41, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 65, 3733, 7, 32, 11, 9726, 7, 47033, 7, 42, 13, 521, 1063, 58, 16, 12962, 828, 9726, 7, 47033, 7, 41, 13, 521, 1063, 58, 16, 60, 22305, 628, 198, 198, 2235, 3834, 18843, 1352, 198, 198, 7249, 3834, 18843, 1352, 90, 51, 11, 33, 11, 40, 11, 17931, 11, 3483, 92, 1279, 25, 35946, 90, 51, 92, 198, 220, 220, 220, 2560, 3712, 33, 198, 220, 220, 220, 39199, 3712, 40, 198, 220, 220, 220, 5391, 82, 3712, 17931, 198, 220, 220, 220, 19484, 82, 3712, 3483, 198, 437, 628, 198, 198, 8818, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 67, 12078, 11, 2290, 8, 198, 220, 220, 220, 2198, 65, 3733, 7, 32, 11, 521, 82, 23029, 198, 220, 220, 220, 3834, 18843, 1352, 90, 417, 4906, 7, 32, 828, 4906, 1659, 7, 32, 828, 4906, 1659, 7, 521, 82, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 1659, 7, 67, 12078, 828, 4906, 1659, 7, 2290, 38165, 7, 32, 11, 521, 82, 11, 67, 12078, 11, 2290, 8, 198, 437, 198, 198, 2, 670, 1088, 6283, 5434, 351, 20512, 2546, 198, 7004, 18843, 1352, 7, 32, 11, 521, 82, 11, 67, 12078, 3712, 51, 29291, 90, 33, 970, 11, 33, 970, 5512, 2290, 8, 796, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 5317, 12195, 67, 12078, 828, 2290, 8, 198, 198, 8818, 3834, 18843, 1352, 7, 32, 11, 521, 82, 3712, 51, 29291, 90, 12235, 11, 12235, 5512, 2290, 8, 198, 220, 220, 220, 2198, 65, 3733, 7, 32, 11, 521, 82, 23029, 198, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 7, 9967, 13664, 82, 7, 81, 6231, 10223, 7, 32, 4008, 58, 521, 82, 58, 16, 4083, 77, 58, 16, 60, 4357, 9967, 13664, 82, 7, 3438, 1299, 10223, 7, 32, 4008, 58, 521, 82, 58, 17, 4083, 77, 58, 16, 11907, 828, 2290, 8, 198, 437, 198, 198, 7004, 18843, 1352, 7, 32, 11, 773, 82, 3712, 51, 29291, 90, 12235, 11, 12235, 30072, 796, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 7266, 9967, 3903, 10394, 82, 7, 32, 4008, 198, 8818, 3834, 18843, 1352, 7, 32, 11, 773, 82, 3712, 51, 29291, 90, 12235, 17257, 90, 16, 11, 49, 5512, 12235, 17257, 90, 16, 11, 49, 11709, 8, 810, 371, 198, 220, 220, 220, 2198, 65, 3733, 7, 32, 11, 521, 82, 23029, 198, 220, 220, 220, 5391, 82, 796, 357, 16345, 7, 9967, 13664, 82, 7, 81, 6231, 10223, 7, 32, 4008, 58, 521, 82, 58, 16, 4083, 521, 1063, 58, 16, 11907, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2160, 7, 9967, 13664, 82, 7, 3438, 1299, 10223, 7, 32, 4008, 58, 521, 82, 58, 17, 4083, 521, 1063, 58, 16, 11907, 4008, 198, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 67, 12078, 11, 7, 67, 12078, 58, 16, 45297, 16, 11, 67, 12078, 58, 17, 45297, 16, 4008, 198, 437, 198, 198, 2, 2314, 13249, 16069, 198, 7004, 18843, 1352, 7, 32, 11, 521, 82, 11, 67, 12078, 8, 796, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 67, 12078, 11, 7, 67, 12078, 58, 16, 45297, 16, 11, 67, 12078, 58, 17, 45297, 16, 4008, 198, 7004, 18843, 1352, 7, 32, 11, 521, 82, 8, 796, 3834, 18843, 1352, 7, 32, 11, 521, 82, 11, 8899, 7, 13664, 11, 521, 82, 4008, 628, 198, 1102, 1851, 7, 3712, 6030, 90, 18843, 1352, 90, 51, 92, 5512, 15821, 3712, 7004, 18843, 1352, 8, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 3834, 18843, 1352, 7, 18843, 1352, 90, 51, 92, 7, 15821, 13, 8000, 828, 15821, 13, 9630, 274, 11, 15821, 13, 67, 12078, 11, 15821, 13, 3903, 10394, 82, 2599, 25, 18843, 1352, 90, 51, 92, 198, 198, 8818, 1570, 7, 32, 3712, 18843, 1352, 11, 38584, 3712, 18943, 49, 6231, 11, 73, 81, 3712, 18943, 49, 6231, 8, 198, 220, 220, 220, 2488, 30493, 318, 10745, 7, 7857, 7, 32, 11, 16, 4008, 11405, 318, 10745, 7, 7857, 7, 32, 11, 17, 4008, 198, 220, 220, 220, 336, 28, 9662, 7, 38584, 8, 198, 220, 220, 220, 611, 318, 3903, 276, 7, 32, 8, 11405, 336, 855, 9662, 7, 73, 81, 8, 220, 1303, 15323, 11, 663, 407, 257, 4097, 276, 10088, 198, 220, 220, 220, 220, 220, 220, 220, 479, 81, 16, 28, 11085, 7, 38584, 8, 198, 220, 220, 220, 220, 220, 220, 220, 474, 81, 16, 28, 11085, 7, 73, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 84, 16193, 3903, 10394, 7, 32, 11, 16, 47762, 73, 81, 16, 12, 38584, 16, 8, 127, 115, 301, 11, 7, 3903, 10394, 7, 32, 11, 17, 47762, 38584, 16, 12, 73, 81, 16, 8, 127, 115, 301, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 84, 28, 24861, 252, 11, 24861, 252, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 7, 38584, 11, 73, 81, 828, 7857, 7, 32, 828, 7, 75, 11, 84, 4008, 198, 437, 198, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 479, 81, 3712, 23839, 17257, 11, 474, 81, 3712, 23839, 17257, 8, 796, 198, 220, 220, 220, 1570, 7, 53, 13, 8000, 11, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 38584, 11, 73, 81, 4008, 23029, 198, 198, 8818, 1570, 7, 32, 3712, 18843, 1352, 11, 479, 81, 3712, 23839, 17257, 11, 474, 81, 3712, 23839, 17257, 8, 198, 220, 220, 220, 336, 28, 9662, 7, 38584, 8, 198, 220, 220, 220, 611, 318, 3903, 276, 7, 32, 8, 11405, 336, 6624, 2239, 7, 73, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 479, 81, 16, 28, 11085, 7, 38584, 8, 198, 220, 220, 220, 220, 220, 220, 220, 474, 81, 16, 28, 11085, 7, 73, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 84, 16193, 3903, 10394, 7, 32, 11, 16, 47762, 73, 81, 16, 12, 38584, 16, 8, 127, 115, 301, 11, 7, 3903, 10394, 7, 32, 11, 17, 47762, 38584, 16, 12, 73, 81, 16, 8, 127, 115, 301, 198, 220, 220, 220, 220, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 7, 38584, 11, 73, 81, 828, 7, 13664, 7, 38584, 828, 13664, 7, 73, 81, 36911, 7, 75, 11, 84, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 7, 38584, 11, 73, 81, 4008, 198, 220, 220, 220, 886, 198, 437, 628, 198, 8818, 1570, 7, 32, 3712, 18843, 1352, 11, 38584, 3712, 26453, 17257, 11, 73, 81, 3712, 26453, 17257, 8, 198, 220, 220, 220, 611, 318, 3903, 276, 7, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 427, 701, 28, 11085, 7, 38584, 13219, 11085, 7, 73, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 11, 84, 28, 3903, 10394, 7, 32, 11, 16, 13219, 1477, 701, 11, 3903, 10394, 7, 32, 11, 17, 47762, 1477, 701, 198, 220, 220, 220, 220, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 7, 38584, 11, 73, 81, 828, 7, 13664, 7, 38584, 828, 13664, 7, 73, 81, 36911, 7, 75, 11, 84, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3834, 18843, 1352, 7, 32, 11, 7, 38584, 11, 73, 81, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 3712, 5216, 261, 11, 3712, 5216, 261, 8, 796, 1570, 7, 32, 11, 16, 25, 7857, 7, 32, 11, 16, 828, 16, 25, 7857, 7, 32, 11, 17, 4008, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 3712, 5216, 261, 11, 73, 81, 8, 796, 1570, 7, 32, 11, 16, 25, 7857, 7, 32, 11, 16, 828, 73, 81, 8, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 38584, 11, 3712, 5216, 261, 8, 796, 1570, 7, 32, 11, 38584, 11, 16, 25, 7857, 7, 32, 11, 17, 4008, 628, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 42, 3712, 12235, 11, 41, 3712, 12235, 8, 796, 3834, 18843, 1352, 7, 32, 11, 7, 42, 11, 41, 4008, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 42, 3712, 12235, 11, 73, 3712, 5216, 261, 8, 796, 1570, 7, 32, 11, 9967, 8516, 7, 32, 11, 42, 828, 73, 8, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 74, 3712, 5216, 261, 11, 41, 3712, 12235, 8, 796, 1570, 7, 32, 11, 74, 11, 9967, 4033, 82, 7, 32, 11, 41, 4008, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 509, 3712, 12235, 11, 474, 8, 796, 1570, 7, 32, 11, 9967, 8516, 7, 32, 11, 5317, 7, 42, 36911, 73, 8, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 479, 11, 449, 3712, 12235, 8, 796, 1570, 7, 32, 11, 74, 11, 9967, 4033, 82, 7, 32, 11, 5317, 7, 41, 22305, 1303, 51, 3727, 46, 25, 4259, 1570, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 30758, 3712, 12235, 17257, 11, 44817, 3712, 12235, 17257, 8, 796, 3834, 18843, 1352, 7, 32, 11, 7, 30758, 11, 44817, 4008, 198, 198, 1177, 7, 32, 3712, 18843, 1352, 11, 74, 11, 73, 8, 796, 3834, 18843, 1352, 7, 32, 11, 7, 74, 11, 73, 4008, 198, 198, 12286, 1136, 9630, 7, 33, 3712, 18843, 1352, 11, 74, 3712, 18943, 49, 6231, 11, 474, 3712, 18943, 49, 6231, 8, 796, 1570, 7, 33, 11, 479, 11, 474, 8, 198, 12286, 1136, 9630, 7, 33, 3712, 18843, 1352, 11, 74, 3712, 23839, 17257, 11, 474, 3712, 18943, 49, 6231, 8, 796, 1570, 7, 33, 11, 479, 11, 474, 8, 198, 12286, 1136, 9630, 7, 33, 3712, 18843, 1352, 11, 74, 3712, 18943, 49, 6231, 11, 474, 3712, 23839, 17257, 8, 796, 1570, 7, 33, 11, 479, 11, 474, 8, 628, 198, 198, 260, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 12235, 11, 7149, 5512, 479, 73, 3712, 51, 29291, 90, 7149, 11, 7149, 30072, 796, 198, 220, 220, 220, 357, 260, 9630, 7, 81, 6231, 10223, 7, 32, 828, 7, 33, 58, 16, 4357, 828, 357, 42421, 58, 16, 4357, 4008, 58, 16, 4357, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 13199, 7, 33, 828, 7894, 7, 42421, 4008, 58, 16, 12962, 198, 2, 1464, 302, 9630, 1364, 12, 1462, 12, 3506, 11, 523, 611, 356, 423, 691, 257, 2060, 46545, 11, 788, 198, 2, 356, 1276, 307, 262, 18209, 10223, 198, 260, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 12235, 90, 16, 92, 5512, 479, 73, 3712, 51, 29291, 90, 7149, 30072, 796, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 33, 11, 42421, 8, 198, 198, 260, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 12235, 17257, 16, 11, 7149, 5512, 479, 73, 3712, 51, 29291, 90, 7149, 11, 7149, 30072, 796, 198, 220, 220, 220, 357, 260, 9630, 7, 81, 6231, 10223, 7, 32, 828, 7, 33, 58, 16, 4357, 828, 357, 42421, 58, 16, 4357, 4008, 58, 16, 4357, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 13199, 7, 33, 828, 7894, 7, 42421, 4008, 58, 16, 12962, 198, 2, 1464, 302, 9630, 1364, 12, 1462, 12, 3506, 11, 523, 611, 356, 423, 691, 257, 2060, 46545, 11, 788, 198, 2, 356, 1276, 307, 262, 18209, 10223, 198, 260, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 12235, 17257, 16, 5512, 479, 73, 3712, 51, 29291, 90, 7149, 30072, 796, 198, 220, 220, 220, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 33, 11, 42421, 8, 198, 2, 35111, 389, 17232, 739, 16069, 198, 1640, 24412, 47, 287, 357, 25, 12235, 11, 25, 12235, 17257, 16, 11, 37498, 23839, 38469, 90, 12235, 90, 16, 11709, 4008, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 302, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 23839, 38469, 90, 5317, 5512, 7149, 5512, 479, 73, 3712, 51, 29291, 90, 3, 9936, 47, 11, 7149, 30072, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 260, 9630, 7, 81, 6231, 10223, 7, 32, 828, 357, 33, 58, 16, 4357, 828, 357, 42421, 58, 16, 4357, 4008, 58, 16, 4357, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 13199, 7, 33, 828, 7894, 7, 42421, 4008, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 302, 9630, 7, 32, 3712, 18843, 1352, 11, 347, 3712, 51, 29291, 90, 23839, 38469, 90, 5317, 92, 5512, 479, 73, 3712, 51, 29291, 90, 3, 9936, 47, 30072, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 302, 9630, 7, 3438, 1299, 10223, 7, 32, 828, 33, 11, 42421, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 38584, 3712, 26453, 17257, 11, 73, 81, 3712, 26453, 17257, 8, 796, 1570, 7, 53, 13, 8000, 11, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 38584, 11, 73, 81, 4008, 23029, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 42, 3712, 12235, 11, 41, 3712, 12235, 8, 796, 1570, 7, 53, 13, 8000, 11, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 42, 11, 41, 4008, 23029, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 30758, 3712, 12235, 17257, 11, 44817, 3712, 12235, 17257, 8, 796, 1570, 7, 53, 13, 8000, 11, 302, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 30758, 11, 44817, 4008, 23029, 198, 8818, 1570, 7, 53, 3712, 7004, 18843, 1352, 11, 3712, 6030, 90, 37, 9504, 17257, 5512, 73, 81, 3712, 23839, 38469, 90, 5317, 30072, 198, 220, 220, 220, 50115, 796, 357, 271, 3903, 276, 7, 53, 8, 8614, 318, 9967, 3903, 276, 35993, 7, 53, 4008, 5633, 951, 11338, 7, 53, 11, 47033, 7, 73, 81, 4008, 1058, 3975, 445, 7234, 7, 73, 3784, 4033, 11338, 7, 53, 11, 73, 828, 9806, 11, 73, 81, 8, 198, 220, 220, 220, 1570, 7, 53, 11, 16, 25, 6359, 11, 73, 81, 8, 198, 437, 198, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 479, 81, 11, 474, 81, 8, 796, 1570, 7, 53, 13, 8000, 11, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 38584, 11, 73, 81, 4008, 23029, 198, 1177, 7, 53, 3712, 7004, 18843, 1352, 11, 38584, 3712, 18943, 49, 6231, 11, 73, 81, 3712, 18943, 49, 6231, 8, 796, 1570, 7, 53, 13, 8000, 11, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 38584, 11, 73, 81, 4008, 23029, 198, 198, 3903, 10394, 82, 7, 50, 3712, 7004, 18843, 1352, 8, 796, 311, 13, 3903, 10394, 82, 198, 8818, 951, 11338, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 26453, 17257, 90, 5317, 5512, 26453, 17257, 90, 5317, 11709, 5512, 73, 3712, 46541, 8, 810, 1391, 51, 11, 3185, 92, 198, 220, 220, 220, 50115, 796, 951, 11338, 7, 8000, 7, 50, 828, 8000, 521, 1063, 7, 50, 38381, 17, 7131, 73, 12962, 198, 220, 220, 220, 479, 81, 796, 2560, 521, 1063, 7, 50, 38381, 16, 60, 198, 220, 220, 220, 299, 796, 2546, 7, 50, 11, 16, 8, 198, 220, 220, 220, 611, 50115, 1279, 717, 7, 38584, 8, 198, 220, 220, 220, 220, 220, 220, 220, 657, 198, 220, 220, 220, 2073, 361, 50115, 26870, 1849, 12957, 7, 38584, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 949, 7, 77, 11, 19796, 11085, 7, 786, 13255, 7, 6359, 828, 38584, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 4033, 9688, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 26453, 17257, 90, 5317, 5512, 26453, 17257, 90, 5317, 11709, 5512, 73, 3712, 46541, 8, 810, 1391, 51, 11, 3185, 92, 796, 198, 220, 220, 220, 3509, 7, 19796, 11085, 7, 8000, 521, 1063, 7, 50, 38381, 16, 4357, 4033, 9688, 7, 8000, 7, 50, 828, 8000, 521, 1063, 7, 50, 38381, 17, 7131, 73, 12962, 828, 16, 8, 198, 808, 9688, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 26453, 17257, 90, 5317, 5512, 26453, 17257, 90, 5317, 11709, 5512, 73, 3712, 46541, 8, 810, 1391, 51, 11, 3185, 92, 796, 198, 220, 220, 220, 3509, 7, 16, 11, 19796, 11085, 7, 8000, 521, 1063, 7, 50, 38381, 17, 4357, 808, 9688, 7, 8000, 7, 50, 828, 8000, 521, 1063, 7, 50, 38381, 16, 7131, 73, 60, 22305, 198, 808, 11338, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 26453, 17257, 90, 5317, 5512, 26453, 17257, 90, 5317, 11709, 5512, 73, 3712, 46541, 8, 810, 1391, 51, 11, 3185, 92, 796, 198, 220, 220, 220, 220, 220, 220, 220, 1064, 11085, 7, 8000, 521, 1063, 7, 50, 38381, 17, 4357, 808, 11338, 7, 8000, 7, 50, 828, 8000, 521, 1063, 7, 50, 38381, 16, 7131, 73, 60, 4008, 628, 198, 2, 7021, 836, 470, 1487, 198, 9967, 4033, 11338, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 3978, 11, 32178, 92, 5512, 41, 3712, 46541, 8, 810, 1391, 51, 11, 3185, 11, 3978, 27, 25, 23839, 17257, 90, 5317, 5512, 32178, 27, 25, 23839, 17257, 90, 5317, 11709, 796, 198, 220, 220, 220, 2512, 4033, 11338, 7, 8000, 7, 50, 828, 41, 8, 198, 198, 271, 81, 14655, 35993, 7, 50, 3712, 7004, 18843, 1352, 8, 796, 318, 81, 14655, 35993, 7, 8000, 7, 50, 4008, 198, 198, 2, 1201, 7021, 836, 470, 1487, 351, 6376, 1069, 11, 6159, 466, 2512, 3903, 10394, 82, 198, 9967, 3903, 10394, 82, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 3185, 11, 51, 29291, 90, 3978, 11, 32178, 11709, 8, 810, 1391, 51, 11, 3185, 11, 3978, 27, 25, 23839, 17257, 90, 5317, 5512, 32178, 27, 25, 23839, 17257, 90, 5317, 11709, 796, 198, 220, 220, 220, 2512, 3903, 10394, 82, 7, 8000, 7, 50, 4008, 198, 8818, 2512, 3903, 10394, 82, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 17257, 16, 11, 12235, 17257, 16, 11709, 8, 810, 1391, 51, 11, 33, 92, 198, 220, 220, 220, 29430, 11, 44817, 796, 2560, 521, 1063, 7, 50, 8, 198, 220, 220, 220, 300, 11, 84, 796, 2512, 3903, 10394, 82, 7, 8000, 7, 50, 4008, 198, 220, 220, 220, 427, 796, 717, 7, 30758, 737, 77, 58, 16, 45297, 11085, 7, 44817, 737, 77, 58, 16, 60, 198, 220, 220, 220, 300, 12, 1477, 11, 84, 10, 1477, 198, 437, 198, 198, 271, 9967, 3903, 276, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 11, 12235, 11709, 8, 810, 1391, 51, 11, 33, 92, 796, 3991, 198, 271, 3903, 276, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 11, 12235, 11709, 8, 810, 1391, 51, 11, 33, 92, 796, 318, 3903, 276, 9967, 3903, 276, 7, 8000, 7, 50, 4008, 198, 3903, 10394, 82, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 11, 12235, 11709, 8, 810, 1391, 51, 11, 33, 92, 796, 850, 9967, 3903, 10394, 82, 7, 8000, 7, 50, 4008, 198, 9967, 3903, 10394, 82, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 11, 12235, 11709, 8, 810, 1391, 51, 11, 33, 92, 796, 657, 11, 15, 198, 198, 8818, 10243, 276, 12235, 33, 12249, 46912, 7, 3712, 6030, 90, 57, 27498, 5512, 311, 3712, 7004, 18843, 1352, 8, 198, 220, 220, 220, 479, 81, 11, 73, 81, 28, 8000, 521, 1063, 7, 50, 8, 198, 220, 220, 220, 21054, 28, 8000, 7, 50, 8, 198, 220, 220, 220, 300, 11, 84, 28, 9967, 3903, 10394, 82, 7, 22328, 8, 198, 220, 220, 220, 7377, 119, 11, 34703, 28, 7266, 9967, 3903, 10394, 82, 7, 22328, 8, 628, 220, 220, 220, 374, 83, 28, 81, 6231, 10223, 7, 22328, 8, 198, 220, 220, 220, 288, 83, 28, 3438, 1299, 10223, 7, 22328, 8, 198, 220, 220, 220, 479, 16, 11, 73, 16, 28, 271, 28920, 7, 38584, 8, 8614, 318, 28920, 7, 73, 81, 8, 5633, 357, 11085, 7, 38584, 828, 11085, 7, 73, 81, 4008, 1058, 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, 302, 9630, 7, 50, 11, 8000, 521, 1063, 7, 50, 828, 7, 16, 11, 16, 4008, 628, 220, 220, 220, 1303, 1123, 5752, 14, 28665, 326, 356, 13238, 422, 262, 262, 2512, 923, 15381, 198, 220, 220, 220, 1303, 262, 850, 2512, 773, 82, 198, 220, 220, 220, 449, 796, 2512, 7, 28664, 11, 73, 16, 8, 198, 220, 220, 220, 509, 796, 2512, 7, 17034, 11, 74, 16, 8, 198, 220, 220, 220, 474, 1477, 28, 73, 16, 12, 9967, 9688, 7, 28664, 11, 41, 8, 198, 220, 220, 220, 479, 1477, 28, 74, 16, 12, 9967, 9688, 7, 17034, 11, 42, 8, 628, 220, 220, 220, 15274, 11, 4033, 82, 796, 2512, 13664, 82, 7, 81, 6231, 10223, 7, 50, 36911, 2512, 13664, 82, 7, 3438, 1299, 10223, 7, 50, 4008, 628, 220, 220, 220, 10243, 276, 12235, 33, 12249, 46912, 7, 57, 27498, 90, 417, 4906, 7, 22328, 38165, 7, 16345, 7, 8516, 828, 16345, 7, 4033, 82, 36911, 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, 357, 8516, 11, 4033, 82, 828, 357, 75, 11, 84, 828, 357, 39377, 12, 73, 1477, 11, 34703, 10, 50133, 4008, 198, 437, 198, 198, 8818, 10243, 276, 12235, 33, 12249, 46912, 7, 3712, 6030, 90, 57, 27498, 5512, 311, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 17257, 16, 11, 12235, 17257, 16, 11709, 8, 810, 1391, 51, 11, 33, 92, 198, 220, 220, 220, 29430, 11, 44817, 796, 2560, 521, 1063, 7, 50, 8, 198, 220, 220, 220, 21054, 796, 2560, 7, 50, 8, 198, 220, 220, 220, 300, 11, 84, 796, 2512, 3903, 10394, 82, 7, 22328, 2599, 25, 51, 29291, 90, 5317, 11, 5317, 92, 198, 220, 220, 220, 7377, 119, 11, 34703, 796, 850, 9967, 3903, 10394, 82, 7, 22328, 2599, 25, 51, 29291, 90, 5317, 11, 5317, 92, 628, 220, 220, 220, 374, 83, 796, 16069, 10223, 7, 22328, 8, 198, 220, 220, 220, 288, 83, 796, 18209, 10223, 7, 22328, 8, 198, 220, 220, 220, 449, 796, 717, 7, 44817, 8, 198, 220, 220, 220, 509, 796, 717, 7, 30758, 8, 198, 220, 220, 220, 698, 62, 1477, 796, 2558, 7, 41, 8, 532, 2558, 7, 42, 8, 628, 220, 220, 220, 509, 11473, 796, 2512, 13664, 9521, 7, 17034, 11, 30758, 8, 198, 220, 220, 220, 509, 44817, 796, 2512, 13664, 9521, 7, 28664, 11, 44817, 8, 628, 220, 220, 220, 10243, 276, 12235, 33, 12249, 46912, 7, 57, 27498, 90, 417, 4906, 7, 22328, 38165, 7, 16345, 7, 42, 11473, 828, 16345, 7, 42, 44817, 36911, 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, 357, 23839, 38469, 90, 5317, 92, 7, 42, 11473, 828, 23839, 38469, 90, 5317, 92, 7, 42, 44817, 36911, 357, 75, 10, 2436, 62, 1477, 11, 84, 12, 2436, 62, 1477, 828, 357, 39377, 11, 34703, 4008, 198, 437, 628, 198, 8818, 18209, 10223, 7, 50, 3712, 7004, 18843, 1352, 8, 198, 220, 220, 220, 350, 796, 8000, 7, 50, 8, 198, 220, 220, 220, 599, 28, 3438, 1299, 10223, 7, 47, 8, 198, 220, 220, 220, 479, 81, 28, 8000, 521, 1063, 7, 50, 38381, 17, 60, 628, 220, 220, 220, 3834, 14106, 90, 4906, 1659, 7, 2777, 828, 4906, 1659, 7, 38584, 828, 27830, 4906, 7, 2777, 828, 36985, 2963, 431, 7, 2777, 38165, 7, 2777, 11, 38584, 8, 198, 437, 198, 8818, 16069, 10223, 7, 50, 3712, 7004, 18843, 1352, 8, 198, 220, 220, 220, 350, 796, 8000, 7, 50, 8, 198, 220, 220, 220, 599, 28, 81, 6231, 10223, 7, 47, 8, 198, 220, 220, 220, 479, 81, 28, 8000, 521, 1063, 7, 50, 38381, 16, 60, 628, 220, 220, 220, 3834, 14106, 90, 4906, 1659, 7, 2777, 828, 4906, 1659, 7, 38584, 828, 27830, 4906, 7, 2777, 828, 36985, 2963, 431, 7, 2777, 38165, 7, 2777, 11, 38584, 8, 198, 437, 198, 198, 7857, 7, 53, 3712, 7004, 18843, 1352, 8, 796, 569, 13, 67, 12078, 198, 7857, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 5317, 8, 796, 569, 13, 67, 12078, 58, 74, 60, 198, 198, 13271, 8635, 62, 1136, 9630, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 46541, 11, 73, 3712, 46541, 8, 796, 569, 13, 8000, 58, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 74, 11, 73, 4008, 22345, 198, 1136, 9630, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 46541, 11, 73, 3712, 46541, 8, 796, 569, 13, 8000, 58, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 74, 11, 73, 4008, 22345, 198, 1136, 9630, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 46541, 11, 73, 3712, 23839, 17257, 8, 796, 569, 13, 8000, 58, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 74, 11, 73, 4008, 22345, 198, 1136, 9630, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 23839, 17257, 11, 73, 3712, 46541, 8, 796, 569, 13, 8000, 58, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 74, 11, 73, 4008, 22345, 198, 1136, 9630, 7, 53, 3712, 7004, 18843, 1352, 11, 74, 3712, 23839, 17257, 11, 73, 3712, 23839, 17257, 8, 796, 569, 13, 8000, 58, 260, 9630, 7, 53, 11, 8000, 521, 1063, 7, 53, 828, 7, 74, 11, 73, 4008, 22345, 198, 14881, 13, 8000, 7, 50, 3712, 7004, 18843, 1352, 8, 796, 311, 13, 8000, 198, 14881, 13, 8000, 521, 1063, 7, 50, 3712, 7004, 18843, 1352, 8, 796, 311, 13, 9630, 274, 628, 198, 198, 1640, 13349, 287, 357, 25, 271, 9967, 3903, 276, 11, 25, 271, 9967, 3903, 276, 29370, 11, 25, 271, 9967, 3903, 276, 35993, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 271, 3903, 276, 9967, 3903, 276, 11, 25, 271, 3903, 276, 9967, 3903, 276, 29370, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 271, 3903, 276, 9967, 3903, 276, 35993, 8, 198, 220, 220, 220, 2488, 18206, 720, 3185, 7, 50, 3712, 7004, 18843, 1352, 8, 796, 720, 3185, 7, 8000, 7, 50, 4008, 198, 437, 198, 198, 2, 16926, 46, 25, 2312, 815, 307, 4615, 355, 262, 2276, 4007, 1339, 481, 670, 11, 198, 2, 1752, 262, 9495, 286, 4097, 276, 1108, 286, 27454, 38517, 12879, 318, 925, 2565, 286, 628, 198, 62, 4033, 301, 2840, 7, 53, 8, 796, 2558, 58, 9806, 7, 15, 11, 4033, 11338, 7, 53, 11, 73, 4008, 329, 474, 28, 16, 25, 7857, 7, 53, 11, 17, 15437, 198, 198, 1640, 24412, 47, 287, 357, 25, 49, 14655, 46912, 11, 1058, 46912, 8, 198, 220, 220, 220, 825, 62, 9936, 47, 796, 30277, 13, 29572, 7203, 12286, 62, 1, 1635, 4731, 7, 9936, 47, 4008, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2163, 720, 9936, 47, 7, 53, 3712, 7004, 18843, 1352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 10745, 7, 7857, 7, 53, 11, 16, 4008, 8614, 318, 10745, 7, 7857, 7, 53, 11, 17, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 10385, 720, 53, 284, 257, 720, 9936, 47, 4943, 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, 317, 796, 2560, 7, 53, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 3903, 276, 7, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 9936, 47, 7, 33, 12249, 46912, 7, 53, 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, 720, 4299, 62, 9936, 47, 7, 53, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2163, 720, 9936, 47, 7, 53, 3712, 7004, 18843, 1352, 90, 51, 11, 15199, 11, 11251, 29291, 90, 17, 11, 26453, 17257, 90, 5317, 11709, 30072, 810, 1391, 51, 11, 15199, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 10745, 7, 7857, 7, 53, 11, 16, 4008, 8614, 318, 10745, 7, 7857, 7, 53, 11, 17, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 10385, 720, 53, 284, 257, 720, 9936, 47, 4943, 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, 317, 796, 2560, 7, 53, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 3903, 276, 7, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 9936, 47, 7, 33, 12249, 46912, 7, 53, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 3903, 276, 9967, 3903, 276, 7, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 796, 2512, 7, 81, 6231, 10223, 7, 32, 828, 938, 7, 8000, 521, 1063, 7, 53, 38381, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 796, 2512, 7, 3438, 1299, 10223, 7, 32, 828, 938, 7, 8000, 521, 1063, 7, 53, 38381, 17, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 347, 796, 317, 58, 12235, 7, 16, 2599, 45, 11, 9726, 7, 16, 2599, 44, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 14655, 46912, 7, 1177, 7, 33, 11, 2560, 521, 1063, 7, 53, 26513, 828, 4808, 4033, 301, 2840, 7, 53, 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, 720, 4299, 62, 9936, 47, 7, 53, 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, 437, 198, 198, 2, 3049, 26161, 284, 4097, 276, 2603, 45977, 561, 307, 1912, 319, 36525, 11, 407, 7021, 198, 8818, 10243, 276, 46912, 7, 50, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 12235, 17257, 16, 11, 12235, 17257, 16, 11709, 8, 810, 1391, 51, 11, 33, 92, 198, 220, 220, 220, 317, 796, 2560, 7, 50, 8, 198, 220, 220, 220, 288, 82, 796, 18209, 10223, 7, 32, 8, 198, 220, 220, 220, 44608, 796, 16069, 10223, 7, 32, 8, 198, 220, 220, 220, 29430, 11, 44817, 796, 2560, 521, 1063, 7, 50, 8, 198, 220, 220, 220, 10243, 276, 46912, 7, 1177, 7, 32, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2512, 9688, 7, 3808, 11, 11085, 7, 30758, 8, 2599, 9967, 11338, 7, 3808, 11, 12957, 7, 30758, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2512, 9688, 7, 9310, 11, 11085, 7, 44817, 8, 2599, 9967, 11338, 7, 9310, 11, 12957, 7, 44817, 35514, 198, 437, 628, 628, 198, 8818, 35971, 62, 1073, 41945, 7, 32, 3712, 7004, 18843, 1352, 90, 51, 11, 33, 11, 51, 29291, 90, 26453, 17257, 90, 5317, 5512, 26453, 17257, 90, 5317, 11709, 5512, 65, 8, 810, 1391, 51, 11, 33, 92, 198, 220, 220, 220, 611, 2546, 7, 32, 11, 17, 8, 6624, 4129, 7, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 27741, 46912, 7, 32, 27493, 65, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1570, 7, 32, 11, 45299, 16, 25, 13664, 7, 65, 4008, 9, 65, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.086614
6,096
<filename>common/md/MolecularDynamicsTrial.jl ################################################################################ # # Struct for holding all parameters associated with an md simulation # ################################################################################ abstract MDTrial ################################################################################ # # AT SOME POINT, IT WOULD BE GOOD TO HAVE A MACRO FOR AUTOMATICALLY # POPULATING MolecularDynamicsTrial TYPE FIELDS # ################################################################################ ################################################################################ # # Struct for holding all parameters associated with an md verlet simulation # ################################################################################ type MolecularDynamicsTrial <: MDTrial # Parameters numBodies::Int64 # Number of particles ρ::Float64 # Density of particles Td::Float64 # Desired temperature dx::Float64 # Time step; defaults to Verlet's value V::Float64 # Volume of box L::Float64 # Side length of box steps::Int64 # How long to run the simulation σ::Float64 # Length scale, from Verlet, in m ϵ::Float64 # Energy scale, in Kelvin m::Float64 # Argon atom mass, in kg τ::Float64 # Time scale, in seconds # Dynamic Quantities y::Array{Float64, 3} # Positions v::Array{Float64, 3} # Velocities f::Array{Float64, 3} # Accelerations pe::Array{Float64, 2} # Potential Energies ke::Array{Float64, 2} # Kinetic Energies pet::Array{Float64, 1} # Total Potential Energy ket::Array{Float64, 1} # Total Kinetic Energy T::Array{Float64, 1} # Temperature at each step e::Array{Float64, 1} # Total Energy vir::Array{Float64, 1} # Virial, ∑∑r(∂V/∂r) currentStep::Int64 # Where this simulation left off end ################################################################################ # # Struct for holding all parameters associated with an md metropolis # simulation # ################################################################################ type MDMetropolisTrial <: MDTrial # Parameters numBodies::Int64 # Number of particles ρ::Float64 # Density of particles Td::Float64 # Desired temperature # dx::Float64 # Time step; defaults to Verlet's value V::Float64 # Volume of box L::Float64 # Side length of box steps::Int64 # How long to run the simulation σ::Float64 # Length scale, from Verlet, in m ϵ::Float64 # Energy scale, in Kelvin m::Float64 # Argon atom mass, in kg τ::Float64 # Time scale, in seconds # Dynamic Quantities y::Array{Float64, 3} # Positions # v::Array{Float64, 3} # Velocities # f::Array{Float64, 3} # Accelerations pe::Array{Float64, 2} # Potential Energies ke::Array{Float64, 2} # Kinetic Energies pet::Array{Float64, 1} # Total Potential Energy ket::Array{Float64, 1} # Total Kinetic Energy # T::Array{Float64, 1} # Temperature at each step e::Array{Float64, 1} # Total Energy vir::Array{Float64, 1} # Virial, ∑∑r(∂V/∂r) currentStep::Int64 # Where this simulation left off end # Outer constructor just for input parameters MolecularDynamicsTrial( numBodies, ρ, Td, dx, steps, σ, ϵ, m ) = MolecularDynamicsTrial( numBodies, ρ, Td, dx, ( numBodies / ρ ), # Volume ( numBodies / ρ )^( 1 / 3 ), # Side length steps, σ, # Length scale, in m ϵ, # Energy scale, in Kelvin m, # Argon atom mass, in kg sqrt( m * σ^2 / ( 48ϵ * 1.3806e-23 ) ), # Time scale, in seconds zeros( 3, numBodies, steps ), # Positions zeros( 3, numBodies, steps ), # Velocities zeros( 3, numBodies, steps ), # Accelerations zeros( numBodies, steps ), # Potential Energies zeros( numBodies, steps ), # Kinetic Energies zeros( steps ), # Total Potential Energy zeros( steps ), # Total Kinetic Energy zeros( steps ), # Temperature at each step zeros( steps ), # Total Energy zeros( steps ), # Virial 0 ); # Completed steps (start at 0) # Outer constructor for empty object MolecularDynamicsTrial() = MolecularDynamicsTrial(1,1,0,0,0,0,1,0); # Comparator for MolecularDynamicsTrial type function ==( r::MolecularDynamicsTrial, p::MolecularDynamicsTrial ) for field in names( MolecularDynamicsTrial ) if r.( field ) != p.( field ) return false end end return true end # Check if trial is finished function isfinished( r::MolecularDynamicsTrial ) return r.currentStep == r.steps end # Duplicate a trial function duplicate( r::MolecularDynamicsTrial ) p = MolecularDynamicsTrial() for field in names( MolecularDynamicsTrial ) p.(field) = r.(field) end assert(p == r) return p end # Extract a sub-trial TODO : reimplement using slicedim(A,d,i) function subtrial( r::MolecularDynamicsTrial, n::Int, m::Int ) if r.steps < m error( "Out of bounds: final step must be less than r.steps" ) elseif m < n error( "first step must be less than final step" ) elseif n < 1 error( "Out of bounds: first step must be greater than or equal to 1") elseif n > r.currentStep error( "first step must be less than current step" ) else steps = m - n + 1 numBodies = r.numBodies p = MolecularDynamicsTrial(numBodies,1,0,0,steps,0,1,0); for field in names( MolecularDynamicsTrial ) if :steps == field continue # clobber not total steps elseif isa( r.(field), Array ) fsize = size( p.(field) ) # dimensions of the field perstep = prod(fsize[1:(end-1)]) # elements per step first = (n-1)*perstep + 1 # first element to copy last = m*perstep # last element to copy assert((last-first+1)==perstep*steps) # correct num elements i = 1 for j in first:last # linear indexing to set p p.(field)[i] = r.(field)[j] i+=1 end else p.(field) = r.(field) end end p.currentStep = r.currentStep + 1 - n return p end end # Lop off unfinished steps function mdtruncate( r::MolecularDynamicsTrial ) if isfinished( r ) return r else return subtrial( r, 1, r.currentStep ) # go till last finished step end end # Add steps, if you need to run for longer function addsteps( r::MolecularDynamicsTrial, n::Int ) if n<0 error( "Must specify non-negative number of steps to add" ) else steps = r.steps + n numBodies = r.numBodies p = MolecularDynamicsTrial(numBodies,1,0,0,steps,0,1,0); for field in names( MolecularDynamicsTrial ) if :steps == field continue # clobber not total steps elseif isa( r.(field), Array ) i = 1 for val in r.(field)[1:end] # linear indexing to set p p.(field)[i] = val i+=1 end else p.(field) = r.(field) # copy scalar fields end end return p end end
[ 27, 34345, 29, 11321, 14, 9132, 14, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 13, 20362, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 220, 32112, 329, 4769, 477, 10007, 3917, 351, 281, 45243, 18640, 198, 2, 198, 29113, 29113, 14468, 198, 397, 8709, 10670, 51, 4454, 198, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 220, 5161, 41670, 19922, 12394, 11, 7283, 370, 24010, 9348, 21090, 5390, 21515, 317, 20582, 13252, 7473, 47044, 2662, 1404, 2149, 19807, 198, 2, 220, 220, 37586, 6239, 33881, 38275, 35, 4989, 873, 51, 4454, 41876, 18930, 3698, 5258, 198, 2, 198, 29113, 29113, 14468, 198, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 220, 32112, 329, 4769, 477, 10007, 3917, 351, 281, 45243, 3326, 1616, 18640, 198, 2, 198, 29113, 29113, 14468, 198, 4906, 38275, 35, 4989, 873, 51, 4454, 1279, 25, 10670, 51, 4454, 198, 220, 220, 220, 1303, 40117, 198, 220, 220, 220, 997, 33, 5042, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7913, 286, 13166, 198, 220, 220, 220, 18074, 223, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 360, 6377, 286, 13166, 198, 220, 220, 220, 309, 67, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2935, 1202, 5951, 198, 220, 220, 220, 44332, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3862, 2239, 26, 26235, 284, 4643, 1616, 338, 1988, 198, 220, 220, 220, 569, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14701, 286, 3091, 198, 220, 220, 220, 406, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12075, 4129, 286, 3091, 198, 220, 220, 220, 4831, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1374, 890, 284, 1057, 262, 18640, 198, 220, 220, 220, 18074, 225, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 22313, 5046, 11, 422, 4643, 1616, 11, 287, 285, 198, 220, 220, 220, 18074, 113, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6682, 5046, 11, 287, 46577, 198, 220, 220, 220, 285, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 49974, 22037, 2347, 11, 287, 14211, 198, 220, 220, 220, 46651, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3862, 5046, 11, 287, 4201, 628, 220, 220, 220, 1303, 26977, 16972, 871, 198, 220, 220, 220, 331, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 18574, 1756, 198, 220, 220, 220, 410, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17378, 420, 871, 198, 220, 220, 220, 277, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29805, 602, 198, 220, 220, 220, 613, 3712, 19182, 90, 43879, 2414, 11, 362, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 32480, 412, 25649, 444, 198, 220, 220, 220, 885, 3712, 19182, 90, 43879, 2414, 11, 362, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16645, 5139, 412, 25649, 444, 198, 220, 220, 220, 4273, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 32480, 6682, 198, 220, 220, 220, 22354, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 16645, 5139, 6682, 198, 220, 220, 220, 309, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 34467, 379, 1123, 2239, 198, 220, 220, 220, 304, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 6682, 198, 220, 220, 220, 5709, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16310, 498, 11, 18872, 239, 24861, 239, 81, 7, 24861, 224, 53, 14, 24861, 224, 81, 8, 198, 220, 220, 220, 1459, 8600, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6350, 428, 18640, 1364, 572, 198, 437, 198, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 220, 32112, 329, 4769, 477, 10007, 3917, 351, 281, 45243, 1138, 25986, 198, 2, 220, 220, 18640, 198, 2, 198, 29113, 29113, 14468, 198, 4906, 10670, 9171, 25986, 51, 4454, 1279, 25, 10670, 51, 4454, 198, 220, 220, 220, 1303, 40117, 198, 220, 220, 220, 997, 33, 5042, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7913, 286, 13166, 198, 220, 220, 220, 18074, 223, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 360, 6377, 286, 13166, 198, 220, 220, 220, 309, 67, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2935, 1202, 5951, 198, 220, 220, 220, 1303, 44332, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3862, 2239, 26, 26235, 284, 4643, 1616, 338, 1988, 198, 220, 220, 220, 569, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14701, 286, 3091, 198, 220, 220, 220, 406, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12075, 4129, 286, 3091, 198, 220, 220, 220, 4831, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1374, 890, 284, 1057, 262, 18640, 198, 220, 220, 220, 18074, 225, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 22313, 5046, 11, 422, 4643, 1616, 11, 287, 285, 198, 220, 220, 220, 18074, 113, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6682, 5046, 11, 287, 46577, 198, 220, 220, 220, 285, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 49974, 22037, 2347, 11, 287, 14211, 198, 220, 220, 220, 46651, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3862, 5046, 11, 287, 4201, 628, 220, 220, 220, 1303, 26977, 16972, 871, 198, 220, 220, 220, 331, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 18574, 1756, 198, 220, 220, 220, 1303, 410, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17378, 420, 871, 198, 220, 220, 220, 1303, 277, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29805, 602, 198, 220, 220, 220, 613, 3712, 19182, 90, 43879, 2414, 11, 362, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 32480, 412, 25649, 444, 198, 220, 220, 220, 885, 3712, 19182, 90, 43879, 2414, 11, 362, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16645, 5139, 412, 25649, 444, 198, 220, 220, 220, 4273, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 32480, 6682, 198, 220, 220, 220, 22354, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 16645, 5139, 6682, 198, 220, 220, 220, 1303, 309, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 34467, 379, 1123, 2239, 198, 220, 220, 220, 304, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7472, 6682, 198, 220, 220, 220, 5709, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16310, 498, 11, 18872, 239, 24861, 239, 81, 7, 24861, 224, 53, 14, 24861, 224, 81, 8, 198, 220, 220, 220, 1459, 8600, 3712, 5317, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6350, 428, 18640, 1364, 572, 198, 437, 628, 198, 2, 35868, 23772, 655, 329, 5128, 10007, 198, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 7, 997, 33, 5042, 11, 18074, 223, 11, 309, 67, 11, 44332, 11, 4831, 11, 18074, 225, 11, 18074, 113, 11, 285, 1267, 796, 198, 220, 220, 220, 38275, 35, 4989, 873, 51, 4454, 7, 198, 220, 220, 220, 220, 220, 220, 220, 997, 33, 5042, 11, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 223, 11, 198, 220, 220, 220, 220, 220, 220, 220, 309, 67, 11, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 11, 198, 220, 220, 220, 220, 220, 220, 220, 357, 997, 33, 5042, 1220, 18074, 223, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14701, 198, 220, 220, 220, 220, 220, 220, 220, 357, 997, 33, 5042, 1220, 18074, 223, 1267, 61, 7, 352, 1220, 513, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12075, 4129, 198, 220, 220, 220, 220, 220, 220, 220, 4831, 11, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 22313, 5046, 11, 287, 285, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 113, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 6682, 5046, 11, 287, 46577, 198, 220, 220, 220, 220, 220, 220, 220, 285, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 49974, 22037, 2347, 11, 287, 14211, 198, 220, 220, 220, 220, 220, 220, 220, 19862, 17034, 7, 285, 1635, 18074, 225, 61, 17, 1220, 357, 4764, 139, 113, 1635, 352, 13, 23734, 21, 68, 12, 1954, 1267, 10612, 1303, 3862, 5046, 11, 287, 4201, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 513, 11, 997, 33, 5042, 11, 4831, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 18574, 1756, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 513, 11, 997, 33, 5042, 11, 4831, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17378, 420, 871, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 513, 11, 997, 33, 5042, 11, 4831, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29805, 602, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 997, 33, 5042, 11, 4831, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 32480, 412, 25649, 444, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 997, 33, 5042, 11, 4831, 10612, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16645, 5139, 412, 25649, 444, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 4831, 10612, 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, 7472, 32480, 6682, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 4831, 10612, 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, 7472, 16645, 5139, 6682, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 4831, 10612, 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, 34467, 379, 1123, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 4831, 10612, 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, 7472, 6682, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 4831, 10612, 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, 16310, 498, 198, 220, 220, 220, 220, 220, 220, 220, 657, 5619, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 32983, 4831, 357, 9688, 379, 657, 8, 198, 198, 2, 35868, 23772, 329, 6565, 2134, 198, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 3419, 796, 38275, 35, 4989, 873, 51, 4454, 7, 16, 11, 16, 11, 15, 11, 15, 11, 15, 11, 15, 11, 16, 11, 15, 1776, 198, 198, 2, 22565, 1352, 329, 38275, 35, 4989, 873, 51, 4454, 2099, 198, 8818, 6624, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 11, 279, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 329, 2214, 287, 3891, 7, 38275, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 611, 374, 12195, 2214, 1267, 14512, 279, 12195, 2214, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 2, 6822, 611, 4473, 318, 5201, 198, 8818, 318, 43952, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 1441, 374, 13, 14421, 8600, 6624, 374, 13, 20214, 198, 437, 198, 198, 2, 49821, 5344, 257, 4473, 198, 8818, 23418, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 279, 796, 38275, 35, 4989, 873, 51, 4454, 3419, 198, 220, 220, 220, 329, 2214, 287, 3891, 7, 38275, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 279, 12195, 3245, 8, 796, 374, 12195, 3245, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 6818, 7, 79, 6624, 374, 8, 198, 220, 220, 220, 1441, 279, 198, 437, 198, 198, 2, 29677, 257, 850, 12, 45994, 16926, 46, 1058, 21123, 26908, 1262, 26790, 320, 7, 32, 11, 67, 11, 72, 8, 198, 8818, 13284, 4454, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 11, 299, 3712, 5317, 11, 285, 3712, 5317, 1267, 198, 220, 220, 220, 611, 374, 13, 20214, 1279, 285, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 366, 7975, 286, 22303, 25, 2457, 2239, 1276, 307, 1342, 621, 374, 13, 20214, 1, 1267, 198, 220, 220, 220, 2073, 361, 285, 1279, 299, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 366, 11085, 2239, 1276, 307, 1342, 621, 2457, 2239, 1, 1267, 198, 220, 220, 220, 2073, 361, 299, 1279, 352, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 366, 7975, 286, 22303, 25, 717, 2239, 1276, 307, 3744, 621, 393, 4961, 284, 352, 4943, 198, 220, 220, 220, 2073, 361, 299, 1875, 374, 13, 14421, 8600, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 366, 11085, 2239, 1276, 307, 1342, 621, 1459, 2239, 1, 1267, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4831, 796, 285, 532, 299, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 997, 33, 5042, 796, 374, 13, 22510, 33, 5042, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 38275, 35, 4989, 873, 51, 4454, 7, 22510, 33, 5042, 11, 16, 11, 15, 11, 15, 11, 20214, 11, 15, 11, 16, 11, 15, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2214, 287, 3891, 7, 38275, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1058, 20214, 6624, 2214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 220, 220, 220, 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, 537, 672, 527, 407, 2472, 4831, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 374, 12195, 3245, 828, 15690, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 7857, 796, 2546, 7, 279, 12195, 3245, 8, 1267, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15225, 286, 262, 2214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 583, 9662, 796, 40426, 7, 69, 7857, 58, 16, 37498, 437, 12, 16, 8, 12962, 220, 220, 220, 1303, 4847, 583, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 717, 796, 357, 77, 12, 16, 27493, 525, 9662, 1343, 352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 717, 5002, 284, 4866, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 938, 796, 285, 9, 525, 9662, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 938, 5002, 284, 4866, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6818, 19510, 12957, 12, 11085, 10, 16, 8, 855, 525, 9662, 9, 20214, 8, 220, 220, 1303, 3376, 997, 4847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 717, 25, 12957, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14174, 6376, 278, 284, 900, 279, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 12195, 3245, 38381, 72, 60, 796, 374, 12195, 3245, 38381, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 47932, 16, 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, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 12195, 3245, 8, 796, 374, 12195, 3245, 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, 220, 220, 220, 220, 279, 13, 14421, 8600, 796, 374, 13, 14421, 8600, 1343, 352, 532, 299, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 279, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 406, 404, 572, 34419, 4831, 198, 8818, 45243, 2213, 19524, 378, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 611, 318, 43952, 7, 374, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 374, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 13284, 4454, 7, 374, 11, 352, 11, 374, 13, 14421, 8600, 1267, 220, 220, 220, 220, 220, 1303, 467, 10597, 938, 5201, 2239, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 3060, 4831, 11, 611, 345, 761, 284, 1057, 329, 2392, 198, 8818, 751, 20214, 7, 374, 3712, 44, 2305, 10440, 35, 4989, 873, 51, 4454, 11, 299, 3712, 5317, 1267, 198, 220, 220, 220, 611, 299, 27, 15, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7, 366, 34320, 11986, 1729, 12, 31591, 1271, 286, 4831, 284, 751, 1, 1267, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4831, 796, 374, 13, 20214, 1343, 299, 198, 220, 220, 220, 220, 220, 220, 220, 997, 33, 5042, 796, 374, 13, 22510, 33, 5042, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 38275, 35, 4989, 873, 51, 4454, 7, 22510, 33, 5042, 11, 16, 11, 15, 11, 15, 11, 20214, 11, 15, 11, 16, 11, 15, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2214, 287, 3891, 7, 38275, 35, 4989, 873, 51, 4454, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1058, 20214, 6624, 2214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 220, 220, 220, 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, 537, 672, 527, 407, 2472, 4831, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 318, 64, 7, 374, 12195, 3245, 828, 15690, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1188, 287, 374, 12195, 3245, 38381, 16, 25, 437, 60, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14174, 6376, 278, 284, 900, 279, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 12195, 3245, 38381, 72, 60, 796, 1188, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 47932, 16, 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, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 12195, 3245, 8, 796, 374, 12195, 3245, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4866, 16578, 283, 7032, 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, 1441, 279, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.097818
4,079
using Distributions interaction_dict = Dict() interaction_dict["binary"] = [-1.0,1.0] interaction_dict["normal"] = Normal() interaction_dict["uniform"] = Uniform(-1.0,1.0)
[ 3500, 46567, 507, 198, 198, 3849, 2673, 62, 11600, 796, 360, 713, 3419, 198, 198, 3849, 2673, 62, 11600, 14692, 39491, 8973, 796, 25915, 16, 13, 15, 11, 16, 13, 15, 60, 198, 3849, 2673, 62, 11600, 14692, 11265, 8973, 796, 14435, 3419, 198, 3849, 2673, 62, 11600, 14692, 403, 6933, 8973, 796, 35712, 32590, 16, 13, 15, 11, 16, 13, 15, 8, 198 ]
2.71875
64
<filename>todo/higher-critism.jl ## HC function hc_score(pValues) validPvalues(pValues) n = length(pValues) f = competerank(pValues) / n ## ties = max var = f .* (1-f) / n var[var == 0] = min( var[var > 0] ) # just to make sure we have no zero variance hc = abs(f-pValues) / sqrt(var) hc end
[ 27, 34345, 29, 83, 24313, 14, 46503, 12, 22213, 1042, 13, 20362, 198, 2235, 27327, 198, 198, 8818, 289, 66, 62, 26675, 7, 79, 40161, 8, 198, 220, 220, 220, 4938, 47, 27160, 7, 79, 40161, 8, 198, 220, 220, 220, 299, 796, 4129, 7, 79, 40161, 8, 198, 220, 220, 220, 277, 796, 2307, 263, 962, 7, 79, 40161, 8, 1220, 299, 22492, 8470, 796, 3509, 198, 220, 220, 220, 1401, 796, 277, 764, 9, 357, 16, 12, 69, 8, 1220, 299, 198, 220, 220, 220, 1401, 58, 7785, 6624, 657, 60, 796, 949, 7, 1401, 58, 7785, 1875, 657, 60, 1267, 1303, 655, 284, 787, 1654, 356, 423, 645, 6632, 24198, 198, 220, 220, 220, 289, 66, 796, 2352, 7, 69, 12, 79, 40161, 8, 1220, 19862, 17034, 7, 7785, 8, 198, 220, 220, 220, 289, 66, 198, 437, 628, 198 ]
2.258741
143
#= array_initialization: - Julia version: 1.5.0 - Author: shisa - Date: 2020-08-10 =# module ArrayInit # methods function main() println("Not init array = ", Array{Float32}(undef, 3, 2)) println("Init 0 array = ", zeros(Float32, 3, 2)) println("Init 1 array = ", ones(Float32, 3, 2)) println("Init uniform distribution = ", rand(Float32, 3, 2)) println("Init normal distribution = ", randn(Float32, 3, 2)) println("Init fill 8 = ", fill(8, 3, 2)) println("Init zeros fill 10 = ", fill!(zeros(Int32, 4, 4), 10)) println("Similar not init = ", similar(fill(8, 4, 4))) println("Similar init float32 = ", similar(fill(8, 4, 4), Float32)) println("Similar init float32 3x2 = ", similar(fill(8, 4, 4), Float32, 3, 2)) println("Reshape 3x2 -> 2x3: ", reshape(zeros(Float32, 3, 2), 2, 3)) println("List Comprehension [x for x in 1:10] = ", [x for x in 1:10]) println("List Comprehension [10a + b for a in 0:3, b in 0:4] = ", [10a + b for a in 0:3, b in 0:4]) end end if abspath(PROGRAM_FILE) == @__FILE__ using .ArrayInit ArrayInit.main() end
[ 2, 28, 198, 18747, 62, 36733, 1634, 25, 198, 12, 22300, 2196, 25, 352, 13, 20, 13, 15, 198, 12, 6434, 25, 427, 9160, 198, 12, 7536, 25, 12131, 12, 2919, 12, 940, 198, 46249, 198, 198, 21412, 15690, 31768, 198, 220, 220, 220, 1303, 5050, 198, 220, 220, 220, 2163, 1388, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3673, 2315, 7177, 796, 33172, 15690, 90, 43879, 2624, 92, 7, 917, 891, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 657, 7177, 796, 33172, 1976, 27498, 7, 43879, 2624, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 352, 7177, 796, 33172, 3392, 7, 43879, 2624, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 8187, 6082, 796, 33172, 43720, 7, 43879, 2624, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 3487, 6082, 796, 33172, 43720, 77, 7, 43879, 2624, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 6070, 807, 796, 33172, 6070, 7, 23, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 31768, 1976, 27498, 6070, 838, 796, 33172, 6070, 0, 7, 9107, 418, 7, 5317, 2624, 11, 604, 11, 604, 828, 838, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 18925, 407, 2315, 796, 33172, 2092, 7, 20797, 7, 23, 11, 604, 11, 604, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 18925, 2315, 12178, 2624, 796, 33172, 2092, 7, 20797, 7, 23, 11, 604, 11, 604, 828, 48436, 2624, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 18925, 2315, 12178, 2624, 513, 87, 17, 796, 33172, 2092, 7, 20797, 7, 23, 11, 604, 11, 604, 828, 48436, 2624, 11, 513, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 4965, 71, 1758, 513, 87, 17, 4613, 362, 87, 18, 25, 33172, 27179, 1758, 7, 9107, 418, 7, 43879, 2624, 11, 513, 11, 362, 828, 362, 11, 513, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 8053, 3082, 7345, 295, 685, 87, 329, 2124, 287, 352, 25, 940, 60, 796, 33172, 685, 87, 329, 2124, 287, 352, 25, 940, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 8053, 3082, 7345, 295, 685, 940, 64, 1343, 275, 329, 257, 287, 657, 25, 18, 11, 275, 287, 657, 25, 19, 60, 796, 33172, 685, 940, 64, 1343, 275, 329, 257, 287, 657, 25, 18, 11, 275, 287, 657, 25, 19, 12962, 198, 220, 220, 220, 886, 198, 437, 198, 198, 361, 2352, 6978, 7, 4805, 7730, 24115, 62, 25664, 8, 6624, 2488, 834, 25664, 834, 198, 220, 220, 220, 1262, 764, 19182, 31768, 198, 220, 220, 220, 15690, 31768, 13, 12417, 3419, 198, 437 ]
2.357724
492
<reponame>nw11/MethylUtils.jl module FeatureTest using FactCheck include(Pkg.dir("MethylUtils", "src","FeatureServices.jl")) path = Pkg.dir("MethylUtils", "testdata","moabs-format-1000lines.txt") sf = load_moabs_format_as_sequence_features(path) println(sf) rf = read_moabs_format_as_sequence_features(path) ensgene_path = Pkg.dir("MethylUtils","testdata","ensGene1000lines.txt.gz") ensgene_path = joinpath(homedir(), ".GenomeAnnotations.jl/annotation/mm10/ensGene.txt.gz") FT = make_ensgene_gene_feature_table( ensgene_path, "mm10") FR = FeatureRegions(FT) println( collect(keys(FR.regions)) ) #local_store_path = Pkg.dir("MethylUtils", "testdata","store", "annotation") #cgs = load_moabs(path) #SET_LOCAL_STORE_PATH(local_store_path) #facts("load_moabs") do # @fact length(cgs) => 1000 #end #transcripts = ensgene_dataframe("mm10","ensGene1000lines.txt.gz" ) #println(transcripts) #facts("ensgene_dataframe") do # @fact size(transcripts,1) => 1000 #end #genes = ensgene_regions("mm10","ensGene1000lines.txt.gz" ) # println( genes ) # println("length: ", size(genes.dataframe, 1)) # We want to test for ensgene_regions that it is making the kind of ensgene_regions # we want, i.e. the region covering all transcripts under a gene id # set config path back to nothing #SET_LOCAL_STORE_PATH("nothing") end
[ 27, 7856, 261, 480, 29, 47516, 1157, 14, 44, 21610, 18274, 4487, 13, 20362, 198, 21412, 27018, 14402, 628, 220, 220, 220, 1262, 19020, 9787, 628, 220, 220, 220, 2291, 7, 47, 10025, 13, 15908, 7203, 44, 21610, 18274, 4487, 1600, 366, 10677, 2430, 38816, 31007, 13, 20362, 48774, 198, 220, 220, 220, 3108, 796, 350, 10025, 13, 15908, 7203, 44, 21610, 18274, 4487, 1600, 366, 9288, 7890, 2430, 5908, 8937, 12, 18982, 12, 12825, 6615, 13, 14116, 4943, 628, 220, 220, 220, 264, 69, 796, 3440, 62, 5908, 8937, 62, 18982, 62, 292, 62, 43167, 62, 40890, 7, 6978, 8, 198, 220, 220, 220, 44872, 7, 28202, 8, 628, 220, 220, 220, 374, 69, 796, 1100, 62, 5908, 8937, 62, 18982, 62, 292, 62, 43167, 62, 40890, 7, 6978, 8, 628, 220, 220, 220, 3140, 70, 1734, 62, 6978, 796, 350, 10025, 13, 15908, 7203, 44, 21610, 18274, 4487, 2430, 9288, 7890, 2430, 641, 39358, 12825, 6615, 13, 14116, 13, 34586, 4943, 198, 220, 220, 220, 3140, 70, 1734, 62, 6978, 796, 4654, 6978, 7, 71, 12657, 343, 22784, 27071, 13746, 462, 2025, 30078, 13, 20362, 14, 1236, 14221, 14, 3020, 940, 14, 641, 39358, 13, 14116, 13, 34586, 4943, 198, 220, 220, 220, 19446, 796, 787, 62, 641, 70, 1734, 62, 70, 1734, 62, 30053, 62, 11487, 7, 3140, 70, 1734, 62, 6978, 11, 366, 3020, 940, 4943, 198, 220, 220, 220, 8782, 796, 27018, 8081, 507, 7, 9792, 8, 198, 220, 220, 220, 44872, 7, 2824, 7, 13083, 7, 10913, 13, 2301, 507, 4008, 1267, 198, 220, 220, 220, 1303, 12001, 62, 8095, 62, 6978, 796, 220, 350, 10025, 13, 15908, 7203, 44, 21610, 18274, 4487, 1600, 366, 9288, 7890, 2430, 8095, 1600, 366, 1236, 14221, 4943, 198, 220, 220, 220, 1303, 66, 14542, 796, 3440, 62, 5908, 8937, 7, 6978, 8, 628, 220, 220, 220, 1303, 28480, 62, 29701, 1847, 62, 2257, 6965, 62, 34219, 7, 12001, 62, 8095, 62, 6978, 8, 628, 220, 220, 220, 1303, 37473, 7203, 2220, 62, 5908, 8937, 4943, 466, 198, 220, 220, 220, 1303, 220, 220, 220, 2488, 22584, 4129, 7, 66, 14542, 8, 5218, 8576, 198, 220, 220, 220, 1303, 437, 628, 220, 220, 220, 1303, 7645, 6519, 82, 796, 3140, 70, 1734, 62, 7890, 14535, 7203, 3020, 940, 2430, 641, 39358, 12825, 6615, 13, 14116, 13, 34586, 1, 1267, 198, 220, 220, 220, 1303, 35235, 7, 7645, 6519, 82, 8, 628, 220, 220, 220, 1303, 37473, 7203, 641, 70, 1734, 62, 7890, 14535, 4943, 466, 198, 220, 220, 220, 1303, 220, 220, 220, 2488, 22584, 2546, 7, 7645, 6519, 82, 11, 16, 8, 5218, 8576, 198, 220, 220, 220, 1303, 437, 628, 220, 220, 220, 1303, 5235, 274, 796, 3140, 70, 1734, 62, 2301, 507, 7203, 3020, 940, 2430, 641, 39358, 12825, 6615, 13, 14116, 13, 34586, 1, 1267, 628, 628, 220, 220, 220, 1303, 44872, 7, 10812, 1267, 198, 220, 220, 220, 1303, 44872, 7203, 13664, 25, 33172, 2546, 7, 5235, 274, 13, 7890, 14535, 11, 352, 4008, 198, 220, 220, 220, 1303, 775, 765, 284, 1332, 329, 3140, 70, 1734, 62, 2301, 507, 326, 340, 318, 1642, 262, 1611, 286, 3140, 70, 1734, 62, 2301, 507, 198, 220, 220, 220, 1303, 356, 765, 11, 1312, 13, 68, 13, 262, 3814, 9505, 477, 29351, 739, 257, 9779, 4686, 628, 220, 220, 220, 1303, 900, 4566, 3108, 736, 284, 2147, 198, 220, 220, 220, 1303, 28480, 62, 29701, 1847, 62, 2257, 6965, 62, 34219, 7203, 22366, 4943, 198, 437, 198 ]
2.477663
582
<reponame>James-P-D/JuliaDump<filename>src/arrays.jl using Printf # ARRAYS ARE INDEXED FROM ONE NOT ZERO IN JULIA!!!! ## I wrote this for displaying arrays, but we don't actually need it. println() works just fine! # #function display_array(some_array) # for x in some_array # print(x, " ") # end # println() #end function array_examples() println("--------------------------------------") println("Array examples") println() println("We can create one-dimensional arrays of zeros") one_dimensional_array = zeros(Int32, 5) println(one_dimensional_array) println("We can create two-dimensional arrays of zeros") two_dimensional_array = zeros(Int32, 5, 2) println(two_dimensional_array) println("We can create arrays where we specify the type, the size, and the initial value (in this case undefined)") undefined_array = Array{Int32}(undef, 5) println(undefined_array) println("We can create a int array and set initial values") int_array = Int32[1,2,3,4] println(int_array) println("We can get individual values. REMEMBER JULIA INDEXED FROM ONE NOT ZERO!") println(int_array[2]) # The second element really is the second element (not the third as would be the case with zero-indexing) println("We can create a float array and set initial values") float_array = Float64[1,2,3,4] println(float_array) println("We can create an array where each element is off a different type") array_of_different_types = [99, 3.1415, "foo", true, 'x'] println(array_of_different_types) println("We can create an array from a range (2 to 10, stepping at intervals of 2") even_number_array = collect(2:2:10) println(even_number_array) println("We can create an array using comprehension") square_numbers = [n^2 for n in 1:5] println(square_numbers) println("We can also create multi-dimensional arrays using comprehension") another_multi_dim_array = [n * m for n in 1:5, m in 1:5] println(another_multi_dim_array) println("We can get a specific (one-indexed) element from the array") println(array_of_different_types[1]) println("We can get the last element from the array") println(array_of_different_types[end]) println("We can get a range, in this case items 2-4") println(array_of_different_types[2:4]) println("We can check if an item, e.g. 3.1415 exists in the array") println(3.1415 in array_of_different_types) println("We can find a specific item in the array, e.g. 'x'") println(findfirst(isequal('x'), array_of_different_types)) int_array = [1,2,3,4,5,6,7,8,10] println("We can find all the even numbers in an array using a generic function and findall") f(a) = mod(a, 2) == 0 ? true : false println(findall(f, int_array)) println("We can get the number of items that pass the test") println(count(f, int_array)) println("We can get the row and column size of our 5x2 array we created earlier") println(size(two_dimensional_array)) println("We can get the length of an array") println(length(int_array)) println("We can get the sum of all the values in the array") println(sum(int_array)) println("We can insert items at index 2 (second number after colon seems to specify range in target array to overwrite. increase this number to see old items in array go missing!)") splice!(int_array, 2:1, [100,200,300,400,500]) println(int_array) println("We can remove items at index 2 to 6") splice!(int_array, 2:6) println(int_array) println("We get the maximum value in the array") println(maximum(int_array)) println("We get the minimum value in the array") println(minimum(int_array)) println("We can perform calculations on an array without looping") println(int_array * 2) println("We can store functions in an array") function_array = [sin, cos, tan] println(function_array) for n in function_array println(n(45)) end two_dimensional_int_array = [1 2 3 4; 5 6 7 8; 9 10 11 12] for row = 1:3, col = 1:4 @printf("row %d, col %d = %d\n", row, col, two_dimensional_int_array[row,col]) end println() println("We can print just the items from column 2") println(two_dimensional_int_array[:, 2]) println("We can push items to the end of an array") push!(int_array, 999) println(int_array) end
[ 27, 7856, 261, 480, 29, 14731, 12, 47, 12, 35, 14, 16980, 544, 35, 931, 27, 34345, 29, 10677, 14, 3258, 592, 13, 20362, 198, 3500, 12578, 69, 198, 2, 5923, 3861, 16309, 15986, 24413, 6369, 1961, 16034, 16329, 5626, 1168, 34812, 3268, 49349, 3539, 13896, 198, 198, 2235, 314, 2630, 428, 329, 19407, 26515, 11, 475, 356, 836, 470, 1682, 761, 340, 13, 44872, 3419, 2499, 655, 3734, 0, 198, 2, 198, 2, 8818, 3359, 62, 18747, 7, 11246, 62, 18747, 8, 198, 2, 220, 220, 220, 329, 2124, 287, 617, 62, 18747, 198, 2, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 87, 11, 366, 366, 8, 198, 2, 220, 220, 220, 886, 198, 2, 220, 220, 220, 44872, 3419, 198, 2, 437, 198, 198, 8818, 7177, 62, 1069, 12629, 3419, 198, 220, 220, 220, 44872, 7203, 3880, 23031, 4943, 198, 220, 220, 220, 44872, 7203, 19182, 6096, 4943, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 530, 12, 19577, 26515, 286, 1976, 27498, 4943, 198, 220, 220, 220, 530, 62, 19577, 62, 18747, 796, 1976, 27498, 7, 5317, 2624, 11, 642, 8, 198, 220, 220, 220, 44872, 7, 505, 62, 19577, 62, 18747, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 734, 12, 19577, 26515, 286, 1976, 27498, 4943, 198, 220, 220, 220, 734, 62, 19577, 62, 18747, 796, 1976, 27498, 7, 5317, 2624, 11, 642, 11, 362, 8, 198, 220, 220, 220, 44872, 7, 11545, 62, 19577, 62, 18747, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 26515, 810, 356, 11986, 262, 2099, 11, 262, 2546, 11, 290, 262, 4238, 1988, 357, 259, 428, 1339, 28721, 8, 4943, 198, 220, 220, 220, 28721, 62, 18747, 796, 15690, 90, 5317, 2624, 92, 7, 917, 891, 11, 642, 8, 198, 220, 220, 220, 44872, 7, 917, 18156, 62, 18747, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 257, 493, 7177, 290, 900, 4238, 3815, 4943, 198, 220, 220, 220, 493, 62, 18747, 796, 2558, 2624, 58, 16, 11, 17, 11, 18, 11, 19, 60, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 1981, 3815, 13, 22657, 28952, 49349, 3539, 24413, 6369, 1961, 16034, 16329, 5626, 1168, 34812, 2474, 8, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 58, 17, 12962, 1303, 383, 1218, 5002, 1107, 318, 262, 1218, 5002, 357, 1662, 262, 2368, 355, 561, 307, 262, 1339, 351, 6632, 12, 9630, 278, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 257, 12178, 7177, 290, 900, 4238, 3815, 4943, 198, 220, 220, 220, 12178, 62, 18747, 796, 48436, 2414, 58, 16, 11, 17, 11, 18, 11, 19, 60, 198, 220, 220, 220, 44872, 7, 22468, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 281, 7177, 810, 1123, 5002, 318, 572, 257, 1180, 2099, 4943, 198, 220, 220, 220, 7177, 62, 1659, 62, 39799, 62, 19199, 796, 685, 2079, 11, 513, 13, 1415, 1314, 11, 366, 21943, 1600, 2081, 11, 705, 87, 20520, 198, 220, 220, 220, 44872, 7, 18747, 62, 1659, 62, 39799, 62, 19199, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 281, 7177, 422, 257, 2837, 357, 17, 284, 838, 11, 17413, 379, 20016, 286, 362, 4943, 198, 220, 220, 220, 772, 62, 17618, 62, 18747, 796, 2824, 7, 17, 25, 17, 25, 940, 8, 198, 220, 220, 220, 44872, 7, 10197, 62, 17618, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 2251, 281, 7177, 1262, 35915, 4943, 198, 220, 220, 220, 6616, 62, 77, 17024, 796, 685, 77, 61, 17, 329, 299, 287, 352, 25, 20, 60, 198, 220, 220, 220, 44872, 7, 23415, 62, 77, 17024, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 635, 2251, 5021, 12, 19577, 26515, 1262, 35915, 4943, 198, 220, 220, 220, 1194, 62, 41684, 62, 27740, 62, 18747, 796, 685, 77, 1635, 285, 329, 299, 287, 352, 25, 20, 11, 285, 287, 352, 25, 20, 60, 198, 220, 220, 220, 44872, 7, 29214, 62, 41684, 62, 27740, 62, 18747, 8, 628, 220, 220, 220, 44872, 7203, 1135, 460, 651, 257, 2176, 357, 505, 12, 9630, 276, 8, 5002, 422, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 18747, 62, 1659, 62, 39799, 62, 19199, 58, 16, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 262, 938, 5002, 422, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 18747, 62, 1659, 62, 39799, 62, 19199, 58, 437, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 257, 2837, 11, 287, 428, 1339, 3709, 362, 12, 19, 4943, 198, 220, 220, 220, 44872, 7, 18747, 62, 1659, 62, 39799, 62, 19199, 58, 17, 25, 19, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 2198, 611, 281, 2378, 11, 304, 13, 70, 13, 513, 13, 1415, 1314, 7160, 287, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 18, 13, 1415, 1314, 287, 7177, 62, 1659, 62, 39799, 62, 19199, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 1064, 257, 2176, 2378, 287, 262, 7177, 11, 304, 13, 70, 13, 705, 87, 6, 4943, 198, 220, 220, 220, 44872, 7, 19796, 11085, 7, 786, 13255, 10786, 87, 33809, 7177, 62, 1659, 62, 39799, 62, 19199, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 493, 62, 18747, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 11, 940, 60, 198, 220, 220, 220, 44872, 7203, 1135, 460, 1064, 477, 262, 772, 3146, 287, 281, 7177, 1262, 257, 14276, 2163, 290, 1064, 439, 4943, 220, 220, 220, 220, 198, 220, 220, 220, 277, 7, 64, 8, 796, 953, 7, 64, 11, 362, 8, 6624, 657, 5633, 2081, 1058, 3991, 198, 220, 220, 220, 44872, 7, 19796, 439, 7, 69, 11, 493, 62, 18747, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 262, 1271, 286, 3709, 326, 1208, 262, 1332, 4943, 198, 220, 220, 220, 44872, 7, 9127, 7, 69, 11, 493, 62, 18747, 4008, 198, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 262, 5752, 290, 5721, 2546, 286, 674, 642, 87, 17, 7177, 356, 2727, 2961, 4943, 198, 220, 220, 220, 44872, 7, 7857, 7, 11545, 62, 19577, 62, 18747, 4008, 198, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 262, 4129, 286, 281, 7177, 4943, 198, 220, 220, 220, 44872, 7, 13664, 7, 600, 62, 18747, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 651, 262, 2160, 286, 477, 262, 3815, 287, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 16345, 7, 600, 62, 18747, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 7550, 3709, 379, 6376, 362, 357, 12227, 1271, 706, 7633, 2331, 284, 11986, 2837, 287, 2496, 7177, 284, 49312, 13, 2620, 428, 1271, 284, 766, 1468, 3709, 287, 7177, 467, 4814, 8133, 4943, 198, 220, 220, 220, 4328, 501, 0, 7, 600, 62, 18747, 11, 362, 25, 16, 11, 685, 3064, 11, 2167, 11, 6200, 11, 7029, 11, 4059, 12962, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 4781, 3709, 379, 6376, 362, 284, 718, 4943, 198, 220, 220, 220, 4328, 501, 0, 7, 600, 62, 18747, 11, 362, 25, 21, 8, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 651, 262, 5415, 1988, 287, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 47033, 7, 600, 62, 18747, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 651, 262, 5288, 1988, 287, 262, 7177, 4943, 198, 220, 220, 220, 44872, 7, 39504, 7, 600, 62, 18747, 4008, 628, 220, 220, 220, 44872, 7203, 1135, 460, 1620, 16765, 319, 281, 7177, 1231, 9052, 278, 4943, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 1635, 362, 8, 198, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 3650, 5499, 287, 281, 7177, 4943, 198, 220, 220, 220, 2163, 62, 18747, 796, 685, 31369, 11, 8615, 11, 25706, 60, 198, 220, 220, 220, 44872, 7, 8818, 62, 18747, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 299, 287, 2163, 62, 18747, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 77, 7, 2231, 4008, 198, 220, 220, 220, 886, 220, 220, 220, 220, 198, 220, 198, 220, 220, 220, 734, 62, 19577, 62, 600, 62, 18747, 796, 685, 16, 362, 513, 604, 26, 642, 718, 767, 807, 26, 860, 838, 1367, 1105, 60, 198, 220, 220, 220, 329, 5752, 796, 352, 25, 18, 11, 951, 796, 352, 25, 19, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 808, 4064, 67, 11, 951, 4064, 67, 796, 4064, 67, 59, 77, 1600, 5752, 11, 951, 11, 734, 62, 19577, 62, 600, 62, 18747, 58, 808, 11, 4033, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 1135, 460, 3601, 655, 262, 3709, 422, 5721, 362, 4943, 198, 220, 220, 220, 44872, 7, 11545, 62, 19577, 62, 600, 62, 18747, 58, 45299, 362, 12962, 628, 220, 220, 220, 44872, 7203, 1135, 460, 4574, 3709, 284, 262, 886, 286, 281, 7177, 4943, 220, 220, 220, 220, 198, 220, 220, 220, 4574, 0, 7, 600, 62, 18747, 11, 36006, 8, 198, 220, 220, 220, 44872, 7, 600, 62, 18747, 8, 220, 220, 220, 220, 198, 437, 628 ]
2.742771
1,660
using Documenter, MicrobiomePlots makedocs( format = :html, sitename = "MicrobiomePlots.jl", pages = [ "Home" => "index.md", "Recipes" => "recipes.md", "Contributing" => "contributing.md" ], authors = "<NAME>, PhD" ) deploydocs( repo = "github.com/BioJulia/MicrobiomePlots.jl.git", julia = "1.0", osname = "linux", target = "build", deps = nothing, make = nothing )
[ 3500, 16854, 263, 11, 4527, 8482, 462, 3646, 1747, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 5794, 796, 1058, 6494, 11, 198, 220, 220, 220, 1650, 12453, 796, 366, 13031, 8482, 462, 3646, 1747, 13, 20362, 1600, 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, 6690, 18636, 1, 5218, 366, 8344, 18636, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 37146, 278, 1, 5218, 366, 3642, 2455, 278, 13, 9132, 1, 198, 220, 220, 220, 16589, 198, 220, 220, 220, 7035, 796, 33490, 20608, 22330, 16394, 1, 198, 8, 198, 198, 2934, 1420, 31628, 7, 198, 220, 220, 220, 29924, 796, 366, 12567, 13, 785, 14, 42787, 16980, 544, 14, 13031, 8482, 462, 3646, 1747, 13, 20362, 13, 18300, 1600, 198, 220, 220, 220, 474, 43640, 796, 366, 16, 13, 15, 1600, 198, 220, 220, 220, 28686, 3672, 796, 366, 23289, 1600, 198, 220, 220, 220, 2496, 796, 366, 11249, 1600, 198, 220, 220, 220, 390, 862, 796, 2147, 11, 198, 220, 220, 220, 787, 796, 2147, 198, 8, 198 ]
2.147783
203
<gh_stars>0 function linear_scheme(offset_min::Int64, offset_max::Int64) float_coeff = float_flux_coefficients( [i for i in offset_min - 1: offset_max]) return Linear(offset_min, offset_max, float_coeff) end function flux_positive_linear(scheme::Linear, vector_in::Array{<:AbstractFloat, 1}) return dot(scheme.flux_coefficients, vector_in) end # flux_positive_linear
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 14174, 62, 15952, 1326, 7, 28968, 62, 1084, 3712, 5317, 2414, 11, 11677, 62, 9806, 3712, 5317, 2414, 8, 198, 220, 220, 220, 12178, 62, 1073, 14822, 796, 12178, 62, 69, 22564, 62, 1073, 41945, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 72, 329, 1312, 287, 11677, 62, 1084, 532, 352, 25, 11677, 62, 9806, 12962, 198, 220, 220, 220, 1441, 44800, 7, 28968, 62, 1084, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11677, 62, 9806, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12178, 62, 1073, 14822, 8, 198, 437, 198, 198, 8818, 28462, 62, 24561, 62, 29127, 7, 15952, 1326, 3712, 14993, 451, 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, 15879, 62, 259, 3712, 19182, 90, 27, 25, 23839, 43879, 11, 352, 30072, 198, 220, 220, 220, 1441, 16605, 7, 15952, 1326, 13, 69, 22564, 62, 1073, 41945, 11, 15879, 62, 259, 8, 198, 437, 1303, 28462, 62, 24561, 62, 29127, 198 ]
2.070796
226
using Mill, Test, Flux using Mill: partialeval, identity_model @testset "partialeval" begin metadata = fill("metadata", 4) an1 = ArrayNode(rand(3,4)) b = BagNode(an1, [1:4, 0:-1], metadata) an2 = ArrayNode(randn(5, 4)) wb = WeightedBagNode(an2, [1:2,3:4], rand(1:4, 4), metadata) pn = ProductNode((b=b,wb=wb)) an3 = ArrayNode(rand(10, 2)) ds = ProductNode((pn, an3)) # printtree(ds) m = reflectinmodel(ds, d -> Chain(Dense(d, 4, relu), Dense(4,3)), d-> SegmentedMeanMax(d)) @test partialeval(m.ms[2], ds.data[2], an3)[1] === m.ms[2] @test partialeval(m.ms[2], ds.data[2], an3)[2] === ds.data[2] @test partialeval(m.ms[2], ds.data[2], an1)[1] === identity_model() @test partialeval(m.ms[2], ds.data[2], an1)[2].data ≈ m.ms[2](ds.data[2]).data tm, td = partialeval(m.ms[2], ds.data[2], an3) @test tm(td).data ≈ m.ms[2](ds.data[2]).data @test partialeval(m.ms[2], ds.data[2], an1)[2].data ≈ m.ms[2](ds.data[2]).data @test partialeval(m.ms[1][:b], ds.data[1][:b], an1)[1] === m.ms[1][:b] @test partialeval(m.ms[1][:b], ds.data[1][:b], an1)[2] === ds.data[1][:b] @test partialeval(m.ms[1][:b], ds.data[1][:b], b)[1] === m.ms[1][:b] @test partialeval(m.ms[1][:b], ds.data[1][:b], b)[2] === ds.data[1][:b] tm, td = partialeval(m.ms[1][:b], ds.data[1][:b], an3) @test tm(td).data ≈ m.ms[1][:b](ds.data[1][:b]).data @test partialeval(m.ms[1][:b], ds.data[1][:b], an3)[1] === identity_model() @test partialeval(m.ms[1][:b], ds.data[1][:b], an3)[2].data ≈ m.ms[1][:b](ds.data[1][:b]).data @test partialeval(m.ms[1][:wb], ds.data[1][:wb], an2)[1] === m.ms[1][:wb] @test partialeval(m.ms[1][:wb], ds.data[1][:wb], an2)[2] === ds.data[1][:wb] @test partialeval(m.ms[1][:wb], ds.data[1][:wb], wb)[1] === m.ms[1][:wb] @test partialeval(m.ms[1][:wb], ds.data[1][:wb], wb)[2] === ds.data[1][:wb] tm, td = partialeval(m.ms[1][:wb], ds.data[1][:wb], an3) @test tm(td).data ≈ m.ms[1][:wb](ds.data[1][:wb]).data @test partialeval(m.ms[1][:wb], ds.data[1][:wb], an3)[1] === identity_model() @test partialeval(m.ms[1][:wb], ds.data[1][:wb], an3)[2].data ≈ m.ms[1][:wb](ds.data[1][:wb]).data @test partialeval(m.ms[1], ds.data[1], an1)[1].ms[1] === m.ms[1].ms[1] @test partialeval(m.ms[1], ds.data[1], an1)[2].data[1] === ds.data[1].data[1] @test partialeval(m.ms[1], ds.data[1], an1)[1].ms[2] === identity_model() @test partialeval(m.ms[1], ds.data[1], an1)[2].data[2].data ≈ m.ms[1].ms[2](ds.data[1].data[2]).data @test partialeval(m.ms[1], ds.data[1], an3)[1] === identity_model() @test partialeval(m.ms[1], ds.data[1], an3)[2].data ≈ m.ms[1](ds.data[1]).data tm, td = partialeval(m.ms[1], ds.data[1], an1) @test tm(td).data ≈ m.ms[1](ds.data[1]).data @test partialeval(m.ms[2], ds.data[2], an1)[2].data ≈ m.ms[2](ds.data[2]).data @test partialeval(m, ds, 1)[1] === identity_model() @test partialeval(m, ds, 1)[2].data ≈ m(ds).data tm, td = partialeval(m, ds, an1) @test tm(td).data ≈ m(ds).data end
[ 3500, 9212, 11, 6208, 11, 1610, 2821, 198, 3500, 9212, 25, 13027, 18206, 11, 5369, 62, 19849, 198, 198, 31, 9288, 2617, 366, 47172, 18206, 1, 2221, 198, 220, 220, 220, 20150, 796, 6070, 7203, 38993, 1600, 604, 8, 198, 220, 220, 220, 281, 16, 796, 15690, 19667, 7, 25192, 7, 18, 11, 19, 4008, 198, 220, 220, 220, 275, 796, 20127, 19667, 7, 272, 16, 11, 685, 16, 25, 19, 11, 657, 21912, 16, 4357, 20150, 8, 198, 220, 220, 220, 281, 17, 796, 15690, 19667, 7, 25192, 77, 7, 20, 11, 604, 4008, 198, 220, 220, 220, 266, 65, 796, 14331, 276, 33, 363, 19667, 7, 272, 17, 11, 685, 16, 25, 17, 11, 18, 25, 19, 4357, 43720, 7, 16, 25, 19, 11, 604, 828, 20150, 8, 198, 220, 220, 220, 279, 77, 796, 8721, 19667, 19510, 65, 28, 65, 11, 39346, 28, 39346, 4008, 198, 220, 220, 220, 281, 18, 796, 15690, 19667, 7, 25192, 7, 940, 11, 362, 4008, 198, 220, 220, 220, 288, 82, 796, 8721, 19667, 19510, 21999, 11, 281, 18, 4008, 198, 220, 220, 220, 1303, 3601, 21048, 7, 9310, 8, 198, 220, 220, 220, 285, 796, 4079, 259, 19849, 7, 9310, 11, 288, 4613, 21853, 7, 35, 1072, 7, 67, 11, 604, 11, 823, 84, 828, 360, 1072, 7, 19, 11, 18, 36911, 288, 3784, 1001, 5154, 276, 5308, 272, 11518, 7, 67, 4008, 628, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 18, 38381, 16, 60, 24844, 285, 13, 907, 58, 17, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 18, 38381, 17, 60, 24844, 288, 82, 13, 7890, 58, 17, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 16, 38381, 16, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 16, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 17, 16151, 9310, 13, 7890, 58, 17, 35944, 7890, 198, 220, 220, 220, 256, 76, 11, 41560, 796, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 18, 8, 198, 220, 220, 220, 2488, 9288, 256, 76, 7, 8671, 737, 7890, 15139, 230, 285, 13, 907, 58, 17, 16151, 9310, 13, 7890, 58, 17, 35944, 7890, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 16, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 17, 16151, 9310, 13, 7890, 58, 17, 35944, 7890, 628, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 281, 16, 38381, 16, 60, 24844, 285, 13, 907, 58, 16, 7131, 25, 65, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 281, 16, 38381, 17, 60, 24844, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 275, 38381, 16, 60, 24844, 285, 13, 907, 58, 16, 7131, 25, 65, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 275, 38381, 17, 60, 24844, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 60, 198, 220, 220, 220, 256, 76, 11, 41560, 796, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 281, 18, 8, 198, 220, 220, 220, 2488, 9288, 256, 76, 7, 8671, 737, 7890, 15139, 230, 285, 13, 907, 58, 16, 7131, 25, 65, 16151, 9310, 13, 7890, 58, 16, 7131, 25, 65, 35944, 7890, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 281, 18, 38381, 16, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 65, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 65, 4357, 281, 18, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 16, 7131, 25, 65, 16151, 9310, 13, 7890, 58, 16, 7131, 25, 65, 35944, 7890, 628, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 281, 17, 38381, 16, 60, 24844, 285, 13, 907, 58, 16, 7131, 25, 39346, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 281, 17, 38381, 17, 60, 24844, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 266, 65, 38381, 16, 60, 24844, 285, 13, 907, 58, 16, 7131, 25, 39346, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 266, 65, 38381, 17, 60, 24844, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 60, 198, 220, 220, 220, 256, 76, 11, 41560, 796, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 281, 18, 8, 198, 220, 220, 220, 2488, 9288, 256, 76, 7, 8671, 737, 7890, 15139, 230, 285, 13, 907, 58, 16, 7131, 25, 39346, 16151, 9310, 13, 7890, 58, 16, 7131, 25, 39346, 35944, 7890, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 281, 18, 38381, 16, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 7131, 25, 39346, 4357, 288, 82, 13, 7890, 58, 16, 7131, 25, 39346, 4357, 281, 18, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 16, 7131, 25, 39346, 16151, 9310, 13, 7890, 58, 16, 7131, 25, 39346, 35944, 7890, 628, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 16, 38381, 16, 4083, 907, 58, 16, 60, 24844, 285, 13, 907, 58, 16, 4083, 907, 58, 16, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 16, 38381, 17, 4083, 7890, 58, 16, 60, 24844, 288, 82, 13, 7890, 58, 16, 4083, 7890, 58, 16, 60, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 16, 38381, 16, 4083, 907, 58, 17, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 16, 38381, 17, 4083, 7890, 58, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 16, 4083, 907, 58, 17, 16151, 9310, 13, 7890, 58, 16, 4083, 7890, 58, 17, 35944, 7890, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 18, 38381, 16, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 18, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 16, 16151, 9310, 13, 7890, 58, 16, 35944, 7890, 198, 220, 220, 220, 256, 76, 11, 41560, 796, 13027, 18206, 7, 76, 13, 907, 58, 16, 4357, 288, 82, 13, 7890, 58, 16, 4357, 281, 16, 8, 198, 220, 220, 220, 2488, 9288, 256, 76, 7, 8671, 737, 7890, 15139, 230, 285, 13, 907, 58, 16, 16151, 9310, 13, 7890, 58, 16, 35944, 7890, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 13, 907, 58, 17, 4357, 288, 82, 13, 7890, 58, 17, 4357, 281, 16, 38381, 17, 4083, 7890, 15139, 230, 285, 13, 907, 58, 17, 16151, 9310, 13, 7890, 58, 17, 35944, 7890, 628, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 11, 288, 82, 11, 352, 38381, 16, 60, 24844, 5369, 62, 19849, 3419, 198, 220, 220, 220, 2488, 9288, 13027, 18206, 7, 76, 11, 288, 82, 11, 352, 38381, 17, 4083, 7890, 15139, 230, 285, 7, 9310, 737, 7890, 198, 220, 220, 220, 256, 76, 11, 41560, 796, 13027, 18206, 7, 76, 11, 288, 82, 11, 281, 16, 8, 198, 220, 220, 220, 2488, 9288, 256, 76, 7, 8671, 737, 7890, 15139, 230, 285, 7, 9310, 737, 7890, 198, 437, 198, 220, 220, 220, 220, 198 ]
1.936398
1,588
export ProductDomain immutable ProductDomain{D,T,dim} <: Domain{T,dim} domains::D end ProductDomain(d::Tuple) = ProductDomain{typeof(d),mapreduce(eltype,promote_type,d),mapreduce(dimension,+,d)}(d) fromcanonical(d::BivariateDomain,x::Tuple)=fromcanonical(d,x...) tocanonical(d::BivariateDomain,x::Tuple)=tocanonical(d,x...) # product domains are their own canonical domain for OP in (:fromcanonical,:tocanonical) @eval $OP(::ProductDomain,x,y)=(x,y) end ProductDomain(A,B)=ProductDomain((A,B)) *(A::ProductDomain,B::ProductDomain)=ProductDomain(tuple(A.domains...,B.domains...)) *(A::ProductDomain,B::Domain)=ProductDomain(tuple(A.domains...,B)) *(A::Domain,B::ProductDomain)=ProductDomain(tuple(A,B.domains...)) *(A::Domain,B::Domain)=ProductDomain(A,B) Base.length(d::ProductDomain)=length(d.domains) Base.transpose(d::ProductDomain)=ProductDomain(d[2],d[1]) Base.getindex(d::ProductDomain,k::Integer)=d.domains[k] ==(d1::ProductDomain,d2::ProductDomain)=d1.domains==d2.domains Base.first(d::ProductDomain)=(first(d[1]),first(d[2])) function pushappendpts!(ret,xx,pts) if isempty(pts) push!(ret,xx) else for x in pts[1] pushappendpts!(ret,(xx...,x),pts[2:end]) end end ret end function checkpoints(d::ProductDomain) pts=map(checkpoints,d.domains) ret=Array(Tuple{map(eltype,d.domains)...},0) pushappendpts!(ret,(),pts) ret end function points(d::ProductDomain,n::Tuple) @assert length(d.domains) == length(n) pts=map(points,d.domains,n) ret=Array(Tuple{map(eltype,d.domains)...},0) pushappendpts!(ret,(),pts) ret end Base.reverse(d::ProductDomain)=ProductDomain(map(reverse,d.domains)) domainscompatible(a::ProductDomain,b::ProductDomain) = length(a.domains)==length(b.domains) && all(map(domainscompatible,a.domains,b.domains))
[ 198, 39344, 8721, 43961, 628, 198, 8608, 18187, 8721, 43961, 90, 35, 11, 51, 11, 27740, 92, 1279, 25, 20021, 90, 51, 11, 27740, 92, 198, 220, 220, 220, 18209, 3712, 35, 198, 437, 198, 198, 15667, 43961, 7, 67, 3712, 51, 29291, 8, 796, 198, 220, 220, 220, 8721, 43961, 90, 4906, 1659, 7, 67, 828, 8899, 445, 7234, 7, 417, 4906, 11, 16963, 1258, 62, 4906, 11, 67, 828, 8899, 445, 7234, 7, 46156, 11, 28200, 67, 38165, 7, 67, 8, 198, 198, 6738, 49883, 605, 7, 67, 3712, 33, 42524, 43961, 11, 87, 3712, 51, 29291, 47505, 6738, 49883, 605, 7, 67, 11, 87, 23029, 198, 40301, 36902, 605, 7, 67, 3712, 33, 42524, 43961, 11, 87, 3712, 51, 29291, 47505, 40301, 36902, 605, 7, 67, 11, 87, 23029, 198, 198, 2, 1720, 18209, 389, 511, 898, 40091, 7386, 198, 1640, 13349, 287, 357, 25, 6738, 49883, 605, 11, 25, 40301, 36902, 605, 8, 198, 220, 220, 220, 2488, 18206, 720, 3185, 7, 3712, 15667, 43961, 11, 87, 11, 88, 35793, 87, 11, 88, 8, 198, 437, 628, 198, 15667, 43961, 7, 32, 11, 33, 47505, 15667, 43961, 19510, 32, 11, 33, 4008, 198, 9, 7, 32, 3712, 15667, 43961, 11, 33, 3712, 15667, 43961, 47505, 15667, 43961, 7, 83, 29291, 7, 32, 13, 3438, 1299, 986, 11, 33, 13, 3438, 1299, 986, 4008, 198, 9, 7, 32, 3712, 15667, 43961, 11, 33, 3712, 43961, 47505, 15667, 43961, 7, 83, 29291, 7, 32, 13, 3438, 1299, 986, 11, 33, 4008, 198, 9, 7, 32, 3712, 43961, 11, 33, 3712, 15667, 43961, 47505, 15667, 43961, 7, 83, 29291, 7, 32, 11, 33, 13, 3438, 1299, 986, 4008, 198, 9, 7, 32, 3712, 43961, 11, 33, 3712, 43961, 47505, 15667, 43961, 7, 32, 11, 33, 8, 198, 198, 14881, 13, 13664, 7, 67, 3712, 15667, 43961, 47505, 13664, 7, 67, 13, 3438, 1299, 8, 198, 14881, 13, 7645, 3455, 7, 67, 3712, 15667, 43961, 47505, 15667, 43961, 7, 67, 58, 17, 4357, 67, 58, 16, 12962, 198, 14881, 13, 1136, 9630, 7, 67, 3712, 15667, 43961, 11, 74, 3712, 46541, 47505, 67, 13, 3438, 1299, 58, 74, 60, 198, 855, 7, 67, 16, 3712, 15667, 43961, 11, 67, 17, 3712, 15667, 43961, 47505, 67, 16, 13, 3438, 1299, 855, 67, 17, 13, 3438, 1299, 198, 198, 14881, 13, 11085, 7, 67, 3712, 15667, 43961, 35793, 11085, 7, 67, 58, 16, 46570, 11085, 7, 67, 58, 17, 60, 4008, 628, 198, 8818, 4574, 33295, 457, 82, 0, 7, 1186, 11, 5324, 11, 457, 82, 8, 198, 220, 220, 220, 611, 318, 28920, 7, 457, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 1186, 11, 5324, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 43344, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 33295, 457, 82, 0, 7, 1186, 11, 7, 5324, 986, 11, 87, 828, 457, 82, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1005, 198, 437, 198, 198, 8818, 36628, 7, 67, 3712, 15667, 43961, 8, 198, 220, 220, 220, 43344, 28, 8899, 7, 9122, 13033, 11, 67, 13, 3438, 1299, 8, 198, 220, 220, 220, 1005, 28, 19182, 7, 51, 29291, 90, 8899, 7, 417, 4906, 11, 67, 13, 3438, 1299, 26513, 5512, 15, 8, 198, 220, 220, 220, 4574, 33295, 457, 82, 0, 7, 1186, 11, 22784, 457, 82, 8, 198, 220, 220, 220, 1005, 198, 437, 198, 198, 8818, 2173, 7, 67, 3712, 15667, 43961, 11, 77, 3712, 51, 29291, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 67, 13, 3438, 1299, 8, 6624, 4129, 7, 77, 8, 198, 220, 220, 220, 43344, 28, 8899, 7, 13033, 11, 67, 13, 3438, 1299, 11, 77, 8, 198, 220, 220, 220, 1005, 28, 19182, 7, 51, 29291, 90, 8899, 7, 417, 4906, 11, 67, 13, 3438, 1299, 26513, 5512, 15, 8, 198, 220, 220, 220, 4574, 33295, 457, 82, 0, 7, 1186, 11, 22784, 457, 82, 8, 198, 220, 220, 220, 1005, 198, 437, 198, 198, 14881, 13, 50188, 7, 67, 3712, 15667, 43961, 47505, 15667, 43961, 7, 8899, 7, 50188, 11, 67, 13, 3438, 1299, 4008, 198, 198, 3438, 1299, 38532, 7, 64, 3712, 15667, 43961, 11, 65, 3712, 15667, 43961, 8, 796, 198, 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, 64, 13, 3438, 1299, 8, 855, 13664, 7, 65, 13, 3438, 1299, 8, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 477, 7, 8899, 7, 3438, 1299, 38532, 11, 64, 13, 3438, 1299, 11, 65, 13, 3438, 1299, 4008, 198 ]
2.316626
818
<filename>test/TestAssembleHat.jl using InvariantMeasures using ValidatedNumerics using LinearAlgebra @testset "Hat assembler" begin D = Mod1Dynamic(x->2*x) B = Hat(8) P = assemble(B, D) Ptrue = [ 0.5 0.25 0 0 0 0 0 0.25; 0 0.25 0.5 0.25 0 0 0 0 ; 0 0 0 0.25 0.5 0.25 0 0 ; 0 0 0 0 0 0.25 0.5 0.25; 0.5 0.25 0 0 0 0 0 0.25; 0 0.25 0.5 0.25 0 0 0 0 ; 0 0 0 0.25 0.5 0.25 0 0 ; 0 0 0 0 0 0.25 0.5 0.25; ] Ptrue = Ptrue' @test all(contains_zero.(P-Ptrue)) @test opnormbound(L1, DiscretizedOperator(B, D)) == 1 @test opnormbound(Linf, DiscretizedOperator(B, D)) == 1 Q = DiscretizedOperator(B, D) @test size(Q) == (8,8) n = size(Q)[1] e = randn(n) x = similar(e) x[:] .= 2. mQ = mid(Q) @test mul!(x, mQ, e, 1, 0) == mQ*e fQ = mQ.L + mQ.e * mQ.w @test fQ * e ≈ mQ * e end
[ 27, 34345, 29, 9288, 14, 14402, 1722, 15140, 40483, 13, 20362, 198, 3500, 10001, 2743, 415, 5308, 13846, 198, 3500, 3254, 41475, 45, 6975, 873, 198, 3500, 44800, 2348, 29230, 198, 198, 31, 9288, 2617, 366, 40483, 11156, 1754, 1, 2221, 198, 198, 35, 796, 3401, 16, 44090, 7, 87, 3784, 17, 9, 87, 8, 198, 33, 796, 10983, 7, 23, 8, 198, 47, 796, 25432, 7, 33, 11, 360, 8, 198, 198, 47, 7942, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 20, 657, 13, 1495, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 657, 13, 1495, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 13, 1495, 657, 13, 20, 220, 657, 13, 1495, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 657, 220, 220, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 13, 1495, 657, 13, 20, 220, 657, 13, 1495, 657, 220, 220, 657, 220, 220, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 13, 1495, 657, 13, 20, 657, 13, 1495, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 13, 20, 657, 13, 1495, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 657, 13, 1495, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 13, 1495, 657, 13, 20, 220, 657, 13, 1495, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 657, 220, 220, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 13, 1495, 657, 13, 20, 220, 657, 13, 1495, 657, 220, 220, 657, 220, 220, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 220, 220, 220, 657, 13, 1495, 657, 13, 20, 657, 13, 1495, 26, 198, 197, 197, 60, 198, 47, 7942, 796, 350, 7942, 6, 198, 198, 31, 9288, 477, 7, 3642, 1299, 62, 22570, 12195, 47, 12, 47, 7942, 4008, 198, 198, 31, 9288, 1034, 27237, 7784, 7, 43, 16, 11, 8444, 1186, 1143, 18843, 1352, 7, 33, 11, 360, 4008, 6624, 352, 198, 31, 9288, 1034, 27237, 7784, 7, 43, 10745, 11, 8444, 1186, 1143, 18843, 1352, 7, 33, 11, 360, 4008, 6624, 352, 198, 198, 48, 796, 8444, 1186, 1143, 18843, 1352, 7, 33, 11, 360, 8, 198, 31, 9288, 2546, 7, 48, 8, 6624, 357, 23, 11, 23, 8, 198, 198, 77, 796, 2546, 7, 48, 38381, 16, 60, 198, 68, 796, 43720, 77, 7, 77, 8, 198, 87, 796, 2092, 7, 68, 8, 198, 87, 58, 47715, 764, 28, 362, 13, 198, 198, 76, 48, 796, 3095, 7, 48, 8, 198, 31, 9288, 35971, 0, 7, 87, 11, 285, 48, 11, 304, 11, 352, 11, 657, 8, 6624, 285, 48, 9, 68, 198, 198, 69, 48, 796, 285, 48, 13, 43, 1343, 285, 48, 13, 68, 1635, 285, 48, 13, 86, 198, 31, 9288, 277, 48, 1635, 304, 15139, 230, 285, 48, 1635, 304, 198, 198, 437, 198 ]
1.674296
568
module TestJaynes using Test include("../src/Jaynes.jl") using .Jaynes println("\n________________________\n") @testset "Core" begin println("Compiler.") @time @testset "Compiler." begin include("compiler/update.jl") end println("Execution contexts.") @time @testset "Execution contexts." begin include("core/contexts.jl") end println("Gradients.") @time @testset "Gradients." begin include("core/gradients.jl") end println("Black-box extensions.") @time @testset "Black-box extensions." begin include("core/blackbox.jl") end println("Selection query language.") @time @testset "Selection query language." begin include("core/selection_query_language.jl") end println("Gradient learning.") @time @testset "Gradient learning." begin end println() end println("\n________________________\n") using Gen @testset "Gen compatibility" begin println("Generative function interface.") @time @testset "Generative function interface." begin include("gen_compat/gen_fn_interface.jl") end end end #module
[ 21412, 6208, 30568, 2516, 198, 198, 3500, 6208, 198, 198, 17256, 7203, 40720, 10677, 14, 30568, 2516, 13, 20362, 4943, 198, 3500, 764, 30568, 2516, 198, 198, 35235, 7203, 59, 77, 32941, 59, 77, 4943, 198, 198, 31, 9288, 2617, 366, 14055, 1, 2221, 628, 220, 220, 220, 44872, 7203, 7293, 5329, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 7293, 5329, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 5589, 5329, 14, 19119, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 23002, 1009, 26307, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 23002, 1009, 26307, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 7295, 14, 22866, 82, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 42731, 2334, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 42731, 2334, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 7295, 14, 9744, 2334, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 9915, 12, 3524, 18366, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 9915, 12, 3524, 18366, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 7295, 14, 13424, 3524, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 4653, 1564, 12405, 3303, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 4653, 1564, 12405, 3303, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 7295, 14, 49283, 62, 22766, 62, 16129, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 42731, 1153, 4673, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 42731, 1153, 4673, 526, 2221, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 3419, 198, 437, 198, 198, 35235, 7203, 59, 77, 32941, 59, 77, 4943, 198, 198, 3500, 5215, 198, 198, 31, 9288, 2617, 366, 13746, 17764, 1, 2221, 198, 220, 220, 220, 44872, 7203, 8645, 876, 2163, 7071, 19570, 198, 220, 220, 220, 2488, 2435, 2488, 9288, 2617, 366, 8645, 876, 2163, 7071, 526, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 5235, 62, 5589, 265, 14, 5235, 62, 22184, 62, 39994, 13, 20362, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 1303, 21412, 198 ]
2.808354
407
@testset "Exceptions" begin function oob_kernel(X) X[0] = 1 nothing end RA = ROCArray(ones(Float32, 4)) try wait(@roc oob_kernel(RA)) catch err @test err isa AMDGPU.KernelException if err isa AMDGPU.KernelException @test err.exstr !== nothing @test occursin("BoundsError", err.exstr) end end end
[ 31, 9288, 2617, 366, 3109, 11755, 1, 2221, 198, 198, 8818, 267, 672, 62, 33885, 7, 55, 8, 198, 220, 220, 220, 1395, 58, 15, 60, 796, 352, 198, 220, 220, 220, 2147, 198, 437, 198, 198, 3861, 796, 371, 4503, 19182, 7, 1952, 7, 43879, 2624, 11, 604, 4008, 198, 28311, 198, 220, 220, 220, 4043, 7, 31, 12204, 267, 672, 62, 33885, 7, 3861, 4008, 198, 40198, 11454, 198, 220, 220, 220, 2488, 9288, 11454, 318, 64, 10324, 33346, 13, 42, 7948, 16922, 198, 220, 220, 220, 611, 11454, 318, 64, 10324, 33346, 13, 42, 7948, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 11454, 13, 1069, 2536, 5145, 855, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 8833, 259, 7203, 33, 3733, 12331, 1600, 11454, 13, 1069, 2536, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 198 ]
2.275168
149
<gh_stars>100-1000 @testset "scc graph wikipedia" begin n = 8 scc_init = CS.SCCInit( zeros(Int, n + 1), zeros(Int, n), zeros(Int, n), zeros(Bool, n), zeros(Int, n), ) di_ei = [1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8] di_ej = [2, 2, 3, 5, 7, 4, 3, 8, 6, 1, 7, 6, 4, 7] scc_map = CS.scc(di_ei, di_ej, scc_init) @test scc_map[1] == scc_map[2] == scc_map[5] @test scc_map[3] == scc_map[4] == scc_map[8] @test scc_map[6] == scc_map[7] @test scc_map[1] != scc_map[3] @test scc_map[1] != scc_map[6] @test scc_map[3] != scc_map[6] end
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 31, 9288, 2617, 366, 82, 535, 4823, 47145, 11151, 1, 2221, 198, 220, 220, 220, 299, 796, 807, 198, 220, 220, 220, 264, 535, 62, 15003, 796, 9429, 13, 50, 4093, 31768, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 5317, 11, 299, 1343, 352, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 5317, 11, 299, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 5317, 11, 299, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 33, 970, 11, 299, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 5317, 11, 299, 828, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2566, 62, 20295, 796, 685, 16, 11, 362, 11, 362, 11, 362, 11, 513, 11, 513, 11, 604, 11, 604, 11, 642, 11, 642, 11, 718, 11, 767, 11, 807, 11, 807, 60, 198, 220, 220, 220, 2566, 62, 68, 73, 796, 685, 17, 11, 362, 11, 513, 11, 642, 11, 767, 11, 604, 11, 513, 11, 807, 11, 718, 11, 352, 11, 767, 11, 718, 11, 604, 11, 767, 60, 198, 220, 220, 220, 264, 535, 62, 8899, 796, 9429, 13, 82, 535, 7, 10989, 62, 20295, 11, 2566, 62, 68, 73, 11, 264, 535, 62, 15003, 8, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 16, 60, 6624, 264, 535, 62, 8899, 58, 17, 60, 6624, 264, 535, 62, 8899, 58, 20, 60, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 18, 60, 6624, 264, 535, 62, 8899, 58, 19, 60, 6624, 264, 535, 62, 8899, 58, 23, 60, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 21, 60, 6624, 264, 535, 62, 8899, 58, 22, 60, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 16, 60, 14512, 264, 535, 62, 8899, 58, 18, 60, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 16, 60, 14512, 264, 535, 62, 8899, 58, 21, 60, 198, 220, 220, 220, 2488, 9288, 264, 535, 62, 8899, 58, 18, 60, 14512, 264, 535, 62, 8899, 58, 21, 60, 198, 437, 198 ]
1.651475
373
<filename>examples/hinf_example_tank.jl<gh_stars>10-100 using ControlSystems, RobustAndOptimalControl using Plots using LinearAlgebra """ This is a simple SISO example with integrator dynamics corresponding to the quad tank process in the lab. The example can be set to visualize and save plots using the variables makeplots - true/false (true if plots are to be generated, false for testing) SavePlots - true/false (true if plots are to be saved, false for testing) """ makeplots = true # Define the proces parameters k1, k2, kc, g = 3.33, 3.35, 0.5, 981 A1, A3, A2, A4 = 28, 28, 32, 32 a1, a3, a2, a4= 0.071, 0.071, 0.057, 0.057 h01, h02, h03, h04 = 12.4, 12.7, 1.8, 1.4 T1, T2 = (A1/a1)*sqrt(2*h01/g), (A2/a2)*sqrt(2*h02/g) T3, T4 = (A3/a3)*sqrt(2*h03/g), (A4/a4)*sqrt(2*h04/g) c1, c2 = (T1*k1*kc/A1), (T2*k2*kc/A2) γ1, γ2 = 0.7, 0.6 # Define the process dynamics A = [-1/T1 0 A3/(A1*T3) 0; 0 -1/T2 0 A4/(A2*T4); 0 0 -1/T3 0; 0 0 0 -1/T4]; B = [γ1*k1/A1 0; 0 γ2*k2/A2; 0 (1-γ2)*k2/A3; (1-γ1)*k1/A4 0 ]; C = [kc 0 0 0; 0 kc 0 0]; D = zeros(2,2) G = ss(A,B,C,D); # Sensitivity weight function WS = makeweight(100, (0.1, 1), 1/10) * I(2) # Output sensitivity weight function # WUelement = 5*tf([1,1],[0.1,1]) WU = tf(0.01) .* I(2) # Complementary sensitivity weight function WT = makeweight(1/10, (0.1, 1), 10) * I(2) # Form augmented P dynamics in state-space P = hinfpartition(G, WS, WU, WT) # Check that the assumptions are satisfied flag = hinfassumptions(P) # Synthesize the H-infinity optimal controller flag, C, γ = hinfsynthesize(P) Pcl, S, CS, T = hinfsignals(P, G, C) ## Plot the specifications # TODO figure out why I get segmentation errors when using ss instead of tf for # the weighting functions, makes no sense at all if makeplots specificationplot([S, CS, T], [WS[1,1], 0.01, WT[1,1]], γ) ## Plot the closed loop gain from w to z # TODO figure out why the legends don't seem to work in this case specificationplot(Pcl, γ; s_labels=["\$\\sigma(P_{cl}(j\\omega))\$"], w_labels=["\$\\gamma\$"]) times = [i for i in range(0, stop=300, length=10000)] plot(step(T, times)) end
[ 27, 34345, 29, 1069, 12629, 14, 71, 10745, 62, 20688, 62, 28451, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6779, 11964, 82, 11, 3851, 436, 1870, 27871, 4402, 15988, 198, 3500, 1345, 1747, 198, 3500, 44800, 2348, 29230, 198, 37811, 198, 1212, 318, 257, 2829, 311, 40734, 1672, 351, 4132, 12392, 17262, 11188, 284, 262, 198, 47003, 6873, 1429, 287, 262, 2248, 13, 198, 198, 464, 1672, 460, 307, 900, 284, 38350, 290, 3613, 21528, 1262, 262, 9633, 198, 220, 787, 489, 1747, 532, 2081, 14, 9562, 357, 7942, 611, 21528, 389, 284, 307, 7560, 11, 3991, 329, 4856, 8, 198, 220, 12793, 3646, 1747, 532, 2081, 14, 9562, 357, 7942, 611, 21528, 389, 284, 307, 7448, 11, 3991, 329, 4856, 8, 198, 37811, 198, 15883, 489, 1747, 796, 2081, 198, 198, 2, 2896, 500, 262, 386, 728, 10007, 198, 74, 16, 11, 479, 17, 11, 479, 66, 11, 308, 796, 513, 13, 2091, 11, 513, 13, 2327, 11, 657, 13, 20, 11, 860, 6659, 198, 32, 16, 11, 317, 18, 11, 317, 17, 11, 317, 19, 796, 2579, 11, 2579, 11, 3933, 11, 3933, 198, 64, 16, 11, 257, 18, 11, 257, 17, 11, 257, 19, 28, 657, 13, 2998, 16, 11, 657, 13, 2998, 16, 11, 657, 13, 43526, 11, 657, 13, 43526, 198, 71, 486, 11, 289, 2999, 11, 289, 3070, 11, 289, 3023, 796, 1105, 13, 19, 11, 1105, 13, 22, 11, 352, 13, 23, 11, 352, 13, 19, 198, 51, 16, 11, 309, 17, 796, 357, 32, 16, 14, 64, 16, 27493, 31166, 17034, 7, 17, 9, 71, 486, 14, 70, 828, 357, 32, 17, 14, 64, 17, 27493, 31166, 17034, 7, 17, 9, 71, 2999, 14, 70, 8, 198, 51, 18, 11, 309, 19, 796, 357, 32, 18, 14, 64, 18, 27493, 31166, 17034, 7, 17, 9, 71, 3070, 14, 70, 828, 357, 32, 19, 14, 64, 19, 27493, 31166, 17034, 7, 17, 9, 71, 3023, 14, 70, 8, 198, 66, 16, 11, 269, 17, 796, 357, 51, 16, 9, 74, 16, 9, 74, 66, 14, 32, 16, 828, 357, 51, 17, 9, 74, 17, 9, 74, 66, 14, 32, 17, 8, 198, 42063, 16, 11, 7377, 111, 17, 796, 657, 13, 22, 11, 657, 13, 21, 198, 198, 2, 2896, 500, 262, 1429, 17262, 198, 32, 796, 25915, 16, 14, 51, 16, 220, 220, 220, 220, 657, 317, 18, 29006, 32, 16, 9, 51, 18, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 26, 198, 220, 220, 220, 220, 657, 220, 220, 220, 220, 532, 16, 14, 51, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 317, 19, 29006, 32, 17, 9, 51, 19, 1776, 198, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 532, 16, 14, 51, 18, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 26, 198, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 532, 16, 14, 51, 19, 11208, 198, 33, 796, 685, 42063, 16, 9, 74, 16, 14, 32, 16, 220, 220, 220, 220, 657, 26, 198, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 111, 17, 9, 74, 17, 14, 32, 17, 26, 198, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 16, 12, 42063, 17, 27493, 74, 17, 14, 32, 18, 26, 198, 220, 220, 220, 220, 357, 16, 12, 42063, 16, 27493, 74, 16, 14, 32, 19, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28013, 198, 34, 796, 685, 74, 66, 657, 657, 657, 26, 198, 220, 220, 220, 220, 657, 479, 66, 657, 657, 11208, 198, 35, 796, 1976, 27498, 7, 17, 11, 17, 8, 198, 38, 796, 37786, 7, 32, 11, 33, 11, 34, 11, 35, 1776, 198, 198, 2, 14173, 11365, 3463, 2163, 198, 19416, 796, 787, 6551, 7, 3064, 11, 357, 15, 13, 16, 11, 352, 828, 352, 14, 940, 8, 1635, 314, 7, 17, 8, 198, 198, 2, 25235, 14233, 3463, 2163, 198, 2, 370, 52, 30854, 796, 642, 9, 27110, 26933, 16, 11, 16, 38430, 15, 13, 16, 11, 16, 12962, 198, 54, 52, 796, 48700, 7, 15, 13, 486, 8, 764, 9, 314, 7, 17, 8, 198, 198, 2, 955, 26908, 560, 14233, 3463, 2163, 198, 39386, 796, 787, 6551, 7, 16, 14, 940, 11, 357, 15, 13, 16, 11, 352, 828, 838, 8, 1635, 314, 7, 17, 8, 198, 198, 2, 5178, 30259, 350, 17262, 287, 1181, 12, 13200, 198, 47, 796, 289, 10745, 3911, 653, 7, 38, 11, 25290, 11, 370, 52, 11, 41281, 8, 198, 198, 2, 6822, 326, 262, 14895, 389, 11378, 198, 32109, 796, 289, 10745, 562, 388, 8544, 7, 47, 8, 198, 198, 2, 26375, 956, 1096, 262, 367, 12, 10745, 6269, 16586, 10444, 198, 32109, 11, 327, 11, 7377, 111, 796, 289, 10745, 1837, 429, 956, 1096, 7, 47, 8, 198, 198, 47, 565, 11, 311, 11, 9429, 11, 309, 796, 289, 259, 9501, 570, 874, 7, 47, 11, 402, 11, 327, 8, 198, 198, 2235, 28114, 262, 20640, 198, 2, 16926, 46, 3785, 503, 1521, 314, 651, 10618, 341, 8563, 618, 1262, 37786, 2427, 286, 48700, 329, 198, 2, 262, 3463, 278, 5499, 11, 1838, 645, 2565, 379, 477, 198, 361, 787, 489, 1747, 198, 220, 20855, 29487, 26933, 50, 11, 9429, 11, 309, 4357, 685, 19416, 58, 16, 11, 16, 4357, 657, 13, 486, 11, 41281, 58, 16, 11, 16, 60, 4357, 7377, 111, 8, 198, 198, 2235, 28114, 262, 4838, 9052, 4461, 422, 266, 284, 1976, 198, 2, 16926, 46, 3785, 503, 1521, 262, 24901, 836, 470, 1283, 284, 670, 287, 428, 1339, 628, 220, 20855, 29487, 7, 47, 565, 11, 7377, 111, 26, 264, 62, 23912, 1424, 28, 14692, 59, 3, 6852, 82, 13495, 7, 47, 23330, 565, 92, 7, 73, 6852, 462, 4908, 4008, 59, 3, 33116, 266, 62, 23912, 1424, 28, 14692, 59, 3, 6852, 28483, 2611, 59, 3, 8973, 8, 628, 220, 1661, 796, 685, 72, 329, 1312, 287, 2837, 7, 15, 11, 2245, 28, 6200, 11, 4129, 28, 49388, 15437, 198, 220, 7110, 7, 9662, 7, 51, 11, 1661, 4008, 198, 437, 198 ]
2.102041
1,078
<gh_stars>100-1000 """ flux_first_order!( bl::BalanceLaw, flux::Grad, state::Vars, aux::Vars, t::Real ) Computes (and assembles) flux terms `F¹(Y)` in: ``` ∂Y -- + ∇ • F¹(Y) + ∇ • F²(Y,G) = S(Y, G), G = ∇Y ∂t ``` Computes and assembles non-diffusive fluxes in the model equations. For this fallback to work, several methods must be defined: - [`prognostic_vars`](@ref) - [`eq_tends`](@ref) - [`get_prog_state`](@ref) optionally, - [`precompute`](@ref) and individual [`flux`](@ref) kernels that are defined for each type that `eq_tends` returns. """ @inline function flux_first_order!( bl::BalanceLaw, flux, state, aux, t, direction, ) tend = Flux{FirstOrder}() _args = (; state, aux, t, direction) args = merge(_args, (precomputed = precompute(bl, _args, tend),)) map(prognostic_vars(bl)) do prog var, name = get_prog_state(flux, prog) val = Σfluxes(prog, eq_tends(prog, bl, tend), bl, args) setproperty!(var, name, val) end nothing end """ flux_second_order!( bl::BalanceLaw, flux::Grad, state::Vars, diffusive::Vars, hyperdiffusive::Vars, aux::Vars, t::Real ) Computes (and assembles) flux terms `F²(Y, G)` in: ``` ∂Y -- + ∇ • F¹(Y) + ∇ • F²(Y,G) = S(Y, G), G = ∇Y ∂t ``` Diffusive fluxes in BalanceLaw. Viscosity, diffusivity are calculated in the turbulence subcomponent and accessed within the diffusive flux function. Contributions from subcomponents are then assembled (pointwise). For this fallback to work, several methods must be defined: - [`prognostic_vars`](@ref) - [`eq_tends`](@ref) - [`get_prog_state`](@ref) optionally, - [`precompute`](@ref) and individual [`flux`](@ref) kernels that are defined for each type that `eq_tends` returns. """ @inline function flux_second_order!( bl::BalanceLaw, flux, state, diffusive, hyperdiffusive, aux, t, ) tend = Flux{SecondOrder}() _args = (; state, aux, t, diffusive, hyperdiffusive) args = merge(_args, (precomputed = precompute(bl, _args, tend),)) map(prognostic_vars(bl)) do prog var, name = get_prog_state(flux, prog) val = Σfluxes(prog, eq_tends(prog, bl, tend), bl, args) setproperty!(var, name, val) end nothing end """ source!( bl::BalanceLaw, source::Vars, state::Vars, diffusive::Vars, aux::Vars, t::Real, direction::Direction, ) Computes (and assembles) source terms `S(Y)` in: ``` ∂Y -- + ∇ • F¹(Y) + ∇ • F²(Y,G) = S(Y, G), G = ∇Y ∂t ``` For this fallback to work, several methods must be defined: - [`prognostic_vars`](@ref) - [`eq_tends`](@ref) - [`get_prog_state`](@ref) optionally, - [`precompute`](@ref) and individual [`source`](@ref) kernels that are defined for each type that `eq_tends` returns. """ function source!(bl::BalanceLaw, source, state, diffusive, aux, t, direction) tend = Source() _args = (; state, aux, t, direction, diffusive) args = merge(_args, (precomputed = precompute(bl, _args, tend),)) map(prognostic_vars(bl)) do prog var, name = get_prog_state(source, prog) val = Σsources(prog, eq_tends(prog, bl, tend), bl, args) setproperty!(var, name, val) end nothing end
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 198, 37811, 198, 220, 220, 220, 28462, 62, 11085, 62, 2875, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 698, 3712, 45866, 16966, 11, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 3712, 42731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 27506, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 256, 3712, 15633, 198, 220, 220, 220, 1267, 198, 198, 7293, 1769, 357, 392, 11156, 829, 8, 28462, 2846, 4600, 37, 126, 117, 7, 56, 8, 63, 287, 25, 198, 198, 15506, 63, 198, 24861, 224, 56, 198, 438, 1343, 18872, 229, 5595, 376, 126, 117, 7, 56, 8, 1343, 18872, 229, 5595, 376, 31185, 7, 56, 11, 38, 8, 796, 311, 7, 56, 11, 402, 828, 220, 220, 220, 220, 402, 796, 18872, 229, 56, 198, 24861, 224, 83, 198, 15506, 63, 198, 198, 7293, 1769, 290, 11156, 829, 1729, 12, 26069, 11350, 198, 69, 22564, 274, 287, 262, 2746, 27490, 13, 198, 198, 1890, 428, 2121, 1891, 284, 670, 11, 1811, 5050, 1276, 307, 5447, 25, 198, 532, 685, 63, 1676, 4593, 15132, 62, 85, 945, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 27363, 62, 83, 2412, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 1136, 62, 1676, 70, 62, 5219, 63, 16151, 31, 5420, 8, 198, 18076, 453, 11, 198, 532, 685, 63, 3866, 5589, 1133, 63, 16151, 31, 5420, 8, 198, 392, 1981, 685, 63, 69, 22564, 63, 16151, 31, 5420, 8, 50207, 326, 198, 533, 5447, 329, 1123, 2099, 326, 4600, 27363, 62, 83, 2412, 63, 5860, 13, 198, 37811, 198, 31, 45145, 2163, 28462, 62, 11085, 62, 2875, 0, 7, 198, 220, 220, 220, 698, 3712, 45866, 16966, 11, 198, 220, 220, 220, 28462, 11, 198, 220, 220, 220, 1181, 11, 198, 220, 220, 220, 27506, 11, 198, 220, 220, 220, 256, 11, 198, 220, 220, 220, 4571, 11, 198, 8, 628, 220, 220, 220, 4327, 796, 1610, 2821, 90, 5962, 18743, 92, 3419, 198, 220, 220, 220, 4808, 22046, 796, 357, 26, 1181, 11, 27506, 11, 256, 11, 4571, 8, 198, 220, 220, 220, 26498, 796, 20121, 28264, 22046, 11, 357, 3866, 785, 17128, 796, 662, 5589, 1133, 7, 2436, 11, 4808, 22046, 11, 4327, 828, 4008, 628, 220, 220, 220, 3975, 7, 1676, 4593, 15132, 62, 85, 945, 7, 2436, 4008, 466, 1172, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 11, 1438, 796, 651, 62, 1676, 70, 62, 5219, 7, 69, 22564, 11, 1172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 7377, 96, 69, 22564, 274, 7, 1676, 70, 11, 37430, 62, 83, 2412, 7, 1676, 70, 11, 698, 11, 4327, 828, 698, 11, 26498, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 26745, 0, 7, 7785, 11, 1438, 11, 1188, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 28462, 62, 12227, 62, 2875, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 698, 3712, 45866, 16966, 11, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 3712, 42731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 814, 11350, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8718, 26069, 11350, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 27506, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 256, 3712, 15633, 198, 220, 220, 220, 1267, 198, 198, 7293, 1769, 357, 392, 11156, 829, 8, 28462, 2846, 4600, 37, 31185, 7, 56, 11, 402, 8, 63, 287, 25, 198, 198, 15506, 63, 198, 24861, 224, 56, 198, 438, 1343, 18872, 229, 5595, 376, 126, 117, 7, 56, 8, 1343, 18872, 229, 5595, 376, 31185, 7, 56, 11, 38, 8, 796, 311, 7, 56, 11, 402, 828, 220, 220, 220, 220, 402, 796, 18872, 229, 56, 198, 24861, 224, 83, 198, 15506, 63, 198, 198, 28813, 11350, 28462, 274, 287, 22924, 16966, 13, 569, 2304, 16579, 11, 814, 385, 3458, 389, 10488, 198, 259, 262, 47741, 850, 42895, 290, 17535, 1626, 262, 814, 11350, 28462, 198, 8818, 13, 49152, 422, 850, 5589, 3906, 389, 788, 16030, 357, 4122, 3083, 737, 198, 198, 1890, 428, 2121, 1891, 284, 670, 11, 1811, 5050, 1276, 307, 5447, 25, 198, 532, 685, 63, 1676, 4593, 15132, 62, 85, 945, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 27363, 62, 83, 2412, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 1136, 62, 1676, 70, 62, 5219, 63, 16151, 31, 5420, 8, 198, 18076, 453, 11, 198, 532, 685, 63, 3866, 5589, 1133, 63, 16151, 31, 5420, 8, 198, 392, 1981, 685, 63, 69, 22564, 63, 16151, 31, 5420, 8, 50207, 326, 198, 533, 5447, 329, 1123, 2099, 326, 4600, 27363, 62, 83, 2412, 63, 5860, 13, 198, 37811, 198, 31, 45145, 2163, 28462, 62, 12227, 62, 2875, 0, 7, 198, 220, 220, 220, 698, 3712, 45866, 16966, 11, 198, 220, 220, 220, 28462, 11, 198, 220, 220, 220, 1181, 11, 198, 220, 220, 220, 814, 11350, 11, 198, 220, 220, 220, 8718, 26069, 11350, 11, 198, 220, 220, 220, 27506, 11, 198, 220, 220, 220, 256, 11, 198, 8, 198, 220, 220, 220, 4327, 796, 1610, 2821, 90, 12211, 18743, 92, 3419, 198, 220, 220, 220, 4808, 22046, 796, 357, 26, 1181, 11, 27506, 11, 256, 11, 814, 11350, 11, 8718, 26069, 11350, 8, 198, 220, 220, 220, 26498, 796, 20121, 28264, 22046, 11, 357, 3866, 785, 17128, 796, 662, 5589, 1133, 7, 2436, 11, 4808, 22046, 11, 4327, 828, 4008, 628, 220, 220, 220, 3975, 7, 1676, 4593, 15132, 62, 85, 945, 7, 2436, 4008, 466, 1172, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 11, 1438, 796, 651, 62, 1676, 70, 62, 5219, 7, 69, 22564, 11, 1172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 7377, 96, 69, 22564, 274, 7, 1676, 70, 11, 37430, 62, 83, 2412, 7, 1676, 70, 11, 698, 11, 4327, 828, 698, 11, 26498, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 26745, 0, 7, 7785, 11, 1438, 11, 1188, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2723, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 698, 3712, 45866, 16966, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2723, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 814, 11350, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 27506, 3712, 53, 945, 11, 198, 220, 220, 220, 220, 220, 220, 220, 256, 3712, 15633, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4571, 3712, 35, 4154, 11, 198, 220, 220, 220, 1267, 198, 198, 7293, 1769, 357, 392, 11156, 829, 8, 2723, 2846, 4600, 50, 7, 56, 8, 63, 287, 25, 198, 198, 15506, 63, 198, 24861, 224, 56, 198, 438, 1343, 18872, 229, 5595, 376, 126, 117, 7, 56, 8, 1343, 18872, 229, 5595, 376, 31185, 7, 56, 11, 38, 8, 796, 311, 7, 56, 11, 402, 828, 220, 220, 220, 220, 402, 796, 18872, 229, 56, 198, 24861, 224, 83, 198, 15506, 63, 198, 198, 1890, 428, 2121, 1891, 284, 670, 11, 1811, 5050, 1276, 307, 5447, 25, 198, 532, 685, 63, 1676, 4593, 15132, 62, 85, 945, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 27363, 62, 83, 2412, 63, 16151, 31, 5420, 8, 198, 532, 685, 63, 1136, 62, 1676, 70, 62, 5219, 63, 16151, 31, 5420, 8, 198, 18076, 453, 11, 198, 532, 685, 63, 3866, 5589, 1133, 63, 16151, 31, 5420, 8, 198, 392, 1981, 685, 63, 10459, 63, 16151, 31, 5420, 8, 50207, 326, 198, 533, 5447, 329, 1123, 2099, 326, 4600, 27363, 62, 83, 2412, 63, 5860, 13, 198, 37811, 198, 8818, 2723, 0, 7, 2436, 3712, 45866, 16966, 11, 2723, 11, 1181, 11, 814, 11350, 11, 27506, 11, 256, 11, 4571, 8, 198, 220, 220, 220, 4327, 796, 8090, 3419, 198, 220, 220, 220, 4808, 22046, 796, 357, 26, 1181, 11, 27506, 11, 256, 11, 4571, 11, 814, 11350, 8, 198, 220, 220, 220, 26498, 796, 20121, 28264, 22046, 11, 357, 3866, 785, 17128, 796, 662, 5589, 1133, 7, 2436, 11, 4808, 22046, 11, 4327, 828, 4008, 628, 220, 220, 220, 3975, 7, 1676, 4593, 15132, 62, 85, 945, 7, 2436, 4008, 466, 1172, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 11, 1438, 796, 651, 62, 1676, 70, 62, 5219, 7, 10459, 11, 1172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 7377, 96, 82, 2203, 7, 1676, 70, 11, 37430, 62, 83, 2412, 7, 1676, 70, 11, 698, 11, 4327, 828, 698, 11, 26498, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 26745, 0, 7, 7785, 11, 1438, 11, 1188, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2147, 198, 437, 198 ]
2.197137
1,537
<gh_stars>0 passwordMatcher = r"(\d*)-(\d*) (.): (\w*)" validPasswords = 0 for line in eachline() result = match(passwordMatcher, line) min = parse(Int32, result[1]) max = parse(Int32, result[2]) count = 0 for match in eachmatch(Regex(result[3]), result[4]) count += 1 end if count >= min && count <= max global validPasswords += 1 end end println(validPasswords)
[ 27, 456, 62, 30783, 29, 15, 198, 28712, 19044, 2044, 796, 374, 18109, 59, 67, 9, 13219, 38016, 67, 28104, 357, 47308, 357, 59, 86, 9, 16725, 198, 198, 12102, 14478, 10879, 796, 657, 198, 1640, 1627, 287, 1123, 1370, 3419, 198, 220, 220, 220, 1255, 796, 2872, 7, 28712, 19044, 2044, 11, 1627, 8, 198, 220, 220, 220, 949, 796, 21136, 7, 5317, 2624, 11, 1255, 58, 16, 12962, 198, 220, 220, 220, 3509, 796, 21136, 7, 5317, 2624, 11, 1255, 58, 17, 12962, 628, 220, 220, 220, 954, 796, 657, 198, 220, 220, 220, 329, 2872, 287, 1123, 15699, 7, 3041, 25636, 7, 20274, 58, 18, 46570, 1255, 58, 19, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 954, 15853, 352, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 954, 18189, 949, 11405, 954, 19841, 3509, 198, 220, 220, 220, 220, 220, 220, 220, 3298, 4938, 14478, 10879, 15853, 352, 198, 220, 220, 220, 886, 198, 437, 198, 198, 35235, 7, 12102, 14478, 10879, 8 ]
2.441176
170
## Functions for centered moments of moments feature maps #const m1s2 = [1,2,3,4,5]; const m2lim2 = 10; function apply_mofm_full(X::Array{Float64}, rowcounts::Int64, mom::StatisticalMoments,options) lenresponse = length(mom.moments[1]); momnums = options.aux; s=size(momnums); count =1; i =1; if(length(s)==1) for i in momnums mm = mom.moments[i]; for j = 1:m2lim2 X[rowcounts,count] = get_moment_vec(mm,j); count = count +1; end end else for mm in mom.moments for j = 1:m2lim2 if(options.aux[i,j]==1) X[rowcounts,count] = get_moment_vec(mm,j); count = count +1; end end i = i +1; end end end function get_num_mofm__full_features(mom::StatisticalMoments, options) s=size(options.aux); if(length(s)==1) lenresponse = length(options.aux)*m2lim2; else lenresponse = sum(options.aux); end return lenresponse; end # Defines the feature map fmofm_full = FeatureMap(apply_mofm_full,get_num_mofm__full_features, "mofm_full_map"); #"returns the mom_num-th moment of resps, where resps is a vector whose elements can be either numbers or vectors." function get_moment_vec(resps, mom_num) mu = mean(resps); if(mom_num==1) return mu end; num_sim = length(resps); if(num_sim<2) println("Not enough simulations to calculate momments, return zeros") return 0.0*mu end moment = sum((mu - r).^mom_num for r in resps)./(num_sim-1.0) return sign(moment).*abs(moment).^(1.0/mom_num) # I think the sign does make a difference, as it changes with different labels end
[ 2235, 40480, 329, 19254, 7188, 286, 7188, 3895, 8739, 198, 2, 9979, 285, 16, 82, 17, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11208, 198, 9979, 285, 17, 2475, 17, 796, 838, 26, 198, 8818, 4174, 62, 76, 1659, 76, 62, 12853, 7, 55, 3712, 19182, 90, 43879, 2414, 5512, 5752, 9127, 82, 3712, 5317, 2414, 11, 1995, 3712, 17126, 19929, 29252, 658, 11, 25811, 8, 198, 220, 220, 18896, 26209, 796, 4129, 7, 32542, 13, 32542, 658, 58, 16, 36563, 198, 220, 220, 1995, 77, 5700, 796, 3689, 13, 14644, 26, 198, 220, 220, 264, 28, 7857, 7, 32542, 77, 5700, 1776, 198, 220, 220, 954, 796, 16, 26, 1312, 796, 16, 26, 198, 220, 220, 220, 611, 7, 13664, 7, 82, 8, 855, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 1995, 77, 5700, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8085, 220, 796, 1995, 13, 32542, 658, 58, 72, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 76, 17, 2475, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1395, 58, 808, 9127, 82, 11, 9127, 60, 796, 651, 62, 32542, 298, 62, 35138, 7, 3020, 11, 73, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 954, 796, 954, 1343, 16, 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, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 329, 8085, 287, 1995, 13, 32542, 658, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 76, 17, 2475, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7, 25811, 13, 14644, 58, 72, 11, 73, 60, 855, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1395, 58, 808, 9127, 82, 11, 9127, 60, 796, 651, 62, 32542, 298, 62, 35138, 7, 3020, 11, 73, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 954, 796, 954, 1343, 16, 26, 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, 1312, 796, 1312, 1343, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 220, 198, 220, 220, 886, 220, 220, 198, 437, 198, 198, 8818, 651, 62, 22510, 62, 76, 1659, 76, 834, 12853, 62, 40890, 7, 32542, 3712, 17126, 19929, 29252, 658, 11, 3689, 8, 198, 220, 220, 220, 264, 28, 7857, 7, 25811, 13, 14644, 1776, 198, 220, 220, 220, 611, 7, 13664, 7, 82, 8, 855, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18896, 26209, 796, 220, 4129, 7, 25811, 13, 14644, 27493, 76, 17, 2475, 17, 26, 198, 220, 220, 220, 220, 2073, 220, 198, 220, 220, 220, 220, 220, 220, 220, 18896, 26209, 796, 2160, 7, 25811, 13, 14644, 1776, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 18896, 26209, 26, 198, 437, 198, 198, 2, 2896, 1127, 262, 3895, 3975, 198, 38353, 1659, 76, 62, 12853, 796, 27018, 13912, 7, 39014, 62, 76, 1659, 76, 62, 12853, 11, 1136, 62, 22510, 62, 76, 1659, 76, 834, 12853, 62, 40890, 11, 366, 76, 1659, 76, 62, 12853, 62, 8899, 15341, 198, 198, 2, 1, 7783, 82, 262, 220, 1995, 62, 22510, 12, 400, 2589, 286, 581, 862, 11, 810, 581, 862, 318, 257, 15879, 3025, 4847, 460, 307, 2035, 3146, 393, 30104, 526, 198, 8818, 651, 62, 32542, 298, 62, 35138, 7, 411, 862, 11, 1995, 62, 22510, 8, 198, 220, 220, 220, 38779, 796, 1612, 7, 411, 862, 1776, 198, 220, 220, 220, 611, 7, 32542, 62, 22510, 855, 16, 8, 1441, 38779, 886, 26, 198, 220, 220, 220, 997, 62, 14323, 796, 4129, 7, 411, 862, 1776, 198, 220, 220, 220, 611, 7, 22510, 62, 14323, 27, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3673, 1576, 27785, 284, 15284, 1995, 902, 11, 1441, 1976, 27498, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 13, 15, 9, 30300, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2589, 796, 2160, 19510, 30300, 532, 374, 737, 61, 32542, 62, 22510, 329, 374, 287, 581, 862, 737, 29006, 22510, 62, 14323, 12, 16, 13, 15, 8, 198, 220, 220, 220, 1441, 1051, 7, 32542, 298, 737, 9, 8937, 7, 32542, 298, 737, 61, 7, 16, 13, 15, 14, 32542, 62, 22510, 8, 1303, 314, 892, 262, 1051, 857, 787, 257, 3580, 11, 355, 340, 2458, 351, 1180, 14722, 198, 437, 628 ]
2.094899
843
mutable struct WindowState width::Int height::Int end mutable struct MouseState pos::Tuple{Float64,Float64} pressed::Bool scroll::Float64 stale::Bool end MouseState() = MouseState((0.0, 0.0), false, 0.0, true) struct CameraState offset::Vector{Float32} scale::Vector{Float32} end struct GLBox{N} center::NTuple{N,Float32} radius::NTuple{N,Float32} color::NTuple{4,Float32} end struct GLBar1D center::Float32 radius::Float32 height::Float32 end function glGenOne(glGenFn) id = pointer(GLuint[0]) glGenFn(1, id) return unsafe_load(id) end glGenBuffer() = glGenOne(glGenBuffers) glGenVertexArray() = glGenOne(glGenVertexArrays) function setup_mouse_callbacks!(mouse_state, window) mouse_button_callback = let mouse_state = mouse_state (window, button, action, mods) -> begin if (button == GLFW.MOUSE_BUTTON_LEFT && action == GLFW.PRESS) mouse_state.pressed = true end if (button == GLFW.MOUSE_BUTTON_LEFT && action == GLFW.RELEASE) mouse_state.pressed = false end end end cursor_position_callback = let mouse_state = mouse_state (window, xpos, ypos) -> begin mouse_state.pos = (xpos, ypos) mouse_state.stale = false end end scroll_callback = let mouse_state = mouse_state (window, xoffset, yoffset) -> begin mouse_state.scroll += yoffset end end GLFW.SetScrollCallback(window, scroll_callback) GLFW.SetCursorPosCallback(window, cursor_position_callback) GLFW.SetMouseButtonCallback(window, mouse_button_callback) return nothing end function setup_window() GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3) GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 3) GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE) GLFW.WindowHint(GLFW.OPENGL_FORWARD_COMPAT, true) GLFW.WindowHint(GLFW.RESIZABLE, true) window = GLFW.CreateWindow(640, 640, "plot") GLFW.MakeContextCurrent(window) window_state = WindowState(640, 640) framebuffer_size_callback = let window_state = window_state (window, width, height) -> begin window_state.width = width window_state.height = height glViewport(0, 0, width, height) end end GLFW.SetFramebufferSizeCallback(window, framebuffer_size_callback) glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glBlendEquation(GL_FUNC_ADD) return window, window_state end function setup_shader_program(vert, frag) vertex_shader = compile_shader(read(joinpath(@__DIR__, vert), String), GL_VERTEX_SHADER) fragment_shader = compile_shader(read(joinpath(@__DIR__, frag), String), GL_FRAGMENT_SHADER) shader_program = link_program(vertex_shader, fragment_shader) glDeleteShader(vertex_shader) glDeleteShader(fragment_shader) glUseProgram(shader_program) return shader_program end function update_camera2d!(camera_state, window_state, mouse_state, last_pos, last_scroll) m_to_c = xy -> (2.0*xy[1] / window_state.width - 1.0, 1.0 - 2.0*xy[2] / window_state.height) if mouse_state.pressed move_diff = collect(mouse_state.pos .- last_pos) move_diff[2] *= -1 move_diff[1] *= 2.0 / window_state.width move_diff[2] *= 2.0 / window_state.height camera_state.offset .+= move_diff end if mouse_state.scroll != last_scroll yoffset = mouse_state.scroll - last_scroll if yoffset > 0.5 camera_state.scale .*= 1.2 camera_state.offset .-= m_to_c(mouse_state.pos) camera_state.offset .*= 1.2 camera_state.offset .+= m_to_c(mouse_state.pos) elseif yoffset < -0.5 camera_state.scale .*= inv(1.2) camera_state.offset .-= m_to_c(mouse_state.pos) camera_state.offset .*= inv(1.2) camera_state.offset .+= m_to_c(mouse_state.pos) end end camera_state.scale[2] = camera_state.scale[1] * window_state.width / window_state.height return nothing end function plot(boxes::Vector{GLBar1D}) GLFW.WindowHint(GLFW.SAMPLES, 8) window, window_state = setup_window() glEnable(GL_MULTISAMPLE) shader_program = setup_shader_program("bar1d.vert", "bar1d.frag") camera_offset_loc = glGetUniformLocation(shader_program, "camera_offset") camera_scale_loc = glGetUniformLocation(shader_program, "camera_scale") mouse_state = MouseState() setup_mouse_callbacks!(mouse_state, window) vbo = glGenBuffer() glBindBuffer(GL_ARRAY_BUFFER, vbo) glBufferData(GL_ARRAY_BUFFER, sizeof(boxes), boxes, GL_STATIC_DRAW) vao = glGenVertexArray() glBindVertexArray(vao) glVertexAttribPointer(0, 1, GL_FLOAT, GL_FALSE, 12, Ptr{Cvoid}(0)) glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 12, Ptr{Cvoid}(4)) glVertexAttribPointer(2, 1, GL_FLOAT, GL_FALSE, 12, Ptr{Cvoid}(8)) glVertexAttribDivisor(0, 1) glVertexAttribDivisor(1, 1) glVertexAttribDivisor(2, 1) glEnableVertexAttribArray(0) glEnableVertexAttribArray(1) glEnableVertexAttribArray(2) last_pos = mouse_state.pos last_scroll = mouse_state.scroll camera_state = CameraState(Float32[0.0, 0.0], Float32[1.0, 1.0]) while !GLFW.WindowShouldClose(window) update_camera2d!(camera_state, window_state, mouse_state, last_pos, last_scroll) last_pos = mouse_state.pos last_scroll = mouse_state.scroll glUniform1f(camera_offset_loc, camera_state.offset[1]) glUniform1f(camera_scale_loc, camera_state.scale[1]) glClearColor(0.0, 0.0, 0.0, 1.0) glClear(GL_COLOR_BUFFER_BIT) glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, length(boxes)) GLFW.SwapBuffers(window) # change to wait events? GLFW.PollEvents() end GLFW.DestroyWindow(window) return nothing end function plot(boxes::Vector{GLBox{1}}) window, window_state = setup_window() shader_program = setup_shader_program("box1d.vert", "boxnd.frag") camera_offset_loc = glGetUniformLocation(shader_program, "camera_offset") camera_scale_loc = glGetUniformLocation(shader_program, "camera_scale") mouse_state = MouseState() setup_mouse_callbacks!(mouse_state, window) vbo = glGenBuffer() glBindBuffer(GL_ARRAY_BUFFER, vbo) glBufferData(GL_ARRAY_BUFFER, sizeof(boxes), boxes, GL_STATIC_DRAW) vao = glGenVertexArray() glBindVertexArray(vao) glVertexAttribPointer(0, 1, GL_FLOAT, GL_FALSE, 24, Ptr{Cvoid}(0)) glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 24, Ptr{Cvoid}(4)) glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 24, Ptr{Cvoid}(8)) glVertexAttribDivisor(0, 1) glVertexAttribDivisor(1, 1) glVertexAttribDivisor(2, 1) glEnableVertexAttribArray(0) glEnableVertexAttribArray(1) glEnableVertexAttribArray(2) last_pos = mouse_state.pos last_scroll = mouse_state.scroll camera_state = CameraState(Float32[0.0, 0.0], Float32[1.0, 1.0]) while !GLFW.WindowShouldClose(window) update_camera2d!(camera_state, window_state, mouse_state, last_pos, last_scroll) last_pos = mouse_state.pos last_scroll = mouse_state.scroll glUniform1f(camera_offset_loc, camera_state.offset[1]) glUniform1f(camera_scale_loc, camera_state.scale[1]) glClearColor(0.0, 0.0, 0.0, 1.0) glClear(GL_COLOR_BUFFER_BIT) glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, length(boxes)) GLFW.SwapBuffers(window) # change to wait events? GLFW.PollEvents() end GLFW.DestroyWindow(window) return nothing end function plot(boxes::Vector{GLBox{2}}) GLFW.WindowHint(GLFW.SAMPLES, 8) window, window_state = setup_window() glEnable(GL_MULTISAMPLE) shader_program = setup_shader_program("box2d.vert", "boxnd.frag") camera_offset_loc = glGetUniformLocation(shader_program, "camera_offset") camera_scale_loc = glGetUniformLocation(shader_program, "camera_scale") mouse_state = MouseState() setup_mouse_callbacks!(mouse_state, window) vbo = glGenBuffer() glBindBuffer(GL_ARRAY_BUFFER, vbo) glBufferData(GL_ARRAY_BUFFER, sizeof(boxes), boxes, GL_STATIC_DRAW) vao = glGenVertexArray() glBindVertexArray(vao) glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 32, Ptr{Cvoid}(0)) glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 32, Ptr{Cvoid}(8)) glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 32, Ptr{Cvoid}(16)) glVertexAttribDivisor(0, 1) glVertexAttribDivisor(1, 1) glVertexAttribDivisor(2, 1) glEnableVertexAttribArray(0) glEnableVertexAttribArray(1) glEnableVertexAttribArray(2) last_pos = mouse_state.pos last_scroll = mouse_state.scroll camera_state = CameraState(Float32[0.0, 0.0], Float32[1.0, 1.0]) while !GLFW.WindowShouldClose(window) update_camera2d!(camera_state, window_state, mouse_state, last_pos, last_scroll) last_pos = mouse_state.pos last_scroll = mouse_state.scroll glUniform2f(camera_offset_loc, camera_state.offset[1], camera_state.offset[2]) glUniform2f(camera_scale_loc, camera_state.scale[1], camera_state.scale[2]) glClearColor(0.0, 0.0, 0.0, 1.0) glClear(GL_COLOR_BUFFER_BIT) glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, length(boxes)) GLFW.SwapBuffers(window) # change to wait events? GLFW.PollEvents() end GLFW.DestroyWindow(window) return nothing end function projection_matrix(fovy, aspect, zNear, zFar) f = 1.0 / tan(fovy / 2.0) return [ f / aspect 0 0 0; 0 f 0 0; 0 0 (zFar + zNear) / (zNear - zFar) -1; 0 0 (2 * zFar * zNear) / (zNear - zFar) 0; ] end function plot(boxes::Vector{GLBox{3}}) window, window_state = setup_window() shader_program = setup_shader_program("box3d.vert", "boxnd.frag") camera_loc = glGetUniformLocation(shader_program, "camera") mouse_state = MouseState() setup_mouse_callbacks!(mouse_state, window) key_state = Dict{Int,Bool}() key_callback = let key_state = key_state (window, key, scancode, action, mods) -> begin if action == GLFW.PRESS key_state[Int(key)] = true end if action == GLFW.RELEASE key_state[Int(key)] = false end end end GLFW.SetInputMode(window, GLFW.CURSOR, GLFW.CURSOR_DISABLED) GLFW.SetKeyCallback(window, key_callback) # Enable depth test glEnable(GL_DEPTH_TEST) # Accept fragment if it closer to the camera than the former one glDepthFunc(GL_LESS) vbo = glGenBuffer() glBindBuffer(GL_ARRAY_BUFFER, vbo) glBufferData(GL_ARRAY_BUFFER, sizeof(boxes), boxes, GL_STATIC_DRAW) vao = glGenVertexArray() glBindVertexArray(vao) glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 40, Ptr{Cvoid}(0)) glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 40, Ptr{Cvoid}(12)) glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 40, Ptr{Cvoid}(24)) glVertexAttribDivisor(0, 1) glVertexAttribDivisor(1, 1) glVertexAttribDivisor(2, 1) glEnableVertexAttribArray(0) glEnableVertexAttribArray(1) glEnableVertexAttribArray(2) camerafps = CameraFps() last_pos = nothing t = time() while !GLFW.WindowShouldClose(window) next_t = time() dt = 60*(next_t - t) t = next_t if get(key_state, Int(GLFW.KEY_W), false) walk!(camerafps, -0.3*dt) end if get(key_state, Int(GLFW.KEY_A), false) strafe!(camerafps, -0.3*dt) end if get(key_state, Int(GLFW.KEY_S), false) walk!(camerafps, 0.3*dt) end if get(key_state, Int(GLFW.KEY_D), false) strafe!(camerafps, 0.3*dt) end if !mouse_state.stale if last_pos !== nothing yaw!(camerafps, (mouse_state.pos[1] - last_pos[1])*dt / 200.0) end last_pos = mouse_state.pos end camera_mat = projection_matrix(0.87266, window_state.width / window_state.height, 1.0, 1000.0) camera_mat *= view_matrix(camerafps) glUniformMatrix4fv(camera_loc, 1, GL_FALSE, Float32.(camera_mat)) glClearColor(0.0, 0.0, 0.0, 1.0) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 14, length(boxes)) GLFW.SwapBuffers(window) # change to wait events? GLFW.PollEvents() end GLFW.DestroyWindow(window) return nothing end function plot(boxfun::BoxFun) barlist = GLBar1D[] for (key, value) in boxfun.dict box = key_to_box(boxfun.partition, key) push!(barlist, GLBar1D(box.center[1], box.radius[1], value)) end plot(barlist) end
[ 76, 18187, 2878, 26580, 9012, 198, 220, 220, 220, 9647, 3712, 5317, 198, 220, 220, 220, 6001, 3712, 5317, 198, 437, 198, 198, 76, 18187, 2878, 21839, 9012, 198, 220, 220, 220, 1426, 3712, 51, 29291, 90, 43879, 2414, 11, 43879, 2414, 92, 198, 220, 220, 220, 12070, 3712, 33, 970, 198, 220, 220, 220, 10743, 3712, 43879, 2414, 198, 220, 220, 220, 39985, 3712, 33, 970, 198, 437, 198, 198, 39643, 9012, 3419, 796, 21839, 9012, 19510, 15, 13, 15, 11, 657, 13, 15, 828, 3991, 11, 657, 13, 15, 11, 2081, 8, 198, 198, 7249, 20432, 9012, 198, 220, 220, 220, 11677, 3712, 38469, 90, 43879, 2624, 92, 198, 220, 220, 220, 5046, 3712, 38469, 90, 43879, 2624, 92, 198, 437, 198, 198, 7249, 10188, 14253, 90, 45, 92, 198, 220, 220, 220, 3641, 3712, 11251, 29291, 90, 45, 11, 43879, 2624, 92, 198, 220, 220, 220, 16874, 3712, 11251, 29291, 90, 45, 11, 43879, 2624, 92, 198, 220, 220, 220, 3124, 3712, 11251, 29291, 90, 19, 11, 43879, 2624, 92, 198, 437, 198, 198, 7249, 10188, 10374, 16, 35, 198, 220, 220, 220, 3641, 3712, 43879, 2624, 198, 220, 220, 220, 16874, 3712, 43879, 2624, 198, 220, 220, 220, 6001, 3712, 43879, 2624, 198, 437, 198, 198, 8818, 1278, 13746, 3198, 7, 4743, 13746, 37, 77, 8, 198, 220, 220, 220, 4686, 796, 17562, 7, 8763, 28611, 58, 15, 12962, 198, 220, 220, 220, 1278, 13746, 37, 77, 7, 16, 11, 4686, 8, 198, 220, 220, 220, 1441, 21596, 62, 2220, 7, 312, 8, 198, 437, 198, 198, 4743, 13746, 28632, 3419, 796, 1278, 13746, 3198, 7, 4743, 13746, 36474, 364, 8, 198, 4743, 13746, 13414, 16886, 19182, 3419, 796, 1278, 13746, 3198, 7, 4743, 13746, 13414, 16886, 3163, 20477, 8, 198, 198, 8818, 9058, 62, 35888, 62, 13345, 10146, 0, 7, 35888, 62, 5219, 11, 4324, 8, 198, 220, 220, 220, 10211, 62, 16539, 62, 47423, 796, 1309, 10211, 62, 5219, 796, 10211, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 357, 17497, 11, 4936, 11, 2223, 11, 13743, 8, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 16539, 6624, 10188, 24160, 13, 44, 2606, 5188, 62, 47526, 11357, 62, 2538, 9792, 11405, 2223, 6624, 10188, 24160, 13, 32761, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10211, 62, 5219, 13, 45477, 796, 2081, 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, 611, 357, 16539, 6624, 10188, 24160, 13, 44, 2606, 5188, 62, 47526, 11357, 62, 2538, 9792, 11405, 2223, 6624, 10188, 24160, 13, 2200, 22781, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10211, 62, 5219, 13, 45477, 796, 3991, 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, 23493, 62, 9150, 62, 47423, 796, 1309, 10211, 62, 5219, 796, 10211, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 357, 17497, 11, 2124, 1930, 11, 331, 1930, 8, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10211, 62, 5219, 13, 1930, 796, 357, 87, 1930, 11, 331, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10211, 62, 5219, 13, 301, 1000, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10743, 62, 47423, 796, 1309, 10211, 62, 5219, 796, 10211, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 357, 17497, 11, 2124, 28968, 11, 331, 28968, 8, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10211, 62, 5219, 13, 48728, 15853, 331, 28968, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 7248, 29261, 47258, 7, 17497, 11, 10743, 62, 47423, 8, 198, 220, 220, 220, 10188, 24160, 13, 7248, 34, 21471, 21604, 47258, 7, 17497, 11, 23493, 62, 9150, 62, 47423, 8, 198, 220, 220, 220, 10188, 24160, 13, 7248, 39643, 21864, 47258, 7, 17497, 11, 10211, 62, 16539, 62, 47423, 8, 628, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 9058, 62, 17497, 3419, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 10943, 32541, 62, 43717, 62, 5673, 41, 1581, 11, 513, 8, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 10943, 32541, 62, 43717, 62, 23678, 1581, 11, 513, 8, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 3185, 1677, 8763, 62, 31190, 25664, 11, 10188, 24160, 13, 3185, 1677, 8763, 62, 34, 6965, 62, 31190, 25664, 8, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 3185, 1677, 8763, 62, 13775, 39743, 62, 9858, 47, 1404, 11, 2081, 8, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 19535, 14887, 17534, 11, 2081, 8, 628, 220, 220, 220, 4324, 796, 10188, 24160, 13, 16447, 27703, 7, 31102, 11, 33759, 11, 366, 29487, 4943, 198, 220, 220, 220, 10188, 24160, 13, 12050, 21947, 11297, 7, 17497, 8, 628, 220, 220, 220, 4324, 62, 5219, 796, 26580, 9012, 7, 31102, 11, 33759, 8, 628, 220, 220, 220, 5739, 22252, 62, 7857, 62, 47423, 796, 1309, 4324, 62, 5219, 796, 4324, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 357, 17497, 11, 9647, 11, 6001, 8, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4324, 62, 5219, 13, 10394, 796, 9647, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4324, 62, 5219, 13, 17015, 796, 6001, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1278, 7680, 634, 7, 15, 11, 657, 11, 9647, 11, 6001, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 7248, 19778, 22252, 10699, 47258, 7, 17497, 11, 5739, 22252, 62, 7857, 62, 47423, 8, 628, 220, 220, 220, 1278, 36695, 7, 8763, 62, 9148, 10619, 8, 198, 220, 220, 220, 1278, 3629, 437, 37, 19524, 7, 8763, 62, 50, 7397, 62, 1847, 47, 7801, 11, 10188, 62, 11651, 62, 23678, 2937, 62, 50, 7397, 62, 1847, 47, 7801, 8, 198, 220, 220, 220, 1278, 3629, 437, 23588, 341, 7, 8763, 62, 42296, 34, 62, 29266, 8, 628, 220, 220, 220, 1441, 4324, 11, 4324, 62, 5219, 198, 437, 198, 198, 8818, 9058, 62, 1477, 5067, 62, 23065, 7, 1851, 11, 7956, 8, 198, 220, 220, 220, 37423, 62, 1477, 5067, 796, 17632, 62, 1477, 5067, 7, 961, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 9421, 828, 10903, 828, 10188, 62, 15858, 6369, 62, 9693, 2885, 1137, 8, 198, 220, 220, 220, 24225, 62, 1477, 5067, 796, 17632, 62, 1477, 5067, 7, 961, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 7956, 828, 10903, 828, 10188, 62, 37, 33202, 10979, 62, 9693, 2885, 1137, 8, 198, 220, 220, 220, 33030, 62, 23065, 796, 2792, 62, 23065, 7, 332, 16886, 62, 1477, 5067, 11, 24225, 62, 1477, 5067, 8, 628, 220, 220, 220, 1278, 38727, 2484, 5067, 7, 332, 16886, 62, 1477, 5067, 8, 198, 220, 220, 220, 1278, 38727, 2484, 5067, 7, 8310, 363, 434, 62, 1477, 5067, 8, 198, 220, 220, 220, 1278, 11041, 15167, 7, 1477, 5067, 62, 23065, 8, 628, 220, 220, 220, 1441, 33030, 62, 23065, 198, 437, 198, 198, 8818, 4296, 62, 25695, 17, 67, 0, 7, 25695, 62, 5219, 11, 4324, 62, 5219, 11, 10211, 62, 5219, 11, 938, 62, 1930, 11, 938, 62, 48728, 8, 198, 220, 220, 220, 285, 62, 1462, 62, 66, 796, 2124, 88, 4613, 357, 17, 13, 15, 9, 5431, 58, 16, 60, 1220, 4324, 62, 5219, 13, 10394, 532, 352, 13, 15, 11, 352, 13, 15, 532, 362, 13, 15, 9, 5431, 58, 17, 60, 1220, 4324, 62, 5219, 13, 17015, 8, 628, 220, 220, 220, 611, 10211, 62, 5219, 13, 45477, 198, 220, 220, 220, 220, 220, 220, 220, 1445, 62, 26069, 796, 2824, 7, 35888, 62, 5219, 13, 1930, 764, 12, 938, 62, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1445, 62, 26069, 58, 17, 60, 1635, 28, 532, 16, 628, 220, 220, 220, 220, 220, 220, 220, 1445, 62, 26069, 58, 16, 60, 1635, 28, 362, 13, 15, 1220, 4324, 62, 5219, 13, 10394, 198, 220, 220, 220, 220, 220, 220, 220, 1445, 62, 26069, 58, 17, 60, 1635, 28, 362, 13, 15, 1220, 4324, 62, 5219, 13, 17015, 628, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 47932, 1445, 62, 26069, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 10211, 62, 5219, 13, 48728, 14512, 938, 62, 48728, 198, 220, 220, 220, 220, 220, 220, 220, 331, 28968, 796, 10211, 62, 5219, 13, 48728, 532, 938, 62, 48728, 628, 220, 220, 220, 220, 220, 220, 220, 611, 331, 28968, 1875, 657, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 9888, 764, 9, 28, 352, 13, 17, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 12, 28, 285, 62, 1462, 62, 66, 7, 35888, 62, 5219, 13, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 9, 28, 352, 13, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 47932, 285, 62, 1462, 62, 66, 7, 35888, 62, 5219, 13, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 331, 28968, 1279, 532, 15, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 9888, 764, 9, 28, 800, 7, 16, 13, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 12, 28, 285, 62, 1462, 62, 66, 7, 35888, 62, 5219, 13, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 9, 28, 800, 7, 16, 13, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 5219, 13, 28968, 764, 47932, 285, 62, 1462, 62, 66, 7, 35888, 62, 5219, 13, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 4676, 62, 5219, 13, 9888, 58, 17, 60, 796, 4676, 62, 5219, 13, 9888, 58, 16, 60, 1635, 4324, 62, 5219, 13, 10394, 1220, 4324, 62, 5219, 13, 17015, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7110, 7, 29305, 3712, 38469, 90, 8763, 10374, 16, 35, 30072, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 49302, 6489, 1546, 11, 807, 8, 628, 220, 220, 220, 4324, 11, 4324, 62, 5219, 796, 9058, 62, 17497, 3419, 628, 220, 220, 220, 1278, 36695, 7, 8763, 62, 44, 16724, 1797, 2390, 16437, 8, 628, 220, 220, 220, 33030, 62, 23065, 796, 9058, 62, 1477, 5067, 62, 23065, 7203, 5657, 16, 67, 13, 1851, 1600, 366, 5657, 16, 67, 13, 8310, 363, 4943, 628, 220, 220, 220, 4676, 62, 28968, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 28968, 4943, 198, 220, 220, 220, 4676, 62, 9888, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 9888, 4943, 628, 220, 220, 220, 10211, 62, 5219, 796, 21839, 9012, 3419, 198, 220, 220, 220, 9058, 62, 35888, 62, 13345, 10146, 0, 7, 35888, 62, 5219, 11, 4324, 8, 628, 220, 220, 220, 410, 2127, 796, 1278, 13746, 28632, 3419, 198, 220, 220, 220, 1278, 36180, 28632, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 410, 2127, 8, 198, 220, 220, 220, 1278, 28632, 6601, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 39364, 7, 29305, 828, 10559, 11, 10188, 62, 35744, 2149, 62, 35, 20530, 8, 628, 220, 220, 220, 410, 5488, 796, 1278, 13746, 13414, 16886, 19182, 3419, 198, 220, 220, 220, 1278, 36180, 13414, 16886, 19182, 7, 85, 5488, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 15, 11, 352, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1105, 11, 350, 2213, 90, 34, 19382, 92, 7, 15, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 16, 11, 352, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1105, 11, 350, 2213, 90, 34, 19382, 92, 7, 19, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 17, 11, 352, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1105, 11, 350, 2213, 90, 34, 19382, 92, 7, 23, 4008, 628, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 15, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 16, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 17, 11, 352, 8, 628, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 15, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 16, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 17, 8, 628, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 4676, 62, 5219, 796, 20432, 9012, 7, 43879, 2624, 58, 15, 13, 15, 11, 657, 13, 15, 4357, 48436, 2624, 58, 16, 13, 15, 11, 352, 13, 15, 12962, 628, 220, 220, 220, 981, 5145, 8763, 24160, 13, 27703, 19926, 26125, 7, 17497, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 25695, 17, 67, 0, 7, 25695, 62, 5219, 11, 4324, 62, 5219, 11, 10211, 62, 5219, 11, 938, 62, 1930, 11, 938, 62, 48728, 8, 628, 220, 220, 220, 220, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 16, 69, 7, 25695, 62, 28968, 62, 17946, 11, 4676, 62, 5219, 13, 28968, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 16, 69, 7, 25695, 62, 9888, 62, 17946, 11, 4676, 62, 5219, 13, 9888, 58, 16, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 10258, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 11, 352, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 7, 8763, 62, 46786, 62, 19499, 45746, 62, 26094, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 25302, 3163, 20477, 6310, 2903, 7, 8763, 62, 5446, 40, 15567, 2538, 62, 37, 1565, 11, 657, 11, 604, 11, 4129, 7, 29305, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 10462, 499, 36474, 364, 7, 17497, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1487, 284, 4043, 2995, 30, 198, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 39176, 37103, 3419, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 49174, 27703, 7, 17497, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7110, 7, 29305, 3712, 38469, 90, 8763, 14253, 90, 16, 11709, 8, 198, 220, 220, 220, 4324, 11, 4324, 62, 5219, 796, 9058, 62, 17497, 3419, 628, 220, 220, 220, 33030, 62, 23065, 796, 9058, 62, 1477, 5067, 62, 23065, 7203, 3524, 16, 67, 13, 1851, 1600, 366, 3524, 358, 13, 8310, 363, 4943, 628, 220, 220, 220, 4676, 62, 28968, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 28968, 4943, 198, 220, 220, 220, 4676, 62, 9888, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 9888, 4943, 628, 220, 220, 220, 10211, 62, 5219, 796, 21839, 9012, 3419, 198, 220, 220, 220, 9058, 62, 35888, 62, 13345, 10146, 0, 7, 35888, 62, 5219, 11, 4324, 8, 628, 220, 220, 220, 410, 2127, 796, 1278, 13746, 28632, 3419, 198, 220, 220, 220, 1278, 36180, 28632, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 410, 2127, 8, 198, 220, 220, 220, 1278, 28632, 6601, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 39364, 7, 29305, 828, 10559, 11, 10188, 62, 35744, 2149, 62, 35, 20530, 8, 628, 220, 220, 220, 410, 5488, 796, 1278, 13746, 13414, 16886, 19182, 3419, 198, 220, 220, 220, 1278, 36180, 13414, 16886, 19182, 7, 85, 5488, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 15, 11, 352, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1987, 11, 350, 2213, 90, 34, 19382, 92, 7, 15, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 16, 11, 352, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1987, 11, 350, 2213, 90, 34, 19382, 92, 7, 19, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 17, 11, 604, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 1987, 11, 350, 2213, 90, 34, 19382, 92, 7, 23, 4008, 628, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 15, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 16, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 17, 11, 352, 8, 628, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 15, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 16, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 17, 8, 628, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 4676, 62, 5219, 796, 20432, 9012, 7, 43879, 2624, 58, 15, 13, 15, 11, 657, 13, 15, 4357, 48436, 2624, 58, 16, 13, 15, 11, 352, 13, 15, 12962, 628, 220, 220, 220, 981, 5145, 8763, 24160, 13, 27703, 19926, 26125, 7, 17497, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 25695, 17, 67, 0, 7, 25695, 62, 5219, 11, 4324, 62, 5219, 11, 10211, 62, 5219, 11, 938, 62, 1930, 11, 938, 62, 48728, 8, 628, 220, 220, 220, 220, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 16, 69, 7, 25695, 62, 28968, 62, 17946, 11, 4676, 62, 5219, 13, 28968, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 16, 69, 7, 25695, 62, 9888, 62, 17946, 11, 4676, 62, 5219, 13, 9888, 58, 16, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 10258, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 11, 352, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 7, 8763, 62, 46786, 62, 19499, 45746, 62, 26094, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 25302, 3163, 20477, 6310, 2903, 7, 8763, 62, 5446, 40, 15567, 2538, 62, 37, 1565, 11, 657, 11, 604, 11, 4129, 7, 29305, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 10462, 499, 36474, 364, 7, 17497, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1487, 284, 4043, 2995, 30, 198, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 39176, 37103, 3419, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 49174, 27703, 7, 17497, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7110, 7, 29305, 3712, 38469, 90, 8763, 14253, 90, 17, 11709, 8, 198, 220, 220, 220, 10188, 24160, 13, 27703, 39, 600, 7, 8763, 24160, 13, 49302, 6489, 1546, 11, 807, 8, 628, 220, 220, 220, 4324, 11, 4324, 62, 5219, 796, 9058, 62, 17497, 3419, 628, 220, 220, 220, 1278, 36695, 7, 8763, 62, 44, 16724, 1797, 2390, 16437, 8, 628, 220, 220, 220, 33030, 62, 23065, 796, 9058, 62, 1477, 5067, 62, 23065, 7203, 3524, 17, 67, 13, 1851, 1600, 366, 3524, 358, 13, 8310, 363, 4943, 628, 220, 220, 220, 4676, 62, 28968, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 28968, 4943, 198, 220, 220, 220, 4676, 62, 9888, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 62, 9888, 4943, 628, 220, 220, 220, 10211, 62, 5219, 796, 21839, 9012, 3419, 198, 220, 220, 220, 9058, 62, 35888, 62, 13345, 10146, 0, 7, 35888, 62, 5219, 11, 4324, 8, 628, 220, 220, 220, 410, 2127, 796, 1278, 13746, 28632, 3419, 198, 220, 220, 220, 1278, 36180, 28632, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 410, 2127, 8, 198, 220, 220, 220, 1278, 28632, 6601, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 39364, 7, 29305, 828, 10559, 11, 10188, 62, 35744, 2149, 62, 35, 20530, 8, 628, 220, 220, 220, 410, 5488, 796, 1278, 13746, 13414, 16886, 19182, 3419, 198, 220, 220, 220, 1278, 36180, 13414, 16886, 19182, 7, 85, 5488, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 15, 11, 362, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 3933, 11, 350, 2213, 90, 34, 19382, 92, 7, 15, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 16, 11, 362, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 3933, 11, 350, 2213, 90, 34, 19382, 92, 7, 23, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 17, 11, 604, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 3933, 11, 350, 2213, 90, 34, 19382, 92, 7, 1433, 4008, 628, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 15, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 16, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 17, 11, 352, 8, 628, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 15, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 16, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 17, 8, 628, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 4676, 62, 5219, 796, 20432, 9012, 7, 43879, 2624, 58, 15, 13, 15, 11, 657, 13, 15, 4357, 48436, 2624, 58, 16, 13, 15, 11, 352, 13, 15, 12962, 628, 220, 220, 220, 981, 5145, 8763, 24160, 13, 27703, 19926, 26125, 7, 17497, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 25695, 17, 67, 0, 7, 25695, 62, 5219, 11, 4324, 62, 5219, 11, 10211, 62, 5219, 11, 938, 62, 1930, 11, 938, 62, 48728, 8, 628, 220, 220, 220, 220, 220, 220, 220, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 938, 62, 48728, 796, 10211, 62, 5219, 13, 48728, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 17, 69, 7, 25695, 62, 28968, 62, 17946, 11, 4676, 62, 5219, 13, 28968, 58, 16, 4357, 4676, 62, 5219, 13, 28968, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 17, 69, 7, 25695, 62, 9888, 62, 17946, 11, 4676, 62, 5219, 13, 9888, 58, 16, 4357, 4676, 62, 5219, 13, 9888, 58, 17, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 10258, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 11, 352, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 7, 8763, 62, 46786, 62, 19499, 45746, 62, 26094, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 25302, 3163, 20477, 6310, 2903, 7, 8763, 62, 5446, 40, 15567, 2538, 62, 37, 1565, 11, 657, 11, 604, 11, 4129, 7, 29305, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 10462, 499, 36474, 364, 7, 17497, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1487, 284, 4043, 2995, 30, 198, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 39176, 37103, 3419, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 49174, 27703, 7, 17497, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 20128, 62, 6759, 8609, 7, 69, 27796, 11, 4843, 11, 1976, 40640, 11, 1976, 21428, 8, 198, 220, 220, 220, 277, 796, 352, 13, 15, 1220, 25706, 7, 69, 27796, 1220, 362, 13, 15, 8, 628, 220, 220, 220, 1441, 685, 198, 220, 220, 220, 220, 220, 220, 220, 277, 1220, 4843, 657, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 357, 89, 21428, 1343, 1976, 40640, 8, 1220, 357, 89, 40640, 532, 1976, 21428, 8, 220, 220, 220, 220, 532, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 357, 17, 1635, 1976, 21428, 1635, 1976, 40640, 8, 1220, 357, 89, 40640, 532, 1976, 21428, 8, 220, 657, 26, 198, 220, 220, 220, 2361, 198, 437, 198, 198, 8818, 7110, 7, 29305, 3712, 38469, 90, 8763, 14253, 90, 18, 11709, 8, 198, 220, 220, 220, 4324, 11, 4324, 62, 5219, 796, 9058, 62, 17497, 3419, 628, 220, 220, 220, 33030, 62, 23065, 796, 9058, 62, 1477, 5067, 62, 23065, 7203, 3524, 18, 67, 13, 1851, 1600, 366, 3524, 358, 13, 8310, 363, 4943, 628, 220, 220, 220, 4676, 62, 17946, 796, 1278, 3855, 3118, 6933, 14749, 7, 1477, 5067, 62, 23065, 11, 366, 25695, 4943, 628, 220, 220, 220, 10211, 62, 5219, 796, 21839, 9012, 3419, 198, 220, 220, 220, 9058, 62, 35888, 62, 13345, 10146, 0, 7, 35888, 62, 5219, 11, 4324, 8, 628, 220, 220, 220, 1994, 62, 5219, 796, 360, 713, 90, 5317, 11, 33, 970, 92, 3419, 628, 220, 220, 220, 1994, 62, 47423, 796, 1309, 1994, 62, 5219, 796, 1994, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 357, 17497, 11, 1994, 11, 629, 1192, 1098, 11, 2223, 11, 13743, 8, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2223, 6624, 10188, 24160, 13, 32761, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1994, 62, 5219, 58, 5317, 7, 2539, 15437, 796, 2081, 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, 611, 2223, 6624, 10188, 24160, 13, 2200, 22781, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1994, 62, 5219, 58, 5317, 7, 2539, 15437, 796, 3991, 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, 10188, 24160, 13, 7248, 20560, 19076, 7, 17497, 11, 10188, 24160, 13, 34, 4261, 50, 1581, 11, 10188, 24160, 13, 34, 4261, 50, 1581, 62, 26288, 6242, 30465, 8, 198, 220, 220, 220, 10188, 24160, 13, 7248, 9218, 47258, 7, 17497, 11, 1994, 62, 47423, 8, 628, 220, 220, 220, 1303, 27882, 6795, 1332, 198, 220, 220, 220, 1278, 36695, 7, 8763, 62, 46162, 4221, 62, 51, 6465, 8, 198, 220, 220, 220, 1303, 21699, 24225, 611, 340, 5699, 284, 262, 4676, 621, 262, 1966, 530, 198, 220, 220, 220, 1278, 48791, 37, 19524, 7, 8763, 62, 48481, 8, 628, 220, 220, 220, 410, 2127, 796, 1278, 13746, 28632, 3419, 198, 220, 220, 220, 1278, 36180, 28632, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 410, 2127, 8, 198, 220, 220, 220, 1278, 28632, 6601, 7, 8763, 62, 1503, 30631, 62, 19499, 45746, 11, 39364, 7, 29305, 828, 10559, 11, 10188, 62, 35744, 2149, 62, 35, 20530, 8, 628, 220, 220, 220, 410, 5488, 796, 1278, 13746, 13414, 16886, 19182, 3419, 198, 220, 220, 220, 1278, 36180, 13414, 16886, 19182, 7, 85, 5488, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 15, 11, 513, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 2319, 11, 350, 2213, 90, 34, 19382, 92, 7, 15, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 16, 11, 513, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 2319, 11, 350, 2213, 90, 34, 19382, 92, 7, 1065, 4008, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 18833, 3849, 7, 17, 11, 604, 11, 10188, 62, 3697, 46, 1404, 11, 10188, 62, 37, 23719, 11, 2319, 11, 350, 2213, 90, 34, 19382, 92, 7, 1731, 4008, 628, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 15, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 16, 11, 352, 8, 198, 220, 220, 220, 1278, 13414, 16886, 8086, 822, 24095, 271, 273, 7, 17, 11, 352, 8, 628, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 15, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 16, 8, 198, 220, 220, 220, 1278, 36695, 13414, 16886, 8086, 822, 19182, 7, 17, 8, 628, 220, 220, 220, 3676, 1878, 862, 796, 20432, 37, 862, 3419, 628, 220, 220, 220, 938, 62, 1930, 796, 2147, 628, 220, 220, 220, 256, 796, 640, 3419, 628, 220, 220, 220, 981, 5145, 8763, 24160, 13, 27703, 19926, 26125, 7, 17497, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 83, 796, 640, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 3126, 9, 7, 19545, 62, 83, 532, 256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 256, 796, 1306, 62, 83, 628, 220, 220, 220, 220, 220, 220, 220, 611, 651, 7, 2539, 62, 5219, 11, 2558, 7, 8763, 24160, 13, 20373, 62, 54, 828, 3991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2513, 0, 7, 66, 2382, 1878, 862, 11, 532, 15, 13, 18, 9, 28664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 651, 7, 2539, 62, 5219, 11, 2558, 7, 8763, 24160, 13, 20373, 62, 32, 828, 3991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3534, 5036, 0, 7, 66, 2382, 1878, 862, 11, 532, 15, 13, 18, 9, 28664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 651, 7, 2539, 62, 5219, 11, 2558, 7, 8763, 24160, 13, 20373, 62, 50, 828, 3991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2513, 0, 7, 66, 2382, 1878, 862, 11, 657, 13, 18, 9, 28664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 651, 7, 2539, 62, 5219, 11, 2558, 7, 8763, 24160, 13, 20373, 62, 35, 828, 3991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3534, 5036, 0, 7, 66, 2382, 1878, 862, 11, 657, 13, 18, 9, 28664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 35888, 62, 5219, 13, 301, 1000, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 938, 62, 1930, 5145, 855, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 707, 0, 7, 66, 2382, 1878, 862, 11, 357, 35888, 62, 5219, 13, 1930, 58, 16, 60, 532, 938, 62, 1930, 58, 16, 12962, 9, 28664, 1220, 939, 13, 15, 8, 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, 938, 62, 1930, 796, 10211, 62, 5219, 13, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 6759, 796, 20128, 62, 6759, 8609, 7, 15, 13, 5774, 25540, 11, 4324, 62, 5219, 13, 10394, 1220, 4324, 62, 5219, 13, 17015, 11, 352, 13, 15, 11, 8576, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4676, 62, 6759, 1635, 28, 1570, 62, 6759, 8609, 7, 66, 2382, 1878, 862, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 3118, 6933, 46912, 19, 69, 85, 7, 25695, 62, 17946, 11, 352, 11, 10188, 62, 37, 23719, 11, 48436, 2624, 12195, 25695, 62, 6759, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 10258, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 11, 352, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 19856, 7, 8763, 62, 46786, 62, 19499, 45746, 62, 26094, 930, 10188, 62, 46162, 4221, 62, 19499, 45746, 62, 26094, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1278, 25302, 3163, 20477, 6310, 2903, 7, 8763, 62, 5446, 40, 15567, 2538, 62, 18601, 4061, 11, 657, 11, 1478, 11, 4129, 7, 29305, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 10462, 499, 36474, 364, 7, 17497, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1487, 284, 4043, 2995, 30, 198, 220, 220, 220, 220, 220, 220, 220, 10188, 24160, 13, 39176, 37103, 3419, 198, 220, 220, 220, 886, 628, 220, 220, 220, 10188, 24160, 13, 49174, 27703, 7, 17497, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7110, 7, 3524, 12543, 3712, 14253, 24629, 8, 198, 220, 220, 220, 2318, 4868, 796, 10188, 10374, 16, 35, 21737, 628, 220, 220, 220, 329, 357, 2539, 11, 1988, 8, 287, 3091, 12543, 13, 11600, 198, 220, 220, 220, 220, 220, 220, 220, 3091, 796, 1994, 62, 1462, 62, 3524, 7, 3524, 12543, 13, 3911, 653, 11, 1994, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 5657, 4868, 11, 10188, 10374, 16, 35, 7, 3524, 13, 16159, 58, 16, 4357, 3091, 13, 42172, 58, 16, 4357, 1988, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 7110, 7, 5657, 4868, 8, 198, 437, 198 ]
2.171792
6,048
module CodeInfoTools using Core: CodeInfo import Base: iterate, push!, pushfirst!, insert!, delete!, getindex, lastindex, setindex!, display, +, length, identity import Base: show ##### ##### Exports ##### export var, Variable, Canvas, renumber, code_info, finish, get_slot ##### ##### Utilities ##### const Variable = Core.SSAValue var(id::Int) = Variable(id) Base.:(+)(v::Variable, id::Int) = Variable(v.id + id) Base.:(+)(id::Int, v::Variable) = Variable(v.id + id) function code_info(f, tt; generated=true, debuginfo=:default) ir = code_lowered(f, tt; generated=generated, debuginfo=:default) isempty(ir) && return nothing return ir[1] end function get_slot(ci::CodeInfo, s::Symbol) ind = findfirst(el -> el == s, ci.slotnames) ind == nothing && return return Core.Compiler.SlotNumber(ind) end @doc( """ code_info(f, tt; generate = true, debuginfo = :default) Return lowered code for function `f` with tuple type `tt`. Equivalent to `InteractiveUtils.@code_lowered` -- but a function call and requires a tuple type `tt` as input. """, code_info) walk(fn, x) = fn(x) walk(fn, x::Variable) = fn(x) walk(fn, x::Core.ReturnNode) = Core.ReturnNode(walk(fn, x.val)) walk(fn, x::Core.GotoNode) = Core.GotoNode(walk(fn, x.label)) walk(fn, x::Core.GotoIfNot) = Core.GotoIfNot(walk(fn, x.cond), walk(fn, x.dest)) walk(fn, x::Expr) = Expr(x.head, map(a -> walk(fn, a), x.args)...) function walk(fn, x::Vector) map(x) do el walk(fn, el) end end resolve(x) = x resolve(gr::GlobalRef) = getproperty(gr.mod, gr.name) ##### ##### Canvas ##### struct Canvas defs::Vector{Tuple{Int, Int}} code::Vector{Any} codelocs::Vector{Int32} end Canvas() = Canvas(Tuple{Int, Int}[], Any[], Int32[]) @doc( """ ```julia struct Canvas defs::Vector{Int} code::Vector{Any} codelocs::Vector{Int32} end Canvas() = Canvas(Int[], Any[], Int32[]) ``` A `Vector`-like abstraction for `Core` code nodes. Properties to keep in mind: 1. Insertion anywhere is slow. 2. Pushing to beginning is slow. 2. Pushing to end is fast. 3. Deletion is fast. 4. Accessing elements is fast. 5. Setting elements is fast. 6. Calling `renumber` must walk the entire `Canvas` instance to update SSA values -- slow. Thus, if you build up a `Canvas` instance incrementally, everything should be fast. """, Canvas) length(c::Canvas) = length(filter(x -> x[2] > 0, c.defs)) function getindex(c::Canvas, idx::Int) r, ind = c.defs[idx] @assert ind > 0 getindex(c.code, r) end getindex(c::Canvas, v::Variable) = getindex(c, v.id) function push!(c::Canvas, stmt) push!(c.code, stmt) push!(c.codelocs, Int32(1)) l = length(c.defs) + 1 push!(c.defs, (l, l)) return Variable(length(c.defs)) end function insert!(c::Canvas, idx::Int, x) r, ind = c.defs[idx] @assert(ind > 0) push!(c.code, x) push!(c.codelocs, Int32(1)) for i in 1 : length(c.defs) r, k = c.defs[i] if k > 0 && k >= ind c.defs[i] = (r, k + 1) end end push!(c.defs, (length(c.defs) + 1, ind)) return Variable(length(c.defs)) end insert!(c::Canvas, v::Variable, x) = insert!(c, v.id, x) pushfirst!(c::Canvas, x) = insert!(c, 1, x) setindex!(c::Canvas, x, v::Int) = setindex!(c.code, x, v) setindex!(c::Canvas, x, v::Variable) = setindex!(c, x, v.id) function delete!(c::Canvas, idx::Int) c.code[idx] = nothing c.defs[idx] = (idx, -1) end delete!(c::Canvas, v::Variable) = delete!(c, v.id) _get(d::Dict, c, k) = c _get(d::Dict, c::Variable, k) = haskey(d, c.id) ? Variable(getindex(d, c.id)) : nothing function renumber(c::Canvas) s = sort(filter(v -> v[2] > 0, c.defs); by = x -> x[2]) d = Dict((s[i][1], i) for i in 1 : length(s)) ind = first.(s) swap = walk(k -> _get(d, k, k), c.code) return Canvas(Tuple{Int, Int}[(i, i) for i in 1 : length(s)], getindex(swap, ind), getindex(c.codelocs, ind)) end ##### ##### Pretty printing ##### print_stmt(io::IO, ex) = print(io, ex) print_stmt(io::IO, ex::Expr) = print_stmt(io::IO, Val(ex.head), ex) const tab = " " function show(io::IO, c::Canvas) indent = get(io, :indent, 0) bs = get(io, :bindings, Dict()) for (r, ind) in sort(c.defs; by = x -> x[2]) ind > 0 || continue println(io) print(io, tab^indent, " ") print(io, string("%", r), " = ") ex = get(c.code, r, nothing) ex == nothing ? print(io, "nothing") : print_stmt(io, ex) end end print_stmt(io::IO, ::Val, ex) = print(io, ex) function print_stmt(io::IO, ::Val{:enter}, ex) print(io, "try (outer %$(ex.args[1]))") end function print_stmt(io::IO, ::Val{:leave}, ex) print(io, "end try (start %$(ex.args[1]))") end function print_stmt(io::IO, ::Val{:pop_exception}, ex) print(io, "pop exception $(ex.args[1])") end ##### ##### Pipe ##### struct NewVariable id::Int end mutable struct Pipe from::CodeInfo to::Canvas map::Dict{Any, Any} var::Int end function Pipe(ci::CodeInfo) canv = Canvas() p = Pipe(ci, canv, Dict(), 0) return p end @doc( """ Pipe(ir) A wrapper around a `Canvas` object. Call [`finish`](@ref) when done to produce a new `CodeInfo` instance. """, Pipe) get_slot(p::Pipe, s::Symbol) = get_slot(p.from, s) # This is used to handle NewVariable instances. substitute!(p::Pipe, x, y) = (p.map[x] = y; x) substitute(p::Pipe, x) = get(p.map, x, x) substitute(p::Pipe, x::Expr) = Expr(x.head, substitute.((p, ), x.args)...) substitute(p::Pipe, x::Core.GotoNode) = Core.GotoNode(substitute(p, x.label)) substitute(p::Pipe, x::Core.GotoIfNot) = Core.GotoIfNot(substitute(p, x.cond), substitute(p, x.dest)) substitute(p::Pipe, x::Core.ReturnNode) = Core.ReturnNode(substitute(p, x.val)) length(p::Pipe) = length(p.to) getindex(p::Pipe, v) = getindex(p.to, v) function getindex(p::Pipe, v::Union{Variable, NewVariable}) tg = substitute(p, v) return getindex(p.to, tg) end lastindex(p::Pipe) = length(p.to) function pipestate(ci::CodeInfo) ks = sort([Variable(i) => v for (i, v) in enumerate(ci.code)], by = x -> x[1].id) return first.(ks) end function iterate(p::Pipe, (ks, i) = (pipestate(p.from), 1)) i > length(ks) && return v = ks[i] st = walk(resolve, p.from.code[v.id]) substitute!(p, v, push!(p.to, substitute(p, st))) return ((v, st), (ks, i + 1)) end var!(p::Pipe) = NewVariable(p.var += 1) function Base.push!(p::Pipe, x) tmp = var!(p) v = push!(p.to, substitute(p, x)) substitute!(p, tmp, v) return tmp end function Base.pushfirst!(p::Pipe, x) tmp = var!(p) v = pushfirst!(p.to, substitute(p, x)) substitute!(p, tmp, v) return tmp end function setindex!(p::Pipe, x, v::Union{Variable, NewVariable}) k = substitute(p, v) setindex!(p.to, substitute(p, x), k) end function insert!(p::Pipe, v::Union{Variable, NewVariable}, x; after = false) v′ = substitute(p, v).id x = substitute(p, x) tmp = var!(p) substitute!(p, tmp, insert!(p.to, v′ + after, x)) return tmp end function Base.delete!(p::Pipe, v::Union{Variable, NewVariable}) v′ = substitute(p, v) delete!(p.to, v′) end function finish(p::Pipe) new_ci = copy(p.from) c = renumber(p.to) new_ci.code = c.code new_ci.codelocs = c.codelocs new_ci.slotnames = p.from.slotnames new_ci.slotflags = [0x00 for _ in new_ci.slotnames] new_ci.inferred = false new_ci.inlineable = p.from.inlineable new_ci.ssavaluetypes = length(p.to) return new_ci end @doc( """ finish(p::Pipe) Create a new `CodeInfo` instance from a [`Pipe`](@ref). Renumbers the wrapped `Canvas` in-place -- then copies information from the original `CodeInfo` instance and inserts modifications from the wrapped `Canvas`. """, finish) Base.display(p::Pipe) = display(p.to) function Base.identity(p::Pipe) for (v, st) in p end return p end end # module
[ 21412, 6127, 12360, 33637, 198, 198, 3500, 7231, 25, 6127, 12360, 220, 198, 198, 11748, 7308, 25, 11629, 378, 11, 4574, 28265, 4574, 11085, 28265, 7550, 28265, 12233, 28265, 651, 9630, 11, 938, 9630, 11, 900, 9630, 28265, 3359, 11, 1343, 11, 4129, 11, 5369, 198, 11748, 7308, 25, 905, 198, 198, 4242, 2, 198, 4242, 2, 1475, 3742, 198, 4242, 2, 198, 198, 39344, 1401, 11, 35748, 11, 1680, 11017, 11, 8851, 4494, 11, 2438, 62, 10951, 11, 5461, 11, 651, 62, 43384, 198, 198, 4242, 2, 198, 4242, 2, 41086, 198, 4242, 2, 198, 198, 9979, 35748, 796, 7231, 13, 50, 4090, 11395, 198, 7785, 7, 312, 3712, 5317, 8, 796, 35748, 7, 312, 8, 198, 198, 14881, 11207, 7, 10, 5769, 85, 3712, 43015, 11, 4686, 3712, 5317, 8, 796, 35748, 7, 85, 13, 312, 1343, 4686, 8, 198, 14881, 11207, 7, 10, 5769, 312, 3712, 5317, 11, 410, 3712, 43015, 8, 796, 35748, 7, 85, 13, 312, 1343, 4686, 8, 198, 198, 8818, 2438, 62, 10951, 7, 69, 11, 256, 83, 26, 7560, 28, 7942, 11, 14257, 10951, 28, 25, 12286, 8, 198, 220, 220, 220, 4173, 796, 2438, 62, 9319, 1068, 7, 69, 11, 256, 83, 26, 7560, 28, 27568, 11, 14257, 10951, 28, 25, 12286, 8, 198, 220, 220, 220, 318, 28920, 7, 343, 8, 11405, 1441, 2147, 198, 220, 220, 220, 1441, 4173, 58, 16, 60, 198, 437, 198, 198, 8818, 651, 62, 43384, 7, 979, 3712, 10669, 12360, 11, 264, 3712, 13940, 23650, 8, 198, 220, 220, 220, 773, 796, 1064, 11085, 7, 417, 4613, 1288, 6624, 264, 11, 269, 72, 13, 43384, 14933, 8, 198, 220, 220, 220, 773, 6624, 2147, 11405, 1441, 220, 198, 220, 220, 220, 1441, 7231, 13, 7293, 5329, 13, 38963, 15057, 7, 521, 8, 198, 437, 198, 198, 31, 15390, 7, 198, 37811, 198, 220, 220, 220, 2438, 62, 10951, 7, 69, 11, 256, 83, 26, 7716, 796, 2081, 11, 14257, 10951, 796, 1058, 12286, 8, 198, 198, 13615, 17788, 2438, 329, 2163, 4600, 69, 63, 351, 46545, 2099, 4600, 926, 44646, 7889, 29540, 284, 4600, 9492, 5275, 18274, 4487, 13, 31, 8189, 62, 9319, 1068, 63, 1377, 475, 257, 2163, 869, 290, 4433, 257, 46545, 2099, 4600, 926, 63, 355, 5128, 13, 198, 15931, 1600, 2438, 62, 10951, 8, 198, 198, 11152, 7, 22184, 11, 2124, 8, 796, 24714, 7, 87, 8, 198, 11152, 7, 22184, 11, 2124, 3712, 43015, 8, 796, 24714, 7, 87, 8, 198, 11152, 7, 22184, 11, 2124, 3712, 14055, 13, 13615, 19667, 8, 796, 7231, 13, 13615, 19667, 7, 11152, 7, 22184, 11, 2124, 13, 2100, 4008, 198, 11152, 7, 22184, 11, 2124, 3712, 14055, 13, 38, 2069, 19667, 8, 796, 7231, 13, 38, 2069, 19667, 7, 11152, 7, 22184, 11, 2124, 13, 18242, 4008, 198, 11152, 7, 22184, 11, 2124, 3712, 14055, 13, 38, 2069, 1532, 3673, 8, 796, 7231, 13, 38, 2069, 1532, 3673, 7, 11152, 7, 22184, 11, 2124, 13, 17561, 828, 2513, 7, 22184, 11, 2124, 13, 16520, 4008, 198, 11152, 7, 22184, 11, 2124, 3712, 3109, 1050, 8, 796, 1475, 1050, 7, 87, 13, 2256, 11, 3975, 7, 64, 4613, 2513, 7, 22184, 11, 257, 828, 2124, 13, 22046, 8, 23029, 198, 8818, 2513, 7, 22184, 11, 2124, 3712, 38469, 8, 198, 220, 220, 220, 3975, 7, 87, 8, 466, 1288, 198, 220, 220, 220, 220, 220, 220, 220, 2513, 7, 22184, 11, 1288, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 411, 6442, 7, 87, 8, 796, 2124, 198, 411, 6442, 7, 2164, 3712, 22289, 8134, 8, 796, 651, 26745, 7, 2164, 13, 4666, 11, 1036, 13, 3672, 8, 198, 198, 4242, 2, 198, 4242, 2, 1680, 11017, 198, 4242, 2, 198, 198, 7249, 1680, 11017, 198, 220, 220, 220, 825, 82, 3712, 38469, 90, 51, 29291, 90, 5317, 11, 2558, 11709, 198, 220, 220, 220, 2438, 3712, 38469, 90, 7149, 92, 198, 220, 220, 220, 14873, 417, 420, 82, 3712, 38469, 90, 5317, 2624, 92, 198, 437, 198, 6090, 11017, 3419, 796, 1680, 11017, 7, 51, 29291, 90, 5317, 11, 2558, 92, 58, 4357, 4377, 58, 4357, 2558, 2624, 58, 12962, 198, 198, 31, 15390, 7, 198, 37811, 198, 15506, 63, 73, 43640, 198, 7249, 1680, 11017, 198, 220, 220, 220, 825, 82, 3712, 38469, 90, 5317, 92, 198, 220, 220, 220, 2438, 3712, 38469, 90, 7149, 92, 198, 220, 220, 220, 14873, 417, 420, 82, 3712, 38469, 90, 5317, 2624, 92, 198, 437, 198, 6090, 11017, 3419, 796, 1680, 11017, 7, 5317, 58, 4357, 4377, 58, 4357, 2558, 2624, 58, 12962, 198, 15506, 63, 198, 198, 32, 4600, 38469, 63, 12, 2339, 34651, 329, 4600, 14055, 63, 2438, 13760, 13, 198, 198, 2964, 18200, 284, 1394, 287, 2000, 25, 198, 198, 16, 13, 35835, 295, 6609, 318, 3105, 13, 198, 17, 13, 350, 8023, 284, 3726, 318, 3105, 13, 198, 17, 13, 350, 8023, 284, 886, 318, 3049, 13, 198, 18, 13, 1024, 1616, 295, 318, 3049, 13, 220, 198, 19, 13, 8798, 278, 4847, 318, 3049, 13, 198, 20, 13, 25700, 4847, 318, 3049, 13, 198, 21, 13, 32677, 4600, 918, 4494, 63, 1276, 2513, 262, 2104, 4600, 6090, 11017, 63, 4554, 284, 4296, 311, 4090, 3815, 1377, 3105, 13, 198, 198, 19093, 11, 611, 345, 1382, 510, 257, 4600, 6090, 11017, 63, 4554, 18703, 453, 11, 2279, 815, 307, 3049, 13, 198, 15931, 1600, 1680, 11017, 8, 198, 198, 13664, 7, 66, 3712, 6090, 11017, 8, 796, 4129, 7, 24455, 7, 87, 4613, 2124, 58, 17, 60, 1875, 657, 11, 269, 13, 4299, 82, 4008, 198, 198, 8818, 651, 9630, 7, 66, 3712, 6090, 11017, 11, 4686, 87, 3712, 5317, 8, 198, 220, 220, 220, 374, 11, 773, 796, 269, 13, 4299, 82, 58, 312, 87, 60, 198, 220, 220, 220, 2488, 30493, 773, 1875, 657, 198, 220, 220, 220, 651, 9630, 7, 66, 13, 8189, 11, 374, 8, 198, 437, 198, 1136, 9630, 7, 66, 3712, 6090, 11017, 11, 410, 3712, 43015, 8, 796, 651, 9630, 7, 66, 11, 410, 13, 312, 8, 198, 198, 8818, 4574, 0, 7, 66, 3712, 6090, 11017, 11, 336, 16762, 8, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 8189, 11, 336, 16762, 8, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 19815, 417, 420, 82, 11, 2558, 2624, 7, 16, 4008, 198, 220, 220, 220, 300, 796, 4129, 7, 66, 13, 4299, 82, 8, 1343, 352, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 4299, 82, 11, 357, 75, 11, 300, 4008, 198, 220, 220, 220, 1441, 35748, 7, 13664, 7, 66, 13, 4299, 82, 4008, 198, 437, 198, 198, 8818, 7550, 0, 7, 66, 3712, 6090, 11017, 11, 4686, 87, 3712, 5317, 11, 2124, 8, 198, 220, 220, 220, 374, 11, 773, 796, 269, 13, 4299, 82, 58, 312, 87, 60, 198, 220, 220, 220, 2488, 30493, 7, 521, 1875, 657, 8, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 8189, 11, 2124, 8, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 19815, 417, 420, 82, 11, 2558, 2624, 7, 16, 4008, 198, 220, 220, 220, 329, 1312, 287, 352, 1058, 4129, 7, 66, 13, 4299, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 11, 479, 796, 269, 13, 4299, 82, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 479, 1875, 657, 11405, 479, 18189, 773, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 13, 4299, 82, 58, 72, 60, 796, 357, 81, 11, 479, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4574, 0, 7, 66, 13, 4299, 82, 11, 357, 13664, 7, 66, 13, 4299, 82, 8, 1343, 352, 11, 773, 4008, 198, 220, 220, 220, 1441, 35748, 7, 13664, 7, 66, 13, 4299, 82, 4008, 198, 437, 198, 28463, 0, 7, 66, 3712, 6090, 11017, 11, 410, 3712, 43015, 11, 2124, 8, 796, 7550, 0, 7, 66, 11, 410, 13, 312, 11, 2124, 8, 198, 198, 14689, 11085, 0, 7, 66, 3712, 6090, 11017, 11, 2124, 8, 796, 7550, 0, 7, 66, 11, 352, 11, 2124, 8, 198, 198, 2617, 9630, 0, 7, 66, 3712, 6090, 11017, 11, 2124, 11, 410, 3712, 5317, 8, 796, 900, 9630, 0, 7, 66, 13, 8189, 11, 2124, 11, 410, 8, 198, 2617, 9630, 0, 7, 66, 3712, 6090, 11017, 11, 2124, 11, 410, 3712, 43015, 8, 796, 900, 9630, 0, 7, 66, 11, 2124, 11, 410, 13, 312, 8, 198, 198, 8818, 12233, 0, 7, 66, 3712, 6090, 11017, 11, 4686, 87, 3712, 5317, 8, 198, 220, 220, 220, 269, 13, 8189, 58, 312, 87, 60, 796, 2147, 198, 220, 220, 220, 269, 13, 4299, 82, 58, 312, 87, 60, 796, 357, 312, 87, 11, 532, 16, 8, 198, 437, 198, 33678, 0, 7, 66, 3712, 6090, 11017, 11, 410, 3712, 43015, 8, 796, 12233, 0, 7, 66, 11, 410, 13, 312, 8, 198, 198, 62, 1136, 7, 67, 3712, 35, 713, 11, 269, 11, 479, 8, 796, 269, 198, 62, 1136, 7, 67, 3712, 35, 713, 11, 269, 3712, 43015, 11, 479, 8, 796, 468, 2539, 7, 67, 11, 269, 13, 312, 8, 5633, 35748, 7, 1136, 9630, 7, 67, 11, 269, 13, 312, 4008, 1058, 2147, 198, 198, 8818, 8851, 4494, 7, 66, 3712, 6090, 11017, 8, 198, 220, 220, 220, 264, 796, 3297, 7, 24455, 7, 85, 4613, 410, 58, 17, 60, 1875, 657, 11, 269, 13, 4299, 82, 1776, 416, 796, 2124, 4613, 2124, 58, 17, 12962, 198, 220, 220, 220, 288, 796, 360, 713, 19510, 82, 58, 72, 7131, 16, 4357, 1312, 8, 329, 220, 1312, 287, 352, 1058, 4129, 7, 82, 4008, 198, 220, 220, 220, 773, 796, 717, 12195, 82, 8, 198, 220, 220, 220, 16075, 796, 2513, 7, 74, 4613, 4808, 1136, 7, 67, 11, 479, 11, 479, 828, 269, 13, 8189, 8, 198, 220, 220, 220, 1441, 1680, 11017, 7, 51, 29291, 90, 5317, 11, 2558, 92, 58, 7, 72, 11, 1312, 8, 329, 1312, 287, 352, 1058, 4129, 7, 82, 8, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 651, 9630, 7, 2032, 499, 11, 773, 828, 651, 9630, 7, 66, 13, 19815, 417, 420, 82, 11, 773, 4008, 198, 437, 198, 198, 4242, 2, 198, 4242, 2, 20090, 13570, 198, 4242, 2, 198, 198, 4798, 62, 301, 16762, 7, 952, 3712, 9399, 11, 409, 8, 796, 3601, 7, 952, 11, 409, 8, 198, 4798, 62, 301, 16762, 7, 952, 3712, 9399, 11, 409, 3712, 3109, 1050, 8, 796, 3601, 62, 301, 16762, 7, 952, 3712, 9399, 11, 3254, 7, 1069, 13, 2256, 828, 409, 8, 198, 198, 9979, 7400, 796, 366, 220, 366, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 269, 3712, 6090, 11017, 8, 198, 220, 220, 220, 33793, 796, 651, 7, 952, 11, 1058, 521, 298, 11, 657, 8, 198, 220, 220, 220, 275, 82, 796, 651, 7, 952, 11, 1058, 21653, 654, 11, 360, 713, 28955, 198, 220, 220, 220, 329, 357, 81, 11, 773, 8, 287, 3297, 7, 66, 13, 4299, 82, 26, 416, 796, 2124, 4613, 2124, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 773, 1875, 657, 8614, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 952, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 7400, 61, 521, 298, 11, 366, 220, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 4731, 7203, 4, 1600, 374, 828, 366, 796, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 409, 796, 651, 7, 66, 13, 8189, 11, 374, 11, 2147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 409, 6624, 2147, 5633, 3601, 7, 952, 11, 366, 22366, 4943, 1058, 3601, 62, 301, 16762, 7, 952, 11, 409, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 4798, 62, 301, 16762, 7, 952, 3712, 9399, 11, 7904, 7762, 11, 409, 8, 796, 3601, 7, 952, 11, 409, 8, 198, 198, 8818, 3601, 62, 301, 16762, 7, 952, 3712, 9399, 11, 7904, 7762, 90, 25, 9255, 5512, 409, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 28311, 357, 39605, 4064, 3, 7, 1069, 13, 22046, 58, 16, 60, 4008, 4943, 198, 437, 198, 198, 8818, 3601, 62, 301, 16762, 7, 952, 3712, 9399, 11, 7904, 7762, 90, 25, 47408, 5512, 409, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 437, 1949, 357, 9688, 4064, 3, 7, 1069, 13, 22046, 58, 16, 60, 4008, 4943, 198, 437, 198, 198, 8818, 3601, 62, 301, 16762, 7, 952, 3712, 9399, 11, 7904, 7762, 90, 25, 12924, 62, 1069, 4516, 5512, 409, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 12924, 6631, 29568, 1069, 13, 22046, 58, 16, 12962, 4943, 198, 437, 198, 198, 4242, 2, 198, 4242, 2, 36039, 198, 4242, 2, 198, 198, 7249, 968, 43015, 198, 220, 220, 220, 4686, 3712, 5317, 198, 437, 198, 198, 76, 18187, 2878, 36039, 198, 220, 220, 220, 422, 3712, 10669, 12360, 198, 220, 220, 220, 284, 3712, 6090, 11017, 198, 220, 220, 220, 3975, 3712, 35, 713, 90, 7149, 11, 4377, 92, 198, 220, 220, 220, 1401, 3712, 5317, 198, 437, 198, 198, 8818, 36039, 7, 979, 3712, 10669, 12360, 8, 198, 220, 220, 220, 39614, 796, 1680, 11017, 3419, 198, 220, 220, 220, 279, 796, 36039, 7, 979, 11, 39614, 11, 360, 713, 22784, 657, 8, 198, 220, 220, 220, 1441, 279, 198, 437, 198, 198, 31, 15390, 7, 198, 37811, 198, 220, 220, 220, 36039, 7, 343, 8, 198, 198, 32, 29908, 1088, 257, 4600, 6090, 11017, 63, 2134, 13, 4889, 685, 63, 15643, 680, 63, 16151, 31, 5420, 8, 618, 1760, 284, 4439, 257, 649, 4600, 10669, 12360, 63, 4554, 13, 198, 15931, 1600, 36039, 8, 198, 198, 1136, 62, 43384, 7, 79, 3712, 47, 3757, 11, 264, 3712, 13940, 23650, 8, 796, 651, 62, 43384, 7, 79, 13, 6738, 11, 264, 8, 198, 198, 2, 770, 318, 973, 284, 5412, 968, 43015, 10245, 13, 198, 7266, 301, 3678, 0, 7, 79, 3712, 47, 3757, 11, 2124, 11, 331, 8, 796, 357, 79, 13, 8899, 58, 87, 60, 796, 331, 26, 2124, 8, 198, 7266, 301, 3678, 7, 79, 3712, 47, 3757, 11, 2124, 8, 796, 651, 7, 79, 13, 8899, 11, 2124, 11, 2124, 8, 198, 7266, 301, 3678, 7, 79, 3712, 47, 3757, 11, 2124, 3712, 3109, 1050, 8, 796, 1475, 1050, 7, 87, 13, 2256, 11, 15373, 12195, 7, 79, 11, 10612, 2124, 13, 22046, 8, 23029, 198, 7266, 301, 3678, 7, 79, 3712, 47, 3757, 11, 2124, 3712, 14055, 13, 38, 2069, 19667, 8, 796, 7231, 13, 38, 2069, 19667, 7, 7266, 301, 3678, 7, 79, 11, 2124, 13, 18242, 4008, 198, 7266, 301, 3678, 7, 79, 3712, 47, 3757, 11, 2124, 3712, 14055, 13, 38, 2069, 1532, 3673, 8, 796, 7231, 13, 38, 2069, 1532, 3673, 7, 7266, 301, 3678, 7, 79, 11, 2124, 13, 17561, 828, 15373, 7, 79, 11, 2124, 13, 16520, 4008, 198, 7266, 301, 3678, 7, 79, 3712, 47, 3757, 11, 2124, 3712, 14055, 13, 13615, 19667, 8, 796, 7231, 13, 13615, 19667, 7, 7266, 301, 3678, 7, 79, 11, 2124, 13, 2100, 4008, 198, 198, 13664, 7, 79, 3712, 47, 3757, 8, 796, 4129, 7, 79, 13, 1462, 8, 198, 198, 1136, 9630, 7, 79, 3712, 47, 3757, 11, 410, 8, 796, 651, 9630, 7, 79, 13, 1462, 11, 410, 8, 198, 8818, 651, 9630, 7, 79, 3712, 47, 3757, 11, 410, 3712, 38176, 90, 43015, 11, 968, 43015, 30072, 198, 220, 220, 220, 256, 70, 796, 15373, 7, 79, 11, 410, 8, 198, 220, 220, 220, 1441, 651, 9630, 7, 79, 13, 1462, 11, 256, 70, 8, 198, 437, 198, 198, 12957, 9630, 7, 79, 3712, 47, 3757, 8, 796, 4129, 7, 79, 13, 1462, 8, 198, 198, 8818, 7347, 44146, 7, 979, 3712, 10669, 12360, 8, 198, 220, 220, 220, 479, 82, 796, 3297, 26933, 43015, 7, 72, 8, 5218, 410, 329, 357, 72, 11, 410, 8, 287, 27056, 378, 7, 979, 13, 8189, 8, 4357, 416, 796, 2124, 4613, 2124, 58, 16, 4083, 312, 8, 198, 220, 220, 220, 1441, 717, 12195, 591, 8, 198, 437, 198, 198, 8818, 11629, 378, 7, 79, 3712, 47, 3757, 11, 357, 591, 11, 1312, 8, 796, 357, 79, 541, 44146, 7, 79, 13, 6738, 828, 352, 4008, 198, 220, 220, 220, 1312, 1875, 4129, 7, 591, 8, 11405, 1441, 198, 220, 220, 220, 410, 796, 479, 82, 58, 72, 60, 198, 220, 220, 220, 336, 796, 2513, 7, 411, 6442, 11, 279, 13, 6738, 13, 8189, 58, 85, 13, 312, 12962, 198, 220, 220, 220, 15373, 0, 7, 79, 11, 410, 11, 4574, 0, 7, 79, 13, 1462, 11, 15373, 7, 79, 11, 336, 22305, 198, 220, 220, 220, 1441, 14808, 85, 11, 336, 828, 357, 591, 11, 1312, 1343, 352, 4008, 198, 437, 198, 198, 7785, 0, 7, 79, 3712, 47, 3757, 8, 796, 968, 43015, 7, 79, 13, 7785, 15853, 352, 8, 198, 198, 8818, 7308, 13, 14689, 0, 7, 79, 3712, 47, 3757, 11, 2124, 8, 198, 220, 220, 220, 45218, 796, 1401, 0, 7, 79, 8, 198, 220, 220, 220, 410, 796, 4574, 0, 7, 79, 13, 1462, 11, 15373, 7, 79, 11, 2124, 4008, 198, 220, 220, 220, 15373, 0, 7, 79, 11, 45218, 11, 410, 8, 198, 220, 220, 220, 1441, 45218, 198, 437, 198, 198, 8818, 7308, 13, 14689, 11085, 0, 7, 79, 3712, 47, 3757, 11, 2124, 8, 198, 220, 220, 220, 45218, 796, 1401, 0, 7, 79, 8, 198, 220, 220, 220, 410, 796, 4574, 11085, 0, 7, 79, 13, 1462, 11, 15373, 7, 79, 11, 2124, 4008, 198, 220, 220, 220, 15373, 0, 7, 79, 11, 45218, 11, 410, 8, 198, 220, 220, 220, 1441, 45218, 198, 437, 198, 198, 8818, 900, 9630, 0, 7, 79, 3712, 47, 3757, 11, 2124, 11, 410, 3712, 38176, 90, 43015, 11, 968, 43015, 30072, 198, 220, 220, 220, 479, 796, 15373, 7, 79, 11, 410, 8, 198, 220, 220, 220, 900, 9630, 0, 7, 79, 13, 1462, 11, 15373, 7, 79, 11, 2124, 828, 479, 8, 198, 437, 198, 198, 8818, 7550, 0, 7, 79, 3712, 47, 3757, 11, 410, 3712, 38176, 90, 43015, 11, 968, 43015, 5512, 2124, 26, 706, 796, 3991, 8, 198, 220, 220, 220, 410, 17478, 796, 15373, 7, 79, 11, 410, 737, 312, 198, 220, 220, 220, 2124, 796, 15373, 7, 79, 11, 2124, 8, 198, 220, 220, 220, 45218, 796, 1401, 0, 7, 79, 8, 198, 220, 220, 220, 15373, 0, 7, 79, 11, 45218, 11, 7550, 0, 7, 79, 13, 1462, 11, 410, 17478, 1343, 706, 11, 2124, 4008, 198, 220, 220, 220, 1441, 45218, 198, 437, 198, 198, 8818, 7308, 13, 33678, 0, 7, 79, 3712, 47, 3757, 11, 410, 3712, 38176, 90, 43015, 11, 968, 43015, 30072, 198, 220, 220, 220, 410, 17478, 796, 15373, 7, 79, 11, 410, 8, 198, 220, 220, 220, 12233, 0, 7, 79, 13, 1462, 11, 410, 17478, 8, 198, 437, 198, 198, 8818, 5461, 7, 79, 3712, 47, 3757, 8, 198, 220, 220, 220, 649, 62, 979, 796, 4866, 7, 79, 13, 6738, 8, 198, 220, 220, 220, 269, 796, 8851, 4494, 7, 79, 13, 1462, 8, 198, 220, 220, 220, 649, 62, 979, 13, 8189, 796, 269, 13, 8189, 198, 220, 220, 220, 649, 62, 979, 13, 19815, 417, 420, 82, 796, 269, 13, 19815, 417, 420, 82, 198, 220, 220, 220, 649, 62, 979, 13, 43384, 14933, 796, 279, 13, 6738, 13, 43384, 14933, 198, 220, 220, 220, 649, 62, 979, 13, 43384, 33152, 796, 685, 15, 87, 405, 329, 4808, 287, 649, 62, 979, 13, 43384, 14933, 60, 198, 220, 220, 220, 649, 62, 979, 13, 259, 18186, 796, 3991, 198, 220, 220, 220, 649, 62, 979, 13, 45145, 540, 796, 279, 13, 6738, 13, 45145, 540, 198, 220, 220, 220, 649, 62, 979, 13, 824, 9226, 84, 2963, 12272, 796, 4129, 7, 79, 13, 1462, 8, 198, 220, 220, 220, 1441, 649, 62, 979, 198, 437, 198, 198, 31, 15390, 7, 198, 37811, 198, 220, 220, 220, 5461, 7, 79, 3712, 47, 3757, 8, 198, 198, 16447, 257, 649, 4600, 10669, 12360, 63, 4554, 422, 257, 685, 63, 47, 3757, 63, 16151, 31, 5420, 737, 7152, 17024, 262, 12908, 4600, 6090, 11017, 63, 287, 12, 5372, 1377, 788, 9088, 1321, 422, 262, 2656, 4600, 10669, 12360, 63, 4554, 290, 42220, 19008, 422, 262, 12908, 4600, 6090, 11017, 44646, 198, 15931, 1600, 5461, 8, 198, 198, 14881, 13, 13812, 7, 79, 3712, 47, 3757, 8, 796, 3359, 7, 79, 13, 1462, 8, 198, 8818, 7308, 13, 738, 414, 7, 79, 3712, 47, 3757, 8, 198, 220, 220, 220, 329, 357, 85, 11, 336, 8, 287, 279, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 279, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
2.266457
3,494
@testset "CookieCutter" begin problem = SimulationProblem(CartesianGrid(100,100), (:facies => Int, :property => Float64), 3) solver = CookieCutter(DummySimSolver(:facies=>NamedTuple()), Dict(0=>DummySimSolver(), 1=>DummySimSolver())) @test sprint(show, solver) == "CookieCutter" @test sprint(show, MIME"text/plain"(), solver) == "CookieCutter\n └─facies ⇨ DummySimSolver\n └─0 ⇨ DummySimSolver\n └─1 ⇨ DummySimSolver" Random.seed!(1234) solution = solve(problem, solver) if visualtests @test_reference "data/COOKIE.png" plot(solution) end end
[ 31, 9288, 2617, 366, 34, 18055, 34, 10381, 1, 2221, 198, 220, 1917, 796, 41798, 40781, 7, 43476, 35610, 41339, 7, 3064, 11, 3064, 828, 357, 25, 69, 13433, 5218, 2558, 11, 1058, 26745, 5218, 48436, 2414, 828, 513, 8, 628, 220, 1540, 332, 796, 39606, 34, 10381, 7, 35, 13513, 8890, 50, 14375, 7, 25, 69, 13433, 14804, 45, 2434, 51, 29291, 3419, 828, 360, 713, 7, 15, 14804, 35, 13513, 8890, 50, 14375, 22784, 352, 14804, 35, 13513, 8890, 50, 14375, 3419, 4008, 628, 220, 2488, 9288, 18553, 7, 12860, 11, 1540, 332, 8, 6624, 366, 34, 18055, 34, 10381, 1, 198, 220, 2488, 9288, 18553, 7, 12860, 11, 337, 12789, 1, 5239, 14, 25638, 18109, 828, 1540, 332, 8, 6624, 366, 34, 18055, 34, 10381, 59, 77, 220, 13305, 242, 7280, 69, 13433, 42527, 101, 360, 13513, 8890, 50, 14375, 59, 77, 220, 220, 220, 13305, 242, 7280, 15, 42527, 101, 360, 13513, 8890, 50, 14375, 59, 77, 220, 220, 220, 13305, 242, 7280, 16, 42527, 101, 360, 13513, 8890, 50, 14375, 1, 628, 220, 14534, 13, 28826, 0, 7, 1065, 2682, 8, 198, 220, 4610, 796, 8494, 7, 45573, 11, 1540, 332, 8, 628, 220, 611, 5874, 41989, 198, 220, 220, 220, 2488, 9288, 62, 35790, 366, 7890, 14, 34, 15308, 10008, 13, 11134, 1, 7110, 7, 82, 2122, 8, 198, 220, 886, 198, 437, 198 ]
2.495652
230
importall Bukdu type TextController <: ApplicationController end layout(::Layout, body) = """empty layout""" index(::TextController) = render(Text) index_with_layout(::TextController) = render(Text/Layout) Router() do get("/index", TextController, index) get("/index_with_layout", TextController, index_with_layout) end using Base.Test conn = (Router)(get, "/index") @test 200 == conn.status @test "text/plain" == conn.resp_header["Content-Type"] @test "" == conn.resp_body logs = [] before(render, Text) do push!(logs, "b") end after(render, Text) do push!(logs, "a") end conn = (Router)(get, "/index") @test "" == conn.resp_body @test ["b", "a"] == logs empty!(logs) conn = (Router)(get, "/index_with_layout") @test "text/plain" == conn.resp_header["Content-Type"] @test "empty layout" == conn.resp_body @test ["b", "a"] == logs empty!(logs) layout(::Layout, body::String) = """layout - $body""" index1(::TextController) = render(Text, "hello") index_with_layout1(::TextController) = render(Text/Layout, "hello") Router() do get("/index1", TextController, index1) get("/index_with_layout1", TextController, index_with_layout1) end conn = (Router)(get, "/index1") @test "text/plain" == conn.resp_header["Content-Type"] @test "hello" == conn.resp_body @test [] == logs before(render, Text) do body push!(logs, "b $body") end after(render, Text) do body push!(logs, "a $body") end conn = (Router)(get, "/index1") @test "text/plain" == conn.resp_header["Content-Type"] @test "hello" == conn.resp_body @test ["b hello", "a hello"] == logs empty!(logs) conn = (Router)(get, "/index_with_layout1") @test "text/plain" == conn.resp_header["Content-Type"] @test "layout - hello" == conn.resp_body @test ["b hello", "a hello"] == logs empty!(logs) before(render, Text/Layout) do body push!(logs, "bl $body") end after(render, Text/Layout) do body push!(logs, "al $body") end conn = (Router)(get, "/index1") @test "text/plain" == conn.resp_header["Content-Type"] @test "hello" == conn.resp_body @test ["b hello", "a hello"] == logs empty!(logs) conn = (Router)(get, "/index_with_layout1") @test "text/plain" == conn.resp_header["Content-Type"] @test "layout - hello" == conn.resp_body @test ["bl hello","b hello","a hello","al hello"] == logs empty!(logs) layout(::Layout, body::String, c::TextController) = """layout2 - $body, $c""" index2(c::TextController) = render(Text, "foo", c) index_with_layout2(c::TextController) = render(Text/Layout, "foo", c) Router() do get("/index2", TextController, index2) get("/index_with_layout2", TextController, index_with_layout2) end conn = (Router)(get, "/index2") @test "text/plain" == conn.resp_header["Content-Type"] @test "foo" == conn.resp_body @test [] == logs empty!(logs) before(render, Text) do body, c push!(logs, "b $body, $c") end after(render, Text) do body, c push!(logs, "a $body, $c") end before(render, Text/Layout) do body, c push!(logs, "bl") end after(render, Text/Layout) do body, c push!(logs, "al") end conn = (Router)(get, "/index_with_layout2") @test "text/plain" == conn.resp_header["Content-Type"] @test "layout2 - foo, TextController()" == conn.resp_body @test ["bl","b foo, TextController()","a foo, TextController()","al"] == logs empty!(logs)
[ 11748, 439, 36810, 646, 198, 198, 4906, 8255, 22130, 1279, 25, 15678, 22130, 198, 437, 198, 198, 39786, 7, 3712, 32517, 11, 1767, 8, 796, 37227, 28920, 12461, 37811, 198, 9630, 7, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 8, 198, 9630, 62, 4480, 62, 39786, 7, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 14, 32517, 8, 198, 198, 49, 39605, 3419, 466, 198, 220, 220, 220, 651, 7203, 14, 9630, 1600, 8255, 22130, 11, 6376, 8, 198, 220, 220, 220, 651, 7203, 14, 9630, 62, 4480, 62, 39786, 1600, 8255, 22130, 11, 6376, 62, 4480, 62, 39786, 8, 198, 437, 628, 198, 3500, 7308, 13, 14402, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 4943, 198, 31, 9288, 939, 6624, 48260, 13, 13376, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 13538, 6624, 48260, 13, 4363, 62, 2618, 198, 198, 6404, 82, 796, 17635, 198, 19052, 7, 13287, 11, 8255, 8, 466, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 65, 4943, 198, 437, 198, 8499, 7, 13287, 11, 8255, 8, 466, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 64, 4943, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 4943, 198, 31, 9288, 13538, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 65, 1600, 366, 64, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 628, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 62, 4480, 62, 39786, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 28920, 12461, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 65, 1600, 366, 64, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 628, 198, 39786, 7, 3712, 32517, 11, 1767, 3712, 10100, 8, 796, 37227, 39786, 532, 720, 2618, 37811, 198, 9630, 16, 7, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 11, 366, 31373, 4943, 198, 9630, 62, 4480, 62, 39786, 16, 7, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 14, 32517, 11, 366, 31373, 4943, 198, 198, 49, 39605, 3419, 466, 198, 220, 220, 220, 651, 7203, 14, 9630, 16, 1600, 8255, 22130, 11, 6376, 16, 8, 198, 220, 220, 220, 651, 7203, 14, 9630, 62, 4480, 62, 39786, 16, 1600, 8255, 22130, 11, 6376, 62, 4480, 62, 39786, 16, 8, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 16, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 31373, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 17635, 6624, 17259, 198, 198, 19052, 7, 13287, 11, 8255, 8, 466, 1767, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 65, 720, 2618, 4943, 198, 437, 198, 8499, 7, 13287, 11, 8255, 8, 466, 1767, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 64, 720, 2618, 4943, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 16, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 31373, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 65, 23748, 1600, 366, 64, 23748, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 62, 4480, 62, 39786, 16, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 39786, 532, 23748, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 65, 23748, 1600, 366, 64, 23748, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 198, 198, 19052, 7, 13287, 11, 8255, 14, 32517, 8, 466, 1767, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 2436, 720, 2618, 4943, 198, 437, 198, 8499, 7, 13287, 11, 8255, 14, 32517, 8, 466, 1767, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 282, 720, 2618, 4943, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 16, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 31373, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 65, 23748, 1600, 366, 64, 23748, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 62, 4480, 62, 39786, 16, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 39786, 532, 23748, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 2436, 23748, 2430, 65, 23748, 2430, 64, 23748, 2430, 282, 23748, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 628, 198, 39786, 7, 3712, 32517, 11, 1767, 3712, 10100, 11, 269, 3712, 8206, 22130, 8, 796, 37227, 39786, 17, 532, 720, 2618, 11, 720, 66, 37811, 198, 9630, 17, 7, 66, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 11, 366, 21943, 1600, 269, 8, 198, 9630, 62, 4480, 62, 39786, 17, 7, 66, 3712, 8206, 22130, 8, 796, 8543, 7, 8206, 14, 32517, 11, 366, 21943, 1600, 269, 8, 198, 198, 49, 39605, 3419, 466, 198, 220, 220, 220, 651, 7203, 14, 9630, 17, 1600, 8255, 22130, 11, 6376, 17, 8, 198, 220, 220, 220, 651, 7203, 14, 9630, 62, 4480, 62, 39786, 17, 1600, 8255, 22130, 11, 6376, 62, 4480, 62, 39786, 17, 8, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 17, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 21943, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 17635, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 198, 198, 19052, 7, 13287, 11, 8255, 8, 466, 1767, 11, 269, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 65, 720, 2618, 11, 720, 66, 4943, 198, 437, 198, 198, 8499, 7, 13287, 11, 8255, 8, 466, 1767, 11, 269, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 64, 720, 2618, 11, 720, 66, 4943, 198, 437, 198, 198, 19052, 7, 13287, 11, 8255, 14, 32517, 8, 466, 1767, 11, 269, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 2436, 4943, 198, 437, 198, 198, 8499, 7, 13287, 11, 8255, 14, 32517, 8, 466, 1767, 11, 269, 198, 220, 220, 220, 4574, 0, 7, 6404, 82, 11, 366, 282, 4943, 198, 437, 198, 198, 37043, 796, 357, 49, 39605, 5769, 1136, 11, 12813, 9630, 62, 4480, 62, 39786, 17, 4943, 198, 31, 9288, 366, 5239, 14, 25638, 1, 6624, 48260, 13, 4363, 62, 25677, 14692, 19746, 12, 6030, 8973, 198, 31, 9288, 366, 39786, 17, 532, 22944, 11, 8255, 22130, 3419, 1, 6624, 48260, 13, 4363, 62, 2618, 198, 31, 9288, 14631, 2436, 2430, 65, 22944, 11, 8255, 22130, 3419, 2430, 64, 22944, 11, 8255, 22130, 3419, 2430, 282, 8973, 6624, 17259, 198, 28920, 0, 7, 6404, 82, 8, 198 ]
2.643144
1,247
# Active patterns module Active using MLStyle using MLStyle.Qualification using MLStyle.AbstractPatterns export @active, active_def @nospecialize function active_def(P, body, mod::Module, line::LineNumberNode) @switch P begin @case Expr(:call, Expr(:curly, t, type_args...) || t && let type_args = [] end, arg ) && if t isa Symbol end @case _ error("malformed active pattern definition: $P") end definition = if isdefined(mod, t) line else :(struct $t end) end parametric = isempty(type_args) ? [] : type_args prepr = "$P" token = gensym(prepr) v_ty = Val{(view, token)} v_val = Val((view, token)) quote $definition (::$v_ty)($(parametric...), ) = $arg -> $body $line function $MLStyle.pattern_uncall(t::($t isa Function ? typeof($t) : Type{$t}), self::Function, type_params, type_args, args) $line isempty(type_params) || error("A ($t) pattern requires no type params.") parametric = isempty(type_args) ? [] : type_args n_args = length(args) function trans(expr) Expr(:call, Expr(:call, $v_val, parametric...), expr) end function guard2(expr) if n_args === 0 :($expr isa Bool && $expr) elseif n_args === 1 expr_s = "$t(x)" msg = "invalid use of active patterns: " * "1-ary view pattern($expr_s) should accept Union{Some{T}, Nothing} " * "instead of Union{T, Nothing}! " * "A simple solution is:\n" * " (@active $expr_s ex) =>\n (@active $expr_s let r=ex; r === nothing? r : Some(r)) end" :($expr !== nothing && ($expr isa $Some || begin $error($msg) end)) else :($expr isa $Tuple && length($expr) === $n_args) end end extract = if n_args <= 1 function (expr::Any, i::Int, ::Any, ::Any) expr end else function (expr::Any, i::Int, ::Any, ::Any) :($expr[$i]) end end type_infer(_...) = Any comp = $PComp( $prepr, type_infer; view=$SimpleCachablePre(trans), guard2=$NoncachablePre(guard2) ) ps = if n_args === 0 [] elseif n_args === 1 [self(Expr(:call, Some, args[1]))] else [self(e) for e in args] end $decons(comp, extract, ps) end end end """ Simple active pattern implementation. You can give a qualifier in the first argument of `@active` to customize its visibility in other modules. ```julia @active F(x) begin if x > 0 nothing else :ok end end @match -1 begin F(:ok) => false _ => true end # true @active public IsEven(x) begin x % 2 === 0 end @match 4 begin IsEven() => :ok _ => :err end # :ok ``` """ macro active(qualifier, case, active_body) deprecate_qualifier_macro(qualifier, __source__) active_def(case, active_body, __module__, __source__) |> esc end macro active(case, active_body) active_def(case, active_body, __module__, __source__) |> esc end @specialize end
[ 2, 14199, 7572, 198, 21412, 14199, 198, 3500, 13981, 774, 293, 198, 3500, 13981, 774, 293, 13, 46181, 2649, 198, 3500, 13981, 774, 293, 13, 23839, 47546, 82, 198, 198, 39344, 2488, 5275, 11, 4075, 62, 4299, 198, 31, 39369, 431, 2413, 1096, 198, 8818, 4075, 62, 4299, 7, 47, 11, 1767, 11, 953, 3712, 26796, 11, 1627, 3712, 13949, 15057, 19667, 8, 628, 220, 220, 220, 2488, 31943, 350, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 7442, 1475, 1050, 7, 25, 13345, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1475, 1050, 7, 25, 22019, 306, 11, 256, 11, 2099, 62, 22046, 23029, 8614, 256, 11405, 1309, 2099, 62, 22046, 796, 17635, 886, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1822, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 11405, 611, 256, 318, 64, 38357, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 7442, 4808, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 7617, 12214, 4075, 3912, 6770, 25, 720, 47, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 6770, 796, 611, 318, 23211, 7, 4666, 11, 256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1627, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 36147, 7249, 720, 83, 886, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 5772, 19482, 796, 318, 28920, 7, 4906, 62, 22046, 8, 5633, 17635, 1058, 2099, 62, 22046, 198, 220, 220, 220, 662, 1050, 796, 17971, 47, 1, 198, 220, 220, 220, 11241, 796, 308, 641, 4948, 7, 3866, 1050, 8, 198, 220, 220, 220, 410, 62, 774, 796, 3254, 90, 7, 1177, 11, 11241, 38165, 198, 220, 220, 220, 410, 62, 2100, 796, 3254, 19510, 1177, 11, 11241, 4008, 628, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 720, 46758, 198, 220, 220, 220, 220, 220, 220, 220, 357, 3712, 3, 85, 62, 774, 5769, 3, 7, 17143, 19482, 986, 828, 1267, 796, 720, 853, 4613, 720, 2618, 198, 220, 220, 220, 220, 220, 220, 220, 720, 1370, 198, 220, 220, 220, 220, 220, 220, 220, 2163, 720, 5805, 21466, 13, 33279, 62, 403, 13345, 7, 83, 3712, 16763, 83, 318, 64, 15553, 5633, 2099, 1659, 16763, 83, 8, 1058, 5994, 90, 3, 83, 92, 828, 2116, 3712, 22203, 11, 2099, 62, 37266, 11, 2099, 62, 22046, 11, 26498, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 1370, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 28920, 7, 4906, 62, 37266, 8, 8614, 4049, 7203, 32, 7198, 83, 8, 3912, 4433, 645, 2099, 42287, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5772, 19482, 796, 318, 28920, 7, 4906, 62, 22046, 8, 5633, 17635, 1058, 2099, 62, 22046, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 62, 22046, 796, 4129, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2163, 1007, 7, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1475, 1050, 7, 25, 13345, 11, 1475, 1050, 7, 25, 13345, 11, 720, 85, 62, 2100, 11, 5772, 19482, 986, 828, 44052, 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, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2163, 4860, 17, 7, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 299, 62, 22046, 24844, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 16763, 31937, 318, 64, 347, 970, 11405, 720, 31937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 62, 22046, 24844, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44052, 62, 82, 796, 17971, 83, 7, 87, 16725, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 366, 259, 12102, 779, 286, 4075, 7572, 25, 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, 366, 16, 12, 560, 1570, 3912, 16763, 31937, 62, 82, 8, 815, 2453, 4479, 90, 4366, 90, 51, 5512, 10528, 92, 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, 366, 38070, 286, 4479, 90, 51, 11, 10528, 92, 0, 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, 366, 32, 2829, 4610, 318, 7479, 77, 1, 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, 366, 220, 4275, 5275, 720, 31937, 62, 82, 409, 8, 5218, 59, 77, 220, 4275, 5275, 720, 31937, 62, 82, 1309, 374, 28, 1069, 26, 374, 24844, 2147, 30, 374, 1058, 2773, 7, 81, 4008, 886, 1, 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, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 16763, 31937, 5145, 855, 2147, 11405, 7198, 31937, 318, 64, 720, 4366, 8614, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 18224, 16763, 19662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 4008, 198, 220, 220, 220, 220, 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, 220, 220, 220, 220, 1058, 16763, 31937, 318, 64, 720, 51, 29291, 11405, 4129, 16763, 31937, 8, 24844, 720, 77, 62, 22046, 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, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7925, 796, 611, 299, 62, 22046, 19841, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2163, 357, 31937, 3712, 7149, 11, 1312, 3712, 5317, 11, 7904, 7149, 11, 7904, 7149, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44052, 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, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2163, 357, 31937, 3712, 7149, 11, 1312, 3712, 5317, 11, 7904, 7149, 11, 7904, 7149, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 16763, 31937, 58, 3, 72, 12962, 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, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 259, 2232, 28264, 23029, 796, 4377, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 552, 796, 720, 5662, 3361, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 3866, 1050, 11, 2099, 62, 259, 2232, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1570, 43641, 26437, 34, 34446, 6719, 7, 7645, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4860, 17, 43641, 15419, 66, 34446, 6719, 7, 14864, 17, 8, 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, 26692, 796, 611, 299, 62, 22046, 24844, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 62, 22046, 24844, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 944, 7, 3109, 1050, 7, 25, 13345, 11, 2773, 11, 26498, 58, 16, 60, 4008, 60, 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, 685, 944, 7, 68, 8, 329, 304, 287, 26498, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 12501, 684, 7, 5589, 11, 7925, 11, 26692, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 26437, 4075, 3912, 7822, 13, 198, 1639, 460, 1577, 257, 39265, 287, 262, 717, 4578, 286, 4600, 31, 5275, 63, 284, 24184, 663, 20742, 287, 584, 13103, 13, 198, 15506, 63, 73, 43640, 198, 220, 220, 220, 2488, 5275, 376, 7, 87, 8, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2124, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 482, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 15699, 532, 16, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 376, 7, 25, 482, 8, 5218, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 5218, 2081, 198, 220, 220, 220, 886, 1303, 2081, 628, 220, 220, 220, 2488, 5275, 1171, 1148, 6104, 7, 87, 8, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 4064, 362, 24844, 657, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 15699, 604, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1148, 6104, 3419, 5218, 1058, 482, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 5218, 1058, 8056, 198, 220, 220, 220, 886, 1303, 1058, 482, 198, 15506, 63, 198, 37811, 198, 20285, 305, 4075, 7, 13255, 7483, 11, 1339, 11, 4075, 62, 2618, 8, 198, 220, 220, 220, 1207, 8344, 378, 62, 13255, 7483, 62, 20285, 305, 7, 13255, 7483, 11, 11593, 10459, 834, 8, 198, 220, 220, 220, 4075, 62, 4299, 7, 7442, 11, 4075, 62, 2618, 11, 11593, 21412, 834, 11, 11593, 10459, 834, 8, 930, 29, 3671, 198, 437, 198, 198, 20285, 305, 4075, 7, 7442, 11, 4075, 62, 2618, 8, 198, 220, 220, 220, 4075, 62, 4299, 7, 7442, 11, 4075, 62, 2618, 11, 11593, 21412, 834, 11, 11593, 10459, 834, 8, 930, 29, 3671, 198, 437, 198, 31, 20887, 1096, 198, 198, 437 ]
1.843996
2,032
<gh_stars>100-1000 using ..Atmos using ..ConfigTypes using ..DiagnosticsMachine @diagnostics_group( "AtmosLESDefault", # name AtmosLESConfigType, # configuration type Nothing, # params type (_...) -> nothing, # initialization function NoInterpolation, # if/when to interpolate # various horizontal averages u, v, w, rho, temp, pres, thd, et, ei, ht, hi, w_ht_sgs, # moisture related qt, ql, qi, qv, thv, thl, w_qt_sgs, # for variances and co-variances uu, vv, ww, www, eiei, wu, wv, wrho, wthd, wei, qtqt, thlthl, wqt, wql, wqi, wqv, wthv, wthl, qtthl, qtei, #cld_top, TODO #cld_base, TODO #cld_cover, TODO #lwp, TODO #rwp, TODO )
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 11485, 2953, 16785, 198, 3500, 11485, 16934, 31431, 198, 3500, 11485, 18683, 4660, 34558, 37573, 198, 198, 31, 47356, 34558, 62, 8094, 7, 198, 220, 220, 220, 366, 2953, 16785, 28378, 19463, 1600, 220, 220, 220, 220, 220, 1303, 1438, 198, 220, 220, 220, 1629, 16785, 28378, 16934, 6030, 11, 220, 220, 220, 220, 1303, 8398, 2099, 198, 220, 220, 220, 10528, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 42287, 2099, 198, 220, 220, 220, 44104, 23029, 4613, 2147, 11, 220, 220, 220, 220, 220, 1303, 37588, 2163, 198, 220, 220, 220, 1400, 9492, 16104, 341, 11, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 14, 12518, 284, 39555, 378, 198, 220, 220, 220, 1303, 2972, 16021, 25694, 198, 220, 220, 220, 334, 11, 198, 220, 220, 220, 410, 11, 198, 220, 220, 220, 266, 11, 198, 220, 220, 220, 374, 8873, 11, 198, 220, 220, 220, 20218, 11, 198, 220, 220, 220, 906, 11, 198, 220, 220, 220, 294, 67, 11, 198, 220, 220, 220, 2123, 11, 198, 220, 220, 220, 304, 72, 11, 198, 220, 220, 220, 289, 83, 11, 198, 220, 220, 220, 23105, 11, 198, 220, 220, 220, 266, 62, 4352, 62, 82, 14542, 11, 198, 220, 220, 220, 1303, 20160, 3519, 198, 220, 220, 220, 10662, 83, 11, 198, 220, 220, 220, 10662, 75, 11, 198, 220, 220, 220, 10662, 72, 11, 198, 220, 220, 220, 10662, 85, 11, 198, 220, 220, 220, 294, 85, 11, 198, 220, 220, 220, 294, 75, 11, 198, 220, 220, 220, 266, 62, 39568, 62, 82, 14542, 11, 198, 220, 220, 220, 1303, 329, 1401, 16097, 290, 763, 12, 85, 3699, 728, 198, 220, 220, 220, 334, 84, 11, 198, 220, 220, 220, 410, 85, 11, 198, 220, 220, 220, 266, 86, 11, 198, 220, 220, 220, 7324, 11, 198, 220, 220, 220, 304, 494, 72, 11, 198, 220, 220, 220, 266, 84, 11, 198, 220, 220, 220, 266, 85, 11, 198, 220, 220, 220, 1319, 8873, 11, 198, 220, 220, 220, 266, 400, 67, 11, 198, 220, 220, 220, 356, 72, 11, 198, 220, 220, 220, 10662, 83, 39568, 11, 198, 220, 220, 220, 294, 75, 400, 75, 11, 198, 220, 220, 220, 266, 39568, 11, 198, 220, 220, 220, 266, 13976, 11, 198, 220, 220, 220, 266, 40603, 11, 198, 220, 220, 220, 266, 44179, 11, 198, 220, 220, 220, 266, 400, 85, 11, 198, 220, 220, 220, 266, 400, 75, 11, 198, 220, 220, 220, 10662, 83, 400, 75, 11, 198, 220, 220, 220, 10662, 660, 72, 11, 198, 220, 220, 220, 1303, 66, 335, 62, 4852, 11, 16926, 46, 198, 220, 220, 220, 1303, 66, 335, 62, 8692, 11, 16926, 46, 198, 220, 220, 220, 1303, 66, 335, 62, 9631, 11, 16926, 46, 198, 220, 220, 220, 1303, 75, 24142, 11, 16926, 46, 198, 220, 220, 220, 1303, 81, 24142, 11, 16926, 46, 198, 8, 198 ]
1.74502
502
<reponame>AShedko/fMRI_ISC_classify push!(LOAD_PATH, @__DIR__) using ISCLib using HDF5, Images, NIfTI using DataFrames,ExcelReaders, Logging, MultivariateStats, Stats Logging.configure(level=DEBUG) function collect_groups(labels) groups = [Int[] for i = 1:maximum(labels)] for (i,l) in enumerate(labels) if l != 0 push!(groups[l], i) end end groups end δ(ind::CartesianIndex) = CartesianRange(ind-1, ind+1) function rndsample(dfr, α::Real=0.2) dfr[sample(collect(1:size(dfr, 1)), Int(ceil( α * size(dfr, 1)))), :] end function iscmask(a) # load Segmentation mask_S = niread("$(@__DIR__)/out/S|segmentation_result.nii").raw; mask_V = niread("$(@__DIR__)/out/V|segmentation_result.nii").raw; mask_SV = niread("$(@__DIR__)/out/S_V|segmentation_result.nii").raw; mask_W = max(mask_S,mask_V,mask_SV); # mask_W = zeros(mask_S) # idx = (mask_S.> a) $ (mask_V.> a) # mask_W[idx] = mask_SV[idx] # mask_W end function glmmask(a) # load Segmentation # mask_W = niread("../../matlab/glm_res/ResMS.nii") mask_1 = niread("$(@__DIR__)/../../matlab/glm_res/beta_0001.nii").raw mask_1 = mask_1 ./ maximum(mask_1[mask_1.>0]) mask_2 = niread("$(@__DIR__)/../../matlab/glm_res/beta_0002.nii").raw mask_2 = mask_2 ./ maximum(mask_2[mask_2.>0]) mask_W = max(mask_1,mask_2) mask_W end function get_segment(a = .1, b = 0.03, pref="isc") print("in") if pref =="isc" mask_W = iscmask(a) elseif pref == "ttest" || pref == "tstat_all" mask_W = niread("$(@__DIR__)/out/Tstat|segmentation_result.nii").raw; elseif pref == "glm" mask_W = glmmask(a) end SVd = h5read("$(@__DIR__)/out/S_V|disps.h5", "data"); # Average disps SVd = sum(SVd,2); med = reduce(+,[get_mean(i) for i in 1:NSUBJ])./NSUBJ coeff_of_var = reshape(sqrt.(SVd),SHAPE)./med coeff_of_var[isnan.(coeff_of_var)] = 0 atl = niread("$(@__DIR__)/../../Harvard-Oxford\ cortical\ and\ subcortical\ structural\ atlases/HarvardOxford-cort-maxprob-thr0-2mm.nii.gz").raw # Compute mask isc_r = copy(mask_W); isc_r = dilate(isc_r) isc_r[!((atl.>0) & (mask_W .> a) & (coeff_of_var .>b ) & (med .> 100)) ]=0; ni = get_nii(1,1) res = NIfTI.NIVolume(ni.header, ni.extensions, isc_r) niwrite("$(@__DIR__)/out/$(pref)_r.nii",res) # get rid of noise (scanning artifacts have very high CV) # normed_cv = coeff_of_var./maximum(coeff_of_var) # get connected components labels = label_components(isc_r.>0) groups = filter(x->length(x)>40,collect_groups(labels)) inds = get_result_inds(isc_r, groups) inds end function get_result_inds(isc_r, groups) mask = falses(isc_r) for g in groups mask[g] = true end inds = CartesianIndex[] for g in groups for el in g !mask[el] && continue ind = CartesianIndex(ind2sub(SHAPE,el)) push!(inds,ind) for i in δ(ind) mask[i] = false end end end inds end function extract(ni, inds) raw = ni.raw out = zeros(length(inds)) for (k,ind) in enumerate(inds) s = 0 for j in δ(ind) s += raw[j] end out[k] = s/27 end out end function get_params(niis, inds, num) """ Gives you one point in feature space """ len = length(niis) stp = Int(ceil(len/num)) frames = hcat(map(x -> extract(x, inds),niis)...) ms = [zeros(size(frames,1)) for i in 1:num] ds = [zeros(size(frames,1)) for i in 1:num] for i = 1:num ms[i] = squeeze(mean(frames[:,1+stp*(i-1): min(stp*i,len)], 2),2) ds[i] = squeeze(var(frames[:,1+stp*(i-1): min(stp*i,len)], 2, mean = ms[i]),2) end return vcat(ms...,ds...) end function get_data(inds, perc::Real = 0.2; transf = s->s[1]=='V',num = 3) """ inds is a point cloud, describing a ROI, perc is the percentage of the dataset Gives you a sequence of points in feature space and labels for them (X , y) """ coll = [] for subj in shuffle(1:NSUBJ) data = readxl(DataFrame, joinpath(ISCLib.PATH,"logs","$subj.xlsx"), "Лист1!A1:G$(NEXP+1)"); data[:Stimul_1] = map(transf,data[:Stimul_1]) data[:Stimul] = map(Int,(ceil.(2*data[:Stimul]))) data[:Response] = map(Int,(ceil.(2*data[:Response]))) ind_end = data[[:Stimul,:Response,:Stimul_1]][2:end-2,:] push!(coll,(subj,ind_end)) end count = 0 X = Vector{Float32}[] y = [] for col in coll subj = col[1] dfr = col[2] debug(subj) idxs = Array(rndsample(dfr,perc)) for i in 1:size(idxs,1) row = view(idxs, i, :) if row[2]- row[1] < num*2 continue else params = get_params(get_niis(subj,row[1]:row[2]),inds, num) push!(X,params) push!(y,row[3]) end end end X,y end function extract_data(;a = .4, b = 0.02, rnd = false, pref = "", num = 3,) if rnd inds = [CartesianIndex((rand(10:80),rand(10:80),rand(10:80))) for i in 1:500] else inds = get_segment(a, b, pref); end X,y = get_data(inds, 0.99, transf = x->x, num = num); X = hcat(X...) y = Vector{typeof(y[1])}(y) h5open("out/$pref|res_x.h5", "w") do file write(file, "data", X) end h5open("out/$pref|res_y.h5", "w") do file write(file,"data", y) end X,y end # extract_data(a = 0.16, b = 0.03, pref = "isc", num=3) extract_data(a = 40, b = 0.03, pref = "tstat_all", num=3) # extract_data(a = 0.16, b = 0.03, pref = "glm", num=3) # extract_data(rnd = true, pref = "rnd")
[ 27, 7856, 261, 480, 29, 1921, 704, 7204, 14, 69, 40952, 62, 37719, 62, 4871, 1958, 198, 14689, 0, 7, 35613, 62, 34219, 11, 2488, 834, 34720, 834, 8, 198, 198, 3500, 3180, 5097, 571, 198, 198, 3500, 5572, 37, 20, 11, 5382, 11, 399, 1532, 25621, 198, 3500, 6060, 35439, 11, 3109, 5276, 5569, 364, 11, 5972, 2667, 11, 7854, 42524, 29668, 11, 20595, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 30531, 8, 198, 198, 8818, 2824, 62, 24432, 7, 23912, 1424, 8, 198, 220, 220, 220, 2628, 796, 685, 5317, 21737, 329, 1312, 796, 352, 25, 47033, 7, 23912, 1424, 15437, 198, 220, 220, 220, 329, 357, 72, 11, 75, 8, 287, 27056, 378, 7, 23912, 1424, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 300, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 24432, 58, 75, 4357, 1312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2628, 198, 437, 198, 198, 138, 112, 7, 521, 3712, 43476, 35610, 15732, 8, 796, 13690, 35610, 17257, 7, 521, 12, 16, 11, 773, 10, 16, 8, 198, 198, 8818, 374, 358, 39873, 7, 7568, 81, 11, 26367, 3712, 15633, 28, 15, 13, 17, 8, 198, 220, 220, 220, 288, 8310, 58, 39873, 7, 33327, 7, 16, 25, 7857, 7, 7568, 81, 11, 352, 36911, 2558, 7, 344, 346, 7, 26367, 1635, 2546, 7, 7568, 81, 11, 352, 22305, 828, 1058, 60, 198, 437, 198, 198, 8818, 318, 11215, 2093, 7, 64, 8, 198, 220, 220, 220, 1303, 3440, 1001, 5154, 341, 198, 220, 220, 220, 9335, 62, 50, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 14, 50, 91, 325, 5154, 341, 62, 20274, 13, 77, 4178, 11074, 1831, 26, 198, 220, 220, 220, 9335, 62, 53, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 14, 53, 91, 325, 5154, 341, 62, 20274, 13, 77, 4178, 11074, 1831, 26, 198, 220, 220, 220, 9335, 62, 50, 53, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 14, 50, 62, 53, 91, 325, 5154, 341, 62, 20274, 13, 77, 4178, 11074, 1831, 26, 628, 220, 220, 220, 9335, 62, 54, 796, 3509, 7, 27932, 62, 50, 11, 27932, 62, 53, 11, 27932, 62, 50, 53, 1776, 198, 220, 220, 220, 1303, 9335, 62, 54, 796, 1976, 27498, 7, 27932, 62, 50, 8, 198, 220, 220, 220, 1303, 4686, 87, 796, 357, 27932, 62, 50, 13, 29, 257, 8, 720, 357, 27932, 62, 53, 13, 29, 257, 8, 198, 220, 220, 220, 1303, 9335, 62, 54, 58, 312, 87, 60, 796, 9335, 62, 50, 53, 58, 312, 87, 60, 198, 220, 220, 220, 1303, 9335, 62, 54, 198, 437, 198, 198, 8818, 1278, 3020, 2093, 7, 64, 8, 198, 220, 220, 220, 1303, 3440, 1001, 5154, 341, 198, 220, 220, 220, 1303, 9335, 62, 54, 796, 299, 557, 324, 7203, 40720, 40720, 6759, 23912, 14, 4743, 76, 62, 411, 14, 4965, 5653, 13, 77, 4178, 4943, 198, 220, 220, 220, 9335, 62, 16, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 40720, 40720, 6759, 23912, 14, 4743, 76, 62, 411, 14, 31361, 62, 18005, 13, 77, 4178, 11074, 1831, 198, 220, 220, 220, 9335, 62, 16, 796, 9335, 62, 16, 24457, 5415, 7, 27932, 62, 16, 58, 27932, 62, 16, 13, 29, 15, 12962, 198, 220, 220, 220, 9335, 62, 17, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 40720, 40720, 6759, 23912, 14, 4743, 76, 62, 411, 14, 31361, 62, 34215, 13, 77, 4178, 11074, 1831, 198, 220, 220, 220, 9335, 62, 17, 796, 9335, 62, 17, 24457, 5415, 7, 27932, 62, 17, 58, 27932, 62, 17, 13, 29, 15, 12962, 198, 220, 220, 220, 9335, 62, 54, 796, 3509, 7, 27932, 62, 16, 11, 27932, 62, 17, 8, 198, 220, 220, 220, 9335, 62, 54, 198, 437, 198, 198, 8818, 651, 62, 325, 5154, 7, 64, 796, 764, 16, 11, 275, 796, 657, 13, 3070, 11, 7694, 2625, 2304, 4943, 198, 220, 220, 220, 3601, 7203, 259, 4943, 198, 220, 220, 220, 611, 7694, 796, 2625, 2304, 1, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 62, 54, 796, 318, 11215, 2093, 7, 64, 8, 198, 220, 220, 220, 2073, 361, 7694, 6624, 366, 926, 395, 1, 8614, 7694, 6624, 366, 83, 14269, 62, 439, 1, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 62, 54, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 14, 51, 14269, 91, 325, 5154, 341, 62, 20274, 13, 77, 4178, 11074, 1831, 26, 198, 220, 220, 220, 2073, 361, 7694, 6624, 366, 4743, 76, 1, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 62, 54, 796, 1278, 3020, 2093, 7, 64, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 20546, 67, 796, 289, 20, 961, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 14, 50, 62, 53, 91, 6381, 862, 13, 71, 20, 1600, 366, 7890, 15341, 628, 220, 220, 220, 1303, 13475, 595, 862, 198, 220, 220, 220, 20546, 67, 796, 2160, 7, 50, 53, 67, 11, 17, 1776, 628, 220, 220, 220, 1117, 796, 4646, 7, 10, 17414, 1136, 62, 32604, 7, 72, 8, 329, 1312, 287, 352, 25, 8035, 10526, 41, 35944, 14, 8035, 10526, 41, 198, 220, 220, 220, 763, 14822, 62, 1659, 62, 7785, 796, 27179, 1758, 7, 31166, 17034, 12195, 50, 53, 67, 828, 9693, 45721, 737, 14, 1150, 198, 220, 220, 220, 763, 14822, 62, 1659, 62, 7785, 58, 271, 12647, 12195, 1073, 14822, 62, 1659, 62, 7785, 15437, 796, 657, 198, 220, 220, 220, 379, 75, 796, 299, 557, 324, 7203, 3, 7, 31, 834, 34720, 834, 20679, 40720, 40720, 13587, 10187, 12, 38208, 3841, 59, 35001, 59, 290, 59, 850, 66, 419, 605, 59, 13204, 59, 379, 75, 1386, 14, 13587, 10187, 38208, 3841, 12, 66, 419, 12, 9806, 1676, 65, 12, 400, 81, 15, 12, 17, 3020, 13, 77, 4178, 13, 34586, 11074, 1831, 628, 220, 220, 220, 1303, 3082, 1133, 9335, 198, 220, 220, 220, 318, 66, 62, 81, 796, 4866, 7, 27932, 62, 54, 1776, 198, 220, 220, 220, 318, 66, 62, 81, 796, 11844, 378, 7, 2304, 62, 81, 8, 198, 220, 220, 220, 318, 66, 62, 81, 58, 0, 19510, 25864, 13, 29, 15, 8, 1222, 357, 27932, 62, 54, 764, 29, 257, 8, 1222, 357, 1073, 14822, 62, 1659, 62, 7785, 220, 764, 29, 65, 1267, 1222, 357, 1150, 764, 29, 1802, 4008, 2361, 28, 15, 26, 628, 220, 220, 220, 37628, 796, 651, 62, 77, 4178, 7, 16, 11, 16, 8, 198, 220, 220, 220, 581, 796, 399, 1532, 25621, 13, 45, 3824, 349, 2454, 7, 8461, 13, 25677, 11, 37628, 13, 2302, 5736, 11, 318, 66, 62, 81, 8, 198, 220, 220, 220, 37628, 13564, 7203, 3, 7, 31, 834, 34720, 834, 20679, 448, 32624, 7, 3866, 69, 8, 62, 81, 13, 77, 4178, 1600, 411, 8, 198, 220, 220, 220, 1303, 651, 5755, 286, 7838, 357, 35836, 768, 20316, 423, 845, 1029, 26196, 8, 198, 220, 220, 220, 1303, 2593, 276, 62, 33967, 796, 763, 14822, 62, 1659, 62, 7785, 19571, 47033, 7, 1073, 14822, 62, 1659, 62, 7785, 8, 628, 198, 220, 220, 220, 1303, 651, 5884, 6805, 198, 220, 220, 220, 14722, 796, 6167, 62, 5589, 3906, 7, 2304, 62, 81, 13, 29, 15, 8, 198, 220, 220, 220, 2628, 796, 8106, 7, 87, 3784, 13664, 7, 87, 8, 29, 1821, 11, 33327, 62, 24432, 7, 23912, 1424, 4008, 198, 220, 220, 220, 773, 82, 796, 651, 62, 20274, 62, 521, 82, 7, 2304, 62, 81, 11, 2628, 8, 198, 220, 220, 220, 773, 82, 198, 437, 198, 198, 8818, 651, 62, 20274, 62, 521, 82, 7, 2304, 62, 81, 11, 2628, 8, 198, 220, 220, 220, 9335, 796, 27807, 274, 7, 2304, 62, 81, 8, 198, 220, 220, 220, 329, 308, 287, 2628, 198, 220, 220, 220, 220, 220, 9335, 58, 70, 60, 796, 2081, 198, 220, 220, 220, 886, 198, 220, 220, 220, 773, 82, 796, 13690, 35610, 15732, 21737, 198, 220, 220, 220, 329, 308, 287, 2628, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1288, 287, 308, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 27932, 58, 417, 60, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 773, 796, 13690, 35610, 15732, 7, 521, 17, 7266, 7, 9693, 45721, 11, 417, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 82, 11, 521, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 7377, 112, 7, 521, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9335, 58, 72, 60, 796, 3991, 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, 773, 82, 198, 437, 198, 198, 8818, 7925, 7, 8461, 11, 773, 82, 8, 198, 220, 220, 220, 8246, 796, 37628, 13, 1831, 198, 220, 220, 220, 503, 796, 1976, 27498, 7, 13664, 7, 521, 82, 4008, 198, 220, 220, 220, 329, 357, 74, 11, 521, 8, 287, 27056, 378, 7, 521, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 7377, 112, 7, 521, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 15853, 8246, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 503, 58, 74, 60, 796, 264, 14, 1983, 198, 220, 220, 220, 886, 198, 220, 220, 220, 503, 198, 437, 198, 198, 8818, 651, 62, 37266, 7, 8461, 271, 11, 773, 82, 11, 997, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 402, 1083, 345, 530, 966, 287, 3895, 2272, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 18896, 220, 796, 4129, 7, 8461, 271, 8, 198, 220, 220, 220, 336, 79, 796, 2558, 7, 344, 346, 7, 11925, 14, 22510, 4008, 198, 220, 220, 220, 13431, 796, 289, 9246, 7, 8899, 7, 87, 4613, 7925, 7, 87, 11, 773, 82, 828, 8461, 271, 8, 23029, 198, 220, 220, 220, 13845, 796, 685, 9107, 418, 7, 7857, 7, 37805, 11, 16, 4008, 329, 1312, 287, 352, 25, 22510, 60, 198, 220, 220, 220, 288, 82, 796, 685, 9107, 418, 7, 7857, 7, 37805, 11, 16, 4008, 329, 1312, 287, 352, 25, 22510, 60, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 22510, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 58, 72, 60, 796, 21229, 7, 32604, 7, 37805, 58, 45299, 16, 10, 301, 79, 9, 7, 72, 12, 16, 2599, 949, 7, 301, 79, 9, 72, 11, 11925, 8, 4357, 362, 828, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 58, 72, 60, 796, 21229, 7, 7785, 7, 37805, 58, 45299, 16, 10, 301, 79, 9, 7, 72, 12, 16, 2599, 949, 7, 301, 79, 9, 72, 11, 11925, 8, 4357, 362, 11, 1612, 796, 13845, 58, 72, 46570, 17, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 410, 9246, 7, 907, 986, 11, 9310, 23029, 198, 437, 198, 198, 8818, 651, 62, 7890, 7, 521, 82, 11, 583, 66, 3712, 15633, 796, 657, 13, 17, 26, 13501, 796, 264, 3784, 82, 58, 16, 60, 855, 6, 53, 3256, 22510, 796, 513, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 773, 82, 318, 257, 966, 6279, 11, 12059, 257, 15107, 40, 11, 583, 66, 318, 262, 5873, 286, 262, 27039, 198, 220, 220, 220, 402, 1083, 345, 257, 8379, 286, 2173, 287, 3895, 2272, 290, 14722, 329, 606, 198, 220, 220, 220, 357, 55, 837, 331, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2927, 796, 17635, 198, 220, 220, 220, 329, 850, 73, 287, 36273, 7, 16, 25, 8035, 10526, 41, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1100, 87, 75, 7, 6601, 19778, 11, 4654, 6978, 7, 1797, 5097, 571, 13, 34219, 553, 6404, 82, 2430, 3, 7266, 73, 13, 87, 7278, 87, 12340, 366, 140, 249, 18849, 21727, 20375, 16, 0, 32, 16, 25, 38, 3, 7, 45, 49864, 10, 16, 8, 15341, 628, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 25, 1273, 320, 377, 62, 16, 60, 796, 3975, 7, 7645, 69, 11, 7890, 58, 25, 1273, 320, 377, 62, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 25, 1273, 320, 377, 60, 796, 3975, 7, 5317, 11, 7, 344, 346, 12195, 17, 9, 7890, 58, 25, 1273, 320, 377, 60, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 25, 31077, 60, 796, 3975, 7, 5317, 11, 7, 344, 346, 12195, 17, 9, 7890, 58, 25, 31077, 60, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 773, 62, 437, 796, 1366, 30109, 25, 1273, 320, 377, 11, 25, 31077, 11, 25, 1273, 320, 377, 62, 16, 60, 7131, 17, 25, 437, 12, 17, 11, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 26000, 11, 7, 7266, 73, 11, 521, 62, 437, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 954, 796, 657, 198, 220, 220, 220, 1395, 796, 20650, 90, 43879, 2624, 92, 21737, 198, 220, 220, 220, 331, 796, 17635, 198, 220, 220, 220, 329, 951, 287, 2927, 198, 220, 220, 220, 220, 220, 220, 220, 850, 73, 796, 951, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 288, 8310, 796, 951, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 7, 7266, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 34223, 796, 15690, 7, 81, 358, 39873, 7, 7568, 81, 11, 525, 66, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 7857, 7, 312, 34223, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 796, 1570, 7, 312, 34223, 11, 1312, 11, 14373, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5752, 58, 17, 45297, 5752, 58, 16, 60, 1279, 997, 9, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 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, 42287, 796, 651, 62, 37266, 7, 1136, 62, 8461, 271, 7, 7266, 73, 11, 808, 58, 16, 5974, 808, 58, 17, 46570, 521, 82, 11, 997, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 55, 11, 37266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 88, 11, 808, 58, 18, 12962, 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, 1395, 11, 88, 198, 437, 198, 198, 8818, 7925, 62, 7890, 7, 26, 64, 796, 764, 19, 11, 275, 796, 657, 13, 2999, 11, 374, 358, 796, 3991, 11, 7694, 796, 366, 1600, 997, 796, 513, 35751, 198, 220, 220, 220, 611, 374, 358, 198, 220, 220, 220, 220, 220, 220, 220, 773, 82, 796, 685, 43476, 35610, 15732, 19510, 25192, 7, 940, 25, 1795, 828, 25192, 7, 940, 25, 1795, 828, 25192, 7, 940, 25, 1795, 22305, 329, 1312, 287, 352, 25, 4059, 60, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 773, 82, 796, 651, 62, 325, 5154, 7, 64, 11, 275, 11, 7694, 1776, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1395, 11, 88, 796, 651, 62, 7890, 7, 521, 82, 11, 657, 13, 2079, 11, 13501, 796, 2124, 3784, 87, 11, 997, 796, 997, 1776, 198, 220, 220, 220, 1395, 796, 289, 9246, 7, 55, 23029, 198, 220, 220, 220, 331, 796, 20650, 90, 4906, 1659, 7, 88, 58, 16, 12962, 92, 7, 88, 8, 198, 220, 220, 220, 289, 20, 9654, 7203, 448, 32624, 3866, 69, 91, 411, 62, 87, 13, 71, 20, 1600, 366, 86, 4943, 466, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 7753, 11, 366, 7890, 1600, 1395, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 289, 20, 9654, 7203, 448, 32624, 3866, 69, 91, 411, 62, 88, 13, 71, 20, 1600, 366, 86, 4943, 466, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 7753, 553, 7890, 1600, 331, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1395, 11, 88, 198, 437, 198, 198, 2, 7925, 62, 7890, 7, 64, 796, 657, 13, 1433, 11, 275, 796, 657, 13, 3070, 11, 7694, 796, 366, 2304, 1600, 997, 28, 18, 8, 198, 2302, 974, 62, 7890, 7, 64, 796, 2319, 11, 275, 796, 657, 13, 3070, 11, 7694, 796, 366, 83, 14269, 62, 439, 1600, 997, 28, 18, 8, 198, 2, 7925, 62, 7890, 7, 64, 796, 657, 13, 1433, 11, 275, 796, 657, 13, 3070, 11, 7694, 796, 366, 4743, 76, 1600, 997, 28, 18, 8, 198, 198, 2, 7925, 62, 7890, 7, 81, 358, 796, 2081, 11, 7694, 796, 366, 81, 358, 4943, 198 ]
1.942684
2,966
<reponame>dennisprangle/ABCDistances.jl using ABCDistances using Base.Test include("abc.jl")
[ 27, 7856, 261, 480, 29, 67, 10679, 1050, 9248, 14, 24694, 20344, 1817, 13, 20362, 198, 3500, 9738, 20344, 1817, 198, 3500, 7308, 13, 14402, 198, 198, 17256, 7203, 39305, 13, 20362, 4943, 198 ]
2.764706
34
<filename>test/Solvers/cdcs_tests.jl include("solver_preamble.jl") import CDCS # Iterations: # dsos_concave_then_convex_cubic : > 2000, < 3000 # chebyshev : > 12000, < 12500 factory = optimizer_with_attributes(CDCS.Optimizer, "verbose" => 0, "maxIter" => 12500) # chebyshev : > 2e-3, < 3e-3 config = MOI.Test.TestConfig(atol=3e-3, rtol=3e-3, query=false) @testset "Linear" begin Tests.linear_test(factory, config) end @testset "SOC" begin Tests.soc_test(factory, config, [ "sdsos_options_pricing" ]) end @testset "SDP" begin Tests.sd_test(factory, config, [ "sos_options_pricing" ]) end
[ 27, 34345, 29, 9288, 14, 36949, 690, 14, 10210, 6359, 62, 41989, 13, 20362, 198, 17256, 7203, 82, 14375, 62, 79, 1476, 903, 13, 20362, 4943, 198, 11748, 6458, 7902, 198, 2, 40806, 602, 25, 198, 2, 288, 82, 418, 62, 1102, 66, 1015, 62, 8524, 62, 1102, 303, 87, 62, 66, 549, 291, 1058, 1875, 4751, 11, 1279, 20343, 198, 2, 1125, 48209, 258, 85, 1058, 1875, 1105, 830, 11, 1279, 1105, 4059, 198, 69, 9548, 796, 6436, 7509, 62, 4480, 62, 1078, 7657, 7, 8610, 7902, 13, 27871, 320, 7509, 11, 366, 19011, 577, 1, 5218, 657, 11, 366, 9806, 29993, 1, 5218, 1105, 4059, 8, 198, 2, 1125, 48209, 258, 85, 1058, 1875, 362, 68, 12, 18, 11, 1279, 513, 68, 12, 18, 198, 11250, 796, 13070, 40, 13, 14402, 13, 14402, 16934, 7, 265, 349, 28, 18, 68, 12, 18, 11, 374, 83, 349, 28, 18, 68, 12, 18, 11, 12405, 28, 9562, 8, 198, 31, 9288, 2617, 366, 14993, 451, 1, 2221, 198, 220, 220, 220, 30307, 13, 29127, 62, 9288, 7, 69, 9548, 11, 4566, 8, 198, 437, 198, 31, 9288, 2617, 366, 50, 4503, 1, 2221, 198, 220, 220, 220, 30307, 13, 35634, 62, 9288, 7, 69, 9548, 11, 4566, 11, 685, 198, 220, 220, 220, 220, 220, 220, 220, 366, 82, 9310, 418, 62, 25811, 62, 1050, 6345, 1, 198, 220, 220, 220, 33761, 198, 437, 198, 31, 9288, 2617, 366, 50, 6322, 1, 2221, 198, 220, 220, 220, 30307, 13, 21282, 62, 9288, 7, 69, 9548, 11, 4566, 11, 685, 198, 220, 220, 220, 220, 220, 220, 220, 366, 82, 418, 62, 25811, 62, 1050, 6345, 1, 198, 220, 220, 220, 33761, 198, 437, 198 ]
2.193662
284
<reponame>UnofficialJuliaMirror/ApproxFunBase.jl-fbd15aa5-315a-5a7d-a8a4-24992e37be05 ## Linear Solve for TYP in (:Fun,:StridedVector,:AbstractVector,:Any) @eval function \(A::Operator,b::$TYP;kwds...) if isambiguous(domainspace(A)) A=choosespaces(A,b) if isambiguous(domainspace(A)) error("Cannot infer spaces") end \(A,b;kwds...) else Fun(domainspace(A), ldiv_coefficients(A,coefficients(b,rangespace(A));kwds...)) end end end """ \\(A::Operator,b;tolerance=tol,maxlength=n) solves a linear equation, usually differential equation, where `A` is an operator or array of operators and `b` is a `Fun` or array of funs. The result `u` will approximately satisfy `A*u = b`. """ \(::Operator,_) # Solve each column separately function \(A::Operator, B::AbstractMatrix; kwds...) ds=domainspace(A) if isambiguous(ds) return choosespaces(A,B[:,1])\B end ret=Matrix{VFun{typeof(ds), promote_type(eltype(A),mapreduce(cfstype,promote_type,B))}}(undef,1,size(B,2)) QR = factorize(A) # reuse computation for j=1:size(B,2) ret[1,j] = \(QR,B[:,j];kwds...) end Fun(ret) end \(A::Operator,B::MatrixFun;kwds...) = \(A,Array(B);kwds...) ldiv_coefficients(A::Operator,b;kwds...) = ldiv_coefficients(qr(A),b;kwds...) \(A::Operator,B::Operator) = TimesOperator(inv(A),B) #TODO: Remove these when interlace is automatic for TYP in (:Vector,:Matrix) @eval begin \(A::$TYP{OO},b::StridedVecOrMat;kwds...) where {OO<:Operator} = \(interlace(A),b;kwds...) \(A::$TYP{OO},b::AbstractVecOrMat;kwds...) where {OO<:Operator} = \(interlace(A),b;kwds...) \(A::$TYP{OO},b::Fun;kwds...) where {OO<:Operator} = \(interlace(A),b;kwds...) end end ldiv_coefficients(A::AbstractArray{OO},b;kwds...) where {OO<:Operator} = ldiv_coefficients(interlace(A),b;kwds...)
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 4677, 13907, 24629, 14881, 13, 20362, 12, 69, 17457, 1314, 7252, 20, 12, 27936, 64, 12, 20, 64, 22, 67, 12, 64, 23, 64, 19, 12, 1731, 41561, 68, 2718, 1350, 2713, 198, 2235, 44800, 4294, 303, 198, 1640, 24412, 47, 287, 357, 25, 24629, 11, 25, 13290, 1384, 38469, 11, 25, 23839, 38469, 11, 25, 7149, 8, 198, 220, 220, 220, 2488, 18206, 2163, 16792, 32, 3712, 18843, 1352, 11, 65, 3712, 3, 9936, 47, 26, 46265, 9310, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 4131, 29709, 7, 3438, 1299, 10223, 7, 32, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 28, 6679, 4629, 43076, 7, 32, 11, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 4131, 29709, 7, 3438, 1299, 10223, 7, 32, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 13249, 9029, 4943, 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, 16792, 32, 11, 65, 26, 46265, 9310, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11138, 7, 3438, 1299, 10223, 7, 32, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 7146, 62, 1073, 41945, 7, 32, 11, 1073, 41945, 7, 65, 11, 81, 6231, 10223, 7, 32, 18125, 46265, 9310, 986, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 26867, 7, 32, 3712, 18843, 1352, 11, 65, 26, 83, 37668, 28, 83, 349, 11, 9806, 13664, 28, 77, 8, 198, 198, 82, 9010, 257, 14174, 16022, 11, 3221, 22577, 16022, 11, 810, 4600, 32, 63, 318, 281, 10088, 198, 273, 7177, 286, 12879, 290, 4600, 65, 63, 318, 257, 4600, 24629, 63, 393, 7177, 286, 1257, 82, 13, 220, 383, 1255, 4600, 84, 63, 198, 10594, 6702, 15959, 4600, 32, 9, 84, 796, 275, 44646, 198, 37811, 198, 59, 7, 3712, 18843, 1352, 11, 62, 8, 198, 198, 2, 4294, 303, 1123, 5721, 13869, 198, 8818, 16792, 32, 3712, 18843, 1352, 11, 347, 3712, 23839, 46912, 26, 479, 86, 9310, 23029, 198, 220, 220, 220, 288, 82, 28, 3438, 1299, 10223, 7, 32, 8, 198, 220, 220, 220, 611, 318, 4131, 29709, 7, 9310, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 19769, 43076, 7, 32, 11, 33, 58, 45299, 16, 12962, 59, 33, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1005, 28, 46912, 90, 53, 24629, 90, 4906, 1659, 7, 9310, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7719, 62, 4906, 7, 417, 4906, 7, 32, 828, 8899, 445, 7234, 7, 12993, 301, 2981, 11, 16963, 1258, 62, 4906, 11, 33, 4008, 11709, 7, 917, 891, 11, 16, 11, 7857, 7, 33, 11, 17, 4008, 628, 220, 220, 220, 42137, 796, 5766, 1096, 7, 32, 8, 1303, 32349, 29964, 198, 220, 220, 220, 329, 474, 28, 16, 25, 7857, 7, 33, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 58, 16, 11, 73, 60, 796, 16792, 48, 49, 11, 33, 58, 45299, 73, 11208, 46265, 9310, 23029, 198, 220, 220, 220, 886, 198, 220, 220, 220, 11138, 7, 1186, 8, 198, 437, 198, 198, 59, 7, 32, 3712, 18843, 1352, 11, 33, 3712, 46912, 24629, 26, 46265, 9310, 23029, 796, 16792, 32, 11, 19182, 7, 33, 1776, 46265, 9310, 23029, 198, 198, 335, 452, 62, 1073, 41945, 7, 32, 3712, 18843, 1352, 11, 65, 26, 46265, 9310, 23029, 796, 300, 7146, 62, 1073, 41945, 7, 80, 81, 7, 32, 828, 65, 26, 46265, 9310, 23029, 198, 198, 59, 7, 32, 3712, 18843, 1352, 11, 33, 3712, 18843, 1352, 8, 796, 3782, 18843, 1352, 7, 16340, 7, 32, 828, 33, 8, 198, 198, 2, 51, 3727, 46, 25, 17220, 777, 618, 987, 27077, 318, 11353, 198, 1640, 24412, 47, 287, 357, 25, 38469, 11, 25, 46912, 8, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 16792, 32, 3712, 3, 9936, 47, 90, 6684, 5512, 65, 3712, 13290, 1384, 53, 721, 5574, 19044, 26, 46265, 9310, 23029, 810, 1391, 6684, 27, 25, 18843, 1352, 92, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16792, 3849, 27077, 7, 32, 828, 65, 26, 46265, 9310, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 16792, 32, 3712, 3, 9936, 47, 90, 6684, 5512, 65, 3712, 23839, 53, 721, 5574, 19044, 26, 46265, 9310, 23029, 810, 1391, 6684, 27, 25, 18843, 1352, 92, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16792, 3849, 27077, 7, 32, 828, 65, 26, 46265, 9310, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 16792, 32, 3712, 3, 9936, 47, 90, 6684, 5512, 65, 3712, 24629, 26, 46265, 9310, 23029, 810, 1391, 6684, 27, 25, 18843, 1352, 92, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16792, 3849, 27077, 7, 32, 828, 65, 26, 46265, 9310, 23029, 198, 220, 220, 220, 886, 198, 437, 198, 335, 452, 62, 1073, 41945, 7, 32, 3712, 23839, 19182, 90, 6684, 5512, 65, 26, 46265, 9310, 23029, 810, 1391, 6684, 27, 25, 18843, 1352, 92, 796, 198, 220, 220, 220, 300, 7146, 62, 1073, 41945, 7, 3849, 27077, 7, 32, 828, 65, 26, 46265, 9310, 23029, 198 ]
2.084551
958
<filename>docs/make.jl using Photodynamics using Documenter DocMeta.setdocmeta!(Photodynamics, :DocTestSetup, :(using Photodynamics); recursive=true) makedocs(; modules=[Photodynamics], authors="<NAME> <<EMAIL>> and contributors", repo="https://github.com/langfzac/Photodynamics.jl/blob/{commit}{path}#{line}", sitename="Photodynamics.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", canonical="https://langfzac.github.io/Photodynamics.jl", assets=String[], ), pages=[ "Home" => "index.md", ], ) deploydocs(; repo="github.com/langfzac/Photodynamics.jl", devbranch="main" )
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 5919, 44124, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 27248, 44124, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 5919, 44124, 1776, 45115, 28, 7942, 8, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 27248, 44124, 4357, 198, 220, 220, 220, 7035, 2625, 27, 20608, 29, 9959, 27630, 4146, 4211, 290, 20420, 1600, 198, 220, 220, 220, 29924, 2625, 5450, 1378, 12567, 13, 785, 14, 17204, 69, 49897, 14, 27248, 44124, 13, 20362, 14, 2436, 672, 14, 90, 41509, 18477, 6978, 92, 2, 90, 1370, 92, 1600, 198, 220, 220, 220, 1650, 12453, 2625, 27248, 44124, 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, 17204, 69, 49897, 13, 12567, 13, 952, 14, 27248, 44124, 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, 16589, 198, 8, 198, 198, 2934, 1420, 31628, 7, 26, 198, 220, 220, 220, 29924, 2625, 12567, 13, 785, 14, 17204, 69, 49897, 14, 27248, 44124, 13, 20362, 1600, 198, 220, 220, 220, 1614, 1671, 3702, 2625, 12417, 1, 198, 8, 198 ]
2.472527
273
<gh_stars>1-10 instructions = readlines("day12/input.txt") mutable struct Ship x::Int y::Int angle::Int end ship = Ship(0, 0, 0) function step_instruction(instruction) global ship command, amount = instruction[1], parse(Int, instruction[2:end]) if command == 'N' ship.y += amount elseif command == 'S' ship.y -= amount elseif command == 'E' ship.x += amount elseif command == 'W' ship.x -= amount elseif command == 'L' ship.angle = mod((ship.angle + amount), 360) elseif command == 'R' ship.angle = mod((ship.angle - amount), 360) elseif command == 'F' directions = Dict(90 => 'N', 180 => 'W', 270 => 'S', 0 => 'E') step_instruction(directions[ship.angle] * string(amount)) end end for ins in instructions step_instruction(ins) end println(abs(ship.x)+abs(ship.y))
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 259, 7249, 507, 796, 1100, 6615, 7203, 820, 1065, 14, 15414, 13, 14116, 4943, 198, 198, 76, 18187, 2878, 16656, 198, 220, 220, 220, 2124, 3712, 5317, 198, 220, 220, 220, 331, 3712, 5317, 198, 220, 220, 220, 9848, 3712, 5317, 198, 437, 198, 198, 6720, 796, 16656, 7, 15, 11, 657, 11, 657, 8, 198, 198, 8818, 2239, 62, 8625, 2762, 7, 8625, 2762, 8, 198, 220, 220, 220, 3298, 4074, 198, 220, 220, 220, 3141, 11, 2033, 796, 12064, 58, 16, 4357, 21136, 7, 5317, 11, 12064, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 611, 3141, 6624, 705, 45, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 88, 15853, 2033, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 50, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 88, 48185, 2033, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 36, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 87, 15853, 2033, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 54, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 87, 48185, 2033, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 43, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 9248, 796, 953, 19510, 6720, 13, 9248, 1343, 2033, 828, 11470, 8, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 49, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4074, 13, 9248, 796, 953, 19510, 6720, 13, 9248, 532, 2033, 828, 11470, 8, 198, 220, 220, 220, 2073, 361, 3141, 6624, 705, 37, 6, 198, 220, 220, 220, 220, 220, 220, 220, 11678, 796, 360, 713, 7, 3829, 5218, 705, 45, 3256, 11546, 5218, 705, 54, 3256, 20479, 5218, 705, 50, 3256, 657, 5218, 705, 36, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2239, 62, 8625, 2762, 7, 12942, 507, 58, 6720, 13, 9248, 60, 1635, 4731, 7, 17287, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 1640, 1035, 287, 7729, 198, 220, 220, 220, 2239, 62, 8625, 2762, 7, 1040, 8, 198, 437, 198, 198, 35235, 7, 8937, 7, 6720, 13, 87, 47762, 8937, 7, 6720, 13, 88, 4008 ]
2.370667
375
using Suppressor using StableRNGs using Term using Test import Term: console_width const RNG = StableRNG(1337) include("__test_utils.jl") using TimerOutputs: TimerOutputs, @timeit const TIMEROUTPUT = TimerOutputs.TimerOutput() dotest = console_width() ≥ 88 # ? 1 - text utils tprint("{bold green}Running: '01_test_text_utils.jl' {/bold green}") @time @timeit_include("01_test_text_utils.jl") # ? 2 ansi tprint("\n\n{bold green}Running: '02_test_ansi.jl' {/bold green}") # ansi & col' {/bold green}") @time @timeit_include("02_test_ansi.jl") # ? 3 measure tprint("\n\n{bold green}Running: '03_test_measure.jl' {/bold green}") @time @timeit_include("03_test_measure.jl") # ? 4 style tprint("\n\n{bold green}Running: '04_test_style.jl' {/bold green}") @time @timeit_include("04_test_style.jl") # ? 5 macros tprint("\n\n{bold green}Running: '05_test_macros.jl' {/bold green}") @time @timeit_include("05_test_macros.jl") # ? 6a box tprint("\n\n{bold green}Running: '6a_test_box.jl' {/bold green}") @time @timeit_include("6a_test_box.jl") # ? 6 renderables tprint("\n\n{bold green}Running: '06_test_renderables.jl' {/bold green}") @time @timeit_include("06_test_renderables.jl") # ? 7 panel tprint("\n\n{bold green}Running: '07_test_panel.jl' {/bold green}") @time @timeit_include("07_test_panel.jl") # ? 8 layout tprint("\n\n{bold green}Running: '08_test_layout.jl' {/bold green}") @time @timeit_include("08_test_layout.jl") # ? 9 inspect tprint("\n\n{bold green}Running: '09_test_inspect.jl' {/bold green}") @time @timeit_include("09_test_inspect.jl") # ? 11 console tprint("\n\n{bold green}Running: '11_test_console.jl' {/bold green}") @time @timeit_include("11_test_console.jl") # ? 12 logging tprint("\n\n{bold green}Running: '12_test_logging.jl' {/bold green}") @time @timeit_include("12_test_logging.jl") # ? 14 highlight tprint("\n\n{bold green}Running: '14_test_highlight.jl' {/bold green}") @time @timeit_include("14_test_highlight.jl") # ? 15 progress tprint("\n\n{bold green}Running: '15_test_progress.jl' {/bold green}") @time @timeit_include("15_test_progress.jl") # ? 16 Tree tprint("\n\n{bold green}Running: '16_test_tree.jl' {/bold green}") @time @timeit_include("16_test_tree.jl") # ? 17 Dendogram tprint("\n\n{bold green}Running: '17_test_dendogram.jl' {/bold green}") @time @timeit_include("17_test_dendogram.jl") # ? 18 Table tprint("\n\n{bold green}Running: '18_test_table.jl' {/bold green}") @time @timeit_include("18_test_table.jl") # ? 19 Repr tprint("\n\n{bold green}Running: '19_test_repr.jl' {/bold green}") @time @timeit_include("19_test_repr.jl") # ? 20 Compositor tprint("\n\n{bold green}Running: '20_test_compositor.jl' {/bold green}") @time @timeit_include("20_test_compositor.jl") # ? 21 Markdown tprint("\n\n{bold green}Running: '21_test_markdown.jl' {/bold green}") @time @timeit_include("21_test_markdown.jl") # ? 22 Theme tprint("\n\n{bold green}Running: '22_test_theme.jl' {/bold green}") @time @timeit_include("22_test_theme.jl") # ? 999 EXAMPLES tprint("\n\n{bold green}Running: '999_test_examples.jl' {/bold green}") @time @timeit_include("999_test_examples.jl") # ? 99 ERRORS tprint("\n\n{bold green}Running: '99_test_errors.jl' {/bold green}") @time @timeit_include("99_test_errors.jl") show(TIMEROUTPUT; compact = true, sortby = :firstexec) println("\n")
[ 3500, 8105, 44292, 198, 3500, 520, 540, 49, 10503, 82, 198, 3500, 35118, 198, 3500, 6208, 198, 11748, 35118, 25, 8624, 62, 10394, 198, 198, 9979, 371, 10503, 796, 520, 540, 49, 10503, 7, 1485, 2718, 8, 198, 198, 17256, 7203, 834, 9288, 62, 26791, 13, 20362, 4943, 198, 198, 3500, 5045, 263, 26410, 82, 25, 5045, 263, 26410, 82, 11, 2488, 2435, 270, 198, 9979, 31742, 1137, 2606, 7250, 3843, 796, 5045, 263, 26410, 82, 13, 48801, 26410, 3419, 198, 198, 26518, 395, 796, 8624, 62, 10394, 3419, 26870, 9193, 198, 198, 2, 5633, 352, 220, 532, 2420, 3384, 4487, 198, 83, 4798, 7203, 90, 36575, 4077, 92, 28768, 25, 705, 486, 62, 9288, 62, 5239, 62, 26791, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 486, 62, 9288, 62, 5239, 62, 26791, 13, 20362, 4943, 198, 198, 2, 5633, 362, 9093, 72, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2999, 62, 9288, 62, 504, 72, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 220, 1303, 9093, 72, 1222, 951, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2999, 62, 9288, 62, 504, 72, 13, 20362, 4943, 198, 198, 2, 5633, 513, 3953, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 3070, 62, 9288, 62, 1326, 5015, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 3070, 62, 9288, 62, 1326, 5015, 13, 20362, 4943, 198, 198, 2, 5633, 604, 3918, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 3023, 62, 9288, 62, 7635, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 3023, 62, 9288, 62, 7635, 13, 20362, 4943, 198, 198, 2, 5633, 642, 34749, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2713, 62, 9288, 62, 20285, 4951, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2713, 62, 9288, 62, 20285, 4951, 13, 20362, 4943, 198, 198, 2, 5633, 718, 64, 3091, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 21, 64, 62, 9288, 62, 3524, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 21, 64, 62, 9288, 62, 3524, 13, 20362, 4943, 198, 198, 2, 5633, 718, 8543, 2977, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 3312, 62, 9288, 62, 13287, 2977, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 3312, 62, 9288, 62, 13287, 2977, 13, 20362, 4943, 198, 198, 2, 5633, 767, 6103, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2998, 62, 9288, 62, 35330, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2998, 62, 9288, 62, 35330, 13, 20362, 4943, 198, 198, 2, 5633, 807, 12461, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2919, 62, 9288, 62, 39786, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2919, 62, 9288, 62, 39786, 13, 20362, 4943, 198, 198, 2, 220, 5633, 860, 10104, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2931, 62, 9288, 62, 1040, 806, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2931, 62, 9288, 62, 1040, 806, 13, 20362, 4943, 198, 198, 2, 5633, 1367, 8624, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1157, 62, 9288, 62, 41947, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1157, 62, 9288, 62, 41947, 13, 20362, 4943, 198, 198, 2, 5633, 1105, 18931, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1065, 62, 9288, 62, 6404, 2667, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1065, 62, 9288, 62, 6404, 2667, 13, 20362, 4943, 198, 198, 2, 5633, 1478, 7238, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1415, 62, 9288, 62, 8929, 2971, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1415, 62, 9288, 62, 8929, 2971, 13, 20362, 4943, 198, 198, 2, 5633, 1315, 4371, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1314, 62, 9288, 62, 33723, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1314, 62, 9288, 62, 33723, 13, 20362, 4943, 198, 198, 2, 5633, 1467, 12200, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1433, 62, 9288, 62, 21048, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1433, 62, 9288, 62, 21048, 13, 20362, 4943, 198, 198, 2, 5633, 1596, 360, 437, 21857, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1558, 62, 9288, 62, 67, 437, 21857, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1558, 62, 9288, 62, 67, 437, 21857, 13, 20362, 4943, 198, 198, 2, 5633, 1248, 8655, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1507, 62, 9288, 62, 11487, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1507, 62, 9288, 62, 11487, 13, 20362, 4943, 198, 198, 2, 5633, 678, 1432, 81, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1129, 62, 9288, 62, 260, 1050, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1129, 62, 9288, 62, 260, 1050, 13, 20362, 4943, 198, 198, 2, 5633, 1160, 29936, 2072, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1238, 62, 9288, 62, 785, 1930, 2072, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1238, 62, 9288, 62, 785, 1930, 2072, 13, 20362, 4943, 198, 198, 2, 5633, 2310, 2940, 2902, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2481, 62, 9288, 62, 4102, 2902, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2481, 62, 9288, 62, 4102, 2902, 13, 20362, 4943, 198, 198, 2, 5633, 2534, 26729, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 1828, 62, 9288, 62, 43810, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 1828, 62, 9288, 62, 43810, 13, 20362, 4943, 198, 198, 2, 5633, 36006, 7788, 2390, 6489, 1546, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 17032, 62, 9288, 62, 1069, 12629, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 17032, 62, 9288, 62, 1069, 12629, 13, 20362, 4943, 198, 198, 2, 5633, 7388, 33854, 50, 198, 83, 4798, 7203, 59, 77, 59, 77, 90, 36575, 4077, 92, 28768, 25, 705, 2079, 62, 9288, 62, 48277, 13, 20362, 6, 1391, 14, 36575, 4077, 92, 4943, 198, 31, 2435, 2488, 2435, 270, 62, 17256, 7203, 2079, 62, 9288, 62, 48277, 13, 20362, 4943, 198, 198, 12860, 7, 51, 3955, 1137, 2606, 7250, 3843, 26, 16001, 796, 2081, 11, 3297, 1525, 796, 1058, 11085, 18558, 8, 198, 35235, 7203, 59, 77, 4943, 198 ]
2.416424
1,376
module HCModelKit using OrderedCollections: OrderedDict using StaticArrays: @SVector, @SMatrix import LinearAlgebra: det, dot import Latexify export Expression, Constant, Variable, Operation export @var, @unique_var, evaluate, subs, variables, differentiate, monomials, Compiled, CompiledSystem, CompiledHomotopy, compile, interpret, interpreted, System, Homotopy, evaluate, evaluate!, evaluate_gradient, evaluate_jacobian, evaluate_jacobian!, jacobian, jacobian!, dt, dt!, dt_jacobian, dt_jacobian! include("expression.jl") include("codegen.jl") end # module
[ 21412, 27327, 17633, 20827, 198, 198, 3500, 14230, 1068, 5216, 26448, 25, 14230, 1068, 35, 713, 198, 3500, 36125, 3163, 20477, 25, 2488, 50, 38469, 11, 2488, 12310, 265, 8609, 198, 198, 11748, 44800, 2348, 29230, 25, 1062, 11, 16605, 198, 11748, 18319, 87, 1958, 198, 198, 39344, 41986, 11, 20217, 11, 35748, 11, 14680, 198, 198, 39344, 2488, 7785, 11, 198, 220, 220, 220, 220, 220, 220, 2488, 34642, 62, 7785, 11, 198, 220, 220, 220, 220, 220, 220, 13446, 11, 198, 220, 220, 220, 220, 220, 220, 6352, 11, 198, 220, 220, 220, 220, 220, 220, 9633, 11, 198, 220, 220, 220, 220, 220, 220, 28754, 11, 198, 220, 220, 220, 220, 220, 220, 937, 296, 8231, 11, 198, 220, 220, 220, 220, 220, 220, 3082, 3902, 11, 198, 220, 220, 220, 220, 220, 220, 3082, 3902, 11964, 11, 198, 220, 220, 220, 220, 220, 220, 3082, 3902, 28718, 313, 11081, 11, 198, 220, 220, 220, 220, 220, 220, 17632, 11, 198, 220, 220, 220, 220, 220, 220, 6179, 11, 198, 220, 220, 220, 220, 220, 220, 16173, 11, 198, 220, 220, 220, 220, 220, 220, 4482, 11, 198, 220, 220, 220, 220, 220, 220, 8074, 313, 11081, 11, 198, 220, 220, 220, 220, 220, 220, 13446, 11, 198, 220, 220, 220, 220, 220, 220, 13446, 28265, 198, 220, 220, 220, 220, 220, 220, 13446, 62, 49607, 11, 198, 220, 220, 220, 220, 220, 220, 13446, 62, 30482, 672, 666, 11, 198, 220, 220, 220, 220, 220, 220, 13446, 62, 30482, 672, 666, 28265, 198, 220, 220, 220, 220, 220, 220, 474, 330, 672, 666, 11, 198, 220, 220, 220, 220, 220, 220, 474, 330, 672, 666, 28265, 198, 220, 220, 220, 220, 220, 220, 288, 83, 11, 198, 220, 220, 220, 220, 220, 220, 288, 83, 28265, 198, 220, 220, 220, 220, 220, 220, 288, 83, 62, 30482, 672, 666, 11, 198, 220, 220, 220, 220, 220, 220, 288, 83, 62, 30482, 672, 666, 0, 198, 198, 17256, 7203, 38011, 13, 20362, 4943, 198, 17256, 7203, 8189, 5235, 13, 20362, 4943, 198, 198, 437, 1303, 8265, 198 ]
2.117143
350
<reponame>nkhedekar/Caesar.jl<gh_stars>100-1000 function sendCmd(cl::TCPSocket, cmd::ASCIIString) println(cl, cmd) cmd == "QUIT" ? close(cl) : readline(cl) end function getParticles(cl::TCPSocket, lbl::ASCIIString) res = sendCmd(cl, "GETPARTICLES $(lbl)") rows = split(res[1:(end-1)],';') V = readdlm(IOBuffer(rows[1]),',') for i in 2:length(rows) v = readdlm(IOBuffer(rows[i]),',') V = [V;v] end return V end cl = connect(60001) println("connected") sendCmd(cl, "INIT") sendCmd(cl, "ODOMETRY 1 2 10.0 0.0 0.0 0.1 0 0 0.05 0 0.05") sendCmd(cl, "ODOMETRY 2 3 10.0 0.0 0.0 0.1 0 0 0.05 0 0.05") Vb = getParticles(cl, "x3"); sendCmd(cl, "SOLVETREE") Va = getParticles(cl, "x3"); @show size(Va) sendCmd(cl, "LANDMBR 3 4 $(pi/2) 10.0 0.01 0 0.5") sendCmd(cl, "SOLVETREE") l1 = getParticles(cl, "l1"); @show size(l1) sendCmd(cl, "QUIT") close(cl)
[ 27, 7856, 261, 480, 29, 77, 74, 704, 988, 283, 14, 24334, 18964, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 628, 198, 8818, 3758, 40109, 7, 565, 3712, 4825, 3705, 5459, 11, 23991, 3712, 42643, 3978, 10100, 8, 198, 220, 44872, 7, 565, 11, 23991, 8, 198, 220, 23991, 6624, 366, 10917, 2043, 1, 5633, 220, 1969, 7, 565, 8, 1058, 1100, 1370, 7, 565, 8, 198, 437, 198, 198, 8818, 651, 7841, 2983, 7, 565, 3712, 4825, 3705, 5459, 11, 300, 2436, 3712, 42643, 3978, 10100, 8, 198, 220, 581, 796, 3758, 40109, 7, 565, 11, 366, 18851, 30709, 2149, 28378, 29568, 75, 2436, 8, 4943, 198, 220, 15274, 796, 6626, 7, 411, 58, 16, 37498, 437, 12, 16, 15437, 4032, 26, 11537, 198, 220, 569, 796, 1100, 25404, 76, 7, 9399, 28632, 7, 8516, 58, 16, 46570, 3256, 11537, 198, 220, 329, 1312, 287, 362, 25, 13664, 7, 8516, 8, 198, 220, 220, 220, 410, 796, 1100, 25404, 76, 7, 9399, 28632, 7, 8516, 58, 72, 46570, 3256, 11537, 198, 220, 220, 220, 569, 796, 685, 53, 26, 85, 60, 198, 220, 886, 198, 220, 1441, 569, 198, 437, 628, 198, 565, 796, 2018, 7, 8054, 486, 8, 198, 35235, 7203, 15236, 4943, 198, 21280, 40109, 7, 565, 11, 366, 1268, 2043, 4943, 198, 21280, 40109, 7, 565, 11, 366, 3727, 2662, 2767, 18276, 352, 362, 838, 13, 15, 657, 13, 15, 657, 13, 15, 657, 13, 16, 657, 657, 657, 13, 2713, 657, 657, 13, 2713, 4943, 198, 21280, 40109, 7, 565, 11, 366, 3727, 2662, 2767, 18276, 362, 513, 838, 13, 15, 657, 13, 15, 657, 13, 15, 657, 13, 16, 657, 657, 657, 13, 2713, 657, 657, 13, 2713, 4943, 198, 53, 65, 796, 651, 7841, 2983, 7, 565, 11, 366, 87, 18, 15341, 198, 21280, 40109, 7, 565, 11, 366, 50, 3535, 53, 2767, 11587, 4943, 198, 33906, 796, 651, 7841, 2983, 7, 565, 11, 366, 87, 18, 15341, 198, 31, 12860, 2546, 7, 33906, 8, 198, 21280, 40109, 7, 565, 11, 366, 28182, 10744, 49, 513, 604, 29568, 14415, 14, 17, 8, 838, 13, 15, 657, 13, 486, 657, 657, 13, 20, 4943, 198, 21280, 40109, 7, 565, 11, 366, 50, 3535, 53, 2767, 11587, 4943, 198, 75, 16, 796, 651, 7841, 2983, 7, 565, 11, 366, 75, 16, 15341, 198, 31, 12860, 2546, 7, 75, 16, 8, 628, 198, 21280, 40109, 7, 565, 11, 366, 10917, 2043, 4943, 198, 19836, 7, 565, 8, 198 ]
2.103614
415
module GML using ...ParserCombinator using Compat export parse_raw, parse_dict, GMLError # symbol required in 0.3 # both work in 0.4 # symbol gives deprecation warning in 0.5 Symbol_ = VERSION >= v"0.5-" ? Symbol : symbol function mk_parser(string_input) # this is such a simple grammar that we don't need backtracking, so we can # use Seq! et al, and Error for useful diagnostics. # the only tricky things are getting the spaces right so that matching # spaces doesn't commit us to anything unexpected, and placing errors only # when we're sure we're wrong (you can't have one in the definition of # key, for example, because that can fail...). @with_names begin expect(x) = Error("Expected $x") pint(x) = parse(Int64, x) pflt(x) = parse(Float64, x) comment = P"(#.*)?" # we need string input as we match multiple lines if string_input && ParserCombinator.FAST_REGEX wspace = "([\t ]+|[\r\n]+(#.*)?)" wstar(x) = string(x, wspace, "*") wplus(x) = string(x, wspace, "+") space = ~Pattern(wplus("")) spc = ~Pattern(wstar("")) open = ~Pattern(wstar("\\[")) close = ~Pattern(wstar("]")) key = Pattern(wplus("([a-zA-Z][a-zA-Z0-9]*)"), 1) > Symbol_ int = Pattern(wstar("((\\+|-)?\\d+)"), 1) > pint real = Pattern(wstar("((\\+|-)?\\d+.\\d+((E|e)(\\+|-)?\\d+)?)"), 1) > pflt str = Pattern(wstar("\"([^\"]*)\""), 1) else wspace = Alt!(P"[\t ]+", Seq!(P"[\r\n]+", comment)) space = wspace[1:end,:!] spc = wspace[0:end,:!] open = Seq!(E"[", spc) close = Seq!(E"]", spc) key = Seq!(p"[a-zA-Z][a-zA-Z0-9]*", space) > Symbol_ int = Seq!(p"(\+|-)?\d+", spc) > pint real = Seq!(p"(\+|-)?\d+.\d+((E|e)(\+|-)?\d+)?", spc) > pflt str = Seq!(Pattern("\"([^\"]*)\"", 1), spc) end list = Delayed() sublist = Seq!(open, list, Alt!(close, expect("]"))) value = Alt!(real, int, str, sublist, expect("value")) element = Seq!(key, value) > tuple list.matcher = Nullable{Matcher}(element[0:end,:!] > vcat) # first line comment must be explicit (no previous linefeed) Seq!(comment, spc, list, Alt!(Seq!(spc, Eos()), expect("key"))) end end # this returns the "natural" representation as nested arrays and tuples function parse_raw(s; debug=false) parser = mk_parser(isa(s, AbstractString)) try if ParserCombinator.FAST_REGEX (debug ? parse_one_dbg : parse_one)(s, Trace(parser); debug=debug) else (debug ? parse_lines_dbg : parse_lines)(s, Trace(parser); debug=debug) end catch x if (debug) Base.show_backtrace(STDOUT, catch_backtrace()) end rethrow() end end # (semi) structured model of GML graph files # the GML specs that i have found are really rather frustrating, because they # don't seme to acknowledge a fundamental problem with this format, which is # that you cannot tell, from the file alone, whether a particuar field is a # list or a single value. # obviously, a name that occurs multiple times in a single scope is a list. # but the opposite - that an isolated name is a single value - is not # necessarily true, because it may be a singleton list. # one solution is to make a model that very closely follows the "predefined # keys" part of himsolt's 1996 document, available as part of the tarball from # http://www.fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-documentation.tar.gz # but that seems very specific, perhaps dated, and still doesn't help with # additional fields. # another solution is to treat everything as a list, and use dictionaries of # lists. but that means that the idea of "keys" is messed up with additional # [1] indexes into singleton lists. # after some reflection, i've decide to take a list of names of lists, and to # validate against that. this isn't perfect - it doesn't allow for the same # name to have different meanings in different contexts, for example - but it # seems to be a good middle ground for "doing the right thing" in general # cases. # users with different requirements are free to take the "raw" parse and build # their own object models. type GMLError<:Exception msg::AbstractString end LISTS = [:graph,:node,:edge] typealias GMLDict Dict{Symbol, Any} function build_dict(raw; lists=LISTS, unsafe=false) root = GMLDict() if length(raw) > 0 build_dict(root, raw[1]; lists=lists, unsafe=unsafe) end root end function build_dict(dict::GMLDict, raw; lists=LISTS, unsafe=false) for (name, value) in raw if isa(value, Vector) entry = GMLDict() build_dict(entry, value; lists=lists, unsafe=unsafe) else entry = value end if name in lists if !haskey(dict, name) dict[name] = Any[] end push!(dict[name], entry) else if !haskey(dict, name) dict[name] = entry elseif !unsafe throw(GMLError("$name is a list")) end end end end # lists describes which symbols should be modelled as lists # if unsafe is false, multiple values for non-list symbols throw an error; # if true they are silently discarded parse_dict(s; debug=false, lists=LISTS, unsafe=false) = build_dict(parse_raw(s; debug=debug); lists=lists, unsafe=unsafe) end
[ 198, 21412, 402, 5805, 198, 198, 3500, 2644, 46677, 20575, 20900, 198, 3500, 3082, 265, 198, 198, 39344, 21136, 62, 1831, 11, 21136, 62, 11600, 11, 6951, 2538, 81, 1472, 628, 198, 2, 6194, 2672, 287, 657, 13, 18, 198, 2, 1111, 670, 287, 657, 13, 19, 198, 2, 6194, 3607, 1207, 8344, 341, 6509, 287, 657, 13, 20, 198, 13940, 23650, 62, 796, 44156, 2849, 18189, 410, 1, 15, 13, 20, 21215, 5633, 38357, 1058, 6194, 628, 198, 8818, 33480, 62, 48610, 7, 8841, 62, 15414, 8, 628, 220, 220, 220, 1303, 428, 318, 884, 257, 2829, 23491, 326, 356, 836, 470, 761, 736, 36280, 11, 523, 356, 460, 198, 220, 220, 220, 1303, 779, 1001, 80, 0, 2123, 435, 11, 290, 13047, 329, 4465, 6689, 34558, 13, 628, 220, 220, 220, 1303, 262, 691, 17198, 1243, 389, 1972, 262, 9029, 826, 523, 326, 12336, 198, 220, 220, 220, 1303, 9029, 1595, 470, 4589, 514, 284, 1997, 10059, 11, 290, 12560, 8563, 691, 198, 220, 220, 220, 1303, 618, 356, 821, 1654, 356, 821, 2642, 357, 5832, 460, 470, 423, 530, 287, 262, 6770, 286, 198, 220, 220, 220, 1303, 1994, 11, 329, 1672, 11, 780, 326, 460, 2038, 986, 737, 628, 220, 220, 220, 2488, 4480, 62, 14933, 2221, 628, 220, 220, 220, 220, 220, 220, 220, 1607, 7, 87, 8, 796, 13047, 7203, 3109, 7254, 720, 87, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 35245, 7, 87, 8, 796, 21136, 7, 5317, 2414, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 69, 2528, 7, 87, 8, 796, 21136, 7, 43879, 2414, 11, 2124, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2912, 796, 350, 18109, 2, 15885, 8, 1701, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 356, 761, 4731, 5128, 355, 356, 2872, 3294, 3951, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4731, 62, 15414, 11405, 23042, 263, 20575, 20900, 13, 37, 11262, 62, 31553, 6369, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 13200, 220, 220, 796, 366, 26933, 59, 83, 2361, 10, 91, 58, 59, 81, 59, 77, 60, 33747, 2, 15885, 8, 10091, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 7364, 7, 87, 8, 796, 4731, 7, 87, 11, 266, 13200, 11, 366, 9, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 9541, 7, 87, 8, 796, 4731, 7, 87, 11, 266, 13200, 11, 43825, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2272, 220, 220, 220, 796, 5299, 47546, 7, 86, 9541, 7203, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 599, 66, 220, 220, 220, 220, 220, 796, 5299, 47546, 7, 86, 7364, 7203, 48774, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 220, 220, 220, 220, 796, 5299, 47546, 7, 86, 7364, 7203, 6852, 14692, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1969, 220, 220, 220, 796, 5299, 47546, 7, 86, 7364, 7203, 30866, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1994, 220, 220, 220, 220, 220, 796, 23939, 7, 86, 9541, 7203, 26933, 64, 12, 89, 32, 12, 57, 7131, 64, 12, 89, 32, 12, 57, 15, 12, 24, 60, 28104, 12340, 352, 8, 220, 220, 220, 1875, 38357, 62, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 493, 220, 220, 220, 220, 220, 796, 23939, 7, 86, 7364, 7203, 19510, 6852, 10, 91, 12, 19427, 6852, 67, 28988, 12340, 352, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1875, 35245, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1103, 220, 220, 220, 220, 796, 23939, 7, 86, 7364, 7203, 19510, 6852, 10, 91, 12, 19427, 6852, 67, 27613, 6852, 67, 10, 19510, 36, 91, 68, 5769, 6852, 10, 91, 12, 19427, 6852, 67, 28988, 10091, 12340, 352, 8, 1875, 279, 69, 2528, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 965, 220, 220, 220, 220, 220, 796, 23939, 7, 86, 7364, 7203, 7879, 26933, 61, 7879, 60, 28104, 7879, 12340, 352, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2073, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 13200, 220, 220, 796, 12344, 0, 7, 47, 17912, 59, 83, 2361, 10, 1600, 1001, 80, 0, 7, 47, 17912, 59, 81, 59, 77, 48688, 1600, 2912, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2272, 220, 220, 220, 796, 266, 13200, 58, 16, 25, 437, 11, 25, 36463, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 599, 66, 220, 220, 220, 220, 220, 796, 266, 13200, 58, 15, 25, 437, 11, 25, 36463, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 220, 220, 220, 220, 796, 1001, 80, 0, 7, 36, 17912, 1600, 599, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1969, 220, 220, 220, 796, 1001, 80, 0, 7, 36, 8973, 1600, 599, 66, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1994, 220, 220, 220, 220, 220, 796, 1001, 80, 0, 7, 79, 17912, 64, 12, 89, 32, 12, 57, 7131, 64, 12, 89, 32, 12, 57, 15, 12, 24, 60, 9, 1600, 2272, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1875, 38357, 62, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 493, 220, 220, 220, 220, 220, 796, 1001, 80, 0, 7, 79, 18109, 59, 10, 91, 12, 19427, 59, 67, 10, 1600, 599, 66, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1875, 35245, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1103, 220, 220, 220, 220, 796, 1001, 80, 0, 7, 79, 18109, 59, 10, 91, 12, 19427, 59, 67, 27613, 59, 67, 10, 19510, 36, 91, 68, 5769, 59, 10, 91, 12, 19427, 59, 67, 10, 19427, 1600, 599, 66, 8, 1875, 279, 69, 2528, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 965, 220, 220, 220, 220, 220, 796, 1001, 80, 0, 7, 47546, 7203, 7879, 26933, 61, 7879, 60, 28104, 7879, 1600, 352, 828, 599, 66, 8, 628, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1351, 220, 220, 220, 796, 4216, 16548, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 850, 4868, 796, 1001, 80, 0, 7, 9654, 11, 1351, 11, 12344, 0, 7, 19836, 11, 1607, 7203, 30866, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 220, 220, 796, 12344, 0, 7, 5305, 11, 493, 11, 965, 11, 850, 4868, 11, 1607, 7203, 8367, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 5002, 796, 1001, 80, 0, 7, 2539, 11, 1988, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1875, 46545, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1351, 13, 6759, 2044, 796, 35886, 540, 90, 19044, 2044, 92, 7, 30854, 58, 15, 25, 437, 11, 25, 36463, 220, 220, 220, 1875, 410, 9246, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 717, 1627, 2912, 1276, 307, 7952, 357, 3919, 2180, 1627, 12363, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1001, 80, 0, 7, 23893, 11, 599, 66, 11, 1351, 11, 12344, 0, 7, 4653, 80, 0, 7, 2777, 66, 11, 412, 418, 3419, 828, 1607, 7203, 2539, 1, 22305, 628, 220, 220, 220, 886, 198, 437, 628, 198, 2, 428, 5860, 262, 366, 11802, 1, 10552, 355, 28376, 26515, 290, 12777, 2374, 198, 8818, 21136, 62, 1831, 7, 82, 26, 14257, 28, 9562, 8, 198, 220, 220, 220, 30751, 796, 33480, 62, 48610, 7, 9160, 7, 82, 11, 27741, 10100, 4008, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 611, 23042, 263, 20575, 20900, 13, 37, 11262, 62, 31553, 6369, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 24442, 5633, 21136, 62, 505, 62, 9945, 70, 1058, 21136, 62, 505, 5769, 82, 11, 34912, 7, 48610, 1776, 14257, 28, 24442, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 24442, 5633, 21136, 62, 6615, 62, 9945, 70, 1058, 21136, 62, 6615, 5769, 82, 11, 34912, 7, 48610, 1776, 14257, 28, 24442, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 4929, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 24442, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7308, 13, 12860, 62, 1891, 40546, 7, 36886, 11, 4929, 62, 1891, 40546, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 302, 16939, 3419, 198, 220, 220, 220, 886, 198, 437, 628, 198, 2, 357, 325, 11632, 8, 20793, 2746, 286, 402, 5805, 4823, 3696, 198, 198, 2, 262, 402, 5805, 25274, 326, 1312, 423, 1043, 389, 1107, 2138, 16655, 11, 780, 484, 198, 2, 836, 470, 5026, 68, 284, 12127, 257, 7531, 1917, 351, 428, 5794, 11, 543, 318, 198, 2, 326, 345, 2314, 1560, 11, 422, 262, 2393, 3436, 11, 1771, 257, 1344, 84, 283, 2214, 318, 257, 198, 2, 1351, 393, 257, 2060, 1988, 13, 198, 198, 2, 6189, 11, 257, 1438, 326, 8833, 3294, 1661, 287, 257, 2060, 8354, 318, 257, 1351, 13, 198, 2, 475, 262, 6697, 532, 326, 281, 11557, 1438, 318, 257, 2060, 1988, 532, 318, 407, 198, 2, 6646, 2081, 11, 780, 340, 743, 307, 257, 2060, 1122, 1351, 13, 198, 198, 2, 530, 4610, 318, 284, 787, 257, 2746, 326, 845, 7173, 5679, 262, 366, 28764, 18156, 198, 2, 8251, 1, 636, 286, 683, 82, 5978, 338, 8235, 3188, 11, 1695, 355, 636, 286, 262, 13422, 1894, 422, 198, 2, 2638, 1378, 2503, 13, 69, 320, 13, 35657, 12, 6603, 559, 13, 2934, 14, 7753, 28482, 14, 16624, 14, 293, 11840, 301, 7456, 75, 14, 17938, 37036, 14, 1676, 73, 988, 660, 14, 70, 4029, 14, 70, 4029, 12, 22897, 341, 13, 18870, 13, 34586, 198, 2, 475, 326, 2331, 845, 2176, 11, 3737, 14567, 11, 290, 991, 1595, 470, 1037, 351, 198, 2, 3224, 7032, 13, 198, 198, 2, 1194, 4610, 318, 284, 2190, 2279, 355, 257, 1351, 11, 290, 779, 48589, 3166, 286, 198, 2, 8341, 13, 220, 475, 326, 1724, 326, 262, 2126, 286, 366, 13083, 1, 318, 32621, 510, 351, 3224, 198, 2, 685, 16, 60, 39199, 656, 2060, 1122, 8341, 13, 198, 198, 2, 706, 617, 14580, 11, 1312, 1053, 5409, 284, 1011, 257, 1351, 286, 3891, 286, 8341, 11, 290, 284, 198, 2, 26571, 1028, 326, 13, 220, 428, 2125, 470, 2818, 532, 340, 1595, 470, 1249, 329, 262, 976, 198, 2, 1438, 284, 423, 1180, 26368, 287, 1180, 26307, 11, 329, 1672, 532, 475, 340, 198, 2, 2331, 284, 307, 257, 922, 3504, 2323, 329, 366, 19631, 262, 826, 1517, 1, 287, 2276, 198, 2, 2663, 13, 198, 198, 2, 2985, 351, 1180, 5359, 389, 1479, 284, 1011, 262, 366, 1831, 1, 21136, 290, 1382, 198, 2, 511, 898, 2134, 4981, 13, 198, 198, 4906, 6951, 2538, 81, 1472, 27, 25, 16922, 198, 220, 220, 220, 31456, 3712, 23839, 10100, 198, 437, 198, 198, 43, 1797, 4694, 796, 685, 25, 34960, 11, 25, 17440, 11, 25, 14907, 60, 198, 198, 4906, 26011, 402, 5805, 35, 713, 360, 713, 90, 13940, 23650, 11, 4377, 92, 198, 198, 8818, 1382, 62, 11600, 7, 1831, 26, 8341, 28, 43, 1797, 4694, 11, 21596, 28, 9562, 8, 198, 220, 220, 220, 6808, 796, 402, 5805, 35, 713, 3419, 198, 220, 220, 220, 611, 4129, 7, 1831, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1382, 62, 11600, 7, 15763, 11, 8246, 58, 16, 11208, 8341, 28, 20713, 11, 21596, 28, 13271, 8635, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 6808, 198, 437, 198, 198, 8818, 1382, 62, 11600, 7, 11600, 3712, 38, 5805, 35, 713, 11, 8246, 26, 8341, 28, 43, 1797, 4694, 11, 21596, 28, 9562, 8, 198, 220, 220, 220, 329, 357, 3672, 11, 1988, 8, 287, 8246, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 64, 7, 8367, 11, 20650, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5726, 796, 402, 5805, 35, 713, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1382, 62, 11600, 7, 13000, 11, 1988, 26, 8341, 28, 20713, 11, 21596, 28, 13271, 8635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5726, 796, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1438, 287, 8341, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 11600, 11, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 58, 3672, 60, 796, 4377, 21737, 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, 4574, 0, 7, 11600, 58, 3672, 4357, 5726, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 11600, 11, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 58, 3672, 60, 796, 5726, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 5145, 13271, 8635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 15548, 2538, 81, 1472, 7203, 3, 3672, 318, 257, 1351, 48774, 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, 198, 2, 8341, 8477, 543, 14354, 815, 307, 953, 11978, 355, 8341, 198, 2, 611, 21596, 318, 3991, 11, 3294, 3815, 329, 1729, 12, 4868, 14354, 3714, 281, 4049, 26, 198, 2, 611, 2081, 484, 389, 24595, 25148, 198, 29572, 62, 11600, 7, 82, 26, 14257, 28, 9562, 11, 8341, 28, 43, 1797, 4694, 11, 21596, 28, 9562, 8, 796, 1382, 62, 11600, 7, 29572, 62, 1831, 7, 82, 26, 14257, 28, 24442, 1776, 8341, 28, 20713, 11, 21596, 28, 13271, 8635, 8, 198, 198, 437, 198 ]
2.305896
2,527
using DataFrames, Query df1 = DataFrame(a=[1,2,3], b=[1.,2.,3.]) df2 = DataFrame(c=[2.,4.,2.], d=["John", "Jim","Sally"]) x = @from i in df1 begin @join j in df2 on i.a equals convert(Int,j.c) @select {i.a,i.b,j.c,j.d,e="Name: $(j.d)"} @collect DataFrame end println(x)
[ 3500, 6060, 35439, 11, 43301, 198, 198, 7568, 16, 796, 6060, 19778, 7, 64, 41888, 16, 11, 17, 11, 18, 4357, 275, 41888, 16, 1539, 17, 1539, 18, 8183, 8, 198, 7568, 17, 796, 6060, 19778, 7, 66, 41888, 17, 1539, 19, 1539, 17, 13, 4357, 288, 28, 14692, 7554, 1600, 366, 18050, 2430, 50, 453, 8973, 8, 198, 198, 87, 796, 2488, 6738, 1312, 287, 47764, 16, 2221, 198, 220, 220, 220, 2488, 22179, 474, 287, 47764, 17, 319, 1312, 13, 64, 21767, 10385, 7, 5317, 11, 73, 13, 66, 8, 198, 220, 220, 220, 2488, 19738, 1391, 72, 13, 64, 11, 72, 13, 65, 11, 73, 13, 66, 11, 73, 13, 67, 11, 68, 2625, 5376, 25, 29568, 73, 13, 67, 16725, 92, 198, 220, 220, 220, 2488, 33327, 6060, 19778, 198, 437, 198, 198, 35235, 7, 87, 8, 198 ]
2.007042
142
# This file is part of Kpax3. License is MIT. mutable struct KWeight c::Vector{Float64} w::Matrix{Float64} z::Matrix{Float64} end mutable struct MCMCSupport m::Int n::Int u::Vector{Int} t::Vector{Float64} lp::Array{Float64, 3} lq::Array{Float64, 3} lr::Array{Float64, 3} vi::Int ni::Vector{Float64} ui::Vector{Int} wi::KWeight lpi::Matrix{Float64} vj::Int nj::Vector{Float64} uj::Vector{Int} wj::KWeight lpj::Matrix{Float64} tmp::Vector{Float64} cl::Vector{Int} k::Int lograR::Float64 logmlik::Float64 logmlikcandidate::Float64 end function MCMCSupport(state::State, priorC::AminoAcidPriorCol) n = length(state.R) (maxclust, m) = size(state.C) u = Int[a for a in 1:n] t = zeros(Float64, n) lp = zeros(Float64, 4, maxclust, m) lq = zeros(Float64, 4, maxclust, m) lr = zeros(Float64, 3, maxclust, m) g = 0 for b in 1:m, l in 1:state.k g = state.cl[l] lp[1, g, b] = logmarglik(state.n1s[g, b], state.v[g], priorC.A[1, b], priorC.B[1, b]) lp[2, g, b] = logmarglik(state.n1s[g, b], state.v[g], priorC.A[2, b], priorC.B[2, b]) lp[3, g, b] = logmarglik(state.n1s[g, b], state.v[g], priorC.A[3, b], priorC.B[3, b]) lp[4, g, b] = logmarglik(state.n1s[g, b], state.v[g], priorC.A[4, b], priorC.B[4, b]) end vi = 0 ni = zeros(Float64, m) ui = zeros(Int, n) wi = KWeight(zeros(Float64, m), zeros(Float64, 4, m), zeros(Float64, 4, m)) lpi = zeros(Float64, 4, m) vj = 0 nj = zeros(Float64, m) uj = zeros(Int, n) wj = KWeight(zeros(Float64, m), zeros(Float64, 4, m), zeros(Float64, 4, m)) lpj = zeros(Float64, 4, m) tmp = zeros(Float64, 4) cl = zeros(Int, n) k = 0 logmlik = logmarglikelihood(state.cl, state.k, lp, priorC) MCMCSupport(m, n, u, t, lp, lq, lr, vi, ni, ui, wi, lpi, vj, nj, uj, wj, lpj, tmp, cl, k, 0.0, logmlik, 0.0) end function resizesupport!(support::MCMCSupport, maxclust::Int) if size(support.lp, 2) < maxclust # we don't want to allocate new resources too often, so allocate double the # previous size. this should guarantee a logarithmic number of allocations newsize = min(support.n, max(maxclust, 2 * size(support.lp, 2))) lp = zeros(Float64, 4, newsize, support.m) for b in 1:support.m, g in 1:size(support.lp, 2) lp[1, g, b] = support.lp[1, g, b] lp[2, g, b] = support.lp[2, g, b] lp[3, g, b] = support.lp[3, g, b] lp[4, g, b] = support.lp[4, g, b] end support.lp = lp support.lq = zeros(Float64, 4, newsize, support.m) support.lr = zeros(Float64, 3, newsize, support.m) end nothing end mutable struct KOffspring R::Vector{Int} v::Vector{Int} end mutable struct GASupport m::Int n::Int oi::KOffspring oj::KOffspring end function GASupport(m::Int, n::Int) oi = KOffspring(zeros(Int, n), zeros(Int, n)) oj = KOffspring(zeros(Int, n), zeros(Int, n)) GASupport(m, n, oi, oj) end
[ 2, 770, 2393, 318, 636, 286, 509, 79, 897, 18, 13, 13789, 318, 17168, 13, 198, 198, 76, 18187, 2878, 509, 25844, 198, 220, 269, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 266, 3712, 46912, 90, 43879, 2414, 92, 198, 220, 1976, 3712, 46912, 90, 43879, 2414, 92, 198, 437, 198, 198, 76, 18187, 2878, 13122, 9655, 15514, 198, 220, 285, 3712, 5317, 198, 220, 299, 3712, 5317, 628, 220, 334, 3712, 38469, 90, 5317, 92, 198, 220, 256, 3712, 38469, 90, 43879, 2414, 92, 628, 220, 300, 79, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 198, 220, 300, 80, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 198, 220, 300, 81, 3712, 19182, 90, 43879, 2414, 11, 513, 92, 628, 220, 25357, 3712, 5317, 198, 220, 37628, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 334, 72, 3712, 38469, 90, 5317, 92, 198, 220, 45967, 3712, 42, 25844, 198, 220, 300, 14415, 3712, 46912, 90, 43879, 2414, 92, 628, 220, 410, 73, 3712, 5317, 198, 220, 299, 73, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 334, 73, 3712, 38469, 90, 5317, 92, 198, 220, 266, 73, 3712, 42, 25844, 198, 220, 300, 79, 73, 3712, 46912, 90, 43879, 2414, 92, 628, 220, 45218, 3712, 38469, 90, 43879, 2414, 92, 628, 220, 537, 3712, 38469, 90, 5317, 92, 198, 220, 479, 3712, 5317, 628, 220, 2604, 430, 49, 3712, 43879, 2414, 628, 220, 2604, 4029, 1134, 3712, 43879, 2414, 198, 220, 2604, 4029, 1134, 46188, 20540, 3712, 43879, 2414, 198, 437, 198, 198, 8818, 13122, 9655, 15514, 7, 5219, 3712, 9012, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3161, 34, 3712, 32, 1084, 78, 12832, 312, 22442, 5216, 8, 198, 220, 299, 796, 4129, 7, 5219, 13, 49, 8, 198, 220, 357, 9806, 565, 436, 11, 285, 8, 796, 2546, 7, 5219, 13, 34, 8, 628, 220, 334, 796, 2558, 58, 64, 329, 257, 287, 352, 25, 77, 60, 198, 220, 256, 796, 1976, 27498, 7, 43879, 2414, 11, 299, 8, 628, 220, 300, 79, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 3509, 565, 436, 11, 285, 8, 198, 220, 300, 80, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 3509, 565, 436, 11, 285, 8, 198, 220, 300, 81, 796, 1976, 27498, 7, 43879, 2414, 11, 513, 11, 3509, 565, 436, 11, 285, 8, 628, 220, 308, 796, 657, 198, 220, 329, 275, 287, 352, 25, 76, 11, 300, 287, 352, 25, 5219, 13, 74, 198, 220, 220, 220, 308, 796, 1181, 13, 565, 58, 75, 60, 628, 220, 220, 220, 300, 79, 58, 16, 11, 308, 11, 275, 60, 796, 2604, 30887, 46965, 7, 5219, 13, 77, 16, 82, 58, 70, 11, 275, 4357, 1181, 13, 85, 58, 70, 4357, 3161, 34, 13, 32, 58, 16, 11, 275, 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, 3161, 34, 13, 33, 58, 16, 11, 275, 12962, 198, 220, 220, 220, 300, 79, 58, 17, 11, 308, 11, 275, 60, 796, 2604, 30887, 46965, 7, 5219, 13, 77, 16, 82, 58, 70, 11, 275, 4357, 1181, 13, 85, 58, 70, 4357, 3161, 34, 13, 32, 58, 17, 11, 275, 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, 3161, 34, 13, 33, 58, 17, 11, 275, 12962, 198, 220, 220, 220, 300, 79, 58, 18, 11, 308, 11, 275, 60, 796, 2604, 30887, 46965, 7, 5219, 13, 77, 16, 82, 58, 70, 11, 275, 4357, 1181, 13, 85, 58, 70, 4357, 3161, 34, 13, 32, 58, 18, 11, 275, 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, 3161, 34, 13, 33, 58, 18, 11, 275, 12962, 198, 220, 220, 220, 300, 79, 58, 19, 11, 308, 11, 275, 60, 796, 2604, 30887, 46965, 7, 5219, 13, 77, 16, 82, 58, 70, 11, 275, 4357, 1181, 13, 85, 58, 70, 4357, 3161, 34, 13, 32, 58, 19, 11, 275, 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, 3161, 34, 13, 33, 58, 19, 11, 275, 12962, 198, 220, 886, 628, 220, 25357, 796, 657, 198, 220, 37628, 796, 1976, 27498, 7, 43879, 2414, 11, 285, 8, 198, 220, 334, 72, 796, 1976, 27498, 7, 5317, 11, 299, 8, 198, 220, 45967, 796, 509, 25844, 7, 9107, 418, 7, 43879, 2414, 11, 285, 828, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 828, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 4008, 628, 220, 300, 14415, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 8, 628, 220, 410, 73, 796, 657, 198, 220, 299, 73, 796, 1976, 27498, 7, 43879, 2414, 11, 285, 8, 198, 220, 334, 73, 796, 1976, 27498, 7, 5317, 11, 299, 8, 198, 220, 266, 73, 796, 509, 25844, 7, 9107, 418, 7, 43879, 2414, 11, 285, 828, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 828, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 4008, 628, 220, 300, 79, 73, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 285, 8, 628, 220, 45218, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 8, 628, 220, 537, 796, 1976, 27498, 7, 5317, 11, 299, 8, 198, 220, 479, 796, 657, 628, 220, 2604, 4029, 1134, 796, 2604, 30887, 2339, 11935, 7, 5219, 13, 565, 11, 1181, 13, 74, 11, 300, 79, 11, 3161, 34, 8, 628, 220, 13122, 9655, 15514, 7, 76, 11, 299, 11, 334, 11, 256, 11, 300, 79, 11, 300, 80, 11, 300, 81, 11, 25357, 11, 37628, 11, 334, 72, 11, 45967, 11, 300, 14415, 11, 410, 73, 11, 299, 73, 11, 334, 73, 11, 266, 73, 11, 300, 79, 73, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 11, 537, 11, 479, 11, 657, 13, 15, 11, 2604, 4029, 1134, 11, 657, 13, 15, 8, 198, 437, 198, 198, 8818, 581, 4340, 84, 4926, 0, 7, 11284, 3712, 9655, 9655, 15514, 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, 3509, 565, 436, 3712, 5317, 8, 198, 220, 611, 2546, 7, 11284, 13, 34431, 11, 362, 8, 1279, 3509, 565, 436, 198, 220, 220, 220, 1303, 356, 836, 470, 765, 284, 31935, 649, 4133, 1165, 1690, 11, 523, 31935, 4274, 262, 198, 220, 220, 220, 1303, 2180, 2546, 13, 428, 815, 9149, 257, 2604, 283, 342, 9383, 1271, 286, 49157, 198, 220, 220, 220, 1705, 1096, 796, 949, 7, 11284, 13, 77, 11, 3509, 7, 9806, 565, 436, 11, 362, 1635, 2546, 7, 11284, 13, 34431, 11, 362, 22305, 628, 220, 220, 220, 300, 79, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 1705, 1096, 11, 1104, 13, 76, 8, 628, 220, 220, 220, 329, 275, 287, 352, 25, 11284, 13, 76, 11, 308, 287, 352, 25, 7857, 7, 11284, 13, 34431, 11, 362, 8, 198, 220, 220, 220, 220, 220, 300, 79, 58, 16, 11, 308, 11, 275, 60, 796, 1104, 13, 34431, 58, 16, 11, 308, 11, 275, 60, 198, 220, 220, 220, 220, 220, 300, 79, 58, 17, 11, 308, 11, 275, 60, 796, 1104, 13, 34431, 58, 17, 11, 308, 11, 275, 60, 198, 220, 220, 220, 220, 220, 300, 79, 58, 18, 11, 308, 11, 275, 60, 796, 1104, 13, 34431, 58, 18, 11, 308, 11, 275, 60, 198, 220, 220, 220, 220, 220, 300, 79, 58, 19, 11, 308, 11, 275, 60, 796, 1104, 13, 34431, 58, 19, 11, 308, 11, 275, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1104, 13, 34431, 796, 300, 79, 198, 220, 220, 220, 1104, 13, 75, 80, 796, 1976, 27498, 7, 43879, 2414, 11, 604, 11, 1705, 1096, 11, 1104, 13, 76, 8, 198, 220, 220, 220, 1104, 13, 14050, 796, 1976, 27498, 7, 43879, 2414, 11, 513, 11, 1705, 1096, 11, 1104, 13, 76, 8, 198, 220, 886, 628, 220, 2147, 198, 437, 198, 198, 76, 18187, 2878, 509, 9362, 16469, 198, 220, 371, 3712, 38469, 90, 5317, 92, 198, 220, 410, 3712, 38469, 90, 5317, 92, 198, 437, 198, 198, 76, 18187, 2878, 402, 1921, 84, 4926, 198, 220, 285, 3712, 5317, 198, 220, 299, 3712, 5317, 628, 220, 267, 72, 3712, 42, 9362, 16469, 198, 220, 267, 73, 3712, 42, 9362, 16469, 198, 437, 198, 198, 8818, 402, 1921, 84, 4926, 7, 76, 3712, 5317, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 3712, 5317, 8, 198, 220, 267, 72, 796, 509, 9362, 16469, 7, 9107, 418, 7, 5317, 11, 299, 828, 1976, 27498, 7, 5317, 11, 299, 4008, 198, 220, 267, 73, 796, 509, 9362, 16469, 7, 9107, 418, 7, 5317, 11, 299, 828, 1976, 27498, 7, 5317, 11, 299, 4008, 198, 220, 402, 1921, 84, 4926, 7, 76, 11, 299, 11, 267, 72, 11, 267, 73, 8, 198, 437, 198 ]
1.975301
1,579
using Test using Bigsimr using Distributions import LinearAlgebra: PosDefException import Bigsimr: ValidCorrelationError @testset "Random Vector Utilities" begin @testset "Fast Standard Random Normal" begin # Must work for each bits floating point type for T in (Float64, Float32, Float16) @test_nowarn Bigsimr._randn(T, 4, 4) @test eltype(Bigsimr._randn(T, 4, 4)) === T end @test_nowarn Bigsimr._randn(Float64, 4.0, 4.0) @test_nowarn Bigsimr._randn(Float64, 4.0, 4) @test_nowarn Bigsimr._randn(Float64, 4, 4.0) @test_nowarn Bigsimr._randn(4.0, 4.0) @test_nowarn Bigsimr._randn(4.0, 4) @test_nowarn Bigsimr._randn(4 , 4.0) @test_throws InexactError Bigsimr._randn(4.5, 5.5) @test_throws InexactError Bigsimr._randn(4.5, 5) @test_throws InexactError Bigsimr._randn(4 , 5.5) end @testset "Random Multivariate Normal Generation" begin r_negdef = [ 1.00 0.82 0.56 0.44 0.82 1.00 0.28 0.85 0.56 0.28 1.00 0.22 0.44 0.85 0.22 1.00 ] # Must fail for negative semidefinite matrices @test_throws PosDefException Bigsimr._rmvn(10, r_negdef) # Must work for each bits floating point type for T in (Float64, Float32, Float16) r = cor_randPD(T, 4) @test_nowarn Bigsimr._rmvn(10, r) @test eltype(Bigsimr._rmvn(10, r)) === T end end @testset "User Random Multivariate Normal Generation" begin # Must work for each bits floating point type for T in (Float64, Float32, Float16) r = cor_randPD(T, 4) @test_nowarn rmvn(10, r) @test eltype(rmvn(10, r)) === T end r = cor_randPD(4) @test_nowarn rmvn(10.0, r) @test_throws InexactError rmvn(10.5, r) end @testset "Normal to Marginal" begin # Must work for scalars, vectors, and matrices of type Float64 D = Binomial(10, 0.5) x = randn(Float64) y = randn(Float64, 2) z = randn(Float64, 2, 2) ω = randn(Float64, 2, 2, 2) γ = randn(Float32) @test_nowarn Bigsimr.normal_to_margin(D, x) @test_nowarn Bigsimr.normal_to_margin(D, y) @test_nowarn Bigsimr.normal_to_margin(D, z) @test_nowarn Bigsimr.normal_to_margin(D, ω) @test_nowarn Bigsimr.normal_to_margin(D, γ) # Standard normal to standard normal should be invariant z = rand(Normal(0, 1), 100000) @test z ≈ Bigsimr.normal_to_margin(Normal(0, 1), z) # Estimated parameters must be close to true parameters d1 = Binomial(20, 0.2) d2 = Poisson(3) d3 = Normal(12, π) x1 = Bigsimr.normal_to_margin(d1, z) x2 = Bigsimr.normal_to_margin(d2, z) x3 = Bigsimr.normal_to_margin(d3, z) f1 = fit_mle(Binomial, 20, x1) f2 = fit_mle(Poisson, x2) f3 = fit_mle(Normal, x3) @test all(isapprox.(params(d1), params(f1), rtol=0.01)) @test all(isapprox.(params(d2), params(f2), rtol=0.01)) @test all(isapprox.(params(d3), params(f3), rtol=0.01)) end end @testset "Random Vector Generation" begin @testset "rvec" begin # Must throw an error if a margin is not a univariate distribution r = cor_randPD(2) m = [Binomial(10, 0.2), MvNormal(zeros(2), r)] @test_throws MethodError rvec(2, r, m) # Must throw an error if r is not a valid correlation matrix m = [Binomial(10, 0.3), Gamma(10, 3)] r = Float64[1.0 2.33333; 0.333333 1.0] # Not positive definite c = Float64[2 4; 4 100] # Is covariance, not correlation @test_throws ValidCorrelationError rvec(3, r, m) @test_throws ValidCorrelationError rvec(3, c, m) # Must throw an arror if the dimensions of r do not match the number of margins m = [Binomial(10, 0.3), Gamma(10, 3)] r = cor_randPD(3) @test_throws DimensionMismatch rvec(4, r, m) # Distributions.jl only returns random Float64 types, but `rvec` should # still accept correlation matrices of different floating point types for T in (Float64, Float32, Float16) r = cor_randPD(T, 2) @test_nowarn rvec(10, r, m) @test_nowarn rvec(10.0, r, m) @test_throws InexactError rvec(10.5, r, m) end end end
[ 3500, 6208, 198, 3500, 4403, 14323, 81, 198, 3500, 46567, 507, 198, 11748, 44800, 2348, 29230, 25, 18574, 7469, 16922, 198, 11748, 4403, 14323, 81, 25, 48951, 10606, 49501, 12331, 198, 198, 31, 9288, 2617, 366, 29531, 20650, 41086, 1, 2221, 628, 220, 220, 220, 2488, 9288, 2617, 366, 22968, 8997, 14534, 14435, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 670, 329, 1123, 10340, 12462, 966, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 329, 309, 287, 357, 43879, 2414, 11, 48436, 2624, 11, 48436, 1433, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 51, 11, 604, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 33, 9235, 320, 81, 13557, 25192, 77, 7, 51, 11, 604, 11, 604, 4008, 24844, 309, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 43879, 2414, 11, 604, 13, 15, 11, 604, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 43879, 2414, 11, 604, 13, 15, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 43879, 2414, 11, 604, 11, 220, 220, 604, 13, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 13, 15, 11, 604, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 13, 15, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 220, 837, 604, 13, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 554, 1069, 529, 12331, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 13, 20, 11, 642, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 554, 1069, 529, 12331, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 13, 20, 11, 642, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 554, 1069, 529, 12331, 4403, 14323, 81, 13557, 25192, 77, 7, 19, 220, 837, 642, 13, 20, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 29531, 7854, 42524, 14435, 16588, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 374, 62, 12480, 4299, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 13, 405, 657, 13, 6469, 657, 13, 3980, 657, 13, 2598, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 6469, 352, 13, 405, 657, 13, 2078, 657, 13, 5332, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 3980, 657, 13, 2078, 352, 13, 405, 657, 13, 1828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 2598, 657, 13, 5332, 657, 13, 1828, 352, 13, 405, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 2038, 329, 4633, 5026, 485, 69, 9504, 2603, 45977, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 18574, 7469, 16922, 4403, 14323, 81, 13557, 26224, 85, 77, 7, 940, 11, 374, 62, 12480, 4299, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 670, 329, 1123, 10340, 12462, 966, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 329, 309, 287, 357, 43879, 2414, 11, 48436, 2624, 11, 48436, 1433, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 51, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13557, 26224, 85, 77, 7, 940, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 33, 9235, 320, 81, 13557, 26224, 85, 77, 7, 940, 11, 374, 4008, 24844, 309, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 12982, 14534, 7854, 42524, 14435, 16588, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 670, 329, 1123, 10340, 12462, 966, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 329, 309, 287, 357, 43879, 2414, 11, 48436, 2624, 11, 48436, 1433, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 51, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 42721, 85, 77, 7, 940, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 26224, 85, 77, 7, 940, 11, 374, 4008, 24844, 309, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 42721, 85, 77, 7, 940, 13, 15, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 554, 1069, 529, 12331, 42721, 85, 77, 7, 940, 13, 20, 11, 374, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 26447, 284, 11899, 1292, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 670, 329, 16578, 945, 11, 30104, 11, 290, 2603, 45977, 286, 2099, 48436, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 360, 796, 20828, 49070, 7, 940, 11, 657, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 43720, 77, 7, 43879, 2414, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 43720, 77, 7, 43879, 2414, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 796, 43720, 77, 7, 43879, 2414, 11, 362, 11, 362, 8, 628, 220, 220, 220, 220, 220, 220, 220, 18074, 231, 796, 43720, 77, 7, 43879, 2414, 11, 362, 11, 362, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 111, 796, 43720, 77, 7, 43879, 2624, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 35, 11, 2124, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 35, 11, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 35, 11, 1976, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 35, 11, 18074, 231, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 35, 11, 7377, 111, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 8997, 3487, 284, 3210, 3487, 815, 307, 25275, 415, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 796, 43720, 7, 26447, 7, 15, 11, 352, 828, 1802, 830, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1976, 15139, 230, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 26447, 7, 15, 11, 352, 828, 1976, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 47737, 10007, 1276, 307, 1969, 284, 2081, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 288, 16, 796, 20828, 49070, 7, 1238, 11, 657, 13, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 17, 796, 7695, 30927, 7, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 18, 796, 14435, 7, 1065, 11, 18074, 222, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 796, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 67, 16, 11, 1976, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 17, 796, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 67, 17, 11, 1976, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 18, 796, 4403, 14323, 81, 13, 11265, 62, 1462, 62, 36153, 7, 67, 18, 11, 1976, 8, 628, 220, 220, 220, 220, 220, 220, 220, 277, 16, 796, 4197, 62, 76, 293, 7, 33, 259, 49070, 11, 1160, 11, 2124, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 17, 796, 4197, 62, 76, 293, 7, 18833, 30927, 11, 2124, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 18, 796, 4197, 62, 76, 293, 7, 26447, 11, 2124, 18, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 271, 1324, 13907, 12195, 37266, 7, 67, 16, 828, 42287, 7, 69, 16, 828, 374, 83, 349, 28, 15, 13, 486, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 271, 1324, 13907, 12195, 37266, 7, 67, 17, 828, 42287, 7, 69, 17, 828, 374, 83, 349, 28, 15, 13, 486, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 477, 7, 271, 1324, 13907, 12195, 37266, 7, 67, 18, 828, 42287, 7, 69, 18, 828, 374, 83, 349, 28, 15, 13, 486, 4008, 198, 220, 220, 220, 886, 198, 198, 437, 198, 198, 31, 9288, 2617, 366, 29531, 20650, 16588, 1, 2221, 628, 220, 220, 220, 2488, 9288, 2617, 366, 81, 35138, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 3714, 281, 4049, 611, 257, 10330, 318, 407, 257, 555, 42524, 6082, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 685, 33, 259, 49070, 7, 940, 11, 657, 13, 17, 828, 337, 85, 26447, 7, 9107, 418, 7, 17, 828, 374, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 11789, 12331, 374, 35138, 7, 17, 11, 374, 11, 285, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 3714, 281, 4049, 611, 374, 318, 407, 257, 4938, 16096, 17593, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 685, 33, 259, 49070, 7, 940, 11, 657, 13, 18, 828, 43595, 7, 940, 11, 513, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 48436, 2414, 58, 16, 13, 15, 362, 13, 2091, 20370, 26, 657, 13, 24840, 2091, 352, 13, 15, 60, 1303, 1892, 3967, 21892, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 48436, 2414, 58, 17, 604, 26, 604, 1802, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1148, 44829, 590, 11, 407, 16096, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 48951, 10606, 49501, 12331, 374, 35138, 7, 18, 11, 374, 11, 285, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 48951, 10606, 49501, 12331, 374, 35138, 7, 18, 11, 269, 11, 285, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12039, 3714, 281, 610, 1472, 611, 262, 15225, 286, 374, 466, 407, 2872, 262, 1271, 286, 20241, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 685, 33, 259, 49070, 7, 940, 11, 657, 13, 18, 828, 43595, 7, 940, 11, 513, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 34024, 44, 1042, 963, 374, 35138, 7, 19, 11, 374, 11, 285, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 46567, 507, 13, 20362, 691, 5860, 4738, 48436, 2414, 3858, 11, 475, 4600, 81, 35138, 63, 815, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 991, 2453, 16096, 2603, 45977, 286, 1180, 12462, 966, 3858, 198, 220, 220, 220, 220, 220, 220, 220, 329, 309, 287, 357, 43879, 2414, 11, 48436, 2624, 11, 48436, 1433, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1162, 62, 25192, 5760, 7, 51, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 374, 35138, 7, 940, 11, 374, 11, 285, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 2197, 1501, 374, 35138, 7, 940, 13, 15, 11, 374, 11, 285, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 554, 1069, 529, 12331, 374, 35138, 7, 940, 13, 20, 11, 374, 11, 285, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 198, 437, 198 ]
2.012946
2,240
using JuMP, JuMPeR, Gurobi, Random, Distributions, LinearAlgebra, DataFrames, Plots n = 10 # Number of facilities m = 50 # Number of customers # Generating random data (please don't change the seeds.) facilities = 0.6.*rand(MersenneTwister(5), n,2) .+ 0.2; customers = rand(MersenneTwister(2), m, 2); c = [LinearAlgebra.norm(customers[i, :] .- facilities[j, :])[1] for j=1:n, i=1:m]; f = rand(MersenneTwister(3), n)*1 .+ 5; s = rand(MersenneTwister(4), n)*2 .+ 15; d = rand(MersenneTwister(5), m)*0.5 .+ 0.75 # P matrix R_D = 0.25 P = [0.2*exp(-1/R_D .*LinearAlgebra.norm(customers[i, :] .- customers[j, :])[1]) for j=1:m, i=1:m]; P = (P .>= 0.2*exp(-1/R_D .* R_D)) .* P """ Cutting plane facility location model. Note this is just the nominal problem, but with linear policies y(z) = u + Vz when z = 0. """ function CP_facility_model(c::Matrix, f::Vector) n, m = size(c) @assert length(f) == n model = Model(solver = GurobiSolver(OutputFlag = 0)) # VARIABLES @variable(model, x[1:n], Bin) # Facility locations @variable(model, V[1:n, 1:m, 1:m]) # Linear decision rule w.r.t. z @variable(model, u[1:n, 1:m]) # Fixed policy # CONSTRAINTS for j=1:m # Demand constraints dt = zeros(n, m); [dt[i,j] = 1 for i=1:n]; @constraint(model, sum(dt .* u) >= d[j]) end for i=1:n # Capacity constraints dt = zeros(n, m); [dt[i,j] = 1 for j=1:m]; @constraint(model, sum(dt .* u) <= s[i] * x[i]) end # OBJECTIVE @variable(model, F) @constraint(model, F >= sum(f[j] * x[j] for j = 1:n) + sum(c[i, j] * u[i, j] for i=1:n, j=1:m)) @objective(model, Min, F) return model, x, u, V end function apply_heuristic(model, x, u, V) @constraint(model, u .>= 0) @constraint(model, V .>= 0) return end """ Finds and adds worst case cuts for the facility location problem. """ function find_wc_cuts(model, x, u, V, xvals, uvals, Vvals, rho, Gamm) wc_model = Model(solver = GurobiSolver(OutputFlag = 0)) # suppressing printouts. @variable(wc_model, -rho <= z[1:m] <= rho) @variable(wc_model, normdummy[1:m] >= 0) @constraint(wc_model, [i=1:m], normdummy[i] >= z[i]) @constraint(wc_model, [i=1:m], normdummy[i] >= -z[i]) @constraint(wc_model, sum(normdummy) <= Gamm) count = length(model.linconstr) for i = 1:n # nonnegativity constraints for j=1:m @objective(wc_model, Min, uvals[i,j] + sum(Vvals[i,j,:] .* z)) solve(wc_model) if getobjectivevalue(wc_model) < -1e-5 # if constraint is violated new_z = getvalue(z) @constraint(model, u[i,j] + sum(V[i,j,:] .* new_z) >= 0) end end end @info("$(length(model.linconstr) - count) nonnegativity cuts added. ") count = length(model.linconstr) for j = 1:m # demand constraints dt = zeros(n, m); [dt[i,j] = 1 for i=1:n]; @objective(wc_model, Min, sum(dt .* uvals) + sum(Vvals[:,j,:] * z) - d[j] - (P*z)[j]) solve(wc_model) if getobjectivevalue(wc_model) < -1e-5 # if constraint is violated new_z = getvalue(z) @constraint(model, sum(dt .* u) + sum(V[:,j,:] * new_z) >= d[j] + (P*new_z)[j]) end end @info("$(length(model.linconstr) - count) demand constraint cuts added.") count = length(model.linconstr) for i = 1:n # capacity constraints dt = zeros(n, m); [dt[i,j] = 1 for j=1:m]; @objective(wc_model, Min, - sum(dt .* uvals) - sum(Vvals[i,:,:] * z) + s[i] * xvals[i]) solve(wc_model) if getobjectivevalue(wc_model) < -1e-5 # if constraint is violated new_z = getvalue(z) @constraint(model, sum(dt .* u) + sum(V[i,:,:] * new_z) <= s[i] * x[i]) end end @info("$(length(model.linconstr) - count) capacity constraint cuts added.") # objective @objective(wc_model, Max, sum(f[j] * xvals[j] for j = 1:n) + sum(c[i, j] * (uvals[i, j] + sum(Vvals[i,j,:] .* z)) for i=1:n, j=1:m)) solve(wc_model) if getobjectivevalue(wc_model) > getvalue(model.obj) + 1e-5 # if constraint is violated new_z = getvalue(z) @constraint(model, model.obj >= sum(f[j] * x[j] for j = 1:n) + sum(c[i, j] * (u[i, j] + sum(V[i,j,:] .* new_z)) for i=1:n, j=1:m)) @info("Objective cut added.") end end """ Plots the solution of the facility location model. Blue circles are active facilities with different capacities. Orange plus signs are other potential facility locations. Rays describe connections between facilities and demand nodes. """ function plot_solution(model, x, y, cost = nothing) plt = scatter(facilities[:, 1], facilities[:, 2], markersize = 0.4 .* s .* getvalue(x)) scatter!(facilities[:, 1], facilities[:, 2], markersize = 0.4 .* s, markershape = :+) for i=1:n for j=1:m if getvalue(y[i,j]) >= 1e-10 plot!([customers[j, 1], facilities[i,1]], [customers[j,2], facilities[i,2]], linewidth = getvalue(y[i,j]), legend=false) end end end if cost == nothing scatter!(customers[:, 1], customers[:, 2], markersize = 3*d, title = "Total cost: $(round(getobjectivevalue(model), sigdigits=5))") else scatter!(customers[:, 1], customers[:, 2], markersize = 3*d, title = "Total cost: $(round(cost,sigdigits=5))") end println("Facility cost: $(getvalue(sum(f[j] * x[j] for j = 1:n)))") println("Transportation cost: $(getvalue(sum(c[i, j] * y[i, j] for i=1:n, j=1:m)))") return plt end rho = 1 Gamm = 5 model, x, u, V = CP_facility_model(c, f) apply_heuristic(model, x, u, V) # Do 15 iterations of cuts for i=1:15 @info("Iteration $(i).") modelsize = length(model.linconstr) solve(model) xvals, uvals, Vvals = getvalue(x), getvalue(u), getvalue(V) find_wc_cuts(model, x, u, V, xvals, uvals, Vvals , rho, Gamm) if length(model.linconstr) == modelsize @info("Optimum reached.") @info("Optimal cost:$(getobjectivevalue(model)).") break end end # Problem should converge in ~100 adversarial iterations. plot_solution(model, x, u)
[ 3500, 12585, 7378, 11, 12585, 44, 6435, 49, 11, 402, 1434, 8482, 11, 14534, 11, 46567, 507, 11, 44800, 2348, 29230, 11, 6060, 35439, 11, 1345, 1747, 198, 198, 77, 796, 838, 1303, 7913, 286, 7291, 198, 76, 796, 2026, 1303, 7913, 286, 4297, 198, 198, 2, 2980, 803, 4738, 1366, 357, 29688, 836, 470, 1487, 262, 11904, 2014, 198, 38942, 2410, 796, 657, 13, 21, 15885, 25192, 7, 44, 364, 29727, 5080, 1694, 7, 20, 828, 299, 11, 17, 8, 764, 10, 657, 13, 17, 26, 198, 23144, 364, 796, 43720, 7, 44, 364, 29727, 5080, 1694, 7, 17, 828, 285, 11, 362, 1776, 220, 198, 66, 796, 685, 14993, 451, 2348, 29230, 13, 27237, 7, 23144, 364, 58, 72, 11, 1058, 60, 764, 12, 7291, 58, 73, 11, 1058, 12962, 58, 16, 60, 329, 474, 28, 16, 25, 77, 11, 1312, 28, 16, 25, 76, 11208, 198, 69, 796, 43720, 7, 44, 364, 29727, 5080, 1694, 7, 18, 828, 299, 27493, 16, 764, 10, 642, 26, 198, 82, 796, 43720, 7, 44, 364, 29727, 5080, 1694, 7, 19, 828, 299, 27493, 17, 764, 10, 1315, 26, 198, 67, 796, 43720, 7, 44, 364, 29727, 5080, 1694, 7, 20, 828, 285, 27493, 15, 13, 20, 764, 10, 657, 13, 2425, 198, 198, 2, 350, 17593, 198, 49, 62, 35, 796, 657, 13, 1495, 198, 47, 796, 685, 15, 13, 17, 9, 11201, 32590, 16, 14, 49, 62, 35, 764, 9, 14993, 451, 2348, 29230, 13, 27237, 7, 23144, 364, 58, 72, 11, 1058, 60, 764, 12, 4297, 58, 73, 11, 1058, 12962, 58, 16, 12962, 329, 474, 28, 16, 25, 76, 11, 1312, 28, 16, 25, 76, 11208, 198, 47, 796, 357, 47, 764, 29, 28, 657, 13, 17, 9, 11201, 32590, 16, 14, 49, 62, 35, 764, 9, 371, 62, 35, 4008, 764, 9, 350, 220, 198, 198, 37811, 40152, 6614, 6841, 4067, 2746, 13, 220, 198, 220, 220, 220, 5740, 428, 318, 655, 262, 26934, 1917, 11, 475, 351, 14174, 4788, 331, 7, 89, 8, 796, 334, 1343, 569, 89, 618, 1976, 796, 657, 13, 37227, 198, 8818, 16932, 62, 38942, 879, 62, 19849, 7, 66, 3712, 46912, 11, 277, 3712, 38469, 8, 198, 220, 220, 220, 299, 11, 285, 796, 2546, 7, 66, 8, 220, 198, 220, 220, 220, 2488, 30493, 4129, 7, 69, 8, 6624, 299, 198, 220, 220, 220, 2746, 796, 9104, 7, 82, 14375, 796, 402, 1434, 8482, 50, 14375, 7, 26410, 34227, 796, 657, 4008, 628, 220, 220, 220, 1303, 569, 1503, 3539, 9148, 1546, 198, 220, 220, 220, 2488, 45286, 7, 19849, 11, 2124, 58, 16, 25, 77, 4357, 20828, 8, 220, 220, 220, 220, 1303, 29118, 7064, 198, 220, 220, 220, 2488, 45286, 7, 19849, 11, 569, 58, 16, 25, 77, 11, 352, 25, 76, 11, 352, 25, 76, 12962, 220, 1303, 44800, 2551, 3896, 266, 13, 81, 13, 83, 13, 1976, 198, 220, 220, 220, 2488, 45286, 7, 19849, 11, 334, 58, 16, 25, 77, 11, 352, 25, 76, 12962, 220, 1303, 10832, 2450, 220, 220, 628, 220, 220, 220, 1303, 7102, 2257, 3861, 1268, 4694, 220, 220, 220, 220, 198, 220, 220, 220, 329, 474, 28, 16, 25, 76, 1303, 34479, 17778, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 1976, 27498, 7, 77, 11, 285, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 28664, 58, 72, 11, 73, 60, 796, 352, 329, 1312, 28, 16, 25, 77, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 2160, 7, 28664, 764, 9, 334, 8, 18189, 288, 58, 73, 12962, 220, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 1303, 29765, 17778, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 1976, 27498, 7, 77, 11, 285, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 28664, 58, 72, 11, 73, 60, 796, 352, 329, 474, 28, 16, 25, 76, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 2160, 7, 28664, 764, 9, 334, 8, 19841, 264, 58, 72, 60, 1635, 2124, 58, 72, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 25334, 23680, 9306, 198, 220, 220, 220, 2488, 45286, 7, 19849, 11, 376, 8, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 376, 18189, 2160, 7, 69, 58, 73, 60, 1635, 2124, 58, 73, 60, 329, 474, 796, 352, 25, 77, 8, 1343, 2160, 7, 66, 58, 72, 11, 474, 60, 1635, 334, 58, 72, 11, 474, 60, 329, 1312, 28, 16, 25, 77, 11, 474, 28, 16, 25, 76, 4008, 220, 198, 220, 220, 220, 2488, 15252, 425, 7, 19849, 11, 1855, 11, 376, 8, 198, 220, 220, 220, 1441, 2746, 11, 2124, 11, 334, 11, 569, 198, 437, 198, 198, 8818, 4174, 62, 258, 27915, 7, 19849, 11, 2124, 11, 334, 11, 569, 8, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 334, 764, 29, 28, 657, 8, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 569, 764, 29, 28, 657, 8, 198, 220, 220, 220, 1441, 198, 437, 198, 198, 37811, 9938, 82, 290, 6673, 5290, 1339, 6630, 329, 262, 6841, 4067, 1917, 13, 37227, 198, 8818, 1064, 62, 86, 66, 62, 23779, 7, 19849, 11, 2124, 11, 334, 11, 569, 11, 2124, 12786, 11, 334, 12786, 11, 569, 12786, 11, 374, 8873, 11, 402, 6475, 8, 198, 220, 220, 220, 266, 66, 62, 19849, 796, 9104, 7, 82, 14375, 796, 402, 1434, 8482, 50, 14375, 7, 26410, 34227, 796, 657, 4008, 1303, 41895, 3601, 5269, 13, 198, 220, 220, 220, 2488, 45286, 7, 86, 66, 62, 19849, 11, 532, 81, 8873, 19841, 1976, 58, 16, 25, 76, 60, 19841, 374, 8873, 8, 198, 220, 220, 220, 2488, 45286, 7, 86, 66, 62, 19849, 11, 2593, 67, 13513, 58, 16, 25, 76, 60, 18189, 657, 8, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 86, 66, 62, 19849, 11, 685, 72, 28, 16, 25, 76, 4357, 2593, 67, 13513, 58, 72, 60, 18189, 1976, 58, 72, 12962, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 86, 66, 62, 19849, 11, 685, 72, 28, 16, 25, 76, 4357, 2593, 67, 13513, 58, 72, 60, 18189, 532, 89, 58, 72, 12962, 198, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 86, 66, 62, 19849, 11, 2160, 7, 27237, 67, 13513, 8, 19841, 402, 6475, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 954, 796, 4129, 7, 19849, 13, 2815, 1102, 2536, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 1303, 1729, 12480, 22055, 17778, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 16, 25, 76, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 15252, 425, 7, 86, 66, 62, 19849, 11, 1855, 11, 334, 12786, 58, 72, 11, 73, 60, 1343, 2160, 7, 53, 12786, 58, 72, 11, 73, 11, 47715, 764, 9, 1976, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8494, 7, 86, 66, 62, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 651, 15252, 425, 8367, 7, 86, 66, 62, 19849, 8, 1279, 532, 16, 68, 12, 20, 1303, 611, 32315, 318, 13998, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 89, 796, 651, 8367, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 334, 58, 72, 11, 73, 60, 1343, 2160, 7, 53, 58, 72, 11, 73, 11, 47715, 764, 9, 649, 62, 89, 8, 18189, 657, 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, 2488, 10951, 7203, 3, 7, 13664, 7, 19849, 13, 2815, 1102, 2536, 8, 532, 954, 8, 1729, 12480, 22055, 6630, 2087, 13, 366, 8, 198, 220, 220, 220, 954, 796, 4129, 7, 19849, 13, 2815, 1102, 2536, 8, 198, 220, 220, 220, 329, 474, 796, 352, 25, 76, 1303, 3512, 17778, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 1976, 27498, 7, 77, 11, 285, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 28664, 58, 72, 11, 73, 60, 796, 352, 329, 1312, 28, 16, 25, 77, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 15252, 425, 7, 86, 66, 62, 19849, 11, 1855, 11, 2160, 7, 28664, 764, 9, 334, 12786, 8, 1343, 2160, 7, 53, 12786, 58, 45299, 73, 11, 47715, 1635, 1976, 8, 532, 288, 58, 73, 60, 532, 357, 47, 9, 89, 38381, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 8494, 7, 86, 66, 62, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 651, 15252, 425, 8367, 7, 86, 66, 62, 19849, 8, 1279, 532, 16, 68, 12, 20, 1303, 611, 32315, 318, 13998, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 89, 796, 651, 8367, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 2160, 7, 28664, 764, 9, 334, 8, 1343, 2160, 7, 53, 58, 45299, 73, 11, 47715, 1635, 649, 62, 89, 8, 18189, 288, 58, 73, 60, 1343, 357, 47, 9, 3605, 62, 89, 38381, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 10951, 7203, 3, 7, 13664, 7, 19849, 13, 2815, 1102, 2536, 8, 532, 954, 8, 3512, 32315, 6630, 2087, 19570, 198, 220, 220, 220, 954, 796, 4129, 7, 19849, 13, 2815, 1102, 2536, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 77, 1303, 5339, 17778, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 1976, 27498, 7, 77, 11, 285, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 28664, 58, 72, 11, 73, 60, 796, 352, 329, 474, 28, 16, 25, 76, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 15252, 425, 7, 86, 66, 62, 19849, 11, 1855, 11, 532, 2160, 7, 28664, 764, 9, 334, 12786, 8, 532, 2160, 7, 53, 12786, 58, 72, 11, 45299, 47715, 1635, 1976, 8, 1343, 264, 58, 72, 60, 1635, 2124, 12786, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 8494, 7, 86, 66, 62, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 651, 15252, 425, 8367, 7, 86, 66, 62, 19849, 8, 1279, 532, 16, 68, 12, 20, 1303, 611, 32315, 318, 13998, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 89, 796, 651, 8367, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 2160, 7, 28664, 764, 9, 334, 8, 1343, 2160, 7, 53, 58, 72, 11, 45299, 47715, 1635, 649, 62, 89, 8, 19841, 264, 58, 72, 60, 1635, 2124, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 10951, 7203, 3, 7, 13664, 7, 19849, 13, 2815, 1102, 2536, 8, 532, 954, 8, 5339, 32315, 6630, 2087, 19570, 198, 220, 220, 220, 1303, 9432, 198, 220, 220, 220, 2488, 15252, 425, 7, 86, 66, 62, 19849, 11, 5436, 11, 2160, 7, 69, 58, 73, 60, 1635, 2124, 12786, 58, 73, 60, 329, 474, 796, 352, 25, 77, 8, 1343, 2160, 7, 66, 58, 72, 11, 474, 60, 1635, 357, 84, 12786, 58, 72, 11, 474, 60, 1343, 2160, 7, 53, 12786, 58, 72, 11, 73, 11, 47715, 764, 9, 1976, 4008, 329, 1312, 28, 16, 25, 77, 11, 474, 28, 16, 25, 76, 4008, 198, 220, 220, 220, 8494, 7, 86, 66, 62, 19849, 8, 198, 220, 220, 220, 611, 651, 15252, 425, 8367, 7, 86, 66, 62, 19849, 8, 1875, 651, 8367, 7, 19849, 13, 26801, 8, 1343, 352, 68, 12, 20, 1303, 611, 32315, 318, 13998, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 89, 796, 651, 8367, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 1102, 2536, 2913, 7, 19849, 11, 2746, 13, 26801, 18189, 2160, 7, 69, 58, 73, 60, 1635, 2124, 58, 73, 60, 329, 474, 796, 352, 25, 77, 8, 1343, 2160, 7, 66, 58, 72, 11, 474, 60, 1635, 357, 84, 58, 72, 11, 474, 60, 1343, 2160, 7, 53, 58, 72, 11, 73, 11, 47715, 764, 9, 649, 62, 89, 4008, 329, 1312, 28, 16, 25, 77, 11, 474, 28, 16, 25, 76, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 7203, 10267, 425, 2005, 2087, 19570, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 1345, 1747, 262, 4610, 286, 262, 6841, 4067, 2746, 13, 220, 198, 14573, 13332, 389, 4075, 7291, 351, 1180, 32484, 13, 198, 40141, 5556, 5895, 389, 584, 2785, 6841, 7064, 13, 198, 49, 592, 6901, 8787, 1022, 7291, 290, 3512, 13760, 13, 220, 198, 37811, 198, 8818, 7110, 62, 82, 2122, 7, 19849, 11, 2124, 11, 331, 11, 1575, 796, 2147, 8, 198, 220, 220, 220, 458, 83, 796, 41058, 7, 38942, 2410, 58, 45299, 352, 4357, 7291, 58, 45299, 362, 4357, 19736, 1096, 796, 657, 13, 19, 764, 9, 264, 764, 9, 651, 8367, 7, 87, 4008, 198, 220, 220, 220, 41058, 0, 7, 38942, 2410, 58, 45299, 352, 4357, 7291, 58, 45299, 362, 4357, 19736, 1096, 796, 657, 13, 19, 764, 9, 264, 11, 19736, 71, 1758, 796, 1058, 28988, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 16, 25, 76, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 651, 8367, 7, 88, 58, 72, 11, 73, 12962, 18189, 352, 68, 12, 940, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7110, 0, 26933, 23144, 364, 58, 73, 11, 352, 4357, 7291, 58, 72, 11, 16, 60, 4357, 685, 23144, 364, 58, 73, 11, 17, 4357, 7291, 58, 72, 11, 17, 60, 4357, 9493, 413, 5649, 796, 651, 8367, 7, 88, 58, 72, 11, 73, 46570, 8177, 28, 9562, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 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, 611, 1575, 6624, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 41058, 0, 7, 23144, 364, 58, 45299, 352, 4357, 4297, 58, 45299, 362, 4357, 19736, 1096, 796, 513, 9, 67, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 366, 14957, 1575, 25, 29568, 744, 7, 1136, 15252, 425, 8367, 7, 19849, 828, 43237, 12894, 896, 28, 20, 4008, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 41058, 0, 7, 23144, 364, 58, 45299, 352, 4357, 4297, 58, 45299, 362, 4357, 19736, 1096, 796, 513, 9, 67, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 366, 14957, 1575, 25, 29568, 744, 7, 15805, 11, 82, 328, 12894, 896, 28, 20, 4008, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7203, 47522, 879, 1575, 25, 29568, 1136, 8367, 7, 16345, 7, 69, 58, 73, 60, 1635, 2124, 58, 73, 60, 329, 474, 796, 352, 25, 77, 22305, 4943, 198, 220, 220, 220, 44872, 7203, 8291, 10189, 1575, 25, 29568, 1136, 8367, 7, 16345, 7, 66, 58, 72, 11, 474, 60, 1635, 331, 58, 72, 11, 474, 60, 329, 1312, 28, 16, 25, 77, 11, 474, 28, 16, 25, 76, 22305, 4943, 198, 220, 220, 220, 1441, 458, 83, 198, 437, 198, 198, 81, 8873, 796, 352, 198, 38, 6475, 796, 642, 198, 19849, 11, 2124, 11, 334, 11, 569, 796, 16932, 62, 38942, 879, 62, 19849, 7, 66, 11, 277, 8, 198, 39014, 62, 258, 27915, 7, 19849, 11, 2124, 11, 334, 11, 569, 8, 198, 198, 2, 2141, 1315, 34820, 286, 6630, 198, 1640, 1312, 28, 16, 25, 1314, 198, 220, 220, 220, 2488, 10951, 7203, 29993, 341, 29568, 72, 8, 19570, 198, 220, 220, 220, 4981, 1096, 796, 4129, 7, 19849, 13, 2815, 1102, 2536, 8, 198, 220, 220, 220, 8494, 7, 19849, 8, 198, 220, 220, 220, 2124, 12786, 11, 334, 12786, 11, 569, 12786, 796, 651, 8367, 7, 87, 828, 651, 8367, 7, 84, 828, 651, 8367, 7, 53, 8, 198, 220, 220, 220, 1064, 62, 86, 66, 62, 23779, 7, 19849, 11, 2124, 11, 334, 11, 569, 11, 2124, 12786, 11, 334, 12786, 11, 569, 12786, 837, 374, 8873, 11, 402, 6475, 8, 198, 220, 220, 220, 611, 4129, 7, 19849, 13, 2815, 1102, 2536, 8, 6624, 4981, 1096, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 7203, 27871, 2847, 4251, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 7203, 27871, 4402, 1575, 25, 3, 7, 1136, 15252, 425, 8367, 7, 19849, 4008, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 20647, 815, 47873, 287, 5299, 3064, 16907, 36098, 34820, 13, 220, 198, 198, 29487, 62, 82, 2122, 7, 19849, 11, 2124, 11, 334, 8 ]
2.118327
2,941
export children, has_children, is_left_child, is_right_child import AbstractTrees: children, has_children function children(jlt::AbstractJLBoostTree) jlt.children end function has_children(jlt::AbstractJLBoostTree) length(children(jlt)) > 0 end function is_left_child(jlt::AbstractJLBoostTree) jlt == jlt.parent.children[1] end is_right_child(jlt::AbstractJLBoostTree) = !is_left_child(jlt)
[ 39344, 1751, 11, 468, 62, 17197, 11, 318, 62, 9464, 62, 9410, 11, 318, 62, 3506, 62, 9410, 198, 198, 11748, 27741, 51, 6037, 25, 1751, 11, 468, 62, 17197, 198, 198, 8818, 1751, 7, 73, 2528, 3712, 23839, 41, 43, 45686, 27660, 8, 198, 220, 220, 220, 474, 2528, 13, 17197, 198, 437, 198, 198, 8818, 468, 62, 17197, 7, 73, 2528, 3712, 23839, 41, 43, 45686, 27660, 8, 198, 220, 220, 220, 4129, 7, 17197, 7, 73, 2528, 4008, 1875, 657, 198, 437, 198, 198, 8818, 318, 62, 9464, 62, 9410, 7, 73, 2528, 3712, 23839, 41, 43, 45686, 27660, 8, 198, 220, 220, 220, 474, 2528, 6624, 474, 2528, 13, 8000, 13, 17197, 58, 16, 60, 198, 437, 198, 198, 271, 62, 3506, 62, 9410, 7, 73, 2528, 3712, 23839, 41, 43, 45686, 27660, 8, 796, 5145, 271, 62, 9464, 62, 9410, 7, 73, 2528, 8 ]
2.731544
149
<gh_stars>0 include("Graph.jl") include("NodeCentrality.jl") include("EdgeCentrality.jl") function NormalizedBetweennessCentrality(G) NC = ((G.n > 10000) || (G.m > 10000)) ? ApproxBetweennessCentrality(G) : BetweennessCentrality(G) EC = ((G.n > 10000) || (G.m > 10000)) ? ApproxEdgeBetweenness(G) : EdgeBetweenness(G) NC ./= sum(NC) EC ./= sum(EC) return NC, EC end function selectNodes(G, selectedNodes, selectedEdges, selectMode) NC, EC = NormalizedBetweennessCentrality(G) nl = zeros(Int, G.n) el = zeros(Int, G.m) foreach(i -> nl[i] = i, 1 : G.n) foreach(i -> el[i] = i, 1 : G.m) sort!(nl, by = x->-NC[x]) sort!(el, by = x->-EC[x]) Selected = zeros(Bool, G.n) if ('n' in selectMode) foreach(i -> Selected[nl[i]] = true, 1 : min(selectedNodes, G.n)) end if ('e' in selectMode) for i = 1 : min(selectedEdges, G.m) Selected[G.E[el[i]][2]] = true Selected[G.E[el[i]][3]] = true end end return NC, EC, Selected end function SearchWay(g, status) n = size(g, 1) h = copy(status) Q = zeros(Int, n) front = 1 rear = 0 pushQ(x) = begin rear += 1 Q[rear] = x end popQ() = begin tmp = Q[front] front += 1 return tmp end for i = 1 : n (h[i] == 1) ? pushQ(i) : nothing end prior = zeros(Int, n) while front <= rear u = popQ() for v in g[u] if h[v] == 0 h[v] = 1 prior[v] = u pushQ(v) elseif h[v] == 2 nodeList = Array{Int, 1}() push!(nodeList, v) push!(nodeList, u) p = prior[u] while p != 0 push!(nodeList, p) p = prior[p] end return nodeList end end end return nothing end function KeepOne(G, Selected, NC, EC) g = getAdjacentList(G) F = zeros(Int, G.n) foreach(i -> F[i] = i, 1 : G.n) find(x) = begin if F[x] != x F[x] = find(F[x]) end return F[x] end SetUnion(x, y) = F[find(x)] = find(y) for (ID, u, v, w) in G.E (Selected[u] && Selected[v]) ? SetUnion(u, v) : nothing end status = zeros(Int, G.n) while true clist = Array{Int, 1}() for i = 1 : G.n if Selected[i] && (F[i] == i) push!(clist, i) end end Bst = Array{Int, 1}() bstlen = G.n fill!(status, 0) for u in clist for i = 1 : G.n if Selected[i] status[i] = (find(i) == u) ? 1 : 2 end end tmp = SearchWay(g, status) if (tmp != nothing) && (size(tmp, 1) < bstlen) bstlen = size(tmp, 1) Bst = copy(tmp) end end if bstlen == G.n break end for i = 1 : bstlen Selected[Bst[i]] = true (i > 1) ? SetUnion(Bst[i], Bst[i - 1]) : nothing end end NodeC = Dict{Int, Float64}() NCmax = NC[argmax(NC)] for i = 1 : G.n if Selected[i] NodeC[G.V[i]] = NC[i] / NCmax end end return SubGraph(G, Selected, EC), NodeC, NCmax end function SearchAll(g, st, selected) n = size(g, 1) visited = zeros(Bool, n) visited[st] = true Q = zeros(Int, n) front = 1 rear = 0 pushQ(x) = begin rear += 1 Q[rear] = x end popQ() = begin tmp = Q[front] front += 1 return tmp end pushQ(st) prior = zeros(Int, n) while front <= rear u = popQ() for v in g[u] if !visited[v] visited[v] = true prior[v] = u pushQ(v) end end end needNodes = zeros(Bool, n) for v = 1 : n if selected[v] x = v while (x > 0) needNodes[x] = true x = prior[x] end end end return needNodes end function KeepAll(G, Selected, NC, EC) g = getAdjacentList(G) Needed = copy(Selected) for i = 1 : G.n if Selected[i] needNodes = SearchAll(g, i, Selected) foreach(j -> Needed[j] = Needed[j] || needNodes[j], 1 : G.n) end end NodeC = Dict{Int, Float64}() NCmax = NC[argmax(NC)] for i = 1 : G.n if Needed[i] NodeC[G.V[i]] = NC[i] / NCmax end end return SubGraph(G, Needed, EC), NodeC, NCmax end function Compress(G, selectedNodes, selectedEdges, selectMode, addMode) NC, EC, Selected = selectNodes(G, selectedNodes, selectedEdges, selectMode) return (addMode == "KeepOne") ? KeepOne(G, Selected, NC, EC) : KeepAll(G, Selected, NC, EC) end function CentralityInformation(G, NodeC, maxNodeC) nci = 0.0 eci = 0.0 foreach(i -> nci += (NodeC[G.V[i]]*maxNodeC), 1 : G.n) foreach(i -> eci += G.E[i][4], 1 : G.m) return nci, eci, (nci+eci)/2 end
[ 27, 456, 62, 30783, 29, 15, 198, 17256, 7203, 37065, 13, 20362, 4943, 198, 17256, 7203, 19667, 30645, 414, 13, 20362, 4943, 198, 17256, 7203, 37021, 30645, 414, 13, 20362, 4943, 198, 198, 8818, 14435, 1143, 25262, 1108, 30645, 414, 7, 38, 8, 198, 220, 220, 220, 8823, 796, 14808, 38, 13, 77, 1875, 33028, 8, 8614, 357, 38, 13, 76, 1875, 33028, 4008, 5633, 2034, 13907, 25262, 1108, 30645, 414, 7, 38, 8, 1058, 14307, 1108, 30645, 414, 7, 38, 8, 198, 220, 220, 220, 13182, 796, 14808, 38, 13, 77, 1875, 33028, 8, 8614, 357, 38, 13, 76, 1875, 33028, 4008, 5633, 2034, 13907, 37021, 25262, 1108, 7, 38, 8, 1058, 13113, 25262, 1108, 7, 38, 8, 198, 220, 220, 220, 8823, 24457, 28, 2160, 7, 7792, 8, 198, 220, 220, 220, 13182, 24457, 28, 2160, 7, 2943, 8, 198, 220, 220, 220, 1441, 8823, 11, 13182, 198, 437, 198, 198, 8818, 2922, 45, 4147, 7, 38, 11, 6163, 45, 4147, 11, 6163, 7407, 3212, 11, 2922, 19076, 8, 198, 220, 220, 220, 8823, 11, 13182, 796, 14435, 1143, 25262, 1108, 30645, 414, 7, 38, 8, 198, 220, 220, 220, 299, 75, 796, 1976, 27498, 7, 5317, 11, 402, 13, 77, 8, 198, 220, 220, 220, 1288, 796, 1976, 27498, 7, 5317, 11, 402, 13, 76, 8, 198, 220, 220, 220, 1674, 620, 7, 72, 4613, 299, 75, 58, 72, 60, 796, 1312, 11, 352, 1058, 402, 13, 77, 8, 198, 220, 220, 220, 1674, 620, 7, 72, 4613, 1288, 58, 72, 60, 796, 1312, 11, 352, 1058, 402, 13, 76, 8, 198, 220, 220, 220, 3297, 0, 7, 21283, 11, 416, 796, 2124, 3784, 12, 7792, 58, 87, 12962, 198, 220, 220, 220, 3297, 0, 7, 417, 11, 416, 796, 2124, 3784, 12, 2943, 58, 87, 12962, 628, 220, 220, 220, 41344, 796, 1976, 27498, 7, 33, 970, 11, 402, 13, 77, 8, 198, 220, 220, 220, 611, 19203, 77, 6, 287, 2922, 19076, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1674, 620, 7, 72, 4613, 41344, 58, 21283, 58, 72, 11907, 796, 2081, 11, 352, 1058, 949, 7, 34213, 45, 4147, 11, 402, 13, 77, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 19203, 68, 6, 287, 2922, 19076, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 1058, 949, 7, 34213, 7407, 3212, 11, 402, 13, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41344, 58, 38, 13, 36, 58, 417, 58, 72, 60, 7131, 17, 11907, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41344, 58, 38, 13, 36, 58, 417, 58, 72, 60, 7131, 18, 11907, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 8823, 11, 13182, 11, 41344, 198, 437, 198, 198, 8818, 11140, 25309, 7, 70, 11, 3722, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 70, 11, 352, 8, 198, 220, 220, 220, 289, 796, 4866, 7, 13376, 8, 198, 220, 220, 220, 1195, 796, 1976, 27498, 7, 5317, 11, 299, 8, 198, 220, 220, 220, 2166, 796, 352, 198, 220, 220, 220, 8286, 796, 657, 628, 220, 220, 220, 4574, 48, 7, 87, 8, 796, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 8286, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 58, 260, 283, 60, 796, 2124, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1461, 48, 3419, 796, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 796, 1195, 58, 8534, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2166, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 45218, 198, 220, 220, 220, 886, 628, 220, 220, 220, 329, 1312, 796, 352, 1058, 299, 198, 220, 220, 220, 220, 220, 220, 220, 357, 71, 58, 72, 60, 6624, 352, 8, 5633, 4574, 48, 7, 72, 8, 1058, 2147, 198, 220, 220, 220, 886, 628, 220, 220, 220, 3161, 796, 1976, 27498, 7, 5317, 11, 299, 8, 628, 220, 220, 220, 981, 2166, 19841, 8286, 198, 220, 220, 220, 220, 220, 220, 220, 334, 796, 1461, 48, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 410, 287, 308, 58, 84, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 289, 58, 85, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 289, 58, 85, 60, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3161, 58, 85, 60, 796, 334, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 48, 7, 85, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 289, 58, 85, 60, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10139, 8053, 796, 15690, 90, 5317, 11, 352, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 17440, 8053, 11, 410, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 17440, 8053, 11, 334, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 3161, 58, 84, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 279, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 17440, 8053, 11, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 3161, 58, 79, 60, 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, 220, 220, 220, 220, 1441, 10139, 8053, 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, 1441, 2147, 198, 437, 198, 198, 8818, 9175, 3198, 7, 38, 11, 41344, 11, 8823, 11, 13182, 8, 198, 220, 220, 220, 308, 796, 651, 2782, 73, 12643, 8053, 7, 38, 8, 198, 220, 220, 220, 376, 796, 1976, 27498, 7, 5317, 11, 402, 13, 77, 8, 198, 220, 220, 220, 1674, 620, 7, 72, 4613, 376, 58, 72, 60, 796, 1312, 11, 352, 1058, 402, 13, 77, 8, 628, 220, 220, 220, 1064, 7, 87, 8, 796, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 611, 376, 58, 87, 60, 14512, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 376, 58, 87, 60, 796, 1064, 7, 37, 58, 87, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 376, 58, 87, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 5345, 38176, 7, 87, 11, 331, 8, 796, 376, 58, 19796, 7, 87, 15437, 796, 1064, 7, 88, 8, 628, 220, 220, 220, 329, 357, 2389, 11, 334, 11, 410, 11, 266, 8, 287, 402, 13, 36, 198, 220, 220, 220, 220, 220, 220, 220, 357, 4653, 12609, 58, 84, 60, 11405, 41344, 58, 85, 12962, 5633, 5345, 38176, 7, 84, 11, 410, 8, 1058, 2147, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3722, 796, 1976, 27498, 7, 5317, 11, 402, 13, 77, 8, 628, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 537, 396, 796, 15690, 90, 5317, 11, 352, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 1058, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 41344, 58, 72, 60, 11405, 357, 37, 58, 72, 60, 6624, 1312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 565, 396, 11, 1312, 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, 220, 220, 220, 220, 347, 301, 796, 15690, 90, 5317, 11, 352, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 275, 301, 11925, 796, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 0, 7, 13376, 11, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 334, 287, 537, 396, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 1058, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 41344, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3722, 58, 72, 60, 796, 357, 19796, 7, 72, 8, 6624, 334, 8, 5633, 352, 1058, 362, 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, 45218, 796, 11140, 25309, 7, 70, 11, 3722, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 22065, 14512, 2147, 8, 11405, 357, 7857, 7, 22065, 11, 352, 8, 1279, 275, 301, 11925, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 301, 11925, 796, 2546, 7, 22065, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 347, 301, 796, 4866, 7, 22065, 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, 220, 220, 220, 220, 611, 275, 301, 11925, 6624, 402, 13, 77, 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, 220, 220, 220, 220, 329, 1312, 796, 352, 1058, 275, 301, 11925, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41344, 58, 33, 301, 58, 72, 11907, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 72, 1875, 352, 8, 5633, 5345, 38176, 7, 33, 301, 58, 72, 4357, 347, 301, 58, 72, 532, 352, 12962, 1058, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 19081, 34, 796, 360, 713, 90, 5317, 11, 48436, 2414, 92, 3419, 198, 220, 220, 220, 8823, 9806, 796, 8823, 58, 853, 9806, 7, 7792, 15437, 198, 220, 220, 220, 329, 1312, 796, 352, 1058, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 41344, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19081, 34, 58, 38, 13, 53, 58, 72, 11907, 796, 8823, 58, 72, 60, 1220, 8823, 9806, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 3834, 37065, 7, 38, 11, 41344, 11, 13182, 828, 19081, 34, 11, 8823, 9806, 198, 437, 198, 198, 8818, 11140, 3237, 7, 70, 11, 336, 11, 6163, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 70, 11, 352, 8, 198, 220, 220, 220, 8672, 796, 1976, 27498, 7, 33, 970, 11, 299, 8, 198, 220, 220, 220, 8672, 58, 301, 60, 796, 2081, 198, 220, 220, 220, 1195, 796, 1976, 27498, 7, 5317, 11, 299, 8, 198, 220, 220, 220, 2166, 796, 352, 198, 220, 220, 220, 8286, 796, 657, 628, 220, 220, 220, 4574, 48, 7, 87, 8, 796, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 8286, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 58, 260, 283, 60, 796, 2124, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1461, 48, 3419, 796, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 796, 1195, 58, 8534, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2166, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 45218, 198, 220, 220, 220, 886, 628, 220, 220, 220, 4574, 48, 7, 301, 8, 628, 220, 220, 220, 3161, 796, 1976, 27498, 7, 5317, 11, 299, 8, 628, 220, 220, 220, 981, 2166, 19841, 8286, 198, 220, 220, 220, 220, 220, 220, 220, 334, 796, 1461, 48, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 410, 287, 308, 58, 84, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 4703, 863, 58, 85, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8672, 58, 85, 60, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3161, 58, 85, 60, 796, 334, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 48, 7, 85, 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, 628, 220, 220, 220, 761, 45, 4147, 796, 1976, 27498, 7, 33, 970, 11, 299, 8, 198, 220, 220, 220, 329, 410, 796, 352, 1058, 299, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6163, 58, 85, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 410, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 357, 87, 1875, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 761, 45, 4147, 58, 87, 60, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 3161, 58, 87, 60, 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, 1441, 761, 45, 4147, 198, 437, 198, 198, 8818, 9175, 3237, 7, 38, 11, 41344, 11, 8823, 11, 13182, 8, 198, 220, 220, 220, 308, 796, 651, 2782, 73, 12643, 8053, 7, 38, 8, 198, 220, 220, 220, 10664, 276, 796, 4866, 7, 4653, 12609, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 1058, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 41344, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 761, 45, 4147, 796, 11140, 3237, 7, 70, 11, 1312, 11, 41344, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1674, 620, 7, 73, 4613, 10664, 276, 58, 73, 60, 796, 10664, 276, 58, 73, 60, 8614, 761, 45, 4147, 58, 73, 4357, 352, 1058, 402, 13, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 19081, 34, 796, 360, 713, 90, 5317, 11, 48436, 2414, 92, 3419, 198, 220, 220, 220, 8823, 9806, 796, 8823, 58, 853, 9806, 7, 7792, 15437, 198, 220, 220, 220, 329, 1312, 796, 352, 1058, 402, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 10664, 276, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19081, 34, 58, 38, 13, 53, 58, 72, 11907, 796, 8823, 58, 72, 60, 1220, 8823, 9806, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 3834, 37065, 7, 38, 11, 10664, 276, 11, 13182, 828, 19081, 34, 11, 8823, 9806, 198, 437, 198, 198, 8818, 3082, 601, 7, 38, 11, 6163, 45, 4147, 11, 6163, 7407, 3212, 11, 2922, 19076, 11, 751, 19076, 8, 198, 220, 220, 220, 8823, 11, 13182, 11, 41344, 796, 2922, 45, 4147, 7, 38, 11, 6163, 45, 4147, 11, 6163, 7407, 3212, 11, 2922, 19076, 8, 198, 220, 220, 220, 1441, 357, 2860, 19076, 6624, 366, 15597, 3198, 4943, 5633, 9175, 3198, 7, 38, 11, 41344, 11, 8823, 11, 13182, 8, 1058, 9175, 3237, 7, 38, 11, 41344, 11, 8823, 11, 13182, 8, 198, 437, 198, 198, 8818, 5694, 414, 21918, 7, 38, 11, 19081, 34, 11, 3509, 19667, 34, 8, 198, 220, 220, 220, 299, 979, 796, 657, 13, 15, 198, 220, 220, 220, 304, 979, 796, 657, 13, 15, 198, 220, 220, 220, 1674, 620, 7, 72, 4613, 299, 979, 15853, 357, 19667, 34, 58, 38, 13, 53, 58, 72, 11907, 9, 9806, 19667, 34, 828, 352, 1058, 402, 13, 77, 8, 198, 220, 220, 220, 1674, 620, 7, 72, 4613, 304, 979, 15853, 402, 13, 36, 58, 72, 7131, 19, 4357, 352, 1058, 402, 13, 76, 8, 198, 220, 220, 220, 1441, 299, 979, 11, 304, 979, 11, 357, 77, 979, 10, 721, 72, 20679, 17, 198, 437, 198 ]
1.791595
2,903
<reponame>sp94/PlaneWaveExpansionMethod.jl<gh_stars>10-100 """ Mode(k0, frequency, data, weighting, basis, label) Eigenmode of a photonic crystal expressed on a plane-wave `basis` with a weighted inner product. """ struct Mode k0::Vector{Float64} frequency::ComplexF64 data::Vector{ComplexF64} weighting::Matrix{ComplexF64} basis::PlaneWaveBasis label::String end """ HilbertSpace(k0, data, weighting, basis) Hilbert space spanned by the eigenvectors in each column of `data`. The eigenvectors will be orthonormalised using Gram-Schmidt orthonormalisation, see [`orthonormalise`](@ref). """ struct HilbertSpace k0::Vector{Float64} data::Matrix{ComplexF64} weighting::Matrix{ComplexF64} basis::PlaneWaveBasis function HilbertSpace(k0::Vector{Float64}, data::Matrix{ComplexF64}, weighting::Matrix{ComplexF64}, basis::PlaneWaveBasis) # Inner constructor guarantees data will be orthonormalised data = orthonormalise(data, weighting=weighting) return new(k0, data, weighting, basis) end end """ HilbertSpace(modes::Array{Mode,1}) Returns the Hilbert space spanned by the `modes`. The `data` of the Hilbert space is guaranteed to be orthonormal under the weighting of the `modes`. """ function HilbertSpace(modes::Array{Mode,1}) k0 = modes[1].k0 data = zeros(ComplexF64, length(modes[1].data), length(modes)) weighting = modes[1].weighting basis = modes[1].basis for (col,mode) in enumerate(modes) @assert mode.k0 == k0 @assert mode.weighting == weighting @assert mode.basis == basis data[:,col] = mode.data end return HilbertSpace(k0, data, weighting, basis) end """ shift_k0(space::HilbertSpace, dp::Int, dq::Int) Shift the basis of the Hilbert space by `dp*b1 + dq*b2`, where `b1` and `b2` are reciprocal lattice vectors. This is required when we need the overlaps of modes that are at the same k-point but in different Brillouin zones. """ function shift_k0(space::HilbertSpace, dp::Int, dq::Int) data = space.data ps = space.basis.ps qs = space.basis.qs data_new = zeros(ComplexF64, size(data)) for row in 1:size(data,1) # Identify the corresponding (p_new,q_new) indices # in the plane wave basis p_new = ps[row] - dp q_new = qs[row] - dq row_new = findfirst(x->x==(p_new,q_new), collect(zip(ps,qs))) if !isnothing(row_new) data_new[row_new,:] = data[row,:] end end k0_new = space.k0 + dp*space.basis.b1 + dq*space.basis.b2 return HilbertSpace(k0_new, data_new, space.weighting, space.basis) end """ normalise(data; weighting=I) Normalisation of vectors with a weighted inner product. """ function normalise(data; weighting=I) out = copy(data) for n in 1:size(out,2) out[:,n] /= sqrt(abs(dot(out[:,n],weighting*out[:,n]))) end return out end """ orthonormalise(data; weighting=I) Gram-Schmidt orthonormalisation of vectors with a weighted inner product. """ function orthonormalise(data; weighting=I) out = copy(data) out[:,1] = normalise(out[:,1], weighting=weighting) # Gram-Schmidt orthogonalisation projector = zeros(size(out,1),size(out,1)) for n in 2:size(out,2) projector += out[:,n-1]*out[:,n-1]' * weighting out[:,n] = out[:,n] - projector*out[:,n] out[:,n] = normalise(out[:,n], weighting=weighting) end return out end
[ 27, 7856, 261, 480, 29, 2777, 5824, 14, 3646, 1531, 39709, 16870, 5487, 17410, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 37811, 198, 220, 220, 220, 10363, 7, 74, 15, 11, 8373, 11, 1366, 11, 3463, 278, 11, 4308, 11, 6167, 8, 198, 198, 36, 9324, 14171, 286, 257, 2825, 9229, 15121, 6241, 319, 257, 6614, 12, 19204, 4600, 12093, 271, 63, 351, 257, 26356, 8434, 1720, 13, 198, 37811, 198, 7249, 10363, 198, 220, 220, 220, 479, 15, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 8373, 3712, 5377, 11141, 37, 2414, 198, 220, 220, 220, 1366, 3712, 38469, 90, 5377, 11141, 37, 2414, 92, 198, 220, 220, 220, 3463, 278, 3712, 46912, 90, 5377, 11141, 37, 2414, 92, 198, 220, 220, 220, 4308, 3712, 3646, 1531, 39709, 15522, 271, 198, 220, 220, 220, 6167, 3712, 10100, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 47718, 14106, 7, 74, 15, 11, 1366, 11, 3463, 278, 11, 4308, 8, 198, 198, 39, 346, 4835, 2272, 599, 3577, 416, 262, 304, 9324, 303, 5217, 287, 1123, 5721, 286, 4600, 7890, 44646, 198, 198, 464, 304, 9324, 303, 5217, 481, 307, 29617, 261, 6636, 1417, 1262, 20159, 12, 14874, 21184, 29617, 261, 6636, 5612, 11, 198, 3826, 685, 63, 1506, 261, 6636, 786, 63, 16151, 31, 5420, 737, 198, 37811, 198, 7249, 47718, 14106, 198, 220, 220, 220, 479, 15, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 1366, 3712, 46912, 90, 5377, 11141, 37, 2414, 92, 198, 220, 220, 220, 3463, 278, 3712, 46912, 90, 5377, 11141, 37, 2414, 92, 198, 220, 220, 220, 4308, 3712, 3646, 1531, 39709, 15522, 271, 198, 220, 220, 220, 2163, 47718, 14106, 7, 74, 15, 3712, 38469, 90, 43879, 2414, 5512, 1366, 3712, 46912, 90, 5377, 11141, 37, 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, 220, 3463, 278, 3712, 46912, 90, 5377, 11141, 37, 2414, 5512, 4308, 3712, 3646, 1531, 39709, 15522, 271, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 24877, 23772, 19026, 1366, 481, 307, 29617, 261, 6636, 1417, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 29617, 261, 6636, 786, 7, 7890, 11, 3463, 278, 28, 6551, 278, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 7, 74, 15, 11, 1366, 11, 3463, 278, 11, 4308, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 47718, 14106, 7, 76, 4147, 3712, 19182, 90, 19076, 11, 16, 30072, 198, 198, 35561, 262, 47718, 2272, 599, 3577, 416, 262, 4600, 76, 4147, 44646, 198, 198, 464, 4600, 7890, 63, 286, 262, 47718, 2272, 318, 11462, 284, 307, 29617, 261, 6636, 198, 4625, 262, 3463, 278, 286, 262, 4600, 76, 4147, 44646, 198, 37811, 198, 8818, 47718, 14106, 7, 76, 4147, 3712, 19182, 90, 19076, 11, 16, 30072, 198, 220, 220, 220, 479, 15, 796, 12881, 58, 16, 4083, 74, 15, 198, 220, 220, 220, 1366, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 4129, 7, 76, 4147, 58, 16, 4083, 7890, 828, 4129, 7, 76, 4147, 4008, 198, 220, 220, 220, 3463, 278, 796, 12881, 58, 16, 4083, 6551, 278, 198, 220, 220, 220, 4308, 796, 12881, 58, 16, 4083, 12093, 271, 198, 220, 220, 220, 329, 357, 4033, 11, 14171, 8, 287, 27056, 378, 7, 76, 4147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 4235, 13, 74, 15, 6624, 479, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 4235, 13, 6551, 278, 6624, 3463, 278, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 4235, 13, 12093, 271, 6624, 4308, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 45299, 4033, 60, 796, 4235, 13, 7890, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 47718, 14106, 7, 74, 15, 11, 1366, 11, 3463, 278, 11, 4308, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 6482, 62, 74, 15, 7, 13200, 3712, 39, 346, 4835, 14106, 11, 288, 79, 3712, 5317, 11, 288, 80, 3712, 5317, 8, 198, 198, 33377, 262, 4308, 286, 262, 47718, 2272, 416, 4600, 26059, 9, 65, 16, 1343, 288, 80, 9, 65, 17, 47671, 810, 4600, 65, 16, 63, 290, 4600, 65, 17, 63, 198, 533, 48135, 47240, 501, 30104, 13, 198, 198, 1212, 318, 2672, 618, 356, 761, 262, 12893, 1686, 286, 12881, 326, 389, 379, 262, 976, 479, 12, 4122, 198, 4360, 287, 1180, 33335, 280, 259, 14123, 13, 198, 37811, 198, 8818, 6482, 62, 74, 15, 7, 13200, 3712, 39, 346, 4835, 14106, 11, 288, 79, 3712, 5317, 11, 288, 80, 3712, 5317, 8, 198, 220, 220, 220, 1366, 796, 2272, 13, 7890, 198, 220, 220, 220, 26692, 796, 2272, 13, 12093, 271, 13, 862, 198, 220, 220, 220, 10662, 82, 796, 2272, 13, 12093, 271, 13, 48382, 198, 220, 220, 220, 1366, 62, 3605, 796, 1976, 27498, 7, 5377, 11141, 37, 2414, 11, 2546, 7, 7890, 4008, 198, 220, 220, 220, 329, 5752, 287, 352, 25, 7857, 7, 7890, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11440, 1958, 262, 11188, 357, 79, 62, 3605, 11, 80, 62, 3605, 8, 36525, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 287, 262, 6614, 6769, 4308, 198, 220, 220, 220, 220, 220, 220, 220, 279, 62, 3605, 796, 26692, 58, 808, 60, 532, 288, 79, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 62, 3605, 796, 10662, 82, 58, 808, 60, 532, 288, 80, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 3605, 796, 1064, 11085, 7, 87, 3784, 87, 855, 7, 79, 62, 3605, 11, 80, 62, 3605, 828, 2824, 7, 13344, 7, 862, 11, 48382, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 808, 62, 3605, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 3605, 58, 808, 62, 3605, 11, 47715, 796, 1366, 58, 808, 11, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 479, 15, 62, 3605, 796, 2272, 13, 74, 15, 1343, 288, 79, 9, 13200, 13, 12093, 271, 13, 65, 16, 1343, 288, 80, 9, 13200, 13, 12093, 271, 13, 65, 17, 198, 220, 220, 220, 1441, 47718, 14106, 7, 74, 15, 62, 3605, 11, 1366, 62, 3605, 11, 2272, 13, 6551, 278, 11, 2272, 13, 12093, 271, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 3487, 786, 7, 7890, 26, 3463, 278, 28, 40, 8, 198, 198, 26447, 5612, 286, 30104, 351, 257, 26356, 8434, 1720, 13, 198, 37811, 198, 8818, 3487, 786, 7, 7890, 26, 3463, 278, 28, 40, 8, 198, 220, 220, 220, 503, 796, 4866, 7, 7890, 8, 198, 220, 220, 220, 329, 299, 287, 352, 25, 7857, 7, 448, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 503, 58, 45299, 77, 60, 1220, 28, 19862, 17034, 7, 8937, 7, 26518, 7, 448, 58, 45299, 77, 4357, 6551, 278, 9, 448, 58, 45299, 77, 60, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 503, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 29617, 261, 6636, 786, 7, 7890, 26, 3463, 278, 28, 40, 8, 198, 198, 38, 859, 12, 14874, 21184, 29617, 261, 6636, 5612, 286, 30104, 351, 257, 26356, 8434, 1720, 13, 198, 37811, 198, 8818, 29617, 261, 6636, 786, 7, 7890, 26, 3463, 278, 28, 40, 8, 198, 220, 220, 220, 503, 796, 4866, 7, 7890, 8, 198, 220, 220, 220, 503, 58, 45299, 16, 60, 796, 3487, 786, 7, 448, 58, 45299, 16, 4357, 3463, 278, 28, 6551, 278, 8, 198, 220, 220, 220, 1303, 20159, 12, 14874, 21184, 29617, 519, 20996, 5612, 198, 220, 220, 220, 43396, 796, 1976, 27498, 7, 7857, 7, 448, 11, 16, 828, 7857, 7, 448, 11, 16, 4008, 198, 220, 220, 220, 329, 299, 287, 362, 25, 7857, 7, 448, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43396, 15853, 503, 58, 45299, 77, 12, 16, 60, 9, 448, 58, 45299, 77, 12, 16, 49946, 1635, 3463, 278, 198, 220, 220, 220, 220, 220, 220, 220, 503, 58, 45299, 77, 60, 796, 503, 58, 45299, 77, 60, 532, 43396, 9, 448, 58, 45299, 77, 60, 198, 220, 220, 220, 220, 220, 220, 220, 503, 58, 45299, 77, 60, 796, 3487, 786, 7, 448, 58, 45299, 77, 4357, 3463, 278, 28, 6551, 278, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 503, 198, 437, 198 ]
2.41931
1,450
using Test using IncrementalInference using Random ## @testset "test basic multihypo" begin ## A simple multihypo example Random.seed!(42) # The answer to reproducable noise fg = LocalDFG(solverParams=SolverParams(graphinit=false, gibbsIters=5, spreadNH=5.0)) pRight = 0.99 pWrong = 0.01 pr_noise = 0.01 od_noise = 0.1 lm_noise = 0.01 # true positions # x0 at 0 # x1 at 1 # l1 at 1 # l2 at 2 #x0 prior addVariable!(fg, :x0, ContinuousScalar) prpo = Normal(0.0, pr_noise) addFactor!(fg, [:x0], Prior(Normal(rand(prpo), pr_noise))) #l1 and l2 addVariable!(fg, :l1, ContinuousScalar, tags=[:LANDMARK]) addVariable!(fg, :l2, ContinuousScalar, tags=[:LANDMARK]) #x0 to l1 or l2 p2ln = Normal(1.0, lm_noise) p2p = LinearRelative(Normal(rand(p2ln), lm_noise)) addFactor!(fg, [:x0; :l1; :l2], p2p, multihypo = [1, pRight, pWrong]) # addFactor!(fg, [:x0; :l1], p2p) #this one used for sanity check #x0 to x1 addVariable!(fg, :x1, ContinuousScalar) pp = Normal(1.0, od_noise) addFactor!(fg, [:x0,:x1], LinearRelative(Normal(rand(pp), od_noise))) #x1 to l1 or l2 p2ln = Normal(0.0, lm_noise) p2p = LinearRelative(Normal(rand(p2ln), lm_noise)) addFactor!(fg, [:x1; :l1; :l2], p2p, multihypo = [1, pRight, pWrong]) # addFactor!(fg, [:x1; :l1], p2p) #this one used for sanity check #x1 to l2 or l1 p2ln = Normal(1.0, lm_noise) p2p = LinearRelative(Normal(rand(p2ln), lm_noise)) addFactor!(fg, [:x1; :l2; :l1], p2p, multihypo = [1, pRight, pWrong]) # addFactor!(fg, [:x1; :l2], p2p) #this one used for sanity check ## # prescribe an elimination order to get a single clique eo = [:l2,:x1,:x0,:l1] # fg.solverParams.graphinit=true smtasks = Task[] tree = solveTree!(fg, eliminationOrder=eo) #, smtasks=smtasks, recordcliqs=ls(fg)); # hists = fetchCliqHistoryAll!(smtasks) # plotKDE(fg, ls(fg)) ## @test isapprox(DFG.getPPESuggested(fg, :x0)[], 0, atol = 0.2) @test isapprox(DFG.getPPESuggested(fg, :x1)[], 1, atol = 0.2) @test isapprox(DFG.getPPESuggested(fg, :l1)[], 1, atol = 0.2) L2 = getBelief(fg, :l2) npts = length(getPoints(L2)) pts = [2.0.+0.1*randn(1) for _ in 1:npts] L2_ = manikde!(ContinuousScalar, pts) # test that there is at least a mode present @test mmd(L2_, L2, ContinuousScalar) < 1e-3 # @test isapprox(DFG.getPPESuggested(fg, :l2)[], 2, atol = 0.2) ## end @testset "test multihypo chain example (see #462)..." begin ## l1 = -10.0 l2 = +10.0 lnoise = 1.0 x1 = 0 x2 = 0 Onoise = 0.1 fg = initfg() addVariable!(fg, :x1, ContinuousScalar) addVariable!(fg, :x2, ContinuousScalar) addVariable!(fg, :l1, ContinuousScalar) addVariable!(fg, :l1_0, ContinuousScalar) addVariable!(fg, :l2, ContinuousScalar) addVariable!(fg, :l2_0, ContinuousScalar) # priors on two landmarks only addFactor!(fg, [:l1], Prior(Normal(l1, lnoise))) addFactor!(fg, [:l2], Prior(Normal(l2, lnoise))) # relative constraints addFactor!(fg, [:x1;:l1;:l1_0], LinearRelative(Normal(l1-x1, lnoise)), multihypo=[1;1/2;1/2]) addFactor!(fg, [:x2;:l2;:l2_0], LinearRelative(Normal(l2-x2, lnoise)), multihypo=[1;1/2;1/2]) addFactor!(fg, [:x1;:x2], LinearRelative(Normal(0, Onoise))) tree = solveTree!(fg) # drawTree(tree, show=true) # expect x1 x2 to have at least one mode at 0 @test getPPE(fg, :x1).suggested[1] - x1 |> abs < 1.2 @test getPPE(fg, :x2).suggested[1] - x2 |> abs < 1.2 @test getPPE(fg, :l1).suggested[1] - l1 |> abs < 1.2 @test getPPE(fg, :l2).suggested[1] - l2 |> abs < 1.2 # l1_0, l2_0 should be nearby around l1 and l2, but cannot confirm 100% @test getPPE(fg, :l1_0).suggested[1] - l1 |> abs < 10 @test getPPE(fg, :l2_0).suggested[1] - l2 |> abs < 10 ## end # using RoMEPlotting # Gadfly.set_default_plot_size(35cm,25cm) # # plotKDE(fg, [:l1;:l2]) # plotKDE(fg, [:l1_0;:l2_0]) # plotKDE(fg, [:x1;:x2]) #
[ 3500, 6208, 198, 3500, 10791, 37098, 818, 4288, 198, 3500, 14534, 198, 198, 2235, 198, 198, 31, 9288, 2617, 366, 9288, 4096, 1963, 4449, 4464, 78, 1, 2221, 198, 198, 2235, 317, 2829, 1963, 4449, 4464, 78, 1672, 198, 198, 29531, 13, 28826, 0, 7, 3682, 8, 1303, 383, 3280, 284, 8186, 66, 540, 7838, 198, 198, 40616, 796, 10714, 8068, 38, 7, 82, 14375, 10044, 4105, 28, 50, 14375, 10044, 4105, 7, 34960, 15003, 28, 9562, 11, 46795, 1443, 40, 1010, 28, 20, 11, 4104, 33863, 28, 20, 13, 15, 4008, 198, 198, 79, 11028, 796, 657, 13, 2079, 198, 79, 39213, 506, 796, 657, 13, 486, 198, 1050, 62, 3919, 786, 796, 657, 13, 486, 198, 375, 62, 3919, 786, 796, 657, 13, 16, 198, 75, 76, 62, 3919, 786, 796, 657, 13, 486, 198, 198, 2, 2081, 6116, 198, 2, 2124, 15, 379, 657, 198, 2, 2124, 16, 379, 352, 198, 2, 300, 16, 379, 352, 198, 2, 300, 17, 379, 362, 198, 198, 2, 87, 15, 3161, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 87, 15, 11, 45012, 3351, 282, 283, 8, 198, 1050, 7501, 796, 14435, 7, 15, 13, 15, 11, 778, 62, 3919, 786, 8, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 15, 4357, 14481, 7, 26447, 7, 25192, 7, 1050, 7501, 828, 778, 62, 3919, 786, 22305, 198, 198, 2, 75, 16, 290, 300, 17, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 16, 11, 45012, 3351, 282, 283, 11, 15940, 41888, 25, 28182, 44, 14175, 12962, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 17, 11, 45012, 3351, 282, 283, 11, 15940, 41888, 25, 28182, 44, 14175, 12962, 198, 198, 2, 87, 15, 284, 300, 16, 393, 300, 17, 198, 79, 17, 18755, 796, 14435, 7, 16, 13, 15, 11, 300, 76, 62, 3919, 786, 8, 198, 79, 17, 79, 796, 44800, 6892, 876, 7, 26447, 7, 25192, 7, 79, 17, 18755, 828, 300, 76, 62, 3919, 786, 4008, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 15, 26, 1058, 75, 16, 26, 1058, 75, 17, 4357, 279, 17, 79, 11, 1963, 4449, 4464, 78, 796, 685, 16, 11, 279, 11028, 11, 279, 39213, 506, 12962, 198, 2, 751, 41384, 0, 7, 40616, 11, 685, 25, 87, 15, 26, 1058, 75, 16, 4357, 279, 17, 79, 8, 1303, 5661, 530, 973, 329, 34182, 2198, 198, 198, 2, 87, 15, 284, 2124, 16, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 87, 16, 11, 45012, 3351, 282, 283, 8, 198, 381, 796, 14435, 7, 16, 13, 15, 11, 16298, 62, 3919, 786, 8, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 15, 11, 25, 87, 16, 4357, 44800, 6892, 876, 7, 26447, 7, 25192, 7, 381, 828, 16298, 62, 3919, 786, 22305, 198, 198, 2, 87, 16, 284, 300, 16, 393, 300, 17, 198, 79, 17, 18755, 796, 14435, 7, 15, 13, 15, 11, 300, 76, 62, 3919, 786, 8, 198, 79, 17, 79, 796, 44800, 6892, 876, 7, 26447, 7, 25192, 7, 79, 17, 18755, 828, 300, 76, 62, 3919, 786, 4008, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 1058, 75, 16, 26, 1058, 75, 17, 4357, 279, 17, 79, 11, 1963, 4449, 4464, 78, 796, 685, 16, 11, 279, 11028, 11, 279, 39213, 506, 12962, 198, 2, 751, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 1058, 75, 16, 4357, 279, 17, 79, 8, 1303, 5661, 530, 973, 329, 34182, 2198, 198, 198, 2, 87, 16, 284, 300, 17, 393, 300, 16, 198, 79, 17, 18755, 796, 14435, 7, 16, 13, 15, 11, 300, 76, 62, 3919, 786, 8, 198, 79, 17, 79, 796, 44800, 6892, 876, 7, 26447, 7, 25192, 7, 79, 17, 18755, 828, 300, 76, 62, 3919, 786, 4008, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 1058, 75, 17, 26, 1058, 75, 16, 4357, 279, 17, 79, 11, 1963, 4449, 4464, 78, 796, 685, 16, 11, 279, 11028, 11, 279, 39213, 506, 12962, 198, 2, 751, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 1058, 75, 17, 4357, 279, 17, 79, 8, 1303, 5661, 530, 973, 329, 34182, 2198, 198, 198, 2235, 198, 198, 2, 32651, 281, 21472, 1502, 284, 651, 257, 2060, 537, 2350, 198, 68, 78, 796, 685, 25, 75, 17, 11, 25, 87, 16, 11, 25, 87, 15, 11, 25, 75, 16, 60, 198, 2, 277, 70, 13, 82, 14375, 10044, 4105, 13, 34960, 15003, 28, 7942, 198, 5796, 83, 6791, 796, 15941, 21737, 198, 21048, 796, 8494, 27660, 0, 7, 40616, 11, 21472, 18743, 28, 68, 78, 8, 1303, 11, 895, 83, 6791, 28, 5796, 83, 6791, 11, 1700, 565, 25011, 82, 28, 7278, 7, 40616, 18125, 628, 198, 2, 289, 1023, 796, 21207, 2601, 25011, 18122, 3237, 0, 7, 5796, 83, 6791, 8, 198, 198, 2, 7110, 42, 7206, 7, 40616, 11, 43979, 7, 40616, 4008, 198, 198, 2235, 198, 198, 31, 9288, 318, 1324, 13907, 7, 8068, 38, 13, 1136, 10246, 1546, 29212, 276, 7, 40616, 11, 1058, 87, 15, 38381, 4357, 657, 11, 379, 349, 796, 657, 13, 17, 8, 220, 198, 31, 9288, 318, 1324, 13907, 7, 8068, 38, 13, 1136, 10246, 1546, 29212, 276, 7, 40616, 11, 1058, 87, 16, 38381, 4357, 352, 11, 379, 349, 796, 657, 13, 17, 8, 220, 198, 31, 9288, 318, 1324, 13907, 7, 8068, 38, 13, 1136, 10246, 1546, 29212, 276, 7, 40616, 11, 1058, 75, 16, 38381, 4357, 352, 11, 379, 349, 796, 657, 13, 17, 8, 220, 198, 198, 43, 17, 796, 651, 12193, 2086, 7, 40616, 11, 1058, 75, 17, 8, 198, 77, 457, 82, 796, 4129, 7, 1136, 40710, 7, 43, 17, 4008, 198, 457, 82, 796, 685, 17, 13, 15, 13, 10, 15, 13, 16, 9, 25192, 77, 7, 16, 8, 329, 4808, 287, 352, 25, 77, 457, 82, 60, 198, 43, 17, 62, 796, 582, 1134, 2934, 0, 7, 17875, 5623, 3351, 282, 283, 11, 43344, 8, 198, 198, 2, 1332, 326, 612, 318, 379, 1551, 257, 4235, 1944, 198, 31, 9288, 8085, 67, 7, 43, 17, 62, 11, 406, 17, 11, 45012, 3351, 282, 283, 8, 1279, 352, 68, 12, 18, 198, 2, 2488, 9288, 318, 1324, 13907, 7, 8068, 38, 13, 1136, 10246, 1546, 29212, 276, 7, 40616, 11, 1058, 75, 17, 38381, 4357, 362, 11, 379, 349, 796, 657, 13, 17, 8, 220, 198, 198, 2235, 198, 198, 437, 198, 198, 31, 9288, 2617, 366, 9288, 1963, 4449, 4464, 78, 6333, 1672, 357, 3826, 1303, 39997, 8, 9313, 2221, 198, 198, 2235, 198, 198, 75, 16, 796, 532, 940, 13, 15, 198, 75, 17, 796, 1343, 940, 13, 15, 198, 75, 3919, 786, 796, 352, 13, 15, 198, 87, 16, 796, 657, 198, 87, 17, 796, 657, 198, 2202, 25678, 796, 657, 13, 16, 198, 198, 40616, 796, 2315, 40616, 3419, 198, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 87, 16, 11, 45012, 3351, 282, 283, 8, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 87, 17, 11, 45012, 3351, 282, 283, 8, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 16, 11, 45012, 3351, 282, 283, 8, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 16, 62, 15, 11, 45012, 3351, 282, 283, 8, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 17, 11, 45012, 3351, 282, 283, 8, 198, 2860, 43015, 0, 7, 40616, 11, 1058, 75, 17, 62, 15, 11, 45012, 3351, 282, 283, 8, 198, 198, 2, 1293, 669, 319, 734, 41532, 691, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 75, 16, 4357, 14481, 7, 26447, 7, 75, 16, 11, 300, 3919, 786, 22305, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 75, 17, 4357, 14481, 7, 26447, 7, 75, 17, 11, 300, 3919, 786, 22305, 198, 198, 2, 3585, 17778, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 25, 75, 16, 26, 25, 75, 16, 62, 15, 4357, 44800, 6892, 876, 7, 26447, 7, 75, 16, 12, 87, 16, 11, 300, 3919, 786, 36911, 1963, 4449, 4464, 78, 41888, 16, 26, 16, 14, 17, 26, 16, 14, 17, 12962, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 17, 26, 25, 75, 17, 26, 25, 75, 17, 62, 15, 4357, 44800, 6892, 876, 7, 26447, 7, 75, 17, 12, 87, 17, 11, 300, 3919, 786, 36911, 1963, 4449, 4464, 78, 41888, 16, 26, 16, 14, 17, 26, 16, 14, 17, 12962, 198, 2860, 41384, 0, 7, 40616, 11, 685, 25, 87, 16, 26, 25, 87, 17, 4357, 44800, 6892, 876, 7, 26447, 7, 15, 11, 1550, 25678, 22305, 198, 198, 21048, 796, 8494, 27660, 0, 7, 40616, 8, 198, 198, 2, 3197, 27660, 7, 21048, 11, 905, 28, 7942, 8, 198, 198, 2, 1607, 2124, 16, 2124, 17, 284, 423, 379, 1551, 530, 4235, 379, 657, 198, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 87, 16, 737, 47811, 276, 58, 16, 60, 532, 2124, 16, 930, 29, 2352, 1279, 352, 13, 17, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 87, 17, 737, 47811, 276, 58, 16, 60, 532, 2124, 17, 930, 29, 2352, 1279, 352, 13, 17, 198, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 75, 16, 737, 47811, 276, 58, 16, 60, 532, 300, 16, 930, 29, 2352, 1279, 352, 13, 17, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 75, 17, 737, 47811, 276, 58, 16, 60, 532, 300, 17, 930, 29, 2352, 1279, 352, 13, 17, 198, 198, 2, 300, 16, 62, 15, 11, 300, 17, 62, 15, 815, 307, 6716, 1088, 300, 16, 290, 300, 17, 11, 475, 2314, 6216, 1802, 4, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 75, 16, 62, 15, 737, 47811, 276, 58, 16, 60, 532, 300, 16, 930, 29, 2352, 1279, 838, 198, 31, 9288, 651, 10246, 36, 7, 40616, 11, 1058, 75, 17, 62, 15, 737, 47811, 276, 58, 16, 60, 532, 300, 17, 930, 29, 2352, 1279, 838, 198, 198, 2235, 198, 198, 437, 628, 198, 198, 2, 1262, 5564, 11682, 43328, 889, 198, 2, 20925, 12254, 13, 2617, 62, 12286, 62, 29487, 62, 7857, 7, 2327, 11215, 11, 1495, 11215, 8, 198, 2, 198, 2, 7110, 42, 7206, 7, 40616, 11, 685, 25, 75, 16, 26, 25, 75, 17, 12962, 198, 2, 7110, 42, 7206, 7, 40616, 11, 685, 25, 75, 16, 62, 15, 26, 25, 75, 17, 62, 15, 12962, 198, 2, 7110, 42, 7206, 7, 40616, 11, 685, 25, 87, 16, 26, 25, 87, 17, 12962, 628, 198, 2, 198 ]
2.103099
1,775
<gh_stars>10-100 module LibNuklear import Libdl # Load in `deps.jl`, complaining if it does not exist const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl") if !isfile(depsjl_path) error("Nuklear was not build properly. Please run Pkg.build(\"Nuklear\").") end include(depsjl_path) # Module initialization function function __init__() check_deps() end include("CEnum.jl") using .CEnum include("ctypes.jl") export Ctm, Ctime_t, Cclock_t include(joinpath(@__DIR__, "..", "gen", "libnuklear_common.jl")) include(joinpath(@__DIR__, "..", "gen", "libnuklear_api.jl")) include(joinpath(@__DIR__, "..", "gen", "helper_api.jl")) const nk_false = 0 const nk_true = 1 export nk_false, nk_true foreach(names(@__MODULE__, all=true)) do s if startswith(string(s), "nk_") || startswith(string(s), "NK_") @eval export $s end end end # module
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 21412, 7980, 45, 2724, 3238, 198, 198, 11748, 7980, 25404, 198, 198, 2, 8778, 287, 4600, 10378, 82, 13, 20362, 47671, 18705, 611, 340, 857, 407, 2152, 198, 9979, 390, 862, 20362, 62, 6978, 796, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 10378, 82, 1600, 366, 10378, 82, 13, 20362, 4943, 198, 361, 5145, 4468, 576, 7, 10378, 82, 20362, 62, 6978, 8, 198, 220, 220, 220, 4049, 7203, 45, 2724, 3238, 373, 407, 1382, 6105, 13, 4222, 1057, 350, 10025, 13, 11249, 7, 7879, 45, 2724, 3238, 59, 4943, 19570, 198, 437, 198, 17256, 7, 10378, 82, 20362, 62, 6978, 8, 198, 2, 19937, 37588, 2163, 198, 8818, 11593, 15003, 834, 3419, 198, 220, 220, 220, 2198, 62, 10378, 82, 3419, 198, 437, 198, 198, 17256, 7203, 34, 4834, 388, 13, 20362, 4943, 198, 3500, 764, 34, 4834, 388, 198, 198, 17256, 7203, 310, 9497, 13, 20362, 4943, 198, 39344, 327, 17209, 11, 327, 2435, 62, 83, 11, 327, 15750, 62, 83, 198, 198, 17256, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 5235, 1600, 366, 8019, 77, 2724, 3238, 62, 11321, 13, 20362, 48774, 198, 17256, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 5235, 1600, 366, 8019, 77, 2724, 3238, 62, 15042, 13, 20362, 48774, 198, 17256, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 5235, 1600, 366, 2978, 525, 62, 15042, 13, 20362, 48774, 198, 198, 9979, 299, 74, 62, 9562, 796, 657, 198, 9979, 299, 74, 62, 7942, 796, 352, 198, 39344, 299, 74, 62, 9562, 11, 299, 74, 62, 7942, 198, 198, 754, 620, 7, 14933, 7, 31, 834, 33365, 24212, 834, 11, 477, 28, 7942, 4008, 466, 264, 198, 220, 220, 220, 611, 923, 2032, 342, 7, 8841, 7, 82, 828, 366, 77, 74, 62, 4943, 8614, 923, 2032, 342, 7, 8841, 7, 82, 828, 366, 46888, 62, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18206, 10784, 720, 82, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
2.404432
361
<filename>test/tsvd.jl using Elemental, TSVD, LinearAlgebra, Test using Random A = Elemental.DistMatrix(Float64) Elemental.gaussian!(A, 500, 200) # Warning! If seed is not set, each worker will end up with a different initial vector # making the Lanczos processes inconsistent Random.seed!(123) vals_Elemental = tsvd(A, 5)[2] localA = Array(A) vals_LAPACK = svdvals(localA)[1:5] @test vals_Elemental ≈ vals_LAPACK
[ 27, 34345, 29, 9288, 14, 912, 20306, 13, 20362, 198, 3500, 21340, 11, 26136, 8898, 11, 44800, 2348, 29230, 11, 6208, 198, 3500, 14534, 198, 32, 796, 21340, 13, 20344, 46912, 7, 43879, 2414, 8, 198, 20180, 282, 13, 4908, 31562, 0, 7, 32, 11, 5323, 11, 939, 8, 198, 198, 2, 15932, 0, 1002, 9403, 318, 407, 900, 11, 1123, 8383, 481, 886, 510, 351, 257, 1180, 4238, 15879, 198, 2, 1642, 262, 21534, 37925, 7767, 18326, 198, 29531, 13, 28826, 0, 7, 10163, 8, 198, 12786, 62, 20180, 282, 796, 40379, 20306, 7, 32, 11, 642, 38381, 17, 60, 198, 12001, 32, 796, 15690, 7, 32, 8, 198, 12786, 62, 43, 2969, 8120, 220, 220, 220, 796, 264, 20306, 12786, 7, 12001, 32, 38381, 16, 25, 20, 60, 198, 31, 9288, 410, 874, 62, 20180, 282, 15139, 230, 410, 874, 62, 43, 2969, 8120, 198 ]
2.843537
147
<filename>gtk/signals.jl # https://juliagraphics.github.io/Gtk.jl/latest/manual/signals/ using Gtk # b = GtkButton("Press me") # win = GtkWindow(b, "Callbacks") # showall(win) # function button_clicked_callback(widget) # println(widget, " was clicked!") # end # id = signal_connect(button_clicked_callback, b, "clicked") win = GtkWindow("Callbacks") b = GtkButton("Press me") push!(win, b) showall(win) function clicked_callback(widget) println(widget, " was clicked!") end # https://developer.gnome.org/gtk3/stable/GtkButton.html#gtk-button-clicked id = signal_connect(clicked_callback, b, "clicked") # emit "clicked" signal # Use do- syntax win2 = GtkWindow("Callbacks") b2 = GtkButton("Press me 2") push!(win2, b2) # See https://docs.julialang.org/en/v1/manual/functions/index.html#Do-Block-Syntax-for-Function-Arguments-1 id2 = signal_connect(b2, "clicked") do widget println(widget, " was clicked 2!") end id2_2 = signal_connect(b2, "clicked") do widget println("\"", get_gtk_property(widget,:label,String), "\" was clicked!") end # Disconnect signal signal_handler_disconnect(b2, id2) # Block signal #signal_handler_block(b2, id2_2) #signal_handler_unblock(b2, id2_2) showall(win2) # https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-button-press-event b = GtkButton("Pick a mouse button") win = GtkWindow(b, "Callbacks") id = signal_connect(b, "button-press-event") do widget, event # must have event println("widget: $widget") println(event) println("You pressed button ", event.button) end showall(win)
[ 27, 34345, 29, 13655, 74, 14, 12683, 874, 13, 20362, 198, 2, 3740, 1378, 73, 32176, 6111, 873, 13, 12567, 13, 952, 14, 38, 30488, 13, 20362, 14, 42861, 14, 805, 723, 14, 12683, 874, 14, 198, 198, 3500, 402, 30488, 198, 198, 2, 275, 796, 402, 30488, 21864, 7203, 13800, 502, 4943, 198, 2, 1592, 796, 402, 30488, 27703, 7, 65, 11, 366, 14134, 10146, 4943, 198, 2, 905, 439, 7, 5404, 8, 198, 198, 2, 2163, 4936, 62, 565, 9484, 62, 47423, 7, 42655, 8, 198, 2, 220, 220, 220, 220, 44872, 7, 42655, 11, 366, 373, 28384, 2474, 8, 198, 2, 886, 198, 198, 2, 4686, 796, 6737, 62, 8443, 7, 16539, 62, 565, 9484, 62, 47423, 11, 275, 11, 366, 565, 9484, 4943, 198, 198, 5404, 796, 402, 30488, 27703, 7203, 14134, 10146, 4943, 198, 65, 796, 402, 30488, 21864, 7203, 13800, 502, 4943, 198, 14689, 0, 7, 5404, 11, 275, 8, 198, 12860, 439, 7, 5404, 8, 198, 198, 8818, 28384, 62, 47423, 7, 42655, 8, 198, 220, 220, 220, 44872, 7, 42655, 11, 366, 373, 28384, 2474, 8, 198, 437, 198, 198, 2, 3740, 1378, 16244, 263, 13, 4593, 462, 13, 2398, 14, 13655, 74, 18, 14, 31284, 14, 38, 30488, 21864, 13, 6494, 2, 13655, 74, 12, 16539, 12, 565, 9484, 198, 312, 796, 6737, 62, 8443, 7, 565, 9484, 62, 47423, 11, 275, 11, 366, 565, 9484, 4943, 1303, 27588, 366, 565, 9484, 1, 6737, 198, 198, 2, 5765, 466, 12, 15582, 198, 5404, 17, 796, 402, 30488, 27703, 7203, 14134, 10146, 4943, 198, 65, 17, 796, 402, 30488, 21864, 7203, 13800, 502, 362, 4943, 198, 14689, 0, 7, 5404, 17, 11, 275, 17, 8, 198, 2, 4091, 3740, 1378, 31628, 13, 73, 377, 498, 648, 13, 2398, 14, 268, 14, 85, 16, 14, 805, 723, 14, 12543, 2733, 14, 9630, 13, 6494, 2, 5211, 12, 12235, 12, 13940, 41641, 12, 1640, 12, 22203, 12, 28100, 2886, 12, 16, 198, 312, 17, 796, 6737, 62, 8443, 7, 65, 17, 11, 366, 565, 9484, 4943, 466, 26295, 198, 220, 220, 220, 220, 44872, 7, 42655, 11, 366, 373, 28384, 362, 2474, 8, 198, 437, 198, 198, 312, 17, 62, 17, 796, 6737, 62, 8443, 7, 65, 17, 11, 366, 565, 9484, 4943, 466, 26295, 198, 220, 220, 220, 44872, 7203, 7879, 1600, 651, 62, 13655, 74, 62, 26745, 7, 42655, 11, 25, 18242, 11, 10100, 828, 366, 7879, 373, 28384, 2474, 8, 198, 437, 198, 198, 2, 3167, 8443, 6737, 198, 12683, 282, 62, 30281, 62, 6381, 8443, 7, 65, 17, 11, 4686, 17, 8, 198, 198, 2, 9726, 6737, 198, 2, 12683, 282, 62, 30281, 62, 9967, 7, 65, 17, 11, 4686, 17, 62, 17, 8, 198, 2, 12683, 282, 62, 30281, 62, 403, 9967, 7, 65, 17, 11, 4686, 17, 62, 17, 8, 198, 12860, 439, 7, 5404, 17, 8, 628, 198, 2, 3740, 1378, 16244, 263, 13, 4593, 462, 13, 2398, 14, 13655, 74, 18, 14, 31284, 14, 38, 30488, 38300, 13, 6494, 2, 38, 30488, 38300, 12, 16539, 12, 8439, 12, 15596, 198, 65, 796, 402, 30488, 21864, 7203, 31686, 257, 10211, 4936, 4943, 198, 5404, 796, 402, 30488, 27703, 7, 65, 11, 366, 14134, 10146, 4943, 198, 312, 796, 6737, 62, 8443, 7, 65, 11, 366, 16539, 12, 8439, 12, 15596, 4943, 466, 26295, 11, 1785, 1303, 1276, 423, 1785, 198, 220, 220, 220, 44872, 7203, 42655, 25, 720, 42655, 4943, 198, 220, 220, 220, 44872, 7, 15596, 8, 198, 220, 220, 220, 44872, 7203, 1639, 12070, 4936, 33172, 1785, 13, 16539, 8, 198, 437, 198, 12860, 439, 7, 5404, 8, 198 ]
2.597682
604
include("Map/Map.jl") include("Map/ResidueRingPoly.jl") include("Map/NfOrd.jl") include("Map/NumberField.jl") include("Map/AbGrp.jl") include("Map/NfRel.jl") include("Map/FqPolyRing.jl")
[ 17256, 7203, 13912, 14, 13912, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 4965, 312, 518, 39687, 34220, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 45, 69, 35422, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 15057, 15878, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 4826, 8642, 79, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 45, 69, 6892, 13, 20362, 4943, 198, 17256, 7203, 13912, 14, 37, 80, 34220, 39687, 13, 20362, 4943, 198 ]
2.428571
77
import Zygote struct ZygoteGradAlg <: GradAlg end const ZygoteGrad = ZygoteGradAlg() import ..Omega Zygote.@nograd Omega.Space.increment function gradmap(rv, ω::Ω) l = apl(rv, ω) params = Params(values(ω)) # We can avoid doing this every time. g = gradient(params) do rv(ω) end g end function lineargradient(rv, ω, ::ZygoteGradAlg) Zygote.gradient(ωvec -> apl(rv, unlinearize(ωvec, ω)), linearize(ω)) end function grad(rv, ω, v, ::ZygoteGradAlg) grads = Zygote.gradient(Zygote.Params(v)) do rv(ω) end end grad(rv, ω, ::ZygoteGradAlg) = grad(rv, ω, values(ω), ZygoteGrad) function gradarray(rv, ω, ::ZygoteGradAlg) vs = values(ω) grads_ = grad(rv, ω, vs, ZygoteGrad) map(v -> grads_[v], vs) end
[ 11748, 1168, 35641, 1258, 198, 7249, 1168, 35641, 1258, 42731, 2348, 70, 1279, 25, 17701, 2348, 70, 886, 198, 9979, 1168, 35641, 1258, 42731, 796, 1168, 35641, 1258, 42731, 2348, 70, 3419, 198, 11748, 11485, 46, 13731, 198, 57, 35641, 1258, 13, 31, 77, 519, 6335, 19839, 13, 14106, 13, 24988, 434, 198, 198, 8818, 3915, 8899, 7, 81, 85, 11, 18074, 231, 3712, 138, 102, 8, 198, 220, 300, 796, 257, 489, 7, 81, 85, 11, 18074, 231, 8, 198, 220, 42287, 796, 2547, 4105, 7, 27160, 7, 49535, 4008, 1303, 775, 460, 3368, 1804, 428, 790, 640, 13, 198, 220, 308, 796, 31312, 7, 37266, 8, 466, 198, 220, 220, 220, 374, 85, 7, 49535, 8, 198, 220, 886, 198, 220, 308, 198, 437, 198, 198, 8818, 14174, 49607, 7, 81, 85, 11, 18074, 231, 11, 7904, 57, 35641, 1258, 42731, 2348, 70, 8, 198, 220, 1168, 35641, 1258, 13, 49607, 7, 49535, 35138, 4613, 257, 489, 7, 81, 85, 11, 555, 29127, 1096, 7, 49535, 35138, 11, 18074, 231, 36911, 14174, 1096, 7, 49535, 4008, 198, 437, 198, 198, 8818, 3915, 7, 81, 85, 11, 18074, 231, 11, 410, 11, 7904, 57, 35641, 1258, 42731, 2348, 70, 8, 198, 220, 3915, 82, 796, 1168, 35641, 1258, 13, 49607, 7, 57, 35641, 1258, 13, 10044, 4105, 7, 85, 4008, 466, 198, 220, 220, 220, 374, 85, 7, 49535, 8, 198, 220, 886, 198, 437, 198, 198, 9744, 7, 81, 85, 11, 18074, 231, 11, 7904, 57, 35641, 1258, 42731, 2348, 70, 8, 796, 3915, 7, 81, 85, 11, 18074, 231, 11, 3815, 7, 49535, 828, 1168, 35641, 1258, 42731, 8, 198, 198, 8818, 3915, 18747, 7, 81, 85, 11, 18074, 231, 11, 7904, 57, 35641, 1258, 42731, 2348, 70, 8, 198, 220, 3691, 796, 3815, 7, 49535, 8, 198, 220, 3915, 82, 62, 796, 3915, 7, 81, 85, 11, 18074, 231, 11, 3691, 11, 1168, 35641, 1258, 42731, 8, 198, 220, 3975, 7, 85, 4613, 3915, 82, 62, 58, 85, 4357, 3691, 8, 198, 437 ]
2.160237
337
<reponame>JuliaBinaryWrappers/HelFEM_jll.jl # Use baremodule to shave off a few KB from the serialized `.ji` file baremodule HelFEM_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("HelFEM") JLLWrappers.@generate_main_file("HelFEM", UUID("584ea77b-75d0-51ad-9ad6-7fb559b95557")) end # module HelFEM_jll
[ 27, 7856, 261, 480, 29, 16980, 544, 33, 3219, 36918, 11799, 14, 12621, 37, 3620, 62, 73, 297, 13, 20362, 198, 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412, 5053, 37, 3620, 62, 73, 297, 198, 3500, 7308, 198, 3500, 7308, 25, 471, 27586, 198, 11748, 449, 3069, 36918, 11799, 198, 198, 41, 3069, 36918, 11799, 13, 31, 8612, 378, 62, 12417, 62, 7753, 62, 25677, 7203, 12621, 37, 3620, 4943, 198, 41, 3069, 36918, 11799, 13, 31, 8612, 378, 62, 12417, 62, 7753, 7203, 12621, 37, 3620, 1600, 471, 27586, 7203, 46352, 18213, 3324, 65, 12, 2425, 67, 15, 12, 4349, 324, 12, 24, 324, 21, 12, 22, 21855, 38605, 65, 24, 2816, 3553, 48774, 198, 437, 220, 1303, 8265, 5053, 37, 3620, 62, 73, 297, 198 ]
2.43662
142
# AUTO GENERATED FILE - DO NOT EDIT export uishell """ uishell(;kwargs...) An UIShell component. UIShell is a default layout with the header and a sidebar Keyword arguments: - `id` (String; optional): Element id - `name` (String; required): Platform Name - `sidebarItems` (optional): Items of the sidebar. sidebarItems has the following type: Array of lists containing elements 'name', 'url'. Those elements have the following types: - `name` (String; optional) - `url` (String; optional)s - `headerItems` (optional): Items of the header. headerItems has the following type: Array of lists containing elements 'name', 'url'. Those elements have the following types: - `name` (String; optional) - `url` (String; optional)s - `loading_state` (optional): Object that holds the loading state object coming from dash-renderer. loading_state has the following type: lists containing elements 'is_loading', 'prop_name', 'component_name'. Those elements have the following types: - `is_loading` (Bool; optional): Determines if the component is loading or not - `prop_name` (String; optional): Holds which property is loading - `component_name` (String; optional): Holds the name of the component that is loading """ function uishell(; kwargs...) available_props = Symbol[:id, :name, :sidebarItems, :headerItems, :loading_state] wild_props = Symbol[] return Component("uishell", "UIShell", "dash_carbon_components", available_props, wild_props; kwargs...) end
[ 2, 47044, 46, 24700, 1137, 11617, 45811, 532, 8410, 5626, 48483, 198, 198, 39344, 334, 271, 12758, 198, 198, 37811, 198, 220, 220, 220, 334, 271, 12758, 7, 26, 46265, 22046, 23029, 198, 198, 2025, 471, 1797, 12758, 7515, 13, 198, 52, 1797, 12758, 318, 257, 4277, 12461, 351, 262, 13639, 290, 257, 40217, 198, 9218, 4775, 7159, 25, 198, 12, 4600, 312, 63, 357, 10100, 26, 11902, 2599, 11703, 4686, 198, 12, 4600, 3672, 63, 357, 10100, 26, 2672, 2599, 19193, 6530, 198, 12, 4600, 1589, 5657, 23022, 63, 357, 25968, 2599, 17230, 286, 262, 40217, 13, 40217, 23022, 468, 262, 1708, 2099, 25, 15690, 286, 8341, 7268, 4847, 705, 3672, 3256, 705, 6371, 4458, 198, 9627, 4847, 423, 262, 1708, 3858, 25, 198, 220, 532, 4600, 3672, 63, 357, 10100, 26, 11902, 8, 198, 220, 532, 4600, 6371, 63, 357, 10100, 26, 11902, 8, 82, 198, 12, 4600, 25677, 23022, 63, 357, 25968, 2599, 17230, 286, 262, 13639, 13, 13639, 23022, 468, 262, 1708, 2099, 25, 15690, 286, 8341, 7268, 4847, 705, 3672, 3256, 705, 6371, 4458, 198, 9627, 4847, 423, 262, 1708, 3858, 25, 198, 220, 532, 4600, 3672, 63, 357, 10100, 26, 11902, 8, 198, 220, 532, 4600, 6371, 63, 357, 10100, 26, 11902, 8, 82, 198, 12, 4600, 25138, 62, 5219, 63, 357, 25968, 2599, 9515, 326, 6622, 262, 11046, 1181, 2134, 2406, 422, 14470, 12, 10920, 11882, 13, 11046, 62, 5219, 468, 262, 1708, 2099, 25, 8341, 7268, 4847, 705, 271, 62, 25138, 3256, 705, 22930, 62, 3672, 3256, 705, 42895, 62, 3672, 4458, 198, 9627, 4847, 423, 262, 1708, 3858, 25, 198, 220, 532, 4600, 271, 62, 25138, 63, 357, 33, 970, 26, 11902, 2599, 360, 13221, 274, 611, 262, 7515, 318, 11046, 393, 407, 198, 220, 532, 4600, 22930, 62, 3672, 63, 357, 10100, 26, 11902, 2599, 9340, 82, 543, 3119, 318, 11046, 198, 220, 532, 4600, 42895, 62, 3672, 63, 357, 10100, 26, 11902, 2599, 9340, 82, 262, 1438, 286, 262, 7515, 326, 318, 11046, 198, 37811, 198, 8818, 334, 271, 12758, 7, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 1695, 62, 1676, 862, 796, 38357, 58, 25, 312, 11, 1058, 3672, 11, 1058, 1589, 5657, 23022, 11, 1058, 25677, 23022, 11, 1058, 25138, 62, 5219, 60, 198, 220, 220, 220, 220, 220, 220, 220, 4295, 62, 1676, 862, 796, 38357, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 35100, 7203, 84, 271, 12758, 1600, 366, 52, 1797, 12758, 1600, 366, 42460, 62, 29255, 62, 5589, 3906, 1600, 1695, 62, 1676, 862, 11, 4295, 62, 1676, 862, 26, 479, 86, 22046, 23029, 198, 437, 628 ]
3.386878
442
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct LoadBalancerBackendAddressPropertiesFormat <: SwaggerModel virtualNetwork::Any # spec type: Union{ Nothing, SubResource } # spec name: virtualNetwork ipAddress::Any # spec type: Union{ Nothing, String } # spec name: ipAddress networkInterfaceIPConfiguration::Any # spec type: Union{ Nothing, SubResource } # spec name: networkInterfaceIPConfiguration function LoadBalancerBackendAddressPropertiesFormat(;virtualNetwork=nothing, ipAddress=nothing, networkInterfaceIPConfiguration=nothing) o = new() validate_property(LoadBalancerBackendAddressPropertiesFormat, Symbol("virtualNetwork"), virtualNetwork) setfield!(o, Symbol("virtualNetwork"), virtualNetwork) validate_property(LoadBalancerBackendAddressPropertiesFormat, Symbol("ipAddress"), ipAddress) setfield!(o, Symbol("ipAddress"), ipAddress) validate_property(LoadBalancerBackendAddressPropertiesFormat, Symbol("networkInterfaceIPConfiguration"), networkInterfaceIPConfiguration) setfield!(o, Symbol("networkInterfaceIPConfiguration"), networkInterfaceIPConfiguration) o end end # type LoadBalancerBackendAddressPropertiesFormat const _property_map_LoadBalancerBackendAddressPropertiesFormat = Dict{Symbol,Symbol}(Symbol("virtualNetwork")=>Symbol("virtualNetwork"), Symbol("ipAddress")=>Symbol("ipAddress"), Symbol("networkInterfaceIPConfiguration")=>Symbol("networkInterfaceIPConfiguration")) const _property_types_LoadBalancerBackendAddressPropertiesFormat = Dict{Symbol,String}(Symbol("virtualNetwork")=>"SubResource", Symbol("ipAddress")=>"String", Symbol("networkInterfaceIPConfiguration")=>"SubResource") Base.propertynames(::Type{ LoadBalancerBackendAddressPropertiesFormat }) = collect(keys(_property_map_LoadBalancerBackendAddressPropertiesFormat)) Swagger.property_type(::Type{ LoadBalancerBackendAddressPropertiesFormat }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_LoadBalancerBackendAddressPropertiesFormat[name]))} Swagger.field_name(::Type{ LoadBalancerBackendAddressPropertiesFormat }, property_name::Symbol) = _property_map_LoadBalancerBackendAddressPropertiesFormat[property_name] function check_required(o::LoadBalancerBackendAddressPropertiesFormat) true end function validate_property(::Type{ LoadBalancerBackendAddressPropertiesFormat }, name::Symbol, val) end
[ 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20855, 2427, 13, 628, 198, 76, 18187, 2878, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 1279, 25, 2451, 7928, 17633, 198, 220, 220, 220, 7166, 26245, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 3834, 26198, 1782, 1303, 1020, 1438, 25, 7166, 26245, 198, 220, 220, 220, 20966, 20231, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 10903, 1782, 1303, 1020, 1438, 25, 20966, 20231, 198, 220, 220, 220, 3127, 39317, 4061, 38149, 3712, 7149, 1303, 1020, 2099, 25, 4479, 90, 10528, 11, 3834, 26198, 1782, 1303, 1020, 1438, 25, 3127, 39317, 4061, 38149, 628, 220, 220, 220, 2163, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 7, 26, 32844, 26245, 28, 22366, 11, 20966, 20231, 28, 22366, 11, 3127, 39317, 4061, 38149, 28, 22366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 649, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 11, 38357, 7203, 32844, 26245, 12340, 7166, 26245, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 32844, 26245, 12340, 7166, 26245, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 11, 38357, 7203, 541, 20231, 12340, 20966, 20231, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 541, 20231, 12340, 20966, 20231, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26571, 62, 26745, 7, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 11, 38357, 7203, 27349, 39317, 4061, 38149, 12340, 3127, 39317, 4061, 38149, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 3245, 0, 7, 78, 11, 38357, 7203, 27349, 39317, 4061, 38149, 12340, 3127, 39317, 4061, 38149, 8, 198, 220, 220, 220, 220, 220, 220, 220, 267, 198, 220, 220, 220, 886, 198, 437, 1303, 2099, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 198, 198, 9979, 4808, 26745, 62, 8899, 62, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 796, 360, 713, 90, 13940, 23650, 11, 13940, 23650, 92, 7, 13940, 23650, 7203, 32844, 26245, 4943, 14804, 13940, 23650, 7203, 32844, 26245, 12340, 38357, 7203, 541, 20231, 4943, 14804, 13940, 23650, 7203, 541, 20231, 12340, 38357, 7203, 27349, 39317, 4061, 38149, 4943, 14804, 13940, 23650, 7203, 27349, 39317, 4061, 38149, 48774, 198, 9979, 4808, 26745, 62, 19199, 62, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 796, 360, 713, 90, 13940, 23650, 11, 10100, 92, 7, 13940, 23650, 7203, 32844, 26245, 4943, 14804, 1, 7004, 26198, 1600, 38357, 7203, 541, 20231, 4943, 14804, 1, 10100, 1600, 38357, 7203, 27349, 39317, 4061, 38149, 4943, 14804, 1, 7004, 26198, 4943, 198, 14881, 13, 26745, 14933, 7, 3712, 6030, 90, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 32092, 796, 2824, 7, 13083, 28264, 26745, 62, 8899, 62, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 4008, 198, 10462, 7928, 13, 26745, 62, 4906, 7, 3712, 6030, 90, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 8964, 1438, 3712, 13940, 23650, 8, 796, 4479, 90, 18465, 11, 18206, 7, 14881, 13, 48526, 13, 29572, 28264, 26745, 62, 19199, 62, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 58, 3672, 60, 4008, 92, 198, 10462, 7928, 13, 3245, 62, 3672, 7, 3712, 6030, 90, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 8964, 3119, 62, 3672, 3712, 13940, 23650, 8, 796, 220, 4808, 26745, 62, 8899, 62, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 58, 26745, 62, 3672, 60, 198, 198, 8818, 2198, 62, 35827, 7, 78, 3712, 8912, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 8, 198, 220, 220, 220, 2081, 198, 437, 198, 198, 8818, 26571, 62, 26745, 7, 3712, 6030, 90, 8778, 24597, 8250, 7282, 437, 20231, 2964, 18200, 26227, 8964, 1438, 3712, 13940, 23650, 11, 1188, 8, 198, 437, 198 ]
3.644412
689
#= Copyright 2021 BlackRock, Inc. 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. =# using Convex using ECOS using PiecewiseQuadratics using LinearAlgebra @testset "Only quadratic" begin P = ones(1, 1) q = -2 * ones(1) A = zeros(0, 1) b = zeros(0) g = zeros(PiecewiseQuadratic, 1) ρ = zeros(0) σ = ones(1) params = AdmmParams(P, q, A, b, g) settings = Settings(; ρ=ρ, σ=σ) vars, _ = optimize(params, settings) @test abs(vars.x[1] - 2) < 1e-3 @test abs(vars.xt[1] - 2) < 1e-3 end @testset "Only separable" begin P = zeros(1, 1) q = zeros(1) A = zeros(0, 1) b = zeros(0) g = [PiecewiseQuadratic([BoundedQuadratic(2.0, 3.0, 0.0, -1.0, 10.0), BoundedQuadratic(3.0, 5.0, 0.0, 1.0, 4.0)])] ρ = zeros(0) σ = ones(1) params = AdmmParams(P, q, A, b, g) settings = Settings(; ρ=ρ, σ=σ) vars, _ = optimize(params, settings) display(vars) @test abs(vars.x[1] - 3) < 1e-3 @test abs(vars.xt[1] - 3) < 1e-3 end @testset "Random quadratic program" begin # Original generating code: # P = randn(5, 5) # P = P'*P # A = randn(2, 5) P = [1.29585 2.90775 -0.421317 1.52657 0.209435 2.90775 10.5604 0.298516 4.64058 -2.92845 -0.421317 0.298516 1.94608 -1.61207 -0.198397 1.52657 4.64058 -1.61207 4.06981 -2.02592 0.209435 -2.92845 -0.198397 -2.02592 4.66317] q = -10 * ones(5) A = [1.33694 -0.745464 -0.0531773 -2.11537 1.22246 -0.0731486 -1.22006 -0.165136 -0.066768 0.567695] b = A * ones(5) g = repeat([indicator(0, Inf)], 5) x = Variable(5) problem = Convex.minimize(0.5 * quadform(x, P) + q' * x, [x >= 0, A * x == b]) solve!(problem, ECOS.Optimizer) ρ = ones(2) σ = ones(5) params = AdmmParams(P, q, A, b, g) settings = Settings(; ρ=ρ, σ=σ, term_cond_freq=1000, max_iters=1000) vars, stats = optimize(params, settings) @test norm(vars.x - x.value) < 1e-3 @test norm(vars.xt - x.value) < 1e-3 end @testset "Random Lasso problem" begin n = 2 # num features m = 0 # num constraints X = [1.33694 -0.745464 -0.0531773 -2.11537 1.22246 -0.0731486 -1.22006 -0.165136 -0.066768 0.567695] y = X * ones(n) λ = 1.0 β = Variable(n) problem = Convex.minimize(0.5 * sumsquares(X * β - y) + λ * sum(abs(β))) solve!(problem, ECOS.Optimizer) ρ = ones(m) σ = ones(n) P = X' * X q = -X' * y A = zeros(m, n) b = zeros(m) g = [PiecewiseQuadratic([BoundedQuadratic(-Inf, 0.0, 0.0, -λ, 0.0), BoundedQuadratic(0.0, Inf, 0.0, λ, 0.0)]) for i in 1:n] params = AdmmParams(P, q, A, b, g) settings = Settings(; ρ=ρ, σ=σ, term_cond_freq=1000, max_iters=1000) vars, _ = optimize(params, settings) @test norm(vars.x - β.value) < 1e-3 @test norm(vars.xt - β.value) < 1e-3 # first vars term cache settings = Settings(; ρ=ρ, σ=σ, term_cond_freq=1000, max_iters=1000, term_cond_type=FIRST_VARS_TERM_COND_FLAG, compute_stats=true) vars, stats = optimize(params, settings) @test norm(vars.x - β.value) < 1e-3 @test norm(vars.xt - β.value) < 1e-3 end @testset "small example" begin # NOTE: example from README.md # construct problem data (ensuring the problem is feasible) x0 = [0.0036165677461501566, 0.9751164348173793, 0.4825907494313493, 0.47578842808561417] A = [0.477388 0.796388 0.509418 0.426954; 0.772124 0.381946 0.412414 0.815745] b = A * x0 X = [0.444226 0.331317 0.870612 0.576343; 0.236767 0.392398 0.000545117 0.0703828; 0.413522 0.893505 0.366298 0.654319; 0.149137 0.0738117 0.737134 0.403253] P = X'X # ensure P is positive definite @assert isposdef(P) q = [0.007228400155782522, 0.9979590358695292, 0.6284406861482683, 0.08716574428367818] # x1 has to be in union([-1, 2], [2.5, 3.5]) and has a quadratic penalty if # it lies in [-1, 2] and a linear penalty if it lies in [2.5, 3.5] g1 = PiecewiseQuadratic([BoundedQuadratic(-1, 2, 1, 0, 0), BoundedQuadratic(2.5, 3.5, 0, 1, 0)]) # x2 has to be between -20 and 10 g2 = indicator(-20, 10) # x3 has to be between -5 and 10 g3 = indicator(-5, 10) # x4 has to be exactly 1.2318 g4 = indicator(1.2318, 1.2318) g = [g1, g2, g3, g4] # solve params = AdmmParams(P, q, A, b, g) # display display(params) vars, _ = optimize(params) expected = [-0.39769, 1.73815, -0.96784, 1.2318] @test norm(vars.x - expected) < 1e-4 end
[ 2, 28, 198, 15269, 33448, 2619, 19665, 11, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7330, 257, 4866, 286, 262, 13789, 379, 628, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 198, 28042, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 17080, 6169, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 54, 10554, 12425, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 6214, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2475, 20597, 739, 262, 13789, 13, 198, 46249, 198, 198, 3500, 1482, 303, 87, 198, 3500, 13182, 2640, 198, 3500, 27053, 3083, 4507, 324, 10366, 873, 198, 3500, 44800, 2348, 29230, 198, 198, 31, 9288, 2617, 366, 10049, 15094, 81, 1512, 1, 2221, 198, 220, 220, 220, 350, 796, 3392, 7, 16, 11, 352, 8, 198, 220, 220, 220, 10662, 796, 532, 17, 1635, 3392, 7, 16, 8, 198, 220, 220, 220, 317, 796, 1976, 27498, 7, 15, 11, 352, 8, 198, 220, 220, 220, 275, 796, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 308, 796, 1976, 27498, 7, 47, 8535, 3083, 4507, 41909, 1512, 11, 352, 8, 628, 220, 220, 220, 18074, 223, 796, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 18074, 225, 796, 3392, 7, 16, 8, 628, 220, 220, 220, 42287, 796, 1215, 3020, 10044, 4105, 7, 47, 11, 10662, 11, 317, 11, 275, 11, 308, 8, 198, 220, 220, 220, 6460, 796, 16163, 7, 26, 18074, 223, 28, 33643, 11, 18074, 225, 28, 38392, 8, 198, 220, 220, 220, 410, 945, 11, 4808, 796, 27183, 7, 37266, 11, 6460, 8, 628, 220, 220, 220, 2488, 9288, 2352, 7, 85, 945, 13, 87, 58, 16, 60, 532, 362, 8, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 2488, 9288, 2352, 7, 85, 945, 13, 742, 58, 16, 60, 532, 362, 8, 1279, 352, 68, 12, 18, 198, 437, 198, 198, 31, 9288, 2617, 366, 10049, 2880, 540, 1, 2221, 198, 220, 220, 220, 350, 796, 1976, 27498, 7, 16, 11, 352, 8, 198, 220, 220, 220, 10662, 796, 1976, 27498, 7, 16, 8, 198, 220, 220, 220, 317, 796, 1976, 27498, 7, 15, 11, 352, 8, 198, 220, 220, 220, 275, 796, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 308, 796, 685, 47, 8535, 3083, 4507, 41909, 1512, 26933, 33, 6302, 4507, 41909, 1512, 7, 17, 13, 15, 11, 513, 13, 15, 11, 657, 13, 15, 11, 532, 16, 13, 15, 11, 838, 13, 15, 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, 347, 6302, 4507, 41909, 1512, 7, 18, 13, 15, 11, 642, 13, 15, 11, 657, 13, 15, 11, 352, 13, 15, 11, 604, 13, 15, 8, 12962, 60, 628, 220, 220, 220, 18074, 223, 796, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 18074, 225, 796, 3392, 7, 16, 8, 628, 220, 220, 220, 42287, 796, 1215, 3020, 10044, 4105, 7, 47, 11, 10662, 11, 317, 11, 275, 11, 308, 8, 198, 220, 220, 220, 6460, 796, 16163, 7, 26, 18074, 223, 28, 33643, 11, 18074, 225, 28, 38392, 8, 198, 220, 220, 220, 410, 945, 11, 4808, 796, 27183, 7, 37266, 11, 6460, 8, 628, 220, 220, 220, 3359, 7, 85, 945, 8, 198, 220, 220, 220, 2488, 9288, 2352, 7, 85, 945, 13, 87, 58, 16, 60, 532, 513, 8, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 2488, 9288, 2352, 7, 85, 945, 13, 742, 58, 16, 60, 532, 513, 8, 1279, 352, 68, 12, 18, 198, 437, 198, 198, 31, 9288, 2617, 366, 29531, 15094, 81, 1512, 1430, 1, 2221, 198, 220, 220, 220, 1303, 13745, 15453, 2438, 25, 198, 220, 220, 220, 1303, 350, 796, 43720, 77, 7, 20, 11, 642, 8, 198, 220, 220, 220, 1303, 350, 796, 350, 6, 9, 47, 198, 220, 220, 220, 1303, 317, 796, 43720, 77, 7, 17, 11, 642, 8, 628, 220, 220, 220, 350, 796, 685, 16, 13, 1959, 38905, 362, 13, 24, 2998, 2425, 532, 15, 13, 3682, 1485, 1558, 352, 13, 48531, 3553, 657, 13, 1238, 5824, 2327, 198, 220, 220, 220, 220, 220, 220, 220, 220, 362, 13, 24, 2998, 2425, 838, 13, 20, 31916, 657, 13, 1959, 5332, 1433, 604, 13, 31102, 3365, 532, 17, 13, 24, 2078, 2231, 198, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 3682, 1485, 1558, 657, 13, 1959, 5332, 1433, 352, 13, 5824, 28688, 532, 16, 13, 43610, 2998, 532, 15, 13, 22337, 33372, 198, 220, 220, 220, 220, 220, 220, 220, 220, 352, 13, 48531, 3553, 604, 13, 31102, 3365, 532, 16, 13, 43610, 2998, 604, 13, 3312, 4089, 16, 532, 17, 13, 36629, 5892, 198, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 1238, 5824, 2327, 532, 17, 13, 24, 2078, 2231, 532, 15, 13, 22337, 33372, 532, 17, 13, 36629, 5892, 604, 13, 2791, 34125, 60, 198, 220, 220, 220, 10662, 796, 532, 940, 1635, 3392, 7, 20, 8, 198, 220, 220, 220, 317, 796, 685, 16, 13, 2091, 45214, 532, 15, 13, 22, 34229, 2414, 532, 15, 13, 2713, 34125, 4790, 532, 17, 13, 15363, 2718, 352, 13, 1828, 26912, 198, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 2998, 33638, 4521, 532, 16, 13, 1828, 28041, 532, 15, 13, 20986, 20809, 532, 15, 13, 15, 28933, 3104, 657, 13, 20, 3134, 37381, 60, 198, 220, 220, 220, 275, 796, 317, 1635, 3392, 7, 20, 8, 198, 220, 220, 220, 308, 796, 9585, 26933, 521, 26407, 7, 15, 11, 4806, 8, 4357, 642, 8, 628, 220, 220, 220, 2124, 796, 35748, 7, 20, 8, 198, 220, 220, 220, 1917, 796, 1482, 303, 87, 13, 1084, 48439, 7, 15, 13, 20, 1635, 15094, 687, 7, 87, 11, 350, 8, 1343, 10662, 6, 1635, 2124, 11, 685, 87, 18189, 657, 11, 317, 1635, 2124, 6624, 275, 12962, 198, 220, 220, 220, 8494, 0, 7, 45573, 11, 13182, 2640, 13, 27871, 320, 7509, 8, 628, 220, 220, 220, 18074, 223, 796, 3392, 7, 17, 8, 198, 220, 220, 220, 18074, 225, 796, 3392, 7, 20, 8, 198, 220, 220, 220, 42287, 796, 1215, 3020, 10044, 4105, 7, 47, 11, 10662, 11, 317, 11, 275, 11, 308, 8, 198, 220, 220, 220, 6460, 796, 16163, 7, 26, 18074, 223, 28, 33643, 11, 18074, 225, 28, 38392, 11, 3381, 62, 17561, 62, 19503, 80, 28, 12825, 11, 3509, 62, 270, 364, 28, 12825, 8, 198, 220, 220, 220, 410, 945, 11, 9756, 796, 27183, 7, 37266, 11, 6460, 8, 628, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 87, 532, 2124, 13, 8367, 8, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 742, 532, 2124, 13, 8367, 8, 1279, 352, 68, 12, 18, 198, 437, 198, 198, 31, 9288, 2617, 366, 29531, 406, 28372, 1917, 1, 2221, 198, 220, 220, 220, 299, 796, 362, 220, 1303, 997, 3033, 198, 220, 220, 220, 285, 796, 657, 220, 1303, 997, 17778, 628, 220, 220, 220, 1395, 796, 685, 16, 13, 2091, 45214, 532, 15, 13, 22, 34229, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 2713, 34125, 4790, 532, 17, 13, 15363, 2718, 198, 220, 220, 220, 220, 220, 220, 220, 220, 352, 13, 1828, 26912, 532, 15, 13, 2998, 33638, 4521, 198, 220, 220, 220, 220, 220, 220, 220, 220, 532, 16, 13, 1828, 28041, 532, 15, 13, 20986, 20809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 28933, 3104, 657, 13, 20, 3134, 37381, 60, 198, 220, 220, 220, 331, 796, 1395, 1635, 3392, 7, 77, 8, 198, 220, 220, 220, 7377, 119, 796, 352, 13, 15, 628, 220, 220, 220, 27169, 796, 35748, 7, 77, 8, 198, 220, 220, 220, 1917, 796, 1482, 303, 87, 13, 1084, 48439, 7, 15, 13, 20, 1635, 2160, 16485, 3565, 7, 55, 1635, 27169, 532, 331, 8, 1343, 7377, 119, 1635, 2160, 7, 8937, 7, 26638, 22305, 198, 220, 220, 220, 8494, 0, 7, 45573, 11, 13182, 2640, 13, 27871, 320, 7509, 8, 628, 220, 220, 220, 18074, 223, 796, 3392, 7, 76, 8, 198, 220, 220, 220, 18074, 225, 796, 3392, 7, 77, 8, 198, 220, 220, 220, 350, 796, 1395, 6, 1635, 1395, 198, 220, 220, 220, 10662, 796, 532, 55, 6, 1635, 331, 198, 220, 220, 220, 317, 796, 1976, 27498, 7, 76, 11, 299, 8, 198, 220, 220, 220, 275, 796, 1976, 27498, 7, 76, 8, 198, 220, 220, 220, 308, 796, 685, 47, 8535, 3083, 4507, 41909, 1512, 26933, 33, 6302, 4507, 41909, 1512, 32590, 18943, 11, 657, 13, 15, 11, 657, 13, 15, 11, 532, 39377, 11, 657, 13, 15, 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, 347, 6302, 4507, 41909, 1512, 7, 15, 13, 15, 11, 4806, 11, 657, 13, 15, 11, 7377, 119, 11, 657, 13, 15, 8, 12962, 329, 1312, 287, 352, 25, 77, 60, 198, 220, 220, 220, 42287, 796, 1215, 3020, 10044, 4105, 7, 47, 11, 10662, 11, 317, 11, 275, 11, 308, 8, 198, 220, 220, 220, 6460, 796, 16163, 7, 26, 18074, 223, 28, 33643, 11, 18074, 225, 28, 38392, 11, 3381, 62, 17561, 62, 19503, 80, 28, 12825, 11, 3509, 62, 270, 364, 28, 12825, 8, 198, 220, 220, 220, 410, 945, 11, 4808, 796, 27183, 7, 37266, 11, 6460, 8, 628, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 87, 532, 27169, 13, 8367, 8, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 742, 532, 27169, 13, 8367, 8, 1279, 352, 68, 12, 18, 628, 220, 220, 220, 1303, 717, 410, 945, 3381, 12940, 198, 220, 220, 220, 6460, 796, 16163, 7, 26, 18074, 223, 28, 33643, 11, 18074, 225, 28, 38392, 11, 3381, 62, 17561, 62, 19503, 80, 28, 12825, 11, 3509, 62, 270, 364, 28, 12825, 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, 3381, 62, 17561, 62, 4906, 28, 39776, 2257, 62, 53, 27415, 62, 5781, 44, 62, 10943, 35, 62, 38948, 11, 24061, 62, 34242, 28, 7942, 8, 198, 220, 220, 220, 410, 945, 11, 9756, 796, 27183, 7, 37266, 11, 6460, 8, 628, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 87, 532, 27169, 13, 8367, 8, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 742, 532, 27169, 13, 8367, 8, 1279, 352, 68, 12, 18, 198, 437, 198, 198, 31, 9288, 2617, 366, 17470, 1672, 1, 2221, 198, 220, 220, 220, 1303, 24550, 25, 1672, 422, 20832, 11682, 13, 9132, 628, 220, 220, 220, 1303, 5678, 1917, 1366, 357, 641, 870, 262, 1917, 318, 23498, 8, 198, 220, 220, 220, 2124, 15, 796, 685, 15, 13, 405, 2623, 20986, 40179, 3510, 1314, 25150, 2791, 11, 657, 13, 42716, 1157, 2414, 28978, 1558, 2718, 6052, 11, 657, 13, 2780, 25191, 2998, 2920, 3559, 1485, 43134, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 32576, 22, 3459, 3682, 28362, 3980, 1415, 1558, 60, 198, 220, 220, 220, 317, 796, 685, 15, 13, 32883, 30460, 657, 13, 41060, 30460, 657, 13, 1120, 5824, 1507, 657, 13, 42780, 48372, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 43571, 17464, 657, 13, 2548, 1129, 3510, 657, 13, 19, 17464, 1415, 657, 13, 23, 18458, 2231, 60, 198, 220, 220, 220, 275, 796, 317, 1635, 2124, 15, 198, 220, 220, 220, 1395, 796, 685, 15, 13, 30272, 24909, 657, 13, 2091, 1485, 1558, 657, 13, 23, 35402, 1065, 657, 13, 37452, 32118, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 1954, 3134, 3134, 657, 13, 2670, 1954, 4089, 657, 13, 830, 45326, 17657, 657, 13, 43509, 2548, 2078, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 19, 17059, 1828, 657, 13, 4531, 14877, 20, 657, 13, 32459, 27728, 657, 13, 2996, 3559, 1129, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 19442, 19708, 657, 13, 2998, 2548, 17657, 657, 13, 22, 2718, 19880, 657, 13, 1821, 26582, 18, 60, 198, 220, 220, 220, 350, 796, 1395, 6, 55, 220, 1303, 4155, 350, 318, 3967, 21892, 198, 220, 220, 220, 2488, 30493, 318, 1930, 4299, 7, 47, 8, 198, 220, 220, 220, 10662, 796, 685, 15, 13, 25816, 1828, 5705, 405, 1314, 38907, 1495, 1828, 11, 657, 13, 2079, 3720, 36993, 31128, 37381, 32759, 11, 657, 13, 48200, 25644, 33808, 18294, 2075, 5999, 11, 657, 13, 2919, 22, 1433, 3553, 2598, 2078, 2623, 3695, 1507, 60, 628, 220, 220, 220, 1303, 2124, 16, 468, 284, 307, 287, 6441, 26933, 12, 16, 11, 362, 4357, 685, 17, 13, 20, 11, 513, 13, 20, 12962, 290, 468, 257, 15094, 81, 1512, 7389, 611, 198, 220, 220, 220, 1303, 340, 7363, 287, 25915, 16, 11, 362, 60, 290, 257, 14174, 7389, 611, 340, 7363, 287, 685, 17, 13, 20, 11, 513, 13, 20, 60, 198, 220, 220, 220, 308, 16, 796, 27053, 3083, 4507, 41909, 1512, 26933, 33, 6302, 4507, 41909, 1512, 32590, 16, 11, 362, 11, 352, 11, 657, 11, 657, 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, 347, 6302, 4507, 41909, 1512, 7, 17, 13, 20, 11, 513, 13, 20, 11, 657, 11, 352, 11, 657, 8, 12962, 198, 220, 220, 220, 1303, 2124, 17, 468, 284, 307, 1022, 532, 1238, 290, 838, 198, 220, 220, 220, 308, 17, 796, 16916, 32590, 1238, 11, 838, 8, 628, 220, 220, 220, 1303, 2124, 18, 468, 284, 307, 1022, 532, 20, 290, 838, 198, 220, 220, 220, 308, 18, 796, 16916, 32590, 20, 11, 838, 8, 628, 220, 220, 220, 1303, 2124, 19, 468, 284, 307, 3446, 352, 13, 1954, 1507, 198, 220, 220, 220, 308, 19, 796, 16916, 7, 16, 13, 1954, 1507, 11, 352, 13, 1954, 1507, 8, 628, 220, 220, 220, 308, 796, 685, 70, 16, 11, 308, 17, 11, 308, 18, 11, 308, 19, 60, 628, 220, 220, 220, 1303, 8494, 198, 220, 220, 220, 42287, 796, 1215, 3020, 10044, 4105, 7, 47, 11, 10662, 11, 317, 11, 275, 11, 308, 8, 628, 220, 220, 220, 1303, 3359, 198, 220, 220, 220, 3359, 7, 37266, 8, 628, 220, 220, 220, 410, 945, 11, 4808, 796, 27183, 7, 37266, 8, 628, 220, 220, 220, 2938, 796, 25915, 15, 13, 33372, 3388, 11, 352, 13, 22, 2548, 1314, 11, 532, 15, 13, 24, 3134, 5705, 11, 352, 13, 1954, 1507, 60, 198, 220, 220, 220, 2488, 9288, 2593, 7, 85, 945, 13, 87, 532, 2938, 8, 1279, 352, 68, 12, 19, 198, 437, 198 ]
2.004277
2,572
<reponame>joachimbrand/Rimu.jl """ MPIData(data; kwargs...) Wrapper used for signaling that this data is part of a distributed data structure and communication should happen with MPI. `MPIData` can generally be used where an [`AbstractDVec`](@ref) would be used otherwise. Unlike [`AbstractDVec`](@ref)s, `MPIData` does not support indexing, or iteration over `keys`, `values`, and `pairs`. Keyword arguments: * `setup = mpi_point_to_point` - controls the communication stratgy * [`mpi_one_sided`](@ref) uses one-sided communication with remote memory access (RMA), sets [`MPIOneSided`](@ref) strategy. * [`mpi_point_to_point`](@ref) uses [`MPIPointTOPoint`](@ref) strategy. * [`mpi_all_to_all`](@ref) uses [`MPIAllToAll`](@ref) strategy. * [`mpi_no_exchange`](@ref) sets [`MPINoWalkerExchange`](@ref) strategy. Experimental. Use with caution! * `comm = mpi_comm()` * `root = mpi_root` * The rest of the keyword arguments are passed to `setup`. """ struct MPIData{D,S} data::D # local data, e.g. a DVec comm::MPI.Comm root::Int32 # rank of root process isroot::Bool # true if running on root process s::S # type (struct) with further details needed for communication function MPIData(data::D, comm, root, s::S) where {D, S<:DistributeStrategy} return new{D,S}(data, comm, root, s.id == root, s) end end # convenient constructor with setup function function MPIData(data; setup=mpi_point_to_point, comm=mpi_comm(), root=mpi_root, kwargs...) return setup(data, comm, root; kwargs...) end Base.eltype(md::MPIData) = eltype(md.data) Base.valtype(md::MPIData) = valtype(md.data) Base.keytype(md::MPIData) = keytype(md.data) Rimu.localpart(md::MPIData) = md.data Rimu.StochasticStyle(d::MPIData) = Rimu.StochasticStyle(d.data) function Base.summary(io::IO, md::MPIData) data = nameof(typeof(md.data)) len = length(md) style = StochasticStyle(md) strat = nameof(typeof(md.s)) print(io, "MPIData($data) with $len entries, style = $style, strategy = $strat") end function Base.show(io::IO, md::MPIData) summary(io, md) limit, _ = displaysize() for (i, p) in enumerate(pairs(localpart(md))) if length(md) > i > limit - 4 print(io, "\n ⋮ => ⋮") break else print(io, "\n ", p) end end end ### ### Iterators ### """ MPIDataIterator{I,M<:MPIData} Iterator over `keys`, `values`, or `pairs` of a `dv::MPIData`. Unlike its name would suggest, it does not actually support iteration. To perform computations with it, use `mapreduce`, or its derivatives (`sum`, `prod`, `reduce`...), which will perform the reduction accross MPI ranks. """ struct MPIDataIterator{I,M<:MPIData} iter::I data::M end function Base.iterate(it::MPIDataIterator, args...) error( "iterating over `::MPIData` is not supported. ", "Use `localpart` to iterate over the local part of the vector or `mapreduce` to ", "perform a reduction accross ranks", ) end function Base.mapreduce(f, op, it::MPIDataIterator; kwargs...) res = mapreduce(f, op, it.iter; kwargs...) return MPI.Allreduce(res, op, it.data.comm) end Base.IteratorSize(::MPIDataIterator) = Base.SizeUnknown() Base.pairs(data::MPIData) = MPIDataIterator(pairs(localpart(data)), data) Base.keys(data::MPIData) = MPIDataIterator(keys(localpart(data)), data) Base.values(data::MPIData) = MPIDataIterator(values(localpart(data)), data) Rimu.localpart(it::MPIDataIterator) = it.iter """ length(md::MPIData) Compute the length of the distributed data on every MPI rank with `MPI.Allreduce`. MPI syncronizing. """ Base.length(md::MPIData) = MPI.Allreduce(length(md.data), +, md.comm) """ norm(md::MPIData, p=2) Compute the norm of the distributed data on every MPI rank with `MPI.Allreduce`. MPI syncronizing. """ function LinearAlgebra.norm(md::MPIData, p::Real=2) if p === 2 return sqrt(sum(abs2, values(md))) elseif p === 1 return float(sum(abs, values(md))) elseif p === Inf return float(mapreduce(abs, max, values(md); init=real(zero(valtype(md))))) else error("$p-norm of MPIData is not implemented.") end end """ walkernumber(md::MPIData) Compute the walkernumber of the distributed data on every MPI rank with `MPI.Allreduce`. MPI syncronizing. """ function Rimu.DictVectors.walkernumber(md::MPIData) return MPI.Allreduce(walkernumber(md.data), +, md.comm) end """ mpi_synchronize!(md::MPIData) Synchronize `md`, ensuring its contents are distributed among ranks correctly. """ function mpi_synchronize!(md::MPIData) P = eltype(md) myrank = mpi_rank(md.comm) buffers = Vector{P}[P[] for _ in 1:mpi_size(md.comm)] for (add, val) in pairs(localpart(md)) tr = targetrank(add, mpi_size(md.comm)) if tr ≠ myrank push!(buffers[tr + 1], add => val) localpart(md)[add] = zero(valtype(md)) end end mpi_communicate_buffers!(localpart(md), buffers, md.comm) return md end """ mpi_communicate_buffers!(target::AbstractDVec{K,V}, buffers::Vector{<:Vector{V}}) Use MPI to communicate the contents of `buffers` and sort them into `target`. The length of `buffers` should be equal to [`mpi_size`](@ref). """ function mpi_communicate_buffers!(target, buffers, comm) myrank = mpi_rank(comm) recbuf = buffers[myrank + 1] datatype = MPI.Datatype(eltype(target)) # Receive from lower ranks. for id in 0:(myrank - 1) resize!(recbuf, MPI.Get_count(MPI.Probe(id, 0, comm), datatype)) MPI.Recv!(recbuf, id, 0, comm) for (add, value) in recbuf target[add] += value end end # Perform sends. for id in 0:(mpi_size(comm) - 1) id == myrank && continue MPI.Send(buffers[id + 1], id, 0, comm) end # Receive from higher ranks. for id in (myrank + 1):(mpi_size(comm) - 1) resize!(recbuf, MPI.Get_count(MPI.Probe(id, 0, comm), datatype)) MPI.Recv!(recbuf, id, 0, comm) for (add, value) in recbuf target[add] += value end end return target end """ *(lop::AbstractHamiltonian, md::MPIData) Allocating "Matrix"-"vector" multiplication with MPI-distributed "vector" `md`. The result is similar to [`localpart(md)`](@ref) with all content having been communicated to the correct [`targetrank`](@ref). MPI communicating. See [`MPIData`](@ref). """ function Base.:*(lop, md::MPIData) T = promote_type(eltype(lop),valtype(md)) P = Pair{keytype(md),T} buffers = Vector{P}[P[] for _ in 1:mpi_size(md.comm)] myrank = mpi_rank() result = similar(localpart(md), T) # Sort values into buffers and communicate. for (key, val) in pairs(localpart(md)) result[key] += diagonal_element(lop, key)*val for (add, elem) in offdiagonals(lop, key) tr = targetrank(add, mpi_size(md.comm)) if tr == myrank result[add] += elem * val else push!(buffers[tr + 1], add => elem * val) end end end mpi_communicate_buffers!(result, buffers, md.comm) return result end # Note: the following methods assume MPIDatas are distributed correctly. function LinearAlgebra.dot(x, md::MPIData) return MPI.Allreduce(localpart(x)⋅localpart(md), +, md.comm) end function LinearAlgebra.dot(md::MPIData, x) return MPI.Allreduce(localpart(md)⋅localpart(x), +, md.comm) end function LinearAlgebra.dot(md_left::MPIData, md_right::MPIData) return MPI.Allreduce(localpart(md_left)⋅localpart(md_right), +, md_left.comm) end # Note: the following two methods work with x::DVec and assume `x` is the same on all ranks. function LinearAlgebra.dot(x, lop, md::MPIData) return MPI.Allreduce(dot(x, lop, localpart(md)), +, md.comm) end function LinearAlgebra.dot(md::MPIData, lop, x) return MPI.Allreduce(dot(localpart(md), lop, x), +, md.comm) end """ copy_to_local(md::MPIData) Collect all pairs in `md` from all ranks and store them in a local `AbstractDVec`. """ copy_to_local(md::MPIData) = copy_to_local!(similar(localpart(md)), md) """ copy_to_local!(target, md::MPIData) Collect all pairs in `md` from all ranks and store them in `target`. In-place version of [`copy_to_local`](@ref). """ function copy_to_local!(target, md::MPIData) copy!(target, localpart(md)) comm = md.comm myrank = mpi_rank(comm) datatype = MPI.Datatype(eltype(md)) # Store all pairs to a buffer. sendbuf = collect(pairs(localpart(md))) recbuf = eltype(md)[] # Receive from lower ranks. for id in 0:(myrank - 1) resize!(recbuf, MPI.Get_count(MPI.Probe(id, 0, comm), datatype)) MPI.Recv!(recbuf, id, 0, comm) for (add, value) in recbuf target[add] += value end end # Perform sends. for id in 0:(mpi_size(comm) - 1) id == myrank && continue MPI.Send(sendbuf, id, 0, comm) end # Receive from higher ranks. for id in (myrank + 1):(mpi_size(comm) - 1) resize!(recbuf, MPI.Get_count(MPI.Probe(id, 0, comm), datatype)) MPI.Recv!(recbuf, id, 0, comm) for (add, value) in recbuf target[add] += value end end MPI.Barrier(comm) return target end function LinearAlgebra.dot(md_left::MPIData, lop, md_right::MPIData) # Idea: lop * md_right can be huge. It might be better to just collect the full left # vector and do the multiplication locally. left = copy_to_local(md_left) return dot(left, lop, md_right) end function Rimu.freeze(md::MPIData) mpi_synchronize!(md) return freeze(localpart(md)) end function Rimu.all_overlaps(operators::Tuple, vecs::NTuple{N,MPIData}) where {N} local_vec_i = similar(localpart(vecs[1])) T = promote_type((valtype(v) for v in vecs)..., eltype.(operators)...) names = String[] values = T[] for i in 1:N, j in i+1:N push!(names, "c$(i)_dot_c$(j)") push!(values, dot(vecs[i], vecs[j])) copy_to_local!(local_vec_i, vecs[i]) for (k, op) in enumerate(operators) push!(names, "c$(i)_Op$(k)_c$(j)") push!(values, dot(local_vec_i, op, vecs[j])) end end num_reports = (N * (N - 1) ÷ 2) * (length(operators) + 1) return SVector{num_reports,String}(names).data, SVector{num_reports,T}(values).data end
[ 27, 7856, 261, 480, 29, 7639, 620, 320, 17938, 14, 49, 320, 84, 13, 20362, 198, 37811, 198, 220, 220, 220, 4904, 2389, 1045, 7, 7890, 26, 479, 86, 22046, 23029, 198, 198, 36918, 2848, 973, 329, 22049, 326, 428, 1366, 318, 636, 286, 257, 9387, 1366, 4645, 290, 198, 32560, 815, 1645, 351, 4904, 40, 13, 4600, 7378, 2389, 1045, 63, 460, 4143, 307, 973, 810, 281, 198, 58, 63, 23839, 35, 53, 721, 63, 16151, 31, 5420, 8, 561, 307, 973, 4306, 13, 12101, 685, 63, 23839, 35, 53, 721, 63, 16151, 31, 5420, 8, 82, 11, 4600, 7378, 2389, 1045, 63, 198, 22437, 407, 1104, 6376, 278, 11, 393, 24415, 625, 4600, 13083, 47671, 4600, 27160, 47671, 290, 4600, 79, 3468, 44646, 198, 198, 9218, 4775, 7159, 25, 198, 9, 4600, 40406, 796, 285, 14415, 62, 4122, 62, 1462, 62, 4122, 63, 532, 6973, 262, 6946, 25369, 1360, 198, 220, 1635, 685, 63, 3149, 72, 62, 505, 62, 22339, 63, 16151, 31, 5420, 8, 3544, 530, 12, 22339, 6946, 351, 6569, 4088, 1895, 357, 49, 5673, 828, 5621, 685, 63, 7378, 40, 3198, 50, 1384, 63, 16151, 31, 5420, 8, 4811, 13, 198, 220, 1635, 685, 63, 3149, 72, 62, 4122, 62, 1462, 62, 4122, 63, 16151, 31, 5420, 8, 3544, 685, 63, 7378, 4061, 1563, 35222, 1563, 63, 16151, 31, 5420, 8, 4811, 13, 198, 220, 1635, 685, 63, 3149, 72, 62, 439, 62, 1462, 62, 439, 63, 16151, 31, 5420, 8, 3544, 685, 63, 7378, 40, 3237, 2514, 3237, 63, 16151, 31, 5420, 8, 4811, 13, 198, 220, 1635, 685, 63, 3149, 72, 62, 3919, 62, 1069, 3803, 63, 16151, 31, 5420, 8, 5621, 685, 63, 7378, 1268, 78, 39950, 3109, 3803, 63, 16151, 31, 5420, 8, 4811, 13, 32286, 13, 5765, 351, 13041, 0, 198, 9, 4600, 9503, 796, 285, 14415, 62, 9503, 3419, 63, 198, 9, 4600, 15763, 796, 285, 14415, 62, 15763, 63, 198, 9, 383, 1334, 286, 262, 21179, 7159, 389, 3804, 284, 4600, 40406, 44646, 198, 37811, 198, 7249, 4904, 2389, 1045, 90, 35, 11, 50, 92, 198, 220, 220, 220, 1366, 3712, 35, 1303, 1957, 1366, 11, 304, 13, 70, 13, 257, 29854, 721, 198, 220, 220, 220, 725, 3712, 7378, 40, 13, 6935, 198, 220, 220, 220, 6808, 3712, 5317, 2624, 1303, 4279, 286, 6808, 1429, 198, 220, 220, 220, 318, 15763, 3712, 33, 970, 1303, 2081, 611, 2491, 319, 6808, 1429, 198, 220, 220, 220, 264, 3712, 50, 1303, 2099, 357, 7249, 8, 351, 2252, 3307, 2622, 329, 6946, 628, 220, 220, 220, 2163, 4904, 2389, 1045, 7, 7890, 3712, 35, 11, 725, 11, 6808, 11, 264, 3712, 50, 8, 810, 1391, 35, 11, 311, 27, 25, 20344, 4163, 13290, 4338, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 35, 11, 50, 92, 7, 7890, 11, 725, 11, 6808, 11, 264, 13, 312, 6624, 6808, 11, 264, 8, 198, 220, 220, 220, 886, 198, 437, 198, 2, 11282, 23772, 351, 9058, 2163, 198, 8818, 4904, 2389, 1045, 7, 7890, 26, 9058, 28, 3149, 72, 62, 4122, 62, 1462, 62, 4122, 11, 725, 28, 3149, 72, 62, 9503, 22784, 6808, 28, 3149, 72, 62, 15763, 11, 479, 86, 22046, 23029, 198, 220, 220, 220, 1441, 9058, 7, 7890, 11, 725, 11, 6808, 26, 479, 86, 22046, 23029, 198, 437, 198, 198, 14881, 13, 417, 4906, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 1288, 4906, 7, 9132, 13, 7890, 8, 198, 14881, 13, 2100, 4906, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 1188, 4906, 7, 9132, 13, 7890, 8, 198, 14881, 13, 2539, 4906, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 1994, 4906, 7, 9132, 13, 7890, 8, 198, 49, 320, 84, 13, 12001, 3911, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 45243, 13, 7890, 198, 49, 320, 84, 13, 1273, 5374, 3477, 21466, 7, 67, 3712, 7378, 2389, 1045, 8, 796, 29542, 84, 13, 1273, 5374, 3477, 21466, 7, 67, 13, 7890, 8, 198, 198, 8818, 7308, 13, 49736, 7, 952, 3712, 9399, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1366, 796, 1438, 1659, 7, 4906, 1659, 7, 9132, 13, 7890, 4008, 198, 220, 220, 220, 18896, 796, 4129, 7, 9132, 8, 198, 220, 220, 220, 3918, 796, 520, 5374, 3477, 21466, 7, 9132, 8, 198, 220, 220, 220, 25369, 796, 1438, 1659, 7, 4906, 1659, 7, 9132, 13, 82, 4008, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 7378, 2389, 1045, 16763, 7890, 8, 351, 720, 11925, 12784, 11, 3918, 796, 720, 7635, 11, 4811, 796, 720, 2536, 265, 4943, 198, 437, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 10638, 7, 952, 11, 45243, 8, 198, 220, 220, 220, 4179, 11, 4808, 796, 11298, 1096, 3419, 198, 220, 220, 220, 329, 357, 72, 11, 279, 8, 287, 27056, 378, 7, 79, 3468, 7, 12001, 3911, 7, 9132, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 9132, 8, 1875, 1312, 1875, 4179, 532, 604, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 37082, 77, 220, 2343, 233, 106, 220, 220, 5218, 2343, 233, 106, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 37082, 77, 220, 33172, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 21017, 198, 21017, 40806, 2024, 198, 21017, 198, 37811, 198, 220, 220, 220, 4904, 2389, 1045, 37787, 90, 40, 11, 44, 27, 25, 7378, 2389, 1045, 92, 198, 198, 37787, 625, 4600, 13083, 47671, 4600, 27160, 47671, 393, 4600, 79, 3468, 63, 286, 257, 4600, 67, 85, 3712, 7378, 2389, 1045, 44646, 12101, 663, 1438, 561, 198, 47811, 11, 340, 857, 407, 1682, 1104, 24415, 13, 1675, 1620, 2653, 602, 351, 340, 11, 779, 198, 63, 8899, 445, 7234, 47671, 393, 663, 28486, 357, 63, 16345, 47671, 4600, 1676, 67, 47671, 4600, 445, 7234, 63, 986, 828, 543, 481, 1620, 262, 198, 445, 8110, 697, 1214, 4904, 40, 9803, 13, 198, 37811, 198, 7249, 4904, 2389, 1045, 37787, 90, 40, 11, 44, 27, 25, 7378, 2389, 1045, 92, 198, 220, 220, 220, 11629, 3712, 40, 198, 220, 220, 220, 1366, 3712, 44, 198, 437, 198, 198, 8818, 7308, 13, 2676, 378, 7, 270, 3712, 7378, 2389, 1045, 37787, 11, 26498, 23029, 198, 220, 220, 220, 4049, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 2676, 803, 625, 4600, 3712, 7378, 2389, 1045, 63, 318, 407, 4855, 13, 33172, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11041, 4600, 12001, 3911, 63, 284, 11629, 378, 625, 262, 1957, 636, 286, 262, 15879, 393, 4600, 8899, 445, 7234, 63, 284, 33172, 198, 220, 220, 220, 220, 220, 220, 220, 366, 525, 687, 257, 7741, 697, 1214, 9803, 1600, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 7308, 13, 8899, 445, 7234, 7, 69, 11, 1034, 11, 340, 3712, 7378, 2389, 1045, 37787, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 581, 796, 3975, 445, 7234, 7, 69, 11, 1034, 11, 340, 13, 2676, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 411, 11, 1034, 11, 340, 13, 7890, 13, 9503, 8, 198, 437, 198, 198, 14881, 13, 37787, 10699, 7, 3712, 7378, 2389, 1045, 37787, 8, 796, 7308, 13, 10699, 20035, 3419, 198, 14881, 13, 79, 3468, 7, 7890, 3712, 7378, 2389, 1045, 8, 796, 4904, 2389, 1045, 37787, 7, 79, 3468, 7, 12001, 3911, 7, 7890, 36911, 1366, 8, 198, 14881, 13, 13083, 7, 7890, 3712, 7378, 2389, 1045, 8, 796, 4904, 2389, 1045, 37787, 7, 13083, 7, 12001, 3911, 7, 7890, 36911, 1366, 8, 198, 14881, 13, 27160, 7, 7890, 3712, 7378, 2389, 1045, 8, 796, 4904, 2389, 1045, 37787, 7, 27160, 7, 12001, 3911, 7, 7890, 36911, 1366, 8, 198, 198, 49, 320, 84, 13, 12001, 3911, 7, 270, 3712, 7378, 2389, 1045, 37787, 8, 796, 340, 13, 2676, 198, 198, 37811, 198, 220, 220, 220, 4129, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 198, 7293, 1133, 262, 4129, 286, 262, 9387, 1366, 319, 790, 4904, 40, 4279, 351, 198, 63, 7378, 40, 13, 3237, 445, 7234, 44646, 4904, 40, 17510, 1313, 2890, 13, 198, 37811, 198, 14881, 13, 13664, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 4904, 40, 13, 3237, 445, 7234, 7, 13664, 7, 9132, 13, 7890, 828, 1343, 11, 45243, 13, 9503, 8, 198, 198, 37811, 198, 220, 220, 220, 2593, 7, 9132, 3712, 7378, 2389, 1045, 11, 279, 28, 17, 8, 198, 198, 7293, 1133, 262, 2593, 286, 262, 9387, 1366, 319, 790, 4904, 40, 4279, 351, 4600, 7378, 40, 13, 3237, 445, 7234, 44646, 198, 7378, 40, 17510, 1313, 2890, 13, 198, 37811, 198, 8818, 44800, 2348, 29230, 13, 27237, 7, 9132, 3712, 7378, 2389, 1045, 11, 279, 3712, 15633, 28, 17, 8, 198, 220, 220, 220, 611, 279, 24844, 362, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 19862, 17034, 7, 16345, 7, 8937, 17, 11, 3815, 7, 9132, 22305, 198, 220, 220, 220, 2073, 361, 279, 24844, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 12178, 7, 16345, 7, 8937, 11, 3815, 7, 9132, 22305, 198, 220, 220, 220, 2073, 361, 279, 24844, 4806, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 12178, 7, 8899, 445, 7234, 7, 8937, 11, 3509, 11, 3815, 7, 9132, 1776, 2315, 28, 5305, 7, 22570, 7, 2100, 4906, 7, 9132, 4008, 22305, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 3, 79, 12, 27237, 286, 4904, 2389, 1045, 318, 407, 9177, 19570, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2513, 1142, 4494, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 198, 7293, 1133, 262, 2513, 1142, 4494, 286, 262, 9387, 1366, 319, 790, 4904, 40, 4279, 351, 4600, 7378, 40, 13, 3237, 445, 7234, 44646, 198, 7378, 40, 17510, 1313, 2890, 13, 198, 37811, 198, 8818, 29542, 84, 13, 35, 713, 53, 478, 669, 13, 11152, 1142, 4494, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 11152, 1142, 4494, 7, 9132, 13, 7890, 828, 1343, 11, 45243, 13, 9503, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 285, 14415, 62, 28869, 11413, 1096, 0, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 198, 50, 24871, 1096, 4600, 9132, 47671, 13359, 663, 10154, 389, 9387, 1871, 9803, 9380, 13, 198, 37811, 198, 8818, 285, 14415, 62, 28869, 11413, 1096, 0, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 350, 796, 1288, 4906, 7, 9132, 8, 198, 220, 220, 220, 616, 43027, 796, 285, 14415, 62, 43027, 7, 9132, 13, 9503, 8, 198, 220, 220, 220, 39334, 796, 20650, 90, 47, 92, 58, 47, 21737, 329, 4808, 287, 352, 25, 3149, 72, 62, 7857, 7, 9132, 13, 9503, 15437, 198, 220, 220, 220, 329, 357, 2860, 11, 1188, 8, 287, 14729, 7, 12001, 3911, 7, 9132, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 491, 796, 2496, 43027, 7, 2860, 11, 285, 14415, 62, 7857, 7, 9132, 13, 9503, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 491, 15139, 254, 616, 43027, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 36873, 364, 58, 2213, 1343, 352, 4357, 751, 5218, 1188, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1957, 3911, 7, 9132, 38381, 2860, 60, 796, 6632, 7, 2100, 4906, 7, 9132, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 285, 14415, 62, 10709, 5344, 62, 36873, 364, 0, 7, 12001, 3911, 7, 9132, 828, 39334, 11, 45243, 13, 9503, 8, 198, 220, 220, 220, 1441, 45243, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 285, 14415, 62, 10709, 5344, 62, 36873, 364, 0, 7, 16793, 3712, 23839, 35, 53, 721, 90, 42, 11, 53, 5512, 39334, 3712, 38469, 90, 27, 25, 38469, 90, 53, 11709, 8, 198, 198, 11041, 4904, 40, 284, 10996, 262, 10154, 286, 4600, 36873, 364, 63, 290, 3297, 606, 656, 4600, 16793, 44646, 383, 4129, 198, 1659, 4600, 36873, 364, 63, 815, 307, 4961, 284, 685, 63, 3149, 72, 62, 7857, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 285, 14415, 62, 10709, 5344, 62, 36873, 364, 0, 7, 16793, 11, 39334, 11, 725, 8, 198, 220, 220, 220, 616, 43027, 796, 285, 14415, 62, 43027, 7, 9503, 8, 198, 220, 220, 220, 664, 29325, 796, 39334, 58, 1820, 43027, 1343, 352, 60, 198, 220, 220, 220, 4818, 265, 2981, 796, 4904, 40, 13, 27354, 265, 2981, 7, 417, 4906, 7, 16793, 4008, 198, 220, 220, 220, 1303, 797, 15164, 422, 2793, 9803, 13, 198, 220, 220, 220, 329, 4686, 287, 657, 37498, 1820, 43027, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 47558, 0, 7, 8344, 29325, 11, 4904, 40, 13, 3855, 62, 9127, 7, 7378, 40, 13, 2964, 1350, 7, 312, 11, 657, 11, 725, 828, 4818, 265, 2981, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 6690, 85, 0, 7, 8344, 29325, 11, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 2860, 11, 1988, 8, 287, 664, 29325, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 58, 2860, 60, 15853, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 35006, 12800, 13, 198, 220, 220, 220, 329, 4686, 287, 657, 37498, 3149, 72, 62, 7857, 7, 9503, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 6624, 616, 43027, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 25206, 7, 36873, 364, 58, 312, 1343, 352, 4357, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 797, 15164, 422, 2440, 9803, 13, 198, 220, 220, 220, 329, 4686, 287, 357, 1820, 43027, 1343, 352, 2599, 7, 3149, 72, 62, 7857, 7, 9503, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 47558, 0, 7, 8344, 29325, 11, 4904, 40, 13, 3855, 62, 9127, 7, 7378, 40, 13, 2964, 1350, 7, 312, 11, 657, 11, 725, 828, 4818, 265, 2981, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 6690, 85, 0, 7, 8344, 29325, 11, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 2860, 11, 1988, 8, 287, 664, 29325, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 58, 2860, 60, 15853, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2496, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1635, 7, 75, 404, 3712, 23839, 45405, 666, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 3237, 27123, 366, 46912, 1, 21215, 31364, 1, 48473, 351, 4904, 40, 12, 17080, 6169, 366, 31364, 1, 4600, 9132, 44646, 383, 1255, 318, 2092, 284, 198, 58, 63, 12001, 3911, 7, 9132, 8, 63, 16151, 31, 5420, 8, 351, 477, 2695, 1719, 587, 28412, 284, 262, 3376, 685, 63, 16793, 43027, 63, 16151, 31, 5420, 737, 198, 7378, 40, 22889, 13, 198, 198, 6214, 685, 63, 7378, 2389, 1045, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 7308, 11207, 9, 7, 75, 404, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 309, 796, 7719, 62, 4906, 7, 417, 4906, 7, 75, 404, 828, 2100, 4906, 7, 9132, 4008, 198, 220, 220, 220, 350, 796, 39645, 90, 2539, 4906, 7, 9132, 828, 51, 92, 198, 220, 220, 220, 39334, 796, 20650, 90, 47, 92, 58, 47, 21737, 329, 4808, 287, 352, 25, 3149, 72, 62, 7857, 7, 9132, 13, 9503, 15437, 198, 220, 220, 220, 616, 43027, 796, 285, 14415, 62, 43027, 3419, 628, 220, 220, 220, 1255, 796, 2092, 7, 12001, 3911, 7, 9132, 828, 309, 8, 628, 220, 220, 220, 1303, 33947, 3815, 656, 39334, 290, 10996, 13, 198, 220, 220, 220, 329, 357, 2539, 11, 1188, 8, 287, 14729, 7, 12001, 3911, 7, 9132, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 58, 2539, 60, 15853, 40039, 62, 30854, 7, 75, 404, 11, 1994, 27493, 2100, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 2860, 11, 9766, 76, 8, 287, 572, 10989, 1840, 874, 7, 75, 404, 11, 1994, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 491, 796, 2496, 43027, 7, 2860, 11, 285, 14415, 62, 7857, 7, 9132, 13, 9503, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 491, 6624, 616, 43027, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 58, 2860, 60, 15853, 9766, 76, 1635, 1188, 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, 4574, 0, 7, 36873, 364, 58, 2213, 1343, 352, 4357, 751, 5218, 9766, 76, 1635, 1188, 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, 285, 14415, 62, 10709, 5344, 62, 36873, 364, 0, 7, 20274, 11, 39334, 11, 45243, 13, 9503, 8, 628, 220, 220, 220, 1441, 1255, 198, 437, 198, 198, 2, 5740, 25, 262, 1708, 5050, 7048, 4904, 2389, 265, 292, 389, 9387, 9380, 13, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 87, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 12001, 3911, 7, 87, 8, 158, 233, 227, 12001, 3911, 7, 9132, 828, 1343, 11, 45243, 13, 9503, 8, 198, 437, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 9132, 3712, 7378, 2389, 1045, 11, 2124, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 12001, 3911, 7, 9132, 8, 158, 233, 227, 12001, 3911, 7, 87, 828, 1343, 11, 45243, 13, 9503, 8, 198, 437, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 9132, 62, 9464, 3712, 7378, 2389, 1045, 11, 45243, 62, 3506, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 12001, 3911, 7, 9132, 62, 9464, 8, 158, 233, 227, 12001, 3911, 7, 9132, 62, 3506, 828, 1343, 11, 45243, 62, 9464, 13, 9503, 8, 198, 437, 198, 198, 2, 5740, 25, 262, 1708, 734, 5050, 670, 351, 2124, 3712, 35, 53, 721, 290, 7048, 4600, 87, 63, 318, 262, 976, 319, 477, 9803, 13, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 87, 11, 300, 404, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 26518, 7, 87, 11, 300, 404, 11, 1957, 3911, 7, 9132, 36911, 1343, 11, 45243, 13, 9503, 8, 198, 437, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 9132, 3712, 7378, 2389, 1045, 11, 300, 404, 11, 2124, 8, 198, 220, 220, 220, 1441, 4904, 40, 13, 3237, 445, 7234, 7, 26518, 7, 12001, 3911, 7, 9132, 828, 300, 404, 11, 2124, 828, 1343, 11, 45243, 13, 9503, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4866, 62, 1462, 62, 12001, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 198, 31337, 477, 14729, 287, 4600, 9132, 63, 422, 477, 9803, 290, 3650, 606, 287, 257, 1957, 4600, 23839, 35, 53, 721, 44646, 198, 37811, 198, 30073, 62, 1462, 62, 12001, 7, 9132, 3712, 7378, 2389, 1045, 8, 796, 4866, 62, 1462, 62, 12001, 0, 7, 38610, 7, 12001, 3911, 7, 9132, 36911, 45243, 8, 198, 198, 37811, 198, 220, 220, 220, 4866, 62, 1462, 62, 12001, 0, 7, 16793, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 198, 31337, 477, 14729, 287, 4600, 9132, 63, 422, 477, 9803, 290, 3650, 606, 287, 4600, 16793, 44646, 198, 818, 12, 5372, 2196, 286, 685, 63, 30073, 62, 1462, 62, 12001, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 4866, 62, 1462, 62, 12001, 0, 7, 16793, 11, 45243, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 4866, 0, 7, 16793, 11, 1957, 3911, 7, 9132, 4008, 198, 220, 220, 220, 725, 796, 45243, 13, 9503, 198, 220, 220, 220, 616, 43027, 796, 285, 14415, 62, 43027, 7, 9503, 8, 198, 220, 220, 220, 4818, 265, 2981, 796, 4904, 40, 13, 27354, 265, 2981, 7, 417, 4906, 7, 9132, 4008, 628, 220, 220, 220, 1303, 9363, 477, 14729, 284, 257, 11876, 13, 198, 220, 220, 220, 3758, 29325, 796, 2824, 7, 79, 3468, 7, 12001, 3911, 7, 9132, 22305, 198, 220, 220, 220, 664, 29325, 796, 1288, 4906, 7, 9132, 8, 21737, 628, 220, 220, 220, 1303, 797, 15164, 422, 2793, 9803, 13, 198, 220, 220, 220, 329, 4686, 287, 657, 37498, 1820, 43027, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 47558, 0, 7, 8344, 29325, 11, 4904, 40, 13, 3855, 62, 9127, 7, 7378, 40, 13, 2964, 1350, 7, 312, 11, 657, 11, 725, 828, 4818, 265, 2981, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 6690, 85, 0, 7, 8344, 29325, 11, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 2860, 11, 1988, 8, 287, 664, 29325, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 58, 2860, 60, 15853, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 35006, 12800, 13, 198, 220, 220, 220, 329, 4686, 287, 657, 37498, 3149, 72, 62, 7857, 7, 9503, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 6624, 616, 43027, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 25206, 7, 21280, 29325, 11, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 797, 15164, 422, 2440, 9803, 13, 198, 220, 220, 220, 329, 4686, 287, 357, 1820, 43027, 1343, 352, 2599, 7, 3149, 72, 62, 7857, 7, 9503, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 47558, 0, 7, 8344, 29325, 11, 4904, 40, 13, 3855, 62, 9127, 7, 7378, 40, 13, 2964, 1350, 7, 312, 11, 657, 11, 725, 828, 4818, 265, 2981, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4904, 40, 13, 6690, 85, 0, 7, 8344, 29325, 11, 4686, 11, 657, 11, 725, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 2860, 11, 1988, 8, 287, 664, 29325, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 58, 2860, 60, 15853, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4904, 40, 13, 10374, 5277, 7, 9503, 8, 198, 220, 220, 220, 1441, 2496, 198, 437, 198, 198, 8818, 44800, 2348, 29230, 13, 26518, 7, 9132, 62, 9464, 3712, 7378, 2389, 1045, 11, 300, 404, 11, 45243, 62, 3506, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 1303, 37560, 25, 300, 404, 1635, 45243, 62, 3506, 460, 307, 3236, 13, 632, 1244, 307, 1365, 284, 655, 2824, 262, 1336, 1364, 198, 220, 220, 220, 1303, 15879, 290, 466, 262, 48473, 15726, 13, 198, 220, 220, 220, 1364, 796, 4866, 62, 1462, 62, 12001, 7, 9132, 62, 9464, 8, 198, 220, 220, 220, 1441, 16605, 7, 9464, 11, 300, 404, 11, 45243, 62, 3506, 8, 198, 437, 198, 198, 8818, 29542, 84, 13, 5787, 2736, 7, 9132, 3712, 7378, 2389, 1045, 8, 198, 220, 220, 220, 285, 14415, 62, 28869, 11413, 1096, 0, 7, 9132, 8, 198, 220, 220, 220, 1441, 16611, 7, 12001, 3911, 7, 9132, 4008, 198, 437, 198, 198, 8818, 29542, 84, 13, 439, 62, 2502, 75, 1686, 7, 3575, 2024, 3712, 51, 29291, 11, 1569, 6359, 3712, 11251, 29291, 90, 45, 11, 7378, 2389, 1045, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 1957, 62, 35138, 62, 72, 796, 2092, 7, 12001, 3911, 7, 303, 6359, 58, 16, 60, 4008, 198, 220, 220, 220, 309, 796, 7719, 62, 4906, 19510, 2100, 4906, 7, 85, 8, 329, 410, 287, 1569, 6359, 26513, 11, 1288, 4906, 12195, 3575, 2024, 8, 23029, 198, 220, 220, 220, 3891, 796, 10903, 21737, 198, 220, 220, 220, 3815, 796, 309, 21737, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 45, 11, 474, 287, 1312, 10, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 14933, 11, 366, 66, 3, 7, 72, 8, 62, 26518, 62, 66, 3, 7, 73, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 27160, 11, 16605, 7, 303, 6359, 58, 72, 4357, 1569, 6359, 58, 73, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4866, 62, 1462, 62, 12001, 0, 7, 12001, 62, 35138, 62, 72, 11, 1569, 6359, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 74, 11, 1034, 8, 287, 27056, 378, 7, 3575, 2024, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 14933, 11, 366, 66, 3, 7, 72, 8, 62, 18257, 3, 7, 74, 8, 62, 66, 3, 7, 73, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 27160, 11, 16605, 7, 12001, 62, 35138, 62, 72, 11, 1034, 11, 1569, 6359, 58, 73, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 997, 62, 48922, 796, 357, 45, 1635, 357, 45, 532, 352, 8, 6184, 115, 362, 8, 1635, 357, 13664, 7, 3575, 2024, 8, 1343, 352, 8, 198, 220, 220, 220, 1441, 20546, 9250, 90, 22510, 62, 48922, 11, 10100, 92, 7, 14933, 737, 7890, 11, 20546, 9250, 90, 22510, 62, 48922, 11, 51, 92, 7, 27160, 737, 7890, 198, 437, 198 ]
2.353791
4,432
module AverageShiftedHistograms import StatsBase import StatsBase: nobs, fit! import Distributions import UnicodePlots using RecipesBase export ash, fit!, extendrange, xy, xyz, nout, nobs, # Kernels Kernels, biweight, cosine, epanechnikov, triangular, tricube, triweight, uniform, gaussian, logistic # common abstract AbstractAsh StatsBase.nobs(o::AbstractAsh) = o.nobs nout(o::AbstractAsh) = nobs(o) - sum(o.v) """ `extendrange(x, s = .5, n = 200)` Create a `LinSpace` of length `n` starting at `s` standard deviations below `minimum(x)` and ending at `s` standard deviations above `maximum(x)` """ function extendrange(y::AbstractVector, s = 0.5, n = 200) σ = std(y) linspace(minimum(y) - s * σ, maximum(y) + s * σ, n) end include("kernels.jl") include("univariate.jl") include("bivariate.jl") end
[ 21412, 13475, 2484, 21715, 13749, 26836, 198, 198, 11748, 20595, 14881, 198, 11748, 20595, 14881, 25, 645, 1443, 11, 4197, 0, 198, 11748, 46567, 507, 198, 11748, 34371, 3646, 1747, 198, 3500, 44229, 14881, 628, 198, 39344, 198, 220, 220, 220, 12530, 11, 4197, 28265, 9117, 9521, 11, 2124, 88, 11, 2124, 45579, 11, 299, 448, 11, 645, 1443, 11, 198, 220, 220, 220, 1303, 509, 44930, 198, 220, 220, 220, 509, 44930, 11, 198, 220, 220, 220, 3182, 6551, 11, 8615, 500, 11, 2462, 1531, 1349, 1134, 709, 11, 46963, 11, 491, 291, 3266, 11, 1333, 6551, 11, 8187, 11, 198, 220, 220, 220, 31986, 31562, 11, 2604, 2569, 628, 198, 2, 2219, 198, 397, 8709, 27741, 26754, 198, 29668, 14881, 13, 77, 8158, 7, 78, 3712, 23839, 26754, 8, 796, 267, 13, 77, 8158, 198, 77, 448, 7, 78, 3712, 23839, 26754, 8, 796, 645, 1443, 7, 78, 8, 532, 2160, 7, 78, 13, 85, 8, 198, 198, 37811, 198, 63, 2302, 437, 9521, 7, 87, 11, 264, 796, 764, 20, 11, 299, 796, 939, 8, 63, 198, 198, 16447, 257, 4600, 14993, 14106, 63, 286, 4129, 4600, 77, 63, 3599, 379, 4600, 82, 63, 3210, 47060, 2174, 198, 63, 39504, 7, 87, 8, 63, 290, 7464, 379, 4600, 82, 63, 3210, 47060, 2029, 4600, 47033, 7, 87, 8, 63, 198, 37811, 198, 8818, 9117, 9521, 7, 88, 3712, 23839, 38469, 11, 264, 796, 657, 13, 20, 11, 299, 796, 939, 8, 198, 220, 220, 220, 18074, 225, 796, 14367, 7, 88, 8, 198, 220, 220, 220, 300, 1040, 10223, 7, 39504, 7, 88, 8, 532, 264, 1635, 18074, 225, 11, 5415, 7, 88, 8, 1343, 264, 1635, 18074, 225, 11, 299, 8, 198, 437, 198, 198, 17256, 7203, 74, 44930, 13, 20362, 4943, 198, 17256, 7203, 403, 42524, 13, 20362, 4943, 198, 17256, 7203, 65, 42524, 13, 20362, 4943, 198, 437, 198 ]
2.653968
315
<gh_stars>10-100 ### A Pluto.jl notebook ### # v0.12.7 using Markdown using InteractiveUtils # ╔═╡ 6fd616f6-1ea1-11eb-3814-8bfb4a096c49 using Pkg, DrWatson # ╔═╡ 6ffe2628-1ea1-11eb-24ea-57f985146a72 begin @quickactivate "StatisticsWithJuliaPlutoNotebooks" using Random, StatsBase, DataFrames, Plots, Measures Random.seed!(1) end; # ╔═╡ ed174bc4-1ea0-11eb-1e2f-a32874cec549 md"## Listing 3.2" # ╔═╡ 70179b62-1ea1-11eb-13ce-7fb4d54bad4b begin pDiscrete = [0.25, 0.25, 0.5] xGridD = 0:2 end; # ╔═╡ 7e20eac0-1f6d-11eb-23c8-f7f93c8ec92b pContinuous(x) = 3/4*(1 - x^2) # ╔═╡ 7e212a44-1f6d-11eb-17a5-a56e8476b5cf xGridC = -1:0.01:1; # ╔═╡ 7e21ad70-1f6d-11eb-1e7a-5982011bd333 pContinuous2(x) = x < 0 ? x+1 : 1-x # ╔═╡ 7e2dde18-1f6d-11eb-2165-fd23fbaf928e begin p1 = plot(xGridD, line=:stem, pDiscrete, marker=:circle, c=:blue, ms=6, msw=0) p2 = plot(xGridC, pContinuous.(xGridC), c=:blue) p3 = plot(xGridC, pContinuous2.(xGridC), c=:blue) plot(p1, p2, p3, layout=(1,3), legend=false, ylims=(0,1.1), xlabel="x", ylabel=["Probability" "Density" "Density"], size=(1200, 400), margin=5mm) end # ╔═╡ 70182cd8-1ea1-11eb-094d-8d0d49cf15f3 md"## End of listing 3.2" # ╔═╡ Cell order: # ╟─ed174bc4-1ea0-11eb-1e2f-a32874cec549 # ╠═6fd616f6-1ea1-11eb-3814-8bfb4a096c49 # ╠═6ffe2628-1ea1-11eb-24ea-57f985146a72 # ╠═70179b62-1ea1-11eb-13ce-7fb4d54bad4b # ╠═7e20eac0-1f6d-11eb-23c8-f7f93c8ec92b # ╠═7e212a44-1f6d-11eb-17a5-a56e8476b5cf # ╠═7e21ad70-1f6d-11eb-1e7a-5982011bd333 # ╠═7e2dde18-1f6d-11eb-2165-fd23fbaf928e # ╟─70182cd8-1ea1-11eb-094d-8d0d49cf15f3
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 22, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 718, 16344, 44214, 69, 21, 12, 16, 18213, 16, 12, 1157, 1765, 12, 2548, 1415, 12, 23, 19881, 65, 19, 64, 2931, 21, 66, 2920, 198, 3500, 350, 10025, 11, 1583, 54, 13506, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 718, 16658, 2075, 2078, 12, 16, 18213, 16, 12, 1157, 1765, 12, 1731, 18213, 12, 3553, 69, 42250, 20964, 64, 4761, 198, 27471, 198, 197, 31, 24209, 39022, 366, 48346, 3152, 16980, 544, 3646, 9390, 6425, 12106, 1, 198, 197, 3500, 14534, 11, 20595, 14881, 11, 6060, 35439, 11, 1345, 1747, 11, 45040, 198, 197, 29531, 13, 28826, 0, 7, 16, 8, 198, 437, 26, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 1225, 22985, 15630, 19, 12, 16, 18213, 15, 12, 1157, 1765, 12, 16, 68, 17, 69, 12, 64, 34256, 4524, 344, 66, 44966, 198, 9132, 1, 2235, 7343, 278, 513, 13, 17, 1, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 48173, 3720, 65, 5237, 12, 16, 18213, 16, 12, 1157, 1765, 12, 1485, 344, 12, 22, 21855, 19, 67, 4051, 14774, 19, 65, 198, 27471, 198, 197, 79, 15642, 8374, 796, 685, 15, 13, 1495, 11, 657, 13, 1495, 11, 657, 13, 20, 60, 198, 197, 87, 41339, 35, 796, 657, 25, 17, 198, 437, 26, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 767, 68, 1238, 68, 330, 15, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 1954, 66, 23, 12, 69, 22, 69, 6052, 66, 23, 721, 5892, 65, 198, 79, 17875, 5623, 7, 87, 8, 796, 513, 14, 19, 9, 7, 16, 532, 2124, 61, 17, 8, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 767, 68, 21777, 64, 2598, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 1558, 64, 20, 12, 64, 3980, 68, 23, 35435, 65, 20, 12993, 198, 87, 41339, 34, 796, 532, 16, 25, 15, 13, 486, 25, 16, 26, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 767, 68, 2481, 324, 2154, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 16, 68, 22, 64, 12, 41292, 9804, 17457, 20370, 198, 79, 17875, 5623, 17, 7, 87, 8, 796, 2124, 1279, 657, 5633, 2124, 10, 16, 1058, 352, 12, 87, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 767, 68, 17, 1860, 68, 1507, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 20666, 20, 12, 16344, 1954, 21855, 1878, 24, 2078, 68, 198, 27471, 198, 197, 79, 16, 796, 7110, 7, 87, 41339, 35, 11, 1627, 28, 25, 927, 11, 279, 15642, 8374, 11, 18364, 28, 25, 45597, 11, 269, 28, 25, 17585, 11, 13845, 28, 21, 11, 285, 2032, 28, 15, 8, 198, 197, 79, 17, 796, 7110, 7, 87, 41339, 34, 11, 279, 17875, 5623, 12195, 87, 41339, 34, 828, 269, 28, 25, 17585, 8, 198, 197, 79, 18, 796, 7110, 7, 87, 41339, 34, 11, 279, 17875, 5623, 17, 12195, 87, 41339, 34, 828, 269, 28, 25, 17585, 8, 628, 197, 29487, 7, 79, 16, 11, 279, 17, 11, 279, 18, 11, 12461, 16193, 16, 11, 18, 828, 8177, 28, 9562, 11, 331, 2475, 82, 16193, 15, 11, 16, 13, 16, 828, 2124, 18242, 2625, 87, 1600, 198, 197, 197, 2645, 9608, 28, 14692, 2964, 65, 1799, 1, 366, 35, 6377, 1, 366, 35, 6377, 33116, 2546, 16193, 27550, 11, 7337, 828, 10330, 28, 20, 3020, 8, 198, 437, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 48173, 6469, 10210, 23, 12, 16, 18213, 16, 12, 1157, 1765, 12, 2931, 19, 67, 12, 23, 67, 15, 67, 2920, 12993, 1314, 69, 18, 198, 9132, 1, 2235, 5268, 286, 13487, 513, 13, 17, 1, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 12440, 1502, 25, 198, 2, 2343, 243, 253, 7280, 276, 22985, 15630, 19, 12, 16, 18213, 15, 12, 1157, 1765, 12, 16, 68, 17, 69, 12, 64, 34256, 4524, 344, 66, 44966, 198, 2, 2343, 243, 254, 28670, 21, 16344, 44214, 69, 21, 12, 16, 18213, 16, 12, 1157, 1765, 12, 2548, 1415, 12, 23, 19881, 65, 19, 64, 2931, 21, 66, 2920, 198, 2, 2343, 243, 254, 28670, 21, 16658, 2075, 2078, 12, 16, 18213, 16, 12, 1157, 1765, 12, 1731, 18213, 12, 3553, 69, 42250, 20964, 64, 4761, 198, 2, 2343, 243, 254, 28670, 41583, 3720, 65, 5237, 12, 16, 18213, 16, 12, 1157, 1765, 12, 1485, 344, 12, 22, 21855, 19, 67, 4051, 14774, 19, 65, 198, 2, 2343, 243, 254, 28670, 22, 68, 1238, 68, 330, 15, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 1954, 66, 23, 12, 69, 22, 69, 6052, 66, 23, 721, 5892, 65, 198, 2, 2343, 243, 254, 28670, 22, 68, 21777, 64, 2598, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 1558, 64, 20, 12, 64, 3980, 68, 23, 35435, 65, 20, 12993, 198, 2, 2343, 243, 254, 28670, 22, 68, 2481, 324, 2154, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 16, 68, 22, 64, 12, 41292, 9804, 17457, 20370, 198, 2, 2343, 243, 254, 28670, 22, 68, 17, 1860, 68, 1507, 12, 16, 69, 21, 67, 12, 1157, 1765, 12, 20666, 20, 12, 16344, 1954, 21855, 1878, 24, 2078, 68, 198, 2, 2343, 243, 253, 7280, 41583, 6469, 10210, 23, 12, 16, 18213, 16, 12, 1157, 1765, 12, 2931, 19, 67, 12, 23, 67, 15, 67, 2920, 12993, 1314, 69, 18, 198 ]
1.662407
939
<reponame>UnofficialJuliaMirror/StochasticPrograms.jl-8b8459f2-c380-502b-8633-9aed2d6c2b35<filename>src/methods/evaluation.jl # Problem evaluation # # ========================== # function _eval_first_stage(stochasticprogram::StochasticProgram, x::AbstractVector) first_stage = get_stage_one(stochasticprogram) return eval_objective(first_stage.obj, x) end function _eval_second_stage(stochasticprogram::TwoStageStochasticProgram, x::AbstractVector, scenario::AbstractScenario, solver::MPB.AbstractMathProgSolver) outcome = outcome_model(stochasticprogram, x, scenario, solver) solve(outcome) return probability(scenario)*getobjectivevalue(outcome) end function _eval_second_stages(stochasticprogram::TwoStageStochasticProgram{S,SP}, x::AbstractVector, solver::MPB.AbstractMathProgSolver) where {S, SP <: ScenarioProblems} outcome_generator = scenario -> outcome_model(stochasticprogram, x, scenario; solver = solver) return outcome_mean(outcome_generator, scenarios(stochasticprogram)) end function _eval_second_stages(stochasticprogram::TwoStageStochasticProgram{S,SP}, x::AbstractVector, solver::MPB.AbstractMathProgSolver) where {S, SP <: DScenarioProblems} Qs = Vector{Float64}(undef, nworkers()) outcome_generator = scenario -> outcome_model(stochasticprogram, x, scenario; solver = solver) @sync begin for (i,w) in enumerate(workers()) @async Qs[i] = remotecall_fetch((sp,outcome_generator)->begin scenarioproblems = fetch(sp) isempty(scenarioproblems.scenarios) && return 0.0 return outcome_mean(outcome_generator, scenarioproblems.scenarios) end, w, stochasticprogram.scenarioproblems[w-1], outcome_generator) end end return sum(Qs) end function _stat_eval_second_stages(stochasticprogram::TwoStageStochasticProgram{S,SP}, x::AbstractVector, solver::MPB.AbstractMathProgSolver) where {S, SP <: ScenarioProblems} N = nscenarios(stochasticprogram) outcome_generator = scenario -> outcome_model(stochasticprogram, x, scenario; solver = solver) 𝔼Q, σ² = outcome_welford(outcome_generator, scenarios(stochasticprogram)) return 𝔼Q, sqrt(σ²) end function _stat_eval_second_stages(stochasticprogram::TwoStageStochasticProgram{S,SP}, x::AbstractVector, solver::MPB.AbstractMathProgSolver) where {S, SP <: DScenarioProblems} N = nscenarios(stochasticprogram) partial_welfords = Vector{Tuple{Float64,Float64,Int}}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_welfords[i] = remotecall_fetch((sp,stage_one_generator,stage_two_generator,stage_one_params,stage_two_params,x,solver)->begin scenarioproblems = fetch(sp) isempty(scenarioproblems.scenarios) && return zero(eltype(x)), zero(eltype(x)) outcome_generator = scenario -> begin outcome_model = Model(solver = solver) _outcome_model!(outcome_model, stage_one_generator, stage_two_generator, stage_one_params, stage_two_params, x, scenario) return outcome_model end return (outcome_welford(outcome_generator, scenarioproblems.scenarios)..., length(scenarioproblems.scenarios)) end, w, stochasticprogram.scenarioproblems[w-1], stochasticprogram.generator[:stage_1_vars], stochasticprogram.generator[:stage_2], stage_parameters(stochasticprogram, 1), stage_parameters(stochasticprogram, 2), x, solver) end end 𝔼Q, σ², _ = reduce(aggregate_welford, partial_welfords) return 𝔼Q, sqrt(σ²) end function _eval(stochasticprogram::StochasticProgram{2}, x::AbstractVector, solver::MPB.AbstractMathProgSolver) xlength = decision_length(stochasticprogram) length(x) == xlength || error("Incorrect length of given decision vector, has ", length(x), " should be ", xlength) all(.!(isnan.(x))) || error("Given decision vector has NaN elements") cᵀx = _eval_first_stage(stochasticprogram, x) 𝔼Q = _eval_second_stages(stochasticprogram, x, solver) return cᵀx+𝔼Q end # Mean/variance calculations # # ========================== # function outcome_mean(outcome_generator::Function, scenarios::Vector{<:AbstractScenario}) Qs = zeros(length(scenarios)) for (i,scenario) in enumerate(scenarios) outcome = outcome_generator(scenario) status = solve(outcome) if status != :Optimal error("Outcome model could not be solved, returned status: $status") end Qs[i] = probability(scenario)*getobjectivevalue(outcome) end return sum(Qs) end function outcome_welford(outcome_generator::Function, scenarios::Vector{<:AbstractScenario}) Q̄ₖ = 0 Sₖ = 0 N = length(scenarios) for k = 1:N Q̄ₖ₋₁ = Q̄ₖ outcome = outcome_generator(scenarios[k]) status = solve(outcome) if status != :Optimal error("Outcome model could not be solved, returned status: $status") end Q = getobjectivevalue(outcome) Q̄ₖ = Q̄ₖ + (Q-Q̄ₖ)/k Sₖ = Sₖ + (Q-Q̄ₖ)*(Q-Q̄ₖ₋₁) end return Q̄ₖ, Sₖ/(N-1) end function aggregate_welford(left::Tuple, right::Tuple) x̄ₗ, σₗ², nₗ = left x̄ᵣ, σᵣ², nᵣ = right δ = x̄ᵣ-x̄ₗ N = nₗ+nᵣ x̄ = (nₗ*x̄ₗ+nᵣ*x̄ᵣ)/N Sₗ = σₗ²*(nₗ-1) Sᵣ = σᵣ²*(nᵣ-1) S = Sₗ+Sᵣ+nₗ*nᵣ/N*δ^2 return (x̄, S/(N-1), N) end # Evaluation API # # ========================== # """ evaluate_decision(stochasticprogram::TwoStageStochasticProgram, decision::AbstractVector; solver = JuMP.UnsetSolver()) Evaluate the first-stage `decision` in `stochasticprogram`. In other words, evaluate the first-stage objective at `decision` and solve outcome models of `decision` for every available scenario. Optionally, supply a capable `solver` to solve the outcome models. Otherwise, any previously set solver will be used. """ function evaluate_decision(stochasticprogram::StochasticProgram{2}, decision::AbstractVector; solver::SPSolverType = JuMP.UnsetSolver()) # Use cached solver if available supplied_solver = pick_solver(stochasticprogram, solver) # Abort if no solver was given if isa(supplied_solver, JuMP.UnsetSolver) error("Cannot evaluate decision without a solver.") end return _eval(stochasticprogram, decision, internal_solver(supplied_solver)) end """ evaluate_decision(stochasticprogram::TwoStageStochasticProgram, decision::AbstractVector, scenario::AbstractScenario; solver = JuMP.UnsetSolver()) Evaluate the result of taking the first-stage `decision` if `scenario` is the actual outcome in `stochasticprogram`. """ function evaluate_decision(stochasticprogram::StochasticProgram{2}, decision::AbstractVector, scenario::AbstractScenario; solver::SPSolverType = JuMP.UnsetSolver()) # Use cached solver if available supplied_solver = pick_solver(stochasticprogram, solver) # Abort if no solver was given if isa(supplied_solver, JuMP.UnsetSolver) error("Cannot evaluate decision without a solver.") end outcome = outcome_model(stochasticprogram, decision, scenario; solver = solver) status = solve(outcome) if status == :Optimal return _eval_first_stage(stochasticprogram, decision) + getobjectivevalue(outcome) end error("Outcome model could not be solved, returned status: $status") end """ evaluate_decision(stochasticmodel::StochasticModel{2}, decision::AbstractVector, sampler::AbstractSampler; solver = JuMP.UnsetSolver(), confidence = 0.9, n = 1000, N = 100, M = 10) Return a statistical estimate of the objective of the two-stage `stochasticmodel` at `decision` in the form of a confidence interval at level `confidence`, when the underlying scenario distribution is inferred by `sampler`. In other words, evaluate `decision` on an SAA model of size `n`. Generate an upper bound using the sample variance of the evaluation. The lower bound is calculated from the lower bound around the true optimum generated by `confidence_interval` See also: [`confidence_interval`](@ref) """ function evaluate_decision(stochasticmodel::StochasticModel{2}, decision::AbstractVector, sampler::AbstractSampler{S}; solver::SPSolverType = JuMP.UnsetSolver(), confidence::AbstractFloat = 0.9, n::Integer = 1000, N::Integer = 100, M::Integer = 10) where S <: AbstractScenario eval_model = SAA(stochasticmodel, sampler, n) # Condidence level α = (1-confidence)/2 # Compute confidence interval around true optimum for lower bound CI = confidence_interval(stochasticmodel, sampler; solver = solver, confidence = 1-α, N = N, M = M) L = lower(CI) # Upper bound cᵀx = _eval_first_stage(eval_model, decision) 𝔼Q, σ = _stat_eval_second_stages(eval_model, decision, internal_solver(solver)) U = cᵀx + 𝔼Q + quantile(Normal(0,1), 1-α)*σ return ConfidenceInterval(L, U, confidence) end """ confidence_interval(stochasticmodel::StochasticModel{2}, sampler::AbstractSampler; solver = JuMP.UnsetSolver(), confidence = 0.95, N = 100, M = 10) Generate a confidence interval around the true optimum of the two-stage `stochasticmodel` at level `confidence`, when the underlying scenario distribution is inferred by `sampler`. `N` is the size of the SAA models used to generate the interval and generally governs how tight it is. `M` is the amount of SAA samples used. """ function confidence_interval(stochasticmodel::StochasticModel{2}, sampler::AbstractSampler{S}; solver::SPSolverType = JuMP.UnsetSolver(), confidence::AbstractFloat = 0.95, N::Integer = 100, M::Integer = 10) where {S <: AbstractScenario} # Condidence level α = 1-confidence # Lower bound Qs = Vector{Float64}(undef, M) for i = 1:M saa = SAA(stochasticmodel, sampler, N) Qs[i] = VRP(saa, solver = solver) end Q̂ = mean(Qs) σ = std(Qs) t = quantile(TDist(M-1), 1-α) L = Q̂ - t*σ U = Q̂ + t*σ return ConfidenceInterval(L, U, 1-α) end # ========================== #
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 1273, 5374, 3477, 15167, 82, 13, 20362, 12, 23, 65, 23, 33459, 69, 17, 12, 66, 23734, 12, 35126, 65, 12, 4521, 2091, 12, 24, 8432, 17, 67, 21, 66, 17, 65, 2327, 27, 34345, 29, 10677, 14, 24396, 82, 14, 18206, 2288, 13, 20362, 198, 2, 20647, 12660, 1303, 198, 2, 36658, 2559, 28, 1303, 198, 8818, 4808, 18206, 62, 11085, 62, 14247, 7, 301, 5374, 3477, 23065, 3712, 1273, 5374, 3477, 15167, 11, 2124, 3712, 23839, 38469, 8, 198, 220, 220, 220, 717, 62, 14247, 796, 651, 62, 14247, 62, 505, 7, 301, 5374, 3477, 23065, 8, 198, 220, 220, 220, 1441, 5418, 62, 15252, 425, 7, 11085, 62, 14247, 13, 26801, 11, 2124, 8, 198, 437, 198, 8818, 4808, 18206, 62, 12227, 62, 14247, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 11, 2124, 3712, 23839, 38469, 11, 8883, 3712, 23839, 3351, 39055, 11, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 198, 220, 220, 220, 8055, 796, 8055, 62, 19849, 7, 301, 5374, 3477, 23065, 11, 2124, 11, 8883, 11, 1540, 332, 8, 198, 220, 220, 220, 8494, 7, 448, 2958, 8, 198, 220, 220, 220, 1441, 12867, 7, 1416, 39055, 27493, 1136, 15252, 425, 8367, 7, 448, 2958, 8, 198, 437, 198, 8818, 4808, 18206, 62, 12227, 62, 301, 1095, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 90, 50, 11, 4303, 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, 2124, 3712, 23839, 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, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 810, 1391, 50, 11, 6226, 1279, 25, 1446, 39055, 2964, 22143, 92, 198, 220, 220, 220, 8055, 62, 8612, 1352, 796, 8883, 4613, 8055, 62, 19849, 7, 301, 5374, 3477, 23065, 11, 2124, 11, 8883, 26, 1540, 332, 796, 1540, 332, 8, 198, 220, 220, 220, 1441, 8055, 62, 32604, 7, 448, 2958, 62, 8612, 1352, 11, 13858, 7, 301, 5374, 3477, 23065, 4008, 198, 437, 198, 8818, 4808, 18206, 62, 12227, 62, 301, 1095, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 90, 50, 11, 4303, 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, 2124, 3712, 23839, 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, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 810, 1391, 50, 11, 6226, 1279, 25, 360, 3351, 39055, 2964, 22143, 92, 198, 220, 220, 220, 1195, 82, 796, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 8055, 62, 8612, 1352, 796, 8883, 4613, 8055, 62, 19849, 7, 301, 5374, 3477, 23065, 11, 2124, 11, 8883, 26, 1540, 332, 796, 1540, 332, 8, 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, 1195, 82, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 19510, 2777, 11, 448, 2958, 62, 8612, 1352, 8, 3784, 27471, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 796, 21207, 7, 2777, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 28920, 7, 1416, 268, 2743, 404, 305, 22143, 13, 1416, 268, 13010, 8, 11405, 1441, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 8055, 62, 32604, 7, 448, 2958, 62, 8612, 1352, 11, 4408, 2743, 404, 305, 22143, 13, 1416, 268, 13010, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 11, 198, 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, 3995, 354, 3477, 23065, 13, 1416, 268, 2743, 404, 305, 22143, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8055, 62, 8612, 1352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 48, 82, 8, 198, 437, 198, 8818, 4808, 14269, 62, 18206, 62, 12227, 62, 301, 1095, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 90, 50, 11, 4303, 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, 2124, 3712, 23839, 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, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 810, 1391, 50, 11, 6226, 1279, 25, 1446, 39055, 2964, 22143, 92, 198, 220, 220, 220, 399, 796, 299, 1416, 268, 13010, 7, 301, 5374, 3477, 23065, 8, 198, 220, 220, 220, 8055, 62, 8612, 1352, 796, 8883, 4613, 8055, 62, 19849, 7, 301, 5374, 3477, 23065, 11, 2124, 11, 8883, 26, 1540, 332, 796, 1540, 332, 8, 198, 220, 220, 220, 220, 47728, 242, 120, 48, 11, 18074, 225, 31185, 796, 8055, 62, 86, 417, 3841, 7, 448, 2958, 62, 8612, 1352, 11, 13858, 7, 301, 5374, 3477, 23065, 4008, 198, 220, 220, 220, 1441, 220, 47728, 242, 120, 48, 11, 19862, 17034, 7, 38392, 31185, 8, 198, 437, 198, 8818, 4808, 14269, 62, 18206, 62, 12227, 62, 301, 1095, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 90, 50, 11, 4303, 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, 2124, 3712, 23839, 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, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 810, 1391, 50, 11, 6226, 1279, 25, 360, 3351, 39055, 2964, 22143, 92, 198, 220, 220, 220, 399, 796, 299, 1416, 268, 13010, 7, 301, 5374, 3477, 23065, 8, 198, 220, 220, 220, 13027, 62, 86, 7046, 3669, 796, 20650, 90, 51, 29291, 90, 43879, 2414, 11, 43879, 2414, 11, 5317, 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, 86, 7046, 3669, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 19510, 2777, 11, 14247, 62, 505, 62, 8612, 1352, 11, 14247, 62, 11545, 62, 8612, 1352, 11, 14247, 62, 505, 62, 37266, 11, 14247, 62, 11545, 62, 37266, 11, 87, 11, 82, 14375, 8, 3784, 27471, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 796, 21207, 7, 2777, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 28920, 7, 1416, 268, 2743, 404, 305, 22143, 13, 1416, 268, 13010, 8, 11405, 1441, 6632, 7, 417, 4906, 7, 87, 36911, 6632, 7, 417, 4906, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8055, 62, 8612, 1352, 796, 8883, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8055, 62, 19849, 796, 9104, 7, 82, 14375, 796, 1540, 332, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 448, 2958, 62, 19849, 0, 7, 448, 2958, 62, 19849, 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, 3800, 62, 505, 62, 8612, 1352, 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, 3800, 62, 11545, 62, 8612, 1352, 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, 3800, 62, 505, 62, 37266, 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, 3800, 62, 11545, 62, 37266, 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, 2124, 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, 8883, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 8055, 62, 19849, 198, 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, 220, 220, 220, 1441, 357, 448, 2958, 62, 86, 417, 3841, 7, 448, 2958, 62, 8612, 1352, 11, 4408, 2743, 404, 305, 22143, 13, 1416, 268, 13010, 26513, 11, 4129, 7, 1416, 268, 2743, 404, 305, 22143, 13, 1416, 268, 13010, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 11, 198, 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, 3995, 354, 3477, 23065, 13, 1416, 268, 2743, 404, 305, 22143, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3995, 354, 3477, 23065, 13, 8612, 1352, 58, 25, 14247, 62, 16, 62, 85, 945, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3995, 354, 3477, 23065, 13, 8612, 1352, 58, 25, 14247, 62, 17, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3800, 62, 17143, 7307, 7, 301, 5374, 3477, 23065, 11, 352, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3800, 62, 17143, 7307, 7, 301, 5374, 3477, 23065, 11, 362, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 47728, 242, 120, 48, 11, 18074, 225, 31185, 11, 4808, 796, 4646, 7, 9460, 49373, 62, 86, 417, 3841, 11, 13027, 62, 86, 7046, 3669, 8, 198, 220, 220, 220, 1441, 220, 47728, 242, 120, 48, 11, 19862, 17034, 7, 38392, 31185, 8, 198, 437, 198, 8818, 4808, 18206, 7, 301, 5374, 3477, 23065, 3712, 1273, 5374, 3477, 15167, 90, 17, 5512, 2124, 3712, 23839, 38469, 11, 1540, 332, 3712, 7378, 33, 13, 23839, 37372, 2964, 70, 50, 14375, 8, 198, 220, 220, 220, 2124, 13664, 796, 2551, 62, 13664, 7, 301, 5374, 3477, 23065, 8, 198, 220, 220, 220, 4129, 7, 87, 8, 6624, 2124, 13664, 8614, 4049, 7203, 818, 30283, 4129, 286, 1813, 2551, 15879, 11, 468, 33172, 4129, 7, 87, 828, 366, 815, 307, 33172, 2124, 13664, 8, 198, 220, 220, 220, 477, 7, 13, 0, 7, 271, 12647, 12195, 87, 22305, 8614, 4049, 7203, 15056, 2551, 15879, 468, 11013, 45, 4847, 4943, 198, 220, 220, 220, 269, 39611, 222, 87, 796, 4808, 18206, 62, 11085, 62, 14247, 7, 301, 5374, 3477, 23065, 11, 2124, 8, 198, 220, 220, 220, 220, 47728, 242, 120, 48, 796, 4808, 18206, 62, 12227, 62, 301, 1095, 7, 301, 5374, 3477, 23065, 11, 2124, 11, 1540, 332, 8, 198, 220, 220, 220, 1441, 269, 39611, 222, 87, 10, 47728, 242, 120, 48, 198, 437, 198, 2, 22728, 14, 25641, 590, 16765, 1303, 198, 2, 36658, 2559, 28, 1303, 198, 8818, 8055, 62, 32604, 7, 448, 2958, 62, 8612, 1352, 3712, 22203, 11, 13858, 3712, 38469, 90, 27, 25, 23839, 3351, 39055, 30072, 198, 220, 220, 220, 1195, 82, 796, 1976, 27498, 7, 13664, 7, 1416, 268, 13010, 4008, 198, 220, 220, 220, 329, 357, 72, 11, 1416, 39055, 8, 287, 27056, 378, 7, 1416, 268, 13010, 8, 198, 220, 220, 220, 220, 220, 220, 220, 8055, 796, 8055, 62, 8612, 1352, 7, 1416, 39055, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 796, 8494, 7, 448, 2958, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3722, 14512, 1058, 27871, 4402, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 7975, 2958, 2746, 714, 407, 307, 16019, 11, 4504, 3722, 25, 720, 13376, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 82, 58, 72, 60, 796, 12867, 7, 1416, 39055, 27493, 1136, 15252, 425, 8367, 7, 448, 2958, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 48, 82, 8, 198, 437, 198, 8818, 8055, 62, 86, 417, 3841, 7, 448, 2958, 62, 8612, 1352, 3712, 22203, 11, 13858, 3712, 38469, 90, 27, 25, 23839, 3351, 39055, 30072, 198, 220, 220, 220, 1195, 136, 226, 158, 224, 244, 796, 657, 198, 220, 220, 220, 311, 158, 224, 244, 796, 657, 198, 220, 220, 220, 399, 796, 4129, 7, 1416, 268, 13010, 8, 198, 220, 220, 220, 329, 479, 796, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 136, 226, 158, 224, 244, 158, 224, 233, 158, 224, 223, 796, 1195, 136, 226, 158, 224, 244, 198, 220, 220, 220, 220, 220, 220, 220, 8055, 796, 8055, 62, 8612, 1352, 7, 1416, 268, 13010, 58, 74, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 796, 8494, 7, 448, 2958, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3722, 14512, 1058, 27871, 4402, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 7975, 2958, 2746, 714, 407, 307, 16019, 11, 4504, 3722, 25, 720, 13376, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 796, 651, 15252, 425, 8367, 7, 448, 2958, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 136, 226, 158, 224, 244, 796, 1195, 136, 226, 158, 224, 244, 1343, 357, 48, 12, 48, 136, 226, 158, 224, 244, 20679, 74, 198, 220, 220, 220, 220, 220, 220, 220, 311, 158, 224, 244, 796, 311, 158, 224, 244, 1343, 357, 48, 12, 48, 136, 226, 158, 224, 244, 27493, 7, 48, 12, 48, 136, 226, 158, 224, 244, 158, 224, 233, 158, 224, 223, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1195, 136, 226, 158, 224, 244, 11, 311, 158, 224, 244, 29006, 45, 12, 16, 8, 198, 437, 198, 8818, 19406, 62, 86, 417, 3841, 7, 9464, 3712, 51, 29291, 11, 826, 3712, 51, 29291, 8, 198, 220, 220, 220, 2124, 136, 226, 158, 224, 245, 11, 18074, 225, 158, 224, 245, 31185, 11, 299, 158, 224, 245, 796, 1364, 198, 220, 220, 220, 2124, 136, 226, 39611, 96, 11, 18074, 225, 39611, 96, 31185, 11, 299, 39611, 96, 796, 826, 198, 220, 220, 220, 7377, 112, 796, 2124, 136, 226, 39611, 96, 12, 87, 136, 226, 158, 224, 245, 198, 220, 220, 220, 399, 796, 299, 158, 224, 245, 10, 77, 39611, 96, 198, 220, 220, 220, 2124, 136, 226, 796, 357, 77, 158, 224, 245, 9, 87, 136, 226, 158, 224, 245, 10, 77, 39611, 96, 9, 87, 136, 226, 39611, 96, 20679, 45, 198, 220, 220, 220, 311, 158, 224, 245, 796, 18074, 225, 158, 224, 245, 31185, 9, 7, 77, 158, 224, 245, 12, 16, 8, 198, 220, 220, 220, 311, 39611, 96, 796, 18074, 225, 39611, 96, 31185, 9, 7, 77, 39611, 96, 12, 16, 8, 198, 220, 220, 220, 311, 796, 311, 158, 224, 245, 10, 50, 39611, 96, 10, 77, 158, 224, 245, 9, 77, 39611, 96, 14, 45, 9, 138, 112, 61, 17, 198, 220, 220, 220, 1441, 357, 87, 136, 226, 11, 311, 29006, 45, 12, 16, 828, 399, 8, 198, 437, 198, 2, 34959, 7824, 1303, 198, 2, 36658, 2559, 28, 1303, 198, 37811, 198, 220, 220, 220, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2551, 3712, 23839, 38469, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 28955, 198, 198, 36, 2100, 4985, 262, 717, 12, 14247, 4600, 12501, 1166, 63, 287, 4600, 301, 5374, 3477, 23065, 44646, 198, 198, 818, 584, 2456, 11, 13446, 262, 717, 12, 14247, 9432, 379, 4600, 12501, 1166, 63, 290, 8494, 8055, 4981, 286, 4600, 12501, 1166, 63, 329, 790, 1695, 8883, 13, 16018, 453, 11, 5127, 257, 6007, 4600, 82, 14375, 63, 284, 8494, 262, 8055, 4981, 13, 15323, 11, 597, 4271, 900, 1540, 332, 481, 307, 973, 13, 198, 37811, 198, 8818, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 23065, 3712, 1273, 5374, 3477, 15167, 90, 17, 5512, 2551, 3712, 23839, 38469, 26, 1540, 332, 3712, 50, 3705, 14375, 6030, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 28955, 198, 220, 220, 220, 1303, 5765, 39986, 1540, 332, 611, 1695, 198, 220, 220, 220, 14275, 62, 82, 14375, 796, 2298, 62, 82, 14375, 7, 301, 5374, 3477, 23065, 11, 1540, 332, 8, 198, 220, 220, 220, 1303, 2275, 419, 611, 645, 1540, 332, 373, 1813, 198, 220, 220, 220, 611, 318, 64, 7, 18608, 18511, 62, 82, 14375, 11, 12585, 7378, 13, 3118, 2617, 50, 14375, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 13446, 2551, 1231, 257, 1540, 332, 19570, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 4808, 18206, 7, 301, 5374, 3477, 23065, 11, 2551, 11, 5387, 62, 82, 14375, 7, 18608, 18511, 62, 82, 14375, 4008, 198, 437, 198, 37811, 198, 220, 220, 220, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 23065, 3712, 7571, 29391, 1273, 5374, 3477, 15167, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2551, 3712, 23839, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8883, 3712, 23839, 3351, 39055, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 28955, 198, 198, 36, 2100, 4985, 262, 1255, 286, 2263, 262, 717, 12, 14247, 4600, 12501, 1166, 63, 611, 4600, 1416, 39055, 63, 318, 262, 4036, 8055, 287, 4600, 301, 5374, 3477, 23065, 44646, 198, 37811, 198, 8818, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 23065, 3712, 1273, 5374, 3477, 15167, 90, 17, 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, 2551, 3712, 23839, 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, 8883, 3712, 23839, 3351, 39055, 26, 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, 1540, 332, 3712, 50, 3705, 14375, 6030, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 28955, 198, 220, 220, 220, 1303, 5765, 39986, 1540, 332, 611, 1695, 198, 220, 220, 220, 14275, 62, 82, 14375, 796, 2298, 62, 82, 14375, 7, 301, 5374, 3477, 23065, 11, 1540, 332, 8, 198, 220, 220, 220, 1303, 2275, 419, 611, 645, 1540, 332, 373, 1813, 198, 220, 220, 220, 611, 318, 64, 7, 18608, 18511, 62, 82, 14375, 11, 12585, 7378, 13, 3118, 2617, 50, 14375, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34, 34574, 13446, 2551, 1231, 257, 1540, 332, 19570, 198, 220, 220, 220, 886, 198, 220, 220, 220, 8055, 796, 8055, 62, 19849, 7, 301, 5374, 3477, 23065, 11, 2551, 11, 8883, 26, 1540, 332, 796, 1540, 332, 8, 198, 220, 220, 220, 3722, 796, 8494, 7, 448, 2958, 8, 198, 220, 220, 220, 611, 3722, 6624, 1058, 27871, 4402, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4808, 18206, 62, 11085, 62, 14247, 7, 301, 5374, 3477, 23065, 11, 2551, 8, 1343, 651, 15252, 425, 8367, 7, 448, 2958, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4049, 7203, 7975, 2958, 2746, 714, 407, 307, 16019, 11, 4504, 3722, 25, 720, 13376, 4943, 198, 437, 198, 37811, 198, 220, 220, 220, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 19849, 3712, 1273, 5374, 3477, 17633, 90, 17, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2551, 3712, 23839, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6072, 20053, 3712, 23839, 16305, 20053, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6628, 796, 657, 13, 24, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 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, 399, 796, 1802, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 796, 838, 8, 198, 198, 13615, 257, 13905, 8636, 286, 262, 9432, 286, 262, 734, 12, 14247, 4600, 301, 5374, 3477, 19849, 63, 379, 4600, 12501, 1166, 63, 287, 262, 1296, 286, 257, 6628, 16654, 379, 1241, 4600, 39745, 47671, 618, 262, 10238, 8883, 6082, 318, 41240, 416, 4600, 37687, 20053, 44646, 198, 198, 818, 584, 2456, 11, 13446, 4600, 12501, 1166, 63, 319, 281, 311, 3838, 2746, 286, 2546, 4600, 77, 44646, 2980, 378, 281, 6727, 5421, 1262, 262, 6291, 24198, 286, 262, 12660, 13, 383, 2793, 5421, 318, 10488, 422, 262, 2793, 5421, 1088, 262, 2081, 39475, 7560, 416, 4600, 39745, 62, 3849, 2100, 63, 198, 198, 6214, 635, 25, 685, 63, 39745, 62, 3849, 2100, 63, 16151, 31, 5420, 8, 198, 37811, 198, 8818, 13446, 62, 12501, 1166, 7, 301, 5374, 3477, 19849, 3712, 1273, 5374, 3477, 17633, 90, 17, 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, 2551, 3712, 23839, 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, 6072, 20053, 3712, 23839, 16305, 20053, 90, 50, 19629, 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, 1540, 332, 3712, 50, 3705, 14375, 6030, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 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, 6628, 3712, 23839, 43879, 796, 657, 13, 24, 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, 299, 3712, 46541, 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, 399, 3712, 46541, 796, 1802, 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, 337, 3712, 46541, 796, 838, 8, 810, 311, 1279, 25, 27741, 3351, 39055, 198, 220, 220, 220, 5418, 62, 19849, 796, 311, 3838, 7, 301, 5374, 3477, 19849, 11, 6072, 20053, 11, 299, 8, 198, 220, 220, 220, 1303, 9724, 1704, 1241, 198, 220, 220, 220, 26367, 796, 357, 16, 12, 39745, 20679, 17, 198, 220, 220, 220, 1303, 3082, 1133, 6628, 16654, 1088, 2081, 39475, 329, 2793, 5421, 198, 220, 220, 220, 14514, 796, 6628, 62, 3849, 2100, 7, 301, 5374, 3477, 19849, 11, 6072, 20053, 26, 1540, 332, 796, 1540, 332, 11, 6628, 796, 352, 12, 17394, 11, 399, 796, 399, 11, 337, 796, 337, 8, 198, 220, 220, 220, 406, 796, 2793, 7, 25690, 8, 198, 220, 220, 220, 1303, 20390, 5421, 198, 220, 220, 220, 269, 39611, 222, 87, 796, 4808, 18206, 62, 11085, 62, 14247, 7, 18206, 62, 19849, 11, 2551, 8, 198, 220, 220, 220, 220, 47728, 242, 120, 48, 11, 18074, 225, 796, 4808, 14269, 62, 18206, 62, 12227, 62, 301, 1095, 7, 18206, 62, 19849, 11, 2551, 11, 5387, 62, 82, 14375, 7, 82, 14375, 4008, 198, 220, 220, 220, 471, 796, 269, 39611, 222, 87, 1343, 220, 47728, 242, 120, 48, 1343, 5554, 576, 7, 26447, 7, 15, 11, 16, 828, 352, 12, 17394, 27493, 38392, 198, 220, 220, 220, 1441, 7326, 1704, 9492, 2100, 7, 43, 11, 471, 11, 6628, 8, 198, 437, 198, 37811, 198, 220, 220, 220, 6628, 62, 3849, 2100, 7, 301, 5374, 3477, 19849, 3712, 1273, 5374, 3477, 17633, 90, 17, 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, 6072, 20053, 3712, 23839, 16305, 20053, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1540, 332, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 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, 6628, 796, 657, 13, 3865, 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, 399, 796, 1802, 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, 337, 796, 838, 8, 198, 198, 8645, 378, 257, 6628, 16654, 1088, 262, 2081, 39475, 286, 262, 734, 12, 14247, 4600, 301, 5374, 3477, 19849, 63, 379, 1241, 4600, 39745, 47671, 618, 262, 10238, 8883, 6082, 318, 41240, 416, 4600, 37687, 20053, 44646, 198, 198, 63, 45, 63, 318, 262, 2546, 286, 262, 311, 3838, 4981, 973, 284, 7716, 262, 16654, 290, 4143, 47049, 703, 5381, 340, 318, 13, 4600, 44, 63, 318, 262, 2033, 286, 311, 3838, 8405, 973, 13, 198, 37811, 198, 8818, 6628, 62, 3849, 2100, 7, 301, 5374, 3477, 19849, 3712, 1273, 5374, 3477, 17633, 90, 17, 5512, 6072, 20053, 3712, 23839, 16305, 20053, 90, 50, 19629, 1540, 332, 3712, 50, 3705, 14375, 6030, 796, 12585, 7378, 13, 3118, 2617, 50, 14375, 22784, 6628, 3712, 23839, 43879, 796, 657, 13, 3865, 11, 399, 3712, 46541, 796, 1802, 11, 337, 3712, 46541, 796, 838, 8, 810, 1391, 50, 1279, 25, 27741, 3351, 39055, 92, 198, 220, 220, 220, 1303, 9724, 1704, 1241, 198, 220, 220, 220, 26367, 796, 352, 12, 39745, 198, 220, 220, 220, 1303, 16048, 5421, 198, 220, 220, 220, 1195, 82, 796, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 337, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 44, 198, 220, 220, 220, 220, 220, 220, 220, 473, 64, 796, 311, 3838, 7, 301, 5374, 3477, 19849, 11, 6072, 20053, 11, 399, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 82, 58, 72, 60, 796, 6453, 47, 7, 82, 7252, 11, 1540, 332, 796, 1540, 332, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1195, 136, 224, 796, 1612, 7, 48, 82, 8, 198, 220, 220, 220, 18074, 225, 796, 14367, 7, 48, 82, 8, 198, 220, 220, 220, 256, 796, 5554, 576, 7, 51, 20344, 7, 44, 12, 16, 828, 352, 12, 17394, 8, 198, 220, 220, 220, 406, 796, 1195, 136, 224, 532, 256, 9, 38392, 198, 220, 220, 220, 471, 796, 1195, 136, 224, 1343, 256, 9, 38392, 198, 220, 220, 220, 1441, 7326, 1704, 9492, 2100, 7, 43, 11, 471, 11, 352, 12, 17394, 8, 198, 437, 198, 2, 36658, 2559, 28, 1303, 198 ]
2.182116
5,189
module LibSodiumClangWrap using Clang using Printf using libsodium_jll m = @eval module Anon end const LIBSODIUM_JLL_DIR = dirname(dirname(pathof(libsodium_jll))) m.include(joinpath(LIBSODIUM_JLL_DIR, "src", "libsodium_jll.jl")) const LIBSODIUM_DIR = dirname(dirname(m.libsodium_jll.libsodium_path)) const LIBSODIUM_INCLUDE = joinpath(LIBSODIUM_DIR, "include", "sodium") const HEADER_FNAMES = ["core.h", "export.h", "crypto_hash_sha512.h", "crypto_sign_ed25519.h"] const HEADER_PATHS = map(hn -> joinpath(LIBSODIUM_INCLUDE, hn) |> normpath, HEADER_FNAMES) const IGNORE_DEFINITIONS = ["crypto_sign_ed25519_MESSAGEBYTES_MAX", "crypto_sign_ed25519_open"] function cursor_wrapped(cursor_name, cursor) any(map(def -> startswith(cursor_name, def), IGNORE_DEFINITIONS)) ? false : true end const OUTPUT_DIR = abspath(@__DIR__, "out") wc = init(; headers = HEADER_PATHS, output_file = joinpath(OUTPUT_DIR, "api.jl"), common_file = joinpath(OUTPUT_DIR, "common.jl"), clang_includes = vcat(LIBSODIUM_INCLUDE, CLANG_INCLUDE), clang_args = ["-I", joinpath(LIBSODIUM_INCLUDE, "..")], header_wrapped = (root, current)->root == current, header_library = x->"libsodium", cursor_wrapped = cursor_wrapped, clang_diagnostics = true, ) run(wc) end
[ 21412, 7980, 50, 12664, 2601, 648, 54, 2416, 198, 3500, 1012, 648, 198, 3500, 12578, 69, 198, 198, 3500, 9195, 82, 12664, 62, 73, 297, 198, 198, 76, 796, 2488, 18206, 8265, 49347, 886, 198, 9979, 24653, 4462, 3727, 41796, 62, 41, 3069, 62, 34720, 796, 26672, 3672, 7, 15908, 3672, 7, 6978, 1659, 7, 8019, 82, 12664, 62, 73, 297, 22305, 198, 76, 13, 17256, 7, 22179, 6978, 7, 31271, 4462, 3727, 41796, 62, 41, 3069, 62, 34720, 11, 366, 10677, 1600, 366, 8019, 82, 12664, 62, 73, 297, 13, 20362, 48774, 198, 198, 9979, 24653, 4462, 3727, 41796, 62, 34720, 796, 26672, 3672, 7, 15908, 3672, 7, 76, 13, 8019, 82, 12664, 62, 73, 297, 13, 8019, 82, 12664, 62, 6978, 4008, 198, 9979, 24653, 4462, 3727, 41796, 62, 1268, 5097, 52, 7206, 796, 4654, 6978, 7, 31271, 4462, 3727, 41796, 62, 34720, 11, 366, 17256, 1600, 366, 82, 12664, 4943, 198, 198, 9979, 39837, 1137, 62, 43221, 29559, 796, 14631, 7295, 13, 71, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 39344, 13, 71, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 29609, 78, 62, 17831, 62, 26270, 25836, 13, 71, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 29609, 78, 62, 12683, 62, 276, 13381, 1129, 13, 71, 8973, 198, 9979, 39837, 1137, 62, 47, 1404, 7998, 796, 3975, 7, 21116, 4613, 4654, 6978, 7, 31271, 4462, 3727, 41796, 62, 1268, 5097, 52, 7206, 11, 289, 77, 8, 930, 29, 2593, 6978, 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, 39837, 1137, 62, 43221, 29559, 8, 198, 198, 9979, 28730, 6965, 62, 7206, 20032, 2043, 11053, 796, 14631, 29609, 78, 62, 12683, 62, 276, 13381, 1129, 62, 44, 1546, 4090, 8264, 17513, 51, 1546, 62, 22921, 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, 366, 29609, 78, 62, 12683, 62, 276, 13381, 1129, 62, 9654, 8973, 198, 8818, 23493, 62, 29988, 1496, 7, 66, 21471, 62, 3672, 11, 23493, 8, 198, 220, 220, 220, 597, 7, 8899, 7, 4299, 4613, 923, 2032, 342, 7, 66, 21471, 62, 3672, 11, 825, 828, 28730, 6965, 62, 7206, 20032, 2043, 11053, 4008, 5633, 3991, 1058, 2081, 198, 437, 198, 198, 9979, 16289, 30076, 62, 34720, 796, 2352, 6978, 7, 31, 834, 34720, 834, 11, 366, 448, 4943, 198, 198, 86, 66, 796, 2315, 7, 26, 24697, 796, 39837, 1137, 62, 47, 1404, 7998, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 7753, 796, 4654, 6978, 7, 2606, 7250, 3843, 62, 34720, 11, 366, 15042, 13, 20362, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2219, 62, 7753, 796, 4654, 6978, 7, 2606, 7250, 3843, 62, 34720, 11, 366, 11321, 13, 20362, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 537, 648, 62, 42813, 796, 410, 9246, 7, 31271, 4462, 3727, 41796, 62, 1268, 5097, 52, 7206, 11, 7852, 15567, 62, 1268, 5097, 52, 7206, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 537, 648, 62, 22046, 796, 14631, 12, 40, 1600, 4654, 6978, 7, 31271, 4462, 3727, 41796, 62, 1268, 5097, 52, 7206, 11, 366, 492, 4943, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13639, 62, 29988, 1496, 796, 357, 15763, 11, 1459, 8, 3784, 15763, 6624, 1459, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13639, 62, 32016, 796, 2124, 3784, 1, 8019, 82, 12664, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23493, 62, 29988, 1496, 796, 23493, 62, 29988, 1496, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 537, 648, 62, 47356, 34558, 796, 2081, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 198, 5143, 7, 86, 66, 8, 198, 198, 437, 198 ]
1.994573
737
<reponame>80386DX40/Lasso.jl<gh_stars>10-100 using Lasso using Random, SparseArrays DATADIR = joinpath(dirname(@__FILE__), "data") function diffmatslow(order, n) D = sparse(SparseArrays.spdiagm_internal(0 => fill(-1., n-1), 1=>fill(1., n-1))...) for i = 1:order D = sparse(SparseArrays.spdiagm_internal(0 => fill(-1., n-i-1), 1=>fill(1., n-i-1))...)*D end D end # Test that DifferenceMatrix behaves as expected @testset "DifferenceMatrix" begin @testset "order = $(order)" for order in (1, 2, 3) D1 = diffmatslow(order, 100) D2 = Lasso.TrendFiltering.DifferenceMatrix{Float64}(order, 100) x = randn(testrng, 100) @test D2'D2 == D1'D1 @test D2*x ≈ D1*x @test D2'*x[1:size(D1, 1)] ≈ D1'*x[1:size(D1, 1)] end end # Test against results from glmgen lakehuron = readcsvmat(joinpath(DATADIR, "LakeHuron.csv"); header=true)[:, 3] @testset "TrendFiltering" begin @testset "order = $(order)" for order in (1, 2, 3) @testset "lambda = $(lambda)" for lambda in (1., 10., 100.) @test coef(fit(TrendFilter, lakehuron, order, lambda; tol=1e-9)) ≈ vec(readcsvmat(joinpath(DATADIR, "LakeHuron_order_$(order)_lambda_$(lambda).csv"))) end end end
[ 27, 7856, 261, 480, 29, 1795, 21734, 36227, 1821, 14, 43, 28372, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 406, 28372, 198, 3500, 14534, 11, 1338, 17208, 3163, 20477, 198, 35, 1404, 2885, 4663, 796, 4654, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, 366, 7890, 4943, 198, 198, 8818, 814, 76, 1381, 9319, 7, 2875, 11, 299, 8, 198, 220, 220, 220, 360, 796, 29877, 7, 50, 29572, 3163, 20477, 13, 2777, 10989, 363, 76, 62, 32538, 7, 15, 5218, 6070, 32590, 16, 1539, 299, 12, 16, 828, 352, 14804, 20797, 7, 16, 1539, 299, 12, 16, 4008, 23029, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 2875, 198, 220, 220, 220, 220, 220, 220, 220, 360, 796, 29877, 7, 50, 29572, 3163, 20477, 13, 2777, 10989, 363, 76, 62, 32538, 7, 15, 5218, 6070, 32590, 16, 1539, 299, 12, 72, 12, 16, 828, 352, 14804, 20797, 7, 16, 1539, 299, 12, 72, 12, 16, 4008, 23029, 9, 35, 198, 220, 220, 220, 886, 198, 220, 220, 220, 360, 198, 437, 198, 198, 2, 6208, 326, 43795, 46912, 39341, 355, 2938, 198, 31, 9288, 2617, 366, 28813, 1945, 46912, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 2875, 796, 29568, 2875, 16725, 329, 1502, 287, 357, 16, 11, 362, 11, 513, 8, 198, 220, 220, 220, 220, 220, 220, 220, 360, 16, 796, 814, 76, 1381, 9319, 7, 2875, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 360, 17, 796, 406, 28372, 13, 45461, 11928, 20212, 13, 28813, 1945, 46912, 90, 43879, 2414, 92, 7, 2875, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 43720, 77, 7, 9288, 81, 782, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 360, 17, 6, 35, 17, 6624, 360, 16, 6, 35, 16, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 360, 17, 9, 87, 15139, 230, 360, 16, 9, 87, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 360, 17, 6, 9, 87, 58, 16, 25, 7857, 7, 35, 16, 11, 352, 15437, 15139, 230, 360, 16, 6, 9, 87, 58, 16, 25, 7857, 7, 35, 16, 11, 352, 15437, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 6208, 1028, 2482, 422, 1278, 76, 5235, 198, 27180, 71, 44372, 796, 1100, 40664, 6759, 7, 22179, 6978, 7, 35, 1404, 2885, 4663, 11, 366, 43035, 42633, 261, 13, 40664, 15341, 13639, 28, 7942, 38381, 45299, 513, 60, 198, 31, 9288, 2617, 366, 45461, 11928, 20212, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 2875, 796, 29568, 2875, 16725, 329, 1502, 287, 357, 16, 11, 362, 11, 513, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 50033, 796, 29568, 50033, 16725, 329, 37456, 287, 357, 16, 1539, 838, 1539, 1802, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 763, 891, 7, 11147, 7, 45461, 22417, 11, 13546, 71, 44372, 11, 1502, 11, 37456, 26, 284, 75, 28, 16, 68, 12, 24, 4008, 15139, 230, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43030, 7, 961, 40664, 6759, 7, 22179, 6978, 7, 35, 1404, 2885, 4663, 11, 366, 43035, 42633, 261, 62, 2875, 62, 3, 7, 2875, 8, 62, 50033, 62, 3, 7, 50033, 737, 40664, 1, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.134907
593
set_theory = [ Axiom("Definition of the universal set", P ⊂ Ω, TRUE), Axiom("Definition of the universal set", x ∈ Ω, TRUE), Axiom("Definition of the empty set", ∅ ⊂ A, TRUE), Axiom("Definition of the empty set", x ∈ ∅, FALSE), Axiom("Equal sets are subsets", A ⊂ A, TRUE), Axiom("Definition of Element Of", x ∈ (A ∩ B), (x ∈ A) ∧ (x ∈ B)), Axiom("Definition of Element Of", (x ∈ A) ∧ (x ∈ B), x ∈ (A ∩ B)), Axiom("Definition of Element Of", x ∈ (A ∪ B), (x ∈ A) ∨ (x ∈ B)), Axiom("Definition of Element Of", (x ∈ A) ∨ (x ∈ B), x ∈ (A ∪ B)), Axiom("Flatten Condition Set", ConditionSet(y, y ∈ A), A), # todo: change to f(x) Axiom("Expand Condition Set", A, ConditionSet(_y, _y ∈ A)), # todo: change to f(x) Axiom("Definition of Subset", A ⊂ B, (_y ∈ A) ⟹ (_y ∈ B)), Axiom("Definition of Subset", (_y ∈ A) ⟹ (_y ∈ B), A ⊂ B), Axiom("Definition of the universal set", x ∈ (P ∪ Ω), x ∈ Ω), #Theorem("Intersections are subsets of Unions", x ∈ (A ∩ B), x ∈ (A ∪ B), Proof([])), #Theorem("Intersections are subsets of Unions", (A ∩ B) ⊂ (A ∪ B), TRUE, Proof([])), ]
[ 2617, 62, 1169, 652, 796, 685, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 262, 10112, 900, 1600, 350, 2343, 232, 224, 7377, 102, 11, 26751, 828, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 262, 10112, 900, 1600, 2124, 18872, 230, 7377, 102, 11, 26751, 828, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 262, 6565, 900, 1600, 18872, 227, 2343, 232, 224, 317, 11, 26751, 828, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 262, 6565, 900, 1600, 2124, 18872, 230, 18872, 227, 11, 26563, 828, 198, 220, 220, 220, 12176, 29005, 7203, 36, 13255, 5621, 389, 6352, 1039, 1600, 317, 2343, 232, 224, 317, 11, 26751, 828, 628, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 11703, 3226, 1600, 2124, 18872, 230, 357, 32, 18872, 102, 347, 828, 357, 87, 18872, 230, 317, 8, 18872, 100, 357, 87, 18872, 230, 347, 36911, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 11703, 3226, 1600, 357, 87, 18872, 230, 317, 8, 18872, 100, 357, 87, 18872, 230, 347, 828, 2124, 18872, 230, 357, 32, 18872, 102, 347, 36911, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 11703, 3226, 1600, 2124, 18872, 230, 357, 32, 18872, 103, 347, 828, 357, 87, 18872, 230, 317, 8, 18872, 101, 357, 87, 18872, 230, 347, 36911, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 11703, 3226, 1600, 357, 87, 18872, 230, 317, 8, 18872, 101, 357, 87, 18872, 230, 347, 828, 2124, 18872, 230, 357, 32, 18872, 103, 347, 36911, 628, 220, 220, 220, 12176, 29005, 7203, 7414, 41769, 24295, 5345, 1600, 24295, 7248, 7, 88, 11, 331, 18872, 230, 317, 828, 317, 828, 220, 1303, 284, 4598, 25, 1487, 284, 277, 7, 87, 8, 198, 220, 220, 220, 12176, 29005, 7203, 16870, 392, 24295, 5345, 1600, 317, 11, 24295, 7248, 28264, 88, 11, 4808, 88, 18872, 230, 317, 36911, 220, 1303, 284, 4598, 25, 1487, 284, 277, 7, 87, 8, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 3834, 2617, 1600, 317, 2343, 232, 224, 347, 11, 44104, 88, 18872, 230, 317, 8, 2343, 253, 117, 44104, 88, 18872, 230, 347, 36911, 198, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 3834, 2617, 1600, 44104, 88, 18872, 230, 317, 8, 2343, 253, 117, 44104, 88, 18872, 230, 347, 828, 317, 2343, 232, 224, 347, 828, 628, 220, 220, 220, 12176, 29005, 7203, 36621, 286, 262, 10112, 900, 1600, 2124, 18872, 230, 357, 47, 18872, 103, 7377, 102, 828, 2124, 18872, 230, 7377, 102, 828, 628, 220, 220, 220, 1303, 464, 29625, 7203, 9492, 23946, 389, 6352, 1039, 286, 791, 507, 1600, 2124, 18872, 230, 357, 32, 18872, 102, 347, 828, 2124, 18872, 230, 357, 32, 18872, 103, 347, 828, 29999, 26933, 12962, 828, 198, 220, 220, 220, 1303, 464, 29625, 7203, 9492, 23946, 389, 6352, 1039, 286, 791, 507, 1600, 357, 32, 18872, 102, 347, 8, 2343, 232, 224, 357, 32, 18872, 103, 347, 828, 26751, 11, 29999, 26933, 12962, 828, 198, 60, 198 ]
2.26
500
<gh_stars>10-100 # --- # title: 951. Flip Equivalent Binary Trees # id: problem951 # author: <NAME> # date: 2020-10-31 # difficulty: Medium # categories: Tree # link: <https://leetcode.com/problems/flip-equivalent-binary-trees/description/> # hidden: true # --- # # For a binary tree **T** , we can define a **flip operation** as follows: # choose any node, and swap the left and right child subtrees. # # A binary tree **X** is _flip equivalent_ to a binary tree **Y** if and only # if we can make **X** equal to **Y** after some number of flip operations. # # Given the roots of two binary trees `root1` and `root2`, return `true` if the # two trees are flip equivelent or `false` otherwise. # # # # **Example 1:** # # ![Flipped Trees # Diagram](https://assets.leetcode.com/uploads/2018/11/29/tree_ex.png) # # # # Input: root1 = [1,2,3,4,5,6,null,null,null,7,8], root2 = [1,3,2,null,6,4,5,null,null,null,null,8,7] # Output: true # Explanation: We flipped at nodes with values 1, 3, and 5. # # # **Example 2:** # # # # Input: root1 = [], root2 = [] # Output: true # # # **Example 3:** # # # # Input: root1 = [], root2 = [1] # Output: false # # # **Example 4:** # # # # Input: root1 = [0,null,1], root2 = [] # Output: false # # # **Example 5:** # # # # Input: root1 = [0,null,1], root2 = [0,1] # Output: true # # # # # **Constraints:** # # * The number of nodes in each tree is in the range `[0, 100]`. # * Each tree will have **unique node values** in the range `[0, 99]`. # # ## @lc code=start using LeetCode ## add your code here: ## @lc code=end
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 11420, 198, 2, 3670, 25, 860, 4349, 13, 29583, 7889, 29540, 45755, 34925, 198, 2, 4686, 25, 1917, 50119, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940, 12, 3132, 198, 2, 8722, 25, 13398, 198, 2, 9376, 25, 12200, 198, 2, 2792, 25, 1279, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 2704, 541, 12, 4853, 29540, 12, 39491, 12, 83, 6037, 14, 11213, 15913, 198, 2, 7104, 25, 2081, 198, 2, 11420, 198, 2, 220, 198, 2, 1114, 257, 13934, 5509, 12429, 51, 1174, 837, 356, 460, 8160, 257, 12429, 2704, 541, 4905, 1174, 355, 5679, 25, 198, 2, 3853, 597, 10139, 11, 290, 16075, 262, 1364, 290, 826, 1200, 13284, 6037, 13, 198, 2, 220, 198, 2, 317, 13934, 5509, 12429, 55, 1174, 220, 318, 4808, 2704, 541, 7548, 62, 284, 257, 13934, 5509, 12429, 56, 1174, 611, 290, 691, 198, 2, 611, 356, 460, 787, 12429, 55, 1174, 4961, 284, 12429, 56, 1174, 706, 617, 1271, 286, 14283, 4560, 13, 198, 2, 220, 198, 2, 11259, 262, 11135, 286, 734, 13934, 7150, 4600, 15763, 16, 63, 290, 4600, 15763, 17, 47671, 1441, 4600, 7942, 63, 611, 262, 198, 2, 734, 7150, 389, 14283, 1602, 425, 75, 298, 393, 4600, 9562, 63, 4306, 13, 198, 2, 220, 198, 2, 220, 198, 2, 220, 198, 2, 12429, 16281, 352, 25, 1174, 198, 2, 220, 198, 2, 5145, 58, 7414, 3949, 34925, 198, 2, 6031, 6713, 16151, 5450, 1378, 19668, 13, 293, 316, 8189, 13, 785, 14, 39920, 14, 7908, 14, 1157, 14, 1959, 14, 21048, 62, 1069, 13, 11134, 8, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 23412, 25, 6808, 16, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 8423, 11, 8423, 11, 8423, 11, 22, 11, 23, 4357, 6808, 17, 796, 685, 16, 11, 18, 11, 17, 11, 8423, 11, 21, 11, 19, 11, 20, 11, 8423, 11, 8423, 11, 8423, 11, 8423, 11, 23, 11, 22, 60, 198, 2, 220, 220, 220, 220, 25235, 25, 2081, 198, 2, 220, 220, 220, 220, 50125, 341, 25, 775, 26157, 379, 13760, 351, 3815, 352, 11, 513, 11, 290, 642, 13, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 198, 2, 12429, 16281, 362, 25, 1174, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 23412, 25, 6808, 16, 796, 685, 4357, 6808, 17, 796, 17635, 198, 2, 220, 220, 220, 220, 25235, 25, 2081, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 198, 2, 12429, 16281, 513, 25, 1174, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 23412, 25, 6808, 16, 796, 685, 4357, 6808, 17, 796, 685, 16, 60, 198, 2, 220, 220, 220, 220, 25235, 25, 3991, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 198, 2, 12429, 16281, 604, 25, 1174, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 23412, 25, 6808, 16, 796, 685, 15, 11, 8423, 11, 16, 4357, 6808, 17, 796, 17635, 198, 2, 220, 220, 220, 220, 25235, 25, 3991, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 198, 2, 12429, 16281, 642, 25, 1174, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 23412, 25, 6808, 16, 796, 685, 15, 11, 8423, 11, 16, 4357, 6808, 17, 796, 685, 15, 11, 16, 60, 198, 2, 220, 220, 220, 220, 25235, 25, 2081, 198, 2, 220, 220, 220, 220, 220, 198, 2, 220, 198, 2, 220, 198, 2, 220, 198, 2, 12429, 3103, 2536, 6003, 25, 1174, 198, 2, 220, 198, 2, 220, 220, 1635, 383, 1271, 286, 13760, 287, 1123, 5509, 318, 287, 262, 2837, 4600, 58, 15, 11, 1802, 60, 44646, 198, 2, 220, 220, 1635, 5501, 5509, 481, 423, 12429, 34642, 10139, 3815, 1174, 287, 262, 2837, 4600, 58, 15, 11, 7388, 60, 44646, 198, 2, 220, 198, 2, 220, 198, 2235, 2488, 44601, 2438, 28, 9688, 198, 3500, 1004, 316, 10669, 198, 198, 2235, 751, 534, 2438, 994, 25, 198, 2235, 2488, 44601, 2438, 28, 437, 198 ]
2.244709
756
using IntroML using Documenter using Pluto const DOCS_PATH = @__DIR__ const SRC_PATH = joinpath(DOCS_PATH, "src") const NB_PATH = joinpath(dirname(DOCS_PATH), "notebooks") function build_notebook(nbpath, htmlpath) @info "Building notebook at $nbpath to HTML file at $htmlpath" s = Pluto.ServerSession() nb = Pluto.SessionActions.open(s, nbpath; run_async=false) write(htmlpath, Pluto.generate_html(nb)) return htmlpath end # build Pluto notebooks for fn in readdir(NB_PATH) nbpath = joinpath(NB_PATH, fn) htmlpath = joinpath(SRC_PATH, first(splitext(fn)) * ".html") build_notebook(nbpath, htmlpath) end DocMeta.setdocmeta!(IntroML, :DocTestSetup, :(using IntroML); recursive=true) makedocs(; modules=[IntroML], authors="<NAME> <<EMAIL>> and contributors", repo="https://github.com/mlcolab/IntroML.jl/blob/{commit}{path}#{line}", sitename="IntroML.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", canonical="https://mlcolab.github.io/IntroML.jl", assets=String[], ), pages=["Home" => "index.md"], ) deploydocs(; repo="github.com/mlcolab/IntroML.jl", devbranch="main", push_preview=true)
[ 3500, 37219, 5805, 198, 3500, 16854, 263, 198, 3500, 32217, 198, 198, 9979, 37760, 50, 62, 34219, 796, 2488, 834, 34720, 834, 198, 9979, 311, 7397, 62, 34219, 796, 4654, 6978, 7, 38715, 50, 62, 34219, 11, 366, 10677, 4943, 198, 9979, 41354, 62, 34219, 796, 4654, 6978, 7, 15908, 3672, 7, 38715, 50, 62, 34219, 828, 366, 11295, 12106, 4943, 198, 198, 8818, 1382, 62, 11295, 2070, 7, 46803, 6978, 11, 27711, 6978, 8, 198, 220, 220, 220, 2488, 10951, 366, 25954, 20922, 379, 720, 46803, 6978, 284, 11532, 2393, 379, 720, 6494, 6978, 1, 198, 220, 220, 220, 264, 796, 32217, 13, 10697, 36044, 3419, 198, 220, 220, 220, 299, 65, 796, 32217, 13, 36044, 32, 2733, 13, 9654, 7, 82, 11, 299, 65, 6978, 26, 1057, 62, 292, 13361, 28, 9562, 8, 198, 220, 220, 220, 3551, 7, 6494, 6978, 11, 32217, 13, 8612, 378, 62, 6494, 7, 46803, 4008, 198, 220, 220, 220, 1441, 27711, 6978, 198, 437, 198, 198, 2, 1382, 32217, 43935, 198, 1640, 24714, 287, 1100, 15908, 7, 32819, 62, 34219, 8, 198, 220, 220, 220, 299, 65, 6978, 796, 4654, 6978, 7, 32819, 62, 34219, 11, 24714, 8, 198, 220, 220, 220, 27711, 6978, 796, 4654, 6978, 7, 50, 7397, 62, 34219, 11, 717, 7, 22018, 578, 742, 7, 22184, 4008, 1635, 27071, 6494, 4943, 198, 220, 220, 220, 1382, 62, 11295, 2070, 7, 46803, 6978, 11, 27711, 6978, 8, 198, 437, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 5317, 305, 5805, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 37219, 5805, 1776, 45115, 28, 7942, 8, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 5317, 305, 5805, 4357, 198, 220, 220, 220, 7035, 2625, 27, 20608, 29, 9959, 27630, 4146, 4211, 290, 20420, 1600, 198, 220, 220, 220, 29924, 2625, 5450, 1378, 12567, 13, 785, 14, 4029, 4033, 397, 14, 5317, 305, 5805, 13, 20362, 14, 2436, 672, 14, 90, 41509, 18477, 6978, 92, 2, 90, 1370, 92, 1600, 198, 220, 220, 220, 1650, 12453, 2625, 5317, 305, 5805, 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, 4029, 4033, 397, 13, 12567, 13, 952, 14, 5317, 305, 5805, 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, 28, 14692, 16060, 1, 5218, 366, 9630, 13, 9132, 33116, 198, 8, 198, 198, 2934, 1420, 31628, 7, 26, 29924, 2625, 12567, 13, 785, 14, 4029, 4033, 397, 14, 5317, 305, 5805, 13, 20362, 1600, 1614, 1671, 3702, 2625, 12417, 1600, 4574, 62, 3866, 1177, 28, 7942, 8, 198 ]
2.470226
487
<gh_stars>1-10 #!/usr/bin/env julia using Plots, Random, Printf function initCondGen() #get random initial conditions for mass/radius, position, and velocity function getMass(nBodies) #generate random masses that better reflect actual stellar populations mList=zeros(nBodies) N=(0.5^(-1.3)-150^(-1.3))/1.3 #crude approximation of IMF integral assuming alpha = 2.3, stellar mass range of 0.5:150 solar masses rescale=1e6 max=floor(Int,N*rescale) for i=1:nBodies intTarget=rand(0:max,1)[1]/rescale m=(0.5^(-1.3)-intTarget*1.3)^(-1/1.3) #just algebra from above mList[i]=round(m,digits=2) end return mList end m=rand(1:1500,3)./10 #3 random masses between 0.1 and 150 solar masses, uniform distribution #m=getMass(3) #get mass from IMF -- this way is kind of boring...so not using it, but left here in case I change my mind? rad=m.^0.8 #3 radii based on masses in solar units m=m.*2e30 #convert to SI kg rad=rad.*7e8 #convert to SI m pos1=rand(-10:10,3) #random initial coordinates x & y for first body, AU function genPos2(pos1) accept2=false while accept2==false pos2=rand(-10:10,3) #random initial coordinates for second body, AU dist21=sqrt((pos1[1]-pos2[1])^2+(pos1[2]-pos2[2])^2+(pos1[3]-pos2[3])^2) if (dist21*1.5e11)>(rad[1]+rad[2]) #they aren't touching accept2=true return pos2 end end end pos2=genPos2(pos1) function genPos3(pos1,pos2) accept3=false while accept3==false pos3=rand(-10:10,3) #random initial coordinates for third body, AU dist31=sqrt((pos1[1]-pos3[1])^2+(pos1[2]-pos3[2])^2+(pos1[3]-pos3[3])^2) dist32=sqrt((pos2[1]-pos3[1])^2+(pos2[2]-pos3[2])^2+(pos2[3]-pos3[3])^2) if (dist31*1.5e11)>(rad[1]+rad[3]) && (dist32*1.5e11)>(rad[2]+rad[3]) #3rd isn't touching either accept3=true return pos3 end end end pos3=genPos3(pos1,pos2) pos=[pos1[1],pos1[2],pos1[3],pos2[1],pos2[2],pos2[3],pos3[1],pos3[2],pos3[3]].*1.5e11 #convert accepted positions to SI, m v=rand(-7e3:7e3,9) #random xyz velocities with mag between -10 & 10 km/s, totally arbitrary... #r=[x1,y1,x2,y2,x3,y3,v1x,v1y,v2x,v2y,v3x,v3y] r=[pos[1],pos[2],pos[3],pos[4],pos[5],pos[6],pos[7],pos[8],pos[9],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9]] open("initCond.txt","w") do f #save initial conditions to file in folder where script is run write(f,"m1=$(@sprintf("%.1f",(m[1]/2e30))) m2=$(@sprintf("%.1f",(m[2]/2e30))) m3=$(@sprintf("%.1f",(m[3]/2e30))) (solar masses)\nv1x=$(v[1]/1e3) v1y=$(v[2]/1e3) v1z=$(v[3]/1e3) v2x=$(v[4]/1e3) v2y=$(v[5]/1e3) v2z=$(v[6]/1e3) v3x=$(v[7]/1e3) v3y=$(v[8]/1e3) v3z=$(v[9]/1e3) (km/s)\nx1=$(pos1[1]) y1=$(pos1[2]) z1=$(pos1[3]) x2=$(pos2[1]) y2=$(pos2[2]) z2=$(pos2[3]) x3=$(pos3[1]) y3=$(pos3[2]) z3=$(pos3[3]) (AU from center)") end return r, rad, m end function dR(r,m) #function we will use RK4 on to approximate solution G=6.67408313131313e-11# Nm^2/kg^2 M1,M2,M3=m[1],m[2],m[3] #kg x1,x2,x3=r[1],r[4],r[7] #m y1,y2,y3=r[2],r[5],r[8] #m z1,z2,z3=r[3],r[6],r[9] c1,c2,c3=G*M1,G*M2,G*M3 #Nm^2/kg r1_2=sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2) #distance from 1->2, m r1_3=sqrt((x1-x3)^2+(y1-y3)^2+(z1-z3)^2) #distance from 1->3, m r2_3=sqrt((x2-x3)^2+(y2-y3)^2+(z2-z3)^2) #distance from 2->3, m v1X,v2X,v3X=r[10],r[13],r[16] #these are our change in position after dt (dr/dt*dt=dr) v1Y,v2Y,v3Y=r[11],r[14],r[17] #m after * dt v1Z,v2Z,v3Z=r[12],r[15],r[18] #get change in velocity from accelerations (d^2r/dt^2*dt=dv/dt*dt=dv) dx1=-(c2*(x1-x2)/(r1_2^3))-(c3*(x1-x3)/(r1_3^3)) #d^2x/dt^2 for 1, m/s after * dt dx2=-(c1*(x2-x1)/(r1_2^3))-(c3*(x2-x3)/(r2_3^3)) #d^2x/dt^2 for 2, m/s dx3=-(c1*(x3-x1)/(r1_3^3))-(c2*(x3-x2)/(r2_3^3)) #d^2x/dt^2 for 3, m/s dy1=-(c2*(y1-y2)/(r1_2^3))-(c3*(y1-y3)/(r1_3^3)) #d^2y/dt^2 for 1, m/s dy2=-(c1*(y2-y1)/(r1_2^3))-(c3*(y2-y3)/(r2_3^3)) #d^2y/dt^2 for 2, m/s dy3=-(c1*(y3-y1)/(r1_3^3))-(c2*(y3-y2)/(r2_3^3)) #d^2y/dt^2 for 3, m/s dz1=-(c2*(z1-z2)/(r1_2^3))-(c3*(z1-z3)/(r1_3^3)) #d^2y/dt^2 for 1, m/s dz2=-(c1*(z2-z1)/(r1_2^3))-(c3*(z2-z3)/(r2_3^3)) #d^2y/dt^2 for 2, m/s dz3=-(c1*(z3-z1)/(r1_3^3))-(c2*(z3-z2)/(r2_3^3)) #d^2y/dt^2 for 3, m/s return [v1X,v1Y,v1Z,v2X,v2Y,v2Z,v3X,v3Y,v3Z,dx1,dy1,dz1,dx2,dy2,dz2,dx3,dy3,dz3] end function gen3Body(stopCond=[10,100],numSteps=10000) #default stop conditions of 10 yrs and 100 AU sep tStop=stopCond[1]*365*24*3600 #convert to SI s sepStop=stopCond[2]*1.5e11 #convert to SI m stop=false currentT=0 t=range(0,stop=tStop,length=(numSteps+1)) #+1 because I don't want 0 to count stepSize=tStop/numSteps x1=zeros(length(t)) y1=zeros(length(t)) z1=zeros(length(t)) x2=zeros(length(t)) y2=zeros(length(t)) z2=zeros(length(t)) x3=zeros(length(t)) y3=zeros(length(t)) z3=zeros(length(t)) r,rad,m=initCondGen() min12=rad[1]+rad[2] min13=rad[1]+rad[3] min23=rad[2]+rad[3] i=1 stopT=maximum(t) #implement RK4 to model solutions to differential equations while stop==false if currentT==stopT || currentT>stopT #in case of rounding error or something stop=true elseif i>numSteps+1 #inf loop failsafe stop=true println("error: shouldn't have gotten here") else x1[i]=r[1] y1[i]=r[2] z1[i]=r[3] x2[i]=r[4] y2[i]=r[5] z2[i]=r[6] x3[i]=r[7] y3[i]=r[8] z3[i]=r[9] k1=stepSize*dR(r,m) k2=stepSize*dR(r.+0.5.*k1,m) k3=stepSize*dR(r.+0.5.*k2,m) k4=stepSize*dR(r.+k3,m) r+=(k1.+2.0*k2.+2.0.*k3.+k4)./6 #check separation after each dt step sep12=sqrt((x1[i]-x2[i])^2+(y1[i]-y2[i])^2+(z1[i]-z2[i])^2) sep13=sqrt((x1[i]-x3[i])^2+(y1[i]-y3[i])^2+(z1[i]-z3[i])^2) sep23=sqrt((x3[i]-x2[i])^2+(y3[i]-y2[i])^2+(z3[i]-z2[i])^2) if sep12<min12 || sep13<min13 || sep23<min23 || sep12>sepStop || sep13>sepStop || sep23>sepStop stop=true #stop if collision happens or body is ejected t=range(0,stop=currentT,length=i) #t should match pos vectors x1=x1[1:i] #don't want trailing zeros y1=y1[1:i] z1=z1[1:i] x2=x2[1:i] y2=y2[1:i] z2=z2[1:i] x3=x3[1:i] y3=y3[1:i] z3=z3[1:i] end i+=1 currentT+=stepSize #next step end end return [x1,y1,z1,x2,y2,z2,x3,y3,z3], t, m, rad end function getInteresting3Body(minTime=0) #in years, defaults to 0 #sometimes random conditions result in a really short animation where things #just crash into each other/fly away, so this function throws away those yearSec=365*24*3600 interesting=false i=1 while interesting==false plotData,t,m,rad=gen3Body([60,150],600000) if (maximum(t)/yearSec)>minTime #only return if simulation runs for longer than minTime println(maximum(t)/yearSec) #tell me how many years we are simulating open("cron_log.txt","a") do f #for cron logging, a flag = append write(f,"$(maximum(t)/yearSec)\n") end return plotData,t,m,rad interesting=true elseif i>5000 #computationally expensive so don't want to go forever interesting=true #render it anyways I guess because sometimes it's fun? println("did not find interesting solution in number of tries allotted, running anyways") println(maximum(t)/yearSec) #how many years simulation runs for open("cron_log.txt","a") do f #for cron logging write(f,"$(maximum(t)/yearSec)\n") end return plotData,t,m,rad end i+=1 end end function getLims(pos,padding) #determines plot limits at each frame, padding in units of pos x=[pos[1],pos[4],pos[7]] xMin=minimum(x) xMax=maximum(x) dx=xMax-xMin y=[pos[2],pos[5],pos[8]] yMin=minimum(y) yMax=maximum(y) dy=yMax-yMin z=[pos[3],pos[6],pos[9]] zMin=minimum(z) zMax=maximum(z) dz=zMax-zMin dList=[dx,dy,dz] if maximum(dList)==dx #use x for square xlims=[xMin-padding,xMax+padding] ylims=[yMin-padding,yMin+dx+padding] zlims=[zMin-padding,zMin+dx+padding] elseif maximum(dList)==dy #use y for square xlims=[xMin-padding,xMin+dy+padding] ylims=[yMin-padding,yMax+padding] zlims=[zMin-padding,zMin+dy+padding] else #use z for cube xlims=[xMin-padding,xMin+dz+padding] ylims=[yMin-padding,yMin+dz+padding] zlims=[zMin-padding,zMax+padding] end return xlims,ylims,zlims end function getColors(m,c) #places colors of objects according to mass/size #c=[:biggest,:medium,:smallest] (order of input colors) maxM=maximum(m) minM=minimum(m) colors=[:blue,:blue,:blue] #testing if m[1]==maxM colors[1]=c[1] if m[2]==minM colors[2]=c[3] colors[3]=c[2] else colors[3]=c[3] colors[2]=c[2] end elseif m[2]==maxM colors[2]=c[1] if m[1]==minM colors[1]=c[3] colors[3]=c[2] else colors[3]=c[3] colors[1]=c[2] end else colors[3]=c[1] if m[1]==minM colors[1]=c[3] colors[2]=c[2] else colors[2]=c[3] colors[1]=c[2] end end return colors end function makeCircleVals(r,center=[0,0,0]) #(x,y,z)=(rcos(theta)sin(phi),rsin(theta)sin(phi),rcos(phi)) xOffset=center[1] yOffset=center[2] zOffset=center[3] xVals=[] yVals=[] zVals=[] for i=0:pi/128:2*pi for j=0:pi/64:pi x=r*cos(i)*sin(j)+xOffset y=r*sin(i)*sin(j)+yOffset z=r*cos(j)+zOffset push!(xVals,x) push!(yVals,y) push!(zVals,z) end end return xVals,yVals,zVals end plotData,t,m,rad=getInteresting3Body(15) c=[:DodgerBlue,:Gold,:Tomato] #most massive to least massive, also roughly corresponds to temp colors=getColors(m,c) #adding fake stars numStars=2500 starsX=zeros(numStars) starsY=zeros(numStars) starsZ=zeros(numStars) for i=1:numStars num=rand(-200:200,3) #box size is 70 AU but we need some extra padding for movement starsX[i]=num[1] starsY[i]=num[2] starsZ[i]=num[3] end #this new way runs significantly faster (~2x improvement over @anim) #Downside is it spams folder with png images of every frame and must manually compile with ffmpeg #Comment out and use older way (after this below) if performance/specific formatting is not an issue plotLoadPath="/home/kirk/Documents/3Body/tmpPlots/" threeBodyAnim=Animation(plotLoadPath,String[]) for i=1:333:length(t) #this makes animation scale ~1 sec/year with other conditions GR.inline("png") #added to eneable cron/jobber compatibility, also this makes frames generate WAY faster? Prior to adding this when run from cron/jobber frames would stop generating at 408 for some reason. gr(legendfontcolor = plot_color(:white)) #legendfontcolor=:white plot arg broken right now (at least in this backend) print("$(@sprintf("%.2f",i/length(t)*100)) % complete\r") #output percent tracker pos=[plotData[1][i],plotData[2][i],plotData[3][i],plotData[4][i],plotData[5][i],plotData[6][i],plotData[7][i],plotData[8][i],plotData[9][i]] #current pos limx,limy,limz=getLims(pos./1.5e11,10) #convert to AU, 10 AU padding p=plot3d(plotData[1][1:33:i]./1.5e11,plotData[2][1:33:i]./1.5e11,plotData[3][1:33:i]./1.5e11,label="",linecolor=colors[1],linealpha=max.((1:33:i) .+ 10000 .- i,2500)/10000) #plot orbits up to i p=plot3d!(plotData[4][1:33:i]./1.5e11,plotData[5][1:33:i]./1.5e11,plotData[6][1:33:i]./1.5e11,label="",linecolor=colors[2],linealpha=max.((1:33:i) .+ 10000 .- i,2500)/10000) #linealpha argument causes lines to decay p=plot3d!(plotData[7][1:33:i]./1.5e11,plotData[8][1:33:i]./1.5e11,plotData[9][1:33:i]./1.5e11,label="",linecolor=colors[3],linealpha=max.((1:33:i) .+ 10000 .- i,2500)/10000) #example: alpha=max.((1:i) .+ 100 .- i,0) causes only last 100 to be visible p=scatter3d!(starsX,starsY,starsZ,markercolor=:white,markersize=:1,label="") #fake background stars star1=makeCircleVals(rad[1],[plotData[1][i],plotData[2][i],plotData[3][i]]) #generate spheres with appropriate sizes for each star star2=makeCircleVals(rad[2],[plotData[4][i],plotData[5][i],plotData[6][i]]) #at current positions star3=makeCircleVals(rad[3],[plotData[7][i],plotData[8][i],plotData[9][i]]) p=plot3d!(star1[1]./1.5e11,star1[2]./1.5e11,star1[3]./1.5e11,label="$(@sprintf("%.1f", m[1]./2e30))",color=colors[1],fill=true) #plot star circles with labels p=plot3d!(star2[1]./1.5e11,star2[2]./1.5e11,star2[3]./1.5e11,label="$(@sprintf("%.1f", m[2]./2e30))",color=colors[2],fill=true) p=plot3d!(star3[1]./1.5e11,star3[2]./1.5e11,star3[3]./1.5e11,label="$(@sprintf("%.1f", m[3]./2e30))",color=colors[3],fill=true) p=plot3d!(background_color=:black,background_color_legend=:transparent,foreground_color_legend=:transparent, background_color_outside=:white,aspect_ratio=:equal,legendtitlefontcolor=:white) #formatting for plot frame p=plot3d!(title="Random Three-Body Problem\nt: $(@sprintf("%0.2f",t[i]/365/24/3600)) years after start", legend=:best,xaxis=("x: AU",(limx[1],limx[2]),font(9,"Courier")),yaxis=("y: AU",(limy[1],limy[2]),font(9,"Courier")),zaxis=("z: AU",(limz[1],limz[2]),font(9,"Courier")), gridalpha=0.5,gridcolor=:white,titlefont=font(14,"Courier"),size=(720,721),legendfontsize=8,legendtitle="Mass (in solar masses)",legendtitlefontsize=8) #add in axes/title/legend with formatting frame(threeBodyAnim,p) #generate the frame closeall() #close plots end #threeBodyFile="3Body_fps30.mp4" #crf is compression value (17 or 18 "visually lossless"), pix_fmt is for twitter specific vid req, -b:v specifies target bitrate, -vcodec specifies codec (h264 in this case) -y says overwrite existing file #run( `ffmpeg -framerate 30 -i $plotLoadPath"%06d.png" -vcodec libx264 -pix_fmt yuv420p -profile:v high -b:v 2048K -y -vf "scale=720:720,setdar=1/1" $threeBodyFile` ) #-vf scale=720:72 -crf 25 #run( `ffmpeg -framerate 30 -i $plotLoadPath"%06d.png" -c:v libx264 -preset slow -coder 1 -movflags +faststart -g 15 -crf 18 -pix_fmt yuv420p -profile:v high -y -bf 2 -vf "scale=720:720,setdar=1/1" $threeBodyFile` ) #all this bullshit to hopefully satisfy twitter requirements #NOTE: moved ffmpeg commands to shell script #old (simpler) way of generating animation #uncomment and use this way if you just want a simple animation saved and don't #care about performance/specific formatting of video. # threeBodyAnim=@animate for i=1:length(t) # gr(legendfontcolor = plot_color(:white)) #plot arg broken right now in Julia # print("$(@sprintf("%.2f",i/length(t)*100)) % complete\r") #output percent tracker # pos=[plotData[1][i],plotData[2][i],plotData[3][i],plotData[4][i],plotData[5][i],plotData[6][i]] #current pos # limx,limy=getLims(pos./1.5e11,5) #convert to AU, 5 AU padding # plot(plotData[1][1:i]./1.5e11,plotData[2][1:i]./1.5e11,label="",linecolor=colors[1]) # plot!(plotData[3][1:i]./1.5e11,plotData[4][1:i]./1.5e11,label="",linecolor=colors[2]) # plot!(plotData[5][1:i]./1.5e11,plotData[6][1:i]./1.5e11,label="",linecolor=colors[3]) # scatter!(starsX,starsY,markercolor=:white,markersize=:1,label="") #fake background stars # star1=makeCircleVals(rad[1],[plotData[1][i],plotData[2][i]]) # star2=makeCircleVals(rad[2],[plotData[3][i],plotData[4][i]]) # star3=makeCircleVals(rad[3],[plotData[5][i],plotData[6][i]]) # plot!(star1[1]./1.5e11,star1[2]./1.5e11,label="$(@sprintf("%.1f", m[1]./2e30))",color=colors[1],fill=true) # plot!(star2[1]./1.5e11,star2[2]./1.5e11,label="$(@sprintf("%.1f", m[2]./2e30))",color=colors[2],fill=true) # plot!(star3[1]./1.5e11,star3[2]./1.5e11,label="$(@sprintf("%.1f", m[3]./2e30))",color=colors[3],fill=true) # plot!(background_color=:black,background_color_legend=:transparent,background_color_outside=:white,aspect_ratio=:equal,legendtitlefontcolor=:white) #legendfontcolor=:white # plot!(xlabel="x: AU",ylabel="y: AU",title="Random Three Body Problem\nt: $(@sprintf("%0.2f",t[i]/365/24/3600)) yrs after start", # legend=:best,xaxis=("x: AU",(limx[1],limx[2]),font(12,"Courier")),yaxis=("y: AU",(limy[1],limy[2]),font(12,"Courier")), # grid=false,titlefont=font(24,"Courier"),size=(720,720),legendfontsize=12,legendtitle="Mass (in solar masses)",legendtitlefontsize=14) # end every 25 #mp4(threeBodyAnim,"3Body_fps30.mp4",fps=30) #OR #gif(threeBodyAnim,"3Body_fps30.gif",fps=30)
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 3500, 1345, 1747, 11, 14534, 11, 12578, 69, 198, 198, 8818, 2315, 25559, 13746, 3419, 1303, 1136, 4738, 4238, 3403, 329, 2347, 14, 42172, 11, 2292, 11, 290, 15432, 198, 220, 220, 220, 2163, 651, 20273, 7, 77, 33, 5042, 8, 1303, 8612, 378, 4738, 14568, 326, 1365, 4079, 4036, 25041, 9684, 198, 220, 220, 220, 220, 220, 220, 220, 285, 8053, 28, 9107, 418, 7, 77, 33, 5042, 8, 198, 220, 220, 220, 220, 220, 220, 220, 399, 16193, 15, 13, 20, 61, 32590, 16, 13, 18, 13219, 8628, 61, 32590, 16, 13, 18, 4008, 14, 16, 13, 18, 1303, 6098, 2507, 40874, 286, 25375, 19287, 13148, 17130, 796, 362, 13, 18, 11, 25041, 2347, 2837, 286, 657, 13, 20, 25, 8628, 6591, 14568, 198, 220, 220, 220, 220, 220, 220, 220, 6811, 1000, 28, 16, 68, 21, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 28, 28300, 7, 5317, 11, 45, 9, 411, 38765, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 33, 5042, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 493, 21745, 28, 25192, 7, 15, 25, 9806, 11, 16, 38381, 16, 60, 14, 411, 38765, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 16193, 15, 13, 20, 61, 32590, 16, 13, 18, 13219, 600, 21745, 9, 16, 13, 18, 8, 61, 32590, 16, 14, 16, 13, 18, 8, 1303, 3137, 37139, 422, 2029, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 8053, 58, 72, 22241, 744, 7, 76, 11, 12894, 896, 28, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 285, 8053, 198, 220, 220, 220, 886, 198, 220, 220, 220, 285, 28, 25192, 7, 16, 25, 33698, 11, 18, 737, 14, 940, 1303, 18, 4738, 14568, 1022, 657, 13, 16, 290, 6640, 6591, 14568, 11, 8187, 6082, 198, 220, 220, 220, 1303, 76, 28, 1136, 20273, 7, 18, 8, 1303, 1136, 2347, 422, 25375, 1377, 428, 835, 318, 1611, 286, 14262, 986, 568, 407, 1262, 340, 11, 475, 1364, 994, 287, 1339, 314, 1487, 616, 2000, 30, 198, 220, 220, 220, 2511, 28, 76, 13, 61, 15, 13, 23, 1303, 18, 2511, 4178, 1912, 319, 14568, 287, 6591, 4991, 198, 220, 220, 220, 285, 28, 76, 15885, 17, 68, 1270, 1303, 1102, 1851, 284, 25861, 14211, 198, 220, 220, 220, 2511, 28, 6335, 15885, 22, 68, 23, 1303, 1102, 1851, 284, 25861, 285, 198, 220, 220, 220, 1426, 16, 28, 25192, 32590, 940, 25, 940, 11, 18, 8, 1303, 25120, 4238, 22715, 2124, 1222, 331, 329, 717, 1767, 11, 27548, 198, 220, 220, 220, 2163, 2429, 21604, 17, 7, 1930, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2453, 17, 28, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 981, 2453, 17, 855, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1426, 17, 28, 25192, 32590, 940, 25, 940, 11, 18, 8, 1303, 25120, 4238, 22715, 329, 1218, 1767, 11, 27548, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 2481, 28, 31166, 17034, 19510, 1930, 16, 58, 16, 45297, 1930, 17, 58, 16, 12962, 61, 17, 33747, 1930, 16, 58, 17, 45297, 1930, 17, 58, 17, 12962, 61, 17, 33747, 1930, 16, 58, 18, 45297, 1930, 17, 58, 18, 12962, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 17080, 2481, 9, 16, 13, 20, 68, 1157, 8, 33994, 6335, 58, 16, 48688, 6335, 58, 17, 12962, 1303, 9930, 3588, 470, 15241, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2453, 17, 28, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1426, 17, 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, 1426, 17, 28, 5235, 21604, 17, 7, 1930, 16, 8, 198, 220, 220, 220, 2163, 2429, 21604, 18, 7, 1930, 16, 11, 1930, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2453, 18, 28, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 981, 2453, 18, 855, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1426, 18, 28, 25192, 32590, 940, 25, 940, 11, 18, 8, 1303, 25120, 4238, 22715, 329, 2368, 1767, 11, 27548, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 3132, 28, 31166, 17034, 19510, 1930, 16, 58, 16, 45297, 1930, 18, 58, 16, 12962, 61, 17, 33747, 1930, 16, 58, 17, 45297, 1930, 18, 58, 17, 12962, 61, 17, 33747, 1930, 16, 58, 18, 45297, 1930, 18, 58, 18, 12962, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 2624, 28, 31166, 17034, 19510, 1930, 17, 58, 16, 45297, 1930, 18, 58, 16, 12962, 61, 17, 33747, 1930, 17, 58, 17, 45297, 1930, 18, 58, 17, 12962, 61, 17, 33747, 1930, 17, 58, 18, 45297, 1930, 18, 58, 18, 12962, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 17080, 3132, 9, 16, 13, 20, 68, 1157, 8, 33994, 6335, 58, 16, 48688, 6335, 58, 18, 12962, 11405, 357, 17080, 2624, 9, 16, 13, 20, 68, 1157, 8, 33994, 6335, 58, 17, 48688, 6335, 58, 18, 12962, 1303, 18, 4372, 2125, 470, 15241, 2035, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2453, 18, 28, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1426, 18, 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, 1426, 18, 28, 5235, 21604, 18, 7, 1930, 16, 11, 1930, 17, 8, 198, 220, 220, 220, 1426, 41888, 1930, 16, 58, 16, 4357, 1930, 16, 58, 17, 4357, 1930, 16, 58, 18, 4357, 1930, 17, 58, 16, 4357, 1930, 17, 58, 17, 4357, 1930, 17, 58, 18, 4357, 1930, 18, 58, 16, 4357, 1930, 18, 58, 17, 4357, 1930, 18, 58, 18, 60, 4083, 9, 16, 13, 20, 68, 1157, 1303, 1102, 1851, 6292, 6116, 284, 25861, 11, 285, 198, 220, 220, 220, 410, 28, 25192, 32590, 22, 68, 18, 25, 22, 68, 18, 11, 24, 8, 1303, 25120, 2124, 45579, 11555, 420, 871, 351, 2153, 1022, 532, 940, 1222, 838, 10571, 14, 82, 11, 6635, 14977, 986, 198, 220, 220, 220, 1303, 81, 41888, 87, 16, 11, 88, 16, 11, 87, 17, 11, 88, 17, 11, 87, 18, 11, 88, 18, 11, 85, 16, 87, 11, 85, 16, 88, 11, 85, 17, 87, 11, 85, 17, 88, 11, 85, 18, 87, 11, 85, 18, 88, 60, 198, 220, 220, 220, 374, 41888, 1930, 58, 16, 4357, 1930, 58, 17, 4357, 1930, 58, 18, 4357, 1930, 58, 19, 4357, 1930, 58, 20, 4357, 1930, 58, 21, 4357, 1930, 58, 22, 4357, 1930, 58, 23, 4357, 1930, 58, 24, 4357, 85, 58, 16, 4357, 85, 58, 17, 4357, 85, 58, 18, 4357, 85, 58, 19, 4357, 85, 58, 20, 4357, 85, 58, 21, 4357, 85, 58, 22, 4357, 85, 58, 23, 4357, 85, 58, 24, 11907, 198, 220, 220, 220, 1280, 7203, 15003, 25559, 13, 14116, 2430, 86, 4943, 466, 277, 1303, 21928, 4238, 3403, 284, 2393, 287, 9483, 810, 4226, 318, 1057, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 553, 76, 16, 43641, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 7, 76, 58, 16, 60, 14, 17, 68, 1270, 22305, 285, 17, 43641, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 7, 76, 58, 17, 60, 14, 17, 68, 1270, 22305, 285, 18, 43641, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 7, 76, 58, 18, 60, 14, 17, 68, 1270, 22305, 357, 82, 6192, 14568, 19415, 48005, 16, 87, 43641, 7, 85, 58, 16, 60, 14, 16, 68, 18, 8, 410, 16, 88, 43641, 7, 85, 58, 17, 60, 14, 16, 68, 18, 8, 410, 16, 89, 43641, 7, 85, 58, 18, 60, 14, 16, 68, 18, 8, 410, 17, 87, 43641, 7, 85, 58, 19, 60, 14, 16, 68, 18, 8, 410, 17, 88, 43641, 7, 85, 58, 20, 60, 14, 16, 68, 18, 8, 410, 17, 89, 43641, 7, 85, 58, 21, 60, 14, 16, 68, 18, 8, 410, 18, 87, 43641, 7, 85, 58, 22, 60, 14, 16, 68, 18, 8, 410, 18, 88, 43641, 7, 85, 58, 23, 60, 14, 16, 68, 18, 8, 410, 18, 89, 43641, 7, 85, 58, 24, 60, 14, 16, 68, 18, 8, 357, 13276, 14, 82, 19415, 77, 87, 16, 43641, 7, 1930, 16, 58, 16, 12962, 331, 16, 43641, 7, 1930, 16, 58, 17, 12962, 1976, 16, 43641, 7, 1930, 16, 58, 18, 12962, 2124, 17, 43641, 7, 1930, 17, 58, 16, 12962, 331, 17, 43641, 7, 1930, 17, 58, 17, 12962, 1976, 17, 43641, 7, 1930, 17, 58, 18, 12962, 2124, 18, 43641, 7, 1930, 18, 58, 16, 12962, 331, 18, 43641, 7, 1930, 18, 58, 17, 12962, 1976, 18, 43641, 7, 1930, 18, 58, 18, 12962, 357, 26830, 422, 3641, 8, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 374, 11, 2511, 11, 285, 198, 437, 198, 198, 8818, 288, 49, 7, 81, 11, 76, 8, 1303, 8818, 356, 481, 779, 371, 42, 19, 319, 284, 27665, 4610, 198, 220, 220, 220, 402, 28, 21, 13, 3134, 1821, 5999, 1485, 1485, 1485, 1485, 68, 12, 1157, 2, 399, 76, 61, 17, 14, 10025, 61, 17, 198, 220, 220, 220, 337, 16, 11, 44, 17, 11, 44, 18, 28, 76, 58, 16, 4357, 76, 58, 17, 4357, 76, 58, 18, 60, 1303, 10025, 198, 220, 220, 220, 2124, 16, 11, 87, 17, 11, 87, 18, 28, 81, 58, 16, 4357, 81, 58, 19, 4357, 81, 58, 22, 60, 1303, 76, 198, 220, 220, 220, 331, 16, 11, 88, 17, 11, 88, 18, 28, 81, 58, 17, 4357, 81, 58, 20, 4357, 81, 58, 23, 60, 1303, 76, 198, 220, 220, 220, 1976, 16, 11, 89, 17, 11, 89, 18, 28, 81, 58, 18, 4357, 81, 58, 21, 4357, 81, 58, 24, 60, 198, 220, 220, 220, 269, 16, 11, 66, 17, 11, 66, 18, 28, 38, 9, 44, 16, 11, 38, 9, 44, 17, 11, 38, 9, 44, 18, 1303, 45, 76, 61, 17, 14, 10025, 198, 220, 220, 220, 374, 16, 62, 17, 28, 31166, 17034, 19510, 87, 16, 12, 87, 17, 8, 61, 17, 33747, 88, 16, 12, 88, 17, 8, 61, 17, 33747, 89, 16, 12, 89, 17, 8, 61, 17, 8, 1303, 30246, 422, 352, 3784, 17, 11, 285, 198, 220, 220, 220, 374, 16, 62, 18, 28, 31166, 17034, 19510, 87, 16, 12, 87, 18, 8, 61, 17, 33747, 88, 16, 12, 88, 18, 8, 61, 17, 33747, 89, 16, 12, 89, 18, 8, 61, 17, 8, 1303, 30246, 422, 352, 3784, 18, 11, 285, 198, 220, 220, 220, 374, 17, 62, 18, 28, 31166, 17034, 19510, 87, 17, 12, 87, 18, 8, 61, 17, 33747, 88, 17, 12, 88, 18, 8, 61, 17, 33747, 89, 17, 12, 89, 18, 8, 61, 17, 8, 1303, 30246, 422, 362, 3784, 18, 11, 285, 628, 220, 220, 220, 410, 16, 55, 11, 85, 17, 55, 11, 85, 18, 55, 28, 81, 58, 940, 4357, 81, 58, 1485, 4357, 81, 58, 1433, 60, 1303, 27218, 389, 674, 1487, 287, 2292, 706, 288, 83, 357, 7109, 14, 28664, 9, 28664, 28, 7109, 8, 198, 220, 220, 220, 410, 16, 56, 11, 85, 17, 56, 11, 85, 18, 56, 28, 81, 58, 1157, 4357, 81, 58, 1415, 4357, 81, 58, 1558, 60, 1303, 76, 706, 1635, 288, 83, 198, 220, 220, 220, 410, 16, 57, 11, 85, 17, 57, 11, 85, 18, 57, 28, 81, 58, 1065, 4357, 81, 58, 1314, 4357, 81, 58, 1507, 60, 628, 220, 220, 220, 1303, 1136, 1487, 287, 15432, 422, 8320, 602, 357, 67, 61, 17, 81, 14, 28664, 61, 17, 9, 28664, 28, 67, 85, 14, 28664, 9, 28664, 28, 67, 85, 8, 198, 220, 220, 220, 44332, 16, 10779, 7, 66, 17, 9, 7, 87, 16, 12, 87, 17, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 87, 16, 12, 87, 18, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 87, 14, 28664, 61, 17, 329, 352, 11, 285, 14, 82, 706, 1635, 288, 83, 198, 220, 220, 220, 44332, 17, 10779, 7, 66, 16, 9, 7, 87, 17, 12, 87, 16, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 87, 17, 12, 87, 18, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 87, 14, 28664, 61, 17, 329, 362, 11, 285, 14, 82, 198, 220, 220, 220, 44332, 18, 10779, 7, 66, 16, 9, 7, 87, 18, 12, 87, 16, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 30420, 66, 17, 9, 7, 87, 18, 12, 87, 17, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 87, 14, 28664, 61, 17, 329, 513, 11, 285, 14, 82, 198, 220, 220, 220, 20268, 16, 10779, 7, 66, 17, 9, 7, 88, 16, 12, 88, 17, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 88, 16, 12, 88, 18, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 352, 11, 285, 14, 82, 198, 220, 220, 220, 20268, 17, 10779, 7, 66, 16, 9, 7, 88, 17, 12, 88, 16, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 88, 17, 12, 88, 18, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 362, 11, 285, 14, 82, 198, 220, 220, 220, 20268, 18, 10779, 7, 66, 16, 9, 7, 88, 18, 12, 88, 16, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 30420, 66, 17, 9, 7, 88, 18, 12, 88, 17, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 513, 11, 285, 14, 82, 198, 220, 220, 220, 288, 89, 16, 10779, 7, 66, 17, 9, 7, 89, 16, 12, 89, 17, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 89, 16, 12, 89, 18, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 352, 11, 285, 14, 82, 198, 220, 220, 220, 288, 89, 17, 10779, 7, 66, 16, 9, 7, 89, 17, 12, 89, 16, 20679, 7, 81, 16, 62, 17, 61, 18, 4008, 30420, 66, 18, 9, 7, 89, 17, 12, 89, 18, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 362, 11, 285, 14, 82, 198, 220, 220, 220, 288, 89, 18, 10779, 7, 66, 16, 9, 7, 89, 18, 12, 89, 16, 20679, 7, 81, 16, 62, 18, 61, 18, 4008, 30420, 66, 17, 9, 7, 89, 18, 12, 89, 17, 20679, 7, 81, 17, 62, 18, 61, 18, 4008, 1303, 67, 61, 17, 88, 14, 28664, 61, 17, 329, 513, 11, 285, 14, 82, 628, 220, 220, 220, 1441, 685, 85, 16, 55, 11, 85, 16, 56, 11, 85, 16, 57, 11, 85, 17, 55, 11, 85, 17, 56, 11, 85, 17, 57, 11, 85, 18, 55, 11, 85, 18, 56, 11, 85, 18, 57, 11, 34350, 16, 11, 9892, 16, 11, 67, 89, 16, 11, 34350, 17, 11, 9892, 17, 11, 67, 89, 17, 11, 34350, 18, 11, 9892, 18, 11, 67, 89, 18, 60, 198, 437, 198, 198, 8818, 2429, 18, 25842, 7, 11338, 25559, 41888, 940, 11, 3064, 4357, 22510, 8600, 82, 28, 49388, 8, 1303, 12286, 2245, 3403, 286, 838, 331, 3808, 290, 1802, 27548, 41767, 198, 220, 220, 220, 256, 19485, 28, 11338, 25559, 58, 16, 60, 9, 24760, 9, 1731, 9, 2623, 405, 1303, 1102, 1851, 284, 25861, 264, 198, 220, 220, 220, 41767, 19485, 28, 11338, 25559, 58, 17, 60, 9, 16, 13, 20, 68, 1157, 1303, 1102, 1851, 284, 25861, 285, 198, 220, 220, 220, 2245, 28, 9562, 198, 220, 220, 220, 1459, 51, 28, 15, 198, 220, 220, 220, 256, 28, 9521, 7, 15, 11, 11338, 28, 83, 19485, 11, 13664, 16193, 22510, 8600, 82, 10, 16, 4008, 1303, 10, 16, 780, 314, 836, 470, 765, 657, 284, 954, 198, 220, 220, 220, 2239, 10699, 28, 83, 19485, 14, 22510, 8600, 82, 198, 220, 220, 220, 2124, 16, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 331, 16, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 1976, 16, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 2124, 17, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 331, 17, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 1976, 17, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 2124, 18, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 331, 18, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 1976, 18, 28, 9107, 418, 7, 13664, 7, 83, 4008, 198, 220, 220, 220, 374, 11, 6335, 11, 76, 28, 15003, 25559, 13746, 3419, 198, 220, 220, 220, 949, 1065, 28, 6335, 58, 16, 48688, 6335, 58, 17, 60, 198, 220, 220, 220, 949, 1485, 28, 6335, 58, 16, 48688, 6335, 58, 18, 60, 198, 220, 220, 220, 949, 1954, 28, 6335, 58, 17, 48688, 6335, 58, 18, 60, 198, 220, 220, 220, 1312, 28, 16, 198, 220, 220, 220, 2245, 51, 28, 47033, 7, 83, 8, 628, 220, 220, 220, 1303, 320, 26908, 371, 42, 19, 284, 2746, 8136, 284, 22577, 27490, 198, 220, 220, 220, 981, 2245, 855, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1459, 51, 855, 11338, 51, 8614, 1459, 51, 29, 11338, 51, 1303, 259, 1339, 286, 38185, 4049, 393, 1223, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2245, 28, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 1312, 29, 22510, 8600, 82, 10, 16, 1303, 10745, 9052, 10143, 8635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2245, 28, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 18224, 25, 6584, 470, 423, 7891, 994, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 58, 72, 22241, 81, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 16, 58, 72, 22241, 81, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 16, 58, 72, 22241, 81, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 17, 58, 72, 22241, 81, 58, 19, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 17, 58, 72, 22241, 81, 58, 20, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 17, 58, 72, 22241, 81, 58, 21, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 18, 58, 72, 22241, 81, 58, 22, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 18, 58, 72, 22241, 81, 58, 23, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 18, 58, 72, 22241, 81, 58, 24, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 16, 28, 9662, 10699, 9, 67, 49, 7, 81, 11, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 17, 28, 9662, 10699, 9, 67, 49, 7, 81, 13, 10, 15, 13, 20, 15885, 74, 16, 11, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 18, 28, 9662, 10699, 9, 67, 49, 7, 81, 13, 10, 15, 13, 20, 15885, 74, 17, 11, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 19, 28, 9662, 10699, 9, 67, 49, 7, 81, 13, 10, 74, 18, 11, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 10, 16193, 74, 16, 13, 10, 17, 13, 15, 9, 74, 17, 13, 10, 17, 13, 15, 15885, 74, 18, 13, 10, 74, 19, 737, 14, 21, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9122, 14139, 706, 1123, 288, 83, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41767, 1065, 28, 31166, 17034, 19510, 87, 16, 58, 72, 45297, 87, 17, 58, 72, 12962, 61, 17, 33747, 88, 16, 58, 72, 45297, 88, 17, 58, 72, 12962, 61, 17, 33747, 89, 16, 58, 72, 45297, 89, 17, 58, 72, 12962, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41767, 1485, 28, 31166, 17034, 19510, 87, 16, 58, 72, 45297, 87, 18, 58, 72, 12962, 61, 17, 33747, 88, 16, 58, 72, 45297, 88, 18, 58, 72, 12962, 61, 17, 33747, 89, 16, 58, 72, 45297, 89, 18, 58, 72, 12962, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41767, 1954, 28, 31166, 17034, 19510, 87, 18, 58, 72, 45297, 87, 17, 58, 72, 12962, 61, 17, 33747, 88, 18, 58, 72, 45297, 88, 17, 58, 72, 12962, 61, 17, 33747, 89, 18, 58, 72, 45297, 89, 17, 58, 72, 12962, 61, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 41767, 1065, 27, 1084, 1065, 8614, 41767, 1485, 27, 1084, 1485, 8614, 41767, 1954, 27, 1084, 1954, 8614, 41767, 1065, 29, 325, 79, 19485, 8614, 41767, 1485, 29, 325, 79, 19485, 8614, 41767, 1954, 29, 325, 79, 19485, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2245, 28, 7942, 1303, 11338, 611, 17661, 4325, 393, 1767, 318, 38632, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 28, 9521, 7, 15, 11, 11338, 28, 14421, 51, 11, 13664, 28, 72, 8, 1303, 83, 815, 2872, 1426, 30104, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 28, 87, 16, 58, 16, 25, 72, 60, 1303, 9099, 470, 765, 25462, 1976, 27498, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 16, 28, 88, 16, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 16, 28, 89, 16, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 17, 28, 87, 17, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 17, 28, 88, 17, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 17, 28, 89, 17, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 18, 28, 87, 18, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 18, 28, 88, 18, 58, 16, 25, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 18, 28, 89, 18, 58, 16, 25, 72, 60, 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, 1312, 47932, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1459, 51, 47932, 9662, 10699, 1303, 19545, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 685, 87, 16, 11, 88, 16, 11, 89, 16, 11, 87, 17, 11, 88, 17, 11, 89, 17, 11, 87, 18, 11, 88, 18, 11, 89, 18, 4357, 256, 11, 285, 11, 2511, 198, 437, 198, 198, 8818, 651, 19302, 278, 18, 25842, 7, 1084, 7575, 28, 15, 8, 1303, 259, 812, 11, 26235, 284, 657, 198, 220, 220, 220, 1303, 29810, 4738, 3403, 1255, 287, 257, 1107, 1790, 11034, 810, 1243, 198, 220, 220, 220, 1303, 3137, 7014, 656, 1123, 584, 14, 12254, 1497, 11, 523, 428, 2163, 12542, 1497, 883, 198, 220, 220, 220, 614, 6558, 28, 24760, 9, 1731, 9, 2623, 405, 198, 220, 220, 220, 3499, 28, 9562, 198, 220, 220, 220, 1312, 28, 16, 198, 220, 220, 220, 981, 3499, 855, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 7110, 6601, 11, 83, 11, 76, 11, 6335, 28, 5235, 18, 25842, 26933, 1899, 11, 8628, 4357, 8054, 830, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 47033, 7, 83, 20679, 1941, 6558, 8, 29, 1084, 7575, 1303, 8807, 1441, 611, 18640, 4539, 329, 2392, 621, 949, 7575, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 47033, 7, 83, 20679, 1941, 6558, 8, 1303, 33331, 502, 703, 867, 812, 356, 389, 985, 8306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 7203, 66, 1313, 62, 6404, 13, 14116, 2430, 64, 4943, 466, 277, 1303, 1640, 1067, 261, 18931, 11, 257, 6056, 796, 24443, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 553, 3, 7, 47033, 7, 83, 20679, 1941, 6558, 19415, 77, 4943, 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, 7110, 6601, 11, 83, 11, 76, 11, 6335, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3499, 28, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 1312, 29, 27641, 1303, 785, 1996, 15208, 5789, 523, 836, 470, 765, 284, 467, 8097, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3499, 28, 7942, 1303, 13287, 340, 32845, 314, 4724, 780, 3360, 340, 338, 1257, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 20839, 407, 1064, 3499, 4610, 287, 1271, 286, 8404, 44554, 11, 2491, 32845, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 47033, 7, 83, 20679, 1941, 6558, 8, 1303, 4919, 867, 812, 18640, 4539, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 7203, 66, 1313, 62, 6404, 13, 14116, 2430, 64, 4943, 466, 277, 1303, 1640, 1067, 261, 18931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 553, 3, 7, 47033, 7, 83, 20679, 1941, 6558, 19415, 77, 4943, 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, 7110, 6601, 11, 83, 11, 76, 11, 6335, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 47932, 16, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 651, 43, 12078, 7, 1930, 11, 39231, 8, 1303, 67, 13221, 274, 7110, 7095, 379, 1123, 5739, 11, 24511, 287, 4991, 286, 1426, 198, 220, 220, 220, 2124, 41888, 1930, 58, 16, 4357, 1930, 58, 19, 4357, 1930, 58, 22, 11907, 198, 220, 220, 220, 2124, 9452, 28, 39504, 7, 87, 8, 198, 220, 220, 220, 2124, 11518, 28, 47033, 7, 87, 8, 198, 220, 220, 220, 44332, 28, 87, 11518, 12, 87, 9452, 198, 220, 220, 220, 331, 41888, 1930, 58, 17, 4357, 1930, 58, 20, 4357, 1930, 58, 23, 11907, 198, 220, 220, 220, 331, 9452, 28, 39504, 7, 88, 8, 198, 220, 220, 220, 331, 11518, 28, 47033, 7, 88, 8, 198, 220, 220, 220, 20268, 28, 88, 11518, 12, 88, 9452, 198, 220, 220, 220, 1976, 41888, 1930, 58, 18, 4357, 1930, 58, 21, 4357, 1930, 58, 24, 11907, 198, 220, 220, 220, 1976, 9452, 28, 39504, 7, 89, 8, 198, 220, 220, 220, 1976, 11518, 28, 47033, 7, 89, 8, 198, 220, 220, 220, 288, 89, 28, 89, 11518, 12, 89, 9452, 198, 220, 220, 220, 288, 8053, 41888, 34350, 11, 9892, 11, 67, 89, 60, 198, 220, 220, 220, 611, 5415, 7, 67, 8053, 8, 855, 34350, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1904, 2124, 329, 6616, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 2475, 82, 41888, 87, 9452, 12, 39231, 11, 87, 11518, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 331, 2475, 82, 41888, 88, 9452, 12, 39231, 11, 88, 9452, 10, 34350, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 2475, 82, 41888, 89, 9452, 12, 39231, 11, 89, 9452, 10, 34350, 10, 39231, 60, 198, 220, 220, 220, 2073, 361, 5415, 7, 67, 8053, 8, 855, 9892, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1904, 331, 329, 6616, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 2475, 82, 41888, 87, 9452, 12, 39231, 11, 87, 9452, 10, 9892, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 331, 2475, 82, 41888, 88, 9452, 12, 39231, 11, 88, 11518, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 2475, 82, 41888, 89, 9452, 12, 39231, 11, 89, 9452, 10, 9892, 10, 39231, 60, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1904, 1976, 329, 23441, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 2475, 82, 41888, 87, 9452, 12, 39231, 11, 87, 9452, 10, 67, 89, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 331, 2475, 82, 41888, 88, 9452, 12, 39231, 11, 88, 9452, 10, 67, 89, 10, 39231, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 2475, 82, 41888, 89, 9452, 12, 39231, 11, 89, 11518, 10, 39231, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2124, 2475, 82, 11, 88, 2475, 82, 11, 89, 2475, 82, 198, 437, 198, 198, 8818, 651, 5216, 669, 7, 76, 11, 66, 8, 1303, 23625, 7577, 286, 5563, 1864, 284, 2347, 14, 7857, 198, 220, 220, 220, 1303, 66, 41888, 25, 14261, 3495, 11, 25, 24132, 11, 25, 17470, 395, 60, 357, 2875, 286, 5128, 7577, 8, 198, 220, 220, 220, 3509, 44, 28, 47033, 7, 76, 8, 198, 220, 220, 220, 949, 44, 28, 39504, 7, 76, 8, 198, 220, 220, 220, 7577, 41888, 25, 17585, 11, 25, 17585, 11, 25, 17585, 60, 1303, 33407, 198, 220, 220, 220, 611, 285, 58, 16, 60, 855, 9806, 44, 198, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 16, 22241, 66, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 285, 58, 17, 60, 855, 1084, 44, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 17, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 18, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 18, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 17, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 361, 285, 58, 17, 60, 855, 9806, 44, 198, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 17, 22241, 66, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 285, 58, 16, 60, 855, 1084, 44, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 16, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 18, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 18, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 16, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 18, 22241, 66, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 285, 58, 16, 60, 855, 1084, 44, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 16, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 17, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 17, 22241, 66, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7577, 58, 16, 22241, 66, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 7577, 198, 437, 198, 198, 8818, 787, 31560, 293, 53, 874, 7, 81, 11, 16159, 41888, 15, 11, 15, 11, 15, 12962, 198, 220, 220, 220, 1303, 7, 87, 11, 88, 11, 89, 35793, 6015, 418, 7, 1169, 8326, 8, 31369, 7, 34846, 828, 3808, 259, 7, 1169, 8326, 8, 31369, 7, 34846, 828, 6015, 418, 7, 34846, 4008, 198, 220, 220, 220, 2124, 34519, 28, 16159, 58, 16, 60, 198, 220, 220, 220, 331, 34519, 28, 16159, 58, 17, 60, 198, 220, 220, 220, 1976, 34519, 28, 16159, 58, 18, 60, 198, 220, 220, 220, 2124, 53, 874, 28, 21737, 198, 220, 220, 220, 331, 53, 874, 28, 21737, 198, 220, 220, 220, 1976, 53, 874, 28, 21737, 198, 220, 220, 220, 329, 1312, 28, 15, 25, 14415, 14, 12762, 25, 17, 9, 14415, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 15, 25, 14415, 14, 2414, 25, 14415, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 81, 9, 6966, 7, 72, 27493, 31369, 7, 73, 47762, 87, 34519, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 28, 81, 9, 31369, 7, 72, 27493, 31369, 7, 73, 47762, 88, 34519, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 28, 81, 9, 6966, 7, 73, 47762, 89, 34519, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 87, 53, 874, 11, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 88, 53, 874, 11, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 89, 53, 874, 11, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2124, 53, 874, 11, 88, 53, 874, 11, 89, 53, 874, 198, 437, 198, 198, 29487, 6601, 11, 83, 11, 76, 11, 6335, 28, 1136, 19302, 278, 18, 25842, 7, 1314, 8, 198, 66, 41888, 25, 35, 375, 1362, 14573, 11, 25, 13306, 11, 25, 13787, 5549, 60, 1303, 1712, 4858, 284, 1551, 4858, 11, 635, 7323, 24866, 284, 20218, 198, 4033, 669, 28, 1136, 5216, 669, 7, 76, 11, 66, 8, 198, 2, 26872, 8390, 5788, 198, 22510, 29366, 28, 44688, 198, 30783, 55, 28, 9107, 418, 7, 22510, 29366, 8, 198, 30783, 56, 28, 9107, 418, 7, 22510, 29366, 8, 198, 30783, 57, 28, 9107, 418, 7, 22510, 29366, 8, 198, 1640, 1312, 28, 16, 25, 22510, 29366, 198, 220, 220, 220, 997, 28, 25192, 32590, 2167, 25, 2167, 11, 18, 8, 1303, 3524, 2546, 318, 4317, 27548, 475, 356, 761, 617, 3131, 24511, 329, 3356, 198, 220, 220, 220, 5788, 55, 58, 72, 22241, 22510, 58, 16, 60, 198, 220, 220, 220, 5788, 56, 58, 72, 22241, 22510, 58, 17, 60, 198, 220, 220, 220, 5788, 57, 58, 72, 22241, 22510, 58, 18, 60, 198, 437, 198, 198, 2, 5661, 649, 835, 4539, 5566, 5443, 31034, 17, 87, 9025, 625, 2488, 11227, 8, 198, 2, 8048, 1589, 318, 340, 599, 4105, 9483, 351, 279, 782, 4263, 286, 790, 5739, 290, 1276, 14500, 17632, 351, 31246, 43913, 198, 2, 21357, 503, 290, 779, 4697, 835, 357, 8499, 428, 2174, 8, 611, 2854, 14, 11423, 33313, 318, 407, 281, 2071, 198, 198, 29487, 8912, 15235, 35922, 11195, 14, 74, 14232, 14, 38354, 14, 18, 25842, 14, 22065, 3646, 1747, 30487, 198, 15542, 25842, 35320, 28, 39520, 7, 29487, 8912, 15235, 11, 10100, 58, 12962, 198, 1640, 1312, 28, 16, 25, 20370, 25, 13664, 7, 83, 8, 1303, 5661, 1838, 11034, 5046, 5299, 16, 792, 14, 1941, 351, 584, 3403, 198, 220, 220, 220, 10863, 13, 45145, 7203, 11134, 4943, 1303, 29373, 284, 551, 68, 540, 1067, 261, 14, 21858, 527, 17764, 11, 635, 428, 1838, 13431, 7716, 34882, 5443, 30, 14481, 284, 4375, 428, 618, 1057, 422, 1067, 261, 14, 21858, 527, 13431, 561, 2245, 15453, 379, 41247, 329, 617, 1738, 13, 198, 220, 220, 220, 1036, 7, 1455, 437, 10331, 8043, 796, 7110, 62, 8043, 7, 25, 11186, 4008, 1303, 1455, 437, 10331, 8043, 28, 25, 11186, 7110, 1822, 5445, 826, 783, 357, 265, 1551, 287, 428, 30203, 8, 198, 220, 220, 220, 3601, 7203, 3, 7, 31, 82, 37435, 7203, 7225, 17, 69, 1600, 72, 14, 13664, 7, 83, 27493, 3064, 4008, 4064, 1844, 59, 81, 4943, 1303, 22915, 1411, 30013, 198, 220, 220, 220, 1426, 41888, 29487, 6601, 58, 16, 7131, 72, 4357, 29487, 6601, 58, 17, 7131, 72, 4357, 29487, 6601, 58, 18, 7131, 72, 4357, 29487, 6601, 58, 19, 7131, 72, 4357, 29487, 6601, 58, 20, 7131, 72, 4357, 29487, 6601, 58, 21, 7131, 72, 4357, 29487, 6601, 58, 22, 7131, 72, 4357, 29487, 6601, 58, 23, 7131, 72, 4357, 29487, 6601, 58, 24, 7131, 72, 11907, 1303, 14421, 1426, 198, 220, 220, 220, 1761, 87, 11, 2475, 88, 11, 2475, 89, 28, 1136, 43, 12078, 7, 1930, 19571, 16, 13, 20, 68, 1157, 11, 940, 8, 1303, 1102, 1851, 284, 27548, 11, 838, 27548, 24511, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 7, 29487, 6601, 58, 16, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 17, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 18, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 16, 4357, 1370, 26591, 28, 9806, 12195, 7, 16, 25, 2091, 25, 72, 8, 764, 10, 33028, 764, 12, 1312, 11, 44688, 20679, 49388, 8, 1303, 29487, 37015, 510, 284, 1312, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 29487, 6601, 58, 19, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 20, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 21, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 17, 4357, 1370, 26591, 28, 9806, 12195, 7, 16, 25, 2091, 25, 72, 8, 764, 10, 33028, 764, 12, 1312, 11, 44688, 20679, 49388, 8, 1303, 1370, 26591, 4578, 5640, 3951, 284, 22119, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 29487, 6601, 58, 22, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 23, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 24, 7131, 16, 25, 2091, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 18, 4357, 1370, 26591, 28, 9806, 12195, 7, 16, 25, 2091, 25, 72, 8, 764, 10, 33028, 764, 12, 1312, 11, 44688, 20679, 49388, 8, 1303, 20688, 25, 17130, 28, 9806, 12195, 7, 16, 25, 72, 8, 764, 10, 1802, 764, 12, 1312, 11, 15, 8, 5640, 691, 938, 1802, 284, 307, 7424, 198, 220, 220, 220, 279, 28, 1416, 1436, 18, 67, 0, 7, 30783, 55, 11, 30783, 56, 11, 30783, 57, 11, 4102, 2798, 45621, 28, 25, 11186, 11, 4102, 364, 1096, 28, 25, 16, 11, 18242, 2625, 4943, 1303, 30706, 4469, 5788, 198, 220, 220, 220, 3491, 16, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 16, 38430, 29487, 6601, 58, 16, 7131, 72, 4357, 29487, 6601, 58, 17, 7131, 72, 4357, 29487, 6601, 58, 18, 7131, 72, 11907, 8, 1303, 8612, 378, 34126, 351, 5035, 10620, 329, 1123, 3491, 198, 220, 220, 220, 3491, 17, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 17, 38430, 29487, 6601, 58, 19, 7131, 72, 4357, 29487, 6601, 58, 20, 7131, 72, 4357, 29487, 6601, 58, 21, 7131, 72, 11907, 8, 1303, 265, 1459, 6116, 198, 220, 220, 220, 3491, 18, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 18, 38430, 29487, 6601, 58, 22, 7131, 72, 4357, 29487, 6601, 58, 23, 7131, 72, 4357, 29487, 6601, 58, 24, 7131, 72, 11907, 8, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 7364, 16, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 16, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 16, 58, 18, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 16, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 16, 4357, 20797, 28, 7942, 8, 1303, 29487, 3491, 13332, 351, 14722, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 7364, 17, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 17, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 17, 58, 18, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 17, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 17, 4357, 20797, 28, 7942, 8, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 7364, 18, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 18, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 18, 58, 18, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 18, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 18, 4357, 20797, 28, 7942, 8, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 25249, 62, 8043, 28, 25, 13424, 11, 25249, 62, 8043, 62, 1455, 437, 28, 25, 7645, 8000, 11, 754, 2833, 62, 8043, 62, 1455, 437, 28, 25, 7645, 8000, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4469, 62, 8043, 62, 43435, 28, 25, 11186, 11, 292, 806, 62, 10366, 952, 28, 25, 40496, 11, 1455, 437, 7839, 10331, 8043, 28, 25, 11186, 8, 1303, 18982, 889, 329, 7110, 5739, 198, 220, 220, 220, 279, 28, 29487, 18, 67, 0, 7, 7839, 2625, 29531, 7683, 12, 25842, 20647, 59, 429, 25, 29568, 31, 82, 37435, 7203, 4, 15, 13, 17, 69, 1600, 83, 58, 72, 60, 14, 24760, 14, 1731, 14, 2623, 405, 4008, 812, 706, 923, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8177, 28, 25, 13466, 11, 87, 22704, 28, 7203, 87, 25, 27548, 1600, 7, 2475, 87, 58, 16, 4357, 2475, 87, 58, 17, 46570, 10331, 7, 24, 553, 34, 280, 5277, 4943, 828, 88, 22704, 28, 7203, 88, 25, 27548, 1600, 7, 2475, 88, 58, 16, 4357, 2475, 88, 58, 17, 46570, 10331, 7, 24, 553, 34, 280, 5277, 4943, 828, 89, 22704, 28, 7203, 89, 25, 27548, 1600, 7, 2475, 89, 58, 16, 4357, 2475, 89, 58, 17, 46570, 10331, 7, 24, 553, 34, 280, 5277, 4943, 828, 198, 220, 220, 220, 220, 220, 220, 220, 10706, 26591, 28, 15, 13, 20, 11, 25928, 8043, 28, 25, 11186, 11, 7839, 10331, 28, 10331, 7, 1415, 553, 34, 280, 5277, 12340, 7857, 16193, 23906, 11, 22, 2481, 828, 1455, 437, 10331, 7857, 28, 23, 11, 1455, 437, 7839, 2625, 20273, 357, 259, 6591, 14568, 42501, 1455, 437, 7839, 10331, 7857, 28, 23, 8, 1303, 2860, 287, 34197, 14, 7839, 14, 1455, 437, 351, 33313, 198, 220, 220, 220, 5739, 7, 15542, 25842, 35320, 11, 79, 8, 1303, 8612, 378, 262, 5739, 198, 220, 220, 220, 1969, 439, 3419, 1303, 19836, 21528, 198, 437, 198, 198, 2, 15542, 25842, 8979, 2625, 18, 25842, 62, 29647, 1270, 13, 3149, 19, 1, 198, 198, 2, 6098, 69, 318, 19794, 1988, 357, 1558, 393, 1248, 366, 4703, 935, 2994, 1203, 12340, 279, 844, 62, 69, 16762, 318, 329, 17044, 2176, 410, 312, 43089, 11, 532, 65, 25, 85, 26052, 2496, 1643, 4873, 11, 532, 85, 19815, 721, 26052, 40481, 357, 71, 18897, 287, 428, 1339, 8, 532, 88, 1139, 49312, 4683, 2393, 198, 2, 5143, 7, 4600, 487, 43913, 532, 19298, 21620, 1542, 532, 72, 720, 29487, 8912, 15235, 1, 4, 3312, 67, 13, 11134, 1, 532, 85, 19815, 721, 9195, 87, 18897, 532, 79, 844, 62, 69, 16762, 331, 14795, 27211, 79, 532, 13317, 25, 85, 1029, 532, 65, 25, 85, 36117, 42, 532, 88, 532, 85, 69, 366, 9888, 28, 23906, 25, 23906, 11, 2617, 27455, 28, 16, 14, 16, 1, 720, 15542, 25842, 8979, 63, 1267, 1303, 12, 85, 69, 5046, 28, 23906, 25, 4761, 532, 6098, 69, 1679, 198, 2, 5143, 7, 4600, 487, 43913, 532, 19298, 21620, 1542, 532, 72, 720, 29487, 8912, 15235, 1, 4, 3312, 67, 13, 11134, 1, 532, 66, 25, 85, 9195, 87, 18897, 532, 18302, 316, 3105, 532, 66, 12342, 352, 532, 76, 709, 33152, 1343, 7217, 9688, 532, 70, 1315, 532, 6098, 69, 1248, 532, 79, 844, 62, 69, 16762, 331, 14795, 27211, 79, 532, 13317, 25, 85, 1029, 532, 88, 532, 19881, 362, 532, 85, 69, 366, 9888, 28, 23906, 25, 23906, 11, 2617, 27455, 28, 16, 14, 16, 1, 720, 15542, 25842, 8979, 63, 1267, 1303, 439, 428, 20041, 284, 11481, 15959, 17044, 5359, 198, 198, 2, 16580, 25, 3888, 31246, 43913, 9729, 284, 7582, 4226, 198, 198, 2, 727, 357, 14323, 20053, 8, 835, 286, 15453, 11034, 198, 2, 403, 23893, 290, 779, 428, 835, 611, 345, 655, 765, 257, 2829, 11034, 7448, 290, 836, 470, 198, 2, 6651, 546, 2854, 14, 11423, 33313, 286, 2008, 13, 198, 198, 2, 1115, 25842, 35320, 28, 31, 45685, 329, 1312, 28, 16, 25, 13664, 7, 83, 8, 198, 2, 220, 220, 220, 220, 1036, 7, 1455, 437, 10331, 8043, 796, 7110, 62, 8043, 7, 25, 11186, 4008, 1303, 29487, 1822, 5445, 826, 783, 287, 22300, 198, 2, 220, 220, 220, 220, 3601, 7203, 3, 7, 31, 82, 37435, 7203, 7225, 17, 69, 1600, 72, 14, 13664, 7, 83, 27493, 3064, 4008, 4064, 1844, 59, 81, 4943, 1303, 22915, 1411, 30013, 198, 2, 220, 220, 220, 220, 1426, 41888, 29487, 6601, 58, 16, 7131, 72, 4357, 29487, 6601, 58, 17, 7131, 72, 4357, 29487, 6601, 58, 18, 7131, 72, 4357, 29487, 6601, 58, 19, 7131, 72, 4357, 29487, 6601, 58, 20, 7131, 72, 4357, 29487, 6601, 58, 21, 7131, 72, 11907, 1303, 14421, 1426, 198, 2, 220, 220, 220, 220, 1761, 87, 11, 2475, 88, 28, 1136, 43, 12078, 7, 1930, 19571, 16, 13, 20, 68, 1157, 11, 20, 8, 1303, 1102, 1851, 284, 27548, 11, 642, 27548, 24511, 198, 2, 220, 220, 220, 220, 7110, 7, 29487, 6601, 58, 16, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 17, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 16, 12962, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 29487, 6601, 58, 18, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 19, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 17, 12962, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 29487, 6601, 58, 20, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 29487, 6601, 58, 21, 7131, 16, 25, 72, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 1600, 1370, 8043, 28, 4033, 669, 58, 18, 12962, 198, 2, 220, 220, 220, 220, 41058, 0, 7, 30783, 55, 11, 30783, 56, 11, 4102, 2798, 45621, 28, 25, 11186, 11, 4102, 364, 1096, 28, 25, 16, 11, 18242, 2625, 4943, 1303, 30706, 4469, 5788, 198, 2, 220, 220, 220, 220, 3491, 16, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 16, 38430, 29487, 6601, 58, 16, 7131, 72, 4357, 29487, 6601, 58, 17, 7131, 72, 11907, 8, 198, 2, 220, 220, 220, 220, 3491, 17, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 17, 38430, 29487, 6601, 58, 18, 7131, 72, 4357, 29487, 6601, 58, 19, 7131, 72, 11907, 8, 198, 2, 220, 220, 220, 220, 3491, 18, 28, 15883, 31560, 293, 53, 874, 7, 6335, 58, 18, 38430, 29487, 6601, 58, 20, 7131, 72, 4357, 29487, 6601, 58, 21, 7131, 72, 11907, 8, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 7364, 16, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 16, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 16, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 16, 4357, 20797, 28, 7942, 8, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 7364, 17, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 17, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 17, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 17, 4357, 20797, 28, 7942, 8, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 7364, 18, 58, 16, 4083, 14, 16, 13, 20, 68, 1157, 11, 7364, 18, 58, 17, 4083, 14, 16, 13, 20, 68, 1157, 11, 18242, 2625, 3, 7, 31, 82, 37435, 7203, 7225, 16, 69, 1600, 285, 58, 18, 4083, 14, 17, 68, 1270, 4008, 1600, 8043, 28, 4033, 669, 58, 18, 4357, 20797, 28, 7942, 8, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 25249, 62, 8043, 28, 25, 13424, 11, 25249, 62, 8043, 62, 1455, 437, 28, 25, 7645, 8000, 11, 25249, 62, 8043, 62, 43435, 28, 25, 11186, 11, 292, 806, 62, 10366, 952, 28, 25, 40496, 11, 1455, 437, 7839, 10331, 8043, 28, 25, 11186, 8, 1303, 1455, 437, 10331, 8043, 28, 25, 11186, 198, 2, 220, 220, 220, 220, 7110, 0, 7, 87, 18242, 2625, 87, 25, 27548, 1600, 2645, 9608, 2625, 88, 25, 27548, 1600, 7839, 2625, 29531, 7683, 12290, 20647, 59, 429, 25, 29568, 31, 82, 37435, 7203, 4, 15, 13, 17, 69, 1600, 83, 58, 72, 60, 14, 24760, 14, 1731, 14, 2623, 405, 4008, 331, 3808, 706, 923, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 8177, 28, 25, 13466, 11, 87, 22704, 28, 7203, 87, 25, 27548, 1600, 7, 2475, 87, 58, 16, 4357, 2475, 87, 58, 17, 46570, 10331, 7, 1065, 553, 34, 280, 5277, 4943, 828, 88, 22704, 28, 7203, 88, 25, 27548, 1600, 7, 2475, 88, 58, 16, 4357, 2475, 88, 58, 17, 46570, 10331, 7, 1065, 553, 34, 280, 5277, 4943, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 10706, 28, 9562, 11, 7839, 10331, 28, 10331, 7, 1731, 553, 34, 280, 5277, 12340, 7857, 16193, 23906, 11, 23906, 828, 1455, 437, 10331, 7857, 28, 1065, 11, 1455, 437, 7839, 2625, 20273, 357, 259, 6591, 14568, 42501, 1455, 437, 7839, 10331, 7857, 28, 1415, 8, 198, 2, 220, 220, 220, 220, 886, 790, 1679, 198, 198, 2, 3149, 19, 7, 15542, 25842, 35320, 553, 18, 25842, 62, 29647, 1270, 13, 3149, 19, 1600, 29647, 28, 1270, 8, 198, 2, 1581, 198, 2, 27908, 7, 15542, 25842, 35320, 553, 18, 25842, 62, 29647, 1270, 13, 27908, 1600, 29647, 28, 1270, 8, 198 ]
1.930915
8,960
module UtilTest using Parametron using Test using Parametron: sort_and_combine! using Base.Sort: QuickSort combinepair(x, y) = first(x) => last(x) + last(y) @testset "sort_and_combine!" begin n = 100 @test sort_and_combine!([2 => 1.0, 2 => 2.0]; combine=combinepair, by=first) == [2 => 3.0] @test sort_and_combine!([3 => 1.0, 2 => 4.0, 3 => 2.0, 1 => 2.0], combine=combinepair, by=first) == [1 => 2.0, 2 => 4.0, 3 => 3.0] @test length(sort_and_combine!(Pair.(1 : n, rand(n)), combine=combinepair, by=first)) == n @test length(sort_and_combine!(Pair.(fill(3, n), rand(n)), combine=combinepair, by=first)) == 1 v = [rand(1 : round(Int, n / 2)) => rand() for i = 1 : n] global allocs for i = 1 : 2 vcopy = copy(v) allocs = @allocated sort_and_combine!(vcopy; combine=combinepair, by=first, alg=QuickSort) end @test allocs == 0 end end # module
[ 21412, 7273, 346, 14402, 198, 198, 3500, 25139, 316, 1313, 198, 3500, 6208, 198, 198, 3500, 25139, 316, 1313, 25, 3297, 62, 392, 62, 24011, 500, 0, 198, 3500, 7308, 13, 42758, 25, 12029, 42758, 198, 198, 24011, 500, 24874, 7, 87, 11, 331, 8, 796, 717, 7, 87, 8, 5218, 938, 7, 87, 8, 1343, 938, 7, 88, 8, 198, 198, 31, 9288, 2617, 366, 30619, 62, 392, 62, 24011, 500, 2474, 2221, 198, 220, 220, 220, 299, 796, 1802, 198, 220, 220, 220, 2488, 9288, 3297, 62, 392, 62, 24011, 500, 0, 26933, 17, 5218, 352, 13, 15, 11, 362, 5218, 362, 13, 15, 11208, 12082, 28, 24011, 500, 24874, 11, 416, 28, 11085, 8, 6624, 685, 17, 5218, 513, 13, 15, 60, 198, 220, 220, 220, 2488, 9288, 3297, 62, 392, 62, 24011, 500, 0, 26933, 18, 5218, 352, 13, 15, 11, 362, 5218, 604, 13, 15, 11, 513, 5218, 362, 13, 15, 11, 352, 5218, 362, 13, 15, 4357, 12082, 28, 24011, 500, 24874, 11, 416, 28, 11085, 8, 6624, 685, 16, 5218, 362, 13, 15, 11, 362, 5218, 604, 13, 15, 11, 513, 5218, 513, 13, 15, 60, 198, 220, 220, 220, 2488, 9288, 4129, 7, 30619, 62, 392, 62, 24011, 500, 0, 7, 47, 958, 12195, 16, 1058, 299, 11, 43720, 7, 77, 36911, 12082, 28, 24011, 500, 24874, 11, 416, 28, 11085, 4008, 6624, 299, 198, 220, 220, 220, 2488, 9288, 4129, 7, 30619, 62, 392, 62, 24011, 500, 0, 7, 47, 958, 12195, 20797, 7, 18, 11, 299, 828, 43720, 7, 77, 36911, 12082, 28, 24011, 500, 24874, 11, 416, 28, 11085, 4008, 6624, 352, 628, 220, 220, 220, 410, 796, 685, 25192, 7, 16, 1058, 2835, 7, 5317, 11, 299, 1220, 362, 4008, 5218, 43720, 3419, 329, 1312, 796, 352, 1058, 299, 60, 198, 220, 220, 220, 3298, 36836, 82, 198, 220, 220, 220, 329, 1312, 796, 352, 1058, 362, 198, 220, 220, 220, 220, 220, 220, 220, 410, 30073, 796, 4866, 7, 85, 8, 198, 220, 220, 220, 220, 220, 220, 220, 36836, 82, 796, 2488, 439, 10533, 3297, 62, 392, 62, 24011, 500, 0, 7, 28435, 11081, 26, 12082, 28, 24011, 500, 24874, 11, 416, 28, 11085, 11, 435, 70, 28, 21063, 42758, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 36836, 82, 6624, 657, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
2.268844
398
function evaluate(p::MPoly{T}, es...) where {T} r = zero(T) for (m, c) in p t = c for i = 1:length(m) t *= es[i]^m[i] end r += t end r end function evaluate_basis(p::MPoly{T}, es...) where {T} r = Array{T}(undef, 0) for (m, c) in p r1 = c for i = 1:length(m) r1 *= es[i]^m[i] end push!(r, r1) end r end
[ 8818, 13446, 7, 79, 3712, 7378, 3366, 90, 51, 5512, 1658, 23029, 810, 1391, 51, 92, 198, 220, 220, 220, 374, 796, 6632, 7, 51, 8, 198, 220, 220, 220, 329, 357, 76, 11, 269, 8, 287, 279, 198, 220, 220, 220, 220, 220, 220, 220, 256, 796, 269, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 1635, 28, 1658, 58, 72, 60, 61, 76, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 374, 15853, 256, 198, 220, 220, 220, 886, 198, 220, 220, 220, 374, 198, 437, 198, 198, 8818, 13446, 62, 12093, 271, 7, 79, 3712, 7378, 3366, 90, 51, 5512, 1658, 23029, 810, 1391, 51, 92, 198, 220, 220, 220, 374, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 657, 8, 198, 220, 220, 220, 329, 357, 76, 11, 269, 8, 287, 279, 198, 220, 220, 220, 220, 220, 220, 220, 374, 16, 796, 269, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 16, 1635, 28, 1658, 58, 72, 60, 61, 76, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 81, 11, 374, 16, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 374, 198, 437, 198 ]
1.612167
263
using PosteriorAnalysis using Base.Test using MacroTools import PosteriorAnalysis: _transform_expr ###################################################################### # test transformations (internal) ###################################################################### "Test that expression is passed through." macro test_passthrough(expr) (expr2, captured_names) = _transform_expr(expr) @test isequal(expr, expr2) @test isempty(captured_names) end test_template(f, expr) = f(_transform_expr(expr)...) macro test_template(expr, template, variables...) evar = gensym(:expr) cvar = gensym(:captured_names) quote test_template($(Meta.quot(expr))) do $(evar), $(cvar) @match $(evar) begin $template => begin $([:(@test get($cvar, $(Meta.quot(v)), nothing) == $v) for v in variables]...) end _ => throw(error("Result $($evar) does not match template")) end end end end @testset "macros" begin @test_throws ErrorException _transform_expr(:(@v())) # no arguments @test_throws ErrorException _transform_expr(:(@v a b)) # too many arguments @test_passthrough(:(a+b)) @test_passthrough(:(a.b)) @test_passthrough(:(quote a+@v(b)+c end)) @test_template @v(a) a_ a @test_template @v(a)+b a_+b a @test_template @v(a).b a_.b a @test_template a+@v(b)+@v(c) a+b_+c_ b c end ###################################################################### # test operations ###################################################################### @testset "operations" begin a = 1:3 b = 4:6 pd_z = PosteriorDraws(length(a)) pd_a = PosteriorDraws(:a => 1:3) pd_ab = PosteriorDraws([:b,:a], [b,a]) # constructor will enforce sorting @test size(pd_ab) == (2, length(a)) @test keys(pd_ab) == [:a,:b] @test addvars(pd_a, :b => b) == pd_ab @test addvars(pd_z, :a => a, :b => b) == pd_ab @test vcat(pd_z, pd_ab) == pd_ab @test dropvars(pd_ab, :b) == pd_a @test all(pd_ab[:a] .== a) @test all(pd_ab[:a,2:3] .== a[2:3]) pd_abc0 = addvars(pd_ab, :c => a+b) pd_abc1 = map(pd_ab, :c, +, :a, :b) pd_abc2 = @pdmap pd_ab c => @v(a) + @v(b) @test pd_abc0 == pd_abc1 @test pd_abc0 == pd_abc2 io = IOBuffer() @test (show(io, pd_ab); true) @test takebuf_string(io) == """PosteriorDraws with 3 observations a => Int64 b => Int64 """ end @testset "elttype test" begin f(a,b) = Float64(a+b) g(a,b) = [string(a),string(b)] pd1 = PosteriorDraws(:a => 1:3, :b => 11:13) @test pd1[:a] == collect(1:3) @test pd1[:b] == collect(11:13) @test eltype(pd1[:a]) ≡ eltype(pd1[:b]) ≡ Int pd2 = @pdmap pd1 c => f(@v(a), @v(b)) pd3 = @pdmap pd2 d => g(@v(a), @v(b)) @test eltype(pd2[:c]) ≡ eltype(pd3[:c]) ≡ Float64 @test eltype(pd3[:d]) ≡ Array{String, 1} end
[ 3500, 44996, 1504, 32750, 198, 3500, 7308, 13, 14402, 198, 3500, 42755, 33637, 198, 198, 11748, 44996, 1504, 32750, 25, 4808, 35636, 62, 31937, 198, 198, 29113, 29113, 4242, 2235, 198, 2, 1332, 38226, 357, 32538, 8, 198, 29113, 29113, 4242, 2235, 198, 198, 1, 14402, 326, 5408, 318, 3804, 832, 526, 198, 20285, 305, 1332, 62, 44429, 48476, 740, 7, 31937, 8, 198, 220, 220, 220, 357, 31937, 17, 11, 7907, 62, 14933, 8, 796, 4808, 35636, 62, 31937, 7, 31937, 8, 198, 220, 220, 220, 2488, 9288, 318, 40496, 7, 31937, 11, 44052, 17, 8, 198, 220, 220, 220, 2488, 9288, 318, 28920, 7, 27144, 1522, 62, 14933, 8, 198, 437, 198, 198, 9288, 62, 28243, 7, 69, 11, 44052, 8, 796, 277, 28264, 35636, 62, 31937, 7, 31937, 8, 23029, 198, 198, 20285, 305, 1332, 62, 28243, 7, 31937, 11, 11055, 11, 9633, 23029, 198, 220, 220, 220, 819, 283, 796, 308, 641, 4948, 7, 25, 31937, 8, 198, 220, 220, 220, 269, 7785, 796, 308, 641, 4948, 7, 25, 27144, 1522, 62, 14933, 8, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 28243, 16763, 7, 48526, 13, 421, 313, 7, 31937, 22305, 466, 29568, 1990, 283, 828, 29568, 66, 7785, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 15699, 29568, 1990, 283, 8, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 28243, 5218, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 26933, 37498, 31, 9288, 651, 16763, 66, 7785, 11, 29568, 48526, 13, 421, 313, 7, 85, 36911, 2147, 8, 6624, 720, 85, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 410, 287, 9633, 60, 23029, 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, 220, 220, 220, 220, 4808, 5218, 3714, 7, 18224, 7203, 23004, 720, 16763, 1990, 283, 8, 857, 407, 2872, 11055, 48774, 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, 198, 31, 9288, 2617, 366, 20285, 4951, 1, 2221, 628, 220, 220, 220, 2488, 9288, 62, 400, 8516, 13047, 16922, 4808, 35636, 62, 31937, 7, 37498, 31, 85, 3419, 4008, 1303, 645, 7159, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 13047, 16922, 4808, 35636, 62, 31937, 7, 37498, 31, 85, 257, 275, 4008, 1303, 1165, 867, 7159, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 62, 44429, 48476, 740, 7, 37498, 64, 10, 65, 4008, 198, 220, 220, 220, 2488, 9288, 62, 44429, 48476, 740, 7, 37498, 64, 13, 65, 4008, 198, 220, 220, 220, 2488, 9288, 62, 44429, 48476, 740, 7, 37498, 22708, 257, 10, 31, 85, 7, 65, 47762, 66, 886, 4008, 198, 220, 220, 220, 220, 628, 220, 220, 220, 2488, 9288, 62, 28243, 2488, 85, 7, 64, 8, 257, 62, 257, 198, 220, 220, 220, 2488, 9288, 62, 28243, 2488, 85, 7, 64, 47762, 65, 257, 62, 10, 65, 257, 198, 220, 220, 220, 2488, 9288, 62, 28243, 2488, 85, 7, 64, 737, 65, 257, 44807, 65, 257, 198, 220, 220, 220, 2488, 9288, 62, 28243, 257, 10, 31, 85, 7, 65, 47762, 31, 85, 7, 66, 8, 257, 10, 65, 62, 10, 66, 62, 275, 269, 198, 198, 437, 198, 220, 220, 220, 220, 198, 29113, 29113, 4242, 2235, 198, 2, 1332, 4560, 198, 29113, 29113, 4242, 2235, 198, 198, 31, 9288, 2617, 366, 3575, 602, 1, 2221, 198, 220, 220, 220, 220, 198, 220, 220, 220, 257, 796, 352, 25, 18, 198, 220, 220, 220, 275, 796, 604, 25, 21, 198, 220, 220, 220, 279, 67, 62, 89, 796, 44996, 1504, 25302, 82, 7, 13664, 7, 64, 4008, 198, 220, 220, 220, 279, 67, 62, 64, 796, 44996, 1504, 25302, 82, 7, 25, 64, 5218, 352, 25, 18, 8, 198, 220, 220, 220, 279, 67, 62, 397, 796, 44996, 1504, 25302, 82, 26933, 25, 65, 11, 25, 64, 4357, 685, 65, 11, 64, 12962, 1303, 23772, 481, 4605, 29407, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2546, 7, 30094, 62, 397, 8, 6624, 357, 17, 11, 4129, 7, 64, 4008, 198, 220, 220, 220, 2488, 9288, 8251, 7, 30094, 62, 397, 8, 6624, 685, 25, 64, 11, 25, 65, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 751, 85, 945, 7, 30094, 62, 64, 11, 1058, 65, 5218, 275, 8, 6624, 279, 67, 62, 397, 198, 220, 220, 220, 2488, 9288, 751, 85, 945, 7, 30094, 62, 89, 11, 1058, 64, 5218, 257, 11, 1058, 65, 5218, 275, 8, 6624, 279, 67, 62, 397, 198, 220, 220, 220, 2488, 9288, 410, 9246, 7, 30094, 62, 89, 11, 279, 67, 62, 397, 8, 6624, 279, 67, 62, 397, 198, 220, 220, 220, 2488, 9288, 4268, 85, 945, 7, 30094, 62, 397, 11, 1058, 65, 8, 6624, 279, 67, 62, 64, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 477, 7, 30094, 62, 397, 58, 25, 64, 60, 764, 855, 257, 8, 198, 220, 220, 220, 2488, 9288, 477, 7, 30094, 62, 397, 58, 25, 64, 11, 17, 25, 18, 60, 764, 855, 257, 58, 17, 25, 18, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 279, 67, 62, 39305, 15, 796, 751, 85, 945, 7, 30094, 62, 397, 11, 1058, 66, 5218, 257, 10, 65, 8, 198, 220, 220, 220, 279, 67, 62, 39305, 16, 796, 3975, 7, 30094, 62, 397, 11, 1058, 66, 11, 1343, 11, 1058, 64, 11, 1058, 65, 8, 198, 220, 220, 220, 279, 67, 62, 39305, 17, 796, 2488, 30094, 8899, 279, 67, 62, 397, 269, 5218, 2488, 85, 7, 64, 8, 1343, 2488, 85, 7, 65, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 279, 67, 62, 39305, 15, 6624, 279, 67, 62, 39305, 16, 198, 220, 220, 220, 2488, 9288, 279, 67, 62, 39305, 15, 6624, 279, 67, 62, 39305, 17, 198, 220, 220, 220, 220, 198, 220, 220, 220, 33245, 796, 314, 9864, 13712, 3419, 198, 220, 220, 220, 2488, 9288, 357, 12860, 7, 952, 11, 279, 67, 62, 397, 1776, 2081, 8, 198, 220, 220, 220, 2488, 9288, 1011, 29325, 62, 8841, 7, 952, 8, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 47, 6197, 1504, 25302, 82, 351, 513, 13050, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 5218, 2558, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 5218, 2558, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 437, 220, 220, 220, 220, 198, 198, 31, 9288, 2617, 366, 2120, 4906, 1332, 1, 2221, 628, 220, 220, 220, 277, 7, 64, 11, 65, 8, 796, 48436, 2414, 7, 64, 10, 65, 8, 198, 220, 220, 220, 308, 7, 64, 11, 65, 8, 796, 685, 8841, 7, 64, 828, 8841, 7, 65, 15437, 198, 220, 220, 220, 220, 198, 220, 220, 220, 279, 67, 16, 796, 44996, 1504, 25302, 82, 7, 25, 64, 5218, 352, 25, 18, 11, 1058, 65, 5218, 1367, 25, 1485, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 279, 67, 16, 58, 25, 64, 60, 6624, 2824, 7, 16, 25, 18, 8, 198, 220, 220, 220, 2488, 9288, 279, 67, 16, 58, 25, 65, 60, 6624, 2824, 7, 1157, 25, 1485, 8, 198, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 30094, 16, 58, 25, 64, 12962, 38243, 1288, 4906, 7, 30094, 16, 58, 25, 65, 12962, 38243, 2558, 628, 220, 220, 220, 279, 67, 17, 796, 2488, 30094, 8899, 279, 67, 16, 269, 5218, 277, 7, 31, 85, 7, 64, 828, 2488, 85, 7, 65, 4008, 198, 220, 220, 220, 279, 67, 18, 796, 2488, 30094, 8899, 279, 67, 17, 288, 5218, 308, 7, 31, 85, 7, 64, 828, 2488, 85, 7, 65, 4008, 628, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 30094, 17, 58, 25, 66, 12962, 38243, 1288, 4906, 7, 30094, 18, 58, 25, 66, 12962, 38243, 48436, 2414, 628, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 30094, 18, 58, 25, 67, 12962, 38243, 15690, 90, 10100, 11, 352, 92, 198, 220, 220, 220, 220, 198, 437, 198 ]
2.113731
1,442
<gh_stars>10-100 ENV["PKG_CONFIG_PATH"] = "/Users/dc/anaconda/envs/python35/lib/pkgconfig" using OpenCV using Images using Cxx import ImageView function opencv_to_image(img_opencv) converted_image = zeros(Float16, (3, rows(img_opencv), cols(img_opencv))); for i = 1:size(converted_image, 2) for j = 1:size(converted_image, 3) pixel_value = @cxx at_v3b(img_opencv, i, j) converted_image[:, i, j] = map(x -> Int(at(pixel_value, x)), [2, 1, 0]) ./ 255 end end return converted_image end # C++ OpenCV code cxx""" #include "opencv2/videoio.hpp" #include "opencv2/imgproc.hpp" using namespace std; using namespace cv; /// Retrieve video device by index cv::VideoCapture get_video_device(int device_index) { cv::VideoCapture capture(device_index); cv::Mat frame; capture.read(frame); return capture; } /// Capture frame cv::Mat capture_frame(cv::VideoCapture capture) { cv::Mat frame; bool Success = capture.read(frame); return frame; } /// Capture and save frame void capture_save_frame(cv::VideoCapture capture, String dest) { cv::Mat frame; bool success = capture.read(frame); if (success) { cv::imwrite(dest, frame); } } /// Release an active camera void release_camera(cv::VideoCapture capture) { capture.release(); } """ video_device = @cxx get_video_device(CAP_ANY); @time current_frame = @cxx capture_frame(video_device); @time current_frame_image = opencv_to_image(current_frame); ImageView.imshow(colorview(RGB, current_frame_image)) filename = joinpath(pwd(), "camera-frame.jpg"); @time @cxx capture_save_frame(video_device, pointer(filename)); @time current_frame_image_2 = load(filename); ImageView.imshow(current_frame_image_2)
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 1677, 53, 14692, 40492, 38, 62, 10943, 16254, 62, 34219, 8973, 796, 12813, 14490, 14, 17896, 14, 272, 330, 13533, 14, 268, 14259, 14, 29412, 2327, 14, 8019, 14, 35339, 11250, 1, 198, 198, 3500, 4946, 33538, 198, 3500, 5382, 198, 3500, 327, 5324, 198, 198, 11748, 7412, 7680, 198, 198, 8818, 1280, 33967, 62, 1462, 62, 9060, 7, 9600, 62, 9654, 33967, 8, 628, 220, 220, 220, 11513, 62, 9060, 796, 1976, 27498, 7, 43879, 1433, 11, 357, 18, 11, 15274, 7, 9600, 62, 9654, 33967, 828, 951, 82, 7, 9600, 62, 9654, 33967, 4008, 1776, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 7857, 7, 1102, 13658, 62, 9060, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 796, 352, 25, 7857, 7, 1102, 13658, 62, 9060, 11, 513, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17465, 62, 8367, 796, 2488, 66, 5324, 379, 62, 85, 18, 65, 7, 9600, 62, 9654, 33967, 11, 1312, 11, 474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11513, 62, 9060, 58, 45299, 1312, 11, 474, 60, 796, 3975, 7, 87, 4613, 2558, 7, 265, 7, 32515, 62, 8367, 11, 2124, 36911, 685, 17, 11, 352, 11, 657, 12962, 24457, 14280, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 11513, 62, 9060, 198, 437, 198, 198, 2, 327, 4880, 4946, 33538, 2438, 198, 66, 5324, 37811, 198, 198, 2, 17256, 366, 9654, 33967, 17, 14, 15588, 952, 13, 71, 381, 1, 198, 2, 17256, 366, 9654, 33967, 17, 14, 9600, 36942, 13, 71, 381, 1, 198, 198, 3500, 25745, 14367, 26, 198, 3500, 25745, 269, 85, 26, 198, 198, 20379, 4990, 30227, 2008, 3335, 416, 6376, 198, 33967, 3712, 10798, 49630, 651, 62, 15588, 62, 25202, 7, 600, 3335, 62, 9630, 8, 1391, 628, 220, 220, 220, 269, 85, 3712, 10798, 49630, 8006, 7, 25202, 62, 9630, 1776, 198, 220, 220, 220, 269, 85, 3712, 19044, 5739, 26, 628, 220, 220, 220, 8006, 13, 961, 7, 14535, 1776, 628, 220, 220, 220, 1441, 8006, 26, 198, 92, 198, 198, 20379, 31793, 5739, 198, 33967, 3712, 19044, 8006, 62, 14535, 7, 33967, 3712, 10798, 49630, 8006, 8, 1391, 198, 220, 220, 220, 198, 220, 220, 220, 269, 85, 3712, 19044, 5739, 26, 198, 220, 220, 220, 20512, 16282, 796, 8006, 13, 961, 7, 14535, 1776, 198, 220, 220, 220, 1441, 5739, 26, 198, 92, 198, 198, 20379, 31793, 290, 3613, 5739, 198, 19382, 8006, 62, 21928, 62, 14535, 7, 33967, 3712, 10798, 49630, 8006, 11, 10903, 2244, 8, 1391, 198, 220, 220, 220, 198, 220, 220, 220, 269, 85, 3712, 19044, 5739, 26, 198, 220, 220, 220, 20512, 1943, 796, 8006, 13, 961, 7, 14535, 1776, 628, 220, 220, 220, 611, 357, 13138, 8, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 269, 85, 3712, 320, 13564, 7, 16520, 11, 5739, 1776, 198, 220, 220, 220, 1782, 198, 92, 628, 198, 20379, 13868, 281, 4075, 4676, 198, 19382, 2650, 62, 25695, 7, 33967, 3712, 10798, 49630, 8006, 8, 1391, 198, 220, 220, 220, 8006, 13, 20979, 9783, 198, 92, 198, 198, 37811, 198, 198, 15588, 62, 25202, 796, 2488, 66, 5324, 651, 62, 15588, 62, 25202, 7, 33177, 62, 31827, 1776, 198, 198, 31, 2435, 1459, 62, 14535, 796, 2488, 66, 5324, 8006, 62, 14535, 7, 15588, 62, 25202, 1776, 198, 31, 2435, 1459, 62, 14535, 62, 9060, 796, 1280, 33967, 62, 1462, 62, 9060, 7, 14421, 62, 14535, 1776, 198, 5159, 7680, 13, 320, 12860, 7, 8043, 1177, 7, 36982, 11, 1459, 62, 14535, 62, 9060, 4008, 198, 198, 34345, 796, 4654, 6978, 7, 79, 16993, 22784, 366, 25695, 12, 14535, 13, 9479, 15341, 198, 31, 2435, 2488, 66, 5324, 8006, 62, 21928, 62, 14535, 7, 15588, 62, 25202, 11, 17562, 7, 34345, 18125, 198, 31, 2435, 1459, 62, 14535, 62, 9060, 62, 17, 796, 3440, 7, 34345, 1776, 198, 5159, 7680, 13, 320, 12860, 7, 14421, 62, 14535, 62, 9060, 62, 17, 8 ]
2.573913
690
using UnivariateFunctions: evaluate, years_between, years_from_global_base, PE_Function, Sum_Of_Functions, change_base_of_PE_Function, derivative, indefinite_integral, right_integral, left_integral, evaluate_integral using Dates tol = 10*eps() today = Date(2000,1,1) pe_func = PE_Function(1.0,2.0,today, 3) (pe_func.base_ - years_from_global_base(today)) < tol date_in_2020 = Date(2020,1,1) pe_func2 = PE_Function(1.0,2.0,date_in_2020, 3) (pe_func2.base_ - years_from_global_base(date_in_2020)) < tol abs(evaluate(pe_func, date_in_2020) - evaluate(pe_func, years_from_global_base(date_in_2020)) ) < tol #Sum of functions sum_func = Sum_Of_Functions([pe_func, PE_Function(2.0,2.5,today, 3) ]) abs(evaluate(sum_func, date_in_2020) - evaluate(sum_func, years_from_global_base(date_in_2020)) ) < tol # left and right integrals l_int = left_integral(pe_func, today) (evaluate(l_int, date_in_2020) - evaluate_integral(pe_func,today,date_in_2020)) < tol r_int = right_integral(pe_func, date_in_2020) (evaluate(r_int, today) - evaluate_integral(pe_func,today,date_in_2020)) < tol # With DateTimes today_time = DateTime(2000,1,1, 10, 10, 1) pe_func = PE_Function(1.0,2.0,today_time, 3) # left and right integrals later_today = DateTime(2000,1,1, 10, 14, 1) l_int = left_integral(pe_func, today) (evaluate(l_int, later_today) - evaluate_integral(pe_func,today,later_today)) < tol r_int = right_integral(pe_func, later_today) (evaluate(r_int, today) - evaluate_integral(pe_func,today,later_today)) < tol
[ 3500, 791, 42524, 24629, 2733, 25, 13446, 11, 812, 62, 23395, 11, 812, 62, 6738, 62, 20541, 62, 8692, 11, 18468, 62, 22203, 11, 5060, 62, 5189, 62, 24629, 2733, 11, 1487, 62, 8692, 62, 1659, 62, 11401, 62, 22203, 11, 27255, 11, 35639, 62, 18908, 1373, 11, 826, 62, 18908, 1373, 11, 1364, 62, 18908, 1373, 11, 13446, 62, 18908, 1373, 198, 3500, 44712, 198, 83, 349, 796, 838, 9, 25386, 3419, 198, 198, 40838, 796, 7536, 7, 11024, 11, 16, 11, 16, 8, 198, 431, 62, 20786, 796, 18468, 62, 22203, 7, 16, 13, 15, 11, 17, 13, 15, 11, 40838, 11, 513, 8, 198, 7, 431, 62, 20786, 13, 8692, 62, 532, 812, 62, 6738, 62, 20541, 62, 8692, 7, 40838, 4008, 220, 220, 1279, 284, 75, 198, 4475, 62, 259, 62, 42334, 796, 7536, 7, 42334, 11, 16, 11, 16, 8, 198, 431, 62, 20786, 17, 796, 18468, 62, 22203, 7, 16, 13, 15, 11, 17, 13, 15, 11, 4475, 62, 259, 62, 42334, 11, 513, 8, 198, 7, 431, 62, 20786, 17, 13, 8692, 62, 532, 812, 62, 6738, 62, 20541, 62, 8692, 7, 4475, 62, 259, 62, 42334, 4008, 220, 220, 1279, 284, 75, 198, 8937, 7, 49786, 7, 431, 62, 20786, 11, 3128, 62, 259, 62, 42334, 8, 532, 13446, 7, 431, 62, 20786, 11, 812, 62, 6738, 62, 20541, 62, 8692, 7, 4475, 62, 259, 62, 42334, 4008, 1267, 1279, 284, 75, 198, 198, 2, 13065, 286, 5499, 198, 16345, 62, 20786, 796, 5060, 62, 5189, 62, 24629, 2733, 26933, 431, 62, 20786, 11, 18468, 62, 22203, 7, 17, 13, 15, 11, 17, 13, 20, 11, 40838, 11, 513, 8, 33761, 198, 8937, 7, 49786, 7, 16345, 62, 20786, 11, 3128, 62, 259, 62, 42334, 8, 532, 13446, 7, 16345, 62, 20786, 11, 812, 62, 6738, 62, 20541, 62, 8692, 7, 4475, 62, 259, 62, 42334, 4008, 1267, 1279, 284, 75, 198, 198, 2, 1364, 290, 826, 4132, 30691, 198, 75, 62, 600, 796, 1364, 62, 18908, 1373, 7, 431, 62, 20786, 11, 1909, 8, 198, 7, 49786, 7, 75, 62, 600, 11, 3128, 62, 259, 62, 42334, 8, 532, 13446, 62, 18908, 1373, 7, 431, 62, 20786, 11, 40838, 11, 4475, 62, 259, 62, 42334, 4008, 1279, 284, 75, 198, 81, 62, 600, 796, 826, 62, 18908, 1373, 7, 431, 62, 20786, 11, 3128, 62, 259, 62, 42334, 8, 198, 7, 49786, 7, 81, 62, 600, 11, 1909, 8, 532, 13446, 62, 18908, 1373, 7, 431, 62, 20786, 11, 40838, 11, 4475, 62, 259, 62, 42334, 4008, 1279, 284, 75, 198, 198, 2, 2080, 7536, 28595, 198, 40838, 62, 2435, 796, 7536, 7575, 7, 11024, 11, 16, 11, 16, 11, 838, 11, 838, 11, 352, 8, 198, 431, 62, 20786, 796, 18468, 62, 22203, 7, 16, 13, 15, 11, 17, 13, 15, 11, 40838, 62, 2435, 11, 513, 8, 628, 198, 2, 1364, 290, 826, 4132, 30691, 198, 36760, 62, 40838, 796, 7536, 7575, 7, 11024, 11, 16, 11, 16, 11, 838, 11, 1478, 11, 352, 8, 198, 75, 62, 600, 796, 1364, 62, 18908, 1373, 7, 431, 62, 20786, 11, 1909, 8, 198, 7, 49786, 7, 75, 62, 600, 11, 1568, 62, 40838, 8, 532, 13446, 62, 18908, 1373, 7, 431, 62, 20786, 11, 40838, 11, 36760, 62, 40838, 4008, 1279, 284, 75, 198, 81, 62, 600, 796, 826, 62, 18908, 1373, 7, 431, 62, 20786, 11, 1568, 62, 40838, 8, 198, 7, 49786, 7, 81, 62, 600, 11, 1909, 8, 532, 13446, 62, 18908, 1373, 7, 431, 62, 20786, 11, 40838, 11, 36760, 62, 40838, 4008, 1279, 284, 75, 198 ]
2.500832
601
randdual(x, ::Val{N}=Val(3)) where {N} = ForwardDiff.Dual(x, ntuple(_ -> randn(), Val(N))...) @time @testset "ForwardDiff.jl" begin m = 53 n = 63 k = 73 A1 = rand(Float64, m, k) B1 = rand(Float64, k, n) C1 = rand(Float64, m, n) A2 = deepcopy(A1) B2 = deepcopy(B1) C2 = deepcopy(C1) α = Float64(2.0) β = Float64(2.0) Octavian.matmul!(C1, A1, B1, α, β) LinearAlgebra.mul!(C2, A2, B2, α, β) @test C1 ≈ C2 @testset "real array from the left" begin config = ForwardDiff.JacobianConfig(nothing, C1, B1) I = LinearAlgebra.I(size(B1, 2)) J1 = ForwardDiff.jacobian((C, B) -> Octavian.matmul!(C, A1, B), C1, B1, config) @test J1 ≈ kron(I, A1) J2 = ForwardDiff.jacobian((C, B) -> LinearAlgebra.mul!(C, A2, B), C2, B2, config) @test J1 ≈ kron(I, A2) @test J1 ≈ J2 J3 = ForwardDiff.jacobian((C, B) -> Octavian.matmul_serial!(C, A1, B), C1, B1, config) @test J3 ≈ kron(I, A1) @test J3 ≈ J2 end @testset "real array from the right" begin # dense and column-major arrays config = ForwardDiff.JacobianConfig(nothing, C1, A1) J1 = ForwardDiff.jacobian((C, A) -> Octavian.matmul!(C, A, B1), C1, A1, config) J2 = ForwardDiff.jacobian((C, A) -> LinearAlgebra.mul!(C, A, B2), C2, A2, config) J3 = ForwardDiff.jacobian((C, A) -> Octavian.matmul_serial!(C, A, B1), C1, A1, config) @test J1 ≈ J2 ≈ J3 # transposed arrays A1new = Matrix(A1')' A2new = Matrix(A2')' config = ForwardDiff.JacobianConfig(nothing, C1, A1new) J1 = ForwardDiff.jacobian((C, A) -> Octavian.matmul!(C, A, B1), C1, A1new, config) J2 = ForwardDiff.jacobian((C, A) -> LinearAlgebra.mul!(C, A, B2), C2, A2new, config) J3 = ForwardDiff.jacobian((C, A) -> Octavian.matmul_serial!(C, A, B1), C1, A1new, config) @test J1 ≈ J2 ≈ J3 # direct version using dual numbers A1dual = zeros(eltype(config), reverse(size(A1))...) A1dual .= A1' C1dual = zeros(eltype(config), size(C1)...) A2dual = deepcopy(A1dual) C2dual = deepcopy(C1dual) C3dual = similar(C1dual); C4dual = similar(C2dual) Octavian.matmul!(C1dual, A1dual', B1) Octavian.matmul!(C2dual, A2dual', B2) Octavian.matmul_serial!(C3dual, A1dual', B1) Octavian.matmul_serial!(C4dual, A2dual', B2) @test C1dual ≈ C2dual ≈ C3dual ≈ C4dual end @testset "two dual arrays" begin A1d = randdual.(A1) B1d = randdual.(B1) @test reinterpret(Float64, Octavian.matmul(A1d, B1d, 1.3)) ≈ reinterpret(Float64, Octavian.matmul_serial(A1d, B1d, 1.3)) ≈ reinterpret(Float64, (A1d * B1d) .* 1.3) @test reinterpret(Float64, Octavian.matmul(@view(A1d[begin:end-1,:]), B1d)) ≈ reinterpret(Float64, Octavian.matmul_serial(@view(A1d[begin:end-1,:]), B1d)) ≈ reinterpret(Float64, @view(A1d[begin:end-1,:]) * B1d) end end
[ 198, 25192, 646, 282, 7, 87, 11, 7904, 7762, 90, 45, 92, 28, 7762, 7, 18, 4008, 810, 1391, 45, 92, 796, 19530, 28813, 13, 36248, 7, 87, 11, 299, 83, 29291, 28264, 4613, 43720, 77, 22784, 3254, 7, 45, 4008, 23029, 198, 31, 2435, 2488, 9288, 2617, 366, 39746, 28813, 13, 20362, 1, 2221, 198, 220, 220, 220, 285, 796, 7192, 198, 220, 220, 220, 299, 796, 8093, 198, 220, 220, 220, 479, 796, 8854, 628, 220, 220, 220, 317, 16, 796, 43720, 7, 43879, 2414, 11, 285, 11, 479, 8, 198, 220, 220, 220, 347, 16, 796, 43720, 7, 43879, 2414, 11, 479, 11, 299, 8, 198, 220, 220, 220, 327, 16, 796, 43720, 7, 43879, 2414, 11, 285, 11, 299, 8, 628, 220, 220, 220, 317, 17, 796, 2769, 30073, 7, 32, 16, 8, 198, 220, 220, 220, 347, 17, 796, 2769, 30073, 7, 33, 16, 8, 198, 220, 220, 220, 327, 17, 796, 2769, 30073, 7, 34, 16, 8, 628, 220, 220, 220, 26367, 796, 48436, 2414, 7, 17, 13, 15, 8, 198, 220, 220, 220, 27169, 796, 48436, 2414, 7, 17, 13, 15, 8, 628, 220, 220, 220, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 16, 11, 317, 16, 11, 347, 16, 11, 26367, 11, 27169, 8, 198, 220, 220, 220, 44800, 2348, 29230, 13, 76, 377, 0, 7, 34, 17, 11, 317, 17, 11, 347, 17, 11, 26367, 11, 27169, 8, 198, 220, 220, 220, 2488, 9288, 327, 16, 15139, 230, 327, 17, 628, 220, 220, 220, 2488, 9288, 2617, 366, 5305, 7177, 422, 262, 1364, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 796, 19530, 28813, 13, 46751, 666, 16934, 7, 22366, 11, 327, 16, 11, 347, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 314, 796, 44800, 2348, 29230, 13, 40, 7, 7857, 7, 33, 16, 11, 362, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 449, 16, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 347, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 11, 317, 16, 11, 347, 828, 327, 16, 11, 347, 16, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 16, 15139, 230, 479, 1313, 7, 40, 11, 317, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 449, 17, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 347, 8, 4613, 44800, 2348, 29230, 13, 76, 377, 0, 7, 34, 11, 317, 17, 11, 347, 828, 327, 17, 11, 347, 17, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 16, 15139, 230, 479, 1313, 7, 40, 11, 317, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 16, 15139, 230, 449, 17, 628, 220, 220, 220, 220, 220, 220, 220, 449, 18, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 347, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 0, 7, 34, 11, 317, 16, 11, 347, 828, 327, 16, 11, 347, 16, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 18, 15139, 230, 479, 1313, 7, 40, 11, 317, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 18, 15139, 230, 449, 17, 628, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 5305, 7177, 422, 262, 826, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 15715, 290, 5721, 12, 22478, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 796, 19530, 28813, 13, 46751, 666, 16934, 7, 22366, 11, 327, 16, 11, 317, 16, 8, 628, 220, 220, 220, 220, 220, 220, 220, 449, 16, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 11, 317, 11, 347, 16, 828, 327, 16, 11, 317, 16, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 449, 17, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 44800, 2348, 29230, 13, 76, 377, 0, 7, 34, 11, 317, 11, 347, 17, 828, 327, 17, 11, 317, 17, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 449, 18, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 0, 7, 34, 11, 317, 11, 347, 16, 828, 327, 16, 11, 317, 16, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 16, 15139, 230, 449, 17, 15139, 230, 449, 18, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1007, 29813, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 317, 16, 3605, 796, 24936, 7, 32, 16, 11537, 6, 198, 220, 220, 220, 220, 220, 220, 220, 317, 17, 3605, 796, 24936, 7, 32, 17, 11537, 6, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 796, 19530, 28813, 13, 46751, 666, 16934, 7, 22366, 11, 327, 16, 11, 317, 16, 3605, 8, 628, 220, 220, 220, 220, 220, 220, 220, 449, 16, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 11, 317, 11, 347, 16, 828, 327, 16, 11, 317, 16, 3605, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 449, 17, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 44800, 2348, 29230, 13, 76, 377, 0, 7, 34, 11, 317, 11, 347, 17, 828, 327, 17, 11, 317, 17, 3605, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 449, 18, 796, 19530, 28813, 13, 30482, 672, 666, 19510, 34, 11, 317, 8, 4613, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 0, 7, 34, 11, 317, 11, 347, 16, 828, 327, 16, 11, 317, 16, 3605, 11, 4566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 449, 16, 15139, 230, 449, 17, 15139, 230, 449, 18, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1277, 2196, 1262, 10668, 3146, 198, 220, 220, 220, 220, 220, 220, 220, 317, 16, 646, 282, 796, 1976, 27498, 7, 417, 4906, 7, 11250, 828, 9575, 7, 7857, 7, 32, 16, 4008, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 317, 16, 646, 282, 764, 28, 317, 16, 6, 198, 220, 220, 220, 220, 220, 220, 220, 327, 16, 646, 282, 796, 1976, 27498, 7, 417, 4906, 7, 11250, 828, 2546, 7, 34, 16, 8, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 317, 17, 646, 282, 796, 2769, 30073, 7, 32, 16, 646, 282, 8, 198, 220, 220, 220, 220, 220, 220, 220, 327, 17, 646, 282, 796, 2769, 30073, 7, 34, 16, 646, 282, 8, 198, 220, 220, 220, 220, 220, 220, 220, 327, 18, 646, 282, 796, 2092, 7, 34, 16, 646, 282, 1776, 327, 19, 646, 282, 796, 2092, 7, 34, 17, 646, 282, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 16, 646, 282, 11, 317, 16, 646, 282, 3256, 347, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2556, 615, 666, 13, 6759, 76, 377, 0, 7, 34, 17, 646, 282, 11, 317, 17, 646, 282, 3256, 347, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 0, 7, 34, 18, 646, 282, 11, 317, 16, 646, 282, 3256, 347, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 0, 7, 34, 19, 646, 282, 11, 317, 17, 646, 282, 3256, 347, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 327, 16, 646, 282, 15139, 230, 327, 17, 646, 282, 15139, 230, 327, 18, 646, 282, 15139, 230, 327, 19, 646, 282, 198, 220, 220, 220, 886, 628, 220, 2488, 9288, 2617, 366, 11545, 10668, 26515, 1, 2221, 198, 220, 220, 220, 317, 16, 67, 796, 43720, 646, 282, 12195, 32, 16, 8, 198, 220, 220, 220, 347, 16, 67, 796, 43720, 646, 282, 12195, 33, 16, 8, 198, 220, 220, 220, 2488, 9288, 302, 27381, 7, 43879, 2414, 11, 2556, 615, 666, 13, 6759, 76, 377, 7, 32, 16, 67, 11, 347, 16, 67, 11, 352, 13, 18, 4008, 15139, 230, 302, 27381, 7, 43879, 2414, 11, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 7, 32, 16, 67, 11, 347, 16, 67, 11, 352, 13, 18, 4008, 15139, 230, 302, 27381, 7, 43879, 2414, 11, 357, 32, 16, 67, 1635, 347, 16, 67, 8, 764, 9, 352, 13, 18, 8, 198, 220, 220, 220, 2488, 9288, 302, 27381, 7, 43879, 2414, 11, 2556, 615, 666, 13, 6759, 76, 377, 7, 31, 1177, 7, 32, 16, 67, 58, 27471, 25, 437, 12, 16, 11, 25, 46570, 347, 16, 67, 4008, 15139, 230, 302, 27381, 7, 43879, 2414, 11, 2556, 615, 666, 13, 6759, 76, 377, 62, 46911, 7, 31, 1177, 7, 32, 16, 67, 58, 27471, 25, 437, 12, 16, 11, 25, 46570, 347, 16, 67, 4008, 15139, 230, 302, 27381, 7, 43879, 2414, 11, 2488, 1177, 7, 32, 16, 67, 58, 27471, 25, 437, 12, 16, 11, 25, 12962, 1635, 347, 16, 67, 8, 198, 220, 886, 198, 437, 198 ]
1.895807
1,574
<reponame>abraemer/SimLib.jl<filename>src/halfchainentropy_zblock.jl module HCE_ZBlock_Module import ..ED using ..SimLib using ..SimLib: FArray using LinearAlgebra: eigvals!, Hermitian, mul!, svdvals! using SharedArrays: sdata using SpinSymmetry using XXZNumerics: entropy export HalfChainEntropyZBlock, HCEDataDescriptor, HCEData, load_entropy ### Descriptor struct HCEDataDescriptor <: ED.EDDerivedDataDescriptor L::Int symm::Bool derivedfrom::ED.EDDataDescriptor end HCEDataDescriptor(L, args...; kwargs...) = HCEDataDescriptor(L, true, EDDataDescriptor(args...; kwargs...)) HCEDataDescriptor(L, symm::Bool, args...; kwargs...) = HCEDataDescriptor(L, symm, EDDataDescriptor(args...; kwargs...)) ### Data obj struct HCEData{N} <: SimLib.AbstractSimpleData descriptor::HCEDataDescriptor data::FArray{N} end ED._default_folder(::HCEDataDescriptor) = "entropy" ED._filename_addition(hcedd::HCEDataDescriptor) = "-l_$(hcedd.L)" * (hcedd.symm ? "_symm" : "") """ load_entropy(L[, symm], edd) load_entropy(L[, symm], model[, diagtype][, location]) """ load_entropy(args...; kwargs...) = load(HCEDataDescriptor(args...; kwargs...)) ## Functions _zblock_inds(N, k) = SpinSymmetry._indices(zbasis(N, k)) struct SymmZBlockEntanglementEntropy Nfull::Int kfull::Int N1::Int indexLookup::Vector{Int}## ToDo: is that a sensible data structure? indsA::Vector{Vector{Int}} # note that indsA contains fewer indices -> should be used as column indsB::Vector{Vector{Int}} size::Int function SymmZBlockEntanglementEntropy(zblockbasis, N1) N = zblockbasis.N k = zblockbasis.k N1 = max(N1, N-N1) indexLookup = zeros(2^N) indexLookup[_zblock_inds(N, k)] = 1:binomial(N,k) krange = max(0,N1+k-N):min(N1, k) indsA = [2^N1 .* (_zblock_inds(N-N1, k-ki) .- 1) for ki in krange] indsB = [_zblock_inds(N1, ki) .- 1 for ki in krange] size = 2*N1 == N ? N1 : N new(N, k, N1, indexLookup, indsA, indsB, size) end end # scalar for broadcasting Base.broadcastable(s::SymmZBlockEntanglementEntropy) = Ref(s) entanglement_entropy(s::SymmZBlockEntanglementEntropy, ψ) = entanglement_entropy!(zeros(Float64, s.size),s,ψ) function entanglement_entropy!(out, s::SymmZBlockEntanglementEntropy, ψ) NB = s.Nfull fill!(out, 0) for (indA, indB) in zip(s.indsA, s.indsB) ## No point in optimizing this allocation further. mat = Matrix{eltype(ψ)}(undef, length(indA), length(indB)) for shift in 1:s.size mat .= getindex.(Ref(ψ), getindex.(Ref(s.indexLookup), SpinSymmetry._roll_bits.(NB, indA .+ indB', shift-1) .+ 1)) out[shift] += entropy(svdvals!(mat) .^ 2) # most allocations come from svdvals! end end out end ### Task mutable struct HalfChainEntropyTask{S} <: ED.EDTask L::Int symm::Bool entropy_strategy::S data end ## ToDo: This always symmetrizes over the chain right now. HalfChainEntropyZBlock(basis::SymmetrizedBasis, L=div(basis.basis.N,2)) = HalfChainEntropyTask(L, true, SymmZBlockEntanglementEntropy(basis.basis, L), nothing) HalfChainEntropyZBlock(; basis, L=div(basis.basis.N,2)) = HalfChainEntropyZBlock(basis, L) function ED.initialize!(task::HalfChainEntropyTask, arrayconstructor, spectral_size) task.data = arrayconstructor(Float64, task.entropy_strategy.size, spectral_size) end function ED.compute_task!(task::HalfChainEntropyTask, evals, evecs, inds...) n = min(size(task.data,1), size(evecs,2)) for (i, ψ) in enumerate(eachcol(evecs)) i <= n || break entanglement_entropy!(view(task.data, :, i, inds...), task.entropy_strategy, ψ) end end function ED.failed_task!(task::HalfChainEntropyTask, inds...) task.data[:, :, inds...] .= NaN64 end function ED.assemble(task::HalfChainEntropyTask, edd) HCEData(HCEDataDescriptor(task.L, task.symm, edd), sdata(task.data)) end Base.summary(task::HalfChainEntropyTask) = string(typeof(task)) * "(L=$(task.L), symm=$(task.symm))" end # module
[ 27, 7856, 261, 480, 29, 397, 430, 24677, 14, 8890, 25835, 13, 20362, 27, 34345, 29, 10677, 14, 13959, 7983, 298, 28338, 62, 89, 9967, 13, 20362, 198, 21412, 367, 5222, 62, 57, 12235, 62, 26796, 198, 198, 11748, 11485, 1961, 198, 3500, 11485, 8890, 25835, 198, 3500, 11485, 8890, 25835, 25, 376, 19182, 198, 3500, 44800, 2348, 29230, 25, 304, 328, 12786, 28265, 2332, 2781, 666, 11, 35971, 28265, 264, 20306, 12786, 0, 198, 3500, 39403, 3163, 20477, 25, 264, 7890, 198, 3500, 28002, 13940, 3020, 11973, 198, 3500, 21044, 57, 45, 6975, 873, 25, 40709, 628, 198, 39344, 13139, 35491, 14539, 28338, 57, 12235, 11, 27327, 1961, 1045, 24564, 1968, 273, 11, 27327, 1961, 1045, 11, 3440, 62, 298, 28338, 198, 198, 21017, 2935, 6519, 273, 198, 198, 7249, 27327, 1961, 1045, 24564, 1968, 273, 1279, 25, 8392, 13, 1961, 28532, 1572, 6601, 24564, 1968, 273, 198, 220, 220, 220, 406, 3712, 5317, 198, 220, 220, 220, 23606, 3712, 33, 970, 198, 220, 220, 220, 10944, 6738, 3712, 1961, 13, 1961, 6601, 24564, 1968, 273, 198, 437, 198, 198, 16045, 1961, 1045, 24564, 1968, 273, 7, 43, 11, 26498, 986, 26, 479, 86, 22046, 23029, 796, 27327, 1961, 1045, 24564, 1968, 273, 7, 43, 11, 2081, 11, 8392, 6601, 24564, 1968, 273, 7, 22046, 986, 26, 479, 86, 22046, 986, 4008, 198, 16045, 1961, 1045, 24564, 1968, 273, 7, 43, 11, 23606, 3712, 33, 970, 11, 26498, 986, 26, 479, 86, 22046, 23029, 796, 27327, 1961, 1045, 24564, 1968, 273, 7, 43, 11, 23606, 11, 8392, 6601, 24564, 1968, 273, 7, 22046, 986, 26, 479, 86, 22046, 986, 4008, 628, 198, 198, 21017, 6060, 26181, 198, 198, 7249, 27327, 1961, 1045, 90, 45, 92, 1279, 25, 3184, 25835, 13, 23839, 26437, 6601, 198, 220, 220, 220, 43087, 3712, 16045, 1961, 1045, 24564, 1968, 273, 198, 220, 220, 220, 1366, 3712, 37, 19182, 90, 45, 92, 198, 437, 198, 198, 1961, 13557, 12286, 62, 43551, 7, 3712, 16045, 1961, 1045, 24564, 1968, 273, 8, 796, 366, 298, 28338, 1, 198, 1961, 13557, 34345, 62, 2860, 653, 7, 71, 771, 67, 3712, 16045, 1961, 1045, 24564, 1968, 273, 8, 796, 27444, 75, 62, 3, 7, 71, 771, 67, 13, 43, 16725, 1635, 357, 71, 771, 67, 13, 1837, 3020, 5633, 45434, 1837, 3020, 1, 1058, 366, 4943, 198, 198, 37811, 198, 220, 220, 220, 3440, 62, 298, 28338, 7, 43, 58, 11, 23606, 4357, 1225, 67, 8, 198, 220, 220, 220, 3440, 62, 298, 28338, 7, 43, 58, 11, 23606, 4357, 2746, 58, 11, 2566, 363, 4906, 7131, 11, 4067, 12962, 198, 37811, 198, 198, 2220, 62, 298, 28338, 7, 22046, 986, 26, 479, 86, 22046, 23029, 796, 220, 3440, 7, 16045, 1961, 1045, 24564, 1968, 273, 7, 22046, 986, 26, 479, 86, 22046, 986, 4008, 628, 198, 2235, 40480, 198, 198, 62, 89, 9967, 62, 521, 82, 7, 45, 11, 479, 8, 796, 28002, 13940, 3020, 11973, 13557, 521, 1063, 7, 89, 12093, 271, 7, 45, 11, 479, 4008, 198, 198, 7249, 1632, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 198, 220, 220, 220, 399, 12853, 3712, 5317, 198, 220, 220, 220, 479, 12853, 3712, 5317, 198, 220, 220, 220, 399, 16, 3712, 5317, 198, 220, 220, 220, 6376, 8567, 929, 3712, 38469, 90, 5317, 92, 2235, 1675, 5211, 25, 318, 326, 257, 20586, 1366, 4645, 30, 198, 220, 220, 220, 773, 82, 32, 3712, 38469, 90, 38469, 90, 5317, 11709, 1303, 3465, 326, 773, 82, 32, 4909, 7380, 36525, 4613, 815, 307, 973, 355, 5721, 198, 220, 220, 220, 773, 82, 33, 3712, 38469, 90, 38469, 90, 5317, 11709, 198, 220, 220, 220, 2546, 3712, 5317, 198, 220, 220, 220, 2163, 1632, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 7, 89, 9967, 12093, 271, 11, 399, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 399, 796, 1976, 9967, 12093, 271, 13, 45, 198, 220, 220, 220, 220, 220, 220, 220, 479, 796, 1976, 9967, 12093, 271, 13, 74, 198, 220, 220, 220, 220, 220, 220, 220, 399, 16, 796, 3509, 7, 45, 16, 11, 399, 12, 45, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 8567, 929, 796, 1976, 27498, 7, 17, 61, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 8567, 929, 29795, 89, 9967, 62, 521, 82, 7, 45, 11, 479, 15437, 796, 352, 25, 8800, 49070, 7, 45, 11, 74, 8, 198, 220, 220, 220, 220, 220, 220, 220, 479, 9521, 796, 3509, 7, 15, 11, 45, 16, 10, 74, 12, 45, 2599, 1084, 7, 45, 16, 11, 479, 8, 198, 220, 220, 220, 220, 220, 220, 220, 773, 82, 32, 796, 685, 17, 61, 45, 16, 764, 9, 44104, 89, 9967, 62, 521, 82, 7, 45, 12, 45, 16, 11, 479, 12, 4106, 8, 764, 12, 352, 8, 329, 47748, 287, 479, 9521, 60, 198, 220, 220, 220, 220, 220, 220, 220, 773, 82, 33, 796, 685, 62, 89, 9967, 62, 521, 82, 7, 45, 16, 11, 47748, 8, 764, 12, 352, 329, 47748, 287, 479, 9521, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 796, 362, 9, 45, 16, 6624, 399, 5633, 399, 16, 1058, 399, 198, 220, 220, 220, 220, 220, 220, 220, 649, 7, 45, 11, 479, 11, 399, 16, 11, 6376, 8567, 929, 11, 773, 82, 32, 11, 773, 82, 33, 11, 2546, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 16578, 283, 329, 22978, 198, 14881, 13, 36654, 2701, 540, 7, 82, 3712, 13940, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 8, 796, 6524, 7, 82, 8, 198, 198, 298, 648, 1732, 62, 298, 28338, 7, 82, 3712, 13940, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 11, 18074, 230, 8, 796, 920, 648, 1732, 62, 298, 28338, 0, 7, 9107, 418, 7, 43879, 2414, 11, 264, 13, 7857, 828, 82, 11, 139, 230, 8, 198, 198, 8818, 920, 648, 1732, 62, 298, 28338, 0, 7, 448, 11, 264, 3712, 13940, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 11, 18074, 230, 8, 198, 220, 220, 220, 41354, 796, 264, 13, 45, 12853, 198, 220, 220, 220, 6070, 0, 7, 448, 11, 657, 8, 198, 220, 220, 220, 329, 357, 521, 32, 11, 773, 33, 8, 287, 19974, 7, 82, 13, 521, 82, 32, 11, 264, 13, 521, 82, 33, 8, 198, 220, 220, 220, 220, 220, 220, 220, 22492, 1400, 966, 287, 45780, 428, 20157, 2252, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2603, 796, 24936, 90, 417, 4906, 7, 139, 230, 38165, 7, 917, 891, 11, 4129, 7, 521, 32, 828, 4129, 7, 521, 33, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 6482, 287, 352, 25, 82, 13, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2603, 764, 28, 651, 9630, 12195, 8134, 7, 139, 230, 828, 651, 9630, 12195, 8134, 7, 82, 13, 9630, 8567, 929, 828, 28002, 13940, 3020, 11973, 13557, 2487, 62, 9895, 12195, 32819, 11, 773, 32, 764, 10, 773, 33, 3256, 6482, 12, 16, 8, 764, 10, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 58, 30846, 60, 15853, 40709, 7, 82, 20306, 12786, 0, 7, 6759, 8, 764, 61, 362, 8, 1303, 220, 749, 49157, 1282, 422, 264, 20306, 12786, 0, 198, 197, 197, 437, 198, 197, 437, 198, 220, 220, 220, 503, 198, 437, 198, 198, 21017, 15941, 198, 198, 76, 18187, 2878, 13139, 35491, 14539, 28338, 25714, 90, 50, 92, 1279, 25, 8392, 13, 1961, 25714, 198, 220, 220, 220, 406, 3712, 5317, 198, 220, 220, 220, 23606, 3712, 33, 970, 198, 220, 220, 220, 40709, 62, 2536, 4338, 3712, 50, 198, 220, 220, 220, 1366, 198, 437, 198, 198, 2235, 1675, 5211, 25, 770, 1464, 23606, 316, 380, 12271, 625, 262, 6333, 826, 783, 13, 198, 198, 31305, 35491, 14539, 28338, 57, 12235, 7, 12093, 271, 3712, 13940, 3020, 316, 380, 8863, 15522, 271, 11, 406, 28, 7146, 7, 12093, 271, 13, 12093, 271, 13, 45, 11, 17, 4008, 796, 13139, 35491, 14539, 28338, 25714, 7, 43, 11, 2081, 11, 1632, 3020, 57, 12235, 14539, 648, 1732, 14539, 28338, 7, 12093, 271, 13, 12093, 271, 11, 406, 828, 2147, 8, 198, 31305, 35491, 14539, 28338, 57, 12235, 7, 26, 4308, 11, 406, 28, 7146, 7, 12093, 271, 13, 12093, 271, 13, 45, 11, 17, 4008, 796, 13139, 35491, 14539, 28338, 57, 12235, 7, 12093, 271, 11, 406, 8, 628, 198, 8818, 8392, 13, 36733, 1096, 0, 7, 35943, 3712, 31305, 35491, 14539, 28338, 25714, 11, 7177, 41571, 273, 11, 37410, 62, 7857, 8, 198, 220, 220, 220, 4876, 13, 7890, 796, 7177, 41571, 273, 7, 43879, 2414, 11, 4876, 13, 298, 28338, 62, 2536, 4338, 13, 7857, 11, 37410, 62, 7857, 8, 198, 437, 198, 198, 8818, 8392, 13, 5589, 1133, 62, 35943, 0, 7, 35943, 3712, 31305, 35491, 14539, 28338, 25714, 11, 819, 874, 11, 28001, 6359, 11, 773, 82, 23029, 198, 220, 220, 220, 299, 796, 949, 7, 7857, 7, 35943, 13, 7890, 11, 16, 828, 2546, 7, 44655, 6359, 11, 17, 4008, 198, 220, 220, 220, 329, 357, 72, 11, 18074, 230, 8, 287, 27056, 378, 7, 27379, 4033, 7, 44655, 6359, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 19841, 299, 8614, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 920, 648, 1732, 62, 298, 28338, 0, 7, 1177, 7, 35943, 13, 7890, 11, 1058, 11, 1312, 11, 773, 82, 986, 828, 4876, 13, 298, 28338, 62, 2536, 4338, 11, 18074, 230, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 8392, 13, 47904, 62, 35943, 0, 7, 35943, 3712, 31305, 35491, 14539, 28338, 25714, 11, 773, 82, 23029, 198, 220, 220, 220, 4876, 13, 7890, 58, 45299, 1058, 11, 773, 82, 22345, 764, 28, 11013, 45, 2414, 198, 437, 198, 198, 8818, 8392, 13, 292, 15140, 7, 35943, 3712, 31305, 35491, 14539, 28338, 25714, 11, 1225, 67, 8, 198, 220, 220, 220, 27327, 1961, 1045, 7, 16045, 1961, 1045, 24564, 1968, 273, 7, 35943, 13, 43, 11, 4876, 13, 1837, 3020, 11, 1225, 67, 828, 264, 7890, 7, 35943, 13, 7890, 4008, 198, 437, 198, 198, 14881, 13, 49736, 7, 35943, 3712, 31305, 35491, 14539, 28338, 25714, 8, 796, 4731, 7, 4906, 1659, 7, 35943, 4008, 1635, 30629, 43, 43641, 7, 35943, 13, 43, 828, 23606, 43641, 7, 35943, 13, 1837, 3020, 4008, 1, 198, 198, 437, 1303, 8265, 198 ]
2.327221
1,745
<gh_stars>0 # maybe put this script with the other one together? export sudoku_1, sudoku_2 sudoku_1 = [0 0 4 7 2 0 9 0 0; 0 3 9 0 0 8 0 0 5; 0 0 1 5 0 6 0 0 4; 0 4 0 0 1 0 5 2 0; 0 2 8 0 5 0 1 7 0; 0 1 6 0 3 0 0 9 0; 4 0 0 9 0 1 3 0 0; 1 0 0 3 0 0 8 4 0; 0 0 7 0 8 5 6 0 0]; sudoku_2 = [5 3 0 0 7 0 0 0 0; 6 0 0 1 9 5 0 0 0; 0 9 8 0 0 0 0 6 0; 8 0 0 0 6 0 0 0 3; 4 0 0 8 0 3 0 0 1; 7 0 0 0 2 0 0 0 6;0 6 0 0 0 0 2 8 0; 0 0 0 4 1 9 0 0 5; 0 0 0 0 8 0 0 7 9];
[ 27, 456, 62, 30783, 29, 15, 198, 2, 3863, 1234, 428, 4226, 351, 262, 584, 530, 1978, 30, 220, 198, 39344, 424, 67, 11601, 62, 16, 11, 424, 67, 11601, 62, 17, 198, 82, 463, 11601, 62, 16, 796, 685, 15, 657, 604, 767, 362, 657, 860, 657, 657, 26, 657, 513, 860, 657, 657, 807, 657, 657, 642, 26, 657, 657, 352, 642, 657, 718, 657, 657, 604, 26, 657, 604, 657, 657, 352, 657, 642, 362, 657, 26, 657, 362, 807, 657, 642, 657, 352, 767, 657, 26, 657, 352, 718, 657, 513, 657, 657, 860, 657, 26, 604, 657, 657, 860, 657, 352, 513, 657, 657, 26, 352, 657, 657, 513, 657, 657, 807, 604, 657, 26, 657, 657, 767, 657, 807, 642, 718, 657, 657, 11208, 198, 198, 82, 463, 11601, 62, 17, 796, 685, 20, 513, 657, 657, 767, 657, 657, 657, 657, 26, 718, 657, 657, 352, 860, 642, 657, 657, 657, 26, 657, 860, 807, 657, 657, 657, 657, 718, 657, 26, 807, 657, 657, 657, 718, 657, 657, 657, 513, 26, 604, 657, 657, 807, 657, 513, 657, 657, 352, 26, 767, 657, 657, 657, 362, 657, 657, 657, 718, 26, 15, 718, 657, 657, 657, 657, 362, 807, 657, 26, 657, 657, 657, 604, 352, 860, 657, 657, 642, 26, 657, 657, 657, 657, 807, 657, 657, 767, 860, 11208 ]
2.004367
229
# Script for running DA and ADA using the same traninig data # go to Ricker model folder try cd("Ricker model") catch warn("Already in the Ricker model folder") end # load algorithms include("rickermodel.jl") # packages for storing data using JLD using HDF5 ################################################################################ ### set up problem ### ################################################################################ problem = set_up_gp_problem(ploton = false) # set adaptive updating #problem.adaptive_update = AMUpdate(eye(3), 2.4/sqrt(3), 1., 0.7, 50) #problem.adaptive_update = noAdaptation(2.4/sqrt(3)*eye(3)) # or, use AM gen alg for adaptive updating #problem.adaptive_update = AMUpdate_gen(eye(3), 2.4/sqrt(3), 0.2, 1., 0.8, 25) problem.adaptive_update = AMUpdate_gen(eye(3), 2.4/sqrt(3), 0.3, 1., 0.8, 25) # set algorithm parameters problem.alg_param.N = 1000 # nbr particels problem.alg_param.R = 50000 # nbr iterations problem.alg_param.burn_in = 0 # burn in problem.alg_param.length_training_data = 2000 problem.alg_param.alg = "MCWM" # we should only! use the MCWM algorithm problem.alg_param.compare_GP_and_PF = false problem.alg_param.noisy_est = false problem.alg_param.pred_method = "sample" problem.alg_param.print_interval = 10000 # problem.alg_param.R# problem.alg_param.beta_MH = 0.15 # "local_loglik_approx" # "max_loglik" problem.alg_param.lasso = false #problem.data.y = Array(readtable("y.csv"))[:,1] #problem.data.y = Array(readtable("y_data_set_1.csv"))[:,1] problem.data.y = Array(readtable("y_data_set_2.csv"))[:,1] ################################################################################ ### generate traning data ### ################################################################################ # set up training problem #accelerated_da = true problem_training = set_up_problem(ploton = false) length_training_data = 2000 length_test_data = 2000 burn_in = 2000 problem_training.alg_param.N = 1000 # nbr particels problem_training.alg_param.R = length_training_data + length_test_data + burn_in # nbr iterations problem_training.alg_param.burn_in = burn_in # burn_in problem_training.data.y = Array(readtable("y_data_set_2.csv"))[:,1] #Array(readtable("y.csv"))[:,1] problem_training.alg_param.print_interval = 1000 # test starting at true parameters #problem.model_param.theta_0 = problem.model_param.theta_true # PMCMC problem_training.alg_param.alg = "MCWM" # use AM alg for adaptive updating #problem.adaptive_update = AMUpdate(eye(3), 2.4/sqrt(3), 1., 0.7, 25) #problem.adaptive_update = noAdaptation(2.4/sqrt(3)*eye(3)) # or, use AM gen alg for adaptive updating #problem_training.adaptive_update = AMUpdate_gen(eye(3), 2.4/sqrt(3), 0.2, 1., 0.8, 25) problem_training.adaptive_update = AMUpdate_gen(eye(3), 2.4/sqrt(3), 0.4, 1., 0.8, 25) load_training_data = true if !load_training_data # generate training data tic() # collect data res_training, Theta_star_training, loglik_star_training,Theta_old_training,loglik_old_training, cov_matrix = mcmc(problem_training, true, true) time_pre_er = toc() # write outputs res = res_training[1] Theta = res.Theta_est loglik = res.loglik_est accept_vec = res.accept_vec prior_vec = res.prior_vec loglik_avec_priorvec = zeros(3, length(loglik)) loglik_avec_priorvec[1,:] = loglik loglik_avec_priorvec[2,:] = accept_vec loglik_avec_priorvec[3,:] = prior_vec algorithm_parameters = zeros(10, 2) algorithm_parameters[1,1] = problem_training.alg_param.burn_in algorithm_parameters[2:4,1] = problem_training.model_param.theta_true algorithm_parameters[5:7,1] = problem_training.model_param.theta_0 algorithm_parameters[8:end,:] = problem_training.prior_dist.prior_parameters writetable("Results/Theta_training.csv", convert(DataFrame, Theta)) writetable("Results/loglik_avec_priorvec_training.csv", convert(DataFrame, loglik_avec_priorvec)) writetable("Results/algorithm_parameters_training.csv", convert(DataFrame, algorithm_parameters)) # split tranining and test data Theta_test_star = Theta_star_training[:,(end-length_test_data+1):end] loglik_test_star = loglik_star_training[(end-length_test_data+1):end] Theta_test_old = Theta_old_training[:,(end-length_test_data+1):end] loglik_test_old = loglik_old_training[(end-length_test_data+1):end] data_test_star = [Theta_test_star; loglik_test_star'] data_test_old = [Theta_test_old; loglik_test_old'] Theta_training_star = Theta_star_training[:,1:length_training_data] loglik_training_star = loglik_star_training[1:length_training_data] Theta_training_old = Theta_old_training[:,1:length_training_data] loglik_training_old = loglik_old_training[1:length_training_data] data_training_star = [Theta_training_star; loglik_training_star'] data_training_old = [Theta_training_old; loglik_training_old'] save("gp_training_and_test_data.jld", "res_training", res_training, "data_training_star", data_training_star, "data_training_old", data_training_old, "data_test_star", data_test_star, "data_test_old", data_test_old, "cov_matrix",cov_matrix) else @load "gp_training_and_test_data.jld" end ################################################################################ ### fit gp model ### ################################################################################ # fit gp model tic() # create gp object gp = GPModel("est_method",zeros(6), zeros(4), eye(problem.alg_param.length_training_data-20), zeros(problem.alg_param.length_training_data-20),zeros(2,problem.alg_param.length_training_data-20), collect(1:10)) data_training = data_training_star data_test = data_test_star # fit GP model if problem.alg_param.est_method == "ml" # fit GP model using ml perc_outlier = 0.1 # used when using PMCMC for trainig data 0.05 tail_rm = "left" problem.alg_param.lasso = false ml_est(gp, data_training,"SE", problem.alg_param.lasso,perc_outlier,tail_rm) else error("The two stage estimation method is not in use") #two_stage_est(gp, data_training) end time_fit_gp = toc() # save fitted gp model # @save "gp_fitted_model.jld" gp ################################################################################ ### DA-GP-MCMC ### ################################################################################ accelerated_da = false problem.model_param.theta_0 = mean(res_training[1].Theta_est[:,problem_training.alg_param.burn_in+1:problem_training.alg_param.burn_in+length_training_data],2) res = @time dagpmcmc(problem_training, problem, gp, cov_matrix) # calc res mcmc_results = Result(res[1].Theta_est, res[1].loglik_est, res[1].accept_vec, res[1].prior_vec) # write output Theta = mcmc_results.Theta_est loglik = mcmc_results.loglik_est accept_vec = mcmc_results.accept_vec prior_vec = mcmc_results.prior_vec loglik_avec_priorvec = zeros(3, length(loglik)) loglik_avec_priorvec[1,:] = loglik loglik_avec_priorvec[2,:] = accept_vec loglik_avec_priorvec[3,:] = prior_vec algorithm_parameters = zeros(10, 2) algorithm_parameters[1,1] = problem.alg_param.burn_in + 1 algorithm_parameters[2:4,1] = problem.model_param.theta_true algorithm_parameters[5:7,1] = problem.model_param.theta_0 algorithm_parameters[8:end,:] = problem.prior_dist.prior_parameters if !accelerated_da writetable("Results/Theta_dagpmcmc_lunarc.csv", convert(DataFrame, Theta)) writetable("Results/loglik_avec_priorvec_dagpmcmc_lunarc.csv", convert(DataFrame, loglik_avec_priorvec)) writetable("Results/algorithm_parameters_dagpmcmc_lunarc.csv", convert(DataFrame, algorithm_parameters)) else writetable("Results/Theta_adagpmcmc_lunarc.csv", convert(DataFrame, Theta)) writetable("Results/loglik_avec_priorvec_adagpmcmc_lunarc.csv", convert(DataFrame, loglik_avec_priorvec)) writetable("Results/algorithm_parameters_adagpmcmc_lunarc.csv", convert(DataFrame, algorithm_parameters)) end ################################################################################ ### A-DA-GP-MCMC ### ################################################################################ accelerated_da = true problem.model_param.theta_0 = mean(res_training[1].Theta_est[:,problem_training.alg_param.burn_in+1:problem_training.alg_param.burn_in+length_training_data],2) ################################################################################ ## Create features for classification models ## ################################################################################ n = size(data_training,2) n_burn_in = problem_training.alg_param.burn_in dim = length(problem.model_param.theta_true) data_gp_loglik_star_old = zeros(4,n) data_gp_loglik_star_old[3,:] = data_training_star[dim+1,:] data_gp_loglik_star_old[4,:] = data_training_old[dim+1,:] # data_gp_loglik_star_old = [gp_star, gp_old, ll_star, ll_old] std_pred_gp_star = zeros(n) noisy_pred = problem.alg_param.noisy_est for i = 1:n (loglik_est_star, var_pred_ml_star, prediction_sample_ml_star) = predict(data_training_star[1:dim,i],gp,noisy_pred) (loglik_est_old, var_pred_ml, prediction_sample_ml_old) = predict(data_training_old[1:dim,i],gp,noisy_pred) data_gp_loglik_star_old[1,i] = prediction_sample_ml_star[1] data_gp_loglik_star_old[2,i] = prediction_sample_ml_old[1] std_pred_gp_star[i] = sqrt(var_pred_ml_star[1]) end nbr_GP_star_geq_GP_old = zero(Int64) nbr_case_1 = zero(Int64) nbr_case_2 = zero(Int64) targets_case_1_and_3 = [] data_case_1_and_3 = [] targets_case_2_and_4 = [] data_case_2_and_4 = [] for i = 1:n if data_gp_loglik_star_old[1,i] > data_gp_loglik_star_old[2,i] nbr_GP_star_geq_GP_old += 1 data_case_1_and_3 = vcat(data_case_1_and_3, [data_training[1:dim,i]; data_gp_loglik_star_old[1,i]/data_gp_loglik_star_old[2,i]; std_pred_gp_star[i]]) if data_gp_loglik_star_old[3,i] > data_gp_loglik_star_old[4,i] append!(targets_case_1_and_3, 1) nbr_case_1 += 1 else append!(targets_case_1_and_3, 0) end else data_case_2_and_4 = vcat(data_case_2_and_4, [data_training[1:dim,i]; data_gp_loglik_star_old[1,i]/data_gp_loglik_star_old[2,i]; std_pred_gp_star[i]]) if data_gp_loglik_star_old[3,i] < data_gp_loglik_star_old[4,i] append!(targets_case_2_and_4, 1) nbr_case_2 += 1 else append!(targets_case_2_and_4, 0) end end end # tansform features and set input data # convert matricies to floats data_case_1_and_3 = convert(Array{Float64,2},reshape(data_case_1_and_3, (dim+2, length(targets_case_1_and_3)))) data_case_2_and_4 = convert(Array{Float64,2},reshape(data_case_2_and_4, (dim+2, length(targets_case_2_and_4)))) targets_case_1_and_3 = convert(Array{Float64,1}, targets_case_1_and_3) targets_case_2_and_4 = convert(Array{Float64,1}, targets_case_2_and_4) ################################################################################ ## set case model ### ################################################################################ select_case_model = "dt" # logisticregression or dt nbr_GP_star_led_GP_old = n-nbr_GP_star_geq_GP_old prob_case_1 = nbr_case_1/nbr_GP_star_geq_GP_old prob_case_2 = (nbr_case_2)/nbr_GP_star_led_GP_old prob_case_3 = 1-prob_case_1 prob_case_4 = (nbr_GP_star_led_GP_old-nbr_case_2)/nbr_GP_star_led_GP_old prob_cases = [prob_case_1;prob_case_2;prob_case_3;prob_case_4] println("Est prob:") println(prob_cases) #prob_cases = [0.2;0.2;0.8;0.8] if select_case_model == "biasedcoin" casemodel = BiasedCoin(prob_cases) elseif select_case_model == "logisticregression" mean_posterior = mean(theta_training,2)[:] input_data_case_1_and_3 = zeros(length(targets_case_1_and_3), dim+3) input_data_case_1_and_3[:,1] = sqrt((mean_posterior[1] - data_case_1_and_3[1,:]).^2) input_data_case_1_and_3[:,2] = sqrt((mean_posterior[2] - data_case_1_and_3[2,:]).^2) input_data_case_1_and_3[:,3] = sqrt((mean_posterior[3] - data_case_1_and_3[3,:]).^2) input_data_case_1_and_3[:,4] = sqrt(sum((repmat(mean_posterior', size(data_case_1_and_3,2))'-data_case_1_and_3[1:3,:]).^2,1)) input_data_case_1_and_3[:,5] = data_case_1_and_3[4,:] input_data_case_1_and_3[:,end] = targets_case_1_and_3 input_data_case_1_and_3 = DataFrame(input_data_case_1_and_3) input_data_case_2_and_4 = zeros(length(targets_case_2_and_4), dim+3) input_data_case_2_and_4[:,1] = sqrt((mean_posterior[1] - data_case_2_and_4[1,:]).^2) input_data_case_2_and_4[:,2] = sqrt((mean_posterior[2] - data_case_2_and_4[2,:]).^2) input_data_case_2_and_4[:,3] = sqrt((mean_posterior[3] - data_case_2_and_4[3,:]).^2) input_data_case_2_and_4[:,4] = sqrt(sum((repmat(mean_posterior', size(data_case_2_and_4,2))'-data_case_2_and_4[1:3,:]).^2,1)) input_data_case_2_and_4[:,5] = data_case_2_and_4[4,:] input_data_case_2_and_4[:,end] = targets_case_2_and_4 input_data_case_2_and_4 = DataFrame(input_data_case_2_and_4) log_reg_model_case_1_and_3 = glm(@formula(x6 ~ x1 + x2 + x3 + x4 + x5), input_data_case_1_and_3, Binomial(), LogitLink()) log_reg_model_case_2_and_4 = glm(@formula(x6 ~ x1 + x2 + x3 + x4 + x5), input_data_case_2_and_4, Binomial(), LogitLink()) β_for_model1or3 = coef(log_reg_model_case_1_and_3) β_for_model2or4 = coef(log_reg_model_case_2_and_4) casemodel = LogisticRegression(β_for_model1or3, β_for_model2or4, mean_posterior) elseif select_case_model == "dt" #standardization!(data_case_1_and_3) input_data_case_1_and_3 = zeros(length(targets_case_1_and_3), dim+2) input_data_case_1_and_3[:,1] = data_case_1_and_3[1,:] input_data_case_1_and_3[:,2] = data_case_1_and_3[2,:] input_data_case_1_and_3[:,3] = data_case_1_and_3[3,:] input_data_case_1_and_3[:,4] = data_case_1_and_3[4,:] input_data_case_1_and_3[:,end] = targets_case_1_and_3 #standardization!(data_case_2_and_4) input_data_case_2_and_4 = zeros(length(targets_case_2_and_4), dim+2) input_data_case_2_and_4[:,1] = data_case_2_and_4[1,:] input_data_case_2_and_4[:,2] = data_case_2_and_4[2,:] input_data_case_2_and_4[:,3] = data_case_2_and_4[3,:] input_data_case_2_and_4[:,4] = data_case_2_and_4[4,:] input_data_case_2_and_4[:,end] = targets_case_2_and_4 # 4 features model features_1_and_3 = convert(Array, input_data_case_1_and_3[:, 1:dim+1]) labels_1_and_3 = convert(Array, input_data_case_1_and_3[:, end]) labels_1_and_3 = Array{String}(size(features_1_and_3,1)) for i = 1:length(labels_1_and_3) if input_data_case_1_and_3[i,end] == 0 labels_1_and_3[i] = "case 3" else labels_1_and_3[i] = "case 1" end end decisiontree1or3 = build_tree(labels_1_and_3, features_1_and_3) decisiontree1or3 = prune_tree(decisiontree1or3, 0.9) # 4 features model features_case_2_and_4 = convert(Array, input_data_case_2_and_4[:, 1:dim+1]) labels_case_2_and_4 = Array{String}(size(features_case_2_and_4,1)) for i = 1:length(labels_case_2_and_4) if input_data_case_2_and_4[i,end] == 0 labels_case_2_and_4[i] = "case 4" else labels_case_2_and_4[i] = "case 2" end end # train full-tree classifier decisiontree2or4 = build_tree(labels_case_2_and_4, features_case_2_and_4) decisiontree2or4 = prune_tree(decisiontree2or4, 0.9) casemodel = DT(decisiontree1or3, decisiontree2or4) end # run ADA res = @time adagpmcmc(problem_training, problem, gp, casemodel, cov_matrix) # write results mcmc_results = Result(res[1].Theta_est, res[1].loglik_est, res[1].accept_vec, res[1].prior_vec) # write output Theta = mcmc_results.Theta_est loglik = mcmc_results.loglik_est accept_vec = mcmc_results.accept_vec prior_vec = mcmc_results.prior_vec loglik_avec_priorvec = zeros(3, length(loglik)) loglik_avec_priorvec[1,:] = loglik loglik_avec_priorvec[2,:] = accept_vec loglik_avec_priorvec[3,:] = prior_vec algorithm_parameters = zeros(10, 2) algorithm_parameters[1,1] = problem.alg_param.burn_in + 1 algorithm_parameters[2:4,1] = problem.model_param.theta_true algorithm_parameters[5:7,1] = problem.model_param.theta_0 algorithm_parameters[8:end,:] = problem.prior_dist.prior_parameters if !accelerated_da writetable("Results/Theta_dagpmcmc_lunarc.csv", convert(DataFrame, Theta)) writetable("Results/loglik_avec_priorvec_dagpmcmc_lunarc.csv", convert(DataFrame, loglik_avec_priorvec)) writetable("Results/algorithm_parameters_dagpmcmc_lunarc.csv", convert(DataFrame, algorithm_parameters)) else writetable("Results/Theta_adagpmcmc_lunarc.csv", convert(DataFrame, Theta)) writetable("Results/loglik_avec_priorvec_adagpmcmc_lunarc.csv", convert(DataFrame, loglik_avec_priorvec)) writetable("Results/algorithm_parameters_adagpmcmc_lunarc.csv", convert(DataFrame, algorithm_parameters)) end
[ 2, 12327, 329, 2491, 17051, 290, 46460, 1262, 262, 976, 491, 272, 259, 328, 1366, 198, 198, 2, 467, 284, 8759, 263, 2746, 9483, 198, 28311, 198, 220, 22927, 7203, 49, 15799, 2746, 4943, 198, 40198, 198, 9828, 7203, 37447, 287, 262, 8759, 263, 2746, 9483, 4943, 198, 437, 198, 198, 2, 3440, 16113, 198, 17256, 7203, 5557, 263, 19849, 13, 20362, 4943, 198, 198, 2, 10392, 329, 23069, 1366, 198, 3500, 449, 11163, 198, 3500, 5572, 37, 20, 198, 198, 29113, 29113, 14468, 198, 21017, 220, 220, 220, 220, 220, 900, 510, 1917, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 198, 198, 45573, 796, 900, 62, 929, 62, 31197, 62, 45573, 7, 489, 18970, 796, 3991, 8, 198, 198, 2, 900, 29605, 19698, 198, 2, 45573, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 352, 1539, 657, 13, 22, 11, 2026, 8, 198, 198, 2, 45573, 13, 42552, 425, 62, 19119, 796, 645, 48003, 341, 7, 17, 13, 19, 14, 31166, 17034, 7, 18, 27493, 25379, 7, 18, 4008, 198, 198, 2, 393, 11, 779, 3001, 2429, 435, 70, 329, 29605, 19698, 198, 2, 45573, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 62, 5235, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 657, 13, 17, 11, 352, 1539, 657, 13, 23, 11, 1679, 8, 198, 45573, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 62, 5235, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 657, 13, 18, 11, 352, 1539, 657, 13, 23, 11, 1679, 8, 198, 198, 2, 900, 11862, 10007, 198, 45573, 13, 14016, 62, 17143, 13, 45, 796, 8576, 1303, 299, 1671, 1344, 1424, 198, 45573, 13, 14016, 62, 17143, 13, 49, 796, 642, 2388, 1303, 299, 1671, 34820, 198, 45573, 13, 14016, 62, 17143, 13, 10899, 62, 259, 796, 657, 1303, 4245, 287, 198, 45573, 13, 14016, 62, 17143, 13, 13664, 62, 34409, 62, 7890, 796, 4751, 198, 45573, 13, 14016, 62, 17143, 13, 14016, 796, 366, 9655, 22117, 1, 1303, 356, 815, 691, 0, 779, 262, 13122, 22117, 11862, 198, 45573, 13, 14016, 62, 17143, 13, 5589, 533, 62, 16960, 62, 392, 62, 42668, 796, 3991, 198, 45573, 13, 14016, 62, 17143, 13, 3919, 13560, 62, 395, 796, 3991, 198, 45573, 13, 14016, 62, 17143, 13, 28764, 62, 24396, 796, 366, 39873, 1, 198, 45573, 13, 14016, 62, 17143, 13, 4798, 62, 3849, 2100, 796, 33028, 1303, 1917, 13, 14016, 62, 17143, 13, 49, 2, 198, 45573, 13, 14016, 62, 17143, 13, 31361, 62, 36208, 796, 657, 13, 1314, 1303, 366, 12001, 62, 6404, 46965, 62, 1324, 13907, 1, 1303, 366, 9806, 62, 6404, 46965, 1, 198, 45573, 13, 14016, 62, 17143, 13, 75, 28372, 796, 3991, 198, 198, 2, 45573, 13, 7890, 13, 88, 796, 15690, 7, 961, 11487, 7203, 88, 13, 40664, 48774, 58, 45299, 16, 60, 198, 2, 45573, 13, 7890, 13, 88, 796, 15690, 7, 961, 11487, 7203, 88, 62, 7890, 62, 2617, 62, 16, 13, 40664, 48774, 58, 45299, 16, 60, 198, 45573, 13, 7890, 13, 88, 796, 15690, 7, 961, 11487, 7203, 88, 62, 7890, 62, 2617, 62, 17, 13, 40664, 48774, 58, 45299, 16, 60, 198, 198, 29113, 29113, 14468, 198, 21017, 220, 220, 220, 220, 220, 7716, 491, 7574, 1366, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 198, 198, 2, 900, 510, 3047, 1917, 198, 198, 2, 330, 7015, 515, 62, 6814, 796, 2081, 198, 198, 45573, 62, 34409, 796, 900, 62, 929, 62, 45573, 7, 489, 18970, 796, 3991, 8, 198, 198, 13664, 62, 34409, 62, 7890, 796, 4751, 198, 13664, 62, 9288, 62, 7890, 796, 4751, 198, 10899, 62, 259, 796, 4751, 198, 198, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 45, 796, 8576, 1303, 299, 1671, 1344, 1424, 198, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 49, 796, 4129, 62, 34409, 62, 7890, 1343, 4129, 62, 9288, 62, 7890, 1343, 4245, 62, 259, 1303, 299, 1671, 34820, 198, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 796, 4245, 62, 259, 1303, 4245, 62, 259, 198, 45573, 62, 34409, 13, 7890, 13, 88, 796, 15690, 7, 961, 11487, 7203, 88, 62, 7890, 62, 2617, 62, 17, 13, 40664, 48774, 58, 45299, 16, 60, 1303, 19182, 7, 961, 11487, 7203, 88, 13, 40664, 48774, 58, 45299, 16, 60, 198, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 4798, 62, 3849, 2100, 796, 8576, 198, 198, 2, 1332, 3599, 379, 2081, 10007, 198, 2, 45573, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 796, 1917, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 7942, 198, 198, 2, 3122, 34, 9655, 198, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 14016, 796, 366, 9655, 22117, 1, 198, 198, 2, 779, 3001, 435, 70, 329, 29605, 19698, 198, 2, 45573, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 352, 1539, 657, 13, 22, 11, 1679, 8, 198, 198, 2, 45573, 13, 42552, 425, 62, 19119, 796, 645, 48003, 341, 7, 17, 13, 19, 14, 31166, 17034, 7, 18, 27493, 25379, 7, 18, 4008, 198, 198, 2, 393, 11, 779, 3001, 2429, 435, 70, 329, 29605, 19698, 198, 2, 45573, 62, 34409, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 62, 5235, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 657, 13, 17, 11, 352, 1539, 657, 13, 23, 11, 1679, 8, 198, 45573, 62, 34409, 13, 42552, 425, 62, 19119, 796, 3001, 10260, 62, 5235, 7, 25379, 7, 18, 828, 362, 13, 19, 14, 31166, 17034, 7, 18, 828, 657, 13, 19, 11, 352, 1539, 657, 13, 23, 11, 1679, 8, 198, 198, 2220, 62, 34409, 62, 7890, 796, 2081, 198, 198, 361, 5145, 2220, 62, 34409, 62, 7890, 628, 220, 1303, 7716, 3047, 1366, 198, 220, 256, 291, 3419, 198, 220, 1303, 2824, 1366, 198, 220, 581, 62, 34409, 11, 383, 8326, 62, 7364, 62, 34409, 11, 2604, 46965, 62, 7364, 62, 34409, 11, 464, 8326, 62, 727, 62, 34409, 11, 6404, 46965, 62, 727, 62, 34409, 11, 39849, 62, 6759, 8609, 796, 285, 11215, 66, 7, 45573, 62, 34409, 11, 2081, 11, 2081, 8, 628, 220, 640, 62, 3866, 62, 263, 796, 284, 66, 3419, 628, 220, 1303, 3551, 23862, 198, 220, 581, 796, 581, 62, 34409, 58, 16, 60, 628, 220, 383, 8326, 796, 581, 13, 464, 8326, 62, 395, 198, 220, 2604, 46965, 796, 581, 13, 6404, 46965, 62, 395, 198, 220, 2453, 62, 35138, 796, 581, 13, 13635, 62, 35138, 198, 220, 3161, 62, 35138, 796, 581, 13, 3448, 273, 62, 35138, 628, 220, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 796, 1976, 27498, 7, 18, 11, 4129, 7, 6404, 46965, 4008, 198, 220, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 16, 11, 47715, 796, 2604, 46965, 198, 220, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 17, 11, 47715, 796, 2453, 62, 35138, 198, 220, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 18, 11, 47715, 796, 3161, 62, 35138, 628, 220, 11862, 62, 17143, 7307, 796, 1976, 27498, 7, 940, 11, 362, 8, 628, 220, 11862, 62, 17143, 7307, 58, 16, 11, 16, 60, 796, 1917, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 198, 220, 11862, 62, 17143, 7307, 58, 17, 25, 19, 11, 16, 60, 796, 1917, 62, 34409, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 7942, 198, 220, 11862, 62, 17143, 7307, 58, 20, 25, 22, 11, 16, 60, 796, 1917, 62, 34409, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 198, 220, 11862, 62, 17143, 7307, 58, 23, 25, 437, 11, 47715, 796, 1917, 62, 34409, 13, 3448, 273, 62, 17080, 13, 3448, 273, 62, 17143, 7307, 628, 220, 1991, 316, 540, 7203, 25468, 14, 464, 8326, 62, 34409, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 383, 8326, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 62, 34409, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 282, 42289, 62, 17143, 7307, 62, 34409, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 11862, 62, 17143, 7307, 4008, 628, 220, 1303, 6626, 491, 272, 3191, 290, 1332, 1366, 628, 220, 383, 8326, 62, 9288, 62, 7364, 796, 383, 8326, 62, 7364, 62, 34409, 58, 45299, 7, 437, 12, 13664, 62, 9288, 62, 7890, 10, 16, 2599, 437, 60, 198, 220, 2604, 46965, 62, 9288, 62, 7364, 796, 2604, 46965, 62, 7364, 62, 34409, 58, 7, 437, 12, 13664, 62, 9288, 62, 7890, 10, 16, 2599, 437, 60, 628, 220, 383, 8326, 62, 9288, 62, 727, 796, 383, 8326, 62, 727, 62, 34409, 58, 45299, 7, 437, 12, 13664, 62, 9288, 62, 7890, 10, 16, 2599, 437, 60, 198, 220, 2604, 46965, 62, 9288, 62, 727, 796, 2604, 46965, 62, 727, 62, 34409, 58, 7, 437, 12, 13664, 62, 9288, 62, 7890, 10, 16, 2599, 437, 60, 628, 220, 1366, 62, 9288, 62, 7364, 796, 685, 464, 8326, 62, 9288, 62, 7364, 26, 2604, 46965, 62, 9288, 62, 7364, 20520, 198, 220, 1366, 62, 9288, 62, 727, 796, 685, 464, 8326, 62, 9288, 62, 727, 26, 2604, 46965, 62, 9288, 62, 727, 20520, 628, 220, 383, 8326, 62, 34409, 62, 7364, 796, 383, 8326, 62, 7364, 62, 34409, 58, 45299, 16, 25, 13664, 62, 34409, 62, 7890, 60, 198, 220, 2604, 46965, 62, 34409, 62, 7364, 796, 2604, 46965, 62, 7364, 62, 34409, 58, 16, 25, 13664, 62, 34409, 62, 7890, 60, 628, 220, 383, 8326, 62, 34409, 62, 727, 796, 383, 8326, 62, 727, 62, 34409, 58, 45299, 16, 25, 13664, 62, 34409, 62, 7890, 60, 198, 220, 2604, 46965, 62, 34409, 62, 727, 796, 2604, 46965, 62, 727, 62, 34409, 58, 16, 25, 13664, 62, 34409, 62, 7890, 60, 628, 220, 1366, 62, 34409, 62, 7364, 796, 685, 464, 8326, 62, 34409, 62, 7364, 26, 2604, 46965, 62, 34409, 62, 7364, 20520, 198, 220, 1366, 62, 34409, 62, 727, 796, 685, 464, 8326, 62, 34409, 62, 727, 26, 2604, 46965, 62, 34409, 62, 727, 20520, 628, 220, 3613, 7203, 31197, 62, 34409, 62, 392, 62, 9288, 62, 7890, 13, 73, 335, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 411, 62, 34409, 1600, 581, 62, 34409, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 62, 34409, 62, 7364, 1600, 1366, 62, 34409, 62, 7364, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 62, 34409, 62, 727, 1600, 1366, 62, 34409, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 62, 9288, 62, 7364, 1600, 1366, 62, 9288, 62, 7364, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 62, 9288, 62, 727, 1600, 1366, 62, 9288, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 66, 709, 62, 6759, 8609, 1600, 66, 709, 62, 6759, 8609, 8, 198, 198, 17772, 628, 220, 2488, 2220, 366, 31197, 62, 34409, 62, 392, 62, 9288, 62, 7890, 13, 73, 335, 1, 198, 198, 437, 628, 198, 29113, 29113, 14468, 198, 21017, 220, 220, 220, 220, 4197, 27809, 2746, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 628, 198, 2, 4197, 27809, 2746, 198, 13370, 3419, 198, 198, 2, 2251, 27809, 2134, 198, 31197, 796, 14714, 17633, 7203, 395, 62, 24396, 1600, 9107, 418, 7, 21, 828, 1976, 27498, 7, 19, 828, 198, 25379, 7, 45573, 13, 14016, 62, 17143, 13, 13664, 62, 34409, 62, 7890, 12, 1238, 828, 1976, 27498, 7, 45573, 13, 14016, 62, 17143, 13, 13664, 62, 34409, 62, 7890, 12, 1238, 828, 9107, 418, 7, 17, 11, 45573, 13, 14016, 62, 17143, 13, 13664, 62, 34409, 62, 7890, 12, 1238, 828, 198, 33327, 7, 16, 25, 940, 4008, 198, 198, 7890, 62, 34409, 796, 1366, 62, 34409, 62, 7364, 198, 7890, 62, 9288, 796, 1366, 62, 9288, 62, 7364, 198, 198, 2, 4197, 14714, 2746, 198, 361, 1917, 13, 14016, 62, 17143, 13, 395, 62, 24396, 6624, 366, 4029, 1, 198, 220, 1303, 4197, 14714, 2746, 1262, 25962, 628, 220, 583, 66, 62, 448, 2505, 796, 657, 13, 16, 1303, 973, 618, 1262, 3122, 34, 9655, 329, 4512, 328, 1366, 657, 13, 2713, 198, 220, 7894, 62, 26224, 796, 366, 9464, 1, 198, 220, 1917, 13, 14016, 62, 17143, 13, 75, 28372, 796, 3991, 628, 220, 25962, 62, 395, 7, 31197, 11, 1366, 62, 34409, 553, 5188, 1600, 1917, 13, 14016, 62, 17143, 13, 75, 28372, 11, 525, 66, 62, 448, 2505, 11, 13199, 62, 26224, 8, 198, 17772, 198, 220, 4049, 7203, 464, 734, 3800, 31850, 2446, 318, 407, 287, 779, 4943, 198, 220, 1303, 11545, 62, 14247, 62, 395, 7, 31197, 11, 1366, 62, 34409, 8, 198, 437, 198, 198, 2435, 62, 11147, 62, 31197, 796, 284, 66, 3419, 198, 198, 2, 3613, 18235, 27809, 2746, 198, 2, 2488, 21928, 366, 31197, 62, 38631, 62, 19849, 13, 73, 335, 1, 27809, 198, 29113, 29113, 14468, 198, 21017, 220, 220, 220, 220, 17051, 12, 16960, 12, 9655, 9655, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 198, 198, 330, 7015, 515, 62, 6814, 796, 3991, 198, 198, 45573, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 796, 1612, 7, 411, 62, 34409, 58, 16, 4083, 464, 8326, 62, 395, 58, 45299, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 10, 16, 25, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 10, 13664, 62, 34409, 62, 7890, 4357, 17, 8, 198, 198, 411, 796, 2488, 2435, 48924, 4426, 11215, 66, 7, 45573, 62, 34409, 11, 1917, 11, 27809, 11, 39849, 62, 6759, 8609, 8, 198, 198, 2, 42302, 581, 198, 76, 11215, 66, 62, 43420, 796, 25414, 7, 411, 58, 16, 4083, 464, 8326, 62, 395, 11, 581, 58, 16, 4083, 6404, 46965, 62, 395, 11, 581, 58, 16, 4083, 13635, 62, 35138, 11, 581, 58, 16, 4083, 3448, 273, 62, 35138, 8, 198, 198, 2, 3551, 5072, 198, 464, 8326, 796, 285, 11215, 66, 62, 43420, 13, 464, 8326, 62, 395, 198, 6404, 46965, 796, 285, 11215, 66, 62, 43420, 13, 6404, 46965, 62, 395, 198, 13635, 62, 35138, 796, 285, 11215, 66, 62, 43420, 13, 13635, 62, 35138, 198, 3448, 273, 62, 35138, 796, 285, 11215, 66, 62, 43420, 13, 3448, 273, 62, 35138, 198, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 796, 1976, 27498, 7, 18, 11, 4129, 7, 6404, 46965, 4008, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 16, 11, 47715, 796, 2604, 46965, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 17, 11, 47715, 796, 2453, 62, 35138, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 18, 11, 47715, 796, 3161, 62, 35138, 198, 198, 282, 42289, 62, 17143, 7307, 796, 1976, 27498, 7, 940, 11, 362, 8, 198, 198, 282, 42289, 62, 17143, 7307, 58, 16, 11, 16, 60, 796, 1917, 13, 14016, 62, 17143, 13, 10899, 62, 259, 1343, 352, 198, 282, 42289, 62, 17143, 7307, 58, 17, 25, 19, 11, 16, 60, 796, 1917, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 7942, 198, 282, 42289, 62, 17143, 7307, 58, 20, 25, 22, 11, 16, 60, 796, 1917, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 198, 282, 42289, 62, 17143, 7307, 58, 23, 25, 437, 11, 47715, 796, 1917, 13, 3448, 273, 62, 17080, 13, 3448, 273, 62, 17143, 7307, 198, 198, 361, 5145, 330, 7015, 515, 62, 6814, 198, 220, 1991, 316, 540, 7203, 25468, 14, 464, 8326, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 383, 8326, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 282, 42289, 62, 17143, 7307, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 11862, 62, 17143, 7307, 4008, 198, 17772, 198, 220, 1991, 316, 540, 7203, 25468, 14, 464, 8326, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 383, 8326, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 282, 42289, 62, 17143, 7307, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 11862, 62, 17143, 7307, 4008, 198, 437, 628, 198, 29113, 29113, 14468, 198, 21017, 220, 220, 220, 220, 317, 12, 5631, 12, 16960, 12, 9655, 9655, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 198, 198, 330, 7015, 515, 62, 6814, 796, 2081, 198, 198, 45573, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 796, 1612, 7, 411, 62, 34409, 58, 16, 4083, 464, 8326, 62, 395, 58, 45299, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 10, 16, 25, 45573, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 10, 13664, 62, 34409, 62, 7890, 4357, 17, 8, 198, 198, 29113, 29113, 14468, 198, 2235, 220, 13610, 3033, 329, 17923, 4981, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22492, 198, 29113, 29113, 14468, 198, 198, 77, 796, 2546, 7, 7890, 62, 34409, 11, 17, 8, 198, 77, 62, 10899, 62, 259, 796, 1917, 62, 34409, 13, 14016, 62, 17143, 13, 10899, 62, 259, 628, 198, 27740, 796, 4129, 7, 45573, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 7942, 8, 198, 7890, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 796, 1976, 27498, 7, 19, 11, 77, 8, 198, 7890, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 18, 11, 47715, 796, 1366, 62, 34409, 62, 7364, 58, 27740, 10, 16, 11, 47715, 198, 7890, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 19, 11, 47715, 796, 1366, 62, 34409, 62, 727, 58, 27740, 10, 16, 11, 47715, 198, 198, 2, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 796, 685, 31197, 62, 7364, 11, 27809, 62, 727, 11, 32660, 62, 7364, 11, 32660, 62, 727, 60, 198, 198, 19282, 62, 28764, 62, 31197, 62, 7364, 796, 1976, 27498, 7, 77, 8, 198, 198, 3919, 13560, 62, 28764, 796, 1917, 13, 14016, 62, 17143, 13, 3919, 13560, 62, 395, 198, 198, 1640, 1312, 796, 352, 25, 77, 198, 220, 357, 6404, 46965, 62, 395, 62, 7364, 11, 1401, 62, 28764, 62, 4029, 62, 7364, 11, 17724, 62, 39873, 62, 4029, 62, 7364, 8, 796, 4331, 7, 7890, 62, 34409, 62, 7364, 58, 16, 25, 27740, 11, 72, 4357, 31197, 11, 3919, 13560, 62, 28764, 8, 198, 220, 357, 6404, 46965, 62, 395, 62, 727, 11, 1401, 62, 28764, 62, 4029, 11, 17724, 62, 39873, 62, 4029, 62, 727, 8, 796, 4331, 7, 7890, 62, 34409, 62, 727, 58, 16, 25, 27740, 11, 72, 4357, 31197, 11, 3919, 13560, 62, 28764, 8, 198, 220, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 16, 11, 72, 60, 796, 17724, 62, 39873, 62, 4029, 62, 7364, 58, 16, 60, 198, 220, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 17, 11, 72, 60, 796, 17724, 62, 39873, 62, 4029, 62, 727, 58, 16, 60, 198, 220, 14367, 62, 28764, 62, 31197, 62, 7364, 58, 72, 60, 796, 19862, 17034, 7, 7785, 62, 28764, 62, 4029, 62, 7364, 58, 16, 12962, 198, 437, 198, 198, 77, 1671, 62, 16960, 62, 7364, 62, 469, 80, 62, 16960, 62, 727, 796, 6632, 7, 5317, 2414, 8, 198, 77, 1671, 62, 7442, 62, 16, 796, 6632, 7, 5317, 2414, 8, 198, 77, 1671, 62, 7442, 62, 17, 796, 6632, 7, 5317, 2414, 8, 198, 198, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 17635, 198, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 17635, 198, 198, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 17635, 198, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 17635, 198, 198, 1640, 1312, 796, 352, 25, 77, 198, 220, 611, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 16, 11, 72, 60, 1875, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 17, 11, 72, 60, 198, 220, 220, 220, 299, 1671, 62, 16960, 62, 7364, 62, 469, 80, 62, 16960, 62, 727, 15853, 352, 198, 220, 220, 220, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 410, 9246, 7, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 685, 7890, 62, 34409, 58, 16, 25, 27740, 11, 72, 11208, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 16, 11, 72, 60, 14, 7890, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 17, 11, 72, 11208, 14367, 62, 28764, 62, 31197, 62, 7364, 58, 72, 11907, 8, 198, 220, 220, 220, 611, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 18, 11, 72, 60, 1875, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 19, 11, 72, 60, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 352, 8, 198, 220, 220, 220, 220, 220, 299, 1671, 62, 7442, 62, 16, 15853, 352, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 657, 8, 198, 220, 220, 220, 886, 198, 220, 2073, 198, 220, 220, 220, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 410, 9246, 7, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 685, 7890, 62, 34409, 58, 16, 25, 27740, 11, 72, 11208, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 16, 11, 72, 60, 14, 7890, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 17, 11, 72, 11208, 14367, 62, 28764, 62, 31197, 62, 7364, 58, 72, 11907, 8, 198, 220, 220, 220, 611, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 18, 11, 72, 60, 1279, 1366, 62, 31197, 62, 6404, 46965, 62, 7364, 62, 727, 58, 19, 11, 72, 60, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 352, 8, 198, 220, 220, 220, 220, 220, 299, 1671, 62, 7442, 62, 17, 15853, 352, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 657, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 628, 198, 2, 256, 504, 687, 3033, 290, 900, 5128, 1366, 198, 198, 2, 10385, 2603, 1173, 444, 284, 36016, 198, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 10385, 7, 19182, 90, 43879, 2414, 11, 17, 5512, 3447, 1758, 7, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 357, 27740, 10, 17, 11, 4129, 7, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 35514, 198, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 10385, 7, 19182, 90, 43879, 2414, 11, 17, 5512, 3447, 1758, 7, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 357, 27740, 10, 17, 11, 4129, 7, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 35514, 198, 198, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 10385, 7, 19182, 90, 43879, 2414, 11, 16, 5512, 6670, 62, 7442, 62, 16, 62, 392, 62, 18, 8, 198, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 10385, 7, 19182, 90, 43879, 2414, 11, 16, 5512, 6670, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 628, 198, 29113, 29113, 14468, 198, 2235, 220, 220, 900, 1339, 2746, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 198, 29113, 29113, 14468, 198, 198, 19738, 62, 7442, 62, 19849, 796, 366, 28664, 1, 1303, 2604, 2569, 2301, 2234, 393, 288, 83, 198, 198, 77, 1671, 62, 16960, 62, 7364, 62, 992, 62, 16960, 62, 727, 796, 299, 12, 77, 1671, 62, 16960, 62, 7364, 62, 469, 80, 62, 16960, 62, 727, 198, 198, 1676, 65, 62, 7442, 62, 16, 796, 299, 1671, 62, 7442, 62, 16, 14, 77, 1671, 62, 16960, 62, 7364, 62, 469, 80, 62, 16960, 62, 727, 198, 1676, 65, 62, 7442, 62, 17, 796, 357, 77, 1671, 62, 7442, 62, 17, 20679, 77, 1671, 62, 16960, 62, 7364, 62, 992, 62, 16960, 62, 727, 198, 1676, 65, 62, 7442, 62, 18, 796, 352, 12, 1676, 65, 62, 7442, 62, 16, 198, 1676, 65, 62, 7442, 62, 19, 796, 357, 77, 1671, 62, 16960, 62, 7364, 62, 992, 62, 16960, 62, 727, 12, 77, 1671, 62, 7442, 62, 17, 20679, 77, 1671, 62, 16960, 62, 7364, 62, 992, 62, 16960, 62, 727, 198, 1676, 65, 62, 33964, 796, 685, 1676, 65, 62, 7442, 62, 16, 26, 1676, 65, 62, 7442, 62, 17, 26, 1676, 65, 62, 7442, 62, 18, 26, 1676, 65, 62, 7442, 62, 19, 60, 198, 198, 35235, 7203, 22362, 1861, 25, 4943, 198, 35235, 7, 1676, 65, 62, 33964, 8, 198, 2, 1676, 65, 62, 33964, 796, 685, 15, 13, 17, 26, 15, 13, 17, 26, 15, 13, 23, 26, 15, 13, 23, 60, 198, 198, 361, 2922, 62, 7442, 62, 19849, 6624, 366, 38002, 3630, 1, 628, 220, 6124, 368, 375, 417, 796, 8436, 839, 24387, 7, 1676, 65, 62, 33964, 8, 198, 198, 17772, 361, 2922, 62, 7442, 62, 19849, 6624, 366, 6404, 2569, 2301, 2234, 1, 628, 220, 1612, 62, 79, 6197, 1504, 796, 1612, 7, 1169, 8326, 62, 34409, 11, 17, 38381, 47715, 628, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 1976, 27498, 7, 13664, 7, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 828, 5391, 10, 18, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 16, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 16, 60, 532, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 16, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 17, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 17, 60, 532, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 17, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 18, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 18, 60, 532, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 18, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 19, 60, 796, 19862, 17034, 7, 16345, 19510, 260, 4426, 265, 7, 32604, 62, 79, 6197, 1504, 3256, 2546, 7, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 17, 4008, 29001, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 16, 25, 18, 11, 25, 35944, 61, 17, 11, 16, 4008, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 20, 60, 796, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 19, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 437, 60, 796, 6670, 62, 7442, 62, 16, 62, 392, 62, 18, 628, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 6060, 19778, 7, 15414, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 8, 628, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 1976, 27498, 7, 13664, 7, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 828, 5391, 10, 18, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 16, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 16, 60, 532, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 16, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 17, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 17, 60, 532, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 17, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 18, 60, 796, 19862, 17034, 19510, 32604, 62, 79, 6197, 1504, 58, 18, 60, 532, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 18, 11, 25, 35944, 61, 17, 8, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 19, 60, 796, 19862, 17034, 7, 16345, 19510, 260, 4426, 265, 7, 32604, 62, 79, 6197, 1504, 3256, 2546, 7, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 17, 4008, 29001, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 16, 25, 18, 11, 25, 35944, 61, 17, 11, 16, 4008, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 20, 60, 796, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 19, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 437, 60, 796, 6670, 62, 7442, 62, 17, 62, 392, 62, 19, 628, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 6060, 19778, 7, 15414, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 628, 198, 220, 2604, 62, 2301, 62, 19849, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 1278, 76, 7, 31, 687, 4712, 7, 87, 21, 5299, 2124, 16, 1343, 2124, 17, 1343, 2124, 18, 1343, 2124, 19, 1343, 2124, 20, 828, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 11, 20828, 49070, 22784, 5972, 270, 11280, 28955, 628, 220, 2604, 62, 2301, 62, 19849, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 1278, 76, 7, 31, 687, 4712, 7, 87, 21, 5299, 2124, 16, 1343, 2124, 17, 1343, 2124, 18, 1343, 2124, 19, 1343, 2124, 20, 828, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 20828, 49070, 22784, 5972, 270, 11280, 28955, 628, 220, 27169, 62, 1640, 62, 19849, 16, 273, 18, 796, 763, 891, 7, 6404, 62, 2301, 62, 19849, 62, 7442, 62, 16, 62, 392, 62, 18, 8, 198, 220, 27169, 62, 1640, 62, 19849, 17, 273, 19, 796, 763, 891, 7, 6404, 62, 2301, 62, 19849, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 628, 198, 220, 6124, 368, 375, 417, 796, 5972, 2569, 8081, 2234, 7, 26638, 62, 1640, 62, 19849, 16, 273, 18, 11, 27169, 62, 1640, 62, 19849, 17, 273, 19, 11, 1612, 62, 79, 6197, 1504, 8, 198, 198, 17772, 361, 2922, 62, 7442, 62, 19849, 6624, 366, 28664, 1, 628, 198, 220, 1303, 20307, 1634, 0, 7, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 8, 628, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 796, 1976, 27498, 7, 13664, 7, 83, 853, 1039, 62, 7442, 62, 16, 62, 392, 62, 18, 828, 5391, 10, 17, 8, 628, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 16, 60, 796, 220, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 16, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 17, 60, 796, 220, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 17, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 18, 60, 796, 220, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 18, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 19, 60, 796, 220, 1366, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 19, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 437, 60, 796, 6670, 62, 7442, 62, 16, 62, 392, 62, 18, 628, 220, 1303, 20307, 1634, 0, 7, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 628, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 1976, 27498, 7, 13664, 7, 83, 853, 1039, 62, 7442, 62, 17, 62, 392, 62, 19, 828, 5391, 10, 17, 8, 628, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 16, 60, 796, 220, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 16, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 17, 60, 796, 220, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 17, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 18, 60, 796, 220, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 18, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 19, 60, 796, 220, 1366, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 19, 11, 47715, 198, 220, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 437, 60, 796, 6670, 62, 7442, 62, 17, 62, 392, 62, 19, 628, 628, 220, 1303, 604, 3033, 2746, 198, 220, 3033, 62, 16, 62, 392, 62, 18, 796, 10385, 7, 19182, 11, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 352, 25, 27740, 10, 16, 12962, 628, 198, 220, 14722, 62, 16, 62, 392, 62, 18, 796, 10385, 7, 19182, 11, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 45299, 886, 12962, 628, 220, 14722, 62, 16, 62, 392, 62, 18, 796, 15690, 90, 10100, 92, 7, 7857, 7, 40890, 62, 16, 62, 392, 62, 18, 11, 16, 4008, 628, 220, 329, 1312, 796, 352, 25, 13664, 7, 23912, 1424, 62, 16, 62, 392, 62, 18, 8, 198, 220, 220, 220, 611, 5128, 62, 7890, 62, 7442, 62, 16, 62, 392, 62, 18, 58, 72, 11, 437, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 14722, 62, 16, 62, 392, 62, 18, 58, 72, 60, 796, 366, 7442, 513, 1, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 14722, 62, 16, 62, 392, 62, 18, 58, 72, 60, 796, 366, 7442, 352, 1, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 2551, 21048, 16, 273, 18, 796, 1382, 62, 21048, 7, 23912, 1424, 62, 16, 62, 392, 62, 18, 11, 3033, 62, 16, 62, 392, 62, 18, 8, 628, 220, 2551, 21048, 16, 273, 18, 796, 778, 1726, 62, 21048, 7, 12501, 1166, 21048, 16, 273, 18, 11, 657, 13, 24, 8, 628, 220, 1303, 604, 3033, 2746, 198, 220, 3033, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 10385, 7, 19182, 11, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 45299, 352, 25, 27740, 10, 16, 12962, 628, 220, 14722, 62, 7442, 62, 17, 62, 392, 62, 19, 796, 15690, 90, 10100, 92, 7, 7857, 7, 40890, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 16, 4008, 628, 220, 329, 1312, 796, 352, 25, 13664, 7, 23912, 1424, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 198, 220, 220, 220, 611, 5128, 62, 7890, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 72, 11, 437, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 14722, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 72, 60, 796, 366, 7442, 604, 1, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 14722, 62, 7442, 62, 17, 62, 392, 62, 19, 58, 72, 60, 796, 366, 7442, 362, 1, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 1303, 4512, 1336, 12, 21048, 1398, 7483, 198, 220, 2551, 21048, 17, 273, 19, 796, 1382, 62, 21048, 7, 23912, 1424, 62, 7442, 62, 17, 62, 392, 62, 19, 11, 3033, 62, 7442, 62, 17, 62, 392, 62, 19, 8, 628, 220, 2551, 21048, 17, 273, 19, 796, 778, 1726, 62, 21048, 7, 12501, 1166, 21048, 17, 273, 19, 11, 657, 13, 24, 8, 628, 220, 6124, 368, 375, 417, 796, 24311, 7, 12501, 1166, 21048, 16, 273, 18, 11, 2551, 21048, 17, 273, 19, 8, 198, 198, 437, 198, 198, 2, 1057, 46460, 198, 198, 411, 796, 2488, 2435, 512, 363, 4426, 11215, 66, 7, 45573, 62, 34409, 11, 1917, 11, 27809, 11, 6124, 368, 375, 417, 11, 39849, 62, 6759, 8609, 8, 198, 198, 2, 3551, 2482, 198, 76, 11215, 66, 62, 43420, 796, 25414, 7, 411, 58, 16, 4083, 464, 8326, 62, 395, 11, 581, 58, 16, 4083, 6404, 46965, 62, 395, 11, 581, 58, 16, 4083, 13635, 62, 35138, 11, 581, 58, 16, 4083, 3448, 273, 62, 35138, 8, 198, 198, 2, 3551, 5072, 198, 464, 8326, 796, 285, 11215, 66, 62, 43420, 13, 464, 8326, 62, 395, 198, 6404, 46965, 796, 285, 11215, 66, 62, 43420, 13, 6404, 46965, 62, 395, 198, 198, 13635, 62, 35138, 796, 285, 11215, 66, 62, 43420, 13, 13635, 62, 35138, 198, 3448, 273, 62, 35138, 796, 285, 11215, 66, 62, 43420, 13, 3448, 273, 62, 35138, 198, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 796, 1976, 27498, 7, 18, 11, 4129, 7, 6404, 46965, 4008, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 16, 11, 47715, 796, 2604, 46965, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 17, 11, 47715, 796, 2453, 62, 35138, 198, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 58, 18, 11, 47715, 796, 3161, 62, 35138, 198, 198, 282, 42289, 62, 17143, 7307, 796, 1976, 27498, 7, 940, 11, 362, 8, 198, 198, 282, 42289, 62, 17143, 7307, 58, 16, 11, 16, 60, 796, 1917, 13, 14016, 62, 17143, 13, 10899, 62, 259, 1343, 352, 198, 282, 42289, 62, 17143, 7307, 58, 17, 25, 19, 11, 16, 60, 796, 1917, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 7942, 198, 282, 42289, 62, 17143, 7307, 58, 20, 25, 22, 11, 16, 60, 796, 1917, 13, 19849, 62, 17143, 13, 1169, 8326, 62, 15, 198, 282, 42289, 62, 17143, 7307, 58, 23, 25, 437, 11, 47715, 796, 1917, 13, 3448, 273, 62, 17080, 13, 3448, 273, 62, 17143, 7307, 198, 198, 361, 5145, 330, 7015, 515, 62, 6814, 198, 220, 1991, 316, 540, 7203, 25468, 14, 464, 8326, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 383, 8326, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 282, 42289, 62, 17143, 7307, 62, 67, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 11862, 62, 17143, 7307, 4008, 198, 17772, 198, 220, 1991, 316, 540, 7203, 25468, 14, 464, 8326, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 383, 8326, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 6404, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 2604, 46965, 62, 1015, 66, 62, 3448, 273, 35138, 4008, 198, 220, 1991, 316, 540, 7203, 25468, 14, 282, 42289, 62, 17143, 7307, 62, 324, 363, 4426, 11215, 66, 62, 75, 403, 5605, 13, 40664, 1600, 10385, 7, 6601, 19778, 11, 11862, 62, 17143, 7307, 4008, 198, 437, 628, 198 ]
2.379763
7,165
# ------------ Branch trace ------------ # struct BranchTrace{T <: RecordSite, B <: RecordSite} <: Trace cond::T branch::B BranchTrace(cond::T, branch::B) where {T, B} = new{T, B}(cond, branch) end # If-else branch site struct ConditionalBranchCallSite{C, A, J, L, R} <: CallSite trace::BranchTrace score::Float64 cond_kernel::C cond_args::J cond::Bool branch::A branch_args::L ret::R end get_score(cbs::ConditionalBranchCallSite) = cbs.score
[ 2, 220, 10541, 20551, 12854, 220, 10541, 1303, 198, 198, 7249, 20551, 2898, 558, 90, 51, 1279, 25, 13266, 29123, 11, 347, 1279, 25, 13266, 29123, 92, 1279, 25, 34912, 198, 220, 220, 220, 1779, 3712, 51, 198, 220, 220, 220, 8478, 3712, 33, 198, 220, 220, 220, 20551, 2898, 558, 7, 17561, 3712, 51, 11, 8478, 3712, 33, 8, 810, 1391, 51, 11, 347, 92, 796, 649, 90, 51, 11, 347, 92, 7, 17561, 11, 8478, 8, 198, 437, 198, 198, 2, 1002, 12, 17772, 8478, 2524, 198, 7249, 9724, 1859, 33, 25642, 14134, 29123, 90, 34, 11, 317, 11, 449, 11, 406, 11, 371, 92, 1279, 25, 4889, 29123, 198, 220, 220, 220, 12854, 3712, 33, 25642, 2898, 558, 198, 220, 220, 220, 4776, 3712, 43879, 2414, 198, 220, 220, 220, 1779, 62, 33885, 3712, 34, 198, 220, 220, 220, 1779, 62, 22046, 3712, 41, 198, 220, 220, 220, 1779, 3712, 33, 970, 198, 220, 220, 220, 8478, 3712, 32, 198, 220, 220, 220, 8478, 62, 22046, 3712, 43, 198, 220, 220, 220, 1005, 3712, 49, 198, 437, 198, 1136, 62, 26675, 7, 66, 1443, 3712, 25559, 1859, 33, 25642, 14134, 29123, 8, 796, 269, 1443, 13, 26675, 198 ]
2.432836
201
# Custom pretty-printing Base.show(io::IO, ::MIME"text/plain", ::ScalarQuantity) = print(io, "Scalar") Base.show(io::IO, ::MIME"text/plain", ::VectorQuantity) = print(io, "Vector") function grid_description(grid) mins = minimum(grid) maxs = maximum(grid) join(join.(zip(mins, maxs), " … "), " × " ) end function Base.show(io::IO, m::MIME"text/plain", f::AbstractPICDataStructure) show(io, m, scalarness(typeof(f))) data = unwrapdata(f) grid = getdomain(f) print(io, " with data:\n") ctx = IOContext(io, :limit=>true, :compact=>true, :displaysize => (10,50)) Base.print_array(ctx, data) print(io, "\nand $(parameterless_type(typeof(grid))) grid ") print(io, grid_description(grid)) end
[ 2, 8562, 2495, 12, 4798, 278, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 7904, 44, 12789, 1, 5239, 14, 25638, 1600, 7904, 3351, 282, 283, 31208, 8, 796, 3601, 7, 952, 11, 366, 3351, 282, 283, 4943, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 7904, 44, 12789, 1, 5239, 14, 25638, 1600, 7904, 38469, 31208, 8, 796, 3601, 7, 952, 11, 366, 38469, 4943, 198, 198, 8818, 10706, 62, 11213, 7, 25928, 8, 198, 220, 220, 220, 23550, 796, 5288, 7, 25928, 8, 198, 220, 220, 220, 3509, 82, 796, 5415, 7, 25928, 8, 628, 220, 220, 220, 4654, 7, 22179, 12195, 13344, 7, 42951, 11, 3509, 82, 828, 366, 3926, 366, 828, 366, 13958, 366, 1267, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 285, 3712, 44, 12789, 1, 5239, 14, 25638, 1600, 277, 3712, 23839, 47, 2149, 6601, 1273, 5620, 8, 198, 220, 220, 220, 905, 7, 952, 11, 285, 11, 16578, 283, 1108, 7, 4906, 1659, 7, 69, 22305, 198, 220, 220, 220, 1366, 796, 7379, 2416, 7890, 7, 69, 8, 198, 220, 220, 220, 10706, 796, 651, 27830, 7, 69, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 351, 1366, 7479, 77, 4943, 198, 220, 220, 220, 269, 17602, 796, 24418, 21947, 7, 952, 11, 1058, 32374, 14804, 7942, 11, 1058, 5589, 529, 14804, 7942, 11, 1058, 6381, 26024, 1096, 5218, 357, 940, 11, 1120, 4008, 198, 220, 220, 220, 7308, 13, 4798, 62, 18747, 7, 49464, 11, 1366, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 37082, 77, 392, 29568, 17143, 2357, 1203, 62, 4906, 7, 4906, 1659, 7, 25928, 22305, 10706, 366, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 10706, 62, 11213, 7, 25928, 4008, 198, 437, 198 ]
2.451505
299
<reponame>PseudoCodeNerd/StackOverflow.jl<filename>test/runtests.jl<gh_stars>1-10 using Test using StackOverflow qHolder = getrecentquestionsfortag() @test_nowarn qHolder[1].answer_count @test_nowarn getrecentbadgerecipients() @test_nowarn geterrors() siteinfoholder = getsiteinfo() @test_nowarn dump(siteinfoholder) @test_nowarn searchtag("julia") @test_nowarn StackOverflow.searcherror("404") aHolder = getanswers() @test typeof(aHolder[1].question_id) == Int @test_nowarn StackOverflow.getanswerfromquestion(qHolder[1]) @test_nowarn StackOverflow.getquestionfromanswer(aHolder[1]) @test_nowarn getusers() @test_nowarn getcomments() @test_nowarn getsuggested_edits() @test_nowarn StackOverflow.getmoderators() @test_nowarn StackOverflow.getopenquestions() @test_nowarn StackOverflow.getnoanswerquestions() @test_nowarn StackOverflow.getfeaturedquestions()
[ 27, 7856, 261, 480, 29, 47, 325, 12003, 10669, 45, 45744, 14, 25896, 5886, 11125, 13, 20362, 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 6208, 198, 3500, 23881, 5886, 11125, 198, 198, 80, 39, 19892, 796, 651, 49921, 6138, 507, 3319, 363, 3419, 198, 31, 9288, 62, 2197, 1501, 10662, 39, 19892, 58, 16, 4083, 41484, 62, 9127, 198, 198, 31, 9288, 62, 2197, 1501, 651, 49921, 14774, 469, 8344, 541, 2334, 3419, 198, 31, 9288, 62, 2197, 1501, 651, 48277, 3419, 198, 198, 15654, 10745, 1219, 19892, 796, 3011, 578, 10951, 3419, 198, 31, 9288, 62, 2197, 1501, 10285, 7, 15654, 10745, 1219, 19892, 8, 198, 198, 31, 9288, 62, 2197, 1501, 2989, 12985, 7203, 73, 43640, 4943, 198, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 325, 283, 2044, 1472, 7203, 26429, 4943, 198, 198, 64, 39, 19892, 796, 651, 504, 86, 364, 3419, 198, 31, 9288, 2099, 1659, 7, 64, 39, 19892, 58, 16, 4083, 25652, 62, 312, 8, 6624, 2558, 198, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 41484, 6738, 25652, 7, 80, 39, 19892, 58, 16, 12962, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 25652, 6738, 41484, 7, 64, 39, 19892, 58, 16, 12962, 198, 198, 31, 9288, 62, 2197, 1501, 651, 18417, 3419, 198, 31, 9288, 62, 2197, 1501, 651, 15944, 3419, 198, 31, 9288, 62, 2197, 1501, 3011, 29212, 276, 62, 276, 896, 3419, 198, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 4666, 263, 2024, 3419, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 9654, 6138, 507, 3419, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 3919, 41484, 6138, 507, 3419, 198, 31, 9288, 62, 2197, 1501, 23881, 5886, 11125, 13, 1136, 69, 20980, 6138, 507, 3419, 198 ]
2.726415
318