content
stringlengths 5
1.03M
| input_ids
sequencelengths 4
823k
| ratio_char_token
float64 0.4
12.5
| token_count
int64 4
823k
|
---|---|---|---|
module Exceptions
using SearchLight
export NotPersistedException, MissingDatabaseConfigurationException, DatabaseAdapterException
export UnretrievedModelException, InvalidModelException
export TypeConversionException, MissingConversionMethodException
abstract type SearchLightException <: Exception end
Base.showerror(io::IO, ex::T) where {T<:SearchLightException} = print(io, ex.msg)
struct NotPersistedException{T} <: Exception
model::T
msg
end
NotPersistedException(model) = NotPersistedException(model, "NotPersistedException: Model is not persisted \n$model")
struct MissingDatabaseConfigurationException <: Exception
msg::String
end
MissingDatabaseConfigurationException() = MissingDatabaseConfigurationException("The database configuration can not be found")
struct NotConnectedException <: Exception
msg::String
end
NotConnectedException() = NotConnectedException("SearchLight is not connected to the database")
struct DatabaseAdapterException <: Exception
msg::String
end
DatabaseAdapterException() = DatabaseAdapterException("The SearchLight database adapter has thrown an unexpected exception")
struct UnretrievedModelException{T} <: Exception
model::T
id
msg
end
UnretrievedModelException(model, id) = UnretrievedModelException(model, id, "UnretrievedModelException: the $(typeof(model)) data could not be retrieved for id $id. \nModel: \n$model")
struct InvalidModelException{T} <: Exception
model::T
errors
msg
end
InvalidModelException(model, errors) = InvalidModelException("The $(typeof(model)) model has validation errors:\n$errors")
struct TypeConversionException{T,R,X<:Exception} <: Exception
model::T
field::Symbol
value::R
exception::X
end
struct MissingConversionMethodException{T,R} <: Exception
type::T
value::R
end
end | [
21412,
1475,
11755,
198,
198,
3500,
11140,
15047,
198,
198,
39344,
1892,
30946,
6347,
16922,
11,
25639,
38105,
38149,
16922,
11,
24047,
47307,
16922,
198,
39344,
791,
1186,
28130,
17633,
16922,
11,
17665,
17633,
16922,
198,
39344,
5994,
3103,
9641,
16922,
11,
25639,
3103,
9641,
17410,
16922,
198,
198,
397,
8709,
2099,
11140,
15047,
16922,
1279,
25,
35528,
886,
198,
198,
14881,
13,
1477,
789,
1472,
7,
952,
3712,
9399,
11,
409,
3712,
51,
8,
810,
1391,
51,
27,
25,
18243,
15047,
16922,
92,
796,
3601,
7,
952,
11,
409,
13,
19662,
8,
198,
198,
7249,
1892,
30946,
6347,
16922,
90,
51,
92,
1279,
25,
35528,
198,
220,
2746,
3712,
51,
198,
220,
31456,
198,
437,
198,
3673,
30946,
6347,
16922,
7,
19849,
8,
796,
1892,
30946,
6347,
16922,
7,
19849,
11,
366,
3673,
30946,
6347,
16922,
25,
9104,
318,
407,
33264,
3467,
77,
3,
19849,
4943,
628,
198,
7249,
25639,
38105,
38149,
16922,
1279,
25,
35528,
198,
220,
31456,
3712,
10100,
198,
437,
198,
43730,
38105,
38149,
16922,
3419,
796,
25639,
38105,
38149,
16922,
7203,
464,
6831,
8398,
460,
407,
307,
1043,
4943,
628,
198,
7249,
1892,
13313,
276,
16922,
1279,
25,
35528,
198,
220,
31456,
3712,
10100,
198,
437,
198,
3673,
13313,
276,
16922,
3419,
796,
1892,
13313,
276,
16922,
7203,
18243,
15047,
318,
407,
5884,
284,
262,
6831,
4943,
628,
198,
7249,
24047,
47307,
16922,
1279,
25,
35528,
198,
220,
31456,
3712,
10100,
198,
437,
198,
38105,
47307,
16922,
3419,
796,
24047,
47307,
16922,
7203,
464,
11140,
15047,
6831,
21302,
468,
8754,
281,
10059,
6631,
4943,
628,
198,
7249,
791,
1186,
28130,
17633,
16922,
90,
51,
92,
1279,
25,
35528,
198,
220,
2746,
3712,
51,
198,
220,
4686,
198,
220,
31456,
198,
437,
198,
3118,
1186,
28130,
17633,
16922,
7,
19849,
11,
4686,
8,
796,
791,
1186,
28130,
17633,
16922,
7,
19849,
11,
4686,
11,
366,
3118,
1186,
28130,
17633,
16922,
25,
262,
29568,
4906,
1659,
7,
19849,
4008,
1366,
714,
407,
307,
29517,
329,
4686,
720,
312,
13,
3467,
77,
17633,
25,
3467,
77,
3,
19849,
4943,
628,
198,
7249,
17665,
17633,
16922,
90,
51,
92,
1279,
25,
35528,
198,
220,
2746,
3712,
51,
198,
220,
8563,
198,
220,
31456,
198,
437,
198,
44651,
17633,
16922,
7,
19849,
11,
8563,
8,
796,
17665,
17633,
16922,
7203,
464,
29568,
4906,
1659,
7,
19849,
4008,
2746,
468,
21201,
8563,
7479,
77,
3,
48277,
4943,
628,
198,
7249,
5994,
3103,
9641,
16922,
90,
51,
11,
49,
11,
55,
27,
25,
16922,
92,
1279,
25,
35528,
198,
220,
2746,
3712,
51,
198,
220,
2214,
3712,
13940,
23650,
198,
220,
1988,
3712,
49,
198,
220,
6631,
3712,
55,
198,
437,
628,
198,
7249,
25639,
3103,
9641,
17410,
16922,
90,
51,
11,
49,
92,
1279,
25,
35528,
198,
220,
2099,
3712,
51,
198,
220,
1988,
3712,
49,
198,
437,
628,
198,
437
] | 3.829787 | 470 |
using LCMCore
using CaesarLCMTypes
using Rotations, CoordinateTransformations
using MeshCat
using TransformUtils
using AprilTags
vis = Visualizer()
open(vis)
setobject!(vis["home"], Triad(1.0))
detector = AprilTagDetector()
# setobject!(vis["tag01"], Triad(0.2))
# settransform!(vis, Translation(-0.5, -0.5, 0))
function tagPicture(vis::Visualizer,msg::apriltag_t, drawdict)
# m=homography_to_pose(Array{Float64,2}(msg.homography),300,300,320,240)
m = msg.pose
tkey = "tag$(msg.id)"
if !haskey(drawdict, tkey)
setobject!(vis[tkey], Triad(0.2))
drawdict[tkey] = 1
end
wTc=LinearMap(RotX(pi/2))
cTt=Translation(m[1:3,4]...) ∘ LinearMap(Quat(m[1:3,1:3]))
settransform!(vis[tkey], wTc ∘ cTt)
#settransform!(vis[tkey], cTt)
nothing
end
function typed_callback(channel::String, msg::apriltag_t, drawdict)
tagPicture(vis,msg, drawdict)
end
drawdict = Dict{String, Int}()
lcm=LCM()
subscribe(lcm, "TEST_CHANNEL", (m,c)->typed_callback(m,c,drawdict), apriltag_t)
while true
handle(lcm)
end
| [
3500,
22228,
9655,
382,
198,
3500,
24088,
5639,
13752,
9497,
198,
3500,
18481,
602,
11,
22819,
4559,
41762,
602,
198,
3500,
47529,
21979,
198,
3500,
26981,
18274,
4487,
198,
3500,
3035,
36142,
198,
198,
4703,
796,
15612,
7509,
3419,
198,
9654,
7,
4703,
8,
198,
198,
2617,
15252,
0,
7,
4703,
14692,
11195,
33116,
7563,
324,
7,
16,
13,
15,
4008,
198,
198,
15255,
9250,
796,
3035,
24835,
11242,
9250,
3419,
198,
2,
900,
15252,
0,
7,
4703,
14692,
12985,
486,
33116,
7563,
324,
7,
15,
13,
17,
4008,
198,
2,
900,
35636,
0,
7,
4703,
11,
33322,
32590,
15,
13,
20,
11,
532,
15,
13,
20,
11,
657,
4008,
198,
198,
8818,
7621,
28070,
7,
4703,
3712,
36259,
7509,
11,
19662,
3712,
499,
81,
2326,
363,
62,
83,
11,
3197,
11600,
8,
198,
220,
220,
220,
1303,
285,
28,
26452,
4867,
62,
1462,
62,
3455,
7,
19182,
90,
43879,
2414,
11,
17,
92,
7,
19662,
13,
26452,
4867,
828,
6200,
11,
6200,
11,
19504,
11,
16102,
8,
198,
220,
220,
220,
285,
796,
31456,
13,
3455,
198,
220,
220,
220,
256,
2539,
796,
366,
12985,
3,
7,
19662,
13,
312,
16725,
198,
220,
220,
220,
611,
5145,
10134,
2539,
7,
19334,
11600,
11,
256,
2539,
8,
198,
220,
220,
220,
220,
220,
220,
220,
900,
15252,
0,
7,
4703,
58,
83,
2539,
4357,
7563,
324,
7,
15,
13,
17,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
3197,
11600,
58,
83,
2539,
60,
796,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
266,
51,
66,
28,
14993,
451,
13912,
7,
24864,
55,
7,
14415,
14,
17,
4008,
198,
220,
220,
220,
269,
51,
83,
28,
48313,
7,
76,
58,
16,
25,
18,
11,
19,
60,
23029,
18872,
246,
44800,
13912,
7,
4507,
265,
7,
76,
58,
16,
25,
18,
11,
16,
25,
18,
60,
4008,
198,
220,
220,
220,
900,
35636,
0,
7,
4703,
58,
83,
2539,
4357,
266,
51,
66,
18872,
246,
269,
51,
83,
8,
198,
220,
220,
220,
1303,
2617,
35636,
0,
7,
4703,
58,
83,
2539,
4357,
269,
51,
83,
8,
198,
220,
220,
220,
2147,
198,
437,
198,
198,
8818,
25683,
62,
47423,
7,
17620,
3712,
10100,
11,
31456,
3712,
499,
81,
2326,
363,
62,
83,
11,
3197,
11600,
8,
198,
220,
220,
220,
7621,
28070,
7,
4703,
11,
19662,
11,
3197,
11600,
8,
198,
437,
198,
198,
19334,
11600,
796,
360,
713,
90,
10100,
11,
2558,
92,
3419,
198,
198,
75,
11215,
28,
5639,
44,
3419,
198,
7266,
12522,
7,
75,
11215,
11,
366,
51,
6465,
62,
3398,
22846,
3698,
1600,
357,
76,
11,
66,
8,
3784,
774,
9124,
62,
47423,
7,
76,
11,
66,
11,
19334,
11600,
828,
46593,
2326,
363,
62,
83,
8,
628,
198,
4514,
2081,
198,
220,
220,
220,
5412,
7,
75,
11215,
8,
198,
198,
437,
198
] | 2.235169 | 472 |
@inline function discrete_derivatives(x::AbstractArray{T} where T<:Real;
d::Int=1)
@assert d ≥ 0 "discrete derivatives parameter must be greater than 0 (now it is $d)"
res = zeros(eltype(x), length(x), d+1)
@inbounds @simd for i in 1:length(x)
res[i,1] = x[i]
end
@inbounds @simd for j in 2:(d+1)
@inbounds @simd for i in 1:(length(x)-j+1)
res[i,j] = res[i+1,j-1] - res[i,j-1]
end
end
return res
end
@inline function discrete_derivative(x::AbstractArray{T} where T<:Real; d::Int=1)
derivatives = discrete_derivatives(x, d=d)
return derivatives[1:length(x)-d,d+1]
end
| [
31,
45145,
2163,
28810,
62,
1082,
452,
2929,
7,
87,
3712,
23839,
19182,
90,
51,
92,
810,
309,
27,
25,
15633,
26,
198,
220,
220,
220,
220,
220,
220,
220,
288,
3712,
5317,
28,
16,
8,
198,
220,
220,
220,
2488,
30493,
288,
26870,
657,
366,
15410,
8374,
28486,
11507,
1276,
307,
3744,
621,
657,
357,
2197,
340,
318,
720,
67,
16725,
628,
220,
220,
220,
581,
796,
1976,
27498,
7,
417,
4906,
7,
87,
828,
4129,
7,
87,
828,
288,
10,
16,
8,
628,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
1312,
287,
352,
25,
13664,
7,
87,
8,
198,
220,
220,
220,
220,
220,
220,
220,
581,
58,
72,
11,
16,
60,
796,
2124,
58,
72,
60,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
474,
287,
362,
37498,
67,
10,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
1312,
287,
352,
37498,
13664,
7,
87,
13219,
73,
10,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
58,
72,
11,
73,
60,
796,
581,
58,
72,
10,
16,
11,
73,
12,
16,
60,
532,
581,
58,
72,
11,
73,
12,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
581,
198,
437,
198,
198,
31,
45145,
2163,
28810,
62,
1082,
452,
876,
7,
87,
3712,
23839,
19182,
90,
51,
92,
810,
309,
27,
25,
15633,
26,
288,
3712,
5317,
28,
16,
8,
198,
220,
220,
220,
28486,
796,
28810,
62,
1082,
452,
2929,
7,
87,
11,
288,
28,
67,
8,
198,
220,
220,
220,
1441,
28486,
58,
16,
25,
13664,
7,
87,
13219,
67,
11,
67,
10,
16,
60,
198,
437,
198
] | 2.130719 | 306 |
using DFControl: Band, Point3, Vec3, Point, Mat3
using DFControl.Utils: searchdir
using DFControl: Atom, Element, Projection, element, position
import DFControl: Length
# Cleanup Do we really need <:abstractfloat, check this!
struct OperatorBlock{T <: AbstractFloat}
L::Vector{Matrix{Complex{T}}}
S::Vector{Matrix{Complex{T}}}
J::Vector{Matrix{Complex{T}}}
end
getindex(A::Matrix, a1::T , a2::T) where {T<:Union{Atom, Projection}} =
getindex(A, range(a1), range(a2))
getindex(A::Matrix, a::Atom) =
getindex(A, a, a)
getindex(A::Vector, a::Atom) =
getindex(A, range(a))
view(A::Matrix, a1::T, a2::T) where {T<:Union{Atom, Projection}} =
view(A, range(a1), range(a2))
view(A::Matrix, a::Union{Atom, Projection}) =
view(A, range(a), range(a))
view(A::Vector, a::Union{Atom, Projection}) =
view(A, range(a))
struct RmnBlock{T<:AbstractFloat}
R_cart ::Vec3{T}
R_cryst ::Vec3{Int}
block ::Matrix{Point3{T}}
end
const TbRmn{T} = Vector{RmnBlock{T}}
struct SiteDiagonalD{T<:AbstractFloat}
values ::Vector{T}
T ::Matrix{Complex{T}}
end
# view(D::SiteDiagonalD, at::Atom) =
# ()
# mutable struct WanStructure{T<:AbstractFloat, LT<:Length{T}} <: AbstractStructure{T, LT}
# structure ::Structure{T, LT}
# tbhamis ::Vector{TbHami{T}}
# tbRmns ::Vector{TbRmn{T}}
# end
# WanStructure(structure::Structure, wan_atoms::Vector{<:WanAtom}, tbhamis, tbrmns) =
# WanStructure(Structure(structure, wan_atoms), tbhamis, tbrmns)
# WanStructure(structure::Structure{T}, tbhamis) where T =
# WanStructure(structure, tbhamis, TbRmn{T}[])
# WanStructure(structure_::WanStructure, args...) =
# WanStructure(structure(structure_), args...)
# structure(str::WanStructure) =
# str.structure
# #TODO does not handle the SOC case. Or the case where there is up and down
# #TODO handle so that the previous job doesn't get destroyed I mean it's not necessary
# # it also doesn't agree with the paradigm of julia
# function add_wan_data(structure::AbstractStructure{T}, job_dir::String, threaded=true) where T
# searchdir(str) =
# job_dir .* DFControl.searchdir(job_dir, str)
# xsf_files = searchdir(".xsf")
# hami_files = reverse(searchdir("_hr.dat")) #such that dn is last
# r_files = reverse(searchdir("_r.dat")) #such that dn is last
# centers = [c[:center] for c in read_wannier_output(searchdir(".wout")[1])[:final_state]]
# new_atoms = WanAtom{T}[]
# for at in atoms(structure)
# push!(new_atoms, WanAtom(at, WanAtData(Wfc3D{T}[])))
# end
# t_wfcs = Vector{Array{WfcPoint3{T},3}}(undef, length(xsf_files))
# if threaded
# Threads.@threads for i=1:length(xsf_files)
# t_wfcs[i] = read_xsf_file(T, xsf_files[i])
# end
# else
# for i=1:length(xsf_files)
# t_wfcs[i] = read_xsf_file(T, xsf_files[i])
# end
# end
# for (i, (wfc, c)) in enumerate(zip(t_wfcs, centers))
# t_at = new_atoms[1]
# for at in new_atoms[2:end]
# if norm(position(at) - c) < norm(position(t_at) - c)
# t_at = at
# end
# end
# push!(wfcs(t_at), wfc)
# end
# tbhamis = Vector{TbHami{T}}(undef, length(hami_files))
# tbrmns = Vector{TbRmn{T}}(undef, length(r_files))
# Threads.@threads for i=1:length(hami_files)
# tbhamis[i] = readhami(hami_files[i], structure)
# end
# Threads.@threads for i=1:length(r_files)
# tbrmns[i] = read_rmn_file(r_files[i], structure)
# end
# return WanStructure(structure, new_atoms, tbhamis, tbrmns)
# end
# function add_wan_data(job::Job)
# job.structure = add_wan_data(job.structure, job.local_dir)
# return job
# end
# """
# setsoc!(structure::Structure, socs...)
# Accepts a varargs list of atom symbols => soc,
# which will set the soc of the atoms in the structure to the specified values.
# """
# function setsoc!(structure::AbstractStructure{T}, socs...) where T
# for (at, soc) in socs
# for str_at in atoms(structure)
# if name(str_at) == at
# setlsoc!(str_at, T(soc))
# end
# end
# end
# return structure
# end
# """
# setsoc!(job::Job, socs...)
# Accepts a varargs list of atom symbols => soc,
# which will set the soc of the atoms in the job structure to the specified values.
# """
# function setsoc!(job::Job, socs...)
# setsoc!(job.structure, socs...)
# return job
# end
# """
# wfcs(structure::WanStructure)
# Returns the wavefunctions that are linked to the atoms inside the structure.
# """
# function wfcs(structure::WanStructure{T}) where T
# out = Array{WfcPoint3{T}, 3}[]
# for at in atoms(structure)
# for wfc in wfcs(at)
# push!(out, wfc)
# end
# end
# return out
# end
# function getwandim(structure::WanStructure{T}) where T
# dim = 0
# for at in atoms(structure)
# dim += length(wfcs(at))
# end
# return dim
# end
struct ThreadCache{T}
caches::Vector{T}
ThreadCache(orig::T) where {T} =
new{T}([deepcopy(orig) for i = 1:nthreads()])
end
@inline cache(t::ThreadCache) =
t.caches[threadid()]
for f in (:getindex, :setindex!, :copyto!, :size, :length, :iterate, :sum, :view, :fill!)
@eval Base.$f(t::ThreadCache{<:AbstractArray}, i...) = Base.$f(cache(t), i...)
end
for op in (:+, :-, :*, :/)
@eval $op(t::ThreadCache{T}, v::T) where {T} = $op(cache(t), v)
@eval $op(v::T, t::ThreadCache{T}) where {T} = $op(v, cache(t))
end
fillall!(t::ThreadCache{<:AbstractArray{T}}, v::T) where {T} =
fill!.(t.caches, (v,))
gather(t::ThreadCache) = sum(t.caches)
LinearAlgebra.mul!(t1::ThreadCache{T}, v::T, t2::ThreadCache{T}) where {T<:AbstractArray} =
mul!(cache(t1), v, cache(t2))
LinearAlgebra.mul!(t1::T, v::T, t2::ThreadCache{T}) where {T<:AbstractArray} =
mul!(t1, v, cache(t2))
LinearAlgebra.mul!(t1::ThreadCache{T}, t2::ThreadCache{T}, t3::ThreadCache{T}) where {T<:AbstractArray} =
mul!(cache(t1), cache(t2), cache(t3))
LinearAlgebra.adjoint!(t1::ThreadCache{T}, v::T) where {T} =
adjoint!(cache(t1), v)
####
#### Broadcasting
####
Base.ndims(::Type{ThreadCache{T}}) where {T<:AbstractArray} =
ndims(T)
# Base.broadcast(f, As::ThreadCache...) =
# broadcast(f, getindex.(getfield.(As, :caches), threadid()))
Base.Broadcast.broadcastable(tc::ThreadCache{<:AbstractArray}) =
cache(tc)
# Base.Broadcast.BroadcastStyle(::Type{ThreadCache{T}}) where {T<:AbstractArray} =
# Base.Broadcast.BroadcastStyle(T)
| [
3500,
36323,
15988,
25,
10243,
11,
6252,
18,
11,
38692,
18,
11,
6252,
11,
6550,
18,
198,
3500,
36323,
15988,
13,
18274,
4487,
25,
2989,
15908,
198,
3500,
36323,
15988,
25,
33102,
11,
11703,
11,
4935,
295,
11,
5002,
11,
2292,
220,
198,
11748,
36323,
15988,
25,
22313,
198,
2,
5985,
929,
2141,
356,
1107,
761,
1279,
25,
397,
8709,
22468,
11,
2198,
428,
0,
198,
220,
198,
198,
7249,
35946,
12235,
90,
51,
1279,
25,
27741,
43879,
92,
198,
197,
43,
3712,
38469,
90,
46912,
90,
5377,
11141,
90,
51,
42535,
198,
197,
50,
3712,
38469,
90,
46912,
90,
5377,
11141,
90,
51,
42535,
198,
220,
220,
220,
449,
3712,
38469,
90,
46912,
90,
5377,
11141,
90,
51,
42535,
198,
437,
198,
198,
1136,
9630,
7,
32,
3712,
46912,
11,
257,
16,
3712,
51,
837,
257,
17,
3712,
51,
8,
810,
1391,
51,
27,
25,
38176,
90,
2953,
296,
11,
4935,
295,
11709,
796,
198,
197,
1136,
9630,
7,
32,
11,
2837,
7,
64,
16,
828,
2837,
7,
64,
17,
4008,
198,
198,
1136,
9630,
7,
32,
3712,
46912,
11,
257,
3712,
2953,
296,
8,
796,
198,
197,
1136,
9630,
7,
32,
11,
257,
11,
257,
8,
198,
198,
1136,
9630,
7,
32,
3712,
38469,
11,
257,
3712,
2953,
296,
8,
796,
198,
197,
1136,
9630,
7,
32,
11,
2837,
7,
64,
4008,
198,
198,
1177,
7,
32,
3712,
46912,
11,
257,
16,
3712,
51,
11,
257,
17,
3712,
51,
8,
810,
1391,
51,
27,
25,
38176,
90,
2953,
296,
11,
4935,
295,
11709,
796,
198,
197,
1177,
7,
32,
11,
2837,
7,
64,
16,
828,
2837,
7,
64,
17,
4008,
198,
198,
1177,
7,
32,
3712,
46912,
11,
257,
3712,
38176,
90,
2953,
296,
11,
4935,
295,
30072,
796,
198,
197,
1177,
7,
32,
11,
2837,
7,
64,
828,
2837,
7,
64,
4008,
198,
198,
1177,
7,
32,
3712,
38469,
11,
257,
3712,
38176,
90,
2953,
296,
11,
4935,
295,
30072,
796,
198,
197,
1177,
7,
32,
11,
2837,
7,
64,
4008,
198,
198,
7249,
371,
10295,
12235,
90,
51,
27,
25,
23839,
43879,
92,
198,
220,
220,
220,
371,
62,
26674,
220,
7904,
53,
721,
18,
90,
51,
92,
198,
220,
220,
220,
371,
62,
20470,
301,
7904,
53,
721,
18,
90,
5317,
92,
198,
220,
220,
220,
2512,
220,
220,
7904,
46912,
90,
12727,
18,
90,
51,
11709,
198,
437,
198,
198,
9979,
309,
65,
49,
10295,
90,
51,
92,
796,
20650,
90,
49,
10295,
12235,
90,
51,
11709,
198,
198,
7249,
14413,
18683,
27923,
35,
90,
51,
27,
25,
23839,
43879,
92,
198,
197,
27160,
7904,
38469,
90,
51,
92,
198,
197,
51,
220,
220,
220,
220,
220,
7904,
46912,
90,
5377,
11141,
90,
51,
11709,
198,
437,
198,
198,
2,
1570,
7,
35,
3712,
29123,
18683,
27923,
35,
11,
379,
3712,
2953,
296,
8,
796,
198,
2,
220,
197,
3419,
628,
198,
2,
4517,
540,
2878,
33242,
1273,
5620,
90,
51,
27,
25,
23839,
43879,
11,
34146,
27,
25,
24539,
90,
51,
11709,
1279,
25,
27741,
1273,
5620,
90,
51,
11,
34146,
92,
198,
2,
220,
220,
220,
220,
4645,
7904,
1273,
5620,
90,
51,
11,
34146,
92,
198,
2,
220,
220,
220,
220,
256,
65,
2763,
271,
220,
220,
7904,
38469,
90,
51,
65,
39,
6277,
90,
51,
11709,
198,
2,
220,
220,
220,
220,
256,
65,
49,
76,
5907,
220,
220,
220,
7904,
38469,
90,
51,
65,
49,
10295,
90,
51,
11709,
198,
2,
886,
198,
198,
2,
33242,
1273,
5620,
7,
301,
5620,
3712,
1273,
5620,
11,
266,
272,
62,
265,
3150,
3712,
38469,
90,
27,
25,
45681,
2953,
296,
5512,
256,
65,
2763,
271,
11,
256,
1671,
76,
5907,
8,
796,
198,
2,
220,
220,
220,
220,
33242,
1273,
5620,
7,
1273,
5620,
7,
301,
5620,
11,
266,
272,
62,
265,
3150,
828,
256,
65,
2763,
271,
11,
256,
1671,
76,
5907,
8,
198,
198,
2,
33242,
1273,
5620,
7,
301,
5620,
3712,
1273,
5620,
90,
51,
5512,
256,
65,
2763,
271,
8,
810,
309,
796,
198,
2,
220,
220,
220,
220,
33242,
1273,
5620,
7,
301,
5620,
11,
256,
65,
2763,
271,
11,
309,
65,
49,
10295,
90,
51,
92,
58,
12962,
198,
2,
33242,
1273,
5620,
7,
301,
5620,
62,
3712,
45681,
1273,
5620,
11,
26498,
23029,
796,
198,
2,
220,
220,
220,
220,
33242,
1273,
5620,
7,
301,
5620,
7,
301,
5620,
62,
828,
26498,
23029,
198,
198,
2,
4645,
7,
2536,
3712,
45681,
1273,
5620,
8,
796,
198,
197,
2,
965,
13,
301,
5620,
198,
2,
1303,
51,
3727,
46,
857,
407,
5412,
262,
31430,
1339,
13,
1471,
262,
1339,
810,
612,
318,
510,
290,
866,
198,
2,
1303,
51,
3727,
46,
5412,
523,
326,
262,
2180,
1693,
1595,
470,
651,
6572,
314,
1612,
340,
338,
407,
3306,
198,
2,
1303,
220,
220,
220,
220,
340,
635,
1595,
470,
4236,
351,
262,
23457,
286,
474,
43640,
198,
2,
2163,
751,
62,
8149,
62,
7890,
7,
301,
5620,
3712,
23839,
1273,
5620,
90,
51,
5512,
1693,
62,
15908,
3712,
10100,
11,
40945,
28,
7942,
8,
810,
309,
198,
2,
220,
220,
220,
220,
2989,
15908,
7,
2536,
8,
796,
198,
197,
2,
1693,
62,
15908,
764,
9,
36323,
15988,
13,
12947,
15908,
7,
21858,
62,
15908,
11,
965,
8,
198,
2,
220,
220,
220,
220,
2124,
28202,
62,
16624,
220,
220,
796,
2989,
15908,
7,
1911,
87,
28202,
4943,
198,
2,
220,
220,
220,
220,
289,
6277,
62,
16624,
220,
796,
9575,
7,
12947,
15908,
7203,
62,
11840,
13,
19608,
48774,
1303,
10508,
326,
288,
77,
318,
938,
198,
2,
220,
220,
220,
220,
374,
62,
16624,
220,
220,
220,
220,
796,
9575,
7,
12947,
15908,
7203,
62,
81,
13,
19608,
48774,
1303,
10508,
326,
288,
77,
318,
938,
198,
2,
220,
220,
220,
220,
10399,
220,
220,
220,
220,
796,
685,
66,
58,
25,
16159,
60,
329,
269,
287,
1100,
62,
86,
1236,
959,
62,
22915,
7,
12947,
15908,
7,
1911,
86,
448,
4943,
58,
16,
12962,
58,
25,
20311,
62,
5219,
11907,
198,
2,
220,
220,
220,
220,
649,
62,
265,
3150,
796,
33242,
2953,
296,
90,
51,
92,
21737,
198,
2,
220,
220,
220,
220,
329,
379,
287,
23235,
7,
301,
5620,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
3605,
62,
265,
3150,
11,
33242,
2953,
296,
7,
265,
11,
33242,
2953,
6601,
7,
54,
16072,
18,
35,
90,
51,
92,
21737,
22305,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
256,
62,
86,
69,
6359,
796,
20650,
90,
19182,
90,
54,
16072,
12727,
18,
90,
51,
5512,
18,
11709,
7,
917,
891,
11,
4129,
7,
87,
28202,
62,
16624,
4008,
198,
2,
220,
220,
220,
220,
611,
40945,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
14122,
82,
13,
31,
16663,
82,
329,
1312,
28,
16,
25,
13664,
7,
87,
28202,
62,
16624,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
86,
69,
6359,
58,
72,
60,
796,
1100,
62,
87,
28202,
62,
7753,
7,
51,
11,
2124,
28202,
62,
16624,
58,
72,
12962,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
2073,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
28,
16,
25,
13664,
7,
87,
28202,
62,
16624,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
86,
69,
6359,
58,
72,
60,
796,
1100,
62,
87,
28202,
62,
7753,
7,
51,
11,
2124,
28202,
62,
16624,
58,
72,
12962,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
886,
198,
198,
2,
220,
220,
220,
220,
329,
357,
72,
11,
357,
86,
16072,
11,
269,
4008,
287,
27056,
378,
7,
13344,
7,
83,
62,
86,
69,
6359,
11,
10399,
4008,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
265,
796,
649,
62,
265,
3150,
58,
16,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
379,
287,
649,
62,
265,
3150,
58,
17,
25,
437,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2593,
7,
9150,
7,
265,
8,
532,
269,
8,
1279,
2593,
7,
9150,
7,
83,
62,
265,
8,
532,
269,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
265,
796,
379,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
86,
69,
6359,
7,
83,
62,
265,
828,
266,
16072,
8,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
256,
65,
2763,
271,
796,
20650,
90,
51,
65,
39,
6277,
90,
51,
11709,
7,
917,
891,
11,
4129,
7,
2763,
72,
62,
16624,
4008,
198,
2,
220,
220,
220,
220,
256,
1671,
76,
5907,
220,
796,
20650,
90,
51,
65,
49,
10295,
90,
51,
11709,
7,
917,
891,
11,
4129,
7,
81,
62,
16624,
4008,
198,
2,
220,
220,
220,
220,
14122,
82,
13,
31,
16663,
82,
329,
1312,
28,
16,
25,
13664,
7,
2763,
72,
62,
16624,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
256,
65,
2763,
271,
58,
72,
60,
796,
1100,
2763,
72,
7,
2763,
72,
62,
16624,
58,
72,
4357,
4645,
8,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
14122,
82,
13,
31,
16663,
82,
329,
1312,
28,
16,
25,
13664,
7,
81,
62,
16624,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
256,
1671,
76,
5907,
58,
72,
60,
796,
1100,
62,
81,
10295,
62,
7753,
7,
81,
62,
16624,
58,
72,
4357,
4645,
8,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
1441,
33242,
1273,
5620,
7,
301,
5620,
11,
649,
62,
265,
3150,
11,
256,
65,
2763,
271,
11,
256,
1671,
76,
5907,
8,
198,
2,
886,
198,
198,
2,
2163,
751,
62,
8149,
62,
7890,
7,
21858,
3712,
33308,
8,
198,
2,
220,
220,
220,
220,
1693,
13,
301,
5620,
796,
751,
62,
8149,
62,
7890,
7,
21858,
13,
301,
5620,
11,
1693,
13,
12001,
62,
15908,
8,
198,
2,
220,
220,
220,
220,
1441,
1693,
198,
2,
886,
198,
198,
2,
37227,
198,
2,
220,
220,
220,
220,
5621,
420,
0,
7,
301,
5620,
3712,
1273,
5620,
11,
1307,
82,
23029,
198,
198,
2,
21699,
82,
257,
1401,
22046,
1351,
286,
22037,
14354,
5218,
1307,
11,
198,
2,
543,
481,
900,
262,
1307,
286,
262,
23235,
287,
262,
4645,
284,
262,
7368,
3815,
13,
198,
2,
37227,
198,
2,
2163,
5621,
420,
0,
7,
301,
5620,
3712,
23839,
1273,
5620,
90,
51,
5512,
1307,
82,
23029,
810,
309,
198,
2,
220,
220,
220,
220,
329,
357,
265,
11,
1307,
8,
287,
1307,
82,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
965,
62,
265,
287,
23235,
7,
301,
5620,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1438,
7,
2536,
62,
265,
8,
6624,
379,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
900,
7278,
420,
0,
7,
2536,
62,
265,
11,
309,
7,
35634,
4008,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
1441,
4645,
198,
2,
886,
198,
198,
2,
37227,
198,
2,
220,
220,
220,
220,
5621,
420,
0,
7,
21858,
3712,
33308,
11,
1307,
82,
23029,
198,
198,
2,
21699,
82,
257,
1401,
22046,
1351,
286,
22037,
14354,
5218,
1307,
11,
198,
2,
543,
481,
900,
262,
1307,
286,
262,
23235,
287,
262,
1693,
4645,
284,
262,
7368,
3815,
13,
198,
2,
37227,
198,
2,
2163,
5621,
420,
0,
7,
21858,
3712,
33308,
11,
1307,
82,
23029,
198,
2,
220,
220,
220,
220,
5621,
420,
0,
7,
21858,
13,
301,
5620,
11,
1307,
82,
23029,
198,
2,
220,
220,
220,
220,
1441,
1693,
198,
2,
886,
198,
198,
2,
37227,
198,
2,
220,
220,
220,
220,
266,
69,
6359,
7,
301,
5620,
3712,
45681,
1273,
5620,
8,
198,
198,
2,
16409,
262,
6769,
12543,
2733,
326,
389,
6692,
284,
262,
23235,
2641,
262,
4645,
13,
198,
2,
37227,
198,
2,
2163,
266,
69,
6359,
7,
301,
5620,
3712,
45681,
1273,
5620,
90,
51,
30072,
810,
309,
198,
2,
220,
220,
220,
220,
503,
796,
15690,
90,
54,
16072,
12727,
18,
90,
51,
5512,
513,
92,
21737,
198,
2,
220,
220,
220,
220,
329,
379,
287,
23235,
7,
301,
5620,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
266,
16072,
287,
266,
69,
6359,
7,
265,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
448,
11,
266,
16072,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
1441,
503,
198,
2,
886,
198,
198,
2,
2163,
651,
86,
392,
320,
7,
301,
5620,
3712,
45681,
1273,
5620,
90,
51,
30072,
810,
309,
198,
2,
220,
220,
220,
220,
5391,
796,
657,
198,
2,
220,
220,
220,
220,
329,
379,
287,
23235,
7,
301,
5620,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
5391,
15853,
4129,
7,
86,
69,
6359,
7,
265,
4008,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
220,
220,
1441,
5391,
198,
2,
886,
198,
198,
7249,
14122,
30562,
90,
51,
92,
198,
197,
66,
3694,
3712,
38469,
90,
51,
92,
198,
197,
16818,
30562,
7,
11612,
3712,
51,
8,
810,
1391,
51,
92,
796,
198,
197,
197,
3605,
90,
51,
92,
26933,
22089,
30073,
7,
11612,
8,
329,
1312,
796,
352,
25,
77,
16663,
82,
3419,
12962,
198,
437,
198,
198,
31,
45145,
12940,
7,
83,
3712,
16818,
30562,
8,
796,
198,
197,
83,
13,
66,
3694,
58,
16663,
312,
3419,
60,
198,
198,
1640,
277,
287,
357,
25,
1136,
9630,
11,
1058,
2617,
9630,
28265,
1058,
30073,
1462,
28265,
1058,
7857,
11,
1058,
13664,
11,
1058,
2676,
378,
11,
1058,
16345,
11,
1058,
1177,
11,
1058,
20797,
8133,
198,
197,
31,
18206,
7308,
48082,
69,
7,
83,
3712,
16818,
30562,
90,
27,
25,
23839,
19182,
5512,
1312,
23029,
796,
7308,
48082,
69,
7,
23870,
7,
83,
828,
1312,
23029,
198,
437,
198,
198,
1640,
1034,
287,
357,
25,
28200,
1058,
20995,
1058,
25666,
1058,
34729,
198,
197,
31,
18206,
720,
404,
7,
83,
3712,
16818,
30562,
90,
51,
5512,
410,
3712,
51,
8,
810,
1391,
51,
92,
796,
720,
404,
7,
23870,
7,
83,
828,
410,
8,
198,
197,
31,
18206,
720,
404,
7,
85,
3712,
51,
11,
256,
3712,
16818,
30562,
90,
51,
30072,
810,
1391,
51,
92,
796,
720,
404,
7,
85,
11,
12940,
7,
83,
4008,
198,
437,
198,
198,
20797,
439,
0,
7,
83,
3712,
16818,
30562,
90,
27,
25,
23839,
19182,
90,
51,
92,
5512,
410,
3712,
51,
8,
220,
220,
810,
1391,
51,
92,
796,
198,
197,
20797,
0,
12195,
83,
13,
66,
3694,
11,
357,
85,
11,
4008,
198,
198,
70,
1032,
7,
83,
3712,
16818,
30562,
8,
796,
2160,
7,
83,
13,
66,
3694,
8,
198,
198,
14993,
451,
2348,
29230,
13,
76,
377,
0,
7,
83,
16,
3712,
16818,
30562,
90,
51,
5512,
410,
3712,
51,
11,
256,
17,
3712,
16818,
30562,
90,
51,
30072,
810,
1391,
51,
27,
25,
23839,
19182,
92,
796,
198,
197,
76,
377,
0,
7,
23870,
7,
83,
16,
828,
410,
11,
12940,
7,
83,
17,
4008,
198,
198,
14993,
451,
2348,
29230,
13,
76,
377,
0,
7,
83,
16,
3712,
51,
11,
410,
3712,
51,
11,
256,
17,
3712,
16818,
30562,
90,
51,
30072,
810,
1391,
51,
27,
25,
23839,
19182,
92,
796,
198,
197,
76,
377,
0,
7,
83,
16,
11,
410,
11,
12940,
7,
83,
17,
4008,
198,
198,
14993,
451,
2348,
29230,
13,
76,
377,
0,
7,
83,
16,
3712,
16818,
30562,
90,
51,
5512,
256,
17,
3712,
16818,
30562,
90,
51,
5512,
256,
18,
3712,
16818,
30562,
90,
51,
30072,
810,
1391,
51,
27,
25,
23839,
19182,
92,
796,
198,
197,
76,
377,
0,
7,
23870,
7,
83,
16,
828,
12940,
7,
83,
17,
828,
12940,
7,
83,
18,
4008,
198,
198,
14993,
451,
2348,
29230,
13,
41255,
1563,
0,
7,
83,
16,
3712,
16818,
30562,
90,
51,
5512,
410,
3712,
51,
8,
810,
1391,
51,
92,
796,
198,
197,
41255,
1563,
0,
7,
23870,
7,
83,
16,
828,
410,
8,
198,
198,
4242,
198,
4242,
32250,
198,
4242,
198,
14881,
13,
358,
12078,
7,
3712,
6030,
90,
16818,
30562,
90,
51,
11709,
8,
810,
1391,
51,
27,
25,
23839,
19182,
92,
796,
198,
197,
358,
12078,
7,
51,
8,
198,
1303,
7308,
13,
36654,
2701,
7,
69,
11,
1081,
3712,
16818,
30562,
23029,
796,
198,
197,
2,
7025,
7,
69,
11,
651,
9630,
12195,
1136,
3245,
12195,
1722,
11,
1058,
66,
3694,
828,
4704,
312,
3419,
4008,
198,
14881,
13,
30507,
2701,
13,
36654,
2701,
540,
7,
23047,
3712,
16818,
30562,
90,
27,
25,
23839,
19182,
30072,
796,
198,
197,
23870,
7,
23047,
8,
198,
2,
7308,
13,
30507,
2701,
13,
30507,
2701,
21466,
7,
3712,
6030,
90,
16818,
30562,
90,
51,
11709,
8,
810,
1391,
51,
27,
25,
23839,
19182,
92,
796,
198,
197,
2,
7308,
13,
30507,
2701,
13,
30507,
2701,
21466,
7,
51,
8,
628,
628,
198
] | 2.207362 | 2,961 |
import Pkg;
Pkg.add("MLJ")
## 通过 clone 的方式安装引入
Pkg.add("mocha")
Pkg.add("DataFrames")
Pkg.add("Plots")
Pkg.add("Flux")
Pkg.add("ECharts") | [
11748,
350,
10025,
26,
198,
198,
47,
10025,
13,
2860,
7203,
5805,
41,
4943,
198,
198,
2235,
16268,
222,
248,
32573,
229,
17271,
13328,
248,
226,
43095,
28156,
237,
22522,
231,
35318,
28156,
243,
17739,
98,
198,
47,
10025,
13,
2860,
7203,
76,
5374,
64,
4943,
198,
198,
47,
10025,
13,
2860,
7203,
6601,
35439,
4943,
198,
198,
47,
10025,
13,
2860,
7203,
3646,
1747,
4943,
198,
198,
47,
10025,
13,
2860,
7203,
37,
22564,
4943,
198,
198,
47,
10025,
13,
2860,
7203,
36,
1925,
5889,
4943
] | 1.643678 | 87 |
# ------------------------------------------------------
_sep_freeids(freeid, freeids...) = (freeid, freeids)
function _fva_range(net, box, freeid)
lb, ub = fva(net, freeid)
ran = dim_range(box, freeid)
lbi = findapproxi(lb, ran)
ubi = findapproxi(ub, ran)
return ran[lbi:ubi]
end
# remove unfeasibles and trivial
_is_feasible(net) = any(fba(net) .!= 0.0)
function _fill_subspace!(containers::Vector,
net::MetNet, box, left_freeids, head;
filter::Function
)
curr_freeid, left_freeids = _sep_freeids(left_freeids...)
curr_free_range = _fva_range(net, box, curr_freeid)
if isempty(left_freeids)
# base case
for cur_freev in curr_free_range
freev = [head; cur_freev]
!filter(net, freev) && continue
# all(iszero.(freev)) && continue # remove trivial
for (vi, containeri) in zip(freev, containers)
push!(containeri, vi)
end
end
else
# recursive step
for cur_freev in curr_free_range
_head = [head; cur_freev]
fixxing(net, curr_freeid, cur_freev) do
_fill_subspace!(containers, net, box, left_freeids, _head; filter)
end
end
end
end
# one container per dim
_build_containers(freeids, jump_size = 10_000) = [Container{Float64}(jump_size) for free in freeids]
function _containers_pool_size(freeids, containerss_pool)
lens = zeros(Int, length(freeids))
for containers in containerss_pool
for i in eachindex(freeids)
lens[i] += length(containers[i])
end
end
return lens
end
function _reduce_containers_pool!(containerss_pool)
# one per thread
acc_containers = Dict()
for containers in containerss_pool
# one vector per dimension
for i in eachindex(containers)
!haskey(acc_containers, i) && (acc_containers[i] = containers[i]; continue)
push!(acc_containers[i], vec!(containers[i])...)
empty!(containers[i])
end
end
map(1:length(acc_containers)) do i
vec!(acc_containers[i])
end
end
function subspace(net::MetNet, box::BoxGrid, freeids::Vector{Symbol};
# stoitof = 0.01,
filter::Function = (net, v) -> true,
nthrs::Int = nthreads()
)
# Base
if length(freeids) == 1
_fill_subspace!(_build_containers(freeids), net, box, freeids, Float64[]; filter)
end
first_freeid, left_freeids = _sep_freeids(freeids...)
first_free_range = _fva_range(net, box, first_freeid)
# recursive step
containerss_pool = [_build_containers(freeids) for _ in 1:nthrs]
nets_pool = [deepcopy(net) for _ in 1:nthrs]
prog = Progress(length(first_free_range); dt = 0.5, desc = "Collecting... ")
function showvalues()
estimation = sum(_containers_pool_size(freeids, containerss_pool))
return [
("polV estimation", estimation),
("thid", threadid())
]
end
@threads for cur_freev in first_free_range
thid = threadid()
containers = containerss_pool[thid]
net_th = nets_pool[thid]
head = [cur_freev]
fixxing(net_th, first_freeid, cur_freev) do
_fill_subspace!(containers, net_th, box, left_freeids, head; filter)
end
next!(prog; showvalues)
end
finish!(prog)
_reduce_containers_pool!(containerss_pool)
end | [
2,
20368,
19351,
438,
198,
62,
325,
79,
62,
5787,
2340,
7,
5787,
312,
11,
1479,
2340,
23029,
796,
357,
5787,
312,
11,
1479,
2340,
8,
198,
198,
8818,
4808,
69,
6862,
62,
9521,
7,
3262,
11,
3091,
11,
1479,
312,
8,
198,
220,
220,
220,
18360,
11,
20967,
796,
277,
6862,
7,
3262,
11,
1479,
312,
8,
198,
220,
220,
220,
4966,
796,
5391,
62,
9521,
7,
3524,
11,
1479,
312,
8,
198,
220,
220,
220,
300,
8482,
796,
1064,
1324,
13907,
72,
7,
23160,
11,
4966,
8,
198,
220,
220,
220,
334,
8482,
796,
1064,
1324,
13907,
72,
7,
549,
11,
4966,
8,
198,
220,
220,
220,
1441,
4966,
58,
75,
8482,
25,
29603,
60,
198,
437,
198,
198,
2,
4781,
3684,
30412,
18764,
290,
20861,
198,
62,
271,
62,
5036,
292,
856,
7,
3262,
8,
796,
597,
7,
69,
7012,
7,
3262,
8,
764,
0,
28,
657,
13,
15,
8,
198,
8818,
4808,
20797,
62,
7266,
13200,
0,
7,
3642,
50221,
3712,
38469,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2010,
3712,
9171,
7934,
11,
3091,
11,
1364,
62,
5787,
2340,
11,
1182,
26,
198,
220,
220,
220,
220,
220,
220,
220,
8106,
3712,
22203,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1090,
81,
62,
5787,
312,
11,
1364,
62,
5787,
2340,
796,
4808,
325,
79,
62,
5787,
2340,
7,
9464,
62,
5787,
2340,
23029,
198,
220,
220,
220,
1090,
81,
62,
5787,
62,
9521,
796,
4808,
69,
6862,
62,
9521,
7,
3262,
11,
3091,
11,
1090,
81,
62,
5787,
312,
8,
628,
220,
220,
220,
611,
318,
28920,
7,
9464,
62,
5787,
2340,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2779,
1339,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1090,
62,
5787,
85,
287,
1090,
81,
62,
5787,
62,
9521,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1479,
85,
796,
685,
2256,
26,
1090,
62,
5787,
85,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
24455,
7,
3262,
11,
1479,
85,
8,
11405,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
477,
7,
271,
22570,
12195,
5787,
85,
4008,
11405,
2555,
1303,
4781,
20861,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
357,
8903,
11,
9290,
72,
8,
287,
19974,
7,
5787,
85,
11,
16472,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
34924,
72,
11,
25357,
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,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
45115,
2239,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1090,
62,
5787,
85,
287,
1090,
81,
62,
5787,
62,
9521,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
2256,
796,
685,
2256,
26,
1090,
62,
5787,
85,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4259,
87,
278,
7,
3262,
11,
1090,
81,
62,
5787,
312,
11,
1090,
62,
5787,
85,
8,
466,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
20797,
62,
7266,
13200,
0,
7,
3642,
50221,
11,
2010,
11,
3091,
11,
1364,
62,
5787,
2340,
11,
4808,
2256,
26,
8106,
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,
530,
9290,
583,
5391,
198,
62,
11249,
62,
3642,
50221,
7,
5787,
2340,
11,
4391,
62,
7857,
796,
838,
62,
830,
8,
796,
685,
29869,
90,
43879,
2414,
92,
7,
43327,
62,
7857,
8,
329,
1479,
287,
1479,
2340,
60,
198,
198,
8818,
4808,
3642,
50221,
62,
7742,
62,
7857,
7,
5787,
2340,
11,
16472,
82,
62,
7742,
8,
198,
220,
220,
220,
10317,
796,
1976,
27498,
7,
5317,
11,
4129,
7,
5787,
2340,
4008,
198,
220,
220,
220,
329,
16472,
287,
16472,
82,
62,
7742,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
1123,
9630,
7,
5787,
2340,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10317,
58,
72,
60,
15853,
4129,
7,
3642,
50221,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
10317,
198,
437,
198,
198,
8818,
4808,
445,
7234,
62,
3642,
50221,
62,
7742,
0,
7,
3642,
50221,
82,
62,
7742,
8,
628,
220,
220,
220,
1303,
530,
583,
4704,
198,
220,
220,
220,
697,
62,
3642,
50221,
796,
360,
713,
3419,
198,
220,
220,
220,
329,
16472,
287,
16472,
82,
62,
7742,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
530,
15879,
583,
15793,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
1123,
9630,
7,
3642,
50221,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
10134,
2539,
7,
4134,
62,
3642,
50221,
11,
1312,
8,
11405,
357,
4134,
62,
3642,
50221,
58,
72,
60,
796,
16472,
58,
72,
11208,
2555,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
4134,
62,
3642,
50221,
58,
72,
4357,
43030,
0,
7,
3642,
50221,
58,
72,
12962,
23029,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6565,
0,
7,
3642,
50221,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
3975,
7,
16,
25,
13664,
7,
4134,
62,
3642,
50221,
4008,
466,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
43030,
0,
7,
4134,
62,
3642,
50221,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
850,
13200,
7,
3262,
3712,
9171,
7934,
11,
3091,
3712,
14253,
41339,
11,
1479,
2340,
3712,
38469,
90,
13940,
23650,
19629,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3995,
270,
1659,
796,
657,
13,
486,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
8106,
3712,
22203,
796,
357,
3262,
11,
410,
8,
4613,
2081,
11,
198,
220,
220,
220,
220,
220,
220,
220,
299,
400,
3808,
3712,
5317,
796,
299,
16663,
82,
3419,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
7308,
198,
220,
220,
220,
611,
4129,
7,
5787,
2340,
8,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
20797,
62,
7266,
13200,
0,
28264,
11249,
62,
3642,
50221,
7,
5787,
2340,
828,
2010,
11,
3091,
11,
1479,
2340,
11,
48436,
2414,
58,
11208,
8106,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
717,
62,
5787,
312,
11,
1364,
62,
5787,
2340,
796,
4808,
325,
79,
62,
5787,
2340,
7,
5787,
2340,
23029,
198,
220,
220,
220,
717,
62,
5787,
62,
9521,
796,
4808,
69,
6862,
62,
9521,
7,
3262,
11,
3091,
11,
717,
62,
5787,
312,
8,
628,
220,
220,
220,
1303,
45115,
2239,
198,
220,
220,
220,
16472,
82,
62,
7742,
796,
685,
62,
11249,
62,
3642,
50221,
7,
5787,
2340,
8,
329,
4808,
287,
352,
25,
77,
400,
3808,
60,
198,
220,
220,
220,
31720,
62,
7742,
796,
685,
22089,
30073,
7,
3262,
8,
329,
4808,
287,
352,
25,
77,
400,
3808,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1172,
796,
18387,
7,
13664,
7,
11085,
62,
5787,
62,
9521,
1776,
288,
83,
796,
657,
13,
20,
11,
1715,
796,
366,
31337,
278,
986,
366,
8,
198,
220,
220,
220,
2163,
905,
27160,
3419,
220,
198,
220,
220,
220,
220,
220,
220,
220,
31850,
796,
2160,
28264,
3642,
50221,
62,
7742,
62,
7857,
7,
5787,
2340,
11,
16472,
82,
62,
7742,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
16104,
53,
31850,
1600,
31850,
828,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
400,
312,
1600,
4704,
312,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
16663,
82,
329,
1090,
62,
5787,
85,
287,
717,
62,
5787,
62,
9521,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
294,
312,
796,
4704,
312,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
16472,
796,
16472,
82,
62,
7742,
58,
400,
312,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2010,
62,
400,
796,
31720,
62,
7742,
58,
400,
312,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1182,
796,
685,
22019,
62,
5787,
85,
60,
628,
220,
220,
220,
220,
220,
220,
220,
4259,
87,
278,
7,
3262,
62,
400,
11,
717,
62,
5787,
312,
11,
1090,
62,
5787,
85,
8,
466,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
20797,
62,
7266,
13200,
0,
7,
3642,
50221,
11,
2010,
62,
400,
11,
3091,
11,
1364,
62,
5787,
2340,
11,
1182,
26,
8106,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1306,
0,
7,
1676,
70,
26,
905,
27160,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
5461,
0,
7,
1676,
70,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
4808,
445,
7234,
62,
3642,
50221,
62,
7742,
0,
7,
3642,
50221,
82,
62,
7742,
8,
198,
437
] | 2.168944 | 1,610 |
####################################################
# Implementing PRM and functions for plotting PRM
# Parameters incude num samples, connection distance, a list of obstacles, and start and goal states
# Graph search implemented is Astar. Edge cost is assumed to be equal to euclidean distance.
# To use, call ` include("PRM.jl") ` from any Julia file in the same folder.
# nouyang 2017
####################################################
using Plots
using DataStructures
using GeometryTypes
using Distributions
module algT
using GeometryTypes
# export GraphNode, Edge, Obstacle, Room
# struct PointAlg
# x::Int64
# y::Int64
struct GraphNode
id::Int64
state::Point{2, Float64}
end
struct Edge
startID::Int64
endID::Int64
#edge::LineSegment(Point{2, Float64}, Point{2, Float64})
#edge::LineSegment{}
end
struct Obstacle
id::Int64
rect::HyperRectangle{2, Vec}
#color
#fillalpha
end
struct Room
width::Int64
height::Int64
walls::Vector{LineSegment}
#walls::HyperRectangle
obstacles::Vector{HyperRectangle}
end
struct AlgParameters
#startGoal::Point{2, Float64}
#endGoal::Point{2, Float64}
numSamples::Int64
connectRadius::Int64
# goal region?? should be rectangle? aka error from goal allowed
end
struct queueTmp
#pt::Point{2, Float64}
node::algT.GraphNode
statesList::Vector{algT.GraphNode}
cost::Int64
end
struct roadmap
startstate::Point{2,Float64}
goalstate::Point{2,Float64}
nodeslist::Vector{GraphNode}
edgeslist::Vector{Edge}
end
#Base.show(io::IO, v::Vertex) =# #print(io, "V($(v.id), ($(v.state.x),$(v.state.y)))")
#Base.show(io::IO, p::Point) =# #print(io, "P($(p.x),$(p.y))")
#Base.show(io::IO, q::tempQueueType) =# #print(io, "Q($(q.v),$(q.statesList) $(q.cost))")
Base.isless(q1::queueTmp, q2::queueTmp) = q1.cost < q2.cost
#Base.isless(p1::Point, p2::Point) = q1.x< q2.x
#Base.isless(p1::Point, p2::Point) = q1[1] < q2[1]
end
module algfxn
using GeometryTypes
using algT
function ccw(A,B,C)
# determines direction of lines formed by three points
return (C[2]-A[2]) * (B[1]-A[1]) > (B[2]-A[2]) * (C[1]-A[1])
end
function intersects(line1, line2) #no ":" at the end!
A, B = line1[1], line1[2]
C, D = line2[1], line2[2]
return ( (ccw(A, C, D) != ccw(B, C, D)) && ccw(A, B, C) != ccw(A, B, D))
end
function decompRect(r::HyperRectangle) #GeometryTypes.HyperRectangle{2,Float64}
corners = decompose(Point{2, Float64}, r)
corners = [Point(pt) for pt in corners]
lineBottom = LineSegment(corners[1], corners[2])
lineTop = LineSegment(corners[3], corners[4])
lineLeft = LineSegment(corners[1], corners[3])
lineRight = LineSegment(corners[2], corners[4])
lines = Vector{LineSegment}()
push!(lines, lineTop, lineRight, lineBottom, lineLeft)
return lines
end
#function isCollidingNode(node::algT.GraphNode, obsList::Vector{algT.Obstacle}
function isCollidingNode(node::Point{2, Float64}, obsList::Vector{HyperRectangle})
for obs in obsList
if contains(obs, node)
return true
end
end
return false
end
function isCollidingObstacles(line::LineSegment, obsList::Vector{HyperRectangle})
for obs in obsList
rectLines = decompRect(obs)
for rectline in rectLines
if intersects(line, rectline)[1]
return true
end
end
end
return false
end
function isCollidingWalls(line::LineSegment, walls::Vector{LineSegment})
for wall in walls
if intersects(line, wall)
return true
end
end
return false
end
function findNearestNodes(nodestate, nodeslist, maxDist)
# given maxDist, return all nodes within that distance of node
nearestNodes = Vector{Tuple{algT.GraphNode, Float64}}()
for n in nodeslist
dist = min_euclidean(Vec(nodestate), Vec(n.state))
if dist < maxDist
push!(nearestNodes, (n, dist))
end
end
# return list sorted by distance?
# or just return list with distances included for now...
return nearestNodes
end
function costPath(solPath)
pathcost = 0
for i in 2:length(solPath)
curN = solPath[i].state
prevN = solPath[i-1].state
pathcost += min_euclidean(Vec(curN), Vec(prevN))
end
return pathcost
end
function findNode(nodeID, nodeslist)
#since we haven't removed any nodes, nodeslist should be sorted by index. but just in case, let's search through it
index = findfirst([node.id for node in nodeslist], nodeID)
return nodeslist[index]
end
end
module plotfxn
using GeometryTypes
using Plots
using algfxn
using algT
### Plots.jl recipes
@recipe function f(r::HyperRectangle)
points = decompose(Point{2,Float64}, r)
rectpoints = points[[1,2,4,3],:]
xs = [pt[1] for pt in rectpoints];
ys = [pt[2] for pt in rectpoints];
seriestype := :shape
color = :orange
#m = (:black, stroke(0))
s = Shape(xs[:], ys[:])
end
@recipe function f(pt::Point)
xs = [pt[1]]
ys = [pt[2]]
seriestype --> :scatter
color = :orange
markersize := 3
xs, ys
end
@recipe function f(l::LineSegment)
xs = [ l[1][1], l[2][1] ]
ys = [ l[1][2], l[2][2] ]
# seriestype = :line
color = :red
lw := 3
xs, ys
end
@recipe function f(rectList::Vector{<:HyperRectangle})
for r in rectList
@series begin
r
end
end
end
@recipe function f(ptList::Vector{<:Point})
for p in ptList
@series begin
p
end
end
end
@recipe function f(lineList::Vector{<:LineSegment})
for l in lineList
@series begin
l
end
end
end
####
function plotRoom(room)
aPlot = plot() #Todo! this assumes plotroom is first thing called()
roomWidth, roomHeight, walls, obstacles = room.width, room.height, room.walls, room.obstacles
# #print("\nPlotting Room\n")
plot!(aPlot, walls, color =:black)
plot!(aPlot, obstacles, fillalpha=0.5)
return aPlot
end
function plotPRM(roomPlot, roadmap, solPath, title)
startstate, goalstate, nodeslist, edgeslist = roadmap.startstate, roadmap.goalstate, roadmap.nodeslist, roadmap.edgeslist
x = [n.state[1] for n in nodeslist]
y = [n.state[2] for n in nodeslist]
scatter!(roomPlot, x,y, color=:black)
edgeXs, edgeYs = [], []
for e in edgeslist
startN = algfxn.findNode(e.startID, nodeslist)
endN = algfxn.findNode(e.endID, nodeslist)
x1,y1 = startN.state[1], startN.state[2]
x2,y2 = endN.state[1], endN.state[2]
push!(edgeXs, x1, x2, NaN) #the NaNs, keep spaces between edges correctly unplotted
push!(edgeYs, y1, y2, NaN)
end
plot!(roomPlot, edgeXs, edgeYs, color=:tan, linewidth=0.3)
# plot solution
prmPlot = plotSolPath(roomPlot, solPath)
#title!(prmPlot, title, titlefont = afont)
title!(prmPlot, title)
plot!(prmPlot, legend=false, size=(600,600), xaxis=((-5,25), 0:1:20 ),
yaxis=((-5,25), 0:1:20), foreground_color_grid= :black)
return prmPlot
end
function plotSolPath(aPlot, solPath)
print("\n ---Solution Path----- \n")
#@show solPath
print("\n -------- \n")
if solPath != Void
xPath = [n.state[1] for n in solPath]
yPath = [n.state[2] for n in solPath]
xstart, ystart = solPath[1].state
xend, yend = solPath[end].state
# plot start pt
scatter!(aPlot, [xstart], [ystart],
markercolor= :red, markershape = :circle, markersize = 6, markerstrokealpha = 0.5, markerstrokewidth=1)
# plot goal pt
scatter!(aPlot, [xend], [yend],
markerstrokecolor = :green, markershape = :star, markersize = 5, markerstrokealpha = 1, markerstrokewidth=5)
# plot path
plot!(aPlot, xPath, yPath, color = :orchid, linewidth=3, fillalpha = 0.3)
else
# #print("\n --- No solution path found ----- \n")
end
return aPlot
end
end
function preprocessPRM(room, parameters)
roomWidth, roomHeight, walls, obstacles = room.width, room.height, room.walls, room.obstacles
numPts, connectRadius = parameters.numSamples, parameters.connectRadius
nodeslist = Vector{algT.GraphNode}()
edgeslist = Vector{algT.Edge}()
currID = 1
# Sample points, create list of nodes
for i in 1:numPts
xrand, yrand = rand(Uniform(0, roomWidth), 2)
#xrand,yrand = rand(1.0:roomWidth-1,2)
n = Point(xrand, yrand) #new point in room
if !algfxn.isCollidingNode(n, obstacles) #should write fxn to check for sampling *on* a wall at some point TODO
newNode = algT.GraphNode(currID, n)
currID += 1
push!(nodeslist, newNode)
else
#print("\n NODE REMOVED: $n \n")
end
end
# Connect each node to its neighboring nodes within a ball or radius r, creating edges
for startnode in nodeslist
neighbors = [item[1] for item in algfxn.findNearestNodes(startnode.state, nodeslist, connectRadius)] # parent point
n = [algfxn.findNearestNodes(startnode.state, nodeslist, connectRadius)] # parent point
for endnode in neighbors
candidateEdge = LineSegment(startnode.state, endnode.state)
if !algfxn.isCollidingObstacles(candidateEdge, obstacles) & !algfxn.isCollidingWalls(candidateEdge, walls)
#line = LineSegment(startnode.state, endnode.state)
newEdge = algT.Edge(startnode.id, endnode.id) #by ID, or just store node? #wait no, i'd have multiple copies of same node for no real reason, mulitple edges per node
push!(edgeslist, newEdge)
else
#print("\n EDGE REMOVED: $startnode WITH $endnode \n")
end
end
end
#@show edgeslist
#@printf("\nPath found? %s Length of nodeslist: %d\n", isPathFound, length(nodeslist))
return nodeslist, edgeslist
end
function getSuccessors(curNode, edgeslist, nodeslist) #assuming bidirectional for now
#Find all edges that start or end at current node, and then make a list of the corresponding start or end nodes
nodeID = curNode.id
successorNodeIDs = Vector{Int}()
successors = Vector{algT.GraphNode}()
for e in edgeslist
if e.startID == nodeID
push!(successorNodeIDs, e.endID)
end
if e.endID == nodeID #should I include endID? it is bidirectional after all.
push!(successorNodeIDs, e.startID) #yes, because local planner connects in bidirectional way
end
end
for id in successorNodeIDs
node = algfxn.findNode(id, nodeslist)
push!(successors, node)
end
return successors
end
function queryPRM(startstate, goalstate, nodeslist, edgeslist, obstaclesList)
# to find nearest node, set connect radius to be infinity for now #todo
connectRadius = 99;
n_nearStart= algfxn.findNearestNodes(startstate, nodeslist, connectRadius) #Get distance from start, for all points in graph.
n_nearGoal= algfxn.findNearestNodes(goalstate, nodeslist, connectRadius)
## SECTION remove nodes that we cannot reach in a straight line without going through an obstacle
#todo: this is expensive, we should only check distances in order
# n_nearStart is tuple of node and distance
sort!(n_nearStart, by=n_nearStart->n_nearStart[2]) #Sort by distance and pick node with smallest distance from start
sort!(n_nearGoal, by=n_nearGoal->n_nearGoal[2])
#print("\n ----------------- \n")
#@show n_nearStart
#print("\n ----------------- \n")
#@show n_nearGoal
nodestart = algT.GraphNode(9999,Point(9999,9999))
nodegoal = algT.GraphNode(9999,Point(9999,9999))
for (n, dist) in n_nearStart
# bar = typeof(startstate)
# bar2 = typeof(n)
## #print("\n$bar, $bar2\n")
candidateline = LineSegment(Point(startstate), Point(n.state))
if !algfxn.isCollidingObstacles(candidateline, obstaclesList)
nodestart = n
break
end
end
for (n, dist) in n_nearGoal
candidateline = LineSegment(Point(goalstate), n.state)
if !algfxn.isCollidingObstacles(candidateline, obstaclesList)
nodegoal = n
break
end
end
if nodestart == algT.GraphNode(9999,Point(9999,9999))
nodestart = algT.GraphNode(0, Point(0,0))
#print("ahhhhhh didn't find a start node")
end
if nodegoal == algT.GraphNode(9999,Point(9999,9999))
nodegoal = algT.GraphNode(0, Point(0,0))
# #print("ahhhhhh didn't find a goal node")
end
## SECTION END
# #print("This is the beginState $(startstate) and the endState $(goalstate)\n")
# #print("This is the beginVertex--> $(nodestart) >>> and the endVertex--> $(nodegoal)\n")
pathNodes = Vector{algT.GraphNode}()
visited = Vector{algT.GraphNode}() #nodes we've searched through
frontier = PriorityQueue()
queue1 = algT.queueTmp(nodestart, pathNodes, 1)
enqueue!(frontier, queue1, 1) #root node has cost 0
pathcost = 99999
#################### A star search
while length(frontier) != 0
front = DataStructures.dequeue!(frontier)
pathVertices = []
curNode, pathNodes, totalEdgeCost = front.node, front.statesList, front.cost
if curNode == nodegoal
# #print("Hurrah! endState reached! \n")
unshift!(pathNodes, nodestart) #prepend our first path node back to pathVertices
unshift!(pathNodes, algT.GraphNode(0, startstate)) #prepend the start
push!(pathNodes, algT.GraphNode(0, goalstate)) #append the goal
finalPathCost = algfxn.costPath(pathNodes) #Assuming edge cost is Euclidean cost
isPathFound = true
return (finalPathCost, isPathFound, pathNodes) #list of nodes in solution path
else
if !(curNode in visited)
push!(visited, curNode) # Add all successors to the stack
for candidateNode in getSuccessors(curNode, edgeslist, nodeslist)
newEdgeCost = min_euclidean(Vec(curNode.state),
Vec(candidateNode.state))
#edgecost is euclidean dist(state,state). better to pass
# Node than to perform node lookup everytime (vs passing id)
f_x = totalEdgeCost + newEdgeCost + min_euclidean(Vec(candidateNode.state), Vec(nodegoal.state)) #heuristic = euclidean distance to end goal
p = deepcopy(pathNodes)
push!(p, candidateNode)
if !(candidateNode in keys(frontier))
newQ = algT.queueTmp(candidateNode, p, ceil(totalEdgeCost+ newEdgeCost))
enqueue!(frontier, newQ, ceil(f_x))
end
end
end
end
end
# Return None if no solution found
#@printf("No solution found! This is length of frontier, %d\n", length(frontier))
finalPathCost = Void
isPathFound = false
pathNodes = Void
return (finalPathCost, isPathFound, pathNodes)
end
| [
29113,
14468,
4242,
198,
198,
2,
220,
48282,
278,
4810,
44,
290,
5499,
329,
29353,
4810,
44,
198,
2,
220,
40117,
753,
2507,
997,
8405,
11,
4637,
5253,
11,
257,
1351,
286,
17648,
11,
290,
923,
290,
3061,
2585,
198,
2,
220,
29681,
2989,
9177,
318,
317,
7364,
13,
13113,
1575,
318,
9672,
284,
307,
4961,
284,
304,
36616,
485,
272,
5253,
13,
198,
2,
220,
1675,
779,
11,
869,
4600,
2291,
7203,
4805,
44,
13,
20362,
4943,
4600,
422,
597,
22300,
2393,
287,
262,
976,
9483,
13,
198,
2,
220,
299,
280,
17859,
2177,
198,
198,
29113,
14468,
4242,
198,
198,
3500,
1345,
1747,
198,
3500,
6060,
44909,
942,
198,
3500,
2269,
15748,
31431,
220,
198,
3500,
46567,
507,
198,
198,
21412,
435,
70,
51,
198,
220,
220,
220,
1262,
2269,
15748,
31431,
220,
198,
220,
220,
220,
1303,
10784,
29681,
19667,
11,
13113,
11,
46378,
6008,
11,
10096,
198,
220,
220,
220,
1303,
2878,
6252,
2348,
70,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2124,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
331,
3712,
5317,
2414,
628,
220,
220,
220,
2878,
29681,
19667,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
1181,
3712,
12727,
90,
17,
11,
48436,
2414,
92,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
13113,
198,
220,
220,
220,
220,
220,
220,
220,
923,
2389,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
886,
2389,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
14907,
3712,
13949,
41030,
434,
7,
12727,
90,
17,
11,
48436,
2414,
5512,
6252,
90,
17,
11,
48436,
2414,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
14907,
3712,
13949,
41030,
434,
90,
92,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
46378,
6008,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
13621,
3712,
38197,
45474,
9248,
90,
17,
11,
38692,
92,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
8043,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
20797,
26591,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
10096,
198,
220,
220,
220,
220,
220,
220,
220,
9647,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
6001,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
7714,
3712,
38469,
90,
13949,
41030,
434,
92,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
86,
5691,
3712,
38197,
45474,
9248,
198,
220,
220,
220,
220,
220,
220,
220,
17648,
3712,
38469,
90,
38197,
45474,
9248,
92,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
978,
70,
48944,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
9688,
49045,
3712,
12727,
90,
17,
11,
48436,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
437,
49045,
3712,
12727,
90,
17,
11,
48436,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
997,
50,
12629,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
2018,
15546,
3754,
3712,
5317,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3061,
3814,
3548,
815,
307,
35991,
30,
22430,
4049,
422,
3061,
3142,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
16834,
51,
3149,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
457,
3712,
12727,
90,
17,
11,
48436,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
3712,
14016,
51,
13,
37065,
19667,
198,
220,
220,
220,
220,
220,
220,
220,
2585,
8053,
3712,
38469,
90,
14016,
51,
13,
37065,
19667,
92,
198,
220,
220,
220,
220,
220,
220,
220,
1575,
3712,
5317,
2414,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
40332,
198,
220,
220,
220,
220,
220,
220,
220,
923,
5219,
3712,
12727,
90,
17,
11,
43879,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
3061,
5219,
3712,
12727,
90,
17,
11,
43879,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
13760,
4868,
3712,
38469,
90,
37065,
19667,
92,
198,
220,
220,
220,
220,
220,
220,
220,
13015,
4868,
3712,
38469,
90,
37021,
92,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1303,
14881,
13,
12860,
7,
952,
3712,
9399,
11,
410,
3712,
13414,
16886,
8,
796,
2,
1303,
4798,
7,
952,
11,
366,
53,
16763,
7,
85,
13,
312,
828,
7198,
7,
85,
13,
5219,
13,
87,
828,
3,
7,
85,
13,
5219,
13,
88,
22305,
4943,
198,
220,
220,
220,
1303,
14881,
13,
12860,
7,
952,
3712,
9399,
11,
279,
3712,
12727,
8,
796,
2,
1303,
4798,
7,
952,
11,
366,
47,
16763,
7,
79,
13,
87,
828,
3,
7,
79,
13,
88,
4008,
4943,
198,
220,
220,
220,
1303,
14881,
13,
12860,
7,
952,
3712,
9399,
11,
10662,
3712,
29510,
34991,
6030,
8,
796,
2,
1303,
4798,
7,
952,
11,
366,
48,
16763,
7,
80,
13,
85,
828,
3,
7,
80,
13,
27219,
8053,
8,
29568,
80,
13,
15805,
4008,
4943,
198,
220,
220,
220,
7308,
13,
271,
1203,
7,
80,
16,
3712,
36560,
51,
3149,
11,
10662,
17,
3712,
36560,
51,
3149,
8,
796,
10662,
16,
13,
15805,
1279,
10662,
17,
13,
15805,
198,
220,
220,
220,
1303,
14881,
13,
271,
1203,
7,
79,
16,
3712,
12727,
11,
279,
17,
3712,
12727,
8,
796,
10662,
16,
13,
87,
27,
10662,
17,
13,
87,
198,
220,
220,
220,
1303,
14881,
13,
271,
1203,
7,
79,
16,
3712,
12727,
11,
279,
17,
3712,
12727,
8,
796,
10662,
16,
58,
16,
60,
1279,
10662,
17,
58,
16,
60,
198,
198,
437,
628,
198,
21412,
435,
70,
21373,
77,
220,
198,
220,
220,
220,
1262,
2269,
15748,
31431,
198,
220,
220,
220,
1262,
435,
70,
51,
628,
197,
8818,
36624,
86,
7,
32,
11,
33,
11,
34,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
15947,
4571,
286,
3951,
7042,
416,
1115,
2173,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
34,
58,
17,
45297,
32,
58,
17,
12962,
1635,
357,
33,
58,
16,
45297,
32,
58,
16,
12962,
1875,
357,
33,
58,
17,
45297,
32,
58,
17,
12962,
1635,
357,
34,
58,
16,
45297,
32,
58,
16,
12962,
198,
220,
220,
220,
886,
628,
198,
220,
220,
220,
2163,
36177,
82,
7,
1370,
16,
11,
1627,
17,
8,
1303,
3919,
366,
11097,
379,
262,
886,
0,
198,
220,
220,
220,
220,
220,
220,
220,
317,
11,
347,
796,
1627,
16,
58,
16,
4357,
1627,
16,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
327,
11,
360,
796,
1627,
17,
58,
16,
4357,
1627,
17,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
357,
535,
86,
7,
32,
11,
327,
11,
360,
8,
14512,
36624,
86,
7,
33,
11,
327,
11,
360,
4008,
11405,
36624,
86,
7,
32,
11,
347,
11,
327,
8,
14512,
36624,
86,
7,
32,
11,
347,
11,
360,
4008,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
38237,
45474,
7,
81,
3712,
38197,
45474,
9248,
8,
1303,
10082,
15748,
31431,
13,
38197,
45474,
9248,
90,
17,
11,
43879,
2414,
92,
198,
220,
220,
220,
220,
220,
220,
220,
14371,
796,
26969,
3455,
7,
12727,
90,
17,
11,
48436,
2414,
5512,
374,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14371,
796,
685,
12727,
7,
457,
8,
329,
42975,
287,
14371,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
34104,
220,
796,
6910,
41030,
434,
7,
20772,
364,
58,
16,
4357,
14371,
58,
17,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
9126,
220,
220,
220,
220,
796,
6910,
41030,
434,
7,
20772,
364,
58,
18,
4357,
14371,
58,
19,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
18819,
220,
220,
220,
796,
6910,
41030,
434,
7,
20772,
364,
58,
16,
4357,
14371,
58,
18,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
11028,
220,
220,
796,
6910,
41030,
434,
7,
20772,
364,
58,
17,
4357,
14371,
58,
19,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
3951,
796,
20650,
90,
13949,
41030,
434,
92,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
6615,
11,
1627,
9126,
11,
1627,
11028,
11,
1627,
34104,
11,
1627,
18819,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3951,
198,
220,
220,
220,
886,
628,
198,
220,
220,
220,
1303,
8818,
318,
22667,
2530,
19667,
7,
17440,
3712,
14016,
51,
13,
37065,
19667,
11,
10201,
8053,
3712,
38469,
90,
14016,
51,
13,
5944,
301,
6008,
92,
198,
220,
220,
220,
2163,
318,
22667,
2530,
19667,
7,
17440,
3712,
12727,
90,
17,
11,
48436,
2414,
5512,
10201,
8053,
3712,
38469,
90,
38197,
45474,
9248,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
10201,
287,
10201,
8053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4909,
7,
8158,
11,
10139,
8,
198,
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,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3991,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
318,
22667,
2530,
5944,
301,
9928,
7,
1370,
3712,
13949,
41030,
434,
11,
10201,
8053,
3712,
38469,
90,
38197,
45474,
9248,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
10201,
287,
10201,
8053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13621,
43,
1127,
796,
38237,
45474,
7,
8158,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
13621,
1370,
287,
13621,
43,
1127,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
36177,
82,
7,
1370,
11,
13621,
1370,
38381,
16,
60,
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,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3991,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
318,
22667,
2530,
54,
5691,
7,
1370,
3712,
13949,
41030,
434,
11,
7714,
3712,
38469,
90,
13949,
41030,
434,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
3355,
287,
7714,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
36177,
82,
7,
1370,
11,
3355,
8,
198,
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,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3991,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
1064,
8199,
12423,
45,
4147,
7,
77,
375,
44146,
11,
13760,
4868,
11,
3509,
20344,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1813,
3509,
20344,
11,
1441,
477,
13760,
1626,
326,
5253,
286,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
16936,
45,
4147,
796,
20650,
90,
51,
29291,
90,
14016,
51,
13,
37065,
19667,
11,
48436,
2414,
11709,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
329,
299,
287,
13760,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1233,
796,
949,
62,
12496,
565,
485,
272,
7,
53,
721,
7,
77,
375,
44146,
828,
38692,
7,
77,
13,
5219,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1233,
1279,
3509,
20344,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
710,
12423,
45,
4147,
11,
357,
77,
11,
1233,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1441,
1351,
23243,
416,
5253,
30,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
393,
655,
1441,
1351,
351,
18868,
3017,
329,
783,
986,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
16936,
45,
4147,
220,
198,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2163,
1575,
15235,
7,
34453,
15235,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3108,
15805,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
362,
25,
13664,
7,
34453,
15235,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1090,
45,
220,
796,
1540,
15235,
58,
72,
4083,
5219,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8654,
45,
796,
1540,
15235,
58,
72,
12,
16,
4083,
5219,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
15805,
15853,
949,
62,
12496,
565,
485,
272,
7,
53,
721,
7,
22019,
45,
828,
38692,
7,
47050,
45,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3108,
15805,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
1064,
19667,
7,
17440,
2389,
11,
13760,
4868,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
20777,
356,
4398,
470,
4615,
597,
13760,
11,
13760,
4868,
815,
307,
23243,
416,
6376,
13,
475,
655,
287,
1339,
11,
1309,
338,
2989,
832,
340,
198,
220,
220,
220,
220,
220,
220,
220,
6376,
796,
1064,
11085,
26933,
17440,
13,
312,
329,
10139,
287,
13760,
4868,
4357,
10139,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
13760,
4868,
58,
9630,
60,
198,
220,
220,
220,
886,
198,
198,
437,
198,
198,
21412,
7110,
21373,
77,
628,
220,
220,
220,
1262,
2269,
15748,
31431,
198,
220,
220,
220,
1262,
1345,
1747,
198,
220,
220,
220,
1262,
435,
70,
21373,
77,
198,
220,
220,
220,
1262,
435,
70,
51,
628,
220,
220,
220,
44386,
220,
1345,
1747,
13,
20362,
14296,
628,
220,
220,
220,
2488,
29102,
431,
2163,
277,
7,
81,
3712,
38197,
45474,
9248,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2173,
796,
26969,
3455,
7,
12727,
90,
17,
11,
43879,
2414,
5512,
374,
8,
198,
220,
220,
220,
220,
220,
220,
220,
13621,
13033,
796,
2173,
30109,
16,
11,
17,
11,
19,
11,
18,
4357,
47715,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
82,
796,
685,
457,
58,
16,
60,
329,
42975,
287,
13621,
13033,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
331,
82,
796,
685,
457,
58,
17,
60,
329,
42975,
287,
13621,
13033,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
19039,
1058,
43358,
198,
220,
220,
220,
220,
220,
220,
220,
3124,
796,
1058,
43745,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
76,
796,
357,
25,
13424,
11,
14000,
7,
15,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
264,
796,
25959,
7,
34223,
58,
25,
4357,
331,
82,
58,
25,
12962,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
29102,
431,
2163,
277,
7,
457,
3712,
12727,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
82,
796,
685,
457,
58,
16,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
331,
82,
796,
685,
457,
58,
17,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1416,
1436,
198,
220,
220,
220,
220,
220,
220,
220,
3124,
796,
1058,
43745,
198,
220,
220,
220,
220,
220,
220,
220,
19736,
1096,
19039,
513,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
82,
11,
331,
82,
198,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2488,
29102,
431,
2163,
277,
7,
75,
3712,
13949,
41030,
434,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
82,
796,
685,
300,
58,
16,
7131,
16,
4357,
300,
58,
17,
7131,
16,
60,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
331,
82,
796,
685,
300,
58,
16,
7131,
17,
4357,
300,
58,
17,
7131,
17,
60,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1055,
6386,
2981,
796,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
3124,
796,
1058,
445,
198,
220,
220,
220,
220,
220,
220,
220,
300,
86,
19039,
513,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
82,
11,
331,
82,
198,
220,
220,
220,
886,
628,
198,
220,
220,
220,
2488,
29102,
431,
2163,
277,
7,
2554,
8053,
3712,
38469,
90,
27,
25,
38197,
45474,
9248,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
374,
287,
13621,
8053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
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,
628,
220,
220,
220,
2488,
29102,
431,
2163,
277,
7,
457,
8053,
3712,
38469,
90,
27,
25,
12727,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
279,
287,
42975,
8053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
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,
2488,
29102,
431,
2163,
277,
7,
1370,
8053,
3712,
38469,
90,
27,
25,
13949,
41030,
434,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
329,
300,
287,
1627,
8053,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
220,
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,
886,
220,
628,
198,
220,
220,
220,
1303,
21017,
628,
220,
220,
220,
2163,
7110,
41178,
7,
3823,
8,
198,
220,
220,
220,
220,
220,
220,
220,
257,
43328,
796,
7110,
3419,
1303,
51,
24313,
0,
428,
18533,
7110,
3823,
318,
717,
1517,
1444,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2119,
30916,
11,
2119,
23106,
11,
7714,
11,
17648,
796,
2119,
13,
10394,
11,
2119,
13,
17015,
11,
2119,
13,
86,
5691,
11,
2119,
13,
672,
301,
9928,
198,
220,
220,
220,
220,
220,
220,
1303,
1303,
4798,
7203,
59,
77,
43328,
889,
10096,
59,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
7110,
0,
7,
64,
43328,
11,
7714,
11,
3124,
796,
25,
13424,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7110,
0,
7,
64,
43328,
11,
17648,
11,
6070,
26591,
28,
15,
13,
20,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
257,
43328,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
7110,
4805,
44,
7,
3823,
43328,
11,
40332,
11,
1540,
15235,
11,
3670,
8,
198,
220,
220,
220,
220,
220,
220,
220,
923,
5219,
11,
3061,
5219,
11,
13760,
4868,
11,
13015,
4868,
796,
40332,
13,
9688,
5219,
11,
40332,
13,
35231,
5219,
11,
40332,
13,
77,
4147,
4868,
11,
40332,
13,
276,
3212,
4868,
628,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
685,
77,
13,
5219,
58,
16,
60,
329,
299,
287,
13760,
4868,
60,
198,
220,
220,
220,
220,
220,
220,
220,
331,
796,
685,
77,
13,
5219,
58,
17,
60,
329,
299,
287,
13760,
4868,
60,
198,
220,
220,
220,
220,
220,
220,
220,
41058,
0,
7,
3823,
43328,
11,
2124,
11,
88,
11,
3124,
28,
25,
13424,
8,
220,
628,
220,
220,
220,
220,
220,
220,
220,
5743,
55,
82,
11,
5743,
56,
82,
796,
685,
4357,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
329,
304,
287,
13015,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
45,
796,
435,
70,
21373,
77,
13,
19796,
19667,
7,
68,
13,
9688,
2389,
11,
13760,
4868,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
45,
796,
435,
70,
21373,
77,
13,
19796,
19667,
7,
68,
13,
437,
2389,
11,
13760,
4868,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
16,
11,
88,
16,
796,
923,
45,
13,
5219,
58,
16,
4357,
923,
45,
13,
5219,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
17,
11,
88,
17,
796,
886,
45,
13,
5219,
58,
16,
4357,
886,
45,
13,
5219,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
14907,
55,
82,
11,
2124,
16,
11,
2124,
17,
11,
11013,
45,
8,
1303,
1169,
11013,
47503,
11,
1394,
9029,
1022,
13015,
9380,
555,
489,
8426,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
14907,
56,
82,
11,
331,
16,
11,
331,
17,
11,
11013,
45,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
628,
220,
220,
220,
220,
220,
220,
220,
7110,
0,
7,
3823,
43328,
11,
5743,
55,
82,
11,
5743,
56,
82,
11,
3124,
28,
25,
38006,
11,
9493,
413,
5649,
28,
15,
13,
18,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
7110,
4610,
198,
220,
220,
220,
220,
220,
220,
220,
778,
76,
43328,
796,
7110,
36949,
15235,
7,
3823,
43328,
11,
1540,
15235,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
7839,
0,
7,
1050,
76,
43328,
11,
3670,
11,
3670,
10331,
796,
6580,
756,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3670,
0,
7,
1050,
76,
43328,
11,
3670,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7110,
0,
7,
1050,
76,
43328,
11,
8177,
28,
9562,
11,
2546,
16193,
8054,
11,
8054,
828,
2124,
22704,
16193,
32590,
20,
11,
1495,
828,
657,
25,
16,
25,
1238,
10612,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
22704,
16193,
32590,
20,
11,
1495,
828,
657,
25,
16,
25,
1238,
828,
36282,
62,
8043,
62,
25928,
28,
1058,
13424,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
778,
76,
43328,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
7110,
36949,
15235,
7,
64,
43328,
11,
1540,
15235,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
59,
77,
11420,
46344,
10644,
30934,
3467,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
31,
12860,
1540,
15235,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
59,
77,
24200,
3467,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1540,
15235,
14512,
18331,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
15235,
796,
685,
77,
13,
5219,
58,
16,
60,
329,
299,
287,
1540,
15235,
60,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
15235,
796,
685,
77,
13,
5219,
58,
17,
60,
329,
299,
287,
1540,
15235,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
9688,
11,
331,
9688,
796,
1540,
15235,
58,
16,
4083,
5219,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
437,
11,
331,
437,
796,
1540,
15235,
58,
437,
4083,
5219,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
7110,
923,
42975,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41058,
0,
7,
64,
43328,
11,
685,
87,
9688,
4357,
685,
88,
9688,
4357,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1317,
2798,
45621,
28,
1058,
445,
11,
19736,
71,
1758,
796,
1058,
45597,
11,
220,
19736,
1096,
796,
718,
11,
18364,
30757,
26591,
796,
657,
13,
20,
11,
18364,
30757,
10394,
28,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
7110,
3061,
42975,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41058,
0,
7,
64,
43328,
11,
685,
87,
437,
4357,
685,
88,
437,
4357,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18364,
30757,
8043,
796,
1058,
14809,
11,
19736,
71,
1758,
796,
1058,
7364,
11,
220,
19736,
1096,
796,
642,
11,
18364,
30757,
26591,
796,
352,
11,
18364,
30757,
10394,
28,
20,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
7110,
3108,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7110,
0,
7,
64,
43328,
11,
2124,
15235,
11,
331,
15235,
11,
3124,
796,
1058,
273,
28402,
11,
9493,
413,
5649,
28,
18,
11,
6070,
26591,
796,
657,
13,
18,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1303,
4798,
7203,
59,
77,
11420,
1400,
4610,
3108,
1043,
37404,
3467,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
257,
43328,
198,
220,
220,
220,
886,
628,
198,
437,
198,
198,
8818,
662,
14681,
4805,
44,
7,
3823,
11,
10007,
8,
220,
198,
220,
220,
220,
2119,
30916,
11,
2119,
23106,
11,
7714,
11,
17648,
796,
2119,
13,
10394,
11,
2119,
13,
17015,
11,
2119,
13,
86,
5691,
11,
2119,
13,
672,
301,
9928,
198,
220,
220,
220,
997,
47,
912,
11,
2018,
15546,
3754,
796,
10007,
13,
22510,
50,
12629,
11,
10007,
13,
8443,
15546,
3754,
628,
220,
220,
220,
13760,
4868,
796,
20650,
90,
14016,
51,
13,
37065,
19667,
92,
3419,
198,
220,
220,
220,
13015,
4868,
796,
20650,
90,
14016,
51,
13,
37021,
92,
3419,
628,
220,
220,
220,
1090,
81,
2389,
796,
352,
628,
220,
220,
220,
1303,
27565,
2173,
11,
2251,
1351,
286,
13760,
220,
198,
220,
220,
220,
329,
1312,
287,
352,
25,
22510,
47,
912,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
25192,
11,
331,
25192,
796,
43720,
7,
3118,
6933,
7,
15,
11,
2119,
30916,
828,
362,
8,
198,
197,
197,
2,
87,
25192,
11,
2417,
392,
796,
43720,
7,
16,
13,
15,
25,
3823,
30916,
12,
16,
11,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
6252,
7,
87,
25192,
11,
331,
25192,
8,
1303,
3605,
966,
287,
2119,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
14016,
21373,
77,
13,
271,
22667,
2530,
19667,
7,
77,
11,
17648,
8,
1303,
21754,
3551,
277,
87,
77,
284,
2198,
329,
19232,
1635,
261,
9,
257,
3355,
379,
617,
966,
16926,
46,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
19667,
796,
435,
70,
51,
13,
37065,
19667,
7,
22019,
81,
2389,
11,
299,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1090,
81,
2389,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
77,
4147,
4868,
11,
649,
19667,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
7203,
59,
77,
399,
16820,
22657,
8874,
1961,
25,
720,
77,
3467,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1303,
8113,
1123,
10139,
284,
663,
19651,
13760,
1626,
257,
2613,
393,
16874,
374,
11,
4441,
13015,
198,
220,
220,
220,
329,
923,
17440,
287,
13760,
4868,
220,
198,
220,
220,
220,
220,
220,
220,
220,
12020,
796,
685,
9186,
58,
16,
60,
329,
2378,
287,
435,
70,
21373,
77,
13,
19796,
8199,
12423,
45,
4147,
7,
9688,
17440,
13,
5219,
11,
13760,
4868,
11,
2018,
15546,
3754,
15437,
1303,
2560,
966,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
685,
14016,
21373,
77,
13,
19796,
8199,
12423,
45,
4147,
7,
9688,
17440,
13,
5219,
11,
13760,
4868,
11,
2018,
15546,
3754,
15437,
1303,
2560,
966,
198,
220,
220,
220,
220,
220,
220,
220,
329,
886,
17440,
287,
12020,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4540,
37021,
796,
6910,
41030,
434,
7,
9688,
17440,
13,
5219,
11,
886,
17440,
13,
5219,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
14016,
21373,
77,
13,
271,
22667,
2530,
5944,
301,
9928,
7,
46188,
20540,
37021,
11,
17648,
8,
1222,
5145,
14016,
21373,
77,
13,
271,
22667,
2530,
54,
5691,
7,
46188,
20540,
37021,
11,
7714,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1370,
796,
6910,
41030,
434,
7,
9688,
17440,
13,
5219,
11,
886,
17440,
13,
5219,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
37021,
796,
435,
70,
51,
13,
37021,
7,
9688,
17440,
13,
312,
11,
886,
17440,
13,
312,
8,
1303,
1525,
4522,
11,
393,
655,
3650,
10139,
30,
1303,
17077,
645,
11,
1312,
1549,
423,
3294,
9088,
286,
976,
10139,
329,
645,
1103,
1738,
11,
35971,
270,
1154,
13015,
583,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
276,
3212,
4868,
11,
649,
37021,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
7203,
59,
77,
8392,
8264,
22657,
8874,
1961,
25,
720,
9688,
17440,
13315,
720,
437,
17440,
220,
3467,
77,
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,
628,
220,
220,
220,
1303,
31,
12860,
13015,
4868,
220,
198,
220,
220,
220,
1303,
31,
37435,
7203,
59,
77,
15235,
1043,
30,
4064,
82,
22313,
286,
13760,
4868,
25,
4064,
67,
59,
77,
1600,
318,
15235,
21077,
11,
4129,
7,
77,
4147,
4868,
4008,
198,
220,
220,
220,
1441,
13760,
4868,
11,
13015,
4868,
198,
437,
198,
198,
8818,
651,
33244,
669,
7,
22019,
19667,
11,
13015,
4868,
11,
13760,
4868,
8,
1303,
32935,
8406,
4154,
282,
329,
783,
198,
220,
220,
220,
1303,
16742,
477,
13015,
326,
923,
393,
886,
379,
1459,
10139,
11,
290,
788,
787,
257,
1351,
286,
262,
11188,
923,
393,
886,
13760,
198,
220,
220,
220,
10139,
2389,
796,
1090,
19667,
13,
312,
198,
220,
220,
220,
17270,
19667,
47954,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
41491,
796,
20650,
90,
14016,
51,
13,
37065,
19667,
92,
3419,
628,
220,
220,
220,
329,
304,
287,
13015,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
611,
304,
13,
9688,
2389,
6624,
10139,
2389,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
13138,
273,
19667,
47954,
11,
304,
13,
437,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
611,
304,
13,
437,
2389,
6624,
10139,
2389,
1303,
21754,
314,
2291,
886,
2389,
30,
340,
318,
8406,
4154,
282,
706,
477,
13,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
13138,
273,
19667,
47954,
11,
220,
304,
13,
9688,
2389,
8,
1303,
8505,
11,
780,
1957,
42351,
20417,
287,
8406,
4154,
282,
835,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
329,
4686,
287,
17270,
19667,
47954,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
796,
435,
70,
21373,
77,
13,
19796,
19667,
7,
312,
11,
13760,
4868,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
13138,
669,
11,
10139,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
41491,
198,
437,
198,
198,
8818,
12405,
4805,
44,
7,
9688,
5219,
11,
3061,
5219,
11,
13760,
4868,
11,
13015,
4868,
11,
17648,
8053,
8,
198,
220,
220,
220,
1303,
284,
1064,
16936,
10139,
11,
900,
2018,
16874,
284,
307,
37174,
329,
783,
1303,
83,
24313,
198,
220,
220,
220,
2018,
15546,
3754,
796,
7388,
26,
198,
220,
220,
220,
299,
62,
40093,
10434,
28,
435,
70,
21373,
77,
13,
19796,
8199,
12423,
45,
4147,
7,
9688,
5219,
11,
13760,
4868,
11,
2018,
15546,
3754,
8,
1303,
3855,
5253,
422,
923,
11,
329,
477,
2173,
287,
4823,
13,
198,
220,
220,
220,
299,
62,
40093,
49045,
28,
435,
70,
21373,
77,
13,
19796,
8199,
12423,
45,
4147,
7,
35231,
5219,
11,
13760,
4868,
11,
2018,
15546,
3754,
8,
220,
628,
220,
220,
220,
22492,
44513,
4781,
13760,
326,
356,
2314,
3151,
287,
257,
3892,
1627,
1231,
1016,
832,
281,
22007,
198,
220,
220,
220,
1303,
83,
24313,
25,
428,
318,
5789,
11,
356,
815,
691,
2198,
18868,
287,
1502,
628,
220,
220,
220,
1303,
299,
62,
40093,
10434,
318,
46545,
286,
10139,
290,
5253,
198,
220,
220,
220,
3297,
0,
7,
77,
62,
40093,
10434,
11,
416,
28,
77,
62,
40093,
10434,
3784,
77,
62,
40093,
10434,
58,
17,
12962,
1303,
42758,
416,
5253,
290,
2298,
10139,
351,
18197,
5253,
422,
923,
198,
220,
220,
220,
3297,
0,
7,
77,
62,
40093,
49045,
11,
416,
28,
77,
62,
40093,
49045,
3784,
77,
62,
40093,
49045,
58,
17,
12962,
198,
220,
220,
220,
1303,
4798,
7203,
59,
77,
34400,
12,
3467,
77,
4943,
198,
220,
220,
220,
1303,
31,
12860,
299,
62,
40093,
10434,
198,
220,
220,
220,
1303,
4798,
7203,
59,
77,
34400,
12,
3467,
77,
4943,
198,
220,
220,
220,
1303,
31,
12860,
299,
62,
40093,
49045,
628,
220,
220,
220,
18666,
395,
433,
796,
435,
70,
51,
13,
37065,
19667,
7,
24214,
11,
12727,
7,
24214,
11,
24214,
4008,
198,
220,
220,
220,
10139,
35231,
796,
435,
70,
51,
13,
37065,
19667,
7,
24214,
11,
12727,
7,
24214,
11,
24214,
4008,
628,
220,
220,
220,
329,
357,
77,
11,
1233,
8,
287,
299,
62,
40093,
10434,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2318,
796,
2099,
1659,
7,
9688,
5219,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2318,
17,
796,
2099,
1659,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
1303,
4798,
7203,
59,
77,
3,
5657,
11,
720,
5657,
17,
59,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
4540,
1370,
796,
6910,
41030,
434,
7,
12727,
7,
9688,
5219,
828,
6252,
7,
77,
13,
5219,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
14016,
21373,
77,
13,
271,
22667,
2530,
5944,
301,
9928,
7,
46188,
20540,
1370,
11,
17648,
8053,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18666,
395,
433,
796,
299,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
329,
357,
77,
11,
1233,
8,
287,
299,
62,
40093,
49045,
198,
220,
220,
220,
220,
220,
220,
220,
4540,
1370,
796,
6910,
41030,
434,
7,
12727,
7,
35231,
5219,
828,
299,
13,
5219,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
14016,
21373,
77,
13,
271,
22667,
2530,
5944,
301,
9928,
7,
46188,
20540,
1370,
11,
17648,
8053,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
35231,
796,
299,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
198,
220,
220,
220,
611,
18666,
395,
433,
6624,
435,
70,
51,
13,
37065,
19667,
7,
24214,
11,
12727,
7,
24214,
11,
24214,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
18666,
395,
433,
796,
435,
70,
51,
13,
37065,
19667,
7,
15,
11,
6252,
7,
15,
11,
15,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
7203,
993,
36607,
71,
1422,
470,
1064,
257,
923,
10139,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
611,
10139,
35231,
6624,
435,
70,
51,
13,
37065,
19667,
7,
24214,
11,
12727,
7,
24214,
11,
24214,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
35231,
796,
435,
70,
51,
13,
37065,
19667,
7,
15,
11,
6252,
7,
15,
11,
15,
4008,
198,
220,
220,
220,
220,
220,
220,
1303,
1303,
4798,
7203,
993,
36607,
71,
1422,
470,
1064,
257,
3061,
10139,
4943,
198,
220,
220,
220,
886,
628,
220,
220,
220,
22492,
44513,
23578,
628,
220,
220,
1303,
1303,
4798,
7203,
1212,
318,
262,
2221,
9012,
29568,
9688,
5219,
8,
290,
262,
886,
9012,
29568,
35231,
5219,
19415,
77,
4943,
198,
220,
220,
1303,
1303,
4798,
7203,
1212,
318,
262,
2221,
13414,
16886,
46904,
29568,
77,
375,
395,
433,
8,
13163,
290,
262,
886,
13414,
16886,
46904,
29568,
17440,
35231,
19415,
77,
4943,
628,
198,
220,
220,
220,
3108,
45,
4147,
796,
20650,
90,
14016,
51,
13,
37065,
19667,
92,
3419,
198,
220,
220,
220,
8672,
796,
20650,
90,
14016,
51,
13,
37065,
19667,
92,
3419,
1303,
77,
4147,
356,
1053,
16499,
832,
628,
220,
220,
220,
27580,
796,
34416,
34991,
3419,
198,
220,
220,
220,
16834,
16,
796,
435,
70,
51,
13,
36560,
51,
3149,
7,
77,
375,
395,
433,
11,
3108,
45,
4147,
11,
352,
8,
220,
198,
220,
220,
220,
551,
36560,
0,
7,
8534,
959,
11,
16834,
16,
11,
352,
8,
1303,
15763,
10139,
468,
1575,
657,
220,
220,
198,
220,
220,
220,
3108,
15805,
796,
860,
24214,
628,
220,
220,
220,
1303,
14468,
21017,
317,
3491,
2989,
198,
220,
220,
220,
981,
4129,
7,
8534,
959,
8,
14512,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2166,
796,
6060,
44909,
942,
13,
2934,
36560,
0,
7,
8534,
959,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3108,
42369,
1063,
796,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
1090,
19667,
11,
3108,
45,
4147,
11,
2472,
37021,
13729,
796,
2166,
13,
17440,
11,
2166,
13,
27219,
8053,
11,
2166,
13,
15805,
628,
220,
220,
220,
220,
220,
220,
220,
611,
1090,
19667,
6624,
10139,
35231,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1303,
4798,
7203,
42633,
11392,
0,
886,
9012,
4251,
0,
3467,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
555,
30846,
0,
7,
6978,
45,
4147,
11,
18666,
395,
433,
8,
1303,
3866,
37038,
674,
717,
3108,
10139,
736,
284,
3108,
42369,
1063,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
555,
30846,
0,
7,
6978,
45,
4147,
11,
435,
70,
51,
13,
37065,
19667,
7,
15,
11,
923,
5219,
4008,
1303,
3866,
37038,
262,
923,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
6978,
45,
4147,
11,
435,
70,
51,
13,
37065,
19667,
7,
15,
11,
3061,
5219,
4008,
1303,
33295,
262,
3061,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2457,
15235,
13729,
796,
435,
70,
21373,
77,
13,
15805,
15235,
7,
6978,
45,
4147,
8,
1303,
48142,
5743,
1575,
318,
48862,
485,
272,
1575,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
15235,
21077,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
20311,
15235,
13729,
11,
318,
15235,
21077,
11,
3108,
45,
4147,
8,
1303,
4868,
286,
13760,
287,
4610,
3108,
628,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
7,
22019,
19667,
287,
8672,
8,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
4703,
863,
11,
1090,
19667,
8,
1303,
3060,
477,
41491,
284,
262,
8931,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
4540,
19667,
287,
651,
33244,
669,
7,
22019,
19667,
11,
13015,
4868,
11,
13760,
4868,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
37021,
13729,
796,
949,
62,
12496,
565,
485,
272,
7,
53,
721,
7,
22019,
19667,
13,
5219,
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,
38692,
7,
46188,
20540,
19667,
13,
5219,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
14907,
15805,
318,
304,
36616,
485,
272,
1233,
7,
5219,
11,
5219,
737,
1365,
284,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
19081,
621,
284,
1620,
10139,
35847,
790,
2435,
357,
14259,
6427,
4686,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
62,
87,
796,
2472,
37021,
13729,
1343,
649,
37021,
13729,
1343,
949,
62,
12496,
565,
485,
272,
7,
53,
721,
7,
46188,
20540,
19667,
13,
5219,
828,
38692,
7,
17440,
35231,
13,
5219,
4008,
1303,
258,
27915,
796,
304,
36616,
485,
272,
5253,
284,
886,
3061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
796,
2769,
30073,
7,
6978,
45,
4147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
79,
11,
4540,
19667,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
7,
46188,
20540,
19667,
287,
8251,
7,
8534,
959,
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,
649,
48,
796,
435,
70,
51,
13,
36560,
51,
3149,
7,
46188,
20540,
19667,
11,
279,
11,
2906,
346,
7,
23350,
37021,
13729,
10,
649,
37021,
13729,
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,
551,
36560,
0,
7,
8534,
959,
11,
649,
48,
11,
2906,
346,
7,
69,
62,
87,
4008,
220,
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,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
220,
220,
220,
220,
628,
220,
220,
220,
1303,
8229,
6045,
611,
645,
4610,
1043,
198,
220,
220,
220,
1303,
31,
37435,
7203,
2949,
4610,
1043,
0,
770,
318,
4129,
286,
27580,
11,
4064,
67,
59,
77,
1600,
4129,
7,
8534,
959,
4008,
198,
220,
220,
220,
2457,
15235,
13729,
796,
18331,
198,
220,
220,
220,
318,
15235,
21077,
796,
3991,
198,
220,
220,
220,
3108,
45,
4147,
796,
18331,
198,
220,
220,
220,
1441,
357,
20311,
15235,
13729,
11,
318,
15235,
21077,
11,
3108,
45,
4147,
8,
198,
437,
628
] | 2.207201 | 7,360 |
module Reindex
export ShiftReindex,OddReindex,Reflect
struct ShiftReindex{T,N,O}
array :: Vector{T}
end
function ShiftReindex(v::Vector{T},o::Int) where T
N = length(v)+o
ShiftReindex{T,N,o}(v)
end
(vec::ShiftReindex{T,N,O})(i::Int) where {T,N,O} =
(i > N || i < 1+O) ? T(0) : vec.array[i-O]
(vec::ShiftReindex{T,N,O})(ir::AbstractArray{M}) where {T,N,O,M} =
(vec::ShiftReindex{T,N,O}).(collect(ir))
struct OddReindex{T,N}
array :: Vector{T}
end
function OddReindex(v::Vector{T}) where T
N = length(v)-1
OddReindex{T,N}(v)
end
(vec::OddReindex{T,N})(i::Int) where {T,N} =
abs(i) > N ? T(0) : i < 0 ? conj(vec.array[1-i]) : vec.array[1+i]
(vec::OddReindex{T,N})(ir::AbstractArray{M}) where {T,N,M} =
(vec::OddReindex{T,N}).(collect(ir))
ReindexedArray = Union{ShiftReindex,OddReindex}
struct Reflect{T}
array :: T
end
(vec::Reflect{<:ReindexedArray})(i) = vec.array(-i)
(vec::Reflect{<:AbstractArray})(i) = vec.array[-i]
end
| [
21412,
797,
9630,
628,
198,
39344,
15576,
3041,
9630,
11,
46,
1860,
3041,
9630,
11,
8134,
801,
198,
198,
7249,
15576,
3041,
9630,
90,
51,
11,
45,
11,
46,
92,
198,
220,
7177,
7904,
20650,
90,
51,
92,
198,
437,
198,
198,
8818,
15576,
3041,
9630,
7,
85,
3712,
38469,
90,
51,
5512,
78,
3712,
5317,
8,
810,
309,
198,
220,
399,
796,
4129,
7,
85,
47762,
78,
198,
220,
15576,
3041,
9630,
90,
51,
11,
45,
11,
78,
92,
7,
85,
8,
198,
437,
198,
7,
35138,
3712,
33377,
3041,
9630,
90,
51,
11,
45,
11,
46,
92,
5769,
72,
3712,
5317,
8,
810,
1391,
51,
11,
45,
11,
46,
92,
796,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
72,
1875,
399,
8614,
1312,
1279,
352,
10,
46,
8,
5633,
309,
7,
15,
8,
1058,
43030,
13,
18747,
58,
72,
12,
46,
60,
198,
7,
35138,
3712,
33377,
3041,
9630,
90,
51,
11,
45,
11,
46,
92,
5769,
343,
3712,
23839,
19182,
90,
44,
30072,
810,
1391,
51,
11,
45,
11,
46,
11,
44,
92,
796,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
35138,
3712,
33377,
3041,
9630,
90,
51,
11,
45,
11,
46,
92,
737,
7,
33327,
7,
343,
4008,
198,
198,
7249,
20664,
3041,
9630,
90,
51,
11,
45,
92,
198,
220,
220,
7177,
7904,
20650,
90,
51,
92,
198,
437,
198,
8818,
20664,
3041,
9630,
7,
85,
3712,
38469,
90,
51,
30072,
810,
309,
198,
220,
220,
220,
399,
796,
4129,
7,
85,
13219,
16,
198,
220,
220,
220,
20664,
3041,
9630,
90,
51,
11,
45,
92,
7,
85,
8,
198,
437,
198,
7,
35138,
3712,
46,
1860,
3041,
9630,
90,
51,
11,
45,
92,
5769,
72,
3712,
5317,
8,
810,
1391,
51,
11,
45,
92,
796,
198,
220,
220,
220,
220,
220,
220,
220,
2352,
7,
72,
8,
1875,
399,
5633,
309,
7,
15,
8,
1058,
1312,
1279,
657,
5633,
11644,
7,
35138,
13,
18747,
58,
16,
12,
72,
12962,
1058,
43030,
13,
18747,
58,
16,
10,
72,
60,
198,
7,
35138,
3712,
46,
1860,
3041,
9630,
90,
51,
11,
45,
92,
5769,
343,
3712,
23839,
19182,
90,
44,
30072,
810,
1391,
51,
11,
45,
11,
44,
92,
796,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
35138,
3712,
46,
1860,
3041,
9630,
90,
51,
11,
45,
92,
737,
7,
33327,
7,
343,
4008,
198,
3041,
9630,
276,
19182,
796,
4479,
90,
33377,
3041,
9630,
11,
46,
1860,
3041,
9630,
92,
198,
198,
7249,
36901,
90,
51,
92,
198,
220,
220,
7177,
7904,
309,
198,
437,
198,
7,
35138,
3712,
8134,
801,
90,
27,
25,
3041,
9630,
276,
19182,
92,
5769,
72,
8,
796,
43030,
13,
18747,
32590,
72,
8,
198,
7,
35138,
3712,
8134,
801,
90,
27,
25,
23839,
19182,
92,
5769,
72,
8,
220,
796,
43030,
13,
18747,
58,
12,
72,
60,
628,
198,
198,
437,
198
] | 1.984466 | 515 |
function largest_component_test()
A = load_matrix_network("dfs_example")
(Acc,p) = largest_component(A)
if size(Acc,1) != 5
error("largest_component failed")
end
(Acc,p) = largest_component(A,true)
if size(Acc,1) != 6
error("largest_component failed")
end
A = load_matrix_network("cores_example")
(Acc1,p1) = largest_component(A)
(Acc2,p2) = largest_component(A,true)
if !isequal(Acc1,Acc2)
error("largest_component failed")
end
return true
end | [
8818,
4387,
62,
42895,
62,
9288,
3419,
198,
220,
220,
220,
317,
796,
3440,
62,
6759,
8609,
62,
27349,
7203,
7568,
82,
62,
20688,
4943,
198,
220,
220,
220,
357,
17320,
11,
79,
8,
796,
4387,
62,
42895,
7,
32,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
611,
2546,
7,
17320,
11,
16,
8,
14512,
642,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
28209,
62,
42895,
4054,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
357,
17320,
11,
79,
8,
796,
4387,
62,
42895,
7,
32,
11,
7942,
8,
198,
220,
220,
220,
611,
2546,
7,
17320,
11,
16,
8,
14512,
718,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
28209,
62,
42895,
4054,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
317,
796,
3440,
62,
6759,
8609,
62,
27349,
7203,
66,
2850,
62,
20688,
4943,
198,
220,
220,
220,
357,
17320,
16,
11,
79,
16,
8,
796,
4387,
62,
42895,
7,
32,
8,
198,
220,
220,
220,
357,
17320,
17,
11,
79,
17,
8,
796,
4387,
62,
42895,
7,
32,
11,
7942,
8,
198,
220,
220,
220,
611,
5145,
786,
13255,
7,
17320,
16,
11,
17320,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
28209,
62,
42895,
4054,
4943,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
2081,
198,
437
] | 2.242678 | 239 |
import DSP.conv, RHEOS.convn, BenchmarkTools
# realistic test data sizes for RHEOS workflow
x = collect(0.0:0.1:1000.0)
y = exp.(-x/2.0)
z = [i<500.0 ? i : 500.0 - i for i in x]
# convolve them yeh
@btime conv($z, $y)
@btime convn($z, $y)
| [
11748,
360,
4303,
13,
42946,
11,
371,
13909,
2640,
13,
42946,
77,
11,
25187,
4102,
33637,
198,
198,
2,
12653,
1332,
1366,
10620,
329,
371,
13909,
2640,
30798,
198,
87,
796,
2824,
7,
15,
13,
15,
25,
15,
13,
16,
25,
12825,
13,
15,
8,
198,
88,
796,
1033,
12195,
12,
87,
14,
17,
13,
15,
8,
198,
89,
796,
685,
72,
27,
4059,
13,
15,
5633,
1312,
1058,
5323,
13,
15,
532,
1312,
329,
1312,
287,
2124,
60,
198,
198,
2,
3063,
6442,
606,
9838,
71,
198,
198,
31,
65,
2435,
3063,
16763,
89,
11,
720,
88,
8,
198,
31,
65,
2435,
3063,
77,
16763,
89,
11,
720,
88,
8,
628
] | 2.169643 | 112 |
using EffectiveWaves, Test
using LinearAlgebra
@testset "Check material definitions" begin
include("../src/materials.jl")
@test true
end
@testset "Examples from: Reflection from multi-species.., Proc.R.Soc.(2018)" begin
include("../docs/src/examples/concrete/concrete_species.jl")
include("../docs/src/examples/concrete/concrete_species_volfrac.jl")
# include("../docs/src/examples/concrete/concrete_species_large-freq.jl") # takes longer
# Takes too long
include("../docs/src/examples/emulsion/fluid_species.jl")
include("../docs/src/examples/emulsion/fluid_species_volfrac.jl")
# include("../docs/src/examples/emulsion/fluid_species_large-freq.jl") # takes longer
@test true
end
include("specialfunctions.jl")
include("types_constructors.jl")
include("strong_low_freq_effective.jl")
include("high_frequency_effective.jl")
include("large_vol_low_freq_effective.jl")
# A heavy test..
include("weak_scatterers_effective.jl")
# test does not run on Julia version < 0.7 due to differences in Optim versions
include("path_mesh_wavenumbers.jl")
include("numerical_integration.jl")
include("integrated_reflection.jl")
include("average_integrand_kernel.jl")
include("match_wave.jl")
include("wiener-hopf-reflection.jl")
include("wiener-hopf-wave.jl")
| [
3500,
29455,
54,
3080,
11,
6208,
198,
3500,
44800,
2348,
29230,
198,
198,
31,
9288,
2617,
366,
9787,
2587,
17336,
1,
2221,
198,
220,
220,
220,
2291,
7203,
40720,
10677,
14,
33665,
82,
13,
20362,
4943,
198,
220,
220,
220,
2488,
9288,
2081,
198,
437,
198,
198,
31,
9288,
2617,
366,
27730,
422,
25,
6524,
1564,
422,
5021,
12,
35448,
492,
11,
31345,
13,
49,
13,
37949,
12195,
7908,
16725,
2221,
628,
220,
220,
220,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
1102,
38669,
14,
1102,
38669,
62,
35448,
13,
20362,
4943,
198,
220,
220,
220,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
1102,
38669,
14,
1102,
38669,
62,
35448,
62,
85,
4024,
11510,
13,
20362,
4943,
198,
220,
220,
220,
1303,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
1102,
38669,
14,
1102,
38669,
62,
35448,
62,
11664,
12,
19503,
80,
13,
20362,
4943,
1303,
2753,
2392,
628,
220,
220,
220,
1303,
33687,
1165,
890,
198,
220,
220,
220,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
368,
15204,
14,
35522,
312,
62,
35448,
13,
20362,
4943,
198,
220,
220,
220,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
368,
15204,
14,
35522,
312,
62,
35448,
62,
85,
4024,
11510,
13,
20362,
4943,
198,
220,
220,
220,
1303,
2291,
7203,
40720,
31628,
14,
10677,
14,
1069,
12629,
14,
368,
15204,
14,
35522,
312,
62,
35448,
62,
11664,
12,
19503,
80,
13,
20362,
4943,
1303,
2753,
2392,
628,
220,
220,
220,
2488,
9288,
2081,
198,
437,
198,
198,
17256,
7203,
20887,
12543,
2733,
13,
20362,
4943,
198,
198,
17256,
7203,
19199,
62,
41571,
669,
13,
20362,
4943,
198,
198,
17256,
7203,
11576,
62,
9319,
62,
19503,
80,
62,
16803,
13,
20362,
4943,
198,
17256,
7203,
8929,
62,
35324,
62,
16803,
13,
20362,
4943,
198,
198,
17256,
7203,
11664,
62,
10396,
62,
9319,
62,
19503,
80,
62,
16803,
13,
20362,
4943,
198,
2,
317,
4334,
1332,
492,
198,
17256,
7203,
38695,
62,
1416,
1078,
19288,
62,
16803,
13,
20362,
4943,
198,
198,
2,
1332,
857,
407,
1057,
319,
22300,
2196,
1279,
657,
13,
22,
2233,
284,
5400,
287,
30011,
6300,
198,
17256,
7203,
6978,
62,
76,
5069,
62,
86,
4005,
17024,
13,
20362,
4943,
198,
198,
17256,
7203,
77,
6975,
605,
62,
18908,
1358,
13,
20362,
4943,
198,
17256,
7203,
18908,
4111,
62,
5420,
1564,
13,
20362,
4943,
198,
17256,
7203,
23913,
62,
18908,
25192,
62,
33885,
13,
20362,
4943,
198,
198,
17256,
7203,
15699,
62,
19204,
13,
20362,
4943,
198,
17256,
7203,
37686,
877,
12,
8548,
69,
12,
5420,
1564,
13,
20362,
4943,
198,
17256,
7203,
37686,
877,
12,
8548,
69,
12,
19204,
13,
20362,
4943,
198
] | 2.886414 | 449 |
"""
add_variables_from_data!(gm::Union{JuMP.Model, GlobalModel},
X::DataFrame)
Adds/finds variables depending on the columns of X.
"""
function add_variables_from_data!(m::JuMP.Model,
X::DataFrame)
varkeys = names(X)
vars = []
data_vars = []
for key in varkeys
try
push!(vars, m[Symbol(key)])
catch KeyError
nv = @variable(m, base_name = string(key))
m[Symbol(key)] = nv
push!(vars, nv)
push!(data_vars, Symbol(key))
end
end
length(data_vars) != 0 && @info("Added $(length(data_vars)) variables from data: " * string(data_vars))
return vars
end
add_variables_from_data!(gm::GlobalModel, X::DataFrame) = add_variables_from_data!(gm.model, X)
"""
bound_to_data!(gm::Union{JuMP.Model, GlobalModel},
X::DataFrame)
Constrains the domain of relevant variables to the box interval defined by X.
"""
function bound_to_data!(m::JuMP.Model,
X::DataFrame)
vars = []
try
vars = [m[Symbol(key)] for key in names(X)]
catch UndefVarError
throw(OCTHaGOnException("Please make sure the keys of X match with variables in model $(gm)."))
end
ranges = Dict(m[Symbol(key)] => [minimum((X[!, Symbol(key)])), maximum((X[!, Symbol(key)]))] for key in names(X))
bound!(m, ranges);
return
end
bound_to_data!(gm::GlobalModel, X::DataFrame) = bound_to_data!(gm.model, X)
"""
add_datadriven_constraint(gm::GlobalModel,
X::DataFrame, Y::Array;
constraint::Union{Nothing, JuMP.ConstraintRef, Expr} = nothing,
vars::Union{Nothing, Array{JuMP.VariableRef, 1}} = nothing,
dependent_var::Union{Nothing, JuMP.VariableRef} = nothing,
name::String = "bbl" * string(length(gm.bbls) + 1),
equality::Bool = false)
Adds a data-driven constraint to GlobalModel. Data driven BBLs
do not allow for resampling.
"""
function add_datadriven_constraint(gm::GlobalModel,
X::DataFrame, Y::Array;
constraint::Union{Nothing, JuMP.ConstraintRef, Expr} = nothing,
vars::Union{Nothing, Array{JuMP.VariableRef, 1}} = nothing,
dependent_var::Union{Nothing, JuMP.VariableRef} = nothing,
name::String = "bbl" * string(length(gm.bbls) + 1),
equality::Bool = false)
if isnothing(vars)
vars = add_variables_from_data!(gm, X)
else
@assert size(X, 2) == length(vars)
end
expr_vars = vars
if isnothing(dependent_var)
new_bbl = BlackBoxClassifier(constraint = constraint, vars = vars, expr_vars = expr_vars,
equality = equality, name = name)
add_data!(new_bbl, X, Y)
push!(gm.bbls, new_bbl)
return
else
new_bbl = BlackBoxRegressor(constraint = constraint, vars = vars, expr_vars = expr_vars,
dependent_var = dependent_var, equality = equality, name = name)
add_data!(new_bbl, X, Y)
push!(gm.bbls, new_bbl)
return
end
end | [
37811,
198,
220,
220,
220,
751,
62,
25641,
2977,
62,
6738,
62,
7890,
0,
7,
39870,
3712,
38176,
90,
33018,
7378,
13,
17633,
11,
8060,
17633,
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,
1395,
3712,
6601,
19778,
8,
198,
198,
46245,
14,
19796,
82,
9633,
6906,
319,
262,
15180,
286,
1395,
13,
220,
198,
37811,
198,
8818,
751,
62,
25641,
2977,
62,
6738,
62,
7890,
0,
7,
76,
3712,
33018,
7378,
13,
17633,
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,
1395,
3712,
6601,
19778,
8,
198,
220,
220,
220,
1401,
13083,
796,
3891,
7,
55,
8,
198,
220,
220,
220,
410,
945,
796,
17635,
198,
220,
220,
220,
1366,
62,
85,
945,
796,
17635,
198,
220,
220,
220,
329,
1994,
287,
1401,
13083,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
85,
945,
11,
285,
58,
13940,
23650,
7,
2539,
8,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
4929,
7383,
12331,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
85,
796,
2488,
45286,
7,
76,
11,
2779,
62,
3672,
796,
4731,
7,
2539,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
58,
13940,
23650,
7,
2539,
15437,
796,
299,
85,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
85,
945,
11,
299,
85,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
7890,
62,
85,
945,
11,
38357,
7,
2539,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
4129,
7,
7890,
62,
85,
945,
8,
14512,
657,
11405,
2488,
10951,
7203,
13003,
29568,
13664,
7,
7890,
62,
85,
945,
4008,
9633,
422,
1366,
25,
366,
1635,
4731,
7,
7890,
62,
85,
945,
4008,
198,
220,
220,
220,
1441,
410,
945,
198,
437,
198,
198,
2860,
62,
25641,
2977,
62,
6738,
62,
7890,
0,
7,
39870,
3712,
22289,
17633,
11,
1395,
3712,
6601,
19778,
8,
796,
751,
62,
25641,
2977,
62,
6738,
62,
7890,
0,
7,
39870,
13,
19849,
11,
1395,
8,
628,
198,
37811,
220,
198,
220,
220,
220,
5421,
62,
1462,
62,
7890,
0,
7,
39870,
3712,
38176,
90,
33018,
7378,
13,
17633,
11,
8060,
17633,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
3712,
6601,
19778,
8,
198,
198,
3103,
2536,
1299,
262,
7386,
286,
5981,
9633,
284,
262,
3091,
16654,
5447,
416,
1395,
13,
198,
37811,
198,
8818,
5421,
62,
1462,
62,
7890,
0,
7,
76,
3712,
33018,
7378,
13,
17633,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
3712,
6601,
19778,
8,
198,
220,
220,
220,
410,
945,
796,
17635,
198,
220,
220,
220,
1949,
220,
198,
220,
220,
220,
220,
220,
220,
220,
410,
945,
796,
685,
76,
58,
13940,
23650,
7,
2539,
15437,
329,
1994,
287,
3891,
7,
55,
15437,
198,
220,
220,
220,
4929,
13794,
891,
19852,
12331,
198,
220,
220,
220,
220,
220,
220,
220,
3714,
7,
46,
4177,
23303,
38,
2202,
16922,
7203,
5492,
787,
1654,
262,
8251,
286,
1395,
2872,
351,
9633,
287,
2746,
29568,
39870,
21387,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
16069,
796,
360,
713,
7,
76,
58,
13940,
23650,
7,
2539,
15437,
5218,
685,
39504,
19510,
55,
58,
28265,
38357,
7,
2539,
8,
12962,
828,
5415,
19510,
55,
58,
28265,
38357,
7,
2539,
15437,
4008,
60,
329,
1994,
287,
3891,
7,
55,
4008,
198,
220,
220,
220,
5421,
0,
7,
76,
11,
16069,
1776,
198,
220,
220,
220,
1441,
198,
437,
198,
220,
220,
220,
220,
198,
7784,
62,
1462,
62,
7890,
0,
7,
39870,
3712,
22289,
17633,
11,
1395,
3712,
6601,
19778,
8,
796,
5421,
62,
1462,
62,
7890,
0,
7,
39870,
13,
19849,
11,
1395,
8,
198,
198,
37811,
198,
220,
220,
220,
751,
62,
19608,
324,
380,
574,
62,
1102,
2536,
2913,
7,
39870,
3712,
22289,
17633,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
3712,
6601,
19778,
11,
575,
3712,
19182,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32315,
3712,
38176,
90,
18465,
11,
12585,
7378,
13,
3103,
2536,
2913,
8134,
11,
1475,
1050,
92,
796,
2147,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
945,
3712,
38176,
90,
18465,
11,
15690,
90,
33018,
7378,
13,
43015,
8134,
11,
352,
11709,
796,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
7785,
3712,
38176,
90,
18465,
11,
12585,
7378,
13,
43015,
8134,
92,
796,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,
10100,
796,
366,
65,
2436,
1,
1635,
4731,
7,
13664,
7,
39870,
13,
65,
2436,
82,
8,
1343,
352,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10537,
3712,
33,
970,
796,
3991,
8,
628,
34333,
257,
1366,
12,
15808,
32315,
284,
8060,
17633,
13,
6060,
7986,
347,
9148,
82,
198,
4598,
407,
1249,
329,
581,
321,
11347,
13,
220,
198,
37811,
198,
8818,
751,
62,
19608,
324,
380,
574,
62,
1102,
2536,
2913,
7,
39870,
3712,
22289,
17633,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
3712,
6601,
19778,
11,
575,
3712,
19182,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32315,
3712,
38176,
90,
18465,
11,
12585,
7378,
13,
3103,
2536,
2913,
8134,
11,
1475,
1050,
92,
796,
2147,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
945,
3712,
38176,
90,
18465,
11,
15690,
90,
33018,
7378,
13,
43015,
8134,
11,
352,
11709,
796,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
7785,
3712,
38176,
90,
18465,
11,
12585,
7378,
13,
43015,
8134,
92,
796,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,
10100,
796,
366,
65,
2436,
1,
1635,
4731,
7,
13664,
7,
39870,
13,
65,
2436,
82,
8,
1343,
352,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10537,
3712,
33,
970,
796,
3991,
8,
198,
220,
220,
220,
611,
318,
22366,
7,
85,
945,
8,
198,
220,
220,
220,
220,
220,
220,
220,
410,
945,
796,
751,
62,
25641,
2977,
62,
6738,
62,
7890,
0,
7,
39870,
11,
1395,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
30493,
2546,
7,
55,
11,
362,
8,
6624,
4129,
7,
85,
945,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44052,
62,
85,
945,
796,
410,
945,
198,
220,
220,
220,
611,
318,
22366,
7,
21186,
62,
7785,
8,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
65,
2436,
796,
2619,
14253,
9487,
7483,
7,
1102,
2536,
2913,
796,
32315,
11,
410,
945,
796,
410,
945,
11,
44052,
62,
85,
945,
796,
44052,
62,
85,
945,
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,
10537,
796,
10537,
11,
1438,
796,
1438,
8,
198,
220,
220,
220,
220,
220,
220,
220,
751,
62,
7890,
0,
7,
3605,
62,
65,
2436,
11,
1395,
11,
575,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
39870,
13,
65,
2436,
82,
11,
649,
62,
65,
2436,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
65,
2436,
796,
2619,
14253,
8081,
44292,
7,
1102,
2536,
2913,
796,
32315,
11,
410,
945,
796,
410,
945,
11,
44052,
62,
85,
945,
796,
44052,
62,
85,
945,
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,
10795,
62,
7785,
796,
10795,
62,
7785,
11,
10537,
796,
10537,
11,
1438,
796,
1438,
8,
198,
220,
220,
220,
220,
220,
220,
220,
751,
62,
7890,
0,
7,
3605,
62,
65,
2436,
11,
1395,
11,
575,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
39870,
13,
65,
2436,
82,
11,
649,
62,
65,
2436,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
198,
220,
220,
220,
886,
198,
437
] | 2.024074 | 1,620 |
import JSON
using Gadfly
adaptLog = JSON.parsefile("adapt3.log")
notAdaptLog = JSON.parsefile("notAdapt3.log")
p = plot(layer(x = map(x -> x["id"], adaptLog),
y = map(x -> mean(x["results"]), adaptLog),
xintercept = [10, 50],
Geom.point,
Geom.vline,
Theme(highlight_width = 0pt)),
layer(x = map(x -> x["id"], notAdaptLog),
y = map(x -> mean(x["results"]), notAdaptLog),
Geom.point,
Theme(default_color=colorant"red", highlight_width = 0pt)),
Scale.x_continuous(minvalue=0, maxvalue=60),
Scale.y_log10,
Guide.xlabel("Time (s)"),
Guide.ylabel("Response time (ms)"),
Guide.manual_color_key("Legend",
["Self-adaptive", "Non-self-adaptive"],
["deepskyblue", "red"]))
p2 = plot(
layer(x = map(x -> x["id"], adaptLog),
y = map(x->length(x["results"]), adaptLog),
Geom.bar,
Theme(bar_spacing=0.5mm)),
Guide.xlabel("Time (s)"),
Guide.ylabel("Number of requests"),
Scale.x_continuous(minvalue=0, maxvalue=70),
Scale.y_continuous(minvalue=0, maxvalue=30)
)
draw(PDF("myplot1.pdf", 10inch, 5inch), p)
draw(PDF("myplot2.pdf", 10inch, 5inch), p2)
| [
11748,
19449,
198,
3500,
20925,
12254,
198,
198,
42552,
11187,
796,
19449,
13,
29572,
7753,
7203,
42552,
18,
13,
6404,
4943,
198,
1662,
48003,
11187,
796,
19449,
13,
29572,
7753,
7203,
1662,
48003,
18,
13,
6404,
4943,
198,
198,
79,
796,
7110,
7,
29289,
7,
87,
796,
3975,
7,
87,
4613,
2124,
14692,
312,
33116,
6068,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
3975,
7,
87,
4613,
1612,
7,
87,
14692,
43420,
8973,
828,
6068,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
3849,
984,
796,
685,
940,
11,
2026,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2269,
296,
13,
4122,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2269,
296,
13,
85,
1370,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26729,
7,
8929,
2971,
62,
10394,
796,
657,
457,
36911,
628,
220,
220,
220,
220,
220,
220,
220,
220,
7679,
7,
87,
796,
3975,
7,
87,
4613,
2124,
14692,
312,
33116,
407,
48003,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
3975,
7,
87,
4613,
1612,
7,
87,
14692,
43420,
8973,
828,
407,
48003,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2269,
296,
13,
4122,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26729,
7,
12286,
62,
8043,
28,
8043,
415,
1,
445,
1600,
7238,
62,
10394,
796,
657,
457,
36911,
628,
220,
220,
220,
220,
220,
220,
220,
220,
21589,
13,
87,
62,
18487,
5623,
7,
1084,
8367,
28,
15,
11,
3509,
8367,
28,
1899,
828,
628,
220,
220,
220,
220,
220,
220,
220,
220,
21589,
13,
88,
62,
6404,
940,
11,
628,
220,
220,
220,
220,
220,
220,
220,
220,
10005,
13,
87,
18242,
7203,
7575,
357,
82,
8,
12340,
628,
220,
220,
220,
220,
220,
220,
220,
220,
10005,
13,
2645,
9608,
7203,
31077,
640,
357,
907,
8,
12340,
628,
220,
220,
220,
220,
220,
220,
220,
220,
10005,
13,
805,
723,
62,
8043,
62,
2539,
7203,
21351,
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,
14631,
24704,
12,
42552,
425,
1600,
366,
15419,
12,
944,
12,
42552,
425,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14631,
22089,
15688,
17585,
1600,
366,
445,
8973,
4008,
198,
198,
79,
17,
796,
7110,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
7679,
7,
87,
796,
3975,
7,
87,
4613,
2124,
14692,
312,
33116,
6068,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
3975,
7,
87,
3784,
13664,
7,
87,
14692,
43420,
8973,
828,
6068,
11187,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2269,
296,
13,
5657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26729,
7,
5657,
62,
2777,
4092,
28,
15,
13,
20,
3020,
36911,
628,
220,
220,
220,
220,
220,
220,
220,
220,
10005,
13,
87,
18242,
7203,
7575,
357,
82,
8,
12340,
628,
220,
220,
220,
220,
220,
220,
220,
220,
10005,
13,
2645,
9608,
7203,
15057,
286,
7007,
12340,
628,
220,
220,
220,
220,
220,
220,
220,
220,
21589,
13,
87,
62,
18487,
5623,
7,
1084,
8367,
28,
15,
11,
3509,
8367,
28,
2154,
828,
628,
220,
220,
220,
220,
220,
220,
220,
220,
21589,
13,
88,
62,
18487,
5623,
7,
1084,
8367,
28,
15,
11,
3509,
8367,
28,
1270,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
198,
19334,
7,
20456,
7203,
1820,
29487,
16,
13,
12315,
1600,
838,
8589,
11,
642,
8589,
828,
279,
8,
198,
198,
19334,
7,
20456,
7203,
1820,
29487,
17,
13,
12315,
1600,
838,
8589,
11,
642,
8589,
828,
279,
17,
8,
198
] | 1.903846 | 728 |
#!/usr/bin/env julia
#
# usage:
# script......... plaint.jl /path/to/system.yml
# interactively.. julia -qi plaint.jl
using YAML #read data file
using DelimitedFiles #output results
using LinearAlgebra
"""
ksnr(e, M, eps, max_iterations)
Solve Kepler's equation with NR method.
"""
function ksnr(e::Float64, M::Float64,
eps::Float64 = 1e-16, nm::Int64 = 16)
x = M + e * sin(M)
d = (x - e * sin(x) - M) / (1 - e * cos(x))
while abs(d) > eps && nm > 0
x -= d
d = (x - e * sin(x) - M) / (1 - e * cos(x))
nm -= 1
end
return x
end
"""
euler_rotd(Ω, i, ω)
Return Eulerian rotation.
"""
function euler_rotd(Ω::Float64, i::Float64, ω::Float64)
return [ cosd(Ω) -sind(Ω) 0; sind(Ω) cosd(Ω) 0; 0 0 1 ] *
[ 1 0 0; 0 cosd(i) -sind(i); 0 sind(i) cosd(i) ] *
[ cosd(ω) -sind(ω) 0; sind(ω) cosd(ω) 0; 0 0 1 ]
end
"""
oe_to_xv!(mu, j, orbital_elements, positions, velocities)
Convert orbital elements to cartesian vectors.
"""
function oe_to_xv!(mu::Float64, j::Int64,
oe::Array{Float64,2},
vr::Array{Float64,2}, vv::Array{Float64,2})
a, e, i, Ω, ω, M = oe[:, j]
E = ksnr(e, M * π / 180)
r = a * (1 - e * cos(E))
pof = [cos(E) - e, sqrt(1 - e^2) * sin(E), 0] * a
vof = [ - sin(E), sqrt(1 - e^2) * cos(E), 0] * (sqrt(mu * a) / r)
rot = euler_rotd(Ω, i, ω)
vr[:, j] = rot * pof
vv[:, j] = rot * vof
end
"""
xv_to_oe!(mu, j, positions, velocities, orbital_elements)
Convert cartesian vectors to orbital elements.
"""
function xv_to_oe!(mu::Float64, j::Int64,
rt::Array{Float64,2}, vt::Array{Float64,2},
oe::Array{Float64,2})
tiny = 1e-10
vr, vv = rt[:, j], vt[:, j]
r = norm(vr)
v = norm(vv)
vh = cross(vr, vv)
h = norm(vh)
vn = [-vh[2], vh[1], 0]
n = norm(vn)
ve = cross(vv, vh) / mu - vr / r
a = 1 / (2 / r - v^2 / mu)
e = norm(ve)
i = acos(vh[3] / h)
if e > tiny
if n > tiny
Ω = acos(vn[1] / n)
if vn[2] < 0
Ω = 2π - Ω
end
ω = acos(dot(ve, vn) / (e * n))
if ve[3] < 0
ω = 2π - ω
end
else
i = Ω = .0
ω = atan2(ve[2], ve[3])
if cross(ve, vr)[3] < 0
ω = 2π - ω
end
end
nu = acos(dot(ve, vr)/(e * r))
if dot(vr, vv) < 0
nu = 2π - nu
end
else
#not implemented
end
E = 2 * atan(sqrt((1 - e) / (1 + e)) * tan(nu / 2))
M = E - e * sin(E)
if M < 0
M += 2π
end
i, Ω, ω, M = [i, Ω, ω, M] * 180 / π
oe[:, j] = [a, e, i, Ω % 360, ω % 360, M % 360]
end
"""
grav_a!(no_of_bodies, masses, positions, acceleration)
Compute gravitational acceleration.
!!! note
The `a` should be multiplied with the appropriate gravitational constant.
"""
function grav_a!(n::Int64, m::Array{Float64,1},
x::Array{Float64,2}, a::Array{Float64,2})
fill!(a, 0)
@inbounds for i = 1:(n - 1), j = (i + 1):n
R = x[:, i] - x[:, j]
Rd3 = R / norm(R)^3
a[:, i] -= m[j] * Rd3
a[:, j] += m[i] * Rd3
end
end
"""
mksnr(dt, α, n, σ0, r0, eps, max_iterations)
Solve modified Kepler's equation with NR method.
!!! note
Argument `α` is the inverse of semimajor axis.
"""
function mksnr(dt::Float64, α::Float64, n::Float64, s::Float64, r0::Float64,
eps::Float64 = 1e-16, nm::Int64 = 16)
r0a, s0a, ndt = 1 - r0 * α, s * sqrt(α), n * dt
x = π
d = (x - r0a * sin(x) - s0a * (cos(x) - 1) - ndt) /
(1 - r0a * cos(x) + s0a * sin(x))
while abs(d) > eps && nm > 0
x -= d
d = (x - r0a * sin(x) - s0a * (cos(x) - 1) - ndt) /
(1 - r0a * cos(x) + s0a * sin(x))
nm -= 1
end
return x
end
"""
gauss_step!(dt, mu, no_of_bodies, positions, velocities)
Keplerian drift using Gauss' f, g functions.
"""
function gauss_step!(dt::Float64, mu::Float64, np::Int64,
rt::Array{Float64,2}, vt::Array{Float64,2})
@inbounds @simd for i = 1:np
vr0, vv0 = rt[:, i], vt[:, i]
r0, v0 = norm(vr0), norm(vv0)
α = 2 / r0 - v0^2 / mu
a, n = 1 / α, sqrt(mu * α^3)
s = dot(vr0, vv0) / sqrt(mu)
E = mksnr(dt, α, n, s, r0)
cose, sine = cos(E), sin(E)
r1 = a + (r0 - a) * cose + sqrt(a) * s * sine
a1ce = a * (cose - 1)
ivr0, ivr1 = 1 / r0, 1 / r1
ft = 1 + a1ce * ivr0
gt = dt + (sine - E) / n
fd = - a^2 * n * sine * ivr1 * ivr0
#gd = 1 + a1ce * ivr1
gd = (1 + gt * fd) / ft
rt[:, i] = ft * vr0 + gt * vv0
vt[:, i] = fd * vr0 + gd * vv0
end
end
"""
eam_dh(no_of_bodies, masses, positions, velocities)
Compute energy and angular momentum, with democratic heliocentric vectors.
"""
function eam_dh(np::Int64, m::Array{Float64,1},
x::Array{Float64,2}, v::Array{Float64,2})
et, am = norm(sum(m' .* v, dims = 2))^2 / 2, zeros(3)
@inbounds @simd for i = 1:np
et += m[i] * norm(v[:, i])^2 / 2
et -= m[i] / norm(x[:, i])
am += m[i] * cross(x[:, i], v[:, i])
end
@inbounds for i = 1:(np - 1), j = (i + 1):np
et -= m[i] * m[j] / norm(x[:, i] - x[:, j])
end
return et, norm(am)
end
"""
plaint_dhi(iostream, total_iterations, dt, step_iterations,
mu, masses, orbital_elements)
Perform planetary integration using democratic heliocentric integrator.
"""
function plaint_dhi(of::Array{IOStream, 1},
kmax::Float64, dt::Float64, kpri::Float64, mu::Float64,
mp::Array{Float64,1}, oe::Array{Float64,2})
mt = 1 / (sum(mp) + 1)
np = size(mp, 1)
an = Array{Float64}(undef, 3, np)
x = similar(an)
v = similar(an)
@inbounds @simd for j = 1:np
oe_to_xv!(mu, j, oe, x, v)
end
v .-= mt * sum(mp' .* v, dims = 2) #to_dh
el0 = eam_dh(np, mp, x, v)
println("Initial energy: ", el0[1], "\n",
"Initial angular momentum: ", el0[2], "\n")
d2 = dt / 2
@inbounds for k = 1:kmax
try
x .+= d2 * sum(mp' .* v, dims = 2)
gauss_step!(d2, mu, np, x, v)
grav_a!(np, mp, x, an)
v .+= dt * an
gauss_step!(d2, mu, np, x, v)
x .+= d2 * sum(mp' .* v, dims = 2)
if k % kpri == 0
eln = eam_dh(np, mp, x, v)
va = v .+ mt * sum(mp' .* v, dims = 2) #to_ac
writedlm(of[end], [collect(eln .- el0); collect(@. 1 - eln / el0)]')
@simd for j = 1:np
xv_to_oe!(mu, j, x, va, oe)
writedlm(of[j], oe[:, j]')
end
end
catch
println("Error: Exiting on ", k, "\n")
break
end
end
close.(of)
end
"""
data_get(file)
Get planetary system's data and integration options.
"""
function data_get(file::String)
data = YAML.load_file(file)
tmax::Float64 = data["options"]["tmax"]
step::Float64 = data["options"]["step"]
ever::Float64 = data["options"]["ever"]
unit = "solar"
try
unit = data["system"]["units"]
catch
end
ms = data["system"]["star_mass"]
datp = data["system"]["planets"]
sort!(datp, by = x -> x["orbital_elements"][1])
np = size(datp, 1)
name = Array{String}(undef, np)
mp = Array{Float64}(undef, np)
oe = Array{Float64}(undef, 6, np)
@inbounds @simd for i = 1:np
name[i] = data["system"]["star_name"] * " " * datp[i]["id"]
mp[i] = datp[i]["mass"]
oe[:, i] = datp[i]["orbital_elements"]
end
return tmax, step, ever, ms, name, mp, oe, unit
end
"""
data_prep(tmax, step, ever,
star_mass, file_names, masses, orbital_elements, units)
Prepare data and options to feed to the integrator.
"""
function data_prep(tmax::Float64, step::Float64, ever::Float64,
ms::Float64, name::Array{String, 1},
mp::Array{Float64, 1}, oe::Array{Float64,2},
unit::String = "solar")
if unit == "solar"
mp = mp * 9.547919e-4 / ms
else #natural
mp = mp / ms
end
oe[1, :] /= oe[1, 1]
tp = 2π
dt = step * tp
kmax = div(tmax * tp, dt)
kpri = div(ever * tp, dt)
of = map(f -> open("out/$f.txt", "w"), name)
push!(of, open("out/eamerr.txt", "w"))
println("Total simulation time is: ", tmax, " yr\n",
"Time of every step to be: ", step, " yr\n",
"Total number of steps is: ", kmax, " steps\n",
"Output will be every: ", ever, " yr\n",
"or differently every: ", kpri, " steps\n")
return of, kmax, dt, kpri, 1.0, mp, oe
end
"""
usage()
Return an exemplary session.
"""
function usage()
println("## Example session:\n",
"#set file containing data\n",
"file = \"data/TRAPPIST-1.yml\";\n",
"#get data from file\n",
"tmax, step, ever, ms, name, mp, oe = data_get(file);\n",
"#or enter manually\n",
"dgr = (tmax, step, ever, ms, name, mp, oe);\n",
"#prepare data\n",
"of, kmax, dt, kpri, mu, mp, oe = data_prep(dgr...);\n",
"#integrate, available: plaint_dhi, plaint_s6i\n",
"plaint_dhi(of, kmax, dt, kpri, mu, mp, oe);\n",
"#benchmark integration of a particular system\n",
"@time plaint_dhi(data_prep(data_get(file)...)...);")
end
## Session
# Run as script or, interactively in a Julia session.
if ! isinteractive()
@time plaint_dhi(data_prep(data_get(ARGS[1])...)...)
else
usage()
end
| [
2,
48443,
14629,
14,
8800,
14,
24330,
474,
43640,
198,
2,
198,
2,
8748,
25,
198,
2,
220,
4226,
34617,
13371,
13,
20362,
1220,
6978,
14,
1462,
14,
10057,
13,
88,
4029,
198,
2,
220,
9427,
2280,
492,
474,
43640,
532,
40603,
13371,
13,
20362,
198,
198,
3500,
575,
2390,
43,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
961,
1366,
2393,
198,
3500,
4216,
320,
863,
25876,
220,
220,
220,
1303,
22915,
2482,
198,
3500,
44800,
2348,
29230,
198,
198,
37811,
198,
220,
220,
220,
479,
16184,
81,
7,
68,
11,
337,
11,
304,
862,
11,
3509,
62,
2676,
602,
8,
198,
198,
50,
6442,
40294,
338,
16022,
351,
23057,
2446,
13,
198,
37811,
198,
8818,
479,
16184,
81,
7,
68,
3712,
43879,
2414,
11,
337,
3712,
43879,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
862,
3712,
43879,
2414,
796,
352,
68,
12,
1433,
11,
28642,
3712,
5317,
2414,
796,
1467,
8,
198,
220,
220,
220,
2124,
796,
337,
1343,
304,
1635,
7813,
7,
44,
8,
198,
220,
220,
220,
288,
796,
357,
87,
532,
304,
1635,
7813,
7,
87,
8,
532,
337,
8,
1220,
357,
16,
532,
304,
1635,
8615,
7,
87,
4008,
198,
220,
220,
220,
981,
2352,
7,
67,
8,
1875,
304,
862,
11405,
28642,
1875,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
48185,
288,
198,
220,
220,
220,
220,
220,
220,
220,
288,
796,
357,
87,
532,
304,
1635,
7813,
7,
87,
8,
532,
337,
8,
1220,
357,
16,
532,
304,
1635,
8615,
7,
87,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
28642,
48185,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
2124,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
304,
18173,
62,
305,
8671,
7,
138,
102,
11,
1312,
11,
18074,
231,
8,
198,
198,
13615,
412,
18173,
666,
13179,
13,
198,
37811,
198,
8818,
304,
18173,
62,
305,
8671,
7,
138,
102,
3712,
43879,
2414,
11,
1312,
3712,
43879,
2414,
11,
18074,
231,
3712,
43879,
2414,
8,
198,
220,
220,
220,
1441,
685,
8615,
67,
7,
138,
102,
8,
532,
82,
521,
7,
138,
102,
8,
657,
26,
264,
521,
7,
138,
102,
8,
8615,
67,
7,
138,
102,
8,
657,
26,
657,
657,
352,
2361,
1635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
352,
657,
657,
26,
657,
8615,
67,
7,
72,
8,
532,
82,
521,
7,
72,
1776,
657,
264,
521,
7,
72,
8,
8615,
67,
7,
72,
8,
2361,
1635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
8615,
67,
7,
49535,
8,
532,
82,
521,
7,
49535,
8,
657,
26,
264,
521,
7,
49535,
8,
8615,
67,
7,
49535,
8,
657,
26,
657,
657,
352,
2361,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
267,
68,
62,
1462,
62,
87,
85,
0,
7,
30300,
11,
474,
11,
32362,
62,
68,
3639,
11,
6116,
11,
11555,
420,
871,
8,
198,
198,
3103,
1851,
32362,
4847,
284,
6383,
35610,
30104,
13,
198,
37811,
198,
8818,
267,
68,
62,
1462,
62,
87,
85,
0,
7,
30300,
3712,
43879,
2414,
11,
474,
3712,
5317,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
68,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
81,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
410,
85,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
257,
11,
304,
11,
1312,
11,
7377,
102,
11,
18074,
231,
11,
337,
796,
267,
68,
58,
45299,
474,
60,
198,
220,
220,
220,
412,
796,
479,
16184,
81,
7,
68,
11,
337,
1635,
18074,
222,
1220,
11546,
8,
198,
220,
220,
220,
374,
796,
257,
1635,
357,
16,
532,
304,
1635,
8615,
7,
36,
4008,
198,
220,
220,
220,
745,
69,
796,
685,
6966,
7,
36,
8,
532,
304,
11,
19862,
17034,
7,
16,
532,
304,
61,
17,
8,
1635,
7813,
7,
36,
828,
657,
60,
1635,
257,
198,
220,
220,
220,
410,
1659,
796,
685,
220,
532,
7813,
7,
36,
828,
19862,
17034,
7,
16,
532,
304,
61,
17,
8,
1635,
8615,
7,
36,
828,
657,
60,
1635,
357,
31166,
17034,
7,
30300,
1635,
257,
8,
1220,
374,
8,
198,
220,
220,
220,
5724,
796,
304,
18173,
62,
305,
8671,
7,
138,
102,
11,
1312,
11,
18074,
231,
8,
198,
220,
220,
220,
410,
81,
58,
45299,
474,
60,
796,
5724,
1635,
745,
69,
198,
220,
220,
220,
410,
85,
58,
45299,
474,
60,
796,
5724,
1635,
410,
1659,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
2124,
85,
62,
1462,
62,
2577,
0,
7,
30300,
11,
474,
11,
6116,
11,
11555,
420,
871,
11,
32362,
62,
68,
3639,
8,
198,
198,
3103,
1851,
6383,
35610,
30104,
284,
32362,
4847,
13,
198,
37811,
198,
8818,
2124,
85,
62,
1462,
62,
2577,
0,
7,
30300,
3712,
43879,
2414,
11,
474,
3712,
5317,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
83,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
410,
83,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
68,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
7009,
796,
352,
68,
12,
940,
198,
220,
220,
220,
410,
81,
11,
410,
85,
796,
374,
83,
58,
45299,
474,
4357,
410,
83,
58,
45299,
474,
60,
198,
220,
220,
220,
374,
796,
2593,
7,
37020,
8,
198,
220,
220,
220,
410,
796,
2593,
7,
25093,
8,
198,
220,
220,
220,
410,
71,
796,
3272,
7,
37020,
11,
410,
85,
8,
198,
220,
220,
220,
289,
796,
2593,
7,
85,
71,
8,
198,
220,
220,
220,
410,
77,
796,
25915,
85,
71,
58,
17,
4357,
410,
71,
58,
16,
4357,
657,
60,
198,
220,
220,
220,
299,
796,
2593,
7,
85,
77,
8,
198,
220,
220,
220,
1569,
796,
3272,
7,
25093,
11,
410,
71,
8,
1220,
38779,
532,
410,
81,
1220,
374,
198,
220,
220,
220,
257,
796,
352,
1220,
357,
17,
1220,
374,
532,
410,
61,
17,
1220,
38779,
8,
198,
220,
220,
220,
304,
796,
2593,
7,
303,
8,
198,
220,
220,
220,
1312,
796,
936,
418,
7,
85,
71,
58,
18,
60,
1220,
289,
8,
198,
220,
220,
220,
611,
304,
1875,
7009,
198,
220,
220,
220,
220,
220,
220,
220,
611,
299,
1875,
7009,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7377,
102,
796,
936,
418,
7,
85,
77,
58,
16,
60,
1220,
299,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
410,
77,
58,
17,
60,
1279,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7377,
102,
796,
362,
46582,
532,
7377,
102,
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,
18074,
231,
796,
936,
418,
7,
26518,
7,
303,
11,
410,
77,
8,
1220,
357,
68,
1635,
299,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1569,
58,
18,
60,
1279,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18074,
231,
796,
362,
46582,
532,
18074,
231,
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,
1312,
796,
7377,
102,
796,
764,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18074,
231,
796,
379,
272,
17,
7,
303,
58,
17,
4357,
1569,
58,
18,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
3272,
7,
303,
11,
410,
81,
38381,
18,
60,
1279,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18074,
231,
796,
362,
46582,
532,
18074,
231,
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,
14364,
796,
936,
418,
7,
26518,
7,
303,
11,
410,
81,
20679,
7,
68,
1635,
374,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
16605,
7,
37020,
11,
410,
85,
8,
1279,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14364,
796,
362,
46582,
532,
14364,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1662,
9177,
198,
220,
220,
220,
886,
198,
220,
220,
220,
412,
796,
362,
1635,
379,
272,
7,
31166,
17034,
19510,
16,
532,
304,
8,
1220,
357,
16,
1343,
304,
4008,
1635,
25706,
7,
28803,
1220,
362,
4008,
198,
220,
220,
220,
337,
796,
412,
532,
304,
1635,
7813,
7,
36,
8,
198,
220,
220,
220,
611,
337,
1279,
657,
198,
220,
220,
220,
220,
220,
220,
220,
337,
15853,
362,
46582,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1312,
11,
7377,
102,
11,
18074,
231,
11,
337,
796,
685,
72,
11,
7377,
102,
11,
18074,
231,
11,
337,
60,
1635,
11546,
1220,
18074,
222,
198,
220,
220,
220,
267,
68,
58,
45299,
474,
60,
796,
685,
64,
11,
304,
11,
1312,
11,
7377,
102,
4064,
11470,
11,
18074,
231,
4064,
11470,
11,
337,
4064,
11470,
60,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
9067,
62,
64,
0,
7,
3919,
62,
1659,
62,
65,
5042,
11,
14568,
11,
6116,
11,
20309,
8,
198,
198,
7293,
1133,
29973,
20309,
13,
198,
10185,
3465,
198,
220,
220,
220,
383,
4600,
64,
63,
815,
307,
33096,
351,
262,
5035,
29973,
6937,
13,
198,
37811,
198,
8818,
9067,
62,
64,
0,
7,
77,
3712,
5317,
2414,
11,
285,
3712,
19182,
90,
43879,
2414,
11,
16,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
257,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
6070,
0,
7,
64,
11,
657,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
329,
1312,
796,
352,
37498,
77,
532,
352,
828,
474,
796,
357,
72,
1343,
352,
2599,
77,
198,
220,
220,
220,
220,
220,
220,
220,
371,
796,
2124,
58,
45299,
1312,
60,
532,
2124,
58,
45299,
474,
60,
198,
220,
220,
220,
220,
220,
220,
220,
20769,
18,
796,
371,
1220,
2593,
7,
49,
8,
61,
18,
198,
220,
220,
220,
220,
220,
220,
220,
257,
58,
45299,
1312,
60,
48185,
285,
58,
73,
60,
1635,
20769,
18,
198,
220,
220,
220,
220,
220,
220,
220,
257,
58,
45299,
474,
60,
15853,
285,
58,
72,
60,
1635,
20769,
18,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
285,
591,
48624,
7,
28664,
11,
26367,
11,
299,
11,
18074,
225,
15,
11,
374,
15,
11,
304,
862,
11,
3509,
62,
2676,
602,
8,
198,
198,
50,
6442,
9518,
40294,
338,
16022,
351,
23057,
2446,
13,
198,
10185,
3465,
198,
220,
220,
220,
45751,
4600,
17394,
63,
318,
262,
34062,
286,
5026,
320,
1518,
16488,
13,
198,
37811,
198,
8818,
285,
591,
48624,
7,
28664,
3712,
43879,
2414,
11,
26367,
3712,
43879,
2414,
11,
299,
3712,
43879,
2414,
11,
264,
3712,
43879,
2414,
11,
374,
15,
3712,
43879,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
862,
3712,
43879,
2414,
796,
352,
68,
12,
1433,
11,
28642,
3712,
5317,
2414,
796,
1467,
8,
198,
220,
220,
220,
374,
15,
64,
11,
264,
15,
64,
11,
299,
28664,
796,
352,
532,
374,
15,
1635,
26367,
11,
264,
1635,
19862,
17034,
7,
17394,
828,
299,
1635,
288,
83,
198,
220,
220,
220,
2124,
796,
18074,
222,
198,
220,
220,
220,
288,
796,
357,
87,
532,
374,
15,
64,
1635,
7813,
7,
87,
8,
532,
264,
15,
64,
1635,
357,
6966,
7,
87,
8,
532,
352,
8,
532,
299,
28664,
8,
1220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
16,
532,
374,
15,
64,
1635,
8615,
7,
87,
8,
1343,
264,
15,
64,
1635,
7813,
7,
87,
4008,
198,
220,
220,
220,
981,
2352,
7,
67,
8,
1875,
304,
862,
11405,
28642,
1875,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
48185,
288,
198,
220,
220,
220,
220,
220,
220,
220,
288,
796,
357,
87,
532,
374,
15,
64,
1635,
7813,
7,
87,
8,
532,
264,
15,
64,
1635,
357,
6966,
7,
87,
8,
532,
352,
8,
532,
299,
28664,
8,
1220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
16,
532,
374,
15,
64,
1635,
8615,
7,
87,
8,
1343,
264,
15,
64,
1635,
7813,
7,
87,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
28642,
48185,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
2124,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
31986,
1046,
62,
9662,
0,
7,
28664,
11,
38779,
11,
645,
62,
1659,
62,
65,
5042,
11,
6116,
11,
11555,
420,
871,
8,
198,
198,
8896,
20053,
666,
24260,
1262,
12822,
1046,
6,
277,
11,
308,
5499,
13,
198,
37811,
198,
8818,
31986,
1046,
62,
9662,
0,
7,
28664,
3712,
43879,
2414,
11,
38779,
3712,
43879,
2414,
11,
45941,
3712,
5317,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
83,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
410,
83,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
1312,
796,
352,
25,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
410,
81,
15,
11,
410,
85,
15,
796,
374,
83,
58,
45299,
1312,
4357,
410,
83,
58,
45299,
1312,
60,
198,
220,
220,
220,
220,
220,
220,
220,
374,
15,
11,
410,
15,
796,
2593,
7,
37020,
15,
828,
2593,
7,
25093,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
26367,
796,
362,
1220,
374,
15,
532,
410,
15,
61,
17,
1220,
38779,
198,
220,
220,
220,
220,
220,
220,
220,
257,
11,
299,
796,
352,
1220,
26367,
11,
19862,
17034,
7,
30300,
1635,
26367,
61,
18,
8,
198,
220,
220,
220,
220,
220,
220,
220,
264,
796,
16605,
7,
37020,
15,
11,
410,
85,
15,
8,
1220,
19862,
17034,
7,
30300,
8,
198,
220,
220,
220,
220,
220,
220,
220,
412,
796,
285,
591,
48624,
7,
28664,
11,
26367,
11,
299,
11,
264,
11,
374,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
269,
577,
11,
264,
500,
796,
8615,
7,
36,
828,
7813,
7,
36,
8,
198,
220,
220,
220,
220,
220,
220,
220,
374,
16,
796,
257,
1343,
357,
81,
15,
532,
257,
8,
1635,
269,
577,
1343,
19862,
17034,
7,
64,
8,
1635,
264,
1635,
264,
500,
198,
220,
220,
220,
220,
220,
220,
220,
257,
16,
344,
796,
257,
1635,
357,
66,
577,
532,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
81,
15,
11,
21628,
81,
16,
796,
352,
1220,
374,
15,
11,
352,
1220,
374,
16,
198,
220,
220,
220,
220,
220,
220,
220,
10117,
796,
352,
1343,
257,
16,
344,
1635,
21628,
81,
15,
198,
220,
220,
220,
220,
220,
220,
220,
308,
83,
796,
288,
83,
1343,
357,
82,
500,
532,
412,
8,
1220,
299,
198,
220,
220,
220,
220,
220,
220,
220,
277,
67,
796,
532,
257,
61,
17,
1635,
299,
1635,
264,
500,
1635,
21628,
81,
16,
1635,
21628,
81,
15,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
21287,
796,
352,
1343,
257,
16,
344,
1635,
21628,
81,
16,
198,
220,
220,
220,
220,
220,
220,
220,
308,
67,
796,
357,
16,
1343,
308,
83,
1635,
277,
67,
8,
1220,
10117,
198,
220,
220,
220,
220,
220,
220,
220,
374,
83,
58,
45299,
1312,
60,
796,
10117,
1635,
410,
81,
15,
1343,
308,
83,
1635,
410,
85,
15,
198,
220,
220,
220,
220,
220,
220,
220,
410,
83,
58,
45299,
1312,
60,
796,
277,
67,
1635,
410,
81,
15,
1343,
308,
67,
1635,
410,
85,
15,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
304,
321,
62,
34985,
7,
3919,
62,
1659,
62,
65,
5042,
11,
14568,
11,
6116,
11,
11555,
420,
871,
8,
198,
198,
7293,
1133,
2568,
290,
32558,
12858,
11,
351,
10518,
932,
72,
420,
22317,
30104,
13,
198,
37811,
198,
8818,
304,
321,
62,
34985,
7,
37659,
3712,
5317,
2414,
11,
285,
3712,
19182,
90,
43879,
2414,
11,
16,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
410,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
2123,
11,
716,
796,
2593,
7,
16345,
7,
76,
6,
764,
9,
410,
11,
5391,
82,
796,
362,
4008,
61,
17,
1220,
362,
11,
1976,
27498,
7,
18,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
1312,
796,
352,
25,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
2123,
15853,
285,
58,
72,
60,
1635,
2593,
7,
85,
58,
45299,
1312,
12962,
61,
17,
1220,
362,
198,
220,
220,
220,
220,
220,
220,
220,
2123,
48185,
285,
58,
72,
60,
1220,
2593,
7,
87,
58,
45299,
1312,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
716,
15853,
285,
58,
72,
60,
1635,
3272,
7,
87,
58,
45299,
1312,
4357,
410,
58,
45299,
1312,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2488,
259,
65,
3733,
329,
1312,
796,
352,
37498,
37659,
532,
352,
828,
474,
796,
357,
72,
1343,
352,
2599,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
2123,
48185,
285,
58,
72,
60,
1635,
285,
58,
73,
60,
1220,
2593,
7,
87,
58,
45299,
1312,
60,
532,
2124,
58,
45299,
474,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
2123,
11,
2593,
7,
321,
8,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
13371,
62,
67,
5303,
7,
72,
455,
1476,
11,
2472,
62,
2676,
602,
11,
288,
83,
11,
2239,
62,
2676,
602,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
38779,
11,
14568,
11,
32362,
62,
68,
3639,
8,
198,
198,
5990,
687,
27047,
11812,
1262,
10518,
932,
72,
420,
22317,
4132,
12392,
13,
198,
37811,
198,
8818,
13371,
62,
67,
5303,
7,
1659,
3712,
19182,
90,
9399,
12124,
11,
352,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
9806,
3712,
43879,
2414,
11,
288,
83,
3712,
43879,
2414,
11,
479,
3448,
3712,
43879,
2414,
11,
38779,
3712,
43879,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29034,
3712,
19182,
90,
43879,
2414,
11,
16,
5512,
267,
68,
3712,
19182,
90,
43879,
2414,
11,
17,
30072,
198,
220,
220,
220,
45079,
796,
352,
1220,
357,
16345,
7,
3149,
8,
1343,
352,
8,
198,
220,
220,
220,
45941,
796,
2546,
7,
3149,
11,
352,
8,
198,
220,
220,
220,
281,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
513,
11,
45941,
8,
198,
220,
220,
220,
2124,
796,
2092,
7,
272,
8,
198,
220,
220,
220,
410,
796,
2092,
7,
272,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
474,
796,
352,
25,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
267,
68,
62,
1462,
62,
87,
85,
0,
7,
30300,
11,
474,
11,
267,
68,
11,
2124,
11,
410,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
410,
764,
12,
28,
45079,
1635,
2160,
7,
3149,
6,
764,
9,
410,
11,
5391,
82,
796,
362,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1462,
62,
34985,
198,
220,
220,
220,
1288,
15,
796,
304,
321,
62,
34985,
7,
37659,
11,
29034,
11,
2124,
11,
410,
8,
198,
220,
220,
220,
44872,
7203,
24243,
2568,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33172,
1288,
15,
58,
16,
4357,
37082,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
24243,
32558,
12858,
25,
33172,
1288,
15,
58,
17,
4357,
37082,
77,
4943,
198,
220,
220,
220,
288,
17,
796,
288,
83,
1220,
362,
198,
220,
220,
220,
2488,
259,
65,
3733,
329,
479,
796,
352,
25,
74,
9806,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
764,
47932,
288,
17,
1635,
2160,
7,
3149,
6,
764,
9,
410,
11,
5391,
82,
796,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31986,
1046,
62,
9662,
0,
7,
67,
17,
11,
38779,
11,
45941,
11,
2124,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9067,
62,
64,
0,
7,
37659,
11,
29034,
11,
2124,
11,
281,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
764,
47932,
288,
83,
1635,
281,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31986,
1046,
62,
9662,
0,
7,
67,
17,
11,
38779,
11,
45941,
11,
2124,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
764,
47932,
288,
17,
1635,
2160,
7,
3149,
6,
764,
9,
410,
11,
5391,
82,
796,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
479,
4064,
479,
3448,
6624,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
77,
796,
304,
321,
62,
34985,
7,
37659,
11,
29034,
11,
2124,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
46935,
796,
410,
764,
10,
45079,
1635,
2160,
7,
3149,
6,
764,
9,
410,
11,
5391,
82,
796,
362,
8,
220,
1303,
1462,
62,
330,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1991,
276,
75,
76,
7,
1659,
58,
437,
4357,
685,
33327,
7,
45542,
764,
12,
1288,
15,
1776,
2824,
7,
31,
13,
352,
532,
1288,
77,
1220,
1288,
15,
15437,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
14323,
67,
329,
474,
796,
352,
25,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
85,
62,
1462,
62,
2577,
0,
7,
30300,
11,
474,
11,
2124,
11,
46935,
11,
267,
68,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1991,
276,
75,
76,
7,
1659,
58,
73,
4357,
267,
68,
58,
45299,
474,
60,
11537,
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,
4929,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
12331,
25,
1475,
1780,
319,
33172,
479,
11,
37082,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1969,
12195,
1659,
8,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
1366,
62,
1136,
7,
7753,
8,
198,
198,
3855,
27047,
1080,
338,
1366,
290,
11812,
3689,
13,
198,
37811,
198,
8818,
1366,
62,
1136,
7,
7753,
3712,
10100,
8,
198,
220,
220,
220,
1366,
796,
575,
2390,
43,
13,
2220,
62,
7753,
7,
7753,
8,
198,
220,
220,
220,
256,
9806,
3712,
43879,
2414,
796,
1366,
14692,
25811,
1,
7131,
1,
83,
9806,
8973,
198,
220,
220,
220,
2239,
3712,
43879,
2414,
796,
1366,
14692,
25811,
1,
7131,
1,
9662,
8973,
198,
220,
220,
220,
1683,
3712,
43879,
2414,
796,
1366,
14692,
25811,
1,
7131,
1,
964,
8973,
198,
220,
220,
220,
4326,
796,
366,
82,
6192,
1,
198,
220,
220,
220,
1949,
198,
220,
220,
220,
220,
220,
220,
220,
4326,
796,
1366,
14692,
10057,
1,
7131,
1,
41667,
8973,
198,
220,
220,
220,
4929,
198,
220,
220,
220,
886,
198,
220,
220,
220,
13845,
796,
1366,
14692,
10057,
1,
7131,
1,
7364,
62,
22208,
8973,
198,
220,
220,
220,
4818,
79,
796,
1366,
14692,
10057,
1,
7131,
1,
11578,
1039,
8973,
198,
220,
220,
220,
3297,
0,
7,
19608,
79,
11,
416,
796,
2124,
4613,
2124,
14692,
27688,
1287,
62,
68,
3639,
1,
7131,
16,
12962,
198,
220,
220,
220,
45941,
796,
2546,
7,
19608,
79,
11,
352,
8,
198,
220,
220,
220,
1438,
796,
15690,
90,
10100,
92,
7,
917,
891,
11,
45941,
8,
198,
220,
220,
220,
29034,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
45941,
8,
198,
220,
220,
220,
267,
68,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
718,
11,
45941,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
2488,
14323,
67,
329,
1312,
796,
352,
25,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
58,
72,
60,
796,
1366,
14692,
10057,
1,
7131,
1,
7364,
62,
3672,
8973,
1635,
366,
366,
1635,
4818,
79,
58,
72,
7131,
1,
312,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
29034,
58,
72,
60,
796,
4818,
79,
58,
72,
7131,
1,
22208,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
267,
68,
58,
45299,
1312,
60,
796,
4818,
79,
58,
72,
7131,
1,
27688,
1287,
62,
68,
3639,
8973,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
256,
9806,
11,
2239,
11,
1683,
11,
13845,
11,
1438,
11,
29034,
11,
267,
68,
11,
4326,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
1366,
62,
46012,
7,
83,
9806,
11,
2239,
11,
1683,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3491,
62,
22208,
11,
2393,
62,
14933,
11,
14568,
11,
32362,
62,
68,
3639,
11,
4991,
8,
198,
198,
37534,
533,
1366,
290,
3689,
284,
3745,
284,
262,
4132,
12392,
13,
198,
37811,
198,
8818,
1366,
62,
46012,
7,
83,
9806,
3712,
43879,
2414,
11,
2239,
3712,
43879,
2414,
11,
1683,
3712,
43879,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
3712,
43879,
2414,
11,
1438,
3712,
19182,
90,
10100,
11,
352,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29034,
3712,
19182,
90,
43879,
2414,
11,
352,
5512,
267,
68,
3712,
19182,
90,
43879,
2414,
11,
17,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4326,
3712,
10100,
796,
366,
82,
6192,
4943,
198,
220,
220,
220,
611,
4326,
6624,
366,
82,
6192,
1,
198,
220,
220,
220,
220,
220,
220,
220,
29034,
796,
29034,
1635,
860,
13,
20,
31714,
1129,
68,
12,
19,
1220,
13845,
198,
220,
220,
220,
2073,
1303,
11802,
198,
220,
220,
220,
220,
220,
220,
220,
29034,
796,
29034,
1220,
13845,
198,
220,
220,
220,
886,
198,
220,
220,
220,
267,
68,
58,
16,
11,
1058,
60,
1220,
28,
267,
68,
58,
16,
11,
352,
60,
198,
220,
220,
220,
256,
79,
796,
362,
46582,
198,
220,
220,
220,
288,
83,
796,
2239,
1635,
256,
79,
198,
220,
220,
220,
479,
9806,
796,
2659,
7,
83,
9806,
1635,
256,
79,
11,
288,
83,
8,
198,
220,
220,
220,
479,
3448,
796,
2659,
7,
964,
1635,
256,
79,
11,
288,
83,
8,
198,
220,
220,
220,
286,
796,
3975,
7,
69,
4613,
1280,
7203,
448,
32624,
69,
13,
14116,
1600,
366,
86,
12340,
1438,
8,
198,
220,
220,
220,
4574,
0,
7,
1659,
11,
1280,
7203,
448,
14,
68,
2382,
81,
13,
14116,
1600,
366,
86,
48774,
198,
220,
220,
220,
44872,
7203,
14957,
18640,
640,
318,
25,
33172,
256,
9806,
11,
366,
42635,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7575,
286,
790,
2239,
284,
307,
25,
33172,
2239,
11,
366,
42635,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14957,
1271,
286,
4831,
318,
25,
33172,
479,
9806,
11,
366,
4831,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
26410,
481,
307,
790,
25,
220,
220,
220,
220,
33172,
1683,
11,
366,
42635,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
273,
10338,
790,
25,
220,
220,
220,
220,
33172,
479,
3448,
11,
366,
4831,
59,
77,
4943,
198,
220,
220,
220,
1441,
286,
11,
479,
9806,
11,
288,
83,
11,
479,
3448,
11,
352,
13,
15,
11,
29034,
11,
267,
68,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
8748,
3419,
198,
198,
13615,
281,
40690,
6246,
13,
198,
37811,
198,
8818,
8748,
3419,
198,
220,
220,
220,
44872,
7203,
2235,
17934,
6246,
7479,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2617,
2393,
7268,
1366,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7753,
796,
19990,
7890,
14,
5446,
24805,
8808,
12,
16,
13,
88,
4029,
7879,
26,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
1136,
1366,
422,
2393,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
83,
9806,
11,
2239,
11,
1683,
11,
13845,
11,
1438,
11,
29034,
11,
267,
68,
796,
1366,
62,
1136,
7,
7753,
1776,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
273,
3802,
14500,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
67,
2164,
796,
357,
83,
9806,
11,
2239,
11,
1683,
11,
13845,
11,
1438,
11,
29034,
11,
267,
68,
1776,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
46012,
533,
1366,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1659,
11,
479,
9806,
11,
288,
83,
11,
479,
3448,
11,
38779,
11,
29034,
11,
267,
68,
796,
1366,
62,
46012,
7,
67,
2164,
986,
1776,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
18908,
4873,
11,
1695,
25,
13371,
62,
67,
5303,
11,
13371,
62,
82,
21,
72,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
489,
2913,
62,
67,
5303,
7,
1659,
11,
479,
9806,
11,
288,
83,
11,
479,
3448,
11,
38779,
11,
29034,
11,
267,
68,
1776,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
26968,
4102,
11812,
286,
257,
1948,
1080,
59,
77,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44212,
2435,
13371,
62,
67,
5303,
7,
7890,
62,
46012,
7,
7890,
62,
1136,
7,
7753,
8,
23029,
986,
1776,
4943,
198,
437,
198,
198,
2235,
23575,
198,
2,
5660,
355,
4226,
393,
11,
9427,
2280,
287,
257,
22300,
6246,
13,
198,
198,
361,
5145,
318,
3849,
5275,
3419,
198,
220,
220,
220,
2488,
2435,
13371,
62,
67,
5303,
7,
7890,
62,
46012,
7,
7890,
62,
1136,
7,
1503,
14313,
58,
16,
12962,
23029,
23029,
198,
17772,
198,
220,
220,
220,
8748,
3419,
198,
437,
198
] | 1.822432 | 5,412 |
module pkgExample
export plusone
greet() = print("Hello World!")
plusone(x::Int) = x + 1
include("sumRand.jl")
end # module
| [
21412,
279,
10025,
16281,
198,
198,
39344,
5556,
505,
198,
198,
70,
2871,
3419,
796,
3601,
7203,
15496,
2159,
2474,
8,
198,
198,
9541,
505,
7,
87,
3712,
5317,
8,
796,
2124,
1343,
352,
198,
198,
17256,
7203,
16345,
38918,
13,
20362,
4943,
198,
198,
437,
1303,
8265,
198
] | 2.632653 | 49 |
using Test, CMDimData
function printsep(title)
println("\n", title, "\n", repeat("-", 80))
end
function show_testset_description()
@info Test.get_testset().description
end
@testset "CMDimData tests" begin
testfiles = ["EasyPlot.jl", "EasyData.jl"]
for testfile in testfiles
include(testfile)
end
end #testset
:Test_Complete
| [
3500,
6208,
11,
327,
12740,
320,
6601,
628,
198,
8818,
3601,
325,
79,
7,
7839,
8,
198,
197,
35235,
7203,
59,
77,
1600,
3670,
11,
37082,
77,
1600,
9585,
7203,
12,
1600,
4019,
4008,
198,
437,
198,
198,
8818,
905,
62,
9288,
2617,
62,
11213,
3419,
198,
197,
31,
10951,
6208,
13,
1136,
62,
9288,
2617,
22446,
11213,
198,
437,
198,
198,
31,
9288,
2617,
366,
34,
12740,
320,
6601,
5254,
1,
2221,
198,
197,
9288,
16624,
796,
14631,
28406,
43328,
13,
20362,
1600,
366,
28406,
6601,
13,
20362,
8973,
628,
197,
1640,
1332,
7753,
287,
1332,
16624,
198,
197,
197,
17256,
7,
9288,
7753,
8,
198,
197,
437,
198,
198,
437,
1303,
9288,
2617,
198,
198,
25,
14402,
62,
20988,
198
] | 2.770492 | 122 |
#"""
#Return a vector of vectors indicating the indices of identical values in a
#`Column` or identical rows of a `Table` using a sorting algorithm (accepting
#keyword arguments of Julia's `sort` interface).
#"""
"""
Return a vector of vectors indicating the indices of identical values in a
`Column` or identical rows of a `Table` using a hashing algorithm.
"""
function groupinds(C::Union{Column,Table}; kwargs...) # TODO this method name might be added to Base in 0.5 (https://github.com/JuliaLang/julia/pull/15503/)
out = Dict{eltype(C),Vector{Int}}()
i = 1
for i = 1:length(C)
if !in(C.data[i], keys(out))
out[C.data[i]] = [i]
else
push!(out[C.data[i]],i)
end
end
collect(values(out))
end
"""
Return the indices of the first unique elements in a `Column` or a `Table`.
"""
function uniqueind(x::Column)
out = Vector{Int}()
seen = Set{eltype(x)}()
i = 1
for y in x
if !in(y, seen)
push!(seen, y)
push!(out, i)
end
i += 1
end
out
end
function uniqueind(x::Table)
out = Vector{Int}()
seen = Set{eltype(x)}()
i = 1
for y in x
if !in(y.data, seen)
push!(seen, y.data)
push!(out, i)
end
i += 1
end
out
end
function Base.unique(x::Union{Column,Table})
x[uniqueind(x)]
end
"""
Mutating form of `unique`.
"""
function unique!(x::Column)
idx = uniqueind(x)
x.data[1:length(idx)] == x.data[idx]
resize!(x.data, length(idx))
end
function unique!(x::Table)
idx = uniqueind(x)
for i = 1:ncol(x)
x.data[i][1:length(idx)] == x.data[i][idx]
resize!(x.data[i], length(idx))
end
end
Base.union(cell::Cell) = Column(cell)
Base.union(col::Column) = unique(col)
Base.union{Name}(col1::Union{Cell{Name},Column{Name}}, col2::Union{Cell{Name},Column{Name}}) =
Column{Name}(union(col1.data, col2.data))
Base.union{Name}(col1::Union{Cell{Name},Column{Name}}, col2::Union{Cell{Name},Column{Name}}, cols::Union{Cell,Column}...) =
union(union(col1, col2), cols...)
Base.intersect{Name}(col1::Union{Cell{Name},Column{Name}}, col2::Union{Cell{Name},Column{Name}}) =
Column{Name}(intersect(col1.data, col2.data))
Base.setdiff{Name}(col1::Union{Cell{Name},Column{Name}}, col2::Union{Cell{Name},Column{Name}}) =
Column{Name}(setdiff(col1.data, col2.data))
Base.union(row::Row) = vcat(row)
Base.union(table::Table) = unique(table)
function Base.union{Names}(table1::Union{Row{Names},Table{Names}}, table2::Union{Row{Names},Table{Names}})
seen = Set{eltypes(typeof(table1))}()
idx1 = Vector{Int}()
for i = 1:length(table1)
if !in(table1[i].data, seen)
push!(seen, table1[i].data)
push!(idx1, i)
end
end
idx2 = Vector{Int}()
for i = 1:length(table2)
if !in(table2[i].data, seen)
push!(seen, table2[i].data)
push!(idx2, i)
end
end
vcat(table1[idx1], table2[idx2])
end
function Base.union(table1::Union{Row,Table}, table2::Union{Row,Table}, tables::Union{Row,Table}...)
union(union(table1, table2), tables...) # TODO a bit inefficient to build the hash multiple times...
end
function Base.union!{Names}(table1::Table{Names}, table2::Union{Row{Names},Table{Names}})
seen = Set{eltypes(typeof(table1))}()
repeats = Vector{Int}()
for i = 1:length(table1)
if !in(table1[i].data, seen)
push!(seen, table1[i].data)
else
push!(repeats, i)
end
end
deleteat!(table1, repeats)
for i = 1:length(table2)
if !in(table2[i].data, seen)
push!(seen, table2[i].data)
push!(table1, table2[i])
end
end
end
function Base.union!(table1::Union{Row,Table}, table2::Union{Row,Table}, tables::Union{Row,Table}...)
union!(union!(table1, table2), tables...) # TODO a bit inefficient to build the hash multiple times...
end
function Base.intersect{Names}(table1::Union{Row{Names},Table{Names}}, table2::Union{Row{Names},Table{Names}})
seen1 = Set{eltypes(typeof(table1))}()
for i = 1:length(table1)
if !in(table1[i].data, seen1)
push!(seen1, table1[i].data)
end
end
seen2 = Set{eltypes(typeof(table2))}()
idx2 = Vector{Int}()
for i = 1:length(table2)
if in(table2[i].data, seen1)
if !in(table2[i].data, seen2)
push!(seen2, table2[i].data)
push!(idx2, i)
end
end
end
table2[idx2]
end
function Base.setdiff{Names}(table1::Union{Row{Names},Table{Names}}, table2::Union{Row{Names},Table{Names}})
idx1 = Dict{eltypes(typeof(table1)),Int}()
for i = 1:length(table1)
if !in(table1[i].data, keys(idx1))
idx1[table1[i].data] = i
end
end
for i = 1:length(table2)
if in(table2[i].data, keys(idx1))
delete!(idx1,table2[i].data)
end
end
table1[collect(values(idx1))]
end
| [
198,
2,
37811,
198,
2,
13615,
257,
15879,
286,
30104,
12739,
262,
36525,
286,
10411,
3815,
287,
257,
198,
2,
63,
39470,
63,
393,
10411,
15274,
286,
257,
4600,
10962,
63,
1262,
257,
29407,
11862,
357,
13635,
278,
198,
2,
2539,
4775,
7159,
286,
22300,
338,
4600,
30619,
63,
7071,
737,
198,
2,
37811,
198,
37811,
198,
13615,
257,
15879,
286,
30104,
12739,
262,
36525,
286,
10411,
3815,
287,
257,
198,
63,
39470,
63,
393,
10411,
15274,
286,
257,
4600,
10962,
63,
1262,
257,
49544,
11862,
13,
198,
37811,
198,
8818,
1448,
521,
82,
7,
34,
3712,
38176,
90,
39470,
11,
10962,
19629,
479,
86,
22046,
23029,
1303,
16926,
46,
428,
2446,
1438,
1244,
307,
2087,
284,
7308,
287,
657,
13,
20,
357,
5450,
1378,
12567,
13,
785,
14,
16980,
544,
43,
648,
14,
73,
43640,
14,
31216,
14,
1314,
31938,
34729,
198,
220,
220,
220,
503,
796,
360,
713,
90,
417,
4906,
7,
34,
828,
38469,
90,
5317,
11709,
3419,
198,
220,
220,
220,
1312,
796,
352,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
34,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
34,
13,
7890,
58,
72,
4357,
8251,
7,
448,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
503,
58,
34,
13,
7890,
58,
72,
11907,
796,
685,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
448,
58,
34,
13,
7890,
58,
72,
60,
4357,
72,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2824,
7,
27160,
7,
448,
4008,
198,
437,
198,
198,
37811,
198,
13615,
262,
36525,
286,
262,
717,
3748,
4847,
287,
257,
4600,
39470,
63,
393,
257,
4600,
10962,
44646,
198,
37811,
198,
8818,
3748,
521,
7,
87,
3712,
39470,
8,
198,
220,
220,
220,
503,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
1775,
796,
5345,
90,
417,
4906,
7,
87,
38165,
3419,
198,
220,
220,
220,
1312,
796,
352,
198,
220,
220,
220,
329,
331,
287,
2124,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
88,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
331,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
448,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
15853,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
503,
198,
437,
198,
198,
8818,
3748,
521,
7,
87,
3712,
10962,
8,
198,
220,
220,
220,
503,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
1775,
796,
5345,
90,
417,
4906,
7,
87,
38165,
3419,
198,
220,
220,
220,
1312,
796,
352,
198,
220,
220,
220,
329,
331,
287,
2124,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
88,
13,
7890,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
331,
13,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
448,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
15853,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
503,
198,
437,
198,
198,
8818,
7308,
13,
34642,
7,
87,
3712,
38176,
90,
39470,
11,
10962,
30072,
198,
220,
220,
220,
2124,
58,
34642,
521,
7,
87,
15437,
198,
437,
198,
198,
37811,
198,
41603,
803,
1296,
286,
4600,
34642,
44646,
198,
37811,
198,
8818,
3748,
0,
7,
87,
3712,
39470,
8,
198,
220,
220,
220,
4686,
87,
796,
3748,
521,
7,
87,
8,
198,
220,
220,
220,
2124,
13,
7890,
58,
16,
25,
13664,
7,
312,
87,
15437,
6624,
2124,
13,
7890,
58,
312,
87,
60,
198,
220,
220,
220,
47558,
0,
7,
87,
13,
7890,
11,
4129,
7,
312,
87,
4008,
198,
437,
198,
198,
8818,
3748,
0,
7,
87,
3712,
10962,
8,
198,
220,
220,
220,
4686,
87,
796,
3748,
521,
7,
87,
8,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
77,
4033,
7,
87,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
13,
7890,
58,
72,
7131,
16,
25,
13664,
7,
312,
87,
15437,
6624,
2124,
13,
7890,
58,
72,
7131,
312,
87,
60,
198,
220,
220,
220,
220,
220,
220,
220,
47558,
0,
7,
87,
13,
7890,
58,
72,
4357,
4129,
7,
312,
87,
4008,
198,
220,
220,
220,
886,
198,
437,
198,
198,
14881,
13,
24592,
7,
3846,
3712,
28780,
8,
796,
29201,
7,
3846,
8,
198,
14881,
13,
24592,
7,
4033,
3712,
39470,
8,
796,
3748,
7,
4033,
8,
198,
14881,
13,
24592,
90,
5376,
92,
7,
4033,
16,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
92,
5512,
951,
17,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
11709,
8,
796,
198,
220,
220,
220,
29201,
90,
5376,
92,
7,
24592,
7,
4033,
16,
13,
7890,
11,
951,
17,
13,
7890,
4008,
198,
14881,
13,
24592,
90,
5376,
92,
7,
4033,
16,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
92,
5512,
951,
17,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
92,
5512,
951,
82,
3712,
38176,
90,
28780,
11,
39470,
92,
23029,
796,
198,
220,
220,
220,
6441,
7,
24592,
7,
4033,
16,
11,
951,
17,
828,
951,
82,
23029,
198,
198,
14881,
13,
3849,
8831,
90,
5376,
92,
7,
4033,
16,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
92,
5512,
951,
17,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
11709,
8,
796,
198,
220,
220,
220,
29201,
90,
5376,
92,
7,
3849,
8831,
7,
4033,
16,
13,
7890,
11,
951,
17,
13,
7890,
4008,
198,
198,
14881,
13,
2617,
26069,
90,
5376,
92,
7,
4033,
16,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
92,
5512,
951,
17,
3712,
38176,
90,
28780,
90,
5376,
5512,
39470,
90,
5376,
11709,
8,
796,
198,
220,
220,
220,
29201,
90,
5376,
92,
7,
2617,
26069,
7,
4033,
16,
13,
7890,
11,
951,
17,
13,
7890,
4008,
198,
198,
14881,
13,
24592,
7,
808,
3712,
25166,
8,
796,
410,
9246,
7,
808,
8,
198,
14881,
13,
24592,
7,
11487,
3712,
10962,
8,
796,
3748,
7,
11487,
8,
198,
8818,
7308,
13,
24592,
90,
36690,
92,
7,
11487,
16,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
92,
5512,
3084,
17,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
11709,
8,
198,
220,
220,
220,
1775,
796,
5345,
90,
417,
19199,
7,
4906,
1659,
7,
11487,
16,
4008,
92,
3419,
198,
220,
220,
220,
4686,
87,
16,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
16,
58,
72,
4083,
7890,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
3084,
16,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
312,
87,
16,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
4686,
87,
17,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
17,
58,
72,
4083,
7890,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
3084,
17,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
312,
87,
17,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
410,
9246,
7,
11487,
16,
58,
312,
87,
16,
4357,
3084,
17,
58,
312,
87,
17,
12962,
198,
437,
198,
8818,
7308,
13,
24592,
7,
11487,
16,
3712,
38176,
90,
25166,
11,
10962,
5512,
3084,
17,
3712,
38176,
90,
25166,
11,
10962,
5512,
8893,
3712,
38176,
90,
25166,
11,
10962,
92,
23029,
198,
220,
220,
220,
6441,
7,
24592,
7,
11487,
16,
11,
3084,
17,
828,
8893,
23029,
1303,
16926,
46,
257,
1643,
30904,
284,
1382,
262,
12234,
3294,
1661,
986,
198,
437,
198,
198,
8818,
7308,
13,
24592,
0,
90,
36690,
92,
7,
11487,
16,
3712,
10962,
90,
36690,
5512,
3084,
17,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
11709,
8,
198,
220,
220,
220,
1775,
796,
5345,
90,
417,
19199,
7,
4906,
1659,
7,
11487,
16,
4008,
92,
3419,
198,
220,
220,
220,
29819,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
16,
58,
72,
4083,
7890,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
3084,
16,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
45956,
1381,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
12233,
265,
0,
7,
11487,
16,
11,
29819,
8,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
17,
58,
72,
4083,
7890,
11,
1775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
11,
3084,
17,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
11487,
16,
11,
3084,
17,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
8818,
7308,
13,
24592,
0,
7,
11487,
16,
3712,
38176,
90,
25166,
11,
10962,
5512,
3084,
17,
3712,
38176,
90,
25166,
11,
10962,
5512,
8893,
3712,
38176,
90,
25166,
11,
10962,
92,
23029,
198,
220,
220,
220,
6441,
0,
7,
24592,
0,
7,
11487,
16,
11,
3084,
17,
828,
8893,
23029,
1303,
16926,
46,
257,
1643,
30904,
284,
1382,
262,
12234,
3294,
1661,
986,
198,
437,
198,
198,
8818,
7308,
13,
3849,
8831,
90,
36690,
92,
7,
11487,
16,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
92,
5512,
3084,
17,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
11709,
8,
198,
220,
220,
220,
1775,
16,
796,
5345,
90,
417,
19199,
7,
4906,
1659,
7,
11487,
16,
4008,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
16,
58,
72,
4083,
7890,
11,
1775,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
16,
11,
3084,
16,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1775,
17,
796,
5345,
90,
417,
19199,
7,
4906,
1659,
7,
11487,
17,
4008,
92,
3419,
198,
220,
220,
220,
4686,
87,
17,
796,
20650,
90,
5317,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
287,
7,
11487,
17,
58,
72,
4083,
7890,
11,
1775,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
17,
58,
72,
4083,
7890,
11,
1775,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
15898,
17,
11,
3084,
17,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
312,
87,
17,
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,
886,
628,
220,
220,
220,
3084,
17,
58,
312,
87,
17,
60,
198,
437,
198,
198,
8818,
7308,
13,
2617,
26069,
90,
36690,
92,
7,
11487,
16,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
92,
5512,
3084,
17,
3712,
38176,
90,
25166,
90,
36690,
5512,
10962,
90,
36690,
11709,
8,
198,
220,
220,
220,
4686,
87,
16,
796,
360,
713,
90,
417,
19199,
7,
4906,
1659,
7,
11487,
16,
36911,
5317,
92,
3419,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
259,
7,
11487,
16,
58,
72,
4083,
7890,
11,
8251,
7,
312,
87,
16,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
87,
16,
58,
11487,
16,
58,
72,
4083,
7890,
60,
796,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
11487,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
287,
7,
11487,
17,
58,
72,
4083,
7890,
11,
8251,
7,
312,
87,
16,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12233,
0,
7,
312,
87,
16,
11,
11487,
17,
58,
72,
4083,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
3084,
16,
58,
33327,
7,
27160,
7,
312,
87,
16,
4008,
60,
198,
437,
198
] | 2.143161 | 2,347 |
using Test
@testset "Van-Wijngaarden" begin include("test_van_wijngaarden.jl") end
@testset "Weibull Count" begin include("test_weibull_count.jl") end
@testset "Distribution" begin include("test_distribution.jl") end
| [
3500,
6208,
198,
198,
31,
9288,
2617,
366,
25298,
12,
54,
2926,
782,
64,
5872,
1,
2221,
2291,
7203,
9288,
62,
10438,
62,
86,
2926,
782,
64,
5872,
13,
20362,
4943,
886,
198,
31,
9288,
2617,
366,
1135,
571,
724,
2764,
1,
2221,
2291,
7203,
9288,
62,
732,
571,
724,
62,
9127,
13,
20362,
4943,
886,
198,
31,
9288,
2617,
366,
20344,
3890,
1,
2221,
2291,
7203,
9288,
62,
17080,
3890,
13,
20362,
4943,
886,
198
] | 2.868421 | 76 |
"""
change_sense(objective_sense)
Change the objective sense of optimization.
Possible arguments are `MOI.MAX_SENSE` and `MOI.MIN_SENSE`.
If you want to change the objective and sense at the same time, use
[`change_objective`](@ref) instead to do both at once.
"""
change_sense(objective_sense) =
(_, opt_model) -> set_objective_sense(opt_model, objective_sense)
"""
change_optimizer(optimizer)
Change the JuMP optimizer used to run the optimization.
This may be used to try different approaches for reaching the optimum, and in
problems that may require different optimizers for different parts, such as the
[`parsimonious_flux_balance_analysis`](@ref).
"""
change_optimizer(optimizer) = (_, opt_model) -> set_optimizer(opt_model, optimizer)
"""
change_optimizer_attribute(attribute_key, value)
Change a JuMP optimizer attribute. The attributes are optimizer-specific, refer
to the JuMP documentation and the documentation of the specific optimizer for
usable keys and values.
"""
change_optimizer_attribute(attribute_key, value) =
(_, opt_model) -> set_optimizer_attribute(opt_model, attribute_key, value)
"""
silence
Modification that disable all output from the JuMP optimizer (shortcut for
`set_silent` from JuMP).
"""
const silence = (_, opt_model) -> set_silent(opt_model)
| [
198,
37811,
198,
220,
220,
220,
1487,
62,
33819,
7,
15252,
425,
62,
33819,
8,
198,
198,
19400,
262,
9432,
2565,
286,
23989,
13,
198,
47,
4733,
7159,
389,
4600,
11770,
40,
13,
22921,
62,
50,
24290,
63,
290,
4600,
11770,
40,
13,
23678,
62,
50,
24290,
44646,
198,
198,
1532,
345,
765,
284,
1487,
262,
9432,
290,
2565,
379,
262,
976,
640,
11,
779,
198,
58,
63,
3803,
62,
15252,
425,
63,
16151,
31,
5420,
8,
2427,
284,
466,
1111,
379,
1752,
13,
198,
37811,
198,
3803,
62,
33819,
7,
15252,
425,
62,
33819,
8,
796,
198,
220,
220,
220,
44104,
11,
2172,
62,
19849,
8,
4613,
900,
62,
15252,
425,
62,
33819,
7,
8738,
62,
19849,
11,
9432,
62,
33819,
8,
198,
198,
37811,
198,
220,
220,
220,
1487,
62,
40085,
7509,
7,
40085,
7509,
8,
198,
198,
19400,
262,
12585,
7378,
6436,
7509,
973,
284,
1057,
262,
23989,
13,
198,
198,
1212,
743,
307,
973,
284,
1949,
1180,
10581,
329,
8978,
262,
39475,
11,
290,
287,
198,
1676,
22143,
326,
743,
2421,
1180,
6436,
11341,
329,
1180,
3354,
11,
884,
355,
262,
198,
58,
63,
79,
945,
20473,
699,
62,
69,
22564,
62,
20427,
62,
20930,
63,
16151,
31,
5420,
737,
198,
37811,
198,
3803,
62,
40085,
7509,
7,
40085,
7509,
8,
796,
44104,
11,
2172,
62,
19849,
8,
4613,
900,
62,
40085,
7509,
7,
8738,
62,
19849,
11,
6436,
7509,
8,
198,
198,
37811,
198,
220,
220,
220,
1487,
62,
40085,
7509,
62,
42348,
7,
42348,
62,
2539,
11,
1988,
8,
198,
198,
19400,
257,
12585,
7378,
6436,
7509,
11688,
13,
383,
12608,
389,
6436,
7509,
12,
11423,
11,
3522,
198,
1462,
262,
12585,
7378,
10314,
290,
262,
10314,
286,
262,
2176,
6436,
7509,
329,
198,
31979,
8251,
290,
3815,
13,
198,
37811,
198,
3803,
62,
40085,
7509,
62,
42348,
7,
42348,
62,
2539,
11,
1988,
8,
796,
198,
220,
220,
220,
44104,
11,
2172,
62,
19849,
8,
4613,
900,
62,
40085,
7509,
62,
42348,
7,
8738,
62,
19849,
11,
11688,
62,
2539,
11,
1988,
8,
198,
198,
37811,
198,
220,
220,
220,
9550,
198,
198,
5841,
2649,
326,
15560,
477,
5072,
422,
262,
12585,
7378,
6436,
7509,
357,
19509,
8968,
329,
198,
63,
2617,
62,
18217,
298,
63,
422,
12585,
7378,
737,
198,
37811,
198,
9979,
9550,
796,
44104,
11,
2172,
62,
19849,
8,
4613,
900,
62,
18217,
298,
7,
8738,
62,
19849,
8,
198
] | 3.285 | 400 |
#############################
## Numerical experiments associated with section 5.1.2
#############################
## While the paper does not explicitly treat third kind Volterra equations, an extension to these
## cases is relatively straightforward. Note that while in general there won't be exponential convergence
## unless the involved powers are favorably smooth, our method still achieves higher accuracy than many competitor methods.
##
using ApproxFun, MultivariateOrthogonalPolynomials, BandedMatrices, BlockBandedMatrices, SpecialFunctions, Plots
using SparseVolterraExamples
#############################
## Problem in Equation (17)
#############################
####
## The following block computes the coefficient vector of the approximation for a given polynomial order of approximation n.
## The accuracy obtained depends on both the polynomial order for the multiplication as well as the solution.
## Choosing the same order is fine in most cases but better accuracy can be obtained by adjusting for a given problem.
function solveSec512A(n,multin)
gf(x) = x^(2/3)*(10/3*x^(7/3)-3/16*x^(14/3));
Kfun(x,y) = y;
V = triVolterraFullKernelOpP01(Kfun,n,true);
V = reflectPabtoPba(n)*WLoweringP01P00(n)*V;
V = Conversion(Jacobi(0,0,0..1),Jacobi(1,2,0..1))[1:n,1:n]*V;
V = Multiplication(Fun(x->x^(2/3),Jacobi(1,2,0..1),multin),Jacobi(1,2,0..1))[1:n,1:n]*Derivative(Jacobi(0,1,0..1),1)[1:n,1:n]-V
coeff = [DirectEvalLHSP10at0(n);V[1:n-1,1:n]] \ [0;pad(Fun(x->gf(x),Jacobi(1,2, 0..1)).coefficients,n-1)]
return coeff
end
####
## Plot the analytic solution against the computed solution
coeff = solveSec512A(50,40)
plot(Fun(Jacobi(0,1,0..1),coeff),grid=false,xlabel="x",ylabel="u(x)",label="sparse method")
plot!(x->(x)^(10/3),0,1,grid=false,xlabel="x",ylabel="u(x)",label="analytic solution")
####
## Check the numerical error.
plot(x->(Fun(Jacobi(0,1,0..1),coeff)(x)-(x)^(10/3)),0,1,grid=false,xlabel="x",ylabel="error",label=false)
#############################
## Problem in Equation (18)
#############################
####
## The following block computes the coefficient vector of the approximation for a given polynomial order of approximation n.
## The accuracy obtained depends on both the polynomial order for the multiplication as well as the solution.
## Choosing the same order is fine in most cases but better accuracy can be obtained by adjusting for a given problem.
function solveSec512B(n,multin)
gf(x) = 9/2*x^4-1/20*x^(11/2)-1/6*x^6;
Kfun(x,y) = sqrt(y);
V = triVolterraFullKernelOpP01(Kfun,n,true,n);
V = reflectPabtoPba(n)*WLoweringP01P00(n)*V;
V = Conversion(Jacobi(0,0,0..1),Jacobi(1,2,0..1))[1:n,1:n]*V;
V = Multiplication(Fun(x->sqrt(x),Jacobi(1,2,0..1),multin),Jacobi(1,2,0..1))[1:n,1:n]*Derivative(Jacobi(0,1,0..1),1)[1:n,1:n]-(1/20)*Conversion(Jacobi(0,1,0..1),Jacobi(1,2,0..1))[1:n,1:n]*Multiplication(Fun(x->x,Jacobi(0,1,0..1),n),Jacobi(0,1,0..1))[1:n,1:n]-V
coeff = [DirectEvalLHSP10at0(n);V[1:n-1,1:n]] \ [0;pad(Fun(x->gf(x),Jacobi(1,2, 0..1)).coefficients,n-1)]
return coeff
end
####
## Plot the analytic solution against the computed solution
coeff = solveSec512B(80,30)
plot(Fun(Jacobi(0,1,0..1),coeff),grid=false,xlabel="x",ylabel="u(x)",label="sparse method")
plot!(x->(x)^(9/2),0,1,grid=false,xlabel="x",ylabel="u(x)",label="analytic solution")
####
## Check the numerical error.
plot(x->(Fun(Jacobi(0,1,0..1),coeff)(x)-(x)^(9/2)),0,1,grid=false,xlabel="x",ylabel="error",label=false)
| [
14468,
7804,
4242,
2,
198,
2235,
220,
399,
6975,
605,
10256,
3917,
351,
2665,
642,
13,
16,
13,
17,
198,
14468,
7804,
4242,
2,
198,
2235,
2893,
262,
3348,
857,
407,
11777,
2190,
2368,
1611,
4709,
353,
430,
27490,
11,
281,
7552,
284,
777,
198,
2235,
2663,
318,
5365,
15836,
13,
5740,
326,
981,
287,
2276,
612,
1839,
470,
307,
39682,
40826,
198,
2235,
4556,
262,
2950,
5635,
389,
40594,
7209,
11,
674,
2446,
991,
41885,
2440,
9922,
621,
867,
20319,
5050,
13,
198,
2235,
198,
198,
3500,
2034,
13907,
24629,
11,
7854,
42524,
5574,
400,
519,
20996,
34220,
26601,
8231,
11,
10243,
276,
19044,
45977,
11,
9726,
33,
12249,
19044,
45977,
11,
6093,
24629,
2733,
11,
1345,
1747,
198,
3500,
1338,
17208,
16598,
353,
430,
27730,
198,
198,
14468,
7804,
4242,
2,
198,
2235,
20647,
287,
7889,
341,
357,
1558,
8,
198,
14468,
7804,
4242,
2,
198,
4242,
198,
2235,
383,
1708,
2512,
552,
1769,
262,
35381,
15879,
286,
262,
40874,
329,
257,
1813,
745,
6213,
49070,
1502,
286,
40874,
299,
13,
198,
2235,
383,
9922,
6492,
8338,
319,
1111,
262,
745,
6213,
49070,
1502,
329,
262,
48473,
355,
880,
355,
262,
4610,
13,
198,
2235,
10031,
2752,
262,
976,
1502,
318,
3734,
287,
749,
2663,
475,
1365,
9922,
460,
307,
6492,
416,
22000,
329,
257,
1813,
1917,
13,
198,
8818,
8494,
6558,
25836,
32,
7,
77,
11,
16680,
259,
8,
198,
220,
220,
220,
308,
69,
7,
87,
8,
796,
2124,
61,
7,
17,
14,
18,
27493,
7,
940,
14,
18,
9,
87,
61,
7,
22,
14,
18,
13219,
18,
14,
1433,
9,
87,
61,
7,
1415,
14,
18,
18125,
198,
220,
220,
220,
509,
12543,
7,
87,
11,
88,
8,
796,
331,
26,
198,
220,
220,
220,
569,
796,
1333,
16598,
353,
430,
13295,
42,
7948,
18257,
47,
486,
7,
42,
12543,
11,
77,
11,
7942,
1776,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
4079,
47,
397,
1462,
47,
7012,
7,
77,
27493,
54,
31426,
278,
47,
486,
47,
405,
7,
77,
27493,
53,
26,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
44101,
7,
28821,
13411,
7,
15,
11,
15,
11,
15,
492,
16,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
60,
9,
53,
26,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
15237,
489,
3299,
7,
24629,
7,
87,
3784,
87,
61,
7,
17,
14,
18,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
828,
16680,
259,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
60,
9,
28532,
452,
876,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
16,
38381,
16,
25,
77,
11,
16,
25,
77,
45297,
53,
198,
220,
220,
220,
763,
14822,
796,
685,
13470,
36,
2100,
43,
39,
4303,
940,
265,
15,
7,
77,
1776,
53,
58,
16,
25,
77,
12,
16,
11,
16,
25,
77,
11907,
3467,
685,
15,
26,
15636,
7,
24629,
7,
87,
3784,
70,
69,
7,
87,
828,
28821,
13411,
7,
16,
11,
17,
11,
657,
492,
16,
29720,
1073,
41945,
11,
77,
12,
16,
15437,
198,
220,
220,
220,
1441,
763,
14822,
198,
437,
198,
4242,
198,
2235,
28114,
262,
49166,
4610,
1028,
262,
29231,
4610,
198,
1073,
14822,
796,
8494,
6558,
25836,
32,
7,
1120,
11,
1821,
8,
198,
29487,
7,
24629,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
1073,
14822,
828,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
84,
7,
87,
42501,
18242,
2625,
82,
29572,
2446,
4943,
198,
29487,
0,
7,
87,
3784,
7,
87,
8,
61,
7,
940,
14,
18,
828,
15,
11,
16,
11,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
84,
7,
87,
42501,
18242,
2625,
38200,
13370,
4610,
4943,
198,
4242,
198,
2235,
6822,
262,
29052,
4049,
13,
198,
29487,
7,
87,
3784,
7,
24629,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
1073,
14822,
5769,
87,
13219,
7,
87,
8,
61,
7,
940,
14,
18,
36911,
15,
11,
16,
11,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
18224,
1600,
18242,
28,
9562,
8,
198,
198,
14468,
7804,
4242,
2,
198,
2235,
20647,
287,
7889,
341,
357,
1507,
8,
198,
14468,
7804,
4242,
2,
198,
4242,
198,
2235,
383,
1708,
2512,
552,
1769,
262,
35381,
15879,
286,
262,
40874,
329,
257,
1813,
745,
6213,
49070,
1502,
286,
40874,
299,
13,
198,
2235,
383,
9922,
6492,
8338,
319,
1111,
262,
745,
6213,
49070,
1502,
329,
262,
48473,
355,
880,
355,
262,
4610,
13,
198,
2235,
10031,
2752,
262,
976,
1502,
318,
3734,
287,
749,
2663,
475,
1365,
9922,
460,
307,
6492,
416,
22000,
329,
257,
1813,
1917,
13,
198,
8818,
8494,
6558,
25836,
33,
7,
77,
11,
16680,
259,
8,
198,
220,
220,
220,
308,
69,
7,
87,
8,
796,
860,
14,
17,
9,
87,
61,
19,
12,
16,
14,
1238,
9,
87,
61,
7,
1157,
14,
17,
13219,
16,
14,
21,
9,
87,
61,
21,
26,
198,
220,
220,
220,
509,
12543,
7,
87,
11,
88,
8,
796,
19862,
17034,
7,
88,
1776,
198,
220,
220,
220,
569,
796,
1333,
16598,
353,
430,
13295,
42,
7948,
18257,
47,
486,
7,
42,
12543,
11,
77,
11,
7942,
11,
77,
1776,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
4079,
47,
397,
1462,
47,
7012,
7,
77,
27493,
54,
31426,
278,
47,
486,
47,
405,
7,
77,
27493,
53,
26,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
44101,
7,
28821,
13411,
7,
15,
11,
15,
11,
15,
492,
16,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
60,
9,
53,
26,
198,
220,
220,
220,
220,
220,
220,
220,
569,
796,
15237,
489,
3299,
7,
24629,
7,
87,
3784,
31166,
17034,
7,
87,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
828,
16680,
259,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
60,
9,
28532,
452,
876,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
16,
38381,
16,
25,
77,
11,
16,
25,
77,
60,
30420,
16,
14,
1238,
27493,
3103,
9641,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
28821,
13411,
7,
16,
11,
17,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
60,
9,
15205,
24705,
3299,
7,
24629,
7,
87,
3784,
87,
11,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
77,
828,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
4008,
58,
16,
25,
77,
11,
16,
25,
77,
45297,
53,
198,
220,
220,
220,
763,
14822,
796,
685,
13470,
36,
2100,
43,
39,
4303,
940,
265,
15,
7,
77,
1776,
53,
58,
16,
25,
77,
12,
16,
11,
16,
25,
77,
11907,
3467,
685,
15,
26,
15636,
7,
24629,
7,
87,
3784,
70,
69,
7,
87,
828,
28821,
13411,
7,
16,
11,
17,
11,
657,
492,
16,
29720,
1073,
41945,
11,
77,
12,
16,
15437,
198,
220,
220,
220,
1441,
763,
14822,
198,
437,
198,
4242,
198,
2235,
28114,
262,
49166,
4610,
1028,
262,
29231,
4610,
198,
1073,
14822,
796,
8494,
6558,
25836,
33,
7,
1795,
11,
1270,
8,
198,
29487,
7,
24629,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
1073,
14822,
828,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
84,
7,
87,
42501,
18242,
2625,
82,
29572,
2446,
4943,
198,
29487,
0,
7,
87,
3784,
7,
87,
8,
61,
7,
24,
14,
17,
828,
15,
11,
16,
11,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
84,
7,
87,
42501,
18242,
2625,
38200,
13370,
4610,
4943,
198,
4242,
198,
2235,
6822,
262,
29052,
4049,
13,
198,
29487,
7,
87,
3784,
7,
24629,
7,
28821,
13411,
7,
15,
11,
16,
11,
15,
492,
16,
828,
1073,
14822,
5769,
87,
13219,
7,
87,
8,
61,
7,
24,
14,
17,
36911,
15,
11,
16,
11,
25928,
28,
9562,
11,
87,
18242,
2625,
87,
1600,
2645,
9608,
2625,
18224,
1600,
18242,
28,
9562,
8,
198
] | 2.529792 | 1,393 |
#
# COM API wrappers
#
function CoInitializeEx(concurrency_model)
res = ccall( (:CoInitializeEx, l_ole32), Uint32, (Csize_t, DWORD,), C_NULL, concurrency_model)
if (res == HRESULT.S_FALSE)
warn("COM interface already initialized")
elseif (res != HRESULT.S_OK)
error("Unable to initialize COM interface")
end
end
CoInitializeEx() = CoInitializeEx(COINIT.APARTMENTTHREADED)
CoInitialize() = CoInitializeEx()
function CLSIDFromProgID(id::String)
clsid = [GUID()]
res = ccall( (:CLSIDFromProgID, l_ole32), stdcall, Uint32, (LPCOLESTR, LPCLSID), utf16(id), pointer(clsid))
res == HRESULT.S_OK || error("Unable to locate program $id")
return CLSID(clsid[1])
end
# TODO
#function StringFromCLSID(clsid::CLSID)
# s = Ptr{Uint16}[C_NULL]
# res = ccall( (:StringFromCLSID, l_ole32), stdcall, Uint32,
# (REFCLSID, Ptr{Uint16}), clsid, s)
# return (res, s)
#end
function CoCreateInstance(clsid::CLSID; iid=None, clsctx=None)
if (clsctx == None)
clsctx = CLSCTX.SERVER
end
if (iid == None)
iid = IID[IUnknown]
end
ppv = [C_NULL]
res = ccall( (:CoCreateInstance, l_ole32), Uint32,
(LPCLSID, LPUNKNOWN, DWORD, REFIID, Ptr{Ptr{Void}}),
&clsid, C_NULL, clsctx, &iid, ppv)
if (res == REGDB.E_CLASSNOTREG)
error("Class not registered ($clsid)")
end
iid[ppv[1]]
end
################################################################################
#
# IUnknown interface
#
# QueryInterface
# AddRef
# Release
function QueryInterface{T <: IUnknown}(this::Ptr{T}, clsid::CLSID; err=false)
obj = [C_NULL]
println("calling")
res = @vcall(this, 1, HResult, &clsid::REFIID, pointer(obj)::Ptr{Ptr{Void}})
if (res != HRESULT.S_OK)
err && error("QueryInterface: $clsid not supported")
return C_NULL
end
println("res: ", res)
println("obj: ", obj)
return reinterpret(Ptr{typeof(clsid)},obj[1])
end
function AddRef{T<:IUnknown}(this::Ptr{T})
refcount = ccall( getvtptr(this,2), thiscall, Culong,
(Ptr{Void},), this)
end
function Release{T<:IUnknown}(this::Ptr{T})
refcount = ccall( getvtptr(this,3), thiscall, Culong,
(Ptr{Void},), this)
end
#
# IDispatch methods
#
# <: IUnknown
# GetTypeInfoCount
# GetTypeInfo
# GetIDsOfNames
# Invoke
function GetTypeInfoCount{T <: IDispatch}(this::Ptr{T})
pctinfo = [zero(Cuint)]
res = @vcall(this, 4, HResult, pctinfo::Ptr{Cuint})
show(res)
res != HRESULT.S_OK && error("failed GetTypeInfoCount")
return pctinfo[1]
end
# TODO
type ITypeInfo
end
function GetTypeInfo{T <: IDispatch}(this::Ptr{T}, tinfokind::Cuint)
lcid = C_NULL
itypeinfo = Ptr{Ptr{ITypeInfo}}[C_NULL]
res = ccall( getvtptr(this, 5), thiscall, Uint32,
(THISPTR,
Cuint, LCID, Ptr{Ptr{ITypeInfo}}),
o.ptr, tinfokind, lcid, itypeinfo)
res != HRESULT.S_OK && error("failed GetTypeInfo")
return itypeinfo[1]
end
function GetIDsOfNames{T <: IDispatch}(this::Ptr{T}, numNames)
lcid = DefaultLCID::LCID
rgszNames = Ptr{LPOLESTR}[C_NULL]
numNames = convert(Cuint, numNames)
refiid::REFIID
namesptr = Ptr{LPOLESTR}[C_NULL]
res = ccall(getvtptr(this, 6), thiscall, Uint32,
(THISPTR,
REFIID, Ptr{LPOLESTR}, Cuint, LCID, Ptr{DISPID}),
this,
BaseIID.IID_NULL, rgszNames, cNames, lcid, rgDispId)
res != HRESULT.S_OK && error("GetIDsOfNames error")
return rgszNames[1]
end
################################################################################
#
# High-level API
#
function getindex(c::COMGlobal, name::String)
# TODO: error message based on the HRESULT or REGDB value
clsid = CLSIDFromProgID(name)
CoCreateInstance(clsid)
end
# Intended interface:
# ie = COM["InternetExplorer.Application"]
# ie[:Navigate2]("www.julialang.org")
function getindex(c::COMGlobal, clsid::CLSID)
CoCreateInstance(clsid)
end
function getindex(c::IDispatch, x::Symbol)
end | [
2,
198,
2,
9440,
7824,
7917,
11799,
198,
2,
198,
198,
8818,
1766,
24243,
1096,
3109,
7,
1102,
34415,
62,
19849,
8,
198,
220,
220,
220,
581,
796,
269,
13345,
7,
357,
25,
7222,
24243,
1096,
3109,
11,
300,
62,
2305,
2624,
828,
471,
600,
2624,
11,
357,
34,
7857,
62,
83,
11,
29652,
12532,
11,
828,
327,
62,
33991,
11,
1673,
13382,
62,
19849,
8,
198,
220,
220,
220,
611,
357,
411,
6624,
15172,
1546,
16724,
13,
50,
62,
37,
23719,
8,
198,
220,
220,
220,
220,
220,
220,
220,
9828,
7203,
9858,
7071,
1541,
23224,
4943,
198,
220,
220,
220,
2073,
361,
357,
411,
14512,
15172,
1546,
16724,
13,
50,
62,
11380,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
3118,
540,
284,
41216,
9440,
7071,
4943,
198,
220,
220,
220,
886,
198,
437,
198,
7222,
24243,
1096,
3109,
3419,
796,
1766,
24243,
1096,
3109,
7,
8220,
1268,
2043,
13,
2969,
7227,
10979,
4221,
15675,
1961,
8,
198,
7222,
24243,
1096,
3419,
796,
1766,
24243,
1096,
3109,
3419,
198,
198,
8818,
43394,
4863,
2964,
70,
2389,
7,
312,
3712,
10100,
8,
198,
220,
220,
220,
537,
30255,
796,
685,
38,
27586,
3419,
60,
198,
220,
220,
220,
581,
796,
269,
13345,
7,
357,
25,
5097,
50,
2389,
4863,
2964,
70,
2389,
11,
300,
62,
2305,
2624,
828,
14367,
13345,
11,
471,
600,
2624,
11,
357,
43,
5662,
3535,
1546,
5446,
11,
18470,
5097,
50,
2389,
828,
3384,
69,
1433,
7,
312,
828,
17562,
7,
565,
30255,
4008,
198,
220,
220,
220,
581,
6624,
15172,
1546,
16724,
13,
50,
62,
11380,
8614,
4049,
7203,
3118,
540,
284,
17276,
1430,
720,
312,
4943,
198,
220,
220,
220,
1441,
43394,
7,
565,
30255,
58,
16,
12962,
198,
437,
198,
198,
2,
16926,
46,
198,
2,
8818,
10903,
4863,
5097,
50,
2389,
7,
565,
30255,
3712,
5097,
50,
2389,
8,
198,
2,
220,
220,
220,
264,
796,
350,
2213,
90,
52,
600,
1433,
92,
58,
34,
62,
33991,
60,
198,
2,
220,
220,
220,
581,
796,
269,
13345,
7,
357,
25,
10100,
4863,
5097,
50,
2389,
11,
300,
62,
2305,
2624,
828,
14367,
13345,
11,
471,
600,
2624,
11,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
2200,
4851,
6561,
2389,
11,
350,
2213,
90,
52,
600,
1433,
92,
828,
537,
30255,
11,
264,
8,
198,
2,
220,
220,
220,
1441,
357,
411,
11,
264,
8,
198,
2,
437,
198,
198,
8818,
1766,
16447,
33384,
7,
565,
30255,
3712,
5097,
50,
2389,
26,
1312,
312,
28,
14202,
11,
537,
82,
49464,
28,
14202,
8,
198,
220,
220,
220,
611,
357,
565,
82,
49464,
6624,
6045,
8,
198,
220,
220,
220,
220,
220,
220,
220,
537,
82,
49464,
796,
39241,
4177,
55,
13,
35009,
5959,
198,
220,
220,
220,
886,
198,
220,
220,
220,
611,
357,
72,
312,
6624,
6045,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
312,
796,
314,
2389,
58,
40,
20035,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
9788,
85,
796,
685,
34,
62,
33991,
60,
198,
220,
220,
220,
581,
796,
269,
13345,
7,
357,
25,
7222,
16447,
33384,
11,
300,
62,
2305,
2624,
828,
471,
600,
2624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
19930,
5097,
50,
2389,
11,
18470,
4944,
44706,
11,
29652,
12532,
11,
4526,
11674,
2389,
11,
350,
2213,
90,
46745,
90,
53,
1868,
11709,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1222,
565,
30255,
11,
327,
62,
33991,
11,
537,
82,
49464,
11,
1222,
72,
312,
11,
9788,
85,
8,
198,
220,
220,
220,
611,
357,
411,
6624,
23337,
11012,
13,
36,
62,
31631,
11929,
31553,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
9487,
407,
6823,
7198,
565,
30255,
8,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1312,
312,
58,
381,
85,
58,
16,
11907,
198,
437,
198,
198,
29113,
29113,
14468,
198,
198,
2,
198,
2,
314,
20035,
7071,
198,
2,
198,
2,
220,
220,
43301,
39317,
198,
2,
220,
220,
3060,
8134,
198,
2,
220,
220,
13868,
198,
198,
8818,
43301,
39317,
90,
51,
1279,
25,
314,
20035,
92,
7,
5661,
3712,
46745,
90,
51,
5512,
537,
30255,
3712,
5097,
50,
2389,
26,
11454,
28,
9562,
8,
198,
220,
220,
220,
26181,
796,
685,
34,
62,
33991,
60,
198,
220,
220,
220,
44872,
7203,
44714,
4943,
198,
220,
220,
220,
581,
796,
2488,
85,
13345,
7,
5661,
11,
352,
11,
367,
23004,
11,
1222,
565,
30255,
3712,
2200,
11674,
2389,
11,
17562,
7,
26801,
2599,
25,
46745,
90,
46745,
90,
53,
1868,
11709,
8,
198,
220,
220,
220,
611,
357,
411,
14512,
15172,
1546,
16724,
13,
50,
62,
11380,
8,
198,
220,
220,
220,
220,
220,
220,
220,
11454,
11405,
4049,
7203,
20746,
39317,
25,
720,
565,
30255,
407,
4855,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
327,
62,
33991,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44872,
7203,
411,
25,
33172,
581,
8,
198,
220,
220,
220,
44872,
7203,
26801,
25,
33172,
26181,
8,
198,
220,
220,
220,
1441,
302,
27381,
7,
46745,
90,
4906,
1659,
7,
565,
30255,
8,
5512,
26801,
58,
16,
12962,
198,
437,
198,
198,
8818,
3060,
8134,
90,
51,
27,
25,
40,
20035,
92,
7,
5661,
3712,
46745,
90,
51,
30072,
198,
220,
220,
220,
1006,
9127,
796,
269,
13345,
7,
651,
36540,
20692,
7,
5661,
11,
17,
828,
428,
13345,
11,
32559,
506,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
46745,
90,
53,
1868,
5512,
828,
428,
8,
198,
437,
198,
198,
8818,
13868,
90,
51,
27,
25,
40,
20035,
92,
7,
5661,
3712,
46745,
90,
51,
30072,
198,
220,
220,
220,
1006,
9127,
796,
269,
13345,
7,
651,
36540,
20692,
7,
5661,
11,
18,
828,
428,
13345,
11,
32559,
506,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
46745,
90,
53,
1868,
5512,
828,
428,
8,
198,
437,
198,
198,
2,
198,
2,
4522,
8802,
963,
5050,
198,
2,
198,
2,
220,
220,
1279,
25,
314,
20035,
198,
2,
220,
220,
220,
220,
220,
220,
3497,
6030,
12360,
12332,
198,
2,
220,
220,
220,
220,
220,
220,
3497,
6030,
12360,
198,
2,
220,
220,
220,
220,
220,
220,
3497,
47954,
5189,
36690,
198,
2,
220,
220,
220,
220,
220,
220,
10001,
2088,
198,
198,
8818,
3497,
6030,
12360,
12332,
90,
51,
1279,
25,
4522,
8802,
963,
92,
7,
5661,
3712,
46745,
90,
51,
30072,
198,
220,
220,
220,
279,
310,
10951,
796,
685,
22570,
7,
34,
28611,
15437,
198,
220,
220,
220,
581,
796,
2488,
85,
13345,
7,
5661,
11,
604,
11,
367,
23004,
11,
279,
310,
10951,
3712,
46745,
90,
34,
28611,
30072,
198,
220,
220,
220,
905,
7,
411,
8,
198,
220,
220,
220,
581,
14512,
15172,
1546,
16724,
13,
50,
62,
11380,
11405,
4049,
7203,
47904,
3497,
6030,
12360,
12332,
4943,
198,
220,
220,
220,
1441,
279,
310,
10951,
58,
16,
60,
198,
437,
198,
198,
2,
16926,
46,
198,
4906,
314,
6030,
12360,
198,
437,
198,
198,
8818,
3497,
6030,
12360,
90,
51,
1279,
25,
4522,
8802,
963,
92,
7,
5661,
3712,
46745,
90,
51,
5512,
256,
10745,
482,
521,
3712,
34,
28611,
8,
198,
220,
220,
220,
300,
66,
312,
796,
327,
62,
33991,
198,
220,
220,
220,
340,
2981,
10951,
796,
350,
2213,
90,
46745,
90,
2043,
2981,
12360,
11709,
58,
34,
62,
33991,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
581,
796,
269,
13345,
7,
651,
36540,
20692,
7,
5661,
11,
642,
828,
428,
13345,
11,
471,
600,
2624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
43559,
47,
5446,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14496,
600,
11,
22228,
2389,
11,
350,
2213,
90,
46745,
90,
2043,
2981,
12360,
11709,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
13,
20692,
11,
256,
10745,
482,
521,
11,
300,
66,
312,
11,
340,
2981,
10951,
8,
198,
220,
220,
220,
581,
14512,
15172,
1546,
16724,
13,
50,
62,
11380,
11405,
4049,
7203,
47904,
3497,
6030,
12360,
4943,
198,
220,
220,
220,
1441,
340,
2981,
10951,
58,
16,
60,
198,
437,
198,
198,
8818,
3497,
47954,
5189,
36690,
90,
51,
1279,
25,
4522,
8802,
963,
92,
7,
5661,
3712,
46745,
90,
51,
5512,
997,
36690,
8,
198,
220,
220,
220,
300,
66,
312,
796,
15161,
5639,
2389,
3712,
5639,
2389,
198,
220,
220,
220,
374,
14542,
89,
36690,
796,
350,
2213,
90,
19930,
3535,
1546,
5446,
92,
58,
34,
62,
33991,
60,
198,
220,
220,
220,
997,
36690,
796,
10385,
7,
34,
28611,
11,
997,
36690,
8,
198,
220,
220,
220,
1006,
72,
312,
3712,
2200,
11674,
2389,
628,
220,
220,
220,
3891,
20692,
796,
350,
2213,
90,
19930,
3535,
1546,
5446,
92,
58,
34,
62,
33991,
60,
198,
220,
220,
220,
581,
796,
269,
13345,
7,
1136,
36540,
20692,
7,
5661,
11,
718,
828,
428,
13345,
11,
471,
600,
2624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
43559,
47,
5446,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4526,
11674,
2389,
11,
350,
2213,
90,
19930,
3535,
1546,
5446,
5512,
14496,
600,
11,
22228,
2389,
11,
350,
2213,
90,
26288,
47,
2389,
92,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
428,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7308,
40,
2389,
13,
40,
2389,
62,
33991,
11,
374,
14542,
89,
36690,
11,
269,
36690,
11,
300,
66,
312,
11,
48670,
7279,
79,
7390,
8,
198,
220,
220,
220,
581,
14512,
15172,
1546,
16724,
13,
50,
62,
11380,
11405,
4049,
7203,
3855,
47954,
5189,
36690,
4049,
4943,
198,
220,
220,
220,
1441,
374,
14542,
89,
36690,
58,
16,
60,
198,
437,
198,
198,
29113,
29113,
14468,
198,
2,
198,
2,
3334,
12,
5715,
7824,
198,
2,
198,
198,
8818,
651,
9630,
7,
66,
3712,
9858,
22289,
11,
1438,
3712,
10100,
8,
198,
220,
220,
220,
1303,
16926,
46,
25,
4049,
3275,
1912,
319,
262,
15172,
1546,
16724,
393,
23337,
11012,
1988,
198,
220,
220,
220,
537,
30255,
796,
43394,
4863,
2964,
70,
2389,
7,
3672,
8,
198,
220,
220,
220,
1766,
16447,
33384,
7,
565,
30255,
8,
198,
437,
198,
198,
2,
2558,
1631,
7071,
25,
198,
2,
220,
220,
37941,
796,
9440,
14692,
28566,
18438,
11934,
13,
23416,
8973,
198,
2,
220,
220,
37941,
58,
25,
30575,
10055,
17,
60,
7203,
2503,
13,
73,
377,
498,
648,
13,
2398,
4943,
198,
198,
8818,
651,
9630,
7,
66,
3712,
9858,
22289,
11,
537,
30255,
3712,
5097,
50,
2389,
8,
198,
220,
220,
220,
1766,
16447,
33384,
7,
565,
30255,
8,
198,
437,
198,
198,
8818,
651,
9630,
7,
66,
3712,
2389,
8802,
963,
11,
2124,
3712,
13940,
23650,
8,
198,
220,
220,
220,
220,
198,
437
] | 2.184114 | 1,901 |
@testset "varstruct_call_parse" begin
expr, args_field, args_defaultvalue, args_type, args_param, T = VarStructs.varstruct_call_parse(
Main,
quote
Person(
name::String = "Amin",
number::Float64 = 20.0,
)
end
)
@test args_field == [:name, :number]
@test args_defaultvalue == ["Amin", 20.0]
@test args_type == [:String, :Float64]
@test args_param == [Expr(:kw, :name, "Amin"), Expr(:kw, :number, 20.0)]
@test T == :Person
end
@testset "varstruct_struct_parse" begin
argsexpr, args_field, args_defaultvalue, args_type, args_param, args_check, is_struct_mutable, T = VarStructs.varstruct_struct_parse(
Main,
quote
struct Person
name::String
number::Float64 = 20.0
end
end
)
@test args_field == [:name, :number]
@test any(args_defaultvalue .== [Unset(), 20.0])
@test args_type == [:String, :Float64]
@test args_param == [:name, Expr(:kw, :number, 20.0)]
@test T == :Person
end
| [
31,
9288,
2617,
366,
7785,
7249,
62,
13345,
62,
29572,
1,
2221,
198,
220,
220,
220,
44052,
11,
26498,
62,
3245,
11,
26498,
62,
12286,
8367,
11,
26498,
62,
4906,
11,
26498,
62,
17143,
11,
309,
796,
12372,
44909,
82,
13,
7785,
7249,
62,
13345,
62,
29572,
7,
198,
220,
220,
220,
220,
220,
220,
220,
8774,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9577,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7755,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,
10100,
796,
366,
32,
1084,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1271,
3712,
43879,
2414,
796,
1160,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
2488,
9288,
26498,
62,
3245,
6624,
685,
25,
3672,
11,
1058,
17618,
60,
198,
220,
220,
220,
2488,
9288,
26498,
62,
12286,
8367,
6624,
14631,
32,
1084,
1600,
1160,
13,
15,
60,
198,
220,
220,
220,
2488,
9288,
26498,
62,
4906,
6624,
685,
25,
10100,
11,
1058,
43879,
2414,
60,
198,
220,
220,
220,
2488,
9288,
26498,
62,
17143,
6624,
685,
3109,
1050,
7,
25,
46265,
11,
1058,
3672,
11,
366,
32,
1084,
12340,
1475,
1050,
7,
25,
46265,
11,
1058,
17618,
11,
1160,
13,
15,
15437,
198,
220,
220,
220,
2488,
9288,
309,
6624,
1058,
15439,
198,
437,
198,
198,
31,
9288,
2617,
366,
7785,
7249,
62,
7249,
62,
29572,
1,
2221,
198,
220,
220,
220,
1822,
8044,
1050,
11,
26498,
62,
3245,
11,
26498,
62,
12286,
8367,
11,
26498,
62,
4906,
11,
26498,
62,
17143,
11,
26498,
62,
9122,
11,
318,
62,
7249,
62,
76,
18187,
11,
309,
796,
12372,
44909,
82,
13,
7785,
7249,
62,
7249,
62,
29572,
7,
198,
220,
220,
220,
220,
220,
220,
220,
8774,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9577,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2878,
7755,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,
10100,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1271,
3712,
43879,
2414,
796,
1160,
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,
1267,
628,
220,
220,
220,
2488,
9288,
26498,
62,
3245,
6624,
685,
25,
3672,
11,
1058,
17618,
60,
198,
220,
220,
220,
2488,
9288,
597,
7,
22046,
62,
12286,
8367,
764,
855,
685,
3118,
2617,
22784,
1160,
13,
15,
12962,
198,
220,
220,
220,
2488,
9288,
26498,
62,
4906,
6624,
685,
25,
10100,
11,
1058,
43879,
2414,
60,
198,
220,
220,
220,
2488,
9288,
26498,
62,
17143,
6624,
685,
25,
3672,
11,
1475,
1050,
7,
25,
46265,
11,
1058,
17618,
11,
1160,
13,
15,
15437,
198,
220,
220,
220,
2488,
9288,
309,
6624,
1058,
15439,
198,
437,
198
] | 2.086042 | 523 |
abstract type AbstractTokenType end
abstract type AbstractToken end
# Biological symbol is *any* biological symbol
struct BIOLOGICAL_SYMBOL <: AbstractTokenType end
# Biological type prefix is *any* type prefix
struct BIOLOGICAL_TYPE_PREFIX <: AbstractTokenType end
# Keywords used in the various sentences -
struct LPAREN <: AbstractTokenType end
struct RPAREN <: AbstractTokenType end
struct TRANSCRIPTION <: AbstractTokenType end
struct TRANSLATION <: AbstractTokenType end
struct CATALYZE <: AbstractTokenType end
struct BIND <: AbstractTokenType end
struct AND <: AbstractTokenType end
struct OR <: AbstractTokenType end
struct SPACE <: AbstractTokenType end
struct ARE <: AbstractTokenType end
struct IS <: AbstractTokenType end
struct A <: AbstractTokenType end
struct TO <: AbstractTokenType end
struct IN <: AbstractTokenType end
struct MODEL <: AbstractTokenType end
struct THE <: AbstractTokenType end
struct GENE_TYPE_SYMBOL <: AbstractTokenType end
struct mRNA_TYPE_SYMBOL <: AbstractTokenType end
struct tRNA_TYPE_SYMBOL <: AbstractTokenType end
struct regRNA_TYPE_SYMBOL <: AbstractTokenType end
struct PROTEIN_TYPE_SYMBOL <: AbstractTokenType end
struct METABOLITE_TYPE_SYMBOL <: AbstractTokenType end
struct RNA_POLYMERASE_II_SYMBOL <: AbstractTokenType end
struct RIBOSOME_SYMBOL <: AbstractTokenType end
struct TYPE <: AbstractTokenType end
struct OF <: AbstractTokenType end
struct PHOSPHORYLATE <: AbstractTokenType end
struct DEPHOSPHORYLATE <: AbstractTokenType end
struct COMPLEX <: AbstractTokenType end
struct FORM <: AbstractTokenType end
struct AT <: AbstractTokenType end
struct PROMOTER <: AbstractTokenType end
struct GENE <: AbstractTokenType end
struct POSITIVE <: AbstractTokenType end
struct NEGATIVE <: AbstractTokenType end
struct UNKNOWN <: AbstractTokenType end
# Bounds types -
struct SOURCE <: AbstractTokenType end
struct SINK <: AbstractTokenType end
struct BOUND <: AbstractTokenType end
struct UNBOUND <: AbstractTokenType end
# endpoint -
struct SEMICOLON <: AbstractTokenType end
# type that we will build -
struct MinervaToken <: AbstractToken
lexeme::String
type::AbstractTokenType
end
struct MinervaSentence
sentence::Array{MinervaToken,1}
end
| [
397,
8709,
2099,
27741,
30642,
6030,
886,
198,
397,
8709,
2099,
27741,
30642,
886,
198,
198,
2,
32827,
6194,
318,
1635,
1092,
9,
10685,
6194,
198,
7249,
20068,
33462,
20151,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
198,
2,
32827,
2099,
21231,
318,
1635,
1092,
9,
2099,
21231,
198,
7249,
20068,
33462,
20151,
62,
25216,
62,
47,
31688,
10426,
1279,
25,
27741,
30642,
6030,
886,
198,
198,
2,
7383,
10879,
973,
287,
262,
2972,
13439,
532,
198,
7249,
18470,
1503,
1677,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
25812,
1503,
1677,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
48213,
6173,
32618,
24131,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
48213,
8634,
6234,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
38348,
1847,
56,
21211,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
347,
12115,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
5357,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
6375,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
37253,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
15986,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
3180,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
317,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
5390,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
3268,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
19164,
3698,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
3336,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
24700,
36,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
47227,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
256,
27204,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
842,
27204,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
4810,
23051,
1268,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
31243,
6242,
3535,
12709,
62,
25216,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
25897,
62,
45472,
56,
29296,
11159,
62,
3978,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
371,
9865,
2640,
13649,
62,
23060,
10744,
3535,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
41876,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
3963,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
9370,
2640,
11909,
15513,
43,
6158,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
5550,
11909,
2640,
11909,
15513,
43,
6158,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
49269,
55,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
49144,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
5161,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
4810,
2662,
2394,
1137,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
24700,
36,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
28069,
2043,
9306,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
399,
7156,
37045,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
4725,
44706,
1279,
25,
27741,
30642,
6030,
886,
198,
198,
2,
347,
3733,
3858,
532,
198,
7249,
311,
31033,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
311,
17248,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
347,
15919,
1279,
25,
27741,
30642,
6030,
886,
198,
7249,
4725,
33,
15919,
1279,
25,
27741,
30642,
6030,
886,
198,
198,
2,
36123,
532,
198,
7249,
48603,
2149,
3535,
1340,
1279,
25,
27741,
30642,
6030,
886,
198,
198,
2,
2099,
326,
356,
481,
1382,
532,
198,
7249,
39367,
30642,
1279,
25,
27741,
30642,
198,
220,
31191,
34755,
3712,
10100,
198,
220,
2099,
3712,
23839,
30642,
6030,
198,
437,
198,
198,
7249,
39367,
31837,
594,
198,
220,
220,
220,
6827,
3712,
19182,
90,
9452,
32775,
30642,
11,
16,
92,
198,
437,
198
] | 3.557166 | 621 |
module SphericalWrapper
using JavaCall
include("OnedWrapper/OnedWrapper.jl")
include("TwodWrapper/TwodWrapper.jl")
end
| [
21412,
1338,
37910,
36918,
2848,
198,
198,
3500,
7349,
14134,
198,
198,
17256,
7203,
2202,
276,
36918,
2848,
14,
2202,
276,
36918,
2848,
13,
20362,
4943,
198,
17256,
7203,
5080,
375,
36918,
2848,
14,
5080,
375,
36918,
2848,
13,
20362,
4943,
198,
198,
437,
198
] | 2.711111 | 45 |
using Random
using WordTokenizers
"""
recursive_readdir(path::AbstractString="./")
recursive read all file from a dir. return a list of filenames.
"""
function recursive_readdir(path::AbstractString="./")
ret = String[]
for (root, dirs, files) in walkdir(path)
append!(ret, map(file->joinpath(root, file), files))
end
ret
end
"""
bert_pretrain_task(datachn::Channel, wordpiece::WordPiece;
buffer_size = 100,
channel_size = 100
wordpiece::WordPiece,
sentences_pool = sentences;
start_token = "[CLS]",
sep_token = "[SEP]",
mask_token = "[MASK]",
mask_ratio = 0.15,
real_token_ratio = 0.1,
random_token_ratio = 0.1,
whole_word_mask = false,
next_sentence_ratio = 0.5,
next_sentence = true,
tokenizer = tokenize,
istokenized = false,
return_real_sentence = false)
helper function to generate bert mask language modeling and next sentence prediction data. `datachn` is a `Channel` with input documents line by line.
"""
function bert_pretrain_task(datachn::Channel,
wordpiece::WordPiece;
buffer_size = 100,
channel_size = 100,
kwargs...
)
outchn = Channel(channel_size)
bert_pretrain_task(outchn, datachn, wordpiece; buffer_size = buffer_size, kwargs...)
outchn
end
function bert_pretrain_task(outchn::Channel,
datachn::Channel,
wordpiece::WordPiece;
buffer_size = 100,
kwargs...
)
task = @async begin
buffer = Vector(undef, buffer_size)
while isopen(datachn)
i = 1
eod = false
while i <= buffer_size
try
sentence = take!(datachn)
if isempty(sentence)
continue
else
buffer[i] = sentence
i+=1
end
catch e
if isa(e, InvalidStateException) && e.state==:closed
eod = true
break
else
rethrow()
end
end
end
i -= 1
if eod || i == buffer_size
bert_pretrain_task(outchn, @view(buffer[1:(eod ? i - 1 : i)]), wordpiece; kwargs...)
end
end
end
bind(outchn, task)
end
function bert_pretrain_task(sentences,
wordpiece::WordPiece,
sentences_pool = sentences;
channel_size = 100,
kwargs...
)
chn = Channel(channel_size)
task = @async bert_pretrain_task(chn, sentences, wordpiece, sentences_pool; kwargs...)
bind(chn, task)
chn
end
function bert_pretrain_task(chn::Channel,
sentences,
wordpiece::WordPiece,
sentences_pool = sentences;
start_token = "[CLS]",
sep_token = "[SEP]",
mask_token = "[MASK]",
mask_ratio = 0.15,
real_token_ratio = 0.1,
random_token_ratio = 0.1,
whole_word_mask = false,
next_sentence_ratio = 0.5,
next_sentence = true,
tokenizer = tokenize,
istokenized = false,
return_real_sentence = false)
foreach(enumerate(sentences)) do (i, sentence)
sentenceA = masksentence(
istokenized ? sentence : tokenizer(sentence),
wordpiece;
mask_token = mask_token,
mask_ratio = mask_ratio,
real_token_ratio = real_token_ratio,
random_token_ratio = random_token_ratio,
whole_word_mask = whole_word_mask
)
if next_sentence
if rand() <= next_sentence_ratio && i != length(sentences)
sentenceB = sentences[i+1]
isnext = true
else
sentenceB = rand(sentences_pool)
isnext = false
end
sentenceB = masksentence(
istokenized ? sentenceB : tokenizer(sentenceB),
wordpiece;
mask_token = mask_token,
mask_ratio = mask_ratio,
real_token_ratio = real_token_ratio,
random_token_ratio = random_token_ratio,
whole_word_mask = whole_word_mask
)
masked_sentence = _wrap_sentence(sentenceA[1],
sentenceB[1];
start_token = start_token,
sep_token = sep_token)
sentence = _wrap_sentence(sentenceA[2],
sentenceB[2];
start_token = start_token,
sep_token = sep_token)
mask_idx = _wrap_idx(sentenceA[3],
sentenceB[3],
length(sentenceA[1]))
else
masked_sentence = _wrap_sentence(sentenceA[1];
start_token = start_token,
sep_token = sep_token)
sentence = _wrap_sentence(sentenceA[2];
start_token = start_token,
sep_token = sep_token)
mask_idx = _wrap_idx(sentenceA[3])
end
masked_token = sentence[mask_idx]
if return_real_sentence
if next_sentence
put!(chn, (masked_sentence, mask_idx, masked_token, isnext, sentence))
else
put!(chn, (masked_sentence, mask_idx, masked_token, sentence))
end
else
if next_sentence
put!(chn, (masked_sentence, mask_idx, masked_token, isnext))
else
put!(chn, (masked_sentence, mask_idx, masked_token))
end
end
end
end
function _wrap_sentence(sentence1, sentence2...; start_token = "[CLS]", sep_token = "[SEP]")
pushfirst!(sentence1, start_token)
push!(sentence1, sep_token)
map(s->push!(s, sep_token), sentence2)
vcat(sentence1, sentence2...)
end
_wrap_idx(sentence1_idx, pre_len = 1) = sentence1_idx .+= pre_len
function _wrap_idx(sentence1_idx, sentence2_idx, len1)
_wrap_idx(sentence1_idx)
_wrap_idx(sentence2_idx, len1)
vcat(sentence1_idx, sentence2_idx)
end
masksentence(sentence::String,
tokenizer::Tf, wordpiece::WordPiece;
mask_token = "[MASK]",
mask_ratio = 0.15,
real_token_ratio = 0.1,
random_token_ratio = 0.1,
whole_word_mask = false) where Tf = masksentence(
tokenizer(sentence),
wordpiece;
mask_token = mask_token,
mask_ratio = mask_ratio,
real_token_ratio = real_token_ratio,
random_token_ratio = random_token_ratio,
whole_word_mask = whole_word_mask)
function masksentence(words,
wordpiece;
mask_token = "[MASK]",
mask_ratio = 0.15,
real_token_ratio = 0.1,
random_token_ratio = 0.1,
whole_word_mask = false)
if whole_word_mask
masked_word_idx = randsubseq(1:length(words), mask_ratio)
is_masked = fill(false, length(words))
map(masked_word_idx) do i
is_masked[i] = true
end
tokens = Vector{String}()
masked_idx = Vector{Int}()
sizehint!(tokens, length(words))
sizehint!(masked_idx, length(masked_word_idx))
len = 0
for (word, im) ∈ zip(words, is_masked)
wps = wordpiece(word)
wpl = length(wps)
append!(tokens, wps)
im && append!(masked_idx, map(i->i+len, 1:wpl))
len += wpl
end
else
tokens = wordpiece(words)
masked_idx = randsubseq(1:length(tokens), mask_ratio)
end
masked_tokens = copy(tokens)
for idx ∈ masked_idx
r = rand()
if r <= random_token_ratio
masked_tokens[idx] = rand(wordpiece.vocab)
elseif r > real_token_ratio + random_token_ratio
masked_tokens[idx] = mask_token
end
end
return masked_tokens, tokens, masked_idx
end
| [
3500,
14534,
198,
198,
3500,
9678,
30642,
11341,
628,
198,
37811,
198,
220,
220,
220,
45115,
62,
961,
15908,
7,
6978,
3712,
23839,
10100,
28,
1911,
14,
4943,
198,
198,
8344,
30753,
1100,
477,
2393,
422,
257,
26672,
13,
1441,
257,
1351,
286,
1226,
268,
1047,
13,
198,
37811,
198,
8818,
45115,
62,
961,
15908,
7,
6978,
3712,
23839,
10100,
28,
1911,
14,
4943,
198,
220,
1005,
796,
10903,
21737,
198,
220,
329,
357,
15763,
11,
288,
17062,
11,
3696,
8,
287,
2513,
15908,
7,
6978,
8,
198,
220,
220,
220,
24443,
0,
7,
1186,
11,
3975,
7,
7753,
3784,
22179,
6978,
7,
15763,
11,
2393,
828,
3696,
4008,
198,
220,
886,
198,
220,
1005,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
275,
861,
62,
5310,
3201,
62,
35943,
7,
19608,
620,
77,
3712,
29239,
11,
1573,
12239,
3712,
26449,
47,
8535,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11876,
62,
7857,
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,
6518,
62,
7857,
796,
1802,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
3712,
26449,
47,
8535,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13439,
62,
7742,
796,
13439,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
12878,
5097,
50,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41767,
62,
30001,
796,
12878,
5188,
47,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
12878,
31180,
42,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
657,
13,
1314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
3991,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
34086,
594,
62,
10366,
952,
796,
657,
13,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
34086,
594,
796,
2081,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11241,
7509,
796,
11241,
1096,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
30001,
1143,
796,
3991,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
62,
5305,
62,
34086,
594,
796,
3991,
8,
198,
198,
2978,
525,
2163,
284,
7716,
275,
861,
9335,
3303,
21128,
290,
1306,
6827,
17724,
1366,
13,
4600,
19608,
620,
77,
63,
318,
257,
4600,
29239,
63,
351,
5128,
4963,
1627,
416,
1627,
13,
198,
37811,
198,
8818,
275,
861,
62,
5310,
3201,
62,
35943,
7,
19608,
620,
77,
3712,
29239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
3712,
26449,
47,
8535,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11876,
62,
7857,
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,
6518,
62,
7857,
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,
479,
86,
22046,
986,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
503,
1349,
796,
11102,
7,
17620,
62,
7857,
8,
198,
220,
275,
861,
62,
5310,
3201,
62,
35943,
7,
448,
1349,
11,
4818,
620,
77,
11,
1573,
12239,
26,
11876,
62,
7857,
796,
11876,
62,
7857,
11,
479,
86,
22046,
23029,
198,
220,
503,
1349,
198,
437,
198,
198,
8818,
275,
861,
62,
5310,
3201,
62,
35943,
7,
448,
1349,
3712,
29239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4818,
620,
77,
3712,
29239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
3712,
26449,
47,
8535,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11876,
62,
7857,
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,
479,
86,
22046,
986,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
4876,
796,
2488,
292,
13361,
2221,
198,
220,
220,
220,
11876,
796,
20650,
7,
917,
891,
11,
11876,
62,
7857,
8,
198,
220,
220,
220,
981,
318,
9654,
7,
19608,
620,
77,
8,
198,
220,
220,
220,
220,
220,
1312,
796,
352,
198,
220,
220,
220,
220,
220,
304,
375,
796,
3991,
198,
220,
220,
220,
220,
220,
981,
1312,
19841,
11876,
62,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6827,
796,
1011,
0,
7,
19608,
620,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
28920,
7,
34086,
594,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11876,
58,
72,
60,
796,
6827,
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,
886,
198,
220,
220,
220,
220,
220,
220,
220,
4929,
304,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
64,
7,
68,
11,
17665,
9012,
16922,
8,
11405,
304,
13,
5219,
855,
25,
20225,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
375,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
302,
16939,
3419,
198,
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,
886,
628,
220,
220,
220,
220,
220,
1312,
48185,
352,
628,
220,
220,
220,
220,
220,
611,
304,
375,
8614,
1312,
6624,
11876,
62,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
275,
861,
62,
5310,
3201,
62,
35943,
7,
448,
1349,
11,
2488,
1177,
7,
22252,
58,
16,
37498,
68,
375,
5633,
1312,
532,
352,
1058,
1312,
15437,
828,
1573,
12239,
26,
479,
86,
22046,
23029,
198,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
886,
198,
220,
11007,
7,
448,
1349,
11,
4876,
8,
198,
437,
628,
198,
8818,
275,
861,
62,
5310,
3201,
62,
35943,
7,
34086,
3007,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
3712,
26449,
47,
8535,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13439,
62,
7742,
796,
13439,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6518,
62,
7857,
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,
479,
86,
22046,
986,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
442,
77,
796,
11102,
7,
17620,
62,
7857,
8,
198,
220,
4876,
796,
2488,
292,
13361,
275,
861,
62,
5310,
3201,
62,
35943,
7,
1349,
11,
13439,
11,
1573,
12239,
11,
13439,
62,
7742,
26,
479,
86,
22046,
23029,
198,
220,
11007,
7,
1349,
11,
4876,
8,
198,
220,
442,
77,
198,
437,
198,
198,
8818,
275,
861,
62,
5310,
3201,
62,
35943,
7,
1349,
3712,
29239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13439,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
3712,
26449,
47,
8535,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13439,
62,
7742,
796,
13439,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
12878,
5097,
50,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41767,
62,
30001,
796,
12878,
5188,
47,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
12878,
31180,
42,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
657,
13,
1314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
3991,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
34086,
594,
62,
10366,
952,
796,
657,
13,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
34086,
594,
796,
2081,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11241,
7509,
796,
11241,
1096,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
30001,
1143,
796,
3991,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
62,
5305,
62,
34086,
594,
796,
3991,
8,
628,
220,
1674,
620,
7,
268,
6975,
378,
7,
34086,
3007,
4008,
466,
357,
72,
11,
6827,
8,
198,
220,
220,
220,
6827,
32,
796,
20680,
298,
594,
7,
198,
220,
220,
220,
220,
220,
318,
30001,
1143,
5633,
6827,
1058,
11241,
7509,
7,
34086,
594,
828,
198,
220,
220,
220,
220,
220,
1573,
12239,
26,
198,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
9335,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
9335,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
1103,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
4738,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
2187,
62,
4775,
62,
27932,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
611,
1306,
62,
34086,
594,
198,
220,
220,
220,
220,
220,
611,
43720,
3419,
19841,
1306,
62,
34086,
594,
62,
10366,
952,
11405,
1312,
14512,
4129,
7,
34086,
3007,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6827,
33,
796,
13439,
58,
72,
10,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
318,
19545,
796,
2081,
198,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
6827,
33,
796,
43720,
7,
34086,
3007,
62,
7742,
8,
198,
220,
220,
220,
220,
220,
220,
220,
318,
19545,
796,
3991,
198,
220,
220,
220,
220,
220,
886,
628,
220,
220,
220,
220,
220,
6827,
33,
796,
20680,
298,
594,
7,
198,
220,
220,
220,
220,
220,
220,
220,
318,
30001,
1143,
5633,
6827,
33,
1058,
11241,
7509,
7,
34086,
594,
33,
828,
198,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
26,
198,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
9335,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
9335,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
1103,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
4738,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
2187,
62,
4775,
62,
27932,
198,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
29229,
62,
34086,
594,
796,
4808,
37150,
62,
34086,
594,
7,
34086,
594,
32,
58,
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,
6827,
33,
58,
16,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
923,
62,
30001,
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,
41767,
62,
30001,
796,
41767,
62,
30001,
8,
628,
220,
220,
220,
220,
220,
6827,
796,
4808,
37150,
62,
34086,
594,
7,
34086,
594,
32,
58,
17,
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,
6827,
33,
58,
17,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
923,
62,
30001,
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,
41767,
62,
30001,
796,
41767,
62,
30001,
8,
628,
220,
220,
220,
220,
220,
9335,
62,
312,
87,
796,
4808,
37150,
62,
312,
87,
7,
34086,
594,
32,
58,
18,
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,
6827,
33,
58,
18,
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,
4129,
7,
34086,
594,
32,
58,
16,
60,
4008,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
29229,
62,
34086,
594,
796,
4808,
37150,
62,
34086,
594,
7,
34086,
594,
32,
58,
16,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
923,
62,
30001,
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,
41767,
62,
30001,
796,
41767,
62,
30001,
8,
628,
220,
220,
220,
220,
220,
6827,
796,
4808,
37150,
62,
34086,
594,
7,
34086,
594,
32,
58,
17,
11208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
30001,
796,
923,
62,
30001,
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,
41767,
62,
30001,
796,
41767,
62,
30001,
8,
628,
220,
220,
220,
220,
220,
9335,
62,
312,
87,
796,
4808,
37150,
62,
312,
87,
7,
34086,
594,
32,
58,
18,
12962,
198,
220,
220,
220,
886,
628,
220,
220,
220,
29229,
62,
30001,
796,
6827,
58,
27932,
62,
312,
87,
60,
628,
220,
220,
220,
611,
1441,
62,
5305,
62,
34086,
594,
198,
220,
220,
220,
220,
220,
611,
1306,
62,
34086,
594,
198,
220,
220,
220,
220,
220,
220,
220,
1234,
0,
7,
1349,
11,
357,
27932,
276,
62,
34086,
594,
11,
9335,
62,
312,
87,
11,
29229,
62,
30001,
11,
318,
19545,
11,
6827,
4008,
198,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1234,
0,
7,
1349,
11,
357,
27932,
276,
62,
34086,
594,
11,
9335,
62,
312,
87,
11,
29229,
62,
30001,
11,
6827,
4008,
198,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
611,
1306,
62,
34086,
594,
198,
220,
220,
220,
220,
220,
220,
220,
1234,
0,
7,
1349,
11,
357,
27932,
276,
62,
34086,
594,
11,
9335,
62,
312,
87,
11,
29229,
62,
30001,
11,
318,
19545,
4008,
198,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1234,
0,
7,
1349,
11,
357,
27932,
276,
62,
34086,
594,
11,
9335,
62,
312,
87,
11,
29229,
62,
30001,
4008,
198,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
886,
198,
437,
198,
198,
8818,
4808,
37150,
62,
34086,
594,
7,
34086,
594,
16,
11,
6827,
17,
986,
26,
923,
62,
30001,
796,
12878,
5097,
50,
60,
1600,
41767,
62,
30001,
796,
12878,
5188,
47,
60,
4943,
198,
220,
4574,
11085,
0,
7,
34086,
594,
16,
11,
923,
62,
30001,
8,
198,
220,
4574,
0,
7,
34086,
594,
16,
11,
41767,
62,
30001,
8,
198,
220,
3975,
7,
82,
3784,
14689,
0,
7,
82,
11,
41767,
62,
30001,
828,
6827,
17,
8,
198,
220,
410,
9246,
7,
34086,
594,
16,
11,
6827,
17,
23029,
198,
437,
198,
198,
62,
37150,
62,
312,
87,
7,
34086,
594,
16,
62,
312,
87,
11,
662,
62,
11925,
796,
352,
8,
796,
6827,
16,
62,
312,
87,
764,
47932,
662,
62,
11925,
198,
8818,
4808,
37150,
62,
312,
87,
7,
34086,
594,
16,
62,
312,
87,
11,
6827,
17,
62,
312,
87,
11,
18896,
16,
8,
198,
220,
4808,
37150,
62,
312,
87,
7,
34086,
594,
16,
62,
312,
87,
8,
198,
220,
4808,
37150,
62,
312,
87,
7,
34086,
594,
17,
62,
312,
87,
11,
18896,
16,
8,
198,
220,
410,
9246,
7,
34086,
594,
16,
62,
312,
87,
11,
6827,
17,
62,
312,
87,
8,
198,
437,
628,
198,
198,
5356,
591,
298,
594,
7,
34086,
594,
3712,
10100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11241,
7509,
3712,
51,
69,
11,
1573,
12239,
3712,
26449,
47,
8535,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
12878,
31180,
42,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
657,
13,
1314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
3991,
8,
810,
309,
69,
796,
20680,
298,
594,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11241,
7509,
7,
34086,
594,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
9335,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
9335,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
1103,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
4738,
62,
30001,
62,
10366,
952,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
2187,
62,
4775,
62,
27932,
8,
198,
198,
8818,
20680,
298,
594,
7,
10879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
12239,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
30001,
796,
12878,
31180,
42,
60,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
10366,
952,
796,
657,
13,
1314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
30001,
62,
10366,
952,
796,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2187,
62,
4775,
62,
27932,
796,
3991,
8,
628,
220,
611,
2187,
62,
4775,
62,
27932,
198,
220,
220,
220,
29229,
62,
4775,
62,
312,
87,
796,
374,
1746,
549,
41068,
7,
16,
25,
13664,
7,
10879,
828,
9335,
62,
10366,
952,
8,
628,
220,
220,
220,
318,
62,
27932,
276,
796,
6070,
7,
9562,
11,
4129,
7,
10879,
4008,
198,
220,
220,
220,
3975,
7,
27932,
276,
62,
4775,
62,
312,
87,
8,
466,
1312,
198,
220,
220,
220,
220,
220,
318,
62,
27932,
276,
58,
72,
60,
796,
2081,
198,
220,
220,
220,
886,
628,
220,
220,
220,
16326,
796,
20650,
90,
10100,
92,
3419,
198,
220,
220,
220,
29229,
62,
312,
87,
796,
20650,
90,
5317,
92,
3419,
628,
220,
220,
220,
2546,
71,
600,
0,
7,
83,
482,
641,
11,
4129,
7,
10879,
4008,
198,
220,
220,
220,
2546,
71,
600,
0,
7,
27932,
276,
62,
312,
87,
11,
4129,
7,
27932,
276,
62,
4775,
62,
312,
87,
4008,
628,
220,
220,
220,
18896,
796,
657,
198,
220,
220,
220,
329,
357,
4775,
11,
545,
8,
18872,
230,
19974,
7,
10879,
11,
318,
62,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
266,
862,
796,
1573,
12239,
7,
4775,
8,
198,
220,
220,
220,
220,
220,
266,
489,
796,
4129,
7,
86,
862,
8,
198,
220,
220,
220,
220,
220,
24443,
0,
7,
83,
482,
641,
11,
266,
862,
8,
198,
220,
220,
220,
220,
220,
545,
11405,
24443,
0,
7,
27932,
276,
62,
312,
87,
11,
3975,
7,
72,
3784,
72,
10,
11925,
11,
352,
25,
86,
489,
4008,
198,
220,
220,
220,
220,
220,
18896,
15853,
266,
489,
198,
220,
220,
220,
886,
198,
220,
2073,
198,
220,
220,
220,
16326,
796,
1573,
12239,
7,
10879,
8,
198,
220,
220,
220,
29229,
62,
312,
87,
796,
374,
1746,
549,
41068,
7,
16,
25,
13664,
7,
83,
482,
641,
828,
9335,
62,
10366,
952,
8,
198,
220,
886,
628,
220,
29229,
62,
83,
482,
641,
796,
4866,
7,
83,
482,
641,
8,
628,
220,
329,
4686,
87,
18872,
230,
29229,
62,
312,
87,
198,
220,
220,
220,
374,
796,
43720,
3419,
198,
220,
220,
220,
611,
374,
19841,
4738,
62,
30001,
62,
10366,
952,
198,
220,
220,
220,
220,
220,
29229,
62,
83,
482,
641,
58,
312,
87,
60,
796,
43720,
7,
4775,
12239,
13,
18893,
397,
8,
198,
220,
220,
220,
2073,
361,
374,
1875,
1103,
62,
30001,
62,
10366,
952,
1343,
4738,
62,
30001,
62,
10366,
952,
198,
220,
220,
220,
220,
220,
29229,
62,
83,
482,
641,
58,
312,
87,
60,
796,
9335,
62,
30001,
198,
220,
220,
220,
886,
198,
220,
886,
628,
220,
1441,
29229,
62,
83,
482,
641,
11,
16326,
11,
29229,
62,
312,
87,
198,
437,
628
] | 1.836148 | 4,559 |
function loadBrukerfolderautophase(full_path::String)
pdata_path = "$full_path/pdata/1"
PyCall.py"""
import numpy
import nmrglue as ng
s = $full_path
procdata_dir = $pdata_path
dic, data = ng.bruker.read(s)
# ---time correction before FT
precorr_time = ng.bruker.remove_digital_filter(dic, data)
precorr_frq0 = ng.proc_base.fft(precorr_time)
precorr_frq = ng.proc_autophase.autops(precorr_frq0, 'acme')
# precorr_frq = ng.proc_autophase.autops(precorr_frq0, 'peak_minima')
#---time correction after FT
postcorr_frq0 = ng.proc_base.fft(data)
postcorr_frq1 = ng.bruker.remove_digital_filter(dic, postcorr_frq0, post_proc=True)
postcorr_frq = ng.proc_autophase.autops(postcorr_frq1, 'acme')
#---data processed using TopSpin (3.5pl7)
bruker_frq = ng.bruker.read_pdata(procdata_dir)[1][::-1]
guess_udic = ng.fileio.bruker.guess_udic(dic, data)
"""
dic = PyCall.py"dic"
data = PyCall.py"data"
precorr_time = PyCall.py"precorr_time"
precorr_frq0 = PyCall.py"precorr_frq0"
precorr_frq = PyCall.py"precorr_frq"
postcorr_frq0 = PyCall.py"postcorr_frq0"
postcorr_frq1 = PyCall.py"postcorr_frq1"
postcorr_frq = PyCall.py"postcorr_frq"
bruker_frq = PyCall.py"bruker_frq"
guess_udic = PyCall.py"guess_udic"
return dic, data, precorr_time, precorr_frq0, precorr_frq,
postcorr_frq0, postcorr_frq1, postcorr_frq, bruker_frq,
guess_udic
end
"""
loadspectrum(full_path::String;
solvent_ppm = 4.8,
solvent_window_ppm = 0.3,
N_Ω::Int = 20000,
N_optim::Int = 1000,
n_particles::Int = 3,
max_iters::Int = 100,
α_lower = 1e-6,
α_upper_factor = 50.0,
λ_lower = 1e-10,
λ_upper = 20.0,
λ_initial = 3.0,
st_ind_default = 100,
verbose_flag::Bool = false)
Loads a Bruker 1D 1H NMR experiment. Uses the NMRGlue Python library. Estimates the 0 ppm and solvent resonance components. The solvent resonance component is estimated in the frequency interval `solvent_ppm` +/- `solvent_window_ppm`, in units ppm.
On a Linux terminal, run the following command if you don't have NMRGlue installed.
pip install nmrglue --user
Notes:
Either `st_ind_default` samples or `dead_time_st` number of samples are removed from the raw time-domain data to create the output time-domain data, s_t. This is to remove the silence at the beginning of the acquired data due to the dead-time property of practical NMR spectrometers. 'dead_time_st' is calculated automatically from the metadata of the experiment files.
Therefore, the returned sampling frequency `fs` from loadspectrum() and the sampling frequency in the returned metadata ditionary `dic` are slightly different.
...
# Outputs, in the order returned.
- `s_t::Vector{Complex{Float64}}`: time-domain experiment data.
- `S::Function`: Discrete-time Fourier transform of s_t.
- `hz2ppmfunc::Function`: conversion function from Hz to ppm for this experiment. The formula used is `hz2ppmfunc = uu->(uu - ν_0ppm)*SW/fs`.
- `ppm2hzfunc::Function`: conversion function from ppm to Hz for this experiment. The formula used is `ppm2hzfunc = pp->(ν_0ppm + pp*fs/SW)`.
- `ν_0ppm::Float64`: where the estimated frequency of the 0 ppm resonance component, in Hz.
- `fs::Float64`: the estimated sampling frequency of `s_t`.
- `SW::Float64`: the spectral window of the spectrometer, as provided by the metadata of the experiment. In units of ppm.
- `α_0ppm`: The amplitude parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `β_0ppm`: The phase parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `λ_0ppm`: The T2 parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `Ω_0ppm`: The radial frequency parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model. In units Hz/(2*π).
- `results_0ppm`: The NLopt.jl optimization results for the estimation of the 0 ppm reference. Inspect this to see if the estimated parameters for the 0 ppm reference are reliable.
- `dic`; The dictionary that contains all metadata from NMRGlue for the NMR experiment.
- `α_solvent`: The amplitude parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `β_solvent`: The phase parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `λ_solvent`: The T2 parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model.
- `Ω_solvent`: The radial frequency parameter of the estimate resonance component for 0 ppm reference, in the free-induction decay model. In units Hz/(2*π).
- `results_solvent`: The NLopt.jl optimization results for the estimation of the 0 ppm reference. Inspect this to see if the estimated parameters for the 0 ppm reference are reliable.
, , , , ,
# Examples
See load_experiment.jl in the /examples folder for an example.
"""
function loadspectrum(full_path::String;
solvent_ppm = 4.8,
solvent_window_ppm = 0.3,
N_Ω::Int = 20000,
N_optim::Int = 1000,
n_particles::Int = 3,
max_iters::Int = 100,
α_lower = 1e-6,
α_upper_factor = 50.0,
λ_lower = 1e-10,
λ_upper = 20.0,
λ_initial = 3.0,
st_ind_default = 100, # future: see if we can derive this from DE dead time later.
verbose_flag::Bool = false)
dic, data, precorr_time, precorr_frq0, precorr_frq, postcorr_frq0, postcorr_frq1,
postcorr_frq, Bruker_spectrums_nmrglue,
guess_udic = loadBrukerfolderautophase(full_path)
DE = dic["acqus"]["DE"] # in microseconds.
BF1 = dic["acqus"]["BF1"]
## see Bruker TopSpin acquistion commands and parameters v 003.
# TD - Time Domain; Number Of Raw Data Points. i.e., length(data)*2 - TD = 0.
# total samples from both time-series.
TD = dic["acqus"]["TD"]
# SW - Spectral Width in ppm
SW = dic["acqus"]["SW"]
# SFO1 - SFO8 - Irradiation (carrier) Frequencies For Channels f1 to f8
SFO1 = dic["acqus"]["SFO1"]
O1 = dic["acqus"]["O1"]
dic["acqus"]["NUC1"]
CAR = O1*1.0
fs_dic = dic["acqus"]["SW_h"]
N_diff = length(data)*2 - TD
t_data = gettimerange(length(data), fs_dic)
AQ = TD/(2*SW*SFO1)
dead_time = t_data[end] - AQ
dead_time_st = round(Int, dead_time/t_data[end] * length(data))
st_ind = max(st_ind_default, dead_time_st)
s_t = data[st_ind:end]
t = gettimerange(length(s_t), fs_dic)
fs = (length(s_t)-1)/t[end] # this is really fs_dic.
@assert abs(fs-fs_dic) < 1e-9
α_0ppm, β_0ppm, λ_0ppm, Ω_0ppm,
results_0ppm = estimatereferencecompoundfreq(CAR, fs, SW, s_t, t;
N_Ω = N_Ω,
N_optim = N_optim,
n_particles = n_particles,
max_iters = max_iters,
α_lower = α_lower,
α_upper_factor = α_upper_factor,
λ_lower = λ_lower,
λ_upper = λ_upper,
λ_initial = λ_initial,
verbose_flag = verbose_flag)
ν_0ppm = Ω_0ppm ./ (2*π)
hz2ppmfunc = uu->(uu - ν_0ppm)*SW/fs
ppm2hzfunc = pp->(ν_0ppm + pp*fs/SW)
# S is scaled DTFT of data.
S = vv->(computeDTFTch3eq29(s_t, vv, t)/fs)
# solvent.
u_solvent_lower = ppm2hzfunc(solvent_ppm-solvent_window_ppm)
u_solvent_upper = ppm2hzfunc(solvent_ppm+solvent_window_ppm)
α_solvent, β_solvent, λ_solvent, Ω_solvent,
results_solvent = estimatesinglet(fs, s_t, t,
u_solvent_lower, u_solvent_upper;
N_Ω = N_Ω,
N_optim = N_optim,
n_particles = n_particles,
max_iters = max_iters,
α_lower = α_lower,
α_upper_factor = α_upper_factor,
λ_lower = λ_lower,
λ_upper = λ_upper,
λ_initial = λ_initial,
verbose_flag = verbose_flag)
return s_t, S, hz2ppmfunc, ppm2hzfunc, ν_0ppm, fs, SW, α_0ppm, β_0ppm, λ_0ppm, Ω_0ppm,
results_0ppm, dic, α_solvent, β_solvent, λ_solvent, Ω_solvent, results_solvent
end
function estimatereferencecompoundfreq( CAR::T,
fs::T,
SW::T,
s_t::Vector{Complex{T}},
t;
N_Ω::Int = 20000,
N_optim::Int = 1000,
n_particles::Int = 3,
max_iters::Int = 100,
window_ppm::T = 0.3,
α_lower::T = 1e-6,
α_upper_factor::T = 50.0,
λ_lower::T = 1e-10,
λ_upper::T = 20.0,
λ_initial::T = 3.0,
verbose_flag::Bool = false) where T <: Real
# prepare frequency range.
ν0_initial, hz2ppmfunc0, ppm2hzfunc0 = getinitalguessreferencecompoundfreq(CAR, fs, SW)
bp_a = ppm2hzfunc0(-window_ppm)
bp_b = ppm2hzfunc0(window_ppm)
return estimatesinglet(fs, s_t, t, bp_a, bp_b;
N_Ω = N_Ω,
N_optim = N_optim,
n_particles = n_particles,
max_iters = max_iters,
α_lower = α_lower,
α_upper_factor = α_upper_factor,
λ_lower = λ_lower,
λ_upper = λ_upper,
λ_initial = λ_initial,
verbose_flag = verbose_flag)
end
# λ_initial: m a value of 3 seems decent for the λ of DSS under 600 MHz.
# no error checking on whether λ_initial ∈ [λ_lower, λ_upper].
function estimatesinglet( fs::T,
s_t::Vector{Complex{T}},
t,
u_lower,
u_upper;
N_Ω::Int = 20000,
N_optim::Int = 1000,
n_particles::Int = 3,
max_iters::Int = 100,
α_lower::T = 1e-6,
α_upper_factor::T = 100.0,
λ_lower::T = 1e-10,
λ_upper::T = 20.0,
λ_initial::T = 3.0,
verbose_flag::Bool = false,
xtol_rel::T = 1e-12,
nlopt_seed::Int = 25) where T <: Real
# prepare data.
DTFT_s_scaled = vv->(computeDTFTch3eq29(s_t, vv, t)/fs)
u_range_optim = LinRange(u_lower, u_upper, N_optim)
S_U = DTFT_s_scaled.(u_range_optim)
# set up optimization.
max_val, max_ind = findmax(abs.(S_U))
Ω = u_range_optim[max_ind] *2*π
#println("Ω = ", Ω)
costfunc = pp->evalcostreferencecompound(pp,
S_U, u_range_optim, Ω)
optim_lower_limit = [α_lower; -π; λ_lower]
optim_upper_limit = [max_val*α_upper_factor; π; λ_upper]
p0 = [max_val; 0.0; λ_initial]
# optimize.
op = Optim.Options( iterations = max_iters,
store_trace = false,
show_trace = verbose_flag)
results = Optim.optimize( costfunc,
p0,
Optim.ParticleSwarm(; lower = optim_lower_limit,
upper = optim_upper_limit,
n_particles = n_particles),
op)
#α, β, λ = results.minimizer
# println("α = ", α)
# Q = [1221.2329692741823;
# 1.5072497616902667;
# 4.266537181116996]
# println("cost Q = ", costfunc(Q))
# println("cost p = ", costfunc(results.minimizer))
# use NLopt.
grad_func = xx->FiniteDiff.finite_difference_gradient(costfunc, xx)
NLopt.srand(nlopt_seed)
p_initial = results.minimizer
#p_initial = p0
opt = NLopt.Opt(:GN_ESCH, length(p_initial))
#opt = NLopt.Opt(:LD_MMA, length(p_initial))
min_cost_p, min_p, ret_p, numevals_p = runNLopt!( opt,
p_initial,
costfunc,
grad_func,
optim_lower_limit,
optim_upper_limit;
max_iters = 100*max_iters,
xtol_rel = xtol_rel)
#
opt = NLopt.Opt(:LD_MMA, length(min_p))
min_cost_p, min_p, ret_p, numevals_p = runNLopt!( opt,
min_p,
costfunc,
grad_func,
optim_lower_limit,
optim_upper_limit;
max_iters = 100*max_iters,
xtol_rel = xtol_rel)
α, β, λ = min_p
# #
# println("p_initial = ", p_initial)
# println("α = ", α)
return α, β, λ, Ω, results
end
function evalcostreferencecompound( p::Vector{T},
S_U::Vector{Complex{T}},
u_range,
Ω) where T <: Real
# parse.
α, β, λ = p
cost = zero(T)
for i = 1:length(u_range)
q_u = evalcomplexLorentzian(u_range[i], α, β, λ, Ω)
cost += abs2(q_u - S_U[i])
#cost += (abs(q_u)-abs(S_U[i]))^2
end
return cost
end
function getinitalguessreferencecompoundfreq(CAR::T, fs::T, SW::T) where T <: Real
ν0_initial = fs - CAR
hz2ppmfunc0 = uu->(uu - ν0_initial)*SW/fs
ppm2hzfunc0 = pp->(ν0_initial + pp*fs/SW)
return ν0_initial, hz2ppmfunc0, ppm2hzfunc0
end
| [
198,
8818,
3440,
33,
622,
6122,
43551,
2306,
2522,
589,
7,
12853,
62,
6978,
3712,
10100,
8,
628,
220,
220,
220,
279,
7890,
62,
6978,
796,
17971,
12853,
62,
6978,
14,
79,
7890,
14,
16,
1,
628,
220,
220,
220,
9485,
14134,
13,
9078,
37811,
198,
220,
220,
220,
1330,
299,
32152,
198,
220,
220,
220,
1330,
28642,
81,
4743,
518,
355,
23370,
628,
220,
220,
220,
264,
796,
720,
12853,
62,
6978,
198,
220,
220,
220,
13834,
7890,
62,
15908,
796,
720,
79,
7890,
62,
6978,
628,
220,
220,
220,
288,
291,
11,
1366,
796,
23370,
13,
65,
622,
6122,
13,
961,
7,
82,
8,
628,
220,
220,
220,
1303,
11420,
2435,
17137,
878,
19446,
198,
220,
220,
220,
3718,
38890,
62,
2435,
796,
220,
23370,
13,
65,
622,
6122,
13,
28956,
62,
34725,
62,
24455,
7,
67,
291,
11,
1366,
8,
198,
220,
220,
220,
3718,
38890,
62,
8310,
80,
15,
796,
23370,
13,
36942,
62,
8692,
13,
487,
83,
7,
3866,
10215,
81,
62,
2435,
8,
198,
220,
220,
220,
3718,
38890,
62,
8310,
80,
796,
23370,
13,
36942,
62,
2306,
2522,
589,
13,
2306,
2840,
7,
3866,
10215,
81,
62,
8310,
80,
15,
11,
705,
330,
1326,
11537,
198,
220,
220,
220,
1303,
3718,
38890,
62,
8310,
80,
796,
23370,
13,
36942,
62,
2306,
2522,
589,
13,
2306,
2840,
7,
3866,
10215,
81,
62,
8310,
80,
15,
11,
705,
36729,
62,
1084,
8083,
11537,
628,
220,
220,
220,
1303,
6329,
2435,
17137,
706,
19446,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
15,
796,
23370,
13,
36942,
62,
8692,
13,
487,
83,
7,
7890,
8,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
16,
796,
23370,
13,
65,
622,
6122,
13,
28956,
62,
34725,
62,
24455,
7,
67,
291,
11,
1281,
10215,
81,
62,
8310,
80,
15,
11,
1281,
62,
36942,
28,
17821,
8,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
796,
23370,
13,
36942,
62,
2306,
2522,
589,
13,
2306,
2840,
7,
7353,
10215,
81,
62,
8310,
80,
16,
11,
705,
330,
1326,
11537,
628,
220,
220,
220,
1303,
6329,
7890,
13686,
1262,
5849,
4561,
259,
357,
18,
13,
20,
489,
22,
8,
198,
220,
220,
220,
18145,
6122,
62,
8310,
80,
796,
23370,
13,
65,
622,
6122,
13,
961,
62,
79,
7890,
7,
36942,
7890,
62,
15908,
38381,
16,
7131,
3712,
12,
16,
60,
628,
220,
220,
220,
4724,
62,
28673,
796,
23370,
13,
7753,
952,
13,
65,
622,
6122,
13,
5162,
408,
62,
28673,
7,
67,
291,
11,
1366,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
288,
291,
796,
9485,
14134,
13,
9078,
1,
67,
291,
1,
198,
220,
220,
220,
1366,
796,
9485,
14134,
13,
9078,
1,
7890,
1,
628,
220,
220,
220,
3718,
38890,
62,
2435,
796,
9485,
14134,
13,
9078,
1,
3866,
10215,
81,
62,
2435,
1,
198,
220,
220,
220,
3718,
38890,
62,
8310,
80,
15,
796,
9485,
14134,
13,
9078,
1,
3866,
10215,
81,
62,
8310,
80,
15,
1,
198,
220,
220,
220,
3718,
38890,
62,
8310,
80,
796,
9485,
14134,
13,
9078,
1,
3866,
10215,
81,
62,
8310,
80,
1,
628,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
15,
796,
9485,
14134,
13,
9078,
1,
7353,
10215,
81,
62,
8310,
80,
15,
1,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
16,
796,
9485,
14134,
13,
9078,
1,
7353,
10215,
81,
62,
8310,
80,
16,
1,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
796,
9485,
14134,
13,
9078,
1,
7353,
10215,
81,
62,
8310,
80,
1,
628,
220,
220,
220,
18145,
6122,
62,
8310,
80,
796,
9485,
14134,
13,
9078,
1,
65,
622,
6122,
62,
8310,
80,
1,
198,
220,
220,
220,
4724,
62,
28673,
796,
9485,
14134,
13,
9078,
1,
5162,
408,
62,
28673,
1,
628,
220,
220,
220,
1441,
288,
291,
11,
1366,
11,
3718,
38890,
62,
2435,
11,
3718,
38890,
62,
8310,
80,
15,
11,
3718,
38890,
62,
8310,
80,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
15,
11,
1281,
10215,
81,
62,
8310,
80,
16,
11,
1281,
10215,
81,
62,
8310,
80,
11,
18145,
6122,
62,
8310,
80,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4724,
62,
28673,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
3440,
4443,
6582,
7,
12853,
62,
6978,
3712,
10100,
26,
198,
220,
220,
220,
220,
220,
220,
220,
43209,
62,
381,
76,
796,
604,
13,
23,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43209,
62,
17497,
62,
381,
76,
796,
657,
13,
18,
11,
198,
220,
220,
220,
220,
220,
220,
220,
399,
62,
138,
102,
3712,
5317,
796,
939,
405,
11,
198,
220,
220,
220,
220,
220,
220,
220,
399,
62,
40085,
3712,
5317,
796,
8576,
11,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
3911,
2983,
3712,
5317,
796,
513,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
270,
364,
3712,
5317,
796,
1802,
11,
198,
220,
220,
220,
220,
220,
220,
220,
26367,
62,
21037,
796,
352,
68,
12,
21,
11,
198,
220,
220,
220,
220,
220,
220,
220,
26367,
62,
45828,
62,
31412,
796,
2026,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
21037,
796,
352,
68,
12,
940,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
45828,
796,
1160,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
36733,
796,
513,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
336,
62,
521,
62,
12286,
796,
1802,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15942,
577,
62,
32109,
3712,
33,
970,
796,
3991,
8,
198,
198,
8912,
82,
257,
8274,
6122,
352,
35,
352,
39,
399,
13599,
6306,
13,
36965,
262,
399,
13599,
9861,
518,
11361,
5888,
13,
47052,
262,
657,
39719,
290,
43209,
29371,
6805,
13,
383,
43209,
29371,
7515,
318,
6108,
287,
262,
8373,
16654,
4600,
34453,
1151,
62,
381,
76,
63,
29694,
4600,
34453,
1151,
62,
17497,
62,
381,
76,
47671,
287,
4991,
39719,
13,
628,
198,
2202,
257,
7020,
12094,
11,
1057,
262,
1708,
3141,
611,
345,
836,
470,
423,
399,
13599,
9861,
518,
6589,
13,
198,
79,
541,
2721,
28642,
81,
4743,
518,
1377,
7220,
198,
198,
16130,
25,
198,
32478,
4600,
301,
62,
521,
62,
12286,
63,
8405,
393,
4600,
25124,
62,
2435,
62,
301,
63,
1271,
286,
8405,
389,
4615,
422,
262,
8246,
640,
12,
27830,
1366,
284,
2251,
262,
5072,
640,
12,
27830,
1366,
11,
264,
62,
83,
13,
770,
318,
284,
4781,
262,
9550,
379,
262,
3726,
286,
262,
9477,
1366,
2233,
284,
262,
2636,
12,
2435,
3119,
286,
8472,
399,
13599,
5444,
398,
7307,
13,
705,
25124,
62,
2435,
62,
301,
6,
318,
10488,
6338,
422,
262,
20150,
286,
262,
6306,
3696,
13,
198,
198,
26583,
11,
262,
4504,
19232,
8373,
4600,
9501,
63,
422,
3440,
4443,
6582,
3419,
290,
262,
19232,
8373,
287,
262,
4504,
20150,
288,
653,
560,
4600,
67,
291,
63,
389,
4622,
1180,
13,
198,
198,
986,
198,
2,
25235,
82,
11,
287,
262,
1502,
4504,
13,
198,
198,
12,
4600,
82,
62,
83,
3712,
38469,
90,
5377,
11141,
90,
43879,
2414,
11709,
63,
25,
640,
12,
27830,
6306,
1366,
13,
198,
12,
4600,
50,
3712,
22203,
63,
25,
8444,
8374,
12,
2435,
34296,
5277,
6121,
286,
264,
62,
83,
13,
198,
12,
4600,
32179,
17,
381,
76,
20786,
3712,
22203,
63,
25,
11315,
2163,
422,
26109,
284,
39719,
329,
428,
6306,
13,
383,
10451,
973,
318,
4600,
32179,
17,
381,
76,
20786,
796,
334,
84,
3784,
7,
12303,
532,
7377,
121,
62,
15,
381,
76,
27493,
17887,
14,
9501,
44646,
198,
12,
4600,
381,
76,
17,
32179,
20786,
3712,
22203,
63,
25,
11315,
2163,
422,
39719,
284,
26109,
329,
428,
6306,
13,
383,
10451,
973,
318,
4600,
381,
76,
17,
32179,
20786,
796,
9788,
3784,
7,
26180,
62,
15,
381,
76,
1343,
9788,
9,
9501,
14,
17887,
8,
44646,
198,
198,
12,
4600,
26180,
62,
15,
381,
76,
3712,
43879,
2414,
63,
25,
810,
262,
6108,
8373,
286,
262,
657,
39719,
29371,
7515,
11,
287,
26109,
13,
198,
12,
4600,
9501,
3712,
43879,
2414,
63,
25,
262,
6108,
19232,
8373,
286,
4600,
82,
62,
83,
44646,
198,
12,
4600,
17887,
3712,
43879,
2414,
63,
25,
262,
37410,
4324,
286,
262,
5444,
398,
2357,
11,
355,
2810,
416,
262,
20150,
286,
262,
6306,
13,
554,
4991,
286,
39719,
13,
198,
12,
4600,
17394,
62,
15,
381,
76,
63,
25,
383,
37188,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
26638,
62,
15,
381,
76,
63,
25,
383,
7108,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
39377,
62,
15,
381,
76,
63,
25,
383,
309,
17,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
138,
102,
62,
15,
381,
76,
63,
25,
383,
44503,
8373,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
554,
4991,
26109,
29006,
17,
9,
46582,
737,
198,
12,
4600,
43420,
62,
15,
381,
76,
63,
25,
383,
22879,
8738,
13,
20362,
23989,
2482,
329,
262,
31850,
286,
262,
657,
39719,
4941,
13,
20904,
428,
284,
766,
611,
262,
6108,
10007,
329,
262,
657,
39719,
4941,
389,
9314,
13,
198,
198,
12,
4600,
67,
291,
63,
26,
383,
22155,
326,
4909,
477,
20150,
422,
399,
13599,
9861,
518,
329,
262,
399,
13599,
6306,
13,
198,
198,
12,
4600,
17394,
62,
34453,
1151,
63,
25,
383,
37188,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
26638,
62,
34453,
1151,
63,
25,
383,
7108,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
39377,
62,
34453,
1151,
63,
25,
383,
309,
17,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
198,
12,
4600,
138,
102,
62,
34453,
1151,
63,
25,
383,
44503,
8373,
11507,
286,
262,
8636,
29371,
7515,
329,
657,
39719,
4941,
11,
287,
262,
1479,
12,
521,
8110,
22119,
2746,
13,
554,
4991,
26109,
29006,
17,
9,
46582,
737,
198,
12,
4600,
43420,
62,
34453,
1151,
63,
25,
383,
22879,
8738,
13,
20362,
23989,
2482,
329,
262,
31850,
286,
262,
657,
39719,
4941,
13,
20904,
428,
284,
766,
611,
262,
6108,
10007,
329,
262,
657,
39719,
4941,
389,
9314,
13,
198,
11,
837,
837,
837,
837,
628,
198,
2,
21066,
198,
6214,
3440,
62,
23100,
3681,
13,
20362,
287,
262,
1220,
1069,
12629,
9483,
329,
281,
1672,
13,
198,
37811,
198,
8818,
3440,
4443,
6582,
7,
12853,
62,
6978,
3712,
10100,
26,
198,
220,
220,
220,
43209,
62,
381,
76,
796,
604,
13,
23,
11,
198,
220,
220,
220,
43209,
62,
17497,
62,
381,
76,
796,
657,
13,
18,
11,
198,
220,
220,
220,
399,
62,
138,
102,
3712,
5317,
796,
939,
405,
11,
198,
220,
220,
220,
399,
62,
40085,
3712,
5317,
796,
8576,
11,
198,
220,
220,
220,
299,
62,
3911,
2983,
3712,
5317,
796,
513,
11,
198,
220,
220,
220,
3509,
62,
270,
364,
3712,
5317,
796,
1802,
11,
198,
220,
220,
220,
26367,
62,
21037,
796,
352,
68,
12,
21,
11,
198,
220,
220,
220,
26367,
62,
45828,
62,
31412,
796,
2026,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
21037,
796,
352,
68,
12,
940,
11,
198,
220,
220,
220,
7377,
119,
62,
45828,
796,
1160,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
36733,
796,
513,
13,
15,
11,
198,
220,
220,
220,
336,
62,
521,
62,
12286,
796,
1802,
11,
1303,
2003,
25,
766,
611,
356,
460,
27099,
428,
422,
5550,
2636,
640,
1568,
13,
198,
220,
220,
220,
15942,
577,
62,
32109,
3712,
33,
970,
796,
3991,
8,
628,
220,
220,
220,
288,
291,
11,
1366,
11,
3718,
38890,
62,
2435,
11,
3718,
38890,
62,
8310,
80,
15,
11,
3718,
38890,
62,
8310,
80,
11,
1281,
10215,
81,
62,
8310,
80,
15,
11,
1281,
10215,
81,
62,
8310,
80,
16,
11,
198,
220,
220,
220,
1281,
10215,
81,
62,
8310,
80,
11,
8274,
6122,
62,
4443,
45241,
62,
21533,
81,
4743,
518,
11,
198,
220,
220,
220,
4724,
62,
28673,
796,
3440,
33,
622,
6122,
43551,
2306,
2522,
589,
7,
12853,
62,
6978,
8,
628,
220,
220,
220,
5550,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
7206,
8973,
1303,
287,
4580,
43012,
13,
628,
220,
220,
220,
41646,
16,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
29499,
16,
8973,
198,
220,
220,
220,
22492,
766,
8274,
6122,
5849,
4561,
259,
4078,
396,
295,
9729,
290,
10007,
410,
3571,
18,
13,
198,
220,
220,
220,
1303,
13320,
532,
3862,
20021,
26,
7913,
3226,
16089,
6060,
11045,
13,
1312,
13,
68,
1539,
4129,
7,
7890,
27493,
17,
532,
13320,
796,
657,
13,
198,
220,
220,
220,
1303,
2472,
8405,
422,
1111,
640,
12,
25076,
13,
198,
220,
220,
220,
13320,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
21016,
8973,
628,
220,
220,
220,
1303,
12672,
532,
13058,
1373,
38807,
287,
39719,
198,
220,
220,
220,
12672,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
17887,
8973,
628,
220,
220,
220,
1303,
311,
6080,
16,
532,
311,
6080,
23,
532,
5686,
6335,
3920,
357,
7718,
5277,
8,
22192,
3976,
1114,
609,
8961,
277,
16,
284,
277,
23,
198,
220,
220,
220,
311,
6080,
16,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
50,
6080,
16,
8973,
628,
220,
220,
220,
440,
16,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
46,
16,
8973,
198,
220,
220,
220,
288,
291,
14692,
330,
45260,
1,
7131,
1,
45,
9598,
16,
8973,
628,
220,
220,
220,
17368,
796,
440,
16,
9,
16,
13,
15,
628,
220,
220,
220,
43458,
62,
67,
291,
796,
288,
291,
14692,
330,
45260,
1,
7131,
1,
17887,
62,
71,
8973,
628,
220,
220,
220,
399,
62,
26069,
796,
4129,
7,
7890,
27493,
17,
532,
13320,
628,
220,
220,
220,
256,
62,
7890,
796,
651,
45016,
858,
7,
13664,
7,
7890,
828,
43458,
62,
67,
291,
8,
628,
198,
220,
220,
220,
39514,
796,
13320,
29006,
17,
9,
17887,
9,
50,
6080,
16,
8,
198,
220,
220,
220,
2636,
62,
2435,
796,
256,
62,
7890,
58,
437,
60,
532,
39514,
628,
220,
220,
220,
2636,
62,
2435,
62,
301,
796,
2835,
7,
5317,
11,
2636,
62,
2435,
14,
83,
62,
7890,
58,
437,
60,
1635,
4129,
7,
7890,
4008,
198,
220,
220,
220,
336,
62,
521,
796,
3509,
7,
301,
62,
521,
62,
12286,
11,
2636,
62,
2435,
62,
301,
8,
628,
220,
220,
220,
264,
62,
83,
796,
1366,
58,
301,
62,
521,
25,
437,
60,
198,
220,
220,
220,
256,
796,
651,
45016,
858,
7,
13664,
7,
82,
62,
83,
828,
43458,
62,
67,
291,
8,
628,
198,
220,
220,
220,
43458,
796,
357,
13664,
7,
82,
62,
83,
13219,
16,
20679,
83,
58,
437,
60,
1303,
428,
318,
1107,
43458,
62,
67,
291,
13,
198,
220,
220,
220,
2488,
30493,
2352,
7,
9501,
12,
9501,
62,
67,
291,
8,
1279,
352,
68,
12,
24,
628,
198,
220,
220,
220,
26367,
62,
15,
381,
76,
11,
27169,
62,
15,
381,
76,
11,
7377,
119,
62,
15,
381,
76,
11,
7377,
102,
62,
15,
381,
76,
11,
198,
220,
220,
220,
2482,
62,
15,
381,
76,
796,
8636,
35790,
5589,
633,
19503,
80,
7,
20034,
11,
43458,
11,
12672,
11,
264,
62,
83,
11,
256,
26,
198,
220,
220,
220,
399,
62,
138,
102,
796,
399,
62,
138,
102,
11,
198,
220,
220,
220,
399,
62,
40085,
796,
399,
62,
40085,
11,
198,
220,
220,
220,
299,
62,
3911,
2983,
796,
299,
62,
3911,
2983,
11,
198,
220,
220,
220,
3509,
62,
270,
364,
796,
3509,
62,
270,
364,
11,
198,
220,
220,
220,
26367,
62,
21037,
796,
26367,
62,
21037,
11,
198,
220,
220,
220,
26367,
62,
45828,
62,
31412,
796,
26367,
62,
45828,
62,
31412,
11,
198,
220,
220,
220,
7377,
119,
62,
21037,
796,
7377,
119,
62,
21037,
11,
198,
220,
220,
220,
7377,
119,
62,
45828,
796,
7377,
119,
62,
45828,
11,
198,
220,
220,
220,
7377,
119,
62,
36733,
796,
7377,
119,
62,
36733,
11,
198,
220,
220,
220,
15942,
577,
62,
32109,
796,
15942,
577,
62,
32109,
8,
628,
220,
220,
220,
7377,
121,
62,
15,
381,
76,
796,
7377,
102,
62,
15,
381,
76,
24457,
357,
17,
9,
46582,
8,
628,
220,
220,
220,
289,
89,
17,
381,
76,
20786,
796,
334,
84,
3784,
7,
12303,
532,
7377,
121,
62,
15,
381,
76,
27493,
17887,
14,
9501,
198,
220,
220,
220,
39719,
17,
32179,
20786,
796,
9788,
3784,
7,
26180,
62,
15,
381,
76,
1343,
9788,
9,
9501,
14,
17887,
8,
628,
220,
220,
220,
1303,
311,
318,
27464,
24311,
9792,
286,
1366,
13,
198,
220,
220,
220,
311,
796,
410,
85,
3784,
7,
5589,
1133,
24544,
9792,
354,
18,
27363,
1959,
7,
82,
62,
83,
11,
410,
85,
11,
256,
20679,
9501,
8,
628,
220,
220,
220,
1303,
43209,
13,
198,
220,
220,
220,
334,
62,
34453,
1151,
62,
21037,
796,
39719,
17,
32179,
20786,
7,
34453,
1151,
62,
381,
76,
12,
34453,
1151,
62,
17497,
62,
381,
76,
8,
198,
220,
220,
220,
334,
62,
34453,
1151,
62,
45828,
796,
39719,
17,
32179,
20786,
7,
34453,
1151,
62,
381,
76,
10,
34453,
1151,
62,
17497,
62,
381,
76,
8,
628,
220,
220,
220,
26367,
62,
34453,
1151,
11,
27169,
62,
34453,
1151,
11,
7377,
119,
62,
34453,
1151,
11,
7377,
102,
62,
34453,
1151,
11,
198,
220,
220,
220,
2482,
62,
34453,
1151,
796,
7746,
278,
1616,
7,
9501,
11,
264,
62,
83,
11,
256,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
62,
34453,
1151,
62,
21037,
11,
334,
62,
34453,
1151,
62,
45828,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
399,
62,
138,
102,
796,
399,
62,
138,
102,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
399,
62,
40085,
796,
399,
62,
40085,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
62,
3911,
2983,
796,
299,
62,
3911,
2983,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
270,
364,
796,
3509,
62,
270,
364,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26367,
62,
21037,
796,
26367,
62,
21037,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26367,
62,
45828,
62,
31412,
796,
26367,
62,
45828,
62,
31412,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
21037,
796,
7377,
119,
62,
21037,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
45828,
796,
7377,
119,
62,
45828,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
62,
36733,
796,
7377,
119,
62,
36733,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15942,
577,
62,
32109,
796,
15942,
577,
62,
32109,
8,
628,
198,
220,
220,
220,
1441,
264,
62,
83,
11,
311,
11,
289,
89,
17,
381,
76,
20786,
11,
39719,
17,
32179,
20786,
11,
7377,
121,
62,
15,
381,
76,
11,
43458,
11,
12672,
11,
26367,
62,
15,
381,
76,
11,
27169,
62,
15,
381,
76,
11,
7377,
119,
62,
15,
381,
76,
11,
7377,
102,
62,
15,
381,
76,
11,
198,
220,
220,
220,
2482,
62,
15,
381,
76,
11,
288,
291,
11,
26367,
62,
34453,
1151,
11,
27169,
62,
34453,
1151,
11,
7377,
119,
62,
34453,
1151,
11,
7377,
102,
62,
34453,
1151,
11,
2482,
62,
34453,
1151,
198,
437,
198,
198,
8818,
8636,
35790,
5589,
633,
19503,
80,
7,
17368,
3712,
51,
11,
198,
220,
220,
220,
43458,
3712,
51,
11,
198,
220,
220,
220,
12672,
3712,
51,
11,
198,
220,
220,
220,
264,
62,
83,
3712,
38469,
90,
5377,
11141,
90,
51,
92,
5512,
198,
220,
220,
220,
256,
26,
198,
220,
220,
220,
399,
62,
138,
102,
3712,
5317,
796,
939,
405,
11,
198,
220,
220,
220,
399,
62,
40085,
3712,
5317,
796,
8576,
11,
198,
220,
220,
220,
299,
62,
3911,
2983,
3712,
5317,
796,
513,
11,
198,
220,
220,
220,
3509,
62,
270,
364,
3712,
5317,
796,
1802,
11,
198,
220,
220,
220,
4324,
62,
381,
76,
3712,
51,
796,
657,
13,
18,
11,
198,
220,
220,
220,
26367,
62,
21037,
3712,
51,
796,
352,
68,
12,
21,
11,
198,
220,
220,
220,
26367,
62,
45828,
62,
31412,
3712,
51,
796,
2026,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
21037,
3712,
51,
796,
352,
68,
12,
940,
11,
198,
220,
220,
220,
7377,
119,
62,
45828,
3712,
51,
796,
1160,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
36733,
3712,
51,
796,
513,
13,
15,
11,
198,
220,
220,
220,
15942,
577,
62,
32109,
3712,
33,
970,
796,
3991,
8,
810,
309,
1279,
25,
6416,
628,
220,
220,
220,
1303,
8335,
8373,
2837,
13,
198,
220,
220,
220,
7377,
121,
15,
62,
36733,
11,
289,
89,
17,
381,
76,
20786,
15,
11,
39719,
17,
32179,
20786,
15,
796,
651,
259,
1287,
5162,
408,
35790,
5589,
633,
19503,
80,
7,
20034,
11,
43458,
11,
12672,
8,
628,
220,
220,
220,
275,
79,
62,
64,
796,
39719,
17,
32179,
20786,
15,
32590,
17497,
62,
381,
76,
8,
198,
220,
220,
220,
275,
79,
62,
65,
796,
39719,
17,
32179,
20786,
15,
7,
17497,
62,
381,
76,
8,
628,
220,
220,
220,
1441,
7746,
278,
1616,
7,
9501,
11,
264,
62,
83,
11,
256,
11,
275,
79,
62,
64,
11,
275,
79,
62,
65,
26,
198,
220,
220,
220,
399,
62,
138,
102,
796,
399,
62,
138,
102,
11,
198,
220,
220,
220,
399,
62,
40085,
796,
399,
62,
40085,
11,
198,
220,
220,
220,
299,
62,
3911,
2983,
796,
299,
62,
3911,
2983,
11,
198,
220,
220,
220,
3509,
62,
270,
364,
796,
3509,
62,
270,
364,
11,
198,
220,
220,
220,
26367,
62,
21037,
796,
26367,
62,
21037,
11,
198,
220,
220,
220,
26367,
62,
45828,
62,
31412,
796,
26367,
62,
45828,
62,
31412,
11,
198,
220,
220,
220,
7377,
119,
62,
21037,
796,
7377,
119,
62,
21037,
11,
198,
220,
220,
220,
7377,
119,
62,
45828,
796,
7377,
119,
62,
45828,
11,
198,
220,
220,
220,
7377,
119,
62,
36733,
796,
7377,
119,
62,
36733,
11,
198,
220,
220,
220,
15942,
577,
62,
32109,
796,
15942,
577,
62,
32109,
8,
198,
198,
437,
198,
198,
2,
7377,
119,
62,
36733,
25,
285,
257,
1988,
286,
513,
2331,
7709,
329,
262,
7377,
119,
286,
360,
5432,
739,
10053,
19805,
13,
198,
2,
645,
4049,
10627,
319,
1771,
7377,
119,
62,
36733,
18872,
230,
685,
39377,
62,
21037,
11,
7377,
119,
62,
45828,
4083,
198,
8818,
7746,
278,
1616,
7,
43458,
3712,
51,
11,
198,
220,
220,
220,
264,
62,
83,
3712,
38469,
90,
5377,
11141,
90,
51,
92,
5512,
198,
220,
220,
220,
256,
11,
198,
220,
220,
220,
334,
62,
21037,
11,
198,
220,
220,
220,
334,
62,
45828,
26,
198,
220,
220,
220,
399,
62,
138,
102,
3712,
5317,
796,
939,
405,
11,
198,
220,
220,
220,
399,
62,
40085,
3712,
5317,
796,
8576,
11,
198,
220,
220,
220,
299,
62,
3911,
2983,
3712,
5317,
796,
513,
11,
198,
220,
220,
220,
3509,
62,
270,
364,
3712,
5317,
796,
1802,
11,
198,
220,
220,
220,
26367,
62,
21037,
3712,
51,
796,
352,
68,
12,
21,
11,
198,
220,
220,
220,
26367,
62,
45828,
62,
31412,
3712,
51,
796,
1802,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
21037,
3712,
51,
796,
352,
68,
12,
940,
11,
198,
220,
220,
220,
7377,
119,
62,
45828,
3712,
51,
796,
1160,
13,
15,
11,
198,
220,
220,
220,
7377,
119,
62,
36733,
3712,
51,
796,
513,
13,
15,
11,
198,
220,
220,
220,
15942,
577,
62,
32109,
3712,
33,
970,
796,
3991,
11,
198,
220,
220,
220,
220,
742,
349,
62,
2411,
3712,
51,
796,
352,
68,
12,
1065,
11,
198,
220,
220,
220,
299,
75,
8738,
62,
28826,
3712,
5317,
796,
1679,
8,
810,
309,
1279,
25,
6416,
628,
220,
220,
220,
1303,
8335,
1366,
13,
198,
220,
220,
220,
24311,
9792,
62,
82,
62,
1416,
3021,
796,
410,
85,
3784,
7,
5589,
1133,
24544,
9792,
354,
18,
27363,
1959,
7,
82,
62,
83,
11,
410,
85,
11,
256,
20679,
9501,
8,
628,
220,
220,
220,
334,
62,
9521,
62,
40085,
796,
5164,
17257,
7,
84,
62,
21037,
11,
334,
62,
45828,
11,
399,
62,
40085,
8,
198,
220,
220,
220,
311,
62,
52,
796,
24311,
9792,
62,
82,
62,
1416,
3021,
12195,
84,
62,
9521,
62,
40085,
8,
628,
198,
220,
220,
220,
1303,
900,
510,
23989,
13,
198,
220,
220,
220,
3509,
62,
2100,
11,
3509,
62,
521,
796,
1064,
9806,
7,
8937,
12195,
50,
62,
52,
4008,
198,
220,
220,
220,
7377,
102,
796,
334,
62,
9521,
62,
40085,
58,
9806,
62,
521,
60,
1635,
17,
9,
46582,
198,
220,
220,
220,
1303,
35235,
7203,
138,
102,
796,
33172,
7377,
102,
8,
198,
220,
220,
220,
1575,
20786,
796,
9788,
3784,
18206,
15805,
35790,
5589,
633,
7,
381,
11,
198,
220,
220,
220,
311,
62,
52,
11,
334,
62,
9521,
62,
40085,
11,
7377,
102,
8,
628,
220,
220,
220,
6436,
62,
21037,
62,
32374,
796,
685,
17394,
62,
21037,
26,
532,
46582,
26,
7377,
119,
62,
21037,
60,
198,
220,
220,
220,
6436,
62,
45828,
62,
32374,
796,
685,
9806,
62,
2100,
9,
17394,
62,
45828,
62,
31412,
26,
18074,
222,
26,
7377,
119,
62,
45828,
60,
628,
220,
220,
220,
279,
15,
796,
685,
9806,
62,
2100,
26,
657,
13,
15,
26,
7377,
119,
62,
36733,
60,
628,
198,
220,
220,
220,
1303,
27183,
13,
198,
220,
220,
220,
1034,
796,
30011,
13,
29046,
7,
34820,
796,
3509,
62,
270,
364,
11,
198,
220,
220,
220,
3650,
62,
40546,
796,
3991,
11,
198,
220,
220,
220,
905,
62,
40546,
796,
15942,
577,
62,
32109,
8,
628,
198,
220,
220,
220,
2482,
796,
30011,
13,
40085,
1096,
7,
1575,
20786,
11,
198,
220,
220,
220,
279,
15,
11,
198,
220,
220,
220,
30011,
13,
7841,
1548,
10462,
1670,
7,
26,
2793,
796,
6436,
62,
21037,
62,
32374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6727,
796,
6436,
62,
45828,
62,
32374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
3911,
2983,
796,
299,
62,
3911,
2983,
828,
198,
220,
220,
220,
1034,
8,
628,
198,
220,
220,
220,
1303,
17394,
11,
27169,
11,
7377,
119,
796,
2482,
13,
1084,
320,
7509,
198,
220,
220,
220,
1303,
44872,
7203,
17394,
796,
33172,
26367,
8,
198,
220,
220,
220,
1303,
1195,
796,
685,
1065,
2481,
13,
1954,
1959,
3388,
28857,
1507,
1954,
26,
198,
220,
220,
220,
1303,
352,
13,
35378,
21626,
4304,
1433,
3829,
2075,
3134,
26,
198,
220,
220,
220,
1303,
604,
13,
2075,
2996,
2718,
1507,
1157,
1433,
38565,
60,
198,
220,
220,
220,
1303,
44872,
7203,
15805,
1195,
796,
33172,
1575,
20786,
7,
48,
4008,
198,
220,
220,
220,
1303,
44872,
7203,
15805,
279,
796,
33172,
1575,
20786,
7,
43420,
13,
1084,
320,
7509,
4008,
628,
220,
220,
220,
1303,
779,
22879,
8738,
13,
198,
220,
220,
220,
3915,
62,
20786,
796,
31383,
3784,
37,
9504,
28813,
13,
69,
9504,
62,
26069,
1945,
62,
49607,
7,
15805,
20786,
11,
31383,
8,
628,
220,
220,
220,
22879,
8738,
13,
82,
25192,
7,
21283,
8738,
62,
28826,
8,
628,
220,
220,
220,
279,
62,
36733,
796,
2482,
13,
1084,
320,
7509,
198,
220,
220,
220,
1303,
79,
62,
36733,
796,
279,
15,
628,
220,
220,
220,
2172,
796,
22879,
8738,
13,
27871,
7,
25,
16630,
62,
1546,
3398,
11,
4129,
7,
79,
62,
36733,
4008,
198,
220,
220,
220,
1303,
8738,
796,
22879,
8738,
13,
27871,
7,
25,
11163,
62,
44,
5673,
11,
4129,
7,
79,
62,
36733,
4008,
628,
220,
220,
220,
949,
62,
15805,
62,
79,
11,
949,
62,
79,
11,
1005,
62,
79,
11,
997,
1990,
874,
62,
79,
796,
1057,
32572,
8738,
0,
7,
220,
2172,
11,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
36733,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1575,
20786,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3915,
62,
20786,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6436,
62,
21037,
62,
32374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6436,
62,
45828,
62,
32374,
26,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
270,
364,
796,
1802,
9,
9806,
62,
270,
364,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
742,
349,
62,
2411,
796,
220,
742,
349,
62,
2411,
8,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
2172,
796,
22879,
8738,
13,
27871,
7,
25,
11163,
62,
44,
5673,
11,
4129,
7,
1084,
62,
79,
4008,
198,
220,
220,
220,
949,
62,
15805,
62,
79,
11,
949,
62,
79,
11,
1005,
62,
79,
11,
997,
1990,
874,
62,
79,
796,
1057,
32572,
8738,
0,
7,
220,
2172,
11,
198,
220,
220,
220,
220,
220,
220,
220,
949,
62,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1575,
20786,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3915,
62,
20786,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6436,
62,
21037,
62,
32374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6436,
62,
45828,
62,
32374,
26,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
270,
364,
796,
1802,
9,
9806,
62,
270,
364,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
742,
349,
62,
2411,
796,
220,
742,
349,
62,
2411,
8,
628,
220,
220,
220,
26367,
11,
27169,
11,
7377,
119,
796,
949,
62,
79,
628,
220,
220,
220,
1303,
1303,
198,
220,
220,
220,
1303,
44872,
7203,
79,
62,
36733,
796,
33172,
279,
62,
36733,
8,
198,
220,
220,
220,
1303,
44872,
7203,
17394,
220,
220,
220,
220,
220,
220,
220,
220,
796,
33172,
26367,
8,
628,
198,
220,
220,
220,
1441,
26367,
11,
27169,
11,
7377,
119,
11,
7377,
102,
11,
2482,
198,
437,
198,
198,
8818,
5418,
15805,
35790,
5589,
633,
7,
279,
3712,
38469,
90,
51,
5512,
198,
220,
220,
220,
311,
62,
52,
3712,
38469,
90,
5377,
11141,
90,
51,
92,
5512,
198,
220,
220,
220,
334,
62,
9521,
11,
198,
220,
220,
220,
7377,
102,
8,
810,
309,
1279,
25,
6416,
628,
220,
220,
220,
1303,
21136,
13,
198,
220,
220,
220,
26367,
11,
27169,
11,
7377,
119,
796,
279,
628,
220,
220,
220,
1575,
796,
6632,
7,
51,
8,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
84,
62,
9521,
8,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
84,
796,
5418,
41887,
43,
382,
429,
89,
666,
7,
84,
62,
9521,
58,
72,
4357,
26367,
11,
27169,
11,
7377,
119,
11,
7377,
102,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1575,
15853,
2352,
17,
7,
80,
62,
84,
532,
311,
62,
52,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
15805,
15853,
357,
8937,
7,
80,
62,
84,
13219,
8937,
7,
50,
62,
52,
58,
72,
60,
4008,
61,
17,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
1575,
198,
437,
198,
198,
8818,
651,
259,
1287,
5162,
408,
35790,
5589,
633,
19503,
80,
7,
20034,
3712,
51,
11,
43458,
3712,
51,
11,
12672,
3712,
51,
8,
810,
309,
1279,
25,
6416,
628,
220,
220,
220,
7377,
121,
15,
62,
36733,
796,
43458,
532,
17368,
628,
220,
220,
220,
289,
89,
17,
381,
76,
20786,
15,
796,
334,
84,
3784,
7,
12303,
532,
7377,
121,
15,
62,
36733,
27493,
17887,
14,
9501,
198,
220,
220,
220,
39719,
17,
32179,
20786,
15,
796,
9788,
3784,
7,
26180,
15,
62,
36733,
1343,
9788,
9,
9501,
14,
17887,
8,
628,
220,
220,
220,
1441,
7377,
121,
15,
62,
36733,
11,
289,
89,
17,
381,
76,
20786,
15,
11,
39719,
17,
32179,
20786,
15,
198,
437,
198
] | 2.234994 | 5,481 |
# Contains all the data relative to quadrature in the sphere
struct SphereQuadraturervec
r1Vec::Array{Float64}
r2Vec::Array{Float64}
r3Vec::Array{Float64}
wVec::Array{Float64}
end
| [
2,
1849,
4264,
1299,
477,
262,
1366,
3585,
284,
15094,
81,
1300,
287,
262,
16558,
198,
7249,
31798,
4507,
41909,
1300,
81,
35138,
198,
220,
220,
220,
374,
16,
53,
721,
3712,
19182,
90,
43879,
2414,
92,
198,
220,
220,
220,
374,
17,
53,
721,
3712,
19182,
90,
43879,
2414,
92,
198,
220,
220,
220,
374,
18,
53,
721,
3712,
19182,
90,
43879,
2414,
92,
198,
220,
220,
220,
266,
53,
721,
3712,
19182,
90,
43879,
2414,
92,
198,
437,
198
] | 2.419753 | 81 |
#=
run_tests
Copyright © 2019 Mark Wells <mwellsa@gmail.com>
Distributed under terms of the MIT license.
=#
using InterpolatedRejectionSampling
using Test
import Random.seed!
seed!(1234)
@testset "irsample" begin
X = range(0,π,length=5)
Y = range(0,π/4,length=4)
knots = (X,Y)
prob = [sin(x)+tan(y) for x in X, y in Y]
n = 100
xy = irsample(knots, prob, n)
@test isa(xy, Matrix{Float64})
@test size(xy) == (2,n)
xy = Matrix{Union{Float64,Missing}}(missing,2,n)
irsample!(xy, knots, prob)
@test isa(xy, Matrix{Union{Missing,Float64}})
@test size(xy) == (2,n)
@test iszero(count(ismissing.(xy)))
x = irsample(X, sin.(X), n)
@test isa(x, Vector{Float64})
@test length(x) == n
end
| [
2,
28,
198,
220,
220,
220,
1057,
62,
41989,
198,
220,
220,
220,
15069,
10673,
13130,
2940,
18292,
1279,
76,
4053,
11400,
31,
14816,
13,
785,
29,
628,
220,
220,
220,
4307,
6169,
739,
2846,
286,
262,
17168,
5964,
13,
198,
46249,
198,
198,
3500,
4225,
16104,
515,
3041,
29192,
16305,
11347,
198,
3500,
6208,
198,
198,
11748,
14534,
13,
28826,
0,
198,
28826,
0,
7,
1065,
2682,
8,
198,
198,
31,
9288,
2617,
366,
17062,
1403,
1,
2221,
628,
220,
220,
220,
1395,
796,
2837,
7,
15,
11,
46582,
11,
13664,
28,
20,
8,
198,
220,
220,
220,
575,
796,
2837,
7,
15,
11,
46582,
14,
19,
11,
13664,
28,
19,
8,
198,
220,
220,
220,
33620,
796,
357,
55,
11,
56,
8,
198,
220,
220,
220,
1861,
796,
685,
31369,
7,
87,
47762,
38006,
7,
88,
8,
329,
2124,
287,
1395,
11,
331,
287,
575,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
299,
796,
1802,
198,
220,
220,
220,
2124,
88,
796,
4173,
39873,
7,
74,
1662,
82,
11,
1861,
11,
299,
8,
198,
220,
220,
220,
2488,
9288,
318,
64,
7,
5431,
11,
24936,
90,
43879,
2414,
30072,
198,
220,
220,
220,
2488,
9288,
2546,
7,
5431,
8,
6624,
357,
17,
11,
77,
8,
628,
220,
220,
220,
2124,
88,
796,
24936,
90,
38176,
90,
43879,
2414,
11,
43730,
11709,
7,
45688,
11,
17,
11,
77,
8,
198,
220,
220,
220,
4173,
39873,
0,
7,
5431,
11,
33620,
11,
1861,
8,
198,
220,
220,
220,
2488,
9288,
318,
64,
7,
5431,
11,
24936,
90,
38176,
90,
43730,
11,
43879,
2414,
11709,
8,
198,
220,
220,
220,
2488,
9288,
2546,
7,
5431,
8,
6624,
357,
17,
11,
77,
8,
198,
220,
220,
220,
2488,
9288,
318,
22570,
7,
9127,
7,
1042,
747,
278,
12195,
5431,
22305,
628,
220,
220,
220,
2124,
796,
4173,
39873,
7,
55,
11,
7813,
12195,
55,
828,
299,
8,
198,
220,
220,
220,
2488,
9288,
318,
64,
7,
87,
11,
20650,
90,
43879,
2414,
30072,
198,
220,
220,
220,
2488,
9288,
4129,
7,
87,
8,
6624,
299,
198,
437,
220,
198
] | 2.188571 | 350 |
# Julia wrapper for header: IviDmm.h
# Automatically generated using Clang.jl
function IviDmm_init(logicalName, idQuery, resetDevice, vi)
ccall((:IviDmm_init, libnidmm), ViStatus, (ViRsrc, ViBoolean, ViBoolean, Ptr{ViSession}), logicalName, idQuery, resetDevice, vi)
end
function IviDmm_close(vi)
ccall((:IviDmm_close, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_reset(vi)
ccall((:IviDmm_reset, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_self_test(vi, selfTestResult, selfTestMessage)
ccall((:IviDmm_self_test, libnidmm), ViStatus, (ViSession, Ptr{ViInt16}, Ptr{ViChar}), vi, selfTestResult, selfTestMessage)
end
function IviDmm_error_query(vi, errorCode, errorMessage)
ccall((:IviDmm_error_query, libnidmm), ViStatus, (ViSession, Ptr{ViInt32}, Ptr{ViChar}), vi, errorCode, errorMessage)
end
function IviDmm_error_message(vi, statusCode, message)
ccall((:IviDmm_error_message, libnidmm), ViStatus, (ViSession, ViStatus, Ptr{ViChar}), vi, statusCode, message)
end
function IviDmm_revision_query(vi, driverRev, instrRev)
ccall((:IviDmm_revision_query, libnidmm), ViStatus, (ViSession, Ptr{ViChar}, Ptr{ViChar}), vi, driverRev, instrRev)
end
function IviDmm_InvalidateAllAttributes(vi)
ccall((:IviDmm_InvalidateAllAttributes, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_ResetWithDefaults(vi)
ccall((:IviDmm_ResetWithDefaults, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_Disable(vi)
ccall((:IviDmm_Disable, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_InitWithOptions(logicalName, IDQuery, resetDevice, optionString, vi)
ccall((:IviDmm_InitWithOptions, libnidmm), ViStatus, (ViRsrc, ViBoolean, ViBoolean, ViConstString, Ptr{ViSession}), logicalName, IDQuery, resetDevice, optionString, vi)
end
function IviDmm_GetAttributeViInt32(vi, channelName, attributeId, value)
ccall((:IviDmm_GetAttributeViInt32, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, Ptr{ViInt32}), vi, channelName, attributeId, value)
end
function IviDmm_SetAttributeViInt32(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViInt32, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViInt32), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViInt32(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViInt32, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViInt32), vi, channelName, attributeId, value)
end
function IviDmm_GetAttributeViInt64(vi, channelName, attributeId, value)
ccall((:IviDmm_GetAttributeViInt64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, Ptr{ViInt64}), vi, channelName, attributeId, value)
end
function IviDmm_SetAttributeViInt64(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViInt64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViInt64), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViInt64(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViInt64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViInt64), vi, channelName, attributeId, value)
end
function IviDmm_GetAttributeViReal64(vi, channelName, attributeId, value)
ccall((:IviDmm_GetAttributeViReal64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, Ptr{ViReal64}), vi, channelName, attributeId, value)
end
function IviDmm_SetAttributeViReal64(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViReal64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViReal64), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViReal64(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViReal64, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViReal64), vi, channelName, attributeId, value)
end
function IviDmm_GetAttributeViString(vi, channelName, attributeId, bufferSize, value)
ccall((:IviDmm_GetAttributeViString, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViInt32, Ptr{ViChar}), vi, channelName, attributeId, bufferSize, value)
end
function IviDmm_SetAttributeViString(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViString, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViConstString), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViString(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViString, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViConstString), vi, channelName, attributeId, value)
end
function IviDmm_GetAttributeViBoolean(vi, channelName, attributeId, value)
ccall((:IviDmm_GetAttributeViBoolean, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, Ptr{ViBoolean}), vi, channelName, attributeId, value)
end
function IviDmm_SetAttributeViBoolean(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViBoolean, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViBoolean), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViBoolean(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViBoolean, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViBoolean), vi, channelName, attributeId, value)
end
function IviDmm_GetAttributeViSession(vi, channelName, attributeId, value)
ccall((:IviDmm_GetAttributeViSession, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, Ptr{ViSession}), vi, channelName, attributeId, value)
end
function IviDmm_SetAttributeViSession(vi, channelName, attributeId, value)
ccall((:IviDmm_SetAttributeViSession, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViSession), vi, channelName, attributeId, value)
end
function IviDmm_CheckAttributeViSession(vi, channelName, attributeId, value)
ccall((:IviDmm_CheckAttributeViSession, libnidmm), ViStatus, (ViSession, ViConstString, ViAttr, ViSession), vi, channelName, attributeId, value)
end
function IviDmm_LockSession(vi, callerHasLock)
ccall((:IviDmm_LockSession, libnidmm), ViStatus, (ViSession, Ptr{ViBoolean}), vi, callerHasLock)
end
function IviDmm_UnlockSession(vi, callerHasLock)
ccall((:IviDmm_UnlockSession, libnidmm), ViStatus, (ViSession, Ptr{ViBoolean}), vi, callerHasLock)
end
function IviDmm_GetError(vi, errorCode, bufferSize, description)
ccall((:IviDmm_GetError, libnidmm), ViStatus, (ViSession, Ptr{ViStatus}, ViInt32, Ptr{ViChar}), vi, errorCode, bufferSize, description)
end
function IviDmm_ClearError(vi)
ccall((:IviDmm_ClearError, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_GetNextInterchangeWarning(vi, bufferSize, warning)
ccall((:IviDmm_GetNextInterchangeWarning, libnidmm), ViStatus, (ViSession, ViInt32, Ptr{ViChar}), vi, bufferSize, warning)
end
function IviDmm_ClearInterchangeWarnings(vi)
ccall((:IviDmm_ClearInterchangeWarnings, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_ResetInterchangeCheck(vi)
ccall((:IviDmm_ResetInterchangeCheck, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_GetNextCoercionRecord(vi, bufferSize, record)
ccall((:IviDmm_GetNextCoercionRecord, libnidmm), ViStatus, (ViSession, ViInt32, Ptr{ViChar}), vi, bufferSize, record)
end
function IviDmm_GetSpecificDriverCHandle(vi, specificDriverCHandle)
ccall((:IviDmm_GetSpecificDriverCHandle, libnidmm), ViStatus, (ViSession, Ptr{ViSession}), vi, specificDriverCHandle)
end
function IviDmm_GetSpecificDriverIUnknownPtr(vi, specificDriverIUnknownPtr)
ccall((:IviDmm_GetSpecificDriverIUnknownPtr, libnidmm), ViStatus, (ViSession, Ptr{Cvoid}), vi, specificDriverIUnknownPtr)
end
function IviDmm_ConfigureMeasurement(vi, _function, range, resolution)
ccall((:IviDmm_ConfigureMeasurement, libnidmm), ViStatus, (ViSession, ViInt32, ViReal64, ViReal64), vi, _function, range, resolution)
end
function IviDmm_ConfigureTrigger(vi, triggerSource, triggerDelay)
ccall((:IviDmm_ConfigureTrigger, libnidmm), ViStatus, (ViSession, ViInt32, ViReal64), vi, triggerSource, triggerDelay)
end
function IviDmm_Read(vi, maxTime, reading)
ccall((:IviDmm_Read, libnidmm), ViStatus, (ViSession, ViInt32, Ptr{ViReal64}), vi, maxTime, reading)
end
function IviDmm_Fetch(vi, maxTime, reading)
ccall((:IviDmm_Fetch, libnidmm), ViStatus, (ViSession, ViInt32, Ptr{ViReal64}), vi, maxTime, reading)
end
function IviDmm_Abort(vi)
ccall((:IviDmm_Abort, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_Initiate(vi)
ccall((:IviDmm_Initiate, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_IsOverRange(vi, measurementValue, isOverRange)
ccall((:IviDmm_IsOverRange, libnidmm), ViStatus, (ViSession, ViReal64, Ptr{ViBoolean}), vi, measurementValue, isOverRange)
end
function IviDmm_ConfigureACBandwidth(vi, minFreq, maxFreq)
ccall((:IviDmm_ConfigureACBandwidth, libnidmm), ViStatus, (ViSession, ViReal64, ViReal64), vi, minFreq, maxFreq)
end
function IviDmm_ConfigureFrequencyVoltageRange(vi, frequencyVoltageRange)
ccall((:IviDmm_ConfigureFrequencyVoltageRange, libnidmm), ViStatus, (ViSession, ViReal64), vi, frequencyVoltageRange)
end
function IviDmm_ConfigureTransducerType(vi, transducerType)
ccall((:IviDmm_ConfigureTransducerType, libnidmm), ViStatus, (ViSession, ViInt32), vi, transducerType)
end
function IviDmm_ConfigureFixedRefJunction(vi, fixedRefJunction)
ccall((:IviDmm_ConfigureFixedRefJunction, libnidmm), ViStatus, (ViSession, ViReal64), vi, fixedRefJunction)
end
function IviDmm_ConfigureThermocouple(vi, thermocoupleType, refJunctionType)
ccall((:IviDmm_ConfigureThermocouple, libnidmm), ViStatus, (ViSession, ViInt32, ViInt32), vi, thermocoupleType, refJunctionType)
end
function IviDmm_ConfigureRTD(vi, alpha, resistance)
ccall((:IviDmm_ConfigureRTD, libnidmm), ViStatus, (ViSession, ViReal64, ViReal64), vi, alpha, resistance)
end
function IviDmm_ConfigureThermistor(vi, resistance)
ccall((:IviDmm_ConfigureThermistor, libnidmm), ViStatus, (ViSession, ViReal64), vi, resistance)
end
function IviDmm_ConfigureMeasCompleteDest(vi, measCompleteDest)
ccall((:IviDmm_ConfigureMeasCompleteDest, libnidmm), ViStatus, (ViSession, ViInt32), vi, measCompleteDest)
end
function IviDmm_ConfigureMultiPoint(vi, triggerCount, sampleCount, sampleTrigger, sampleInterval)
ccall((:IviDmm_ConfigureMultiPoint, libnidmm), ViStatus, (ViSession, ViInt32, ViInt32, ViInt32, ViReal64), vi, triggerCount, sampleCount, sampleTrigger, sampleInterval)
end
function IviDmm_ReadMultiPoint(vi, maxTime, arraySize, readingArray, actualPts)
ccall((:IviDmm_ReadMultiPoint, libnidmm), ViStatus, (ViSession, ViInt32, ViInt32, Ptr{ViReal64}, Ptr{ViInt32}), vi, maxTime, arraySize, readingArray, actualPts)
end
function IviDmm_FetchMultiPoint(vi, maxTime, arraySize, readingArray, actualPts)
ccall((:IviDmm_FetchMultiPoint, libnidmm), ViStatus, (ViSession, ViInt32, ViInt32, Ptr{ViReal64}, Ptr{ViInt32}), vi, maxTime, arraySize, readingArray, actualPts)
end
function IviDmm_ConfigureTriggerSlope(vi, polarity)
ccall((:IviDmm_ConfigureTriggerSlope, libnidmm), ViStatus, (ViSession, ViInt32), vi, polarity)
end
function IviDmm_SendSoftwareTrigger(vi)
ccall((:IviDmm_SendSoftwareTrigger, libnidmm), ViStatus, (ViSession,), vi)
end
function IviDmm_GetApertureTimeInfo(vi, apertureTime, apertureTimeUnits)
ccall((:IviDmm_GetApertureTimeInfo, libnidmm), ViStatus, (ViSession, Ptr{ViReal64}, Ptr{ViInt32}), vi, apertureTime, apertureTimeUnits)
end
function IviDmm_GetAutoRangeValue(vi, autoRangeValue)
ccall((:IviDmm_GetAutoRangeValue, libnidmm), ViStatus, (ViSession, Ptr{ViReal64}), vi, autoRangeValue)
end
function IviDmm_ConfigureAutoZeroMode(vi, autoZeroMode)
ccall((:IviDmm_ConfigureAutoZeroMode, libnidmm), ViStatus, (ViSession, ViInt32), vi, autoZeroMode)
end
function IviDmm_ConfigurePowerLineFrequency(vi, powerLineFreq)
ccall((:IviDmm_ConfigurePowerLineFrequency, libnidmm), ViStatus, (ViSession, ViReal64), vi, powerLineFreq)
end | [
2,
22300,
29908,
329,
13639,
25,
314,
8903,
35,
3020,
13,
71,
198,
2,
17406,
4142,
7560,
1262,
1012,
648,
13,
20362,
628,
198,
8818,
314,
8903,
35,
3020,
62,
15003,
7,
6404,
605,
5376,
11,
4686,
20746,
11,
13259,
24728,
11,
25357,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
15003,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
49,
10677,
11,
16049,
46120,
13087,
11,
16049,
46120,
13087,
11,
350,
2213,
90,
38432,
36044,
92,
828,
12219,
5376,
11,
4686,
20746,
11,
13259,
24728,
11,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
19836,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
19836,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
42503,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
42503,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
944,
62,
9288,
7,
8903,
11,
2116,
14402,
23004,
11,
2116,
14402,
12837,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
944,
62,
9288,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
5317,
1433,
5512,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
2116,
14402,
23004,
11,
2116,
14402,
12837,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
18224,
62,
22766,
7,
8903,
11,
4049,
10669,
11,
4049,
12837,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
18224,
62,
22766,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
5317,
2624,
5512,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
4049,
10669,
11,
4049,
12837,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
18224,
62,
20500,
7,
8903,
11,
3722,
10669,
11,
3275,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
18224,
62,
20500,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
19580,
11,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
3722,
10669,
11,
3275,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
260,
10178,
62,
22766,
7,
8903,
11,
4639,
18009,
11,
6480,
18009,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
260,
10178,
62,
22766,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
12441,
5512,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
4639,
18009,
11,
6480,
18009,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
44651,
378,
3237,
29021,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
44651,
378,
3237,
29021,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
4965,
316,
3152,
7469,
13185,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
4965,
316,
3152,
7469,
13185,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
48893,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
48893,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
31768,
3152,
29046,
7,
6404,
605,
5376,
11,
4522,
20746,
11,
13259,
24728,
11,
3038,
10100,
11,
25357,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
31768,
3152,
29046,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
49,
10677,
11,
16049,
46120,
13087,
11,
16049,
46120,
13087,
11,
16049,
34184,
10100,
11,
350,
2213,
90,
38432,
36044,
92,
828,
12219,
5376,
11,
4522,
20746,
11,
13259,
24728,
11,
3038,
10100,
11,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
5317,
2624,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
5317,
2624,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
350,
2213,
90,
38432,
5317,
2624,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
5317,
2624,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
5317,
2624,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
5317,
2624,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
5317,
2624,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
5317,
2624,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
5317,
2624,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
5317,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
5317,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
350,
2213,
90,
38432,
5317,
2414,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
5317,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
5317,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
5317,
2414,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
5317,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
5317,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
5317,
2414,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
15633,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
15633,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
350,
2213,
90,
38432,
15633,
2414,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
15633,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
15633,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
15633,
2414,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
15633,
2414,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
15633,
2414,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
15633,
2414,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
10100,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
11876,
10699,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
10100,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
11876,
10699,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
10100,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
10100,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
34184,
10100,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
10100,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
10100,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
34184,
10100,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
46120,
13087,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
46120,
13087,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
350,
2213,
90,
38432,
46120,
13087,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
46120,
13087,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
46120,
13087,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
46120,
13087,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
46120,
13087,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
46120,
13087,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
46120,
13087,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
33682,
38432,
36044,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
33682,
38432,
36044,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
350,
2213,
90,
38432,
36044,
92,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
7248,
33682,
38432,
36044,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
7248,
33682,
38432,
36044,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
36044,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
9787,
33682,
38432,
36044,
7,
8903,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
9787,
33682,
38432,
36044,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
34184,
10100,
11,
16049,
8086,
81,
11,
16049,
36044,
828,
25357,
11,
6518,
5376,
11,
11688,
7390,
11,
1988,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
25392,
36044,
7,
8903,
11,
24955,
19242,
25392,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
25392,
36044,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
46120,
13087,
92,
828,
25357,
11,
24955,
19242,
25392,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3118,
5354,
36044,
7,
8903,
11,
24955,
19242,
25392,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3118,
5354,
36044,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
46120,
13087,
92,
828,
25357,
11,
24955,
19242,
25392,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
12331,
7,
8903,
11,
4049,
10669,
11,
11876,
10699,
11,
6764,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
12331,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
19580,
5512,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
4049,
10669,
11,
11876,
10699,
11,
6764,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
19856,
12331,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
19856,
12331,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
10019,
9492,
3803,
20361,
7,
8903,
11,
11876,
10699,
11,
6509,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
10019,
9492,
3803,
20361,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
11876,
10699,
11,
6509,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
19856,
9492,
3803,
54,
1501,
654,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
19856,
9492,
3803,
54,
1501,
654,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
4965,
316,
9492,
3803,
9787,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
4965,
316,
9492,
3803,
9787,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
10019,
7222,
2798,
295,
23739,
7,
8903,
11,
11876,
10699,
11,
1700,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
10019,
7222,
2798,
295,
23739,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
12441,
92,
828,
25357,
11,
11876,
10699,
11,
1700,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
32419,
32103,
3398,
392,
293,
7,
8903,
11,
2176,
32103,
3398,
392,
293,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
32419,
32103,
3398,
392,
293,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
36044,
92,
828,
25357,
11,
2176,
32103,
3398,
392,
293,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
32419,
32103,
40,
20035,
46745,
7,
8903,
11,
2176,
32103,
40,
20035,
46745,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
32419,
32103,
40,
20035,
46745,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
34,
19382,
92,
828,
25357,
11,
2176,
32103,
40,
20035,
46745,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
47384,
434,
7,
8903,
11,
4808,
8818,
11,
2837,
11,
6323,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
47384,
434,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
15633,
2414,
11,
16049,
15633,
2414,
828,
25357,
11,
4808,
8818,
11,
2837,
11,
6323,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
48344,
7,
8903,
11,
7616,
7416,
11,
7616,
13856,
323,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
48344,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
15633,
2414,
828,
25357,
11,
7616,
7416,
11,
7616,
13856,
323,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
5569,
7,
8903,
11,
3509,
7575,
11,
3555,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
5569,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
15633,
2414,
92,
828,
25357,
11,
3509,
7575,
11,
3555,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
37,
7569,
7,
8903,
11,
3509,
7575,
11,
3555,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
37,
7569,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
15633,
2414,
92,
828,
25357,
11,
3509,
7575,
11,
3555,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
4826,
419,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
4826,
419,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
818,
8846,
378,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
818,
8846,
378,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3792,
5886,
17257,
7,
8903,
11,
15558,
11395,
11,
318,
5886,
17257,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3792,
5886,
17257,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
11,
350,
2213,
90,
38432,
46120,
13087,
92,
828,
25357,
11,
15558,
11395,
11,
318,
5886,
17257,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
2246,
31407,
10394,
7,
8903,
11,
949,
20366,
80,
11,
3509,
20366,
80,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
2246,
31407,
10394,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
11,
16049,
15633,
2414,
828,
25357,
11,
949,
20366,
80,
11,
3509,
20366,
80,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
37,
28707,
53,
5978,
496,
17257,
7,
8903,
11,
8373,
53,
5978,
496,
17257,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
37,
28707,
53,
5978,
496,
17257,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
828,
25357,
11,
8373,
53,
5978,
496,
17257,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
8291,
646,
2189,
6030,
7,
8903,
11,
1007,
646,
2189,
6030,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
8291,
646,
2189,
6030,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
828,
25357,
11,
1007,
646,
2189,
6030,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
13715,
8134,
41,
4575,
7,
8903,
11,
5969,
8134,
41,
4575,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
13715,
8134,
41,
4575,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
828,
25357,
11,
5969,
8134,
41,
4575,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
35048,
76,
420,
43846,
7,
8903,
11,
21969,
420,
43846,
6030,
11,
1006,
41,
4575,
6030,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
35048,
76,
420,
43846,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
5317,
2624,
828,
25357,
11,
21969,
420,
43846,
6030,
11,
1006,
41,
4575,
6030,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
14181,
35,
7,
8903,
11,
17130,
11,
6625,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
14181,
35,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
11,
16049,
15633,
2414,
828,
25357,
11,
17130,
11,
6625,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
35048,
76,
32380,
7,
8903,
11,
6625,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
35048,
76,
32380,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
828,
25357,
11,
6625,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
5308,
292,
20988,
24159,
7,
8903,
11,
2212,
20988,
24159,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
5308,
292,
20988,
24159,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
828,
25357,
11,
2212,
20988,
24159,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
29800,
12727,
7,
8903,
11,
7616,
12332,
11,
6291,
12332,
11,
6291,
48344,
11,
6291,
9492,
2100,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
29800,
12727,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
5317,
2624,
11,
16049,
5317,
2624,
11,
16049,
15633,
2414,
828,
25357,
11,
7616,
12332,
11,
6291,
12332,
11,
6291,
48344,
11,
6291,
9492,
2100,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
5569,
29800,
12727,
7,
8903,
11,
3509,
7575,
11,
7177,
10699,
11,
3555,
19182,
11,
4036,
47,
912,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
5569,
29800,
12727,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
15633,
2414,
5512,
350,
2213,
90,
38432,
5317,
2624,
92,
828,
25357,
11,
3509,
7575,
11,
7177,
10699,
11,
3555,
19182,
11,
4036,
47,
912,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
37,
7569,
29800,
12727,
7,
8903,
11,
3509,
7575,
11,
7177,
10699,
11,
3555,
19182,
11,
4036,
47,
912,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
37,
7569,
29800,
12727,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
11,
16049,
5317,
2624,
11,
350,
2213,
90,
38432,
15633,
2414,
5512,
350,
2213,
90,
38432,
5317,
2624,
92,
828,
25357,
11,
3509,
7575,
11,
7177,
10699,
11,
3555,
19182,
11,
4036,
47,
912,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
48344,
11122,
3008,
7,
8903,
11,
755,
6806,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
48344,
11122,
3008,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
828,
25357,
11,
755,
6806,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
25206,
25423,
48344,
7,
8903,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
25206,
25423,
48344,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
828,
25357,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
32,
27286,
7575,
12360,
7,
8903,
11,
32729,
7575,
11,
32729,
7575,
3118,
896,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
32,
27286,
7575,
12360,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
15633,
2414,
5512,
350,
2213,
90,
38432,
5317,
2624,
92,
828,
25357,
11,
32729,
7575,
11,
32729,
7575,
3118,
896,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
3855,
27722,
17257,
11395,
7,
8903,
11,
8295,
17257,
11395,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
3855,
27722,
17257,
11395,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
350,
2213,
90,
38432,
15633,
2414,
92,
828,
25357,
11,
8295,
17257,
11395,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
27722,
28667,
19076,
7,
8903,
11,
8295,
28667,
19076,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
27722,
28667,
19076,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
5317,
2624,
828,
25357,
11,
8295,
28667,
19076,
8,
198,
437,
198,
198,
8818,
314,
8903,
35,
3020,
62,
16934,
495,
13434,
13949,
37,
28707,
7,
8903,
11,
1176,
13949,
20366,
80,
8,
198,
220,
220,
220,
269,
13345,
19510,
25,
40,
8903,
35,
3020,
62,
16934,
495,
13434,
13949,
37,
28707,
11,
9195,
77,
312,
3020,
828,
16049,
19580,
11,
357,
38432,
36044,
11,
16049,
15633,
2414,
828,
25357,
11,
1176,
13949,
20366,
80,
8,
198,
437
] | 2.680322 | 4,467 |
module ConfigEnv
import Base: getindex, get, isempty, merge, merge!, haskey
export dotenv, dotenvx, isresolved, unresolved_keys
struct EnvProxyDict{T}
dict::Dict{String, String}
env::T
undefined::Vector{String}
circular::Vector{String}
end
EnvProxyDict(dict) = EnvProxyDict(dict, ENV, String[], String[])
EnvProxyDict(dict, env) = EnvProxyDict(dict, env, String[], String[])
getindex(ed::EnvProxyDict, key) = get(ed.dict, key, ed.env[key])
get(ed::EnvProxyDict, key, default) = get(ed.dict, key, get(ed.env, key, default))
isempty(ed::EnvProxyDict) = isempty(ed.dict)
Base.:*(epd1::EnvProxyDict, epd2::EnvProxyDict...) = merge(epd1, epd2...; overwrite = false)
function imprint(epd::EnvProxyDict, env)
for (k, v) in epd.dict
env[k] = v
end
end
function merge(epd1::EnvProxyDict, epd2::EnvProxyDict...; overwrite = true)
epd = EnvProxyDict(foldl((x, y) -> merge(x, y.dict), epd2; init = epd1.dict), epd1.env)
resolve!(epd, epd.env)
overwrite && imprint(epd, epd.env)
epd
end
haskey(ed::EnvProxyDict, key) = haskey(ed.dict, key) || haskey(ed.env, key)
function merge!(epd1::EnvProxyDict, epd2::EnvProxyDict...; overwrite = true)
foldl((x, y) -> merge!(x, y.dict), epd2; init = epd1.dict)
# You shouldn't use different envs during `merge!`. This is undefined behaviour.
# first dictionary environment can't be changed, cause it can be `ENV`
resolve!(epd1, epd1.env)
overwrite && imprint(epd1, epd1.env)
return epd1
end
function isdefin(s, i = 0, lev = 0)
i = nextind(s, i)
len = ncodeunits(s)
mode = 0
cnt_brackets = 0
while i <= len
c = s[i]
if c == '$'
mode = 1
elseif c == '{'
if mode == 1
return isdefin(s, i, 1)
else
cnt_brackets += 1
mode = 0
end
elseif c == '}'
mode = 0
cnt_brackets -= 1
lev == 1 && cnt_brackets < 0 && return false
else
mode = 0
end
i = nextind(s, i)
end
return true
end
mutable struct KVNode
key::String
value::String
children::Vector{KVNode}
parents_cnt::Int
isfinal::Bool
isresolved::Bool
end
KVNode(k, v) = KVNode(k, v, KVNode[], 0, true, false)
KVNode(v) = KVNode("", v, KVNode[], 0, false, false)
isresolved(kvnode::KVNode) = kvnode.isresolved
"""
isresolved(cfg::EnvProxyDict)
Returns whether templating procedure was successful or not. Templating can be unsuccessful if there are circular dependencies or templated variables do not exist in the environment.
"""
isresolved(epd::EnvProxyDict) = isempty(epd.undefined) && isempty(epd.circular)
"""
unresolved_keys(cfg::EnvProxyDict)
Returns tuple of `circular` and `undefined` keys, where `circular` are keys which depends on each other and `undefined` are keys, which use variables that do not exist in the environment.
"""
function unresolved_keys(edp::EnvProxyDict)
undefined = map(k -> k => edp.dict[k], edp.undefined)
circular = map(k -> k => edp.dict[k], edp.circular)
return (; circular = circular, undefined = undefined)
end
function destructure!(v::KVNode, stack, knodes, i = 0, env = ENV)
val = v.value
len = ncodeunits(val)
i0 = nextind(val, i)
i = i0
bracket_count = 0
mode = 0 # everything is normal
isvalid = v.isfinal ? true : false
while i <= len
c = val[i]
if c == '$'
mode = 1 # waiting for the opening {
elseif c == '{'
if mode == 1
node = KVNode(val)
push!(node.children, v)
i, valid = destructure!(node, stack, knodes, i, env) # should return index of the closing bracket }
if valid
v.parents_cnt += 1
isvalid = true
end
else
bracket_count += 1
end
mode = 0 # calm down
elseif c == '}' # we should produce some reasonable result if this is our closing bracket
bracket_count -= 1
mode = 0
if !v.isfinal
bracket_count >= 0 && continue # false alarm
if v.parents_cnt == 0 # we are key node
v.key = v.value[i0:i-1]
if haskey(knodes, v.key)
append!(knodes[v.key].children, v.children)
empty!(v.children)
elseif haskey(env, v.key)
v.value = env[v.key]
push!(stack, v)
else
# Unknown key
v.value = v.value[i0-2:i]
push!(stack, v)
end
else # we are intermidiate node
v.value = v.value[i0:i-1]
end
return i, true
end
else
mode = 0
end
if i <= len
i = nextind(val, i)
end
end
return i, isvalid
end
function resolve!(edp::EnvProxyDict, env = ENV)
knodes = Dict{String, KVNode}()
for (k, v) in edp.dict
knodes[k] = KVNode(k, v)
end
stack = KVNode[]
prepare_stack!(stack, knodes, env)
resolve!(stack, knodes, env)
empty!(edp.undefined)
empty!(edp.circular)
for (k, v) in knodes
edp.dict[k] = v.value
if !v.isresolved
push!(edp.circular, k)
elseif !isdefin(v.value)
push!(edp.undefined, k)
end
end
edp
end
function prepare_stack!(stack, knodes, env)
for v in values(knodes)
# we extract interpolated terms from the value and last tier should be put on
# the stack for further imprinting
destructure!(v, stack, knodes, 0, env)
end
for v in values(knodes)
# if we do not have anything to interpolate inside the value, we are good.
# If we still have some other value where node should be used for interpolation,
# we put node on the interpolation stack
if v.parents_cnt == 0
v.isresolved = true
if !isempty(v.children)
push!(stack, v)
end
end
end
end
function recursive_replace!(node, key, val)
occursin(key, node.value) || return
node.value = replace(node.value, key => val)
foreach(x -> recursive_replace!(x, key, val), node.children)
nothing
end
function resolve!(stack, knodes, env)
while !isempty(stack)
v = pop!(stack)
key = "\${" * v.key * "}"
while !isempty(v.children)
kid = pop!(v.children)
recursive_replace!(kid, key, v.value)
kid.parents_cnt -= 1
kid.parents_cnt == 0 || continue
if kid.isfinal
kid.isresolved = true
else
kid.key = kid.value
if haskey(knodes, kid.key)
append!(knodes[kid.key].children, kid.children)
empty!(kid.children)
if !isempty(knodes[kid.key].children) && knodes[kid.key].parents_cnt == 0
push!(stack, knodes[kid.key])
end
elseif haskey(env, kid.key)
kid.value = env[kid.key]
else
kid.value = "\${" * kid.key * "}"
end
end
if !isempty(kid.children)
push!(stack, kid)
end
end
end
end
"""
`ConfigEnv.parse` accepts a String or an IOBuffer (any value that
can be converted into String), and returns a Dict with
the parsed keys and values.
"""
function parse(src)
res = Dict{String,String}()
src = IOBuffer(src)
for line in eachline(src)
m = match(r"^\s*([\w.-]+)\s*=\s*(.*)?\s*$", line)
if m !== nothing
key = m.captures[1]
value = string(m.captures[2])
if (length(value) > 0 && value[1] === '"' && value[end] === '"')
value = replace(value, r"\\n"m => "\n")
end
value = replace(value, r"(^['\u0022]|['\u0022]$)" => "")
value = strip(value)
push!(res, key => value)
end
end
res
end
parse(src::IO) = parse(String(take!(src)))
########################################
# Main part
########################################
validatefile(s) = false
validatefile(s::AbstractString) = isfile(s)
"""
dotenv(path1, path2, ...; overwrite = true)
`dotenv` reads .env files from your `path`, parse their content, merge them together, stores result to `ENV`,
and finally return a `EnvProxyDict` with the content. If no `path` argument is given , then
`.env` is used as a default path. During merge procedure, if duplicate keys encountered
then value from the rightmost dictionary is used.
By default if key already exists in `ENV` it is overwritten with the values in .env file.
This behaviour can be changed by setting `overwrite` flag to `false` or using dual `dotenvx` function.
Examples
========
```
# .env
FOO = bar
USER = john_doe
# julia REPL
# load key-value pairs from ".env", `ENV` duplicate keys are overwritten
julia> ENV["USER"]
user1
julia> cfg = dotenv()
julia> ENV["FOO"]
bar
julia> ENV["USER"]
john_doe
julia> cfg["USER"]
john_doe
```
"""
function dotenv(path = ".env"; overwrite = true, env = ENV)
parsed = if (validatefile(path))
parse(read(path, String))
else
parse(path)
end
epd = EnvProxyDict(parsed, env)
resolve!(epd, env)
for (k, v) in epd.dict
if !haskey(env, k) || overwrite
env[k] = v
end
end
return epd
end
dotenv(paths...; overwrite = true, env = ENV) = merge!(dotenv.(paths; overwrite = overwrite, env = env)..., overwrite = overwrite)
"""
dotenvx(path1, path2, ...; overwrite = false)
`dotenvx` reads .env files from your `path`, parse their content, merge them together, stores result to `ENV`,
and finally return a `EnvProxyDict` with the content. If no `path` argument is given , then
`.env` is used as a default path. During merge procedure, if duplicate keys encountered
then value from the rightmost dictionary is used.
By default if key already exists in `ENV` it is overwritten with the values in .env file.
This behaviour can be changed by setting `overwrite` flag to `true` or using dual `dotenv` function.
Examples
========
```
# .env
FOO = bar
USER = john_doe
# julia REPL
# load key-value pairs from ".env", `ENV` duplicate keys are not overwritten
julia> ENV["USER"]
user1
julia> cfg = dotenvx()
julia> ENV["FOO"]
bar
julia> ENV["USER"]
user1
julia> cfg["USER"]
john_doe
```
"""
dotenvx(paths...; overwrite = false, env = ENV) = dotenv(paths...; overwrite = overwrite, env = env)
end
| [
21412,
17056,
4834,
85,
198,
198,
11748,
7308,
25,
651,
9630,
11,
651,
11,
318,
28920,
11,
20121,
11,
20121,
28265,
468,
2539,
198,
198,
39344,
16605,
24330,
11,
16605,
24330,
87,
11,
318,
411,
5634,
11,
43264,
62,
13083,
198,
198,
7249,
2039,
85,
44148,
35,
713,
90,
51,
92,
198,
220,
220,
220,
8633,
3712,
35,
713,
90,
10100,
11,
10903,
92,
198,
220,
220,
220,
17365,
3712,
51,
198,
220,
220,
220,
28721,
3712,
38469,
90,
10100,
92,
198,
220,
220,
220,
18620,
3712,
38469,
90,
10100,
92,
198,
437,
198,
4834,
85,
44148,
35,
713,
7,
11600,
8,
796,
2039,
85,
44148,
35,
713,
7,
11600,
11,
12964,
53,
11,
10903,
58,
4357,
10903,
58,
12962,
198,
4834,
85,
44148,
35,
713,
7,
11600,
11,
17365,
8,
796,
2039,
85,
44148,
35,
713,
7,
11600,
11,
17365,
11,
10903,
58,
4357,
10903,
58,
12962,
198,
198,
1136,
9630,
7,
276,
3712,
4834,
85,
44148,
35,
713,
11,
1994,
8,
796,
651,
7,
276,
13,
11600,
11,
1994,
11,
1225,
13,
24330,
58,
2539,
12962,
198,
1136,
7,
276,
3712,
4834,
85,
44148,
35,
713,
11,
1994,
11,
4277,
8,
796,
651,
7,
276,
13,
11600,
11,
1994,
11,
651,
7,
276,
13,
24330,
11,
1994,
11,
4277,
4008,
198,
271,
28920,
7,
276,
3712,
4834,
85,
44148,
35,
713,
8,
796,
318,
28920,
7,
276,
13,
11600,
8,
198,
14881,
11207,
9,
7,
538,
67,
16,
3712,
4834,
85,
44148,
35,
713,
11,
2462,
67,
17,
3712,
4834,
85,
44148,
35,
713,
23029,
796,
20121,
7,
538,
67,
16,
11,
2462,
67,
17,
986,
26,
49312,
796,
3991,
8,
198,
8818,
29122,
7,
538,
67,
3712,
4834,
85,
44148,
35,
713,
11,
17365,
8,
198,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
2462,
67,
13,
11600,
198,
220,
220,
220,
220,
220,
220,
220,
17365,
58,
74,
60,
796,
410,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
20121,
7,
538,
67,
16,
3712,
4834,
85,
44148,
35,
713,
11,
2462,
67,
17,
3712,
4834,
85,
44148,
35,
713,
986,
26,
49312,
796,
2081,
8,
220,
198,
220,
220,
220,
2462,
67,
796,
2039,
85,
44148,
35,
713,
7,
11379,
75,
19510,
87,
11,
331,
8,
4613,
20121,
7,
87,
11,
331,
13,
11600,
828,
2462,
67,
17,
26,
2315,
796,
2462,
67,
16,
13,
11600,
828,
2462,
67,
16,
13,
24330,
8,
198,
220,
220,
220,
10568,
0,
7,
538,
67,
11,
2462,
67,
13,
24330,
8,
198,
220,
220,
220,
49312,
11405,
29122,
7,
538,
67,
11,
2462,
67,
13,
24330,
8,
198,
220,
220,
220,
2462,
67,
198,
437,
198,
198,
10134,
2539,
7,
276,
3712,
4834,
85,
44148,
35,
713,
11,
1994,
8,
796,
468,
2539,
7,
276,
13,
11600,
11,
1994,
8,
8614,
468,
2539,
7,
276,
13,
24330,
11,
1994,
8,
198,
198,
8818,
20121,
0,
7,
538,
67,
16,
3712,
4834,
85,
44148,
35,
713,
11,
2462,
67,
17,
3712,
4834,
85,
44148,
35,
713,
986,
26,
49312,
796,
2081,
8,
198,
220,
220,
220,
5591,
75,
19510,
87,
11,
331,
8,
4613,
20121,
0,
7,
87,
11,
331,
13,
11600,
828,
2462,
67,
17,
26,
2315,
796,
2462,
67,
16,
13,
11600,
8,
198,
220,
220,
220,
1303,
921,
6584,
470,
779,
1180,
551,
14259,
1141,
4600,
647,
469,
0,
44646,
770,
318,
28721,
9172,
13,
198,
220,
220,
220,
1303,
717,
22155,
2858,
460,
470,
307,
3421,
11,
2728,
340,
460,
307,
4600,
1677,
53,
63,
198,
220,
220,
220,
10568,
0,
7,
538,
67,
16,
11,
2462,
67,
16,
13,
24330,
8,
198,
220,
220,
220,
49312,
11405,
29122,
7,
538,
67,
16,
11,
2462,
67,
16,
13,
24330,
8,
198,
220,
220,
220,
1441,
2462,
67,
16,
198,
437,
198,
198,
8818,
318,
4299,
259,
7,
82,
11,
1312,
796,
657,
11,
23145,
796,
657,
8,
198,
220,
220,
220,
1312,
796,
1306,
521,
7,
82,
11,
1312,
8,
198,
220,
220,
220,
18896,
796,
299,
8189,
41667,
7,
82,
8,
198,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
269,
429,
62,
1671,
25180,
796,
657,
198,
220,
220,
220,
981,
1312,
19841,
18896,
198,
220,
220,
220,
220,
220,
220,
220,
269,
796,
264,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
6624,
705,
3,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
269,
6624,
705,
90,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4235,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
318,
4299,
259,
7,
82,
11,
1312,
11,
352,
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,
269,
429,
62,
1671,
25180,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
269,
6624,
705,
92,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
429,
62,
1671,
25180,
48185,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23145,
6624,
352,
11405,
269,
429,
62,
1671,
25180,
1279,
657,
11405,
1441,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
1306,
521,
7,
82,
11,
1312,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
2081,
198,
437,
198,
198,
76,
18187,
2878,
509,
53,
19667,
198,
220,
220,
220,
1994,
3712,
10100,
198,
220,
220,
220,
1988,
3712,
10100,
198,
220,
220,
220,
1751,
3712,
38469,
90,
42,
53,
19667,
92,
198,
220,
220,
220,
3397,
62,
66,
429,
3712,
5317,
198,
220,
220,
220,
318,
20311,
3712,
33,
970,
198,
220,
220,
220,
318,
411,
5634,
3712,
33,
970,
198,
437,
198,
198,
42,
53,
19667,
7,
74,
11,
410,
8,
796,
509,
53,
19667,
7,
74,
11,
410,
11,
509,
53,
19667,
58,
4357,
657,
11,
2081,
11,
3991,
8,
198,
42,
53,
19667,
7,
85,
8,
796,
509,
53,
19667,
7203,
1600,
410,
11,
509,
53,
19667,
58,
4357,
657,
11,
3991,
11,
3991,
8,
198,
198,
271,
411,
5634,
7,
74,
85,
17440,
3712,
42,
53,
19667,
8,
796,
479,
85,
17440,
13,
271,
411,
5634,
198,
198,
37811,
198,
220,
220,
220,
318,
411,
5634,
7,
37581,
3712,
4834,
85,
44148,
35,
713,
8,
198,
198,
35561,
1771,
2169,
489,
803,
8771,
373,
4388,
393,
407,
13,
31711,
803,
460,
307,
23993,
611,
612,
389,
18620,
20086,
393,
2169,
489,
515,
9633,
466,
407,
2152,
287,
262,
2858,
13,
198,
37811,
198,
271,
411,
5634,
7,
538,
67,
3712,
4834,
85,
44148,
35,
713,
8,
796,
318,
28920,
7,
538,
67,
13,
917,
18156,
8,
11405,
318,
28920,
7,
538,
67,
13,
21170,
934,
8,
198,
198,
37811,
198,
220,
220,
220,
43264,
62,
13083,
7,
37581,
3712,
4834,
85,
44148,
35,
713,
8,
198,
198,
35561,
46545,
286,
4600,
21170,
934,
63,
290,
4600,
917,
18156,
63,
8251,
11,
810,
4600,
21170,
934,
63,
389,
8251,
543,
8338,
319,
1123,
584,
290,
4600,
917,
18156,
63,
389,
8251,
11,
543,
779,
9633,
326,
466,
407,
2152,
287,
262,
2858,
13,
198,
37811,
198,
8818,
43264,
62,
13083,
7,
276,
79,
3712,
4834,
85,
44148,
35,
713,
8,
198,
220,
220,
220,
28721,
796,
3975,
7,
74,
4613,
479,
5218,
1225,
79,
13,
11600,
58,
74,
4357,
1225,
79,
13,
917,
18156,
8,
198,
220,
220,
220,
18620,
796,
3975,
7,
74,
4613,
479,
5218,
1225,
79,
13,
11600,
58,
74,
4357,
1225,
79,
13,
21170,
934,
8,
628,
220,
220,
220,
1441,
357,
26,
18620,
796,
18620,
11,
28721,
796,
28721,
8,
198,
437,
198,
198,
8818,
2244,
5620,
0,
7,
85,
3712,
42,
53,
19667,
11,
8931,
11,
638,
4147,
11,
1312,
796,
657,
11,
17365,
796,
12964,
53,
8,
198,
220,
220,
220,
1188,
796,
410,
13,
8367,
198,
220,
220,
220,
18896,
796,
299,
8189,
41667,
7,
2100,
8,
198,
220,
220,
220,
1312,
15,
796,
1306,
521,
7,
2100,
11,
1312,
8,
198,
220,
220,
220,
1312,
796,
1312,
15,
198,
220,
220,
220,
19096,
62,
9127,
796,
657,
198,
220,
220,
220,
4235,
796,
657,
1303,
2279,
318,
3487,
198,
220,
220,
220,
318,
12102,
796,
410,
13,
4468,
1292,
5633,
2081,
1058,
3991,
628,
220,
220,
220,
981,
1312,
19841,
18896,
198,
220,
220,
220,
220,
220,
220,
220,
269,
796,
1188,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
6624,
705,
3,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
352,
1303,
4953,
329,
262,
4756,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
269,
6624,
705,
90,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4235,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
796,
509,
53,
19667,
7,
2100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
17440,
13,
17197,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
11,
4938,
796,
2244,
5620,
0,
7,
17440,
11,
8931,
11,
638,
4147,
11,
1312,
11,
17365,
8,
1303,
815,
1441,
6376,
286,
262,
9605,
19096,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4938,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
23743,
62,
66,
429,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
12102,
796,
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,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19096,
62,
9127,
15853,
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,
4235,
796,
657,
1303,
9480,
866,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
269,
6624,
705,
92,
6,
1303,
356,
815,
4439,
617,
6397,
1255,
611,
428,
318,
674,
9605,
19096,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19096,
62,
9127,
48185,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
85,
13,
4468,
1292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19096,
62,
9127,
18189,
657,
11405,
2555,
1303,
3991,
10436,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
410,
13,
23743,
62,
66,
429,
6624,
657,
1303,
356,
389,
1994,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
2539,
796,
410,
13,
8367,
58,
72,
15,
25,
72,
12,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
468,
2539,
7,
15418,
4147,
11,
410,
13,
2539,
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,
24443,
0,
7,
15418,
4147,
58,
85,
13,
2539,
4083,
17197,
11,
410,
13,
17197,
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,
6565,
0,
7,
85,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
468,
2539,
7,
24330,
11,
410,
13,
2539,
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,
410,
13,
8367,
796,
17365,
58,
85,
13,
2539,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
25558,
11,
410,
8,
198,
220,
220,
220,
220,
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,
220,
220,
220,
220,
1303,
16185,
1994,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
8367,
796,
410,
13,
8367,
58,
72,
15,
12,
17,
25,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
25558,
11,
410,
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,
2073,
1303,
356,
389,
987,
13602,
9386,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
8367,
796,
410,
13,
8367,
58,
72,
15,
25,
72,
12,
16,
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,
1312,
11,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
19841,
18896,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
1306,
521,
7,
2100,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1312,
11,
318,
12102,
198,
437,
198,
198,
8818,
10568,
0,
7,
276,
79,
3712,
4834,
85,
44148,
35,
713,
11,
17365,
796,
12964,
53,
8,
198,
220,
220,
220,
638,
4147,
796,
360,
713,
90,
10100,
11,
509,
53,
19667,
92,
3419,
198,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
1225,
79,
13,
11600,
198,
220,
220,
220,
220,
220,
220,
220,
638,
4147,
58,
74,
60,
796,
509,
53,
19667,
7,
74,
11,
410,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
8931,
796,
509,
53,
19667,
21737,
198,
220,
220,
220,
220,
198,
220,
220,
220,
8335,
62,
25558,
0,
7,
25558,
11,
638,
4147,
11,
17365,
8,
628,
220,
220,
220,
10568,
0,
7,
25558,
11,
638,
4147,
11,
17365,
8,
628,
220,
220,
220,
6565,
0,
7,
276,
79,
13,
917,
18156,
8,
198,
220,
220,
220,
6565,
0,
7,
276,
79,
13,
21170,
934,
8,
198,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
638,
4147,
198,
220,
220,
220,
220,
220,
220,
220,
1225,
79,
13,
11600,
58,
74,
60,
796,
410,
13,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
85,
13,
271,
411,
5634,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
276,
79,
13,
21170,
934,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
5145,
271,
4299,
259,
7,
85,
13,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
276,
79,
13,
917,
18156,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1225,
79,
198,
437,
198,
198,
8818,
8335,
62,
25558,
0,
7,
25558,
11,
638,
4147,
11,
17365,
8,
198,
220,
220,
220,
329,
410,
287,
3815,
7,
15418,
4147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
356,
7925,
39555,
515,
2846,
422,
262,
1988,
290,
938,
14249,
815,
307,
1234,
319,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
262,
8931,
329,
2252,
29122,
278,
198,
220,
220,
220,
220,
220,
220,
220,
2244,
5620,
0,
7,
85,
11,
8931,
11,
638,
4147,
11,
657,
11,
17365,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
329,
410,
287,
3815,
7,
15418,
4147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
611,
356,
466,
407,
423,
1997,
284,
39555,
378,
2641,
262,
1988,
11,
356,
389,
922,
13,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1002,
356,
991,
423,
617,
584,
1988,
810,
10139,
815,
307,
973,
329,
39555,
341,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
356,
1234,
10139,
319,
262,
39555,
341,
8931,
198,
220,
220,
220,
220,
220,
220,
220,
611,
410,
13,
23743,
62,
66,
429,
6624,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
271,
411,
5634,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
271,
28920,
7,
85,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
25558,
11,
410,
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,
8818,
45115,
62,
33491,
0,
7,
17440,
11,
1994,
11,
1188,
8,
198,
220,
220,
220,
8833,
259,
7,
2539,
11,
10139,
13,
8367,
8,
8614,
1441,
198,
220,
220,
220,
10139,
13,
8367,
796,
6330,
7,
17440,
13,
8367,
11,
1994,
5218,
1188,
8,
198,
220,
220,
220,
1674,
620,
7,
87,
4613,
45115,
62,
33491,
0,
7,
87,
11,
1994,
11,
1188,
828,
10139,
13,
17197,
8,
198,
220,
220,
220,
2147,
198,
437,
198,
198,
8818,
10568,
0,
7,
25558,
11,
638,
4147,
11,
17365,
8,
198,
220,
220,
220,
981,
5145,
271,
28920,
7,
25558,
8,
198,
220,
220,
220,
220,
220,
220,
220,
410,
796,
1461,
0,
7,
25558,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1994,
796,
37082,
3,
4895,
1635,
410,
13,
2539,
1635,
366,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
981,
5145,
271,
28920,
7,
85,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
796,
1461,
0,
7,
85,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45115,
62,
33491,
0,
7,
38439,
11,
1994,
11,
410,
13,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
13,
23743,
62,
66,
429,
48185,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
13,
23743,
62,
66,
429,
6624,
657,
8614,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5141,
13,
4468,
1292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
13,
271,
411,
5634,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
13,
2539,
796,
5141,
13,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
468,
2539,
7,
15418,
4147,
11,
5141,
13,
2539,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24443,
0,
7,
15418,
4147,
58,
38439,
13,
2539,
4083,
17197,
11,
5141,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6565,
0,
7,
38439,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
271,
28920,
7,
15418,
4147,
58,
38439,
13,
2539,
4083,
17197,
8,
11405,
638,
4147,
58,
38439,
13,
2539,
4083,
23743,
62,
66,
429,
6624,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
25558,
11,
638,
4147,
58,
38439,
13,
2539,
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,
2073,
361,
468,
2539,
7,
24330,
11,
5141,
13,
2539,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5141,
13,
8367,
796,
17365,
58,
38439,
13,
2539,
60,
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,
5141,
13,
8367,
796,
37082,
3,
4895,
1635,
5141,
13,
2539,
1635,
366,
36786,
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,
611,
5145,
271,
28920,
7,
38439,
13,
17197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
25558,
11,
5141,
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,
37811,
198,
63,
16934,
4834,
85,
13,
29572,
63,
18178,
257,
10903,
393,
281,
314,
9864,
13712,
357,
1092,
1988,
326,
198,
460,
307,
11513,
656,
10903,
828,
290,
5860,
257,
360,
713,
351,
198,
262,
44267,
8251,
290,
3815,
13,
198,
37811,
198,
8818,
21136,
7,
10677,
8,
198,
220,
220,
220,
581,
796,
360,
713,
90,
10100,
11,
10100,
92,
3419,
198,
220,
220,
220,
12351,
796,
314,
9864,
13712,
7,
10677,
8,
198,
220,
220,
220,
329,
1627,
287,
1123,
1370,
7,
10677,
8,
198,
220,
220,
220,
220,
220,
220,
220,
285,
796,
2872,
7,
81,
1,
61,
59,
82,
9,
26933,
59,
86,
7874,
48688,
19415,
82,
9,
28,
59,
82,
9,
7,
15885,
19427,
59,
82,
9,
3,
1600,
1627,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
285,
5145,
855,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
796,
285,
13,
27144,
942,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4731,
7,
76,
13,
27144,
942,
58,
17,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
13664,
7,
8367,
8,
1875,
657,
11405,
1988,
58,
16,
60,
24844,
705,
30543,
11405,
1988,
58,
437,
60,
24844,
705,
1,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
6330,
7,
8367,
11,
374,
1,
6852,
77,
1,
76,
5218,
37082,
77,
4943,
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,
1988,
796,
6330,
7,
8367,
11,
374,
18109,
61,
17816,
59,
84,
405,
1828,
60,
91,
17816,
59,
84,
405,
1828,
60,
3,
16725,
5218,
366,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
10283,
7,
8367,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
411,
11,
1994,
5218,
1988,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
581,
198,
437,
198,
198,
29572,
7,
10677,
3712,
9399,
8,
796,
21136,
7,
10100,
7,
20657,
0,
7,
10677,
22305,
198,
198,
29113,
7804,
198,
2,
8774,
636,
198,
29113,
7804,
198,
198,
12102,
378,
7753,
7,
82,
8,
796,
3991,
198,
12102,
378,
7753,
7,
82,
3712,
23839,
10100,
8,
796,
318,
7753,
7,
82,
8,
198,
198,
37811,
198,
220,
220,
220,
16605,
24330,
7,
6978,
16,
11,
3108,
17,
11,
2644,
26,
49312,
796,
2081,
8,
198,
198,
63,
26518,
24330,
63,
9743,
764,
24330,
3696,
422,
534,
4600,
6978,
47671,
21136,
511,
2695,
11,
20121,
606,
1978,
11,
7000,
1255,
284,
4600,
1677,
53,
47671,
198,
392,
3443,
1441,
257,
4600,
4834,
85,
44148,
35,
713,
63,
351,
262,
2695,
13,
1002,
645,
4600,
6978,
63,
4578,
318,
1813,
837,
788,
220,
198,
44646,
24330,
63,
318,
973,
355,
257,
4277,
3108,
13,
5856,
20121,
8771,
11,
611,
23418,
8251,
12956,
198,
8524,
1988,
422,
262,
826,
1712,
22155,
318,
973,
13,
198,
198,
3886,
4277,
611,
1994,
1541,
7160,
287,
4600,
1677,
53,
63,
340,
318,
6993,
9108,
351,
262,
3815,
287,
764,
24330,
2393,
13,
220,
198,
1212,
9172,
460,
307,
3421,
416,
4634,
4600,
2502,
13564,
63,
6056,
284,
4600,
9562,
63,
393,
1262,
10668,
4600,
26518,
24330,
87,
63,
2163,
13,
198,
198,
27730,
198,
2559,
198,
15506,
63,
198,
2,
764,
24330,
198,
6080,
46,
796,
2318,
198,
29904,
796,
45610,
62,
67,
2577,
198,
198,
2,
474,
43640,
45285,
198,
2,
3440,
1994,
12,
8367,
14729,
422,
27071,
24330,
1600,
4600,
1677,
53,
63,
23418,
8251,
389,
6993,
9108,
198,
73,
43640,
29,
12964,
53,
14692,
29904,
8973,
198,
7220,
16,
198,
73,
43640,
29,
30218,
70,
796,
16605,
24330,
3419,
198,
73,
43640,
29,
12964,
53,
14692,
6080,
46,
8973,
198,
5657,
198,
73,
43640,
29,
12964,
53,
14692,
29904,
8973,
198,
30686,
62,
67,
2577,
198,
73,
43640,
29,
30218,
70,
14692,
29904,
8973,
198,
30686,
62,
67,
2577,
198,
15506,
63,
198,
37811,
198,
8818,
16605,
24330,
7,
6978,
796,
27071,
24330,
8172,
49312,
796,
2081,
11,
17365,
796,
12964,
53,
8,
198,
220,
220,
220,
44267,
796,
611,
357,
12102,
378,
7753,
7,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
21136,
7,
961,
7,
6978,
11,
10903,
4008,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
21136,
7,
6978,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2462,
67,
796,
2039,
85,
44148,
35,
713,
7,
79,
945,
276,
11,
17365,
8,
198,
220,
220,
220,
10568,
0,
7,
538,
67,
11,
17365,
8,
628,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
2462,
67,
13,
11600,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
10134,
2539,
7,
24330,
11,
479,
8,
8614,
49312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17365,
58,
74,
60,
796,
410,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
2462,
67,
198,
437,
198,
198,
26518,
24330,
7,
6978,
82,
986,
26,
49312,
796,
2081,
11,
17365,
796,
12964,
53,
8,
796,
20121,
0,
7,
26518,
24330,
12195,
6978,
82,
26,
49312,
796,
49312,
11,
17365,
796,
17365,
26513,
11,
49312,
796,
49312,
8,
198,
198,
37811,
198,
220,
220,
220,
16605,
24330,
87,
7,
6978,
16,
11,
3108,
17,
11,
2644,
26,
49312,
796,
3991,
8,
198,
198,
63,
26518,
24330,
87,
63,
9743,
764,
24330,
3696,
422,
534,
4600,
6978,
47671,
21136,
511,
2695,
11,
20121,
606,
1978,
11,
7000,
1255,
284,
4600,
1677,
53,
47671,
198,
392,
3443,
1441,
257,
4600,
4834,
85,
44148,
35,
713,
63,
351,
262,
2695,
13,
1002,
645,
4600,
6978,
63,
4578,
318,
1813,
837,
788,
220,
198,
44646,
24330,
63,
318,
973,
355,
257,
4277,
3108,
13,
5856,
20121,
8771,
11,
611,
23418,
8251,
12956,
198,
8524,
1988,
422,
262,
826,
1712,
22155,
318,
973,
13,
198,
198,
3886,
4277,
611,
1994,
1541,
7160,
287,
4600,
1677,
53,
63,
340,
318,
6993,
9108,
351,
262,
3815,
287,
764,
24330,
2393,
13,
220,
198,
1212,
9172,
460,
307,
3421,
416,
4634,
4600,
2502,
13564,
63,
6056,
284,
4600,
7942,
63,
393,
1262,
10668,
4600,
26518,
24330,
63,
2163,
13,
198,
198,
27730,
198,
2559,
198,
15506,
63,
198,
2,
764,
24330,
198,
6080,
46,
796,
2318,
198,
29904,
796,
45610,
62,
67,
2577,
198,
198,
2,
474,
43640,
45285,
198,
2,
3440,
1994,
12,
8367,
14729,
422,
27071,
24330,
1600,
4600,
1677,
53,
63,
23418,
8251,
389,
407,
6993,
9108,
198,
73,
43640,
29,
12964,
53,
14692,
29904,
8973,
198,
7220,
16,
198,
73,
43640,
29,
30218,
70,
796,
16605,
24330,
87,
3419,
198,
73,
43640,
29,
12964,
53,
14692,
6080,
46,
8973,
198,
5657,
198,
73,
43640,
29,
12964,
53,
14692,
29904,
8973,
198,
7220,
16,
198,
73,
43640,
29,
30218,
70,
14692,
29904,
8973,
198,
30686,
62,
67,
2577,
198,
15506,
63,
198,
37811,
198,
26518,
24330,
87,
7,
6978,
82,
986,
26,
49312,
796,
3991,
11,
17365,
796,
12964,
53,
8,
796,
16605,
24330,
7,
6978,
82,
986,
26,
49312,
796,
49312,
11,
17365,
796,
17365,
8,
198,
198,
437,
198
] | 2.14624 | 5,067 |
function test_thermalLoad_1()
T = 2
# With these values, the heater uses 0.2 power to keep a ΔT of 1
l = DR.DER.ThermalLoad(
index=1, T=2,
temp_min=[20.0, 20.0],
temp_max=[25.0, 25.0],
temp_ext=[0.0, 0.0],
temp_init=20.0,
pwr_min=[0.0, 0.0],
pwr_max=[10.0, 10.0],
C=1.0, η=1.0, μ=0.2,
binflag=false
)
# GLPK does not support -in-Interval constraints, so we bridge
model = MOI.Bridges.full_bridge_optimizer(GLPK.Optimizer(), Float64)
lmin = [0.0, 0.0]
lmax = [10.0, 10.0]
price = [2.0, 1.0]
# Instantiate initial model
h = DR.DER.House(
0, T,
lmin, lmax, price,
[l]
)
model, var2idx, con2idx = DR.DER.build_model!(h, model)
MOI.optimize!(model)
@test MOI.get(model, MOI.ObjectiveValue()) ≈ 12.0
# Temperature should be kept at minimum value, i.e., 20
T1 = var2idx[(:thermal, l.index, :temp, 1)]
T2 = var2idx[(:thermal, l.index, :temp, 2)]
@test MOI.get(model, MOI.VariablePrimal(), T1) ≈ 20.0
@test MOI.get(model, MOI.VariablePrimal(), T2) ≈ 20.0
# Check net load
pnet1 = var2idx[(:thermal, l.index, :pnet, 1)]
pnet2 = var2idx[(:thermal, l.index, :pnet, 2)]
@test MOI.get(model, MOI.VariablePrimal(), pnet1) ≈ 4.0
@test MOI.get(model, MOI.VariablePrimal(), pnet2) ≈ 4.0
return nothing
end
function test_thermalLoad_2()
T = 2
# With these values, the heater uses 0.2 power to keep a ΔT of 1
l = DR.DER.ThermalLoad(
index=1, T=2,
temp_min=[20.0, 20.0],
temp_max=[25.0, 25.0],
temp_ext=[0.0, 0.0],
temp_init=20.0,
pwr_min=[0.0, 0.0],
pwr_max=[10.0, 10.0],
C=1.0, η=1.0, μ=0.2,
binflag=false
)
# GLPK does not support -in-Interval constraints, so we bridge
model = MOI.Bridges.full_bridge_optimizer(GLPK.Optimizer(), Float64)
lmin = [0.0, 0.0]
lmax = [10.0, 10.0]
price = [1.0, 2.0] # Now it's worth heating more in the first period
# Instantiate initial model
h = DR.DER.House(
0, T,
lmin, lmax, price,
[l]
)
model, var2idx, con2idx = DR.DER.build_model!(h, model)
MOI.optimize!(model)
# T1 should be higher
# T2 should be at minimum, i.e., 20
T1 = var2idx[(:thermal, l.index, :temp, 1)]
T2 = var2idx[(:thermal, l.index, :temp, 2)]
@test MOI.get(model, MOI.VariablePrimal(), T1) ≈ 25.0
@test MOI.get(model, MOI.VariablePrimal(), T2) ≈ 20.0
# Check net load
pnet1 = var2idx[(:thermal, l.index, :pnet, 1)]
pnet2 = var2idx[(:thermal, l.index, :pnet, 2)]
@test MOI.get(model, MOI.VariablePrimal(), pnet1) ≈ 9.0
@test MOI.get(model, MOI.VariablePrimal(), pnet2) ≈ 0.0
# Check objective value
@test MOI.get(model, MOI.ObjectiveValue()) ≈ 9.0
return nothing
end
@testset "Thermal" begin
test_thermalLoad_1()
test_thermalLoad_2()
end | [
8818,
1332,
62,
490,
7617,
8912,
62,
16,
3419,
628,
220,
220,
220,
309,
796,
362,
628,
220,
220,
220,
1303,
2080,
777,
3815,
11,
262,
39844,
3544,
657,
13,
17,
1176,
284,
1394,
257,
37455,
51,
286,
352,
220,
198,
220,
220,
220,
300,
796,
10560,
13,
14418,
13,
35048,
7617,
8912,
7,
198,
220,
220,
220,
220,
220,
220,
220,
6376,
28,
16,
11,
309,
28,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
1084,
41888,
1238,
13,
15,
11,
1160,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
9806,
41888,
1495,
13,
15,
11,
1679,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
2302,
41888,
15,
13,
15,
11,
657,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
15003,
28,
1238,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
279,
18351,
62,
1084,
41888,
15,
13,
15,
11,
657,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
279,
18351,
62,
9806,
41888,
940,
13,
15,
11,
838,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
327,
28,
16,
13,
15,
11,
7377,
115,
28,
16,
13,
15,
11,
18919,
28,
15,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9874,
32109,
28,
9562,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
10188,
40492,
857,
407,
1104,
532,
259,
12,
9492,
2100,
17778,
11,
523,
356,
7696,
198,
220,
220,
220,
2746,
796,
13070,
40,
13,
33,
32124,
13,
12853,
62,
9458,
62,
40085,
7509,
7,
8763,
40492,
13,
27871,
320,
7509,
22784,
48436,
2414,
8,
628,
220,
220,
220,
300,
1084,
796,
685,
15,
13,
15,
11,
657,
13,
15,
60,
198,
220,
220,
220,
300,
9806,
796,
685,
940,
13,
15,
11,
838,
13,
15,
60,
198,
220,
220,
220,
2756,
796,
685,
17,
13,
15,
11,
352,
13,
15,
60,
628,
220,
220,
220,
1303,
24470,
9386,
4238,
2746,
198,
220,
220,
220,
289,
796,
10560,
13,
14418,
13,
18102,
7,
198,
220,
220,
220,
220,
220,
220,
220,
657,
11,
309,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
1084,
11,
300,
9806,
11,
2756,
11,
198,
220,
220,
220,
220,
220,
220,
220,
685,
75,
60,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2746,
11,
1401,
17,
312,
87,
11,
369,
17,
312,
87,
796,
10560,
13,
14418,
13,
11249,
62,
19849,
0,
7,
71,
11,
2746,
8,
628,
220,
220,
220,
13070,
40,
13,
40085,
1096,
0,
7,
19849,
8,
628,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
10267,
425,
11395,
28955,
15139,
230,
1105,
13,
15,
628,
220,
220,
220,
1303,
34467,
815,
307,
4030,
379,
5288,
1988,
11,
1312,
13,
68,
1539,
1160,
198,
220,
220,
220,
309,
16,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
29510,
11,
352,
15437,
198,
220,
220,
220,
309,
17,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
29510,
11,
362,
15437,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
309,
16,
8,
15139,
230,
1160,
13,
15,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
309,
17,
8,
15139,
230,
1160,
13,
15,
628,
220,
220,
220,
1303,
6822,
2010,
3440,
198,
220,
220,
220,
279,
3262,
16,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
79,
3262,
11,
352,
15437,
198,
220,
220,
220,
279,
3262,
17,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
79,
3262,
11,
362,
15437,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
279,
3262,
16,
8,
15139,
230,
604,
13,
15,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
279,
3262,
17,
8,
15139,
230,
604,
13,
15,
628,
220,
220,
220,
1441,
2147,
198,
220,
220,
220,
220,
198,
437,
198,
198,
8818,
1332,
62,
490,
7617,
8912,
62,
17,
3419,
628,
220,
220,
220,
309,
796,
362,
628,
220,
220,
220,
1303,
2080,
777,
3815,
11,
262,
39844,
3544,
657,
13,
17,
1176,
284,
1394,
257,
37455,
51,
286,
352,
220,
198,
220,
220,
220,
300,
796,
10560,
13,
14418,
13,
35048,
7617,
8912,
7,
198,
220,
220,
220,
220,
220,
220,
220,
6376,
28,
16,
11,
309,
28,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
1084,
41888,
1238,
13,
15,
11,
1160,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
9806,
41888,
1495,
13,
15,
11,
1679,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
2302,
41888,
15,
13,
15,
11,
657,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
20218,
62,
15003,
28,
1238,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
279,
18351,
62,
1084,
41888,
15,
13,
15,
11,
657,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
279,
18351,
62,
9806,
41888,
940,
13,
15,
11,
838,
13,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
327,
28,
16,
13,
15,
11,
7377,
115,
28,
16,
13,
15,
11,
18919,
28,
15,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9874,
32109,
28,
9562,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
10188,
40492,
857,
407,
1104,
532,
259,
12,
9492,
2100,
17778,
11,
523,
356,
7696,
198,
220,
220,
220,
2746,
796,
13070,
40,
13,
33,
32124,
13,
12853,
62,
9458,
62,
40085,
7509,
7,
8763,
40492,
13,
27871,
320,
7509,
22784,
48436,
2414,
8,
628,
220,
220,
220,
300,
1084,
796,
685,
15,
13,
15,
11,
657,
13,
15,
60,
198,
220,
220,
220,
300,
9806,
796,
685,
940,
13,
15,
11,
838,
13,
15,
60,
198,
220,
220,
220,
2756,
796,
685,
16,
13,
15,
11,
362,
13,
15,
60,
220,
1303,
2735,
340,
338,
2861,
16930,
517,
287,
262,
717,
2278,
628,
220,
220,
220,
1303,
24470,
9386,
4238,
2746,
198,
220,
220,
220,
289,
796,
10560,
13,
14418,
13,
18102,
7,
198,
220,
220,
220,
220,
220,
220,
220,
657,
11,
309,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
1084,
11,
300,
9806,
11,
2756,
11,
198,
220,
220,
220,
220,
220,
220,
220,
685,
75,
60,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2746,
11,
1401,
17,
312,
87,
11,
369,
17,
312,
87,
796,
10560,
13,
14418,
13,
11249,
62,
19849,
0,
7,
71,
11,
2746,
8,
628,
220,
220,
220,
13070,
40,
13,
40085,
1096,
0,
7,
19849,
8,
628,
220,
220,
220,
1303,
309,
16,
815,
307,
2440,
198,
220,
220,
220,
1303,
309,
17,
815,
307,
379,
5288,
11,
1312,
13,
68,
1539,
1160,
198,
220,
220,
220,
309,
16,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
29510,
11,
352,
15437,
198,
220,
220,
220,
309,
17,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
29510,
11,
362,
15437,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
309,
16,
8,
15139,
230,
1679,
13,
15,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
309,
17,
8,
15139,
230,
1160,
13,
15,
628,
220,
220,
220,
1303,
6822,
2010,
3440,
198,
220,
220,
220,
279,
3262,
16,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
79,
3262,
11,
352,
15437,
198,
220,
220,
220,
279,
3262,
17,
796,
1401,
17,
312,
87,
58,
7,
25,
490,
7617,
11,
300,
13,
9630,
11,
1058,
79,
3262,
11,
362,
15437,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
279,
3262,
16,
8,
15139,
230,
860,
13,
15,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
43015,
23828,
282,
22784,
279,
3262,
17,
8,
15139,
230,
657,
13,
15,
628,
220,
220,
220,
1303,
6822,
9432,
1988,
198,
220,
220,
220,
2488,
9288,
13070,
40,
13,
1136,
7,
19849,
11,
13070,
40,
13,
10267,
425,
11395,
28955,
15139,
230,
860,
13,
15,
198,
220,
220,
220,
1441,
2147,
198,
220,
220,
220,
220,
198,
437,
198,
198,
31,
9288,
2617,
366,
35048,
7617,
1,
2221,
198,
220,
220,
220,
1332,
62,
490,
7617,
8912,
62,
16,
3419,
198,
220,
220,
220,
1332,
62,
490,
7617,
8912,
62,
17,
3419,
198,
437
] | 1.962475 | 1,519 |
function solve_diagTR(λ, Δ, g̃, δ, ϵ; M = [0.0])
# λ underestimates the required value λstar such that ||d̃(λstar)|| = δ
# where d̃(λ) = -(Δ + λ * M) .\ g̃
T = eltype(δ)
M = T.(M)
if M == [0.0]
# M = ones(Δ) ;
M = fill(T.(1.0), size(Δ)[1]);
end
@assert (minimum(M) > 0.0)
λin = T.(λ)
d̃ = -(Δ .+ λ * M) .\ g̃
d̃d̃ = d̃⋅d̃
normd̃ = sqrt(d̃d̃)
tol1 = sqrt(eps(T))
tolerance = tol1 * T(100.0)
# Newton iterations
iter_nwt = 0
while (normd̃ >= (δ + tolerance * normd̃)) && (iter_nwt < 40)
dotd̃ = (Δ .+ λ * M) .\ (M .* d̃)
Δλ = ((normd̃-δ)/δ) * (d̃d̃/(d̃ ⋅ dotd̃))
λeps = tol1 / T(100.0)
λ = max(λ + Δλ, λin + λeps)
d̃ = -(Δ .+ λ * M) .\ g̃
d̃d̃ = d̃⋅d̃
normd̃ = sqrt(d̃d̃)
@assert (λ >= 0.0)
iter_nwt += 1
end
return d̃, λ
end
| [
8818,
8494,
62,
10989,
363,
5446,
7,
39377,
11,
37455,
11,
308,
136,
225,
11,
7377,
112,
11,
18074,
113,
26,
337,
796,
685,
15,
13,
15,
12962,
198,
220,
220,
220,
1303,
7377,
119,
20164,
26748,
262,
2672,
1988,
7377,
119,
7364,
884,
326,
8614,
67,
136,
225,
7,
39377,
7364,
14726,
91,
796,
7377,
112,
198,
220,
220,
220,
1303,
810,
288,
136,
225,
7,
39377,
8,
796,
220,
532,
7,
138,
242,
1343,
7377,
119,
1635,
337,
8,
764,
59,
308,
136,
225,
198,
220,
220,
220,
309,
796,
1288,
4906,
7,
138,
112,
8,
198,
220,
220,
220,
337,
796,
309,
12195,
44,
8,
628,
220,
220,
220,
611,
337,
6624,
685,
15,
13,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
337,
796,
3392,
7,
138,
242,
8,
2162,
198,
220,
220,
220,
220,
220,
220,
220,
337,
796,
6070,
7,
51,
12195,
16,
13,
15,
828,
2546,
7,
138,
242,
38381,
16,
36563,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2488,
30493,
357,
39504,
7,
44,
8,
1875,
657,
13,
15,
8,
198,
220,
220,
220,
7377,
119,
259,
796,
309,
12195,
39377,
8,
198,
220,
220,
220,
288,
136,
225,
796,
532,
7,
138,
242,
764,
10,
7377,
119,
1635,
337,
8,
764,
59,
308,
136,
225,
198,
220,
220,
220,
288,
136,
225,
67,
136,
225,
796,
288,
136,
225,
158,
233,
227,
67,
136,
225,
198,
220,
220,
220,
2593,
67,
136,
225,
796,
19862,
17034,
7,
67,
136,
225,
67,
136,
225,
8,
628,
220,
220,
220,
284,
75,
16,
796,
19862,
17034,
7,
25386,
7,
51,
4008,
198,
220,
220,
220,
15621,
796,
284,
75,
16,
1635,
309,
7,
3064,
13,
15,
8,
628,
220,
220,
220,
1303,
17321,
34820,
198,
220,
220,
220,
11629,
62,
77,
46569,
796,
657,
198,
220,
220,
220,
981,
357,
27237,
67,
136,
225,
18189,
357,
138,
112,
1343,
15621,
1635,
2593,
67,
136,
225,
4008,
11405,
357,
2676,
62,
77,
46569,
1279,
2319,
8,
198,
220,
220,
220,
220,
220,
220,
220,
16605,
67,
136,
225,
796,
357,
138,
242,
764,
10,
7377,
119,
1635,
337,
8,
764,
59,
357,
44,
764,
9,
288,
136,
225,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
39377,
796,
14808,
27237,
67,
136,
225,
12,
138,
112,
20679,
138,
112,
8,
1635,
357,
67,
136,
225,
67,
136,
225,
29006,
67,
136,
225,
2343,
233,
227,
16605,
67,
136,
225,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
25386,
796,
284,
75,
16,
1220,
309,
7,
3064,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
119,
796,
220,
3509,
7,
39377,
1343,
37455,
39377,
11,
7377,
119,
259,
1343,
7377,
119,
25386,
8,
198,
220,
220,
220,
220,
220,
220,
220,
288,
136,
225,
796,
532,
7,
138,
242,
764,
10,
7377,
119,
1635,
337,
8,
764,
59,
308,
136,
225,
198,
220,
220,
220,
220,
220,
220,
220,
288,
136,
225,
67,
136,
225,
796,
288,
136,
225,
158,
233,
227,
67,
136,
225,
198,
220,
220,
220,
220,
220,
220,
220,
2593,
67,
136,
225,
796,
19862,
17034,
7,
67,
136,
225,
67,
136,
225,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
30493,
357,
39377,
18189,
657,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
77,
46569,
15853,
352,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1441,
288,
136,
225,
11,
7377,
119,
198,
437,
198
] | 1.516184 | 587 |
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::DiscreteCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::DiscreteConstantCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::DP5ConstantCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k)<4 || calcVal
@unpack a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a73,a74,a75,a76,b1,b3,b4,b5,b6,b7,c1,c2,c3,c4,c5,c6 = cache
@unpack d1,d3,d4,d5,d6,d7 = cache
k1 = f(t,uprev)
k2 = f(t+c1*dt,uprev+dt*(a21*k1))
k3 = f(t+c2*dt,uprev+dt*(a31*k1+a32*k2))
k4 = f(t+c3*dt,uprev+dt*(a41*k1+a42*k2+a43*k3))
k5 = f(t+c4*dt,uprev+dt*(a51*k1+a52*k2+a53*k3+a54*k4))
k6 = f(t+dt,uprev+dt*(a61*k1+a62*k2+a63*k3+a64*k4+a65*k5))
update = a71*k1+a73*k3+a74*k4+a75*k5+a76*k6
k7 = f(t+dt,uprev+dt*update)
copyat_or_push!(k,1,update)
bspl = k1 - update
copyat_or_push!(k,2,bspl)
copyat_or_push!(k,3,update - k7 - bspl)
copyat_or_push!(k,4,d1*k1+d3*k3+d4*k4+d5*k5+d6*k6+d7*k7)
end
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::DP5Cache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k)<4 || calcVal
@unpack a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a73,a74,a75,a76,b1,b3,b4,b5,b6,b7,c1,c2,c3,c4,c5,c6 = cache.tab
@unpack d1,d3,d4,d5,d6,d7 = cache.tab
@unpack k1,k2,k3,k4,k5,k6,k7,dense_tmp3,dense_tmp4,update,bspl,utilde,tmp,atmp = cache
uidx = eachindex(uprev)
f(t,uprev,k1)
for i in uidx
tmp[i] = uprev[i]+dt*(a21*k1[i])
end
f(t+c1*dt,tmp,k2)
for i in uidx
tmp[i] = uprev[i]+dt*(a31*k1[i]+a32*k2[i])
end
f(t+c2*dt,tmp,k3)
for i in uidx
tmp[i] = uprev[i]+dt*(a41*k1[i]+a42*k2[i]+a43*k3[i])
end
f(t+c3*dt,tmp,k4)
for i in uidx
tmp[i] =uprev[i]+dt*(a51*k1[i]+a52*k2[i]+a53*k3[i]+a54*k4[i])
end
f(t+c4*dt,tmp,k5)
for i in uidx
tmp[i] = uprev[i]+dt*(a61*k1[i]+a62*k2[i]+a63*k3[i]+a64*k4[i]+a65*k5[i])
end
f(t+dt,tmp,k6)
for i in uidx
update[i] = a71*k1[i]+a73*k3[i]+a74*k4[i]+a75*k5[i]+a76*k6[i]
tmp[i] = uprev[i]+dt*update[i]
end
f(t+dt,tmp,k7)
copyat_or_push!(k,1,update)
for i in uidx
bspl[i] = k1[i] - update[i]
dense_tmp3[i] = update[i] - k7[i] - bspl[i]
dense_tmp4[i] = (d1*k1[i]+d3*k3[i]+d4*k4[i]+d5*k5[i]+d6*k6[i]+d7*k7[i])
end
copyat_or_push!(k,2,bspl)
copyat_or_push!(k,3,dense_tmp3)
copyat_or_push!(k,4,dense_tmp4)
end
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::DP5ThreadedCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k)<4 || calcVal
@unpack a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a73,a74,a75,a76,b1,b3,b4,b5,b6,b7,c1,c2,c3,c4,c5,c6 = cache.tab
@unpack d1,d3,d4,d5,d6,d7 = cache.tab
@unpack k1,k2,k3,k4,k5,k6,k7,dense_tmp3,dense_tmp4,update,bspl,utilde,tmp,atmp = cache
uidx = eachindex(uprev)
f(t,uprev,k1)
for i in uidx
tmp[i] = uprev[i]+dt*(a21*k1[i])
end
f(t+c1*dt,tmp,k2)
for i in uidx
tmp[i] = uprev[i]+dt*(a31*k1[i]+a32*k2[i])
end
f(t+c2*dt,tmp,k3)
for i in uidx
tmp[i] = uprev[i]+dt*(a41*k1[i]+a42*k2[i]+a43*k3[i])
end
f(t+c3*dt,tmp,k4)
for i in uidx
tmp[i] =uprev[i]+dt*(a51*k1[i]+a52*k2[i]+a53*k3[i]+a54*k4[i])
end
f(t+c4*dt,tmp,k5)
for i in uidx
tmp[i] = uprev[i]+dt*(a61*k1[i]+a62*k2[i]+a63*k3[i]+a64*k4[i]+a65*k5[i])
end
f(t+dt,tmp,k6)
for i in uidx
update[i] = a71*k1[i]+a73*k3[i]+a74*k4[i]+a75*k5[i]+a76*k6[i]
tmp[i] = uprev[i]+dt*update[i]
end
f(t+dt,tmp,k7)
copyat_or_push!(k,1,update)
for i in uidx
bspl[i] = k1[i] - update[i]
dense_tmp3[i] = update[i] - k7[i] - bspl[i]
dense_tmp4[i] = (d1*k1[i]+d3*k3[i]+d4*k4[i]+d5*k5[i]+d6*k6[i]+d7*k7[i])
end
copyat_or_push!(k,2,bspl)
copyat_or_push!(k,3,dense_tmp3)
copyat_or_push!(k,4,dense_tmp4)
end
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::Tsit5ConstantCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k)<7 || calcVal
@unpack c1,c2,c3,c4,c5,c6,a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a72,a73,a74,a75,a76,b1,b2,b3,b4,b5,b6,b7 = cache
copyat_or_push!(k,1,f(t,uprev))
copyat_or_push!(k,2,f(t+c1*dt,uprev+dt*(a21*k[1])))
copyat_or_push!(k,3,f(t+c2*dt,uprev+dt*(a31*k[1]+a32*k[2])))
copyat_or_push!(k,4,f(t+c3*dt,uprev+dt*(a41*k[1]+a42*k[2]+a43*k[3])))
copyat_or_push!(k,5,f(t+c4*dt,uprev+dt*(a51*k[1]+a52*k[2]+a53*k[3]+a54*k[4])))
copyat_or_push!(k,6,f(t+dt,uprev+dt*(a61*k[1]+a62*k[2]+a63*k[3]+a64*k[4]+a65*k[5])))
utmp = uprev+dt*(a71*k[1]+a72*k[2]+a73*k[3]+a74*k[4]+a75*k[5]+a76*k[6])
copyat_or_push!(k,7,f(t+dt,utmp))
end
nothing
end
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::Tsit5Cache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k)<7 || calcVal
@unpack c1,c2,c3,c4,c5,c6,a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a72,a73,a74,a75,a76,b1,b2,b3,b4,b5,b6,b7 = cache.tab
@unpack k1,k2,k3,k4,k5,k6,k7,utilde,tmp,atmp = cache
uidx = eachindex(uprev)
for i in uidx
tmp[i] = uprev[i]+dt*(a21*k1[i])
end
f(t+c1*dt,tmp,k2)
for i in uidx
tmp[i] = uprev[i]+dt*(a31*k1[i]+a32*k2[i])
end
f(t+c2*dt,tmp,k3)
for i in uidx
tmp[i] = uprev[i]+dt*(a41*k1[i]+a42*k2[i]+a43*k3[i])
end
f(t+c3*dt,tmp,k4)
for i in uidx
tmp[i] = uprev[i]+dt*(a51*k1[i]+a52*k2[i]+a53*k3[i]+a54*k4[i])
end
f(t+c4*dt,tmp,k5)
for i in uidx
tmp[i] = uprev[i]+dt*(a61*k1[i]+a62*k2[i]+a63*k3[i]+a64*k4[i]+a65*k5[i])
end
f(t+dt,tmp,k6)
for i in uidx
tmp[i] = uprev[i]+dt*(a71*k1[i]+a72*k2[i]+a73*k3[i]+a74*k4[i]+a75*k5[i]+a76*k6[i])
end
f(t+dt,u,k7)
copyat_or_push!(k,1,k1)
copyat_or_push!(k,2,k2)
copyat_or_push!(k,3,k3)
copyat_or_push!(k,4,k4)
copyat_or_push!(k,5,k5)
copyat_or_push!(k,6,k6)
copyat_or_push!(k,7,k7)
end
nothing
end
"""
An Efficient Runge-Kutta (4,5) Pair by P.Bogacki and L.F.Shampine
Computers and Mathematics with Applications, Vol. 32, No. 6, 1996, pages 15 to 28
Called to add the extra k9, k10, k11 steps for the Order 5 interpolation when needed
"""
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::BS5ConstantCache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k) < 8 || calcVal
@unpack c1,c2,c3,c4,c5,a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a72,a73,a74,a75,a76,a81,a83,a84,a85,a86,a87,bhat1,bhat3,bhat4,bhat5,bhat6,btilde1,btilde2,btilde3,btilde4,btilde5,btilde6,btilde7,btilde8 = cache
copyat_or_push!(k,1,f(t,uprev))
copyat_or_push!(k,2,f(t+c1*dt,uprev+dt*a21*k[1]))
copyat_or_push!(k,3,f(t+c2*dt,uprev+dt*(a31*k[1]+a32*k[2])))
copyat_or_push!(k,4,f(t+c3*dt,uprev+dt*(a41*k[1]+a42*k[2]+a43*k[3])))
copyat_or_push!(k,5,f(t+c4*dt,uprev+dt*(a51*k[1]+a52*k[2]+a53*k[3]+a54*k[4])))
copyat_or_push!(k,6,f(t+c5*dt,uprev+dt*(a61*k[1]+a62*k[2]+a63*k[3]+a64*k[4]+a65*k[5])))
copyat_or_push!(k,7,f(t+dt,uprev+dt*(a71*k[1]+a72*k[2]+a73*k[3]+a74*k[4]+a75*k[5]+a76*k[6])))
copyat_or_push!(k,8,f(t+dt,uprev+dt*(a81*k[1]+a83*k[3]+a84*k[4]+a85*k[5]+a86*k[6]+a87*k[7])))
end
if (calcVal2 && length(k)< 11) || calcVal3 # Have not added the extra stages yet
@unpack c6,c7,c8,a91,a92,a93,a94,a95,a96,a97,a98,a101,a102,a103,a104,a105,a106,a107,a108,a109,a111,a112,a113,a114,a115,a116,a117,a118,a119,a1110 = cache
copyat_or_push!(k,9,f(t+c6*dt,uprev+dt*(a91*k[1]+a92*k[2]+a93*k[3]+a94*k[4]+a95*k[5]+a96*k[6]+a97*k[7]+a98*k[8])))
copyat_or_push!(k,10,f(t+c7*dt,uprev+dt*(a101*k[1]+a102*k[2]+a103*k[3]+a104*k[4]+a105*k[5]+a106*k[6]+a107*k[7]+a108*k[8]+a109*k[9])))
copyat_or_push!(k,11,f(t+c8*dt,uprev+dt*(a111*k[1]+a112*k[2]+a113*k[3]+a114*k[4]+a115*k[5]+a116*k[6]+a117*k[7]+a118*k[8]+a119*k[9]+a1110*k[10])))
end
nothing
end
"""
An Efficient Runge-Kutta (4,5) Pair by P.Bogacki and L.F.Shampine
Computers and Mathematics with Applications, Vol. 32, No. 6, 1996, pages 15 to 28
Called to add the extra k9, k10, k11 steps for the Order 5 interpolation when needed
"""
function ode_addsteps!{calcVal,calcVal2,calcVal3}(k,t,uprev,u,dt,f,cache::BS5Cache,always_calc_begin::Type{Val{calcVal}} = Val{false},allow_calc_end::Type{Val{calcVal2}} = Val{true},force_calc_end::Type{Val{calcVal3}} = Val{false})
if length(k) < 8 || calcVal
uidx = eachindex(uprev)
@unpack k1,k2,k3,k4,k5,k6,k7,k8,utilde,uhat,tmp,atmp,atmptilde = cache
@unpack c1,c2,c3,c4,c5,a21,a31,a32,a41,a42,a43,a51,a52,a53,a54,a61,a62,a63,a64,a65,a71,a72,a73,a74,a75,a76,a81,a83,a84,a85,a86,a87,bhat1,bhat3,bhat4,bhat5,bhat6,btilde1,btilde2,btilde3,btilde4,btilde5,btilde6,btilde7,btilde8 = cache.tab
for i in uidx
tmp[i] = uprev[i]+dt*a21*k1[i]
end
f(t+c1*dt,tmp,k2)
for i in uidx
tmp[i] = uprev[i]+dt*(a31*k1[i]+a32*k2[i])
end
f(t+c2*dt,tmp,k3)
for i in uidx
tmp[i] = uprev[i]+dt*(a41*k1[i]+a42*k2[i]+a43*k3[i])
end
f(t+c3*dt,tmp,k4)
for i in uidx
tmp[i] = uprev[i]+dt*(a51*k1[i]+a52*k2[i]+a53*k3[i]+a54*k4[i])
end
f(t+c4*dt,tmp,k5)
for i in uidx
tmp[i] = uprev[i]+dt*(a61*k1[i]+a62*k2[i]+a63*k3[i]+a64*k4[i]+a65*k5[i])
end
f(t+c5*dt,tmp,k6)
for i in uidx
tmp[i] = uprev[i]+dt*(a71*k1[i]+a72*k2[i]+a73*k3[i]+a74*k4[i]+a75*k5[i]+a76*k6[i])
end
f(t+dt,tmp,k7)
for i in uidx
u[i] = uprev[i]+dt*(a81*k1[i]+a83*k3[i]+a84*k4[i]+a85*k5[i]+a86*k6[i]+a87*k7[i])
end
f(t+dt,u,k8)
copyat_or_push!(k,1,k1)
copyat_or_push!(k,2,k2)
copyat_or_push!(k,3,k3)
copyat_or_push!(k,4,k4)
copyat_or_push!(k,5,k5)
copyat_or_push!(k,6,k6)
copyat_or_push!(k,7,k7)
copyat_or_push!(k,8,k8)
end
if (calcVal2 && length(k)< 11) || calcVal3 # Have not added the extra stages yet
uidx = eachindex(uprev)
rtmp = similar(cache.k1)
@unpack tmp = cache
@unpack c6,c7,c8,a91,a92,a93,a94,a95,a96,a97,a98,a101,a102,a103,a104,a105,a106,a107,a108,a109,a111,a112,a113,a114,a115,a116,a117,a118,a119,a1110 = cache.tab
for i in uidx
tmp[i] = uprev[i]+dt*(a91*k[1][i]+a92*k[2][i]+a93*k[3][i]+a94*k[4][i]+a95*k[5][i]+a96*k[6][i]+a97*k[7][i]+a98*k[8][i])
end
f(t+c6*dt,tmp,rtmp); copyat_or_push!(k,9,rtmp)
for i in uidx
tmp[i] = uprev[i]+dt*(a101*k[1][i]+a102*k[2][i]+a103*k[3][i]+a104*k[4][i]+a105*k[5][i]+a106*k[6][i]+a107*k[7][i]+a108*k[8][i]+a109*k[9][i])
end
f(t+c7*dt,tmp,rtmp); copyat_or_push!(k,10,rtmp)
for i in uidx
tmp[i] = uprev[i]+dt*(a111*k[1][i]+a112*k[2][i]+a113*k[3][i]+a114*k[4][i]+a115*k[5][i]+a116*k[6][i]+a117*k[7][i]+a118*k[8][i]+a119*k[9][i]+a1110*k[10][i])
end
f(t+c8*dt,tmp,rtmp); copyat_or_push!(k,11,rtmp,Val{false})
end
nothing
end
| [
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
15642,
8374,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
15642,
8374,
3103,
18797,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
6322,
20,
3103,
18797,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
27,
19,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
257,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
65,
16,
11,
65,
18,
11,
65,
19,
11,
65,
20,
11,
65,
21,
11,
65,
22,
11,
66,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
66,
21,
796,
12940,
198,
220,
220,
220,
2488,
403,
8002,
288,
16,
11,
67,
18,
11,
67,
19,
11,
67,
20,
11,
67,
21,
11,
67,
22,
796,
12940,
198,
220,
220,
220,
479,
16,
796,
277,
7,
83,
11,
929,
18218,
8,
198,
220,
220,
220,
479,
17,
796,
277,
7,
83,
10,
66,
16,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
2481,
9,
74,
16,
4008,
198,
220,
220,
220,
479,
18,
796,
277,
7,
83,
10,
66,
17,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3132,
9,
74,
16,
10,
64,
2624,
9,
74,
17,
4008,
198,
220,
220,
220,
479,
19,
796,
277,
7,
83,
10,
66,
18,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3901,
9,
74,
16,
10,
64,
3682,
9,
74,
17,
10,
64,
3559,
9,
74,
18,
4008,
198,
220,
220,
220,
479,
20,
796,
277,
7,
83,
10,
66,
19,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
4349,
9,
74,
16,
10,
64,
4309,
9,
74,
17,
10,
64,
4310,
9,
74,
18,
10,
64,
4051,
9,
74,
19,
4008,
198,
220,
220,
220,
479,
21,
796,
277,
7,
83,
10,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
5333,
9,
74,
16,
10,
64,
5237,
9,
74,
17,
10,
64,
5066,
9,
74,
18,
10,
64,
2414,
9,
74,
19,
10,
64,
2996,
9,
74,
20,
4008,
198,
220,
220,
220,
4296,
796,
257,
4869,
9,
74,
16,
10,
64,
4790,
9,
74,
18,
10,
64,
4524,
9,
74,
19,
10,
64,
2425,
9,
74,
20,
10,
64,
4304,
9,
74,
21,
198,
220,
220,
220,
479,
22,
796,
277,
7,
83,
10,
28664,
11,
929,
18218,
10,
28664,
9,
19119,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
19119,
8,
198,
220,
220,
220,
275,
22018,
796,
479,
16,
532,
4296,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
1443,
489,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
19119,
532,
479,
22,
532,
275,
22018,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
67,
16,
9,
74,
16,
10,
67,
18,
9,
74,
18,
10,
67,
19,
9,
74,
19,
10,
67,
20,
9,
74,
20,
10,
67,
21,
9,
74,
21,
10,
67,
22,
9,
74,
22,
8,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
6322,
20,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
27,
19,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
257,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
65,
16,
11,
65,
18,
11,
65,
19,
11,
65,
20,
11,
65,
21,
11,
65,
22,
11,
66,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
66,
21,
796,
12940,
13,
8658,
198,
220,
220,
220,
2488,
403,
8002,
288,
16,
11,
67,
18,
11,
67,
19,
11,
67,
20,
11,
67,
21,
11,
67,
22,
796,
12940,
13,
8658,
198,
220,
220,
220,
2488,
403,
8002,
479,
16,
11,
74,
17,
11,
74,
18,
11,
74,
19,
11,
74,
20,
11,
74,
21,
11,
74,
22,
11,
67,
1072,
62,
22065,
18,
11,
67,
1072,
62,
22065,
19,
11,
19119,
11,
1443,
489,
11,
315,
44725,
11,
22065,
11,
265,
3149,
796,
12940,
198,
220,
220,
220,
334,
312,
87,
796,
1123,
9630,
7,
929,
18218,
8,
198,
220,
220,
220,
277,
7,
83,
11,
929,
18218,
11,
74,
16,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
2481,
9,
74,
16,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
16,
9,
28664,
11,
22065,
11,
74,
17,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3132,
9,
74,
16,
58,
72,
48688,
64,
2624,
9,
74,
17,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
17,
9,
28664,
11,
22065,
11,
74,
18,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3901,
9,
74,
16,
58,
72,
48688,
64,
3682,
9,
74,
17,
58,
72,
48688,
64,
3559,
9,
74,
18,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
18,
9,
28664,
11,
22065,
11,
74,
19,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
929,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4349,
9,
74,
16,
58,
72,
48688,
64,
4309,
9,
74,
17,
58,
72,
48688,
64,
4310,
9,
74,
18,
58,
72,
48688,
64,
4051,
9,
74,
19,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
19,
9,
28664,
11,
22065,
11,
74,
20,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
5333,
9,
74,
16,
58,
72,
48688,
64,
5237,
9,
74,
17,
58,
72,
48688,
64,
5066,
9,
74,
18,
58,
72,
48688,
64,
2414,
9,
74,
19,
58,
72,
48688,
64,
2996,
9,
74,
20,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
21,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
4296,
58,
72,
60,
796,
257,
4869,
9,
74,
16,
58,
72,
48688,
64,
4790,
9,
74,
18,
58,
72,
48688,
64,
4524,
9,
74,
19,
58,
72,
48688,
64,
2425,
9,
74,
20,
58,
72,
48688,
64,
4304,
9,
74,
21,
58,
72,
60,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
19119,
58,
72,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
22,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
19119,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
275,
22018,
58,
72,
60,
796,
479,
16,
58,
72,
60,
532,
4296,
58,
72,
60,
198,
220,
220,
220,
220,
220,
15715,
62,
22065,
18,
58,
72,
60,
796,
4296,
58,
72,
60,
532,
479,
22,
58,
72,
60,
532,
275,
22018,
58,
72,
60,
198,
220,
220,
220,
220,
220,
15715,
62,
22065,
19,
58,
72,
60,
796,
357,
67,
16,
9,
74,
16,
58,
72,
48688,
67,
18,
9,
74,
18,
58,
72,
48688,
67,
19,
9,
74,
19,
58,
72,
48688,
67,
20,
9,
74,
20,
58,
72,
48688,
67,
21,
9,
74,
21,
58,
72,
48688,
67,
22,
9,
74,
22,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
1443,
489,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
67,
1072,
62,
22065,
18,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
67,
1072,
62,
22065,
19,
8,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
6322,
20,
16818,
276,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
27,
19,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
257,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
65,
16,
11,
65,
18,
11,
65,
19,
11,
65,
20,
11,
65,
21,
11,
65,
22,
11,
66,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
66,
21,
796,
12940,
13,
8658,
198,
220,
220,
220,
2488,
403,
8002,
288,
16,
11,
67,
18,
11,
67,
19,
11,
67,
20,
11,
67,
21,
11,
67,
22,
796,
12940,
13,
8658,
198,
220,
220,
220,
2488,
403,
8002,
479,
16,
11,
74,
17,
11,
74,
18,
11,
74,
19,
11,
74,
20,
11,
74,
21,
11,
74,
22,
11,
67,
1072,
62,
22065,
18,
11,
67,
1072,
62,
22065,
19,
11,
19119,
11,
1443,
489,
11,
315,
44725,
11,
22065,
11,
265,
3149,
796,
12940,
198,
220,
220,
220,
334,
312,
87,
796,
1123,
9630,
7,
929,
18218,
8,
198,
220,
220,
220,
277,
7,
83,
11,
929,
18218,
11,
74,
16,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
2481,
9,
74,
16,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
16,
9,
28664,
11,
22065,
11,
74,
17,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3132,
9,
74,
16,
58,
72,
48688,
64,
2624,
9,
74,
17,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
17,
9,
28664,
11,
22065,
11,
74,
18,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3901,
9,
74,
16,
58,
72,
48688,
64,
3682,
9,
74,
17,
58,
72,
48688,
64,
3559,
9,
74,
18,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
18,
9,
28664,
11,
22065,
11,
74,
19,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
929,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4349,
9,
74,
16,
58,
72,
48688,
64,
4309,
9,
74,
17,
58,
72,
48688,
64,
4310,
9,
74,
18,
58,
72,
48688,
64,
4051,
9,
74,
19,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
19,
9,
28664,
11,
22065,
11,
74,
20,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
5333,
9,
74,
16,
58,
72,
48688,
64,
5237,
9,
74,
17,
58,
72,
48688,
64,
5066,
9,
74,
18,
58,
72,
48688,
64,
2414,
9,
74,
19,
58,
72,
48688,
64,
2996,
9,
74,
20,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
21,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
4296,
58,
72,
60,
796,
257,
4869,
9,
74,
16,
58,
72,
48688,
64,
4790,
9,
74,
18,
58,
72,
48688,
64,
4524,
9,
74,
19,
58,
72,
48688,
64,
2425,
9,
74,
20,
58,
72,
48688,
64,
4304,
9,
74,
21,
58,
72,
60,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
19119,
58,
72,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
22,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
19119,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
275,
22018,
58,
72,
60,
796,
479,
16,
58,
72,
60,
532,
4296,
58,
72,
60,
198,
220,
220,
220,
220,
220,
15715,
62,
22065,
18,
58,
72,
60,
796,
4296,
58,
72,
60,
532,
479,
22,
58,
72,
60,
532,
275,
22018,
58,
72,
60,
198,
220,
220,
220,
220,
220,
15715,
62,
22065,
19,
58,
72,
60,
796,
357,
67,
16,
9,
74,
16,
58,
72,
48688,
67,
18,
9,
74,
18,
58,
72,
48688,
67,
19,
9,
74,
19,
58,
72,
48688,
67,
20,
9,
74,
20,
58,
72,
48688,
67,
21,
9,
74,
21,
58,
72,
48688,
67,
22,
9,
74,
22,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
1443,
489,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
67,
1072,
62,
22065,
18,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
67,
1072,
62,
22065,
19,
8,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
33758,
270,
20,
3103,
18797,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
27,
22,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
269,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
66,
21,
11,
64,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4761,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
65,
16,
11,
65,
17,
11,
65,
18,
11,
65,
19,
11,
65,
20,
11,
65,
21,
11,
65,
22,
796,
12940,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
69,
7,
83,
11,
929,
18218,
4008,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
69,
7,
83,
10,
66,
16,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
2481,
9,
74,
58,
16,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
69,
7,
83,
10,
66,
17,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3132,
9,
74,
58,
16,
48688,
64,
2624,
9,
74,
58,
17,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
69,
7,
83,
10,
66,
18,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3901,
9,
74,
58,
16,
48688,
64,
3682,
9,
74,
58,
17,
48688,
64,
3559,
9,
74,
58,
18,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
20,
11,
69,
7,
83,
10,
66,
19,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
4349,
9,
74,
58,
16,
48688,
64,
4309,
9,
74,
58,
17,
48688,
64,
4310,
9,
74,
58,
18,
48688,
64,
4051,
9,
74,
58,
19,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
21,
11,
69,
7,
83,
10,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
5333,
9,
74,
58,
16,
48688,
64,
5237,
9,
74,
58,
17,
48688,
64,
5066,
9,
74,
58,
18,
48688,
64,
2414,
9,
74,
58,
19,
48688,
64,
2996,
9,
74,
58,
20,
60,
22305,
198,
220,
220,
220,
3384,
3149,
796,
510,
18218,
10,
28664,
9,
7,
64,
4869,
9,
74,
58,
16,
48688,
64,
4761,
9,
74,
58,
17,
48688,
64,
4790,
9,
74,
58,
18,
48688,
64,
4524,
9,
74,
58,
19,
48688,
64,
2425,
9,
74,
58,
20,
48688,
64,
4304,
9,
74,
58,
21,
12962,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
22,
11,
69,
7,
83,
10,
28664,
11,
315,
3149,
4008,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
33758,
270,
20,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
27,
22,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
269,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
66,
21,
11,
64,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4761,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
65,
16,
11,
65,
17,
11,
65,
18,
11,
65,
19,
11,
65,
20,
11,
65,
21,
11,
65,
22,
796,
12940,
13,
8658,
198,
220,
220,
220,
2488,
403,
8002,
479,
16,
11,
74,
17,
11,
74,
18,
11,
74,
19,
11,
74,
20,
11,
74,
21,
11,
74,
22,
11,
315,
44725,
11,
22065,
11,
265,
3149,
796,
12940,
198,
220,
220,
220,
334,
312,
87,
796,
1123,
9630,
7,
929,
18218,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
2481,
9,
74,
16,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
16,
9,
28664,
11,
22065,
11,
74,
17,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3132,
9,
74,
16,
58,
72,
48688,
64,
2624,
9,
74,
17,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
17,
9,
28664,
11,
22065,
11,
74,
18,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3901,
9,
74,
16,
58,
72,
48688,
64,
3682,
9,
74,
17,
58,
72,
48688,
64,
3559,
9,
74,
18,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
18,
9,
28664,
11,
22065,
11,
74,
19,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4349,
9,
74,
16,
58,
72,
48688,
64,
4309,
9,
74,
17,
58,
72,
48688,
64,
4310,
9,
74,
18,
58,
72,
48688,
64,
4051,
9,
74,
19,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
19,
9,
28664,
11,
22065,
11,
74,
20,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
5333,
9,
74,
16,
58,
72,
48688,
64,
5237,
9,
74,
17,
58,
72,
48688,
64,
5066,
9,
74,
18,
58,
72,
48688,
64,
2414,
9,
74,
19,
58,
72,
48688,
64,
2996,
9,
74,
20,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
21,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4869,
9,
74,
16,
58,
72,
48688,
64,
4761,
9,
74,
17,
58,
72,
48688,
64,
4790,
9,
74,
18,
58,
72,
48688,
64,
4524,
9,
74,
19,
58,
72,
48688,
64,
2425,
9,
74,
20,
58,
72,
48688,
64,
4304,
9,
74,
21,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
84,
11,
74,
22,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
74,
16,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
74,
17,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
74,
18,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
74,
19,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
20,
11,
74,
20,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
21,
11,
74,
21,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
22,
11,
74,
22,
8,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
37811,
198,
2025,
412,
5632,
5660,
469,
12,
42,
315,
8326,
357,
19,
11,
20,
8,
39645,
416,
350,
13,
33,
519,
441,
72,
290,
406,
13,
37,
13,
2484,
696,
500,
198,
22476,
364,
290,
39448,
351,
26622,
11,
4709,
13,
3933,
11,
1400,
13,
718,
11,
8235,
11,
5468,
1315,
284,
2579,
198,
198,
34,
4262,
284,
751,
262,
3131,
479,
24,
11,
479,
940,
11,
479,
1157,
4831,
329,
262,
8284,
642,
39555,
341,
618,
2622,
198,
37811,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
4462,
20,
3103,
18797,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
1279,
807,
8614,
42302,
7762,
198,
220,
220,
220,
2488,
403,
8002,
269,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
64,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4761,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
64,
6659,
11,
64,
5999,
11,
64,
5705,
11,
64,
5332,
11,
64,
4521,
11,
64,
5774,
11,
65,
5183,
16,
11,
65,
5183,
18,
11,
65,
5183,
19,
11,
65,
5183,
20,
11,
65,
5183,
21,
11,
18347,
44725,
16,
11,
18347,
44725,
17,
11,
18347,
44725,
18,
11,
18347,
44725,
19,
11,
18347,
44725,
20,
11,
18347,
44725,
21,
11,
18347,
44725,
22,
11,
18347,
44725,
23,
796,
12940,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
69,
7,
83,
11,
929,
18218,
4008,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
69,
7,
83,
10,
66,
16,
9,
28664,
11,
929,
18218,
10,
28664,
9,
64,
2481,
9,
74,
58,
16,
60,
4008,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
69,
7,
83,
10,
66,
17,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3132,
9,
74,
58,
16,
48688,
64,
2624,
9,
74,
58,
17,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
69,
7,
83,
10,
66,
18,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
3901,
9,
74,
58,
16,
48688,
64,
3682,
9,
74,
58,
17,
48688,
64,
3559,
9,
74,
58,
18,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
20,
11,
69,
7,
83,
10,
66,
19,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
4349,
9,
74,
58,
16,
48688,
64,
4309,
9,
74,
58,
17,
48688,
64,
4310,
9,
74,
58,
18,
48688,
64,
4051,
9,
74,
58,
19,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
21,
11,
69,
7,
83,
10,
66,
20,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
5333,
9,
74,
58,
16,
48688,
64,
5237,
9,
74,
58,
17,
48688,
64,
5066,
9,
74,
58,
18,
48688,
64,
2414,
9,
74,
58,
19,
48688,
64,
2996,
9,
74,
58,
20,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
22,
11,
69,
7,
83,
10,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
4869,
9,
74,
58,
16,
48688,
64,
4761,
9,
74,
58,
17,
48688,
64,
4790,
9,
74,
58,
18,
48688,
64,
4524,
9,
74,
58,
19,
48688,
64,
2425,
9,
74,
58,
20,
48688,
64,
4304,
9,
74,
58,
21,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
23,
11,
69,
7,
83,
10,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
6659,
9,
74,
58,
16,
48688,
64,
5999,
9,
74,
58,
18,
48688,
64,
5705,
9,
74,
58,
19,
48688,
64,
5332,
9,
74,
58,
20,
48688,
64,
4521,
9,
74,
58,
21,
48688,
64,
5774,
9,
74,
58,
22,
60,
22305,
198,
220,
886,
198,
220,
611,
357,
9948,
66,
7762,
17,
11405,
4129,
7,
74,
8,
27,
1367,
8,
8614,
42302,
7762,
18,
1303,
8192,
407,
2087,
262,
3131,
9539,
1865,
198,
220,
220,
220,
2488,
403,
8002,
269,
21,
11,
66,
22,
11,
66,
23,
11,
64,
6420,
11,
64,
5892,
11,
64,
6052,
11,
64,
5824,
11,
64,
3865,
11,
64,
4846,
11,
64,
5607,
11,
64,
4089,
11,
64,
8784,
11,
64,
15377,
11,
64,
15197,
11,
64,
13464,
11,
64,
13348,
11,
64,
15801,
11,
64,
15982,
11,
64,
15711,
11,
64,
14454,
11,
64,
16243,
11,
64,
14686,
11,
64,
16616,
11,
64,
16562,
11,
64,
15363,
11,
64,
18298,
11,
64,
17657,
11,
64,
16817,
11,
64,
16315,
11,
64,
1157,
940,
796,
12940,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
24,
11,
69,
7,
83,
10,
66,
21,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
6420,
9,
74,
58,
16,
48688,
64,
5892,
9,
74,
58,
17,
48688,
64,
6052,
9,
74,
58,
18,
48688,
64,
5824,
9,
74,
58,
19,
48688,
64,
3865,
9,
74,
58,
20,
48688,
64,
4846,
9,
74,
58,
21,
48688,
64,
5607,
9,
74,
58,
22,
48688,
64,
4089,
9,
74,
58,
23,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
940,
11,
69,
7,
83,
10,
66,
22,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
8784,
9,
74,
58,
16,
48688,
64,
15377,
9,
74,
58,
17,
48688,
64,
15197,
9,
74,
58,
18,
48688,
64,
13464,
9,
74,
58,
19,
48688,
64,
13348,
9,
74,
58,
20,
48688,
64,
15801,
9,
74,
58,
21,
48688,
64,
15982,
9,
74,
58,
22,
48688,
64,
15711,
9,
74,
58,
23,
48688,
64,
14454,
9,
74,
58,
24,
60,
22305,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
1157,
11,
69,
7,
83,
10,
66,
23,
9,
28664,
11,
929,
18218,
10,
28664,
9,
7,
64,
16243,
9,
74,
58,
16,
48688,
64,
14686,
9,
74,
58,
17,
48688,
64,
16616,
9,
74,
58,
18,
48688,
64,
16562,
9,
74,
58,
19,
48688,
64,
15363,
9,
74,
58,
20,
48688,
64,
18298,
9,
74,
58,
21,
48688,
64,
17657,
9,
74,
58,
22,
48688,
64,
16817,
9,
74,
58,
23,
48688,
64,
16315,
9,
74,
58,
24,
48688,
64,
1157,
940,
9,
74,
58,
940,
60,
22305,
198,
220,
886,
198,
220,
2147,
198,
437,
198,
198,
37811,
198,
2025,
412,
5632,
5660,
469,
12,
42,
315,
8326,
357,
19,
11,
20,
8,
39645,
416,
350,
13,
33,
519,
441,
72,
290,
406,
13,
37,
13,
2484,
696,
500,
198,
22476,
364,
290,
39448,
351,
26622,
11,
4709,
13,
3933,
11,
1400,
13,
718,
11,
8235,
11,
5468,
1315,
284,
2579,
198,
198,
34,
4262,
284,
751,
262,
3131,
479,
24,
11,
479,
940,
11,
479,
1157,
4831,
329,
262,
8284,
642,
39555,
341,
618,
2622,
198,
37811,
198,
8818,
267,
2934,
62,
2860,
20214,
0,
90,
9948,
66,
7762,
11,
9948,
66,
7762,
17,
11,
9948,
66,
7762,
18,
92,
7,
74,
11,
83,
11,
929,
18218,
11,
84,
11,
28664,
11,
69,
11,
23870,
3712,
4462,
20,
30562,
11,
33770,
62,
9948,
66,
62,
27471,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
11709,
796,
3254,
90,
9562,
5512,
12154,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
17,
11709,
796,
3254,
90,
7942,
5512,
3174,
62,
9948,
66,
62,
437,
3712,
6030,
90,
7762,
90,
9948,
66,
7762,
18,
11709,
796,
3254,
90,
9562,
30072,
198,
220,
611,
4129,
7,
74,
8,
1279,
807,
8614,
42302,
7762,
198,
220,
220,
220,
334,
312,
87,
796,
1123,
9630,
7,
929,
18218,
8,
198,
220,
220,
220,
2488,
403,
8002,
479,
16,
11,
74,
17,
11,
74,
18,
11,
74,
19,
11,
74,
20,
11,
74,
21,
11,
74,
22,
11,
74,
23,
11,
315,
44725,
11,
84,
5183,
11,
22065,
11,
265,
3149,
11,
265,
76,
457,
44725,
796,
12940,
198,
220,
220,
220,
2488,
403,
8002,
269,
16,
11,
66,
17,
11,
66,
18,
11,
66,
19,
11,
66,
20,
11,
64,
2481,
11,
64,
3132,
11,
64,
2624,
11,
64,
3901,
11,
64,
3682,
11,
64,
3559,
11,
64,
4349,
11,
64,
4309,
11,
64,
4310,
11,
64,
4051,
11,
64,
5333,
11,
64,
5237,
11,
64,
5066,
11,
64,
2414,
11,
64,
2996,
11,
64,
4869,
11,
64,
4761,
11,
64,
4790,
11,
64,
4524,
11,
64,
2425,
11,
64,
4304,
11,
64,
6659,
11,
64,
5999,
11,
64,
5705,
11,
64,
5332,
11,
64,
4521,
11,
64,
5774,
11,
65,
5183,
16,
11,
65,
5183,
18,
11,
65,
5183,
19,
11,
65,
5183,
20,
11,
65,
5183,
21,
11,
18347,
44725,
16,
11,
18347,
44725,
17,
11,
18347,
44725,
18,
11,
18347,
44725,
19,
11,
18347,
44725,
20,
11,
18347,
44725,
21,
11,
18347,
44725,
22,
11,
18347,
44725,
23,
796,
12940,
13,
8658,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
64,
2481,
9,
74,
16,
58,
72,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
16,
9,
28664,
11,
22065,
11,
74,
17,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3132,
9,
74,
16,
58,
72,
48688,
64,
2624,
9,
74,
17,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
17,
9,
28664,
11,
22065,
11,
74,
18,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
3901,
9,
74,
16,
58,
72,
48688,
64,
3682,
9,
74,
17,
58,
72,
48688,
64,
3559,
9,
74,
18,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
18,
9,
28664,
11,
22065,
11,
74,
19,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4349,
9,
74,
16,
58,
72,
48688,
64,
4309,
9,
74,
17,
58,
72,
48688,
64,
4310,
9,
74,
18,
58,
72,
48688,
64,
4051,
9,
74,
19,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
19,
9,
28664,
11,
22065,
11,
74,
20,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
5333,
9,
74,
16,
58,
72,
48688,
64,
5237,
9,
74,
17,
58,
72,
48688,
64,
5066,
9,
74,
18,
58,
72,
48688,
64,
2414,
9,
74,
19,
58,
72,
48688,
64,
2996,
9,
74,
20,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
20,
9,
28664,
11,
22065,
11,
74,
21,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
4869,
9,
74,
16,
58,
72,
48688,
64,
4761,
9,
74,
17,
58,
72,
48688,
64,
4790,
9,
74,
18,
58,
72,
48688,
64,
4524,
9,
74,
19,
58,
72,
48688,
64,
2425,
9,
74,
20,
58,
72,
48688,
64,
4304,
9,
74,
21,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
22065,
11,
74,
22,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
334,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
6659,
9,
74,
16,
58,
72,
48688,
64,
5999,
9,
74,
18,
58,
72,
48688,
64,
5705,
9,
74,
19,
58,
72,
48688,
64,
5332,
9,
74,
20,
58,
72,
48688,
64,
4521,
9,
74,
21,
58,
72,
48688,
64,
5774,
9,
74,
22,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
28664,
11,
84,
11,
74,
23,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
16,
11,
74,
16,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
17,
11,
74,
17,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
18,
11,
74,
18,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
19,
11,
74,
19,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
20,
11,
74,
20,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
21,
11,
74,
21,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
22,
11,
74,
22,
8,
198,
220,
220,
220,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
23,
11,
74,
23,
8,
198,
220,
886,
198,
220,
611,
357,
9948,
66,
7762,
17,
11405,
4129,
7,
74,
8,
27,
1367,
8,
8614,
42302,
7762,
18,
1303,
8192,
407,
2087,
262,
3131,
9539,
1865,
198,
220,
220,
220,
334,
312,
87,
796,
1123,
9630,
7,
929,
18218,
8,
198,
220,
220,
220,
374,
22065,
796,
2092,
7,
23870,
13,
74,
16,
8,
198,
220,
220,
220,
2488,
403,
8002,
45218,
796,
12940,
198,
220,
220,
220,
2488,
403,
8002,
269,
21,
11,
66,
22,
11,
66,
23,
11,
64,
6420,
11,
64,
5892,
11,
64,
6052,
11,
64,
5824,
11,
64,
3865,
11,
64,
4846,
11,
64,
5607,
11,
64,
4089,
11,
64,
8784,
11,
64,
15377,
11,
64,
15197,
11,
64,
13464,
11,
64,
13348,
11,
64,
15801,
11,
64,
15982,
11,
64,
15711,
11,
64,
14454,
11,
64,
16243,
11,
64,
14686,
11,
64,
16616,
11,
64,
16562,
11,
64,
15363,
11,
64,
18298,
11,
64,
17657,
11,
64,
16817,
11,
64,
16315,
11,
64,
1157,
940,
796,
12940,
13,
8658,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
6420,
9,
74,
58,
16,
7131,
72,
48688,
64,
5892,
9,
74,
58,
17,
7131,
72,
48688,
64,
6052,
9,
74,
58,
18,
7131,
72,
48688,
64,
5824,
9,
74,
58,
19,
7131,
72,
48688,
64,
3865,
9,
74,
58,
20,
7131,
72,
48688,
64,
4846,
9,
74,
58,
21,
7131,
72,
48688,
64,
5607,
9,
74,
58,
22,
7131,
72,
48688,
64,
4089,
9,
74,
58,
23,
7131,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
21,
9,
28664,
11,
22065,
11,
17034,
3149,
1776,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
24,
11,
17034,
3149,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
8784,
9,
74,
58,
16,
7131,
72,
48688,
64,
15377,
9,
74,
58,
17,
7131,
72,
48688,
64,
15197,
9,
74,
58,
18,
7131,
72,
48688,
64,
13464,
9,
74,
58,
19,
7131,
72,
48688,
64,
13348,
9,
74,
58,
20,
7131,
72,
48688,
64,
15801,
9,
74,
58,
21,
7131,
72,
48688,
64,
15982,
9,
74,
58,
22,
7131,
72,
48688,
64,
15711,
9,
74,
58,
23,
7131,
72,
48688,
64,
14454,
9,
74,
58,
24,
7131,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
22,
9,
28664,
11,
22065,
11,
17034,
3149,
1776,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
940,
11,
17034,
3149,
8,
198,
220,
220,
220,
329,
1312,
287,
334,
312,
87,
198,
220,
220,
220,
220,
220,
45218,
58,
72,
60,
796,
510,
18218,
58,
72,
48688,
28664,
9,
7,
64,
16243,
9,
74,
58,
16,
7131,
72,
48688,
64,
14686,
9,
74,
58,
17,
7131,
72,
48688,
64,
16616,
9,
74,
58,
18,
7131,
72,
48688,
64,
16562,
9,
74,
58,
19,
7131,
72,
48688,
64,
15363,
9,
74,
58,
20,
7131,
72,
48688,
64,
18298,
9,
74,
58,
21,
7131,
72,
48688,
64,
17657,
9,
74,
58,
22,
7131,
72,
48688,
64,
16817,
9,
74,
58,
23,
7131,
72,
48688,
64,
16315,
9,
74,
58,
24,
7131,
72,
48688,
64,
1157,
940,
9,
74,
58,
940,
7131,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
277,
7,
83,
10,
66,
23,
9,
28664,
11,
22065,
11,
17034,
3149,
1776,
4866,
265,
62,
273,
62,
14689,
0,
7,
74,
11,
1157,
11,
17034,
3149,
11,
7762,
90,
9562,
30072,
198,
220,
886,
198,
220,
2147,
198,
437,
198
] | 1.614442 | 7,423 |
export compose_rotation
################################################################################
# Compose Rotations
################################################################################
"""
@inline function compose_rotation(R1, [, R2, R3, R4, R5, ...])
Compute a composed rotation using the rotations `R1`, `R2`, `R3`, `R4`, ..., in
the following order:
First rotation
|
|
R1 => R2 => R3 => R4 => ...
|
|
Second rotation
The rotations can be described by Direction Cosine Matrices or Quaternions.
Notice, however, that all rotations **must be** of the same type (DCM or
quaternion).
The output will have the same type as the inputs (DCM or quaternion).
# Example
```julia-repl
julia> D1 = angle2dcm(+pi/3,+pi/4,+pi/5,:ZYX);
julia> D2 = angle2dcm(-pi/5,-pi/4,-pi/3,:XYZ);
julia> compose_rotation(D1,D2)
3×3 StaticArrays.SArray{Tuple{3,3},Float64,2,9}:
1.0 0.0 5.55112e-17
0.0 1.0 5.55112e-17
5.55112e-17 5.55112e-17 1.0
julia> q1 = angle2quat(+pi/3,+pi/4,+pi/5,:ZYX);
julia> q2 = angle2quat(-pi/5,-pi/4,-pi/3,:XYZ);
julia> compose_rotation(q1,q2)
Quaternion{Float64}:
+ 1.0 + 0.0.i + 2.0816681711721685e-17.j + 5.551115123125783e-17.k
```
"""
@inline compose_rotation(D::DCM) = D
@inline compose_rotation(D::DCM, Ds::DCM...) = compose_rotation(Ds...)*D
@inline compose_rotation(q::Quaternion) = q
@inline compose_rotation(q::Quaternion, qs::Quaternion...) =
q*compose_rotation(qs...)
# This algorithm was proposed by @Per in
#
# https://discourse.julialang.org/t/improve-the-performance-of-multiplication-of-an-arbitrary-number-of-matrices/10835/24
| [
39344,
36664,
62,
10599,
341,
198,
198,
29113,
29113,
14468,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3082,
577,
18481,
602,
198,
29113,
29113,
14468,
198,
198,
37811,
198,
220,
220,
220,
2488,
45145,
2163,
36664,
62,
10599,
341,
7,
49,
16,
11,
685,
11,
371,
17,
11,
371,
18,
11,
371,
19,
11,
371,
20,
11,
2644,
12962,
198,
198,
7293,
1133,
257,
13160,
13179,
1262,
262,
5724,
602,
4600,
49,
16,
47671,
4600,
49,
17,
47671,
4600,
49,
18,
47671,
4600,
49,
19,
47671,
2644,
11,
287,
198,
1169,
1708,
1502,
25,
628,
220,
220,
220,
220,
3274,
13179,
198,
220,
220,
220,
220,
930,
198,
220,
220,
220,
220,
930,
198,
220,
220,
220,
371,
16,
5218,
371,
17,
5218,
371,
18,
5218,
371,
19,
5218,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5498,
13179,
198,
198,
464,
5724,
602,
460,
307,
3417,
416,
41837,
10437,
500,
6550,
45977,
393,
2264,
9205,
507,
13,
198,
26396,
11,
2158,
11,
326,
477,
5724,
602,
12429,
27238,
307,
1174,
286,
262,
976,
2099,
357,
9697,
44,
393,
198,
421,
9205,
295,
737,
198,
198,
464,
5072,
481,
423,
262,
976,
2099,
355,
262,
17311,
357,
9697,
44,
393,
627,
9205,
295,
737,
198,
198,
2,
17934,
198,
198,
15506,
63,
73,
43640,
12,
35666,
198,
73,
43640,
29,
360,
16,
796,
9848,
17,
67,
11215,
7,
10,
14415,
14,
18,
11,
10,
14415,
14,
19,
11,
10,
14415,
14,
20,
11,
25,
57,
56,
55,
1776,
198,
198,
73,
43640,
29,
360,
17,
796,
9848,
17,
67,
11215,
32590,
14415,
14,
20,
12095,
14415,
14,
19,
12095,
14415,
14,
18,
11,
25,
34278,
57,
1776,
198,
198,
73,
43640,
29,
36664,
62,
10599,
341,
7,
35,
16,
11,
35,
17,
8,
198,
18,
12906,
18,
36125,
3163,
20477,
13,
50,
19182,
90,
51,
29291,
90,
18,
11,
18,
5512,
43879,
2414,
11,
17,
11,
24,
38362,
198,
352,
13,
15,
220,
220,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
13,
2816,
14686,
68,
12,
1558,
198,
657,
13,
15,
220,
220,
220,
220,
220,
220,
220,
220,
220,
352,
13,
15,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
13,
2816,
14686,
68,
12,
1558,
198,
642,
13,
2816,
14686,
68,
12,
1558,
220,
642,
13,
2816,
14686,
68,
12,
1558,
220,
352,
13,
15,
198,
198,
73,
43640,
29,
10662,
16,
796,
9848,
17,
421,
265,
7,
10,
14415,
14,
18,
11,
10,
14415,
14,
19,
11,
10,
14415,
14,
20,
11,
25,
57,
56,
55,
1776,
198,
198,
73,
43640,
29,
10662,
17,
796,
9848,
17,
421,
265,
32590,
14415,
14,
20,
12095,
14415,
14,
19,
12095,
14415,
14,
18,
11,
25,
34278,
57,
1776,
198,
198,
73,
43640,
29,
36664,
62,
10599,
341,
7,
80,
16,
11,
80,
17,
8,
198,
4507,
9205,
295,
90,
43879,
2414,
38362,
198,
220,
1343,
352,
13,
15,
1343,
657,
13,
15,
13,
72,
1343,
362,
13,
2919,
1433,
3104,
1558,
1157,
4761,
1433,
5332,
68,
12,
1558,
13,
73,
1343,
642,
13,
2816,
1157,
1314,
10163,
1065,
3553,
5999,
68,
12,
1558,
13,
74,
198,
15506,
63,
198,
198,
37811,
198,
31,
45145,
36664,
62,
10599,
341,
7,
35,
3712,
9697,
44,
8,
796,
360,
198,
31,
45145,
36664,
62,
10599,
341,
7,
35,
3712,
9697,
44,
11,
360,
82,
3712,
9697,
44,
23029,
796,
36664,
62,
10599,
341,
7,
30832,
23029,
9,
35,
198,
198,
31,
45145,
36664,
62,
10599,
341,
7,
80,
3712,
4507,
9205,
295,
8,
796,
10662,
198,
31,
45145,
36664,
62,
10599,
341,
7,
80,
3712,
4507,
9205,
295,
11,
10662,
82,
3712,
4507,
9205,
295,
23029,
796,
198,
220,
220,
220,
10662,
9,
785,
3455,
62,
10599,
341,
7,
48382,
23029,
198,
198,
2,
770,
11862,
373,
5150,
416,
2488,
5990,
287,
198,
2,
198,
2,
220,
220,
3740,
1378,
15410,
9047,
13,
73,
377,
498,
648,
13,
2398,
14,
83,
14,
49453,
12,
1169,
12,
26585,
12,
1659,
12,
47945,
3299,
12,
1659,
12,
272,
12,
283,
2545,
11619,
12,
17618,
12,
1659,
12,
6759,
45977,
14,
15711,
2327,
14,
1731,
198
] | 2.296791 | 748 |
abstract type Analysis end
struct FlowAnalysis <: Analysis
reach::Dict
ancestors::Dict
sites::Set{Variable}
addrs::Set{Any}
map::Dict
inv::Dict
loops
ir::IR
end
@inline function get_successors(ra::FlowAnalysis, var)
haskey(ra.reach, var) || return []
ra.reach[var]
end
@inline function get_ancestors(ra::FlowAnalysis, var)
haskey(ra.ancestors, var) || return []
ra.ancestors[var]
end
@inline function get_variable_by_address(ra::FlowAnalysis, addr)
haskey(ra.inv, addr) || return (nothing, false)
return (getfield(ra, :inv)[addr], true)
end
function Base.display(ra::FlowAnalysis)
println(" __________________________________\n")
println(" IR Reference\n")
display(ra.ir)
println("\n ------------ Loops ------------\n")
display(ra.loops)
println("\n ------------ Addresses ------------\n")
println(ra.addrs)
println()
println(" ------------ Variable to address ------------\n")
display(ra.map)
println()
println(" ------------ Address to variable ------------\n")
display(ra.inv)
println("\n ------------ Reachability ------------\n")
for x in ra.sites
haskey(ra.reach, x) ? println(" $x => $(ra.reach[x])") : println(" $x")
end
println("\n ------------ Ancestors ------------\n")
for x in ra.sites
haskey(ra.ancestors, x) ? println(" $x => $(ra.ancestors[x])") : println(" $x")
end
println(" __________________________________\n")
end
mutable struct CallGraph <: Analysis
addresses::Set{Address}
dependencies::Dict{Address, Set{Address}}
CallGraph(addrs, map) = new(addrs, map)
CallGraph() = new(Dict{Address, Set{Address}}())
end
function Base.display(cg::CallGraph)
println(" __________________________________\n")
println(" Dependencies\n")
for x in cg.addresses
haskey(cg.dependencies, x) ? println(" $x => $(cg.dependencies[x])") : println(" $x")
end
println(" __________________________________\n")
end
# Reaching analysis.
function reaching!(reach::Vector{Variable}, p, var, ir)
for (v, st) in ir
st.expr isa Expr && begin
if var in st.expr.args
push!(reach, v)
reaching!(reach, p, v, ir)
end
end
end
end
function reaching(var::Variable, ir)
reach = Variable[]
for (v, st) in ir
st.expr isa Expr && begin
if var in st.expr.args
push!(reach, v)
reaching!(reach, var, v, ir)
end
end
end
return reach
end
function transitive_closure!(work, reach, s)
for (k, v) in reach
if s in v && k != s
push!(work, k)
transitive_closure!(work, reach, k)
end
end
end
function flow_analysis(ir)
sites = Set(Variable[])
addrs = Set(Any[])
var_addr_map = Dict{Variable, Any}()
reach = Dict{Variable, Any}()
for (v, st) in ir
MacroTools.postwalk(st) do e
@capture(e, call_(sym_, args__))
if call isa GlobalRef && call.name == :trace
push!(sites, v)
if sym isa QuoteNode
sym = sym.value
end
push!(addrs, sym)
var_addr_map[v] = sym
reach[v] = Set(reaching(v, ir))
elseif call == trace
push!(sites, v)
push!(addrs, unwrap(sym))
var_addr_map[v] = unwrap(sym)
reach[v] = Set(reaching(v, ir))
else
push!(sites, v)
reach[v] = Set(reaching(v, ir))
end
e
end
end
ancestors = Dict()
for s in sites
work = Set(Variable[])
for (k, v) in reach
s in v && begin
push!(work, k)
transitive_closure!(work, reach, k)
end
end
ancestors[s] = work
end
return FlowAnalysis(reach, ancestors, sites, addrs, var_addr_map, Dict( v => k for (k, v) in var_addr_map), detectloops(ir), ir)
end
function dependency(a::Analysis)
map = Dict{Any, Set{Any}}()
for (k, vars) in a.reach
depends = Any[]
for v in vars
haskey(a.map, v) && push!(depends, a.map[v].value)
end
map[a.map[k].value] = Set(depends)
end
addrs = [i.value for i in a.addrs]
return CallGraph(Set(addrs), map)
end
# ------------ Driver ------------ #
# Returns the dependency analysis in call graph (tree) form.
function construct_graph!(parent, addr, call, type)
ir = lower_to_ir(call, type)
if control_flow_check(ir)
graph = CallGraph()
else
analysis = flow_analysis(ir)
dependencies = dependency(analysis)
graph = CallGraph(dependencies)
end
parent[addr] = graph
end
function construct_graph(ir::IRTools.IR)
if !control_flow_check(ir)
graph = CallGraph()
else
analysis = flow_analysis(ir)
dependencies = dependency(analysis)
graph = dependencies
end
return graph
end
# Toplevel analysis driver.
function construct_graph(call::Function, type...)
ir = lower_to_ir(call, type...)
construct_graph(ir)
end
function construct_graph(call::Function)
ir = lower_to_ir(call)
construct_graph(ir)
end
| [
397,
8709,
2099,
14691,
886,
198,
198,
7249,
27782,
32750,
1279,
25,
14691,
198,
220,
220,
220,
3151,
3712,
35,
713,
198,
220,
220,
220,
18668,
3712,
35,
713,
198,
220,
220,
220,
5043,
3712,
7248,
90,
43015,
92,
198,
220,
220,
220,
751,
3808,
3712,
7248,
90,
7149,
92,
198,
220,
220,
220,
3975,
3712,
35,
713,
198,
220,
220,
220,
800,
3712,
35,
713,
198,
220,
220,
220,
23607,
198,
220,
220,
220,
4173,
3712,
4663,
198,
437,
198,
198,
31,
45145,
2163,
651,
62,
13138,
669,
7,
430,
3712,
37535,
32750,
11,
1401,
8,
198,
220,
220,
220,
468,
2539,
7,
430,
13,
16250,
11,
1401,
8,
8614,
1441,
17635,
198,
220,
220,
220,
2179,
13,
16250,
58,
7785,
60,
198,
437,
198,
198,
31,
45145,
2163,
651,
62,
1192,
395,
669,
7,
430,
3712,
37535,
32750,
11,
1401,
8,
198,
220,
220,
220,
468,
2539,
7,
430,
13,
1192,
395,
669,
11,
1401,
8,
8614,
1441,
17635,
198,
220,
220,
220,
2179,
13,
1192,
395,
669,
58,
7785,
60,
198,
437,
198,
198,
31,
45145,
2163,
651,
62,
45286,
62,
1525,
62,
21975,
7,
430,
3712,
37535,
32750,
11,
37817,
8,
198,
220,
220,
220,
468,
2539,
7,
430,
13,
16340,
11,
37817,
8,
8614,
1441,
357,
22366,
11,
3991,
8,
198,
220,
220,
220,
1441,
357,
1136,
3245,
7,
430,
11,
1058,
16340,
38381,
29851,
4357,
2081,
8,
198,
437,
198,
198,
8818,
7308,
13,
13812,
7,
430,
3712,
37535,
32750,
8,
198,
220,
220,
220,
44872,
7203,
220,
10221,
834,
59,
77,
4943,
198,
220,
220,
220,
44872,
7203,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14826,
20984,
59,
77,
4943,
198,
220,
220,
220,
3359,
7,
430,
13,
343,
8,
198,
220,
220,
220,
44872,
7203,
59,
77,
220,
10541,
6706,
2840,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
3359,
7,
430,
13,
5439,
2840,
8,
198,
220,
220,
220,
44872,
7203,
59,
77,
220,
10541,
3060,
16746,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
44872,
7,
430,
13,
2860,
3808,
8,
198,
220,
220,
220,
44872,
3419,
198,
220,
220,
220,
44872,
7203,
220,
10541,
35748,
284,
2209,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
3359,
7,
430,
13,
8899,
8,
198,
220,
220,
220,
44872,
3419,
198,
220,
220,
220,
44872,
7203,
220,
10541,
17917,
284,
7885,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
3359,
7,
430,
13,
16340,
8,
198,
220,
220,
220,
44872,
7203,
59,
77,
220,
10541,
25146,
1799,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
329,
2124,
287,
2179,
13,
49315,
198,
220,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
430,
13,
16250,
11,
2124,
8,
5633,
44872,
7203,
720,
87,
5218,
29568,
430,
13,
16250,
58,
87,
12962,
4943,
1058,
44872,
7203,
720,
87,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44872,
7203,
59,
77,
220,
10541,
31200,
669,
220,
10541,
59,
77,
4943,
198,
220,
220,
220,
329,
2124,
287,
2179,
13,
49315,
198,
220,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
430,
13,
1192,
395,
669,
11,
2124,
8,
5633,
44872,
7203,
720,
87,
5218,
29568,
430,
13,
1192,
395,
669,
58,
87,
12962,
4943,
1058,
44872,
7203,
720,
87,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44872,
7203,
220,
10221,
834,
59,
77,
4943,
198,
437,
198,
198,
76,
18187,
2878,
4889,
37065,
1279,
25,
14691,
198,
220,
220,
220,
9405,
3712,
7248,
90,
20231,
92,
198,
220,
220,
220,
20086,
3712,
35,
713,
90,
20231,
11,
5345,
90,
20231,
11709,
198,
220,
220,
220,
4889,
37065,
7,
2860,
3808,
11,
3975,
8,
796,
649,
7,
2860,
3808,
11,
3975,
8,
198,
220,
220,
220,
4889,
37065,
3419,
796,
649,
7,
35,
713,
90,
20231,
11,
5345,
90,
20231,
11709,
28955,
198,
437,
198,
198,
8818,
7308,
13,
13812,
7,
66,
70,
3712,
14134,
37065,
8,
198,
220,
220,
220,
44872,
7203,
220,
220,
10221,
834,
59,
77,
4943,
198,
220,
220,
220,
44872,
7203,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37947,
3976,
59,
77,
4943,
198,
220,
220,
220,
329,
2124,
287,
269,
70,
13,
2860,
16746,
198,
220,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
66,
70,
13,
45841,
3976,
11,
2124,
8,
5633,
44872,
7203,
720,
87,
5218,
29568,
66,
70,
13,
45841,
3976,
58,
87,
12962,
4943,
1058,
44872,
7203,
720,
87,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44872,
7203,
220,
220,
10221,
834,
59,
77,
4943,
198,
437,
198,
198,
2,
797,
8103,
3781,
13,
198,
8818,
8978,
0,
7,
16250,
3712,
38469,
90,
43015,
5512,
279,
11,
1401,
11,
4173,
8,
198,
220,
220,
220,
329,
357,
85,
11,
336,
8,
287,
4173,
198,
220,
220,
220,
220,
220,
220,
220,
336,
13,
31937,
318,
64,
1475,
1050,
11405,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1401,
287,
336,
13,
31937,
13,
22046,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
16250,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8978,
0,
7,
16250,
11,
279,
11,
410,
11,
4173,
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,
8818,
8978,
7,
7785,
3712,
43015,
11,
4173,
8,
198,
220,
220,
220,
3151,
796,
35748,
21737,
198,
220,
220,
220,
329,
357,
85,
11,
336,
8,
287,
4173,
198,
220,
220,
220,
220,
220,
220,
220,
336,
13,
31937,
318,
64,
1475,
1050,
11405,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1401,
287,
336,
13,
31937,
13,
22046,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
16250,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8978,
0,
7,
16250,
11,
1401,
11,
410,
11,
4173,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
3151,
198,
437,
198,
198,
8818,
1007,
1800,
62,
17966,
0,
7,
1818,
11,
3151,
11,
264,
8,
198,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
3151,
198,
220,
220,
220,
220,
220,
220,
220,
611,
264,
287,
410,
11405,
479,
14512,
264,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
1818,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1007,
1800,
62,
17966,
0,
7,
1818,
11,
3151,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
5202,
62,
20930,
7,
343,
8,
198,
220,
220,
220,
5043,
796,
5345,
7,
43015,
58,
12962,
198,
220,
220,
220,
751,
3808,
796,
5345,
7,
7149,
58,
12962,
198,
220,
220,
220,
1401,
62,
29851,
62,
8899,
796,
360,
713,
90,
43015,
11,
4377,
92,
3419,
198,
220,
220,
220,
3151,
796,
360,
713,
90,
43015,
11,
4377,
92,
3419,
198,
220,
220,
220,
329,
357,
85,
11,
336,
8,
287,
4173,
198,
220,
220,
220,
220,
220,
220,
220,
42755,
33637,
13,
7353,
11152,
7,
301,
8,
466,
304,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
27144,
495,
7,
68,
11,
869,
41052,
37047,
62,
11,
26498,
834,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
869,
318,
64,
8060,
8134,
11405,
869,
13,
3672,
6624,
1058,
40546,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
49315,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5659,
318,
64,
19879,
19667,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5659,
796,
5659,
13,
8367,
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,
2860,
3808,
11,
5659,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1401,
62,
29851,
62,
8899,
58,
85,
60,
796,
5659,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3151,
58,
85,
60,
796,
5345,
7,
30771,
7,
85,
11,
4173,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
361,
869,
6624,
12854,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
49315,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
2860,
3808,
11,
7379,
2416,
7,
37047,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1401,
62,
29851,
62,
8899,
58,
85,
60,
796,
7379,
2416,
7,
37047,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3151,
58,
85,
60,
796,
5345,
7,
30771,
7,
85,
11,
4173,
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,
49315,
11,
410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3151,
58,
85,
60,
796,
5345,
7,
30771,
7,
85,
11,
4173,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
18668,
796,
360,
713,
3419,
198,
220,
220,
220,
329,
264,
287,
5043,
198,
220,
220,
220,
220,
220,
220,
220,
670,
796,
5345,
7,
43015,
58,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
329,
357,
74,
11,
410,
8,
287,
3151,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
287,
410,
11405,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
1818,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1007,
1800,
62,
17966,
0,
7,
1818,
11,
3151,
11,
479,
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,
18668,
58,
82,
60,
796,
670,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
27782,
32750,
7,
16250,
11,
18668,
11,
5043,
11,
751,
3808,
11,
1401,
62,
29851,
62,
8899,
11,
360,
713,
7,
410,
5218,
479,
329,
357,
74,
11,
410,
8,
287,
1401,
62,
29851,
62,
8899,
828,
4886,
5439,
2840,
7,
343,
828,
4173,
8,
198,
437,
198,
198,
8818,
20203,
7,
64,
3712,
32750,
8,
198,
220,
220,
220,
3975,
796,
360,
713,
90,
7149,
11,
5345,
90,
7149,
11709,
3419,
198,
220,
220,
220,
329,
357,
74,
11,
410,
945,
8,
287,
257,
13,
16250,
198,
220,
220,
220,
220,
220,
220,
220,
8338,
796,
4377,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
329,
410,
287,
410,
945,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
64,
13,
8899,
11,
410,
8,
11405,
4574,
0,
7,
10378,
2412,
11,
257,
13,
8899,
58,
85,
4083,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
3975,
58,
64,
13,
8899,
58,
74,
4083,
8367,
60,
796,
5345,
7,
10378,
2412,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
751,
3808,
796,
685,
72,
13,
8367,
329,
1312,
287,
257,
13,
2860,
3808,
60,
198,
220,
220,
220,
1441,
4889,
37065,
7,
7248,
7,
2860,
3808,
828,
3975,
8,
198,
437,
198,
198,
2,
220,
10541,
12434,
220,
10541,
1303,
198,
198,
2,
16409,
262,
20203,
3781,
287,
869,
4823,
357,
21048,
8,
1296,
13,
198,
8818,
5678,
62,
34960,
0,
7,
8000,
11,
37817,
11,
869,
11,
2099,
8,
198,
220,
220,
220,
4173,
796,
2793,
62,
1462,
62,
343,
7,
13345,
11,
2099,
8,
198,
220,
220,
220,
611,
1630,
62,
11125,
62,
9122,
7,
343,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4823,
796,
4889,
37065,
3419,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
3781,
796,
5202,
62,
20930,
7,
343,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20086,
796,
20203,
7,
20930,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4823,
796,
4889,
37065,
7,
45841,
3976,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2560,
58,
29851,
60,
796,
4823,
198,
437,
198,
198,
8818,
5678,
62,
34960,
7,
343,
3712,
4663,
33637,
13,
4663,
8,
198,
220,
220,
220,
611,
5145,
13716,
62,
11125,
62,
9122,
7,
343,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4823,
796,
4889,
37065,
3419,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
3781,
796,
5202,
62,
20930,
7,
343,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20086,
796,
20203,
7,
20930,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4823,
796,
20086,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
4823,
198,
437,
198,
198,
2,
309,
643,
626,
3781,
4639,
13,
220,
198,
8818,
5678,
62,
34960,
7,
13345,
3712,
22203,
11,
2099,
23029,
198,
220,
220,
220,
4173,
796,
2793,
62,
1462,
62,
343,
7,
13345,
11,
2099,
23029,
198,
220,
220,
220,
5678,
62,
34960,
7,
343,
8,
198,
437,
198,
198,
8818,
5678,
62,
34960,
7,
13345,
3712,
22203,
8,
198,
220,
220,
220,
4173,
796,
2793,
62,
1462,
62,
343,
7,
13345,
8,
198,
220,
220,
220,
5678,
62,
34960,
7,
343,
8,
198,
437,
198
] | 2.205086 | 2,438 |
module RocketSyncActorTest
using Test
using Rocket
@testset "SyncActor" begin
println("Testing: actor SyncActor")
@testset begin
actor = KeepActor{Int}()
synced = SyncActor{Int, KeepActor{Int}}(actor)
source = interval(1) |> take(5)
subscribe!(source, synced)
wait(synced)
@test actor.values == [ 0, 1, 2, 3, 4 ]
end
@testset begin
@test sync(void(Int)) isa SyncActor{Int, VoidActor{Int}}
end
@testset begin
values = Int[]
factory = lambda(on_next = (d) -> push!(values, d))
synced = sync(factory)
subscribe!(interval(1) |> take(5), synced)
wait(synced)
@test values == [ 0, 1, 2, 3, 4 ]
end
@testset begin
completions = []
factory = lambda(on_complete = () -> push!(completions, 1))
synced = sync(factory)
subscribe!(completed(), synced)
wait(synced)
@test completions == [ 1 ]
end
@testset begin
errors = []
factory = lambda(on_error = (d) -> push!(errors, d))
synced = sync(factory)
subscribe!(faulted("e"), synced)
wait(synced)
@test errors == [ "e" ]
end
@testset begin
source = never(Int)
actor = sync(void(Int), timeout = 100)
subscribe!(source, actor)
@test_throws SyncActorTimedOutException wait(actor)
end
struct DummyActor end
@testset begin
@test_throws InvalidActorTraitUsageError sync(DummyActor())
end
end
end
| [
21412,
16920,
28985,
40277,
14402,
198,
198,
3500,
6208,
198,
3500,
16920,
198,
198,
31,
9288,
2617,
366,
28985,
40277,
1,
2221,
628,
220,
220,
220,
44872,
7203,
44154,
25,
8674,
35908,
40277,
4943,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
8674,
220,
796,
9175,
40277,
90,
5317,
92,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
6171,
771,
796,
35908,
40277,
90,
5317,
11,
9175,
40277,
90,
5317,
11709,
7,
11218,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2723,
796,
16654,
7,
16,
8,
930,
29,
1011,
7,
20,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12383,
0,
7,
10459,
11,
6171,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
4043,
7,
28869,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
8674,
13,
27160,
6624,
685,
657,
11,
352,
11,
362,
11,
513,
11,
604,
2361,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
17510,
7,
19382,
7,
5317,
4008,
318,
64,
35908,
40277,
90,
5317,
11,
18331,
40277,
90,
5317,
11709,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
796,
2558,
21737,
628,
220,
220,
220,
220,
220,
220,
220,
8860,
220,
796,
37456,
7,
261,
62,
19545,
796,
357,
67,
8,
4613,
4574,
0,
7,
27160,
11,
288,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
6171,
771,
220,
220,
796,
17510,
7,
69,
9548,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12383,
0,
7,
3849,
2100,
7,
16,
8,
930,
29,
1011,
7,
20,
828,
6171,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
4043,
7,
28869,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
3815,
6624,
685,
657,
11,
352,
11,
362,
11,
513,
11,
604,
2361,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1224,
45240,
796,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
8860,
220,
796,
37456,
7,
261,
62,
20751,
796,
7499,
4613,
4574,
0,
7,
785,
37069,
507,
11,
352,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
6171,
771,
220,
220,
796,
17510,
7,
69,
9548,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12383,
0,
7,
785,
16838,
22784,
6171,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
4043,
7,
28869,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
1224,
45240,
6624,
685,
352,
2361,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
8563,
796,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
8860,
220,
796,
37456,
7,
261,
62,
18224,
796,
357,
67,
8,
4613,
4574,
0,
7,
48277,
11,
288,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
6171,
771,
220,
220,
796,
17510,
7,
69,
9548,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12383,
0,
7,
69,
1721,
276,
7203,
68,
12340,
6171,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
4043,
7,
28869,
771,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
8563,
6624,
685,
366,
68,
1,
2361,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
2723,
796,
1239,
7,
5317,
8,
198,
220,
220,
220,
220,
220,
220,
220,
8674,
220,
796,
17510,
7,
19382,
7,
5317,
828,
26827,
796,
1802,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12383,
0,
7,
10459,
11,
8674,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
62,
400,
8516,
35908,
40277,
14967,
276,
7975,
16922,
4043,
7,
11218,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2878,
360,
13513,
40277,
886,
628,
220,
220,
220,
2488,
9288,
2617,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
62,
400,
8516,
17665,
40277,
51,
12907,
28350,
12331,
17510,
7,
35,
13513,
40277,
28955,
198,
220,
220,
220,
886,
198,
437,
198,
198,
437,
198
] | 2.208158 | 711 |
using LinearAlgebra
inner_product(V1::Vector,V2::Vector,η::Matrix) = (adjoint(V2)*η*V1)[1]
inner_product(V::Vector,η::Matrix) = (adjoint(V)*η*V)[1]
function normalization!(V::Matrix,i::Int,η::Matrix)
c = inner_product(V[:,i],η)
if abs(c) < 1E-8
nothing
else
V[:,i] .= V[:,i]./sqrt(c)
end
end
function gram_schmit(V::Matrix,s::Int,e::Int,η::Matrix)
# V_1' = V_1
normalization!(V,s,η)
for i = s+1:1:e
for j = s:1:i-1
V[:,i] .-= inner_product(V[:,i],V[:,j],η).*V[:,j]
end
normalization!(V,i,η)
end
return V
end
generate_metric(N::Int) = diagm(vcat([1.0 for i=1:N],[-1.0 for i=1:N]))
function process_complex!(tS::Vector,tV::Matrix)
tS .= real.(tS)
flag = 1
for i = 1:size(tV)[1]
if sum(abs.(imag.(tV[:,i])))!=0
if flag % 2 != 0
tV[:,i] .= 2.0 .*real.(tV[:,i])
else
tV[:,i] .= 2.0 .*imag.(tV[:,i])
end
flag = flag+1
end
end
tV .= real(tV)
end
function recanonicalize(h::Matrix,hamiltonian_type::String;tol=1E-10)
N = Int(size(h)[1]/2)
η = generate_metric(N)
ih = η*h
# S, V = eigen(h) # #TODO: EXPALIN IN MEETING S = [-3.454206332875306e-11, -3.4541994235883824e-11, 9.135733651675401e-8, 9.135733809775541e-8, 0.9999999999999786, 0.9999999999999795, 1.0000000000000218, 1.000000000000022]
# @show S
tS,tV = eigen(ih) # this step will give complex tS and tV.... let's deal with them....
process_complex!(tS,tV)
tS,tV = real(tS),real(tV)
S,V = copy(tS),copy(tV)
for i = 1:N
S[i] = tS[N+i]
S[N+i] = tS[i]
V[:,i] .= tV[:,N+i]
V[:,N+i] .= tV[:,i]
end #re sort eigen value from 0->large->0->small
start_flag = 1
end_flag = 1
while start_flag <= N
end_flag = start_flag
for i = start_flag+1:N
if real(S[start_flag]-S[i]) < tol
end_flag = i
else
break
end
end
if start_flag!= end_flag
V = gram_schmit(V,start_flag,end_flag,η)
else
normalization!(V,start_flag,η)
end
start_flag = end_flag+1
end
if hamiltonian_type == "Symmetry"
V[1:N,N+1:2N] .= conj.(V[N+1:2N,1:N])
V[N+1:2N,N+1:2N] .= conj.(V[1:N,1:N])
S[N+1:2N] .= S[1:N]
elseif hamiltonian_type == "AntiSymmetry"
V[1:N,N+1:2N] .= conj.(-V[N+1:2N,1:N])
V[N+1:2N,N+1:2N] .= conj.(V[1:N,1:N])
S[N+1:2N] .= S[1:N]
else
error("We do not support this type of hamiltonian~~~~~hahahah")
end
return S,V
end
# N = 2
# η = generate_metric(N)
# h = [1 1 1 1;1 1 1 1; 1 1 1 1; 1 1 1 1]*1.0
# S,V, = recanonicalize(h)
# display(S)
# display(V) | [
3500,
44800,
2348,
29230,
198,
198,
5083,
62,
11167,
7,
53,
16,
3712,
38469,
11,
53,
17,
3712,
38469,
11,
138,
115,
3712,
46912,
8,
796,
357,
41255,
1563,
7,
53,
17,
27493,
138,
115,
9,
53,
16,
38381,
16,
60,
198,
5083,
62,
11167,
7,
53,
3712,
38469,
11,
138,
115,
3712,
46912,
8,
796,
357,
41255,
1563,
7,
53,
27493,
138,
115,
9,
53,
38381,
16,
60,
198,
8818,
3487,
1634,
0,
7,
53,
3712,
46912,
11,
72,
3712,
5317,
11,
138,
115,
3712,
46912,
8,
198,
220,
220,
220,
269,
796,
8434,
62,
11167,
7,
53,
58,
45299,
72,
4357,
138,
115,
8,
198,
220,
220,
220,
611,
2352,
7,
66,
8,
1279,
352,
36,
12,
23,
198,
220,
220,
220,
220,
220,
220,
220,
2147,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45299,
72,
60,
764,
28,
220,
569,
58,
45299,
72,
4083,
14,
31166,
17034,
7,
66,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
14599,
62,
20601,
2781,
7,
53,
3712,
46912,
11,
82,
3712,
5317,
11,
68,
3712,
5317,
11,
138,
115,
3712,
46912,
8,
198,
220,
220,
220,
1303,
569,
62,
16,
6,
796,
569,
62,
16,
198,
220,
220,
220,
3487,
1634,
0,
7,
53,
11,
82,
11,
138,
115,
8,
198,
220,
220,
220,
329,
1312,
796,
264,
10,
16,
25,
16,
25,
68,
198,
220,
220,
220,
220,
220,
220,
220,
329,
474,
796,
264,
25,
16,
25,
72,
12,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45299,
72,
60,
764,
12,
28,
8434,
62,
11167,
7,
53,
58,
45299,
72,
4357,
53,
58,
45299,
73,
4357,
138,
115,
737,
9,
53,
58,
45299,
73,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
3487,
1634,
0,
7,
53,
11,
72,
11,
138,
115,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
569,
198,
437,
198,
198,
8612,
378,
62,
4164,
1173,
7,
45,
3712,
5317,
8,
796,
2566,
363,
76,
7,
85,
9246,
26933,
16,
13,
15,
329,
1312,
28,
16,
25,
45,
38430,
12,
16,
13,
15,
329,
1312,
28,
16,
25,
45,
60,
4008,
198,
198,
8818,
1429,
62,
41887,
0,
7,
83,
50,
3712,
38469,
11,
83,
53,
3712,
46912,
8,
198,
220,
220,
220,
256,
50,
764,
28,
1103,
12195,
83,
50,
8,
198,
220,
220,
220,
6056,
796,
352,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
7857,
7,
83,
53,
38381,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2160,
7,
8937,
12195,
48466,
12195,
83,
53,
58,
45299,
72,
60,
22305,
0,
28,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
6056,
4064,
362,
14512,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
53,
58,
45299,
72,
60,
764,
28,
362,
13,
15,
764,
9,
5305,
12195,
83,
53,
58,
45299,
72,
12962,
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,
256,
53,
58,
45299,
72,
60,
764,
28,
362,
13,
15,
764,
9,
48466,
12195,
83,
53,
58,
45299,
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,
6056,
796,
6056,
10,
16,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
256,
53,
764,
28,
1103,
7,
83,
53,
8,
198,
437,
198,
198,
8818,
664,
36902,
605,
1096,
7,
71,
3712,
46912,
11,
2763,
9044,
666,
62,
4906,
3712,
10100,
26,
83,
349,
28,
16,
36,
12,
940,
8,
198,
220,
220,
220,
399,
796,
2558,
7,
7857,
7,
71,
38381,
16,
60,
14,
17,
8,
198,
220,
220,
220,
7377,
115,
796,
7716,
62,
4164,
1173,
7,
45,
8,
198,
220,
220,
220,
1312,
71,
796,
7377,
115,
9,
71,
220,
198,
220,
220,
220,
1303,
311,
11,
569,
796,
304,
9324,
7,
71,
8,
1303,
1303,
51,
3727,
46,
25,
25703,
1847,
1268,
3268,
11948,
2767,
2751,
311,
796,
25915,
18,
13,
34229,
22136,
2091,
2078,
2425,
20548,
68,
12,
1157,
11,
532,
18,
13,
34229,
22666,
1954,
39118,
2548,
1731,
68,
12,
1157,
11,
860,
13,
1485,
3553,
2091,
2996,
1433,
2425,
21844,
68,
12,
23,
11,
860,
13,
1485,
3553,
2091,
1795,
5607,
38172,
3901,
68,
12,
23,
11,
657,
13,
24214,
24214,
2079,
17032,
46302,
11,
657,
13,
24214,
24214,
2079,
17032,
41544,
11,
352,
13,
8269,
20483,
28727,
11,
352,
13,
8269,
20483,
1828,
60,
198,
220,
220,
220,
1303,
2488,
12860,
311,
198,
220,
220,
220,
256,
50,
11,
83,
53,
796,
304,
9324,
7,
4449,
8,
220,
1303,
428,
2239,
481,
1577,
3716,
256,
50,
290,
256,
53,
1106,
1309,
338,
1730,
351,
606,
1106,
198,
220,
220,
220,
1429,
62,
41887,
0,
7,
83,
50,
11,
83,
53,
8,
198,
220,
220,
220,
256,
50,
11,
83,
53,
796,
1103,
7,
83,
50,
828,
5305,
7,
83,
53,
8,
198,
220,
220,
220,
311,
11,
53,
796,
4866,
7,
83,
50,
828,
30073,
7,
83,
53,
8,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
45,
198,
220,
220,
220,
220,
220,
220,
220,
311,
58,
72,
60,
796,
256,
50,
58,
45,
10,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
311,
58,
45,
10,
72,
60,
796,
256,
50,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45299,
72,
60,
764,
28,
256,
53,
58,
45299,
45,
10,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45299,
45,
10,
72,
60,
764,
28,
256,
53,
58,
45299,
72,
60,
198,
220,
220,
220,
886,
1303,
260,
3297,
304,
9324,
1988,
422,
657,
3784,
11664,
3784,
15,
3784,
17470,
198,
220,
220,
220,
220,
198,
220,
220,
220,
923,
62,
32109,
796,
352,
198,
220,
220,
220,
886,
62,
32109,
796,
352,
198,
220,
220,
220,
981,
923,
62,
32109,
19841,
399,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
32109,
796,
923,
62,
32109,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
796,
923,
62,
32109,
10,
16,
25,
45,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1103,
7,
50,
58,
9688,
62,
32109,
45297,
50,
58,
72,
12962,
1279,
284,
75,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
32109,
796,
1312,
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,
2270,
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,
923,
62,
32109,
0,
28,
886,
62,
32109,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
569,
796,
14599,
62,
20601,
2781,
7,
53,
11,
9688,
62,
32109,
11,
437,
62,
32109,
11,
138,
115,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3487,
1634,
0,
7,
53,
11,
9688,
62,
32109,
11,
138,
115,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
32109,
796,
886,
62,
32109,
10,
16,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
8891,
9044,
666,
62,
4906,
6624,
366,
13940,
3020,
11973,
1,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
16,
25,
45,
11,
45,
10,
16,
25,
17,
45,
60,
764,
28,
11644,
12195,
53,
58,
45,
10,
16,
25,
17,
45,
11,
16,
25,
45,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45,
10,
16,
25,
17,
45,
11,
45,
10,
16,
25,
17,
45,
60,
764,
28,
11644,
12195,
53,
58,
16,
25,
45,
11,
16,
25,
45,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
311,
58,
45,
10,
16,
25,
17,
45,
60,
764,
28,
311,
58,
16,
25,
45,
60,
198,
220,
220,
220,
2073,
361,
8891,
9044,
666,
62,
4906,
6624,
366,
28795,
13940,
3020,
11973,
1,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
16,
25,
45,
11,
45,
10,
16,
25,
17,
45,
60,
764,
28,
11644,
12195,
12,
53,
58,
45,
10,
16,
25,
17,
45,
11,
16,
25,
45,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
569,
58,
45,
10,
16,
25,
17,
45,
11,
45,
10,
16,
25,
17,
45,
60,
764,
28,
11644,
12195,
53,
58,
16,
25,
45,
11,
16,
25,
45,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
311,
58,
45,
10,
16,
25,
17,
45,
60,
764,
28,
311,
58,
16,
25,
45,
60,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
1135,
466,
407,
1104,
428,
2099,
286,
8891,
9044,
666,
8728,
93,
71,
36225,
993,
4943,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
311,
11,
53,
198,
437,
198,
198,
2,
399,
796,
362,
198,
2,
7377,
115,
796,
7716,
62,
4164,
1173,
7,
45,
8,
198,
2,
289,
796,
685,
16,
352,
352,
352,
26,
16,
352,
352,
352,
26,
352,
352,
352,
352,
26,
352,
352,
352,
352,
60,
9,
16,
13,
15,
198,
2,
311,
11,
53,
11,
796,
664,
36902,
605,
1096,
7,
71,
8,
198,
2,
3359,
7,
50,
8,
198,
2,
3359,
7,
53,
8
] | 1.701637 | 1,649 |
#using DelimitedFiles
#using StaticArrays
ssCO = readdlm((@__DIR__)*"/CO_shielding_functions/shield.03.5.69-557-36.dat"); #CO linewidth = 0.3, T_ex = 5
const Nbin_nco = 46
const Nbin_nh2 = 41
const Nco = SVector{Nbin_nco,Float64}(ssCO[10:55])
const Nh2 = SVector{Nbin_nh2,Float64}(ssCO[58:98])
const istart = 100 #start line number for 12CO
function get_fco(is)
a=[]
for i in 0:4
a = vcat(a, ssCO[is+i,:])
end
a = a[1:Nbin_nco]
end
ssCOtable = zeros(Nbin_nco, Nbin_nh2)
for j in 1:Nbin_nh2
jj = istart+(j-1)*5
ssCOtable[:, j] .= get_fco(jj)
end
#=
fCOss = interpolate((Nco, Nh2), ssCOtable, Gridded(Linear()));
function fCOselfshield(Nco,Nh2)
Nh2 = Nh2 >= 1e23 ? 1e23 : Nh2
Nco = Nco >= 1e19 ? 1e19 : Nco
Nh2 = Nh2 <= 1e10 ? 1e10 : Nh2
Nco = Nco <= 1e10 ? 1e10 : Nco
return fCOss(Nco, Nh2)
end
=#
include("interpolation.jl")
const par_fCOss = InterpRange{Float64}(10., 19., 1/0.2, 15., 23., 1/0.2)
#const tblCO = SMatrix{Nbin_nco,Nbin_nh2}(ssCOtable) #size of SArray should not be larger than 100
const tblCO = Matrix{Float64}(ssCOtable)
function fCOselfshield(NCO,NH2)
x, y = log10(NCO), log10(NH2)
interp(x,y, tblCO, par_fCOss)
end
function fH2selfshield(Nh2)
x = Nh2 * 2e-15
b5 = 2.0
return 0.965 / (1.0 + x/b5)^2 + 0.035 / sqrt(1 + x) * exp(-8.5e-4 * sqrt(1 + x))
end
function fCselfshield(NC,NH2)
rH2 = 2.8e-22 * NH2
return exp( -1.6e-17 * NC ) * exp(-rH2) / (1.0 + rH2)
end
| [
2,
3500,
4216,
320,
863,
25876,
198,
2,
3500,
36125,
3163,
20477,
198,
198,
824,
8220,
796,
1100,
25404,
76,
19510,
31,
834,
34720,
834,
27493,
1,
14,
8220,
62,
26662,
278,
62,
12543,
2733,
14,
26662,
13,
3070,
13,
20,
13,
3388,
12,
41948,
12,
2623,
13,
19608,
15341,
1303,
8220,
9493,
413,
5649,
796,
657,
13,
18,
11,
309,
62,
1069,
796,
642,
198,
9979,
399,
8800,
62,
77,
1073,
796,
6337,
198,
9979,
399,
8800,
62,
77,
71,
17,
796,
6073,
198,
9979,
399,
1073,
796,
20546,
9250,
90,
45,
8800,
62,
77,
1073,
11,
43879,
2414,
92,
7,
824,
8220,
58,
940,
25,
2816,
12962,
198,
9979,
399,
71,
17,
796,
20546,
9250,
90,
45,
8800,
62,
77,
71,
17,
11,
43879,
2414,
92,
7,
824,
8220,
58,
3365,
25,
4089,
12962,
198,
9979,
318,
83,
433,
796,
1802,
1303,
9688,
1627,
1271,
329,
1105,
8220,
198,
198,
8818,
651,
62,
69,
1073,
7,
271,
8,
198,
220,
220,
220,
257,
28,
21737,
198,
220,
220,
220,
329,
1312,
287,
657,
25,
19,
198,
220,
220,
220,
220,
220,
220,
220,
257,
796,
410,
9246,
7,
64,
11,
37786,
8220,
58,
271,
10,
72,
11,
25,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
257,
796,
257,
58,
16,
25,
45,
8800,
62,
77,
1073,
60,
198,
437,
198,
198,
824,
8220,
11487,
796,
1976,
27498,
7,
45,
8800,
62,
77,
1073,
11,
399,
8800,
62,
77,
71,
17,
8,
198,
1640,
474,
287,
352,
25,
45,
8800,
62,
77,
71,
17,
198,
220,
220,
220,
474,
73,
796,
318,
83,
433,
33747,
73,
12,
16,
27493,
20,
198,
220,
220,
220,
37786,
8220,
11487,
58,
45299,
474,
60,
764,
28,
651,
62,
69,
1073,
7,
41098,
8,
198,
437,
198,
198,
2,
28,
198,
69,
8220,
824,
796,
39555,
378,
19510,
45,
1073,
11,
399,
71,
17,
828,
37786,
8220,
11487,
11,
1902,
1638,
276,
7,
14993,
451,
3419,
18125,
198,
8818,
277,
8220,
944,
26662,
7,
45,
1073,
11,
45,
71,
17,
8,
198,
220,
220,
220,
399,
71,
17,
796,
399,
71,
17,
18189,
352,
68,
1954,
5633,
352,
68,
1954,
1058,
399,
71,
17,
198,
220,
220,
220,
399,
1073,
796,
399,
1073,
18189,
352,
68,
1129,
5633,
352,
68,
1129,
1058,
399,
1073,
198,
220,
220,
220,
399,
71,
17,
796,
399,
71,
17,
19841,
352,
68,
940,
5633,
352,
68,
940,
1058,
399,
71,
17,
198,
220,
220,
220,
399,
1073,
796,
399,
1073,
19841,
352,
68,
940,
5633,
352,
68,
940,
1058,
399,
1073,
198,
220,
220,
220,
1441,
277,
8220,
824,
7,
45,
1073,
11,
399,
71,
17,
8,
198,
437,
198,
46249,
198,
198,
17256,
7203,
3849,
16104,
341,
13,
20362,
4943,
198,
9979,
1582,
62,
69,
8220,
824,
796,
4225,
79,
17257,
90,
43879,
2414,
92,
7,
940,
1539,
678,
1539,
352,
14,
15,
13,
17,
11,
1315,
1539,
2242,
1539,
352,
14,
15,
13,
17,
8,
198,
2,
9979,
256,
2436,
8220,
796,
9447,
265,
8609,
90,
45,
8800,
62,
77,
1073,
11,
45,
8800,
62,
77,
71,
17,
92,
7,
824,
8220,
11487,
8,
1303,
7857,
286,
311,
19182,
815,
407,
307,
4025,
621,
1802,
198,
9979,
256,
2436,
8220,
796,
24936,
90,
43879,
2414,
92,
7,
824,
8220,
11487,
8,
198,
8818,
277,
8220,
944,
26662,
7,
7792,
46,
11,
33863,
17,
8,
198,
220,
220,
220,
2124,
11,
331,
796,
2604,
940,
7,
7792,
46,
828,
2604,
940,
7,
33863,
17,
8,
198,
220,
220,
220,
987,
79,
7,
87,
11,
88,
11,
256,
2436,
8220,
11,
1582,
62,
69,
8220,
824,
8,
198,
437,
628,
198,
8818,
277,
39,
17,
944,
26662,
7,
45,
71,
17,
8,
198,
220,
220,
220,
2124,
796,
399,
71,
17,
1635,
362,
68,
12,
1314,
198,
220,
220,
220,
275,
20,
796,
362,
13,
15,
198,
220,
220,
220,
1441,
657,
13,
24,
2996,
1220,
357,
16,
13,
15,
1343,
2124,
14,
65,
20,
8,
61,
17,
1343,
657,
13,
44215,
1220,
19862,
17034,
7,
16,
1343,
2124,
8,
1635,
1033,
32590,
23,
13,
20,
68,
12,
19,
1635,
19862,
17034,
7,
16,
1343,
2124,
4008,
198,
437,
198,
198,
8818,
277,
34,
944,
26662,
7,
7792,
11,
33863,
17,
8,
198,
220,
220,
220,
374,
39,
17,
796,
362,
13,
23,
68,
12,
1828,
1635,
24451,
17,
198,
220,
220,
220,
1441,
1033,
7,
532,
16,
13,
21,
68,
12,
1558,
1635,
8823,
1267,
1635,
1033,
32590,
81,
39,
17,
8,
1220,
357,
16,
13,
15,
1343,
374,
39,
17,
8,
198,
437,
198
] | 1.926509 | 762 |
#
# Adding separators to SCIP.Optimizer.
#
"""
include_sepa(
o::Optimizer,
sepa::SEPA;
name::String,
description::String,
priority::Int,
freq::Int,
maxbounddist::Float,
usesubscip::Bool,
delay::Bool
)
Include a user defined separator `sepa` to the SCIP optimizer instance `o`.
All parameters have default values, that can be set as keyword arguments.
"""
function include_sepa(o::Optimizer, sepa::SEPA;
name="", description="", priority=0, freq=1,
maxbounddist=0.0, usessubscip=false,
delay=false) where {SEPA <: AbstractSeparator}
include_sepa(o.inner.scip[], o.inner.sepas, sepa, name=name, description=description,
priority=priority, freq=freq, maxbounddist=maxbounddist,
usessubscip=usessubscip, delay=delay)
end
#
# Separator for cutcallbacks.
#
mutable struct CutCbSeparator <: AbstractSeparator
scipd::SCIPData
cutcallback::Function
end
# If no cut callback is given, the cut callback does nothing.
CutCbSeparator(scipd::SCIPData) = CutCbSeparator(scipd, cb_data -> nothing)
"""
Used for an argument to the cut callback, which in turn uses that argument to
obtain the LP-solution via `MOI.get` and to add cuts via `MOI.submit`.
"""
mutable struct CutCbData
sepa::CutCbSeparator
"Did the cut callback call submit?"
submit_called::Bool
end
function exec_lp(sepa::CutCbSeparator)
cb_data = CutCbData(sepa, false)
sepa.cutcallback(cb_data)
return cb_data.submit_called ? SCIP_SEPARATED : SCIP_DIDNOTFIND
end
#
# MOI Interface for cutcallbacks
#
function MOI.get(o::Optimizer, ::MOI.CallbackVariablePrimal{CutCbData}, vi)
return SCIPgetSolVal(o, C_NULL, var(o, vi))
end
function MOI.set(o::Optimizer, ::MOI.UserCutCallback, cb::Function)
if o.moi_separator === nothing
o.moi_separator = CutCbSeparator(o.inner, cb)
include_sepa(o, o.moi_separator)
else
o.moi_separator.cutcallback = cb;
end
end
MOI.supports(::Optimizer, ::MOI.UserCutCallback) = true
function MOI.submit(o::Optimizer, cb_data::MOI.UserCut{CutCbData},
func::SAF, set::S) where {S <: BOUNDS}
varrefs = [VarRef(t.variable.value) for t in func.terms]
coefs = [t.coefficient for t in func.terms]
lhs, rhs = bounds(set)
lhs = lhs === nothing ? -SCIPinfinity(o) : lhs
rhs = rhs === nothing ? SCIPinfinity(o) : rhs
add_cut_sepa(o.inner.scip[], o.inner.vars, o.inner.sepas, cb_data.callback_data.sepa, varrefs, coefs, lhs, rhs)
cb_data.callback_data.submit_called = true
end
MOI.supports(::Optimizer, ::MOI.UserCut{CutCbData}) = true
| [
2,
198,
2,
18247,
2880,
2024,
284,
6374,
4061,
13,
27871,
320,
7509,
13,
198,
2,
198,
198,
37811,
198,
220,
220,
220,
2291,
62,
325,
8957,
7,
198,
220,
220,
220,
220,
220,
220,
220,
267,
3712,
27871,
320,
7509,
11,
198,
220,
220,
220,
220,
220,
220,
220,
384,
8957,
3712,
5188,
4537,
26,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,
10100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
3712,
10100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
8475,
3712,
5317,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2030,
80,
3712,
5317,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
7784,
17080,
3712,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3544,
549,
1416,
541,
3712,
33,
970,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5711,
3712,
33,
970,
198,
220,
220,
220,
1267,
198,
198,
818,
9152,
257,
2836,
5447,
2880,
1352,
4600,
325,
8957,
63,
284,
262,
6374,
4061,
6436,
7509,
4554,
4600,
78,
44646,
198,
198,
3237,
10007,
423,
4277,
3815,
11,
326,
460,
307,
900,
355,
21179,
7159,
13,
198,
37811,
198,
8818,
2291,
62,
325,
8957,
7,
78,
3712,
27871,
320,
7509,
11,
384,
8957,
3712,
5188,
4537,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
2625,
1600,
6764,
2625,
1600,
8475,
28,
15,
11,
2030,
80,
28,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
7784,
17080,
28,
15,
13,
15,
11,
514,
408,
549,
1416,
541,
28,
9562,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5711,
28,
9562,
8,
810,
1391,
5188,
4537,
1279,
25,
27741,
19117,
283,
1352,
92,
198,
220,
220,
220,
2291,
62,
325,
8957,
7,
78,
13,
5083,
13,
1416,
541,
58,
4357,
267,
13,
5083,
13,
325,
44429,
11,
384,
8957,
11,
1438,
28,
3672,
11,
6764,
28,
11213,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8475,
28,
49336,
11,
2030,
80,
28,
19503,
80,
11,
3509,
7784,
17080,
28,
9806,
7784,
17080,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
514,
408,
549,
1416,
541,
28,
385,
408,
549,
1416,
541,
11,
5711,
28,
40850,
8,
198,
437,
628,
198,
2,
198,
2,
8621,
283,
1352,
329,
2005,
13345,
10146,
13,
198,
2,
198,
198,
76,
18187,
2878,
9712,
34,
65,
19117,
283,
1352,
1279,
25,
27741,
19117,
283,
1352,
198,
220,
220,
220,
629,
541,
67,
3712,
6173,
4061,
6601,
198,
220,
220,
220,
2005,
47423,
3712,
22203,
198,
437,
198,
198,
2,
1002,
645,
2005,
23838,
318,
1813,
11,
262,
2005,
23838,
857,
2147,
13,
198,
26254,
34,
65,
19117,
283,
1352,
7,
1416,
541,
67,
3712,
6173,
4061,
6601,
8,
796,
9712,
34,
65,
19117,
283,
1352,
7,
1416,
541,
67,
11,
269,
65,
62,
7890,
4613,
2147,
8,
198,
198,
37811,
198,
38052,
329,
281,
4578,
284,
262,
2005,
23838,
11,
543,
287,
1210,
3544,
326,
4578,
284,
198,
672,
3153,
262,
18470,
12,
82,
2122,
2884,
4600,
11770,
40,
13,
1136,
63,
290,
284,
751,
6630,
2884,
4600,
11770,
40,
13,
46002,
44646,
198,
37811,
198,
76,
18187,
2878,
9712,
34,
65,
6601,
198,
220,
220,
220,
384,
8957,
3712,
26254,
34,
65,
19117,
283,
1352,
198,
220,
220,
220,
366,
11633,
262,
2005,
23838,
869,
9199,
1701,
198,
220,
220,
220,
9199,
62,
7174,
3712,
33,
970,
198,
437,
628,
198,
8818,
2452,
62,
34431,
7,
325,
8957,
3712,
26254,
34,
65,
19117,
283,
1352,
8,
198,
220,
220,
220,
269,
65,
62,
7890,
796,
9712,
34,
65,
6601,
7,
325,
8957,
11,
3991,
8,
198,
220,
220,
220,
384,
8957,
13,
8968,
47423,
7,
21101,
62,
7890,
8,
198,
220,
220,
220,
1441,
269,
65,
62,
7890,
13,
46002,
62,
7174,
5633,
6374,
4061,
62,
5188,
27082,
11617,
1058,
6374,
4061,
62,
35,
2389,
11929,
37,
12115,
198,
437,
628,
198,
2,
198,
2,
13070,
40,
26491,
329,
2005,
13345,
10146,
198,
2,
198,
198,
8818,
13070,
40,
13,
1136,
7,
78,
3712,
27871,
320,
7509,
11,
7904,
11770,
40,
13,
47258,
43015,
23828,
282,
90,
26254,
34,
65,
6601,
5512,
25357,
8,
198,
220,
220,
220,
1441,
6374,
4061,
1136,
36949,
7762,
7,
78,
11,
327,
62,
33991,
11,
1401,
7,
78,
11,
25357,
4008,
198,
437,
198,
198,
8818,
13070,
40,
13,
2617,
7,
78,
3712,
27871,
320,
7509,
11,
7904,
11770,
40,
13,
12982,
26254,
47258,
11,
269,
65,
3712,
22203,
8,
198,
220,
220,
220,
611,
267,
13,
5908,
72,
62,
25512,
1352,
24844,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
267,
13,
5908,
72,
62,
25512,
1352,
796,
9712,
34,
65,
19117,
283,
1352,
7,
78,
13,
5083,
11,
269,
65,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2291,
62,
325,
8957,
7,
78,
11,
267,
13,
5908,
72,
62,
25512,
1352,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
267,
13,
5908,
72,
62,
25512,
1352,
13,
8968,
47423,
796,
269,
65,
26,
198,
220,
220,
220,
886,
198,
437,
198,
11770,
40,
13,
18608,
2096,
7,
3712,
27871,
320,
7509,
11,
7904,
11770,
40,
13,
12982,
26254,
47258,
8,
796,
2081,
198,
198,
8818,
13070,
40,
13,
46002,
7,
78,
3712,
27871,
320,
7509,
11,
269,
65,
62,
7890,
3712,
11770,
40,
13,
12982,
26254,
90,
26254,
34,
65,
6601,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25439,
3712,
4090,
37,
11,
900,
3712,
50,
8,
810,
1391,
50,
1279,
25,
347,
19385,
5258,
92,
198,
220,
220,
220,
1401,
5420,
82,
796,
685,
19852,
8134,
7,
83,
13,
45286,
13,
8367,
8,
329,
256,
287,
25439,
13,
38707,
60,
198,
220,
220,
220,
763,
891,
82,
796,
685,
83,
13,
1073,
16814,
329,
256,
287,
25439,
13,
38707,
60,
628,
220,
220,
220,
300,
11994,
11,
9529,
82,
796,
22303,
7,
2617,
8,
198,
220,
220,
220,
300,
11994,
796,
300,
11994,
24844,
2147,
5633,
532,
6173,
4061,
10745,
6269,
7,
78,
8,
1058,
300,
11994,
198,
220,
220,
220,
9529,
82,
796,
9529,
82,
24844,
2147,
5633,
220,
6374,
4061,
10745,
6269,
7,
78,
8,
1058,
9529,
82,
628,
220,
220,
220,
751,
62,
8968,
62,
325,
8957,
7,
78,
13,
5083,
13,
1416,
541,
58,
4357,
267,
13,
5083,
13,
85,
945,
11,
267,
13,
5083,
13,
325,
44429,
11,
269,
65,
62,
7890,
13,
47423,
62,
7890,
13,
325,
8957,
11,
1401,
5420,
82,
11,
763,
891,
82,
11,
300,
11994,
11,
9529,
82,
8,
198,
220,
220,
220,
269,
65,
62,
7890,
13,
47423,
62,
7890,
13,
46002,
62,
7174,
796,
2081,
198,
437,
198,
11770,
40,
13,
18608,
2096,
7,
3712,
27871,
320,
7509,
11,
7904,
11770,
40,
13,
12982,
26254,
90,
26254,
34,
65,
6601,
30072,
796,
2081,
198
] | 2.253942 | 1,205 |
using ExponentialAction
using Test
@testset "ExponentialAction.jl" begin
include("util.jl")
include("expv.jl")
include("expv_autodiff.jl")
end
| [
3500,
5518,
35470,
12502,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
16870,
35470,
12502,
13,
20362,
1,
2221,
198,
220,
220,
220,
2291,
7203,
22602,
13,
20362,
4943,
198,
220,
220,
220,
2291,
7203,
11201,
85,
13,
20362,
4943,
198,
220,
220,
220,
2291,
7203,
11201,
85,
62,
2306,
375,
733,
13,
20362,
4943,
198,
437,
198
] | 2.644068 | 59 |
d = 2+rand(5)
dl = rand(4)
du = rand(4)
M = Tridiagonal(dl, d, du)
F = lufact(M)
src = rand(5,5,5)
for dim = 1:3
dest1 = mapslices(x->A_ldiv_B!(F, x), copy(src), dim)
dest2 = similar(src)
AxisAlgorithms.A_ldiv_B_md!(dest2, F, src, dim)
@test_approx_eq dest1 dest2
end
| [
67,
220,
796,
362,
10,
25192,
7,
20,
8,
198,
25404,
796,
43720,
7,
19,
8,
198,
646,
796,
43720,
7,
19,
8,
198,
44,
796,
833,
19830,
27923,
7,
25404,
11,
288,
11,
7043,
8,
198,
37,
796,
300,
3603,
7,
44,
8,
198,
10677,
796,
43720,
7,
20,
11,
20,
11,
20,
8,
198,
1640,
5391,
796,
352,
25,
18,
198,
220,
220,
220,
2244,
16,
796,
8739,
677,
274,
7,
87,
3784,
32,
62,
335,
452,
62,
33,
0,
7,
37,
11,
2124,
828,
4866,
7,
10677,
828,
5391,
8,
198,
220,
220,
220,
2244,
17,
796,
2092,
7,
10677,
8,
198,
220,
220,
220,
38349,
2348,
7727,
907,
13,
32,
62,
335,
452,
62,
33,
62,
9132,
0,
7,
16520,
17,
11,
376,
11,
12351,
11,
5391,
8,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
2244,
16,
2244,
17,
198,
437,
198
] | 1.9 | 150 |
"""
function random_mate(nsire, ndam, nsib)
---
Random mate `nsire` with `ndam`, each dam will have `nsib`.
Assuming the first `nsire` are sires.
The rest are dams.
This is for generation one.
And can be replaced by call `random_mate(shuffle(1:nid), nsire, ndam, nsib)`.
"""
function random_mate(nsire, ndam, nsib)
r = Int(ceil(ndam/nsire))
pa = repeat(repeat(shuffle(1:nsire), r), inner=nsib)
ma = repeat(1:ndam, inner = nsib) .+ nsire
[pa[1:length(ma)] ma]
end
"""
function random_mate(ID, nsire, ndam, nsib)
---
Random mate `ID`.
Its first `nsire` are sires, last `ndam` are dams.
**Note**: `nsire + ndam` must be of `length(ID)`.
"""
function random_mate(ID, nsire, ndam, nsib)
r = Int(ceil(ndam/nsire))
pa = repeat(repeat(shuffle(ID[1:nsire]), r), inner = nsib)
ma = repeat(ID[(nsire+1):(ndam+nsire)], inner = nsib)
[pa[1:length(ma)] ma]
end
"""
function haldane(pos; M = 1e10)
---
Return recommbination rate column given bp distances.
Haldane function:
- Recombination rate: r = .5(1 - exp(-2d))
- Distance in Morgan: d = -.5log(1 - 2r)
"""
function haldane(pos; M = 1e8)
chr = bp = 0
nl = size(pos)[1]
r = zeros(Float64, nl)
@inbounds for i in 1:nl
if pos[i, 1] == chr
d = (pos[i, 2] - bp) / M # distance in cM
r[i] = .5(1 - exp(-2d))
else
chr = pos[i, 1]
r[i] = 0.5
end
bp = pos[i, 2]
end
r
end
"""
function gdrop(base, ped)
---
Drop genotypes of a subset or all of `snp`, through `ped` into `osnp`.
The last will be returned.
## Note:
If to use `osnp = BitArray(undef, nsnp, 2noff)` to save memory,
the speed is greatly reduced.
## ToDo:
Needs optimization.
May be parallel into 10 tasks.
Least urgent.
"""
function gdrop(snp, ped, r)
noff = size(ped)[1]
nsnp = size(snp)[1]
osnp = zeros(Bool, nsnp, 2noff)
i = 1
sample = zeros(nsnp)
@inbounds for prt in eachrow(ped)
@inbounds for p in prt
hap = view(snp, :, 2p-1:2p)
off = view(osnp, :, i)
k = 1
rand!(sample)
@inbounds for j in 1:nsnp
sample[j] < r[j] && (k = 3 - k)
off[j] = hap[j, k]
end
i += 1
end
end
osnp
end
| [
37811,
198,
220,
220,
220,
2163,
4738,
62,
9830,
7,
5907,
557,
11,
299,
11043,
11,
36545,
571,
8,
198,
6329,
198,
29531,
16133,
4600,
5907,
557,
63,
351,
4600,
358,
321,
47671,
1123,
1801,
481,
423,
4600,
5907,
571,
44646,
198,
48142,
262,
717,
4600,
5907,
557,
63,
389,
264,
2387,
13,
198,
464,
1334,
389,
40907,
13,
198,
1212,
318,
329,
5270,
530,
13,
198,
1870,
460,
307,
6928,
416,
869,
4600,
25120,
62,
9830,
7,
1477,
18137,
7,
16,
25,
77,
312,
828,
36545,
557,
11,
299,
11043,
11,
36545,
571,
8,
44646,
198,
37811,
198,
8818,
4738,
62,
9830,
7,
5907,
557,
11,
299,
11043,
11,
36545,
571,
8,
198,
220,
220,
220,
374,
220,
796,
2558,
7,
344,
346,
7,
358,
321,
14,
5907,
557,
4008,
198,
220,
220,
220,
14187,
796,
9585,
7,
44754,
7,
1477,
18137,
7,
16,
25,
5907,
557,
828,
374,
828,
8434,
28,
5907,
571,
8,
198,
220,
220,
220,
17266,
796,
9585,
7,
16,
25,
358,
321,
11,
8434,
796,
36545,
571,
8,
764,
10,
36545,
557,
198,
220,
220,
220,
685,
8957,
58,
16,
25,
13664,
7,
2611,
15437,
17266,
60,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
2163,
4738,
62,
9830,
7,
2389,
11,
36545,
557,
11,
299,
11043,
11,
36545,
571,
8,
198,
6329,
198,
29531,
16133,
4600,
2389,
44646,
198,
20459,
717,
4600,
5907,
557,
63,
389,
264,
2387,
11,
938,
4600,
358,
321,
63,
389,
40907,
13,
198,
198,
1174,
6425,
1174,
25,
4600,
5907,
557,
1343,
299,
11043,
63,
1276,
307,
286,
4600,
13664,
7,
2389,
8,
44646,
198,
37811,
198,
8818,
4738,
62,
9830,
7,
2389,
11,
36545,
557,
11,
299,
11043,
11,
36545,
571,
8,
198,
220,
220,
220,
374,
220,
796,
2558,
7,
344,
346,
7,
358,
321,
14,
5907,
557,
4008,
198,
220,
220,
220,
14187,
796,
9585,
7,
44754,
7,
1477,
18137,
7,
2389,
58,
16,
25,
5907,
557,
46570,
374,
828,
8434,
796,
36545,
571,
8,
198,
220,
220,
220,
17266,
796,
9585,
7,
2389,
58,
7,
5907,
557,
10,
16,
2599,
7,
358,
321,
10,
5907,
557,
8,
4357,
8434,
796,
36545,
571,
8,
198,
220,
220,
220,
685,
8957,
58,
16,
25,
13664,
7,
2611,
15437,
17266,
60,
198,
437,
198,
220,
220,
220,
220,
198,
37811,
198,
220,
220,
220,
2163,
289,
1940,
1531,
7,
1930,
26,
337,
796,
352,
68,
940,
8,
198,
6329,
198,
13615,
3045,
65,
1883,
2494,
5721,
1813,
275,
79,
18868,
13,
198,
198,
39,
1940,
1531,
2163,
25,
198,
12,
3311,
2381,
1883,
2494,
25,
374,
796,
764,
20,
7,
16,
532,
1033,
32590,
17,
67,
4008,
198,
12,
34600,
287,
10805,
25,
288,
796,
532,
13,
20,
6404,
7,
16,
532,
362,
81,
8,
198,
37811,
198,
8818,
289,
1940,
1531,
7,
1930,
26,
337,
796,
352,
68,
23,
8,
198,
220,
220,
220,
442,
81,
796,
275,
79,
796,
657,
198,
220,
220,
220,
299,
75,
796,
2546,
7,
1930,
38381,
16,
60,
198,
220,
220,
220,
374,
796,
1976,
27498,
7,
43879,
2414,
11,
299,
75,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
329,
1312,
287,
352,
25,
21283,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1426,
58,
72,
11,
352,
60,
6624,
442,
81,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
796,
357,
1930,
58,
72,
11,
362,
60,
532,
275,
79,
8,
1220,
337,
1303,
5253,
287,
269,
44,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
58,
72,
60,
796,
764,
20,
7,
16,
532,
1033,
32590,
17,
67,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
442,
81,
796,
1426,
58,
72,
11,
352,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
58,
72,
60,
796,
657,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
275,
79,
796,
1426,
58,
72,
11,
362,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
374,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
2163,
308,
14781,
7,
8692,
11,
7190,
8,
198,
6329,
198,
26932,
2429,
13567,
286,
257,
24637,
393,
477,
286,
4600,
16184,
79,
47671,
832,
4600,
9124,
63,
656,
4600,
418,
37659,
44646,
198,
464,
938,
481,
307,
4504,
13,
198,
198,
2235,
5740,
25,
198,
1532,
284,
779,
4600,
418,
37659,
796,
4722,
19182,
7,
917,
891,
11,
299,
16184,
79,
11,
362,
77,
2364,
8,
63,
284,
3613,
4088,
11,
198,
1169,
2866,
318,
9257,
5322,
13,
198,
198,
2235,
1675,
5211,
25,
198,
23037,
82,
23989,
13,
198,
6747,
307,
10730,
656,
838,
8861,
13,
198,
3123,
459,
18039,
13,
198,
37811,
198,
8818,
308,
14781,
7,
16184,
79,
11,
7190,
11,
374,
8,
198,
220,
220,
220,
645,
487,
796,
2546,
7,
9124,
38381,
16,
60,
198,
220,
220,
220,
299,
16184,
79,
796,
2546,
7,
16184,
79,
38381,
16,
60,
198,
220,
220,
220,
267,
16184,
79,
796,
1976,
27498,
7,
33,
970,
11,
299,
16184,
79,
11,
362,
77,
2364,
8,
198,
220,
220,
220,
1312,
796,
352,
198,
220,
220,
220,
6291,
796,
1976,
27498,
7,
5907,
37659,
8,
198,
220,
220,
220,
2488,
259,
65,
3733,
329,
778,
83,
287,
1123,
808,
7,
9124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
259,
65,
3733,
329,
279,
287,
778,
83,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
387,
79,
796,
1570,
7,
16184,
79,
11,
1058,
11,
362,
79,
12,
16,
25,
17,
79,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
572,
796,
1570,
7,
418,
37659,
11,
1058,
11,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43720,
0,
7,
39873,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
259,
65,
3733,
329,
474,
287,
352,
25,
5907,
37659,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6291,
58,
73,
60,
1279,
374,
58,
73,
60,
11405,
357,
74,
796,
513,
532,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
572,
58,
73,
60,
796,
387,
79,
58,
73,
11,
479,
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,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
267,
16184,
79,
220,
220,
220,
220,
220,
198,
437,
198
] | 2.013937 | 1,148 |
# let's try to fetch variables with fullsweeps in them
allSweepVariables = filter(v -> :RADARSWEEP in getBigDataKeys(v), getVariables(fg));
saveDFG(fg, "$dfgDataFolder/fullsweep.tar.gz")
# Okay... see you lidar!
##############################################################################
########################### LASERS AND STUFF BELOW ###########################
##############################################################################
# Quick function to find the closest point as trivial example
# We're going to save this back into the data as 'processed data'
struct ClosestPoint
cp::Vector{Float32}
dist::Float32
end
function findClosestPoint(xyzData::Vector{Vector{Float32}})::ClosestPoint
# Judgement free zone please :) just a hacky example
dist = 1.0e6
cp = [0,0,0]
for p in xyzData
d = sqrt(p[1]^2 + p[2]^2 + p[3]^2)
if d < dist
dist = d
cp = p
end
end
return ClosestPoint(cp, dist)
end
cp = findClosestPoint(lidarData)
### Quick version of writing back - write this back to our data.
# Serialize it using JSON2...
using JSON2
newData = Vector{UInt8}(JSON2.write(cp))
# Make an element and entry.
element = GeneralBigDataEntry(fg, var, :LIDARCP, mimeType="application/json")
# Set it in the store
addBigData!(datastore, element, newData)
# Make it in the graph
addBigDataEntry!(var, element)
# Save our graph with the new entries.
saveDFG(fg, "$dfgDataFolder/dfg")
# You can now load this later and retrieve that data.
### Quick example of working with the data...
"""
Quick function to extract a frame of Float32's from raw data.
(this is used for pointcloud data)
"""
function extractDataFrame(rawData::Vector{UInt8}, floatStepSize::Int, extractIndexes::Vector{Int})
reformat = reinterpret(Float32, rawData)
#Set up a map to get the indexes out
dataset = map(i -> reformat[extractIndexes.+i], collect(0:(Int(length(reformat)/floatStepSize)-1))*floatStepSize)
return dataset
end
# Now extract and format to our dataframe
lidarData = extractDataFrame(rawData, 8, [1,2,3])
# Radar would be similar (need to confirm that function works though):
# radarData = extractDataFrame(msg.radar_data, 3, [1,2,3])
| [
628,
628,
628,
628,
198,
198,
2,
1309,
338,
1949,
284,
21207,
9633,
351,
1336,
46280,
25386,
287,
606,
198,
439,
40783,
538,
23907,
2977,
796,
8106,
7,
85,
4613,
1058,
49,
2885,
1503,
17887,
35238,
287,
651,
12804,
6601,
40729,
7,
85,
828,
651,
23907,
2977,
7,
40616,
18125,
198,
198,
21928,
8068,
38,
7,
40616,
11,
17971,
7568,
70,
6601,
41092,
14,
12853,
46280,
538,
13,
18870,
13,
34586,
4943,
198,
198,
2,
16805,
986,
766,
345,
19789,
283,
0,
198,
198,
29113,
29113,
7804,
4242,
2235,
198,
14468,
7804,
21017,
406,
1921,
4877,
5357,
3563,
47588,
45339,
1303,
14468,
7804,
2235,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
2,
12029,
2163,
284,
1064,
262,
11706,
966,
355,
20861,
1672,
198,
2,
775,
821,
1016,
284,
3613,
428,
736,
656,
262,
1366,
355,
705,
14681,
276,
1366,
6,
198,
7249,
1012,
418,
395,
12727,
198,
220,
220,
220,
31396,
3712,
38469,
90,
43879,
2624,
92,
198,
220,
220,
220,
1233,
3712,
43879,
2624,
198,
437,
198,
8818,
1064,
2601,
418,
395,
12727,
7,
5431,
89,
6601,
3712,
38469,
90,
38469,
90,
43879,
2624,
11709,
2599,
25,
2601,
418,
395,
12727,
198,
220,
220,
220,
1303,
4794,
16025,
1479,
6516,
3387,
14373,
655,
257,
8156,
88,
1672,
198,
220,
220,
220,
1233,
796,
352,
13,
15,
68,
21,
198,
220,
220,
220,
31396,
796,
685,
15,
11,
15,
11,
15,
60,
198,
220,
220,
220,
329,
279,
287,
2124,
45579,
6601,
198,
220,
220,
220,
220,
220,
220,
220,
288,
796,
19862,
17034,
7,
79,
58,
16,
60,
61,
17,
1343,
279,
58,
17,
60,
61,
17,
1343,
279,
58,
18,
60,
61,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
288,
1279,
1233,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1233,
796,
288,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31396,
796,
279,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1012,
418,
395,
12727,
7,
13155,
11,
1233,
8,
198,
437,
198,
198,
13155,
796,
1064,
2601,
418,
395,
12727,
7,
75,
312,
283,
6601,
8,
198,
198,
21017,
12029,
2196,
286,
3597,
736,
532,
3551,
428,
736,
284,
674,
1366,
13,
198,
2,
23283,
1096,
340,
1262,
19449,
17,
986,
198,
3500,
19449,
17,
198,
3605,
6601,
796,
20650,
90,
52,
5317,
23,
92,
7,
40386,
17,
13,
13564,
7,
13155,
4008,
198,
198,
2,
6889,
281,
5002,
290,
5726,
13,
198,
30854,
796,
3611,
12804,
6601,
30150,
7,
40616,
11,
1401,
11,
1058,
43,
2389,
1503,
8697,
11,
285,
524,
6030,
2625,
31438,
14,
17752,
4943,
198,
2,
5345,
340,
287,
262,
3650,
198,
2860,
12804,
6601,
0,
7,
19608,
459,
382,
11,
5002,
11,
649,
6601,
8,
198,
2,
6889,
340,
287,
262,
4823,
198,
2860,
12804,
6601,
30150,
0,
7,
7785,
11,
5002,
8,
198,
198,
2,
12793,
674,
4823,
351,
262,
649,
12784,
13,
198,
21928,
8068,
38,
7,
40616,
11,
17971,
7568,
70,
6601,
41092,
14,
7568,
70,
4943,
198,
198,
2,
921,
460,
783,
3440,
428,
1568,
290,
19818,
326,
1366,
13,
628,
628,
198,
21017,
12029,
1672,
286,
1762,
351,
262,
1366,
986,
198,
198,
37811,
198,
21063,
2163,
284,
7925,
257,
5739,
286,
48436,
2624,
338,
422,
8246,
1366,
13,
198,
7,
5661,
318,
973,
329,
966,
17721,
1366,
8,
198,
37811,
198,
8818,
7925,
6601,
19778,
7,
1831,
6601,
3712,
38469,
90,
52,
5317,
23,
5512,
12178,
8600,
10699,
3712,
5317,
11,
7925,
15732,
274,
3712,
38469,
90,
5317,
30072,
198,
220,
220,
220,
4975,
265,
796,
302,
27381,
7,
43879,
2624,
11,
8246,
6601,
8,
198,
220,
220,
220,
1303,
7248,
510,
257,
3975,
284,
651,
262,
39199,
503,
198,
220,
220,
220,
27039,
796,
3975,
7,
72,
4613,
4975,
265,
58,
2302,
974,
15732,
274,
13,
10,
72,
4357,
2824,
7,
15,
37498,
5317,
7,
13664,
7,
260,
18982,
20679,
22468,
8600,
10699,
13219,
16,
4008,
9,
22468,
8600,
10699,
8,
198,
220,
220,
220,
1441,
27039,
198,
437,
628,
198,
2,
2735,
7925,
290,
5794,
284,
674,
1366,
14535,
198,
75,
312,
283,
6601,
796,
7925,
6601,
19778,
7,
1831,
6601,
11,
807,
11,
685,
16,
11,
17,
11,
18,
12962,
198,
2,
38426,
561,
307,
2092,
357,
31227,
284,
6216,
326,
2163,
2499,
996,
2599,
198,
2,
13428,
6601,
796,
7925,
6601,
19778,
7,
19662,
13,
6335,
283,
62,
7890,
11,
513,
11,
685,
16,
11,
17,
11,
18,
12962,
198
] | 2.984064 | 753 |
module SetFloatParameterTrigger
using ..Ahorn, Maple
@mapdef Trigger "ShaderHelper/SetFloatParameterTrigger" SetFloatParameterTrigger(x::Integer, y::Integer, width::Integer=Maple.defaultTriggerWidth, height::Integer=Maple.defaultTriggerHeight, shader::String="shaderhelper/testshader", value::Float=0, key::String="key")
const placements = Ahorn.PlacementDict(
"Set Float Parameter Trigger (Shader Helper)" => Ahorn.EntityPlacement(
SetFloatParameterTrigger,
"rectangle"
)
)
end | [
21412,
5345,
43879,
36301,
48344,
198,
198,
3500,
11485,
10910,
1211,
11,
21249,
198,
198,
31,
8899,
4299,
24593,
366,
2484,
5067,
47429,
14,
7248,
43879,
36301,
48344,
1,
5345,
43879,
36301,
48344,
7,
87,
3712,
46541,
11,
331,
3712,
46541,
11,
9647,
3712,
46541,
28,
13912,
293,
13,
12286,
48344,
30916,
11,
6001,
3712,
46541,
28,
13912,
293,
13,
12286,
48344,
23106,
11,
33030,
3712,
10100,
2625,
1477,
5067,
2978,
525,
14,
9288,
1477,
5067,
1600,
1988,
3712,
43879,
28,
15,
11,
1994,
3712,
10100,
2625,
2539,
4943,
198,
198,
9979,
21957,
3196,
796,
7900,
1211,
13,
3646,
5592,
35,
713,
7,
198,
220,
220,
220,
366,
7248,
48436,
25139,
2357,
24593,
357,
2484,
5067,
5053,
525,
16725,
5218,
7900,
1211,
13,
32398,
3646,
5592,
7,
198,
220,
220,
220,
220,
220,
220,
220,
5345,
43879,
36301,
48344,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2554,
9248,
1,
198,
220,
220,
220,
1267,
198,
8,
198,
198,
437
] | 3.123457 | 162 |
@testset "formula" begin
using StatsModels: hasresponse, hasintercept, omitsintercept
y, x1, x2, x3, a, b, c, onet = term.((:y, :x1, :x2, :x3, :a, :b, :c, 1))
## totally empty
t = @formula(0 ~ 0)
@test !hasresponse(t)
@test !hasintercept(t)
@test omitsintercept(t)
@test t.rhs == ConstantTerm(0)
@test issetequal(terms(t), [ConstantTerm(0)])
## empty lhs, intercept on rhs
t = @formula(0 ~ 1)
@test !hasresponse(t)
@test hasintercept(t)
@test !omitsintercept(t)
## empty RHS
t = @formula(y ~ 0)
@test hasintercept(t) == false
@test omitsintercept(t) == true
@test hasresponse(t)
@test t.rhs == ConstantTerm(0)
@test issetequal(terms(t), term.((:y, 0)))
t = @formula(y ~ -1)
@test hasintercept(t) == false
@test omitsintercept(t) == true
## intercept-only
t = @formula(y ~ 1)
@test hasresponse(t) == true
@test hasintercept(t) == true
@test t.rhs == onet
@test issetequal(terms(t), (onet, y))
## terms add
t = @formula(y ~ 1 + x1 + x2)
@test hasintercept(t) == true
@test t.rhs == (onet, x1, x2)
@test issetequal(terms(t), [y, onet, x1, x2])
## implicit intercept behavior: NO intercept after @formula
t = @formula(y ~ x1 + x2)
@test hasintercept(t) == false
@test omitsintercept(t) == false
@test t.rhs == (x1, x2)
@test issetequal(terms(t), [y, x1, x2])
## no intercept
t = @formula(y ~ 0 + x1 + x2)
@test hasintercept(t) == false
@test omitsintercept(t) == true
@test t.rhs == term.((0, :x1, :x2))
t = @formula(y ~ -1 + x1 + x2)
@test hasintercept(t) == false
@test omitsintercept(t) == true
@test t.rhs == term.((-1, :x1, :x2))
t = @formula(y ~ x1 & x2)
@test hasintercept(t) == false
@test omitsintercept(t) == false
@test t.rhs == x1&x2
@test issetequal(terms(t), [y, x1, x2])
## `*` expansion
t = @formula(y ~ x1 * x2)
@test hasintercept(t) == false
@test omitsintercept(t) == false
@test t.rhs == (x1, x2, x1&x2)
@test issetequal(terms(t), [y, x1, x2])
## associative rule:
## +
t = @formula(y ~ x1 + x2 + x3)
@test t.rhs == (x1, x2, x3)
## &
t = @formula(y ~ x1 & x2 & x3)
@test t.rhs == x1&x2&x3
@test issetequal(terms(t), [y, x1, x2, x3])
## distributive property of + and &
t = @formula(y ~ x1 & (x2 + x3))
@test t.rhs == (x1&x2, x1&x3)
@test issetequal(terms(t), [y, x1, x2, x3])
## ordering of interaction terms is preserved across distributive
t = @formula(y ~ (x2 + x3) & x1)
@test t.rhs == x2&x1 + x3&x1
## distributive with *
t = @formula(y ~ (a + b) * c)
@test t.rhs == (a, b, c, a&c, b&c)
## three-way *
t = @formula(y ~ a * b * c)
@test t.rhs == (a, b, c, a&b, a&c, b&c, a&b&c)
@test issetequal(terms(t), (y, a, b, c))
## Interactions with `1` reduce to main effect.
t = @formula(y ~ 1 & x1)
@test t.rhs == x1
t = @formula(y ~ (1 + x1) & x2)
@test t.rhs == (x2, x1&x2)
## PR #54 breaks formula-level equality because original (un-lowered)
## expression is kept on Formula struct. but functional (RHS) equality
## should be maintained
using StatsModels: drop_term
@test drop_term(@formula(foo ~ 1 + bar + baz), term(:bar)) ==
@formula(foo ~ 1 + baz)
@test drop_term(@formula(foo ~ 1 + bar + baz), term(1)) ==
@formula(foo ~ bar + baz)
# drop_term no longer checks for whether term is found...
@test_broken drop_term(@formula(foo ~ bar + baz), term(0))
@test_broken drop_term(@formula(foo ~ bar + baz), term(:boz))
form = @formula(foo ~ 1 + bar + baz)
@test form == @formula(foo ~ 1 + bar + baz)
@test drop_term(form, term(:bar)) == @formula(foo ~ 1 + baz)
# drop_term creates a new formula:
@test form != @formula(foo ~ 1 + baz)
# Incorrect formula separator
@test_throws LoadError @eval @formula(y => x + 1)
# copying formulas
f = @formula(foo ~ 1 + bar)
@test f == deepcopy(f)
f = @formula(foo ~ bar)
@test f == deepcopy(f)
end
| [
31,
9288,
2617,
366,
687,
4712,
1,
2221,
628,
220,
220,
220,
1262,
20595,
5841,
1424,
25,
468,
26209,
11,
468,
3849,
984,
11,
267,
24883,
3849,
984,
628,
220,
220,
220,
331,
11,
2124,
16,
11,
2124,
17,
11,
2124,
18,
11,
257,
11,
275,
11,
269,
11,
319,
316,
796,
3381,
12195,
7,
25,
88,
11,
1058,
87,
16,
11,
1058,
87,
17,
11,
1058,
87,
18,
11,
1058,
64,
11,
1058,
65,
11,
1058,
66,
11,
352,
4008,
628,
220,
220,
220,
22492,
6635,
6565,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
15,
5299,
657,
8,
198,
220,
220,
220,
2488,
9288,
5145,
10134,
26209,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
5145,
10134,
3849,
984,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
20217,
40596,
7,
15,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
3103,
18797,
40596,
7,
15,
8,
12962,
628,
220,
220,
220,
22492,
6565,
300,
11994,
11,
15788,
319,
9529,
82,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
15,
5299,
352,
8,
198,
220,
220,
220,
2488,
9288,
5145,
10134,
26209,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
5145,
296,
896,
3849,
984,
7,
83,
8,
628,
220,
220,
220,
22492,
6565,
371,
7998,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
657,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
468,
26209,
7,
83,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
20217,
40596,
7,
15,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
3381,
12195,
7,
25,
88,
11,
657,
22305,
628,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
532,
16,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
2081,
628,
220,
220,
220,
22492,
15788,
12,
8807,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
352,
8,
198,
220,
220,
220,
2488,
9288,
468,
26209,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
319,
316,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
357,
36823,
11,
331,
4008,
628,
220,
220,
220,
22492,
2846,
751,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
352,
1343,
2124,
16,
1343,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
36823,
11,
2124,
16,
11,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
319,
316,
11,
2124,
16,
11,
2124,
17,
12962,
628,
220,
220,
220,
22492,
16992,
15788,
4069,
25,
8005,
15788,
706,
2488,
687,
4712,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1343,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
87,
16,
11,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
2124,
16,
11,
2124,
17,
12962,
628,
220,
220,
220,
22492,
645,
15788,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
657,
1343,
2124,
16,
1343,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
3381,
12195,
7,
15,
11,
1058,
87,
16,
11,
1058,
87,
17,
4008,
628,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
532,
16,
1343,
2124,
16,
1343,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
2081,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
3381,
12195,
32590,
16,
11,
1058,
87,
16,
11,
1058,
87,
17,
4008,
628,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1222,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
2124,
16,
5,
87,
17,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
2124,
16,
11,
2124,
17,
12962,
628,
220,
220,
220,
22492,
4600,
9,
63,
7118,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1635,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
468,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
267,
24883,
3849,
984,
7,
83,
8,
6624,
3991,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
87,
16,
11,
2124,
17,
11,
2124,
16,
5,
87,
17,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
2124,
16,
11,
2124,
17,
12962,
628,
220,
220,
220,
22492,
2570,
876,
3896,
25,
198,
220,
220,
220,
22492,
1343,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1343,
2124,
17,
1343,
2124,
18,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
87,
16,
11,
2124,
17,
11,
2124,
18,
8,
628,
220,
220,
220,
22492,
1222,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1222,
2124,
17,
1222,
2124,
18,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
2124,
16,
5,
87,
17,
5,
87,
18,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
2124,
16,
11,
2124,
17,
11,
2124,
18,
12962,
628,
220,
220,
220,
22492,
11309,
425,
3119,
286,
1343,
290,
1222,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
2124,
16,
1222,
357,
87,
17,
1343,
2124,
18,
4008,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
87,
16,
5,
87,
17,
11,
2124,
16,
5,
87,
18,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
685,
88,
11,
2124,
16,
11,
2124,
17,
11,
2124,
18,
12962,
198,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
16216,
286,
10375,
2846,
318,
17232,
1973,
11309,
425,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
357,
87,
17,
1343,
2124,
18,
8,
1222,
2124,
16,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
2124,
17,
5,
87,
16,
1343,
2124,
18,
5,
87,
16,
628,
220,
220,
220,
22492,
11309,
425,
351,
1635,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
357,
64,
1343,
275,
8,
1635,
269,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
64,
11,
275,
11,
269,
11,
257,
5,
66,
11,
275,
5,
66,
8,
628,
220,
220,
220,
22492,
1115,
12,
1014,
1635,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
257,
1635,
275,
1635,
269,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
64,
11,
275,
11,
269,
11,
257,
5,
65,
11,
257,
5,
66,
11,
275,
5,
66,
11,
257,
5,
65,
5,
66,
8,
198,
220,
220,
220,
2488,
9288,
1189,
316,
40496,
7,
38707,
7,
83,
828,
357,
88,
11,
257,
11,
275,
11,
269,
4008,
628,
220,
220,
220,
22492,
4225,
4658,
351,
4600,
16,
63,
4646,
284,
1388,
1245,
13,
198,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
352,
1222,
2124,
16,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
2124,
16,
628,
220,
220,
220,
256,
796,
2488,
687,
4712,
7,
88,
5299,
357,
16,
1343,
2124,
16,
8,
1222,
2124,
17,
8,
198,
220,
220,
220,
2488,
9288,
256,
13,
81,
11994,
6624,
357,
87,
17,
11,
2124,
16,
5,
87,
17,
8,
628,
220,
220,
220,
22492,
4810,
1303,
4051,
9457,
10451,
12,
5715,
10537,
780,
2656,
357,
403,
12,
9319,
1068,
8,
198,
220,
220,
220,
22492,
5408,
318,
4030,
319,
19639,
2878,
13,
220,
475,
10345,
357,
49,
7998,
8,
10537,
198,
220,
220,
220,
22492,
815,
307,
9456,
198,
220,
220,
220,
1262,
20595,
5841,
1424,
25,
4268,
62,
4354,
628,
220,
220,
220,
2488,
9288,
4268,
62,
4354,
7,
31,
687,
4712,
7,
21943,
5299,
352,
1343,
2318,
1343,
275,
1031,
828,
3381,
7,
25,
5657,
4008,
6624,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
275,
1031,
8,
198,
220,
220,
220,
2488,
9288,
4268,
62,
4354,
7,
31,
687,
4712,
7,
21943,
5299,
352,
1343,
2318,
1343,
275,
1031,
828,
3381,
7,
16,
4008,
6624,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
687,
4712,
7,
21943,
5299,
2318,
1343,
275,
1031,
8,
628,
220,
220,
220,
1303,
4268,
62,
4354,
645,
2392,
8794,
329,
1771,
3381,
318,
1043,
986,
198,
220,
220,
220,
2488,
9288,
62,
25826,
4268,
62,
4354,
7,
31,
687,
4712,
7,
21943,
5299,
2318,
1343,
275,
1031,
828,
3381,
7,
15,
4008,
198,
220,
220,
220,
2488,
9288,
62,
25826,
4268,
62,
4354,
7,
31,
687,
4712,
7,
21943,
5299,
2318,
1343,
275,
1031,
828,
3381,
7,
25,
2127,
89,
4008,
628,
220,
220,
220,
1296,
796,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
2318,
1343,
275,
1031,
8,
198,
220,
220,
220,
2488,
9288,
1296,
6624,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
2318,
1343,
275,
1031,
8,
198,
220,
220,
220,
2488,
9288,
4268,
62,
4354,
7,
687,
11,
3381,
7,
25,
5657,
4008,
6624,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
275,
1031,
8,
198,
220,
220,
220,
1303,
4268,
62,
4354,
8075,
257,
649,
10451,
25,
198,
220,
220,
220,
2488,
9288,
1296,
14512,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
275,
1031,
8,
628,
220,
220,
220,
1303,
3457,
47315,
10451,
2880,
1352,
198,
220,
220,
220,
2488,
9288,
62,
400,
8516,
8778,
12331,
2488,
18206,
2488,
687,
4712,
7,
88,
5218,
2124,
1343,
352,
8,
628,
220,
220,
220,
1303,
23345,
32126,
198,
220,
220,
220,
277,
796,
2488,
687,
4712,
7,
21943,
5299,
352,
1343,
2318,
8,
198,
220,
220,
220,
2488,
9288,
277,
6624,
2769,
30073,
7,
69,
8,
628,
220,
220,
220,
277,
796,
2488,
687,
4712,
7,
21943,
5299,
2318,
8,
198,
220,
220,
220,
2488,
9288,
277,
6624,
2769,
30073,
7,
69,
8,
198,
198,
437,
198
] | 2.133643 | 1,938 |
@inline function get_geom_weights_outerloop(
geom_weights::NTuple{3, <:AbstractArray{T, 2}}, i, ::Type{Cylindrical}
) where {T}
geom_weights[1][1, i],
geom_weights[1][2, i],
geom_weights[1][3, i],
geom_weights[1][4, i],
geom_weights[1][5, i],
geom_weights[1][6, i]
end
@inline function get_geom_weights_outerloop(
geom_weights::NTuple{3, <:AbstractArray{T, 2}}, i, ::Type{Cartesian}
) where {T}
geom_weights[1][1, i],
geom_weights[1][2, i],
geom_weights[1][3, i],
geom_weights[1][4, i + 1],
geom_weights[1][4, i]
end
@inline function prepare_weights_in_middleloop(
geom_weights::NTuple{3, <:AbstractArray{T, 2}}, ::Type{Cylindrical},
i2, in2,
pwwrr, pwwrl, r_inv_pwΔmpr, Δr_ext_inv_r_pwmprr, Δr_ext_inv_l_pwmprl, Δmpr_squared,
is_r0_t::Val{is_r0}
) where {T, is_r0}
pwwφr = geom_weights[2][1, in2]
pwwφl = geom_weights[2][2, in2]
pwΔmpφ = geom_weights[2][3, in2]
Δφ_ext_inv_r = geom_weights[2][4, i2]
Δφ_ext_inv_l = geom_weights[2][4, in2]
if is_r0
pwwφr = T(0.5)
pwwφl = T(0.5)
pwΔmpφ = T(2π)
Δφ_ext_inv_r = inv(pwΔmpφ)
Δφ_ext_inv_l = Δφ_ext_inv_r
end
pwwrr_pwwφr = pwwrr * pwwφr
pwwrl_pwwφr = pwwrl * pwwφr
pwwrr_pwwφl = pwwrr * pwwφl
pwwrl_pwwφl = pwwrl * pwwφl
pwΔmpφ_Δmpr_squared = pwΔmpφ * Δmpr_squared
Δr_ext_inv_r_pwmprr_pwΔmpφ = Δr_ext_inv_r_pwmprr * pwΔmpφ
Δr_ext_inv_l_pwmprl_pwΔmpφ = Δr_ext_inv_l_pwmprl * pwΔmpφ
r_inv_pwΔmpr_Δφ_ext_inv_r = r_inv_pwΔmpr * Δφ_ext_inv_r
r_inv_pwΔmpr_Δφ_ext_inv_l = r_inv_pwΔmpr * Δφ_ext_inv_l
return (
pwwrr, pwwrl, pwwφr, pwwφl,
pwwrr_pwwφr, pwwrl_pwwφr, pwwrr_pwwφl, pwwrl_pwwφl,
pwΔmpφ_Δmpr_squared,
Δr_ext_inv_r_pwmprr_pwΔmpφ, Δr_ext_inv_l_pwmprl_pwΔmpφ,
r_inv_pwΔmpr_Δφ_ext_inv_r, r_inv_pwΔmpr_Δφ_ext_inv_l
)
end
@inline function prepare_weights_in_middleloop(
geom_weights::NTuple{3, <:AbstractArray{T, 2}}, ::Type{Cartesian},
i2, in2,
pww3r, pww3l, pwΔmp3, Δ3_ext_inv_r, Δ3_ext_inv_l,
is_r0_t
) where {T}
pww2r = geom_weights[2][1, in2]
pww2l = geom_weights[2][2, in2]
pwΔmp2 = geom_weights[2][3, in2]
pwΔmp2_pwΔmp3 = pwΔmp2 * pwΔmp3
Δ2_ext_inv_r_pwΔmp3 = geom_weights[2][4, in2 + 1] * pwΔmp3
Δ2_ext_inv_l_pwΔmp3 = geom_weights[2][4, in2] * pwΔmp3
Δ3_ext_inv_r_pwΔmp2 = Δ3_ext_inv_r * pwΔmp2
Δ3_ext_inv_l_pwΔmp2 = Δ3_ext_inv_l * pwΔmp2
pww2r_pww3r = pww2r * pww3r
pww2r_pww3l = pww2r * pww3l
pww2l_pww3r = pww2l * pww3r
pww2l_pww3l = pww2l * pww3l
return (
pww3r, pww3l, pww2r, pww2l,
pww2r_pww3r, pww2r_pww3l, pww2l_pww3r, pww2l_pww3l,
pwΔmp2_pwΔmp3,
Δ3_ext_inv_r_pwΔmp2, Δ3_ext_inv_l_pwΔmp2,
Δ2_ext_inv_r_pwΔmp3, Δ2_ext_inv_l_pwΔmp3,
)
end
@fastmath function middleloop!(
i3::Int, rb_tar_idx::Int, rb_src_idx::Int,
pcs::PotentialCalculationSetup{T, S},
update_even_points::Val{even_points},
depletion_handling::Val{depletion_handling_enabled},
is_weighting_potential::Val{_is_weighting_potential},
only2d::Val{only_2d},
idx3iseven::Val{idx3_is_even},
is_r0_t::Val{is_r0}
)::Nothing where {T, S, even_points, depletion_handling_enabled, _is_weighting_potential, only_2d, idx3_is_even, is_r0}
@inbounds begin
in3 = i3 - 1
geom_weights_3 = get_geom_weights_outerloop(pcs.geom_weights, in3, S)
line_weights::Array{T, 2} = Array{T, 2}(undef, size(pcs.potential, 1) - 2, 6)
# Even though this causes some allocations it
# is faster than using a predefined array, e.g. stored in pcs
# Especially when using multiple threads
#=
Splitting this into two loops over even and uneven i2
seems to increase the performance quite a bit by hard-coding oscillating type
instead of one loop using:
rφi_is_even_t::Union{Val{true}, Val{false}} = Val(iseven(i3 + i2) ? true : false)
=#
for i2 in (only_2d ? (2,) : 2:2:(size(pcs.potential, 2) - 1))
in2 = i2 - 1
i23_is_even_t = Val(idx3_is_even ? true : false)
geom_weights_2 = prepare_weights_in_middleloop(
pcs.geom_weights, S, i2, in2,
geom_weights_3...,
is_r0_t
)
calculate_weights_for_innerloop!(line_weights, pcs, i2, in2, i3, in3,
update_even_points, i23_is_even_t,
geom_weights_2...
)
innerloop!(line_weights, pcs, i2, in2, i3, in3, rb_tar_idx, rb_src_idx,
update_even_points, i23_is_even_t,
depletion_handling, is_weighting_potential, only2d)
end
for i2 in 3:2:(size(pcs.potential, 2) - 1)
in2 = i2 - 1
i23_is_even_t = Val(idx3_is_even ? false : true)
geom_weights_2 = prepare_weights_in_middleloop(
pcs.geom_weights, S, i2, in2,
geom_weights_3...,
is_r0_t
)
calculate_weights_for_innerloop!(line_weights, pcs, i2, in2, i3, in3,
update_even_points, i23_is_even_t,
geom_weights_2...
)
innerloop!(line_weights, pcs, i2, in2, i3, in3, rb_tar_idx, rb_src_idx,
update_even_points, i23_is_even_t,
depletion_handling, is_weighting_potential, only2d)
end
end
end
| [
31,
45145,
2163,
651,
62,
469,
296,
62,
43775,
62,
39605,
26268,
7,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
3712,
11251,
29291,
90,
18,
11,
1279,
25,
23839,
19182,
90,
51,
11,
362,
92,
5512,
1312,
11,
7904,
6030,
90,
34,
2645,
521,
8143,
92,
201,
198,
8,
810,
1391,
51,
92,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
16,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
17,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
18,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
19,
11,
1312,
4357,
220,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
20,
11,
1312,
4357,
220,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
21,
11,
1312,
60,
220,
220,
201,
198,
437,
201,
198,
201,
198,
31,
45145,
2163,
651,
62,
469,
296,
62,
43775,
62,
39605,
26268,
7,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
3712,
11251,
29291,
90,
18,
11,
1279,
25,
23839,
19182,
90,
51,
11,
362,
92,
5512,
1312,
11,
7904,
6030,
90,
43476,
35610,
92,
201,
198,
8,
810,
1391,
51,
92,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
16,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
17,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
18,
11,
1312,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
19,
11,
1312,
1343,
352,
4357,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
58,
16,
7131,
19,
11,
1312,
60,
201,
198,
437,
201,
198,
201,
198,
31,
45145,
2163,
8335,
62,
43775,
62,
259,
62,
27171,
26268,
7,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
3712,
11251,
29291,
90,
18,
11,
1279,
25,
23839,
19182,
90,
51,
11,
362,
92,
5512,
7904,
6030,
90,
34,
2645,
521,
8143,
5512,
201,
198,
220,
220,
220,
1312,
17,
11,
287,
17,
11,
201,
198,
220,
220,
220,
279,
1383,
21062,
11,
279,
1383,
45895,
11,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
11,
37455,
81,
62,
2302,
62,
16340,
62,
81,
62,
79,
26377,
1050,
81,
11,
37455,
81,
62,
2302,
62,
16340,
62,
75,
62,
79,
26377,
1050,
75,
11,
37455,
76,
1050,
62,
16485,
1144,
11,
220,
201,
198,
220,
220,
220,
318,
62,
81,
15,
62,
83,
3712,
7762,
90,
271,
62,
81,
15,
92,
201,
198,
8,
810,
1391,
51,
11,
318,
62,
81,
15,
92,
201,
198,
220,
220,
220,
279,
1383,
139,
228,
81,
220,
220,
220,
220,
220,
220,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
16,
11,
287,
17,
60,
201,
198,
220,
220,
220,
279,
1383,
139,
228,
75,
220,
220,
220,
220,
220,
220,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
17,
11,
287,
17,
60,
201,
198,
220,
220,
220,
279,
86,
138,
242,
3149,
139,
228,
220,
220,
220,
220,
220,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
18,
11,
287,
17,
60,
201,
198,
220,
220,
220,
37455,
139,
228,
62,
2302,
62,
16340,
62,
81,
796,
4903,
296,
62,
43775,
58,
17,
7131,
19,
11,
220,
1312,
17,
60,
201,
198,
220,
220,
220,
37455,
139,
228,
62,
2302,
62,
16340,
62,
75,
796,
4903,
296,
62,
43775,
58,
17,
7131,
19,
11,
287,
17,
60,
201,
198,
201,
198,
220,
220,
220,
611,
318,
62,
81,
15,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
139,
228,
81,
796,
309,
7,
15,
13,
20,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
139,
228,
75,
796,
309,
7,
15,
13,
20,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
86,
138,
242,
3149,
139,
228,
796,
309,
7,
17,
46582,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
139,
228,
62,
2302,
62,
16340,
62,
81,
796,
800,
7,
79,
86,
138,
242,
3149,
139,
228,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
139,
228,
62,
2302,
62,
16340,
62,
75,
796,
37455,
139,
228,
62,
2302,
62,
16340,
62,
81,
201,
198,
220,
220,
220,
886,
201,
198,
220,
220,
220,
279,
1383,
21062,
62,
79,
1383,
139,
228,
81,
796,
279,
1383,
21062,
1635,
279,
1383,
139,
228,
81,
201,
198,
220,
220,
220,
279,
1383,
45895,
62,
79,
1383,
139,
228,
81,
796,
279,
1383,
45895,
1635,
279,
1383,
139,
228,
81,
201,
198,
220,
220,
220,
279,
1383,
21062,
62,
79,
1383,
139,
228,
75,
796,
279,
1383,
21062,
1635,
279,
1383,
139,
228,
75,
201,
198,
220,
220,
220,
279,
1383,
45895,
62,
79,
1383,
139,
228,
75,
796,
279,
1383,
45895,
1635,
279,
1383,
139,
228,
75,
201,
198,
201,
198,
220,
220,
220,
279,
86,
138,
242,
3149,
139,
228,
62,
138,
242,
76,
1050,
62,
16485,
1144,
796,
279,
86,
138,
242,
3149,
139,
228,
1635,
37455,
76,
1050,
62,
16485,
1144,
201,
198,
220,
220,
220,
37455,
81,
62,
2302,
62,
16340,
62,
81,
62,
79,
26377,
1050,
81,
62,
79,
86,
138,
242,
3149,
139,
228,
796,
37455,
81,
62,
2302,
62,
16340,
62,
81,
62,
79,
26377,
1050,
81,
1635,
279,
86,
138,
242,
3149,
139,
228,
201,
198,
220,
220,
220,
37455,
81,
62,
2302,
62,
16340,
62,
75,
62,
79,
26377,
1050,
75,
62,
79,
86,
138,
242,
3149,
139,
228,
796,
37455,
81,
62,
2302,
62,
16340,
62,
75,
62,
79,
26377,
1050,
75,
1635,
279,
86,
138,
242,
3149,
139,
228,
201,
198,
220,
220,
220,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
62,
138,
242,
139,
228,
62,
2302,
62,
16340,
62,
81,
796,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
1635,
37455,
139,
228,
62,
2302,
62,
16340,
62,
81,
201,
198,
220,
220,
220,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
62,
138,
242,
139,
228,
62,
2302,
62,
16340,
62,
75,
796,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
1635,
37455,
139,
228,
62,
2302,
62,
16340,
62,
75,
201,
198,
220,
220,
220,
1441,
357,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
21062,
11,
279,
1383,
45895,
11,
279,
1383,
139,
228,
81,
11,
279,
1383,
139,
228,
75,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
21062,
62,
79,
1383,
139,
228,
81,
11,
279,
1383,
45895,
62,
79,
1383,
139,
228,
81,
11,
279,
1383,
21062,
62,
79,
1383,
139,
228,
75,
11,
279,
1383,
45895,
62,
79,
1383,
139,
228,
75,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
86,
138,
242,
3149,
139,
228,
62,
138,
242,
76,
1050,
62,
16485,
1144,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
81,
62,
2302,
62,
16340,
62,
81,
62,
79,
26377,
1050,
81,
62,
79,
86,
138,
242,
3149,
139,
228,
11,
37455,
81,
62,
2302,
62,
16340,
62,
75,
62,
79,
26377,
1050,
75,
62,
79,
86,
138,
242,
3149,
139,
228,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
62,
138,
242,
139,
228,
62,
2302,
62,
16340,
62,
81,
11,
374,
62,
16340,
62,
79,
86,
138,
242,
76,
1050,
62,
138,
242,
139,
228,
62,
2302,
62,
16340,
62,
75,
201,
198,
220,
220,
220,
1267,
201,
198,
437,
201,
198,
201,
198,
31,
45145,
2163,
8335,
62,
43775,
62,
259,
62,
27171,
26268,
7,
201,
198,
220,
220,
220,
4903,
296,
62,
43775,
3712,
11251,
29291,
90,
18,
11,
1279,
25,
23839,
19182,
90,
51,
11,
362,
92,
5512,
7904,
6030,
90,
43476,
35610,
5512,
201,
198,
220,
220,
220,
1312,
17,
11,
287,
17,
11,
201,
198,
220,
220,
220,
279,
1383,
18,
81,
11,
279,
1383,
18,
75,
11,
279,
86,
138,
242,
3149,
18,
11,
37455,
18,
62,
2302,
62,
16340,
62,
81,
11,
37455,
18,
62,
2302,
62,
16340,
62,
75,
11,
201,
198,
220,
220,
220,
318,
62,
81,
15,
62,
83,
201,
198,
8,
810,
1391,
51,
92,
201,
198,
220,
220,
220,
279,
1383,
17,
81,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
16,
11,
287,
17,
60,
201,
198,
220,
220,
220,
279,
1383,
17,
75,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
17,
11,
287,
17,
60,
201,
198,
220,
220,
220,
279,
86,
138,
242,
3149,
17,
796,
4903,
296,
62,
43775,
58,
17,
7131,
18,
11,
287,
17,
60,
220,
201,
198,
220,
220,
220,
279,
86,
138,
242,
3149,
17,
62,
79,
86,
138,
242,
3149,
18,
796,
279,
86,
138,
242,
3149,
17,
1635,
279,
86,
138,
242,
3149,
18,
201,
198,
220,
220,
220,
37455,
17,
62,
2302,
62,
16340,
62,
81,
62,
79,
86,
138,
242,
3149,
18,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
19,
11,
287,
17,
1343,
352,
60,
1635,
279,
86,
138,
242,
3149,
18,
201,
198,
220,
220,
220,
37455,
17,
62,
2302,
62,
16340,
62,
75,
62,
79,
86,
138,
242,
3149,
18,
220,
796,
4903,
296,
62,
43775,
58,
17,
7131,
19,
11,
287,
17,
60,
220,
220,
220,
220,
1635,
279,
86,
138,
242,
3149,
18,
201,
198,
220,
220,
220,
37455,
18,
62,
2302,
62,
16340,
62,
81,
62,
79,
86,
138,
242,
3149,
17,
796,
37455,
18,
62,
2302,
62,
16340,
62,
81,
1635,
279,
86,
138,
242,
3149,
17,
201,
198,
220,
220,
220,
37455,
18,
62,
2302,
62,
16340,
62,
75,
62,
79,
86,
138,
242,
3149,
17,
796,
37455,
18,
62,
2302,
62,
16340,
62,
75,
1635,
279,
86,
138,
242,
3149,
17,
201,
198,
201,
198,
220,
220,
220,
279,
1383,
17,
81,
62,
79,
1383,
18,
81,
796,
279,
1383,
17,
81,
1635,
279,
1383,
18,
81,
201,
198,
220,
220,
220,
279,
1383,
17,
81,
62,
79,
1383,
18,
75,
796,
279,
1383,
17,
81,
1635,
279,
1383,
18,
75,
201,
198,
220,
220,
220,
279,
1383,
17,
75,
62,
79,
1383,
18,
81,
796,
279,
1383,
17,
75,
1635,
279,
1383,
18,
81,
201,
198,
220,
220,
220,
279,
1383,
17,
75,
62,
79,
1383,
18,
75,
796,
279,
1383,
17,
75,
1635,
279,
1383,
18,
75,
201,
198,
220,
220,
220,
1441,
357,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
18,
81,
11,
279,
1383,
18,
75,
11,
279,
1383,
17,
81,
11,
279,
1383,
17,
75,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
1383,
17,
81,
62,
79,
1383,
18,
81,
11,
279,
1383,
17,
81,
62,
79,
1383,
18,
75,
11,
279,
1383,
17,
75,
62,
79,
1383,
18,
81,
11,
279,
1383,
17,
75,
62,
79,
1383,
18,
75,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
279,
86,
138,
242,
3149,
17,
62,
79,
86,
138,
242,
3149,
18,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
18,
62,
2302,
62,
16340,
62,
81,
62,
79,
86,
138,
242,
3149,
17,
11,
37455,
18,
62,
2302,
62,
16340,
62,
75,
62,
79,
86,
138,
242,
3149,
17,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37455,
17,
62,
2302,
62,
16340,
62,
81,
62,
79,
86,
138,
242,
3149,
18,
11,
37455,
17,
62,
2302,
62,
16340,
62,
75,
62,
79,
86,
138,
242,
3149,
18,
11,
220,
201,
198,
220,
220,
220,
1267,
201,
198,
437,
201,
198,
201,
198,
31,
7217,
11018,
2163,
3504,
26268,
0,
7,
220,
201,
198,
220,
220,
220,
1312,
18,
3712,
5317,
11,
374,
65,
62,
18870,
62,
312,
87,
3712,
5317,
11,
374,
65,
62,
10677,
62,
312,
87,
3712,
5317,
11,
220,
201,
198,
220,
220,
220,
279,
6359,
3712,
25396,
1843,
9771,
14902,
40786,
90,
51,
11,
311,
5512,
201,
198,
220,
220,
220,
4296,
62,
10197,
62,
13033,
3712,
7762,
90,
10197,
62,
13033,
5512,
201,
198,
220,
220,
220,
42435,
62,
4993,
1359,
3712,
7762,
90,
10378,
1616,
295,
62,
4993,
1359,
62,
25616,
5512,
201,
198,
220,
220,
220,
318,
62,
6551,
278,
62,
13059,
1843,
3712,
7762,
90,
62,
271,
62,
6551,
278,
62,
13059,
1843,
5512,
220,
201,
198,
220,
220,
220,
691,
17,
67,
3712,
7762,
90,
8807,
62,
17,
67,
5512,
201,
198,
220,
220,
220,
4686,
87,
18,
786,
574,
3712,
7762,
90,
312,
87,
18,
62,
271,
62,
10197,
5512,
201,
198,
220,
220,
220,
318,
62,
81,
15,
62,
83,
3712,
7762,
90,
271,
62,
81,
15,
92,
201,
198,
2599,
25,
18465,
810,
1391,
51,
11,
311,
11,
772,
62,
13033,
11,
42435,
62,
4993,
1359,
62,
25616,
11,
4808,
271,
62,
6551,
278,
62,
13059,
1843,
11,
691,
62,
17,
67,
11,
4686,
87,
18,
62,
271,
62,
10197,
11,
318,
62,
81,
15,
92,
201,
198,
220,
220,
220,
2488,
259,
65,
3733,
2221,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
287,
18,
796,
1312,
18,
532,
352,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
18,
796,
651,
62,
469,
296,
62,
43775,
62,
39605,
26268,
7,
79,
6359,
13,
469,
296,
62,
43775,
11,
287,
18,
11,
311,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
62,
43775,
3712,
19182,
90,
51,
11,
362,
92,
796,
15690,
90,
51,
11,
362,
92,
7,
917,
891,
11,
2546,
7,
79,
6359,
13,
13059,
1843,
11,
352,
8,
532,
362,
11,
718,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3412,
996,
428,
5640,
617,
49157,
340,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
318,
5443,
621,
1262,
257,
2747,
18156,
7177,
11,
304,
13,
70,
13,
8574,
287,
279,
6359,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
18948,
618,
1262,
3294,
14390,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
28,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13341,
2535,
428,
656,
734,
23607,
625,
772,
290,
30690,
1312,
17,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2331,
284,
2620,
262,
2854,
2407,
257,
1643,
416,
1327,
12,
66,
7656,
24969,
803,
2099,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2427,
286,
530,
9052,
1262,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
139,
228,
72,
62,
271,
62,
10197,
62,
83,
3712,
38176,
90,
7762,
90,
7942,
5512,
3254,
90,
9562,
11709,
796,
3254,
7,
786,
574,
7,
72,
18,
1343,
1312,
17,
8,
5633,
2081,
1058,
3991,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
796,
2,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
17,
287,
357,
8807,
62,
17,
67,
5633,
357,
17,
35751,
1058,
362,
25,
17,
37498,
7857,
7,
79,
6359,
13,
13059,
1843,
11,
362,
8,
532,
352,
4008,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
287,
17,
796,
1312,
17,
532,
352,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
1954,
62,
271,
62,
10197,
62,
83,
796,
3254,
7,
312,
87,
18,
62,
271,
62,
10197,
5633,
2081,
1058,
3991,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
17,
796,
8335,
62,
43775,
62,
259,
62,
27171,
26268,
7,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
6359,
13,
469,
296,
62,
43775,
11,
311,
11,
1312,
17,
11,
287,
17,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
18,
986,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
81,
15,
62,
83,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15284,
62,
43775,
62,
1640,
62,
5083,
26268,
0,
7,
1370,
62,
43775,
11,
279,
6359,
11,
1312,
17,
11,
287,
17,
11,
1312,
18,
11,
287,
18,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
10197,
62,
13033,
11,
1312,
1954,
62,
271,
62,
10197,
62,
83,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
17,
986,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8434,
26268,
0,
7,
1370,
62,
43775,
11,
279,
6359,
11,
1312,
17,
11,
287,
17,
11,
1312,
18,
11,
287,
18,
11,
374,
65,
62,
18870,
62,
312,
87,
11,
374,
65,
62,
10677,
62,
312,
87,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
10197,
62,
13033,
11,
1312,
1954,
62,
271,
62,
10197,
62,
83,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42435,
62,
4993,
1359,
11,
318,
62,
6551,
278,
62,
13059,
1843,
11,
691,
17,
67,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
886,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
17,
287,
513,
25,
17,
37498,
7857,
7,
79,
6359,
13,
13059,
1843,
11,
362,
8,
532,
352,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
287,
17,
796,
1312,
17,
532,
352,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
1954,
62,
271,
62,
10197,
62,
83,
796,
3254,
7,
312,
87,
18,
62,
271,
62,
10197,
5633,
3991,
1058,
2081,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
17,
796,
8335,
62,
43775,
62,
259,
62,
27171,
26268,
7,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
6359,
13,
469,
296,
62,
43775,
11,
311,
11,
1312,
17,
11,
287,
17,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
18,
986,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
81,
15,
62,
83,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15284,
62,
43775,
62,
1640,
62,
5083,
26268,
0,
7,
1370,
62,
43775,
11,
279,
6359,
11,
1312,
17,
11,
287,
17,
11,
1312,
18,
11,
287,
18,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
10197,
62,
13033,
11,
1312,
1954,
62,
271,
62,
10197,
62,
83,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4903,
296,
62,
43775,
62,
17,
986,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8434,
26268,
0,
7,
1370,
62,
43775,
11,
279,
6359,
11,
1312,
17,
11,
287,
17,
11,
1312,
18,
11,
287,
18,
11,
374,
65,
62,
18870,
62,
312,
87,
11,
374,
65,
62,
10677,
62,
312,
87,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
10197,
62,
13033,
11,
1312,
1954,
62,
271,
62,
10197,
62,
83,
11,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42435,
62,
4993,
1359,
11,
318,
62,
6551,
278,
62,
13059,
1843,
11,
691,
17,
67,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
886,
201,
198,
220,
220,
220,
886,
201,
198,
437,
201,
198,
201,
198
] | 1.634593 | 3,492 |
"""
Beta
* Parametrization
* Score
* Fisher Information
* `time_varying_params` map.
* Default link
"""
Beta
function score!(score_til::Matrix{T}, y::T, ::Type{Beta}, param::Matrix{T}, t::Int) where T
score_til[t, 1] = log(y) + digamma(param[t, 1] + param[t, 2]) - digamma(param[t, 1])
score_til[t, 2] = log(1 - y) + digamma(param[t, 1] + param[t, 2]) - digamma(param[t, 2])
return
end
function fisher_information!(aux::AuxiliaryLinAlg{T}, ::Type{Beta}, param::Matrix{T}, t::Int) where T
minus_trigamma_a_b = -trigamma(param[t, 1] + param[t, 2])
aux.fisher[1, 1] = trigamma(param[t, 1]) + minus_trigamma_a_b
aux.fisher[2, 2] = trigamma(param[t, 2]) + minus_trigamma_a_b
aux.fisher[2, 1] = minus_trigamma_a_b
aux.fisher[1, 2] = minus_trigamma_a_b
return
end
function log_likelihood(::Type{Beta}, y::Vector{T}, param::Matrix{T}, n::Int) where T
loglik = 0.0
for t in 1:n
loglik += (param[t, 1] - 1)*log(y[t]) + (param[t, 2] - 1)*log(1 - y[t]) - logbeta(param[t, 1], param[t, 2])
end
return -loglik
end
# Links
function link!(param_tilde::Matrix{T}, ::Type{Beta}, param::Matrix{T}, t::Int) where T
param_tilde[t, 1] = link(LogLink, param[t, 1], zero(T))
param_tilde[t, 2] = link(LogLink, param[t, 2], zero(T))
return
end
function unlink!(param::Matrix{T}, ::Type{Beta}, param_tilde::Matrix{T}, t::Int) where T
param[t, 1] = unlink(LogLink, param_tilde[t, 1], zero(T))
param[t, 2] = unlink(LogLink, param_tilde[t, 2], zero(T))
return
end
function jacobian_link!(aux::AuxiliaryLinAlg{T}, ::Type{Beta}, param::Matrix{T}, t::Int) where T
aux.jac[1] = jacobian_link(LogLink, param[t, 1], zero(T))
aux.jac[2] = jacobian_link(LogLink, param[t, 2], zero(T))
return
end
# utils
function update_dist(::Type{Beta}, param::Matrix{T}, t::Int) where T
small_threshold!(param, SMALL_NUM, t)
return Beta(param[t, 1], param[t, 2])
end
function params_sdm(d::Beta)
return Distributions.params(d)
end
function num_params(::Type{Beta})
return 2
end | [
37811,
198,
220,
220,
220,
17993,
198,
9,
25139,
316,
47847,
341,
198,
9,
15178,
198,
9,
14388,
6188,
198,
9,
4600,
2435,
62,
85,
560,
278,
62,
37266,
63,
3975,
13,
198,
9,
15161,
2792,
198,
37811,
198,
43303,
198,
198,
8818,
4776,
0,
7,
26675,
62,
47163,
3712,
46912,
90,
51,
5512,
331,
3712,
51,
11,
7904,
6030,
90,
43303,
5512,
5772,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
198,
220,
220,
220,
4776,
62,
47163,
58,
83,
11,
352,
60,
796,
2604,
7,
88,
8,
1343,
3100,
321,
2611,
7,
17143,
58,
83,
11,
352,
60,
1343,
5772,
58,
83,
11,
362,
12962,
532,
3100,
321,
2611,
7,
17143,
58,
83,
11,
352,
12962,
198,
220,
220,
220,
4776,
62,
47163,
58,
83,
11,
362,
60,
796,
2604,
7,
16,
532,
331,
8,
1343,
3100,
321,
2611,
7,
17143,
58,
83,
11,
352,
60,
1343,
5772,
58,
83,
11,
362,
12962,
532,
3100,
321,
2611,
7,
17143,
58,
83,
11,
362,
12962,
198,
220,
220,
220,
1441,
198,
437,
198,
198,
8818,
17685,
62,
17018,
0,
7,
14644,
3712,
32,
2821,
28129,
14993,
2348,
70,
90,
51,
5512,
7904,
6030,
90,
43303,
5512,
5772,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
198,
220,
220,
220,
20208,
62,
2213,
328,
321,
2611,
62,
64,
62,
65,
796,
532,
2213,
328,
321,
2611,
7,
17143,
58,
83,
11,
352,
60,
1343,
5772,
58,
83,
11,
362,
12962,
198,
220,
220,
220,
27506,
13,
69,
4828,
58,
16,
11,
352,
60,
796,
5192,
321,
2611,
7,
17143,
58,
83,
11,
352,
12962,
1343,
20208,
62,
2213,
328,
321,
2611,
62,
64,
62,
65,
198,
220,
220,
220,
27506,
13,
69,
4828,
58,
17,
11,
362,
60,
796,
5192,
321,
2611,
7,
17143,
58,
83,
11,
362,
12962,
1343,
20208,
62,
2213,
328,
321,
2611,
62,
64,
62,
65,
198,
220,
220,
220,
27506,
13,
69,
4828,
58,
17,
11,
352,
60,
796,
20208,
62,
2213,
328,
321,
2611,
62,
64,
62,
65,
198,
220,
220,
220,
27506,
13,
69,
4828,
58,
16,
11,
362,
60,
796,
20208,
62,
2213,
328,
321,
2611,
62,
64,
62,
65,
198,
220,
220,
220,
1441,
198,
437,
198,
198,
8818,
2604,
62,
2339,
11935,
7,
3712,
6030,
90,
43303,
5512,
331,
3712,
38469,
90,
51,
5512,
5772,
3712,
46912,
90,
51,
5512,
299,
3712,
5317,
8,
810,
309,
198,
220,
220,
220,
2604,
46965,
796,
657,
13,
15,
198,
220,
220,
220,
329,
256,
287,
352,
25,
77,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
46965,
15853,
357,
17143,
58,
83,
11,
352,
60,
532,
352,
27493,
6404,
7,
88,
58,
83,
12962,
1343,
357,
17143,
58,
83,
11,
362,
60,
532,
352,
27493,
6404,
7,
16,
532,
331,
58,
83,
12962,
532,
2604,
31361,
7,
17143,
58,
83,
11,
352,
4357,
5772,
58,
83,
11,
362,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
532,
6404,
46965,
198,
437,
198,
198,
2,
21691,
198,
8818,
2792,
0,
7,
17143,
62,
83,
44725,
3712,
46912,
90,
51,
5512,
7904,
6030,
90,
43303,
5512,
5772,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
220,
198,
220,
220,
220,
5772,
62,
83,
44725,
58,
83,
11,
352,
60,
796,
2792,
7,
11187,
11280,
11,
5772,
58,
83,
11,
352,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
5772,
62,
83,
44725,
58,
83,
11,
362,
60,
796,
2792,
7,
11187,
11280,
11,
5772,
58,
83,
11,
362,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
1441,
198,
437,
198,
8818,
555,
8726,
0,
7,
17143,
3712,
46912,
90,
51,
5512,
7904,
6030,
90,
43303,
5512,
5772,
62,
83,
44725,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
220,
198,
220,
220,
220,
5772,
58,
83,
11,
352,
60,
796,
555,
8726,
7,
11187,
11280,
11,
5772,
62,
83,
44725,
58,
83,
11,
352,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
5772,
58,
83,
11,
362,
60,
796,
555,
8726,
7,
11187,
11280,
11,
5772,
62,
83,
44725,
58,
83,
11,
362,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
1441,
198,
437,
198,
8818,
474,
330,
672,
666,
62,
8726,
0,
7,
14644,
3712,
32,
2821,
28129,
14993,
2348,
70,
90,
51,
5512,
7904,
6030,
90,
43303,
5512,
5772,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
220,
198,
220,
220,
220,
27506,
13,
30482,
58,
16,
60,
796,
474,
330,
672,
666,
62,
8726,
7,
11187,
11280,
11,
5772,
58,
83,
11,
352,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
27506,
13,
30482,
58,
17,
60,
796,
474,
330,
672,
666,
62,
8726,
7,
11187,
11280,
11,
5772,
58,
83,
11,
362,
4357,
6632,
7,
51,
4008,
198,
220,
220,
220,
1441,
198,
437,
198,
198,
2,
3384,
4487,
198,
8818,
4296,
62,
17080,
7,
3712,
6030,
90,
43303,
5512,
5772,
3712,
46912,
90,
51,
5512,
256,
3712,
5317,
8,
810,
309,
198,
220,
220,
220,
1402,
62,
400,
10126,
0,
7,
17143,
11,
9447,
7036,
62,
41359,
11,
256,
8,
198,
220,
220,
220,
1441,
17993,
7,
17143,
58,
83,
11,
352,
4357,
5772,
58,
83,
11,
362,
12962,
198,
437,
220,
198,
198,
8818,
42287,
62,
21282,
76,
7,
67,
3712,
43303,
8,
198,
220,
220,
220,
1441,
46567,
507,
13,
37266,
7,
67,
8,
198,
437,
198,
198,
8818,
997,
62,
37266,
7,
3712,
6030,
90,
43303,
30072,
198,
220,
220,
220,
1441,
362,
198,
437
] | 2.223185 | 923 |
using Luxor, Colors
chord = [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0];
adjacency = hcat([circshift(chord, p) for p in 0:11] ...);
laplacian = sum(chord) * eye(12) - adjacency;
eigvs = eigvecs(laplacian);
radius = 20
Drawing(16*2*radius, 10*2*radius)
eigv = eigvs[:, 4]
bluered = diverging_palette(240, 10, 200)
origin()
background(bluered[101])
setopacity(1.0)
h = sqrt(3)
xs = [0, 3, 2, 2, 0, 4, 2, 1, 1, 3, 3, 1]
ys = [0, 1, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1]
for p in 1:length(xs)
c = clamp(imag(eigv[p] * 2), -1, 1)
c = Int(round(c * 99)) + 101
setcolor(bluered[c])
for oct_x in -1:1
for oct_y in -1:1
x = xs[p]
y = ys[p]
ngon(
(x + mod(y, 2)/2 + 4oct_x + 1.5*oct_y - 2) * radius * h,
(y + 3oct_y - 1) * radius * 1.5,
radius, 6, pi/2, :fill)
text("C")
end
end
end
finish()
preview()
| [
3500,
17145,
273,
11,
29792,
198,
198,
354,
585,
796,
685,
15,
11,
657,
11,
657,
11,
657,
11,
352,
11,
657,
11,
657,
11,
352,
11,
657,
11,
657,
11,
657,
11,
657,
11208,
198,
324,
30482,
1387,
796,
289,
9246,
26933,
21170,
30846,
7,
354,
585,
11,
279,
8,
329,
279,
287,
657,
25,
1157,
60,
2644,
1776,
198,
5031,
489,
330,
666,
796,
2160,
7,
354,
585,
8,
1635,
4151,
7,
1065,
8,
532,
9224,
330,
1387,
26,
198,
68,
328,
14259,
796,
304,
328,
303,
6359,
7,
5031,
489,
330,
666,
1776,
628,
198,
42172,
796,
1160,
198,
25302,
278,
7,
1433,
9,
17,
9,
42172,
11,
838,
9,
17,
9,
42172,
8,
198,
198,
68,
328,
85,
796,
304,
328,
14259,
58,
45299,
604,
60,
198,
17585,
445,
796,
12312,
2667,
62,
18596,
5857,
7,
16102,
11,
838,
11,
939,
8,
198,
198,
47103,
3419,
198,
25249,
7,
17585,
445,
58,
8784,
12962,
198,
2617,
404,
4355,
7,
16,
13,
15,
8,
198,
198,
71,
796,
19862,
17034,
7,
18,
8,
198,
198,
34223,
796,
685,
15,
11,
220,
513,
11,
220,
362,
11,
220,
362,
11,
220,
657,
11,
220,
604,
11,
220,
362,
11,
220,
352,
11,
220,
352,
11,
220,
513,
11,
220,
513,
11,
220,
352,
60,
198,
893,
796,
685,
15,
11,
220,
352,
11,
220,
657,
11,
220,
362,
11,
220,
352,
11,
220,
362,
11,
220,
352,
11,
220,
657,
11,
220,
362,
11,
220,
657,
11,
220,
362,
11,
220,
352,
60,
198,
198,
1640,
279,
287,
352,
25,
13664,
7,
34223,
8,
198,
220,
220,
220,
269,
796,
29405,
7,
48466,
7,
68,
328,
85,
58,
79,
60,
1635,
362,
828,
532,
16,
11,
352,
8,
198,
220,
220,
220,
269,
796,
2558,
7,
744,
7,
66,
1635,
7388,
4008,
1343,
8949,
198,
220,
220,
220,
900,
8043,
7,
17585,
445,
58,
66,
12962,
198,
220,
220,
220,
329,
19318,
62,
87,
287,
532,
16,
25,
16,
198,
220,
220,
220,
220,
220,
220,
220,
329,
19318,
62,
88,
287,
532,
16,
25,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
2124,
82,
58,
79,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
331,
82,
58,
79,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
14520,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
87,
1343,
953,
7,
88,
11,
362,
20679,
17,
1343,
604,
38441,
62,
87,
1343,
352,
13,
20,
9,
38441,
62,
88,
532,
362,
8,
1635,
16874,
1635,
289,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
88,
1343,
513,
38441,
62,
88,
532,
352,
8,
1635,
16874,
1635,
352,
13,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16874,
11,
718,
11,
31028,
14,
17,
11,
1058,
20797,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
7203,
34,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
628,
198,
15643,
680,
3419,
198,
3866,
1177,
3419,
198
] | 1.712727 | 550 |
using ProbNumODE
using ProbNumODE: remake_prob_with_jac
using DifferentialEquations
using LinearAlgebra
using Distributions
using StatsPlots
pyplot()
FILEDIR = dirname(@__FILE__)
# Problem and reference solution
prob = remake_prob_with_jac(lotka_volterra())
appxsol = solve(remake(prob, u0=big.(prob.u0)), abstol=1e-30, reltol=1e-30)
# Probabilistic solve and errors
sol = solve(prob, EKF1(), sigmarule=:fixedMLE, q=5,
abstol=1e-7, reltol=1e-4, smooth=true)
errors = sol.u .- appxsol.(sol.t)
# Sampling and plotting
sp = ProbNumODE.sample(sol, 10)
sp_errs = sp .- ProbNumODE.stack(sol.u)
p = plot(
sol.t, ProbNumODE.stack(errors), xlabel="\$t\$", legend=:bottomleft,
label=["\$(\\hat{y}(t)-y(t))_1\$" "\$(\\hat{y}(t)-y(t))_2\$"],
)
for i in 1:size(sp)[3]
plot!(p, sol.t, sp_errs[:, :, i], color=[1 2], label="", linewidth=0.5)
end
plot!(sol.t, ProbNumODE.stack(errors), color=:black, label="")
plot!(p, size=(400, 250))
savefig(joinpath(FILEDIR, "sampled_errors_ekf1.png"))
println("Plot saved to $FILEDIR")
| [
3500,
30873,
33111,
16820,
198,
3500,
30873,
33111,
16820,
25,
28763,
62,
1676,
65,
62,
4480,
62,
30482,
198,
3500,
20615,
498,
23588,
602,
198,
3500,
44800,
2348,
29230,
198,
3500,
46567,
507,
198,
3500,
20595,
3646,
1747,
198,
9078,
29487,
3419,
198,
198,
46700,
1961,
4663,
796,
26672,
3672,
7,
31,
834,
25664,
834,
8,
198,
198,
2,
20647,
290,
4941,
4610,
198,
1676,
65,
796,
28763,
62,
1676,
65,
62,
4480,
62,
30482,
7,
26487,
4914,
62,
10396,
353,
430,
28955,
198,
1324,
34223,
349,
796,
8494,
7,
2787,
539,
7,
1676,
65,
11,
334,
15,
28,
14261,
12195,
1676,
65,
13,
84,
15,
36911,
16552,
349,
28,
16,
68,
12,
1270,
11,
823,
83,
349,
28,
16,
68,
12,
1270,
8,
198,
198,
2,
30873,
14991,
2569,
8494,
290,
8563,
198,
34453,
796,
8494,
7,
1676,
65,
11,
412,
42,
37,
16,
22784,
43237,
3876,
2261,
28,
25,
34021,
44,
2538,
11,
10662,
28,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16552,
349,
28,
16,
68,
12,
22,
11,
823,
83,
349,
28,
16,
68,
12,
19,
11,
7209,
28,
7942,
8,
198,
48277,
796,
1540,
13,
84,
764,
12,
598,
34223,
349,
12195,
34453,
13,
83,
8,
628,
198,
2,
3409,
11347,
290,
29353,
198,
2777,
796,
30873,
33111,
16820,
13,
39873,
7,
34453,
11,
838,
8,
198,
2777,
62,
263,
3808,
796,
599,
764,
12,
30873,
33111,
16820,
13,
25558,
7,
34453,
13,
84,
8,
198,
79,
796,
7110,
7,
198,
220,
220,
220,
1540,
13,
83,
11,
30873,
33111,
16820,
13,
25558,
7,
48277,
828,
2124,
18242,
2625,
59,
3,
83,
59,
3,
1600,
8177,
28,
25,
22487,
9464,
11,
198,
220,
220,
220,
6167,
28,
14692,
59,
3,
7,
6852,
5183,
90,
88,
92,
7,
83,
13219,
88,
7,
83,
4008,
62,
16,
59,
3,
1,
37082,
3,
7,
6852,
5183,
90,
88,
92,
7,
83,
13219,
88,
7,
83,
4008,
62,
17,
59,
3,
33116,
198,
8,
198,
1640,
1312,
287,
352,
25,
7857,
7,
2777,
38381,
18,
60,
198,
220,
220,
220,
7110,
0,
7,
79,
11,
1540,
13,
83,
11,
599,
62,
263,
3808,
58,
45299,
1058,
11,
1312,
4357,
3124,
41888,
16,
362,
4357,
6167,
2625,
1600,
9493,
413,
5649,
28,
15,
13,
20,
8,
198,
437,
198,
29487,
0,
7,
34453,
13,
83,
11,
30873,
33111,
16820,
13,
25558,
7,
48277,
828,
3124,
28,
25,
13424,
11,
6167,
2625,
4943,
198,
29487,
0,
7,
79,
11,
2546,
16193,
7029,
11,
8646,
4008,
198,
21928,
5647,
7,
22179,
6978,
7,
46700,
1961,
4663,
11,
366,
37687,
10137,
62,
48277,
62,
988,
69,
16,
13,
11134,
48774,
198,
198,
35235,
7203,
43328,
7448,
284,
720,
46700,
1961,
4663,
4943,
198
] | 2.271335 | 457 |
### A Pluto.jl notebook ###
# v0.14.7
using Markdown
using InteractiveUtils
# ╔═╡ 004d3056-5ee4-11ec-12ac-750b7ebee606
begin
using Plots
x=1:10
y=rand(10)
plot(x,y,title="first Plots demo")
end
# ╔═╡ 665707df-cbb3-4570-a4c7-c8bb98c1fdc9
begin
using Plots;
plot(rand(100, 4), layout = 4)
end
# ╔═╡ Cell order:
# ╠═004d3056-5ee4-11ec-12ac-750b7ebee606
# ╠═665707df-cbb3-4570-a4c7-c8bb98c1fdc9
| [
21017,
317,
32217,
13,
20362,
20922,
44386,
198,
2,
410,
15,
13,
1415,
13,
22,
198,
198,
3500,
2940,
2902,
198,
3500,
21365,
18274,
4487,
198,
198,
2,
2343,
243,
242,
28670,
22880,
94,
3571,
19,
67,
1270,
3980,
12,
20,
1453,
19,
12,
1157,
721,
12,
1065,
330,
12,
15426,
65,
22,
68,
20963,
33206,
198,
27471,
198,
197,
3500,
1345,
1747,
198,
197,
87,
28,
16,
25,
940,
198,
197,
88,
28,
25192,
7,
940,
8,
198,
197,
29487,
7,
87,
11,
88,
11,
7839,
2625,
11085,
1345,
1747,
13605,
4943,
198,
437,
198,
198,
2,
2343,
243,
242,
28670,
22880,
94,
718,
2996,
24038,
7568,
12,
66,
11848,
18,
12,
2231,
2154,
12,
64,
19,
66,
22,
12,
66,
23,
11848,
4089,
66,
16,
16344,
66,
24,
198,
27471,
198,
197,
3500,
1345,
1747,
26,
198,
197,
29487,
7,
25192,
7,
3064,
11,
604,
828,
12461,
796,
604,
8,
198,
437,
198,
198,
2,
2343,
243,
242,
28670,
22880,
94,
12440,
1502,
25,
198,
2,
2343,
243,
254,
28670,
22914,
67,
1270,
3980,
12,
20,
1453,
19,
12,
1157,
721,
12,
1065,
330,
12,
15426,
65,
22,
68,
20963,
33206,
198,
2,
2343,
243,
254,
28670,
36879,
24038,
7568,
12,
66,
11848,
18,
12,
2231,
2154,
12,
64,
19,
66,
22,
12,
66,
23,
11848,
4089,
66,
16,
16344,
66,
24,
198
] | 1.782222 | 225 |
function xval_data(data::Data, K, strata=nothing)
N = length(data.T)
collect(kfolds(sample(1:N, N, replace=false), K))
end
merge_kfolds(x) = vcat(first.(x)...), vcat(last.(x)...)
## get inidices of training and validation datasets stratified by strata
##function xval_data(data::Data, K, strata=ones(Int, length(data.T)))
##pool = 1:length(strata)
##kf = [kfolds(sample(pool[strata .== s], sum(strata .== s)), K) for s in unique(strata)]
##[merge_kfolds([s[k] for s in kf]) for k in 1:K]
##end
## estimate elpd for each subject in holdout set
function elpd_holdout(x::T, data::Data) where T <: AbstractFit
lp_h = dropdims(loglik_array(x, data), dims=(2))
map(logsumexp, eachcol(lp_h)) .- log(length(x.theta))
end
## cross-validation estimate of expected pointwise log predictive density
function xval(x::Vector{T}, data::Data, subsets) where T <: AbstractFit ##=xval_data(data, 10)) where T <: AbstractFit
##elpd = SharedArray{Float64,1}((length(data.T)))
##elpd = zeros(Float64, length(data.T))
##"$(length(subsets))-fold cross validation..."
elpd = @sync @distributed vcat for (train, test) in subsets
##init = [slice_param(y.init, train) for y in x]
y = merge(sampling(x[1].control, slice_data(data, train), typeof(x[1].init), x[1].prior; G=x[1].init.G)...)
##y = merge(sampling(x[1].control, slice_data(data, train), init, x[1].prior)...)
elpd_holdout(y, slice_data(data, test))
##elpd[test] =
end
sum(elpd), sqrt(length(elpd)*var(elpd)), elpd
end
| [
8818,
2124,
2100,
62,
7890,
7,
7890,
3712,
6601,
11,
509,
11,
965,
1045,
28,
22366,
8,
198,
220,
220,
220,
399,
796,
4129,
7,
7890,
13,
51,
8,
198,
220,
220,
220,
2824,
7,
74,
69,
10119,
7,
39873,
7,
16,
25,
45,
11,
399,
11,
6330,
28,
9562,
828,
509,
4008,
198,
437,
198,
198,
647,
469,
62,
74,
69,
10119,
7,
87,
8,
796,
410,
9246,
7,
11085,
12195,
87,
26513,
828,
410,
9246,
7,
12957,
12195,
87,
8,
23029,
198,
198,
2235,
651,
287,
312,
1063,
286,
3047,
290,
21201,
40522,
25369,
1431,
416,
965,
1045,
198,
2235,
8818,
2124,
2100,
62,
7890,
7,
7890,
3712,
6601,
11,
509,
11,
965,
1045,
28,
1952,
7,
5317,
11,
4129,
7,
7890,
13,
51,
22305,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
7742,
796,
352,
25,
13664,
7,
2536,
1045,
8,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
74,
69,
796,
685,
74,
69,
10119,
7,
39873,
7,
7742,
58,
2536,
1045,
764,
855,
264,
4357,
2160,
7,
2536,
1045,
764,
855,
264,
36911,
509,
8,
329,
264,
287,
3748,
7,
2536,
1045,
15437,
198,
220,
220,
220,
22492,
58,
647,
469,
62,
74,
69,
10119,
26933,
82,
58,
74,
60,
329,
264,
287,
479,
69,
12962,
329,
479,
287,
352,
25,
42,
60,
198,
2235,
437,
198,
198,
2235,
8636,
1288,
30094,
329,
1123,
2426,
287,
1745,
448,
900,
198,
8818,
1288,
30094,
62,
2946,
448,
7,
87,
3712,
51,
11,
1366,
3712,
6601,
8,
810,
309,
1279,
25,
27741,
31805,
198,
220,
220,
220,
300,
79,
62,
71,
796,
4268,
67,
12078,
7,
6404,
46965,
62,
18747,
7,
87,
11,
1366,
828,
5391,
82,
16193,
17,
4008,
198,
220,
220,
220,
3975,
7,
6404,
16345,
11201,
11,
1123,
4033,
7,
34431,
62,
71,
4008,
764,
12,
2604,
7,
13664,
7,
87,
13,
1169,
8326,
4008,
198,
437,
198,
198,
2235,
3272,
12,
12102,
341,
8636,
286,
2938,
966,
3083,
2604,
33344,
12109,
198,
8818,
2124,
2100,
7,
87,
3712,
38469,
90,
51,
5512,
1366,
3712,
6601,
11,
6352,
1039,
8,
810,
309,
1279,
25,
27741,
31805,
22492,
28,
87,
2100,
62,
7890,
7,
7890,
11,
838,
4008,
810,
309,
1279,
25,
27741,
31805,
198,
220,
220,
220,
22492,
417,
30094,
796,
39403,
19182,
90,
43879,
2414,
11,
16,
92,
19510,
13664,
7,
7890,
13,
51,
22305,
198,
220,
220,
220,
22492,
417,
30094,
796,
1976,
27498,
7,
43879,
2414,
11,
4129,
7,
7890,
13,
51,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
1,
3,
7,
13664,
7,
7266,
28709,
4008,
12,
11379,
3272,
21201,
9313,
198,
220,
220,
220,
1288,
30094,
796,
2488,
27261,
2488,
17080,
6169,
410,
9246,
329,
357,
27432,
11,
1332,
8,
287,
6352,
1039,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
15003,
796,
685,
48369,
62,
17143,
7,
88,
13,
15003,
11,
4512,
8,
329,
331,
287,
2124,
60,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
331,
796,
20121,
7,
37687,
11347,
7,
87,
58,
16,
4083,
13716,
11,
16416,
62,
7890,
7,
7890,
11,
4512,
828,
2099,
1659,
7,
87,
58,
16,
4083,
15003,
828,
2124,
58,
16,
4083,
3448,
273,
26,
402,
28,
87,
58,
16,
4083,
15003,
13,
38,
8,
23029,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
88,
796,
20121,
7,
37687,
11347,
7,
87,
58,
16,
4083,
13716,
11,
16416,
62,
7890,
7,
7890,
11,
4512,
828,
2315,
11,
2124,
58,
16,
4083,
3448,
273,
8,
23029,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
30094,
62,
2946,
448,
7,
88,
11,
16416,
62,
7890,
7,
7890,
11,
1332,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
417,
30094,
58,
9288,
60,
796,
220,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2160,
7,
417,
30094,
828,
19862,
17034,
7,
13664,
7,
417,
30094,
27493,
7785,
7,
417,
30094,
36911,
1288,
30094,
198,
437,
198
] | 2.369532 | 663 |
using Pkg
using GZip
using CSV
using FileIO
using DelimitedFiles
using Feather
using MatrixMarket
using CSVFiles
using SparseArrays
using NamedArrays
using Arpack
using LinearAlgebra: svd, lu!, qr!
using DataFrames
using BenchmarkTools
using StatsBase
using ThreadsX
using TSne
using UMAP
using Statistics: std, var
using Pipe
using Setfield
using ProgressMeter
using JuliaDB
using SortingLab
using Match
using ProgressBars
using Loess | [
3500,
350,
10025,
198,
3500,
402,
41729,
198,
3500,
44189,
198,
3500,
9220,
9399,
198,
3500,
4216,
320,
863,
25876,
198,
3500,
34501,
198,
3500,
24936,
27470,
198,
3500,
44189,
25876,
198,
3500,
1338,
17208,
3163,
20477,
198,
3500,
34441,
3163,
20477,
198,
3500,
943,
8002,
198,
3500,
44800,
2348,
29230,
25,
264,
20306,
11,
300,
84,
28265,
10662,
81,
0,
198,
3500,
6060,
35439,
198,
3500,
25187,
4102,
33637,
198,
3500,
20595,
14881,
198,
3500,
14122,
82,
55,
198,
3500,
26136,
710,
198,
3500,
471,
33767,
198,
3500,
14370,
25,
14367,
11,
1401,
198,
3500,
36039,
198,
3500,
5345,
3245,
198,
3500,
18387,
44,
2357,
198,
3500,
22300,
11012,
198,
3500,
311,
24707,
17822,
198,
3500,
13225,
198,
3500,
18387,
33,
945,
198,
3500,
6706,
408
] | 3.425197 | 127 |
#=
VecE3: a 3d euclidean vector
=#
immutable VecE3 <: VecE
x :: Float64
y :: Float64
z :: Float64
VecE3() = new(0.0,0.0,0.0)
VecE3(x::Real, y::Real, z::Real) = new(x,y,z)
end
Base.length(::VecE3) = 3
Base.copy(a::VecE3) = VecE3(a.x, a.y, a.z)
Base.convert(::Type{Vector{Float64}}, a::VecE3) = [a.x, a.y, a.z]
function Base.convert{R<:Real}(::Type{VecE3}, a::AbstractArray{R})
@assert(length(a) == 3)
VecE3(a[1], a[2], a[3])
end
Base.show(io::IO, a::VecE3) = @printf(io, "VecE3(%.3f, %.3f, %.3f)", a.x, a.y, a.z)
@compat Base.:+(a::VecE3, b::Real) = VecE3(a.x+b, a.y+b, a.z+b)
@compat Base.:+(a::VecE3, b::VecE3) = VecE3(a.x+b.x, a.y+b.y, a.z+b.z)
@compat Base.:-(a::VecE3) = VecE3(-a.x, -a.y, -a.z)
@compat Base.:-(a::VecE3, b::Real) = VecE3(a.x-b, a.y-b, a.z-b)
@compat Base.:-(a::VecE3, b::VecE3) = VecE3(a.x-b.x, a.y-b.y, a.z-b.z)
@compat Base.:*(a::VecE3, b::Real) = VecE3(a.x*b, a.y*b, a.z*b)
@compat Base.:/(a::VecE3, b::Real) = VecE3(a.x/b, a.y/b, a.z/b)
@compat Base.:^(a::VecE3, b::Integer) = VecE3(a.x^b, a.y^b, a.z^b)
@compat Base.:^(a::VecE3, b::AbstractFloat) = VecE3(a.x^b, a.y^b, a.z^b)
# %(a::VecE3, b::Real) = VecE3(a.x%b, a.y%b, a.z%b)
@compat Base.:(==)(a::VecE3, b::VecE3) = isequal(a.x, b.x) && isequal(a.y, b.y) && isequal(a.z, b.z)
Base.isequal(a::VecE3, b::VecE3) = isequal(a.x, b.x) && isequal(a.y, b.y) && isequal(a.z, b.z)
Base.isfinite(a::VecE3) = isfinite(a.x) && isfinite(a.y) && isfinite(a.z)
Base.isinf(a::VecE3) = isinf(a.x) || isinf(a.y) || isinf(a.z)
Base.isnan(a::VecE3) = isnan(a.x) || isnan(a.y) || isnan(a.z)
Base.round(a::VecE3) = VecE3(round(a.x), round(a.y), round(a.z))
Base.floor(a::VecE3) = VecE3(floor(a.x), floor(a.y), floor(a.z))
Base.ceil(a::VecE3) = VecE3(ceil(a.x), ceil(a.y), ceil(a.z))
Base.trunc(a::VecE3) = VecE3(trunc(a.x), trunc(a.y), trunc(a.z))
Base.clamp(a::VecE3, lo::Real, hi::Real) = VecE3(clamp(a.x, lo, hi), clamp(a.y, lo, hi), clamp(a.z, lo, hi))
Base.abs(a::VecE3) = sqrt(a.x*a.x + a.y*a.y + a.z*a.z)
Base.abs2(a::VecE3) = a.x*a.x + a.y*a.y + a.z*a.z
function Base.norm(a::VecE3)
m = abs(a)
VecE3(a.x/m, a.y/m, a.z/m)
end
function dist(a::VecE3, b::VecE3)
Δx = a.x-b.x
Δy = a.y-b.y
Δz = a.z-b.z
sqrt(Δx*Δx + Δy*Δy + Δz*Δz)
end
function dist2(a::VecE3, b::VecE3)
Δx = a.x-b.x
Δy = a.y-b.y
Δz = a.z-b.z
Δx*Δx + Δy*Δy + Δz*Δz
end
Base.dot(a::VecE3, b::VecE3) = a.x*b.x + a.y*b.y + a.z*b.z
proj(a::VecE3, b::VecE3, ::Type{Float64}) = (a.x*b.x + a.y*b.y + a.z*b.z) / sqrt(b.x*b.x + b.y*b.y + b.z*b.z) # dot(a,b) / |b|
function proj(a::VecE3, b::VecE3, ::Type{VecE3})
# dot(a,b) / dot(b,b) ⋅ b
s = (a.x*b.x + a.y*b.y + a.z*b.z) / (b.x*b.x + b.y*b.y + b.z*b.z)
VecE3(s*b.x, s*b.y, s*b.z)
end
function Base.cross(a::VecE3, b::VecE3)
x = a.y*b.z - a.z*b.y
y = a.x*b.z - a.z*b.x
z = a.x*b.y - a.y*b.x
VecE3(x,y,z)
end
lerp(a::VecE3, b::VecE3, t::Real) = VecE3(a.x + (b.x-a.x)*t, a.y + (b.y-a.y)*t, a.z + (b.z-a.z)*t)
function rot(a::VecE3, axis::VecE3, θ::Real)
#=
rotate the point a: (x,y,z) about the axis: (u,v,w) by the angle θ following the
right hand rule
=#
x,y,z = a.x, a.y, a.z
u,v,w = axis.x, axis.y, axis.z
u² = u*u
v² = v*v
w² = w*w
m = u² + v² + w²
c = cos(θ)
s = sin(θ)
mc = 1.0 - c
rtms = sqrt(m)*s
magc = m*c
ux_vy_wz_mc = (u*x + v*y + w*z)*mc
new_x = (u*ux_vy_wz_mc + x*magc + rtms*(-w*y + v*z)) / m
new_y = (v*ux_vy_wz_mc + y*magc + rtms*( w*x - u*z)) / m
new_z = (w*ux_vy_wz_mc + z*magc + rtms*(-v*x + u*y)) / m
VecE3(new_x, new_y, new_z)
end
function rot_normalized(a::VecE3, axis::VecE3, θ::Real)
#=
rotate the point a: (x,y,z) about the axis: (u,v,w) by the angle θ following the
right hand rule
Here we assume axis is normalized
=#
x,y,z = a.x, a.y, a.z
u,v,w = axis.x, axis.y, axis.z
u² = u*u
v² = v*v
w² = w*w
m = u² + v² + w²
c = cos(θ)
s = sin(θ)
mc = 1.0 - c
ux_vy_wz_mc = (u*x + v*y + w*z)*mc
new_x = u*ux_vy_wz_mc + x*c + (-w*y + v*z)*s
new_y = v*ux_vy_wz_mc + y*c + ( w*x - u*z)*s
new_z = w*ux_vy_wz_mc + z*c + (-v*x + u*y)*s
VecE3(new_x, new_y, new_z)
end | [
2,
28,
198,
53,
721,
36,
18,
25,
257,
513,
67,
304,
36616,
485,
272,
15879,
198,
46249,
628,
198,
8608,
18187,
38692,
36,
18,
1279,
25,
38692,
36,
198,
220,
220,
220,
2124,
7904,
48436,
2414,
198,
220,
220,
220,
331,
7904,
48436,
2414,
198,
220,
220,
220,
1976,
7904,
48436,
2414,
628,
220,
220,
220,
38692,
36,
18,
3419,
796,
649,
7,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
8,
198,
220,
220,
220,
38692,
36,
18,
7,
87,
3712,
15633,
11,
331,
3712,
15633,
11,
1976,
3712,
15633,
8,
796,
649,
7,
87,
11,
88,
11,
89,
8,
198,
437,
198,
198,
14881,
13,
13664,
7,
3712,
53,
721,
36,
18,
8,
796,
513,
198,
14881,
13,
30073,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
11,
257,
13,
88,
11,
257,
13,
89,
8,
198,
14881,
13,
1102,
1851,
7,
3712,
6030,
90,
38469,
90,
43879,
2414,
92,
5512,
257,
3712,
53,
721,
36,
18,
8,
796,
685,
64,
13,
87,
11,
257,
13,
88,
11,
257,
13,
89,
60,
198,
8818,
7308,
13,
1102,
1851,
90,
49,
27,
25,
15633,
92,
7,
3712,
6030,
90,
53,
721,
36,
18,
5512,
257,
3712,
23839,
19182,
90,
49,
30072,
198,
220,
220,
220,
2488,
30493,
7,
13664,
7,
64,
8,
6624,
513,
8,
198,
220,
220,
220,
38692,
36,
18,
7,
64,
58,
16,
4357,
257,
58,
17,
4357,
257,
58,
18,
12962,
198,
437,
198,
14881,
13,
12860,
7,
952,
3712,
9399,
11,
257,
3712,
53,
721,
36,
18,
8,
796,
2488,
37435,
7,
952,
11,
366,
53,
721,
36,
18,
7,
7225,
18,
69,
11,
4064,
13,
18,
69,
11,
4064,
13,
18,
69,
42501,
257,
13,
87,
11,
257,
13,
88,
11,
257,
13,
89,
8,
198,
198,
31,
5589,
265,
7308,
11207,
33747,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
10,
65,
11,
257,
13,
88,
10,
65,
11,
257,
13,
89,
10,
65,
8,
198,
31,
5589,
265,
7308,
11207,
33747,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
10,
65,
13,
87,
11,
257,
13,
88,
10,
65,
13,
88,
11,
257,
13,
89,
10,
65,
13,
89,
8,
198,
198,
31,
5589,
265,
7308,
11207,
30420,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
32590,
64,
13,
87,
11,
532,
64,
13,
88,
11,
532,
64,
13,
89,
8,
198,
31,
5589,
265,
7308,
11207,
30420,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
12,
65,
11,
257,
13,
88,
12,
65,
11,
257,
13,
89,
12,
65,
8,
198,
31,
5589,
265,
7308,
11207,
30420,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
12,
65,
13,
87,
11,
257,
13,
88,
12,
65,
13,
88,
11,
257,
13,
89,
12,
65,
13,
89,
8,
198,
198,
31,
5589,
265,
7308,
11207,
9,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
9,
65,
11,
257,
13,
88,
9,
65,
11,
257,
13,
89,
9,
65,
8,
198,
198,
31,
5589,
265,
7308,
11207,
29006,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
14,
65,
11,
257,
13,
88,
14,
65,
11,
257,
13,
89,
14,
65,
8,
198,
198,
31,
5589,
265,
7308,
11207,
61,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
46541,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
61,
65,
11,
257,
13,
88,
61,
65,
11,
257,
13,
89,
61,
65,
8,
198,
31,
5589,
265,
7308,
11207,
61,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
23839,
43879,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
61,
65,
11,
257,
13,
88,
61,
65,
11,
257,
13,
89,
61,
65,
8,
198,
198,
2,
4064,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
4,
65,
11,
257,
13,
88,
4,
65,
11,
257,
13,
89,
4,
65,
8,
198,
198,
31,
5589,
265,
7308,
11207,
7,
855,
5769,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
796,
318,
40496,
7,
64,
13,
87,
11,
275,
13,
87,
8,
11405,
318,
40496,
7,
64,
13,
88,
11,
275,
13,
88,
8,
11405,
318,
40496,
7,
64,
13,
89,
11,
275,
13,
89,
8,
198,
14881,
13,
786,
13255,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
796,
318,
40496,
7,
64,
13,
87,
11,
275,
13,
87,
8,
11405,
318,
40496,
7,
64,
13,
88,
11,
275,
13,
88,
8,
11405,
318,
40496,
7,
64,
13,
89,
11,
275,
13,
89,
8,
198,
198,
14881,
13,
4468,
9504,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
318,
69,
9504,
7,
64,
13,
87,
8,
11405,
318,
69,
9504,
7,
64,
13,
88,
8,
11405,
318,
69,
9504,
7,
64,
13,
89,
8,
198,
14881,
13,
271,
10745,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
318,
10745,
7,
64,
13,
87,
8,
8614,
318,
10745,
7,
64,
13,
88,
8,
8614,
318,
10745,
7,
64,
13,
89,
8,
198,
14881,
13,
271,
12647,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
2125,
272,
7,
64,
13,
87,
8,
8614,
2125,
272,
7,
64,
13,
88,
8,
8614,
2125,
272,
7,
64,
13,
89,
8,
198,
198,
14881,
13,
744,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
744,
7,
64,
13,
87,
828,
2835,
7,
64,
13,
88,
828,
2835,
7,
64,
13,
89,
4008,
198,
14881,
13,
28300,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
28300,
7,
64,
13,
87,
828,
4314,
7,
64,
13,
88,
828,
4314,
7,
64,
13,
89,
4008,
198,
14881,
13,
344,
346,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
344,
346,
7,
64,
13,
87,
828,
2906,
346,
7,
64,
13,
88,
828,
2906,
346,
7,
64,
13,
89,
4008,
198,
14881,
13,
2213,
19524,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
38692,
36,
18,
7,
2213,
19524,
7,
64,
13,
87,
828,
40122,
7,
64,
13,
88,
828,
40122,
7,
64,
13,
89,
4008,
198,
14881,
13,
565,
696,
7,
64,
3712,
53,
721,
36,
18,
11,
2376,
3712,
15633,
11,
23105,
3712,
15633,
8,
796,
38692,
36,
18,
7,
565,
696,
7,
64,
13,
87,
11,
2376,
11,
23105,
828,
29405,
7,
64,
13,
88,
11,
2376,
11,
23105,
828,
29405,
7,
64,
13,
89,
11,
2376,
11,
23105,
4008,
198,
198,
14881,
13,
8937,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
19862,
17034,
7,
64,
13,
87,
9,
64,
13,
87,
1343,
257,
13,
88,
9,
64,
13,
88,
1343,
257,
13,
89,
9,
64,
13,
89,
8,
198,
14881,
13,
8937,
17,
7,
64,
3712,
53,
721,
36,
18,
8,
796,
257,
13,
87,
9,
64,
13,
87,
1343,
257,
13,
88,
9,
64,
13,
88,
1343,
257,
13,
89,
9,
64,
13,
89,
198,
8818,
7308,
13,
27237,
7,
64,
3712,
53,
721,
36,
18,
8,
198,
220,
220,
220,
285,
796,
2352,
7,
64,
8,
198,
220,
220,
220,
38692,
36,
18,
7,
64,
13,
87,
14,
76,
11,
257,
13,
88,
14,
76,
11,
257,
13,
89,
14,
76,
8,
198,
437,
198,
198,
8818,
1233,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
198,
220,
220,
220,
37455,
87,
796,
257,
13,
87,
12,
65,
13,
87,
198,
220,
220,
220,
37455,
88,
796,
257,
13,
88,
12,
65,
13,
88,
198,
220,
220,
220,
37455,
89,
796,
257,
13,
89,
12,
65,
13,
89,
198,
220,
220,
220,
19862,
17034,
7,
138,
242,
87,
9,
138,
242,
87,
1343,
37455,
88,
9,
138,
242,
88,
1343,
37455,
89,
9,
138,
242,
89,
8,
198,
437,
198,
8818,
1233,
17,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
198,
220,
220,
220,
37455,
87,
796,
257,
13,
87,
12,
65,
13,
87,
198,
220,
220,
220,
37455,
88,
796,
257,
13,
88,
12,
65,
13,
88,
198,
220,
220,
220,
37455,
89,
796,
257,
13,
89,
12,
65,
13,
89,
198,
220,
220,
220,
37455,
87,
9,
138,
242,
87,
1343,
37455,
88,
9,
138,
242,
88,
1343,
37455,
89,
9,
138,
242,
89,
198,
437,
198,
198,
14881,
13,
26518,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
796,
257,
13,
87,
9,
65,
13,
87,
1343,
257,
13,
88,
9,
65,
13,
88,
1343,
257,
13,
89,
9,
65,
13,
89,
198,
1676,
73,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
11,
7904,
6030,
90,
43879,
2414,
30072,
796,
357,
64,
13,
87,
9,
65,
13,
87,
1343,
257,
13,
88,
9,
65,
13,
88,
1343,
257,
13,
89,
9,
65,
13,
89,
8,
1220,
19862,
17034,
7,
65,
13,
87,
9,
65,
13,
87,
1343,
275,
13,
88,
9,
65,
13,
88,
1343,
275,
13,
89,
9,
65,
13,
89,
8,
1303,
16605,
7,
64,
11,
65,
8,
1220,
930,
65,
91,
198,
8818,
386,
73,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
11,
7904,
6030,
90,
53,
721,
36,
18,
30072,
198,
220,
220,
220,
1303,
16605,
7,
64,
11,
65,
8,
1220,
16605,
7,
65,
11,
65,
8,
2343,
233,
227,
275,
198,
220,
220,
220,
264,
796,
357,
64,
13,
87,
9,
65,
13,
87,
1343,
257,
13,
88,
9,
65,
13,
88,
1343,
257,
13,
89,
9,
65,
13,
89,
8,
1220,
357,
65,
13,
87,
9,
65,
13,
87,
1343,
275,
13,
88,
9,
65,
13,
88,
1343,
275,
13,
89,
9,
65,
13,
89,
8,
198,
220,
220,
220,
38692,
36,
18,
7,
82,
9,
65,
13,
87,
11,
264,
9,
65,
13,
88,
11,
264,
9,
65,
13,
89,
8,
198,
437,
198,
198,
8818,
7308,
13,
19692,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
8,
198,
220,
220,
220,
2124,
796,
257,
13,
88,
9,
65,
13,
89,
532,
257,
13,
89,
9,
65,
13,
88,
198,
220,
220,
220,
331,
796,
257,
13,
87,
9,
65,
13,
89,
532,
257,
13,
89,
9,
65,
13,
87,
198,
220,
220,
220,
1976,
796,
257,
13,
87,
9,
65,
13,
88,
532,
257,
13,
88,
9,
65,
13,
87,
198,
220,
220,
220,
38692,
36,
18,
7,
87,
11,
88,
11,
89,
8,
198,
437,
198,
198,
1754,
79,
7,
64,
3712,
53,
721,
36,
18,
11,
275,
3712,
53,
721,
36,
18,
11,
256,
3712,
15633,
8,
796,
38692,
36,
18,
7,
64,
13,
87,
1343,
357,
65,
13,
87,
12,
64,
13,
87,
27493,
83,
11,
257,
13,
88,
1343,
357,
65,
13,
88,
12,
64,
13,
88,
27493,
83,
11,
257,
13,
89,
1343,
357,
65,
13,
89,
12,
64,
13,
89,
27493,
83,
8,
198,
198,
8818,
5724,
7,
64,
3712,
53,
721,
36,
18,
11,
16488,
3712,
53,
721,
36,
18,
11,
7377,
116,
3712,
15633,
8,
628,
220,
220,
220,
1303,
28,
198,
220,
220,
220,
23064,
262,
966,
257,
25,
357,
87,
11,
88,
11,
89,
8,
546,
262,
16488,
25,
357,
84,
11,
85,
11,
86,
8,
416,
262,
9848,
7377,
116,
1708,
262,
198,
220,
220,
220,
826,
1021,
3896,
198,
220,
220,
220,
796,
2,
628,
220,
220,
220,
2124,
11,
88,
11,
89,
796,
257,
13,
87,
11,
257,
13,
88,
11,
257,
13,
89,
198,
220,
220,
220,
334,
11,
85,
11,
86,
796,
16488,
13,
87,
11,
16488,
13,
88,
11,
16488,
13,
89,
628,
220,
220,
220,
334,
31185,
796,
334,
9,
84,
198,
220,
220,
220,
410,
31185,
796,
410,
9,
85,
198,
220,
220,
220,
266,
31185,
796,
266,
9,
86,
628,
220,
220,
220,
285,
796,
334,
31185,
1343,
410,
31185,
1343,
266,
31185,
628,
220,
220,
220,
269,
796,
8615,
7,
138,
116,
8,
198,
220,
220,
220,
264,
796,
7813,
7,
138,
116,
8,
198,
220,
220,
220,
36650,
796,
352,
13,
15,
532,
269,
628,
220,
220,
220,
374,
83,
907,
796,
19862,
17034,
7,
76,
27493,
82,
628,
220,
220,
220,
2153,
66,
796,
285,
9,
66,
198,
220,
220,
220,
334,
87,
62,
7670,
62,
86,
89,
62,
23209,
796,
357,
84,
9,
87,
1343,
410,
9,
88,
1343,
266,
9,
89,
27493,
23209,
628,
220,
220,
220,
649,
62,
87,
796,
357,
84,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
2124,
9,
19726,
66,
1343,
374,
83,
907,
9,
32590,
86,
9,
88,
1343,
410,
9,
89,
4008,
1220,
285,
198,
220,
220,
220,
649,
62,
88,
796,
357,
85,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
331,
9,
19726,
66,
1343,
374,
83,
907,
9,
7,
266,
9,
87,
532,
334,
9,
89,
4008,
1220,
285,
198,
220,
220,
220,
649,
62,
89,
796,
357,
86,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
1976,
9,
19726,
66,
1343,
374,
83,
907,
9,
32590,
85,
9,
87,
1343,
334,
9,
88,
4008,
1220,
285,
628,
220,
220,
220,
38692,
36,
18,
7,
3605,
62,
87,
11,
649,
62,
88,
11,
649,
62,
89,
8,
198,
437,
198,
8818,
5724,
62,
11265,
1143,
7,
64,
3712,
53,
721,
36,
18,
11,
16488,
3712,
53,
721,
36,
18,
11,
7377,
116,
3712,
15633,
8,
628,
220,
220,
220,
1303,
28,
198,
220,
220,
220,
23064,
262,
966,
257,
25,
357,
87,
11,
88,
11,
89,
8,
546,
262,
16488,
25,
357,
84,
11,
85,
11,
86,
8,
416,
262,
9848,
7377,
116,
1708,
262,
198,
220,
220,
220,
826,
1021,
3896,
628,
220,
220,
220,
3423,
356,
7048,
16488,
318,
39279,
198,
220,
220,
220,
796,
2,
628,
220,
220,
220,
2124,
11,
88,
11,
89,
796,
257,
13,
87,
11,
257,
13,
88,
11,
257,
13,
89,
198,
220,
220,
220,
334,
11,
85,
11,
86,
796,
16488,
13,
87,
11,
16488,
13,
88,
11,
16488,
13,
89,
628,
220,
220,
220,
334,
31185,
796,
334,
9,
84,
198,
220,
220,
220,
410,
31185,
796,
410,
9,
85,
198,
220,
220,
220,
266,
31185,
796,
266,
9,
86,
628,
220,
220,
220,
285,
796,
334,
31185,
1343,
410,
31185,
1343,
266,
31185,
628,
220,
220,
220,
269,
796,
8615,
7,
138,
116,
8,
198,
220,
220,
220,
264,
796,
7813,
7,
138,
116,
8,
198,
220,
220,
220,
36650,
796,
352,
13,
15,
532,
269,
628,
220,
220,
220,
334,
87,
62,
7670,
62,
86,
89,
62,
23209,
796,
357,
84,
9,
87,
1343,
410,
9,
88,
1343,
266,
9,
89,
27493,
23209,
628,
220,
220,
220,
649,
62,
87,
796,
334,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
2124,
9,
66,
1343,
13841,
86,
9,
88,
1343,
410,
9,
89,
27493,
82,
198,
220,
220,
220,
649,
62,
88,
796,
410,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
331,
9,
66,
1343,
357,
266,
9,
87,
532,
334,
9,
89,
27493,
82,
198,
220,
220,
220,
649,
62,
89,
796,
266,
9,
2821,
62,
7670,
62,
86,
89,
62,
23209,
1343,
1976,
9,
66,
1343,
13841,
85,
9,
87,
1343,
334,
9,
88,
27493,
82,
628,
220,
220,
220,
38692,
36,
18,
7,
3605,
62,
87,
11,
649,
62,
88,
11,
649,
62,
89,
8,
198,
437
] | 1.590755 | 2,661 |
using HorizonSideRobots
function goToSide!(r::Robot, side::HorizonSide; save::Bool=false, mark::Bool = false)::Union{Tuple{Int, HorizonSide}, Nothing}
if save
shags = 0
while !isborder(r, side)
move!(r, side)
if mark putmarker!(r) end
shags+=1
end
return (shags, reverseSide(side))
else
while !isborder(r, side)
move!(r, side)
if mark putmarker!(r) end
end
end
end
function goToSideWithShag!(r::Robot, side::HorizonSide, shags::Int; save::Bool = false, checkBorder::Bool = false, mark::Bool = false)::Union{Tuple{Int, HorizonSide}, Nothing}
if save
shag = 0
for _ = 1:shags
if checkBorder && isborder(r, side) break end
move!(r, side)
if mark putmarker!(r) end
shag+=1
end
return (shag, reverseSide(side))
else
for _ = 1:shags
if checkBorder && isborder(r, side) break end
move!(r, side)
if mark putmarker!(r) end
end
end
end
function aroundBorder!(r::Robot, side::HorizonSide; save::Bool=false)
listOfShags = []
k = 0
while isborder(r, side)
push!(listOfShags, goToSideWithShag!(r, perSide(side), 1, save = true))
k+=1
end
push!(listOfShags, goToSideWithShag!(r, side, 1, save = true))
while isborder(r, reverseSide(perSide(side)))
push!(listOfShags, goToSideWithShag!(r, side, 1, save = true))
end
for _ = 1:k
push!(listOfShags, goToSideWithShag!(r, reverseSide(perSide(side)), 1, save = true))
end
if save
return listOfShags
end
end
function isRect(r::Robot, side::HorizonSide)::Bool
if (!isborder(r, side))
return false
end
result = false
k = 0
while !isborder(r, perSide(side))
move!(r, perSide(side))
k+=1
if !isborder(r, side)
result = true
break
end
end
for _ = 1:k
move!(r, reverseSide(perSide(side)))
end
return result
end
function reverseSide(side::HorizonSide)::HorizonSide
return HorizonSide(
(Integer(side)+2) % 4
)
end
function perSide(side::HorizonSide)::HorizonSide
return HorizonSide(
(Integer(side)+1) % 4
)
end
function goToStart!(r::Robot, listOfShags)::Nothing
reverse!(listOfShags)
for tup = listOfShags
for _ = 1:tup[1]
move!(r, tup[2])
end
end
end
function goToWestSud!(r::Robot)::Nothing
goToSide!(r, Sud)
goToSide!(r, West)
end | [
3500,
22776,
24819,
14350,
1747,
198,
198,
8818,
467,
2514,
24819,
0,
7,
81,
3712,
14350,
313,
11,
1735,
3712,
27991,
8637,
24819,
26,
3613,
3712,
33,
970,
28,
9562,
11,
1317,
3712,
33,
970,
796,
3991,
2599,
25,
38176,
90,
51,
29291,
90,
5317,
11,
22776,
24819,
5512,
10528,
92,
198,
220,
220,
220,
611,
3613,
198,
220,
220,
220,
220,
220,
220,
220,
427,
3775,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
981,
5145,
271,
20192,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1317,
1234,
4102,
263,
0,
7,
81,
8,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
427,
3775,
47932,
16,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
1477,
3775,
11,
9575,
24819,
7,
1589,
4008,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
981,
5145,
271,
20192,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1317,
1234,
4102,
263,
0,
7,
81,
8,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
467,
2514,
24819,
3152,
2484,
363,
0,
7,
81,
3712,
14350,
313,
11,
1735,
3712,
27991,
8637,
24819,
11,
427,
3775,
3712,
5317,
26,
3613,
3712,
33,
970,
796,
3991,
11,
2198,
34189,
3712,
33,
970,
796,
3991,
11,
1317,
3712,
33,
970,
796,
3991,
2599,
25,
38176,
90,
51,
29291,
90,
5317,
11,
22776,
24819,
5512,
10528,
92,
198,
220,
220,
220,
611,
3613,
198,
220,
220,
220,
220,
220,
220,
220,
427,
363,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
796,
352,
25,
1477,
3775,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2198,
34189,
11405,
318,
20192,
7,
81,
11,
1735,
8,
2270,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1317,
1234,
4102,
263,
0,
7,
81,
8,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
427,
363,
47932,
16,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
1477,
363,
11,
9575,
24819,
7,
1589,
4008,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
796,
352,
25,
1477,
3775,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2198,
34189,
11405,
318,
20192,
7,
81,
11,
1735,
8,
2270,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1317,
1234,
4102,
263,
0,
7,
81,
8,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
1088,
34189,
0,
7,
81,
3712,
14350,
313,
11,
1735,
3712,
27991,
8637,
24819,
26,
3613,
3712,
33,
970,
28,
9562,
8,
198,
220,
220,
220,
1351,
5189,
2484,
3775,
796,
17635,
198,
220,
220,
220,
479,
796,
657,
198,
220,
220,
220,
981,
318,
20192,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
4868,
5189,
2484,
3775,
11,
467,
2514,
24819,
3152,
2484,
363,
0,
7,
81,
11,
583,
24819,
7,
1589,
828,
352,
11,
3613,
796,
2081,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
479,
47932,
16,
198,
220,
220,
220,
886,
198,
220,
220,
220,
4574,
0,
7,
4868,
5189,
2484,
3775,
11,
467,
2514,
24819,
3152,
2484,
363,
0,
7,
81,
11,
1735,
11,
352,
11,
3613,
796,
2081,
4008,
198,
220,
220,
220,
981,
318,
20192,
7,
81,
11,
9575,
24819,
7,
525,
24819,
7,
1589,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
4868,
5189,
2484,
3775,
11,
467,
2514,
24819,
3152,
2484,
363,
0,
7,
81,
11,
1735,
11,
352,
11,
3613,
796,
2081,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
329,
4808,
796,
352,
25,
74,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
4868,
5189,
2484,
3775,
11,
467,
2514,
24819,
3152,
2484,
363,
0,
7,
81,
11,
9575,
24819,
7,
525,
24819,
7,
1589,
36911,
352,
11,
3613,
796,
2081,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
611,
3613,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1351,
5189,
2484,
3775,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
318,
45474,
7,
81,
3712,
14350,
313,
11,
1735,
3712,
27991,
8637,
24819,
2599,
25,
33,
970,
198,
220,
220,
220,
611,
22759,
271,
20192,
7,
81,
11,
1735,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3991,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1255,
796,
3991,
198,
220,
220,
220,
479,
796,
657,
198,
220,
220,
220,
981,
5145,
271,
20192,
7,
81,
11,
583,
24819,
7,
1589,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
583,
24819,
7,
1589,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
479,
47932,
16,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
271,
20192,
7,
81,
11,
1735,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
329,
4808,
796,
352,
25,
74,
198,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
9575,
24819,
7,
525,
24819,
7,
1589,
22305,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1255,
198,
437,
198,
198,
8818,
9575,
24819,
7,
1589,
3712,
27991,
8637,
24819,
2599,
25,
27991,
8637,
24819,
198,
220,
220,
220,
1441,
22776,
24819,
7,
198,
220,
220,
220,
220,
220,
220,
220,
357,
46541,
7,
1589,
47762,
17,
8,
4064,
604,
198,
220,
220,
220,
1267,
198,
437,
198,
198,
8818,
583,
24819,
7,
1589,
3712,
27991,
8637,
24819,
2599,
25,
27991,
8637,
24819,
198,
220,
220,
220,
1441,
22776,
24819,
7,
198,
220,
220,
220,
220,
220,
220,
220,
357,
46541,
7,
1589,
47762,
16,
8,
4064,
604,
198,
220,
220,
220,
1267,
220,
198,
437,
198,
198,
8818,
467,
2514,
10434,
0,
7,
81,
3712,
14350,
313,
11,
1351,
5189,
2484,
3775,
2599,
25,
18465,
198,
220,
220,
220,
9575,
0,
7,
4868,
5189,
2484,
3775,
8,
198,
220,
220,
220,
329,
256,
929,
796,
1351,
5189,
2484,
3775,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
796,
352,
25,
83,
929,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1445,
0,
7,
81,
11,
256,
929,
58,
17,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
467,
2514,
15045,
50,
463,
0,
7,
81,
3712,
14350,
313,
2599,
25,
18465,
198,
220,
220,
220,
467,
2514,
24819,
0,
7,
81,
11,
14818,
8,
198,
220,
220,
220,
467,
2514,
24819,
0,
7,
81,
11,
2688,
8,
198,
437
] | 2.027301 | 1,282 |
using Turing
@model gaussdemo begin
@assume s ~ InverseGamma(2,3)
@assume m ~ Normal(0,sqrt(s))
@observe 1.5 ~ Normal(m, sqrt(s))
@observe 2.0 ~ Normal(m, sqrt(s))
@predict s m
end
# Sample and print.
res = sample(gaussdemo, SMC(10000))
println("Infered: m = $(mean(res[:m])), s = $(mean(res[:s]))")
# Compute analytical solution. Requires `ConjugatePriors` package.
exact = posterior(NormalInverseGamma(0,1,2,3), Normal, [1.5,2.0])
println("Exact: m = $(mean(exact)[1]), s = $(mean(exact)[2])")
| [
3500,
39141,
198,
198,
31,
19849,
31986,
1046,
9536,
78,
2221,
198,
220,
2488,
562,
2454,
264,
5299,
554,
4399,
34777,
2611,
7,
17,
11,
18,
8,
198,
220,
2488,
562,
2454,
285,
5299,
14435,
7,
15,
11,
31166,
17034,
7,
82,
4008,
198,
220,
2488,
672,
2655,
303,
352,
13,
20,
5299,
14435,
7,
76,
11,
19862,
17034,
7,
82,
4008,
198,
220,
2488,
672,
2655,
303,
362,
13,
15,
5299,
14435,
7,
76,
11,
19862,
17034,
7,
82,
4008,
198,
220,
2488,
79,
17407,
264,
285,
198,
437,
198,
198,
2,
27565,
290,
3601,
13,
198,
411,
796,
6291,
7,
4908,
1046,
9536,
78,
11,
9447,
34,
7,
49388,
4008,
198,
35235,
7203,
18943,
1068,
25,
285,
796,
29568,
32604,
7,
411,
58,
25,
76,
12962,
828,
264,
796,
29568,
32604,
7,
411,
58,
25,
82,
60,
4008,
4943,
198,
198,
2,
3082,
1133,
30063,
4610,
13,
26848,
4600,
3103,
31761,
378,
47,
8657,
63,
5301,
13,
198,
1069,
529,
796,
34319,
7,
26447,
818,
4399,
34777,
2611,
7,
15,
11,
16,
11,
17,
11,
18,
828,
14435,
11,
685,
16,
13,
20,
11,
17,
13,
15,
12962,
198,
35235,
7203,
3109,
529,
25,
285,
796,
29568,
32604,
7,
1069,
529,
38381,
16,
46570,
264,
796,
29568,
32604,
7,
1069,
529,
38381,
17,
12962,
4943,
198
] | 2.334862 | 218 |
using Test, StructTypes, Tables, Strapping
tbl = (a=[10], b=[3.14])
tbl2 = (id=[10, 10, 10], floats=[3.14, 3.15, 3.16])
struct AB
a::Int
b::Float64
end
StructTypes.StructType(::Type{AB}) = StructTypes.Struct()
ab = AB(10, 3.14)
@test Strapping.construct(AB, tbl) == ab
@test Strapping.construct(Vector{AB}, tbl) == [ab]
mutable struct ABM
a::Int
b::Float64
ABM() = new()
ABM(a::Int, b::Float64) = new(a, b)
end
Base.:(==)(a::ABM, b::ABM) = a.a == b.a && a.b == b.b
StructTypes.StructType(::Type{ABM}) = StructTypes.Mutable()
abm = ABM(10, 3.14)
@test Strapping.construct(ABM, tbl) == abm
@test Strapping.construct(Vector{ABM}, tbl) == [abm]
@test Strapping.construct(NamedTuple, tbl) == (a=10, b=3.14)
@test Strapping.construct(NamedTuple{(:a, :b), Tuple{Int, Float64}}, tbl) == (a=10, b=3.14)
@test Strapping.construct(NamedTuple{(:a, :b)}, tbl) == (a=10, b=3.14)
@test Strapping.construct(Dict, tbl) == Dict("a" => 10, "b" => 3.14)
@test Strapping.construct(Dict{String, Float64}, tbl) == Dict("a" => 10.0, "b" => 3.14)
@test Strapping.construct(Dict{Symbol, Any}, tbl) == Dict(:a => 10, :b => 3.14)
@test Strapping.construct(Array, tbl) == [10, 3.14]
@test Strapping.construct(Vector{Float64}, tbl) == [10.0] # because Float64 is scalar, only 1st field of result is used, other fields are ignored
@test Strapping.construct(Set, tbl) == Set([10, 3.14])
@test Strapping.construct(Tuple, tbl) == (10, 3.14)
@test Strapping.construct(Tuple{Int, Float64}, tbl) == (10, 3.14)
@test Strapping.construct(Vector{Any}, tbl) == [Dict("a" => 10, "b" => 3.14)]
struct AB2
id::Int
floats::Vector{Float64}
end
Base.:(==)(a::AB2, b::AB2) = a.id == b.id && a.floats == b.floats
StructTypes.StructType(::Type{AB2}) = StructTypes.Struct()
StructTypes.idproperty(::Type{AB2}) = :id
ab2 = AB2(10, [3.14, 3.15, 3.16])
@test Strapping.construct(AB2, tbl2) == ab2
@test Strapping.construct(Vector{AB2}, tbl2) == [ab2]
struct AB3
a::Int
ab::AB
end
StructTypes.StructType(::Type{AB3}) = StructTypes.Struct()
tbl3 = (a=[1], ab_a=[10], ab_b=[3.14])
ab3 = AB3(1, AB(10, 3.14))
@test Strapping.construct(AB3, tbl3) == ab3
@test Strapping.construct(Vector{AB3}, tbl3) == [ab3]
mutable struct AB4
a::Int
b::Float64
abs::Vector{AB}
AB4() = new()
AB4(a::Int, b::Float64, abs::Vector{AB}) = new(a, b, abs)
end
Base.:(==)(a::AB4, b::AB4) = a.a == b.a && a.b == b.b && a.abs == b.abs
StructTypes.StructType(::Type{AB4}) = StructTypes.Mutable()
StructTypes.idproperty(::Type{AB4}) = :a
tbl4 = (a=[10, 10, 10], b=[3.14, 3.14, 3.14], abs_a=[10, 10, 10], abs_b=[3.14, 3.15, 3.16])
ab4 = AB4(10, 3.14, AB[AB(10, 3.14), AB(10, 3.15), AB(10, 3.16)])
@test Strapping.construct(AB4, tbl4) == ab4
@test Strapping.construct(Vector{AB4}, tbl4) == [ab4]
# multiple levels of nesting
struct AB5
a::Int
ab::AB3
end
StructTypes.StructType(::Type{AB5}) = StructTypes.Struct()
tbl5 = (a=[10], ab_a=[10], ab_ab_a=[10], ab_ab_b=[3.14])
ab5 = AB5(10, AB3(10, AB(10, 3.14)))
@test Strapping.construct(AB5, tbl5) == ab5
@test Strapping.construct(Vector{AB5}, tbl5) == [ab5]
# deconstruction
@test columntable(Strapping.deconstruct(ab)) == tbl
@test columntable(Strapping.deconstruct(ab2)) == tbl2
@test columntable(Strapping.deconstruct(ab3)) == tbl3
@test columntable(Strapping.deconstruct(ab4)) == tbl4
@test columntable(Strapping.deconstruct(ab5)) == tbl5
struct AB6
a::Int
b::AB
c::Vector{AB}
end
Base.:(==)(a::AB6, b::AB6) = a.a == b.a && a.b == b.b && a.c == b.c
StructTypes.StructType(::Type{AB6}) = StructTypes.Struct()
StructTypes.idproperty(::Type{AB6}) = :a
tbl6 = (a=[1, 1, 1], b_a=[2, 2, 2], b_b=[0.01, 0.01, 0.01], c_a=[10, 11, 12], c_b=[1.1, 2.2, 3.3])
ab6 = AB6(1, AB(2, 0.01), [AB(10, 1.1), AB(11, 2.2), AB(12, 3.3)])
@test Strapping.construct(AB6, tbl6) == ab6
@test Strapping.construct(Vector{AB6}, tbl6) == [ab6]
@test columntable(Strapping.deconstruct(ab6)) == tbl6
# https://github.com/JuliaData/Strapping.jl/issues/12
struct AB7
id::Int
values::Vector{Float64}
end
Base.:(==)(a::AB7, b::AB7) = a.id == b.id && a.values == b.values
StructTypes.StructType(::Type{AB7}) = StructTypes.Struct()
StructTypes.idproperty(::Type{AB7}) = :id
ab7 = AB7(1, Float64[])
tbl = columntable(Strapping.deconstruct(ab7))
@test tbl.id[1] == 1
@test tbl.values[1] === missing
struct AB9
a::Int
b::String
c::Float64
d::String
e::Int
f::String
end
StructTypes.StructType(::Type{AB9}) = StructTypes.Struct()
struct AB10
id::Int
ab9::AB9
end
StructTypes.StructType(::Type{AB10}) = StructTypes.Struct()
struct AB11
id::Int
ab10::AB10
end
StructTypes.StructType(::Type{AB11}) = StructTypes.Struct()
ab11 = AB11(1, AB10(2, AB9(3, "4", 5.0, "6", 7, "8")))
tbl = columntable(Strapping.deconstruct(ab11))
@test length(tbl) == 8
@test tbl.id[1] == 1
@test tbl[end][1] == "8"
# https://github.com/JuliaData/Strapping.jl/issues/3
struct TestStruct
a::Float64
b::Float64
id::Int
end
StructTypes.StructType(::Type{TestStruct}) = StructTypes.Struct()
StructTypes.idproperty(::Type{TestStruct}) = :id
data = [ TestStruct(rand(2)..., n) for n = 1:5]
tbl = Strapping.deconstruct(data)
@test length(Tables.columntable(tbl)[1]) == 5
struct AA1
a::Int64
b::Dict{Symbol, Any}
end
StructTypes.StructType(::Type{AA1}) = StructTypes.Struct()
data = [ AA1(1, Dict{Symbol, Any}(:aa => 2, :bb => 3)) ]
tbl = Strapping.deconstruct(data)
tbl2 = Tables.columntable(tbl)
@test tbl2.a == [1]
@test tbl2.b_aa == [2]
@test tbl2.b_bb == [3]
#8
struct TestResult
id::Int
values::Vector{Float64}
end
StructTypes.StructType(::Type{TestResult}) = StructTypes.Struct()
StructTypes.idproperty(::Type{TestResult}) = :id
tbl = (id=[1, 1, 1, 2, 2, 2], values=[3.14, 3.15, 3.16, 40.1, 0.01, 2.34])
testresult = Strapping.construct(Vector{TestResult}, tbl)
struct Experiment
id::Int
name::String
testresults::TestResult
end
StructTypes.StructType(::Type{Experiment}) = StructTypes.Struct()
StructTypes.idproperty(::Type{Experiment}) = :id
StructTypes.fieldprefix(::Type{Experiment}, nm::Symbol) = nm == :testresults ? :testresults_ : :_
tbl2 = (id=[1, 1, 1], name=["exp1", "exp1", "exp1"], testresults_id=[1, 1, 1], testresults_values=[3.14, 3.15, 3.16])
experiment = Strapping.construct(Experiment, tbl2)
@test experiment.id == 1
@test experiment.name == "exp1"
@test experiment.testresults.values == [3.14, 3.15, 3.16]
struct Service
id::String
data::NamedTuple
end
StructTypes.StructType(::Type{Service}) = StructTypes.Struct()
StructTypes.idproperty(::Type{Service}) = :id
StructTypes.fieldprefix(::Type{Service}, nm::Symbol) = Symbol()
Tables.isrowtable(::Type{Service}) = true
function Tables.getcolumn(row::Service,i::Int)
if i == 1
return getfield(row,1)
else
return row.data[i-1]
end
end
function Tables.getcolumn(row::Service,nm::Symbol)
if nm == :id
return row.id
else
return getproperty(row.data,nm)
end
end
function Tables.columnnames(row::Service)
vcat(:id,keys(row.data)...)
end
x = Service("qux",(a=1,b=3))
xd = Strapping.deconstruct(x)
xc = Strapping.construct(Service,xd)
@test xc.id == "qux"
@test xc.data == (a=1, b=3)
x2 = Service("foo",(a=1,b=3))
X = [x,x2]
Xd = Strapping.deconstruct(X)
Xc = Strapping.construct(Vector{Service},Xd)
@test length(Xc) == 2
@test Xc[2].id == "foo"
@test Xc[2].data == (a=1, b=3)
struct Wrapper
x::NamedTuple{(:a, :b), Tuple{Int, String}}
end
StructTypes.StructType(::Type{Wrapper}) = StructTypes.CustomStruct()
StructTypes.lower(x::Wrapper) = x.x
StructTypes.lowertype(::Type{Wrapper}) = fieldtype(Wrapper, :x)
w = Wrapper((a=1, b="hey"))
tbl = Strapping.deconstruct(w) |> Tables.columntable
@test tbl == (a = [1], b = ["hey"])
w2 = Strapping.construct(Wrapper, tbl)
@test w == w2
| [
3500,
6208,
11,
32112,
31431,
11,
33220,
11,
15195,
2105,
198,
198,
83,
2436,
796,
357,
64,
41888,
940,
4357,
275,
41888,
18,
13,
1415,
12962,
198,
83,
2436,
17,
796,
357,
312,
41888,
940,
11,
838,
11,
838,
4357,
36016,
41888,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
12962,
198,
198,
7249,
9564,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
275,
3712,
43879,
2414,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
397,
796,
9564,
7,
940,
11,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
11,
256,
2436,
8,
6624,
450,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
5512,
256,
2436,
8,
6624,
685,
397,
60,
198,
198,
76,
18187,
2878,
9564,
44,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
275,
3712,
43879,
2414,
198,
220,
220,
220,
9564,
44,
3419,
796,
649,
3419,
198,
220,
220,
220,
9564,
44,
7,
64,
3712,
5317,
11,
275,
3712,
43879,
2414,
8,
796,
649,
7,
64,
11,
275,
8,
198,
437,
198,
14881,
11207,
7,
855,
5769,
64,
3712,
6242,
44,
11,
275,
3712,
6242,
44,
8,
796,
257,
13,
64,
6624,
275,
13,
64,
11405,
257,
13,
65,
6624,
275,
13,
65,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
44,
30072,
796,
32112,
31431,
13,
44,
18187,
3419,
198,
198,
397,
76,
796,
9564,
44,
7,
940,
11,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
44,
11,
256,
2436,
8,
6624,
450,
76,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
44,
5512,
256,
2436,
8,
6624,
685,
397,
76,
60,
198,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
45,
2434,
51,
29291,
11,
256,
2436,
8,
6624,
357,
64,
28,
940,
11,
275,
28,
18,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
45,
2434,
51,
29291,
90,
7,
25,
64,
11,
1058,
65,
828,
309,
29291,
90,
5317,
11,
48436,
2414,
92,
5512,
256,
2436,
8,
6624,
357,
64,
28,
940,
11,
275,
28,
18,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
45,
2434,
51,
29291,
90,
7,
25,
64,
11,
1058,
65,
8,
5512,
256,
2436,
8,
6624,
357,
64,
28,
940,
11,
275,
28,
18,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
35,
713,
11,
256,
2436,
8,
6624,
360,
713,
7203,
64,
1,
5218,
838,
11,
366,
65,
1,
5218,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
35,
713,
90,
10100,
11,
48436,
2414,
5512,
256,
2436,
8,
6624,
360,
713,
7203,
64,
1,
5218,
838,
13,
15,
11,
366,
65,
1,
5218,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
35,
713,
90,
13940,
23650,
11,
4377,
5512,
256,
2436,
8,
6624,
360,
713,
7,
25,
64,
5218,
838,
11,
1058,
65,
5218,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
19182,
11,
256,
2436,
8,
6624,
685,
940,
11,
513,
13,
1415,
60,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
43879,
2414,
5512,
256,
2436,
8,
6624,
685,
940,
13,
15,
60,
1303,
780,
48436,
2414,
318,
16578,
283,
11,
691,
352,
301,
2214,
286,
1255,
318,
973,
11,
584,
7032,
389,
9514,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
7248,
11,
256,
2436,
8,
6624,
5345,
26933,
940,
11,
513,
13,
1415,
12962,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
51,
29291,
11,
256,
2436,
8,
6624,
357,
940,
11,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
51,
29291,
90,
5317,
11,
48436,
2414,
5512,
256,
2436,
8,
6624,
357,
940,
11,
513,
13,
1415,
8,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
7149,
5512,
256,
2436,
8,
6624,
685,
35,
713,
7203,
64,
1,
5218,
838,
11,
366,
65,
1,
5218,
513,
13,
1415,
15437,
198,
198,
7249,
9564,
17,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
36016,
3712,
38469,
90,
43879,
2414,
92,
198,
437,
198,
198,
14881,
11207,
7,
855,
5769,
64,
3712,
6242,
17,
11,
275,
3712,
6242,
17,
8,
796,
257,
13,
312,
6624,
275,
13,
312,
11405,
257,
13,
48679,
1381,
6624,
275,
13,
48679,
1381,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
17,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
6242,
17,
30072,
796,
1058,
312,
198,
198,
397,
17,
796,
9564,
17,
7,
940,
11,
685,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
12962,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
17,
11,
256,
2436,
17,
8,
6624,
450,
17,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
17,
5512,
256,
2436,
17,
8,
6624,
685,
397,
17,
60,
198,
198,
7249,
9564,
18,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
450,
3712,
6242,
198,
437,
198,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
18,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
83,
2436,
18,
796,
357,
64,
41888,
16,
4357,
450,
62,
64,
41888,
940,
4357,
450,
62,
65,
41888,
18,
13,
1415,
12962,
198,
198,
397,
18,
796,
9564,
18,
7,
16,
11,
9564,
7,
940,
11,
513,
13,
1415,
4008,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
18,
11,
256,
2436,
18,
8,
6624,
450,
18,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
18,
5512,
256,
2436,
18,
8,
6624,
685,
397,
18,
60,
198,
198,
76,
18187,
2878,
9564,
19,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
275,
3712,
43879,
2414,
198,
220,
220,
220,
2352,
3712,
38469,
90,
6242,
92,
198,
220,
220,
220,
9564,
19,
3419,
796,
649,
3419,
198,
220,
220,
220,
9564,
19,
7,
64,
3712,
5317,
11,
275,
3712,
43879,
2414,
11,
2352,
3712,
38469,
90,
6242,
30072,
796,
649,
7,
64,
11,
275,
11,
2352,
8,
198,
437,
198,
198,
14881,
11207,
7,
855,
5769,
64,
3712,
6242,
19,
11,
275,
3712,
6242,
19,
8,
796,
257,
13,
64,
6624,
275,
13,
64,
11405,
257,
13,
65,
6624,
275,
13,
65,
11405,
257,
13,
8937,
6624,
275,
13,
8937,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
19,
30072,
796,
32112,
31431,
13,
44,
18187,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
6242,
19,
30072,
796,
1058,
64,
198,
198,
83,
2436,
19,
796,
357,
64,
41888,
940,
11,
838,
11,
838,
4357,
275,
41888,
18,
13,
1415,
11,
513,
13,
1415,
11,
513,
13,
1415,
4357,
2352,
62,
64,
41888,
940,
11,
838,
11,
838,
4357,
2352,
62,
65,
41888,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
12962,
198,
198,
397,
19,
796,
9564,
19,
7,
940,
11,
513,
13,
1415,
11,
9564,
58,
6242,
7,
940,
11,
513,
13,
1415,
828,
9564,
7,
940,
11,
513,
13,
1314,
828,
9564,
7,
940,
11,
513,
13,
1433,
8,
12962,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
19,
11,
256,
2436,
19,
8,
6624,
450,
19,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
19,
5512,
256,
2436,
19,
8,
6624,
685,
397,
19,
60,
198,
198,
2,
3294,
2974,
286,
46282,
198,
7249,
9564,
20,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
450,
3712,
6242,
18,
198,
437,
198,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
20,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
83,
2436,
20,
796,
357,
64,
41888,
940,
4357,
450,
62,
64,
41888,
940,
4357,
450,
62,
397,
62,
64,
41888,
940,
4357,
450,
62,
397,
62,
65,
41888,
18,
13,
1415,
12962,
198,
198,
397,
20,
796,
9564,
20,
7,
940,
11,
9564,
18,
7,
940,
11,
9564,
7,
940,
11,
513,
13,
1415,
22305,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
20,
11,
256,
2436,
20,
8,
6624,
450,
20,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
20,
5512,
256,
2436,
20,
8,
6624,
685,
397,
20,
60,
198,
198,
2,
37431,
15019,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
4008,
6624,
256,
2436,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
17,
4008,
6624,
256,
2436,
17,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
18,
4008,
6624,
256,
2436,
18,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
19,
4008,
6624,
256,
2436,
19,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
20,
4008,
6624,
256,
2436,
20,
198,
198,
7249,
9564,
21,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
275,
3712,
6242,
198,
220,
220,
220,
269,
3712,
38469,
90,
6242,
92,
198,
437,
198,
198,
14881,
11207,
7,
855,
5769,
64,
3712,
6242,
21,
11,
275,
3712,
6242,
21,
8,
796,
257,
13,
64,
6624,
275,
13,
64,
11405,
257,
13,
65,
6624,
275,
13,
65,
11405,
257,
13,
66,
6624,
275,
13,
66,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
21,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
6242,
21,
30072,
796,
1058,
64,
198,
198,
83,
2436,
21,
796,
357,
64,
41888,
16,
11,
352,
11,
352,
4357,
275,
62,
64,
41888,
17,
11,
362,
11,
362,
4357,
275,
62,
65,
41888,
15,
13,
486,
11,
657,
13,
486,
11,
657,
13,
486,
4357,
269,
62,
64,
41888,
940,
11,
1367,
11,
1105,
4357,
269,
62,
65,
41888,
16,
13,
16,
11,
362,
13,
17,
11,
513,
13,
18,
12962,
198,
198,
397,
21,
796,
9564,
21,
7,
16,
11,
9564,
7,
17,
11,
657,
13,
486,
828,
685,
6242,
7,
940,
11,
352,
13,
16,
828,
9564,
7,
1157,
11,
362,
13,
17,
828,
9564,
7,
1065,
11,
513,
13,
18,
8,
12962,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
6242,
21,
11,
256,
2436,
21,
8,
6624,
450,
21,
198,
31,
9288,
15195,
2105,
13,
41571,
7,
38469,
90,
6242,
21,
5512,
256,
2436,
21,
8,
6624,
685,
397,
21,
60,
198,
31,
9288,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
21,
4008,
6624,
256,
2436,
21,
198,
198,
2,
3740,
1378,
12567,
13,
785,
14,
16980,
544,
6601,
14,
41347,
2105,
13,
20362,
14,
37165,
14,
1065,
198,
7249,
9564,
22,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
3815,
3712,
38469,
90,
43879,
2414,
92,
198,
437,
198,
198,
14881,
11207,
7,
855,
5769,
64,
3712,
6242,
22,
11,
275,
3712,
6242,
22,
8,
796,
257,
13,
312,
6624,
275,
13,
312,
11405,
257,
13,
27160,
6624,
275,
13,
27160,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
22,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
6242,
22,
30072,
796,
1058,
312,
198,
198,
397,
22,
796,
9564,
22,
7,
16,
11,
48436,
2414,
58,
12962,
198,
83,
2436,
796,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
22,
4008,
198,
31,
9288,
256,
2436,
13,
312,
58,
16,
60,
6624,
352,
198,
31,
9288,
256,
2436,
13,
27160,
58,
16,
60,
24844,
4814,
198,
198,
7249,
9564,
24,
198,
220,
220,
220,
257,
3712,
5317,
198,
220,
220,
220,
275,
3712,
10100,
198,
220,
220,
220,
269,
3712,
43879,
2414,
198,
220,
220,
220,
288,
3712,
10100,
198,
220,
220,
220,
304,
3712,
5317,
198,
220,
220,
220,
277,
3712,
10100,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
24,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
7249,
9564,
940,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
450,
24,
3712,
6242,
24,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
940,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
7249,
9564,
1157,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
450,
940,
3712,
6242,
940,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
6242,
1157,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
397,
1157,
796,
9564,
1157,
7,
16,
11,
9564,
940,
7,
17,
11,
9564,
24,
7,
18,
11,
366,
19,
1600,
642,
13,
15,
11,
366,
21,
1600,
767,
11,
366,
23,
1,
22305,
198,
83,
2436,
796,
951,
388,
429,
540,
7,
41347,
2105,
13,
12501,
261,
7249,
7,
397,
1157,
4008,
198,
31,
9288,
4129,
7,
83,
2436,
8,
6624,
807,
198,
31,
9288,
256,
2436,
13,
312,
58,
16,
60,
6624,
352,
198,
31,
9288,
256,
2436,
58,
437,
7131,
16,
60,
6624,
366,
23,
1,
198,
198,
2,
3740,
1378,
12567,
13,
785,
14,
16980,
544,
6601,
14,
41347,
2105,
13,
20362,
14,
37165,
14,
18,
198,
7249,
6208,
44909,
198,
220,
220,
220,
257,
3712,
43879,
2414,
198,
220,
220,
220,
275,
3712,
43879,
2414,
198,
220,
220,
220,
4686,
3712,
5317,
198,
437,
198,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
14402,
44909,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
14402,
44909,
30072,
796,
1058,
312,
198,
198,
7890,
796,
685,
6208,
44909,
7,
25192,
7,
17,
26513,
11,
299,
8,
329,
299,
796,
352,
25,
20,
60,
198,
198,
83,
2436,
796,
15195,
2105,
13,
12501,
261,
7249,
7,
7890,
8,
198,
31,
9288,
4129,
7,
51,
2977,
13,
4033,
388,
429,
540,
7,
83,
2436,
38381,
16,
12962,
6624,
642,
198,
198,
7249,
15923,
16,
198,
220,
220,
220,
257,
3712,
5317,
2414,
198,
220,
220,
220,
275,
3712,
35,
713,
90,
13940,
23650,
11,
4377,
92,
198,
437,
198,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
3838,
16,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
198,
7890,
796,
685,
15923,
16,
7,
16,
11,
360,
713,
90,
13940,
23650,
11,
4377,
92,
7,
25,
7252,
5218,
362,
11,
1058,
11848,
5218,
513,
4008,
2361,
198,
83,
2436,
796,
15195,
2105,
13,
12501,
261,
7249,
7,
7890,
8,
198,
83,
2436,
17,
796,
33220,
13,
4033,
388,
429,
540,
7,
83,
2436,
8,
198,
31,
9288,
256,
2436,
17,
13,
64,
6624,
685,
16,
60,
198,
31,
9288,
256,
2436,
17,
13,
65,
62,
7252,
6624,
685,
17,
60,
198,
31,
9288,
256,
2436,
17,
13,
65,
62,
11848,
6624,
685,
18,
60,
198,
198,
2,
23,
198,
7249,
6208,
23004,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
3815,
3712,
38469,
90,
43879,
2414,
92,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
14402,
23004,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
14402,
23004,
30072,
796,
1058,
312,
198,
198,
83,
2436,
796,
357,
312,
41888,
16,
11,
352,
11,
352,
11,
362,
11,
362,
11,
362,
4357,
3815,
41888,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
11,
2319,
13,
16,
11,
657,
13,
486,
11,
362,
13,
2682,
12962,
198,
9288,
20274,
796,
15195,
2105,
13,
41571,
7,
38469,
90,
14402,
23004,
5512,
256,
2436,
8,
198,
198,
7249,
29544,
198,
220,
220,
220,
4686,
3712,
5317,
198,
220,
220,
220,
1438,
3712,
10100,
198,
220,
220,
220,
1332,
43420,
3712,
14402,
23004,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
20468,
3681,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
20468,
3681,
30072,
796,
1058,
312,
198,
198,
44909,
31431,
13,
3245,
40290,
7,
3712,
6030,
90,
20468,
3681,
5512,
28642,
3712,
13940,
23650,
8,
796,
28642,
6624,
1058,
9288,
43420,
5633,
1058,
9288,
43420,
62,
1058,
1058,
62,
198,
198,
83,
2436,
17,
796,
357,
312,
41888,
16,
11,
352,
11,
352,
4357,
1438,
28,
14692,
11201,
16,
1600,
366,
11201,
16,
1600,
366,
11201,
16,
33116,
1332,
43420,
62,
312,
41888,
16,
11,
352,
11,
352,
4357,
1332,
43420,
62,
27160,
41888,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
12962,
198,
23100,
3681,
796,
15195,
2105,
13,
41571,
7,
20468,
3681,
11,
256,
2436,
17,
8,
198,
31,
9288,
6306,
13,
312,
6624,
352,
198,
31,
9288,
6306,
13,
3672,
6624,
366,
11201,
16,
1,
198,
31,
9288,
6306,
13,
9288,
43420,
13,
27160,
6624,
685,
18,
13,
1415,
11,
513,
13,
1314,
11,
513,
13,
1433,
60,
198,
198,
7249,
4809,
198,
220,
220,
220,
4686,
3712,
10100,
198,
220,
220,
220,
1366,
3712,
45,
2434,
51,
29291,
198,
437,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
16177,
30072,
796,
32112,
31431,
13,
44909,
3419,
198,
44909,
31431,
13,
312,
26745,
7,
3712,
6030,
90,
16177,
30072,
796,
1058,
312,
198,
44909,
31431,
13,
3245,
40290,
7,
3712,
6030,
90,
16177,
5512,
28642,
3712,
13940,
23650,
8,
796,
38357,
3419,
198,
198,
51,
2977,
13,
271,
808,
11487,
7,
3712,
6030,
90,
16177,
30072,
796,
2081,
198,
198,
8818,
33220,
13,
1136,
28665,
7,
808,
3712,
16177,
11,
72,
3712,
5317,
8,
198,
220,
220,
220,
611,
1312,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
651,
3245,
7,
808,
11,
16,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
5752,
13,
7890,
58,
72,
12,
16,
60,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
33220,
13,
1136,
28665,
7,
808,
3712,
16177,
11,
21533,
3712,
13940,
23650,
8,
198,
220,
220,
220,
611,
28642,
6624,
1058,
312,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
5752,
13,
312,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
651,
26745,
7,
808,
13,
7890,
11,
21533,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
33220,
13,
28665,
14933,
7,
808,
3712,
16177,
8,
198,
220,
220,
220,
410,
9246,
7,
25,
312,
11,
13083,
7,
808,
13,
7890,
8,
23029,
198,
437,
198,
198,
87,
796,
4809,
7203,
421,
87,
1600,
7,
64,
28,
16,
11,
65,
28,
18,
4008,
198,
24954,
796,
15195,
2105,
13,
12501,
261,
7249,
7,
87,
8,
198,
25306,
796,
15195,
2105,
13,
41571,
7,
16177,
11,
24954,
8,
198,
198,
31,
9288,
2124,
66,
13,
312,
6624,
366,
421,
87,
1,
198,
31,
9288,
2124,
66,
13,
7890,
6624,
357,
64,
28,
16,
11,
275,
28,
18,
8,
198,
198,
87,
17,
796,
4809,
7203,
21943,
1600,
7,
64,
28,
16,
11,
65,
28,
18,
4008,
198,
55,
796,
685,
87,
11,
87,
17,
60,
198,
55,
67,
796,
15195,
2105,
13,
12501,
261,
7249,
7,
55,
8,
198,
55,
66,
796,
15195,
2105,
13,
41571,
7,
38469,
90,
16177,
5512,
55,
67,
8,
198,
198,
31,
9288,
4129,
7,
55,
66,
8,
6624,
362,
198,
31,
9288,
1395,
66,
58,
17,
4083,
312,
6624,
366,
21943,
1,
198,
31,
9288,
1395,
66,
58,
17,
4083,
7890,
6624,
357,
64,
28,
16,
11,
275,
28,
18,
8,
198,
198,
7249,
27323,
2848,
198,
220,
220,
220,
2124,
3712,
45,
2434,
51,
29291,
90,
7,
25,
64,
11,
1058,
65,
828,
309,
29291,
90,
5317,
11,
10903,
11709,
198,
437,
198,
198,
44909,
31431,
13,
44909,
6030,
7,
3712,
6030,
90,
36918,
2848,
30072,
796,
32112,
31431,
13,
15022,
44909,
3419,
198,
44909,
31431,
13,
21037,
7,
87,
3712,
36918,
2848,
8,
796,
2124,
13,
87,
198,
44909,
31431,
13,
21037,
4906,
7,
3712,
6030,
90,
36918,
2848,
30072,
796,
2214,
4906,
7,
36918,
2848,
11,
1058,
87,
8,
198,
86,
796,
27323,
2848,
19510,
64,
28,
16,
11,
275,
2625,
20342,
48774,
198,
198,
83,
2436,
796,
15195,
2105,
13,
12501,
261,
7249,
7,
86,
8,
930,
29,
33220,
13,
4033,
388,
429,
540,
198,
31,
9288,
256,
2436,
6624,
357,
64,
796,
685,
16,
4357,
275,
796,
14631,
20342,
8973,
8,
198,
86,
17,
796,
15195,
2105,
13,
41571,
7,
36918,
2848,
11,
256,
2436,
8,
198,
31,
9288,
266,
6624,
266,
17,
198
] | 2.282216 | 3,430 |
info("Testing ", MOD.translate!)
for T in FloatingPointTypes
A = T[1 2;
3 4;
5 6]
b = T[1;
2]
c = T[1;
2;
3]
@test_approx_eq MOD.translate!(copy(A), one(T)) (A .+ one(T))
@test_approx_eq MOD.translate!(one(T), copy(A)) (A .+ one(T))
@test_approx_eq MOD.translate!(copy(A), b) (A .+ b')
@test_approx_eq MOD.translate!(c, copy(A)) (A .+ c)
end
info("Testing ", MOD.perturb!)
for T in FloatingPointTypes
A = T[1 2 3;
4 5 6;
7 8 9]
B = T[1 2;
3 4;
5 6]
@test_approx_eq MOD.perturb!(copy(A), one(T)) (A + one(T)*I)
@test_throws DimensionMismatch MOD.perturb!(B, one(T))
end
info("Testing ", MOD.regularize!)
for T in FloatingPointTypes
A = T[1 2 3;
4 5 6;
7 8 9]
B = T[1 2;
3 4;
5 6]
a = trace(A)/3
@test_approx_eq MOD.regularize!(copy(A), zero(T), a) A
@test_approx_eq MOD.regularize!(copy(A), convert(T,0.5), a) convert(T,0.5)*(A + a*I)
@test_approx_eq MOD.regularize!(copy(A), one(T), a) a*eye(T,3)
@test_throws DimensionMismatch MOD.regularize!(B, one(T), one(T))
end
A = [1 2 3;
4 5 6;
7 8 9]
AL = [1 2 3;
2 5 6;
3 6 9]
AU = [1 4 7;
4 5 8;
7 8 9]
info("Testing ", MOD.syml)
for T in FloatingPointTypes
B = MOD.syml(convert(Array{T},A))
@test eltype(B) == T
@test_approx_eq B convert(Array{T}, AL)
end
info("Testing ", MOD.symu)
for T in FloatingPointTypes
B = MOD.symu(convert(Array{T},A))
@test eltype(B) == T
@test_approx_eq B convert(Array{T}, AU)
end
info("Testing ", MOD.components_svd!)
for T in FloatingPointTypes
X = rand(T,20,5)
V1, D1 = MOD.components_svd!(copy(X))
D2, V2 = svd(X)[2:3]
@test_approx_eq V1 V2
@test_approx_eq D1 (D2 .^ 2)
end
info("Testing ", MOD.components_eig!)
for T in FloatingPointTypes
X = rand(T,20,5)
S = X'X
V1, D1 = MOD.components_eig!(copy(S))
D2, V2 = eig(S)
@test_approx_eq abs(V1) abs(V2[:,end:-1:1]) # Signs may differ
@test_approx_eq abs(D1) abs(D2[end:-1:1])
end
info("Testing ", MOD.components_geig!)
for T in FloatingPointTypes
X1 = rand(T,20,5)
X2 = rand(T,20,5)
S1 = X1'X1
S2 = X2'X2
V1, D1 = MOD.components_geig!(copy(S1), copy(S2))
D2, V2 = eig(S1, S2)
@test_approx_eq abs(V1) abs(V2[:,end:-1:1])
@test_approx_eq abs(D1) abs(D2[end:-1:1])
end
| [
10951,
7203,
44154,
33172,
19164,
13,
7645,
17660,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
317,
796,
309,
58,
16,
362,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
513,
604,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
718,
60,
628,
220,
220,
220,
275,
796,
309,
58,
16,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
362,
60,
628,
220,
220,
220,
269,
796,
309,
58,
16,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
362,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
513,
60,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
7645,
17660,
0,
7,
30073,
7,
32,
828,
530,
7,
51,
4008,
357,
32,
764,
10,
530,
7,
51,
4008,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
7645,
17660,
0,
7,
505,
7,
51,
828,
4866,
7,
32,
4008,
357,
32,
764,
10,
530,
7,
51,
4008,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
7645,
17660,
0,
7,
30073,
7,
32,
828,
275,
8,
357,
32,
764,
10,
275,
11537,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
7645,
17660,
0,
7,
66,
11,
4866,
7,
32,
4008,
357,
32,
764,
10,
269,
8,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
11766,
5945,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
317,
796,
309,
58,
16,
362,
513,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
604,
642,
718,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
767,
807,
860,
60,
628,
220,
220,
220,
347,
796,
309,
58,
16,
362,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
513,
604,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
718,
60,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
11766,
5945,
0,
7,
30073,
7,
32,
828,
530,
7,
51,
4008,
357,
32,
1343,
530,
7,
51,
27493,
40,
8,
198,
220,
220,
220,
2488,
9288,
62,
400,
8516,
34024,
44,
1042,
963,
19164,
13,
11766,
5945,
0,
7,
33,
11,
530,
7,
51,
4008,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
16338,
1096,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
317,
796,
309,
58,
16,
362,
513,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
604,
642,
718,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
767,
807,
860,
60,
628,
220,
220,
220,
347,
796,
309,
58,
16,
362,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
513,
604,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
718,
60,
628,
220,
220,
220,
257,
796,
12854,
7,
32,
20679,
18,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
16338,
1096,
0,
7,
30073,
7,
32,
828,
6632,
7,
51,
828,
257,
8,
317,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
16338,
1096,
0,
7,
30073,
7,
32,
828,
10385,
7,
51,
11,
15,
13,
20,
828,
257,
8,
10385,
7,
51,
11,
15,
13,
20,
27493,
7,
32,
1343,
257,
9,
40,
8,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
19164,
13,
16338,
1096,
0,
7,
30073,
7,
32,
828,
530,
7,
51,
828,
257,
8,
257,
9,
25379,
7,
51,
11,
18,
8,
198,
220,
220,
220,
2488,
9288,
62,
400,
8516,
34024,
44,
1042,
963,
19164,
13,
16338,
1096,
0,
7,
33,
11,
530,
7,
51,
828,
530,
7,
51,
4008,
198,
437,
628,
198,
32,
220,
796,
685,
16,
362,
513,
26,
198,
220,
220,
220,
220,
220,
604,
642,
718,
26,
198,
220,
220,
220,
220,
220,
767,
807,
860,
60,
198,
1847,
796,
685,
16,
362,
513,
26,
198,
220,
220,
220,
220,
220,
362,
642,
718,
26,
198,
220,
220,
220,
220,
220,
513,
718,
860,
60,
198,
26830,
796,
685,
16,
604,
767,
26,
198,
220,
220,
220,
220,
220,
604,
642,
807,
26,
198,
220,
220,
220,
220,
220,
767,
807,
860,
60,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
1837,
4029,
8,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
347,
796,
19164,
13,
1837,
4029,
7,
1102,
1851,
7,
19182,
90,
51,
5512,
32,
4008,
198,
220,
220,
220,
2488,
9288,
1288,
4906,
7,
33,
8,
6624,
309,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
347,
10385,
7,
19182,
90,
51,
5512,
8355,
8,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
1837,
30300,
8,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
347,
796,
19164,
13,
1837,
30300,
7,
1102,
1851,
7,
19182,
90,
51,
5512,
32,
4008,
198,
220,
220,
220,
2488,
9288,
1288,
4906,
7,
33,
8,
6624,
309,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
347,
10385,
7,
19182,
90,
51,
5512,
27548,
8,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
5589,
3906,
62,
82,
20306,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
1395,
796,
43720,
7,
51,
11,
1238,
11,
20,
8,
198,
220,
220,
220,
569,
16,
11,
360,
16,
796,
19164,
13,
5589,
3906,
62,
82,
20306,
0,
7,
30073,
7,
55,
4008,
628,
220,
220,
220,
360,
17,
11,
569,
17,
796,
264,
20306,
7,
55,
38381,
17,
25,
18,
60,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
569,
16,
569,
17,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
360,
16,
357,
35,
17,
764,
61,
362,
8,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
5589,
3906,
62,
68,
328,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
1395,
796,
43720,
7,
51,
11,
1238,
11,
20,
8,
198,
220,
220,
220,
311,
796,
1395,
6,
55,
628,
220,
220,
220,
569,
16,
11,
360,
16,
796,
19164,
13,
5589,
3906,
62,
68,
328,
0,
7,
30073,
7,
50,
4008,
628,
220,
220,
220,
360,
17,
11,
569,
17,
796,
304,
328,
7,
50,
8,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
2352,
7,
53,
16,
8,
2352,
7,
53,
17,
58,
45299,
437,
21912,
16,
25,
16,
12962,
220,
1303,
37027,
743,
13238,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
2352,
7,
35,
16,
8,
2352,
7,
35,
17,
58,
437,
21912,
16,
25,
16,
12962,
198,
437,
198,
198,
10951,
7203,
44154,
33172,
19164,
13,
5589,
3906,
62,
469,
328,
8133,
198,
1640,
309,
287,
49768,
12727,
31431,
198,
220,
220,
220,
1395,
16,
796,
43720,
7,
51,
11,
1238,
11,
20,
8,
198,
220,
220,
220,
1395,
17,
796,
43720,
7,
51,
11,
1238,
11,
20,
8,
628,
220,
220,
220,
311,
16,
796,
1395,
16,
6,
55,
16,
198,
220,
220,
220,
311,
17,
796,
1395,
17,
6,
55,
17,
628,
220,
220,
220,
569,
16,
11,
360,
16,
796,
19164,
13,
5589,
3906,
62,
469,
328,
0,
7,
30073,
7,
50,
16,
828,
4866,
7,
50,
17,
4008,
628,
220,
220,
220,
360,
17,
11,
569,
17,
796,
304,
328,
7,
50,
16,
11,
311,
17,
8,
628,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
2352,
7,
53,
16,
8,
2352,
7,
53,
17,
58,
45299,
437,
21912,
16,
25,
16,
12962,
198,
220,
220,
220,
2488,
9288,
62,
1324,
13907,
62,
27363,
2352,
7,
35,
16,
8,
2352,
7,
35,
17,
58,
437,
21912,
16,
25,
16,
12962,
198,
437,
198
] | 1.879205 | 1,308 |
using Kinetic
using KitBase.OffsetArrays, KitBase.ProgressMeter
cd(@__DIR__)
D = read_dict("mixture_shock.txt")
for key in keys(D)
s = Symbol(key)
@eval $s = $(D[key])
end
begin
γ = heat_capacity_ratio(inK, 1)
set = Setup(matter, case, space, flux, collision, nSpecies, interpOrder, limiter, boundary, cfl, maxTime)
pSpace = PSpace1D(x0, x1, nx, nxg)
ue0 = umin * sqrt(mi / me)
ue1 = umax * sqrt(mi / me)
vSpace = MVSpace1D(umin, umax, ue0, ue1, nu, vMeshType, nug)
kne = knudsen * (me / mi)
gas = Mixture(
[knudsen, kne],
mach,
prandtl,
inK,
γ,
mi,
ni,
me,
ne,
)
wL, primL, hL, bL, bcL, wR, primR, hR, bR, bcR = ib_rh(gas.Ma, gas.γ, gas.K, mi, me, ni, ne, vSpace.u)
ib = IB2F(wL, primL, hL, bL, bcL, wR, primR, hR, bR, bcR)
ks = SolverSet(set, pSpace, vSpace, gas, ib, pwd())
end
begin
ctr = OffsetArray{ControlVolume1D2F}(undef, axes(ks.pSpace.x, 1))
face = Array{Interface1D2F}(undef, ks.pSpace.nx + 1)
idx0 = (eachindex(pSpace.x) |> collect)[1]
idx1 = (eachindex(pSpace.x) |> collect)[end]
for i in eachindex(ctr)
if i <= ks.pSpace.nx ÷ 2
ctr[i] = ControlVolume1D2F(ks.pSpace.x[i], ks.pSpace.dx[i], ks.ib.wL, ks.ib.primL,
ks.ib.hL, ks.ib.bL)
else
ctr[i] = ControlVolume1D2F(ks.pSpace.x[i], ks.pSpace.dx[i], ks.ib.wR, ks.ib.primR,
ks.ib.hR, ks.ib.bR)
end
end
face = Array{Interface1D2F}(undef, ks.pSpace.nx+1)
for i=1:ks.pSpace.nx+1
face[i] = Interface1D2F(ks.ib.wL, ks.ib.hL)
end
end
begin
iter = 0
res = zeros(3)
simTime = 0.0
dt = Kinetic.timestep(ks, ctr, simTime)
nt = Int(floor(ks.set.maxTime / dt))
end
res = zeros(3, 2)
begin
Kinetic.reconstruct!(ks, ctr)
Kinetic.evolve!(ks, ctr, face, dt)
Kinetic.update!(ks, ctr, face, dt, res; bc=:fix)
end | [
3500,
16645,
5139,
198,
3500,
10897,
14881,
13,
34519,
3163,
20477,
11,
10897,
14881,
13,
32577,
44,
2357,
198,
198,
10210,
7,
31,
834,
34720,
834,
8,
198,
35,
796,
1100,
62,
11600,
7203,
76,
9602,
62,
39563,
13,
14116,
4943,
198,
1640,
1994,
287,
8251,
7,
35,
8,
198,
220,
220,
220,
264,
796,
38357,
7,
2539,
8,
198,
220,
220,
220,
2488,
18206,
720,
82,
796,
29568,
35,
58,
2539,
12962,
198,
437,
198,
198,
27471,
198,
220,
220,
220,
7377,
111,
796,
4894,
62,
42404,
62,
10366,
952,
7,
259,
42,
11,
352,
8,
198,
220,
220,
220,
900,
796,
31122,
7,
47635,
11,
1339,
11,
2272,
11,
28462,
11,
17661,
11,
299,
5248,
3171,
11,
987,
79,
18743,
11,
1761,
2676,
11,
18645,
11,
269,
2704,
11,
3509,
7575,
8,
198,
220,
220,
220,
279,
14106,
796,
350,
14106,
16,
35,
7,
87,
15,
11,
2124,
16,
11,
299,
87,
11,
299,
87,
70,
8,
198,
220,
220,
220,
334,
68,
15,
796,
334,
1084,
1635,
19862,
17034,
7,
11632,
1220,
502,
8,
198,
220,
220,
220,
334,
68,
16,
796,
334,
9806,
1635,
19862,
17034,
7,
11632,
1220,
502,
8,
198,
220,
220,
220,
410,
14106,
796,
32947,
14106,
16,
35,
7,
7230,
11,
334,
9806,
11,
334,
68,
15,
11,
334,
68,
16,
11,
14364,
11,
410,
37031,
6030,
11,
299,
1018,
8,
198,
220,
220,
220,
24813,
796,
638,
463,
6248,
1635,
357,
1326,
1220,
21504,
8,
198,
220,
220,
220,
3623,
796,
337,
9602,
7,
198,
220,
220,
220,
220,
220,
220,
220,
685,
15418,
463,
6248,
11,
24813,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
3235,
11,
198,
220,
220,
220,
220,
220,
220,
220,
778,
392,
28781,
11,
198,
220,
220,
220,
220,
220,
220,
220,
287,
42,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
111,
11,
198,
220,
220,
220,
220,
220,
220,
220,
21504,
11,
198,
220,
220,
220,
220,
220,
220,
220,
37628,
11,
198,
220,
220,
220,
220,
220,
220,
220,
502,
11,
198,
220,
220,
220,
220,
220,
220,
220,
497,
11,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
266,
43,
11,
2684,
43,
11,
289,
43,
11,
275,
43,
11,
47125,
43,
11,
266,
49,
11,
2684,
49,
11,
289,
49,
11,
275,
49,
11,
47125,
49,
796,
24283,
62,
17179,
7,
22649,
13,
21467,
11,
3623,
13,
42063,
11,
3623,
13,
42,
11,
21504,
11,
502,
11,
37628,
11,
497,
11,
410,
14106,
13,
84,
8,
198,
220,
220,
220,
24283,
796,
34782,
17,
37,
7,
86,
43,
11,
2684,
43,
11,
289,
43,
11,
275,
43,
11,
47125,
43,
11,
266,
49,
11,
2684,
49,
11,
289,
49,
11,
275,
49,
11,
47125,
49,
8,
628,
220,
220,
220,
479,
82,
796,
4294,
332,
7248,
7,
2617,
11,
279,
14106,
11,
410,
14106,
11,
3623,
11,
24283,
11,
279,
16993,
28955,
198,
437,
198,
198,
27471,
198,
220,
220,
220,
269,
2213,
796,
3242,
2617,
19182,
90,
15988,
31715,
16,
35,
17,
37,
92,
7,
917,
891,
11,
34197,
7,
591,
13,
79,
14106,
13,
87,
11,
352,
4008,
198,
220,
220,
220,
1986,
796,
15690,
90,
39317,
16,
35,
17,
37,
92,
7,
917,
891,
11,
479,
82,
13,
79,
14106,
13,
77,
87,
1343,
352,
8,
628,
220,
220,
220,
4686,
87,
15,
796,
357,
27379,
9630,
7,
79,
14106,
13,
87,
8,
930,
29,
2824,
38381,
16,
60,
198,
220,
220,
220,
4686,
87,
16,
796,
357,
27379,
9630,
7,
79,
14106,
13,
87,
8,
930,
29,
2824,
38381,
437,
60,
628,
220,
220,
220,
329,
1312,
287,
1123,
9630,
7,
24087,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
19841,
479,
82,
13,
79,
14106,
13,
77,
87,
6184,
115,
362,
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,
269,
2213,
58,
72,
60,
796,
6779,
31715,
16,
35,
17,
37,
7,
591,
13,
79,
14106,
13,
87,
58,
72,
4357,
479,
82,
13,
79,
14106,
13,
34350,
58,
72,
4357,
479,
82,
13,
571,
13,
86,
43,
11,
479,
82,
13,
571,
13,
19795,
43,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
82,
13,
571,
13,
71,
43,
11,
479,
82,
13,
571,
13,
65,
43,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
2213,
58,
72,
60,
796,
6779,
31715,
16,
35,
17,
37,
7,
591,
13,
79,
14106,
13,
87,
58,
72,
4357,
479,
82,
13,
79,
14106,
13,
34350,
58,
72,
4357,
479,
82,
13,
571,
13,
86,
49,
11,
479,
82,
13,
571,
13,
19795,
49,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
82,
13,
571,
13,
71,
49,
11,
479,
82,
13,
571,
13,
65,
49,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1986,
796,
15690,
90,
39317,
16,
35,
17,
37,
92,
7,
917,
891,
11,
479,
82,
13,
79,
14106,
13,
77,
87,
10,
16,
8,
198,
220,
220,
220,
329,
1312,
28,
16,
25,
591,
13,
79,
14106,
13,
77,
87,
10,
16,
198,
220,
220,
220,
220,
220,
220,
220,
1986,
58,
72,
60,
796,
26491,
16,
35,
17,
37,
7,
591,
13,
571,
13,
86,
43,
11,
479,
82,
13,
571,
13,
71,
43,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
27471,
198,
220,
220,
220,
11629,
796,
657,
198,
220,
220,
220,
581,
796,
1976,
27498,
7,
18,
8,
198,
220,
220,
220,
985,
7575,
796,
657,
13,
15,
198,
220,
220,
220,
288,
83,
796,
16645,
5139,
13,
16514,
395,
538,
7,
591,
11,
269,
2213,
11,
985,
7575,
8,
198,
220,
220,
220,
299,
83,
796,
2558,
7,
28300,
7,
591,
13,
2617,
13,
9806,
7575,
1220,
288,
83,
4008,
198,
437,
198,
198,
411,
796,
1976,
27498,
7,
18,
11,
362,
8,
198,
27471,
198,
220,
220,
220,
16645,
5139,
13,
260,
41571,
0,
7,
591,
11,
269,
2213,
8,
198,
220,
220,
220,
16645,
5139,
13,
1990,
6442,
0,
7,
591,
11,
269,
2213,
11,
1986,
11,
288,
83,
8,
198,
220,
220,
220,
16645,
5139,
13,
19119,
0,
7,
591,
11,
269,
2213,
11,
1986,
11,
288,
83,
11,
581,
26,
47125,
28,
25,
13049,
8,
198,
437
] | 1.790485 | 1,093 |
using Revise
using PyPlot
using Infiltrator
using LinearAlgebra
using Bem2d
"""
gravityparticularfunctions()
From Pape and Bannerjee 1987
"""
function gravityparticularfunctions(x, y, g, rho, lambda, mu)
U = zeros(length(x), 2)
S = zeros(length(x), 3)
U[:, 1] = @. -lambda * rho * g / (4 * mu * (lambda + mu)) * x * y # Pape and Banerjee (1987) equation (6a)
U[:, 2] = @. (rho * g) / (8 * mu * (lambda + mu)) * (lambda * x^2 + (lambda + 2 * mu) * y^2) # Pape and Banerjee (1987) equation (6b)
S[:, 1] .= 0 # Pape and Banerjee (1987) equation (6c)
S[:, 2] = @. rho * g * y # Pape and Banerjee (1987) equation (6d)
S[:, 3] .= 0 # Pape and Banerjee (1987) equation (6e)
return U, S
end
"""
gravitysquareparticular()
Experiments with gravity body force.
"""
function gravitysquareparticular()
# TODO: Move particular solution to Bem2d.jl
# TODO: It's strange that the top of the model has to be at zero. Can we generalize this?
# TODO: Rule of thumb for choosing precondtioner value (alpha)?
# TODO: Make a version of gravityparticularfunctions() for BC generation
close("all")
alpha = 7e-8 # scalar preconditioner for traction terms
fontsize = 20
mu = 3e10
lambda = 3e10
nu = 0.25
rho = 2700
g = 9.81
nels = 20
npts = 100
L = 1e4
offset = 10
x, y = obsgrid(-L+offset, -2*L+offset, L-offset, 0-offset, npts)
# Define BEM geometry
els = Elements(Int(1e5))
x1, y1, x2, y2 = discretizedline(-L, -2*L, L, -2*L, nels) # Bottom
addelsez!(els, x1, y1, x2, y2, "B")
x1, y1, x2, y2 = discretizedline(L, -2*L, L, 0, nels) # Right hand side
addelsez!(els, x1, y1, x2, y2, "R")
x1, y1, x2, y2 = discretizedline(L, 0, -L, 0, nels) # Top
addelsez!(els, x1, y1, x2, y2, "T")
x1, y1, x2, y2 = discretizedline(-L, 0, -L, -2*L, nels) # Left hand side
addelsez!(els, x1, y1, x2, y2, "L")
# Common indexing
idx = getidxdict(els) # Should this return "all" - YES TODO
bcidxU = idx["B"] # Boundaries with *displacement* BCs
bcidxT = [idx["R"] ; idx["T"]; idx["L"]] # Boundaries with *traction* BCs
bcidxall = collect(1:1:els.endidx) # All boundaries
# Gravity square problem with quadratic elements
T_pU_qall, _ = PUTQ(slip2dispstress, els, bcidxU, bcidxall, mu, nu)
_, H_pT_qall = PUTQ(slip2dispstress, els, bcidxT, bcidxall, mu, nu)
TH = [T_pU_qall ; alpha .* H_pT_qall] # Assemble combined linear operator
# Particular solution and effective boundary conditions
xnodes = transpose(els.xnodes[idx["B"], :])[:]
ynodes = transpose(els.ynodes[idx["B"], :])[:]
UB, _ = gravityparticularfunctions(xnodes, ynodes, g, rho, lambda, mu)
bcs = zeros(6 * els.endidx)
bcs[1:2:6*nels] = UB[:, 1] # Bottom boundary (x-component)
bcs[2:2:6*nels] = UB[:, 2] # Bottom boundary (y-component)
bcs *= -1 # This is neccesary for the right answer and is consistent with derivation
# BEM solve to get particular solution
Ueffparticular = inv(TH) * bcs
# Evaluate and plot interior solution
Uinteriorcomplementary, Sinteriorcomplementary = quaddispstress(slip2dispstress, x, y, els, bcidxall, quadstack(Ueffparticular[1:2:end]), quadstack(Ueffparticular[2:2:end]), mu, nu)
Uinteriorparticular, Sinteriorparticular = gravityparticularfunctions(x, y, g, rho, lambda, mu)
U = @. Uinteriorcomplementary + Uinteriorparticular
S = @. Sinteriorcomplementary + Sinteriorparticular
plotfields(els, reshape(x, npts, npts), reshape(y, npts, npts), Uinteriorcomplementary, Sinteriorcomplementary, "Complementary solution")
plotfields(els, reshape(x, npts, npts), reshape(y, npts, npts), Uinteriorparticular, Sinteriorparticular, "Particular solution")
plotfields(els, reshape(x, npts, npts), reshape(y, npts, npts), U, S, "Complementary + Particular solutions")
# Interior point solution for nice vector plot
npts = 10
offset = 500
x, y = obsgrid(-L+offset, -2*L+offset, L-offset, 0-offset, npts)
Uinteriorcomplementary, Sinteriorcomplementary = quaddispstress(slip2dispstress, x, y, els, bcidxall, quadstack(Ueffparticular[1:2:end]), quadstack(Ueffparticular[2:2:end]), mu, nu)
Uinteriorparticular, Sinteriorparticular = gravityparticularfunctions(x, y, g, rho, lambda, mu)
U = @. Uinteriorcomplementary + Uinteriorparticular
S = @. Sinteriorcomplementary + Sinteriorparticular
# Plot of interior points
figure()
fill([-10000, 10000, 10000, -10000], [-20000, -20000, 0, 0] .+ 20000, color="lightgray", zorder=1)
quiver(x[:], y[:].+20000, U[:, 1], U[:, 2], units="width", color="cyan", edgecolor="k", linewidths=0.25, zorder=10)
xlabel("x (m)")
ylabel("y (m)")
gca().set_aspect("equal")
end
gravitysquareparticular()
| [
3500,
5416,
786,
198,
3500,
9485,
43328,
198,
3500,
4806,
19438,
1352,
198,
3500,
44800,
2348,
29230,
198,
3500,
347,
368,
17,
67,
628,
198,
37811,
198,
220,
220,
220,
13522,
3911,
13174,
12543,
2733,
3419,
198,
198,
4863,
350,
1758,
290,
27414,
34589,
12923,
198,
37811,
198,
8818,
13522,
3911,
13174,
12543,
2733,
7,
87,
11,
331,
11,
308,
11,
374,
8873,
11,
37456,
11,
38779,
8,
198,
220,
220,
220,
471,
796,
1976,
27498,
7,
13664,
7,
87,
828,
362,
8,
198,
220,
220,
220,
311,
796,
1976,
27498,
7,
13664,
7,
87,
828,
513,
8,
198,
220,
220,
220,
471,
58,
45299,
352,
60,
796,
2488,
13,
532,
50033,
1635,
374,
8873,
1635,
308,
1220,
357,
19,
1635,
38779,
1635,
357,
50033,
1343,
38779,
4008,
1635,
2124,
1635,
331,
220,
1303,
350,
1758,
290,
10274,
263,
34589,
357,
27301,
8,
16022,
357,
21,
64,
8,
198,
220,
220,
220,
471,
58,
45299,
362,
60,
796,
2488,
13,
357,
81,
8873,
1635,
308,
8,
1220,
357,
23,
1635,
38779,
1635,
357,
50033,
1343,
38779,
4008,
1635,
357,
50033,
1635,
2124,
61,
17,
1343,
357,
50033,
1343,
362,
1635,
38779,
8,
1635,
331,
61,
17,
8,
1303,
350,
1758,
290,
10274,
263,
34589,
357,
27301,
8,
16022,
357,
21,
65,
8,
198,
220,
220,
220,
311,
58,
45299,
352,
60,
764,
28,
657,
1303,
350,
1758,
290,
10274,
263,
34589,
357,
27301,
8,
16022,
357,
21,
66,
8,
198,
220,
220,
220,
311,
58,
45299,
362,
60,
796,
2488,
13,
374,
8873,
1635,
308,
1635,
331,
220,
1303,
350,
1758,
290,
10274,
263,
34589,
357,
27301,
8,
16022,
357,
21,
67,
8,
198,
220,
220,
220,
311,
58,
45299,
513,
60,
764,
28,
657,
1303,
350,
1758,
290,
10274,
263,
34589,
357,
27301,
8,
16022,
357,
21,
68,
8,
198,
220,
220,
220,
1441,
471,
11,
311,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
13522,
23415,
3911,
13174,
3419,
198,
198,
20468,
6800,
351,
13522,
1767,
2700,
13,
198,
37811,
198,
8818,
13522,
23415,
3911,
13174,
3419,
198,
220,
220,
220,
1303,
16926,
46,
25,
10028,
1948,
4610,
284,
347,
368,
17,
67,
13,
20362,
198,
220,
220,
220,
1303,
16926,
46,
25,
632,
338,
6283,
326,
262,
1353,
286,
262,
2746,
468,
284,
307,
379,
6632,
13,
220,
1680,
356,
2276,
1096,
428,
30,
198,
220,
220,
220,
1303,
16926,
46,
25,
14330,
286,
15683,
329,
11236,
3718,
623,
5378,
263,
1988,
357,
26591,
19427,
198,
220,
220,
220,
1303,
16926,
46,
25,
6889,
257,
2196,
286,
13522,
3911,
13174,
12543,
2733,
3419,
329,
11843,
5270,
628,
220,
220,
220,
1969,
7203,
439,
4943,
198,
220,
220,
220,
17130,
796,
767,
68,
12,
23,
1303,
16578,
283,
3718,
623,
653,
263,
329,
23692,
2846,
198,
220,
220,
220,
10369,
7857,
796,
1160,
198,
220,
220,
220,
38779,
796,
513,
68,
940,
198,
220,
220,
220,
37456,
796,
513,
68,
940,
198,
220,
220,
220,
14364,
796,
657,
13,
1495,
198,
220,
220,
220,
374,
8873,
796,
2681,
405,
198,
220,
220,
220,
308,
796,
860,
13,
6659,
198,
220,
220,
220,
299,
1424,
796,
1160,
198,
220,
220,
220,
299,
457,
82,
796,
1802,
198,
220,
220,
220,
406,
796,
352,
68,
19,
198,
220,
220,
220,
11677,
796,
838,
198,
220,
220,
220,
2124,
11,
331,
796,
10201,
25928,
32590,
43,
10,
28968,
11,
532,
17,
9,
43,
10,
28968,
11,
406,
12,
28968,
11,
657,
12,
28968,
11,
299,
457,
82,
8,
220,
628,
220,
220,
220,
1303,
2896,
500,
347,
3620,
22939,
198,
220,
220,
220,
1288,
82,
796,
26632,
7,
5317,
7,
16,
68,
20,
4008,
198,
220,
220,
220,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
796,
1221,
1186,
1143,
1370,
32590,
43,
11,
532,
17,
9,
43,
11,
406,
11,
532,
17,
9,
43,
11,
299,
1424,
8,
1303,
24530,
198,
220,
220,
220,
751,
17772,
89,
0,
7,
1424,
11,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
11,
366,
33,
4943,
198,
220,
220,
220,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
796,
1221,
1186,
1143,
1370,
7,
43,
11,
532,
17,
9,
43,
11,
406,
11,
657,
11,
299,
1424,
8,
1303,
6498,
1021,
1735,
198,
220,
220,
220,
751,
17772,
89,
0,
7,
1424,
11,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
11,
366,
49,
4943,
198,
220,
220,
220,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
796,
1221,
1186,
1143,
1370,
7,
43,
11,
657,
11,
532,
43,
11,
657,
11,
299,
1424,
8,
1303,
5849,
198,
220,
220,
220,
751,
17772,
89,
0,
7,
1424,
11,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
11,
366,
51,
4943,
198,
220,
220,
220,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
796,
1221,
1186,
1143,
1370,
32590,
43,
11,
657,
11,
532,
43,
11,
532,
17,
9,
43,
11,
299,
1424,
8,
1303,
9578,
1021,
1735,
198,
220,
220,
220,
751,
17772,
89,
0,
7,
1424,
11,
2124,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
11,
366,
43,
4943,
628,
220,
220,
220,
1303,
8070,
6376,
278,
198,
220,
220,
220,
4686,
87,
796,
651,
312,
87,
11600,
7,
1424,
8,
1303,
10358,
428,
1441,
366,
439,
1,
532,
21560,
16926,
46,
198,
220,
220,
220,
47125,
312,
87,
52,
796,
4686,
87,
14692,
33,
8973,
1303,
30149,
3166,
351,
1635,
6381,
489,
5592,
9,
11843,
82,
198,
220,
220,
220,
47125,
312,
87,
51,
796,
685,
312,
87,
14692,
49,
8973,
2162,
4686,
87,
14692,
51,
8973,
26,
4686,
87,
14692,
43,
8973,
60,
1303,
30149,
3166,
351,
1635,
83,
7861,
9,
11843,
82,
198,
220,
220,
220,
47125,
312,
87,
439,
796,
2824,
7,
16,
25,
16,
25,
1424,
13,
437,
312,
87,
8,
1303,
1439,
13215,
628,
220,
220,
220,
1303,
24084,
6616,
1917,
351,
15094,
81,
1512,
4847,
198,
220,
220,
220,
309,
62,
79,
52,
62,
80,
439,
11,
4808,
796,
350,
3843,
48,
7,
6649,
541,
17,
6381,
79,
41494,
11,
1288,
82,
11,
47125,
312,
87,
52,
11,
47125,
312,
87,
439,
11,
38779,
11,
14364,
8,
198,
220,
220,
220,
4808,
11,
367,
62,
79,
51,
62,
80,
439,
796,
350,
3843,
48,
7,
6649,
541,
17,
6381,
79,
41494,
11,
1288,
82,
11,
47125,
312,
87,
51,
11,
47125,
312,
87,
439,
11,
38779,
11,
14364,
8,
628,
220,
220,
220,
2320,
796,
685,
51,
62,
79,
52,
62,
80,
439,
2162,
17130,
764,
9,
367,
62,
79,
51,
62,
80,
439,
60,
1303,
1081,
15140,
5929,
14174,
10088,
628,
220,
220,
220,
1303,
2142,
13174,
4610,
290,
4050,
18645,
3403,
198,
220,
220,
220,
2124,
77,
4147,
796,
1007,
3455,
7,
1424,
13,
87,
77,
4147,
58,
312,
87,
14692,
33,
33116,
1058,
12962,
58,
47715,
198,
220,
220,
220,
331,
77,
4147,
796,
1007,
3455,
7,
1424,
13,
2047,
4147,
58,
312,
87,
14692,
33,
33116,
1058,
12962,
58,
47715,
198,
220,
220,
220,
471,
33,
11,
4808,
796,
13522,
3911,
13174,
12543,
2733,
7,
87,
77,
4147,
11,
331,
77,
4147,
11,
308,
11,
374,
8873,
11,
37456,
11,
38779,
8,
220,
220,
220,
220,
198,
220,
220,
220,
275,
6359,
796,
1976,
27498,
7,
21,
1635,
1288,
82,
13,
437,
312,
87,
8,
198,
220,
220,
220,
275,
6359,
58,
16,
25,
17,
25,
21,
9,
19423,
60,
796,
471,
33,
58,
45299,
352,
60,
1303,
24530,
18645,
357,
87,
12,
42895,
8,
198,
220,
220,
220,
275,
6359,
58,
17,
25,
17,
25,
21,
9,
19423,
60,
796,
471,
33,
58,
45299,
362,
60,
1303,
24530,
18645,
357,
88,
12,
42895,
8,
198,
220,
220,
220,
275,
6359,
1635,
28,
532,
16,
1303,
770,
318,
497,
535,
274,
560,
329,
262,
826,
3280,
290,
318,
6414,
351,
16124,
341,
628,
220,
220,
220,
1303,
347,
3620,
8494,
284,
651,
1948,
4610,
198,
220,
220,
220,
471,
14822,
3911,
13174,
796,
800,
7,
4221,
8,
1635,
275,
6359,
628,
220,
220,
220,
1303,
26439,
4985,
290,
7110,
11087,
4610,
198,
220,
220,
220,
471,
3849,
1504,
785,
26908,
560,
11,
311,
3849,
1504,
785,
26908,
560,
796,
627,
2860,
8802,
41494,
7,
6649,
541,
17,
6381,
79,
41494,
11,
2124,
11,
331,
11,
1288,
82,
11,
47125,
312,
87,
439,
11,
15094,
25558,
7,
52,
14822,
3911,
13174,
58,
16,
25,
17,
25,
437,
46570,
15094,
25558,
7,
52,
14822,
3911,
13174,
58,
17,
25,
17,
25,
437,
46570,
38779,
11,
14364,
8,
198,
220,
220,
220,
471,
3849,
1504,
3911,
13174,
11,
311,
3849,
1504,
3911,
13174,
796,
13522,
3911,
13174,
12543,
2733,
7,
87,
11,
331,
11,
308,
11,
374,
8873,
11,
37456,
11,
38779,
8,
198,
220,
220,
220,
471,
796,
2488,
13,
471,
3849,
1504,
785,
26908,
560,
1343,
471,
3849,
1504,
3911,
13174,
198,
220,
220,
220,
311,
796,
2488,
13,
311,
3849,
1504,
785,
26908,
560,
1343,
311,
3849,
1504,
3911,
13174,
198,
220,
220,
220,
7110,
25747,
7,
1424,
11,
27179,
1758,
7,
87,
11,
299,
457,
82,
11,
299,
457,
82,
828,
27179,
1758,
7,
88,
11,
299,
457,
82,
11,
299,
457,
82,
828,
471,
3849,
1504,
785,
26908,
560,
11,
311,
3849,
1504,
785,
26908,
560,
11,
366,
5377,
26908,
560,
4610,
4943,
198,
220,
220,
220,
7110,
25747,
7,
1424,
11,
27179,
1758,
7,
87,
11,
299,
457,
82,
11,
299,
457,
82,
828,
27179,
1758,
7,
88,
11,
299,
457,
82,
11,
299,
457,
82,
828,
471,
3849,
1504,
3911,
13174,
11,
311,
3849,
1504,
3911,
13174,
11,
366,
7841,
13174,
4610,
4943,
198,
220,
220,
220,
7110,
25747,
7,
1424,
11,
27179,
1758,
7,
87,
11,
299,
457,
82,
11,
299,
457,
82,
828,
27179,
1758,
7,
88,
11,
299,
457,
82,
11,
299,
457,
82,
828,
471,
11,
311,
11,
366,
5377,
26908,
560,
1343,
2142,
13174,
8136,
4943,
628,
220,
220,
220,
1303,
19614,
966,
4610,
329,
3621,
15879,
7110,
198,
220,
220,
220,
299,
457,
82,
796,
838,
198,
220,
220,
220,
11677,
796,
5323,
198,
220,
220,
220,
2124,
11,
331,
796,
10201,
25928,
32590,
43,
10,
28968,
11,
532,
17,
9,
43,
10,
28968,
11,
406,
12,
28968,
11,
657,
12,
28968,
11,
299,
457,
82,
8,
198,
220,
220,
220,
471,
3849,
1504,
785,
26908,
560,
11,
311,
3849,
1504,
785,
26908,
560,
796,
627,
2860,
8802,
41494,
7,
6649,
541,
17,
6381,
79,
41494,
11,
2124,
11,
331,
11,
1288,
82,
11,
47125,
312,
87,
439,
11,
15094,
25558,
7,
52,
14822,
3911,
13174,
58,
16,
25,
17,
25,
437,
46570,
15094,
25558,
7,
52,
14822,
3911,
13174,
58,
17,
25,
17,
25,
437,
46570,
38779,
11,
14364,
8,
198,
220,
220,
220,
471,
3849,
1504,
3911,
13174,
11,
311,
3849,
1504,
3911,
13174,
796,
13522,
3911,
13174,
12543,
2733,
7,
87,
11,
331,
11,
308,
11,
374,
8873,
11,
37456,
11,
38779,
8,
198,
220,
220,
220,
471,
796,
2488,
13,
471,
3849,
1504,
785,
26908,
560,
1343,
471,
3849,
1504,
3911,
13174,
198,
220,
220,
220,
311,
796,
2488,
13,
311,
3849,
1504,
785,
26908,
560,
1343,
311,
3849,
1504,
3911,
13174,
628,
220,
220,
220,
1303,
28114,
286,
11087,
2173,
198,
220,
220,
220,
3785,
3419,
198,
220,
220,
220,
6070,
26933,
12,
49388,
11,
33028,
11,
33028,
11,
532,
49388,
4357,
25915,
2167,
405,
11,
532,
2167,
405,
11,
657,
11,
657,
60,
764,
10,
939,
405,
11,
3124,
2625,
2971,
44605,
1600,
1976,
2875,
28,
16,
8,
198,
220,
220,
220,
627,
1428,
7,
87,
58,
25,
4357,
331,
58,
25,
4083,
10,
2167,
405,
11,
471,
58,
45299,
352,
4357,
471,
58,
45299,
362,
4357,
4991,
2625,
10394,
1600,
3124,
2625,
948,
272,
1600,
5743,
8043,
2625,
74,
1600,
9493,
413,
5649,
82,
28,
15,
13,
1495,
11,
1976,
2875,
28,
940,
8,
198,
220,
220,
220,
2124,
18242,
7203,
87,
357,
76,
8,
4943,
198,
220,
220,
220,
331,
18242,
7203,
88,
357,
76,
8,
4943,
198,
220,
220,
220,
308,
6888,
22446,
2617,
62,
292,
806,
7203,
40496,
4943,
198,
437,
198,
46453,
23415,
3911,
13174,
3419,
198
] | 2.360728 | 2,032 |
module UCIData
import CSV
using CategoricalArrays
using DataDeps
using DataFrames
using DelimitedFiles
using Dates
import LegacyStrings
const DATA_DIR = joinpath(@__DIR__, "data")
include("convert.jl")
function dataset(datasetname)
dataset_path = @datadep_str datasetname
df = CSV.read("$dataset_path/data.csv", DataFrame, header=true,
typemap=Dict(Date=>String, DateTime=>String))
for name in names(df)
if name[1] == 'C'
transform!(df, name => categorical, renamecols=false)
end
end
df
end
function list_dataset_types()
filter(x -> isdir(joinpath(DATA_DIR, x)), readdir(DATA_DIR))
end
function list_datasets(datasettype)
dir = joinpath(DATA_DIR, datasettype)
datasets = filter(x -> splitext(x)[end] == ".jl", readdir(dir))
map(x -> splitext(x)[1], datasets)
end
function __init__()
for datasettype in list_dataset_types()
for dataset in list_datasets(datasettype)
include(joinpath(DATA_DIR, datasettype, "$dataset.jl"))
end
end
end
end
| [
21412,
14417,
2389,
1045,
628,
198,
11748,
44189,
198,
3500,
327,
2397,
12409,
3163,
20477,
198,
3500,
6060,
12156,
82,
198,
3500,
6060,
35439,
198,
3500,
4216,
320,
863,
25876,
198,
3500,
44712,
198,
11748,
14843,
13290,
654,
628,
198,
9979,
42865,
62,
34720,
796,
4654,
6978,
7,
31,
834,
34720,
834,
11,
366,
7890,
4943,
628,
198,
17256,
7203,
1102,
1851,
13,
20362,
4943,
628,
198,
8818,
27039,
7,
19608,
292,
316,
3672,
8,
198,
220,
27039,
62,
6978,
796,
2488,
19608,
324,
538,
62,
2536,
27039,
3672,
628,
220,
47764,
796,
44189,
13,
961,
7203,
3,
19608,
292,
316,
62,
6978,
14,
7890,
13,
40664,
1600,
6060,
19778,
11,
13639,
28,
7942,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2170,
368,
499,
28,
35,
713,
7,
10430,
14804,
10100,
11,
7536,
7575,
14804,
10100,
4008,
198,
220,
329,
1438,
287,
3891,
7,
7568,
8,
198,
220,
220,
220,
611,
1438,
58,
16,
60,
6624,
705,
34,
6,
198,
220,
220,
220,
220,
220,
6121,
0,
7,
7568,
11,
1438,
5218,
4253,
12409,
11,
36265,
4033,
82,
28,
9562,
8,
198,
220,
220,
220,
886,
198,
220,
886,
628,
220,
47764,
198,
437,
198,
198,
8818,
1351,
62,
19608,
292,
316,
62,
19199,
3419,
198,
220,
8106,
7,
87,
4613,
318,
15908,
7,
22179,
6978,
7,
26947,
62,
34720,
11,
2124,
36911,
1100,
15908,
7,
26947,
62,
34720,
4008,
198,
437,
198,
198,
8818,
1351,
62,
19608,
292,
1039,
7,
19608,
292,
316,
4906,
8,
198,
220,
26672,
796,
4654,
6978,
7,
26947,
62,
34720,
11,
27039,
4906,
8,
198,
220,
40522,
796,
8106,
7,
87,
4613,
4328,
578,
742,
7,
87,
38381,
437,
60,
6624,
27071,
20362,
1600,
1100,
15908,
7,
15908,
4008,
198,
220,
3975,
7,
87,
4613,
4328,
578,
742,
7,
87,
38381,
16,
4357,
40522,
8,
198,
437,
198,
198,
8818,
11593,
15003,
834,
3419,
198,
220,
329,
27039,
4906,
287,
1351,
62,
19608,
292,
316,
62,
19199,
3419,
198,
220,
220,
220,
329,
27039,
287,
1351,
62,
19608,
292,
1039,
7,
19608,
292,
316,
4906,
8,
198,
220,
220,
220,
220,
220,
2291,
7,
22179,
6978,
7,
26947,
62,
34720,
11,
27039,
4906,
11,
17971,
19608,
292,
316,
13,
20362,
48774,
198,
220,
220,
220,
886,
198,
220,
886,
198,
437,
628,
198,
437,
198
] | 2.603581 | 391 |
"""
similar_rxns(model::MetNet, iders = eachindex(model.rxns); verbose = true)
Findall the reaction that transforms the same elements
if we define: r1 = 2A -> 2B, r2 = B <-> A, r3 = A <- B, r4 = A + B ->
the method will returns [[r1, r2, r3]]
This method only use the information in the binary S.
Bounds are not relevant either.
"""
function similar_rxns(model::MetNet,
iders = eachindex(model.rxns); verbose = true)
idxs = [rxnindex(model, ider) for ider in iders]
# collecting react and prods hashs
# (prods_hash, react_hash) => reaction idxs
# (react_hash, prods_hash) => reaction idxs
hash_table = Dict{Tuple{UInt64,UInt64}, Vector{Int}}()
for rxni in idxs
rhash = hash(Set(rxn_reacts(model, rxni)))
phash = hash(Set(rxn_prods(model, rxni)))
rxnis = get!(hash_table, (rhash, phash), Int[])
push!(rxnis, rxni)
end
# Form pairs
similars = Vector{Vector{Int}}()
for (fkey, frxnis) in hash_table
bkey = fkey |> reverse
brxnis = get(hash_table, bkey, Int[])
sims_ = union(frxnis, brxnis)
length(sims_) > 1 && push!(similars, sims_)
# deleting
delete!(hash_table, fkey)
delete!(hash_table, bkey)
end
if verbose
for rxnis in similars
println("Similars ", length(rxnis))
for rxni in rxnis
println(model.rxns[rxni], " [", rxni, "]: ", rxn_str(model, rxni))
end
println()
end
end
return similars
end
| [
37811,
198,
220,
220,
220,
2092,
62,
40914,
5907,
7,
19849,
3712,
9171,
7934,
11,
220,
4157,
796,
1123,
9630,
7,
19849,
13,
40914,
5907,
1776,
15942,
577,
796,
2081,
8,
198,
198,
16742,
439,
262,
6317,
326,
31408,
262,
976,
4847,
198,
361,
356,
8160,
25,
374,
16,
796,
362,
32,
4613,
362,
33,
11,
374,
17,
796,
347,
1279,
3784,
317,
11,
374,
18,
796,
317,
24293,
347,
11,
374,
19,
796,
317,
1343,
347,
4613,
220,
198,
1169,
2446,
481,
5860,
16410,
81,
16,
11,
374,
17,
11,
374,
18,
11907,
198,
1212,
2446,
691,
779,
262,
1321,
287,
262,
13934,
311,
13,
220,
198,
33,
3733,
389,
407,
5981,
2035,
13,
198,
198,
37811,
198,
8818,
2092,
62,
40914,
5907,
7,
19849,
3712,
9171,
7934,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
4157,
796,
1123,
9630,
7,
19849,
13,
40914,
5907,
1776,
15942,
577,
796,
2081,
8,
628,
220,
220,
220,
4686,
34223,
796,
685,
40914,
77,
9630,
7,
19849,
11,
220,
1304,
8,
329,
220,
1304,
287,
220,
4157,
60,
198,
220,
220,
220,
1303,
13157,
6324,
290,
386,
9310,
468,
11994,
198,
220,
220,
220,
1303,
357,
1676,
9310,
62,
17831,
11,
6324,
62,
17831,
8,
5218,
6317,
4686,
34223,
198,
220,
220,
220,
1303,
357,
45018,
62,
17831,
11,
386,
9310,
62,
17831,
8,
5218,
6317,
4686,
34223,
198,
220,
220,
220,
12234,
62,
11487,
796,
360,
713,
90,
51,
29291,
90,
52,
5317,
2414,
11,
52,
5317,
2414,
5512,
20650,
90,
5317,
11709,
3419,
198,
220,
220,
220,
329,
374,
87,
8461,
287,
4686,
34223,
198,
220,
220,
220,
220,
220,
220,
220,
9529,
1077,
796,
12234,
7,
7248,
7,
40914,
77,
62,
260,
8656,
7,
19849,
11,
374,
87,
8461,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
872,
1077,
796,
12234,
7,
7248,
7,
40914,
77,
62,
1676,
9310,
7,
19849,
11,
374,
87,
8461,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
374,
87,
21361,
796,
651,
0,
7,
17831,
62,
11487,
11,
357,
17179,
1077,
11,
872,
1077,
828,
2558,
58,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
40914,
21361,
11,
374,
87,
8461,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1303,
5178,
14729,
198,
220,
220,
220,
985,
346,
945,
796,
20650,
90,
38469,
90,
5317,
11709,
3419,
198,
220,
220,
220,
329,
357,
69,
2539,
11,
1216,
87,
21361,
8,
287,
12234,
62,
11487,
628,
220,
220,
220,
220,
220,
220,
220,
275,
2539,
796,
277,
2539,
930,
29,
9575,
198,
220,
220,
220,
220,
220,
220,
220,
865,
87,
21361,
796,
651,
7,
17831,
62,
11487,
11,
275,
2539,
11,
2558,
58,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
985,
82,
62,
796,
6441,
7,
8310,
87,
21361,
11,
865,
87,
21361,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4129,
7,
82,
12078,
62,
8,
1875,
352,
11405,
4574,
0,
7,
14323,
346,
945,
11,
985,
82,
62,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
34817,
198,
220,
220,
220,
220,
220,
220,
220,
12233,
0,
7,
17831,
62,
11487,
11,
277,
2539,
8,
198,
220,
220,
220,
220,
220,
220,
220,
12233,
0,
7,
17831,
62,
11487,
11,
275,
2539,
8,
628,
220,
220,
220,
886,
628,
220,
220,
220,
611,
15942,
577,
198,
220,
220,
220,
220,
220,
220,
220,
329,
374,
87,
21361,
287,
985,
346,
945,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
8890,
346,
945,
33172,
4129,
7,
40914,
21361,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
374,
87,
8461,
287,
374,
87,
21361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44872,
7,
19849,
13,
40914,
5907,
58,
40914,
8461,
4357,
366,
685,
1600,
374,
87,
8461,
11,
366,
5974,
33172,
374,
87,
77,
62,
2536,
7,
19849,
11,
374,
87,
8461,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44872,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
985,
346,
945,
198,
437,
628
] | 2.146036 | 719 |
module AdjacentFloat
!isdefined(Float) && typealias Float AbstractFloat;
export prevFloat, nextFloat, nFloatsSeparate, nextNearerToZero, nextAwayFromZero
include("adjacentFloats.jl")
end # module
| [
21412,
1215,
73,
12643,
43879,
198,
198,
0,
271,
23211,
7,
43879,
8,
11405,
2099,
26011,
48436,
27741,
43879,
26,
198,
198,
39344,
8654,
43879,
11,
1306,
43879,
11,
299,
33574,
1381,
19117,
30748,
11,
1306,
8199,
11258,
2514,
28667,
11,
1306,
32,
1014,
4863,
28667,
198,
198,
17256,
7203,
41255,
12643,
33574,
1381,
13,
20362,
4943,
198,
198,
437,
1303,
8265,
198
] | 3.174603 | 63 |
using DataFrames
using CSV
using SparseArrays
"""
admittance_matrices(nodes, lines, harmonics)
Build the nodal admittance matrices (admittance laplacian) for all harmonics.
Admittance scales with frequency: X_h = X_f * h. Return a dictionary of DataFrames.
"""
function admittance_matrices(net, harmonics)
LY = Dict()
for h in harmonics
LY[h] = spzeros(ComplexF64, net.n, net.n)
# non-diagonal elements
for line in eachrow(net.lines)
LY[h][line.fromID, line.toID] = -1/(line.R + 1im*line.X*h)
# nodal admittance matrix is assumed to be symmetric
LY[h][line.toID, line.fromID] = -1/(line.R + 1im*line.X*h)
end
# diagonal elements
for i in 1:net.n
# node shunt admittances only for harmonic frequencies
if net.nodes.X_sh[i] > 0 && h != 1
LY[h][i, i] = -sum(LY[h][i, :]) + 1/(1im*net.nodes.X_sh[i]*h)
else
LY[h][i, i] = -sum(LY[h][i, :])
end
# Adding shunt admittances for each pi-model line connected to node i
for line in eachrow(net.lines)
# check if line is connected to node i
if line.fromID == i || line.toID == i
LY[h][i, i] = LY[h][i, i] +
(line.G + 1im*h*line.B)/2
end
end
end
end
return LY
end
"""
init_voltages(nodes, settings)
Initialize voltages for all nodes and harmonics using guesses from on `Settings`.
"""
function init_voltages(nodes, settings)
u = Dict()
for h in settings.harmonics
if h == 1
u[h] = DataFrame(
v = ones(size(nodes, 1))*settings.v_f,
ϕ = ones(size(nodes, 1))*settings.ϕ_f
)
else
u[h] = DataFrame(
v = ones(size(nodes, 1))*settings.v_h,
ϕ = ones(size(nodes, 1))*settings.ϕ_h
)
end
end
return u
end
"""
fund_state_vec(net, u)
Take the voltage DataFrame `u` and return a vector of voltage phases and magnitudes.
"""
function fund_state_vec(net, u)
xϕ = u[1].ϕ[2:end]
xv = u[1].v[(net.c+1):end]
vcat(xϕ, xv)
end
"""
fund_mismatch(net, u, LY)
Evaluate active and reactive power mismatch at fundamental frequency.
"""
function fund_mismatch(net, u, LY)
LY_1 = LY[1]
u_1 = u[1].v .* exp.(1im*u[1].ϕ)
s = (net.nodes.P + 1im*net.nodes.Q)
mismatch = u_1 .* conj(LY_1*u_1) + s
f = vcat(real(mismatch[2:end]), imag(mismatch[(net.c+1):end]))
err = maximum(abs.(f))
return f, err
end
"""
fund_jacobian(net, u, LY)
Construct fundamental Jacobian, containing powers derived wrt voltages.
"""
function fund_jacobian(net, u, LY)
# helpful definitions for Jacobian construction
u_1 = u[1].v .* exp.(1im*u[1].ϕ)
i_diag = spdiagm(sparse(LY[1] * u_1))
u_1_diag = spdiagm(u_1)
u_1_diag_norm = spdiagm(u_1./abs.(u_1))
# complex power mismatch derivatives
dSdϕ = 1im*u_1_diag*conj(i_diag - LY[1]*u_1_diag)
dSdv = u_1_diag_norm*conj(i_diag) + u_1_diag*conj(LY[1]*u_1_diag_norm)
# divide sub-matrices into real and imag part, cut off slack
dPdϕ = real(dSdϕ[2:end, 2:end])
dPdv = real(dSdv[2:end, (net.c+1):end])
dQdϕ = imag(dSdϕ[(net.c+1):end, 2:end])
dQdv = imag(dSdv[(net.c+1):end, (net.c+1):end])
vcat(hcat(dPdϕ, dPdv),
hcat(dQdϕ, dQdv))
end
"""
update_state_vec!(J, x, f)
Perform Newton-Raphson iteration and update the fundamental state vector.
"""
function update_state_vec!(J, x, f)
x - J\f
end
"""
update_fund_voltages!(net, u, x)
Write new voltages from `x` to `u`.
"""
function update_fund_voltages!(net, u, x)
u[1].ϕ[2:end] = x[1:(net.n-1)]
u[1].v[(net.c+1):end] = x[net.n:end]
return u
end
"""
pf(net, settings, LY, plt_convergence = false)
Perform fundamental power flow, iterate until mismatch is smaller than threshold.
"""
function pf(net, settings, LY, plt_convergence = false)
# initialization
u = init_voltages(net.nodes, settings)
x_f = fund_state_vec(net, u)
f_f, err_f = fund_mismatch(net, u, LY)
n_iter_f = 0
err_f_t = Dict()
while err_f > settings.thresh_f && n_iter_f <= settings.max_iter_f
J_f = fund_jacobian(net, u, LY)
x_f = update_state_vec!(J_f, x_f, f_f)
u = update_fund_voltages!(net, u, x_f)
f_f, err_f = fund_mismatch(net, u, LY)
err_f_t[n_iter_f] = err_f # currently not returned
n_iter_f += 1
end
println(u[1])
if n_iter_f < settings.max_iter_f
println("Fundamental power flow converged after ", n_iter_f,
" iterations (err < ", settings.thresh_f, ").")
elseif n_iter_f == settings.max_iter_f
println("Maximum of ", n_iter_f, " iterations reached.")
end
return u
end
# Harmonic Power Flow functions
"""
import_Norton_Equivalents(nodes, settings, folder_path="devices\\")
Import NE parameters for all nonlinear devices in nodes from folder devices."""
function import_Norton_Equivalents(nodes, settings, folder_path="devices\\")
NE = Dict()
nl_components = unique(nodes[nodes.type .== "nonlinear", "component"])
for device in nl_components
NE_df = CSV.read(folder_path * device * "_NE.csv", DataFrame)
# transform to Complex type, enough to strip first paranthesis for successful parse
vals = mapcols!(col -> parse.(ComplexF64, strip.(col, ['('])), NE_df[:, 3:end])
NE_device = hcat(NE_df[:,1:2], vals)
# filter columns for considered harmonics
NE_device = NE_device[:, Between(begin, string(maximum(settings.harmonics)*settings.base_frequency))]
# change to pu system and choose if coupled
if settings.coupled
if maximum(settings.harmonics) != Int(parse(Int, names(NE_df)[end])/settings.base_frequency)
println("Warning! Inprecise results expected, as coupled method is being used but not the full spectrum taken into account.")
end
I_N = Array(NE_device[NE_device.Parameter .== "I_N_c", 3:end])/settings.base_current
LY_N_full = NE_device[NE_device.Parameter .== "Y_N_c", 2:end]
LY_N = Array(LY_N_full[LY_N_full.Frequency .<= maximum(settings.harmonics)*settings.base_frequency, 2:end])/settings.base_admittance
else
I_N = Array(NE_device[NE_device.Parameter .== "I_N_uc", 3:end])/settings.base_current
LY_N = Array(NE_device[NE_device.Parameter .== "Y_N_uc", 3:end])/settings.base_admittance
end
NE[device] = [I_N, LY_N]
end
return NE
end
"""
current_injections(nodes, nodeID, u, NE, harmonics)
Calculate the harmonic current injections at one node.
Uses coupled or uncoupled method based on dimensions of NE."""
function current_injections(nodes, nodeID, u, NE, harmonics)
component = nodes[nodes.ID .== nodeID, "component"][1]
I_N, LY_N = NE[component]
# u as dict of dfs makes building this vector a bit complicated
u_h = vcat([u[h][nodeID, "v"] .* exp.(1im*u[h][nodeID, "ϕ"]) for h in harmonics]...)
# coupled: Y_N is a matrix, uncoupled: vector
if size(LY_N)[1] > 1 # coupled case
i_inj = vec(I_N) - vec(LY_N*u_h)
else # uncoupled case
i_inj = vec(I_N) - spdiagm(vec(LY_N))*u_h
end
return i_inj
end
"""
current_balance(net, settings, u, LY, NE)
Evaluate current balance at all nodes and frequencies, except linear nodes at fundamental frequency.
"""
function current_balance(net, settings, u, LY, NE)
# fundamental admittance matrix for nonlinear nodes
LY_1_nl = LY[1][net.m:end,:]
u_1 = u[1].v .* exp.(1im*u[1].ϕ)
# fundamental line currents at nonlinear nodes
dI_1 = LY_1_nl * u_1
# harmonic admittance matrices as diagonal block matrix
LY_h = blockdiag([LY[h] for h in settings.harmonics[2:end]]...)
u_h = vcat([u[h][:, "v"] .* exp.(1im*u[h][:, "ϕ"]) for h in settings.harmonics[2:end]]...)
dI_h = LY_h * u_h
# subtract the injected currents at each nonlinear node i
for i in net.m:net.n
i_inj = current_injections(net.nodes, net.nodes.ID[i], u, NE, settings.harmonics)
dI_1[i-net.m+1] += i_inj[1] # add injections at fundamental frequency...
# ... and at all harmonic frequencies
for p in 0:(settings.K-1)
dI_h[p*net.n + i] += i_inj[p+2]
end
end
vcat(dI_1, dI_h)
end
"""
harmonic_mismatch(net, settings, u, LY, NE)
Combine current and power mismatch to construct harmonic mismatch vector `f`.
"""
function harmonic_mismatch(net, settings, u, LY, NE)
# fundamental power mismatch at linear nodes except slack
s = net.nodes.P[2:(net.m-1)] + 1im*net.nodes.Q[2:(net.m-1)]
u_i = u[1][2:(net.m-1), "v"].*exp.(1im*u[1][2:(net.m-1), "ϕ"])
u_j = u[1][:, "v"].*exp.(1im*u[1][:, "ϕ"])
LY_ij = LY[1][2:(net.m-1), :]
# power balance
sl = u_i.*conj(LY_ij*u_j)
ds = s + sl
di = current_balance(net, settings, u, LY, NE)
# harmonic mismatch vector
f_c = vcat(ds, di)
f = vcat(real(f_c), imag(f_c[(net.c):end])) # crop PV nodes
err_h = maximum(abs.(f))
return f, err_h
end
"""
harmonic_state_vec(net, u, harmonics)
Construct harmonic state vector `x` from fundamental and harmonic voltages.
"""
function harmonic_state_vec(net, u, harmonics)
# fundamental voltages, crop slack and magnitude for PV nodes
xϕ = u[1].ϕ[2:end]
xv = u[1].v[(net.c+1):end]
# all voltages and angles at all harmonic frequencies
for h in harmonics[2:end]
xϕ = vcat(xϕ, u[h].ϕ)
xv = vcat(xv, u[h].v)
end
vcat(xϕ, xv)
end
"""
build_harmonic_jacobian(net, settings, u, LY, NE)
Construct harmonic Jacobian `J` containing all derivatives of power and current mismatches wrt voltages from harmonic state vector.
"""
function build_harmonic_jacobian(net, settings, u, LY, NE)
m = net.m
n = net.n
c = net.c
K = settings.K
# helpful definitions for Jacobian construction
u_vec = vcat([u[h].v .* exp.(1im*u[h].ϕ) for h in settings.harmonics]...)
v_vec = vcat([u[h].v for h in settings.harmonics]...)
u_diag = spdiagm(u_vec)
u_norm = u_vec./v_vec
u_norm_diag = spdiagm(u_norm)
LY_diag = blockdiag([LY[h] for h in settings.harmonics]...)
# construct Jacobian sub-matrices
dIdv = LY_diag*u_norm_diag
dIdϕ = 1im*LY_diag*u_diag
# indices of first nonlinear node at each harmonic
nl_idx_start = m:n:n*(K+1)
nl_idx_all = vcat([nl:(nl+n-m) for nl in nl_idx_start]...)
u_nl = u_vec[nl_idx_all]
v_nl = v_vec[nl_idx_all]
u_nl_norm = u_nl./v_nl
if settings.coupled
# iterating through blocks vertically
for h in 0:K
# ... and horizontally
for p in 0:K
# iterating through nonlinear nodes
for i in m:n
# within NE "[2]" points to LY_N
LY_N = NE[net.nodes.component[i]][2]
# subtract derived current injections at respective idx
dIdv[h*n+i, p*n+i] -= LY_N[h+1, p+1]*u_nl_norm[(i-m+1)+p*(n-m+1)]
dIdϕ[h*n+i, p*n+i] -= 1im*LY_N[h+1, p+1]*u_nl[(i-m+1)+p*(n-m+1)]
end
end
end
else
# iterating through blocks diagonally (p=h)
for h in 0:K
for i in m:n
# LY_N is one-dimensional in the uncoupled case
LY_N = NE[net.nodes.component[i]][2]
dIdv[h*n+i, h*n+i] -= LY_N[h+1]*u_nl_norm[(i-m+1)+h*(n-m+1)]
dIdϕ[h*n+i, h*n+i] -= 1im*LY_N[h+1]*u_nl[(i-m+1)+h*(n-m+1)]
end
end
end
# crop slack and PV nodes
dIdϕ = dIdϕ[m:end, 2:end]
dIdv = dIdv[m:end, (c+1):end]
# helpful definitions for dS construction
LY_1 = LY[1]
u_1 = u[1].v .* exp.(1im*u[1].ϕ)
i_diag = spdiagm(LY_1*u_1)
u_diag = spdiagm(u_1)
u_diag_norm = spdiagm(u_1./abs.(u_1))
# fundamental powers derived wrt to voltage phase and magnitude
dS1dϕ1 = 1im*u_diag*(conj(i_diag - LY_1*u_diag))
dS1dv1 = u_diag_norm*conj(i_diag) + u_diag*conj(LY_1*u_diag_norm)
# only fundamental power derivatives are non-zero
dSdϕ = hcat(dS1dϕ1, zeros(n, n*K))
dSdv = hcat(dS1dv1, zeros(n, n*K))
# crop slack and PV nodes from power derivatives
dPdϕ = real(dSdϕ[2:(m-1), 2:end])
dPdv = real(dSdv[2:(m-1), (c+1):end])
dQdϕ = imag(dSdϕ[(c+1):(m-1), 2:end])
dQdv = imag(dSdv[(c+1):(m-1), (c+1):end])
# combine all sub-matrices and return complete Jacobian
vcat(hcat(dPdϕ, dPdv),
hcat(real(dIdϕ), real(dIdv)),
hcat(dQdϕ, dQdv),
hcat(imag(dIdϕ), imag(dIdv)))
end
"""
update_fund_voltages!(net, u, x, settings)
Write new voltages from `x` to `u` for all harmonics.
"""
function update_harmonic_voltages!(net, u, x, settings)
n = net.n
c = net.c
# slice x to separate voltage magnitude and phase
xϕ = x[1:(n*settings.K1-1)]
xv = x[n*settings.K1:end]
# xϕ = xϕ .% (2*π) # ensure phase smaller 2π, not really necessary
# update fundamental voltages
u[1].ϕ[2:end] = xϕ[1:(n-1)]
u[1].v[(c+1):end] = xv[1:(n-c)]
# crop slack and PV nodes
xϕ_h = xϕ[n:end]
xv_h = xv[(n-c+1):end]
for h in settings.harmonics[2:end]
# enumerate harmonics for easier indexing
i = findall(settings.harmonics[2:end] .== h)[1] - 1
u[h].ϕ = xϕ_h[(i*n+1):(i*n+n)]
u[h].v = xv_h[(i*n+1):(i*n+n)]
end
return u
end
"""
hpf(net, settings)
Solve the harmonic power flow problem for a given `PowerGrid` and `Settings`."""
function hpf(net, settings)
LY = admittance_matrices(net, settings.harmonics)
u = pf(net, settings, LY)
NE = import_Norton_Equivalents(net.nodes, settings)
f, err_h = harmonic_mismatch(net, settings, u, LY, NE)
x = harmonic_state_vec(net, u, settings.harmonics)
n_iter_h = 0
err_h_t = Dict()
while err_h > settings.thresh_h && n_iter_h < settings.max_iter_h
J = build_harmonic_jacobian(net, settings, u, LY, NE)
x = update_state_vec!(J, x, f)
u = update_harmonic_voltages!(net, u, x, settings)
f, err_h = harmonic_mismatch(net, settings, u, LY, NE)
err_h_t[n_iter_h] = err_h
n_iter_h += 1
end
# getting rid of negative voltage magnitudes:
for h in settings.harmonics
u[h].ϕ[u[h].v .< 0] .+= π
u[h].ϕ .= u[h].ϕ .% (2*π)
u[h].v[u[h].v .< 0] = -u[h].v[u[h].v .< 0]
end
if n_iter_h < settings.max_iter_h
println("Harmonic power flow converged after ", n_iter_h,
" iterations (err < ", settings.thresh_h, ").")
elseif n_iter_h == settings.max_iter_h
println("Maximum of ", n_iter_h, " iterations reached. Harmonic power flow did not converge.")
end
return u, err_h_t, n_iter_h
end | [
3500,
6060,
35439,
198,
3500,
44189,
198,
3500,
1338,
17208,
3163,
20477,
628,
198,
37811,
198,
220,
220,
220,
6178,
47912,
62,
6759,
45977,
7,
77,
4147,
11,
3951,
11,
25625,
873,
8,
198,
198,
15580,
262,
18666,
282,
6178,
47912,
2603,
45977,
357,
324,
20124,
590,
8591,
489,
330,
666,
8,
329,
477,
25625,
873,
13,
220,
198,
198,
2782,
20124,
590,
16252,
351,
8373,
25,
1395,
62,
71,
796,
1395,
62,
69,
1635,
289,
13,
8229,
257,
22155,
286,
6060,
35439,
13,
198,
37811,
198,
8818,
6178,
47912,
62,
6759,
45977,
7,
3262,
11,
25625,
873,
8,
198,
220,
220,
220,
406,
56,
796,
360,
713,
3419,
198,
220,
220,
220,
329,
289,
287,
25625,
873,
198,
220,
220,
220,
220,
220,
220,
220,
406,
56,
58,
71,
60,
796,
599,
9107,
418,
7,
5377,
11141,
37,
2414,
11,
2010,
13,
77,
11,
2010,
13,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1729,
12,
10989,
27923,
4847,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
1123,
808,
7,
3262,
13,
6615,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
58,
71,
7131,
1370,
13,
6738,
2389,
11,
1627,
13,
1462,
2389,
60,
796,
532,
16,
29006,
1370,
13,
49,
1343,
352,
320,
9,
1370,
13,
55,
9,
71,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18666,
282,
6178,
47912,
17593,
318,
9672,
284,
307,
23606,
19482,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
58,
71,
7131,
1370,
13,
1462,
2389,
11,
1627,
13,
6738,
2389,
60,
796,
532,
16,
29006,
1370,
13,
49,
1343,
352,
320,
9,
1370,
13,
55,
9,
71,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
40039,
4847,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
352,
25,
3262,
13,
77,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10139,
427,
2797,
6178,
715,
1817,
691,
329,
49239,
19998,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2010,
13,
77,
4147,
13,
55,
62,
1477,
58,
72,
60,
1875,
657,
11405,
289,
14512,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
58,
71,
7131,
72,
11,
1312,
60,
796,
532,
16345,
7,
11319,
58,
71,
7131,
72,
11,
1058,
12962,
1343,
352,
29006,
16,
320,
9,
3262,
13,
77,
4147,
13,
55,
62,
1477,
58,
72,
60,
9,
71,
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,
406,
56,
58,
71,
7131,
72,
11,
1312,
60,
796,
532,
16345,
7,
11319,
58,
71,
7131,
72,
11,
1058,
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,
1303,
18247,
427,
2797,
6178,
715,
1817,
329,
1123,
31028,
12,
19849,
1627,
5884,
284,
10139,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
1123,
808,
7,
3262,
13,
6615,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
611,
1627,
318,
5884,
284,
10139,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
6738,
2389,
6624,
1312,
8614,
1627,
13,
1462,
2389,
6624,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
58,
71,
7131,
72,
11,
1312,
60,
796,
406,
56,
58,
71,
7131,
72,
11,
1312,
60,
1343,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
1370,
13,
38,
1343,
352,
320,
9,
71,
9,
1370,
13,
33,
20679,
17,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
406,
56,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
2315,
62,
37764,
1095,
7,
77,
4147,
11,
6460,
8,
198,
198,
24243,
1096,
13161,
1095,
329,
477,
13760,
290,
25625,
873,
1262,
44774,
422,
319,
4600,
26232,
44646,
198,
37811,
198,
8818,
2315,
62,
37764,
1095,
7,
77,
4147,
11,
6460,
8,
198,
220,
220,
220,
334,
796,
360,
713,
3419,
198,
220,
220,
220,
329,
289,
287,
6460,
13,
29155,
38530,
198,
220,
220,
220,
220,
220,
220,
220,
611,
289,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
60,
796,
6060,
19778,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
796,
3392,
7,
7857,
7,
77,
4147,
11,
352,
4008,
9,
33692,
13,
85,
62,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18074,
243,
796,
3392,
7,
7857,
7,
77,
4147,
11,
352,
4008,
9,
33692,
13,
139,
243,
62,
69,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
60,
796,
6060,
19778,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
796,
3392,
7,
7857,
7,
77,
4147,
11,
352,
4008,
9,
33692,
13,
85,
62,
71,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18074,
243,
796,
3392,
7,
7857,
7,
77,
4147,
11,
352,
4008,
9,
33692,
13,
139,
243,
62,
71,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
334,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
1814,
62,
5219,
62,
35138,
7,
3262,
11,
334,
8,
198,
198,
12322,
262,
15004,
6060,
19778,
4600,
84,
63,
290,
1441,
257,
15879,
286,
15004,
21164,
290,
7842,
10455,
13,
198,
37811,
198,
8818,
1814,
62,
5219,
62,
35138,
7,
3262,
11,
334,
8,
198,
220,
220,
220,
2124,
139,
243,
796,
334,
58,
16,
4083,
139,
243,
58,
17,
25,
437,
60,
198,
220,
220,
220,
2124,
85,
796,
334,
58,
16,
4083,
85,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
60,
198,
220,
220,
220,
410,
9246,
7,
87,
139,
243,
11,
2124,
85,
8,
220,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
1814,
62,
76,
1042,
963,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
198,
36,
2100,
4985,
4075,
290,
32242,
1176,
46318,
379,
7531,
8373,
13,
198,
37811,
198,
8818,
1814,
62,
76,
1042,
963,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
220,
220,
220,
406,
56,
62,
16,
796,
406,
56,
58,
16,
60,
198,
220,
220,
220,
334,
62,
16,
796,
334,
58,
16,
4083,
85,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
16,
4083,
139,
243,
8,
198,
220,
220,
220,
264,
796,
357,
3262,
13,
77,
4147,
13,
47,
1343,
352,
320,
9,
3262,
13,
77,
4147,
13,
48,
8,
198,
220,
220,
220,
46318,
796,
334,
62,
16,
764,
9,
11644,
7,
11319,
62,
16,
9,
84,
62,
16,
8,
1343,
264,
198,
220,
220,
220,
277,
796,
410,
9246,
7,
5305,
7,
76,
1042,
963,
58,
17,
25,
437,
46570,
3590,
7,
76,
1042,
963,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
60,
4008,
198,
220,
220,
220,
11454,
796,
5415,
7,
8937,
12195,
69,
4008,
198,
220,
220,
220,
1441,
277,
11,
11454,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
1814,
62,
30482,
672,
666,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
198,
42316,
7531,
12806,
666,
11,
7268,
5635,
10944,
1319,
83,
13161,
1095,
13,
198,
37811,
198,
8818,
1814,
62,
30482,
672,
666,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
220,
220,
220,
1303,
7613,
17336,
329,
12806,
666,
5103,
198,
220,
220,
220,
334,
62,
16,
796,
334,
58,
16,
4083,
85,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
16,
4083,
139,
243,
8,
198,
220,
220,
220,
1312,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
82,
29572,
7,
11319,
58,
16,
60,
1635,
334,
62,
16,
4008,
198,
220,
220,
220,
334,
62,
16,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
84,
62,
16,
8,
198,
220,
220,
220,
334,
62,
16,
62,
10989,
363,
62,
27237,
796,
599,
10989,
363,
76,
7,
84,
62,
16,
19571,
8937,
12195,
84,
62,
16,
4008,
628,
220,
220,
220,
1303,
3716,
1176,
46318,
28486,
198,
220,
220,
220,
288,
50,
67,
139,
243,
796,
352,
320,
9,
84,
62,
16,
62,
10989,
363,
9,
1102,
73,
7,
72,
62,
10989,
363,
532,
406,
56,
58,
16,
60,
9,
84,
62,
16,
62,
10989,
363,
8,
198,
220,
220,
220,
288,
50,
67,
85,
796,
334,
62,
16,
62,
10989,
363,
62,
27237,
9,
1102,
73,
7,
72,
62,
10989,
363,
8,
1343,
334,
62,
16,
62,
10989,
363,
9,
1102,
73,
7,
11319,
58,
16,
60,
9,
84,
62,
16,
62,
10989,
363,
62,
27237,
8,
628,
220,
220,
220,
1303,
14083,
850,
12,
6759,
45977,
656,
1103,
290,
3590,
636,
11,
2005,
572,
30740,
198,
220,
220,
220,
288,
47,
67,
139,
243,
796,
1103,
7,
67,
50,
67,
139,
243,
58,
17,
25,
437,
11,
362,
25,
437,
12962,
198,
220,
220,
220,
288,
47,
67,
85,
796,
1103,
7,
67,
50,
67,
85,
58,
17,
25,
437,
11,
357,
3262,
13,
66,
10,
16,
2599,
437,
12962,
198,
220,
220,
220,
288,
48,
67,
139,
243,
796,
3590,
7,
67,
50,
67,
139,
243,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
11,
362,
25,
437,
12962,
198,
220,
220,
220,
288,
48,
67,
85,
796,
3590,
7,
67,
50,
67,
85,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
11,
357,
3262,
13,
66,
10,
16,
2599,
437,
12962,
628,
220,
220,
220,
410,
9246,
7,
71,
9246,
7,
67,
47,
67,
139,
243,
11,
288,
47,
67,
85,
828,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
289,
9246,
7,
67,
48,
67,
139,
243,
11,
288,
48,
67,
85,
4008,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
4296,
62,
5219,
62,
35138,
0,
7,
41,
11,
2124,
11,
277,
8,
198,
198,
5990,
687,
17321,
12,
49,
6570,
1559,
24415,
290,
4296,
262,
7531,
1181,
15879,
13,
198,
37811,
198,
8818,
4296,
62,
5219,
62,
35138,
0,
7,
41,
11,
2124,
11,
277,
8,
198,
220,
220,
220,
2124,
532,
449,
59,
69,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
4296,
62,
10990,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
8,
198,
198,
16594,
649,
13161,
1095,
422,
4600,
87,
63,
284,
4600,
84,
44646,
198,
37811,
198,
8818,
4296,
62,
10990,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
8,
198,
220,
220,
220,
334,
58,
16,
4083,
139,
243,
58,
17,
25,
437,
60,
796,
2124,
58,
16,
37498,
3262,
13,
77,
12,
16,
15437,
198,
220,
220,
220,
334,
58,
16,
4083,
85,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
60,
796,
2124,
58,
3262,
13,
77,
25,
437,
60,
198,
220,
220,
220,
1441,
334,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
279,
69,
7,
3262,
11,
6460,
11,
406,
56,
11,
458,
83,
62,
1102,
332,
12745,
796,
3991,
8,
198,
198,
5990,
687,
7531,
1176,
5202,
11,
11629,
378,
1566,
46318,
318,
4833,
621,
11387,
13,
198,
37811,
198,
8818,
279,
69,
7,
3262,
11,
6460,
11,
406,
56,
11,
458,
83,
62,
1102,
332,
12745,
796,
3991,
8,
198,
220,
220,
220,
1303,
37588,
198,
220,
220,
220,
334,
796,
2315,
62,
37764,
1095,
7,
3262,
13,
77,
4147,
11,
6460,
8,
198,
220,
220,
220,
2124,
62,
69,
796,
1814,
62,
5219,
62,
35138,
7,
3262,
11,
334,
8,
198,
220,
220,
220,
277,
62,
69,
11,
11454,
62,
69,
796,
1814,
62,
76,
1042,
963,
7,
3262,
11,
334,
11,
406,
56,
8,
628,
220,
220,
220,
299,
62,
2676,
62,
69,
796,
657,
198,
220,
220,
220,
11454,
62,
69,
62,
83,
796,
360,
713,
3419,
198,
220,
220,
220,
981,
11454,
62,
69,
1875,
6460,
13,
400,
3447,
62,
69,
11405,
299,
62,
2676,
62,
69,
19841,
6460,
13,
9806,
62,
2676,
62,
69,
198,
220,
220,
220,
220,
220,
220,
220,
449,
62,
69,
796,
1814,
62,
30482,
672,
666,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
62,
69,
796,
4296,
62,
5219,
62,
35138,
0,
7,
41,
62,
69,
11,
2124,
62,
69,
11,
277,
62,
69,
8,
198,
220,
220,
220,
220,
220,
220,
220,
334,
796,
4296,
62,
10990,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
62,
69,
8,
198,
220,
220,
220,
220,
220,
220,
220,
277,
62,
69,
11,
11454,
62,
69,
796,
1814,
62,
76,
1042,
963,
7,
3262,
11,
334,
11,
406,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
11454,
62,
69,
62,
83,
58,
77,
62,
2676,
62,
69,
60,
796,
11454,
62,
69,
220,
1303,
3058,
407,
4504,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
2676,
62,
69,
15853,
352,
198,
220,
220,
220,
886,
628,
220,
220,
220,
44872,
7,
84,
58,
16,
12962,
198,
220,
220,
220,
611,
299,
62,
2676,
62,
69,
1279,
6460,
13,
9806,
62,
2676,
62,
69,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
24553,
6860,
1176,
5202,
6718,
2004,
706,
33172,
299,
62,
2676,
62,
69,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
34820,
357,
8056,
1279,
33172,
6460,
13,
400,
3447,
62,
69,
11,
366,
8,
19570,
198,
220,
220,
220,
2073,
361,
299,
62,
2676,
62,
69,
6624,
6460,
13,
9806,
62,
2676,
62,
69,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
40541,
286,
33172,
299,
62,
2676,
62,
69,
11,
366,
34820,
4251,
19570,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
334,
198,
437,
628,
198,
2,
17925,
9229,
4333,
27782,
5499,
198,
37811,
198,
220,
220,
220,
1330,
62,
45,
419,
261,
62,
23588,
2473,
658,
7,
77,
4147,
11,
6460,
11,
9483,
62,
6978,
2625,
42034,
6852,
4943,
198,
198,
20939,
10635,
10007,
329,
477,
1729,
29127,
4410,
287,
13760,
422,
9483,
4410,
526,
15931,
198,
8818,
1330,
62,
45,
419,
261,
62,
23588,
2473,
658,
7,
77,
4147,
11,
6460,
11,
9483,
62,
6978,
2625,
42034,
6852,
4943,
198,
220,
220,
220,
10635,
796,
360,
713,
3419,
198,
220,
220,
220,
299,
75,
62,
5589,
3906,
796,
3748,
7,
77,
4147,
58,
77,
4147,
13,
4906,
764,
855,
366,
13159,
29127,
1600,
366,
42895,
8973,
8,
198,
220,
220,
220,
329,
3335,
287,
299,
75,
62,
5589,
3906,
198,
220,
220,
220,
220,
220,
220,
220,
10635,
62,
7568,
796,
44189,
13,
961,
7,
43551,
62,
6978,
1635,
3335,
1635,
45434,
12161,
13,
40664,
1600,
6060,
19778,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
6121,
284,
19157,
2099,
11,
1576,
284,
10283,
717,
1582,
415,
8497,
329,
4388,
21136,
198,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
3975,
4033,
82,
0,
7,
4033,
4613,
21136,
12195,
5377,
11141,
37,
2414,
11,
10283,
12195,
4033,
11,
37250,
10786,
12962,
828,
10635,
62,
7568,
58,
45299,
513,
25,
437,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
10635,
62,
25202,
796,
289,
9246,
7,
12161,
62,
7568,
58,
45299,
16,
25,
17,
4357,
410,
874,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
8106,
15180,
329,
3177,
25625,
873,
198,
220,
220,
220,
220,
220,
220,
220,
10635,
62,
25202,
796,
10635,
62,
25202,
58,
45299,
14307,
7,
27471,
11,
4731,
7,
47033,
7,
33692,
13,
29155,
38530,
27493,
33692,
13,
8692,
62,
35324,
4008,
60,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1487,
284,
47574,
1080,
290,
3853,
611,
18064,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
6460,
13,
66,
280,
10137,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5415,
7,
33692,
13,
29155,
38530,
8,
14512,
2558,
7,
29572,
7,
5317,
11,
3891,
7,
12161,
62,
7568,
38381,
437,
12962,
14,
33692,
13,
8692,
62,
35324,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
20361,
0,
554,
3866,
37561,
2482,
2938,
11,
355,
18064,
2446,
318,
852,
973,
475,
407,
262,
1336,
10958,
2077,
656,
1848,
19570,
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,
314,
62,
45,
796,
15690,
7,
12161,
62,
25202,
58,
12161,
62,
25202,
13,
36301,
764,
855,
366,
40,
62,
45,
62,
66,
1600,
513,
25,
437,
12962,
14,
33692,
13,
8692,
62,
14421,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
62,
45,
62,
12853,
796,
10635,
62,
25202,
58,
12161,
62,
25202,
13,
36301,
764,
855,
366,
56,
62,
45,
62,
66,
1600,
362,
25,
437,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
62,
45,
796,
15690,
7,
11319,
62,
45,
62,
12853,
58,
11319,
62,
45,
62,
12853,
13,
37,
28707,
764,
27,
28,
5415,
7,
33692,
13,
29155,
38530,
27493,
33692,
13,
8692,
62,
35324,
11,
362,
25,
437,
12962,
14,
33692,
13,
8692,
62,
324,
20124,
590,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
314,
62,
45,
796,
15690,
7,
12161,
62,
25202,
58,
12161,
62,
25202,
13,
36301,
764,
855,
366,
40,
62,
45,
62,
1229,
1600,
513,
25,
437,
12962,
14,
33692,
13,
8692,
62,
14421,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
62,
45,
796,
15690,
7,
12161,
62,
25202,
58,
12161,
62,
25202,
13,
36301,
764,
855,
366,
56,
62,
45,
62,
1229,
1600,
513,
25,
437,
12962,
14,
33692,
13,
8692,
62,
324,
20124,
590,
198,
220,
220,
220,
220,
220,
220,
220,
886,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
10635,
58,
25202,
60,
796,
685,
40,
62,
45,
11,
406,
56,
62,
45,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
10635,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
1459,
62,
259,
752,
507,
7,
77,
4147,
11,
10139,
2389,
11,
334,
11,
10635,
11,
25625,
873,
8,
198,
198,
9771,
3129,
378,
262,
49239,
1459,
35849,
379,
530,
10139,
13,
198,
198,
5842,
274,
18064,
393,
4591,
280,
10137,
2446,
1912,
319,
15225,
286,
10635,
526,
15931,
198,
8818,
1459,
62,
259,
752,
507,
7,
77,
4147,
11,
10139,
2389,
11,
334,
11,
10635,
11,
25625,
873,
8,
198,
220,
220,
220,
7515,
796,
13760,
58,
77,
4147,
13,
2389,
764,
855,
10139,
2389,
11,
366,
42895,
1,
7131,
16,
60,
198,
220,
220,
220,
314,
62,
45,
11,
406,
56,
62,
45,
796,
10635,
58,
42895,
60,
198,
220,
220,
220,
1303,
334,
355,
8633,
286,
288,
9501,
1838,
2615,
428,
15879,
257,
1643,
8253,
198,
220,
220,
220,
334,
62,
71,
796,
410,
9246,
26933,
84,
58,
71,
7131,
17440,
2389,
11,
366,
85,
8973,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
71,
7131,
17440,
2389,
11,
366,
139,
243,
8973,
8,
329,
289,
287,
25625,
873,
60,
23029,
198,
220,
220,
220,
1303,
18064,
25,
575,
62,
45,
318,
257,
17593,
11,
4591,
280,
10137,
25,
15879,
198,
220,
220,
220,
611,
2546,
7,
11319,
62,
45,
38381,
16,
60,
1875,
352,
220,
1303,
18064,
1339,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
259,
73,
796,
43030,
7,
40,
62,
45,
8,
532,
43030,
7,
11319,
62,
45,
9,
84,
62,
71,
8,
198,
220,
220,
220,
2073,
220,
1303,
4591,
280,
10137,
1339,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
259,
73,
796,
43030,
7,
40,
62,
45,
8,
532,
599,
10989,
363,
76,
7,
35138,
7,
11319,
62,
45,
4008,
9,
84,
62,
71,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1312,
62,
259,
73,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
1459,
62,
20427,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
198,
36,
2100,
4985,
1459,
5236,
379,
477,
13760,
290,
19998,
11,
2845,
14174,
13760,
379,
7531,
8373,
13,
198,
37811,
198,
8818,
1459,
62,
20427,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
1303,
7531,
6178,
47912,
17593,
329,
1729,
29127,
13760,
198,
220,
220,
220,
406,
56,
62,
16,
62,
21283,
796,
406,
56,
58,
16,
7131,
3262,
13,
76,
25,
437,
11,
47715,
198,
220,
220,
220,
334,
62,
16,
796,
334,
58,
16,
4083,
85,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
16,
4083,
139,
243,
8,
198,
220,
220,
220,
1303,
7531,
1627,
28629,
379,
1729,
29127,
13760,
198,
220,
220,
220,
288,
40,
62,
16,
796,
406,
56,
62,
16,
62,
21283,
1635,
334,
62,
16,
198,
220,
220,
220,
1303,
49239,
6178,
47912,
2603,
45977,
355,
40039,
2512,
17593,
198,
220,
220,
220,
406,
56,
62,
71,
796,
2512,
10989,
363,
26933,
11319,
58,
71,
60,
329,
289,
287,
6460,
13,
29155,
38530,
58,
17,
25,
437,
11907,
23029,
198,
220,
220,
220,
334,
62,
71,
796,
410,
9246,
26933,
84,
58,
71,
7131,
45299,
366,
85,
8973,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
71,
7131,
45299,
366,
139,
243,
8973,
8,
329,
289,
287,
6460,
13,
29155,
38530,
58,
17,
25,
437,
11907,
23029,
198,
220,
220,
220,
288,
40,
62,
71,
796,
406,
56,
62,
71,
1635,
334,
62,
71,
220,
628,
220,
220,
220,
1303,
34128,
262,
25077,
28629,
379,
1123,
1729,
29127,
10139,
1312,
198,
220,
220,
220,
329,
1312,
287,
2010,
13,
76,
25,
3262,
13,
77,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
259,
73,
796,
1459,
62,
259,
752,
507,
7,
3262,
13,
77,
4147,
11,
2010,
13,
77,
4147,
13,
2389,
58,
72,
4357,
334,
11,
10635,
11,
6460,
13,
29155,
38530,
8,
198,
220,
220,
220,
220,
220,
220,
220,
288,
40,
62,
16,
58,
72,
12,
3262,
13,
76,
10,
16,
60,
15853,
1312,
62,
259,
73,
58,
16,
60,
220,
1303,
751,
35849,
379,
7531,
8373,
986,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2644,
290,
379,
477,
49239,
19998,
198,
220,
220,
220,
220,
220,
220,
220,
329,
279,
287,
657,
37498,
33692,
13,
42,
12,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
40,
62,
71,
58,
79,
9,
3262,
13,
77,
1343,
1312,
60,
15853,
1312,
62,
259,
73,
58,
79,
10,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
410,
9246,
7,
67,
40,
62,
16,
11,
288,
40,
62,
71,
8,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
49239,
62,
76,
1042,
963,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
198,
20575,
500,
1459,
290,
1176,
46318,
284,
5678,
49239,
46318,
15879,
4600,
69,
44646,
198,
37811,
198,
8818,
49239,
62,
76,
1042,
963,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
1303,
7531,
1176,
46318,
379,
14174,
13760,
2845,
30740,
198,
220,
220,
220,
264,
796,
2010,
13,
77,
4147,
13,
47,
58,
17,
37498,
3262,
13,
76,
12,
16,
15437,
1343,
352,
320,
9,
3262,
13,
77,
4147,
13,
48,
58,
17,
37498,
3262,
13,
76,
12,
16,
15437,
198,
220,
220,
220,
334,
62,
72,
796,
334,
58,
16,
7131,
17,
37498,
3262,
13,
76,
12,
16,
828,
366,
85,
1,
4083,
9,
11201,
12195,
16,
320,
9,
84,
58,
16,
7131,
17,
37498,
3262,
13,
76,
12,
16,
828,
366,
139,
243,
8973,
8,
198,
220,
220,
220,
334,
62,
73,
796,
334,
58,
16,
7131,
45299,
366,
85,
1,
4083,
9,
11201,
12195,
16,
320,
9,
84,
58,
16,
7131,
45299,
366,
139,
243,
8973,
8,
198,
220,
220,
220,
406,
56,
62,
2926,
796,
406,
56,
58,
16,
7131,
17,
37498,
3262,
13,
76,
12,
16,
828,
1058,
60,
198,
220,
220,
220,
1303,
1176,
5236,
198,
220,
220,
220,
1017,
796,
334,
62,
72,
15885,
1102,
73,
7,
11319,
62,
2926,
9,
84,
62,
73,
8,
220,
220,
198,
220,
220,
220,
288,
82,
796,
264,
1343,
1017,
220,
220,
198,
220,
220,
220,
2566,
796,
1459,
62,
20427,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
220,
198,
220,
220,
220,
1303,
49239,
46318,
15879,
198,
220,
220,
220,
277,
62,
66,
796,
410,
9246,
7,
9310,
11,
2566,
8,
220,
198,
220,
220,
220,
277,
796,
410,
9246,
7,
5305,
7,
69,
62,
66,
828,
3590,
7,
69,
62,
66,
58,
7,
3262,
13,
66,
2599,
437,
60,
4008,
220,
1303,
13833,
31392,
13760,
198,
220,
220,
220,
11454,
62,
71,
796,
5415,
7,
8937,
12195,
69,
4008,
220,
220,
198,
220,
220,
220,
1441,
277,
11,
11454,
62,
71,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
49239,
62,
5219,
62,
35138,
7,
3262,
11,
334,
11,
25625,
873,
8,
198,
198,
42316,
49239,
1181,
15879,
4600,
87,
63,
422,
7531,
290,
49239,
13161,
1095,
13,
198,
37811,
198,
8818,
49239,
62,
5219,
62,
35138,
7,
3262,
11,
334,
11,
25625,
873,
8,
198,
220,
220,
220,
1303,
7531,
13161,
1095,
11,
13833,
30740,
290,
14735,
329,
31392,
13760,
198,
220,
220,
220,
2124,
139,
243,
796,
334,
58,
16,
4083,
139,
243,
58,
17,
25,
437,
60,
198,
220,
220,
220,
2124,
85,
796,
334,
58,
16,
4083,
85,
58,
7,
3262,
13,
66,
10,
16,
2599,
437,
60,
198,
220,
220,
220,
1303,
477,
13161,
1095,
290,
18333,
379,
477,
49239,
19998,
220,
198,
220,
220,
220,
329,
289,
287,
25625,
873,
58,
17,
25,
437,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
139,
243,
796,
410,
9246,
7,
87,
139,
243,
11,
334,
58,
71,
4083,
139,
243,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
85,
796,
410,
9246,
7,
87,
85,
11,
334,
58,
71,
4083,
85,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
410,
9246,
7,
87,
139,
243,
11,
2124,
85,
8,
198,
437,
220,
220,
220,
628,
198,
37811,
198,
220,
220,
220,
1382,
62,
29155,
9229,
62,
30482,
672,
666,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
198,
42316,
49239,
12806,
666,
4600,
41,
63,
7268,
477,
28486,
286,
1176,
290,
1459,
32691,
20981,
1319,
83,
13161,
1095,
422,
49239,
1181,
15879,
13,
198,
37811,
198,
8818,
1382,
62,
29155,
9229,
62,
30482,
672,
666,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
285,
796,
2010,
13,
76,
198,
220,
220,
220,
299,
796,
2010,
13,
77,
198,
220,
220,
220,
269,
796,
2010,
13,
66,
198,
220,
220,
220,
509,
796,
6460,
13,
42,
628,
220,
220,
220,
1303,
7613,
17336,
329,
12806,
666,
5103,
198,
220,
220,
220,
334,
62,
35138,
796,
410,
9246,
26933,
84,
58,
71,
4083,
85,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
71,
4083,
139,
243,
8,
329,
289,
287,
6460,
13,
29155,
38530,
60,
23029,
198,
220,
220,
220,
410,
62,
35138,
796,
410,
9246,
26933,
84,
58,
71,
4083,
85,
329,
289,
287,
6460,
13,
29155,
38530,
60,
23029,
198,
220,
220,
220,
334,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
84,
62,
35138,
8,
198,
220,
220,
220,
334,
62,
27237,
796,
334,
62,
35138,
19571,
85,
62,
35138,
198,
220,
220,
220,
334,
62,
27237,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
84,
62,
27237,
8,
198,
220,
220,
220,
406,
56,
62,
10989,
363,
796,
2512,
10989,
363,
26933,
11319,
58,
71,
60,
329,
289,
287,
6460,
13,
29155,
38530,
60,
23029,
628,
220,
220,
220,
1303,
5678,
12806,
666,
850,
12,
6759,
45977,
198,
220,
220,
220,
288,
7390,
85,
796,
406,
56,
62,
10989,
363,
9,
84,
62,
27237,
62,
10989,
363,
198,
220,
220,
220,
288,
7390,
139,
243,
796,
352,
320,
9,
11319,
62,
10989,
363,
9,
84,
62,
10989,
363,
628,
220,
220,
220,
1303,
36525,
286,
717,
1729,
29127,
10139,
379,
1123,
49239,
198,
220,
220,
220,
299,
75,
62,
312,
87,
62,
9688,
796,
285,
25,
77,
25,
77,
9,
7,
42,
10,
16,
8,
198,
220,
220,
220,
299,
75,
62,
312,
87,
62,
439,
796,
410,
9246,
26933,
21283,
37498,
21283,
10,
77,
12,
76,
8,
329,
299,
75,
287,
299,
75,
62,
312,
87,
62,
9688,
60,
23029,
198,
220,
220,
220,
334,
62,
21283,
796,
334,
62,
35138,
58,
21283,
62,
312,
87,
62,
439,
60,
198,
220,
220,
220,
410,
62,
21283,
796,
410,
62,
35138,
58,
21283,
62,
312,
87,
62,
439,
60,
198,
220,
220,
220,
334,
62,
21283,
62,
27237,
796,
334,
62,
21283,
19571,
85,
62,
21283,
628,
220,
220,
220,
611,
6460,
13,
66,
280,
10137,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
11629,
803,
832,
7021,
31677,
198,
220,
220,
220,
220,
220,
220,
220,
329,
289,
287,
657,
25,
42,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2644,
290,
36774,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
279,
287,
657,
25,
42,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11629,
803,
832,
1729,
29127,
13760,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
285,
25,
77,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1626,
10635,
12878,
17,
30866,
2173,
284,
406,
56,
62,
45,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
62,
45,
796,
10635,
58,
3262,
13,
77,
4147,
13,
42895,
58,
72,
60,
7131,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
34128,
10944,
1459,
35849,
379,
11756,
4686,
87,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
7390,
85,
58,
71,
9,
77,
10,
72,
11,
279,
9,
77,
10,
72,
60,
48185,
406,
56,
62,
45,
58,
71,
10,
16,
11,
279,
10,
16,
60,
9,
84,
62,
21283,
62,
27237,
58,
7,
72,
12,
76,
10,
16,
47762,
79,
9,
7,
77,
12,
76,
10,
16,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
7390,
139,
243,
58,
71,
9,
77,
10,
72,
11,
279,
9,
77,
10,
72,
60,
48185,
352,
320,
9,
11319,
62,
45,
58,
71,
10,
16,
11,
279,
10,
16,
60,
9,
84,
62,
21283,
58,
7,
72,
12,
76,
10,
16,
47762,
79,
9,
7,
77,
12,
76,
10,
16,
15437,
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,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
11629,
803,
832,
7021,
2566,
1840,
453,
357,
79,
28,
71,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
289,
287,
657,
25,
42,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
285,
25,
77,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
406,
56,
62,
45,
318,
530,
12,
19577,
287,
262,
4591,
280,
10137,
1339,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
406,
56,
62,
45,
796,
10635,
58,
3262,
13,
77,
4147,
13,
42895,
58,
72,
60,
7131,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
7390,
85,
58,
71,
9,
77,
10,
72,
11,
289,
9,
77,
10,
72,
60,
48185,
406,
56,
62,
45,
58,
71,
10,
16,
60,
9,
84,
62,
21283,
62,
27237,
58,
7,
72,
12,
76,
10,
16,
47762,
71,
9,
7,
77,
12,
76,
10,
16,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
7390,
139,
243,
58,
71,
9,
77,
10,
72,
11,
289,
9,
77,
10,
72,
60,
48185,
352,
320,
9,
11319,
62,
45,
58,
71,
10,
16,
60,
9,
84,
62,
21283,
58,
7,
72,
12,
76,
10,
16,
47762,
71,
9,
7,
77,
12,
76,
10,
16,
15437,
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,
1303,
13833,
30740,
290,
31392,
13760,
198,
220,
220,
220,
288,
7390,
139,
243,
796,
288,
7390,
139,
243,
58,
76,
25,
437,
11,
362,
25,
437,
60,
198,
220,
220,
220,
288,
7390,
85,
796,
288,
7390,
85,
58,
76,
25,
437,
11,
357,
66,
10,
16,
2599,
437,
60,
220,
220,
198,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
7613,
17336,
329,
288,
50,
5103,
198,
220,
220,
220,
406,
56,
62,
16,
796,
406,
56,
58,
16,
60,
198,
220,
220,
220,
334,
62,
16,
796,
334,
58,
16,
4083,
85,
764,
9,
1033,
12195,
16,
320,
9,
84,
58,
16,
4083,
139,
243,
8,
198,
220,
220,
220,
1312,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
11319,
62,
16,
9,
84,
62,
16,
8,
198,
220,
220,
220,
334,
62,
10989,
363,
796,
599,
10989,
363,
76,
7,
84,
62,
16,
8,
198,
220,
220,
220,
334,
62,
10989,
363,
62,
27237,
796,
599,
10989,
363,
76,
7,
84,
62,
16,
19571,
8937,
12195,
84,
62,
16,
4008,
628,
220,
220,
220,
1303,
7531,
5635,
10944,
1319,
83,
284,
15004,
7108,
290,
14735,
198,
220,
220,
220,
288,
50,
16,
67,
139,
243,
16,
796,
352,
320,
9,
84,
62,
10989,
363,
9,
7,
1102,
73,
7,
72,
62,
10989,
363,
532,
406,
56,
62,
16,
9,
84,
62,
10989,
363,
4008,
198,
220,
220,
220,
288,
50,
16,
67,
85,
16,
796,
334,
62,
10989,
363,
62,
27237,
9,
1102,
73,
7,
72,
62,
10989,
363,
8,
1343,
334,
62,
10989,
363,
9,
1102,
73,
7,
11319,
62,
16,
9,
84,
62,
10989,
363,
62,
27237,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
691,
7531,
1176,
28486,
389,
1729,
12,
22570,
198,
220,
220,
220,
288,
50,
67,
139,
243,
796,
289,
9246,
7,
67,
50,
16,
67,
139,
243,
16,
11,
1976,
27498,
7,
77,
11,
299,
9,
42,
4008,
198,
220,
220,
220,
288,
50,
67,
85,
796,
289,
9246,
7,
67,
50,
16,
67,
85,
16,
11,
1976,
27498,
7,
77,
11,
299,
9,
42,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
13833,
30740,
290,
31392,
13760,
422,
1176,
28486,
198,
220,
220,
220,
288,
47,
67,
139,
243,
796,
1103,
7,
67,
50,
67,
139,
243,
58,
17,
37498,
76,
12,
16,
828,
362,
25,
437,
12962,
198,
220,
220,
220,
288,
47,
67,
85,
796,
1103,
7,
67,
50,
67,
85,
58,
17,
37498,
76,
12,
16,
828,
357,
66,
10,
16,
2599,
437,
12962,
198,
220,
220,
220,
288,
48,
67,
139,
243,
796,
3590,
7,
67,
50,
67,
139,
243,
58,
7,
66,
10,
16,
2599,
7,
76,
12,
16,
828,
362,
25,
437,
12962,
198,
220,
220,
220,
288,
48,
67,
85,
796,
3590,
7,
67,
50,
67,
85,
58,
7,
66,
10,
16,
2599,
7,
76,
12,
16,
828,
357,
66,
10,
16,
2599,
437,
12962,
628,
220,
220,
220,
1303,
12082,
477,
850,
12,
6759,
45977,
290,
1441,
1844,
12806,
666,
198,
220,
220,
220,
410,
9246,
7,
71,
9246,
7,
67,
47,
67,
139,
243,
11,
288,
47,
67,
85,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
289,
9246,
7,
5305,
7,
67,
7390,
139,
243,
828,
1103,
7,
67,
7390,
85,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
289,
9246,
7,
67,
48,
67,
139,
243,
11,
288,
48,
67,
85,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
289,
9246,
7,
48466,
7,
67,
7390,
139,
243,
828,
3590,
7,
67,
7390,
85,
22305,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
4296,
62,
10990,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
11,
6460,
8,
198,
198,
16594,
649,
13161,
1095,
422,
4600,
87,
63,
284,
4600,
84,
63,
329,
477,
25625,
873,
13,
198,
37811,
198,
8818,
4296,
62,
29155,
9229,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
11,
6460,
8,
198,
220,
220,
220,
299,
796,
2010,
13,
77,
198,
220,
220,
220,
269,
796,
2010,
13,
66,
628,
220,
220,
220,
1303,
16416,
2124,
284,
4553,
15004,
14735,
290,
7108,
198,
220,
220,
220,
2124,
139,
243,
796,
2124,
58,
16,
37498,
77,
9,
33692,
13,
42,
16,
12,
16,
15437,
198,
220,
220,
220,
2124,
85,
796,
2124,
58,
77,
9,
33692,
13,
42,
16,
25,
437,
60,
628,
220,
220,
220,
1303,
2124,
139,
243,
796,
2124,
139,
243,
764,
4,
357,
17,
9,
46582,
8,
220,
1303,
4155,
7108,
4833,
362,
46582,
11,
407,
1107,
3306,
628,
220,
220,
220,
1303,
4296,
7531,
13161,
1095,
198,
220,
220,
220,
334,
58,
16,
4083,
139,
243,
58,
17,
25,
437,
60,
796,
2124,
139,
243,
58,
16,
37498,
77,
12,
16,
15437,
198,
220,
220,
220,
334,
58,
16,
4083,
85,
58,
7,
66,
10,
16,
2599,
437,
60,
796,
2124,
85,
58,
16,
37498,
77,
12,
66,
15437,
628,
220,
220,
220,
1303,
13833,
30740,
290,
31392,
13760,
198,
220,
220,
220,
2124,
139,
243,
62,
71,
796,
2124,
139,
243,
58,
77,
25,
437,
60,
198,
220,
220,
220,
2124,
85,
62,
71,
796,
2124,
85,
58,
7,
77,
12,
66,
10,
16,
2599,
437,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
329,
289,
287,
6460,
13,
29155,
38530,
58,
17,
25,
437,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
27056,
378,
25625,
873,
329,
4577,
6376,
278,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
1064,
439,
7,
33692,
13,
29155,
38530,
58,
17,
25,
437,
60,
764,
855,
289,
38381,
16,
60,
532,
352,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
4083,
139,
243,
796,
2124,
139,
243,
62,
71,
58,
7,
72,
9,
77,
10,
16,
2599,
7,
72,
9,
77,
10,
77,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
4083,
85,
796,
2124,
85,
62,
71,
58,
7,
72,
9,
77,
10,
16,
2599,
7,
72,
9,
77,
10,
77,
15437,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
334,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
27673,
69,
7,
3262,
11,
6460,
8,
198,
198,
50,
6442,
262,
49239,
1176,
5202,
1917,
329,
257,
1813,
4600,
13434,
41339,
63,
290,
4600,
26232,
63,
526,
15931,
198,
8818,
27673,
69,
7,
3262,
11,
6460,
8,
198,
220,
220,
220,
406,
56,
796,
6178,
47912,
62,
6759,
45977,
7,
3262,
11,
6460,
13,
29155,
38530,
8,
198,
220,
220,
220,
334,
796,
279,
69,
7,
3262,
11,
6460,
11,
406,
56,
8,
198,
220,
220,
220,
10635,
796,
1330,
62,
45,
419,
261,
62,
23588,
2473,
658,
7,
3262,
13,
77,
4147,
11,
6460,
8,
198,
220,
220,
220,
277,
11,
11454,
62,
71,
796,
49239,
62,
76,
1042,
963,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
2124,
796,
49239,
62,
5219,
62,
35138,
7,
3262,
11,
334,
11,
6460,
13,
29155,
38530,
8,
198,
220,
220,
220,
299,
62,
2676,
62,
71,
796,
657,
198,
220,
220,
220,
11454,
62,
71,
62,
83,
796,
360,
713,
3419,
198,
220,
220,
220,
981,
11454,
62,
71,
1875,
6460,
13,
400,
3447,
62,
71,
11405,
299,
62,
2676,
62,
71,
1279,
6460,
13,
9806,
62,
2676,
62,
71,
198,
220,
220,
220,
220,
220,
220,
220,
449,
796,
1382,
62,
29155,
9229,
62,
30482,
672,
666,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
4296,
62,
5219,
62,
35138,
0,
7,
41,
11,
2124,
11,
277,
8,
198,
220,
220,
220,
220,
220,
220,
220,
334,
796,
4296,
62,
29155,
9229,
62,
37764,
1095,
0,
7,
3262,
11,
334,
11,
2124,
11,
6460,
8,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
277,
11,
11454,
62,
71,
796,
49239,
62,
76,
1042,
963,
7,
3262,
11,
6460,
11,
334,
11,
406,
56,
11,
10635,
8,
198,
220,
220,
220,
220,
220,
220,
220,
11454,
62,
71,
62,
83,
58,
77,
62,
2676,
62,
71,
60,
796,
11454,
62,
71,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
2676,
62,
71,
15853,
352,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1303,
1972,
5755,
286,
4633,
15004,
7842,
10455,
25,
198,
220,
220,
220,
329,
289,
287,
6460,
13,
29155,
38530,
198,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
4083,
139,
243,
58,
84,
58,
71,
4083,
85,
764,
27,
657,
60,
764,
47932,
18074,
222,
198,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
4083,
139,
243,
764,
28,
334,
58,
71,
4083,
139,
243,
764,
4,
357,
17,
9,
46582,
8,
198,
220,
220,
220,
220,
220,
220,
220,
334,
58,
71,
4083,
85,
58,
84,
58,
71,
4083,
85,
764,
27,
657,
60,
796,
532,
84,
58,
71,
4083,
85,
58,
84,
58,
71,
4083,
85,
764,
27,
657,
60,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
299,
62,
2676,
62,
71,
1279,
6460,
13,
9806,
62,
2676,
62,
71,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
39,
1670,
9229,
1176,
5202,
6718,
2004,
706,
33172,
299,
62,
2676,
62,
71,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
34820,
357,
8056,
1279,
33172,
6460,
13,
400,
3447,
62,
71,
11,
366,
8,
19570,
198,
220,
220,
220,
2073,
361,
299,
62,
2676,
62,
71,
6624,
6460,
13,
9806,
62,
2676,
62,
71,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7203,
40541,
286,
33172,
299,
62,
2676,
62,
71,
11,
366,
34820,
4251,
13,
17925,
9229,
1176,
5202,
750,
407,
47873,
19570,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
334,
11,
11454,
62,
71,
62,
83,
11,
299,
62,
2676,
62,
71,
198,
437
] | 2.03494 | 7,384 |
## Packages
using Plots
## Files
include("VFI.jl")
include("LQ_Vaughan.jl")
################################### Running three methods ########################
md = Model();
kss,hss,lss,css = getSS(md);
## Construct capital grid
nk = 1000; # number of capital grid
kmin = 0.5*kss;
kmax = 1.5*kss;
kGrid = LinRange(kmin,kmax,nk);
V_VFI,kpol_VFI,hpol_VFI,cpol_VFI = VFI(md,nk,kGrid)
A_tld,B_tld,Q_tld,R,W = getM(md,kss,hss);
P_LQ,F_LQ = LQ(A_tld,B_tld,R,Q_tld);
Pv,Fv = Vaughan(A_tld,B_tld,Q_tld,R,W);
################################### Plotting ########################
## VFI
plot(kGrid,V_VFI[:,1])
plot!(kGrid,V_VFI[:,2])
plot(kGrid,kGrid,label = "", color = :black, linestyle = :dash)
plot!(kGrid,kpol_VFI[:,1],label = "low",legend = :topleft)
plot!(kGrid,kpol_VFI[:,3],label = "SS",legend = :topleft)
plot!(kGrid,kpol_VFI[:,5],label = "high",legend = :topleft)
plot(kGrid,hpol[:,1],label = "low",legend = :topleft)
plot!(kGrid,hpol[:,3],label = "high",legend = :topleft)
plot(kGrid,cpol[:,1],label = "low",legend = :topleft)
plot!(kGrid,cpol[:,3],label = "high",legend = :topleft)
## LQ and Vaughan
# Low shock
pol_L_LQ = zeros(2, 1, nk);
pol_L_v = zeros(2, 1, nk);
for i = 1:nk
pol_L_LQ[:,:,i] = -F_LQ*[kGrid[i]; -0.5; 1];
pol_L_v[:,:,i] = -Fv*[kGrid[i]; -0.5; 1];
end
kpol_L_LQ = zeros(1,nk);
hpol_L_LQ = zeros(1,nk);
kpol_L_v = zeros(1,nk);
hpol_L_v = zeros(1,nk);
for i = 1:nk
kpol_L_LQ[1,i] = pol_L_LQ[1,:,i][1];
hpol_L_LQ[1,i] = pol_L_LQ[2,:,i][1];
kpol_L_v[1,i] = pol_L_v[1,:,i][1];
hpol_L_v[1,i] = pol_L_v[2,:,i][1];
end
# High shock
pol_H_LQ = zeros(2, 1, nk);
pol_H_v = zeros(2, 1, nk);
for i = 1:nk
pol_H_LQ[:,:,i] = -F_LQ*[kGrid[i]; 0.5; 1];
pol_H_v[:,:,i] = -Fv*[kGrid[i]; 0.5; 1];
end
kpol_H_LQ = zeros(1,nk);
hpol_H_LQ = zeros(1,nk);
kpol_H_v = zeros(1,nk);
hpol_H_v = zeros(1,nk);
for i = 1:nk
kpol_H_LQ[1,i] = pol_H_LQ[1,:,i][1];
hpol_H_LQ[1,i] = pol_H_LQ[2,:,i][1];
kpol_H_v[1,i] = pol_H_v[1,:,i][1];
hpol_H_v[1,i] = pol_H_v[2,:,i][1];
end
# SS shock
pol_SS_LQ = zeros(2, 1, nk);
pol_SS_v = zeros(2, 1, nk);
for i = 1:nk
pol_SS_LQ[:,:,i] = -F_LQ*[kGrid[i]; 0.0; 1];
pol_SS_v[:,:,i] = -Fv*[kGrid[i]; 0.0; 1];
end
kpol_SS_LQ = zeros(1,nk);
hpol_SS_LQ = zeros(1,nk);
kpol_SS_v = zeros(1,nk);
hpol_SS_v = zeros(1,nk);
for i = 1:nk
kpol_SS_LQ[1,i] = pol_SS_LQ[1,:,i][1];
hpol_SS_LQ[1,i] = pol_SS_LQ[2,:,i][1];
kpol_SS_v[1,i] = pol_SS_v[1,:,i][1];
hpol_SS_v[1,i] = pol_SS_v[2,:,i][1];
end
################### Plots ##################################
# capital policy LQ
plot(kGrid,kGrid,label = "45 degree line", color = :black, linestyle = :dash,
title = "Optimal capital policy function (LQ)",xlabel = "k_{t}", ylabel = "k_{t+1}")
plot!(kGrid,vec(kpol_L_LQ),label = "Low_LQ",legend=:topleft)
plot!(kGrid,vec(kpol_H_LQ),label = "High_LQ")
plot!(kGrid,vec(kpol_SS_LQ),label = "SS_LQ")
savefig("figs/kpol_LQ.png")
# labor policy LQ
plot(kGrid,vec(hpol_L_LQ),label = "Low",legend=:topright,
title = "Optimal labor policy function (LQ)",xlabel = "k_{t}", ylabel = "h_{t}")
plot!(kGrid,vec(hpol_H_LQ),label = "High")
plot!(kGrid,vec(hpol_SS_LQ),label = "SS")
savefig("figs/hpol_LQ.png")
# capital policy Vaughan
plot(kGrid,kGrid,label = "45 degree line", color = :black, linestyle = :dash,
title = "Optimal capital policy function (Vaughan)",xlabel = "k_{t}", ylabel = "k_{t+1}")
plot!(kGrid,vec(kpol_L_v),label = "Low_Vaughan",legend=:topleft)
plot!(kGrid,vec(kpol_H_v),label = "High_Vaughan")
plot!(kGrid,vec(kpol_SS_v),label = "SS_Vaughan")
savefig("figs/kpol_Vaughan.png")
# labor policy Vaughan
plot(kGrid,vec(hpol_L_v),label = "Low",legend=:topright,
title = "Optimal labor policy function (Vaughan)",xlabel = "k_{t}", ylabel = "h_{t}")
plot!(kGrid,vec(hpol_H_v),label = "High")
plot!(kGrid,vec(hpol_SS_v),label = "SS")
savefig("figs/hpol_Vaughan.png")
| [
2235,
6400,
1095,
198,
3500,
1345,
1747,
198,
198,
2235,
13283,
198,
17256,
7203,
53,
11674,
13,
20362,
4943,
198,
17256,
7203,
43,
48,
62,
53,
1567,
272,
13,
20362,
4943,
198,
198,
29113,
21017,
18162,
1115,
5050,
1303,
14468,
4242,
21017,
198,
9132,
796,
9104,
9783,
198,
591,
82,
11,
71,
824,
11,
75,
824,
11,
25471,
796,
651,
5432,
7,
9132,
1776,
198,
198,
2235,
28407,
3139,
10706,
198,
77,
74,
796,
8576,
26,
1303,
1271,
286,
3139,
10706,
198,
74,
1084,
796,
657,
13,
20,
9,
591,
82,
26,
198,
74,
9806,
796,
352,
13,
20,
9,
591,
82,
26,
198,
74,
41339,
796,
5164,
17257,
7,
74,
1084,
11,
74,
9806,
11,
77,
74,
1776,
198,
198,
53,
62,
53,
11674,
11,
74,
16104,
62,
53,
11674,
11,
71,
16104,
62,
53,
11674,
11,
13155,
349,
62,
53,
11674,
796,
569,
11674,
7,
9132,
11,
77,
74,
11,
74,
41339,
8,
198,
198,
32,
62,
83,
335,
11,
33,
62,
83,
335,
11,
48,
62,
83,
335,
11,
49,
11,
54,
796,
651,
44,
7,
9132,
11,
591,
82,
11,
71,
824,
1776,
198,
47,
62,
43,
48,
11,
37,
62,
43,
48,
796,
406,
48,
7,
32,
62,
83,
335,
11,
33,
62,
83,
335,
11,
49,
11,
48,
62,
83,
335,
1776,
198,
47,
85,
11,
37,
85,
796,
47451,
7,
32,
62,
83,
335,
11,
33,
62,
83,
335,
11,
48,
62,
83,
335,
11,
49,
11,
54,
1776,
198,
198,
29113,
21017,
28114,
889,
1303,
14468,
4242,
21017,
198,
2235,
569,
11674,
198,
29487,
7,
74,
41339,
11,
53,
62,
53,
11674,
58,
45299,
16,
12962,
198,
29487,
0,
7,
74,
41339,
11,
53,
62,
53,
11674,
58,
45299,
17,
12962,
198,
220,
198,
29487,
7,
74,
41339,
11,
74,
41339,
11,
18242,
796,
366,
1600,
3124,
796,
1058,
13424,
11,
9493,
10992,
796,
1058,
42460,
8,
198,
29487,
0,
7,
74,
41339,
11,
74,
16104,
62,
53,
11674,
58,
45299,
16,
4357,
18242,
796,
366,
9319,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
74,
16104,
62,
53,
11674,
58,
45299,
18,
4357,
18242,
796,
366,
5432,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
74,
16104,
62,
53,
11674,
58,
45299,
20,
4357,
18242,
796,
366,
8929,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
198,
29487,
7,
74,
41339,
11,
71,
16104,
58,
45299,
16,
4357,
18242,
796,
366,
9319,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
71,
16104,
58,
45299,
18,
4357,
18242,
796,
366,
8929,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
198,
29487,
7,
74,
41339,
11,
13155,
349,
58,
45299,
16,
4357,
18242,
796,
366,
9319,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
13155,
349,
58,
45299,
18,
4357,
18242,
796,
366,
8929,
1600,
1455,
437,
796,
1058,
83,
643,
701,
8,
198,
198,
2235,
406,
48,
290,
47451,
198,
2,
7754,
6380,
198,
16104,
62,
43,
62,
43,
48,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
16104,
62,
43,
62,
85,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
755,
62,
43,
62,
43,
48,
58,
45299,
45299,
72,
60,
796,
532,
37,
62,
43,
48,
9,
58,
74,
41339,
58,
72,
11208,
532,
15,
13,
20,
26,
352,
11208,
198,
220,
220,
220,
755,
62,
43,
62,
85,
58,
45299,
45299,
72,
60,
796,
532,
37,
85,
9,
58,
74,
41339,
58,
72,
11208,
532,
15,
13,
20,
26,
352,
11208,
198,
437,
198,
198,
74,
16104,
62,
43,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
43,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
74,
16104,
62,
43,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
43,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
479,
16104,
62,
43,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
43,
62,
43,
48,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
43,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
43,
62,
43,
48,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
479,
16104,
62,
43,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
43,
62,
85,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
43,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
43,
62,
85,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
437,
198,
198,
2,
3334,
6380,
198,
16104,
62,
39,
62,
43,
48,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
16104,
62,
39,
62,
85,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
755,
62,
39,
62,
43,
48,
58,
45299,
45299,
72,
60,
796,
532,
37,
62,
43,
48,
9,
58,
74,
41339,
58,
72,
11208,
657,
13,
20,
26,
352,
11208,
198,
220,
220,
220,
755,
62,
39,
62,
85,
58,
45299,
45299,
72,
60,
796,
532,
37,
85,
9,
58,
74,
41339,
58,
72,
11208,
657,
13,
20,
26,
352,
11208,
198,
437,
198,
198,
74,
16104,
62,
39,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
39,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
74,
16104,
62,
39,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
39,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
479,
16104,
62,
39,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
39,
62,
43,
48,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
39,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
39,
62,
43,
48,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
479,
16104,
62,
39,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
39,
62,
85,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
39,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
39,
62,
85,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
437,
198,
198,
2,
6723,
6380,
198,
16104,
62,
5432,
62,
43,
48,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
16104,
62,
5432,
62,
85,
796,
1976,
27498,
7,
17,
11,
352,
11,
299,
74,
1776,
198,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
755,
62,
5432,
62,
43,
48,
58,
45299,
45299,
72,
60,
796,
532,
37,
62,
43,
48,
9,
58,
74,
41339,
58,
72,
11208,
657,
13,
15,
26,
352,
11208,
198,
220,
220,
220,
755,
62,
5432,
62,
85,
58,
45299,
45299,
72,
60,
796,
532,
37,
85,
9,
58,
74,
41339,
58,
72,
11208,
657,
13,
15,
26,
352,
11208,
198,
437,
198,
198,
74,
16104,
62,
5432,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
5432,
62,
43,
48,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
74,
16104,
62,
5432,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
71,
16104,
62,
5432,
62,
85,
796,
1976,
27498,
7,
16,
11,
77,
74,
1776,
198,
198,
1640,
1312,
796,
352,
25,
77,
74,
198,
220,
220,
220,
479,
16104,
62,
5432,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
5432,
62,
43,
48,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
5432,
62,
43,
48,
58,
16,
11,
72,
60,
796,
755,
62,
5432,
62,
43,
48,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
479,
16104,
62,
5432,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
5432,
62,
85,
58,
16,
11,
45299,
72,
7131,
16,
11208,
198,
220,
220,
220,
289,
16104,
62,
5432,
62,
85,
58,
16,
11,
72,
60,
796,
755,
62,
5432,
62,
85,
58,
17,
11,
45299,
72,
7131,
16,
11208,
198,
437,
198,
198,
14468,
21017,
1345,
1747,
1303,
29113,
2,
198,
2,
3139,
2450,
406,
48,
198,
29487,
7,
74,
41339,
11,
74,
41339,
11,
18242,
796,
366,
2231,
4922,
1627,
1600,
3124,
796,
1058,
13424,
11,
9493,
10992,
796,
1058,
42460,
11,
198,
7839,
796,
366,
27871,
4402,
3139,
2450,
2163,
357,
43,
48,
42501,
87,
18242,
796,
366,
74,
23330,
83,
92,
1600,
331,
18242,
796,
366,
74,
23330,
83,
10,
16,
92,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
43,
62,
43,
48,
828,
18242,
796,
366,
20535,
62,
43,
48,
1600,
1455,
437,
28,
25,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
39,
62,
43,
48,
828,
18242,
796,
366,
11922,
62,
43,
48,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
5432,
62,
43,
48,
828,
18242,
796,
366,
5432,
62,
43,
48,
4943,
198,
21928,
5647,
7203,
5647,
82,
14,
74,
16104,
62,
43,
48,
13,
11134,
4943,
198,
198,
2,
4827,
2450,
406,
48,
198,
29487,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
43,
62,
43,
48,
828,
18242,
796,
366,
20535,
1600,
1455,
437,
28,
25,
4852,
3506,
11,
198,
7839,
796,
366,
27871,
4402,
4827,
2450,
2163,
357,
43,
48,
42501,
87,
18242,
796,
366,
74,
23330,
83,
92,
1600,
331,
18242,
796,
366,
71,
23330,
83,
92,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
39,
62,
43,
48,
828,
18242,
796,
366,
11922,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
5432,
62,
43,
48,
828,
18242,
796,
366,
5432,
4943,
198,
21928,
5647,
7203,
5647,
82,
14,
71,
16104,
62,
43,
48,
13,
11134,
4943,
198,
198,
2,
3139,
2450,
47451,
198,
29487,
7,
74,
41339,
11,
74,
41339,
11,
18242,
796,
366,
2231,
4922,
1627,
1600,
3124,
796,
1058,
13424,
11,
9493,
10992,
796,
1058,
42460,
11,
198,
7839,
796,
366,
27871,
4402,
3139,
2450,
2163,
357,
53,
1567,
272,
42501,
87,
18242,
796,
366,
74,
23330,
83,
92,
1600,
331,
18242,
796,
366,
74,
23330,
83,
10,
16,
92,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
43,
62,
85,
828,
18242,
796,
366,
20535,
62,
53,
1567,
272,
1600,
1455,
437,
28,
25,
83,
643,
701,
8,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
39,
62,
85,
828,
18242,
796,
366,
11922,
62,
53,
1567,
272,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
74,
16104,
62,
5432,
62,
85,
828,
18242,
796,
366,
5432,
62,
53,
1567,
272,
4943,
198,
21928,
5647,
7203,
5647,
82,
14,
74,
16104,
62,
53,
1567,
272,
13,
11134,
4943,
198,
198,
2,
4827,
2450,
47451,
198,
29487,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
43,
62,
85,
828,
18242,
796,
366,
20535,
1600,
1455,
437,
28,
25,
4852,
3506,
11,
198,
7839,
796,
366,
27871,
4402,
4827,
2450,
2163,
357,
53,
1567,
272,
42501,
87,
18242,
796,
366,
74,
23330,
83,
92,
1600,
331,
18242,
796,
366,
71,
23330,
83,
92,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
39,
62,
85,
828,
18242,
796,
366,
11922,
4943,
198,
29487,
0,
7,
74,
41339,
11,
35138,
7,
71,
16104,
62,
5432,
62,
85,
828,
18242,
796,
366,
5432,
4943,
198,
21928,
5647,
7203,
5647,
82,
14,
71,
16104,
62,
53,
1567,
272,
13,
11134,
4943,
628,
628
] | 1.893346 | 2,044 |
"""
get_sha(obj, directory::AbstractString = "data", file::AbstractString = "states_current.csv")::String
Navigate the entries in the tree to find the SHA1 of the file at path (directory/file)
"""
function get_sha(obj, directory::AbstractString = "data", file::AbstractString = "states_current.csv")::String
node = obj.node.tree.entries
node_ = node[findfirst(elem -> elem.name == directory, node)].object.entries
node_[findfirst(elem -> elem.name == file, node_)].oid
end
"""
find_shas(obj::GitHubPersonalAccessToken,
id::AbstractString = "MDEwOlJlcG9zaXRvcnkyNDY0MTE2MDc=",
directory::AbstractString = "data",
file::AbstractString = "states_current.csv",
just_last::Bool = false)
Return slug for the repository and SHA1 for the file at directory/file (all versions).
"""
function find_shas(obj::GitHubPersonalAccessToken,
id::AbstractString = "MDEwOlJlcG9zaXRvcnkyNDY0MTE2MDc=",
directory::AbstractString = "data",
file::AbstractString = "states_current.csv",
just_last::Bool = false)
# For testing
# obj = opt.pat
# id = "MDEwOlJlcG9zaXRvcnkyNDY0MTE2MDc="
# directory = "data"
# file = "states_current.csv"
# just_last = false
# The node ID is the repository with slug COVID19Tracking/covid-tracking-data
# The file that has the information we want is at: data/states_current.csv
# uva-bi-sdad/COVID_Tracking_Clean
# id = "MDEwOlJlcG9zaXRvcnkyNTIwNDUwOTQ="
# directory = "data"
# file = "daily.tsv"
# just_last = true
vars = Dict("id" => id,
"path" => "$directory/$file",
# When first started publishing the quality checks
"since" => "2020-03-20T23:00:07Z",
"cursor" => nothing,
"first" => just_last ? 1 : 100)
# The initial request finds out how many commits are for the file
# and the SHA1 for the last 100 commits affecting that file
response = graphql(obj, "Magic", vars, GITHUB_API_QUERY = GITHUB_API_QUERY)
json = JSON3.read(response.Data)
# Get the slug just in case
slug = json.data.node.nameWithOwner
# We store the total count of commits for a final check
total = json.data.node.defaultBranchRef.target.history.totalCount
# We get the SHA1 for each of the file/versions
shas = get_sha.(json.data.node.defaultBranchRef.target.history.edges, directory, file)
just_last && return shas[1]
# This strategy is valid while the total number of commits is below 1,000
@assert total ≤ 1_000 "Code needs to be updated for more than 1,000 commits!"
# If there are more than 100 commits we paginate
while json.data.node.defaultBranchRef.target.history.pageInfo.hasNextPage
response = graphql(obj,
"Magic",
merge(vars, Dict("cursor" => json.data.node.defaultBranchRef.target.history.pageInfo.endCursor)),
GITHUB_API_QUERY = GITHUB_API_QUERY)
json = JSON3.read(response.Data)
append!(shas, get_sha.(json.data.node.defaultBranchRef.target.history.edges, directory, file))
end
# Verify the total number of SHA1 matches the number of commits
@assert slug == "COVID19Tracking/covid-tracking-data" "Repository has been renamed or moved!"
@assert total == length(shas) "Some commit SHA1 were not collected!"
shas
end
"""
get_tbl(sha::AbstractString)
Uses the SHA1 to download from GitHub the version of [COVID19Tracking/covid-tracking-data/data/states_current.csv](https://github.com/COVID19Tracking/covid-tracking-data/blob/master/data/states_current.csv)
"""
function get_tbl(obj::GitHubPersonalAccessToken, sha::AbstractString)
response = restful(obj, "repos/COVID19Tracking/covid-tracking-data/git/blobs/$sha")
@assert response.status == 200
json = JSON3.read(response.body)
data = File(base64decode(json.content),
# select = [:state, :positiveScore, :negativeScore, :negativeRegularScore, :commercialScore, :checkTimeEt, :dataQualityGrade]) |>
) |>
DataFrame
names(data)
colnames = names(data)
if :dataQualityGrade in colnames
data = dropmissing!(data[!,[:state, :checkTimeEt, :dataQualityGrade]])
data[!,:checkTimeEt] = ZonedDateTime.(string.("2020/", data.checkTimeEt, " America/New_York"),
COVID_TRACKING_DT)
elseif all(elem -> elem ∈ colnames, (:positiveScore, :negativeScore, :negativeRegularScore, :commercialScore))
data = dropmissing!(data[!,[:state, :checkTimeEt, :positiveScore, :negativeScore, :negativeRegularScore, :commercialScore]])
data[!,:positiveScore] = isone.(data.positiveScore)
data[!,:negativeScore] = isone.(data.negativeScore)
data[!,:negativeRegularScore] = isone.(data.negativeRegularScore)
data[!,:commercialScore] = isone.(data.commercialScore)
data[!,:checkTimeEt] = ZonedDateTime.(string.("2020/", data.checkTimeEt, " America/New_York"),
COVID_TRACKING_DT)
data[!,:dataQualityGrade] = get.(Ref(Dict(1 => "D", 2 => "C", 3 => "B", 4 => "A")),
data.positiveScore + data.negativeScore + data.negativeRegularScore + data.commercialScore,
missing)
data = data[!,[:state, :checkTimeEt, :dataQualityGrade]]
else
data = DataFrame()
end
data
end
"""
states_daily()
Uses the Covid Tracking API to return the states/daily table.
"""
function states_daily()
response = request("GET", "https://covidtracking.com/api/states/daily.csv")
@assert response.status == 200
data = File(response.body) |>
(tbl -> select(tbl, :state, :dateChecked,
:positive, :negative, :pending,
:hospitalizedCurrently, :hospitalizedCumulative,
:inIcuCurrently, :inIcuCumulative,
:onVentilatorCurrently, :onVentilatorCumulative,
:recovered, :death)) |>
DataFrame
data[!,:dateChecked] = ZonedDateTime.(data.dateChecked, DateFormat("yyyy-mm-ddTHH:MM:SSz"))
rename!(data, :dateChecked => :checkts,
:hospitalizedCurrently => :hospitalized_currently,
:hospitalizedCumulative => :hospitalized_cumulative,
:inIcuCurrently => :icu_currently,
:inIcuCumulative => :icu_cumulative,
:onVentilatorCurrently => :ventilator_currently,
:onVentilatorCumulative => :ventilator_cumulative,
)
end
| [
37811,
198,
220,
220,
220,
651,
62,
26270,
7,
26801,
11,
8619,
3712,
23839,
10100,
796,
366,
7890,
1600,
2393,
3712,
23839,
10100,
796,
366,
27219,
62,
14421,
13,
40664,
1,
2599,
25,
10100,
198,
198,
30575,
10055,
262,
12784,
287,
262,
5509,
284,
1064,
262,
25630,
16,
286,
262,
2393,
379,
3108,
357,
34945,
14,
7753,
8,
198,
37811,
198,
8818,
651,
62,
26270,
7,
26801,
11,
8619,
3712,
23839,
10100,
796,
366,
7890,
1600,
2393,
3712,
23839,
10100,
796,
366,
27219,
62,
14421,
13,
40664,
1,
2599,
25,
10100,
198,
220,
220,
220,
10139,
796,
26181,
13,
17440,
13,
21048,
13,
298,
1678,
198,
220,
220,
220,
10139,
62,
796,
10139,
58,
19796,
11085,
7,
68,
10671,
4613,
9766,
76,
13,
3672,
6624,
8619,
11,
10139,
25295,
15252,
13,
298,
1678,
198,
220,
220,
220,
10139,
62,
58,
19796,
11085,
7,
68,
10671,
4613,
9766,
76,
13,
3672,
6624,
2393,
11,
10139,
62,
25295,
1868,
198,
437,
198,
37811,
198,
220,
220,
220,
1064,
62,
1477,
292,
7,
26801,
3712,
38,
270,
16066,
30228,
15457,
30642,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
3712,
23839,
10100,
796,
366,
44,
7206,
86,
30098,
41,
44601,
38,
24,
4496,
55,
49,
28435,
77,
2584,
8575,
56,
15,
44,
9328,
17,
12740,
66,
28,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8619,
3712,
23839,
10100,
796,
366,
7890,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
3712,
23839,
10100,
796,
366,
27219,
62,
14421,
13,
40664,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
655,
62,
12957,
3712,
33,
970,
796,
3991,
8,
198,
198,
13615,
31065,
329,
262,
16099,
290,
25630,
16,
329,
262,
2393,
379,
8619,
14,
7753,
357,
439,
6300,
737,
198,
37811,
198,
8818,
1064,
62,
1477,
292,
7,
26801,
3712,
38,
270,
16066,
30228,
15457,
30642,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
3712,
23839,
10100,
796,
366,
44,
7206,
86,
30098,
41,
44601,
38,
24,
4496,
55,
49,
28435,
77,
2584,
8575,
56,
15,
44,
9328,
17,
12740,
66,
28,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8619,
3712,
23839,
10100,
796,
366,
7890,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
3712,
23839,
10100,
796,
366,
27219,
62,
14421,
13,
40664,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
655,
62,
12957,
3712,
33,
970,
796,
3991,
8,
198,
220,
220,
220,
1303,
1114,
4856,
198,
220,
220,
220,
1303,
26181,
796,
2172,
13,
8071,
198,
220,
220,
220,
1303,
4686,
796,
366,
44,
7206,
86,
30098,
41,
44601,
38,
24,
4496,
55,
49,
28435,
77,
2584,
8575,
56,
15,
44,
9328,
17,
12740,
66,
2625,
198,
220,
220,
220,
1303,
8619,
796,
366,
7890,
1,
198,
220,
220,
220,
1303,
2393,
796,
366,
27219,
62,
14421,
13,
40664,
1,
198,
220,
220,
220,
1303,
655,
62,
12957,
796,
3991,
198,
220,
220,
220,
1303,
383,
10139,
4522,
318,
262,
16099,
351,
31065,
7375,
11008,
1129,
2898,
5430,
14,
66,
709,
312,
12,
36280,
12,
7890,
198,
220,
220,
220,
1303,
383,
2393,
326,
468,
262,
1321,
356,
765,
318,
379,
25,
1366,
14,
27219,
62,
14421,
13,
40664,
628,
220,
220,
220,
1303,
334,
6862,
12,
8482,
12,
21282,
324,
14,
8220,
11008,
62,
2898,
5430,
62,
32657,
198,
220,
220,
220,
1303,
4686,
796,
366,
44,
7206,
86,
30098,
41,
44601,
38,
24,
4496,
55,
49,
28435,
77,
2584,
11251,
40,
86,
8575,
52,
86,
2394,
48,
2625,
198,
220,
220,
220,
1303,
8619,
796,
366,
7890,
1,
198,
220,
220,
220,
1303,
2393,
796,
366,
29468,
13,
912,
85,
1,
198,
220,
220,
220,
1303,
655,
62,
12957,
796,
2081,
198,
220,
220,
220,
410,
945,
796,
360,
713,
7203,
312,
1,
5218,
4686,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6978,
1,
5218,
17971,
34945,
32624,
7753,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1649,
717,
2067,
12407,
262,
3081,
8794,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
20777,
1,
5218,
366,
42334,
12,
3070,
12,
1238,
51,
1954,
25,
405,
25,
2998,
57,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
66,
21471,
1,
5218,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11085,
1,
5218,
655,
62,
12957,
5633,
352,
1058,
1802,
8,
198,
220,
220,
220,
1303,
383,
4238,
2581,
7228,
503,
703,
867,
23463,
389,
329,
262,
2393,
198,
220,
220,
220,
1303,
290,
262,
25630,
16,
329,
262,
938,
1802,
23463,
13891,
326,
2393,
198,
220,
220,
220,
2882,
796,
4823,
13976,
7,
26801,
11,
366,
22975,
1600,
410,
945,
11,
402,
10554,
10526,
62,
17614,
62,
10917,
19664,
796,
402,
10554,
10526,
62,
17614,
62,
10917,
19664,
8,
198,
220,
220,
220,
33918,
796,
19449,
18,
13,
961,
7,
26209,
13,
6601,
8,
198,
220,
220,
220,
1303,
3497,
262,
31065,
655,
287,
1339,
198,
220,
220,
220,
31065,
796,
33918,
13,
7890,
13,
17440,
13,
3672,
3152,
42419,
198,
220,
220,
220,
1303,
775,
3650,
262,
2472,
954,
286,
23463,
329,
257,
2457,
2198,
198,
220,
220,
220,
2472,
796,
33918,
13,
7890,
13,
17440,
13,
12286,
33,
25642,
8134,
13,
16793,
13,
23569,
13,
23350,
12332,
198,
220,
220,
220,
1303,
775,
651,
262,
25630,
16,
329,
1123,
286,
262,
2393,
14,
47178,
198,
220,
220,
220,
427,
292,
796,
651,
62,
26270,
12195,
17752,
13,
7890,
13,
17440,
13,
12286,
33,
25642,
8134,
13,
16793,
13,
23569,
13,
276,
3212,
11,
8619,
11,
2393,
8,
198,
220,
220,
220,
655,
62,
12957,
11405,
1441,
427,
292,
58,
16,
60,
198,
220,
220,
220,
1303,
770,
4811,
318,
4938,
981,
262,
2472,
1271,
286,
23463,
318,
2174,
352,
11,
830,
198,
220,
220,
220,
2488,
30493,
2472,
41305,
352,
62,
830,
366,
10669,
2476,
284,
307,
6153,
329,
517,
621,
352,
11,
830,
23463,
2474,
198,
220,
220,
220,
1303,
1002,
612,
389,
517,
621,
1802,
23463,
356,
42208,
4559,
198,
220,
220,
220,
981,
33918,
13,
7890,
13,
17440,
13,
12286,
33,
25642,
8134,
13,
16793,
13,
23569,
13,
7700,
12360,
13,
10134,
10019,
9876,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
4823,
13976,
7,
26801,
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,
366,
22975,
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,
20121,
7,
85,
945,
11,
360,
713,
7203,
66,
21471,
1,
5218,
33918,
13,
7890,
13,
17440,
13,
12286,
33,
25642,
8134,
13,
16793,
13,
23569,
13,
7700,
12360,
13,
437,
34,
21471,
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,
402,
10554,
10526,
62,
17614,
62,
10917,
19664,
796,
402,
10554,
10526,
62,
17614,
62,
10917,
19664,
8,
198,
220,
220,
220,
220,
220,
220,
220,
33918,
796,
19449,
18,
13,
961,
7,
26209,
13,
6601,
8,
198,
220,
220,
220,
220,
220,
220,
220,
24443,
0,
7,
1477,
292,
11,
651,
62,
26270,
12195,
17752,
13,
7890,
13,
17440,
13,
12286,
33,
25642,
8134,
13,
16793,
13,
23569,
13,
276,
3212,
11,
8619,
11,
2393,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1303,
49899,
262,
2472,
1271,
286,
25630,
16,
7466,
262,
1271,
286,
23463,
198,
220,
220,
220,
2488,
30493,
31065,
6624,
366,
8220,
11008,
1129,
2898,
5430,
14,
66,
709,
312,
12,
36280,
12,
7890,
1,
366,
6207,
13264,
468,
587,
25121,
393,
3888,
2474,
198,
220,
220,
220,
2488,
30493,
2472,
6624,
4129,
7,
1477,
292,
8,
366,
4366,
4589,
25630,
16,
547,
407,
7723,
2474,
198,
220,
220,
220,
427,
292,
198,
437,
198,
37811,
198,
220,
220,
220,
651,
62,
83,
2436,
7,
26270,
3712,
23839,
10100,
8,
198,
198,
5842,
274,
262,
25630,
16,
284,
4321,
422,
21722,
262,
2196,
286,
685,
8220,
11008,
1129,
2898,
5430,
14,
66,
709,
312,
12,
36280,
12,
7890,
14,
7890,
14,
27219,
62,
14421,
13,
40664,
16151,
5450,
1378,
12567,
13,
785,
14,
8220,
11008,
1129,
2898,
5430,
14,
66,
709,
312,
12,
36280,
12,
7890,
14,
2436,
672,
14,
9866,
14,
7890,
14,
27219,
62,
14421,
13,
40664,
8,
198,
37811,
198,
8818,
651,
62,
83,
2436,
7,
26801,
3712,
38,
270,
16066,
30228,
15457,
30642,
11,
427,
64,
3712,
23839,
10100,
8,
198,
220,
220,
220,
2882,
796,
1334,
913,
7,
26801,
11,
366,
260,
1930,
14,
8220,
11008,
1129,
2898,
5430,
14,
66,
709,
312,
12,
36280,
12,
7890,
14,
18300,
14,
2436,
8158,
32624,
26270,
4943,
198,
220,
220,
220,
2488,
30493,
2882,
13,
13376,
6624,
939,
198,
220,
220,
220,
33918,
796,
19449,
18,
13,
961,
7,
26209,
13,
2618,
8,
198,
220,
220,
220,
1366,
796,
9220,
7,
8692,
2414,
12501,
1098,
7,
17752,
13,
11299,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2922,
796,
685,
25,
5219,
11,
1058,
24561,
26595,
11,
1058,
31591,
26595,
11,
1058,
31591,
40164,
26595,
11,
1058,
36313,
26595,
11,
1058,
9122,
7575,
36,
83,
11,
1058,
7890,
35013,
42233,
12962,
930,
29,
198,
220,
220,
220,
1267,
930,
29,
198,
220,
220,
220,
220,
220,
220,
220,
6060,
19778,
198,
220,
220,
220,
220,
220,
220,
220,
3891,
7,
7890,
8,
198,
220,
220,
220,
951,
14933,
796,
3891,
7,
7890,
8,
198,
220,
220,
220,
611,
1058,
7890,
35013,
42233,
287,
951,
14933,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
4268,
45688,
0,
7,
7890,
58,
0,
17414,
25,
5219,
11,
1058,
9122,
7575,
36,
83,
11,
1058,
7890,
35013,
42233,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
9122,
7575,
36,
83,
60,
796,
1168,
12004,
10430,
7575,
12195,
8841,
13,
7203,
42334,
14,
1600,
1366,
13,
9122,
7575,
36,
83,
11,
366,
2253,
14,
3791,
62,
49278,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7375,
11008,
62,
5446,
8120,
2751,
62,
24544,
8,
198,
220,
220,
220,
2073,
361,
477,
7,
68,
10671,
4613,
9766,
76,
18872,
230,
951,
14933,
11,
357,
25,
24561,
26595,
11,
1058,
31591,
26595,
11,
1058,
31591,
40164,
26595,
11,
1058,
36313,
26595,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
4268,
45688,
0,
7,
7890,
58,
0,
17414,
25,
5219,
11,
1058,
9122,
7575,
36,
83,
11,
1058,
24561,
26595,
11,
1058,
31591,
26595,
11,
1058,
31591,
40164,
26595,
11,
1058,
36313,
26595,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
24561,
26595,
60,
796,
318,
505,
12195,
7890,
13,
24561,
26595,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
31591,
26595,
60,
796,
318,
505,
12195,
7890,
13,
31591,
26595,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
31591,
40164,
26595,
60,
796,
318,
505,
12195,
7890,
13,
31591,
40164,
26595,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
36313,
26595,
60,
796,
318,
505,
12195,
7890,
13,
36313,
26595,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
9122,
7575,
36,
83,
60,
796,
1168,
12004,
10430,
7575,
12195,
8841,
13,
7203,
42334,
14,
1600,
1366,
13,
9122,
7575,
36,
83,
11,
366,
2253,
14,
3791,
62,
49278,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7375,
11008,
62,
5446,
8120,
2751,
62,
24544,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
58,
28265,
25,
7890,
35013,
42233,
60,
796,
651,
12195,
8134,
7,
35,
713,
7,
16,
5218,
366,
35,
1600,
362,
5218,
366,
34,
1600,
513,
5218,
366,
33,
1600,
604,
5218,
366,
32,
4943,
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,
1366,
13,
24561,
26595,
1343,
1366,
13,
31591,
26595,
1343,
1366,
13,
31591,
40164,
26595,
1343,
1366,
13,
36313,
26595,
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,
4814,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
1366,
58,
0,
17414,
25,
5219,
11,
1058,
9122,
7575,
36,
83,
11,
1058,
7890,
35013,
42233,
11907,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
6060,
19778,
3419,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1366,
198,
437,
198,
37811,
198,
220,
220,
220,
2585,
62,
29468,
3419,
198,
198,
5842,
274,
262,
39751,
312,
37169,
7824,
284,
1441,
262,
2585,
14,
29468,
3084,
13,
198,
37811,
198,
8818,
2585,
62,
29468,
3419,
198,
220,
220,
220,
2882,
796,
2581,
7203,
18851,
1600,
366,
5450,
1378,
66,
709,
312,
36280,
13,
785,
14,
15042,
14,
27219,
14,
29468,
13,
40664,
4943,
198,
220,
220,
220,
2488,
30493,
2882,
13,
13376,
6624,
939,
198,
220,
220,
220,
1366,
796,
9220,
7,
26209,
13,
2618,
8,
930,
29,
198,
220,
220,
220,
220,
220,
220,
220,
357,
83,
2436,
4613,
2922,
7,
83,
2436,
11,
1058,
5219,
11,
1058,
4475,
9787,
276,
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,
1058,
24561,
11,
1058,
31591,
11,
1058,
79,
1571,
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,
1058,
49257,
1143,
21327,
11,
1058,
49257,
1143,
34,
388,
13628,
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,
1058,
259,
40,
27399,
21327,
11,
1058,
259,
40,
27399,
34,
388,
13628,
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,
1058,
261,
53,
298,
346,
1352,
21327,
11,
1058,
261,
53,
298,
346,
1352,
34,
388,
13628,
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,
1058,
8344,
2557,
11,
1058,
22595,
4008,
930,
29,
198,
220,
220,
220,
220,
220,
220,
220,
6060,
19778,
198,
220,
220,
220,
1366,
58,
28265,
25,
4475,
9787,
276,
60,
796,
1168,
12004,
10430,
7575,
12195,
7890,
13,
4475,
9787,
276,
11,
7536,
26227,
7203,
22556,
22556,
12,
3020,
12,
1860,
4221,
39,
25,
12038,
25,
5432,
89,
48774,
198,
220,
220,
220,
36265,
0,
7,
7890,
11,
1058,
4475,
9787,
276,
5218,
1058,
9122,
912,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
49257,
1143,
21327,
5218,
1058,
49257,
1143,
62,
41745,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
49257,
1143,
34,
388,
13628,
5218,
1058,
49257,
1143,
62,
36340,
13628,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
259,
40,
27399,
21327,
5218,
1058,
291,
84,
62,
41745,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
259,
40,
27399,
34,
388,
13628,
5218,
1058,
291,
84,
62,
36340,
13628,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
261,
53,
298,
346,
1352,
21327,
5218,
1058,
1151,
346,
1352,
62,
41745,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
261,
53,
298,
346,
1352,
34,
388,
13628,
5218,
1058,
1151,
346,
1352,
62,
36340,
13628,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
437,
198
] | 2.323721 | 2,913 |
const LICENSE_DIR = normpath(joinpath(@__DIR__, "..", "licenses"))
const LICENSES = Dict(
"MIT" => "MIT \"Expat\" License",
"BSD2" => "Simplified \"2-clause\" BSD License",
"BSD3" => "Modified \"3-clause\" BSD License",
"ISC" => "Internet Systems Consortium License",
"ASL" => "Apache License, Version 2.0",
"MPL" => "Mozilla Public License, Version 2.0",
"GPL-2.0+" => "GNU Public License, Version 2.0+",
"GPL-3.0+" => "GNU Public License, Version 3.0+",
"LGPL-2.1+" => "Lesser GNU Public License, Version 2.1+",
"LGPL-3.0+" => "Lesser GNU Public License, Version 3.0+",
"EUPL-1.2+" => "European Union Public Licence, Version 1.2+",
)
"""
available_licenses([io::IO]) -> Nothing
Print the names of all available licenses.
"""
available_licenses(io::IO) = print(io, join(("$k: $v" for (k, v) in LICENSES), "\n"))
available_licenses() = available_licenses(stdout)
"""
show_license([io::IO], license::AbstractString) -> Nothing
Print the text of `license`. Errors if the license is not found.
"""
show_license(io::IO, license::AbstractString) = print(io, read_license(license))
show_license(license::AbstractString) = show_license(stdout, license)
"""
read_license(license::AbstractString) -> String
Returns the contents of `license`. Errors if the license is not found. Use
[`available_licenses`](@ref) to view available licenses.
"""
function read_license(license::AbstractString)
path = joinpath(LICENSE_DIR, license)
if isfile(path)
return string(readchomp(path))
else
throw(ArgumentError("License '$license' is not available"))
end
end
| [
9979,
38559,
24290,
62,
34720,
796,
2593,
6978,
7,
22179,
6978,
7,
31,
834,
34720,
834,
11,
366,
492,
1600,
366,
677,
4541,
48774,
198,
9979,
38559,
16938,
1546,
796,
360,
713,
7,
198,
220,
220,
220,
366,
36393,
1,
5218,
366,
36393,
19990,
3109,
8071,
7879,
13789,
1600,
198,
220,
220,
220,
366,
21800,
17,
1,
5218,
366,
8890,
489,
1431,
19990,
17,
12,
565,
682,
7879,
347,
10305,
13789,
1600,
198,
220,
220,
220,
366,
21800,
18,
1,
5218,
366,
5841,
1431,
19990,
18,
12,
565,
682,
7879,
347,
10305,
13789,
1600,
198,
220,
220,
220,
366,
37719,
1,
5218,
366,
28566,
11998,
42727,
13789,
1600,
198,
220,
220,
220,
366,
1921,
43,
1,
5218,
366,
25189,
4891,
13789,
11,
10628,
362,
13,
15,
1600,
198,
220,
220,
220,
366,
44,
6489,
1,
5218,
366,
44,
8590,
5049,
5094,
13789,
11,
10628,
362,
13,
15,
1600,
198,
220,
220,
220,
366,
38,
6489,
12,
17,
13,
15,
10,
1,
5218,
366,
16630,
52,
5094,
13789,
11,
10628,
362,
13,
15,
10,
1600,
198,
220,
220,
220,
366,
38,
6489,
12,
18,
13,
15,
10,
1,
5218,
366,
16630,
52,
5094,
13789,
11,
10628,
513,
13,
15,
10,
1600,
198,
220,
220,
220,
366,
41257,
6489,
12,
17,
13,
16,
10,
1,
5218,
366,
22058,
263,
22961,
5094,
13789,
11,
10628,
362,
13,
16,
10,
1600,
198,
220,
220,
220,
366,
41257,
6489,
12,
18,
13,
15,
10,
1,
5218,
366,
22058,
263,
22961,
5094,
13789,
11,
10628,
513,
13,
15,
10,
1600,
198,
220,
220,
220,
366,
19684,
6489,
12,
16,
13,
17,
10,
1,
5218,
366,
22030,
4479,
5094,
10483,
594,
11,
10628,
352,
13,
17,
10,
1600,
198,
8,
198,
198,
37811,
198,
220,
220,
220,
1695,
62,
677,
4541,
26933,
952,
3712,
9399,
12962,
4613,
10528,
198,
198,
18557,
262,
3891,
286,
477,
1695,
16625,
13,
198,
37811,
198,
15182,
62,
677,
4541,
7,
952,
3712,
9399,
8,
796,
3601,
7,
952,
11,
4654,
7,
7203,
3,
74,
25,
720,
85,
1,
329,
357,
74,
11,
410,
8,
287,
38559,
16938,
1546,
828,
37082,
77,
48774,
198,
15182,
62,
677,
4541,
3419,
796,
1695,
62,
677,
4541,
7,
19282,
448,
8,
198,
198,
37811,
198,
220,
220,
220,
905,
62,
43085,
26933,
952,
3712,
9399,
4357,
5964,
3712,
23839,
10100,
8,
4613,
10528,
198,
198,
18557,
262,
2420,
286,
4600,
43085,
44646,
44225,
611,
262,
5964,
318,
407,
1043,
13,
198,
37811,
198,
12860,
62,
43085,
7,
952,
3712,
9399,
11,
5964,
3712,
23839,
10100,
8,
796,
3601,
7,
952,
11,
1100,
62,
43085,
7,
43085,
4008,
198,
12860,
62,
43085,
7,
43085,
3712,
23839,
10100,
8,
796,
905,
62,
43085,
7,
19282,
448,
11,
5964,
8,
198,
198,
37811,
198,
220,
220,
220,
1100,
62,
43085,
7,
43085,
3712,
23839,
10100,
8,
4613,
10903,
198,
198,
35561,
262,
10154,
286,
4600,
43085,
44646,
44225,
611,
262,
5964,
318,
407,
1043,
13,
5765,
198,
58,
63,
15182,
62,
677,
4541,
63,
16151,
31,
5420,
8,
284,
1570,
1695,
16625,
13,
198,
37811,
198,
8818,
1100,
62,
43085,
7,
43085,
3712,
23839,
10100,
8,
198,
220,
220,
220,
3108,
796,
4654,
6978,
7,
43,
2149,
24290,
62,
34720,
11,
5964,
8,
198,
220,
220,
220,
611,
318,
7753,
7,
6978,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
4731,
7,
961,
354,
3361,
7,
6978,
4008,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
3714,
7,
28100,
1713,
12331,
7203,
34156,
705,
3,
43085,
6,
318,
407,
1695,
48774,
198,
220,
220,
220,
886,
198,
437,
198
] | 2.730769 | 598 |
using GridapGmsh
using GridapGmsh: gmsh, GmshDiscreteModel
function add_pin!(gmsh, o, r, t, lc)
factory = gmsh.model.geo
# inner and outer circle
l1 = add_circle!(gmsh, o, r, lc)
l2 = add_circle!(gmsh, o, r + t, lc)
s1 = factory.addPlaneSurface([l1])
s2 = factory.addPlaneSurface([l2, l1]) # l1 is a hole
return s1, s2
end
function add_circle!(gmsh, o, r, lc)
factory = gmsh.model.geo
ox, oy = o
p1 = factory.addPoint(ox, oy, 0, lc) # center - origin
p2 = factory.addPoint(ox + r, oy, 0, lc) # right
p3 = factory.addPoint(ox, oy + r, 0, lc) # up
p4 = factory.addPoint(ox - r, oy, 0, lc) # left
p5 = factory.addPoint(ox, oy - r, 0, lc) # down
c1 = factory.addCircleArc(p2, p1, p3)
c2 = factory.addCircleArc(p3, p1, p4)
c3 = factory.addCircleArc(p4, p1, p5)
c4 = factory.addCircleArc(p5, p1, p2)
l1 = factory.addCurveLoop([c1, c2, c3, c4])
return l1
end
function add_square!(gmsh, s)
factory = gmsh.model.geo
p1 = factory.addPoint(0, 0, 0, lc)
p2 = factory.addPoint(s, 0, 0, lc)
p3 = factory.addPoint(s, s, 0, lc)
p4 = factory.addPoint(0, s, 0, lc)
l1 = factory.addLine(p1, p2)
l2 = factory.addLine(p2, p3)
l3 = factory.addLine(p3, p4)
l4 = factory.addLine(p4, p1)
cl1 = factory.addCurveLoop([l1, l2, l3, l4])
return cl1
end
N = 4
# in cm
p = 1.6 # pitch
ri = 0.5 # internal radius
t = 0.1 # wall thickness
ro = ri + t # external radius
lc = 0.1
gmsh.initialize()
gmsh.model.add("bwr")
# tags
pinTags = Int32[]
cladTags = Int32[]
gdPinTags = Int32[]
# gd pins positions
GD_pos = [(2, 3), (3, 2)]
for i in 1:N, j in 1:N
xo = p / 2 + (i - 1) * p
yo = p / 2 + (j - 1) * p
pinTag, cladTag = add_pin!(gmsh, (xo, yo), ri, t, lc)
push!(cladTags, cladTag)
if (i, j) in GD_pos
push!(gdPinTags, pinTag)
else
push!(pinTags, pinTag)
end
end
#! TODO: h2oTag = add_reflector!(gmsh, 4p)
s = N * p
factory = gmsh.model.geo
p1 = factory.addPoint(0, 0, 0, lc)
p2 = factory.addPoint(s, 0, 0, lc)
p3 = factory.addPoint(s, s, 0, lc)
p4 = factory.addPoint(0, s, 0, lc)
l1 = factory.addLine(p1, p2)
l2 = factory.addLine(p2, p3)
l3 = factory.addLine(p3, p4)
l4 = factory.addLine(p4, p1)
cl1 = factory.addCurveLoop([l1, l2, l3, l4])
h2oTag = factory.addPlaneSurface(vcat(cl1, pinTags, cladTags, gdPinTags))
pg1 = gmsh.model.geo.addPhysicalGroup(2, pinTags)
pg2 = gmsh.model.geo.addPhysicalGroup(2, cladTags)
pg3 = gmsh.model.geo.addPhysicalGroup(2, gdPinTags)
pg4 = gmsh.model.geo.addPhysicalGroup(2, [h2oTag])
pg5 = gmsh.model.geo.addPhysicalGroup(1, [l1])
pg6 = gmsh.model.geo.addPhysicalGroup(1, [l2])
pg7 = gmsh.model.geo.addPhysicalGroup(1, [l3])
pg8 = gmsh.model.geo.addPhysicalGroup(1, [l4])
gmsh.model.setPhysicalName(2, pg1, "pin")
gmsh.model.setPhysicalName(2, pg2, "cladding")
gmsh.model.setPhysicalName(2, pg3, "pin-gd")
gmsh.model.setPhysicalName(2, pg4, "water")
gmsh.model.setPhysicalName(1, pg5, "bottom")
gmsh.model.setPhysicalName(1, pg6, "right")
gmsh.model.setPhysicalName(1, pg7, "top")
gmsh.model.setPhysicalName(1, pg8, "left")
# removemos puntos de la geometria duplicados (origenes por ejemplo)
gmsh.model.geo.removeAllDuplicates()
gmsh.model.geo.synchronize()
gmsh.model.mesh.generate(2)
gmsh.write("bwr.msh")
if !("-nopopup" in ARGS)
gmsh.fltk.run()
end
gmsh.finalize()
using Gridap
mshfile = joinpath(@__DIR__,"../bwr.msh")
model = GmshDiscreteModel(mshfile; renumber=true)
Gridap.Io.to_json_file(model, "bwr.json")
jsonfile = joinpath(@__DIR__,"../bwr.json")
model = DiscreteModelFromFile(jsonfile)
# number of azimuthal angles
nφ = 16
# azimuthal spacing
δ = 0.002
# boundary conditions
bcs = BoundaryConditions(top=Reflective, bottom=Reflective, left=Reflective, right=Reflective)
# initialize track generator
tg = TrackGenerator(model, nφ, δ, bcs=bcs)
# perform ray tracing
trace!(tg)
# proceed to segmentation
segmentize!(tg) | [
3500,
24846,
499,
38,
907,
71,
198,
3500,
24846,
499,
38,
907,
71,
25,
308,
907,
71,
11,
402,
907,
71,
15642,
8374,
17633,
198,
198,
8818,
751,
62,
11635,
0,
7,
70,
907,
71,
11,
267,
11,
374,
11,
256,
11,
300,
66,
8,
198,
220,
220,
220,
8860,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
628,
220,
220,
220,
1303,
8434,
290,
12076,
9197,
198,
220,
220,
220,
300,
16,
796,
751,
62,
45597,
0,
7,
70,
907,
71,
11,
267,
11,
374,
11,
300,
66,
8,
198,
220,
220,
220,
300,
17,
796,
751,
62,
45597,
0,
7,
70,
907,
71,
11,
267,
11,
374,
1343,
256,
11,
300,
66,
8,
628,
220,
220,
220,
264,
16,
796,
8860,
13,
2860,
3646,
1531,
14214,
2550,
26933,
75,
16,
12962,
198,
220,
220,
220,
264,
17,
796,
8860,
13,
2860,
3646,
1531,
14214,
2550,
26933,
75,
17,
11,
300,
16,
12962,
1303,
300,
16,
318,
257,
7604,
628,
220,
220,
220,
1441,
264,
16,
11,
264,
17,
198,
437,
198,
198,
8818,
751,
62,
45597,
0,
7,
70,
907,
71,
11,
267,
11,
374,
11,
300,
66,
8,
198,
220,
220,
220,
8860,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
198,
220,
220,
220,
12018,
11,
35104,
796,
267,
628,
220,
220,
220,
279,
16,
796,
8860,
13,
2860,
12727,
7,
1140,
11,
35104,
11,
657,
11,
300,
66,
8,
220,
1303,
3641,
532,
8159,
198,
220,
220,
220,
279,
17,
796,
8860,
13,
2860,
12727,
7,
1140,
1343,
374,
11,
35104,
11,
657,
11,
300,
66,
8,
220,
1303,
826,
198,
220,
220,
220,
279,
18,
796,
8860,
13,
2860,
12727,
7,
1140,
11,
35104,
1343,
374,
11,
657,
11,
300,
66,
8,
220,
1303,
510,
198,
220,
220,
220,
279,
19,
796,
8860,
13,
2860,
12727,
7,
1140,
532,
374,
11,
35104,
11,
657,
11,
300,
66,
8,
220,
1303,
1364,
198,
220,
220,
220,
279,
20,
796,
8860,
13,
2860,
12727,
7,
1140,
11,
35104,
532,
374,
11,
657,
11,
300,
66,
8,
220,
1303,
866,
628,
220,
220,
220,
269,
16,
796,
8860,
13,
2860,
31560,
293,
24021,
7,
79,
17,
11,
279,
16,
11,
279,
18,
8,
198,
220,
220,
220,
269,
17,
796,
8860,
13,
2860,
31560,
293,
24021,
7,
79,
18,
11,
279,
16,
11,
279,
19,
8,
198,
220,
220,
220,
269,
18,
796,
8860,
13,
2860,
31560,
293,
24021,
7,
79,
19,
11,
279,
16,
11,
279,
20,
8,
198,
220,
220,
220,
269,
19,
796,
8860,
13,
2860,
31560,
293,
24021,
7,
79,
20,
11,
279,
16,
11,
279,
17,
8,
628,
220,
220,
220,
300,
16,
796,
8860,
13,
2860,
26628,
303,
39516,
26933,
66,
16,
11,
269,
17,
11,
269,
18,
11,
269,
19,
12962,
628,
220,
220,
220,
1441,
300,
16,
198,
437,
198,
198,
8818,
751,
62,
23415,
0,
7,
70,
907,
71,
11,
264,
8,
198,
220,
220,
220,
8860,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
628,
220,
220,
220,
279,
16,
796,
8860,
13,
2860,
12727,
7,
15,
11,
657,
11,
657,
11,
300,
66,
8,
198,
220,
220,
220,
279,
17,
796,
8860,
13,
2860,
12727,
7,
82,
11,
657,
11,
657,
11,
300,
66,
8,
198,
220,
220,
220,
279,
18,
796,
8860,
13,
2860,
12727,
7,
82,
11,
264,
11,
657,
11,
300,
66,
8,
198,
220,
220,
220,
279,
19,
796,
8860,
13,
2860,
12727,
7,
15,
11,
264,
11,
657,
11,
300,
66,
8,
628,
220,
220,
220,
300,
16,
796,
8860,
13,
2860,
13949,
7,
79,
16,
11,
279,
17,
8,
198,
220,
220,
220,
300,
17,
796,
8860,
13,
2860,
13949,
7,
79,
17,
11,
279,
18,
8,
198,
220,
220,
220,
300,
18,
796,
8860,
13,
2860,
13949,
7,
79,
18,
11,
279,
19,
8,
198,
220,
220,
220,
300,
19,
796,
8860,
13,
2860,
13949,
7,
79,
19,
11,
279,
16,
8,
628,
220,
220,
220,
537,
16,
796,
8860,
13,
2860,
26628,
303,
39516,
26933,
75,
16,
11,
300,
17,
11,
300,
18,
11,
300,
19,
12962,
628,
220,
220,
220,
1441,
537,
16,
198,
437,
198,
198,
45,
796,
604,
198,
198,
2,
287,
12067,
198,
79,
796,
352,
13,
21,
220,
220,
220,
220,
220,
220,
220,
1303,
7078,
198,
380,
796,
657,
13,
20,
220,
220,
220,
220,
220,
220,
1303,
5387,
16874,
198,
83,
796,
657,
13,
16,
220,
220,
220,
220,
220,
220,
220,
1303,
3355,
20735,
198,
305,
796,
374,
72,
1343,
256,
220,
220,
220,
1303,
7097,
16874,
198,
44601,
796,
657,
13,
16,
198,
198,
70,
907,
71,
13,
36733,
1096,
3419,
198,
70,
907,
71,
13,
19849,
13,
2860,
7203,
65,
18351,
4943,
198,
198,
2,
15940,
198,
11635,
36142,
796,
2558,
2624,
21737,
198,
29853,
36142,
796,
2558,
2624,
21737,
198,
21287,
28348,
36142,
796,
2558,
2624,
21737,
198,
198,
2,
308,
67,
20567,
6116,
198,
45113,
62,
1930,
796,
47527,
17,
11,
513,
828,
357,
18,
11,
362,
15437,
198,
198,
1640,
1312,
287,
352,
25,
45,
11,
474,
287,
352,
25,
45,
198,
220,
220,
220,
2124,
78,
796,
279,
1220,
362,
1343,
357,
72,
532,
352,
8,
1635,
279,
198,
220,
220,
220,
27406,
796,
279,
1220,
362,
1343,
357,
73,
532,
352,
8,
1635,
279,
628,
220,
220,
220,
6757,
24835,
11,
38186,
24835,
796,
751,
62,
11635,
0,
7,
70,
907,
71,
11,
357,
87,
78,
11,
27406,
828,
374,
72,
11,
256,
11,
300,
66,
8,
198,
220,
220,
220,
4574,
0,
7,
29853,
36142,
11,
38186,
24835,
8,
198,
220,
220,
220,
611,
357,
72,
11,
474,
8,
287,
27044,
62,
1930,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
21287,
28348,
36142,
11,
6757,
24835,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
11635,
36142,
11,
6757,
24835,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
2,
0,
16926,
46,
25,
289,
17,
78,
24835,
796,
751,
62,
35051,
273,
0,
7,
70,
907,
71,
11,
604,
79,
8,
198,
82,
796,
399,
1635,
279,
198,
69,
9548,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
198,
198,
79,
16,
796,
8860,
13,
2860,
12727,
7,
15,
11,
657,
11,
657,
11,
300,
66,
8,
198,
79,
17,
796,
8860,
13,
2860,
12727,
7,
82,
11,
657,
11,
657,
11,
300,
66,
8,
198,
79,
18,
796,
8860,
13,
2860,
12727,
7,
82,
11,
264,
11,
657,
11,
300,
66,
8,
198,
79,
19,
796,
8860,
13,
2860,
12727,
7,
15,
11,
264,
11,
657,
11,
300,
66,
8,
198,
198,
75,
16,
796,
8860,
13,
2860,
13949,
7,
79,
16,
11,
279,
17,
8,
198,
75,
17,
796,
8860,
13,
2860,
13949,
7,
79,
17,
11,
279,
18,
8,
198,
75,
18,
796,
8860,
13,
2860,
13949,
7,
79,
18,
11,
279,
19,
8,
198,
75,
19,
796,
8860,
13,
2860,
13949,
7,
79,
19,
11,
279,
16,
8,
198,
198,
565,
16,
796,
8860,
13,
2860,
26628,
303,
39516,
26933,
75,
16,
11,
300,
17,
11,
300,
18,
11,
300,
19,
12962,
198,
198,
71,
17,
78,
24835,
796,
8860,
13,
2860,
3646,
1531,
14214,
2550,
7,
85,
9246,
7,
565,
16,
11,
6757,
36142,
11,
38186,
36142,
11,
308,
67,
28348,
36142,
4008,
198,
198,
6024,
16,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
17,
11,
6757,
36142,
8,
198,
6024,
17,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
17,
11,
38186,
36142,
8,
198,
6024,
18,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
17,
11,
308,
67,
28348,
36142,
8,
198,
6024,
19,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
17,
11,
685,
71,
17,
78,
24835,
12962,
198,
6024,
20,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
16,
11,
685,
75,
16,
12962,
198,
6024,
21,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
16,
11,
685,
75,
17,
12962,
198,
6024,
22,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
16,
11,
685,
75,
18,
12962,
198,
6024,
23,
796,
308,
907,
71,
13,
19849,
13,
469,
78,
13,
2860,
31611,
13247,
7,
16,
11,
685,
75,
19,
12962,
198,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
17,
11,
23241,
16,
11,
366,
11635,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
17,
11,
23241,
17,
11,
366,
565,
26872,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
17,
11,
23241,
18,
11,
366,
11635,
12,
21287,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
17,
11,
23241,
19,
11,
366,
7050,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
16,
11,
23241,
20,
11,
366,
22487,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
16,
11,
23241,
21,
11,
366,
3506,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
16,
11,
23241,
22,
11,
366,
4852,
4943,
198,
70,
907,
71,
13,
19849,
13,
2617,
31611,
5376,
7,
16,
11,
23241,
23,
11,
366,
9464,
4943,
198,
198,
2,
4781,
16785,
35363,
418,
390,
8591,
4903,
908,
7496,
14184,
291,
22484,
357,
273,
9324,
274,
16964,
304,
73,
18856,
78,
8,
198,
70,
907,
71,
13,
19849,
13,
469,
78,
13,
28956,
3237,
35660,
489,
16856,
3419,
198,
198,
70,
907,
71,
13,
19849,
13,
469,
78,
13,
28869,
11413,
1096,
3419,
198,
198,
70,
907,
71,
13,
19849,
13,
76,
5069,
13,
8612,
378,
7,
17,
8,
198,
198,
70,
907,
71,
13,
13564,
7203,
65,
18351,
13,
907,
71,
4943,
198,
198,
361,
5145,
7203,
12,
77,
404,
404,
929,
1,
287,
5923,
14313,
8,
198,
220,
220,
220,
308,
907,
71,
13,
69,
2528,
74,
13,
5143,
3419,
198,
437,
198,
198,
70,
907,
71,
13,
20311,
1096,
3419,
198,
198,
3500,
24846,
499,
198,
907,
71,
7753,
796,
4654,
6978,
7,
31,
834,
34720,
834,
553,
40720,
65,
18351,
13,
907,
71,
4943,
198,
19849,
796,
402,
907,
71,
15642,
8374,
17633,
7,
907,
71,
7753,
26,
8851,
4494,
28,
7942,
8,
198,
41339,
499,
13,
40,
78,
13,
1462,
62,
17752,
62,
7753,
7,
19849,
11,
366,
65,
18351,
13,
17752,
4943,
198,
198,
17752,
7753,
796,
4654,
6978,
7,
31,
834,
34720,
834,
553,
40720,
65,
18351,
13,
17752,
4943,
198,
19849,
796,
8444,
8374,
17633,
4863,
8979,
7,
17752,
7753,
8,
198,
198,
2,
1271,
286,
35560,
320,
1071,
282,
18333,
198,
77,
139,
228,
796,
1467,
198,
198,
2,
35560,
320,
1071,
282,
31050,
198,
138,
112,
796,
657,
13,
21601,
198,
198,
2,
18645,
3403,
198,
65,
6359,
796,
30149,
560,
25559,
1756,
7,
4852,
28,
8134,
801,
425,
11,
4220,
28,
8134,
801,
425,
11,
1364,
28,
8134,
801,
425,
11,
826,
28,
8134,
801,
425,
8,
198,
198,
2,
41216,
2610,
17301,
198,
25297,
796,
17762,
8645,
1352,
7,
19849,
11,
299,
139,
228,
11,
7377,
112,
11,
275,
6359,
28,
65,
6359,
8,
198,
198,
2,
1620,
26842,
35328,
198,
40546,
0,
7,
25297,
8,
198,
198,
2,
5120,
284,
10618,
341,
198,
325,
5154,
1096,
0,
7,
25297,
8
] | 2.077929 | 1,912 |
import SpecialFunctions: digamma, gamma
using Neighborhood: Theiler, KDTree, bulksearch
abstract type NearestNeighborEntropyEstimator <: EntropyEstimator end
function maximum_neighbor_distances(pts, est::EntropyEstimator)
theiler = Theiler(est.w)
est.w >= 0 || error("w, the number of neighbors to exclude, must be >= 0")
tree = KDTree(pts) # Euclidean metric forced
idxs, dists = bulksearch(tree, pts.data, NeighborNumber(est.k), theiler)
# Distance to k-th nearest neighbor for each of the points
return [d[end] for d in dists]
end
"Volume of a unit ball in R^d."
ball_volume(d::Int) = π^(d/2)/gamma((d/2)+1)
include("KozachenkoLeonenko.jl")
include("Kraskov.jl") | [
11748,
6093,
24629,
2733,
25,
3100,
321,
2611,
11,
34236,
198,
3500,
37914,
25,
383,
5329,
11,
509,
24544,
631,
11,
11963,
12947,
198,
198,
397,
8709,
2099,
3169,
12423,
46445,
2865,
14539,
28338,
22362,
320,
1352,
1279,
25,
7232,
28338,
22362,
320,
1352,
886,
198,
198,
8818,
5415,
62,
710,
394,
2865,
62,
17080,
1817,
7,
457,
82,
11,
1556,
3712,
14539,
28338,
22362,
320,
1352,
8,
198,
220,
220,
220,
262,
5329,
796,
383,
5329,
7,
395,
13,
86,
8,
198,
220,
220,
220,
1556,
13,
86,
18189,
657,
8614,
4049,
7203,
86,
11,
262,
1271,
286,
12020,
284,
19607,
11,
1276,
307,
18189,
657,
4943,
198,
220,
220,
220,
5509,
796,
509,
24544,
631,
7,
457,
82,
8,
1303,
48862,
485,
272,
18663,
4137,
198,
220,
220,
220,
4686,
34223,
11,
288,
1023,
796,
11963,
12947,
7,
21048,
11,
43344,
13,
7890,
11,
28708,
15057,
7,
395,
13,
74,
828,
262,
5329,
8,
198,
220,
220,
220,
1303,
34600,
284,
479,
12,
400,
16936,
4780,
329,
1123,
286,
262,
2173,
198,
220,
220,
220,
1441,
685,
67,
58,
437,
60,
329,
288,
287,
288,
1023,
60,
198,
437,
198,
198,
1,
31715,
286,
257,
4326,
2613,
287,
371,
61,
67,
526,
198,
1894,
62,
29048,
7,
67,
3712,
5317,
8,
796,
18074,
222,
61,
7,
67,
14,
17,
20679,
28483,
2611,
19510,
67,
14,
17,
47762,
16,
8,
198,
198,
17256,
7203,
42,
8590,
330,
30161,
36185,
32720,
13,
20362,
4943,
198,
17256,
7203,
42,
81,
2093,
709,
13,
20362,
4943
] | 2.728346 | 254 |
import CUDA
using ModernGL
# 6 calculate posterior
# get likelihood, CPU version
function depth_ll(depth_predict::Matrix, depth_real::Matrix)
n_rows, n_cols = size(depth_predict)
ll = 0.0
vaild_count = 0
for c_idx = 1:n_cols
for r_idx = 1:n_rows
real_d_value = depth_real[r_idx, c_idx]
predict_d_value = depth_predict[r_idx, c_idx]
if (predict_d_value != 0.0) && (real_d_value != 0.0)
diff = predict_d_value - real_d_value
# @show diff
ll += diff^2
vaild_count += 1
end
end
end
return ll / max(1, vaild_count)
end
"""
for best performance, set tmp from a outside array
"""
function depth_ll_cuda(frame_buffer::Surfels.GLFrameBuffer,
depth_real_f32_cu::CUDA.CuArray{Float32, 2};
tmp::CUDA.CuArray{Float32, 2}=similar(depth_real_f32_cu))
w = frame_buffer.cam.width
h = frame_buffer.cam.height
Surfels.glCheckError()
glCopyImageSubData(frame_buffer.depth_render_buf, GL_TEXTURE_2D, 0, 0, 0, 0,
frame_buffer.depth_2nd_tex, GL_TEXTURE_2D, 0, 0, 0, 0,
w, h, 1);
Surfels.glCheckError()
# # ccall to cuda calculate
# using CUDA
# depth_real_f32 = convert(Matrix{Float32}, depth_real_uint) ./ 1000.0
# depth_real_f32_cu = cu(depth_real_f32)
# out_log_likelihood_cu = cu(depth_real_f32)
# a = proj_mat[3, 3]
# b = proj_mat[3, 4]
# c = proj_mat[4, 3]
# void cu_depth_log_likelihood(float* depth_real_ptr,
# void** depth_predict_tex_cuda_res_ptr,
# int width,
# int height,
# double a,
# double b,
# double c,
# float max_depth,
# float* out_log_likelihood);
out_log_likelihood_cu = tmp
ccall((:cu_depth_log_likelihood, :libsurfels),
Cvoid,
(CUDA.CuPtr{Cfloat}, Ptr{Ptr{Cvoid}}, Cint, Cint, Cdouble, Cdouble,
Cdouble, Cfloat, Cfloat, Cint, Cint, CUDA.CuPtr{Cfloat}),
depth_real_f32_cu.storage.buffer.ptr,
Base.unsafe_convert(Ptr{Ptr{Cvoid}}, frame_buffer.depth_cuda_res),
w,
h,
frame_buffer.a,
frame_buffer.b,
frame_buffer.c,
frame_buffer.min_depth,
frame_buffer.max_depth,
16, # thread block size: 16 x 16
Int32(0),
out_log_likelihood_cu.storage.buffer.ptr)
# out = collect(out_log_likelihood_cu)
# imshow(Gray.(out))
cu_ll = sum(out_log_likelihood_cu) #/ sum(out_log_likelihood_cu .!= 0.0)
cu_count = sum(out_log_likelihood_cu .!= 0.0)
return cu_ll / max(1, cu_count)
end
function DMP_RGBD(
rgbd_reader::T,
model_fpath::String,
id2Twc, # traj
cam::CameraModel.RgbdCamParams;
min_depth::Float64 = 0.3,
max_depth::Float64 = 15.0,
confidence_thres::Float64=0.1,
max_id::Int64=100000000000000,
tmp::CUDA.CuArray{Float32, 2}=CUDA.CuArray{Float32, 2}(
undef, Int64(cam.height), Int64(cam.width)
)
) where T <: SLAMData.RgbdReader
hidden_window = Surfels.create_hidden_gl_window(cam.width, cam.height)
program::ModernGL.GLuint = Surfels.create_gl_render_program()
frame_buffer::Surfels.GLFrameBuffer = Surfels.GLFrameBuffer(
cam.width, cam.height, cam, min_depth, max_depth, use_texture = true
)
# load GlModel
model::Surfels.GlSurfelsData = Surfels.read_surfels_file2gl(model_fpath)
ll = 0.0
count = 0
Surfels.glCheckError()
ids = sort(collect(keys(id2Twc)))
for frame_id = ids
if frame_id > max_id
continue
end
#render to get predicted observation
Surfels.render(
[model],
id2Twc[frame_id], # Twc
confidence_thres,
1,
200000,
program,
frame_buffer
)
Surfels.glCheckError()
# real observation
# depth_real_f32_cu = frames_d_cu[frame_id]
img, depth_real_uint = SLAMData.readRGBD(rgbd_reader, id=frame_id)
depth_real_f = convert(Matrix{Float32}, depth_real_uint) ./ 1000.0
depth_real_f32_cu = CUDA.cu(depth_real_f)
ll += depth_ll_cuda(frame_buffer, depth_real_f32_cu, tmp=tmp)
Surfels.glCheckError()
count += 1
end
# TODO destroy program
finalize(frame_buffer)
finalize(model)
finalize(hidden_window)
return ll #/ Float64(count)
end
| [
11748,
29369,
5631,
198,
3500,
12495,
8763,
198,
198,
2,
718,
15284,
34319,
198,
2,
651,
14955,
11,
9135,
2196,
198,
8818,
6795,
62,
297,
7,
18053,
62,
79,
17407,
3712,
46912,
11,
6795,
62,
5305,
3712,
46912,
8,
628,
220,
220,
220,
299,
62,
8516,
11,
299,
62,
4033,
82,
796,
2546,
7,
18053,
62,
79,
17407,
8,
628,
220,
220,
220,
32660,
796,
657,
13,
15,
198,
220,
220,
220,
46935,
688,
62,
9127,
796,
657,
198,
220,
220,
220,
329,
269,
62,
312,
87,
796,
352,
25,
77,
62,
4033,
82,
198,
220,
220,
220,
220,
220,
220,
220,
329,
374,
62,
312,
87,
796,
352,
25,
77,
62,
8516,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1103,
62,
67,
62,
8367,
796,
6795,
62,
5305,
58,
81,
62,
312,
87,
11,
269,
62,
312,
87,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4331,
62,
67,
62,
8367,
796,
6795,
62,
79,
17407,
58,
81,
62,
312,
87,
11,
269,
62,
312,
87,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
79,
17407,
62,
67,
62,
8367,
14512,
657,
13,
15,
8,
11405,
357,
5305,
62,
67,
62,
8367,
14512,
657,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
814,
796,
4331,
62,
67,
62,
8367,
532,
1103,
62,
67,
62,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2488,
12860,
814,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
814,
61,
17,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
46935,
688,
62,
9127,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
32660,
1220,
3509,
7,
16,
11,
46935,
688,
62,
9127,
8,
198,
437,
198,
198,
37811,
198,
1640,
1266,
2854,
11,
900,
45218,
422,
257,
2354,
7177,
198,
37811,
198,
8818,
6795,
62,
297,
62,
66,
15339,
7,
14535,
62,
22252,
3712,
14214,
69,
1424,
13,
8763,
19778,
28632,
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,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
3712,
43633,
5631,
13,
46141,
19182,
90,
43879,
2624,
11,
362,
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,
45218,
3712,
43633,
5631,
13,
46141,
19182,
90,
43879,
2624,
11,
362,
92,
28,
38610,
7,
18053,
62,
5305,
62,
69,
2624,
62,
27399,
4008,
198,
220,
220,
220,
266,
796,
5739,
62,
22252,
13,
20991,
13,
10394,
198,
220,
220,
220,
289,
796,
5739,
62,
22252,
13,
20991,
13,
17015,
198,
220,
220,
220,
43771,
1424,
13,
4743,
9787,
12331,
3419,
198,
220,
220,
220,
1278,
29881,
5159,
7004,
6601,
7,
14535,
62,
22252,
13,
18053,
62,
13287,
62,
29325,
11,
10188,
62,
47648,
62,
17,
35,
11,
657,
11,
657,
11,
657,
11,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5739,
62,
22252,
13,
18053,
62,
17,
358,
62,
16886,
11,
10188,
62,
47648,
62,
17,
35,
11,
657,
11,
657,
11,
657,
11,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
11,
289,
11,
352,
1776,
198,
220,
220,
220,
43771,
1424,
13,
4743,
9787,
12331,
3419,
628,
220,
220,
220,
1303,
1303,
269,
13345,
284,
269,
15339,
15284,
198,
220,
220,
220,
1303,
1262,
29369,
5631,
198,
220,
220,
220,
1303,
6795,
62,
5305,
62,
69,
2624,
796,
10385,
7,
46912,
90,
43879,
2624,
5512,
6795,
62,
5305,
62,
28611,
8,
24457,
8576,
13,
15,
198,
220,
220,
220,
1303,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
796,
18912,
7,
18053,
62,
5305,
62,
69,
2624,
8,
198,
220,
220,
220,
1303,
503,
62,
6404,
62,
2339,
11935,
62,
27399,
796,
18912,
7,
18053,
62,
5305,
62,
69,
2624,
8,
198,
220,
220,
220,
1303,
257,
796,
386,
73,
62,
6759,
58,
18,
11,
513,
60,
198,
220,
220,
220,
1303,
275,
796,
386,
73,
62,
6759,
58,
18,
11,
604,
60,
198,
220,
220,
220,
1303,
269,
796,
386,
73,
62,
6759,
58,
19,
11,
513,
60,
198,
220,
220,
220,
1303,
7951,
18912,
62,
18053,
62,
6404,
62,
2339,
11935,
7,
22468,
9,
6795,
62,
5305,
62,
20692,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7951,
1174,
6795,
62,
79,
17407,
62,
16886,
62,
66,
15339,
62,
411,
62,
20692,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
9647,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
6001,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
257,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
275,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
269,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
3509,
62,
18053,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
9,
503,
62,
6404,
62,
2339,
11935,
1776,
198,
220,
220,
220,
503,
62,
6404,
62,
2339,
11935,
62,
27399,
796,
45218,
198,
220,
220,
220,
269,
13345,
19510,
25,
27399,
62,
18053,
62,
6404,
62,
2339,
11935,
11,
1058,
8019,
11793,
69,
1424,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
327,
19382,
11,
198,
220,
220,
220,
220,
197,
220,
357,
43633,
5631,
13,
46141,
46745,
90,
34,
22468,
5512,
350,
2213,
90,
46745,
90,
34,
19382,
92,
5512,
327,
600,
11,
327,
600,
11,
327,
23352,
11,
327,
23352,
11,
198,
220,
220,
220,
220,
197,
220,
327,
23352,
11,
327,
22468,
11,
327,
22468,
11,
327,
600,
11,
327,
600,
11,
29369,
5631,
13,
46141,
46745,
90,
34,
22468,
92,
828,
198,
220,
220,
220,
220,
197,
220,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
13,
35350,
13,
22252,
13,
20692,
11,
198,
220,
220,
220,
220,
197,
220,
7308,
13,
13271,
8635,
62,
1102,
1851,
7,
46745,
90,
46745,
90,
34,
19382,
92,
5512,
5739,
62,
22252,
13,
18053,
62,
66,
15339,
62,
411,
828,
198,
220,
220,
220,
220,
197,
220,
266,
11,
198,
220,
220,
220,
220,
197,
220,
289,
11,
198,
220,
220,
220,
220,
197,
220,
5739,
62,
22252,
13,
64,
11,
198,
220,
220,
220,
220,
197,
220,
5739,
62,
22252,
13,
65,
11,
198,
220,
220,
220,
220,
197,
220,
5739,
62,
22252,
13,
66,
11,
198,
220,
220,
220,
220,
197,
220,
5739,
62,
22252,
13,
1084,
62,
18053,
11,
198,
220,
220,
220,
220,
197,
220,
5739,
62,
22252,
13,
9806,
62,
18053,
11,
198,
220,
220,
220,
220,
197,
220,
1467,
11,
1303,
4704,
2512,
2546,
25,
1467,
2124,
1467,
198,
220,
220,
220,
220,
197,
220,
2558,
2624,
7,
15,
828,
198,
220,
220,
220,
220,
197,
220,
503,
62,
6404,
62,
2339,
11935,
62,
27399,
13,
35350,
13,
22252,
13,
20692,
8,
628,
220,
220,
220,
1303,
503,
796,
2824,
7,
448,
62,
6404,
62,
2339,
11935,
62,
27399,
8,
198,
220,
220,
220,
1303,
545,
12860,
7,
46130,
12195,
448,
4008,
628,
220,
220,
220,
18912,
62,
297,
796,
2160,
7,
448,
62,
6404,
62,
2339,
11935,
62,
27399,
8,
1303,
14,
2160,
7,
448,
62,
6404,
62,
2339,
11935,
62,
27399,
764,
0,
28,
657,
13,
15,
8,
198,
220,
220,
220,
18912,
62,
9127,
796,
2160,
7,
448,
62,
6404,
62,
2339,
11935,
62,
27399,
764,
0,
28,
657,
13,
15,
8,
198,
220,
220,
220,
1441,
18912,
62,
297,
1220,
3509,
7,
16,
11,
18912,
62,
9127,
8,
198,
437,
198,
198,
8818,
360,
7378,
62,
36982,
35,
7,
198,
220,
220,
220,
48670,
17457,
62,
46862,
3712,
51,
11,
198,
220,
220,
220,
2746,
62,
69,
6978,
3712,
10100,
11,
198,
220,
220,
220,
4686,
17,
5080,
66,
11,
1303,
1291,
73,
198,
220,
220,
220,
12172,
3712,
35632,
17633,
13,
49,
70,
17457,
21701,
10044,
4105,
26,
198,
220,
220,
220,
949,
62,
18053,
3712,
43879,
2414,
796,
657,
13,
18,
11,
198,
220,
220,
220,
3509,
62,
18053,
3712,
43879,
2414,
796,
1315,
13,
15,
11,
198,
220,
220,
220,
6628,
62,
400,
411,
3712,
43879,
2414,
28,
15,
13,
16,
11,
198,
220,
220,
220,
3509,
62,
312,
3712,
5317,
2414,
28,
16,
8269,
10535,
11,
198,
220,
220,
220,
45218,
3712,
43633,
5631,
13,
46141,
19182,
90,
43879,
2624,
11,
362,
92,
28,
43633,
5631,
13,
46141,
19182,
90,
43879,
2624,
11,
362,
92,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3318,
891,
11,
2558,
2414,
7,
20991,
13,
17015,
828,
2558,
2414,
7,
20991,
13,
10394,
8,
198,
220,
220,
220,
1267,
198,
8,
810,
309,
1279,
25,
12419,
2390,
6601,
13,
49,
70,
17457,
33634,
628,
220,
220,
220,
7104,
62,
17497,
796,
43771,
1424,
13,
17953,
62,
30342,
62,
4743,
62,
17497,
7,
20991,
13,
10394,
11,
12172,
13,
17015,
8,
628,
220,
220,
220,
1430,
3712,
31439,
8763,
13,
8763,
28611,
796,
43771,
1424,
13,
17953,
62,
4743,
62,
13287,
62,
23065,
3419,
628,
220,
220,
220,
5739,
62,
22252,
3712,
14214,
69,
1424,
13,
8763,
19778,
28632,
796,
43771,
1424,
13,
8763,
19778,
28632,
7,
198,
220,
220,
220,
220,
220,
220,
220,
12172,
13,
10394,
11,
12172,
13,
17015,
11,
12172,
11,
949,
62,
18053,
11,
3509,
62,
18053,
11,
779,
62,
41293,
796,
2081,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
3440,
2671,
17633,
198,
220,
220,
220,
2746,
3712,
14214,
69,
1424,
13,
9861,
14214,
69,
1424,
6601,
796,
43771,
1424,
13,
961,
62,
11793,
69,
1424,
62,
7753,
17,
4743,
7,
19849,
62,
69,
6978,
8,
628,
220,
220,
220,
32660,
796,
657,
13,
15,
198,
220,
220,
220,
954,
796,
657,
198,
220,
220,
220,
43771,
1424,
13,
4743,
9787,
12331,
3419,
628,
220,
220,
220,
220,
2340,
796,
3297,
7,
33327,
7,
13083,
7,
312,
17,
5080,
66,
22305,
628,
220,
220,
220,
329,
5739,
62,
312,
796,
220,
2340,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5739,
62,
312,
1875,
3509,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13287,
284,
651,
11001,
13432,
198,
220,
220,
220,
220,
220,
220,
220,
43771,
1424,
13,
13287,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
19849,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
17,
5080,
66,
58,
14535,
62,
312,
4357,
1303,
1815,
66,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6628,
62,
400,
411,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
939,
830,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1430,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5739,
62,
22252,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
43771,
1424,
13,
4743,
9787,
12331,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1103,
13432,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
796,
13431,
62,
67,
62,
27399,
58,
14535,
62,
312,
60,
198,
220,
220,
220,
220,
220,
220,
220,
33705,
11,
6795,
62,
5305,
62,
28611,
796,
12419,
2390,
6601,
13,
961,
36982,
35,
7,
41345,
17457,
62,
46862,
11,
4686,
28,
14535,
62,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6795,
62,
5305,
62,
69,
796,
10385,
7,
46912,
90,
43879,
2624,
5512,
6795,
62,
5305,
62,
28611,
8,
24457,
8576,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
796,
29369,
5631,
13,
27399,
7,
18053,
62,
5305,
62,
69,
8,
628,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
6795,
62,
297,
62,
66,
15339,
7,
14535,
62,
22252,
11,
6795,
62,
5305,
62,
69,
2624,
62,
27399,
11,
45218,
28,
22065,
8,
628,
220,
220,
220,
220,
220,
220,
220,
43771,
1424,
13,
4743,
9787,
12331,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
954,
15853,
352,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1303,
16926,
46,
4117,
1430,
198,
220,
220,
220,
2457,
1096,
7,
14535,
62,
22252,
8,
198,
220,
220,
220,
2457,
1096,
7,
19849,
8,
198,
220,
220,
220,
2457,
1096,
7,
30342,
62,
17497,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
32660,
1303,
14,
48436,
2414,
7,
9127,
8,
198,
437,
198
] | 1.928425 | 2,431 |
#
###
# Gather-Scatter Operators - enforce continuity/ periodicity
###
# TODO write GatherScatterOp that calls NNlib.gather, scatter
struct GatherScatter{D} <: AbstractGatherScatterOperator{Bool,D}
global_numbering
implementation
end
"""
Q*Q'*u where Q: local -> global operator
"""
function DSS(u,l2g,g2l)
Qu = NNlib.scatter(+,u,l2g)
QQtu = NNlib.gather(Qu,g2l)
return v
end
function Qmatrix(n::Integer, periodic::Bool)
Q = sparse(I,n, n-1)
if periodic
Q[end,1] = 1
end
Q
end
function GatherScatter(space::AbstractSpectralSpace{<:Number,D}) where{D}
domain = get_domain(space)
periodic = isperiodic(domain)
npoints = get_numpoints(space)
if !prod(periodic...)
return IdentityOp{D}()
end
Qmats = Qmatrix.(npoints, periodic)
Q = if D == 1
MatrixOp(Qmats...)
elseif D == 2
TensorProductOp2D(Qmats...)
elseif D == 3
TensorProductOp3D(Qmats...)
end
QQt = Q * Q' # replace with call to NNlib gather-scatter
end
###
# Boundary Condition application
#
# Apply this boundary condition to that boundary tag
###
struct DirichletBC end
struct BoundaryCondition{T,D} <: AbstractBoundaryCondition{T,D}
tag
type # dirichlet, neumann
dirichlet_func! # (ub, space) -> mul!(ub, I, false)
# neumann_func!
mask # implementation
end
function BoundaryCondition(tags, space::AbstractSpace<:Number,2;
dirichlet_func! =nothing, neumann_func! = nothing)
mask = generate_mask(tags, space)
BoundaryCondition()
end
"""
bc = (:Dirichlet,:Neumann,:Dirichlet,:Dirichlet) at (rmin, rmax, smin, smax)
:Dirichlet = Dirichlet = zeros ∂Ω data\n
:Neumann = Neumann = keeps ∂Ω data
A periodic mesh overwrites 'D' to 'N' in direction of periodicity.
To achieve inhomogeneous Dirichlet condition, apply the formulation
u = ub + uh, where uh is homogeneous part, and ub is an arbitrary
smooth function on Ω. Then, solve for uh
"""
function generate_mask(tags, space::AbstractSpace{<:Number,2})
(nr, ns,) = space.npoints
periodic = isperiodic(space.domain)
Ix = sparse(I,nr,nr)
Iy = sparse(I,ns,ns)
ix = collect(1:(nr))
iy = collect(1:(ns))
if(bc[1] == :Dirichlet) ix = ix[2:end] end
if(bc[2] == :Dirichlet) ix = ix[1:end-1] end
if(bc[3] == :Dirichlet) iy = iy[2:end] end
if(bc[4] == :Dirichlet) iy = iy[1:end-1] end
if(periodic[1]) ix = collect(1:(nr)); end
if(periodic[2]) iy = collect(1:(ns)); end
Rx = Ix[ix,:]
Ry = Iy[iy,:]
M = diag(Rx'*Rx) * diag(Ry'*Ry)'
M = Array(M) .== true
return M
end
function applyBC!(u::AbstractField{<:Number,D}, bc::BoundaryCondition{<:Number,D}) where{D}
return u
end
function applyBC!()
end
#
| [
2,
198,
21017,
198,
2,
402,
1032,
12,
3351,
1436,
6564,
2024,
532,
4605,
24216,
14,
2278,
8467,
198,
21017,
198,
198,
2,
16926,
46,
3551,
402,
1032,
3351,
1436,
18257,
326,
3848,
399,
45,
8019,
13,
70,
1032,
11,
41058,
198,
7249,
402,
1032,
3351,
1436,
90,
35,
92,
1279,
25,
27741,
38,
1032,
3351,
1436,
18843,
1352,
90,
33,
970,
11,
35,
92,
198,
220,
220,
220,
3298,
62,
17618,
278,
198,
220,
220,
220,
7822,
198,
437,
198,
198,
37811,
198,
48,
9,
48,
6,
9,
84,
810,
1195,
25,
1957,
4613,
3298,
10088,
198,
37811,
198,
8818,
360,
5432,
7,
84,
11,
75,
17,
70,
11,
70,
17,
75,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2264,
220,
220,
796,
399,
45,
8019,
13,
1416,
1436,
7,
28200,
84,
11,
75,
17,
70,
8,
198,
220,
220,
220,
1195,
48,
28047,
796,
399,
45,
8019,
13,
70,
1032,
7,
4507,
11,
70,
17,
75,
8,
628,
220,
220,
220,
1441,
410,
198,
437,
198,
198,
8818,
1195,
6759,
8609,
7,
77,
3712,
46541,
11,
27458,
3712,
33,
970,
8,
198,
220,
220,
220,
1195,
796,
29877,
7,
40,
11,
77,
11,
299,
12,
16,
8,
628,
220,
220,
220,
611,
27458,
198,
220,
220,
220,
220,
220,
220,
220,
1195,
58,
437,
11,
16,
60,
796,
352,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1195,
198,
437,
198,
198,
8818,
402,
1032,
3351,
1436,
7,
13200,
3712,
23839,
49738,
1373,
14106,
90,
27,
25,
15057,
11,
35,
30072,
810,
90,
35,
92,
198,
220,
220,
220,
7386,
796,
651,
62,
27830,
7,
13200,
8,
198,
220,
220,
220,
27458,
796,
318,
41007,
291,
7,
27830,
8,
198,
220,
220,
220,
299,
13033,
796,
651,
62,
77,
931,
1563,
82,
7,
13200,
8,
628,
220,
220,
220,
611,
5145,
1676,
67,
7,
41007,
291,
23029,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
27207,
18257,
90,
35,
92,
3419,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1195,
76,
1381,
796,
1195,
6759,
8609,
12195,
77,
13033,
11,
27458,
8,
628,
220,
220,
220,
1195,
796,
611,
360,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
24936,
18257,
7,
48,
76,
1381,
23029,
198,
220,
220,
220,
2073,
361,
360,
6624,
362,
198,
220,
220,
220,
220,
220,
220,
220,
309,
22854,
15667,
18257,
17,
35,
7,
48,
76,
1381,
23029,
198,
220,
220,
220,
2073,
361,
360,
6624,
513,
198,
220,
220,
220,
220,
220,
220,
220,
309,
22854,
15667,
18257,
18,
35,
7,
48,
76,
1381,
23029,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1195,
48,
83,
796,
1195,
1635,
1195,
6,
1303,
6330,
351,
869,
284,
399,
45,
8019,
6431,
12,
1416,
1436,
198,
437,
198,
198,
21017,
198,
2,
30149,
560,
24295,
3586,
198,
2,
198,
2,
27967,
428,
18645,
4006,
284,
326,
18645,
7621,
198,
21017,
198,
198,
7249,
36202,
488,
1616,
2749,
886,
198,
198,
7249,
30149,
560,
48362,
90,
51,
11,
35,
92,
1279,
25,
27741,
49646,
560,
48362,
90,
51,
11,
35,
92,
198,
220,
220,
220,
7621,
198,
220,
220,
220,
2099,
1303,
26672,
488,
1616,
11,
497,
40062,
198,
220,
220,
220,
26672,
488,
1616,
62,
20786,
0,
1303,
357,
549,
11,
2272,
8,
4613,
35971,
0,
7,
549,
11,
314,
11,
3991,
8,
198,
2,
220,
220,
497,
40062,
62,
20786,
0,
198,
220,
220,
220,
9335,
1303,
7822,
198,
437,
198,
198,
8818,
30149,
560,
48362,
7,
31499,
11,
2272,
3712,
23839,
14106,
27,
25,
15057,
11,
17,
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,
26672,
488,
1616,
62,
20786,
0,
796,
22366,
11,
497,
40062,
62,
20786,
0,
796,
2147,
8,
628,
220,
220,
220,
9335,
796,
7716,
62,
27932,
7,
31499,
11,
2272,
8,
628,
220,
220,
220,
30149,
560,
48362,
3419,
198,
437,
198,
198,
37811,
198,
47125,
796,
357,
25,
35277,
488,
1616,
11,
25,
8199,
40062,
11,
25,
35277,
488,
1616,
11,
25,
35277,
488,
1616,
8,
379,
357,
81,
1084,
11,
374,
9806,
11,
895,
259,
11,
895,
897,
8,
628,
1058,
35277,
488,
1616,
796,
36202,
488,
1616,
796,
1976,
27498,
18872,
224,
138,
102,
1366,
59,
77,
198,
1058,
8199,
40062,
220,
220,
796,
3169,
40062,
220,
220,
796,
7622,
18872,
224,
138,
102,
1366,
628,
317,
27458,
19609,
6993,
23156,
705,
35,
6,
284,
705,
45,
6,
287,
4571,
286,
2278,
8467,
13,
628,
1675,
4620,
25783,
296,
32269,
36202,
488,
1616,
4006,
11,
4174,
262,
31760,
198,
334,
796,
20967,
1343,
21480,
11,
810,
21480,
318,
3488,
32269,
636,
11,
290,
20967,
318,
281,
14977,
198,
7209,
2163,
319,
7377,
102,
13,
3244,
11,
8494,
329,
21480,
198,
37811,
198,
8818,
7716,
62,
27932,
7,
31499,
11,
2272,
3712,
23839,
14106,
90,
27,
25,
15057,
11,
17,
30072,
198,
220,
220,
220,
357,
48624,
11,
36545,
35751,
796,
2272,
13,
77,
13033,
628,
220,
220,
220,
27458,
796,
318,
41007,
291,
7,
13200,
13,
27830,
8,
628,
220,
220,
220,
314,
87,
796,
29877,
7,
40,
11,
48624,
11,
48624,
8,
198,
220,
220,
220,
314,
88,
796,
29877,
7,
40,
11,
5907,
11,
5907,
8,
628,
220,
220,
220,
220,
844,
796,
2824,
7,
16,
37498,
48624,
4008,
198,
220,
220,
220,
1312,
88,
796,
2824,
7,
16,
37498,
5907,
4008,
628,
220,
220,
220,
611,
7,
15630,
58,
16,
60,
6624,
1058,
35277,
488,
1616,
8,
220,
844,
796,
220,
844,
58,
17,
25,
437,
60,
220,
220,
886,
198,
220,
220,
220,
611,
7,
15630,
58,
17,
60,
6624,
1058,
35277,
488,
1616,
8,
220,
844,
796,
220,
844,
58,
16,
25,
437,
12,
16,
60,
886,
198,
220,
220,
220,
611,
7,
15630,
58,
18,
60,
6624,
1058,
35277,
488,
1616,
8,
1312,
88,
796,
1312,
88,
58,
17,
25,
437,
60,
220,
220,
886,
198,
220,
220,
220,
611,
7,
15630,
58,
19,
60,
6624,
1058,
35277,
488,
1616,
8,
1312,
88,
796,
1312,
88,
58,
16,
25,
437,
12,
16,
60,
886,
628,
220,
220,
220,
611,
7,
41007,
291,
58,
16,
12962,
220,
844,
796,
2824,
7,
16,
37498,
48624,
18125,
886,
198,
220,
220,
220,
611,
7,
41007,
291,
58,
17,
12962,
1312,
88,
796,
2824,
7,
16,
37498,
5907,
18125,
886,
628,
220,
220,
220,
49715,
796,
314,
87,
58,
844,
11,
47715,
198,
220,
220,
220,
11089,
796,
314,
88,
58,
7745,
11,
47715,
628,
220,
220,
220,
337,
796,
2566,
363,
7,
49,
87,
6,
9,
49,
87,
8,
1635,
2566,
363,
7,
46987,
6,
9,
46987,
33047,
198,
220,
220,
220,
337,
796,
15690,
7,
44,
8,
764,
855,
2081,
628,
220,
220,
220,
1441,
337,
198,
437,
198,
198,
8818,
4174,
2749,
0,
7,
84,
3712,
23839,
15878,
90,
27,
25,
15057,
11,
35,
5512,
47125,
3712,
49646,
560,
48362,
90,
27,
25,
15057,
11,
35,
30072,
810,
90,
35,
92,
628,
220,
220,
220,
1441,
334,
198,
437,
198,
198,
8818,
4174,
2749,
0,
3419,
198,
437,
198,
2,
198
] | 2.338371 | 1,191 |
# TODO Make work with multidimensional arrays
immutable EnumerableArray{T,S} <: Enumerable{T}
source::S
end
function query{TS,N}(source::Array{TS,N})
return EnumerableArray{TS,Array{TS,N}}(source)
end
function start{T,S}(iter::EnumerableArray{T,S})
return 1
end
function next{T,S}(iter::EnumerableArray{T,S}, state)
return iter.source[state], state+1
end
function done{T,S}(iter::EnumerableArray{T,S}, state)
return state>length(iter.source)
end
| [
2,
16926,
46,
6889,
670,
351,
1963,
312,
16198,
26515,
198,
8608,
18187,
2039,
30831,
19182,
90,
51,
11,
50,
92,
1279,
25,
2039,
30831,
90,
51,
92,
198,
220,
220,
220,
2723,
3712,
50,
198,
437,
198,
198,
8818,
12405,
90,
4694,
11,
45,
92,
7,
10459,
3712,
19182,
90,
4694,
11,
45,
30072,
198,
220,
220,
220,
1441,
2039,
30831,
19182,
90,
4694,
11,
19182,
90,
4694,
11,
45,
11709,
7,
10459,
8,
198,
437,
198,
198,
8818,
923,
90,
51,
11,
50,
92,
7,
2676,
3712,
4834,
30831,
19182,
90,
51,
11,
50,
30072,
198,
220,
220,
220,
1441,
352,
198,
437,
198,
198,
8818,
1306,
90,
51,
11,
50,
92,
7,
2676,
3712,
4834,
30831,
19182,
90,
51,
11,
50,
5512,
1181,
8,
198,
220,
220,
220,
1441,
11629,
13,
10459,
58,
5219,
4357,
1181,
10,
16,
198,
437,
198,
198,
8818,
1760,
90,
51,
11,
50,
92,
7,
2676,
3712,
4834,
30831,
19182,
90,
51,
11,
50,
5512,
1181,
8,
198,
220,
220,
220,
1441,
1181,
29,
13664,
7,
2676,
13,
10459,
8,
198,
437,
198
] | 2.596685 | 181 |
using Base.Test
using TALib
using TALib: basepath
using TALib: TA_MAType_SMA
using DataFrames
@testset "level 1" begin
epsilon = 1e-10
eps_price = 1e-6
@test Initialize()
for f in [GetVersionString, GetVersionMajor, GetVersionMinor, GetVersionBuild, GetVersionDate, GetVersionTime]
print(string(f) * ": ")
println(f())
end
@test length(GetVersionString()) > 3
@test GetVersionMajor() == "0"
s_xml = FunctionDescriptionXML()
s_xml_expected_header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
N = length(s_xml_expected_header)
@test s_xml[1:N] == s_xml_expected_header
angles = [0, pi/2, pi, 3pi/2, 0, pi/2, pi, 3pi/2]
outReal = COS(angles)
@test sum(outReal) ≈ 0 atol=epsilon
@test outReal == cos.(angles)
@test COS([float(pi)])[1] == -1
@test ACOS([0.0])[1] == pi / 2
outReal = ACOS(angles)
outReal = SIN(angles)
@test sum(outReal) ≈ 0 atol=epsilon
@test outReal == sin.(angles)
@test SIN([float(pi/2)])[1] == 1
@test ASIN([1.0])[1] == pi / 2
outReal = ASIN(angles)
outReal = TAN(angles)
outReal = ATAN(angles)
filename = joinpath(basepath(), "ford_2012.csv")
dfOHLCV = readtable(filename)
dfOHLCV[:Date] = Date(dfOHLCV[:Date])
dt = Array(dfOHLCV[:Date])
opn = Array(dfOHLCV[:Open])
hig = Array(dfOHLCV[:High])
low = Array(dfOHLCV[:Low])
cls = Array(dfOHLCV[:Close])
price = Array(dfOHLCV[:Close])
vol = Array(dfOHLCV[:Volume])
@test price[1] == 11.13
@test price[end] == 12.95
indic = MA(price)
@test indic[end] ≈ 11.546 atol=eps_price
time_period = 10
indic = MA(price, time_period=time_period, ma_type=TA_MAType_SMA)
@test indic[end] ≈ 12.219 atol=eps_price
@test sum(isnan.(indic)) == time_period - 1
indic = BBANDS(price)
time_period = 5
@test indic[end, 1] ≈ 13.13191 atol=eps_price # UpperBand
@test indic[end, 2] ≈ 12.75400 atol=eps_price # MiddleBand
@test indic[end, 3] ≈ 12.37609 atol=eps_price # LowerBand
@test sum(isnan.(indic)) == (time_period - 1) * 3
time_period = 10
indic = BBANDS(price, time_period=time_period, deviations_up=2.0, deviations_down=2.0, ma_type=TA_MAType_SMA)
@test indic[end, 1] ≈ 13.34468 atol=eps_price # UpperBand
@test indic[end, 2] ≈ 12.21900 atol=eps_price # MiddleBand
@test indic[end, 3] ≈ 11.09332 atol=eps_price # LowerBand
@test sum(isnan.(indic)) == (time_period - 1) * 3
@test Shutdown()
end
| [
3500,
7308,
13,
14402,
198,
198,
3500,
309,
1847,
571,
198,
3500,
309,
1847,
571,
25,
1615,
538,
776,
198,
3500,
309,
1847,
571,
25,
21664,
62,
41636,
2981,
62,
50,
5673,
198,
198,
3500,
6060,
35439,
198,
198,
31,
9288,
2617,
366,
5715,
352,
1,
2221,
198,
220,
220,
220,
304,
862,
33576,
796,
352,
68,
12,
940,
198,
220,
220,
220,
304,
862,
62,
20888,
796,
352,
68,
12,
21,
628,
220,
220,
220,
2488,
9288,
20768,
1096,
3419,
628,
220,
220,
220,
329,
277,
287,
685,
3855,
14815,
10100,
11,
3497,
14815,
24206,
11,
3497,
14815,
39825,
11,
3497,
14815,
15580,
11,
3497,
14815,
10430,
11,
3497,
14815,
7575,
60,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
8841,
7,
69,
8,
1635,
366,
25,
366,
8,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7,
69,
28955,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
4129,
7,
3855,
14815,
10100,
28955,
1875,
513,
198,
220,
220,
220,
2488,
9288,
3497,
14815,
24206,
3419,
6624,
366,
15,
1,
628,
220,
220,
220,
264,
62,
19875,
796,
15553,
11828,
55,
5805,
3419,
198,
220,
220,
220,
264,
62,
19875,
62,
40319,
62,
25677,
796,
33490,
30,
19875,
2196,
17553,
16,
13,
15,
7879,
21004,
17553,
40477,
12,
23,
7879,
5633,
24618,
198,
220,
220,
220,
399,
796,
4129,
7,
82,
62,
19875,
62,
40319,
62,
25677,
8,
198,
220,
220,
220,
2488,
9288,
264,
62,
19875,
58,
16,
25,
45,
60,
6624,
264,
62,
19875,
62,
40319,
62,
25677,
628,
220,
220,
220,
18333,
796,
685,
15,
11,
31028,
14,
17,
11,
31028,
11,
513,
14415,
14,
17,
11,
657,
11,
31028,
14,
17,
11,
31028,
11,
513,
14415,
14,
17,
60,
628,
220,
220,
220,
503,
15633,
796,
327,
2640,
7,
27787,
8,
198,
220,
220,
220,
2488,
9288,
2160,
7,
448,
15633,
8,
15139,
230,
657,
379,
349,
28,
538,
18217,
261,
198,
220,
220,
220,
2488,
9288,
503,
15633,
6624,
8615,
12195,
27787,
8,
198,
220,
220,
220,
2488,
9288,
327,
2640,
26933,
22468,
7,
14415,
8,
12962,
58,
16,
60,
6624,
532,
16,
198,
220,
220,
220,
2488,
9288,
7125,
2640,
26933,
15,
13,
15,
12962,
58,
16,
60,
6624,
31028,
1220,
362,
198,
220,
220,
220,
503,
15633,
796,
7125,
2640,
7,
27787,
8,
628,
220,
220,
220,
503,
15633,
796,
311,
1268,
7,
27787,
8,
198,
220,
220,
220,
2488,
9288,
2160,
7,
448,
15633,
8,
15139,
230,
657,
379,
349,
28,
538,
18217,
261,
198,
220,
220,
220,
2488,
9288,
503,
15633,
6624,
7813,
12195,
27787,
8,
198,
220,
220,
220,
2488,
9288,
311,
1268,
26933,
22468,
7,
14415,
14,
17,
8,
12962,
58,
16,
60,
6624,
352,
198,
220,
220,
220,
2488,
9288,
7054,
1268,
26933,
16,
13,
15,
12962,
58,
16,
60,
6624,
31028,
1220,
362,
628,
220,
220,
220,
503,
15633,
796,
7054,
1268,
7,
27787,
8,
198,
220,
220,
220,
503,
15633,
796,
309,
1565,
7,
27787,
8,
198,
220,
220,
220,
503,
15633,
796,
5161,
1565,
7,
27787,
8,
628,
220,
220,
220,
29472,
796,
4654,
6978,
7,
12093,
538,
776,
22784,
366,
3841,
62,
6999,
13,
40664,
4943,
198,
220,
220,
220,
47764,
12096,
5639,
53,
796,
1100,
11487,
7,
34345,
8,
198,
220,
220,
220,
47764,
12096,
5639,
53,
58,
25,
10430,
60,
796,
7536,
7,
7568,
12096,
5639,
53,
58,
25,
10430,
12962,
198,
220,
220,
220,
288,
83,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
10430,
12962,
198,
220,
220,
220,
1034,
77,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
11505,
12962,
198,
220,
220,
220,
1880,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
11922,
12962,
198,
220,
220,
220,
1877,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
20535,
12962,
198,
220,
220,
220,
537,
82,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
26125,
12962,
198,
220,
220,
220,
2756,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
26125,
12962,
198,
220,
220,
220,
2322,
796,
15690,
7,
7568,
12096,
5639,
53,
58,
25,
31715,
12962,
628,
220,
220,
220,
2488,
9288,
2756,
58,
16,
60,
6624,
1367,
13,
1485,
198,
220,
220,
220,
2488,
9288,
2756,
58,
437,
60,
6624,
1105,
13,
3865,
628,
220,
220,
220,
2699,
796,
8779,
7,
20888,
8,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
60,
15139,
230,
1367,
13,
49489,
379,
349,
28,
25386,
62,
20888,
628,
220,
220,
220,
640,
62,
41007,
796,
838,
198,
220,
220,
220,
2699,
796,
8779,
7,
20888,
11,
640,
62,
41007,
28,
2435,
62,
41007,
11,
17266,
62,
4906,
28,
5603,
62,
41636,
2981,
62,
50,
5673,
8,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
60,
15139,
230,
1105,
13,
28896,
379,
349,
28,
25386,
62,
20888,
198,
220,
220,
220,
2488,
9288,
2160,
7,
271,
12647,
12195,
521,
291,
4008,
6624,
640,
62,
41007,
532,
352,
628,
220,
220,
220,
2699,
796,
12597,
1565,
5258,
7,
20888,
8,
198,
220,
220,
220,
640,
62,
41007,
796,
642,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
352,
60,
15139,
230,
1511,
13,
1485,
26492,
379,
349,
28,
25386,
62,
20888,
220,
1303,
20390,
31407,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
362,
60,
15139,
230,
1105,
13,
2425,
7029,
379,
349,
28,
25386,
62,
20888,
220,
1303,
6046,
31407,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
513,
60,
15139,
230,
1105,
13,
2718,
31751,
379,
349,
28,
25386,
62,
20888,
220,
1303,
16048,
31407,
628,
220,
220,
220,
2488,
9288,
2160,
7,
271,
12647,
12195,
521,
291,
4008,
6624,
357,
2435,
62,
41007,
532,
352,
8,
1635,
513,
628,
220,
220,
220,
640,
62,
41007,
796,
838,
198,
220,
220,
220,
2699,
796,
12597,
1565,
5258,
7,
20888,
11,
640,
62,
41007,
28,
2435,
62,
41007,
11,
47060,
62,
929,
28,
17,
13,
15,
11,
47060,
62,
2902,
28,
17,
13,
15,
11,
17266,
62,
4906,
28,
5603,
62,
41636,
2981,
62,
50,
5673,
8,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
352,
60,
15139,
230,
1511,
13,
33535,
3104,
379,
349,
28,
25386,
62,
20888,
220,
1303,
20390,
31407,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
362,
60,
15139,
230,
1105,
13,
28896,
405,
379,
349,
28,
25386,
62,
20888,
220,
1303,
6046,
31407,
198,
220,
220,
220,
2488,
9288,
2699,
58,
437,
11,
513,
60,
15139,
230,
1367,
13,
2931,
32148,
379,
349,
28,
25386,
62,
20888,
220,
1303,
16048,
31407,
628,
220,
220,
220,
2488,
9288,
2160,
7,
271,
12647,
12195,
521,
291,
4008,
6624,
357,
2435,
62,
41007,
532,
352,
8,
1635,
513,
628,
220,
220,
220,
2488,
9288,
40411,
3419,
198,
198,
437,
198
] | 2.23357 | 1,126 |
using ImageMagick
using Images, TestImages, StaticArrays, ImageTracking, ImageView, LinearAlgebra, CoordinateTransformations, Gtk.ShortNames
#=Image Credit: C. Liu. Beyond Pixels: Exploring New Representations and
#Applications for Motion Analysis. Doctoral Thesis. Massachusetts Institute of
#Technology. May 2009. =#
img1 = load("car2.jpg")
img2 = load("car1.jpg")
algorithm = Farneback(50, estimation_window = 11,
σ_estimation_window = 9.0,
expansion_window = 6,
σ_expansion_window = 5.0)
flow = optical_flow(Gray{Float32}.(img1), Gray{Float32}.(img2), algorithm)
# flow visualization
hsv = visualize_flow(flow, ColorBased(), RasterConvention())
imshow(RGB.(hsv))
save("./optical_flow_farneback.jpg", hsv)
| [
3500,
7412,
13436,
624,
198,
3500,
5382,
11,
6208,
29398,
11,
36125,
3163,
20477,
11,
7412,
2898,
5430,
11,
7412,
7680,
11,
44800,
2348,
29230,
11,
22819,
4559,
41762,
602,
11,
402,
30488,
13,
16438,
36690,
198,
2,
28,
5159,
10504,
25,
220,
327,
13,
18258,
13,
12197,
350,
14810,
25,
5905,
3255,
968,
10858,
602,
290,
198,
2,
41995,
329,
20843,
14691,
13,
9356,
282,
383,
13429,
13,
10140,
5136,
286,
198,
2,
44893,
13,
1737,
3717,
13,
796,
2,
198,
9600,
16,
796,
3440,
7203,
7718,
17,
13,
9479,
4943,
198,
9600,
17,
796,
3440,
7203,
7718,
16,
13,
9479,
4943,
628,
198,
282,
42289,
796,
6755,
710,
1891,
7,
1120,
11,
31850,
62,
17497,
796,
1367,
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,
18074,
225,
62,
395,
18991,
62,
17497,
796,
860,
13,
15,
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,
7118,
62,
17497,
796,
718,
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,
18074,
225,
62,
11201,
5487,
62,
17497,
796,
642,
13,
15,
8,
198,
198,
11125,
796,
18480,
62,
11125,
7,
46130,
90,
43879,
2624,
92,
12195,
9600,
16,
828,
12723,
90,
43879,
2624,
92,
12195,
9600,
17,
828,
11862,
8,
198,
198,
2,
5202,
32704,
198,
11994,
85,
796,
38350,
62,
11125,
7,
11125,
11,
5315,
15001,
22784,
371,
1603,
3103,
4018,
28955,
198,
198,
320,
12860,
7,
36982,
12195,
11994,
85,
4008,
198,
21928,
7,
1911,
14,
8738,
605,
62,
11125,
62,
16370,
710,
1891,
13,
9479,
1600,
289,
21370,
8,
198
] | 2.581699 | 306 |
@testset "Genus" begin
Qx, x = FlintQQ["x"]
K, a = NumberField(x - 1, "a", cached = false)
OK = maximal_order(K)
rlp = real_places(K)
sig = Dict(rlp[1] => 2)
p2 = prime_decomposition(OK, 2)[1][1]
p3 = prime_decomposition(OK, 3)[1][1]
p5 = prime_decomposition(OK, 5)[1][1]
@test length(Hecke.local_genera_quadratic(K, p2, rank = 2, det_val = 0)) == 8
@test length(Hecke.local_genera_quadratic(K, p2, rank = 2, det_val = 1)) == 8
@test length(Hecke.local_genera_quadratic(K, p2, rank = 2, det_val = 2)) == 16
@test length(Hecke.local_genera_quadratic(K, p2, rank = 2, det_val = 3)) == 24
@test length(Hecke.local_genera_quadratic(K, p2, rank = 2, det_val = 4)) == 32
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 0)) == 2
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 1)) == 4
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 2)) == 8
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 3)) == 16
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 4)) == 28
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 5)) == 46
@test length(Hecke.local_genera_quadratic(K, p3, rank = 5, det_val = 6)) == 72
@test length(Hecke.local_genera_quadratic(K, p5, rank = 4, det_val = 2)) == 8
@test length(Hecke.local_genera_quadratic(K, p5, rank = 4, det_val = 1)) == 4
@test length(Hecke.local_genera_quadratic(K, p5, rank = 2, det_val = 0)) == 2
@test length(Hecke.local_genera_quadratic(K, p5, rank = 2, det_val = 1)) == 4
@test length(Hecke.genera_quadratic(K, rank = 2, signatures = sig, det = 5^2 * 8 * 9 * OK)) == 27
@test length(Hecke.genera_quadratic(K, rank = 2, signatures = sig, det = 5 * 7 * 8 * 9 * OK)) == 36
@test length(Hecke.genera_quadratic(K, rank = 2, signatures = sig, det = 2^5 * OK)) == 5
@test length(Hecke.genera_quadratic(K, rank = 2, signatures = sig, det = 11 * 13^2 * OK)) == 6
end
| [
31,
9288,
2617,
366,
13746,
385,
1,
2221,
198,
220,
1195,
87,
11,
2124,
796,
21660,
48,
48,
14692,
87,
8973,
198,
220,
509,
11,
257,
796,
7913,
15878,
7,
87,
532,
352,
11,
366,
64,
1600,
39986,
796,
3991,
8,
198,
220,
7477,
796,
40708,
62,
2875,
7,
42,
8,
198,
220,
374,
34431,
796,
1103,
62,
23625,
7,
42,
8,
198,
220,
43237,
796,
360,
713,
7,
81,
34431,
58,
16,
60,
5218,
362,
8,
628,
220,
279,
17,
796,
6994,
62,
12501,
296,
9150,
7,
11380,
11,
362,
38381,
16,
7131,
16,
60,
198,
220,
279,
18,
796,
6994,
62,
12501,
296,
9150,
7,
11380,
11,
513,
38381,
16,
7131,
16,
60,
198,
220,
279,
20,
796,
6994,
62,
12501,
296,
9150,
7,
11380,
11,
642,
38381,
16,
7131,
16,
60,
628,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
17,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
657,
4008,
6624,
807,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
17,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
352,
4008,
6624,
807,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
17,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
362,
4008,
6624,
1467,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
17,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
513,
4008,
6624,
1987,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
17,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
604,
4008,
6624,
3933,
628,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
657,
4008,
6624,
362,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
352,
4008,
6624,
604,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
362,
4008,
6624,
807,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
513,
4008,
6624,
1467,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
604,
4008,
6624,
2579,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
642,
4008,
6624,
6337,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
18,
11,
4279,
796,
642,
11,
1062,
62,
2100,
796,
718,
4008,
6624,
7724,
628,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
20,
11,
4279,
796,
604,
11,
1062,
62,
2100,
796,
362,
4008,
6624,
807,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
20,
11,
4279,
796,
604,
11,
1062,
62,
2100,
796,
352,
4008,
6624,
604,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
20,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
657,
4008,
6624,
362,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
12001,
62,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
279,
20,
11,
4279,
796,
362,
11,
1062,
62,
2100,
796,
352,
4008,
6624,
604,
628,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
4279,
796,
362,
11,
17239,
796,
43237,
11,
1062,
796,
642,
61,
17,
1635,
807,
1635,
860,
1635,
7477,
4008,
6624,
2681,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
4279,
796,
362,
11,
17239,
796,
43237,
11,
1062,
796,
642,
1635,
767,
1635,
807,
1635,
860,
1635,
7477,
4008,
6624,
4570,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
4279,
796,
362,
11,
17239,
796,
43237,
11,
1062,
796,
362,
61,
20,
1635,
7477,
4008,
6624,
642,
198,
220,
2488,
9288,
4129,
7,
39,
721,
365,
13,
8612,
64,
62,
421,
41909,
1512,
7,
42,
11,
4279,
796,
362,
11,
17239,
796,
43237,
11,
1062,
796,
1367,
1635,
1511,
61,
17,
1635,
7477,
4008,
6624,
718,
198,
437,
628,
198
] | 2.266055 | 872 |
const build_names = ["RealDouble","RealSingle","ComplexDouble","ComplexSingle"]
arches = Dict() # dict of dirname => (PETSC_DIR, PETSC_ARCH)
have_petsc = fill(false,4) # whether or not each version of Petsc is usable
libpetsc_name=Dict()
binary = Dict()
for (i, name) in enumerate(build_names)
julia_petsc_binary=string("JULIA_PETSC_", name, "_BINARY")
julia_petsc_dir=string("JULIA_PETSC_", name, "_DIR")
julia_petsc_arch=string("JULIA_PETSC_", name, "_ARCH")
julia_petsc_libname=string("JULIA_PETSC_", name, "_LIBNAME")
env_vars = [julia_petsc_binary,julia_petsc_dir,julia_petsc_arch,julia_petsc_libname]
if (name != "RealDouble")
for env_var in env_vars
if (haskey(ENV, env_var))
@warn "Ignoring $(env_var). PetscScalar $(name) not yet supported."
end
end
have_petsc[i]=false
else
if (haskey(ENV, julia_petsc_binary))
binary[name]=lowercase(ENV[julia_petsc_binary])
if !(binary[name]=="system" || binary[name]=="")
@error """Invalid value for $julia_petsc_binary env variable ($(binary[name]). If you want
to use a PETSc library installed into your system (e.g., HPC cluster), set this env variable to \"system\"
"""
end
else
binary[name]=nothing
end
if (binary[name]=="" || binary[name]==nothing)
@info "Using PETSc binary provided by PETSc_jll package for PetscScalar $(name)"
have_petsc[i]=true
end
if haskey(ENV, julia_petsc_dir) ||
haskey(ENV, julia_petsc_arch) ||
haskey(ENV, julia_petsc_arch)
if (binary[name]=="" || binary[name]==nothing)
@warn """
You have $(julia_petsc_dir) and/or $(julia_petsc_arch) and/or $(julia_petsc_libname) set, but $(julia_petsc_binary) is unset or set to the empty string. Thus, the values of these env variables will be ignored.
"""
elseif (binary[name]=="system")
if !(haskey(ENV, julia_petsc_dir) && haskey(ENV, string("JULIA_PETSC_", name, "_DIR")))
error("Must have either both or neither DIR and ARCH for JULIA_PETSC_$name")
else
have_petsc[i] = true
arches[name] = (ENV[julia_petsc_dir], ENV[julia_petsc_arch])
if (haskey(ENV, julia_petsc_libname))
libpetsc_name[name]=ENV[julia_petsc_libname]
else
libpetsc_name[name]="libpetsc"
end
end
end
end
end
end
# create deps.jl file with library locations
open("deps.jl", "w") do f
for (i, name) in enumerate(build_names)
if haskey(arches, name)
PETSC_DIR, PETSC_ARCH = arches[name]
libname=libpetsc_name[name]
path = abspath(PETSC_DIR, PETSC_ARCH, "lib", libname)
println(f, "const deps_file_petsc$name = \"", escape_string(path), "\"")
@info "Using a system installation of PETSc for PetscScalar $(name)"
@info "PETSc library will be search for on $(path)"
else
println(f, "const deps_file_petsc$name = \"\" ")
end
end
println(f, "const have_petsc = [", have_petsc[1], " ",
have_petsc[2], " ",
have_petsc[3], " ",
have_petsc[4],"]")
end
| [
9979,
1382,
62,
14933,
796,
14631,
15633,
25628,
2430,
15633,
28008,
2430,
5377,
11141,
25628,
2430,
5377,
11141,
28008,
8973,
198,
283,
2052,
796,
360,
713,
3419,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8633,
286,
26672,
3672,
5218,
357,
47731,
6173,
62,
34720,
11,
32043,
6173,
62,
31315,
8,
198,
14150,
62,
79,
1039,
66,
796,
6070,
7,
9562,
11,
19,
8,
220,
1303,
1771,
393,
407,
1123,
2196,
286,
43578,
66,
318,
24284,
198,
8019,
79,
1039,
66,
62,
3672,
28,
35,
713,
3419,
198,
39491,
796,
360,
713,
3419,
198,
1640,
357,
72,
11,
1438,
8,
287,
27056,
378,
7,
11249,
62,
14933,
8,
628,
220,
474,
43640,
62,
79,
1039,
66,
62,
39491,
28,
8841,
7203,
41,
6239,
3539,
62,
47731,
6173,
62,
1600,
1438,
11,
45434,
33,
1268,
13153,
4943,
198,
220,
474,
43640,
62,
79,
1039,
66,
62,
15908,
28,
8841,
7203,
41,
6239,
3539,
62,
47731,
6173,
62,
1600,
1438,
11,
45434,
34720,
4943,
198,
220,
474,
43640,
62,
79,
1039,
66,
62,
998,
28,
8841,
7203,
41,
6239,
3539,
62,
47731,
6173,
62,
1600,
1438,
11,
45434,
31315,
4943,
198,
220,
474,
43640,
62,
79,
1039,
66,
62,
8019,
3672,
28,
8841,
7203,
41,
6239,
3539,
62,
47731,
6173,
62,
1600,
1438,
11,
45434,
40347,
20608,
4943,
628,
220,
17365,
62,
85,
945,
796,
685,
73,
43640,
62,
79,
1039,
66,
62,
39491,
11,
73,
43640,
62,
79,
1039,
66,
62,
15908,
11,
73,
43640,
62,
79,
1039,
66,
62,
998,
11,
73,
43640,
62,
79,
1039,
66,
62,
8019,
3672,
60,
628,
220,
611,
357,
3672,
14512,
366,
15633,
25628,
4943,
198,
220,
220,
220,
329,
17365,
62,
7785,
287,
17365,
62,
85,
945,
198,
220,
220,
220,
220,
220,
611,
357,
10134,
2539,
7,
1677,
53,
11,
17365,
62,
7785,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
40539,
366,
32916,
3255,
29568,
24330,
62,
7785,
737,
43578,
66,
3351,
282,
283,
29568,
3672,
8,
407,
1865,
4855,
526,
198,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
72,
22241,
9562,
198,
220,
2073,
198,
220,
220,
220,
611,
357,
10134,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
39491,
4008,
198,
220,
220,
220,
220,
220,
220,
13934,
58,
3672,
22241,
21037,
7442,
7,
1677,
53,
58,
73,
43640,
62,
79,
1039,
66,
62,
39491,
12962,
198,
220,
220,
220,
220,
220,
220,
611,
5145,
7,
39491,
58,
3672,
60,
855,
1,
10057,
1,
8614,
13934,
58,
3672,
60,
855,
1,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
18224,
37227,
44651,
1988,
329,
720,
73,
43640,
62,
79,
1039,
66,
62,
39491,
17365,
7885,
7198,
7,
39491,
58,
3672,
35944,
1002,
345,
765,
198,
220,
220,
220,
220,
220,
220,
220,
220,
284,
779,
257,
32043,
3351,
5888,
6589,
656,
534,
1080,
357,
68,
13,
70,
1539,
367,
5662,
13946,
828,
900,
428,
17365,
7885,
284,
19990,
10057,
7879,
198,
220,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
13934,
58,
3672,
22241,
22366,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
357,
39491,
58,
3672,
60,
855,
15931,
8614,
13934,
58,
3672,
60,
855,
22366,
8,
198,
220,
220,
220,
220,
220,
2488,
10951,
366,
12814,
32043,
3351,
13934,
2810,
416,
32043,
3351,
62,
73,
297,
5301,
329,
43578,
66,
3351,
282,
283,
29568,
3672,
16725,
198,
220,
220,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
72,
22241,
7942,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
468,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
15908,
8,
220,
8614,
198,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
998,
8,
8614,
198,
220,
220,
220,
220,
220,
220,
468,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
998,
8,
628,
220,
220,
220,
220,
220,
611,
357,
39491,
58,
3672,
60,
855,
15931,
8614,
13934,
58,
3672,
60,
855,
22366,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
40539,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
921,
423,
29568,
73,
43640,
62,
79,
1039,
66,
62,
15908,
8,
290,
14,
273,
29568,
73,
43640,
62,
79,
1039,
66,
62,
998,
8,
290,
14,
273,
29568,
73,
43640,
62,
79,
1039,
66,
62,
8019,
3672,
8,
900,
11,
475,
29568,
73,
43640,
62,
79,
1039,
66,
62,
39491,
8,
318,
555,
2617,
393,
900,
284,
262,
6565,
4731,
13,
6660,
11,
262,
3815,
286,
777,
17365,
9633,
481,
307,
9514,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
2073,
361,
357,
39491,
58,
3672,
60,
855,
1,
10057,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
7,
10134,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
15908,
8,
11405,
468,
2539,
7,
1677,
53,
11,
4731,
7203,
41,
6239,
3539,
62,
47731,
6173,
62,
1600,
1438,
11,
45434,
34720,
1,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
34320,
423,
2035,
1111,
393,
6159,
360,
4663,
290,
5923,
3398,
329,
49349,
3539,
62,
47731,
6173,
62,
3,
3672,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
72,
60,
796,
2081,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
610,
2052,
58,
3672,
60,
796,
357,
1677,
53,
58,
73,
43640,
62,
79,
1039,
66,
62,
15908,
4357,
12964,
53,
58,
73,
43640,
62,
79,
1039,
66,
62,
998,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
10134,
2539,
7,
1677,
53,
11,
474,
43640,
62,
79,
1039,
66,
62,
8019,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9195,
79,
1039,
66,
62,
3672,
58,
3672,
22241,
1677,
53,
58,
73,
43640,
62,
79,
1039,
66,
62,
8019,
3672,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9195,
79,
1039,
66,
62,
3672,
58,
3672,
60,
2625,
8019,
79,
1039,
66,
1,
198,
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,
886,
198,
220,
220,
220,
886,
198,
220,
886,
198,
437,
198,
198,
2,
2251,
390,
862,
13,
20362,
2393,
351,
5888,
7064,
198,
9654,
7203,
10378,
82,
13,
20362,
1600,
366,
86,
4943,
466,
277,
198,
220,
329,
357,
72,
11,
1438,
8,
287,
27056,
378,
7,
11249,
62,
14933,
8,
198,
220,
220,
220,
611,
468,
2539,
7,
283,
2052,
11,
1438,
8,
198,
220,
220,
220,
220,
220,
32043,
6173,
62,
34720,
11,
32043,
6173,
62,
31315,
796,
610,
2052,
58,
3672,
60,
198,
220,
220,
220,
220,
220,
9195,
3672,
28,
8019,
79,
1039,
66,
62,
3672,
58,
3672,
60,
198,
220,
220,
220,
220,
220,
3108,
796,
2352,
6978,
7,
47731,
6173,
62,
34720,
11,
32043,
6173,
62,
31315,
11,
366,
8019,
1600,
9195,
3672,
8,
198,
220,
220,
220,
220,
220,
44872,
7,
69,
11,
366,
9979,
390,
862,
62,
7753,
62,
79,
1039,
66,
3,
3672,
796,
19990,
1600,
6654,
62,
8841,
7,
6978,
828,
366,
7879,
4943,
198,
220,
220,
220,
220,
220,
2488,
10951,
366,
12814,
257,
1080,
9988,
286,
32043,
3351,
329,
43578,
66,
3351,
282,
283,
29568,
3672,
16725,
198,
220,
220,
220,
220,
220,
2488,
10951,
366,
47731,
3351,
5888,
481,
307,
2989,
329,
319,
29568,
6978,
16725,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
44872,
7,
69,
11,
366,
9979,
390,
862,
62,
7753,
62,
79,
1039,
66,
3,
3672,
796,
19990,
7879,
366,
8,
198,
220,
220,
220,
886,
198,
220,
886,
198,
220,
44872,
7,
69,
11,
366,
9979,
423,
62,
79,
1039,
66,
796,
685,
1600,
423,
62,
79,
1039,
66,
58,
16,
4357,
366,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
17,
4357,
366,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
18,
4357,
366,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
423,
62,
79,
1039,
66,
58,
19,
17241,
60,
4943,
198,
437,
198
] | 2.108003 | 1,537 |
## example for README
using AutoAligns
aa = AutoAlign(align = Dict(1 => left, :default => right));
for (i, r) in zip([1, 100, 10000], ["a", "bb", "ccc"])
print(aa, r)
for j in 1:5
print(aa, " ", i + j) # padding
end
println(aa)
end
print(STDOUT, aa)
| [
2235,
1672,
329,
20832,
11682,
198,
198,
3500,
11160,
2348,
570,
82,
198,
7252,
796,
11160,
2348,
570,
7,
31494,
796,
360,
713,
7,
16,
5218,
1364,
11,
1058,
12286,
5218,
826,
18125,
198,
1640,
357,
72,
11,
374,
8,
287,
19974,
26933,
16,
11,
1802,
11,
33028,
4357,
14631,
64,
1600,
366,
11848,
1600,
366,
535,
66,
8973,
8,
198,
220,
220,
220,
3601,
7,
7252,
11,
374,
8,
198,
220,
220,
220,
329,
474,
287,
352,
25,
20,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
7252,
11,
366,
220,
33172,
1312,
1343,
474,
8,
1303,
24511,
198,
220,
220,
220,
886,
198,
220,
220,
220,
44872,
7,
7252,
8,
198,
437,
198,
4798,
7,
36886,
11,
257,
64,
8,
198
] | 2.208 | 125 |
# This file was generated, do not modify it. # hide
mach = MLJ.machine(nnregressor, features, targets) | [
2,
770,
2393,
373,
7560,
11,
466,
407,
13096,
340,
13,
1303,
7808,
198,
76,
620,
796,
10373,
41,
13,
30243,
7,
20471,
2301,
44292,
11,
3033,
11,
6670,
8
] | 3.4 | 30 |
__precompile__(false)
import Base.print, Base.println
using TimeManager
using LoggerManager
using ThreadManager
using Distributed
######################################################
# Overwrite Base functions
PrintMutex = Threads.Mutex()
#ThreadManager.setPrintMutex(PrintMutex)
print(args...) = thread_call(() -> LoggerManager.print(args...);mutex=PrintMutex)
println(args...) = thread_call(() -> LoggerManager.println(args...);mutex=PrintMutex)
PushMutex = Threads.Mutex()
thread_push!(args...) = thread_call(() -> Base.push!(args...);mutex=PushMutex)
sleep(sec) = thread_sleep(sec)
######################################################
info(args...) = thread_call(() -> LoggerManager.info(args...);mutex=PrintMutex)
debug(args...) = thread_call(() -> LoggerManager.debug(args...);mutex=PrintMutex)
warn(args...) = thread_call(() -> LoggerManager.warn(args...);mutex=PrintMutex)
error(args...) = thread_call(() -> LoggerManager.error(args...);mutex=PrintMutex)
######################################################
Messages = String[] #shared object among threads
function message(this::Thread, args... ;mode="", title="", lineBreak=true)
global Messages
thread_push!(Messages, LoggerManager.msg(args... ;time=true, name=thread_id()*":"*this.name, mode=mode, title=title, lineBreak=lineBreak))
end
function showMessages()
global Messages
msgs = String[]
# copy & clear messages
thread_call(() -> begin msgs = deepcopy(Messages); Messages = Array{String,1}() end ;mutex=PushMutex)
thread_call(function()
if length(msgs) > 0
LoggerManager.println("---[Messages]---")
for msg in msgs LoggerManager.print(msg) end
LoggerManager.println("----------------")
end
end ;mutex=PrintMutex)
end
######################################################
print(this::Thread, args... ;title="") = message(this, args... ;title=title, lineBreak=false)
println(this::Thread, args... ;title="") = message(this, args... ;title=title)
info(this::Thread, args... ;title="") = message(this, args... ;mode=:Info, title=title)
debug(this::Thread, args... ;title="") = message(this, args... ;mode=:Debug, title=title)
warn(this::Thread, args... ;title="") = message(this, args... ;mode=:Warning, title=title)
error(this::Thread, args... ;title="") = message(this, args... ;mode=:Error, title=title)
| [
834,
3866,
5589,
576,
834,
7,
9562,
8,
198,
198,
11748,
7308,
13,
4798,
11,
7308,
13,
35235,
198,
198,
3500,
3862,
13511,
198,
3500,
5972,
1362,
13511,
198,
3500,
14122,
13511,
198,
198,
3500,
4307,
6169,
198,
198,
29113,
14468,
4242,
2235,
198,
2,
3827,
13564,
7308,
5499,
198,
198,
18557,
41603,
1069,
796,
14122,
82,
13,
41603,
1069,
3419,
198,
2,
16818,
13511,
13,
2617,
18557,
41603,
1069,
7,
18557,
41603,
1069,
8,
198,
198,
4798,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
4798,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
35235,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
35235,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
198,
49222,
41603,
1069,
796,
14122,
82,
13,
41603,
1069,
3419,
198,
16663,
62,
14689,
0,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
7308,
13,
14689,
0,
7,
22046,
986,
1776,
21973,
1069,
28,
49222,
41603,
1069,
8,
198,
198,
42832,
7,
2363,
8,
796,
4704,
62,
42832,
7,
2363,
8,
198,
198,
29113,
14468,
4242,
2235,
198,
198,
10951,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
10951,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
24442,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
24442,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
40539,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
40539,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
18224,
7,
22046,
23029,
796,
4704,
62,
13345,
7,
3419,
4613,
5972,
1362,
13511,
13,
18224,
7,
22046,
986,
1776,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
198,
29113,
14468,
4242,
2235,
198,
198,
36479,
1095,
796,
10903,
21737,
1303,
28710,
2134,
1871,
14390,
198,
8818,
3275,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
14171,
2625,
1600,
3670,
2625,
1600,
1627,
31737,
28,
7942,
8,
198,
220,
3298,
43534,
198,
220,
4704,
62,
14689,
0,
7,
36479,
1095,
11,
5972,
1362,
13511,
13,
19662,
7,
22046,
986,
2162,
2435,
28,
7942,
11,
1438,
28,
16663,
62,
312,
3419,
9,
2404,
9,
5661,
13,
3672,
11,
4235,
28,
14171,
11,
3670,
28,
7839,
11,
1627,
31737,
28,
1370,
31737,
4008,
198,
437,
198,
198,
8818,
905,
36479,
1095,
3419,
198,
220,
3298,
43534,
198,
220,
13845,
14542,
796,
10903,
21737,
628,
220,
1303,
4866,
1222,
1598,
6218,
198,
220,
4704,
62,
13345,
7,
3419,
4613,
2221,
13845,
14542,
796,
2769,
30073,
7,
36479,
1095,
1776,
43534,
796,
15690,
90,
10100,
11,
16,
92,
3419,
886,
2162,
21973,
1069,
28,
49222,
41603,
1069,
8,
628,
220,
4704,
62,
13345,
7,
8818,
3419,
198,
220,
220,
220,
611,
4129,
7,
907,
14542,
8,
1875,
657,
198,
220,
220,
220,
220,
220,
5972,
1362,
13511,
13,
35235,
7203,
6329,
58,
36479,
1095,
60,
6329,
4943,
198,
220,
220,
220,
220,
220,
329,
31456,
287,
13845,
14542,
5972,
1362,
13511,
13,
4798,
7,
19662,
8,
886,
198,
220,
220,
220,
220,
220,
5972,
1362,
13511,
13,
35235,
7203,
1783,
4943,
198,
220,
220,
220,
886,
198,
220,
886,
2162,
21973,
1069,
28,
18557,
41603,
1069,
8,
198,
437,
198,
198,
29113,
14468,
4242,
2235,
198,
198,
4798,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
7839,
28,
7839,
11,
1627,
31737,
28,
9562,
8,
198,
35235,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
7839,
28,
7839,
8,
198,
198,
10951,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
14171,
28,
25,
12360,
11,
3670,
28,
7839,
8,
198,
24442,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
14171,
28,
25,
27509,
11,
3670,
28,
7839,
8,
198,
40539,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
14171,
28,
25,
20361,
11,
3670,
28,
7839,
8,
198,
18224,
7,
5661,
3712,
16818,
11,
26498,
986,
2162,
7839,
2625,
4943,
796,
3275,
7,
5661,
11,
26498,
986,
2162,
14171,
28,
25,
12331,
11,
3670,
28,
7839,
8,
198
] | 3.166667 | 738 |
@testset "Utils" begin
De, Dx = 3, 2
g = Flux.batch([GNNGraph(erdos_renyi(10, 30),
ndata=rand(Dx, 10),
edata=rand(De, 30),
graph_type=GRAPH_T) for i=1:5])
x = g.ndata.x
e = g.edata.e
@testset "reduce_nodes" begin
r = reduce_nodes(mean, g, x)
@test size(r) == (Dx, g.num_graphs)
@test r[:,2] ≈ mean(getgraph(g, 2).ndata.x, dims=2)
end
@testset "reduce_edges" begin
r = reduce_edges(mean, g, e)
@test size(r) == (De, g.num_graphs)
@test r[:,2] ≈ mean(getgraph(g, 2).edata.e, dims=2)
end
@testset "softmax_nodes" begin
r = softmax_nodes(g, x)
@test size(r) == size(x)
@test r[:,1:10] ≈ softmax(getgraph(g, 1).ndata.x, dims=2)
end
@testset "softmax_edges" begin
r = softmax_edges(g, e)
@test size(r) == size(e)
@test r[:,1:60] ≈ softmax(getgraph(g, 1).edata.e, dims=2)
end
@testset "broadcast_nodes" begin
z = rand(4, g.num_graphs)
r = broadcast_nodes(g, z)
@test size(r) == (4, g.num_nodes)
@test r[:,1] ≈ z[:,1]
@test r[:,10] ≈ z[:,1]
@test r[:,11] ≈ z[:,2]
end
@testset "broadcast_edges" begin
z = rand(4, g.num_graphs)
r = broadcast_edges(g, z)
@test size(r) == (4, g.num_edges)
@test r[:,1] ≈ z[:,1]
@test r[:,60] ≈ z[:,1]
@test r[:,61] ≈ z[:,2]
end
@testset "softmax_edge_neighbors" begin
s = [1,2,3,4]
t = [5,5,6,6]
g2 = GNNGraph(s, t)
e2 = randn(Float32, 3, g2.num_edges)
z = softmax_edge_neighbors(g2, e2)
@test size(z) == size(e2)
@test z[:,1:2] ≈ NNlib.softmax(e2[:,1:2], dims=2)
@test z[:,3:4] ≈ NNlib.softmax(e2[:,3:4], dims=2)
end
end
| [
31,
9288,
2617,
366,
18274,
4487,
1,
2221,
198,
220,
220,
220,
1024,
11,
360,
87,
796,
513,
11,
362,
198,
220,
220,
220,
308,
796,
1610,
2821,
13,
43501,
26933,
38,
6144,
37065,
7,
263,
37427,
62,
918,
48111,
7,
940,
11,
1542,
828,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
7890,
28,
25192,
7,
35,
87,
11,
838,
828,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1225,
1045,
28,
25192,
7,
5005,
11,
1542,
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,
4823,
62,
4906,
28,
10761,
31300,
62,
51,
8,
329,
1312,
28,
16,
25,
20,
12962,
220,
198,
220,
220,
220,
2124,
796,
308,
13,
358,
1045,
13,
87,
198,
220,
220,
220,
304,
796,
308,
13,
276,
1045,
13,
68,
628,
220,
220,
220,
2488,
9288,
2617,
366,
445,
7234,
62,
77,
4147,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
4646,
62,
77,
4147,
7,
32604,
11,
308,
11,
2124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
357,
35,
87,
11,
308,
13,
22510,
62,
34960,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
17,
60,
15139,
230,
1612,
7,
1136,
34960,
7,
70,
11,
362,
737,
358,
1045,
13,
87,
11,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
445,
7234,
62,
276,
3212,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
4646,
62,
276,
3212,
7,
32604,
11,
308,
11,
304,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
357,
5005,
11,
308,
13,
22510,
62,
34960,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
17,
60,
15139,
230,
1612,
7,
1136,
34960,
7,
70,
11,
362,
737,
276,
1045,
13,
68,
11,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
4215,
9806,
62,
77,
4147,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
2705,
9806,
62,
77,
4147,
7,
70,
11,
2124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
2546,
7,
87,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
16,
25,
940,
60,
15139,
230,
2705,
9806,
7,
1136,
34960,
7,
70,
11,
352,
737,
358,
1045,
13,
87,
11,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
4215,
9806,
62,
276,
3212,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
2705,
9806,
62,
276,
3212,
7,
70,
11,
304,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
2546,
7,
68,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
16,
25,
1899,
60,
15139,
230,
2705,
9806,
7,
1136,
34960,
7,
70,
11,
352,
737,
276,
1045,
13,
68,
11,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
36654,
2701,
62,
77,
4147,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
43720,
7,
19,
11,
308,
13,
22510,
62,
34960,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
7025,
62,
77,
4147,
7,
70,
11,
1976,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
357,
19,
11,
308,
13,
22510,
62,
77,
4147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
16,
60,
15139,
230,
1976,
58,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
940,
60,
15139,
230,
1976,
58,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
1157,
60,
15139,
230,
1976,
58,
45299,
17,
60,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
36654,
2701,
62,
276,
3212,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
43720,
7,
19,
11,
308,
13,
22510,
62,
34960,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
374,
796,
7025,
62,
276,
3212,
7,
70,
11,
1976,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
81,
8,
6624,
357,
19,
11,
308,
13,
22510,
62,
276,
3212,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
16,
60,
15139,
230,
1976,
58,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
1899,
60,
15139,
230,
1976,
58,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
374,
58,
45299,
5333,
60,
15139,
230,
1976,
58,
45299,
17,
60,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2488,
9288,
2617,
366,
4215,
9806,
62,
14907,
62,
710,
394,
32289,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
264,
796,
685,
16,
11,
17,
11,
18,
11,
19,
60,
198,
220,
220,
220,
220,
220,
220,
220,
256,
796,
685,
20,
11,
20,
11,
21,
11,
21,
60,
198,
220,
220,
220,
220,
220,
220,
220,
308,
17,
796,
402,
6144,
37065,
7,
82,
11,
256,
8,
198,
220,
220,
220,
220,
220,
220,
220,
304,
17,
796,
43720,
77,
7,
43879,
2624,
11,
513,
11,
308,
17,
13,
22510,
62,
276,
3212,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
2705,
9806,
62,
14907,
62,
710,
394,
32289,
7,
70,
17,
11,
304,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
2546,
7,
89,
8,
6624,
2546,
7,
68,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
1976,
58,
45299,
16,
25,
17,
60,
15139,
230,
399,
45,
8019,
13,
4215,
9806,
7,
68,
17,
58,
45299,
16,
25,
17,
4357,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
9288,
1976,
58,
45299,
18,
25,
19,
60,
15139,
230,
399,
45,
8019,
13,
4215,
9806,
7,
68,
17,
58,
45299,
18,
25,
19,
4357,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
886,
198,
437,
198
] | 1.654867 | 1,130 |
abstract type PipelineStep end
"""
run(step::PipelineStep, context, data)
Applies the operation `step` to `data`
"""
function run end
"""
run!(buf, step::PipelineStep, context, data)
Applies the operation `step` inplace to `buf`. `buf` is mutated.
"""
function run! end
"""
invert(step::PipelineStep, context, data)
Applies the inverse of the operation `step` to `data`
"""
function invert end
"""
invert!(buf, step::PipelineStep, context, data)
Applies the inverse of the operation `step` to `buf` inplace. `buf` is mutated,
"""
function invert! end
| [
397,
8709,
2099,
37709,
8600,
886,
628,
198,
37811,
198,
220,
220,
220,
1057,
7,
9662,
3712,
47,
541,
4470,
8600,
11,
4732,
11,
1366,
8,
198,
198,
4677,
13508,
262,
4905,
4600,
9662,
63,
284,
4600,
7890,
63,
198,
37811,
198,
8818,
1057,
886,
198,
198,
37811,
198,
220,
220,
220,
1057,
0,
7,
29325,
11,
2239,
3712,
47,
541,
4470,
8600,
11,
4732,
11,
1366,
8,
198,
198,
4677,
13508,
262,
4905,
4600,
9662,
63,
287,
5372,
284,
4600,
29325,
44646,
4600,
29325,
63,
318,
48865,
13,
198,
37811,
198,
8818,
1057,
0,
886,
628,
198,
37811,
198,
220,
220,
220,
287,
1851,
7,
9662,
3712,
47,
541,
4470,
8600,
11,
4732,
11,
1366,
8,
198,
198,
4677,
13508,
262,
34062,
286,
262,
4905,
4600,
9662,
63,
284,
4600,
7890,
63,
198,
37811,
198,
8818,
287,
1851,
886,
628,
198,
37811,
198,
220,
220,
220,
287,
1851,
0,
7,
29325,
11,
2239,
3712,
47,
541,
4470,
8600,
11,
4732,
11,
1366,
8,
198,
198,
4677,
13508,
262,
34062,
286,
262,
4905,
4600,
9662,
63,
284,
4600,
29325,
63,
287,
5372,
13,
4600,
29325,
63,
318,
48865,
11,
198,
37811,
198,
8818,
287,
1851,
0,
886,
198
] | 2.919192 | 198 |
#=doc
Utilities
=#
export crop_array_border
"""
throwaway the border region of an array (ndims > 3), currently only works for 3D cropsize.
"""
function crop_array_border(arr::Array, cropsize::Union{Vector,Tuple})
@assert ndims(arr) >= 3
sz = size(arr)
@assert sz[1]>cropsize[1]*2 &&
sz[2]>cropsize[2]*2 &&
sz[3]>cropsize[3]*2
return arr[ cropsize[1]+1:sz[1]-cropsize[1],
cropsize[2]+1:sz[2]-cropsize[2],
cropsize[3]+1:sz[3]-cropsize[3]]
end
| [
2,
28,
15390,
198,
18274,
2410,
198,
46249,
198,
198,
39344,
13833,
62,
18747,
62,
20192,
198,
198,
37811,
198,
16939,
8272,
262,
4865,
3814,
286,
281,
7177,
357,
358,
12078,
1875,
513,
828,
3058,
691,
2499,
329,
513,
35,
14450,
1096,
13,
198,
37811,
198,
8818,
13833,
62,
18747,
62,
20192,
7,
3258,
3712,
19182,
11,
14450,
1096,
3712,
38176,
90,
38469,
11,
51,
29291,
30072,
198,
220,
220,
220,
2488,
30493,
299,
67,
12078,
7,
3258,
8,
18189,
513,
198,
220,
220,
220,
264,
89,
796,
2546,
7,
3258,
8,
198,
220,
220,
220,
2488,
30493,
264,
89,
58,
16,
60,
29,
19915,
862,
1096,
58,
16,
60,
9,
17,
11405,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
89,
58,
17,
60,
29,
19915,
862,
1096,
58,
17,
60,
9,
17,
11405,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
89,
58,
18,
60,
29,
19915,
862,
1096,
58,
18,
60,
9,
17,
198,
220,
220,
220,
1441,
5240,
58,
14450,
1096,
58,
16,
48688,
16,
25,
82,
89,
58,
16,
45297,
19915,
862,
1096,
58,
16,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14450,
1096,
58,
17,
48688,
16,
25,
82,
89,
58,
17,
45297,
19915,
862,
1096,
58,
17,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14450,
1096,
58,
18,
48688,
16,
25,
82,
89,
58,
18,
45297,
19915,
862,
1096,
58,
18,
11907,
198,
437,
198
] | 1.965649 | 262 |
"""
me_solve_time_independent(rho_in::Array{T1,2},
H::Array{T2,2},
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5()) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
Time independent master equation solver using a non-vectorized algorithm.
## args
REQUIRED
* rho_in: d x d array, the density matrix of the initial state
* H: d x d array, system Hamiltonian
* Gamma: d x d x K array, all K Lindblad operators
* rates: K x 1 array, dissipative rate for each Lindblad operator
* t0: float, start time
* tf: float, end time
KEYWORD OPTIONAL
* tstep: float, time steps at which output data should be saved
* tols: 2 x 1 array, vector of solver tolernaces in the order [abstol, reltol]
* alg: function, algorithm from DifferentialEquations for the solver to use, default is Tsit5
* iter_num: number of iterations for an adpative solver
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
function me_solve_time_independent(rho_in::Array{T1,2},
H::Array{T2,2},
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
rho_in = convert(Array{ComplexF64,2},rho_in)
H = convert(Array{ComplexF64,2},H)
Gamma = convert(Array{ComplexF64,3},Gamma)
rates = convert(Array{Float64,1},rates)
dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
scratchA = similar(rho_in);
scratchB = similar(rho_in);
Gammas = [Gamma[:,:,ii].*sqrt(rates[ii]) for ii=1:size(Gamma,3)]
GammaTs = [collect(G') for G in Gammas]
GammaSqs = [0.5.*G'G for G in Gammas]
dif_f(du,u,p,t) = dRho!(du,u,H,Gammas,GammaTs,GammaSqs,dRho_L,scratchA,scratchB) # In place
tspan = (t0,tf)
prob = ODEProblem{true}(dif_f,rho_in,tspan)
if tstep < 1e-10
tstep = (tf-t0)./100
end
sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], maxiters=iter_num)
tvec = sol.t
rho_out = sol.u
return tvec, rho_out
end
"""
me_solve_H_time_dependent(rho_in::Array{T1,2},
H::Function,
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[]
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
Time dependent (Hamiltonian) master equation solver using a non-vectorized algorithm.
## args
REQUIRED
* rho_in: d x d array, the density matrix of the initial state
* H: function, system Hamiltonian, takes input of time and returns the
Hamiltonian at the given time in matrix form
* Gamma: d x d x K array, all K Lindblad operators
* rates: K x 1 array, dissipative rate for each Lindblad operator
* t0: float, start time
* tf: float, end time
KEYWORD OPTIONAL
* tstep: float, time steps at which output data should be saved
* tols: 2 x 1 array, vector of solver tolernaces in the order [abstol, reltol]
* alg: function, algorithm from DifferentialEquations for the solver to use, default is Tsit5
* iter_num: number of iterations for an adpative solver
* stop_points: vector of time-points the solver must step through (for adaptive solvers)
* adapt: Boolean. If false, the solver assumes it is using a fixed
timestep integration method.
* δt: Timestep for fixed timestep integration method.
* override: Booelan. If true, overrides the error checking that the data
save timestep (tstep) is not less than the fixed integration
timestep (δt).
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
function me_solve_H_time_dependent(rho_in::Array{T1,2},
H::Function,
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
rho_in = convert(Array{ComplexF64,2},rho_in)
Gamma = convert(Array{ComplexF64,3},Gamma)
rates = convert(Array{Float64,1},rates)
dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
H_temp = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
scratchA = similar(rho_in);
scratchB = similar(rho_in);
Gammas = [Gamma[:,:,ii].*sqrt(rates[ii]) for ii=1:size(Gamma,3)]
GammaTs = [collect(G') for G in Gammas]
GammaSqs = [0.5.*G'G for G in Gammas]
dif_f(du,u,p,t) = dRho!(du,u,H,H_temp,Gammas,GammaTs,GammaSqs,dRho_L,scratchA,scratchB,t) # In place
tspan = (t0,tf)
prob = ODEProblem{true}(dif_f,rho_in,tspan)
if tstep < 1e-10
tstep = (tf-t0)./100
end
if adapt
sol = solve(prob, alg, saveat = tstep, tstops = stop_points, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], maxiters=iter_num)
else
if tstep < δt && override == false
error("You are using a fixed-timestep solver and the save timestep is smaller than solver timestep. This is probably a bad idea. If you insist, set override = true in the input arguments to override this error checking.")
end
sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], adaptive = adapt, dt = δt)
end
tvec = sol.t
rho_out = sol.u
return tvec, rho_out
end
"""
me_solve_H_time_dependent(rho_in::Array{T1,2},
Hops::Array{T5,3},
Hfuncs::Function,
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat, T5 <: Number}
Time dependent (Hamiltonian) master equation solver using a non-vectorized algorithm. Instead of inputing the Hamiltonian as a matrix function, it is input as a basis of matrices, and a function that describes the time evolution of the scalar prefactor of each basis element.
This solver also allows for fixed timestep integration.
Input arguments (different from above):
## args
REQUIRED
* Hops: Array of matrices that describe the Hamiltonian. In the most
general case is a full basis for operator space.
* Hfuncs: Function that takes as input a Float (the time) and returns
a Vector of Floats. Each element of the output vector is
the value of the scalar prefactor for the corresponding
basis element in the decomposition of the Hamiltonian.
KEYWORD OPTIONAL
* adapt: Boolean. If false, the solver assumes it is using a fixed
timestep integration method.
* δt: Timestep for fixed timestep integration method.
* override: Booelan. If true, overrides the error checking that the data
save timestep (tstep) is not less than the fixed integration
timestep (δt).
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
function me_solve_H_time_dependent(rho_in::Array{T1,2},
Hops::Array{T5,3},
Hfuncs::Function,
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat, T5 <: Number}
rho_in = convert(Array{ComplexF64,2},rho_in)
Gamma = convert(Array{ComplexF64,3},Gamma)
rates = convert(Array{Float64,1},rates)
Hops = convert(Array{ComplexF64,3},Hops)
dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
H_temp = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
Hf_temp = zeros(ComplexF64,size(Hops,3))
scratchA = similar(rho_in);
scratchB = similar(rho_in);
Gammas = [Gamma[:,:,ii].*sqrt(rates[ii]) for ii=1:size(Gamma,3)]
GammaTs = [collect(G') for G in Gammas]
GammaSqs = [0.5.*G'G for G in Gammas]
dif_f(du,u,p,t) = dRho!(du,u,Hops,Hfuncs,H_temp,Hf_temp,Gammas,GammaTs,GammaSqs,dRho_L,scratchA,scratchB,t) # In place
tspan = (t0,tf)
prob = ODEProblem{true}(dif_f,rho_in,tspan)
if tstep < 1e-10
tstep = (tf-t0)./100
end
if adapt
sol = solve(prob, alg, saveat = tstep, tstops = stop_points, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], maxiters=iter_num)
else
if tstep < δt && override == false
error("You are using a fixed-timestep solver and the save timestep is smaller than solver timestep. This is probably a bad idea. If you insist, set override = true in the input arguments to override this error checking.")
end
sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], adaptive = adapt, dt = δt)
end
tvec = sol.t
rho_out = sol.u
return tvec, rho_out
end
"""
me_solve_L_time_dependent(rho_in::Array{T1,2},
H::Array{T2,2},
Gamma::Array{T3,3},
rates::Function,
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number}
Time dependent (dissipative rates) master equation solver using a non-vectorized algorithm.
## args
* rho_in: d x d array, the density matrix of the initial state
* H: d x d array, system Hamiltonian
* Gamma: d x d x K array, all K Lindblad operators
* rates: K x 1 array, dissipative rate for each Lindblad operator, takes input time and returns a vector of the dissipative rates at the given time
* t0: float, start time
* tf: float, end time
KEYWORD OPTIONAL
* tstep: float, time steps at which output data should be saved
* tols: 2 x 1 array, vector of solver tolernaces in the order [abstol, reltol]
* alg: function, algorithm from DifferentialEquations for the solver to use, default is Tsit5
* iter_num: number of iterations for an adpative solver
* stop_points: vector of time-points the solver must step through (for adaptive solvers)
* adapt: Boolean. If false, the solver assumes it is using a fixed
timestep integration method.
* δt: Timestep for fixed timestep integration method.
* override: Booelan. If true, overrides the error checking that the data
save timestep (tstep) is not less than the fixed integration
timestep (δt).
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
function me_solve_L_time_dependent(rho_in::Array{T1,2},
H::Array{T2,2},
Gamma::Array{T3,3},
rates::Function,
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number}
rho_in = convert(Array{ComplexF64,2},rho_in)
H = convert(Array{ComplexF64,2},H)
Gamma = convert(Array{ComplexF64,3},Gamma)
scratchA = similar(rho_in);
scratchB = similar(rho_in);
Gammas = [Gamma[:,:,ii] for ii=1:size(Gamma,3)]
GammaTs = [collect(G') for G in Gammas]
GammaSqs = [0.5.*G'G for G in Gammas]
dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
rates_temp = Array{Float64}(undef,1)
dif_f(du,u,p,t) = dRho!(du,u,H,rates,rates_temp,Gammas,GammaTs,GammaSqs,dRho_L,scratchA,scratchB,t) # In place
tspan = (t0,tf)
prob = ODEProblem{true}(dif_f,rho_in,tspan)
if tstep < 1e-10
tstep = (tf-t0)./100
end
if adapt
sol = solve(prob, alg, saveat = tstep, tstops = stop_points, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], maxiters=iter_num)
else
if tstep < δt && override == false
error("You are using a fixed-timestep solver and the save timestep is smaller than solver timestep. This is probably a bad idea. If you insist, set override = true in the input arguments to override this error checking.")
end
sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], adaptive = adapt, dt = δt)
end
tvec = sol.t
rho_out = sol.u
return tvec, rho_out
end
"""
me_solve_full_time_dependent(rho_in::Array{T1,2},
H::Function,
Gamma::Array{T3,3},
rates::Function,
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number}
Time dependent (Hamiltonian and dissipative rates) master equation solver using a non-vectorized algorithm.
## args
REQUIRED
* rho_in: d x d array, the density matrix of the initial state
* H: function, system Hamiltonian, takes input of time and returns
the Hamiltonian at the given time in matrix form
* Gamma: d x d x K array, all K Lindblad operators
* rates: K x 1 array, dissipative rate for each Lindblad operator,
takes input time and returns a vector of the dissipative
rates at the given time
* t0: float, start time
* tf: float, end time
KEYWORD OPTIONAL
* tstep: float, time steps at which output data should be saved
* tols: 2 x 1 array, vector of solver tolernaces in the
order [abstol, reltol]
* alg: function, algorithm from DifferentialEquations for the solver
to use, default is Tsit5
* iter_num: number of iterations for an adpative solver
* stop_points: vector of time-points the solver must step through
(for adaptive solvers)
* adapt: Boolean. If false, the solver assumes it is using a fixed
timestep integration method.
* δt: Timestep for fixed timestep integration method.
* override: Booelan. If true, overrides the error checking that the data
save timestep (tstep) is not less than the fixed integration
timestep (δt).
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
function me_solve_full_time_dependent(rho_in::Array{T1,2},
H::Function,
Gamma::Array{T3,3},
rates::Function,
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5(),
iter_num=1e5,
stop_points=[],
adapt::Bool = true,
δt::Float64 = tols[1],
override::Bool = false) where {T1 <: Number, T2 <: Number, T3 <: Number}
rho_in = convert(Array{ComplexF64,2},rho_in)
Gamma = convert(Array{ComplexF64,3},Gamma)
dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
H_temp = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
rates_temp = Array{Float64}(undef,1)
scratchA = similar(rho_in);
scratchB = similar(rho_in);
Gammas = [Gamma[:,:,ii] for ii=1:size(Gamma,3)]
GammaTs = [collect(G') for G in Gammas]
GammaSqs = [0.5.*G'G for G in Gammas]
dif_f(du,u,p,t) = dRho!(du,u,H,H_temp,rates,rates_temp,Gammas,GammaTs,GammaSqs,dRho_L,scratchA,scratchB,t) # In place
tspan = (t0,tf)
prob = ODEProblem{true}(dif_f,rho_in,tspan)
if tstep < 1e-10
tstep = (tf-t0)./100
end
if adapt
sol = solve(prob, alg, saveat = tstep, tstops = stop_points, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], maxiters=iter_num)
else
if tstep < δt && override == false
error("You are using a fixed-timestep solver and the save timestep is smaller than solver timestep. This is probably a bad idea. If you insist, set override = true in the input arguments to override this error checking.")
end
sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2], adaptive = adapt, dt = δt)
end
tvec = sol.t
rho_out = sol.u
return tvec, rho_out
end
"""
me_solve_time_independent_vec(rho_in::Array{T1,2},
H::Array{T2,2},
Gamma::Array{T3,3},
rates::Array{T4,1},
t0::AbstractFloat,
tf::AbstractFloat;
tstep::AbstractFloat=0.,
tols::Vector{Float64}=[1e-6,1e-3],
alg = Tsit5()) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
Time independent master equation solver using a non-vectorized algorithm but with vector ODE solvers
## args
REQUIRED
* rho_in: d x d array, the density matrix of the initial state
* H: d x d array, system Hamiltonian
* Gamma: d x d x K array, all K Lindblad operators
* rates: K x 1 array, dissipative rate for each Lindblad operator
* t0: float, start time
* tf: float, end time
KEYWORD OPTIONAL
* tstep: float, time steps at which output data should be saved
* tols: 2 x 1 array, vector of solver tolernaces in the
order [abstol, reltol]
* alg: function, algorithm from DifferentialEquations for the
solver to use, default is Tsit5
## returns
* tvec: vector of time points where the density matrix has been simulated
* rho_out: vector of simulated density matricies
"""
# LUKE: I think we can remove this functionality.
# function me_solve_time_independent_vec(rho_in::Array{T1,2},
# H::Array{T2,2},
# Gamma::Array{T3,3},
# rates::Array{T4,1},
# t0::AbstractFloat,
# tf::AbstractFloat;
# tstep::AbstractFloat=0.,
# tols::Vector{Float64}=[1e-6,1e-3],
# alg = Tsit5()) where {T1 <: Number, T2 <: Number, T3 <: Number, T4 <: AbstractFloat}
#
# rho_in = convert(Array{ComplexF64,2},rho_in)
# H = convert(Array{ComplexF64,2},H)
# Gamma = convert(Array{ComplexF64,3},Gamma)
# rates = convert(Array{Float64,1},rates)
#
# rho_in_vec = rho_in[:]
#
# dRho_L = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
# rho_temp = Array{ComplexF64}(undef,size(rho_in,1),size(rho_in,2))
#
# dif_f(du,u,p,t) = dRho_vec(du,u,H,Gamma,rates,dRho_L,rho_temp) # In place
# tspan = (t0,tf)
#
# prob = ODEProblem{true}(dif_f,rho_in_vec,tspan)
#
# if tstep < 1e-10
# tstep = (tf-t0)./100
# end
#
# sol = solve(prob, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2])
#
# tvec = sol.t
# rho_out_vec = sol.u
#
# rho_out = Array{Array{ComplexF64,2}}(undef,length(tvec))
# for jj = 1:1:length(tvec)
# rho_out[jj] = reshape(rho_out_vec[jj][:],size(H))
# end
#
# return tvec, rho_out
# end
# """
# Time dependent solver for Gaussian continuous variable systems using the covariance matrix approach. Defined in terms of the canonical X and P quadratures, the covariance matrix elements are defined by
# C_ab = <O_aO_b> - <O_a><O_b> where vec(O) = [X,P] with
# X = (a + a^†)/√2, P = -i(a - a^†)/√2 with a the lowering operator of a harmonic oscilaltor.
# Input Parameters:
# REQUIRED
# C_in: Array 2 x 2, initial condition for the covariance matrix
# a_in: vector 2 x 1, initial condition for the average value vector [<X>,<P>]
# h: Function that returnas as output a matrix 2 x 2, Hamiltonian evolution term for the covariance matrix. For H = ω a^†a + (λa^2 + conj(λ)a^†^2)/2, h = [Im(λ), (ω - Re(λ);-(ω + Re(λ)), -Im(λ)].
# Can use h = create_h_C(ω(t),λ(t),t) to generate the correct h.
# drv: Function that returns as output a vector 2 x 1, linear drive term. For H = αa + conj(α)a^†, drv = √2[Im(α), Re(α)]
# t0: float, start time
# tf: float, end time
# KEYWORD OPTIONAL
# tstep: float, time steps at which output data should be saved
# tols: 2 x 1 array, vector of solver tolernaces in the order [abstol, reltol]
# alg: function, algorithm from DifferentialEquations for the solver to use, default is Tsit5
# """
#
# function CV_solve_full_time_dependent(C_in::Array{T,2},a_in::Vector{Float64},h::Function,drv::Function,t0::AbstractFloat,tf::AbstractFloat; tstep::AbstractFloat=0.,tols::Vector{Float64}=[1e-6,1e-3],alg = Tsit5()) where {T <: Number}
#
# C_in = convert(Array{ComplexF64,2}, C_in)
# if tstep < 1e-10
# tstep = (tf-t0)./100
# end
# tspan = (t0,tf)
#
# # Covariance matrix
# h_tempL = Array{Float64}(undef,size(C_in,1),size(C_in,2))
# # h_tempR = Array{Float64}(undef,size(C_in,1),size(C_in,2))
# dif_C(du,u,p,t) = dCV(du,u,h,t,h_tempL) # In place
#
# prob_C = ODEProblem{true}(dif_C,C_in,tspan)
#
# sol_C = solve(prob_C, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2])
#
# # Average
# h_temp = Array{Float64}(undef,size(C_in,1),size(C_in,2))
# drv_temp = Array{Float64}(undef,size(a_in,1))
# dif_a(du,u,p,t) = d_av(du,u,h,t,drv,h_temp,drv_temp) # In place
#
# prob_a = ODEProblem{true}(dif_a,a_in,tspan)
#
# sol_a = solve(prob_a, alg, saveat = tstep, dense=false, save_everystep=false, abstol = tols[1], reltol = tols[2])
#
# return sol_C.t, sol_C.u, sol_a.t, sol_a.u
# end
| [
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
2435,
62,
34750,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
28955,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
198,
198,
7575,
4795,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
13,
198,
198,
2235,
26498,
198,
2200,
10917,
37819,
198,
9,
374,
8873,
62,
259,
25,
220,
220,
288,
2124,
288,
7177,
11,
262,
12109,
17593,
286,
262,
4238,
1181,
198,
9,
367,
25,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
1080,
11582,
666,
198,
9,
43595,
25,
220,
220,
220,
288,
2124,
288,
2124,
509,
7177,
11,
477,
509,
9329,
2436,
324,
12879,
198,
9,
3965,
25,
220,
220,
220,
509,
2124,
352,
7177,
11,
32008,
876,
2494,
329,
1123,
9329,
2436,
324,
10088,
198,
9,
256,
15,
25,
220,
220,
220,
220,
220,
220,
12178,
11,
923,
640,
198,
9,
48700,
25,
220,
220,
220,
220,
220,
220,
12178,
11,
886,
640,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
256,
9662,
25,
220,
220,
220,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
9,
284,
7278,
25,
220,
220,
220,
220,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
9,
435,
70,
25,
220,
220,
220,
220,
220,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
1540,
332,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
9,
11629,
62,
22510,
25,
1271,
286,
34820,
329,
281,
512,
79,
876,
1540,
332,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
198,
37811,
198,
8818,
502,
62,
82,
6442,
62,
2435,
62,
34750,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
628,
220,
220,
220,
374,
8873,
62,
259,
220,
220,
220,
220,
220,
220,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
220,
220,
220,
367,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
39,
8,
198,
220,
220,
220,
43595,
220,
220,
220,
220,
220,
220,
220,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
198,
220,
220,
220,
3965,
220,
220,
220,
220,
220,
220,
220,
796,
10385,
7,
19182,
90,
43879,
2414,
11,
16,
5512,
9700,
8,
198,
220,
220,
220,
288,
49,
8873,
62,
43,
220,
220,
220,
220,
220,
220,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
628,
220,
220,
220,
12692,
32,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
198,
220,
220,
220,
12692,
33,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
628,
220,
220,
220,
14014,
5356,
220,
220,
220,
220,
220,
220,
796,
685,
34777,
2611,
58,
45299,
45299,
4178,
4083,
9,
31166,
17034,
7,
9700,
58,
4178,
12962,
329,
21065,
28,
16,
25,
7857,
7,
34777,
2611,
11,
18,
15437,
198,
220,
220,
220,
43595,
33758,
220,
220,
220,
220,
220,
796,
685,
33327,
7,
38,
11537,
329,
402,
287,
14014,
5356,
60,
198,
220,
220,
220,
43595,
50,
48382,
220,
220,
220,
220,
796,
685,
15,
13,
20,
15885,
38,
6,
38,
329,
402,
287,
14014,
5356,
60,
628,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
0,
7,
646,
11,
84,
11,
39,
11,
34777,
5356,
11,
34777,
2611,
33758,
11,
34777,
2611,
50,
48382,
11,
67,
49,
8873,
62,
43,
11,
1416,
36722,
32,
11,
1416,
36722,
33,
8,
1303,
554,
1295,
198,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
628,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
11,
912,
6839,
8,
628,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
3509,
270,
364,
28,
2676,
62,
22510,
8,
628,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
220,
220,
220,
374,
8873,
62,
448,
796,
1540,
13,
84,
628,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
437,
198,
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
39,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
28,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
198,
198,
7575,
10795,
357,
45405,
666,
8,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
13,
198,
198,
2235,
26498,
198,
2200,
10917,
37819,
198,
9,
374,
8873,
62,
259,
25,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
262,
12109,
17593,
286,
262,
4238,
1181,
198,
9,
367,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
1080,
11582,
666,
11,
2753,
5128,
286,
640,
290,
5860,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11582,
666,
379,
262,
1813,
640,
287,
17593,
1296,
198,
9,
43595,
25,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
2124,
509,
7177,
11,
477,
509,
9329,
2436,
324,
12879,
198,
9,
3965,
25,
220,
220,
220,
220,
220,
220,
220,
509,
2124,
352,
7177,
11,
32008,
876,
2494,
329,
1123,
9329,
2436,
324,
10088,
198,
9,
256,
15,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
923,
640,
198,
9,
48700,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
886,
640,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
256,
9662,
25,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
9,
284,
7278,
25,
220,
220,
220,
220,
220,
220,
220,
220,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
9,
435,
70,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
1540,
332,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
9,
11629,
62,
22510,
25,
220,
220,
220,
220,
1271,
286,
34820,
329,
281,
512,
79,
876,
1540,
332,
198,
9,
2245,
62,
13033,
25,
220,
15879,
286,
640,
12,
13033,
262,
1540,
332,
1276,
2239,
832,
357,
1640,
29605,
1540,
690,
8,
198,
9,
6068,
25,
220,
220,
220,
220,
220,
220,
220,
41146,
13,
1002,
3991,
11,
262,
1540,
332,
18533,
340,
318,
1262,
257,
5969,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
11812,
2446,
13,
198,
9,
7377,
112,
83,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5045,
395,
538,
329,
5969,
4628,
395,
538,
11812,
2446,
13,
198,
9,
20957,
25,
220,
220,
220,
220,
21458,
417,
272,
13,
1002,
2081,
11,
23170,
1460,
262,
4049,
10627,
326,
262,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
4628,
395,
538,
357,
83,
9662,
8,
318,
407,
1342,
621,
262,
5969,
11812,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
357,
138,
112,
83,
737,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
220,
220,
220,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
198,
37811,
198,
8818,
502,
62,
82,
6442,
62,
39,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
628,
220,
220,
220,
374,
8873,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
220,
220,
220,
43595,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
198,
220,
220,
220,
3965,
796,
10385,
7,
19182,
90,
43879,
2414,
11,
16,
5512,
9700,
8,
628,
220,
220,
220,
288,
49,
8873,
62,
43,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
367,
62,
29510,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
628,
220,
220,
220,
12692,
32,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
198,
220,
220,
220,
12692,
33,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
628,
220,
220,
220,
14014,
5356,
220,
220,
220,
220,
220,
220,
796,
685,
34777,
2611,
58,
45299,
45299,
4178,
4083,
9,
31166,
17034,
7,
9700,
58,
4178,
12962,
329,
21065,
28,
16,
25,
7857,
7,
34777,
2611,
11,
18,
15437,
198,
220,
220,
220,
43595,
33758,
220,
220,
220,
220,
220,
796,
685,
33327,
7,
38,
11537,
329,
402,
287,
14014,
5356,
60,
198,
220,
220,
220,
43595,
50,
48382,
220,
220,
220,
220,
796,
685,
15,
13,
20,
15885,
38,
6,
38,
329,
402,
287,
14014,
5356,
60,
628,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
0,
7,
646,
11,
84,
11,
39,
11,
39,
62,
29510,
11,
34777,
5356,
11,
34777,
2611,
33758,
11,
34777,
2611,
50,
48382,
11,
67,
49,
8873,
62,
43,
11,
1416,
36722,
32,
11,
1416,
36722,
33,
11,
83,
8,
1303,
554,
1295,
198,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
628,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
11,
912,
6839,
8,
628,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
6068,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
256,
301,
2840,
796,
2245,
62,
13033,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
3509,
270,
364,
28,
2676,
62,
22510,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9662,
1279,
7377,
112,
83,
11405,
20957,
6624,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
1639,
389,
1262,
257,
5969,
12,
16514,
395,
538,
1540,
332,
290,
262,
3613,
4628,
395,
538,
318,
4833,
621,
1540,
332,
4628,
395,
538,
13,
770,
318,
2192,
257,
2089,
2126,
13,
1002,
345,
16361,
11,
900,
20957,
796,
2081,
287,
262,
5128,
7159,
284,
20957,
428,
4049,
10627,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
29605,
796,
6068,
11,
288,
83,
796,
7377,
112,
83,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
220,
220,
220,
374,
8873,
62,
448,
796,
1540,
13,
84,
628,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
39,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
2840,
3712,
19182,
90,
51,
20,
11,
18,
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,
367,
12543,
6359,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
2676,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
11,
309,
20,
1279,
25,
7913,
92,
198,
198,
7575,
10795,
357,
45405,
666,
8,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
13,
5455,
286,
5128,
278,
262,
11582,
666,
355,
257,
17593,
2163,
11,
340,
318,
5128,
355,
257,
4308,
286,
2603,
45977,
11,
290,
257,
2163,
326,
8477,
262,
640,
6954,
286,
262,
16578,
283,
7694,
11218,
286,
1123,
4308,
5002,
13,
198,
198,
1212,
1540,
332,
635,
3578,
329,
5969,
4628,
395,
538,
11812,
13,
198,
198,
20560,
7159,
357,
39799,
422,
2029,
2599,
198,
2235,
26498,
198,
2200,
10917,
37819,
198,
9,
367,
2840,
25,
220,
220,
220,
220,
15690,
286,
2603,
45977,
326,
6901,
262,
11582,
666,
13,
554,
262,
749,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2276,
1339,
318,
257,
1336,
4308,
329,
10088,
2272,
13,
198,
9,
367,
12543,
6359,
25,
220,
220,
15553,
326,
2753,
355,
5128,
257,
48436,
357,
1169,
640,
8,
290,
5860,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
257,
20650,
286,
29075,
1381,
13,
5501,
5002,
286,
262,
5072,
15879,
318,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
1988,
286,
262,
16578,
283,
7694,
11218,
329,
262,
11188,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4308,
5002,
287,
262,
26969,
9150,
286,
262,
11582,
666,
13,
198,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
6068,
25,
220,
220,
220,
41146,
13,
1002,
3991,
11,
262,
1540,
332,
18533,
340,
318,
1262,
257,
5969,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
11812,
2446,
13,
198,
9,
7377,
112,
83,
25,
220,
220,
220,
220,
220,
220,
5045,
395,
538,
329,
5969,
4628,
395,
538,
11812,
2446,
13,
198,
9,
20957,
25,
21458,
417,
272,
13,
1002,
2081,
11,
23170,
1460,
262,
4049,
10627,
326,
262,
1366,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
4628,
395,
538,
357,
83,
9662,
8,
318,
407,
1342,
621,
262,
5969,
11812,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
357,
138,
112,
83,
737,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
220,
220,
220,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
220,
198,
37811,
198,
8818,
502,
62,
82,
6442,
62,
39,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
2840,
3712,
19182,
90,
51,
20,
11,
18,
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,
367,
12543,
6359,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
11,
309,
20,
1279,
25,
7913,
92,
628,
220,
220,
220,
374,
8873,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
220,
220,
220,
43595,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
198,
220,
220,
220,
3965,
796,
10385,
7,
19182,
90,
43879,
2414,
11,
16,
5512,
9700,
8,
198,
220,
220,
220,
367,
2840,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
39,
2840,
8,
198,
220,
220,
220,
288,
49,
8873,
62,
43,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
367,
62,
29510,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
367,
69,
62,
29510,
796,
1976,
27498,
7,
5377,
11141,
37,
2414,
11,
7857,
7,
39,
2840,
11,
18,
4008,
628,
220,
220,
220,
12692,
32,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
198,
220,
220,
220,
12692,
33,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
628,
220,
220,
220,
14014,
5356,
220,
220,
220,
220,
220,
220,
796,
685,
34777,
2611,
58,
45299,
45299,
4178,
4083,
9,
31166,
17034,
7,
9700,
58,
4178,
12962,
329,
21065,
28,
16,
25,
7857,
7,
34777,
2611,
11,
18,
15437,
198,
220,
220,
220,
43595,
33758,
220,
220,
220,
220,
220,
796,
685,
33327,
7,
38,
11537,
329,
402,
287,
14014,
5356,
60,
198,
220,
220,
220,
43595,
50,
48382,
220,
220,
220,
220,
796,
685,
15,
13,
20,
15885,
38,
6,
38,
329,
402,
287,
14014,
5356,
60,
628,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
0,
7,
646,
11,
84,
11,
39,
2840,
11,
39,
12543,
6359,
11,
39,
62,
29510,
11,
39,
69,
62,
29510,
11,
34777,
5356,
11,
34777,
2611,
33758,
11,
34777,
2611,
50,
48382,
11,
67,
49,
8873,
62,
43,
11,
1416,
36722,
32,
11,
1416,
36722,
33,
11,
83,
8,
1303,
554,
1295,
198,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
628,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
11,
912,
6839,
8,
628,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
6068,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
256,
301,
2840,
796,
2245,
62,
13033,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
3509,
270,
364,
28,
2676,
62,
22510,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9662,
1279,
7377,
112,
83,
11405,
20957,
6624,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
1639,
389,
1262,
257,
5969,
12,
16514,
395,
538,
1540,
332,
290,
262,
3613,
4628,
395,
538,
318,
4833,
621,
1540,
332,
4628,
395,
538,
13,
770,
318,
2192,
257,
2089,
2126,
13,
1002,
345,
16361,
11,
900,
20957,
796,
2081,
287,
262,
5128,
7159,
284,
20957,
428,
4049,
10627,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
29605,
796,
6068,
11,
288,
83,
796,
7377,
112,
83,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
220,
220,
220,
374,
8873,
62,
448,
796,
1540,
13,
84,
628,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
43,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
22203,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
92,
198,
198,
7575,
10795,
357,
67,
747,
541,
876,
3965,
8,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
13,
198,
198,
2235,
26498,
198,
9,
374,
8873,
62,
259,
25,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
262,
12109,
17593,
286,
262,
4238,
1181,
198,
9,
367,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
1080,
11582,
666,
198,
9,
43595,
25,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
2124,
509,
7177,
11,
477,
509,
9329,
2436,
324,
12879,
198,
9,
3965,
25,
220,
220,
220,
220,
220,
220,
220,
509,
2124,
352,
7177,
11,
32008,
876,
2494,
329,
1123,
9329,
2436,
324,
10088,
11,
2753,
5128,
640,
290,
5860,
257,
15879,
286,
262,
32008,
876,
3965,
379,
262,
1813,
640,
198,
9,
256,
15,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
923,
640,
198,
9,
48700,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
886,
640,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
256,
9662,
25,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
9,
284,
7278,
25,
220,
220,
220,
220,
220,
220,
220,
220,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
9,
435,
70,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
1540,
332,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
9,
11629,
62,
22510,
25,
220,
220,
220,
220,
1271,
286,
34820,
329,
281,
512,
79,
876,
1540,
332,
198,
9,
2245,
62,
13033,
25,
220,
15879,
286,
640,
12,
13033,
262,
1540,
332,
1276,
2239,
832,
357,
1640,
29605,
1540,
690,
8,
198,
9,
6068,
25,
220,
220,
220,
220,
220,
220,
220,
41146,
13,
1002,
3991,
11,
262,
1540,
332,
18533,
340,
318,
1262,
257,
5969,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
11812,
2446,
13,
198,
9,
7377,
112,
83,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5045,
395,
538,
329,
5969,
4628,
395,
538,
11812,
2446,
13,
198,
9,
20957,
25,
220,
220,
220,
220,
21458,
417,
272,
13,
1002,
2081,
11,
23170,
1460,
262,
4049,
10627,
326,
262,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
4628,
395,
538,
357,
83,
9662,
8,
318,
407,
1342,
621,
262,
5969,
11812,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
357,
138,
112,
83,
737,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
220,
220,
220,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
198,
37811,
198,
8818,
502,
62,
82,
6442,
62,
43,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
3965,
3712,
22203,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
92,
628,
220,
220,
220,
374,
8873,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
220,
220,
220,
367,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
39,
8,
198,
220,
220,
220,
43595,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
628,
220,
220,
220,
12692,
32,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
198,
220,
220,
220,
12692,
33,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
628,
220,
220,
220,
14014,
5356,
220,
220,
220,
220,
220,
220,
796,
685,
34777,
2611,
58,
45299,
45299,
4178,
60,
329,
21065,
28,
16,
25,
7857,
7,
34777,
2611,
11,
18,
15437,
198,
220,
220,
220,
43595,
33758,
220,
220,
220,
220,
220,
796,
685,
33327,
7,
38,
11537,
329,
402,
287,
14014,
5356,
60,
198,
220,
220,
220,
43595,
50,
48382,
220,
220,
220,
220,
796,
685,
15,
13,
20,
15885,
38,
6,
38,
329,
402,
287,
14014,
5356,
60,
628,
220,
220,
220,
288,
49,
8873,
62,
43,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
3965,
62,
29510,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
16,
8,
628,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
0,
7,
646,
11,
84,
11,
39,
11,
9700,
11,
9700,
62,
29510,
11,
34777,
5356,
11,
34777,
2611,
33758,
11,
34777,
2611,
50,
48382,
11,
67,
49,
8873,
62,
43,
11,
1416,
36722,
32,
11,
1416,
36722,
33,
11,
83,
8,
1303,
554,
1295,
198,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
628,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
11,
912,
6839,
8,
628,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
6068,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
256,
301,
2840,
796,
2245,
62,
13033,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
3509,
270,
364,
28,
2676,
62,
22510,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9662,
1279,
7377,
112,
83,
11405,
20957,
6624,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
1639,
389,
1262,
257,
5969,
12,
16514,
395,
538,
1540,
332,
290,
262,
3613,
4628,
395,
538,
318,
4833,
621,
1540,
332,
4628,
395,
538,
13,
770,
318,
2192,
257,
2089,
2126,
13,
1002,
345,
16361,
11,
900,
20957,
796,
2081,
287,
262,
5128,
7159,
284,
20957,
428,
4049,
10627,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
29605,
796,
6068,
11,
288,
83,
796,
7377,
112,
83,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
220,
220,
220,
374,
8873,
62,
448,
796,
1540,
13,
84,
628,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
12853,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
220,
220,
220,
3965,
3712,
22203,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
92,
198,
7575,
10795,
357,
45405,
666,
290,
32008,
876,
3965,
8,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
13,
198,
198,
2235,
26498,
198,
2200,
10917,
37819,
198,
9,
374,
8873,
62,
259,
25,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
262,
12109,
17593,
286,
262,
4238,
1181,
198,
9,
367,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
1080,
11582,
666,
11,
2753,
5128,
286,
640,
290,
5860,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
11582,
666,
379,
262,
1813,
640,
287,
17593,
1296,
198,
9,
43595,
25,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
2124,
509,
7177,
11,
477,
509,
9329,
2436,
324,
12879,
198,
9,
3965,
25,
220,
220,
220,
220,
220,
220,
220,
509,
2124,
352,
7177,
11,
32008,
876,
2494,
329,
1123,
9329,
2436,
324,
10088,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2753,
5128,
640,
290,
5860,
257,
15879,
286,
262,
32008,
876,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3965,
379,
262,
1813,
640,
198,
9,
256,
15,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
923,
640,
198,
9,
48700,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
886,
640,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
256,
9662,
25,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
9,
284,
7278,
25,
220,
220,
220,
220,
220,
220,
220,
220,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
9,
435,
70,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
1540,
332,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
9,
11629,
62,
22510,
25,
220,
220,
220,
220,
1271,
286,
34820,
329,
281,
512,
79,
876,
1540,
332,
198,
9,
2245,
62,
13033,
25,
220,
15879,
286,
640,
12,
13033,
262,
1540,
332,
1276,
2239,
832,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
1640,
29605,
1540,
690,
8,
198,
9,
6068,
25,
220,
220,
220,
220,
220,
220,
220,
41146,
13,
1002,
3991,
11,
262,
1540,
332,
18533,
340,
318,
1262,
257,
5969,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
11812,
2446,
13,
198,
9,
7377,
112,
83,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5045,
395,
538,
329,
5969,
4628,
395,
538,
11812,
2446,
13,
198,
9,
20957,
25,
220,
220,
220,
220,
21458,
417,
272,
13,
1002,
2081,
11,
23170,
1460,
262,
4049,
10627,
326,
262,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
4628,
395,
538,
357,
83,
9662,
8,
318,
407,
1342,
621,
262,
5969,
11812,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4628,
395,
538,
357,
138,
112,
83,
737,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
220,
220,
220,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
198,
37811,
198,
8818,
502,
62,
82,
6442,
62,
12853,
62,
2435,
62,
21186,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
22203,
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,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
220,
220,
220,
3965,
3712,
22203,
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,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11629,
62,
22510,
28,
16,
68,
20,
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,
2245,
62,
13033,
41888,
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,
6068,
3712,
33,
970,
796,
2081,
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,
7377,
112,
83,
3712,
43879,
2414,
796,
284,
7278,
58,
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,
20957,
3712,
33,
970,
796,
3991,
8,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
92,
628,
220,
220,
220,
374,
8873,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
220,
220,
220,
43595,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
628,
220,
220,
220,
288,
49,
8873,
62,
43,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
367,
62,
29510,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
220,
220,
220,
3965,
62,
29510,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
16,
8,
628,
220,
220,
220,
12692,
32,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
198,
220,
220,
220,
12692,
33,
220,
220,
220,
220,
796,
2092,
7,
81,
8873,
62,
259,
1776,
628,
220,
220,
220,
14014,
5356,
220,
220,
220,
220,
220,
220,
796,
685,
34777,
2611,
58,
45299,
45299,
4178,
60,
329,
21065,
28,
16,
25,
7857,
7,
34777,
2611,
11,
18,
15437,
198,
220,
220,
220,
43595,
33758,
220,
220,
220,
220,
220,
796,
685,
33327,
7,
38,
11537,
329,
402,
287,
14014,
5356,
60,
198,
220,
220,
220,
43595,
50,
48382,
220,
220,
220,
220,
796,
685,
15,
13,
20,
15885,
38,
6,
38,
329,
402,
287,
14014,
5356,
60,
628,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
0,
7,
646,
11,
84,
11,
39,
11,
39,
62,
29510,
11,
9700,
11,
9700,
62,
29510,
11,
34777,
5356,
11,
34777,
2611,
33758,
11,
34777,
2611,
50,
48382,
11,
67,
49,
8873,
62,
43,
11,
1416,
36722,
32,
11,
1416,
36722,
33,
11,
83,
8,
1303,
554,
1295,
198,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
628,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
11,
912,
6839,
8,
628,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
6068,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
256,
301,
2840,
796,
2245,
62,
13033,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
3509,
270,
364,
28,
2676,
62,
22510,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9662,
1279,
7377,
112,
83,
11405,
20957,
6624,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7203,
1639,
389,
1262,
257,
5969,
12,
16514,
395,
538,
1540,
332,
290,
262,
3613,
4628,
395,
538,
318,
4833,
621,
1540,
332,
4628,
395,
538,
13,
770,
318,
2192,
257,
2089,
2126,
13,
1002,
345,
16361,
11,
900,
20957,
796,
2081,
287,
262,
5128,
7159,
284,
20957,
428,
4049,
10627,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
4357,
29605,
796,
6068,
11,
288,
83,
796,
7377,
112,
83,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
220,
220,
220,
374,
8873,
62,
448,
796,
1540,
13,
84,
628,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
502,
62,
82,
6442,
62,
2435,
62,
34750,
62,
35138,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
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,
220,
220,
220,
220,
3965,
3712,
19182,
90,
51,
19,
11,
16,
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,
220,
220,
220,
220,
256,
15,
3712,
23839,
43879,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
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,
435,
70,
796,
13146,
270,
20,
28955,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
198,
198,
7575,
4795,
4958,
16022,
1540,
332,
1262,
257,
1729,
12,
31364,
1143,
11862,
475,
351,
15879,
440,
7206,
1540,
690,
198,
198,
2235,
26498,
198,
2200,
10917,
37819,
198,
9,
374,
8873,
62,
259,
25,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
262,
12109,
17593,
286,
262,
4238,
1181,
198,
9,
367,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
7177,
11,
1080,
11582,
666,
198,
9,
43595,
25,
220,
220,
220,
220,
220,
220,
220,
288,
2124,
288,
2124,
509,
7177,
11,
477,
509,
9329,
2436,
324,
12879,
198,
9,
3965,
25,
220,
220,
220,
220,
220,
220,
220,
509,
2124,
352,
7177,
11,
32008,
876,
2494,
329,
1123,
9329,
2436,
324,
10088,
198,
9,
256,
15,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
923,
640,
198,
9,
48700,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
886,
640,
198,
20373,
54,
12532,
39852,
2849,
1847,
198,
9,
256,
9662,
25,
220,
220,
220,
220,
220,
220,
220,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
9,
284,
7278,
25,
220,
220,
220,
220,
220,
220,
220,
220,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
9,
435,
70,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1540,
332,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
198,
2235,
5860,
198,
9,
256,
35138,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15879,
286,
640,
2173,
810,
262,
12109,
17593,
468,
587,
28590,
198,
9,
374,
8873,
62,
448,
25,
220,
220,
220,
220,
220,
15879,
286,
28590,
12109,
2603,
1173,
444,
198,
37811,
198,
2,
50168,
7336,
25,
314,
892,
356,
460,
4781,
428,
11244,
13,
198,
2,
2163,
502,
62,
82,
6442,
62,
2435,
62,
34750,
62,
35138,
7,
81,
8873,
62,
259,
3712,
19182,
90,
51,
16,
11,
17,
5512,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
367,
3712,
19182,
90,
51,
17,
11,
17,
5512,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43595,
3712,
19182,
90,
51,
18,
11,
18,
5512,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3965,
3712,
19182,
90,
51,
19,
11,
16,
5512,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
15,
3712,
23839,
43879,
11,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48700,
3712,
23839,
43879,
26,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
7278,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
435,
70,
796,
13146,
270,
20,
28955,
810,
1391,
51,
16,
1279,
25,
7913,
11,
309,
17,
1279,
25,
7913,
11,
309,
18,
1279,
25,
7913,
11,
309,
19,
1279,
25,
27741,
43879,
92,
198,
2,
198,
2,
220,
220,
220,
220,
374,
8873,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
81,
8873,
62,
259,
8,
198,
2,
220,
220,
220,
220,
367,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
39,
8,
198,
2,
220,
220,
220,
220,
43595,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
18,
5512,
34777,
2611,
8,
198,
2,
220,
220,
220,
220,
3965,
796,
10385,
7,
19182,
90,
43879,
2414,
11,
16,
5512,
9700,
8,
198,
2,
198,
2,
220,
220,
220,
220,
374,
8873,
62,
259,
62,
35138,
796,
374,
8873,
62,
259,
58,
47715,
198,
2,
198,
2,
220,
220,
220,
220,
288,
49,
8873,
62,
43,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
2,
220,
220,
220,
220,
374,
8873,
62,
29510,
796,
15690,
90,
5377,
11141,
37,
2414,
92,
7,
917,
891,
11,
7857,
7,
81,
8873,
62,
259,
11,
16,
828,
7857,
7,
81,
8873,
62,
259,
11,
17,
4008,
198,
2,
198,
2,
220,
220,
220,
220,
288,
361,
62,
69,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
49,
8873,
62,
35138,
7,
646,
11,
84,
11,
39,
11,
34777,
2611,
11,
9700,
11,
67,
49,
8873,
62,
43,
11,
81,
8873,
62,
29510,
8,
1303,
554,
1295,
198,
2,
220,
220,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
198,
2,
198,
2,
220,
220,
220,
220,
1861,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
69,
11,
81,
8873,
62,
259,
62,
35138,
11,
912,
6839,
8,
198,
2,
198,
2,
220,
220,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
2,
220,
220,
220,
220,
886,
198,
2,
198,
2,
220,
220,
220,
220,
1540,
796,
8494,
7,
1676,
65,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
12962,
198,
2,
198,
2,
220,
220,
220,
220,
256,
35138,
796,
1540,
13,
83,
198,
2,
220,
220,
220,
220,
374,
8873,
62,
448,
62,
35138,
796,
1540,
13,
84,
198,
2,
198,
2,
220,
220,
220,
220,
374,
8873,
62,
448,
796,
15690,
90,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
11709,
7,
917,
891,
11,
13664,
7,
83,
35138,
4008,
198,
2,
220,
220,
220,
220,
329,
474,
73,
796,
352,
25,
16,
25,
13664,
7,
83,
35138,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
374,
8873,
62,
448,
58,
41098,
60,
796,
27179,
1758,
7,
81,
8873,
62,
448,
62,
35138,
58,
41098,
7131,
25,
4357,
7857,
7,
39,
4008,
198,
2,
220,
220,
220,
220,
886,
198,
2,
198,
2,
220,
220,
220,
220,
1441,
256,
35138,
11,
374,
8873,
62,
448,
198,
2,
886,
628,
198,
2,
37227,
198,
2,
3862,
10795,
1540,
332,
329,
12822,
31562,
12948,
7885,
3341,
1262,
262,
44829,
590,
17593,
3164,
13,
2896,
1389,
287,
2846,
286,
262,
40091,
1395,
290,
350,
15094,
81,
6691,
11,
262,
44829,
590,
17593,
4847,
389,
5447,
416,
198,
2,
220,
220,
327,
62,
397,
796,
1279,
46,
62,
64,
46,
62,
65,
29,
532,
1279,
46,
62,
64,
6927,
46,
62,
65,
29,
810,
43030,
7,
46,
8,
796,
685,
55,
11,
47,
60,
351,
198,
2,
220,
220,
1395,
796,
357,
64,
1343,
257,
61,
33912,
20679,
24861,
248,
17,
11,
350,
796,
532,
72,
7,
64,
532,
257,
61,
33912,
20679,
24861,
248,
17,
351,
257,
262,
21683,
10088,
286,
257,
49239,
267,
1416,
346,
2501,
273,
13,
198,
2,
23412,
40117,
25,
198,
2,
4526,
10917,
37819,
198,
2,
220,
220,
327,
62,
259,
25,
15690,
362,
2124,
362,
11,
4238,
4006,
329,
262,
44829,
590,
17593,
198,
2,
220,
220,
257,
62,
259,
25,
15879,
362,
2124,
352,
11,
4238,
4006,
329,
262,
2811,
1988,
15879,
685,
27,
55,
22330,
27,
47,
37981,
198,
2,
220,
220,
289,
25,
15553,
326,
1441,
292,
355,
5072,
257,
17593,
362,
2124,
362,
11,
11582,
666,
6954,
3381,
329,
262,
44829,
590,
17593,
13,
1114,
367,
796,
18074,
231,
257,
61,
33912,
64,
1343,
357,
39377,
64,
61,
17,
1343,
11644,
7,
39377,
8,
64,
61,
33912,
61,
17,
20679,
17,
11,
289,
796,
685,
3546,
7,
39377,
828,
357,
49535,
532,
797,
7,
39377,
1776,
30420,
49535,
1343,
797,
7,
39377,
36911,
532,
3546,
7,
39377,
25295,
198,
2,
220,
220,
220,
220,
220,
220,
1680,
779,
289,
796,
2251,
62,
71,
62,
34,
7,
49535,
7,
83,
828,
39377,
7,
83,
828,
83,
8,
284,
7716,
262,
3376,
289,
13,
198,
2,
220,
220,
1553,
85,
25,
15553,
326,
5860,
355,
5072,
257,
15879,
362,
2124,
352,
11,
14174,
3708,
3381,
13,
1114,
367,
796,
26367,
64,
1343,
11644,
7,
17394,
8,
64,
61,
33912,
11,
1553,
85,
796,
18872,
248,
17,
58,
3546,
7,
17394,
828,
797,
7,
17394,
15437,
198,
2,
220,
220,
256,
15,
25,
12178,
11,
923,
640,
198,
2,
220,
220,
48700,
25,
12178,
11,
886,
640,
198,
2,
35374,
54,
12532,
39852,
2849,
1847,
198,
2,
220,
220,
256,
9662,
25,
12178,
11,
640,
4831,
379,
543,
5072,
1366,
815,
307,
7448,
198,
2,
220,
220,
284,
7278,
25,
362,
2124,
352,
7177,
11,
15879,
286,
1540,
332,
284,
75,
1142,
2114,
287,
262,
1502,
685,
397,
301,
349,
11,
823,
83,
349,
60,
198,
2,
220,
220,
435,
70,
25,
2163,
11,
11862,
422,
20615,
498,
23588,
602,
329,
262,
1540,
332,
284,
779,
11,
4277,
318,
13146,
270,
20,
198,
2,
37227,
198,
2,
198,
2,
2163,
26196,
62,
82,
6442,
62,
12853,
62,
2435,
62,
21186,
7,
34,
62,
259,
3712,
19182,
90,
51,
11,
17,
5512,
64,
62,
259,
3712,
38469,
90,
43879,
2414,
5512,
71,
3712,
22203,
11,
7109,
85,
3712,
22203,
11,
83,
15,
3712,
23839,
43879,
11,
27110,
3712,
23839,
43879,
26,
256,
9662,
3712,
23839,
43879,
28,
15,
1539,
83,
10220,
3712,
38469,
90,
43879,
2414,
92,
41888,
16,
68,
12,
21,
11,
16,
68,
12,
18,
4357,
14016,
796,
13146,
270,
20,
28955,
810,
1391,
51,
1279,
25,
7913,
92,
198,
2,
198,
2,
220,
220,
327,
62,
259,
796,
10385,
7,
19182,
90,
5377,
11141,
37,
2414,
11,
17,
5512,
327,
62,
259,
8,
198,
2,
220,
220,
611,
256,
9662,
1279,
352,
68,
12,
940,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
357,
27110,
12,
83,
15,
737,
14,
3064,
198,
2,
220,
220,
220,
220,
886,
198,
2,
220,
220,
256,
12626,
796,
357,
83,
15,
11,
27110,
8,
198,
2,
198,
2,
220,
220,
1303,
39751,
2743,
590,
17593,
198,
2,
220,
220,
289,
62,
29510,
43,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
7857,
7,
34,
62,
259,
11,
16,
828,
7857,
7,
34,
62,
259,
11,
17,
4008,
198,
2,
220,
220,
1303,
289,
62,
29510,
49,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
7857,
7,
34,
62,
259,
11,
16,
828,
7857,
7,
34,
62,
259,
11,
17,
4008,
198,
2,
220,
220,
220,
220,
288,
361,
62,
34,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
33538,
7,
646,
11,
84,
11,
71,
11,
83,
11,
71,
62,
29510,
43,
8,
1303,
554,
1295,
198,
2,
198,
2,
220,
220,
220,
220,
1861,
62,
34,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
34,
11,
34,
62,
259,
11,
912,
6839,
8,
198,
2,
198,
2,
220,
220,
220,
220,
1540,
62,
34,
796,
8494,
7,
1676,
65,
62,
34,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
12962,
198,
2,
198,
2,
220,
220,
1303,
13475,
198,
2,
220,
220,
289,
62,
29510,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
7857,
7,
34,
62,
259,
11,
16,
828,
7857,
7,
34,
62,
259,
11,
17,
4008,
198,
2,
220,
220,
1553,
85,
62,
29510,
796,
15690,
90,
43879,
2414,
92,
7,
917,
891,
11,
7857,
7,
64,
62,
259,
11,
16,
4008,
198,
2,
220,
220,
288,
361,
62,
64,
7,
646,
11,
84,
11,
79,
11,
83,
8,
796,
288,
62,
615,
7,
646,
11,
84,
11,
71,
11,
83,
11,
7109,
85,
11,
71,
62,
29510,
11,
7109,
85,
62,
29510,
8,
1303,
554,
1295,
198,
2,
198,
2,
220,
220,
220,
220,
1861,
62,
64,
796,
440,
7206,
40781,
90,
7942,
92,
7,
67,
361,
62,
64,
11,
64,
62,
259,
11,
912,
6839,
8,
198,
2,
198,
2,
220,
220,
220,
220,
1540,
62,
64,
796,
8494,
7,
1676,
65,
62,
64,
11,
435,
70,
11,
3613,
265,
796,
256,
9662,
11,
15715,
28,
9562,
11,
3613,
62,
16833,
9662,
28,
9562,
11,
16552,
349,
796,
284,
7278,
58,
16,
4357,
823,
83,
349,
796,
284,
7278,
58,
17,
12962,
198,
2,
198,
2,
1441,
1540,
62,
34,
13,
83,
11,
1540,
62,
34,
13,
84,
11,
1540,
62,
64,
13,
83,
11,
1540,
62,
64,
13,
84,
198,
2,
886,
198
] | 1.884319 | 14,419 |
module Direct
using jInv.Mesh
using jInv.Utils
using jInv.InverseSolve
using ShapeReconstructionPaLS.Utils
using ShapeReconstructionPaLS.ParamLevelSet
using MAT
using SparseArrays
using Distributed
import jInv.ForwardShare.getData
import jInv.ForwardShare.getSensTMatVec
import jInv.ForwardShare.getSensMatVec
import jInv.ForwardShare.ForwardProbType
## The rotation planes are:
# first rotation (theta) is for planes x1 and x2
# second rotation (phi) is for planes x1 and x3
# Sampling is done by summing planes of x1 and x2 for all values of x3.
export DirectParam, getDirectParam
mutable struct DirectParam <: ForwardProbType
Mesh :: RegularMesh
ndipsAll :: Int64
workerSubIdxs
#theta_phi_rad :: Array{Float64,2}
#b :: Array{Float64,2}
samplingBinning :: Int64
method :: String
Jacobian :: SparseMatrixCSC{Float32,Int32}
#S :: SparseMatrixCSC{Float32,Int32}
end
function getDirectParamInternal(Mesh::RegularMesh,ndipsAll::Int64,workerSubIdxs,samplingBinning::Int64,method)
return DirectParam(Mesh, ndipsAll, workerSubIdxs, samplingBinning, method,spzeros(Float32,Int32,0,0));
end
function getDirectParam(Mesh::RegularMesh,samplingBinning::Int64,numWorkers::Int64,method = MATBased)
## This function does use the parallel mechanism of jInv (i.e., returns a RemoteChannel), even if numWorkers=1.
if numWorkers > nworkers()
numWorkers = nworkers();
end
#SourcesSubInd = Array{Array{Int64,1}}(numWorkers);
SourcesSubInd = Array{Array{Int64}}(undef,numWorkers);
ActualWorkers = workers();
if numWorkers < nworkers()
ActualWorkers = ActualWorkers[1:numWorkers];
end
#pFor = Array{RemoteChannel}(numWorkers)
pFor = Array{RemoteChannel}(undef,numWorkers);
i = 1; nextidx() = (idx=i; i+=1; idx)
idx=i;
ndips = 1;
# send out jobs
@sync begin
for p = ActualWorkers
@async begin
while true
idx = nextidx();
if idx > numWorkers
break
end
I_p = getIndicesOfKthWorker(numWorkers,idx,ndips);
# println("Sending ",collect(I_p)," to worker ", p);
# find src and rec on mesh
#SEE IF CORRECT!!!!!!!!!!!!!!!!
tmp = initRemoteChannel(getDirectParamInternal,p, Mesh,ndips,I_p,samplingBinning,method);
pFor[1] = initRemoteChannel(getDirectParamInternal,p, Mesh,ndips,I_p,samplingBinning,method);
wait(pFor[1]);
end
end
end
end
return pFor # Array of Remote Refs
end
import jInv.Utils.clear!
function clear!(pFor::DirectParam)
pFor.SampleMat = spzeros(0);
clear!(pFor.Mesh);
return pFor;
end
#include("generateDipMatrix.jl");
#include("prepareSyntheticDipData.jl");
include("getData.jl");
include("sensitivityFuncs.jl");
end | [
21412,
4128,
198,
197,
198,
3500,
474,
19904,
13,
37031,
198,
3500,
474,
19904,
13,
18274,
4487,
198,
3500,
474,
19904,
13,
818,
4399,
50,
6442,
198,
3500,
25959,
6690,
261,
15019,
28875,
6561,
13,
18274,
4487,
198,
3500,
25959,
6690,
261,
15019,
28875,
6561,
13,
22973,
4971,
7248,
198,
3500,
36775,
198,
3500,
1338,
17208,
3163,
20477,
198,
3500,
4307,
6169,
198,
11748,
474,
19904,
13,
39746,
11649,
13,
1136,
6601,
198,
11748,
474,
19904,
13,
39746,
11649,
13,
1136,
50,
641,
15972,
265,
53,
721,
198,
11748,
474,
19904,
13,
39746,
11649,
13,
1136,
50,
641,
19044,
53,
721,
198,
11748,
474,
19904,
13,
39746,
11649,
13,
39746,
2964,
65,
6030,
628,
198,
198,
2235,
383,
13179,
13016,
389,
25,
220,
198,
2,
717,
13179,
357,
1169,
8326,
8,
318,
329,
13016,
2124,
16,
290,
2124,
17,
198,
2,
1218,
13179,
357,
34846,
8,
318,
329,
13016,
2124,
16,
290,
2124,
18,
198,
2,
3409,
11347,
318,
1760,
416,
2160,
2229,
13016,
286,
2124,
16,
290,
2124,
17,
329,
477,
3815,
286,
2124,
18,
13,
198,
198,
39344,
4128,
22973,
11,
651,
13470,
22973,
198,
76,
18187,
2878,
4128,
22973,
1279,
25,
19530,
2964,
65,
6030,
198,
220,
220,
220,
47529,
220,
220,
220,
220,
220,
220,
197,
197,
197,
197,
3712,
23603,
37031,
198,
197,
358,
2419,
3237,
197,
197,
197,
197,
3712,
2558,
2414,
198,
197,
28816,
7004,
7390,
34223,
197,
197,
197,
198,
220,
220,
220,
1303,
1169,
8326,
62,
34846,
62,
6335,
197,
197,
197,
3712,
15690,
90,
43879,
2414,
11,
17,
92,
198,
197,
2,
65,
197,
197,
197,
197,
197,
197,
3712,
15690,
90,
43879,
2414,
11,
17,
92,
198,
197,
37687,
11347,
33,
23062,
197,
197,
197,
3712,
2558,
2414,
198,
197,
24396,
197,
197,
197,
197,
197,
3712,
10903,
198,
197,
46751,
666,
197,
197,
197,
197,
3712,
1338,
17208,
46912,
34,
6173,
90,
43879,
2624,
11,
5317,
2624,
92,
198,
197,
2,
50,
197,
197,
197,
197,
197,
197,
3712,
1338,
17208,
46912,
34,
6173,
90,
43879,
2624,
11,
5317,
2624,
92,
198,
437,
628,
198,
8818,
651,
13470,
22973,
37693,
7,
37031,
3712,
40164,
37031,
11,
358,
2419,
3237,
3712,
5317,
2414,
11,
28816,
7004,
7390,
34223,
11,
37687,
11347,
33,
23062,
3712,
5317,
2414,
11,
24396,
8,
198,
197,
7783,
4128,
22973,
7,
37031,
11,
299,
67,
2419,
3237,
11,
8383,
7004,
7390,
34223,
11,
19232,
33,
23062,
11,
2446,
11,
2777,
9107,
418,
7,
43879,
2624,
11,
5317,
2624,
11,
15,
11,
15,
18125,
198,
437,
628,
198,
8818,
651,
13470,
22973,
7,
37031,
3712,
40164,
37031,
11,
37687,
11347,
33,
23062,
3712,
5317,
2414,
11,
22510,
12468,
364,
3712,
5317,
2414,
11,
24396,
796,
36775,
15001,
8,
198,
197,
2235,
770,
2163,
857,
779,
262,
10730,
9030,
286,
474,
19904,
357,
72,
13,
68,
1539,
5860,
257,
21520,
29239,
828,
772,
611,
997,
12468,
364,
28,
16,
13,
197,
198,
197,
361,
997,
12468,
364,
1875,
299,
22896,
3419,
198,
197,
197,
22510,
12468,
364,
796,
299,
22896,
9783,
198,
197,
437,
198,
197,
2,
21188,
7004,
5497,
796,
15690,
90,
19182,
90,
5317,
2414,
11,
16,
11709,
7,
22510,
12468,
364,
1776,
198,
197,
21188,
7004,
5497,
796,
15690,
90,
19182,
90,
5317,
2414,
11709,
7,
917,
891,
11,
22510,
12468,
364,
1776,
198,
197,
6398,
723,
12468,
364,
796,
3259,
9783,
198,
197,
361,
997,
12468,
364,
1279,
299,
22896,
3419,
198,
197,
197,
6398,
723,
12468,
364,
796,
33520,
12468,
364,
58,
16,
25,
22510,
12468,
364,
11208,
198,
197,
437,
198,
197,
2,
79,
1890,
220,
220,
796,
15690,
90,
36510,
29239,
92,
7,
22510,
12468,
364,
8,
198,
197,
79,
1890,
220,
220,
796,
15690,
90,
36510,
29239,
92,
7,
917,
891,
11,
22510,
12468,
364,
1776,
198,
197,
72,
796,
352,
26,
1306,
312,
87,
3419,
796,
357,
312,
87,
28,
72,
26,
1312,
47932,
16,
26,
4686,
87,
8,
198,
197,
312,
87,
28,
72,
26,
198,
197,
358,
2419,
220,
796,
352,
26,
198,
197,
2,
3758,
503,
3946,
198,
197,
31,
27261,
2221,
198,
197,
197,
1640,
279,
796,
33520,
12468,
364,
198,
197,
197,
197,
31,
292,
13361,
2221,
198,
197,
197,
197,
197,
4514,
2081,
198,
197,
197,
197,
197,
197,
312,
87,
796,
1306,
312,
87,
9783,
198,
197,
197,
197,
197,
197,
361,
4686,
87,
1875,
997,
12468,
364,
198,
197,
197,
197,
197,
197,
197,
9032,
198,
197,
197,
197,
197,
197,
437,
198,
197,
197,
197,
197,
197,
40,
62,
79,
796,
651,
5497,
1063,
5189,
42,
400,
12468,
263,
7,
22510,
12468,
364,
11,
312,
87,
11,
358,
2419,
1776,
198,
197,
197,
197,
197,
197,
2,
44872,
7203,
50,
1571,
33172,
33327,
7,
40,
62,
79,
27267,
284,
8383,
33172,
279,
1776,
198,
197,
197,
197,
197,
197,
2,
1064,
12351,
290,
664,
319,
19609,
198,
197,
197,
197,
197,
197,
2,
36078,
16876,
23929,
23988,
34635,
34635,
198,
197,
197,
197,
197,
197,
22065,
796,
2315,
36510,
29239,
7,
1136,
13470,
22973,
37693,
11,
79,
11,
47529,
11,
358,
2419,
11,
40,
62,
79,
11,
37687,
11347,
33,
23062,
11,
24396,
1776,
198,
197,
197,
197,
197,
197,
79,
1890,
58,
16,
60,
220,
796,
2315,
36510,
29239,
7,
1136,
13470,
22973,
37693,
11,
79,
11,
47529,
11,
358,
2419,
11,
40,
62,
79,
11,
37687,
11347,
33,
23062,
11,
24396,
1776,
198,
197,
197,
197,
197,
197,
17077,
7,
79,
1890,
58,
16,
36563,
198,
197,
197,
197,
197,
197,
198,
197,
197,
197,
197,
437,
198,
197,
197,
197,
437,
198,
197,
197,
437,
198,
197,
437,
198,
197,
7783,
279,
1890,
1303,
15690,
286,
21520,
6524,
82,
198,
437,
198,
198,
11748,
474,
19904,
13,
18274,
4487,
13,
20063,
0,
198,
8818,
1598,
0,
7,
79,
1890,
3712,
13470,
22973,
8,
198,
197,
79,
1890,
13,
36674,
19044,
796,
599,
9107,
418,
7,
15,
1776,
198,
197,
20063,
0,
7,
79,
1890,
13,
37031,
1776,
198,
197,
7783,
279,
1890,
26,
198,
437,
628,
198,
2,
17256,
7203,
8612,
378,
35,
541,
46912,
13,
20362,
15341,
198,
2,
17256,
7203,
46012,
533,
13940,
429,
6587,
35,
541,
6601,
13,
20362,
15341,
198,
17256,
7203,
1136,
6601,
13,
20362,
15341,
198,
17256,
7203,
82,
40545,
24629,
6359,
13,
20362,
15341,
198,
437
] | 2.558739 | 1,047 |
base_dir = dirname(dirname(pathof(PowerSystems)))
sys = PowerSystems.parse_standard_files(joinpath(MATPOWER_DIR, "case5_re.m"))
@testset "Check bus index" begin
@test sort([b.number for b in collect(get_components(Bus, sys))]) == [1, 2, 3, 4, 10]
@test sort(collect(Set([b.arc.from.number for
b in collect(get_components(Branch,sys))]))) == [1, 2, 3, 4]
@test sort(collect(Set([b.arc.to.number for
b in collect(get_components(Branch,sys))]))) == [2, 3, 4, 10]
# TODO: add test for loadzones testing MAPPING_BUSNUMBER2INDEX
end
| [
198,
8692,
62,
15908,
796,
26672,
3672,
7,
15908,
3672,
7,
6978,
1659,
7,
13434,
11964,
82,
22305,
198,
198,
17597,
796,
4333,
11964,
82,
13,
29572,
62,
20307,
62,
16624,
7,
22179,
6978,
7,
41636,
47,
36048,
62,
34720,
11,
366,
7442,
20,
62,
260,
13,
76,
48774,
198,
198,
31,
9288,
2617,
366,
9787,
1323,
6376,
1,
2221,
198,
220,
220,
220,
2488,
9288,
3297,
26933,
65,
13,
17618,
329,
275,
287,
2824,
7,
1136,
62,
5589,
3906,
7,
16286,
11,
25064,
4008,
12962,
6624,
685,
16,
11,
362,
11,
513,
11,
604,
11,
838,
60,
198,
220,
220,
220,
2488,
9288,
3297,
7,
33327,
7,
7248,
26933,
65,
13,
5605,
13,
6738,
13,
17618,
329,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
287,
2824,
7,
1136,
62,
5589,
3906,
7,
33,
25642,
11,
17597,
4008,
60,
22305,
6624,
685,
16,
11,
362,
11,
513,
11,
604,
60,
198,
220,
220,
220,
2488,
9288,
3297,
7,
33327,
7,
7248,
26933,
65,
13,
5605,
13,
1462,
13,
17618,
329,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
287,
2824,
7,
1136,
62,
5589,
3906,
7,
33,
25642,
11,
17597,
4008,
60,
22305,
6624,
685,
17,
11,
513,
11,
604,
11,
838,
60,
628,
220,
220,
220,
1303,
16926,
46,
25,
751,
1332,
329,
3440,
89,
1952,
4856,
337,
24805,
2751,
62,
45346,
41359,
13246,
17,
12115,
6369,
198,
198,
437,
198
] | 2.310757 | 251 |
using kRPC
using CSV
using LinearAlgebra
using DataFrames
using Plots
using Rotations
pyplot()
conn = kRPCConnect("Aerodata")
using kRPC.Remote.SpaceCenter
totable = 1
outp_a = 1
outp_b = 1
vessel = ActiveVessel()
flight = Flight(vessel)
orbit = Orbit(vessel)
body = Body(orbit)
body_frame = ReferenceFrame(body)
function compute_reference_frame(body, lat, lon, alt::Float64)
landing_position = SurfacePosition(body, lat, lon, body_frame)
q_long = (
0.0,
sin(-lon * 0.5 * pi / 180),
0.0,
cos(-lon * 0.5 * pi / 180))
q_lat = (
0.0,
0.0,
sin(lat * 0.5 * pi / 180),
cos(lat * 0.5 * pi / 180))
cr1 = CreateRelative(body_frame, position=landing_position, rotation=q_long)
cr2 = CreateRelative(cr1,rotation=q_lat)
return CreateRelative(cr2,position=(alt,0.0,0.0))
end
rf = compute_reference_frame(body, -0.09720792138114814, -74.55767985150328, 0.0)
ref = ReferenceFrame(vessel)
gfl = Flight(vessel, referenceFrame=rf)
trq_vis = kRPC.Remote.Drawing.AddLine((0.0,0.0,0.0),(0.0,0.0,0.0),rf)
strq_vis = kRPC.Remote.Drawing.AddLine((0.0,0.0,0.0),(0.0,0.0,0.0),rf)
sfrc_vis = kRPC.Remote.Drawing.AddLine((0.0,0.0,0.0),(0.0,0.0,0.0),rf)
kRPC.Remote.Drawing.Color!(trq_vis, (0.0,1.0,0.0))
kRPC.Remote.Drawing.Color!(strq_vis, (0.0,0.0,1.0))
global lut = -10000.0
global lav = Float64[]
global iter = 0
add_multiple_streams([
kRPC.Remote.SpaceCenter.Delayed.AerodynamicTorque(gfl),
kRPC.Remote.SpaceCenter.Delayed.Velocity(gfl),
kRPC.Remote.SpaceCenter.Delayed.Position(vessel, rf)],
function (at, vel, pos)
if iter % 10 == 0
sat,saf = kRPC.SendMessage(conn, [
kRPC.Remote.SpaceCenter.Delayed.SimulateAerodynamicTorqueAt(gfl, body, pos, vel),
kRPC.Remote.SpaceCenter.Delayed.SimulateAerodynamicForceAt(gfl, body, pos, vel)])
kRPC.SendMessage(conn,
[kRPC.Remote.Drawing.Delayed.End!(trq_vis, pos.+at),
kRPC.Remote.Drawing.Delayed.End!(strq_vis, pos.+sat),
kRPC.Remote.Drawing.Delayed.End!(sfrc_vis, pos.+saf),
kRPC.Remote.Drawing.Delayed.Start!(trq_vis, pos),
kRPC.Remote.Drawing.Delayed.Start!(strq_vis, pos),
kRPC.Remote.Drawing.Delayed.Start!(sfrc_vis, pos)])
end
global iter = iter + 1
end)
| [
3500,
479,
49,
5662,
198,
3500,
44189,
198,
3500,
44800,
2348,
29230,
198,
3500,
6060,
35439,
198,
3500,
1345,
1747,
198,
3500,
18481,
602,
198,
9078,
29487,
3419,
198,
198,
37043,
796,
479,
49,
5662,
13313,
7203,
32,
263,
375,
1045,
4943,
198,
3500,
479,
49,
5662,
13,
36510,
13,
14106,
23656,
198,
83,
313,
540,
796,
352,
198,
448,
79,
62,
64,
796,
352,
198,
448,
79,
62,
65,
796,
352,
198,
1158,
741,
796,
14199,
53,
7878,
3419,
198,
22560,
796,
13365,
7,
1158,
741,
8,
198,
42594,
796,
38161,
7,
1158,
741,
8,
198,
2618,
796,
12290,
7,
42594,
8,
198,
2618,
62,
14535,
796,
20984,
19778,
7,
2618,
8,
198,
198,
8818,
24061,
62,
35790,
62,
14535,
7,
2618,
11,
3042,
11,
300,
261,
11,
5988,
3712,
43879,
2414,
8,
198,
220,
220,
220,
9581,
62,
9150,
796,
20321,
26545,
7,
2618,
11,
3042,
11,
300,
261,
11,
1767,
62,
14535,
8,
198,
220,
220,
220,
10662,
62,
6511,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7813,
32590,
14995,
1635,
657,
13,
20,
1635,
31028,
1220,
11546,
828,
198,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
8615,
32590,
14995,
1635,
657,
13,
20,
1635,
31028,
1220,
11546,
4008,
198,
220,
220,
220,
10662,
62,
15460,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7813,
7,
15460,
1635,
657,
13,
20,
1635,
31028,
1220,
11546,
828,
198,
220,
220,
220,
220,
220,
220,
220,
8615,
7,
15460,
1635,
657,
13,
20,
1635,
31028,
1220,
11546,
4008,
198,
220,
220,
220,
1067,
16,
796,
13610,
6892,
876,
7,
2618,
62,
14535,
11,
2292,
28,
1044,
278,
62,
9150,
11,
13179,
28,
80,
62,
6511,
8,
198,
220,
220,
220,
1067,
17,
796,
13610,
6892,
876,
7,
6098,
16,
11,
10599,
341,
28,
80,
62,
15460,
8,
198,
220,
220,
220,
1441,
13610,
6892,
876,
7,
6098,
17,
11,
9150,
16193,
2501,
11,
15,
13,
15,
11,
15,
13,
15,
4008,
198,
437,
198,
198,
41871,
796,
24061,
62,
35790,
62,
14535,
7,
2618,
11,
532,
15,
13,
2931,
23906,
48156,
20107,
1157,
2780,
1415,
11,
532,
4524,
13,
2816,
32059,
4089,
4349,
31938,
2078,
11,
657,
13,
15,
8,
198,
5420,
796,
20984,
19778,
7,
1158,
741,
8,
198,
70,
2704,
796,
13365,
7,
1158,
741,
11,
4941,
19778,
28,
41871,
8,
628,
198,
2213,
80,
62,
4703,
796,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
4550,
13949,
19510,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
7,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
41871,
8,
198,
2536,
80,
62,
4703,
796,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
4550,
13949,
19510,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
7,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
41871,
8,
198,
28202,
6015,
62,
4703,
796,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
4550,
13949,
19510,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
7,
15,
13,
15,
11,
15,
13,
15,
11,
15,
13,
15,
828,
41871,
8,
198,
74,
49,
5662,
13,
36510,
13,
25302,
278,
13,
10258,
0,
7,
2213,
80,
62,
4703,
11,
357,
15,
13,
15,
11,
16,
13,
15,
11,
15,
13,
15,
4008,
198,
74,
49,
5662,
13,
36510,
13,
25302,
278,
13,
10258,
0,
7,
2536,
80,
62,
4703,
11,
357,
15,
13,
15,
11,
15,
13,
15,
11,
16,
13,
15,
4008,
198,
20541,
300,
315,
796,
532,
49388,
13,
15,
198,
20541,
21606,
796,
48436,
2414,
21737,
198,
20541,
11629,
796,
657,
198,
2860,
62,
48101,
62,
5532,
82,
26933,
198,
197,
74,
49,
5662,
13,
36510,
13,
14106,
23656,
13,
13856,
16548,
13,
32,
263,
34743,
15884,
4188,
7,
70,
2704,
828,
198,
197,
74,
49,
5662,
13,
36510,
13,
14106,
23656,
13,
13856,
16548,
13,
46261,
11683,
7,
70,
2704,
828,
198,
197,
74,
49,
5662,
13,
36510,
13,
14106,
23656,
13,
13856,
16548,
13,
26545,
7,
1158,
741,
11,
374,
69,
8,
4357,
198,
197,
8818,
357,
265,
11,
11555,
11,
1426,
8,
220,
198,
197,
197,
361,
11629,
4064,
838,
6624,
657,
198,
197,
197,
197,
49720,
11,
49585,
796,
479,
49,
5662,
13,
25206,
12837,
7,
37043,
11,
685,
198,
197,
197,
197,
197,
74,
49,
5662,
13,
36510,
13,
14106,
23656,
13,
13856,
16548,
13,
8890,
5039,
32,
263,
34743,
15884,
4188,
2953,
7,
70,
2704,
11,
1767,
11,
1426,
11,
11555,
828,
198,
197,
197,
197,
197,
74,
49,
5662,
13,
36510,
13,
14106,
23656,
13,
13856,
16548,
13,
8890,
5039,
32,
263,
34743,
10292,
2953,
7,
70,
2704,
11,
1767,
11,
1426,
11,
11555,
8,
12962,
198,
197,
197,
197,
74,
49,
5662,
13,
25206,
12837,
7,
37043,
11,
220,
198,
197,
197,
197,
197,
58,
74,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
12915,
0,
7,
2213,
80,
62,
4703,
11,
1426,
13,
10,
265,
828,
198,
197,
197,
197,
220,
197,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
12915,
0,
7,
2536,
80,
62,
4703,
11,
1426,
13,
10,
49720,
828,
198,
197,
197,
197,
220,
197,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
12915,
0,
7,
28202,
6015,
62,
4703,
11,
1426,
13,
10,
49585,
828,
198,
197,
197,
197,
220,
197,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
10434,
0,
7,
2213,
80,
62,
4703,
11,
1426,
828,
198,
197,
197,
197,
220,
197,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
10434,
0,
7,
2536,
80,
62,
4703,
11,
1426,
828,
198,
197,
197,
197,
220,
197,
479,
49,
5662,
13,
36510,
13,
25302,
278,
13,
13856,
16548,
13,
10434,
0,
7,
28202,
6015,
62,
4703,
11,
1426,
8,
12962,
198,
197,
197,
437,
198,
197,
197,
20541,
11629,
796,
11629,
1343,
352,
198,
197,
437,
8,
628
] | 2.132634 | 1,048 |
# This file includes the network
# --------------------------------------- ODENetwork construction and modificatio ------------------------------- #
"""
$TYPEDEF
# Fields
$TYPEDFIELDS
"""
mutable struct ODENetwork{T1<:AbstractNode,T2<:AbstractSimpleWeightedGraph,T3<:AbstractMatrix} <: AbstractNetwork
"Dynamical nodes"
nodes::Vector{T1}
"Coupling strength"
ϵ::Float64
"Graph explaining topology"
graph::T2
"Inner coupling matrix"
coupling::T3
end
ODENetwork(nodes = Lorenz[], ϵ = 1.0, graph = zeros(length(nodes), length(nodes)), coupling = diagm(ones(dimension(eltype(nodes))))) =
ODENetwork(nodes, ϵ, SimpleWeightedGraph(graph), coupling)
ODENetwork(::Type{T}, ϵ = 1.0, graph = fill(0.0, 0, 0), coupling = diagm(ones(dimension(T)))) where {T<:AbstractNode} =
ODENetwork([T() for i = 1:size(graph)[1]], ϵ, graph, coupling)
"""
$TYPEDEF
# Fields
$TYPEDFIELDS
"""
mutable struct SDENetwork{T1<:AbstractNode,T2<:AbstractSimpleWeightedGraph,T3<:AbstractMatrix,T4<:AbstractMatrix} <: AbstractNetwork
"Dynamical nodes"
nodes::Vector{T1}
"Coupling strength"
ϵ::Float64
"Graph explaining topology"
graph::T2
"Noise coupling matrix"
noisemat::T3
"Inner coupling matrix"
coupling::T4
end
function SDENetwork(nodes = Lorenz[], ϵ = 1.0, graph = zeros(length(nodes), length(nodes)), noisemat = nothing, coupling = fullstatecoupling(nodes))
weightedgraph = SimpleWeightedGraph(graph)
if noisemat === nothing
noisemat = getnoisemat(weightedgraph)
end
SDENetwork(nodes, ϵ, weightedgraph, noisemat, coupling)
end
SDENetwork(::Type{T}, ϵ = 1.0, graph = fill(0.0, 0, 0), noisemat = nothing, coupling = diagm(ones(dimension(T)))) where {T<:AbstractNode} =
SDENetwork([T() for i = 1:size(graph)[1]], ϵ, graph, noisemat, coupling)
"""
$TYPEDSIGNATURES
Returns full noise coupling matrix corresponding to graph.
"""
function getnoisemat(graph)
numnodes = nv(graph)
numedges = ne(graph)
mat = zeros(numnodes, numedges)
for (k, edge) in enumerate(edges(graph))
mat[edge.src, k] = 1
mat[edge.dst, k] = -1
end
mat
end
# Returns the innner coupling matrix corresponding to the fully-state coupled network.
fullstatecoupling(nodes) = diagm(ones(dimension(eltype(nodes))))
"""
$TYPEDSIGNATURES
Adds `node` to `net`
"""
function addnode!(net::AbstractNetwork, node::AbstractNode = eltype(net.nodes)())
add_vertex!(net.graph)
push!(net.nodes, node)
net
end
"""
$TYPEDSIGNATURES
Remoes the node with index `idx` from `net`.
"""
function remnode!(net::AbstractNetwork, idx::Int = lastindex(net.nodes))
deleteat!(net.nodes, idx)
rem_vertex!(net.graph, idx)
net
end
"""
$TYPEDSIGNATURES
Adds and edge in `net` between the nodes `src` and `dst` with weight `weight`
"""
function addedge!(net::AbstractNetwork, src::Int, dst::Int, weight::Real = 1.0, noisestrength::Real = 0.0)
add_edge!(net.graph, src, dst, weight)
is_directed(net.graph) && add_edge!(net.graph, dst, src, weight)
# Update the noise matrix of the network. Tehe
newcol = zeros(size(net.noisemat, 1), 1)
newcol[src] = noisestrength
newcol[dst] = -noisestrength
net.noisemat = [net.noisemat newcol]
net
end
"""
$TYPEDSIGNATURES
Removes the edge between `src` and `dst` from `net`
"""
function remedge!(net::AbstractNetwork, src::Int, dst::Int)
rem_edge!(net.graph, src, dst)
is_directed(net.graph) && rem_edge!(net.graph, dst, src)
# Find and delete the column of the noise matrix of the network.
rows = net.noisemat[[src, dst], :]
idx = [!iszero(col[1]) && !iszero(col[2]) for col in eachcol(rows)]
net.noisemat = net.noisemat[:, .!idx]
net
end
| [
2,
770,
2393,
3407,
262,
3127,
220,
198,
198,
2,
20368,
26866,
31245,
1677,
316,
1818,
5103,
290,
953,
811,
39485,
34400,
24305,
1303,
220,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
25425,
220,
198,
198,
2,
23948,
220,
628,
220,
220,
220,
720,
9936,
47,
1961,
11674,
3698,
5258,
198,
37811,
198,
76,
18187,
2878,
31245,
1677,
316,
1818,
90,
51,
16,
27,
25,
23839,
19667,
11,
51,
17,
27,
25,
23839,
26437,
25844,
276,
37065,
11,
51,
18,
27,
25,
23839,
46912,
92,
1279,
25,
27741,
26245,
198,
220,
220,
220,
366,
35,
4989,
605,
13760,
1,
198,
220,
220,
220,
13760,
3712,
38469,
90,
51,
16,
92,
198,
220,
220,
220,
366,
34,
280,
11347,
4202,
1,
198,
220,
220,
220,
18074,
113,
3712,
43879,
2414,
198,
220,
220,
220,
366,
37065,
11170,
1353,
1435,
1,
198,
220,
220,
220,
4823,
3712,
51,
17,
198,
220,
220,
220,
366,
818,
1008,
40204,
17593,
1,
198,
220,
220,
220,
40204,
3712,
51,
18,
198,
437,
198,
3727,
1677,
316,
1818,
7,
77,
4147,
796,
15639,
27305,
58,
4357,
18074,
113,
796,
352,
13,
15,
11,
4823,
796,
1976,
27498,
7,
13664,
7,
77,
4147,
828,
4129,
7,
77,
4147,
36911,
40204,
796,
2566,
363,
76,
7,
1952,
7,
46156,
7,
417,
4906,
7,
77,
4147,
4008,
22305,
796,
198,
220,
220,
220,
31245,
1677,
316,
1818,
7,
77,
4147,
11,
18074,
113,
11,
17427,
25844,
276,
37065,
7,
34960,
828,
40204,
8,
198,
3727,
1677,
316,
1818,
7,
3712,
6030,
90,
51,
5512,
18074,
113,
796,
352,
13,
15,
11,
4823,
796,
6070,
7,
15,
13,
15,
11,
657,
11,
657,
828,
40204,
796,
2566,
363,
76,
7,
1952,
7,
46156,
7,
51,
35514,
810,
1391,
51,
27,
25,
23839,
19667,
92,
796,
198,
220,
220,
220,
31245,
1677,
316,
1818,
26933,
51,
3419,
329,
1312,
796,
352,
25,
7857,
7,
34960,
38381,
16,
60,
4357,
18074,
113,
11,
4823,
11,
40204,
8,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
25425,
220,
198,
198,
2,
23948,
220,
628,
220,
220,
220,
720,
9936,
47,
1961,
11674,
3698,
5258,
198,
37811,
198,
76,
18187,
2878,
9834,
1677,
316,
1818,
90,
51,
16,
27,
25,
23839,
19667,
11,
51,
17,
27,
25,
23839,
26437,
25844,
276,
37065,
11,
51,
18,
27,
25,
23839,
46912,
11,
51,
19,
27,
25,
23839,
46912,
92,
1279,
25,
27741,
26245,
198,
220,
220,
220,
366,
35,
4989,
605,
13760,
1,
198,
220,
220,
220,
13760,
3712,
38469,
90,
51,
16,
92,
198,
220,
220,
220,
366,
34,
280,
11347,
4202,
1,
198,
220,
220,
220,
18074,
113,
3712,
43879,
2414,
198,
220,
220,
220,
366,
37065,
11170,
1353,
1435,
1,
198,
220,
220,
220,
4823,
3712,
51,
17,
198,
220,
220,
220,
366,
2949,
786,
40204,
17593,
1,
198,
220,
220,
220,
645,
271,
368,
265,
3712,
51,
18,
198,
220,
220,
220,
366,
818,
1008,
40204,
17593,
1,
198,
220,
220,
220,
40204,
3712,
51,
19,
198,
437,
198,
8818,
9834,
1677,
316,
1818,
7,
77,
4147,
796,
15639,
27305,
58,
4357,
18074,
113,
796,
352,
13,
15,
11,
4823,
796,
1976,
27498,
7,
13664,
7,
77,
4147,
828,
4129,
7,
77,
4147,
36911,
645,
271,
368,
265,
796,
2147,
11,
40204,
796,
1336,
5219,
66,
280,
11347,
7,
77,
4147,
4008,
198,
220,
220,
220,
26356,
34960,
796,
17427,
25844,
276,
37065,
7,
34960,
8,
198,
220,
220,
220,
611,
645,
271,
368,
265,
24844,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
645,
271,
368,
265,
796,
651,
3919,
271,
368,
265,
7,
6551,
276,
34960,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
9834,
1677,
316,
1818,
7,
77,
4147,
11,
18074,
113,
11,
26356,
34960,
11,
645,
271,
368,
265,
11,
40204,
8,
198,
437,
198,
10305,
1677,
316,
1818,
7,
3712,
6030,
90,
51,
5512,
18074,
113,
796,
352,
13,
15,
11,
4823,
796,
6070,
7,
15,
13,
15,
11,
657,
11,
657,
828,
645,
271,
368,
265,
796,
2147,
11,
40204,
796,
2566,
363,
76,
7,
1952,
7,
46156,
7,
51,
35514,
810,
1391,
51,
27,
25,
23839,
19667,
92,
796,
198,
220,
220,
220,
9834,
1677,
316,
1818,
26933,
51,
3419,
329,
1312,
796,
352,
25,
7857,
7,
34960,
38381,
16,
60,
4357,
18074,
113,
11,
4823,
11,
645,
271,
368,
265,
11,
40204,
8,
628,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
46224,
47471,
198,
198,
35561,
1336,
7838,
40204,
17593,
11188,
284,
4823,
13,
220,
198,
37811,
198,
8818,
651,
3919,
271,
368,
265,
7,
34960,
8,
198,
220,
220,
220,
997,
77,
4147,
796,
299,
85,
7,
34960,
8,
198,
220,
220,
220,
997,
276,
3212,
796,
497,
7,
34960,
8,
198,
220,
220,
220,
2603,
796,
1976,
27498,
7,
77,
4182,
4147,
11,
997,
276,
3212,
8,
198,
220,
220,
220,
329,
357,
74,
11,
5743,
8,
287,
27056,
378,
7,
276,
3212,
7,
34960,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2603,
58,
14907,
13,
10677,
11,
479,
60,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2603,
58,
14907,
13,
67,
301,
11,
479,
60,
796,
532,
16,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2603,
198,
437,
198,
198,
2,
16409,
262,
3527,
1008,
40204,
17593,
11188,
284,
262,
3938,
12,
5219,
18064,
3127,
13,
198,
12853,
5219,
66,
280,
11347,
7,
77,
4147,
8,
796,
2566,
363,
76,
7,
1952,
7,
46156,
7,
417,
4906,
7,
77,
4147,
35514,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
46224,
47471,
198,
198,
46245,
4600,
17440,
63,
284,
4600,
3262,
63,
198,
37811,
198,
8818,
751,
17440,
0,
7,
3262,
3712,
23839,
26245,
11,
10139,
3712,
23839,
19667,
796,
1288,
4906,
7,
3262,
13,
77,
4147,
8,
28955,
198,
220,
220,
220,
751,
62,
332,
16886,
0,
7,
3262,
13,
34960,
8,
198,
220,
220,
220,
4574,
0,
7,
3262,
13,
77,
4147,
11,
10139,
8,
198,
220,
220,
220,
2010,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
46224,
47471,
198,
198,
8413,
3028,
262,
10139,
351,
6376,
4600,
312,
87,
63,
422,
4600,
3262,
44646,
198,
37811,
198,
8818,
816,
17440,
0,
7,
3262,
3712,
23839,
26245,
11,
4686,
87,
3712,
5317,
796,
938,
9630,
7,
3262,
13,
77,
4147,
4008,
198,
220,
220,
220,
12233,
265,
0,
7,
3262,
13,
77,
4147,
11,
4686,
87,
8,
198,
220,
220,
220,
816,
62,
332,
16886,
0,
7,
3262,
13,
34960,
11,
4686,
87,
8,
198,
220,
220,
220,
2010,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
46224,
47471,
220,
198,
198,
46245,
290,
5743,
287,
4600,
3262,
63,
1022,
262,
13760,
4600,
10677,
63,
290,
4600,
67,
301,
63,
351,
3463,
4600,
6551,
63,
198,
37811,
198,
8818,
2087,
469,
0,
7,
3262,
3712,
23839,
26245,
11,
12351,
3712,
5317,
11,
29636,
3712,
5317,
11,
3463,
3712,
15633,
796,
352,
13,
15,
11,
645,
271,
395,
260,
11910,
3712,
15633,
796,
657,
13,
15,
8,
198,
220,
220,
220,
751,
62,
14907,
0,
7,
3262,
13,
34960,
11,
12351,
11,
29636,
11,
3463,
8,
198,
220,
220,
220,
318,
62,
34762,
7,
3262,
13,
34960,
8,
11405,
751,
62,
14907,
0,
7,
3262,
13,
34960,
11,
29636,
11,
12351,
11,
3463,
8,
198,
220,
220,
220,
1303,
10133,
262,
7838,
17593,
286,
262,
3127,
13,
1665,
258,
220,
198,
220,
220,
220,
649,
4033,
796,
1976,
27498,
7,
7857,
7,
3262,
13,
3919,
271,
368,
265,
11,
352,
828,
352,
8,
198,
220,
220,
220,
649,
4033,
58,
10677,
60,
796,
645,
271,
395,
260,
11910,
198,
220,
220,
220,
649,
4033,
58,
67,
301,
60,
796,
532,
3919,
271,
395,
260,
11910,
198,
220,
220,
220,
2010,
13,
3919,
271,
368,
265,
796,
685,
3262,
13,
3919,
271,
368,
265,
649,
4033,
60,
198,
220,
220,
220,
2010,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
720,
9936,
47,
1961,
46224,
47471,
198,
198,
8413,
5241,
262,
5743,
1022,
4600,
10677,
63,
290,
4600,
67,
301,
63,
422,
4600,
3262,
63,
198,
37811,
198,
8818,
816,
14907,
0,
7,
3262,
3712,
23839,
26245,
11,
12351,
3712,
5317,
11,
29636,
3712,
5317,
8,
198,
220,
220,
220,
816,
62,
14907,
0,
7,
3262,
13,
34960,
11,
12351,
11,
29636,
8,
198,
220,
220,
220,
318,
62,
34762,
7,
3262,
13,
34960,
8,
11405,
816,
62,
14907,
0,
7,
3262,
13,
34960,
11,
29636,
11,
12351,
8,
198,
220,
220,
220,
1303,
9938,
290,
12233,
262,
5721,
286,
262,
7838,
17593,
286,
262,
3127,
13,
220,
198,
220,
220,
220,
15274,
796,
2010,
13,
3919,
271,
368,
265,
30109,
10677,
11,
29636,
4357,
1058,
60,
198,
220,
220,
220,
4686,
87,
796,
685,
0,
271,
22570,
7,
4033,
58,
16,
12962,
11405,
5145,
271,
22570,
7,
4033,
58,
17,
12962,
329,
951,
287,
1123,
4033,
7,
8516,
15437,
198,
220,
220,
220,
2010,
13,
3919,
271,
368,
265,
796,
2010,
13,
3919,
271,
368,
265,
58,
45299,
764,
0,
312,
87,
60,
198,
220,
220,
220,
2010,
198,
437,
628
] | 2.472477 | 1,526 |
InputFolder = './Images/VesselsSpots/';
OutputFolder = './Results/Images/VesselsSpots/Spots/';
Fill = -1;
@iA = '*.tif';
@fxm_mFilterObjSize [iA] > [M];
params.MinArea = 1;
params.MaxArea = 1;
/endf
/show iA > M;
/keep M > tif; | [
20560,
41092,
796,
705,
19571,
29398,
14,
53,
7878,
82,
4561,
1747,
14,
17020,
198,
26410,
41092,
796,
705,
19571,
25468,
14,
29398,
14,
53,
7878,
82,
4561,
1747,
14,
4561,
1747,
14,
17020,
198,
33762,
796,
532,
16,
26,
198,
198,
31,
72,
32,
796,
705,
24620,
49929,
17020,
198,
198,
31,
21373,
76,
62,
76,
22417,
49201,
10699,
685,
72,
32,
60,
1875,
685,
44,
11208,
198,
37266,
13,
9452,
30547,
796,
352,
26,
198,
37266,
13,
11518,
30547,
796,
352,
26,
198,
14,
437,
69,
198,
198,
14,
12860,
1312,
32,
1875,
337,
26,
198,
14,
14894,
337,
1875,
256,
361,
26
] | 2.190476 | 105 |
### TODO: Rethink the CUDNN interface
using CUDNN: cudnnConvolutionDescriptor_t, cudnnCreateConvolutionDescriptor, cudnnSetConvolutionNdDescriptor_v3, cudnnDestroyConvolutionDescriptor, cudnnHandle, cptr, TD, FD, cudnnDataType
using CUDNN: CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM, CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0, CUDNN_CONVOLUTION_BWD_DATA_ALGO_0
using CUDNN: cudnnGetConvolutionNdForwardOutputDim, cudnnGetConvolutionForwardWorkspaceSize
using CUDNN: cudnnConvolutionBackwardFilter_v3, cudnnConvolutionBackwardData_v3
function cudnnConvolutionForward_v4(src, filter, dest;
handle=cudnnHandle, alpha=1.0, beta=0.0,
algorithm=CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM,
workSpace=C_NULL, workSpaceSizeInBytes=0,
padding=0, stride=1, upscale=1, mode=CUDNN_CONVOLUTION)
@assert eltype(filter) == eltype(src)
cd = cudnnConvolutionDescriptor_v4(ndims(src), eltype(src), padding, stride, upscale, mode)
osize = cudnnGetConvolutionNdForwardOutputDim(src,filter;convDesc=cd)
(dest == nothing) && (dest = CudaArray(eltype(src), osize))
@assert osize == size(dest)
@assert eltype(dest) == eltype(src)
wsize = cudnnGetConvolutionForwardWorkspaceSize(src, filter, dest; algorithm=algorithm)
if ((wsize > 0) && (workSpace == C_NULL || workSpaceSizeInBytes < wsize))
workSpaceSizeInBytes = wsize
ws = CudaArray(Int8, workSpaceSizeInBytes)
else
ws = workSpace
end
cudnnConvolutionForward(handle,
cptr(alpha,src),TD(src),src,
FD(filter),filter,
cd,algorithm,ws,workSpaceSizeInBytes,
cptr(beta,dest),TD(dest),dest)
free(cd)
ws === workSpace || free(ws)
return dest
end
# I am guessing if y=w*x+b going forward, the arguments below
# correspond to src=x, diff=dy, grad=dw.
function cudnnConvolutionBackwardFilter_v4(src, diff, grad;
handle=cudnnHandle, alpha=1.0, beta=0.0,
algo=CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0,
workSpace=C_NULL, workSpaceSizeInBytes=0,
padding=0, stride=1, upscale=1, mode=CUDNN_CONVOLUTION)
cd = cudnnConvolutionDescriptor_v4(ndims(src), eltype(src), padding, stride, upscale, mode)
cudnnConvolutionBackwardFilter_v3(handle,
cptr(alpha,src),TD(src),src,
TD(diff),diff,cd,
algo, workSpace, workSpaceSizeInBytes,
cptr(beta,grad),FD(grad),grad)
free(cd)
return grad
end
# I am guessing if y=w*x+b going forward, the arguments below
# correspond to filter=w, diff=dy, grad=dx.
function cudnnConvolutionBackwardData_v4(filter::AbstractCudaArray, diff::AbstractCudaArray, grad::AbstractCudaArray;
handle=cudnnHandle, alpha=1.0, beta=0.0,
algo=CUDNN_CONVOLUTION_BWD_DATA_ALGO_0,
workSpace=C_NULL, workSpaceSizeInBytes=0,
padding=0, stride=1, upscale=1, mode=CUDNN_CONVOLUTION)
cd = cudnnConvolutionDescriptor_v4(ndims(filter), eltype(filter), padding, stride, upscale, mode)
cudnnConvolutionBackwardData_v3(handle,cptr(alpha,diff),
FD(filter),filter,
TD(diff),diff,cd,
algo, workSpace, workSpaceSizeInBytes,
cptr(beta,grad),TD(grad),grad)
free(cd)
return grad
end
# Decided not to keep the cd in the Pool structure: not serializable.
function cudnnConvolutionDescriptor_v4(xdims, xtype, padding, stride, upscale, mode)
cd = cudnnConvolutionDescriptor_t[0]
cudnnCreateConvolutionDescriptor(cd)
nd = xdims-2
cudnnSetConvolutionNdDescriptor_v3(cd[1],nd,cdsize(padding,nd),cdsize(stride,nd),cdsize(upscale,nd),mode,cudnnDataType(xtype))
return cd[1]
end
function cdsize(w, nd)
isa(w,Integer) ? Cint[fill(w,nd)...] :
length(w)!=nd ? error("Dimension mismatch") :
Cint[reverse(w)...]
end
CUDArt.free(cd::cudnnConvolutionDescriptor_t)=cudnnDestroyConvolutionDescriptor(cd)
### TODO: THIS INTERFACE SHOULD GO INTO CUDNN:
using CUDNN: cudnnPoolingDescriptor_t, cudnnCreatePoolingDescriptor, cudnnSetPoolingNdDescriptor, cudnnDestroyPoolingDescriptor, cudnnHandle, cptr, TD, cudnnPoolingMode_t, cudnnGetPoolingNdDescriptor
function cudnnPoolingForward_v4(src, dest;
window=2, padding=0, stride=window, mode=CUDNN_POOLING_MAX,
handle=cudnnHandle, alpha=1.0, beta=0.0)
pd = cudnnPoolingDescriptor_v4(ndims(src)-2, window, padding, stride, mode)
cudnnPoolingForward(handle, pd,
cptr(alpha,src), TD(src), src,
cptr(beta,dest), TD(dest), dest)
free(pd)
return dest
end
function cudnnPoolingBackward_v4(src, srcDiff, dest, destDiff;
window=2, padding=0, stride=window, mode=CUDNN_POOLING_MAX,
handle=cudnnHandle, alpha=1.0, beta=0.0)
pd = cudnnPoolingDescriptor_v4(ndims(src)-2, window, padding, stride, mode)
cudnnPoolingBackward(handle, pd,
cptr(alpha,src), TD(src), src,
TD(srcDiff), srcDiff,
TD(dest), dest,
cptr(beta,destDiff), TD(destDiff), destDiff)
free(pd)
return destDiff
end
# Decided not to keep the pd in the Pool structure: not serializable.
function cudnnPoolingDescriptor_v4(nd, window, padding, stride, mode)
pd = cudnnPoolingDescriptor_t[0]
cudnnCreatePoolingDescriptor(pd)
cudnnSetPoolingNdDescriptor(pd[1],mode,nd,pdsize(window,nd),pdsize(padding,nd),pdsize(stride,nd))
return pd[1]
end
function cudnnGetPoolingNdDescriptor_v4(pd::cudnnPoolingDescriptor_t, nd)
m = cudnnPoolingMode_t[0]
n = Cint[0]
s = Array(Cint, nd)
p = Array(Cint, nd)
t = Array(Cint, nd)
cudnnGetPoolingNdDescriptor(pd, nd, m, n, s, p, t)
inttuple(x)=tuple(Int[x...]...)
(m[1], n[1], inttuple(s), inttuple(p), inttuple(t))
end
CUDArt.free(pd::cudnnPoolingDescriptor_t)=cudnnDestroyPoolingDescriptor(pd)
pdsize(w, nd)=Cint[reverse(psize(w,nd))...]
psize(w, nd)=(isa(w,Integer) ? fill(w,nd) : length(w) != nd ? error("Dimension mismatch") : w)
| [
21017,
16926,
46,
25,
371,
2788,
676,
262,
327,
8322,
6144,
7071,
198,
198,
3500,
327,
8322,
6144,
25,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
83,
11,
269,
463,
20471,
16447,
3103,
85,
2122,
24564,
1968,
273,
11,
269,
463,
20471,
7248,
3103,
85,
2122,
45,
67,
24564,
1968,
273,
62,
85,
18,
11,
269,
463,
20471,
49174,
3103,
85,
2122,
24564,
1968,
273,
11,
269,
463,
20471,
37508,
11,
269,
20692,
11,
13320,
11,
30002,
11,
269,
463,
20471,
6601,
6030,
198,
3500,
327,
8322,
6144,
25,
327,
8322,
6144,
62,
10943,
44558,
35354,
62,
37,
22332,
62,
1847,
11230,
62,
3955,
31484,
2043,
62,
46437,
9858,
47,
62,
38,
3620,
44,
11,
327,
8322,
6144,
62,
10943,
44558,
35354,
62,
33,
22332,
62,
46700,
5781,
62,
1847,
11230,
62,
15,
11,
327,
8322,
6144,
62,
10943,
44558,
35354,
62,
33,
22332,
62,
26947,
62,
1847,
11230,
62,
15,
198,
3500,
327,
8322,
6144,
25,
269,
463,
20471,
3855,
3103,
85,
2122,
45,
67,
39746,
26410,
29271,
11,
269,
463,
20471,
3855,
3103,
85,
2122,
39746,
23044,
10223,
10699,
198,
3500,
327,
8322,
6144,
25,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
22417,
62,
85,
18,
11,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
6601,
62,
85,
18,
198,
198,
8818,
269,
463,
20471,
3103,
85,
2122,
39746,
62,
85,
19,
7,
10677,
11,
8106,
11,
2244,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
28,
66,
463,
20471,
37508,
11,
17130,
28,
16,
13,
15,
11,
12159,
28,
15,
13,
15,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11862,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
62,
37,
22332,
62,
1847,
11230,
62,
3955,
31484,
2043,
62,
46437,
9858,
47,
62,
38,
3620,
44,
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,
670,
14106,
28,
34,
62,
33991,
11,
670,
14106,
10699,
818,
45992,
28,
15,
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,
24511,
28,
15,
11,
33769,
28,
16,
11,
44918,
28,
16,
11,
4235,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
8,
198,
220,
220,
220,
2488,
30493,
1288,
4906,
7,
24455,
8,
6624,
1288,
4906,
7,
10677,
8,
198,
220,
220,
220,
22927,
796,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
85,
19,
7,
358,
12078,
7,
10677,
828,
1288,
4906,
7,
10677,
828,
24511,
11,
33769,
11,
44918,
11,
4235,
8,
198,
220,
220,
220,
267,
7857,
796,
269,
463,
20471,
3855,
3103,
85,
2122,
45,
67,
39746,
26410,
29271,
7,
10677,
11,
24455,
26,
42946,
24564,
28,
10210,
8,
198,
220,
220,
220,
357,
16520,
6624,
2147,
8,
11405,
357,
16520,
796,
327,
15339,
19182,
7,
417,
4906,
7,
10677,
828,
267,
7857,
4008,
198,
220,
220,
220,
2488,
30493,
267,
7857,
6624,
2546,
7,
16520,
8,
198,
220,
220,
220,
2488,
30493,
1288,
4906,
7,
16520,
8,
6624,
1288,
4906,
7,
10677,
8,
198,
220,
220,
220,
266,
7857,
796,
269,
463,
20471,
3855,
3103,
85,
2122,
39746,
23044,
10223,
10699,
7,
10677,
11,
8106,
11,
2244,
26,
11862,
28,
282,
42289,
8,
198,
220,
220,
220,
611,
14808,
86,
7857,
1875,
657,
8,
11405,
357,
1818,
14106,
6624,
327,
62,
33991,
8614,
670,
14106,
10699,
818,
45992,
1279,
266,
7857,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
670,
14106,
10699,
818,
45992,
796,
266,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
266,
82,
796,
327,
15339,
19182,
7,
5317,
23,
11,
670,
14106,
10699,
818,
45992,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
266,
82,
796,
670,
14106,
198,
220,
220,
220,
886,
198,
220,
220,
220,
269,
463,
20471,
3103,
85,
2122,
39746,
7,
28144,
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,
269,
20692,
7,
26591,
11,
10677,
828,
21016,
7,
10677,
828,
10677,
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,
30002,
7,
24455,
828,
24455,
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,
22927,
11,
282,
42289,
11,
18504,
11,
1818,
14106,
10699,
818,
45992,
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,
269,
20692,
7,
31361,
11,
16520,
828,
21016,
7,
16520,
828,
16520,
8,
198,
220,
220,
220,
1479,
7,
10210,
8,
198,
220,
220,
220,
266,
82,
24844,
670,
14106,
8614,
1479,
7,
18504,
8,
198,
220,
220,
220,
1441,
2244,
198,
437,
198,
198,
2,
314,
716,
25260,
611,
331,
28,
86,
9,
87,
10,
65,
1016,
2651,
11,
262,
7159,
2174,
198,
2,
6053,
284,
12351,
28,
87,
11,
814,
28,
9892,
11,
3915,
28,
67,
86,
13,
198,
8818,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
22417,
62,
85,
19,
7,
10677,
11,
814,
11,
3915,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
28,
66,
463,
20471,
37508,
11,
17130,
28,
16,
13,
15,
11,
12159,
28,
15,
13,
15,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
435,
2188,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
62,
33,
22332,
62,
46700,
5781,
62,
1847,
11230,
62,
15,
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,
670,
14106,
28,
34,
62,
33991,
11,
670,
14106,
10699,
818,
45992,
28,
15,
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,
24511,
28,
15,
11,
33769,
28,
16,
11,
44918,
28,
16,
11,
4235,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
8,
198,
220,
220,
220,
22927,
796,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
85,
19,
7,
358,
12078,
7,
10677,
828,
1288,
4906,
7,
10677,
828,
24511,
11,
33769,
11,
44918,
11,
4235,
8,
198,
220,
220,
220,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
22417,
62,
85,
18,
7,
28144,
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,
269,
20692,
7,
26591,
11,
10677,
828,
21016,
7,
10677,
828,
10677,
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,
13320,
7,
26069,
828,
26069,
11,
10210,
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,
435,
2188,
11,
670,
14106,
11,
670,
14106,
10699,
818,
45992,
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,
269,
20692,
7,
31361,
11,
9744,
828,
26009,
7,
9744,
828,
9744,
8,
198,
220,
220,
220,
1479,
7,
10210,
8,
198,
220,
220,
220,
1441,
3915,
198,
437,
198,
198,
2,
314,
716,
25260,
611,
331,
28,
86,
9,
87,
10,
65,
1016,
2651,
11,
262,
7159,
2174,
198,
2,
6053,
284,
8106,
28,
86,
11,
814,
28,
9892,
11,
3915,
28,
34350,
13,
198,
8818,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
6601,
62,
85,
19,
7,
24455,
3712,
23839,
34,
15339,
19182,
11,
814,
3712,
23839,
34,
15339,
19182,
11,
3915,
3712,
23839,
34,
15339,
19182,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
28,
66,
463,
20471,
37508,
11,
17130,
28,
16,
13,
15,
11,
12159,
28,
15,
13,
15,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
435,
2188,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
62,
33,
22332,
62,
26947,
62,
1847,
11230,
62,
15,
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,
670,
14106,
28,
34,
62,
33991,
11,
670,
14106,
10699,
818,
45992,
28,
15,
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,
24511,
28,
15,
11,
33769,
28,
16,
11,
44918,
28,
16,
11,
4235,
28,
34,
8322,
6144,
62,
10943,
44558,
35354,
8,
198,
220,
220,
220,
22927,
796,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
85,
19,
7,
358,
12078,
7,
24455,
828,
1288,
4906,
7,
24455,
828,
24511,
11,
33769,
11,
44918,
11,
4235,
8,
198,
220,
220,
220,
269,
463,
20471,
3103,
85,
2122,
7282,
904,
6601,
62,
85,
18,
7,
28144,
11,
66,
20692,
7,
26591,
11,
26069,
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,
30002,
7,
24455,
828,
24455,
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,
13320,
7,
26069,
828,
26069,
11,
10210,
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,
435,
2188,
11,
670,
14106,
11,
670,
14106,
10699,
818,
45992,
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,
269,
20692,
7,
31361,
11,
9744,
828,
21016,
7,
9744,
828,
9744,
8,
198,
220,
220,
220,
1479,
7,
10210,
8,
198,
220,
220,
220,
1441,
3915,
198,
437,
628,
198,
2,
4280,
1384,
407,
284,
1394,
262,
22927,
287,
262,
19850,
4645,
25,
407,
11389,
13821,
13,
198,
8818,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
85,
19,
7,
24954,
12078,
11,
220,
742,
2981,
11,
24511,
11,
33769,
11,
44918,
11,
4235,
8,
198,
220,
220,
220,
22927,
796,
269,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
83,
58,
15,
60,
198,
220,
220,
220,
269,
463,
20471,
16447,
3103,
85,
2122,
24564,
1968,
273,
7,
10210,
8,
198,
220,
220,
220,
299,
67,
796,
2124,
67,
12078,
12,
17,
198,
220,
220,
220,
269,
463,
20471,
7248,
3103,
85,
2122,
45,
67,
24564,
1968,
273,
62,
85,
18,
7,
10210,
58,
16,
4357,
358,
11,
10210,
7857,
7,
39231,
11,
358,
828,
10210,
7857,
7,
2536,
485,
11,
358,
828,
10210,
7857,
7,
4739,
38765,
11,
358,
828,
14171,
11,
66,
463,
20471,
6601,
6030,
7,
742,
2981,
4008,
198,
220,
220,
220,
1441,
22927,
58,
16,
60,
198,
437,
198,
198,
8818,
22927,
7857,
7,
86,
11,
299,
67,
8,
198,
220,
220,
220,
318,
64,
7,
86,
11,
46541,
8,
5633,
327,
600,
58,
20797,
7,
86,
11,
358,
8,
22345,
1058,
198,
220,
220,
220,
4129,
7,
86,
31520,
28,
358,
5633,
4049,
7203,
29271,
3004,
46318,
4943,
1058,
198,
220,
220,
220,
327,
600,
58,
50188,
7,
86,
8,
22345,
198,
437,
198,
198,
34,
8322,
8001,
13,
5787,
7,
10210,
3712,
66,
463,
20471,
3103,
85,
2122,
24564,
1968,
273,
62,
83,
47505,
66,
463,
20471,
49174,
3103,
85,
2122,
24564,
1968,
273,
7,
10210,
8,
198,
198,
21017,
16926,
46,
25,
12680,
23255,
49836,
40312,
10351,
39319,
327,
8322,
6144,
25,
198,
198,
3500,
327,
8322,
6144,
25,
269,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
83,
11,
269,
463,
20471,
16447,
27201,
278,
24564,
1968,
273,
11,
269,
463,
20471,
7248,
27201,
278,
45,
67,
24564,
1968,
273,
11,
269,
463,
20471,
49174,
27201,
278,
24564,
1968,
273,
11,
269,
463,
20471,
37508,
11,
269,
20692,
11,
13320,
11,
269,
463,
20471,
27201,
278,
19076,
62,
83,
11,
269,
463,
20471,
3855,
27201,
278,
45,
67,
24564,
1968,
273,
198,
198,
8818,
269,
463,
20471,
27201,
278,
39746,
62,
85,
19,
7,
10677,
11,
2244,
26,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4324,
28,
17,
11,
24511,
28,
15,
11,
33769,
28,
17497,
11,
4235,
28,
34,
8322,
6144,
62,
16402,
3535,
2751,
62,
22921,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
28,
66,
463,
20471,
37508,
11,
17130,
28,
16,
13,
15,
11,
12159,
28,
15,
13,
15,
8,
198,
220,
220,
220,
279,
67,
796,
269,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
85,
19,
7,
358,
12078,
7,
10677,
13219,
17,
11,
4324,
11,
24511,
11,
33769,
11,
4235,
8,
198,
220,
220,
220,
269,
463,
20471,
27201,
278,
39746,
7,
28144,
11,
279,
67,
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,
269,
20692,
7,
26591,
11,
10677,
828,
13320,
7,
10677,
828,
12351,
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,
269,
20692,
7,
31361,
11,
16520,
828,
13320,
7,
16520,
828,
2244,
8,
198,
220,
220,
220,
1479,
7,
30094,
8,
198,
220,
220,
220,
1441,
2244,
198,
437,
198,
198,
8818,
269,
463,
20471,
27201,
278,
7282,
904,
62,
85,
19,
7,
10677,
11,
12351,
28813,
11,
2244,
11,
2244,
28813,
26,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4324,
28,
17,
11,
24511,
28,
15,
11,
33769,
28,
17497,
11,
4235,
28,
34,
8322,
6144,
62,
16402,
3535,
2751,
62,
22921,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
28,
66,
463,
20471,
37508,
11,
17130,
28,
16,
13,
15,
11,
12159,
28,
15,
13,
15,
8,
198,
220,
220,
220,
279,
67,
796,
269,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
85,
19,
7,
358,
12078,
7,
10677,
13219,
17,
11,
4324,
11,
24511,
11,
33769,
11,
4235,
8,
198,
220,
220,
220,
269,
463,
20471,
27201,
278,
7282,
904,
7,
28144,
11,
279,
67,
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,
269,
20692,
7,
26591,
11,
10677,
828,
13320,
7,
10677,
828,
12351,
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,
13320,
7,
10677,
28813,
828,
12351,
28813,
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,
13320,
7,
16520,
828,
2244,
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,
269,
20692,
7,
31361,
11,
16520,
28813,
828,
13320,
7,
16520,
28813,
828,
2244,
28813,
8,
198,
220,
220,
220,
1479,
7,
30094,
8,
198,
220,
220,
220,
1441,
2244,
28813,
198,
437,
198,
198,
2,
4280,
1384,
407,
284,
1394,
262,
279,
67,
287,
262,
19850,
4645,
25,
407,
11389,
13821,
13,
198,
8818,
269,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
85,
19,
7,
358,
11,
4324,
11,
24511,
11,
33769,
11,
4235,
8,
198,
220,
220,
220,
279,
67,
796,
269,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
83,
58,
15,
60,
198,
220,
220,
220,
269,
463,
20471,
16447,
27201,
278,
24564,
1968,
273,
7,
30094,
8,
198,
220,
220,
220,
269,
463,
20471,
7248,
27201,
278,
45,
67,
24564,
1968,
273,
7,
30094,
58,
16,
4357,
14171,
11,
358,
11,
30094,
7857,
7,
17497,
11,
358,
828,
30094,
7857,
7,
39231,
11,
358,
828,
30094,
7857,
7,
2536,
485,
11,
358,
4008,
198,
220,
220,
220,
1441,
279,
67,
58,
16,
60,
198,
437,
198,
198,
8818,
269,
463,
20471,
3855,
27201,
278,
45,
67,
24564,
1968,
273,
62,
85,
19,
7,
30094,
3712,
66,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
83,
11,
299,
67,
8,
198,
220,
220,
220,
285,
796,
269,
463,
20471,
27201,
278,
19076,
62,
83,
58,
15,
60,
198,
220,
220,
220,
299,
796,
327,
600,
58,
15,
60,
198,
220,
220,
220,
264,
796,
15690,
7,
34,
600,
11,
299,
67,
8,
198,
220,
220,
220,
279,
796,
15690,
7,
34,
600,
11,
299,
67,
8,
198,
220,
220,
220,
256,
796,
15690,
7,
34,
600,
11,
299,
67,
8,
198,
220,
220,
220,
269,
463,
20471,
3855,
27201,
278,
45,
67,
24564,
1968,
273,
7,
30094,
11,
299,
67,
11,
285,
11,
299,
11,
264,
11,
279,
11,
256,
8,
198,
220,
220,
220,
493,
83,
29291,
7,
87,
47505,
83,
29291,
7,
5317,
58,
87,
22345,
23029,
198,
220,
220,
220,
357,
76,
58,
16,
4357,
299,
58,
16,
4357,
493,
83,
29291,
7,
82,
828,
493,
83,
29291,
7,
79,
828,
493,
83,
29291,
7,
83,
4008,
198,
437,
198,
198,
34,
8322,
8001,
13,
5787,
7,
30094,
3712,
66,
463,
20471,
27201,
278,
24564,
1968,
273,
62,
83,
47505,
66,
463,
20471,
49174,
27201,
278,
24564,
1968,
273,
7,
30094,
8,
198,
198,
30094,
7857,
7,
86,
11,
299,
67,
47505,
34,
600,
58,
50188,
7,
862,
1096,
7,
86,
11,
358,
4008,
22345,
198,
198,
862,
1096,
7,
86,
11,
299,
67,
35793,
9160,
7,
86,
11,
46541,
8,
220,
5633,
6070,
7,
86,
11,
358,
8,
1058,
4129,
7,
86,
8,
14512,
299,
67,
5633,
4049,
7203,
29271,
3004,
46318,
4943,
1058,
266,
8,
628
] | 1.938307 | 3,485 |
"""
Bus
A power-system bus.
# Constructor
```julia
Bus(number, name, bustype, angle, voltage, voltagelimits, basevoltage)
```
# Arguments
* `number`::Int64 : number associated with the bus
* `name`::String : the name of the bus
* `bustype`::String : type of bus, [PV, PQ, SF]; may be `nothing`
* `angle`::Float64 : angle of the bus in degrees; may be `nothing`
* `voltage`::Float64 : voltage as a multiple of basevoltage; may be `nothing`
* `voltagelimits`::NamedTuple(min::Float64, max::Float64) : limits on the voltage variation as multiples of basevoltage; may be `nothing`
* `basevoltage`::Float64 : the base voltage in kV; may be `nothing`
"""
struct Bus <: Injection
# field docstrings work here! (they are not for System)
""" number associated with the bus """
number::Int64
""" the name of the bus """
name::String
""" bus type, [PV, PQ, SF] """
bustype::Union{String,Nothing} # [PV, PQ, SF]
""" angle of the bus in degrees """
angle::Union{Float64,Nothing} # [degrees]
""" voltage as a multiple of basevoltage """
voltage::Union{Float64,Nothing} # [pu]
""" limits on the voltage variation as multiples of basevoltage """
voltagelimits::Union{NamedTuple{(:min, :max),Tuple{Float64,Float64}},
Nothing} # [pu]
"""
the base voltage in kV
"""
basevoltage::Union{Float64,Nothing} # [kV]
end
# DOCTODO add this constructor type to docstring for Bus
Bus(; number = 0,
name = "init",
bustype = nothing,
angle = 0.0,
voltage = 0.0,
voltagelimits = (min = 0.0, max = 0.0),
basevoltage = nothing
) = Bus(number, name, bustype, angle, voltage,
orderedlimits(voltagelimits, "Voltage"), basevoltage)
# DOCTODO What are LoadZones? JJS 1/18/19
struct LoadZones <: Injection
number::Int
name::String
buses::Array{Bus,1}
maxactivepower::Float64
maxreactivepower::Float64
end
LoadZones(; number = 0,
name = "init",
buses = [Bus()],
maxactivepower = 0.0,
maxreactivepower = 0.0
) = LoadZones(number, name, buses, maxactivepower, maxreactivepower)
| [
37811,
198,
220,
220,
220,
5869,
198,
198,
32,
1176,
12,
10057,
1323,
13,
220,
198,
198,
2,
28407,
273,
198,
15506,
63,
73,
43640,
198,
16286,
7,
17618,
11,
1438,
11,
13076,
2981,
11,
9848,
11,
15004,
11,
2322,
12985,
417,
320,
896,
11,
2779,
37764,
496,
8,
198,
15506,
63,
198,
198,
2,
20559,
2886,
198,
9,
4600,
17618,
63,
3712,
5317,
2414,
1058,
1271,
3917,
351,
262,
1323,
198,
9,
4600,
3672,
63,
3712,
10100,
1058,
262,
1438,
286,
262,
1323,
198,
9,
4600,
65,
436,
2981,
63,
3712,
10100,
1058,
2099,
286,
1323,
11,
685,
47,
53,
11,
350,
48,
11,
14362,
11208,
743,
307,
4600,
22366,
63,
198,
9,
4600,
9248,
63,
3712,
43879,
2414,
1058,
9848,
286,
262,
1323,
287,
7370,
26,
743,
307,
4600,
22366,
63,
198,
9,
4600,
37764,
496,
63,
3712,
43879,
2414,
1058,
15004,
355,
257,
3294,
286,
2779,
37764,
496,
26,
743,
307,
4600,
22366,
63,
198,
9,
4600,
37764,
363,
417,
320,
896,
63,
3712,
45,
2434,
51,
29291,
7,
1084,
3712,
43879,
2414,
11,
3509,
3712,
43879,
2414,
8,
1058,
7095,
319,
262,
15004,
12291,
355,
5021,
2374,
286,
2779,
37764,
496,
26,
743,
307,
4600,
22366,
63,
198,
9,
4600,
8692,
37764,
496,
63,
3712,
43879,
2414,
1058,
262,
2779,
15004,
287,
479,
53,
26,
743,
307,
4600,
22366,
63,
198,
198,
37811,
198,
7249,
5869,
1279,
25,
554,
29192,
198,
220,
220,
220,
1303,
2214,
2205,
37336,
670,
994,
0,
357,
9930,
389,
407,
329,
4482,
8,
198,
220,
220,
220,
37227,
1271,
3917,
351,
262,
1323,
37227,
198,
220,
220,
220,
1271,
3712,
5317,
2414,
198,
220,
220,
220,
37227,
262,
1438,
286,
262,
1323,
37227,
198,
220,
220,
220,
1438,
3712,
10100,
198,
220,
220,
220,
37227,
1323,
2099,
11,
685,
47,
53,
11,
350,
48,
11,
14362,
60,
37227,
198,
220,
220,
220,
13076,
2981,
3712,
38176,
90,
10100,
11,
18465,
92,
1303,
685,
47,
53,
11,
350,
48,
11,
14362,
60,
198,
220,
220,
220,
37227,
9848,
286,
262,
1323,
287,
7370,
37227,
198,
220,
220,
220,
9848,
3712,
38176,
90,
43879,
2414,
11,
18465,
92,
1303,
685,
13500,
6037,
60,
198,
220,
220,
220,
37227,
15004,
355,
257,
3294,
286,
2779,
37764,
496,
37227,
198,
220,
220,
220,
15004,
3712,
38176,
90,
43879,
2414,
11,
18465,
92,
1303,
685,
19944,
60,
198,
220,
220,
220,
37227,
7095,
319,
262,
15004,
12291,
355,
5021,
2374,
286,
2779,
37764,
496,
37227,
198,
220,
220,
220,
2322,
12985,
417,
320,
896,
3712,
38176,
90,
45,
2434,
51,
29291,
90,
7,
25,
1084,
11,
1058,
9806,
828,
51,
29291,
90,
43879,
2414,
11,
43879,
2414,
92,
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,
10528,
92,
1303,
685,
19944,
60,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
262,
2779,
15004,
287,
479,
53,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2779,
37764,
496,
3712,
38176,
90,
43879,
2414,
11,
18465,
92,
1303,
685,
74,
53,
60,
198,
437,
198,
198,
2,
8410,
4177,
3727,
46,
220,
751,
428,
23772,
2099,
284,
2205,
8841,
329,
5869,
198,
16286,
7,
26,
220,
220,
1271,
796,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
366,
15003,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
13076,
2981,
796,
2147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9848,
796,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15004,
796,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2322,
12985,
417,
320,
896,
796,
357,
1084,
796,
657,
13,
15,
11,
3509,
796,
657,
13,
15,
828,
198,
220,
220,
220,
220,
220,
220,
220,
2779,
37764,
496,
796,
2147,
198,
220,
220,
220,
1267,
796,
5869,
7,
17618,
11,
1438,
11,
13076,
2981,
11,
9848,
11,
15004,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6149,
49196,
7,
37764,
363,
417,
320,
896,
11,
366,
53,
5978,
496,
12340,
2779,
37764,
496,
8,
198,
198,
2,
8410,
4177,
3727,
46,
1867,
389,
8778,
57,
1952,
30,
449,
20120,
352,
14,
1507,
14,
1129,
198,
7249,
8778,
57,
1952,
220,
1279,
25,
554,
29192,
198,
220,
220,
220,
1271,
3712,
5317,
198,
220,
220,
220,
1438,
3712,
10100,
198,
220,
220,
220,
16893,
3712,
19182,
90,
16286,
11,
16,
92,
198,
220,
220,
220,
3509,
5275,
6477,
3712,
43879,
2414,
198,
220,
220,
220,
3509,
260,
5275,
6477,
3712,
43879,
2414,
198,
437,
198,
198,
8912,
57,
1952,
7,
26,
220,
220,
1271,
796,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
366,
15003,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
16893,
796,
685,
16286,
3419,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
5275,
6477,
796,
657,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
260,
5275,
6477,
796,
657,
13,
15,
198,
220,
220,
220,
1267,
796,
8778,
57,
1952,
7,
17618,
11,
1438,
11,
16893,
11,
3509,
5275,
6477,
11,
3509,
260,
5275,
6477,
8,
198
] | 2.509849 | 863 |
""" plotvaf(VAF, [subclonefreqs=[]]; <keyword arguments>)
"""
# plotvaf
@userplot PlotVAF
@recipe function f(pv::PlotVAF; cumulative = false, fstep = 0.01, sampled=true)
VAFresult = pv.args[1]
VAF = sampled ? VAFresult.sampledVAF : VAFresult.trueVAF
df = gethist(VAF, fstep = fstep)
VAF = (df[!,:VAF] .*2 .- fstep) ./ 2 #set x values to middle of bins
freq = cumulative ? df[:,:cumfreq] : df[:,:freq]
if get(plotattributes, :yscale, nothing) == :log10
VAF, freq = VAF[freq .> 0], freq[freq .>0]
end
yguide = cumulative ? "Cumulative number of mutations" : "Number of mutations"
@series begin
seriestype --> :bar
linecolor --> :white
linewidth --> 0.2
fillcolor --> :darkslategrey
markerstrokecolor --> :white
VAF, freq
end
if length(VAFresult.subclonefreq) > 0
subclonefreq = VAFresult.subclonefreq ./VAFresult.input.ploidy * VAFresult.cellularity
@series begin
seriestype --> :vline
legend --> false
fillcolor --> :darkred
linewidth --> 2
legend --> false
grid --> false
subclonefreq
end
end
yguide --> yguide
xguide --> "VAF"
legend --> false
grid --> false
()
end
""" plotinversevaf(VAF; <keyword arguments>)
"""
plotvaf
@userplot PlotInverseVAF
@recipe function f(pv::PlotInverseVAF; fmin = 0.12, fmax = 0.24, fit_fmax=fmax, sampled=true,
fstep = 0.001, fitcoef = nothing, cumulative = true, dataseries = :line)
VAFresult = pv.args[1]
VAF = sampled ? VAFresult.sampledVAF : VAFresult.trueVAF
df = gethist(VAF, fmin = fmin, fmax = fmax, fstep = fstep)
VAF = df[!,:VAF]
freq = cumulative ? df[!,:cumfreq] : df[!,:freq]
yguide = cumulative ? "Cumulative numberof mutations" : "Number of mutations"
@series begin
yguide --> yguide
xguide --> "Inverse VAF"
seriestype --> dataseries
1 ./ VAF, freq
end
if fitcoef !== nothing
if length(fitcoef) == 1
m = fitcoef[1]
c = - m/fit_fmax
else
c, m = fitcoef
end
x, y = 1 ./ VAF, m ./ VAF .+ c
x, y = x[y .>= 0], y[y .>= 0]
@series begin
yguide --> yguide
xguide --> "Inverse VAF"
seriestype --> :line
linecolor --> :red
linestyle --> :dash
x, y
end
end
yguide --> yguide
xguide --> "Inverse VAF"
fvals = [df[end, :VAF], 2/(1/df[1, :VAF]+ 1/df[end, :VAF]), df[1, :VAF]]
xticks --> (1 ./ fvals, map(x -> "1/" * x, string.(round.(fvals, digits = 2))))
legend --> false
grid --> false
()
end
@recipe function f(output::ModuleTracker)
@series begin
yguide --> "Population size"
xguide --> "Time"
seriestype --> :line
output.tvec, output.Nvec
end
end
@recipe function f(multisim::MultiSimulation; plottype=:popsize, tstep=nothing)
if plottype == :modulesize
yguide --> "Module size"
xguide --> "Time"
for moduletracker in multisim
@series begin
seriestype --> :line
legend --> false
moduletracker.tvec, moduletracker.Nvec
end
end
elseif plottype == :popsize
yguide --> "Number of modules"
xguide --> "Time"
@series begin
seriestype --> :line
legend --> false
newmoduletimes(multisim), 1:length(multisim)
end
elseif plottype == :cellpopsize
tstep = isnothing(tstep) ? 1 / multisim.input.bdrate : tstep
yguide --> "Number of cells"
xguide --> "Time"
@series begin
seriestype --> :line
legend --> false
cellpopulationsize(multisim, tstep)
end
end
end
@userplot PairwisePlot
@recipe function f(pp::PairwisePlot; sampleids=nothing)
if length(pp.args) == 1
z = pp.args[1]
n = isnothing(sampleids) ? size(z)[1] : length(sampleids)
x, y = 1:n, 1:n
elseif length(pp.args) == 3
x, y, z = pp.args
end
if sampleids !== nothing
z = z[sampleids, sampleids]
end
yguide --> "Module"
xguide --> "Module"
title --> "Pairwise fixed differences"
@series begin
grid --> false
seriestype := :heatmap
seriescolor --> cgrad(:bone, rev=true)
xticks --> x
yticks --> y
aspectratio --> 1
size --> (500,510)
x, y, z
end
end
@userplot ModuleSharedPlot
@recipe function f(msp::ModuleSharedPlot)
@series begin
grid --> false
seriestype := :bar
xguide --> "Number of modules"
yguide --> "Number fixed mutations"
legend --> false
msp.args[1]
end
end
@userplot PairwiseDistributionPlot
@recipe function f(pdp::PairwiseDistributionPlot; sampleids=nothing, samplesize=nothing,
showclonal=false, xticks=:auto)
if typeof(pdp.args[1]) <: Dict
pfddata = reduce(vcat, [fill(key, val) for (key,val) in pdp.args[1]])
else
pfdmatrix = pdp.args[1]
n = size(pfdmatrix)[1]
if sampleids === nothing && samplesize !== nothing
sampleids = sample(1:n, samplesize, replace=false)
end
if sampleids !== nothing
pfdmatrix = pfdmatrix[sampleids, sampleids]
n = length(sampleids)
end
pfddata = convert_pfdmatrix_to_vector(pfdmatrix)
end
@series begin
grid --> false
seriestype := :hist
xguide --> "Number of pairwise fixed differences"
yguide --> "Frequency"
color --> :dimgrey
linecolor --> :dimgrey
legend --> false
titlefontsize -->10
titlelocation --> :left
pfddata
end
if showclonal && length(pdp.args) > 1
@series begin
legend --> false
grid --> false
xguide --> "Number of pairwise fixed differences"
yguide --> "Frequency"
titlefontsize -->10
titlelocation --> :left
seriestype --> :vline
fillcolor --> :red
linewidth --> 2
[mean(pdp.args[2])]
end
end
end
function convert_pfdmatrix_to_vector(pfdmatrix)
n = size(pfdmatrix)[1]
vals = Int64[]
for i in 1:n
for j in i+1:n
push!(vals, pfdmatrix[j,i])
end
end
return vals
end | [
37811,
7110,
85,
1878,
7,
53,
8579,
11,
685,
7266,
21018,
19503,
48382,
28,
21737,
11208,
1279,
2539,
4775,
7159,
43734,
198,
37811,
198,
2,
7110,
85,
1878,
198,
198,
31,
7220,
29487,
28114,
53,
8579,
198,
198,
31,
29102,
431,
2163,
277,
7,
79,
85,
3712,
43328,
53,
8579,
26,
23818,
796,
3991,
11,
277,
9662,
796,
657,
13,
486,
11,
35846,
28,
7942,
8,
198,
220,
220,
220,
569,
8579,
20274,
796,
279,
85,
13,
22046,
58,
16,
60,
198,
220,
220,
220,
569,
8579,
796,
35846,
5633,
569,
8579,
20274,
13,
37687,
10137,
53,
8579,
1058,
569,
8579,
20274,
13,
7942,
53,
8579,
198,
220,
220,
220,
47764,
796,
651,
10034,
7,
53,
8579,
11,
277,
9662,
796,
277,
9662,
8,
198,
220,
220,
220,
569,
8579,
796,
357,
7568,
58,
28265,
25,
53,
8579,
60,
764,
9,
17,
764,
12,
277,
9662,
8,
24457,
362,
1303,
2617,
2124,
3815,
284,
3504,
286,
41701,
198,
220,
220,
220,
2030,
80,
796,
23818,
5633,
47764,
58,
45299,
25,
36340,
19503,
80,
60,
1058,
47764,
58,
45299,
25,
19503,
80,
60,
628,
220,
220,
220,
611,
651,
7,
29487,
1078,
7657,
11,
1058,
28349,
1000,
11,
2147,
8,
6624,
1058,
6404,
940,
198,
220,
220,
220,
220,
220,
220,
220,
569,
8579,
11,
2030,
80,
796,
569,
8579,
58,
19503,
80,
764,
29,
657,
4357,
2030,
80,
58,
19503,
80,
764,
29,
15,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
331,
41311,
796,
23818,
5633,
366,
34,
388,
13628,
1271,
286,
23005,
1,
1058,
366,
15057,
286,
23005,
1,
628,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
5657,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
8043,
14610,
1058,
11186,
198,
220,
220,
220,
220,
220,
220,
220,
9493,
413,
5649,
14610,
657,
13,
17,
198,
220,
220,
220,
220,
220,
220,
220,
6070,
8043,
14610,
1058,
67,
5558,
75,
2397,
4364,
198,
220,
220,
220,
220,
220,
220,
220,
18364,
30757,
8043,
14610,
1058,
11186,
198,
220,
220,
220,
220,
220,
220,
220,
569,
8579,
11,
2030,
80,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
4129,
7,
53,
8579,
20274,
13,
7266,
21018,
19503,
80,
8,
1875,
657,
198,
220,
220,
220,
220,
220,
220,
220,
850,
21018,
19503,
80,
796,
569,
8579,
20274,
13,
7266,
21018,
19503,
80,
24457,
53,
8579,
20274,
13,
15414,
13,
489,
1868,
88,
1635,
569,
8579,
20274,
13,
3846,
33737,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
85,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6070,
8043,
14610,
1058,
21953,
445,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9493,
413,
5649,
14610,
362,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
21018,
19503,
80,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
331,
41311,
14610,
331,
41311,
198,
220,
220,
220,
2124,
41311,
14610,
366,
53,
8579,
1,
198,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
7499,
198,
437,
198,
198,
37811,
7110,
259,
4399,
85,
1878,
7,
53,
8579,
26,
1279,
2539,
4775,
7159,
43734,
198,
37811,
198,
29487,
85,
1878,
198,
198,
31,
7220,
29487,
28114,
818,
4399,
53,
8579,
198,
198,
31,
29102,
431,
2163,
277,
7,
79,
85,
3712,
43328,
818,
4399,
53,
8579,
26,
277,
1084,
796,
657,
13,
1065,
11,
277,
9806,
796,
657,
13,
1731,
11,
4197,
62,
69,
9806,
28,
69,
9806,
11,
35846,
28,
7942,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
9662,
796,
657,
13,
8298,
11,
4197,
1073,
891,
796,
2147,
11,
23818,
796,
2081,
11,
4818,
6005,
444,
796,
1058,
1370,
8,
628,
220,
220,
220,
569,
8579,
20274,
796,
279,
85,
13,
22046,
58,
16,
60,
198,
220,
220,
220,
569,
8579,
796,
35846,
5633,
569,
8579,
20274,
13,
37687,
10137,
53,
8579,
1058,
569,
8579,
20274,
13,
7942,
53,
8579,
198,
220,
220,
220,
47764,
796,
651,
10034,
7,
53,
8579,
11,
277,
1084,
796,
277,
1084,
11,
277,
9806,
796,
277,
9806,
11,
277,
9662,
796,
277,
9662,
8,
220,
198,
220,
220,
220,
569,
8579,
796,
47764,
58,
28265,
25,
53,
8579,
60,
198,
220,
220,
220,
2030,
80,
796,
23818,
5633,
47764,
58,
28265,
25,
36340,
19503,
80,
60,
1058,
47764,
58,
28265,
25,
19503,
80,
60,
198,
220,
220,
220,
331,
41311,
796,
23818,
5633,
366,
34,
388,
13628,
1271,
1659,
23005,
1,
1058,
366,
15057,
286,
23005,
1,
628,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
331,
41311,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
818,
4399,
569,
8579,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
4818,
6005,
444,
198,
220,
220,
220,
220,
220,
220,
220,
352,
24457,
569,
8579,
11,
2030,
80,
198,
220,
220,
220,
886,
628,
220,
220,
220,
611,
4197,
1073,
891,
5145,
855,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4129,
7,
11147,
1073,
891,
8,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
796,
4197,
1073,
891,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
796,
532,
285,
14,
11147,
62,
69,
9806,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
11,
285,
796,
4197,
1073,
891,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
796,
352,
24457,
569,
8579,
11,
285,
24457,
569,
8579,
764,
10,
269,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
796,
2124,
58,
88,
764,
29,
28,
657,
4357,
331,
58,
88,
764,
29,
28,
657,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
331,
41311,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
818,
4399,
569,
8579,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1627,
8043,
14610,
1058,
445,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9493,
10992,
14610,
1058,
42460,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
628,
220,
220,
220,
331,
41311,
14610,
331,
41311,
198,
220,
220,
220,
2124,
41311,
14610,
366,
818,
4399,
569,
8579,
1,
198,
220,
220,
220,
277,
12786,
796,
685,
7568,
58,
437,
11,
1058,
53,
8579,
4357,
362,
29006,
16,
14,
7568,
58,
16,
11,
1058,
53,
8579,
48688,
352,
14,
7568,
58,
437,
11,
1058,
53,
8579,
46570,
47764,
58,
16,
11,
1058,
53,
8579,
11907,
220,
198,
220,
220,
220,
220,
742,
3378,
14610,
357,
16,
24457,
277,
12786,
11,
3975,
7,
87,
4613,
366,
16,
30487,
1635,
2124,
11,
4731,
12195,
744,
12195,
69,
12786,
11,
19561,
796,
362,
35514,
198,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
7499,
198,
437,
628,
198,
198,
31,
29102,
431,
2163,
277,
7,
22915,
3712,
26796,
35694,
8,
198,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
45251,
2546,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
7575,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
5072,
13,
83,
35138,
11,
5072,
13,
45,
35138,
198,
220,
220,
220,
886,
198,
437,
198,
198,
31,
29102,
431,
2163,
277,
7,
16680,
271,
320,
3712,
29800,
8890,
1741,
26,
7110,
4906,
28,
25,
79,
2840,
1096,
11,
256,
9662,
28,
22366,
8,
198,
220,
220,
220,
611,
7110,
4906,
6624,
1058,
18170,
1096,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
26796,
2546,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
7575,
1,
198,
220,
220,
220,
220,
220,
220,
220,
329,
953,
25132,
81,
10735,
287,
1963,
271,
320,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
953,
25132,
81,
10735,
13,
83,
35138,
11,
953,
25132,
81,
10735,
13,
45,
35138,
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,
2073,
361,
7110,
4906,
6624,
1058,
79,
2840,
1096,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
15057,
286,
13103,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
7575,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
4666,
25132,
999,
7,
16680,
271,
320,
828,
352,
25,
13664,
7,
16680,
271,
320,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
2073,
361,
7110,
4906,
6624,
1058,
3846,
79,
2840,
1096,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9662,
796,
318,
22366,
7,
83,
9662,
8,
5633,
352,
1220,
1963,
271,
320,
13,
15414,
13,
17457,
4873,
1058,
256,
9662,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
15057,
286,
4778,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
7575,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2685,
12924,
5768,
1096,
7,
16680,
271,
320,
11,
256,
9662,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
628,
220,
220,
220,
886,
198,
437,
198,
198,
31,
7220,
29487,
39645,
3083,
43328,
198,
198,
31,
29102,
431,
2163,
277,
7,
381,
3712,
47,
958,
3083,
43328,
26,
6291,
2340,
28,
22366,
8,
198,
220,
220,
220,
611,
4129,
7,
381,
13,
22046,
8,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
9788,
13,
22046,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
318,
22366,
7,
39873,
2340,
8,
5633,
2546,
7,
89,
38381,
16,
60,
1058,
4129,
7,
39873,
2340,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
796,
352,
25,
77,
11,
352,
25,
77,
198,
220,
220,
220,
2073,
361,
4129,
7,
381,
13,
22046,
8,
6624,
513,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
11,
1976,
796,
9788,
13,
22046,
198,
220,
220,
220,
886,
198,
220,
220,
220,
611,
6291,
2340,
5145,
855,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
1976,
58,
39873,
2340,
11,
6291,
2340,
60,
220,
198,
220,
220,
220,
886,
198,
220,
220,
220,
331,
41311,
14610,
366,
26796,
1,
198,
220,
220,
220,
2124,
41311,
14610,
366,
26796,
1,
198,
220,
220,
220,
3670,
14610,
366,
47,
958,
3083,
5969,
5400,
1,
198,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
19039,
1058,
25080,
8899,
198,
220,
220,
220,
220,
220,
220,
220,
2168,
8043,
14610,
269,
9744,
7,
25,
15992,
11,
2710,
28,
7942,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
742,
3378,
14610,
2124,
198,
220,
220,
220,
220,
220,
220,
220,
331,
83,
3378,
14610,
331,
198,
220,
220,
220,
220,
220,
220,
220,
4843,
10366,
952,
14610,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2546,
14610,
357,
4059,
11,
33690,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
11,
1976,
198,
220,
220,
220,
886,
198,
437,
198,
198,
31,
7220,
29487,
19937,
2484,
1144,
43328,
198,
198,
31,
29102,
431,
2163,
277,
7,
907,
79,
3712,
26796,
2484,
1144,
43328,
8,
198,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
19039,
1058,
5657,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
15057,
286,
13103,
1,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
15057,
5969,
23005,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
285,
2777,
13,
22046,
58,
16,
60,
198,
220,
220,
220,
886,
198,
437,
198,
198,
31,
7220,
29487,
39645,
3083,
20344,
3890,
43328,
198,
198,
31,
29102,
431,
2163,
277,
7,
79,
26059,
3712,
47,
958,
3083,
20344,
3890,
43328,
26,
6291,
2340,
28,
22366,
11,
8405,
1096,
28,
22366,
11,
198,
220,
220,
220,
905,
565,
20996,
28,
9562,
11,
220,
742,
3378,
28,
25,
23736,
8,
628,
220,
220,
220,
611,
2099,
1659,
7,
79,
26059,
13,
22046,
58,
16,
12962,
1279,
25,
360,
713,
198,
220,
220,
220,
220,
220,
220,
220,
279,
69,
1860,
1045,
796,
4646,
7,
85,
9246,
11,
685,
20797,
7,
2539,
11,
1188,
8,
329,
357,
2539,
11,
2100,
8,
287,
279,
26059,
13,
22046,
58,
16,
11907,
8,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
279,
16344,
6759,
8609,
796,
279,
26059,
13,
22046,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
2546,
7,
79,
16344,
6759,
8609,
38381,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
6291,
2340,
24844,
2147,
11405,
8405,
1096,
5145,
855,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6291,
2340,
796,
6291,
7,
16,
25,
77,
11,
8405,
1096,
11,
6330,
28,
9562,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
611,
6291,
2340,
5145,
855,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
16344,
6759,
8609,
796,
279,
16344,
6759,
8609,
58,
39873,
2340,
11,
6291,
2340,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
796,
4129,
7,
39873,
2340,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
279,
69,
1860,
1045,
796,
10385,
62,
79,
16344,
6759,
8609,
62,
1462,
62,
31364,
7,
79,
16344,
6759,
8609,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
19039,
1058,
10034,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
15057,
286,
5166,
3083,
5969,
5400,
1,
198,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
37,
28707,
1,
198,
220,
220,
220,
220,
220,
220,
220,
3124,
14610,
1058,
67,
9600,
4364,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
8043,
14610,
1058,
67,
9600,
4364,
198,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
3670,
10331,
7857,
14610,
940,
198,
220,
220,
220,
220,
220,
220,
220,
3670,
24886,
14610,
1058,
9464,
198,
220,
220,
220,
220,
220,
220,
220,
279,
69,
1860,
1045,
198,
220,
220,
220,
886,
198,
220,
220,
220,
611,
905,
565,
20996,
11405,
4129,
7,
79,
26059,
13,
22046,
8,
1875,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
25076,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8177,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10706,
14610,
3991,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
41311,
14610,
366,
15057,
286,
5166,
3083,
5969,
5400,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
41311,
14610,
366,
37,
28707,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3670,
10331,
7857,
14610,
940,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3670,
24886,
14610,
1058,
9464,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1055,
6386,
2981,
14610,
1058,
85,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6070,
8043,
14610,
1058,
445,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9493,
413,
5649,
14610,
362,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
32604,
7,
79,
26059,
13,
22046,
58,
17,
12962,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
437,
198,
198,
8818,
10385,
62,
79,
16344,
6759,
8609,
62,
1462,
62,
31364,
7,
79,
16344,
6759,
8609,
8,
198,
220,
220,
220,
299,
796,
2546,
7,
79,
16344,
6759,
8609,
38381,
16,
60,
198,
220,
220,
220,
410,
874,
796,
2558,
2414,
21737,
198,
220,
220,
220,
329,
1312,
287,
352,
25,
77,
198,
220,
220,
220,
220,
220,
220,
220,
329,
474,
287,
1312,
10,
16,
25,
77,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4574,
0,
7,
12786,
11,
279,
16344,
6759,
8609,
58,
73,
11,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
410,
874,
198,
437
] | 2.062598 | 3,179 |
# Juliaを使った株価の取得と通知
using DataFrames, Dates, CSV
include("GetStockPrice.jl")
uniqueindex(x) = findfirst.(isequal.(unique(x)), [x]) # 重複しない行のindexを計算
# 株価データの初期化.新たに銘柄追加するときだけこれを実行する
function initdailystockprice(stock)
range = "7d" # 取得データの期間
interval = "1m" # 取得データの間隔
df = getstockprice(stock, range, interval)
# CSV書き込み前に時刻のフォーマットを変更しておく
dtfmt = "yyyy/mm/dd HH:MM:SS"
df."timestamp" = Dates.format.(df."timestamp", dtfmt)
# CSVへの書き込み
println("write stock price: " * stock * ".csv")
CSV.write("./data/" * stock * ".csv", df)
end
# 1日分の1分足データを取得し,CSVにマージする
function savedailystockprice(stock)
range = "1d" # 取得データの期間
interval = "1m" # 取得データの間隔
today = getstockprice(stock, range, interval)
dtfmt = "yyyy/mm/dd HH:MM:SS"
# CSV読み込み
past = DataFrame(CSV.File("./data/" * stock * ".csv", header = true))
past."timestamp" = DateTime.(past."timestamp", dtfmt)
# データを結合
all = vcat(past, today)
# 重複データを削除
all = all[uniqueindex(all.timestamp), :]
# 日付順でソート
all = sort(all)
# CSV書き込み前に時刻のフォーマットを変更しておく
all."timestamp" = Dates.format.(all."timestamp", dtfmt)
# CSVへの書き込み
println("write stock price: " * stock * ".csv")
CSV.write("./data/" * stock * ".csv", all)
end
function main()
# 取得対象の銘柄の指定.東証の株価は".T"をつける.
stocks = ["1557.T" "SPY" "SPXL" "SPXS" "TECL" "CURE" "SOXL" "DRN" "TNA" "EDC"]
try
savedailystockprice.(stocks)
catch err
println(err)
end
end
main()
| [
2,
22300,
31758,
45635,
33180,
25224,
43718,
103,
160,
122,
94,
15474,
237,
244,
36181,
245,
30201,
34460,
248,
163,
253,
98,
198,
198,
3500,
6060,
35439,
11,
44712,
11,
44189,
198,
17256,
7203,
3855,
26207,
18124,
13,
20362,
4943,
198,
198,
34642,
9630,
7,
87,
8,
796,
1064,
11085,
12195,
786,
13255,
12195,
34642,
7,
87,
36911,
685,
87,
12962,
1303,
16268,
229,
235,
164,
97,
229,
22180,
26945,
18566,
26193,
234,
5641,
9630,
31758,
164,
101,
230,
163,
106,
245,
198,
198,
2,
10545,
254,
103,
160,
122,
94,
21959,
6312,
23376,
15474,
230,
251,
17312,
253,
44293,
244,
171,
120,
236,
23877,
108,
25224,
28618,
165,
232,
246,
162,
253,
226,
164,
4204,
27950,
254,
33623,
25748,
30201,
33778,
46777,
2515,
239,
46036,
39258,
31758,
22522,
253,
26193,
234,
33623,
25748,
198,
8818,
2315,
29468,
13578,
20888,
7,
13578,
8,
198,
220,
220,
220,
2837,
796,
366,
22,
67,
1,
220,
220,
220,
1303,
10263,
237,
244,
36181,
245,
21959,
6312,
23376,
5641,
17312,
253,
38461,
241,
198,
220,
220,
220,
16654,
796,
366,
16,
76,
1,
1303,
10263,
237,
244,
36181,
245,
21959,
6312,
23376,
33426,
244,
241,
49694,
242,
198,
220,
220,
220,
47764,
796,
651,
13578,
20888,
7,
13578,
11,
2837,
11,
16654,
8,
628,
220,
220,
220,
1303,
44189,
162,
249,
116,
33778,
164,
122,
120,
2515,
123,
30298,
235,
28618,
162,
25081,
26344,
119,
5641,
48457,
12045,
252,
35799,
31758,
13783,
231,
162,
249,
112,
22180,
28134,
2515,
232,
31917,
198,
220,
220,
220,
288,
27110,
16762,
796,
366,
22556,
22556,
14,
3020,
14,
1860,
47138,
25,
12038,
25,
5432,
1,
198,
220,
220,
220,
47764,
526,
16514,
27823,
1,
796,
44712,
13,
18982,
12195,
7568,
526,
16514,
27823,
1600,
288,
27110,
16762,
8,
628,
220,
220,
220,
1303,
44189,
2515,
116,
27032,
249,
116,
33778,
164,
122,
120,
2515,
123,
198,
220,
220,
220,
44872,
7203,
13564,
4283,
2756,
25,
366,
1635,
4283,
1635,
27071,
40664,
4943,
198,
220,
220,
220,
44189,
13,
13564,
7,
1911,
14,
7890,
30487,
1635,
4283,
1635,
27071,
40664,
1600,
47764,
8,
198,
437,
198,
198,
2,
352,
33768,
98,
26344,
228,
5641,
16,
26344,
228,
164,
114,
111,
21959,
6312,
23376,
31758,
20998,
244,
36181,
245,
22180,
171,
120,
234,
7902,
53,
28618,
20115,
6312,
21091,
33623,
25748,
198,
8818,
7448,
3079,
13578,
20888,
7,
13578,
8,
198,
220,
220,
220,
2837,
796,
366,
16,
67,
1,
220,
220,
220,
1303,
10263,
237,
244,
36181,
245,
21959,
6312,
23376,
5641,
17312,
253,
38461,
241,
198,
220,
220,
220,
16654,
796,
366,
16,
76,
1,
1303,
10263,
237,
244,
36181,
245,
21959,
6312,
23376,
33426,
244,
241,
49694,
242,
198,
220,
220,
220,
1909,
796,
651,
13578,
20888,
7,
13578,
11,
2837,
11,
16654,
8,
198,
220,
220,
220,
288,
27110,
16762,
796,
366,
22556,
22556,
14,
3020,
14,
1860,
47138,
25,
12038,
25,
5432,
1,
628,
220,
220,
220,
1303,
44189,
45739,
255,
2515,
123,
164,
122,
120,
2515,
123,
198,
220,
220,
220,
1613,
796,
6060,
19778,
7,
7902,
53,
13,
8979,
7,
1911,
14,
7890,
30487,
1635,
4283,
1635,
27071,
40664,
1600,
13639,
796,
2081,
4008,
198,
220,
220,
220,
1613,
526,
16514,
27823,
1,
796,
7536,
7575,
12195,
30119,
526,
16514,
27823,
1600,
288,
27110,
16762,
8,
628,
220,
220,
220,
1303,
14524,
229,
6312,
23376,
31758,
163,
113,
238,
28938,
230,
198,
220,
220,
220,
477,
796,
410,
9246,
7,
30119,
11,
1909,
8,
628,
220,
220,
220,
1303,
16268,
229,
235,
164,
97,
229,
21959,
6312,
23376,
31758,
30298,
232,
165,
247,
97,
198,
220,
220,
220,
477,
796,
477,
58,
34642,
9630,
7,
439,
13,
16514,
27823,
828,
1058,
60,
628,
220,
220,
220,
1303,
10545,
245,
98,
20015,
246,
165,
254,
228,
30640,
47559,
12045,
230,
198,
220,
220,
220,
477,
796,
3297,
7,
439,
8,
628,
220,
220,
220,
1303,
44189,
162,
249,
116,
33778,
164,
122,
120,
2515,
123,
30298,
235,
28618,
162,
25081,
26344,
119,
5641,
48457,
12045,
252,
35799,
31758,
13783,
231,
162,
249,
112,
22180,
28134,
2515,
232,
31917,
198,
220,
220,
220,
477,
526,
16514,
27823,
1,
796,
44712,
13,
18982,
12195,
439,
526,
16514,
27823,
1600,
288,
27110,
16762,
8,
628,
220,
220,
220,
1303,
44189,
2515,
116,
27032,
249,
116,
33778,
164,
122,
120,
2515,
123,
198,
220,
220,
220,
44872,
7203,
13564,
4283,
2756,
25,
366,
1635,
4283,
1635,
27071,
40664,
4943,
198,
220,
220,
220,
44189,
13,
13564,
7,
1911,
14,
7890,
30487,
1635,
4283,
1635,
27071,
40664,
1600,
477,
8,
198,
437,
198,
198,
8818,
1388,
3419,
198,
220,
220,
220,
1303,
10263,
237,
244,
36181,
245,
43380,
122,
164,
109,
94,
33426,
232,
246,
162,
253,
226,
27032,
234,
229,
22522,
248,
171,
120,
236,
30266,
109,
164,
101,
120,
27032,
254,
103,
160,
122,
94,
31676,
1911,
51,
1,
31758,
2515,
97,
2515,
239,
25748,
171,
120,
236,
198,
220,
220,
220,
14420,
796,
14631,
1314,
3553,
13,
51,
1,
366,
4303,
56,
1,
366,
4303,
32457,
1,
366,
4303,
55,
50,
1,
366,
51,
2943,
43,
1,
366,
34,
11335,
1,
366,
15821,
32457,
1,
366,
7707,
45,
1,
366,
51,
4535,
1,
366,
1961,
34,
8973,
198,
220,
220,
220,
1949,
198,
220,
220,
220,
220,
220,
220,
220,
7448,
3079,
13578,
20888,
12195,
29522,
8,
198,
220,
220,
220,
4929,
11454,
198,
220,
220,
220,
220,
220,
220,
220,
44872,
7,
8056,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
12417,
3419,
628,
198
] | 1.659737 | 914 |
function value(obj::UnivariateFunction, arg0::jdouble)
return jcall(obj, "value", jdouble, (jdouble,), arg0)
end
| [
8818,
1988,
7,
26801,
3712,
3118,
42524,
22203,
11,
1822,
15,
3712,
73,
23352,
8,
198,
220,
220,
220,
1441,
474,
13345,
7,
26801,
11,
366,
8367,
1600,
474,
23352,
11,
357,
73,
23352,
11,
828,
1822,
15,
8,
198,
437,
628
] | 2.809524 | 42 |
#=
---------------------------------------------------------------------------
Implements a few collections that the main mcmc sampler from the file
`mcmc.jl` uses to keep track of the current state and history of where it
was. The following structures are defined:
- AccptTracker : for tracking historical acceptance rate
- ParamHistory : for storing the parameter chain
- ActionTracker : keeps track of what to do on a given iteration
- Workspace : main workspace for `mcmc` function from `mcmc.jl`
- ParamUpdtDefn : defines a single parameter update step
- GibbsDefn : defines an entire gibbs sweep of parameter updates
---------------------------------------------------------------------------
=#
import Base: last, getindex, length, display, eltype
"""
AccptTracker
Tracks historical acceptance rate of the chain
"""
mutable struct AccptTracker
accpt_imp::Int64 # a number of accepted imputation samples
prop_imp::Int64 # a number of proposed imputation samples
accpt_updt::Vector{Int64} # a number of accepted parameter updates (one per parameter)
prop_updt::Vector{Int64} # a number of proposed parameter updates (one per parameter)
updt_len::Int64 # total number of parameter update steps
"""
AccptTracker(setup::MCMCSetup)
Initialise tracker of acceptance rate according to a `setup` of the mcmc
sampler
"""
function AccptTracker(setup::MCMCSetup)
updt_len = length(setup.updt_coord)
accpt_imp = 0
prop_imp = 0
accpt_updt = [0 for i in 1:updt_len]
prop_updt = [0 for i in 1:updt_len]
new(accpt_imp, prop_imp, accpt_updt, prop_updt, updt_len)
end
end
"""
update!(at::AccptTracker, ::ParamUpdate, i, accepted::Bool)
Update acceptance tracker: increment parameter update info on the `i`th
coordinate with 1 proposed and---if `accepted` is true---then also 1 accepted
sample
"""
function update!(at::AccptTracker, ::ParamUpdate, i, accepted::Bool)
at.prop_updt[i] += 1
at.accpt_updt[i] += 1*accepted
end
"""
update!(at::AccptTracker, ::Imputation, accepted::Bool)
Update acceptance tracker: increment imputation info with 1 proposed and---if
`accepted` is true---then also 1 accepted sample
"""
function update!(at::AccptTracker, ::Imputation, accepted::Bool)
at.prop_imp += 1
at.accpt_imp += 1*accepted
end
"""
accpt_rate(at::AccptTracker, ::ParamUpdate)
Return current acceptance rate for parameter updates
"""
accpt_rate(at::AccptTracker, ::ParamUpdate) = at.accpt_updt./at.prop_updt
"""
accpt_rate(at::AccptTracker, ::Imputation)
Return current acceptance rate for imputation
"""
accpt_rate(at::AccptTracker, ::Imputation) = at.accpt_imp/at.prop_imp
"""
display(at::AccptTracker)
Show the acceptance rates
"""
function display(at::AccptTracker)
print("Imputation acceptance rate: ", accpt_rate(at, Imputation()),
".\nParameter update acceptance rate: ",
accpt_rate(at, ParamUpdate()), ".\n")
end
"""
ParamHistory{T}
Stores information about parameter history
"""
mutable struct ParamHistory{T}
θ_chain::Vector{T} # parameter history
counter::Int64 # index of the most recently accepted parameter vector
"""
ParamHistory(setup::MCMCSetup)
Initialise tracker of parameter history according to a `setup` of the mcmc
sampler
"""
function ParamHistory(setup::MCMCSetup)
N, n = setup.num_mcmc_steps, setup.warm_up
updt_len = length(setup.updt_coord)
θ = params(setup.P˟)
T = typeof(θ)
θ_chain = Vector{T}(undef, (N-n)*updt_len+1)
θ_chain[1] = copy(θ)
new{T}(θ_chain, 1)
end
end
"""
update!(ph::ParamHistory, θ)
Update parameter history with a new accepted sample θ
"""
function update!(ph::ParamHistory, θ)
ph.counter += 1
ph.θ_chain[ph.counter] = copy(θ)
end
"""
last(ph::ParamHistory)
Return a copy of the most recently accepted paramter vector
"""
last(ph::ParamHistory) = copy(ph.θ_chain[ph.counter])
"""
ActionTracker
Keeps track of what to do on a given iteration
"""
struct ActionTracker{T,S,R,U}
save_iter::T # Save the path every ... iteration
verb_iter::S # Print progress message to console every ... iteration
warm_up::R # Number of steps of the chain in which no param update is made
readjust::U
param_updt::Bool # Flag for whether to update parameters at all
"""
ActionTracker(setup::MCMCSetup)
Initialise tracker of what to do on a given iteration according to a `setup`
of the mcmc sampler
"""
function ActionTracker(setup::MCMCSetup)
i1, i2, i3 = setup.save_iter, setup.verb_iter, setup.warm_up
i4 = setup.pCN_readjust_param.step
s1, s2, s3, s4 = typeof(i1), typeof(i2), typeof(i3), typeof(i4)
@assert (s1 <: Number) && (s2 <: Number) && (s3 <: Number) && (s4 <: Number)
new{s1,s2,s3,s4}(i1, i2, i3, i4, setup.param_updt)
end
end
"""
act(::SavePath, at::ActionTracker, i)
Determine whether to save path on a given iteration, indexed `i`
"""
function act(::SavePath, at::ActionTracker, i)
(i > at.warm_up) && (i % at.save_iter == 0)
end
"""
act(::Verbose, at::ActionTracker, i)
Determine whether to print out information to a console on a given iteration,
indexed `i`
"""
act(::Verbose, at::ActionTracker, i) = (i % at.verb_iter == 0)
"""
act(::ParamUpdate, at::ActionTracker, i)
Determine whether to update parameters on a given iteration, indexed `i`
"""
act(::ParamUpdate, at::ActionTracker, i) = at.param_updt && (i > at.warm_up)
act(::Readjust, at::ActionTracker, i) = (i % at.readjust == 0) && (i > at.warm_up)
mutable struct SingleElem{T} val::T end
set!(x::SingleElem{T}, y::T) where T = (x.val = y)
const RhoInfoType = NamedTuple{(:step, :scale, :minδ, :maxρ, :trgt, :offset),
Tuple{Int64, Float64, Float64, Float64, Float64, Int64}}
"""
Workspace{ObsScheme,S,TX,TW,R,ST}
The main container of the `mcmc` function from `mcmc.jl` in which most data
pertinent to sampling is stored
"""
struct Workspace{ObsScheme,B,ST,S,TX,TW,R,TP,TZ}# ,Q, where Q = eltype(result)
Wnr::Wiener{S} # Wiener, driving law
XXᵒ::Vector{TX} # Diffusion proposal paths
XX::Vector{TX} # Accepted diffusion paths
WWᵒ::Vector{TW} # Driving noise of proposal
WW::Vector{TW} # Driving noise of the accepted paths
Pᵒ::Vector{R} # Guided proposals parameterised by proposal param
P::Vector{R} # Guided proposals parameterised by accepted param
fpt::Vector # Additional information about first passage times
ρ::Vector{Vector{Float64}} # Memory parameter of the precond Crank-Nicolson scheme
recompute_ODEs::Vector{Bool} # Info on whether to recompute H,Hν,c after resp. param updt
accpt_tracker::AccptTracker # Object for tracking acceptance rate
θ_chain::ParamHistory # Object for tracking parameter history
action_tracker::ActionTracker # Object for tracking steps to perform on a given iteration
skip_for_save::Int64 # Thining parameter for saving path
paths::Vector # Storage with historical, accepted paths
time::Vector{Float64} # Storage with time axis
blocking::B
blidx::Int64
x0_prior::TP
z::SingleElem{TZ}
pCN_readjust_param::RhoInfoType
#result::Vector{Q} #TODO come back to later
#resultᵒ::Vector{Q} #TODO come back to later
"""
Workspace(setup::MCMCSetup{ObsScheme})
Initialise workspace of the mcmc sampler according to a `setup` variable
"""
function Workspace(setup::MCMCSetup{ObsScheme}) where ObsScheme
# just to make sure that nothing gets messed up if the user decides
# to later modify `setup` use deepcopies
x0_prior, Wnr = deepcopy(setup.x0_prior), deepcopy(setup.Wnr)
XX, WW = deepcopy(setup.XX), deepcopy(setup.WW)
P, fpt = deepcopy(setup.P), deepcopy(setup.fpt)
updt_coord = deepcopy(setup.updt_coord)
pCN_readjust = deepcopy(setup.pCN_readjust_param)
# forcedSolve defines type by the starting point, make sure it matches
x0_guess = eltype(eltype(XX))(setup.x0_guess)
TW, TX, S, R = eltype(WW), eltype(XX), valtype(Wnr), eltype(P)
ST, TP = typeof(setup.solver), typeof(x0_prior)
m = length(P)
y = copy(x0_guess)
for i in 1:m
WW[i] = Bridge.samplepath(P[i].tt, zero(S))
sample!(WW[i], Wnr)
WW[i], XX[i] = forcedSolve(Euler(), y, WW[i], P[i]) # this will enforce adherence to domain
while !checkFpt(ObsScheme(), XX[i], fpt[i])
sample!(WW[i], Wnr)
forcedSolve!(Euler(), XX[i], y, WW[i], P[i]) # this will enforce adherence to domain
end
y = XX[i].yy[end]
end
y = x0_guess
ll = logpdf(x0_prior, y)
ll += path_log_likhd(ObsScheme(), XX, P, 1:m, fpt, skipFPT=true)
ll += lobslikelihood(P[1], y)
XXᵒ = deepcopy(XX)
WWᵒ = deepcopy(WW)
Pᵒ = deepcopy(P)
# compute the white noise that generates x0_guess under the initial posterior
z = inv_start_pt(y, x0_prior, P[1])
TZ = typeof(z)
z = SingleElem{TZ}(z)
#TODO come back to gradient initialisation
skip = setup.skip_for_save
_time = collect(Iterators.flatten(p.tt[1:skip:end-1] for p in P))
θ_history = ParamHistory(setup)
blocking = set_blocking(setup.blocking, setup.blocking_params, P)
ρ = prepare_mem_param(setup.ρ, blocking)
display(blocking)
B = typeof(blocking)
(workspace = new{ObsScheme,B,ST,S,TX,TW,R,TP,TZ}(Wnr, XXᵒ, XX, WWᵒ, WW,
Pᵒ, P, fpt, ρ,
check_if_recompute_ODEs(setup),
AccptTracker(setup),
θ_history,
ActionTracker(setup),
skip, [], _time,
blocking, 1, x0_prior,
z, pCN_readjust),
ll = ll, θ = last(θ_history))
end
# NOTE this constructor is no longer in use, can be removed
"""
Workspace(ws::Workspace{ObsScheme,S,TX,TW,R}, new_ρ::Float64)
Copy constructor of `workspace`. Keeps everything the same as passed `ws`
with the exception of new memory parameter for the preconditioned
Crank-Nicolson scheme, which is changed to `new_ρ`.
"""
function Workspace(ws::Workspace{ObsScheme,B,ST,S,TX,TW,R,TP,TZ}, new_ρ::Vector{Vector{Float64}}
) where {ObsScheme,B,ST,S,TX,TW,R,TP,TZ}
new{ObsScheme,B,ST,S,TX,TW,R,TP,TZ}(ws.Wnr, ws.XXᵒ, ws.XX, ws.WWᵒ,
ws.WW, ws.Pᵒ, ws.P, ws.fpt, new_ρ,
ws.recompute_ODEs, ws.accpt_tracker,
ws.θ_chain, ws.action_tracker,
ws.skip_for_save, ws.paths, ws.time,
ws.blocking, ws.blidx, ws.x0_prior,
ws.z, ws.pCN_readjust_param)
end
function Workspace(ws::Workspace{ObsScheme,B,ST,S,TX,TW,R̃,TP,TZ},
P::Vector{R}, Pᵒ::Vector{R}, idx
) where {ObsScheme,B,ST,S,TX,TW,R̃,R,TP,TZ}
new{ObsScheme,B,ST,S,TX,TW,R,TP,TZ}(ws.Wnr, ws.XXᵒ, ws.XX, ws.WWᵒ,
ws.WW, Pᵒ, P, ws.fpt, ws.ρ,
ws.recompute_ODEs, ws.accpt_tracker,
ws.θ_chain, ws.action_tracker,
ws.skip_for_save, ws.paths, ws.time,
ws.blocking, idx, ws.x0_prior, ws.z,
ws.pCN_readjust_param)
end
end
eltype(::SamplePath{T}) where T = T
eltype(::Type{SamplePath{T}}) where T = T
solver_type(::Workspace{O,B,ST}) where {O,B,ST} = ST
next_set_of_blocks(ws::Workspace{O,NoBlocking}) where O = ws
"""
next(𝔅::ChequeredBlocking, XX, θ)
Switch the set of blocks that are being updated. `XX` is the most recently
sampled (accepted) path. `θ` can be used to change parametrisation.
"""
function next_set_of_blocks(ws::Workspace{O,<:ChequeredBlocking}) where O
XX, P, Pᵒ, 𝔅 = ws.XX, ws.P, ws.Pᵒ, ws.blocking
idx = (ws.blidx % 2) + 1
θ = params(P[1].Target)
vs = find_end_pts(𝔅, XX, idx)
Ls = 𝔅.Ls[idx]
Σs = 𝔅.Σs[idx]
ch_pts = 𝔅.change_pts[idx]
aux_flags = 𝔅.aux_flags[idx]
P_new = [GuidPropBridge(P[i], Ls[i], vs[i], Σs[i], ch_pts[i], θ, aux_flags[i])
for (i,_) in enumerate(P)]
Pᵒ_new = [GuidPropBridge(Pᵒ[i], Ls[i], vs[i], Σs[i], ch_pts[i], θ, aux_flags[i])
for (i,_) in enumerate(Pᵒ)]
Workspace(ws, P_new, Pᵒ_new, idx)
end
prepare_mem_param(ρ::Number, ::NoBlocking) = [[ρ]]
function prepare_mem_param(ρ::Number, blocking::ChequeredBlocking)
[[ρ for _ in block_seq] for block_seq in blocking.accpt_tracker.accpt]
end
"""
act(action, ws::Workspace, i)
Determine whether to perform `action` on a given iteration, indexed `i`
"""
act(action, ws::Workspace, i) = act(action, ws.action_tracker, i)
#NOTE temporary
act(action::Readjust, ws::Workspace, i) = (typeof(ws.blocking) <:ChequeredBlocking) && act(action, ws.action_tracker, i)
"""
savePath!(ws, wsXX, bXX)
Save the entire path spanning all segments in `XX`. Only 1 in every `ws.skip`
points is saved to reduce storage space. To-be-saved `XX` is set to `wsXX` or
`bXX` depending on whether blocking is used.
"""
function save_path!(ws)
skip = ws.skip_for_save
push!(ws.paths, collect(Iterators.flatten(ws.XX[i].yy[1:skip:end-1]
for i in 1:length(ws.XX))))
end
sigmoid(x, a=1.0) = 1.0 / (1.0 + exp(-a*x))
logit(x, a=1.0) = (log(x) - log(1-x))/a
function readjust_pCN!(ws, mcmc_iter)
at = ws.blocking.short_term_accpt_tracker
p = ws.pCN_readjust_param
δ = max(p.minδ, p.scale/sqrt(max(1.0, mcmc_iter/p.step-p.offset)))
accpt_rates = acceptance(at)
for (i, a_i) in enumerate(accpt_rates)
for (j, a_ij) in enumerate(a_i)
ws.ρ[i][j] = min(sigmoid(logit(ws.ρ[i][j]) - (2*(a_ij > p.trgt)-1)*δ), p.maxρ)
end
end
display_acceptance_rate(ws.blocking, true)
print_pCN(ws)
reset!(at)
end
#NOTE _print_info defined in `blocking_schedule`
function print_pCN(ws)
print("\nρ parameter:\n----------------------\n")
_print_info(ws.ρ[1])
_print_info(ws.ρ[2])
end
"""
ParamUpdtDefn
For a given, single parameter update step defines transition kernels, priors,
which coordinates are updated etc.
"""
struct ParamUpdtDefn{R,S,T,U}
updt_type::R # The type of update (Metropolis-Hastings/conjugate etc)
updt_coord::S # Which coordinates to update
t_kernel::T # Transition kernel for a given parameter update
priors::U # Prior over updated parameters
recompute_ODEs::Bool # Whether given param updt calls for recomputing H,Hν,c
"""
ParamUpdtDefn(updt_type::R, updt_coord::S, t_kernel::T, priors::U,
recompute_ODEs::Bool)
Initialisation of the complete definition of the parameter update step
"""
function ParamUpdtDefn(updt_type::R, updt_coord::S, t_kernel::T, priors::U,
recompute_ODEs::Bool
) where {R<:ParamUpdateType,S,T,U}
new{R,S,T,U}(updt_type, updt_coord, t_kernel, priors, recompute_ODEs)
end
end
"""
GibbsDefn
Definition of the entire Gibbs sweep.
"""
struct GibbsDefn{N}
updates::NTuple{N,ParamUpdtDefn}
"""
GibbsDefn(setup)
Initialises Gibbs sweep according to the `setup`
"""
function GibbsDefn(setup)
recompute_ODEs = check_if_recompute_ODEs(setup)
updates = [ParamUpdtDefn(ut, uc, tk, pr, ro) for (ut, uc, tk, pr, ro)
in zip(setup.updt_type, setup.updt_coord, setup.t_kernel,
setup.priors, recompute_ODEs)]
new{length(updates)}(Tuple(updates))
end
end
"""
getindex(g::GibbsDefn, i::Int)
Return `i`th definition of parameter update
"""
getindex(g::GibbsDefn, i::Int) = g.updates[i]
"""
length(g::GibbsDefn{N})
Return the total number of parameter updates in a single Gibbs sweep
"""
length(g::GibbsDefn{N}) where N = N
"""
init_adaptation!(adpt::Adaptation{Val{false}}, ws::Workspace)
Nothing to do when no adaptation needs to be done
"""
init_adaptation!(adpt::Adaptation{Val{false}}, ws::Workspace) = nothing
"""
init_adaptation!(adpt::Adaptation{Val{true}}, ws::Workspace)
Resize internal container with paths in `adpt` to match the length of imputed
paths
"""
function init_adaptation!(adpt::Adaptation{Val{true}}, ws::Workspace)
m = length(ws.XX)
resize!(adpt, m, [length(ws.XX[i]) for i in 1:m])
end
"""
update!(adpt::Adaptation{Val{false}}, ws::Workspace{ObsScheme}, yPr, i, ll,
solver::ODESolverType)
Nothing to be done for no adaptation
"""
function update!(adpt::Adaptation{Val{false}}, ws::Workspace{ObsScheme}, i,
ll) where ObsScheme
adpt, ll
end
"""
update!(adpt::Adaptation{Val{false}}, ws::Workspace{ObsScheme}, yPr, i, ll,
solver::ODESolverType)
Update the proposal law according to the adaptive scheme and the recently saved
history of the imputed paths
"""
function update!(adpt::Adaptation{Val{true}}, ws::Workspace{ObsScheme,B,ST},
i, ll) where {ObsScheme,B,ST}
if i % adpt.skip == 0
if adpt.N[2] == adpt.sizes[adpt.N[1]]
X_bar = mean_trajectory(adpt)
m = length(ws.P)
for j in 1:m
Pt = recentre(ws.P[j].Pt, ws.XX[j].tt, X_bar[j])
update_λ!(Pt, adpt.λs[adpt.N[1]])
ws.P[j] = GuidPropBridge(ws.P[j], Pt)
Ptᵒ = recentre(ws.Pᵒ[j].Pt, ws.XX[j].tt, X_bar[j])
update_λ!(Ptᵒ, adpt.λs[adpt.N[1]])
ws.Pᵒ[j] = GuidPropBridge(ws.Pᵒ[j], Ptᵒ)
end
solve_back_rec!(NoBlocking(), ws, ws.P)
#solveBackRec!(NoBlocking(), ws.Pᵒ, ST())
y = ws.XX[1].yy[1]
z = inv_start_pt(y, ws.x0_prior, ws.P[1])
set!(ws.z, z)
for j in 1:m
inv_solve!(Euler(), ws.XX[j], ws.WW[j], ws.P[j])
end
ll = logpdf(ws.x0_prior, y)
ll += path_log_likhd(ObsScheme(), ws.XX, ws.P, 1:m, ws.fpt)
ll += lobslikelihood(ws.P[1], y)
adpt.N[2] = 1
adpt.N[1] += 1
else
adpt.N[2] += 1
end
end
adpt, ll
end
| [
2,
28,
198,
220,
220,
220,
16529,
32284,
198,
220,
220,
220,
1846,
1154,
902,
257,
1178,
17268,
326,
262,
1388,
285,
11215,
66,
6072,
20053,
422,
262,
2393,
198,
220,
220,
220,
4600,
76,
11215,
66,
13,
20362,
63,
3544,
284,
1394,
2610,
286,
262,
1459,
1181,
290,
2106,
286,
810,
340,
198,
220,
220,
220,
373,
13,
383,
1708,
8573,
389,
5447,
25,
198,
220,
220,
220,
532,
6366,
457,
35694,
220,
220,
1058,
329,
9646,
6754,
13427,
2494,
198,
220,
220,
220,
532,
25139,
18122,
220,
220,
1058,
329,
23069,
262,
11507,
6333,
198,
220,
220,
220,
532,
7561,
35694,
220,
1058,
7622,
2610,
286,
644,
284,
466,
319,
257,
1813,
24415,
198,
220,
220,
220,
532,
10933,
10223,
220,
220,
220,
220,
220,
1058,
1388,
44573,
329,
4600,
76,
11215,
66,
63,
2163,
422,
4600,
76,
11215,
66,
13,
20362,
63,
198,
220,
220,
220,
532,
25139,
4933,
28664,
7469,
77,
220,
1058,
15738,
257,
2060,
11507,
4296,
2239,
198,
220,
220,
220,
532,
41071,
7469,
77,
220,
220,
220,
220,
220,
1058,
15738,
281,
2104,
46795,
1443,
16085,
286,
11507,
5992,
198,
220,
220,
220,
16529,
32284,
198,
46249,
198,
198,
11748,
7308,
25,
938,
11,
651,
9630,
11,
4129,
11,
3359,
11,
1288,
4906,
198,
198,
37811,
198,
220,
220,
220,
6366,
457,
35694,
198,
198,
2898,
4595,
6754,
13427,
2494,
286,
262,
6333,
198,
37811,
198,
76,
18187,
2878,
6366,
457,
35694,
198,
220,
220,
220,
697,
457,
62,
11011,
3712,
5317,
2414,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
257,
1271,
286,
6292,
848,
7094,
8405,
198,
220,
220,
220,
2632,
62,
11011,
3712,
5317,
2414,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
257,
1271,
286,
5150,
848,
7094,
8405,
198,
220,
220,
220,
697,
457,
62,
929,
28664,
3712,
38469,
90,
5317,
2414,
92,
220,
220,
1303,
257,
1271,
286,
6292,
11507,
5992,
357,
505,
583,
11507,
8,
198,
220,
220,
220,
2632,
62,
929,
28664,
3712,
38469,
90,
5317,
2414,
92,
220,
220,
220,
1303,
257,
1271,
286,
5150,
11507,
5992,
357,
505,
583,
11507,
8,
198,
220,
220,
220,
2325,
83,
62,
11925,
3712,
5317,
2414,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2472,
1271,
286,
11507,
4296,
4831,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
6366,
457,
35694,
7,
40406,
3712,
9655,
9655,
40786,
8,
628,
220,
220,
220,
20768,
786,
30013,
286,
13427,
2494,
1864,
284,
257,
4600,
40406,
63,
286,
262,
285,
11215,
66,
198,
220,
220,
220,
6072,
20053,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
6366,
457,
35694,
7,
40406,
3712,
9655,
9655,
40786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2325,
83,
62,
11925,
796,
4129,
7,
40406,
13,
929,
28664,
62,
37652,
8,
198,
220,
220,
220,
220,
220,
220,
220,
697,
457,
62,
11011,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
62,
11011,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
697,
457,
62,
929,
28664,
796,
685,
15,
329,
1312,
287,
352,
25,
929,
28664,
62,
11925,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
62,
929,
28664,
796,
685,
15,
329,
1312,
287,
352,
25,
929,
28664,
62,
11925,
60,
198,
220,
220,
220,
220,
220,
220,
220,
649,
7,
4134,
457,
62,
11011,
11,
2632,
62,
11011,
11,
697,
457,
62,
929,
28664,
11,
2632,
62,
929,
28664,
11,
2325,
83,
62,
11925,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
4296,
0,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
22973,
10260,
11,
1312,
11,
6292,
3712,
33,
970,
8,
198,
198,
10260,
13427,
30013,
25,
18703,
11507,
4296,
7508,
319,
262,
4600,
72,
63,
400,
198,
37652,
4559,
351,
352,
5150,
290,
6329,
361,
4600,
13635,
276,
63,
318,
2081,
6329,
8524,
635,
352,
6292,
198,
39873,
198,
37811,
198,
8818,
4296,
0,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
22973,
10260,
11,
1312,
11,
6292,
3712,
33,
970,
8,
198,
220,
220,
220,
379,
13,
22930,
62,
929,
28664,
58,
72,
60,
15853,
352,
198,
220,
220,
220,
379,
13,
4134,
457,
62,
929,
28664,
58,
72,
60,
15853,
352,
9,
13635,
276,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
4296,
0,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
3546,
1996,
341,
11,
6292,
3712,
33,
970,
8,
198,
198,
10260,
13427,
30013,
25,
18703,
848,
7094,
7508,
351,
352,
5150,
290,
6329,
361,
198,
63,
13635,
276,
63,
318,
2081,
6329,
8524,
635,
352,
6292,
6291,
198,
37811,
198,
8818,
4296,
0,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
3546,
1996,
341,
11,
6292,
3712,
33,
970,
8,
198,
220,
220,
220,
379,
13,
22930,
62,
11011,
15853,
352,
198,
220,
220,
220,
379,
13,
4134,
457,
62,
11011,
15853,
352,
9,
13635,
276,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
697,
457,
62,
4873,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
22973,
10260,
8,
198,
198,
13615,
1459,
13427,
2494,
329,
11507,
5992,
198,
37811,
198,
4134,
457,
62,
4873,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
22973,
10260,
8,
796,
379,
13,
4134,
457,
62,
929,
28664,
19571,
265,
13,
22930,
62,
929,
28664,
198,
198,
37811,
198,
220,
220,
220,
697,
457,
62,
4873,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
3546,
1996,
341,
8,
198,
198,
13615,
1459,
13427,
2494,
329,
848,
7094,
198,
37811,
198,
4134,
457,
62,
4873,
7,
265,
3712,
17320,
457,
35694,
11,
7904,
3546,
1996,
341,
8,
796,
379,
13,
4134,
457,
62,
11011,
14,
265,
13,
22930,
62,
11011,
198,
198,
37811,
198,
220,
220,
220,
3359,
7,
265,
3712,
17320,
457,
35694,
8,
198,
198,
15307,
262,
13427,
3965,
198,
37811,
198,
8818,
3359,
7,
265,
3712,
17320,
457,
35694,
8,
198,
220,
220,
220,
3601,
7203,
3546,
1996,
341,
13427,
2494,
25,
33172,
697,
457,
62,
4873,
7,
265,
11,
1846,
1996,
341,
3419,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27071,
59,
77,
36301,
4296,
13427,
2494,
25,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
697,
457,
62,
4873,
7,
265,
11,
25139,
10260,
3419,
828,
27071,
59,
77,
4943,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
25139,
18122,
90,
51,
92,
198,
198,
1273,
2850,
1321,
546,
11507,
2106,
198,
37811,
198,
76,
18187,
2878,
25139,
18122,
90,
51,
92,
198,
220,
220,
220,
7377,
116,
62,
7983,
3712,
38469,
90,
51,
92,
220,
1303,
11507,
2106,
198,
220,
220,
220,
3753,
3712,
5317,
2414,
220,
220,
220,
220,
220,
1303,
6376,
286,
262,
749,
2904,
6292,
11507,
15879,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
25139,
18122,
7,
40406,
3712,
9655,
9655,
40786,
8,
628,
220,
220,
220,
20768,
786,
30013,
286,
11507,
2106,
1864,
284,
257,
4600,
40406,
63,
286,
262,
285,
11215,
66,
198,
220,
220,
220,
6072,
20053,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
25139,
18122,
7,
40406,
3712,
9655,
9655,
40786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
399,
11,
299,
796,
9058,
13,
22510,
62,
76,
11215,
66,
62,
20214,
11,
9058,
13,
31975,
62,
929,
198,
220,
220,
220,
220,
220,
220,
220,
2325,
83,
62,
11925,
796,
4129,
7,
40406,
13,
929,
28664,
62,
37652,
8,
628,
220,
220,
220,
220,
220,
220,
220,
7377,
116,
796,
42287,
7,
40406,
13,
47,
135,
253,
8,
198,
220,
220,
220,
220,
220,
220,
220,
309,
796,
2099,
1659,
7,
138,
116,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
116,
62,
7983,
796,
20650,
90,
51,
92,
7,
917,
891,
11,
357,
45,
12,
77,
27493,
929,
28664,
62,
11925,
10,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7377,
116,
62,
7983,
58,
16,
60,
796,
4866,
7,
138,
116,
8,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
51,
92,
7,
138,
116,
62,
7983,
11,
352,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
4296,
0,
7,
746,
3712,
22973,
18122,
11,
7377,
116,
8,
198,
198,
10260,
11507,
2106,
351,
257,
649,
6292,
6291,
7377,
116,
198,
37811,
198,
8818,
4296,
0,
7,
746,
3712,
22973,
18122,
11,
7377,
116,
8,
198,
220,
220,
220,
872,
13,
24588,
15853,
352,
198,
220,
220,
220,
872,
13,
138,
116,
62,
7983,
58,
746,
13,
24588,
60,
796,
4866,
7,
138,
116,
8,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
938,
7,
746,
3712,
22973,
18122,
8,
198,
198,
13615,
257,
4866,
286,
262,
749,
2904,
6292,
5772,
353,
15879,
198,
37811,
198,
12957,
7,
746,
3712,
22973,
18122,
8,
796,
4866,
7,
746,
13,
138,
116,
62,
7983,
58,
746,
13,
24588,
12962,
628,
198,
37811,
198,
220,
220,
220,
7561,
35694,
198,
198,
15597,
82,
2610,
286,
644,
284,
466,
319,
257,
1813,
24415,
198,
37811,
198,
7249,
7561,
35694,
90,
51,
11,
50,
11,
49,
11,
52,
92,
198,
220,
220,
220,
3613,
62,
2676,
3712,
51,
220,
220,
220,
1303,
12793,
262,
3108,
790,
2644,
24415,
198,
220,
220,
220,
15942,
62,
2676,
3712,
50,
220,
220,
1303,
12578,
4371,
3275,
284,
8624,
790,
2644,
24415,
198,
220,
220,
220,
5814,
62,
929,
3712,
49,
220,
220,
220,
220,
220,
1303,
7913,
286,
4831,
286,
262,
6333,
287,
543,
645,
5772,
4296,
318,
925,
198,
220,
220,
220,
1100,
3137,
3712,
52,
198,
220,
220,
220,
5772,
62,
929,
28664,
3712,
33,
970,
220,
220,
220,
1303,
19762,
329,
1771,
284,
4296,
10007,
379,
477,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
7561,
35694,
7,
40406,
3712,
9655,
9655,
40786,
8,
628,
220,
220,
220,
20768,
786,
30013,
286,
644,
284,
466,
319,
257,
1813,
24415,
1864,
284,
257,
4600,
40406,
63,
198,
220,
220,
220,
286,
262,
285,
11215,
66,
6072,
20053,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
7561,
35694,
7,
40406,
3712,
9655,
9655,
40786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
16,
11,
1312,
17,
11,
1312,
18,
796,
9058,
13,
21928,
62,
2676,
11,
9058,
13,
19011,
62,
2676,
11,
9058,
13,
31975,
62,
929,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
19,
796,
9058,
13,
79,
44175,
62,
961,
3137,
62,
17143,
13,
9662,
198,
220,
220,
220,
220,
220,
220,
220,
264,
16,
11,
264,
17,
11,
264,
18,
11,
264,
19,
796,
2099,
1659,
7,
72,
16,
828,
2099,
1659,
7,
72,
17,
828,
2099,
1659,
7,
72,
18,
828,
2099,
1659,
7,
72,
19,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
30493,
357,
82,
16,
1279,
25,
7913,
8,
11405,
357,
82,
17,
1279,
25,
7913,
8,
11405,
357,
82,
18,
1279,
25,
7913,
8,
11405,
357,
82,
19,
1279,
25,
7913,
8,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
82,
16,
11,
82,
17,
11,
82,
18,
11,
82,
19,
92,
7,
72,
16,
11,
1312,
17,
11,
1312,
18,
11,
1312,
19,
11,
9058,
13,
17143,
62,
929,
28664,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
719,
7,
3712,
16928,
15235,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
198,
198,
35,
2357,
3810,
1771,
284,
3613,
3108,
319,
257,
1813,
24415,
11,
41497,
4600,
72,
63,
198,
37811,
198,
8818,
719,
7,
3712,
16928,
15235,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
198,
220,
220,
220,
357,
72,
1875,
379,
13,
31975,
62,
929,
8,
11405,
357,
72,
4064,
379,
13,
21928,
62,
2676,
6624,
657,
8,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
719,
7,
3712,
13414,
65,
577,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
198,
198,
35,
2357,
3810,
1771,
284,
3601,
503,
1321,
284,
257,
8624,
319,
257,
1813,
24415,
11,
198,
9630,
276,
4600,
72,
63,
198,
37811,
198,
529,
7,
3712,
13414,
65,
577,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
796,
357,
72,
4064,
379,
13,
19011,
62,
2676,
6624,
657,
8,
198,
198,
37811,
198,
220,
220,
220,
719,
7,
3712,
22973,
10260,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
198,
198,
35,
2357,
3810,
1771,
284,
4296,
10007,
319,
257,
1813,
24415,
11,
41497,
4600,
72,
63,
198,
37811,
198,
529,
7,
3712,
22973,
10260,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
796,
379,
13,
17143,
62,
929,
28664,
11405,
357,
72,
1875,
379,
13,
31975,
62,
929,
8,
198,
198,
529,
7,
3712,
5569,
3137,
11,
379,
3712,
12502,
35694,
11,
1312,
8,
796,
357,
72,
4064,
379,
13,
961,
3137,
6624,
657,
8,
11405,
357,
72,
1875,
379,
13,
31975,
62,
929,
8,
628,
198,
76,
18187,
2878,
14206,
36,
10671,
90,
51,
92,
1188,
3712,
51,
886,
198,
198,
2617,
0,
7,
87,
3712,
28008,
36,
10671,
90,
51,
5512,
331,
3712,
51,
8,
810,
309,
796,
357,
87,
13,
2100,
796,
331,
8,
198,
198,
9979,
371,
8873,
12360,
6030,
796,
34441,
51,
29291,
90,
7,
25,
9662,
11,
1058,
9888,
11,
1058,
1084,
138,
112,
11,
1058,
9806,
33643,
11,
1058,
2213,
13655,
11,
1058,
28968,
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,
309,
29291,
90,
5317,
2414,
11,
48436,
2414,
11,
48436,
2414,
11,
48436,
2414,
11,
48436,
2414,
11,
2558,
2414,
11709,
198,
198,
37811,
198,
220,
220,
220,
10933,
10223,
90,
31310,
27054,
1326,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
2257,
92,
198,
198,
464,
1388,
9290,
286,
262,
4600,
76,
11215,
66,
63,
2163,
422,
4600,
76,
11215,
66,
13,
20362,
63,
287,
543,
749,
1366,
198,
11766,
7233,
284,
19232,
318,
8574,
198,
37811,
198,
7249,
10933,
10223,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
92,
2,
837,
48,
11,
810,
1195,
796,
1288,
4906,
7,
20274,
8,
198,
220,
220,
220,
370,
48624,
3712,
31294,
877,
90,
50,
92,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11759,
877,
11,
5059,
1099,
198,
220,
220,
220,
21044,
39611,
240,
3712,
38469,
90,
29551,
92,
220,
220,
220,
220,
220,
220,
220,
1303,
10631,
4241,
6961,
13532,
198,
220,
220,
220,
21044,
3712,
38469,
90,
29551,
92,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
21699,
276,
44258,
13532,
198,
220,
220,
220,
13505,
39611,
240,
3712,
38469,
90,
34551,
92,
220,
220,
220,
220,
220,
220,
220,
1303,
32889,
7838,
286,
6961,
198,
220,
220,
220,
13505,
3712,
38469,
90,
34551,
92,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
32889,
7838,
286,
262,
6292,
13532,
198,
220,
220,
220,
350,
39611,
240,
3712,
38469,
90,
49,
92,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1962,
1384,
11628,
11507,
1417,
416,
6961,
5772,
198,
220,
220,
220,
350,
3712,
38469,
90,
49,
92,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1962,
1384,
11628,
11507,
1417,
416,
6292,
5772,
198,
220,
220,
220,
277,
457,
3712,
38469,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
15891,
1321,
546,
717,
10066,
1661,
198,
220,
220,
220,
18074,
223,
3712,
38469,
90,
38469,
90,
43879,
2414,
11709,
220,
220,
220,
220,
220,
1303,
14059,
11507,
286,
262,
3718,
623,
3864,
962,
12,
45,
27045,
1559,
7791,
198,
220,
220,
220,
48765,
1133,
62,
16820,
82,
3712,
38469,
90,
33,
970,
92,
220,
220,
220,
1303,
14151,
319,
1771,
284,
48765,
1133,
367,
11,
39,
26180,
11,
66,
706,
1217,
13,
5772,
2325,
83,
198,
220,
220,
220,
697,
457,
62,
2213,
10735,
3712,
17320,
457,
35694,
220,
220,
220,
220,
1303,
9515,
329,
9646,
13427,
2494,
198,
220,
220,
220,
7377,
116,
62,
7983,
3712,
22973,
18122,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
9515,
329,
9646,
11507,
2106,
198,
220,
220,
220,
2223,
62,
2213,
10735,
3712,
12502,
35694,
220,
220,
1303,
9515,
329,
9646,
4831,
284,
1620,
319,
257,
1813,
24415,
198,
220,
220,
220,
14267,
62,
1640,
62,
21928,
3712,
5317,
2414,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
536,
3191,
11507,
329,
8914,
3108,
198,
220,
220,
220,
13532,
3712,
38469,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20514,
351,
6754,
11,
6292,
13532,
198,
220,
220,
220,
640,
3712,
38469,
90,
43879,
2414,
92,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20514,
351,
640,
16488,
198,
220,
220,
220,
12013,
3712,
33,
198,
220,
220,
220,
698,
312,
87,
3712,
5317,
2414,
198,
220,
220,
220,
2124,
15,
62,
3448,
273,
3712,
7250,
198,
220,
220,
220,
1976,
3712,
28008,
36,
10671,
90,
51,
57,
92,
198,
220,
220,
220,
279,
44175,
62,
961,
3137,
62,
17143,
3712,
49,
8873,
12360,
6030,
198,
220,
220,
220,
1303,
20274,
3712,
38469,
90,
48,
92,
1303,
51,
3727,
46,
1282,
736,
284,
1568,
198,
220,
220,
220,
1303,
20274,
39611,
240,
3712,
38469,
90,
48,
92,
1303,
51,
3727,
46,
1282,
736,
284,
1568,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
10933,
10223,
7,
40406,
3712,
9655,
9655,
40786,
90,
31310,
27054,
1326,
30072,
628,
220,
220,
220,
20768,
786,
44573,
286,
262,
285,
11215,
66,
6072,
20053,
1864,
284,
257,
4600,
40406,
63,
7885,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
10933,
10223,
7,
40406,
3712,
9655,
9655,
40786,
90,
31310,
27054,
1326,
30072,
810,
11086,
27054,
1326,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
655,
284,
787,
1654,
326,
2147,
3011,
32621,
510,
611,
262,
2836,
13267,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
284,
1568,
13096,
4600,
40406,
63,
779,
2769,
22163,
444,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
15,
62,
3448,
273,
11,
370,
48624,
796,
2769,
30073,
7,
40406,
13,
87,
15,
62,
3448,
273,
828,
2769,
30073,
7,
40406,
13,
54,
48624,
8,
198,
220,
220,
220,
220,
220,
220,
220,
21044,
11,
13505,
796,
2769,
30073,
7,
40406,
13,
8051,
828,
2769,
30073,
7,
40406,
13,
17947,
8,
198,
220,
220,
220,
220,
220,
220,
220,
350,
11,
277,
457,
796,
2769,
30073,
7,
40406,
13,
47,
828,
2769,
30073,
7,
40406,
13,
69,
457,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2325,
83,
62,
37652,
796,
2769,
30073,
7,
40406,
13,
929,
28664,
62,
37652,
8,
198,
220,
220,
220,
220,
220,
220,
220,
279,
44175,
62,
961,
3137,
796,
2769,
30073,
7,
40406,
13,
79,
44175,
62,
961,
3137,
62,
17143,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4137,
50,
6442,
15738,
2099,
416,
262,
3599,
966,
11,
787,
1654,
340,
7466,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
15,
62,
5162,
408,
796,
1288,
4906,
7,
417,
4906,
7,
8051,
4008,
7,
40406,
13,
87,
15,
62,
5162,
408,
8,
198,
220,
220,
220,
220,
220,
220,
220,
17306,
11,
15326,
11,
311,
11,
371,
796,
1288,
4906,
7,
17947,
828,
1288,
4906,
7,
8051,
828,
1188,
4906,
7,
54,
48624,
828,
1288,
4906,
7,
47,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3563,
11,
24525,
796,
2099,
1659,
7,
40406,
13,
82,
14375,
828,
2099,
1659,
7,
87,
15,
62,
3448,
273,
8,
628,
220,
220,
220,
220,
220,
220,
220,
285,
796,
4129,
7,
47,
8,
628,
220,
220,
220,
220,
220,
220,
220,
331,
796,
4866,
7,
87,
15,
62,
5162,
408,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
352,
25,
76,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13505,
58,
72,
60,
796,
10290,
13,
39873,
6978,
7,
47,
58,
72,
4083,
926,
11,
6632,
7,
50,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6291,
0,
7,
17947,
58,
72,
4357,
370,
48624,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13505,
58,
72,
4357,
21044,
58,
72,
60,
796,
4137,
50,
6442,
7,
36,
18173,
22784,
331,
11,
13505,
58,
72,
4357,
350,
58,
72,
12962,
220,
220,
220,
1303,
428,
481,
4605,
34721,
284,
7386,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
981,
5145,
9122,
37,
457,
7,
31310,
27054,
1326,
22784,
21044,
58,
72,
4357,
277,
457,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6291,
0,
7,
17947,
58,
72,
4357,
370,
48624,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4137,
50,
6442,
0,
7,
36,
18173,
22784,
21044,
58,
72,
4357,
331,
11,
13505,
58,
72,
4357,
350,
58,
72,
12962,
220,
220,
220,
1303,
428,
481,
4605,
34721,
284,
7386,
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,
331,
796,
21044,
58,
72,
4083,
22556,
58,
437,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
331,
796,
2124,
15,
62,
5162,
408,
198,
220,
220,
220,
220,
220,
220,
220,
32660,
796,
2604,
12315,
7,
87,
15,
62,
3448,
273,
11,
331,
8,
198,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
3108,
62,
6404,
62,
75,
13848,
67,
7,
31310,
27054,
1326,
22784,
21044,
11,
350,
11,
352,
25,
76,
11,
277,
457,
11,
14267,
5837,
51,
28,
7942,
8,
198,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
6804,
82,
2339,
11935,
7,
47,
58,
16,
4357,
331,
8,
628,
220,
220,
220,
220,
220,
220,
220,
21044,
39611,
240,
796,
2769,
30073,
7,
8051,
8,
198,
220,
220,
220,
220,
220,
220,
220,
13505,
39611,
240,
796,
2769,
30073,
7,
17947,
8,
198,
220,
220,
220,
220,
220,
220,
220,
350,
39611,
240,
796,
2769,
30073,
7,
47,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
24061,
262,
2330,
7838,
326,
18616,
2124,
15,
62,
5162,
408,
739,
262,
4238,
34319,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
800,
62,
9688,
62,
457,
7,
88,
11,
2124,
15,
62,
3448,
273,
11,
350,
58,
16,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
309,
57,
796,
2099,
1659,
7,
89,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
14206,
36,
10671,
90,
51,
57,
92,
7,
89,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
51,
3727,
46,
1282,
736,
284,
31312,
4238,
5612,
198,
220,
220,
220,
220,
220,
220,
220,
14267,
796,
9058,
13,
48267,
62,
1640,
62,
21928,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
2435,
796,
2824,
7,
29993,
2024,
13,
2704,
41769,
7,
79,
13,
926,
58,
16,
25,
48267,
25,
437,
12,
16,
60,
329,
279,
287,
350,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
7377,
116,
62,
23569,
796,
25139,
18122,
7,
40406,
8,
628,
220,
220,
220,
220,
220,
220,
220,
12013,
796,
900,
62,
41938,
7,
40406,
13,
41938,
11,
9058,
13,
41938,
62,
37266,
11,
350,
8,
198,
220,
220,
220,
220,
220,
220,
220,
18074,
223,
796,
8335,
62,
11883,
62,
17143,
7,
40406,
13,
33643,
11,
12013,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3359,
7,
41938,
8,
198,
220,
220,
220,
220,
220,
220,
220,
347,
796,
2099,
1659,
7,
41938,
8,
628,
220,
220,
220,
220,
220,
220,
220,
357,
5225,
10223,
796,
649,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
92,
7,
54,
48624,
11,
21044,
39611,
240,
11,
21044,
11,
13505,
39611,
240,
11,
13505,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
350,
39611,
240,
11,
350,
11,
277,
457,
11,
18074,
223,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
361,
62,
260,
5589,
1133,
62,
16820,
82,
7,
40406,
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,
6366,
457,
35694,
7,
40406,
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,
7377,
116,
62,
23569,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7561,
35694,
7,
40406,
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,
14267,
11,
685,
4357,
4808,
2435,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12013,
11,
352,
11,
2124,
15,
62,
3448,
273,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
11,
279,
44175,
62,
961,
3137,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
32660,
796,
32660,
11,
7377,
116,
796,
938,
7,
138,
116,
62,
23569,
4008,
198,
220,
220,
220,
886,
628,
220,
220,
220,
1303,
24550,
428,
23772,
318,
645,
2392,
287,
779,
11,
460,
307,
4615,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
10933,
10223,
7,
18504,
3712,
23044,
10223,
90,
31310,
27054,
1326,
11,
50,
11,
29551,
11,
34551,
11,
49,
5512,
649,
62,
33643,
3712,
43879,
2414,
8,
628,
220,
220,
220,
17393,
23772,
286,
4600,
5225,
10223,
44646,
9175,
82,
2279,
262,
976,
355,
3804,
4600,
18504,
63,
198,
220,
220,
220,
351,
262,
6631,
286,
649,
4088,
11507,
329,
262,
3718,
623,
653,
276,
198,
220,
220,
220,
3864,
962,
12,
45,
27045,
1559,
7791,
11,
543,
318,
3421,
284,
4600,
3605,
62,
33643,
44646,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
10933,
10223,
7,
18504,
3712,
23044,
10223,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
5512,
649,
62,
33643,
3712,
38469,
90,
38469,
90,
43879,
2414,
11709,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
810,
1391,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
92,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
92,
7,
18504,
13,
54,
48624,
11,
266,
82,
13,
8051,
39611,
240,
11,
266,
82,
13,
8051,
11,
266,
82,
13,
17947,
39611,
240,
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,
266,
82,
13,
17947,
11,
266,
82,
13,
47,
39611,
240,
11,
266,
82,
13,
47,
11,
266,
82,
13,
69,
457,
11,
649,
62,
33643,
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,
266,
82,
13,
260,
5589,
1133,
62,
16820,
82,
11,
266,
82,
13,
4134,
457,
62,
2213,
10735,
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,
266,
82,
13,
138,
116,
62,
7983,
11,
266,
82,
13,
2673,
62,
2213,
10735,
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,
266,
82,
13,
48267,
62,
1640,
62,
21928,
11,
266,
82,
13,
6978,
82,
11,
266,
82,
13,
2435,
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,
266,
82,
13,
41938,
11,
266,
82,
13,
2436,
312,
87,
11,
266,
82,
13,
87,
15,
62,
3448,
273,
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,
266,
82,
13,
89,
11,
266,
82,
13,
79,
44175,
62,
961,
3137,
62,
17143,
8,
198,
220,
220,
220,
886,
628,
220,
220,
220,
2163,
10933,
10223,
7,
18504,
3712,
23044,
10223,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
136,
225,
11,
7250,
11,
51,
57,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
350,
3712,
38469,
90,
49,
5512,
350,
39611,
240,
3712,
38469,
90,
49,
5512,
4686,
87,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
810,
1391,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
136,
225,
11,
49,
11,
7250,
11,
51,
57,
92,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
11,
50,
11,
29551,
11,
34551,
11,
49,
11,
7250,
11,
51,
57,
92,
7,
18504,
13,
54,
48624,
11,
266,
82,
13,
8051,
39611,
240,
11,
266,
82,
13,
8051,
11,
266,
82,
13,
17947,
39611,
240,
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,
266,
82,
13,
17947,
11,
350,
39611,
240,
11,
350,
11,
266,
82,
13,
69,
457,
11,
266,
82,
13,
33643,
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,
266,
82,
13,
260,
5589,
1133,
62,
16820,
82,
11,
266,
82,
13,
4134,
457,
62,
2213,
10735,
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,
266,
82,
13,
138,
116,
62,
7983,
11,
266,
82,
13,
2673,
62,
2213,
10735,
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,
266,
82,
13,
48267,
62,
1640,
62,
21928,
11,
266,
82,
13,
6978,
82,
11,
266,
82,
13,
2435,
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,
266,
82,
13,
41938,
11,
4686,
87,
11,
266,
82,
13,
87,
15,
62,
3448,
273,
11,
266,
82,
13,
89,
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,
266,
82,
13,
79,
44175,
62,
961,
3137,
62,
17143,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
417,
4906,
7,
3712,
36674,
15235,
90,
51,
30072,
810,
309,
796,
309,
198,
417,
4906,
7,
3712,
6030,
90,
36674,
15235,
90,
51,
11709,
8,
810,
309,
796,
309,
198,
82,
14375,
62,
4906,
7,
3712,
23044,
10223,
90,
46,
11,
33,
11,
2257,
30072,
810,
1391,
46,
11,
33,
11,
2257,
92,
796,
3563,
628,
198,
19545,
62,
2617,
62,
1659,
62,
27372,
7,
18504,
3712,
23044,
10223,
90,
46,
11,
2949,
3629,
8629,
30072,
810,
440,
796,
266,
82,
198,
198,
37811,
198,
220,
220,
220,
1306,
7,
47728,
242,
227,
3712,
7376,
421,
1068,
3629,
8629,
11,
21044,
11,
7377,
116,
8,
198,
198,
38978,
262,
900,
286,
7021,
326,
389,
852,
6153,
13,
4600,
8051,
63,
318,
262,
749,
2904,
198,
37687,
10137,
357,
13635,
276,
8,
3108,
13,
4600,
138,
116,
63,
460,
307,
973,
284,
1487,
5772,
316,
2442,
341,
13,
198,
37811,
198,
8818,
1306,
62,
2617,
62,
1659,
62,
27372,
7,
18504,
3712,
23044,
10223,
90,
46,
11,
27,
25,
7376,
421,
1068,
3629,
8629,
30072,
810,
440,
198,
220,
220,
220,
21044,
11,
350,
11,
350,
39611,
240,
11,
220,
47728,
242,
227,
796,
266,
82,
13,
8051,
11,
266,
82,
13,
47,
11,
266,
82,
13,
47,
39611,
240,
11,
266,
82,
13,
41938,
198,
220,
220,
220,
4686,
87,
796,
357,
18504,
13,
2436,
312,
87,
4064,
362,
8,
1343,
352,
198,
220,
220,
220,
7377,
116,
796,
42287,
7,
47,
58,
16,
4083,
21745,
8,
628,
220,
220,
220,
3691,
796,
1064,
62,
437,
62,
457,
82,
7,
47728,
242,
227,
11,
21044,
11,
4686,
87,
8,
198,
220,
220,
220,
406,
82,
796,
220,
47728,
242,
227,
13,
43,
82,
58,
312,
87,
60,
198,
220,
220,
220,
7377,
96,
82,
796,
220,
47728,
242,
227,
13,
138,
96,
82,
58,
312,
87,
60,
198,
220,
220,
220,
442,
62,
457,
82,
796,
220,
47728,
242,
227,
13,
3803,
62,
457,
82,
58,
312,
87,
60,
198,
220,
220,
220,
27506,
62,
33152,
796,
220,
47728,
242,
227,
13,
14644,
62,
33152,
58,
312,
87,
60,
628,
220,
220,
220,
350,
62,
3605,
796,
685,
8205,
312,
24331,
37385,
7,
47,
58,
72,
4357,
406,
82,
58,
72,
4357,
3691,
58,
72,
4357,
7377,
96,
82,
58,
72,
4357,
442,
62,
457,
82,
58,
72,
4357,
7377,
116,
11,
27506,
62,
33152,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
357,
72,
11,
62,
8,
287,
27056,
378,
7,
47,
15437,
198,
220,
220,
220,
350,
39611,
240,
62,
3605,
796,
685,
8205,
312,
24331,
37385,
7,
47,
39611,
240,
58,
72,
4357,
406,
82,
58,
72,
4357,
3691,
58,
72,
4357,
7377,
96,
82,
58,
72,
4357,
442,
62,
457,
82,
58,
72,
4357,
7377,
116,
11,
27506,
62,
33152,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
357,
72,
11,
62,
8,
287,
27056,
378,
7,
47,
39611,
240,
15437,
198,
220,
220,
220,
10933,
10223,
7,
18504,
11,
350,
62,
3605,
11,
350,
39611,
240,
62,
3605,
11,
4686,
87,
8,
198,
437,
198,
198,
46012,
533,
62,
11883,
62,
17143,
7,
33643,
3712,
15057,
11,
7904,
2949,
3629,
8629,
8,
796,
16410,
33643,
11907,
198,
198,
8818,
8335,
62,
11883,
62,
17143,
7,
33643,
3712,
15057,
11,
12013,
3712,
7376,
421,
1068,
3629,
8629,
8,
198,
220,
220,
220,
16410,
33643,
329,
4808,
287,
2512,
62,
41068,
60,
329,
2512,
62,
41068,
287,
12013,
13,
4134,
457,
62,
2213,
10735,
13,
4134,
457,
60,
198,
437,
628,
198,
198,
37811,
198,
220,
220,
220,
719,
7,
2673,
11,
266,
82,
3712,
23044,
10223,
11,
1312,
8,
198,
198,
35,
2357,
3810,
1771,
284,
1620,
4600,
2673,
63,
319,
257,
1813,
24415,
11,
41497,
4600,
72,
63,
198,
37811,
198,
529,
7,
2673,
11,
266,
82,
3712,
23044,
10223,
11,
1312,
8,
796,
719,
7,
2673,
11,
266,
82,
13,
2673,
62,
2213,
10735,
11,
1312,
8,
198,
198,
2,
16580,
8584,
198,
529,
7,
2673,
3712,
5569,
3137,
11,
266,
82,
3712,
23044,
10223,
11,
1312,
8,
796,
357,
4906,
1659,
7,
18504,
13,
41938,
8,
1279,
25,
7376,
421,
1068,
3629,
8629,
8,
11405,
719,
7,
2673,
11,
266,
82,
13,
2673,
62,
2213,
10735,
11,
1312,
8,
628,
198,
37811,
198,
220,
220,
220,
3613,
15235,
0,
7,
18504,
11,
266,
82,
8051,
11,
275,
8051,
8,
198,
198,
16928,
262,
2104,
3108,
32557,
477,
17894,
287,
4600,
8051,
44646,
5514,
352,
287,
790,
4600,
18504,
13,
48267,
63,
198,
13033,
318,
7448,
284,
4646,
6143,
2272,
13,
1675,
12,
1350,
12,
82,
9586,
4600,
8051,
63,
318,
900,
284,
4600,
18504,
8051,
63,
393,
198,
63,
65,
8051,
63,
6906,
319,
1771,
12013,
318,
973,
13,
198,
37811,
198,
8818,
3613,
62,
6978,
0,
7,
18504,
8,
198,
220,
220,
220,
14267,
796,
266,
82,
13,
48267,
62,
1640,
62,
21928,
198,
220,
220,
220,
4574,
0,
7,
18504,
13,
6978,
82,
11,
2824,
7,
29993,
2024,
13,
2704,
41769,
7,
18504,
13,
8051,
58,
72,
4083,
22556,
58,
16,
25,
48267,
25,
437,
12,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
352,
25,
13664,
7,
18504,
13,
8051,
35514,
198,
437,
198,
198,
82,
17225,
1868,
7,
87,
11,
257,
28,
16,
13,
15,
8,
796,
352,
13,
15,
1220,
357,
16,
13,
15,
1343,
1033,
32590,
64,
9,
87,
4008,
198,
6404,
270,
7,
87,
11,
257,
28,
16,
13,
15,
8,
796,
357,
6404,
7,
87,
8,
532,
2604,
7,
16,
12,
87,
4008,
14,
64,
198,
198,
8818,
1100,
3137,
62,
79,
44175,
0,
7,
18504,
11,
285,
11215,
66,
62,
2676,
8,
198,
220,
220,
220,
379,
796,
266,
82,
13,
41938,
13,
19509,
62,
4354,
62,
4134,
457,
62,
2213,
10735,
198,
220,
220,
220,
279,
796,
266,
82,
13,
79,
44175,
62,
961,
3137,
62,
17143,
198,
220,
220,
220,
7377,
112,
796,
3509,
7,
79,
13,
1084,
138,
112,
11,
279,
13,
9888,
14,
31166,
17034,
7,
9806,
7,
16,
13,
15,
11,
285,
11215,
66,
62,
2676,
14,
79,
13,
9662,
12,
79,
13,
28968,
22305,
198,
220,
220,
220,
697,
457,
62,
9700,
796,
13427,
7,
265,
8,
198,
220,
220,
220,
329,
357,
72,
11,
257,
62,
72,
8,
287,
27056,
378,
7,
4134,
457,
62,
9700,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
357,
73,
11,
257,
62,
2926,
8,
287,
27056,
378,
7,
64,
62,
72,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
82,
13,
33643,
58,
72,
7131,
73,
60,
796,
949,
7,
82,
17225,
1868,
7,
6404,
270,
7,
18504,
13,
33643,
58,
72,
7131,
73,
12962,
532,
357,
17,
9,
7,
64,
62,
2926,
1875,
279,
13,
2213,
13655,
13219,
16,
27493,
138,
112,
828,
279,
13,
9806,
33643,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
3359,
62,
13635,
590,
62,
4873,
7,
18504,
13,
41938,
11,
2081,
8,
198,
220,
220,
220,
3601,
62,
79,
44175,
7,
18504,
8,
198,
220,
220,
220,
13259,
0,
7,
265,
8,
198,
437,
198,
198,
2,
16580,
4808,
4798,
62,
10951,
5447,
287,
4600,
41938,
62,
15952,
5950,
63,
198,
8818,
3601,
62,
79,
44175,
7,
18504,
8,
198,
220,
220,
220,
3601,
7203,
59,
77,
33643,
11507,
7479,
77,
19351,
438,
59,
77,
4943,
198,
220,
220,
220,
4808,
4798,
62,
10951,
7,
18504,
13,
33643,
58,
16,
12962,
198,
220,
220,
220,
4808,
4798,
62,
10951,
7,
18504,
13,
33643,
58,
17,
12962,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
25139,
4933,
28664,
7469,
77,
198,
198,
1890,
257,
1813,
11,
2060,
11507,
4296,
2239,
15738,
6801,
50207,
11,
1293,
669,
11,
198,
4758,
22715,
389,
6153,
3503,
13,
198,
37811,
198,
7249,
25139,
4933,
28664,
7469,
77,
90,
49,
11,
50,
11,
51,
11,
52,
92,
198,
220,
220,
220,
2325,
83,
62,
4906,
3712,
49,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
2099,
286,
4296,
357,
9171,
25986,
12,
39,
459,
654,
14,
1102,
31761,
378,
3503,
8,
198,
220,
220,
220,
2325,
83,
62,
37652,
3712,
50,
220,
220,
220,
220,
220,
220,
220,
1303,
9022,
22715,
284,
4296,
198,
220,
220,
220,
256,
62,
33885,
3712,
51,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
40658,
9720,
329,
257,
1813,
11507,
4296,
198,
220,
220,
220,
1293,
669,
3712,
52,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
14481,
625,
6153,
10007,
198,
220,
220,
220,
48765,
1133,
62,
16820,
82,
3712,
33,
970,
1303,
10127,
1813,
5772,
2325,
83,
3848,
329,
664,
296,
48074,
367,
11,
39,
26180,
11,
66,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
25139,
4933,
28664,
7469,
77,
7,
929,
28664,
62,
4906,
3712,
49,
11,
2325,
83,
62,
37652,
3712,
50,
11,
256,
62,
33885,
3712,
51,
11,
1293,
669,
3712,
52,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48765,
1133,
62,
16820,
82,
3712,
33,
970,
8,
628,
220,
220,
220,
20768,
5612,
286,
262,
1844,
6770,
286,
262,
11507,
4296,
2239,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
25139,
4933,
28664,
7469,
77,
7,
929,
28664,
62,
4906,
3712,
49,
11,
2325,
83,
62,
37652,
3712,
50,
11,
256,
62,
33885,
3712,
51,
11,
1293,
669,
3712,
52,
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,
48765,
1133,
62,
16820,
82,
3712,
33,
970,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
810,
1391,
49,
27,
25,
22973,
10260,
6030,
11,
50,
11,
51,
11,
52,
92,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
49,
11,
50,
11,
51,
11,
52,
92,
7,
929,
28664,
62,
4906,
11,
2325,
83,
62,
37652,
11,
256,
62,
33885,
11,
1293,
669,
11,
48765,
1133,
62,
16820,
82,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
41071,
7469,
77,
198,
198,
36621,
286,
262,
2104,
41071,
16085,
13,
198,
37811,
198,
7249,
41071,
7469,
77,
90,
45,
92,
198,
220,
220,
220,
5992,
3712,
11251,
29291,
90,
45,
11,
22973,
4933,
28664,
7469,
77,
92,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
41071,
7469,
77,
7,
40406,
8,
628,
220,
220,
220,
20768,
2696,
41071,
16085,
1864,
284,
262,
4600,
40406,
63,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2163,
41071,
7469,
77,
7,
40406,
8,
198,
220,
220,
220,
220,
220,
220,
220,
48765,
1133,
62,
16820,
82,
796,
2198,
62,
361,
62,
260,
5589,
1133,
62,
16820,
82,
7,
40406,
8,
628,
220,
220,
220,
220,
220,
220,
220,
5992,
796,
685,
22973,
4933,
28664,
7469,
77,
7,
315,
11,
334,
66,
11,
256,
74,
11,
778,
11,
686,
8,
329,
357,
315,
11,
334,
66,
11,
256,
74,
11,
778,
11,
686,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
287,
19974,
7,
40406,
13,
929,
28664,
62,
4906,
11,
9058,
13,
929,
28664,
62,
37652,
11,
9058,
13,
83,
62,
33885,
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,
9058,
13,
3448,
669,
11,
48765,
1133,
62,
16820,
82,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
649,
90,
13664,
7,
929,
19581,
38165,
7,
51,
29291,
7,
929,
19581,
4008,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
651,
9630,
7,
70,
3712,
38,
571,
1443,
7469,
77,
11,
1312,
3712,
5317,
8,
198,
198,
13615,
4600,
72,
63,
400,
6770,
286,
11507,
4296,
198,
37811,
198,
1136,
9630,
7,
70,
3712,
38,
571,
1443,
7469,
77,
11,
1312,
3712,
5317,
8,
796,
308,
13,
929,
19581,
58,
72,
60,
198,
198,
37811,
198,
220,
220,
220,
4129,
7,
70,
3712,
38,
571,
1443,
7469,
77,
90,
45,
30072,
198,
198,
13615,
262,
2472,
1271,
286,
11507,
5992,
287,
257,
2060,
41071,
16085,
198,
37811,
198,
13664,
7,
70,
3712,
38,
571,
1443,
7469,
77,
90,
45,
30072,
810,
399,
796,
399,
628,
628,
198,
37811,
198,
220,
220,
220,
2315,
62,
42552,
341,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
9562,
92,
5512,
266,
82,
3712,
23044,
10223,
8,
198,
198,
18465,
284,
466,
618,
645,
16711,
2476,
284,
307,
1760,
198,
37811,
198,
15003,
62,
42552,
341,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
9562,
92,
5512,
266,
82,
3712,
23044,
10223,
8,
796,
2147,
198,
198,
37811,
198,
220,
220,
220,
2315,
62,
42552,
341,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
7942,
92,
5512,
266,
82,
3712,
23044,
10223,
8,
198,
198,
4965,
1096,
5387,
9290,
351,
13532,
287,
4600,
324,
457,
63,
284,
2872,
262,
4129,
286,
848,
7241,
198,
6978,
82,
198,
37811,
198,
8818,
2315,
62,
42552,
341,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
7942,
92,
5512,
266,
82,
3712,
23044,
10223,
8,
198,
220,
220,
220,
285,
796,
4129,
7,
18504,
13,
8051,
8,
198,
220,
220,
220,
47558,
0,
7,
324,
457,
11,
285,
11,
685,
13664,
7,
18504,
13,
8051,
58,
72,
12962,
329,
1312,
287,
352,
25,
76,
12962,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
4296,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
9562,
92,
5512,
266,
82,
3712,
23044,
10223,
90,
31310,
27054,
1326,
5512,
331,
6836,
11,
1312,
11,
32660,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1540,
332,
3712,
3727,
1546,
14375,
6030,
8,
198,
198,
18465,
284,
307,
1760,
329,
645,
16711,
198,
37811,
198,
8818,
4296,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
9562,
92,
5512,
266,
82,
3712,
23044,
10223,
90,
31310,
27054,
1326,
5512,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32660,
8,
810,
11086,
27054,
1326,
198,
220,
220,
220,
512,
457,
11,
32660,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
4296,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
9562,
92,
5512,
266,
82,
3712,
23044,
10223,
90,
31310,
27054,
1326,
5512,
331,
6836,
11,
1312,
11,
32660,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1540,
332,
3712,
3727,
1546,
14375,
6030,
8,
198,
198,
10260,
262,
6961,
1099,
1864,
284,
262,
29605,
7791,
290,
262,
2904,
7448,
198,
23569,
286,
262,
848,
7241,
13532,
198,
37811,
198,
8818,
4296,
0,
7,
324,
457,
3712,
48003,
341,
90,
7762,
90,
7942,
92,
5512,
266,
82,
3712,
23044,
10223,
90,
31310,
27054,
1326,
11,
33,
11,
2257,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
11,
32660,
8,
810,
1391,
31310,
27054,
1326,
11,
33,
11,
2257,
92,
198,
220,
220,
220,
611,
1312,
4064,
512,
457,
13,
48267,
6624,
657,
198,
220,
220,
220,
220,
220,
220,
220,
611,
512,
457,
13,
45,
58,
17,
60,
6624,
512,
457,
13,
82,
4340,
58,
324,
457,
13,
45,
58,
16,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
62,
5657,
796,
1612,
62,
9535,
752,
652,
7,
324,
457,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
796,
4129,
7,
18504,
13,
47,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
474,
287,
352,
25,
76,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34352,
796,
2274,
260,
7,
18504,
13,
47,
58,
73,
4083,
47,
83,
11,
266,
82,
13,
8051,
58,
73,
4083,
926,
11,
1395,
62,
5657,
58,
73,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
39377,
0,
7,
47,
83,
11,
512,
457,
13,
39377,
82,
58,
324,
457,
13,
45,
58,
16,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
82,
13,
47,
58,
73,
60,
796,
37026,
24331,
37385,
7,
18504,
13,
47,
58,
73,
4357,
34352,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34352,
39611,
240,
796,
2274,
260,
7,
18504,
13,
47,
39611,
240,
58,
73,
4083,
47,
83,
11,
266,
82,
13,
8051,
58,
73,
4083,
926,
11,
1395,
62,
5657,
58,
73,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
39377,
0,
7,
47,
83,
39611,
240,
11,
512,
457,
13,
39377,
82,
58,
324,
457,
13,
45,
58,
16,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
82,
13,
47,
39611,
240,
58,
73,
60,
796,
37026,
24331,
37385,
7,
18504,
13,
47,
39611,
240,
58,
73,
4357,
34352,
39611,
240,
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,
8494,
62,
1891,
62,
8344,
0,
7,
2949,
3629,
8629,
22784,
266,
82,
11,
266,
82,
13,
47,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
82,
6442,
7282,
6690,
0,
7,
2949,
3629,
8629,
22784,
266,
82,
13,
47,
39611,
240,
11,
3563,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
266,
82,
13,
8051,
58,
16,
4083,
22556,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
796,
800,
62,
9688,
62,
457,
7,
88,
11,
266,
82,
13,
87,
15,
62,
3448,
273,
11,
266,
82,
13,
47,
58,
16,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
900,
0,
7,
18504,
13,
89,
11,
1976,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
474,
287,
352,
25,
76,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
800,
62,
82,
6442,
0,
7,
36,
18173,
22784,
266,
82,
13,
8051,
58,
73,
4357,
266,
82,
13,
17947,
58,
73,
4357,
266,
82,
13,
47,
58,
73,
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,
32660,
796,
2604,
12315,
7,
18504,
13,
87,
15,
62,
3448,
273,
11,
331,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
3108,
62,
6404,
62,
75,
13848,
67,
7,
31310,
27054,
1326,
22784,
266,
82,
13,
8051,
11,
266,
82,
13,
47,
11,
352,
25,
76,
11,
266,
82,
13,
69,
457,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32660,
15853,
6804,
82,
2339,
11935,
7,
18504,
13,
47,
58,
16,
4357,
331,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
512,
457,
13,
45,
58,
17,
60,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
512,
457,
13,
45,
58,
16,
60,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
512,
457,
13,
45,
58,
17,
60,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
512,
457,
11,
32660,
198,
437,
198
] | 2.092121 | 9,227 |
export TestCase, runtestcase
"""
TestCase(args[, kwargs[, tolerance]])
TestCase(args...; kwargs...[, _tolerance])
Construct a test case.
The `args` and `kwargs` are passed to the function that will be tested.
The `tolerance` is the allowable difference between the result of the testcase
and the desired result (_e.g._ the result of the instructor function).
Note that the `tolerance` is only used when the result of the test case is
something that has a natural real valued difference between two instances; for
example the difference between two real vectors is the infinity (max) norm.
See the `compare` function for more details.
# Examples
```julia-repl
julia> TestCase([1, 2, 3])
TestCase(Any[1, 2, 3], Dict{Symbol,Any}(), 1.0e-5)
julia> TestCase([1, 2, 3], Dict(:foo => "bar"))
TestCase(Any[1, 2, 3], Dict{Symbol,Any}(:foo=>"bar"), 1.0e-5)
julia> TestCase(1, 2, 3; foo="bar", _tolerance=1e-9)
TestCase(Any[1, 2, 3], Dict{Symbol,Any}(:foo=>"bar"), 1.0e-9)
```
"""
struct TestCase
args::Array{Any}
kwargs::Dict{Symbol, Any}
# Maximum numeric error tolerance.
# This is calculated according to calculate_error.
tolerance::Float64
# This needs to be an inner constructor to account for when the varargs
# constructor is used with three arguments.
TestCase(args::Array, kwargs::Dict=Dict(), tolerance::Float64=DEFAULT_TOLERANCE) = new(
convert(Array{Any}, args),
convert(Dict{Symbol, Any}, kwargs),
tolerance,
)
end
TestCase(args...; tolerance=DEFAULT_TOLERANCE, kwargs...) = TestCase(
Array{Any}([args...]),
convert(Dict{Symbol, Any}, kwargs),
tolerance,
)
struct TestCaseResult
result::Union{Any, Nothing}
# Note: exception is a string to avoid breaking (de)serialize if the
# exeption happens to reference context-specific data (eg. something in the
# _Submission module which wouldn't be present in the parent process)
exception::Union{String, Nothing}
backtrace::Union{String, Nothing}
time::Float64
stdout::String
stderr::String
end
"""
runtestcase(f::Function, testcase::TestCase)::TestCaseResult
Run the given test case on the specified function.
"""
function runtestcase(f::Function, testcase::TestCase)::TestCaseResult
@debug("Running testcase for function $(repr(f)).")
result, exception, backtrace = nothing, nothing, nothing
start_ns = Base.time_ns()
sub_stdout, sub_stderr = @capture_stdstreams begin
try
result = Base.invokelatest(f, testcase.args...; testcase.kwargs...)
catch e
exception = repr(e)
backtrace = sprint(showerror, e)
end
end
end_ns = Base.time_ns()
# Get the elapsed time in seconds (1e-9 converts from nanoseconds)
elapsedtime = (end_ns - start_ns) * 1e-9
@debug "Finished running testcase." result exception elapsedtime
return TestCaseResult(
result, exception, backtrace,
elapsedtime, sub_stdout, sub_stderr,
)
end
| [
39344,
6208,
20448,
11,
1057,
9288,
7442,
198,
198,
37811,
198,
220,
220,
220,
6208,
20448,
7,
22046,
58,
11,
479,
86,
22046,
58,
11,
15621,
11907,
8,
198,
220,
220,
220,
6208,
20448,
7,
22046,
986,
26,
479,
86,
22046,
986,
58,
11,
4808,
83,
37668,
12962,
198,
198,
42316,
257,
1332,
1339,
13,
198,
198,
464,
4600,
22046,
63,
290,
4600,
46265,
22046,
63,
389,
3804,
284,
262,
2163,
326,
481,
307,
6789,
13,
198,
464,
4600,
83,
37668,
63,
318,
262,
49299,
3580,
1022,
262,
1255,
286,
262,
1332,
7442,
198,
392,
262,
10348,
1255,
44104,
68,
13,
70,
13557,
262,
1255,
286,
262,
21187,
2163,
737,
198,
198,
6425,
326,
262,
4600,
83,
37668,
63,
318,
691,
973,
618,
262,
1255,
286,
262,
1332,
1339,
318,
198,
18927,
326,
468,
257,
3288,
1103,
17560,
3580,
1022,
734,
10245,
26,
329,
198,
20688,
262,
3580,
1022,
734,
1103,
30104,
318,
262,
37174,
357,
9806,
8,
2593,
13,
198,
6214,
262,
4600,
5589,
533,
63,
2163,
329,
517,
3307,
13,
198,
198,
2,
21066,
198,
15506,
63,
73,
43640,
12,
35666,
198,
73,
43640,
29,
6208,
20448,
26933,
16,
11,
362,
11,
513,
12962,
198,
14402,
20448,
7,
7149,
58,
16,
11,
362,
11,
513,
4357,
360,
713,
90,
13940,
23650,
11,
7149,
92,
22784,
352,
13,
15,
68,
12,
20,
8,
198,
198,
73,
43640,
29,
6208,
20448,
26933,
16,
11,
362,
11,
513,
4357,
360,
713,
7,
25,
21943,
5218,
366,
5657,
48774,
198,
14402,
20448,
7,
7149,
58,
16,
11,
362,
11,
513,
4357,
360,
713,
90,
13940,
23650,
11,
7149,
92,
7,
25,
21943,
14804,
1,
5657,
12340,
352,
13,
15,
68,
12,
20,
8,
198,
198,
73,
43640,
29,
6208,
20448,
7,
16,
11,
362,
11,
513,
26,
22944,
2625,
5657,
1600,
4808,
83,
37668,
28,
16,
68,
12,
24,
8,
198,
14402,
20448,
7,
7149,
58,
16,
11,
362,
11,
513,
4357,
360,
713,
90,
13940,
23650,
11,
7149,
92,
7,
25,
21943,
14804,
1,
5657,
12340,
352,
13,
15,
68,
12,
24,
8,
198,
15506,
63,
198,
37811,
198,
7249,
6208,
20448,
198,
220,
220,
220,
26498,
3712,
19182,
90,
7149,
92,
198,
220,
220,
220,
479,
86,
22046,
3712,
35,
713,
90,
13940,
23650,
11,
4377,
92,
628,
220,
220,
220,
1303,
22246,
35575,
4049,
15621,
13,
198,
220,
220,
220,
1303,
770,
318,
10488,
1864,
284,
15284,
62,
18224,
13,
198,
220,
220,
220,
15621,
3712,
43879,
2414,
628,
220,
220,
220,
1303,
770,
2476,
284,
307,
281,
8434,
23772,
284,
1848,
329,
618,
262,
1401,
22046,
198,
220,
220,
220,
1303,
23772,
318,
973,
351,
1115,
7159,
13,
198,
220,
220,
220,
6208,
20448,
7,
22046,
3712,
19182,
11,
479,
86,
22046,
3712,
35,
713,
28,
35,
713,
22784,
15621,
3712,
43879,
2414,
28,
7206,
38865,
62,
51,
3535,
1137,
19240,
8,
796,
649,
7,
198,
220,
220,
220,
220,
220,
220,
220,
10385,
7,
19182,
90,
7149,
5512,
26498,
828,
198,
220,
220,
220,
220,
220,
220,
220,
10385,
7,
35,
713,
90,
13940,
23650,
11,
4377,
5512,
479,
86,
22046,
828,
198,
220,
220,
220,
220,
220,
220,
220,
15621,
11,
198,
220,
220,
220,
1267,
198,
437,
198,
198,
14402,
20448,
7,
22046,
986,
26,
15621,
28,
7206,
38865,
62,
51,
3535,
1137,
19240,
11,
479,
86,
22046,
23029,
796,
6208,
20448,
7,
198,
220,
220,
220,
15690,
90,
7149,
92,
26933,
22046,
22345,
828,
198,
220,
220,
220,
10385,
7,
35,
713,
90,
13940,
23650,
11,
4377,
5512,
479,
86,
22046,
828,
198,
220,
220,
220,
15621,
11,
198,
8,
198,
198,
7249,
6208,
20448,
23004,
198,
220,
220,
220,
1255,
3712,
38176,
90,
7149,
11,
10528,
92,
198,
220,
220,
220,
1303,
5740,
25,
6631,
318,
257,
4731,
284,
3368,
7163,
357,
2934,
8,
46911,
1096,
611,
262,
198,
220,
220,
220,
1303,
409,
68,
1159,
4325,
284,
4941,
4732,
12,
11423,
1366,
357,
1533,
13,
1223,
287,
262,
198,
220,
220,
220,
1303,
4808,
7004,
3411,
8265,
543,
3636,
470,
307,
1944,
287,
262,
2560,
1429,
8,
198,
220,
220,
220,
6631,
3712,
38176,
90,
10100,
11,
10528,
92,
198,
220,
220,
220,
736,
40546,
3712,
38176,
90,
10100,
11,
10528,
92,
198,
220,
220,
220,
640,
3712,
43879,
2414,
198,
220,
220,
220,
14367,
448,
3712,
10100,
198,
220,
220,
220,
336,
1082,
81,
3712,
10100,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
1057,
9288,
7442,
7,
69,
3712,
22203,
11,
1332,
7442,
3712,
14402,
20448,
2599,
25,
14402,
20448,
23004,
198,
198,
10987,
262,
1813,
1332,
1339,
319,
262,
7368,
2163,
13,
198,
37811,
198,
8818,
1057,
9288,
7442,
7,
69,
3712,
22203,
11,
1332,
7442,
3712,
14402,
20448,
2599,
25,
14402,
20448,
23004,
198,
220,
220,
220,
2488,
24442,
7203,
28768,
1332,
7442,
329,
2163,
29568,
260,
1050,
7,
69,
4008,
19570,
198,
220,
220,
220,
1255,
11,
6631,
11,
736,
40546,
796,
2147,
11,
2147,
11,
2147,
628,
220,
220,
220,
923,
62,
5907,
796,
7308,
13,
2435,
62,
5907,
3419,
198,
220,
220,
220,
850,
62,
19282,
448,
11,
850,
62,
301,
1082,
81,
796,
2488,
27144,
495,
62,
19282,
5532,
82,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
7308,
13,
37669,
42861,
7,
69,
11,
1332,
7442,
13,
22046,
986,
26,
1332,
7442,
13,
46265,
22046,
23029,
198,
220,
220,
220,
220,
220,
220,
220,
4929,
304,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6631,
796,
41575,
7,
68,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
736,
40546,
796,
18553,
7,
1477,
789,
1472,
11,
304,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
886,
62,
5907,
796,
7308,
13,
2435,
62,
5907,
3419,
628,
220,
220,
220,
1303,
3497,
262,
42118,
640,
287,
4201,
357,
16,
68,
12,
24,
26161,
422,
15709,
577,
17561,
82,
8,
198,
220,
220,
220,
42118,
2435,
796,
357,
437,
62,
5907,
532,
923,
62,
5907,
8,
1635,
352,
68,
12,
24,
198,
220,
220,
220,
2488,
24442,
366,
18467,
1348,
2491,
1332,
7442,
526,
1255,
6631,
42118,
2435,
628,
220,
220,
220,
1441,
6208,
20448,
23004,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
11,
6631,
11,
736,
40546,
11,
198,
220,
220,
220,
220,
220,
220,
220,
42118,
2435,
11,
850,
62,
19282,
448,
11,
850,
62,
301,
1082,
81,
11,
198,
220,
220,
220,
1267,
198,
437,
198
] | 2.748629 | 1,094 |
"""
MatAcoustFluidModule
Module for acoustic-fluid material.
"""
module MatAcoustFluidModule
using FinEtools.FTypesModule: FInt, FFlt, FCplxFlt, FFltVec, FIntVec, FFltMat, FIntMat, FMat, FVec, FDataDict
import FinEtools.MatModule: AbstractMat
"""
MatAcoustFluid <: AbstractMat
Type for acoustic fluid material.
"""
struct MatAcoustFluid <: AbstractMat
bulk_modulus::FFlt;# Bulk modulus
mass_density::FFlt;# Mass density
end
"""
bulkmodulus(self::MatAcoustFluid)
Return the bulk modulus.
"""
function bulkmodulus(self::MatAcoustFluid)
return self.bulk_modulus
end
end
| [
37811,
198,
220,
220,
220,
6550,
12832,
23968,
37,
2290,
312,
26796,
198,
198,
26796,
329,
26071,
12,
35522,
312,
220,
2587,
13,
198,
37811,
198,
21412,
6550,
12832,
23968,
37,
2290,
312,
26796,
198,
198,
3500,
4463,
36,
31391,
13,
9792,
9497,
26796,
25,
376,
5317,
11,
18402,
2528,
11,
10029,
489,
87,
37,
2528,
11,
18402,
2528,
53,
721,
11,
376,
5317,
53,
721,
11,
18402,
2528,
19044,
11,
376,
5317,
19044,
11,
18695,
265,
11,
376,
53,
721,
11,
376,
6601,
35,
713,
198,
11748,
4463,
36,
31391,
13,
19044,
26796,
25,
27741,
19044,
198,
198,
37811,
198,
220,
220,
220,
6550,
12832,
23968,
37,
2290,
312,
1279,
25,
27741,
19044,
198,
198,
6030,
329,
26071,
11711,
2587,
13,
198,
37811,
198,
7249,
6550,
12832,
23968,
37,
2290,
312,
1279,
25,
27741,
19044,
198,
197,
65,
12171,
62,
4666,
23515,
3712,
5777,
2528,
26,
2,
47900,
953,
23515,
198,
197,
22208,
62,
43337,
3712,
5777,
2528,
26,
2,
5674,
12109,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
11963,
4666,
23515,
7,
944,
3712,
19044,
12832,
23968,
37,
2290,
312,
8,
198,
198,
13615,
262,
11963,
953,
23515,
13,
198,
37811,
198,
8818,
11963,
4666,
23515,
7,
944,
3712,
19044,
12832,
23968,
37,
2290,
312,
8,
198,
197,
7783,
2116,
13,
65,
12171,
62,
4666,
23515,
198,
437,
198,
198,
437,
198
] | 2.610619 | 226 |
using ADCME
using PyCall
using LinearAlgebra
using PyPlot
using Random
using Test
# Random.seed!(233)
import ADCME: SparseAssembler
sparse_accumulator = load_op_and_grad("./build/libSparseAccumulator","sparse_accumulator", multiple=false)
sparse_accumulator_add = load_op_and_grad("./build/libSparseAccumulator","sparse_accumulator_add", multiple=false)
sparse_accumulator_copy = load_op_and_grad("./build/libSparseAccumulator","sparse_accumulator_copy", multiple=true)
"""
SparseAssembler(handle::Union{PyObject, <:Integer}, n::Union{PyObject, <:Integer}, tol::Union{PyObject, <:Real}=0.0)
Creates a SparseAssembler for accumulating `row`, `col`, `val` for sparse matrices.
- `handle`: an integer handle for creating a sparse matrix. If the handle already exists, `SparseAssembler` return the existing sparse matrix handle. If you are creating different sparse matrices, the handles should be different.
- `n`: Number of rows of the sparse matrix.
- `tol` (optional): Tolerance. `SparseAssembler` will treats any values less than `tol` as zero.
# Example
```julia
handle = SparseAssembler(100, 5, 1e-8)
op1 = accumulate(handle, 1, [1;2;3], [1.0;2.0;3.0])
op2 = accumulate(handle, 2, [1;2;3], [1.0;2.0;3.0])
J = assemble(5, 5, [op1;op2])
```
`J` will be a [`SparseTensor`](@ref) object.
"""
function SparseAssembler(handle::Union{PyObject, <:Integer}, n::Union{PyObject, <:Integer}, tol::Union{PyObject, <:Real}=0.0)
n = convert_to_tensor(n, dtype=Int32)
tol = convert_to_tensor(tol, dtype=Float64)
handle = convert_to_tensor(handle, dtype=Int32)
sparse_accumulator(tol, n, handle)
end
"""
accumulate(handle::PyObject, row::Union{PyObject, <:Integer}, cols::Union{PyObject, Array{<:Integer}}, vals::Union{PyObject, Array{<:Real}})
Accumulates `row`-th row. It adds the value to the sparse matrix
```julia
for k = 1:length(cols)
A[row, cols[k]] += vals[k]
end
```
`handle` is the handle created by [`SparseAssembler`](@ref).
See [`SparseAssembler`](@ref) for an example.
!!! Note
`accumulate` returns a `op::PyObject`. Only when `op` is executed, the nonzero values are populated into the sparse matrix.
"""
function accumulate(handle::PyObject, row::Union{PyObject, <:Integer}, cols::Union{PyObject, Array{<:Integer}},
vals::Union{PyObject, Array{<:Real}})
row = convert_to_tensor(row, dtype=Int32)
cols = convert_to_tensor(cols, dtype=Int32)
vals = convert_to_tensor(vals, dtype=Float64)
return sparse_accumulator_add(acc, row, cols, vals)
end
"""
assemble(m::Union{PyObject, <:Integer}, n::Union{PyObject, <:Integer}, ops::PyObject)
Assembles the sparse matrix from the `ops` created by [`accumulate`](@ref). `ops` is either a single output from `accumulate`, or concated from several `ops`
```julia
op1 = accumulate(handle, 1, [1;2;3], [1.0;2.0;3.0])
op2 = accumulate(handle, 2, [1;2;3], [1.0;2.0;3.0])
op = [op1;op2] # equivalent to `vcat([op1, op2]...)`
```
`m` and `n` are rows and columns of the sparse matrix.
See [`SparseAssembler`](@ref) for an example.
"""
function assemble(m::Union{PyObject, <:Integer}, n::Union{PyObject, <:Integer}, ops::PyObject)
if length(size(ops))==0
ops = reshape(ops, 1)
end
ii, jj, vv = sparse_accumulator_copy(ops)
return SparseTensor(ii, jj, vv, m, n)
end
handle = SparseAssembler(100, 5, 1e-8)
op1 = accumulate(handle, 1, [1;2;3], [1.0;2.0;3.0])
op2 = accumulate(handle, 2, [1;2;3], [1.0;2.0;3.0])
J = assemble(5, 5, [op1;op2])
# J = assemble(acc, 5, 5)
sess = Session(); init(sess)
run(sess, J)
m = 20
n = 100
handle = SparseAssembler(100, m, 0.0)
op = PyObject[]
A = zeros(m, n)
for i = 1:1
ncol = rand(1:n, 10)
row = rand(1:m)
v = rand(10)
for (k,val) in enumerate(v)
@show k
A[row, ncol[k]] += val
end
@show v
push!(op, accumulate(handle, row, ncol, v))
end
op = vcat(op...)
J = assemble(m, n, op)
B = run(sess, J)
@test norm(A-B)<1e-8
handle = SparseAssembler(100, 5, 1.0)
op1 = accumulate(handle, 1, [1;2;3], [2.0;0.5;0.5])
J = assemble(5, 5, op1)
B = run(sess, J)
@test norm(B-[2.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0])<1e-8
handle = SparseAssembler(100, 5, 0.0)
op1 = accumulate(handle, 1, [1;1], [1.0;1.0])
op2 = accumulate(handle, 1, [1;2], [1.0;1.0])
J = assemble(5, 5, [op1;op2])
B = run(sess, J)
@test norm(B-[3.0 1.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0])<1e-8
| [
3500,
49169,
11682,
198,
3500,
9485,
14134,
198,
3500,
44800,
2348,
29230,
198,
3500,
9485,
43328,
198,
3500,
14534,
198,
3500,
6208,
198,
198,
2,
14534,
13,
28826,
0,
7,
25429,
8,
198,
11748,
49169,
11682,
25,
1338,
17208,
1722,
4428,
1754,
198,
198,
82,
29572,
62,
4134,
388,
8927,
796,
3440,
62,
404,
62,
392,
62,
9744,
7,
1911,
14,
11249,
14,
8019,
50,
29572,
17320,
388,
8927,
2430,
82,
29572,
62,
4134,
388,
8927,
1600,
3294,
28,
9562,
8,
198,
82,
29572,
62,
4134,
388,
8927,
62,
2860,
796,
3440,
62,
404,
62,
392,
62,
9744,
7,
1911,
14,
11249,
14,
8019,
50,
29572,
17320,
388,
8927,
2430,
82,
29572,
62,
4134,
388,
8927,
62,
2860,
1600,
3294,
28,
9562,
8,
198,
82,
29572,
62,
4134,
388,
8927,
62,
30073,
796,
3440,
62,
404,
62,
392,
62,
9744,
7,
1911,
14,
11249,
14,
8019,
50,
29572,
17320,
388,
8927,
2430,
82,
29572,
62,
4134,
388,
8927,
62,
30073,
1600,
3294,
28,
7942,
8,
628,
198,
37811,
198,
220,
220,
220,
1338,
17208,
1722,
4428,
1754,
7,
28144,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
299,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
284,
75,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
15633,
92,
28,
15,
13,
15,
8,
198,
198,
16719,
274,
257,
1338,
17208,
1722,
4428,
1754,
329,
44657,
4600,
808,
47671,
4600,
4033,
47671,
4600,
2100,
63,
329,
29877,
2603,
45977,
13,
220,
198,
12,
4600,
28144,
63,
25,
281,
18253,
5412,
329,
4441,
257,
29877,
17593,
13,
1002,
262,
5412,
1541,
7160,
11,
4600,
50,
29572,
1722,
4428,
1754,
63,
1441,
262,
4683,
29877,
17593,
5412,
13,
1002,
345,
389,
4441,
1180,
29877,
2603,
45977,
11,
262,
17105,
815,
307,
1180,
13,
220,
198,
12,
4600,
77,
63,
25,
7913,
286,
15274,
286,
262,
29877,
17593,
13,
220,
198,
12,
4600,
83,
349,
63,
357,
25968,
2599,
309,
37668,
13,
4600,
50,
29572,
1722,
4428,
1754,
63,
481,
18432,
597,
3815,
1342,
621,
4600,
83,
349,
63,
355,
6632,
13,
220,
198,
198,
2,
17934,
198,
15506,
63,
73,
43640,
198,
28144,
796,
1338,
17208,
1722,
4428,
1754,
7,
3064,
11,
642,
11,
352,
68,
12,
23,
8,
198,
404,
16,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
404,
17,
796,
29915,
7,
28144,
11,
362,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
41,
796,
25432,
7,
20,
11,
642,
11,
685,
404,
16,
26,
404,
17,
12962,
198,
15506,
63,
198,
63,
41,
63,
481,
307,
257,
685,
63,
50,
29572,
51,
22854,
63,
16151,
31,
5420,
8,
2134,
13,
220,
198,
37811,
198,
8818,
1338,
17208,
1722,
4428,
1754,
7,
28144,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
299,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
284,
75,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
15633,
92,
28,
15,
13,
15,
8,
198,
220,
220,
220,
299,
796,
10385,
62,
1462,
62,
83,
22854,
7,
77,
11,
288,
4906,
28,
5317,
2624,
8,
198,
220,
220,
220,
284,
75,
796,
10385,
62,
1462,
62,
83,
22854,
7,
83,
349,
11,
288,
4906,
28,
43879,
2414,
8,
198,
220,
220,
220,
5412,
796,
10385,
62,
1462,
62,
83,
22854,
7,
28144,
11,
288,
4906,
28,
5317,
2624,
8,
198,
220,
220,
220,
29877,
62,
4134,
388,
8927,
7,
83,
349,
11,
299,
11,
5412,
8,
198,
437,
628,
198,
37811,
198,
220,
220,
220,
29915,
7,
28144,
3712,
20519,
10267,
11,
5752,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
951,
82,
3712,
38176,
90,
20519,
10267,
11,
15690,
90,
27,
25,
46541,
92,
5512,
410,
874,
3712,
38176,
90,
20519,
10267,
11,
15690,
90,
27,
25,
15633,
11709,
8,
198,
198,
17320,
388,
15968,
4600,
808,
63,
12,
400,
5752,
13,
632,
6673,
262,
1988,
284,
262,
29877,
17593,
198,
15506,
63,
73,
43640,
198,
1640,
479,
796,
352,
25,
13664,
7,
4033,
82,
8,
198,
220,
220,
220,
317,
58,
808,
11,
951,
82,
58,
74,
11907,
15853,
410,
874,
58,
74,
60,
198,
437,
198,
15506,
63,
198,
63,
28144,
63,
318,
262,
5412,
2727,
416,
685,
63,
50,
29572,
1722,
4428,
1754,
63,
16151,
31,
5420,
737,
220,
198,
198,
6214,
685,
63,
50,
29572,
1722,
4428,
1754,
63,
16151,
31,
5420,
8,
329,
281,
1672,
13,
198,
198,
10185,
5740,
198,
220,
220,
220,
4600,
4134,
388,
5039,
63,
5860,
257,
4600,
404,
3712,
20519,
10267,
44646,
5514,
618,
4600,
404,
63,
318,
10945,
11,
262,
1729,
22570,
3815,
389,
22331,
656,
262,
29877,
17593,
13,
220,
198,
37811,
198,
8818,
29915,
7,
28144,
3712,
20519,
10267,
11,
5752,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
951,
82,
3712,
38176,
90,
20519,
10267,
11,
15690,
90,
27,
25,
46541,
92,
5512,
220,
198,
220,
220,
220,
410,
874,
3712,
38176,
90,
20519,
10267,
11,
15690,
90,
27,
25,
15633,
11709,
8,
198,
220,
220,
220,
5752,
796,
10385,
62,
1462,
62,
83,
22854,
7,
808,
11,
288,
4906,
28,
5317,
2624,
8,
198,
220,
220,
220,
951,
82,
796,
10385,
62,
1462,
62,
83,
22854,
7,
4033,
82,
11,
288,
4906,
28,
5317,
2624,
8,
198,
220,
220,
220,
410,
874,
796,
10385,
62,
1462,
62,
83,
22854,
7,
12786,
11,
288,
4906,
28,
43879,
2414,
8,
198,
220,
220,
220,
1441,
29877,
62,
4134,
388,
8927,
62,
2860,
7,
4134,
11,
5752,
11,
951,
82,
11,
410,
874,
8,
198,
437,
198,
198,
37811,
198,
220,
220,
220,
25432,
7,
76,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
299,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
39628,
3712,
20519,
10267,
8,
198,
198,
1722,
4428,
829,
262,
29877,
17593,
422,
262,
4600,
2840,
63,
2727,
416,
685,
63,
4134,
388,
5039,
63,
16151,
31,
5420,
737,
4600,
2840,
63,
318,
2035,
257,
2060,
5072,
422,
4600,
4134,
388,
5039,
47671,
393,
1673,
515,
422,
1811,
4600,
2840,
63,
198,
15506,
63,
73,
43640,
198,
404,
16,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
404,
17,
796,
29915,
7,
28144,
11,
362,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
404,
796,
685,
404,
16,
26,
404,
17,
60,
1303,
7548,
284,
4600,
85,
9246,
26933,
404,
16,
11,
1034,
17,
60,
23029,
63,
198,
15506,
63,
198,
63,
76,
63,
290,
4600,
77,
63,
389,
15274,
290,
15180,
286,
262,
29877,
17593,
13,
220,
198,
198,
6214,
685,
63,
50,
29572,
1722,
4428,
1754,
63,
16151,
31,
5420,
8,
329,
281,
1672,
13,
198,
37811,
198,
8818,
25432,
7,
76,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
299,
3712,
38176,
90,
20519,
10267,
11,
1279,
25,
46541,
5512,
39628,
3712,
20519,
10267,
8,
198,
220,
220,
220,
611,
4129,
7,
7857,
7,
2840,
4008,
855,
15,
198,
220,
220,
220,
220,
220,
220,
220,
39628,
796,
27179,
1758,
7,
2840,
11,
352,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
21065,
11,
474,
73,
11,
410,
85,
796,
29877,
62,
4134,
388,
8927,
62,
30073,
7,
2840,
8,
198,
220,
220,
220,
1441,
1338,
17208,
51,
22854,
7,
4178,
11,
474,
73,
11,
410,
85,
11,
285,
11,
299,
8,
198,
437,
628,
198,
28144,
796,
1338,
17208,
1722,
4428,
1754,
7,
3064,
11,
642,
11,
352,
68,
12,
23,
8,
198,
404,
16,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
404,
17,
796,
29915,
7,
28144,
11,
362,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
16,
13,
15,
26,
17,
13,
15,
26,
18,
13,
15,
12962,
198,
41,
796,
25432,
7,
20,
11,
642,
11,
685,
404,
16,
26,
404,
17,
12962,
198,
2,
449,
796,
25432,
7,
4134,
11,
642,
11,
642,
8,
198,
82,
408,
796,
23575,
9783,
2315,
7,
82,
408,
8,
198,
5143,
7,
82,
408,
11,
449,
8,
198,
198,
76,
796,
1160,
198,
77,
796,
1802,
198,
28144,
796,
1338,
17208,
1722,
4428,
1754,
7,
3064,
11,
285,
11,
657,
13,
15,
8,
198,
404,
796,
9485,
10267,
21737,
198,
32,
796,
1976,
27498,
7,
76,
11,
299,
8,
198,
1640,
1312,
796,
352,
25,
16,
198,
220,
220,
220,
299,
4033,
796,
43720,
7,
16,
25,
77,
11,
838,
8,
198,
220,
220,
220,
5752,
796,
43720,
7,
16,
25,
76,
8,
198,
220,
220,
220,
410,
796,
43720,
7,
940,
8,
198,
220,
220,
220,
329,
357,
74,
11,
2100,
8,
287,
27056,
378,
7,
85,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
12860,
479,
198,
220,
220,
220,
220,
220,
220,
220,
317,
58,
808,
11,
299,
4033,
58,
74,
11907,
15853,
1188,
198,
220,
220,
220,
886,
198,
220,
220,
220,
2488,
12860,
410,
198,
220,
220,
220,
4574,
0,
7,
404,
11,
29915,
7,
28144,
11,
5752,
11,
299,
4033,
11,
410,
4008,
198,
437,
198,
404,
796,
410,
9246,
7,
404,
23029,
198,
41,
796,
25432,
7,
76,
11,
299,
11,
1034,
8,
198,
33,
796,
1057,
7,
82,
408,
11,
449,
8,
198,
31,
9288,
2593,
7,
32,
12,
33,
8,
27,
16,
68,
12,
23,
628,
198,
198,
28144,
796,
1338,
17208,
1722,
4428,
1754,
7,
3064,
11,
642,
11,
352,
13,
15,
8,
198,
404,
16,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
17,
26,
18,
4357,
685,
17,
13,
15,
26,
15,
13,
20,
26,
15,
13,
20,
12962,
198,
41,
796,
25432,
7,
20,
11,
642,
11,
1034,
16,
8,
198,
33,
796,
1057,
7,
82,
408,
11,
449,
8,
198,
31,
9288,
2593,
7,
33,
49146,
17,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
12962,
27,
16,
68,
12,
23,
198,
198,
28144,
796,
1338,
17208,
1722,
4428,
1754,
7,
3064,
11,
642,
11,
657,
13,
15,
8,
198,
404,
16,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
16,
4357,
685,
16,
13,
15,
26,
16,
13,
15,
12962,
198,
404,
17,
796,
29915,
7,
28144,
11,
352,
11,
685,
16,
26,
17,
4357,
685,
16,
13,
15,
26,
16,
13,
15,
12962,
198,
198,
41,
796,
25432,
7,
20,
11,
642,
11,
685,
404,
16,
26,
404,
17,
12962,
198,
33,
796,
1057,
7,
82,
408,
11,
449,
8,
198,
31,
9288,
2593,
7,
33,
49146,
18,
13,
15,
220,
352,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
198,
220,
220,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
220,
657,
13,
15,
12962,
27,
16,
68,
12,
23,
628,
220,
220,
220,
220
] | 2.251603 | 2,027 |
import StateSpaceReconstruction:
cembed,
assign_bin_labels
import PerronFrobenius:
get_binvisits,
estimate_transferoperator_from_binvisits,
invariantmeasure
# Estimate transfer entropy from scratch from a random
# set of points `n_realizations` times.
ts_length = 100
# Estimate transfer entropy using the wrapper function,
# and manually (doing the steps performed inside the
# wrapper function) to make sure that they give the same
# result.
estimates_3D_wrapper = Vector{Float64}(undef, n_realizations)
estimates_3D_allsteps = Vector{Float64}(undef, n_realizations)
@testset "3D #$i" for i in 1:n_realizations
E = cembed([diff(rand(ts_length)) for i = 1:3])
ϵ = 3
# Test by doing all the dirty work and providing the raw input to the estimator
bins_visited_by_orbit = assign_bin_labels(E, ϵ)
bininfo = get_binvisits(bins_visited_by_orbit)
TO = estimate_transferoperator_from_binvisits(bininfo)
iv = invariantmeasure(TO)
v = TEVars([1], [2], [3], Int[])
estimates_3D_wrapper[i] = tetogrid(E, ϵ, v)
estimates_3D_allsteps[i] = tetogrid(bins_visited_by_orbit, iv, v)
@test estimates_3D_wrapper[i] >= 0
@test estimates_3D_allsteps[i] >= 0
end
ts_length = 200
estimates_4D_wrapper = Vector{Float64}(undef, n_realizations)
estimates_4D_allsteps = Vector{Float64}(undef, n_realizations)
@testset "4D #$i" for i in 1:n_realizations
E = cembed([diff(rand(ts_length)) for i = 1:4])
ϵ = 0.3
bins_visited_by_orbit = assign_bin_labels(E, ϵ)
bininfo = get_binvisits(bins_visited_by_orbit)
TO = estimate_transferoperator_from_binvisits(bininfo)
iv = invariantmeasure(TO)
v = TEVars([1], [2], [3, 4], Int[])
estimates_4D_wrapper[i] = tetogrid(E, ϵ, v)
estimates_4D_allsteps[i] = tetogrid(bins_visited_by_orbit, iv, v)
@test estimates_4D_wrapper[i] >= 0
@test estimates_4D_allsteps[i] >= 0
end
ts_length = 300
estimates_5D_wrapper = Vector{Float64}(undef, n_realizations)
estimates_5D_allsteps = Vector{Float64}(undef, n_realizations)
@testset "5D #$i" for i in 1:n_realizations
E = cembed([diff(rand(ts_length)) for i = 1:5])
ϵ = [0.2, 0.2, 0.1, 0.2, 0.3]
bins_visited_by_orbit = assign_bin_labels(E, ϵ)
bininfo = get_binvisits(bins_visited_by_orbit)
TO = estimate_transferoperator_from_binvisits(bininfo)
iv = invariantmeasure(TO)
v = TEVars([1], [2], [3, 4], [5])
estimates_5D_wrapper[i] = tetogrid(E, ϵ, v)
estimates_5D_allsteps[i] = tetogrid(bins_visited_by_orbit, iv, v)
@test estimates_5D_wrapper[i] >= 0
@test estimates_5D_allsteps[i] >= 0
end
# # If everything works as expected, there should be no negative
# # transfer entropy values.
#@show estimates_3D_wrapper
#@show estimates_4D_wrapper
#@show estimates_5D_wrapper
#show estimates_3D_allsteps
#@show estimates_4D_allsteps
#@show estimates_5D_allsteps
#@test all(estimates_3D_wrapper .>= 0)
#@test all(estimates_4D_wrapper .>= 0)
#@test all(estimates_5D_wrapper .>= 0)
#@test all(estimates_3D_allsteps .>= 0)
#@test all(estimates_4D_allsteps .>= 0)
#@test all(estimates_5D_allsteps .>= 0)
# The invariant distribution is estimated independently in the calls
# to the different transfer entropy estimators. The distribution is
# estimated by repeated application of the transfer operator on a
# randomly initialised distribution until convergence is achieved.
# Because a different initial distribution is used for each function
# call, the estimated transfer entropy will be slightly different.
# However, we do not expect the differences to be very large.
#@test all(abs.(estimates_3D_wrapper .- estimates_3D_allsteps) .< 1e-2)
#@test all(abs.(estimates_4D_wrapper .- estimates_4D_allsteps) .< 1e-2)
#@test all(abs.(estimates_5D_wrapper .- estimates_5D_allsteps) .< 1e-2)
| [
11748,
1812,
14106,
6690,
261,
15019,
25,
198,
197,
344,
2022,
276,
11,
198,
197,
562,
570,
62,
8800,
62,
23912,
1424,
198,
198,
11748,
2448,
1313,
37,
305,
11722,
3754,
25,
198,
197,
1136,
62,
8800,
4703,
896,
11,
198,
197,
395,
1920,
62,
39437,
46616,
62,
6738,
62,
8800,
4703,
896,
11,
198,
197,
16340,
2743,
415,
1326,
5015,
628,
198,
2,
10062,
1920,
4351,
40709,
422,
12692,
422,
257,
4738,
198,
2,
900,
286,
2173,
4600,
77,
62,
5305,
4582,
63,
1661,
13,
198,
912,
62,
13664,
796,
1802,
198,
198,
2,
10062,
1920,
4351,
40709,
1262,
262,
29908,
2163,
11,
198,
2,
290,
14500,
357,
19631,
262,
4831,
6157,
2641,
262,
198,
2,
29908,
2163,
8,
284,
787,
1654,
326,
484,
1577,
262,
976,
198,
2,
1255,
13,
198,
395,
26748,
62,
18,
35,
62,
48553,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
395,
26748,
62,
18,
35,
62,
439,
20214,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
198,
31,
9288,
2617,
366,
18,
35,
1303,
3,
72,
1,
329,
1312,
287,
352,
25,
77,
62,
5305,
4582,
198,
197,
36,
796,
269,
20521,
26933,
26069,
7,
25192,
7,
912,
62,
13664,
4008,
329,
1312,
796,
352,
25,
18,
12962,
198,
197,
139,
113,
796,
513,
198,
197,
2,
6208,
416,
1804,
477,
262,
11841,
670,
290,
4955,
262,
8246,
5128,
284,
262,
3959,
1352,
198,
197,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
796,
8333,
62,
8800,
62,
23912,
1424,
7,
36,
11,
18074,
113,
8,
198,
197,
8800,
10951,
796,
651,
62,
8800,
4703,
896,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
8,
198,
197,
10468,
796,
8636,
62,
39437,
46616,
62,
6738,
62,
8800,
4703,
896,
7,
8800,
10951,
8,
198,
197,
452,
796,
25275,
415,
1326,
5015,
7,
10468,
8,
198,
197,
85,
796,
13368,
53,
945,
26933,
16,
4357,
685,
17,
4357,
685,
18,
4357,
2558,
58,
12962,
628,
197,
395,
26748,
62,
18,
35,
62,
48553,
58,
72,
60,
796,
28408,
519,
6058,
7,
36,
11,
18074,
113,
11,
410,
8,
198,
197,
395,
26748,
62,
18,
35,
62,
439,
20214,
58,
72,
60,
796,
28408,
519,
6058,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
11,
21628,
11,
410,
8,
198,
197,
31,
9288,
7746,
62,
18,
35,
62,
48553,
58,
72,
60,
18189,
657,
198,
197,
31,
9288,
7746,
62,
18,
35,
62,
439,
20214,
58,
72,
60,
18189,
657,
198,
437,
198,
198,
912,
62,
13664,
796,
939,
198,
395,
26748,
62,
19,
35,
62,
48553,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
395,
26748,
62,
19,
35,
62,
439,
20214,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
198,
31,
9288,
2617,
366,
19,
35,
1303,
3,
72,
1,
329,
1312,
287,
352,
25,
77,
62,
5305,
4582,
198,
197,
36,
796,
269,
20521,
26933,
26069,
7,
25192,
7,
912,
62,
13664,
4008,
329,
1312,
796,
352,
25,
19,
12962,
198,
197,
139,
113,
796,
657,
13,
18,
198,
197,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
796,
8333,
62,
8800,
62,
23912,
1424,
7,
36,
11,
18074,
113,
8,
198,
197,
8800,
10951,
796,
651,
62,
8800,
4703,
896,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
8,
198,
197,
10468,
796,
8636,
62,
39437,
46616,
62,
6738,
62,
8800,
4703,
896,
7,
8800,
10951,
8,
198,
197,
452,
796,
25275,
415,
1326,
5015,
7,
10468,
8,
198,
197,
85,
796,
13368,
53,
945,
26933,
16,
4357,
685,
17,
4357,
685,
18,
11,
604,
4357,
2558,
58,
12962,
198,
197,
395,
26748,
62,
19,
35,
62,
48553,
58,
72,
60,
796,
28408,
519,
6058,
7,
36,
11,
18074,
113,
11,
410,
8,
198,
197,
395,
26748,
62,
19,
35,
62,
439,
20214,
58,
72,
60,
796,
28408,
519,
6058,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
11,
21628,
11,
410,
8,
198,
197,
31,
9288,
7746,
62,
19,
35,
62,
48553,
58,
72,
60,
18189,
657,
198,
197,
31,
9288,
7746,
62,
19,
35,
62,
439,
20214,
58,
72,
60,
18189,
657,
198,
437,
198,
198,
912,
62,
13664,
796,
5867,
198,
395,
26748,
62,
20,
35,
62,
48553,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
395,
26748,
62,
20,
35,
62,
439,
20214,
796,
20650,
90,
43879,
2414,
92,
7,
917,
891,
11,
299,
62,
5305,
4582,
8,
198,
198,
31,
9288,
2617,
366,
20,
35,
1303,
3,
72,
1,
329,
1312,
287,
352,
25,
77,
62,
5305,
4582,
198,
197,
36,
796,
269,
20521,
26933,
26069,
7,
25192,
7,
912,
62,
13664,
4008,
329,
1312,
796,
352,
25,
20,
12962,
198,
197,
139,
113,
796,
685,
15,
13,
17,
11,
657,
13,
17,
11,
657,
13,
16,
11,
657,
13,
17,
11,
657,
13,
18,
60,
628,
197,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
796,
8333,
62,
8800,
62,
23912,
1424,
7,
36,
11,
18074,
113,
8,
198,
197,
8800,
10951,
796,
651,
62,
8800,
4703,
896,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
8,
198,
197,
10468,
796,
8636,
62,
39437,
46616,
62,
6738,
62,
8800,
4703,
896,
7,
8800,
10951,
8,
198,
197,
452,
796,
25275,
415,
1326,
5015,
7,
10468,
8,
198,
197,
85,
796,
13368,
53,
945,
26933,
16,
4357,
685,
17,
4357,
685,
18,
11,
604,
4357,
685,
20,
12962,
198,
197,
395,
26748,
62,
20,
35,
62,
48553,
58,
72,
60,
796,
28408,
519,
6058,
7,
36,
11,
18074,
113,
11,
410,
8,
198,
197,
395,
26748,
62,
20,
35,
62,
439,
20214,
58,
72,
60,
796,
28408,
519,
6058,
7,
65,
1040,
62,
4703,
863,
62,
1525,
62,
42594,
11,
21628,
11,
410,
8,
198,
197,
31,
9288,
7746,
62,
20,
35,
62,
48553,
58,
72,
60,
18189,
657,
198,
197,
31,
9288,
7746,
62,
20,
35,
62,
439,
20214,
58,
72,
60,
18189,
657,
198,
437,
198,
198,
2,
1303,
1002,
2279,
220,
2499,
355,
2938,
11,
612,
815,
307,
645,
4633,
198,
2,
1303,
4351,
40709,
3815,
13,
198,
2,
31,
12860,
7746,
62,
18,
35,
62,
48553,
198,
2,
31,
12860,
7746,
62,
19,
35,
62,
48553,
198,
2,
31,
12860,
7746,
62,
20,
35,
62,
48553,
198,
2,
12860,
7746,
62,
18,
35,
62,
439,
20214,
198,
2,
31,
12860,
7746,
62,
19,
35,
62,
439,
20214,
198,
2,
31,
12860,
7746,
62,
20,
35,
62,
439,
20214,
198,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
18,
35,
62,
48553,
764,
29,
28,
657,
8,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
19,
35,
62,
48553,
764,
29,
28,
657,
8,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
20,
35,
62,
48553,
764,
29,
28,
657,
8,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
18,
35,
62,
439,
20214,
764,
29,
28,
657,
8,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
19,
35,
62,
439,
20214,
764,
29,
28,
657,
8,
198,
2,
31,
9288,
477,
7,
395,
26748,
62,
20,
35,
62,
439,
20214,
764,
29,
28,
657,
8,
628,
198,
2,
383,
25275,
415,
6082,
318,
6108,
14799,
287,
262,
3848,
198,
2,
284,
262,
1180,
4351,
40709,
3959,
2024,
13,
383,
6082,
318,
198,
2,
6108,
416,
5100,
3586,
286,
262,
4351,
10088,
319,
257,
198,
2,
15456,
4238,
1417,
6082,
1566,
40826,
318,
8793,
13,
198,
2,
4362,
257,
1180,
4238,
6082,
318,
973,
329,
1123,
2163,
198,
2,
869,
11,
262,
6108,
4351,
40709,
481,
307,
4622,
1180,
13,
198,
2,
2102,
11,
356,
466,
407,
1607,
262,
5400,
284,
307,
845,
1588,
13,
198,
2,
31,
9288,
477,
7,
8937,
12195,
395,
26748,
62,
18,
35,
62,
48553,
764,
12,
1849,
395,
26748,
62,
18,
35,
62,
439,
20214,
8,
764,
27,
352,
68,
12,
17,
8,
198,
2,
31,
9288,
477,
7,
8937,
12195,
395,
26748,
62,
19,
35,
62,
48553,
764,
12,
1849,
395,
26748,
62,
19,
35,
62,
439,
20214,
8,
764,
27,
352,
68,
12,
17,
8,
198,
2,
31,
9288,
477,
7,
8937,
12195,
395,
26748,
62,
20,
35,
62,
48553,
764,
12,
1849,
395,
26748,
62,
20,
35,
62,
439,
20214,
8,
764,
27,
352,
68,
12,
17,
8,
198
] | 2.600424 | 1,414 |
# OPTIMIZATION OPPORTUNITY
# should save u and du over the x_xgrid, it's an ODE option
# ℓᵧ is the Boltzmann hierarchy cutoff
function source_grid(par::AbstractCosmoParams{T}, bg, ih, k_grid,
integrator::PerturbationIntegrator; ℓᵧ=8, reltol=1e-11) where T
x_grid = bg.x_grid
grid = zeros(T, length(x_grid), length(k_grid))
@qthreads for (i_k, k) in enumerate(k_grid)
hierarchy = Hierarchy(BasicNewtonian(), par, bg, ih, k, ℓᵧ)
perturb = boltsolve(hierarchy; reltol=reltol)
for (i_x, x) in enumerate(x_grid)
u = perturb(x) # this can be optimized away, save timesteps at the grid!
du = similar(u)
Bolt.hierarchy!(du, u, hierarchy, x)
grid[i_x,i_k] = Bolt.source_function(du, u, hierarchy, x)
end
end
# return grid
itp = LinearInterpolation((x_grid, k_grid), grid, extrapolation_bc = Line())
return itp
end
# we make the assumption that shifting the coordinates upon which we integrate
# does not affect our result. that is, we choose coordinates where the integral converges
assume_nondual(x::ForwardDiff.Dual) = ForwardDiff.value(x)
assume_nondual(x::Real) = x
function bessel_interpolator(ℓ, kmax_η₀)
bessel_argmin = 0.0
bessel_argmax = assume_nondual(kmax_η₀)
Δg = bessel_argmax / 5000
bessel_xgrid = bessel_argmin:Δg:bessel_argmax
bessel_ygrid = [sphericalbesselj(ℓ, x) for x in bessel_xgrid]
bes = spline(bessel_xgrid, bessel_ygrid)
return bes
end
function quadratic_k(kmin::T, kmax::T, nk) where T
kmin, kmax, nk = assume_nondual(kmin), assume_nondual(kmax), assume_nondual(nk)
return T[kmin + (kmax - kmin) * (i/nk)^2 for i in 1:nk]
end
function Θl(x_i, k, s_itp, bes, par::AbstractCosmoParams{T}, bg) where {T}
s = zero(T)
xgrid = bg.x_grid
for i in x_i:length(xgrid)-1
x = xgrid[i]
sb = bes(k*(bg.η₀ - bg.η(x)))
source = s_itp(x, k)
s += sb * source * (xgrid[i+1] - xgrid[i])
end
return s
end
function cltt(ℓ, s_itp, kgrid, par::AbstractCosmoParams{T}, bg) where {T}
bes = Bolt.bessel_interpolator(ℓ, kgrid[end] * bg.η₀)
x_i = findfirst(bg.x_grid .> -8) # start integrating after recombination
s = zero(T)
for i in 1:length(kgrid)-1
k = kgrid[i]
dk = kgrid[i+1] - kgrid[i]
th = Θl(x_i, k, s_itp, bes, par, bg)
s += th^2 * dk / k
end
return s
end
function cltt(ℓ::Int, par::AbstractCosmoParams, bg, ih, sf)
dense_kgrid = quadratic_k(0.1bg.H₀, 1000bg.H₀, 5000)
cltt(ℓ, sf, dense_kgrid, par, bg)
end
function cltt(ℓ⃗, par::AbstractCosmoParams, bg, ih, sf)
dense_kgrid = quadratic_k(0.1bg.H₀, 1000bg.H₀, 5000)
return qmap(ℓ->cltt(ℓ, par, bg, ih, sf), ℓ⃗)
end
| [
198,
2,
39852,
3955,
14887,
6234,
440,
10246,
9863,
4944,
9050,
198,
2,
815,
3613,
334,
290,
7043,
625,
262,
2124,
62,
87,
25928,
11,
340,
338,
281,
440,
7206,
3038,
198,
2,
2343,
226,
241,
39611,
100,
318,
262,
21764,
89,
9038,
18911,
45616,
198,
8818,
2723,
62,
25928,
7,
1845,
3712,
23839,
36734,
5908,
10044,
4105,
90,
51,
5512,
275,
70,
11,
1312,
71,
11,
479,
62,
25928,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4132,
12392,
3712,
47,
861,
5945,
341,
34500,
12392,
26,
2343,
226,
241,
39611,
100,
28,
23,
11,
823,
83,
349,
28,
16,
68,
12,
1157,
8,
810,
309,
198,
220,
220,
220,
2124,
62,
25928,
796,
275,
70,
13,
87,
62,
25928,
198,
220,
220,
220,
10706,
796,
1976,
27498,
7,
51,
11,
4129,
7,
87,
62,
25928,
828,
4129,
7,
74,
62,
25928,
4008,
198,
220,
220,
220,
2488,
80,
16663,
82,
329,
357,
72,
62,
74,
11,
479,
8,
287,
27056,
378,
7,
74,
62,
25928,
8,
198,
220,
220,
220,
220,
220,
220,
220,
18911,
796,
36496,
9282,
7,
26416,
3791,
1122,
666,
22784,
1582,
11,
275,
70,
11,
1312,
71,
11,
479,
11,
2343,
226,
241,
39611,
100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
22146,
5945,
796,
24667,
6442,
7,
71,
959,
9282,
26,
823,
83,
349,
28,
2411,
83,
349,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
357,
72,
62,
87,
11,
2124,
8,
287,
27056,
378,
7,
87,
62,
25928,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
796,
22146,
5945,
7,
87,
8,
220,
1303,
428,
460,
307,
23392,
1497,
11,
3613,
4628,
395,
25386,
379,
262,
10706,
0,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7043,
796,
2092,
7,
84,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21764,
13,
71,
959,
9282,
0,
7,
646,
11,
334,
11,
18911,
11,
2124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10706,
58,
72,
62,
87,
11,
72,
62,
74,
60,
796,
21764,
13,
10459,
62,
8818,
7,
646,
11,
334,
11,
18911,
11,
2124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1303,
1441,
10706,
198,
220,
220,
220,
340,
79,
796,
44800,
9492,
16104,
341,
19510,
87,
62,
25928,
11,
479,
62,
25928,
828,
10706,
11,
36804,
21417,
62,
15630,
796,
6910,
28955,
198,
220,
220,
220,
1441,
340,
79,
198,
437,
198,
198,
2,
356,
787,
262,
13196,
326,
15852,
262,
22715,
2402,
543,
356,
19386,
198,
2,
857,
407,
2689,
674,
1255,
13,
326,
318,
11,
356,
3853,
22715,
810,
262,
19287,
6718,
3212,
198,
562,
2454,
62,
77,
623,
723,
7,
87,
3712,
39746,
28813,
13,
36248,
8,
796,
19530,
28813,
13,
8367,
7,
87,
8,
198,
562,
2454,
62,
77,
623,
723,
7,
87,
3712,
15633,
8,
796,
2124,
198,
198,
8818,
7284,
741,
62,
3849,
16104,
1352,
7,
158,
226,
241,
11,
479,
9806,
62,
138,
115,
158,
224,
222,
8,
198,
220,
220,
220,
7284,
741,
62,
853,
1084,
796,
657,
13,
15,
628,
220,
220,
220,
7284,
741,
62,
853,
9806,
796,
7048,
62,
77,
623,
723,
7,
74,
9806,
62,
138,
115,
158,
224,
222,
8,
198,
220,
220,
220,
37455,
70,
796,
7284,
741,
62,
853,
9806,
1220,
23336,
198,
220,
220,
220,
7284,
741,
62,
87,
25928,
796,
7284,
741,
62,
853,
1084,
25,
138,
242,
70,
25,
65,
7878,
62,
853,
9806,
198,
220,
220,
220,
7284,
741,
62,
88,
25928,
796,
685,
2777,
37910,
65,
7878,
73,
7,
158,
226,
241,
11,
2124,
8,
329,
2124,
287,
7284,
741,
62,
87,
25928,
60,
198,
220,
220,
220,
7284,
796,
4328,
500,
7,
65,
7878,
62,
87,
25928,
11,
7284,
741,
62,
88,
25928,
8,
198,
220,
220,
220,
1441,
7284,
198,
437,
198,
198,
8818,
15094,
81,
1512,
62,
74,
7,
74,
1084,
3712,
51,
11,
479,
9806,
3712,
51,
11,
299,
74,
8,
810,
309,
198,
220,
220,
220,
479,
1084,
11,
479,
9806,
11,
299,
74,
796,
7048,
62,
77,
623,
723,
7,
74,
1084,
828,
7048,
62,
77,
623,
723,
7,
74,
9806,
828,
7048,
62,
77,
623,
723,
7,
77,
74,
8,
198,
220,
220,
220,
1441,
309,
58,
74,
1084,
1343,
357,
74,
9806,
532,
479,
1084,
8,
1635,
357,
72,
14,
77,
74,
8,
61,
17,
329,
1312,
287,
352,
25,
77,
74,
60,
198,
437,
198,
198,
8818,
7377,
246,
75,
7,
87,
62,
72,
11,
479,
11,
264,
62,
270,
79,
11,
7284,
11,
1582,
3712,
23839,
36734,
5908,
10044,
4105,
90,
51,
5512,
275,
70,
8,
810,
1391,
51,
92,
198,
220,
220,
220,
264,
796,
6632,
7,
51,
8,
198,
220,
220,
220,
2124,
25928,
796,
275,
70,
13,
87,
62,
25928,
198,
220,
220,
220,
329,
1312,
287,
2124,
62,
72,
25,
13664,
7,
87,
25928,
13219,
16,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
2124,
25928,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
264,
65,
796,
7284,
7,
74,
9,
7,
35904,
13,
138,
115,
158,
224,
222,
532,
275,
70,
13,
138,
115,
7,
87,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
2723,
796,
264,
62,
270,
79,
7,
87,
11,
479,
8,
198,
220,
220,
220,
220,
220,
220,
220,
264,
15853,
264,
65,
1635,
2723,
1635,
357,
87,
25928,
58,
72,
10,
16,
60,
532,
2124,
25928,
58,
72,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
264,
198,
437,
628,
198,
198,
8818,
537,
926,
7,
158,
226,
241,
11,
264,
62,
270,
79,
11,
479,
25928,
11,
1582,
3712,
23839,
36734,
5908,
10044,
4105,
90,
51,
5512,
275,
70,
8,
810,
1391,
51,
92,
198,
220,
220,
220,
7284,
796,
21764,
13,
65,
7878,
62,
3849,
16104,
1352,
7,
158,
226,
241,
11,
479,
25928,
58,
437,
60,
1635,
275,
70,
13,
138,
115,
158,
224,
222,
8,
198,
220,
220,
220,
2124,
62,
72,
796,
1064,
11085,
7,
35904,
13,
87,
62,
25928,
764,
29,
532,
23,
8,
220,
1303,
923,
32029,
706,
44759,
1883,
198,
220,
220,
220,
264,
796,
6632,
7,
51,
8,
198,
220,
220,
220,
329,
1312,
287,
352,
25,
13664,
7,
74,
25928,
13219,
16,
198,
220,
220,
220,
220,
220,
220,
220,
479,
796,
479,
25928,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
288,
74,
796,
479,
25928,
58,
72,
10,
16,
60,
532,
479,
25928,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
294,
796,
7377,
246,
75,
7,
87,
62,
72,
11,
479,
11,
264,
62,
270,
79,
11,
7284,
11,
1582,
11,
275,
70,
8,
198,
220,
220,
220,
220,
220,
220,
220,
264,
15853,
294,
61,
17,
1635,
288,
74,
1220,
479,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
264,
198,
437,
198,
198,
8818,
537,
926,
7,
158,
226,
241,
3712,
5317,
11,
1582,
3712,
23839,
36734,
5908,
10044,
4105,
11,
275,
70,
11,
1312,
71,
11,
264,
69,
8,
198,
220,
220,
220,
15715,
62,
74,
25928,
796,
15094,
81,
1512,
62,
74,
7,
15,
13,
16,
35904,
13,
39,
158,
224,
222,
11,
8576,
35904,
13,
39,
158,
224,
222,
11,
23336,
8,
198,
220,
220,
220,
537,
926,
7,
158,
226,
241,
11,
264,
69,
11,
15715,
62,
74,
25928,
11,
1582,
11,
275,
70,
8,
198,
437,
198,
198,
8818,
537,
926,
7,
158,
226,
241,
158,
225,
245,
11,
1582,
3712,
23839,
36734,
5908,
10044,
4105,
11,
275,
70,
11,
1312,
71,
11,
264,
69,
8,
198,
220,
220,
220,
15715,
62,
74,
25928,
796,
15094,
81,
1512,
62,
74,
7,
15,
13,
16,
35904,
13,
39,
158,
224,
222,
11,
8576,
35904,
13,
39,
158,
224,
222,
11,
23336,
8,
198,
220,
220,
220,
1441,
10662,
8899,
7,
158,
226,
241,
3784,
565,
926,
7,
158,
226,
241,
11,
1582,
11,
275,
70,
11,
1312,
71,
11,
264,
69,
828,
2343,
226,
241,
158,
225,
245,
8,
198,
437,
198
] | 2.014641 | 1,366 |
"""
Converts and returns an array of string to an array of Symbol
"""
function strarr_to_symarr!(arr)
return arr = [ Symbol(str) for str in arr ]
end
"""
Converts and returns an equation string to an array of variables as string
"""
function equation_str_to_strarr!(equation)
if occursin("~", equation)
vars = split(replace(equation, r"\s+|\s+$/g" => " "), "~")
equation = [String(strip(var)) for var in vcat(vars[1], split(vars[2], "+"))]
else
equation = [String(strip(var)) for var in split(replace(equation, r"\s+|\s+$/g" => ","), ",")]
end
equation = filter(x->length(x) > 0, equation)
return equation
end
"""
Converts and returns a strarr equation with wildcards to a strarr with wildcards processed
"""
function equation_converts_wildcards!(equation, names)
new_equation = []
for e in equation
e = replace(e, "." => "*")
if e[end] == '*'
datanames_arr = vec([String(key)[1:length(e[1:end - 1])] == e[1:end - 1] ? String(key) : nothing for key in names])
append!(new_equation, filter!(x->x != nothing, datanames_arr))
else
append!(new_equation, [e])
end
end
equation = unique(new_equation)
return equation
end
"""
Gets datanames from data DataFrame or data Tuple
"""
function get_datanames_from_data(data, datanames)
if isa(data, DataFrames.DataFrame)
datanames = names(data)
elseif isa(data, Tuple)
datanames = data[2]
if !isa(datanames, Vector)
datanames = vec(datanames)
end
end
return strarr_to_symarr!(datanames)
end
"""
Gets datanames from data DataFrame or data Tuple
"""
function get_data_from_data(data)
if isa(data, DataFrames.DataFrame)
data = convert(Matrix{Union{Missing, Float64}}, data)
elseif isa(data, Tuple)
data = data[1]
end
return data
end
"""
Sorts data
"""
function sort_data(data, datanames; time=nothing, panel=nothing)
time_pos = ModelSelection.get_column_index(time, datanames)
panel_pos = ModelSelection.get_column_index(panel, datanames)
if time_pos != nothing && panel_pos != nothing
data = sortslices(data, by=x->(x[panel_pos], x[time_pos]), dims=1)
elseif panel_pos != nothing
data = sortslices(data, by=x->(x[panel_pos]), dims=1)
elseif time_pos != nothing
data = sortslices(data, by=x->(x[time_pos]), dims=1)
end
return data
end
"""
Filter data by selected columns
"""
function filter_data_by_selected_columns(data, equation, datanames)
columns = []
for i = 1:length(equation)
append!(columns, ModelSelection.get_column_index(equation[i], datanames))
end
data = data[:,columns]
datanames = datanames[columns]
return (data, datanames)
end
"""
Validates if there are panel gaps
"""
function validate_panel(data, datanames; panel=nothing)
if panel != nothing
return !any(ismissing, data[:, ModelSelection.get_column_index(panel, datanames)])
end
return true
end
"""
Validates if there are time gaps
"""
function validate_time(data, datanames; panel=nothing, time=nothing)
nobs = size(data, 1)
# TODO: Merge solutions
if panel == nothing
previous_value = data[1, ModelSelection.get_column_index(time, datanames)]
for value in data[2:end, ModelSelection.get_column_index(time, datanames)]
if previous_value + 1 != value
return false
end
previous_value = value
end
else
panel_index = ModelSelection.get_column_index(panel, datanames)
csis = unique(data[:, panel_index])
time_index = ModelSelection.get_column_index(time, datanames)
for csi in csis
rows = findall(x->x == csi, data[:,panel_index])
previous_value = data[rows[1], time_index]
for row in rows[2:end]
value = data[row, time_index]
if previous_value + 1 != value
return false
end
previous_value = value
end
end
end
return true
end
"""
Remove outliers from data
"""
function remove_outliers(data)
for column in 1:size(data, 2)
remove_outlier(data, column)
end
end
"""
Remove outliers from a data column
"""
function remove_outlier(data, column)
threshold = 3
col = @view(data[:,column])
aux_col = Array{Union{Int64, Float64, Missing}}(undef, size(col, 1), 2)
for i in keys(col)
aux_col[i, 1] = i
aux_col[i, 2] = col[i]
end
valid_data = deleteat!(aux_col[:, 2], findall(ismissing, aux_col[:, 2]))
mean_ = mean(valid_data)
std_ = std(valid_data)
for i in keys(col)
if !ismissing(col[i])
z_score = (col[i] - mean_) / std_
if abs(z_score) > threshold
col[i] = missing
end
end
end
return data
end
"""
Remove outliers from data
"""
function seasonal_adjustments(data, factor_dict, datanames)
for column in factor_dict
seasonal_adjustment(data, column[1], column[2], datanames)
end
end
"""
Seasonal adjustment from a data column
"""
function seasonal_adjustment(data, name, factor, datanames)
column = ModelSelection.get_column_index(name, datanames)
nobs = size(data, 2)
col = @view(data[:, column])
L = Int(round(nobs / 2 / factor)) * factor
yt, ys = analyze(col, L)
seasonal_component = sum(ys, dims=2)
col = col - seasonal_component
return data
end
"""
Add values to extras
"""
function addextras(data, method, seasonaladjustment, removeoutliers)
data.extras[ModelSelection.generate_extra_key(PREPROCESSING_EXTRAKEY, data.extras)] = Dict(
:datanames => vcat(data.depvar, data.expvars),
:depvar => data.depvar,
:expvars => data.expvars,
:data => DEFAULT_DATANAME,
:method => method,
:intercept => data.intercept,
:panel => data.panel,
:time => data.time,
:seasonaladjustment => seasonaladjustment,
:removeoutliers => removeoutliers,
:removemissings => data.removemissings
)
return data
end
| [
37811,
198,
3103,
24040,
290,
5860,
281,
7177,
286,
4731,
284,
281,
7177,
286,
38357,
198,
37811,
198,
8818,
965,
3258,
62,
1462,
62,
37047,
3258,
0,
7,
3258,
8,
198,
220,
220,
220,
1441,
5240,
796,
685,
38357,
7,
2536,
8,
329,
965,
287,
5240,
2361,
198,
437,
198,
198,
37811,
198,
3103,
24040,
290,
5860,
281,
16022,
4731,
284,
281,
7177,
286,
9633,
355,
4731,
220,
198,
37811,
198,
8818,
16022,
62,
2536,
62,
1462,
62,
2536,
3258,
0,
7,
4853,
341,
8,
198,
220,
220,
220,
611,
8833,
259,
7203,
93,
1600,
16022,
8,
198,
220,
220,
220,
220,
220,
220,
220,
410,
945,
796,
6626,
7,
33491,
7,
4853,
341,
11,
374,
1,
59,
82,
10,
91,
59,
82,
10,
3,
14,
70,
1,
5218,
366,
366,
828,
366,
93,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
16022,
796,
685,
10100,
7,
36311,
7,
7785,
4008,
329,
1401,
287,
410,
9246,
7,
85,
945,
58,
16,
4357,
6626,
7,
85,
945,
58,
17,
4357,
43825,
48774,
60,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
16022,
796,
685,
10100,
7,
36311,
7,
7785,
4008,
329,
1401,
287,
6626,
7,
33491,
7,
4853,
341,
11,
374,
1,
59,
82,
10,
91,
59,
82,
10,
3,
14,
70,
1,
5218,
366,
553,
828,
366,
553,
15437,
198,
220,
220,
220,
886,
198,
220,
220,
220,
16022,
796,
8106,
7,
87,
3784,
13664,
7,
87,
8,
1875,
657,
11,
16022,
8,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
16022,
198,
437,
198,
198,
37811,
198,
3103,
24040,
290,
5860,
257,
965,
3258,
16022,
351,
4295,
27761,
284,
257,
965,
3258,
351,
4295,
27761,
13686,
198,
37811,
198,
8818,
16022,
62,
1102,
24040,
62,
21992,
27761,
0,
7,
4853,
341,
11,
3891,
8,
198,
220,
220,
220,
649,
62,
4853,
341,
796,
17635,
198,
220,
220,
220,
329,
304,
287,
16022,
198,
220,
220,
220,
220,
220,
220,
220,
304,
796,
6330,
7,
68,
11,
366,
526,
5218,
366,
9,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
304,
58,
437,
60,
6624,
705,
9,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4818,
272,
1047,
62,
3258,
796,
43030,
26933,
10100,
7,
2539,
38381,
16,
25,
13664,
7,
68,
58,
16,
25,
437,
532,
352,
12962,
60,
6624,
304,
58,
16,
25,
437,
532,
352,
60,
5633,
10903,
7,
2539,
8,
1058,
2147,
329,
1994,
287,
3891,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24443,
0,
7,
3605,
62,
4853,
341,
11,
8106,
0,
7,
87,
3784,
87,
14512,
2147,
11,
4818,
272,
1047,
62,
3258,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24443,
0,
7,
3605,
62,
4853,
341,
11,
685,
68,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
16022,
796,
3748,
7,
3605,
62,
4853,
341,
8,
198,
220,
220,
220,
1441,
16022,
198,
437,
198,
198,
37811,
198,
38,
1039,
4818,
272,
1047,
422,
1366,
6060,
19778,
393,
1366,
309,
29291,
198,
37811,
198,
8818,
651,
62,
19608,
272,
1047,
62,
6738,
62,
7890,
7,
7890,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
611,
318,
64,
7,
7890,
11,
6060,
35439,
13,
6601,
19778,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4818,
272,
1047,
796,
3891,
7,
7890,
8,
198,
220,
220,
220,
2073,
361,
318,
64,
7,
7890,
11,
309,
29291,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4818,
272,
1047,
796,
1366,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
9160,
7,
19608,
272,
1047,
11,
20650,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4818,
272,
1047,
796,
43030,
7,
19608,
272,
1047,
8,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
965,
3258,
62,
1462,
62,
37047,
3258,
0,
7,
19608,
272,
1047,
8,
198,
437,
198,
198,
37811,
198,
38,
1039,
4818,
272,
1047,
422,
1366,
6060,
19778,
393,
1366,
309,
29291,
198,
37811,
198,
8818,
651,
62,
7890,
62,
6738,
62,
7890,
7,
7890,
8,
198,
220,
220,
220,
611,
318,
64,
7,
7890,
11,
6060,
35439,
13,
6601,
19778,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
10385,
7,
46912,
90,
38176,
90,
43730,
11,
48436,
2414,
92,
5512,
1366,
8,
198,
220,
220,
220,
2073,
361,
318,
64,
7,
7890,
11,
309,
29291,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
1366,
58,
16,
60,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1366,
198,
437,
198,
198,
37811,
198,
50,
2096,
1366,
198,
37811,
198,
8818,
3297,
62,
7890,
7,
7890,
11,
4818,
272,
1047,
26,
640,
28,
22366,
11,
6103,
28,
22366,
8,
198,
220,
220,
220,
640,
62,
1930,
796,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
2435,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
6103,
62,
1930,
796,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
35330,
11,
4818,
272,
1047,
8,
628,
220,
220,
220,
611,
640,
62,
1930,
14512,
2147,
11405,
6103,
62,
1930,
14512,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
10524,
677,
274,
7,
7890,
11,
416,
28,
87,
3784,
7,
87,
58,
35330,
62,
1930,
4357,
2124,
58,
2435,
62,
1930,
46570,
5391,
82,
28,
16,
8,
198,
220,
220,
220,
2073,
361,
6103,
62,
1930,
14512,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
10524,
677,
274,
7,
7890,
11,
416,
28,
87,
3784,
7,
87,
58,
35330,
62,
1930,
46570,
5391,
82,
28,
16,
8,
198,
220,
220,
220,
2073,
361,
640,
62,
1930,
14512,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
10524,
677,
274,
7,
7890,
11,
416,
28,
87,
3784,
7,
87,
58,
2435,
62,
1930,
46570,
5391,
82,
28,
16,
8,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1366,
198,
437,
198,
198,
37811,
198,
22417,
1366,
416,
6163,
15180,
198,
37811,
198,
8818,
8106,
62,
7890,
62,
1525,
62,
34213,
62,
28665,
82,
7,
7890,
11,
16022,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
15180,
796,
17635,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
4853,
341,
8,
198,
220,
220,
220,
220,
220,
220,
220,
24443,
0,
7,
28665,
82,
11,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
4853,
341,
58,
72,
4357,
4818,
272,
1047,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1366,
796,
1366,
58,
45299,
28665,
82,
60,
198,
220,
220,
220,
4818,
272,
1047,
796,
4818,
272,
1047,
58,
28665,
82,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
357,
7890,
11,
4818,
272,
1047,
8,
198,
437,
198,
198,
37811,
198,
7762,
37051,
611,
612,
389,
6103,
17332,
198,
37811,
198,
8818,
26571,
62,
35330,
7,
7890,
11,
4818,
272,
1047,
26,
6103,
28,
22366,
8,
198,
220,
220,
220,
611,
6103,
14512,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
5145,
1092,
7,
1042,
747,
278,
11,
1366,
58,
45299,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
35330,
11,
4818,
272,
1047,
8,
12962,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
2081,
198,
437,
198,
198,
37811,
198,
7762,
37051,
611,
612,
389,
640,
17332,
198,
37811,
198,
8818,
26571,
62,
2435,
7,
7890,
11,
4818,
272,
1047,
26,
6103,
28,
22366,
11,
640,
28,
22366,
8,
198,
220,
220,
220,
645,
1443,
796,
2546,
7,
7890,
11,
352,
8,
628,
220,
220,
220,
1303,
16926,
46,
25,
39407,
8136,
198,
220,
220,
220,
611,
6103,
6624,
2147,
198,
220,
220,
220,
220,
220,
220,
220,
2180,
62,
8367,
796,
1366,
58,
16,
11,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
2435,
11,
4818,
272,
1047,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1988,
287,
1366,
58,
17,
25,
437,
11,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
2435,
11,
4818,
272,
1047,
15437,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2180,
62,
8367,
1343,
352,
14512,
1988,
198,
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,
886,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2180,
62,
8367,
796,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
6103,
62,
9630,
796,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
35330,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
220,
220,
220,
220,
269,
13429,
796,
3748,
7,
7890,
58,
45299,
6103,
62,
9630,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
640,
62,
9630,
796,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
2435,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
269,
13396,
287,
269,
13429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15274,
796,
1064,
439,
7,
87,
3784,
87,
6624,
269,
13396,
11,
1366,
58,
45299,
35330,
62,
9630,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2180,
62,
8367,
796,
1366,
58,
8516,
58,
16,
4357,
640,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
15274,
58,
17,
25,
437,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
1366,
58,
808,
11,
640,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2180,
62,
8367,
1343,
352,
14512,
1988,
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,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2180,
62,
8367,
796,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
2081,
198,
437,
198,
198,
37811,
198,
27914,
41528,
3183,
422,
1366,
198,
37811,
198,
8818,
4781,
62,
448,
75,
3183,
7,
7890,
8,
198,
220,
220,
220,
329,
5721,
287,
352,
25,
7857,
7,
7890,
11,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4781,
62,
448,
2505,
7,
7890,
11,
5721,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
27914,
41528,
3183,
422,
257,
1366,
5721,
220,
198,
37811,
198,
8818,
4781,
62,
448,
2505,
7,
7890,
11,
5721,
8,
198,
220,
220,
220,
11387,
796,
513,
628,
220,
220,
220,
951,
796,
2488,
1177,
7,
7890,
58,
45299,
28665,
12962,
198,
220,
220,
220,
27506,
62,
4033,
796,
15690,
90,
38176,
90,
5317,
2414,
11,
48436,
2414,
11,
25639,
11709,
7,
917,
891,
11,
2546,
7,
4033,
11,
352,
828,
362,
8,
198,
220,
220,
220,
329,
1312,
287,
8251,
7,
4033,
8,
198,
220,
220,
220,
220,
220,
220,
220,
27506,
62,
4033,
58,
72,
11,
352,
60,
796,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
27506,
62,
4033,
58,
72,
11,
362,
60,
796,
951,
58,
72,
60,
198,
220,
220,
220,
886,
628,
220,
220,
220,
4938,
62,
7890,
796,
12233,
265,
0,
7,
14644,
62,
4033,
58,
45299,
362,
4357,
1064,
439,
7,
1042,
747,
278,
11,
27506,
62,
4033,
58,
45299,
362,
60,
4008,
628,
220,
220,
220,
1612,
62,
796,
1612,
7,
12102,
62,
7890,
8,
198,
220,
220,
220,
14367,
62,
796,
14367,
7,
12102,
62,
7890,
8,
628,
220,
220,
220,
329,
1312,
287,
8251,
7,
4033,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5145,
1042,
747,
278,
7,
4033,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
62,
26675,
796,
357,
4033,
58,
72,
60,
532,
1612,
62,
8,
1220,
14367,
62,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2352,
7,
89,
62,
26675,
8,
1875,
11387,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
58,
72,
60,
796,
4814,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
220,
220,
220,
220,
886,
198,
220,
220,
220,
886,
198,
220,
220,
220,
1441,
1366,
198,
437,
198,
198,
37811,
198,
27914,
41528,
3183,
422,
1366,
198,
37811,
198,
8818,
21819,
62,
23032,
902,
7,
7890,
11,
5766,
62,
11600,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
329,
5721,
287,
5766,
62,
11600,
198,
220,
220,
220,
220,
220,
220,
220,
21819,
62,
23032,
434,
7,
7890,
11,
5721,
58,
16,
4357,
5721,
58,
17,
4357,
4818,
272,
1047,
8,
198,
220,
220,
220,
886,
198,
437,
198,
198,
37811,
198,
18960,
282,
15068,
422,
257,
1366,
5721,
220,
198,
37811,
198,
8818,
21819,
62,
23032,
434,
7,
7890,
11,
1438,
11,
5766,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
5721,
796,
9104,
4653,
1564,
13,
1136,
62,
28665,
62,
9630,
7,
3672,
11,
4818,
272,
1047,
8,
198,
220,
220,
220,
645,
1443,
796,
2546,
7,
7890,
11,
362,
8,
198,
220,
220,
220,
951,
796,
2488,
1177,
7,
7890,
58,
45299,
5721,
12962,
198,
220,
220,
220,
406,
796,
2558,
7,
744,
7,
77,
8158,
1220,
362,
1220,
5766,
4008,
1635,
5766,
198,
220,
220,
220,
331,
83,
11,
331,
82,
796,
16602,
7,
4033,
11,
406,
8,
220,
198,
220,
220,
220,
21819,
62,
42895,
796,
2160,
7,
893,
11,
5391,
82,
28,
17,
8,
198,
220,
220,
220,
951,
796,
951,
532,
21819,
62,
42895,
198,
220,
220,
220,
1441,
1366,
198,
437,
198,
198,
37811,
198,
4550,
3815,
284,
33849,
198,
37811,
198,
8818,
751,
2302,
8847,
7,
7890,
11,
2446,
11,
21819,
23032,
434,
11,
4781,
448,
75,
3183,
8,
198,
220,
220,
220,
1366,
13,
2302,
8847,
58,
17633,
4653,
1564,
13,
8612,
378,
62,
26086,
62,
2539,
7,
46437,
4805,
4503,
7597,
2751,
62,
13918,
3861,
20373,
11,
1366,
13,
2302,
8847,
15437,
796,
360,
713,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
19608,
272,
1047,
5218,
410,
9246,
7,
7890,
13,
10378,
7785,
11,
1366,
13,
11201,
85,
945,
828,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
10378,
7785,
5218,
1366,
13,
10378,
7785,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
11201,
85,
945,
5218,
1366,
13,
11201,
85,
945,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7890,
5218,
5550,
38865,
62,
35,
1404,
1565,
10067,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
24396,
5218,
2446,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
3849,
984,
5218,
1366,
13,
3849,
984,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
35330,
5218,
1366,
13,
35330,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
2435,
5218,
1366,
13,
2435,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
6230,
282,
23032,
434,
5218,
21819,
23032,
434,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
28956,
448,
75,
3183,
5218,
4781,
448,
75,
3183,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
28956,
3927,
654,
5218,
1366,
13,
28956,
3927,
654,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
1441,
1366,
198,
437,
198
] | 2.324223 | 2,671 |
export iauEpv00
"""
Earth position and velocity, heliocentric and barycentric, with
respect to the Barycentric Celestial Reference System.
This function is part of the International Astronomical Union's
SOFA (Standards Of Fundamental Astronomy) software collection.
Status: support function.
Given:
date1,date2 double TDB date (Note 1)
Returned:
pvh double[2][3] heliocentric Earth position/velocity
pvb double[2][3] barycentric Earth position/velocity
Returned (function value):
int status: 0 = OK
+1 = warning: date outside
the range 1900-2100 AD
Notes:
1. The TDB date date1+date2 is a Julian Date, apportioned in any
convenient way between the two arguments. For example,
JD(TDB)=2450123.7 could be expressed in any of these ways, among
others:
date1 date2
2450123.7 0.0 (JD method)
2451545.0 -1421.3 (J2000 method)
2400000.5 50123.2 (MJD method)
2450123.5 0.2 (date & time method)
The JD method is the most natural and convenient to use in cases
where the loss of several decimal digits of resolution is
acceptable. The J2000 method is best matched to the way the
argument is handled internally and will deliver the optimum
resolution. The MJD method and the date & time methods are both
good compromises between resolution and convenience. However,
the accuracy of the result is more likely to be limited by the
algorithm itself than the way the date has been expressed.
n.b. TT can be used instead of TDB in most applications.
2. On return, the arrays pvh and pvb contain the following:
pvh[0][0] x }
pvh[0][1] y } heliocentric position, au
pvh[0][2] z }
pvh[1][0] xdot }
pvh[1][1] ydot } heliocentric velocity, au/d
pvh[1][2] zdot }
pvb[0][0] x }
pvb[0][1] y } barycentric position, au
pvb[0][2] z }
pvb[1][0] xdot }
pvb[1][1] ydot } barycentric velocity, au/d
pvb[1][2] zdot }
The vectors are with respect to the Barycentric Celestial
Reference System. The time unit is one day in TDB.
3. The function is a SIMPLIFIED SOLUTION from the planetary theory
VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics &
Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original
Fortran code supplied by P. Bretagnon (private comm., 2000).
4. Comparisons over the time span 1900-2100 with this simplified
solution and the JPL DE405 ephemeris give the following results:
RMS max
Heliocentric:
position error 3.7 11.2 km
velocity error 1.4 5.0 mm/s
Barycentric:
position error 4.6 13.4 km
velocity error 1.4 4.9 mm/s
Comparisons with the JPL DE406 ephemeris show that by 1800 and
2200 the position errors are approximately double their 1900-2100
size. By 1500 and 2500 the deterioration is a factor of 10 and
by 1000 and 3000 a factor of 60. The velocity accuracy falls off
at about half that rate.
5. It is permissible to use the same array for pvh and pvb, which
will receive the barycentric values.
This revision: 2017 March 16
SOFA release 2018-01-30
Copyright (C) 2018 IAU SOFA Board. See notes at end.
"""
# int iauEpv00(double date1, double date2,
# double pvh[2][3], double pvb[2][3])
function iauEpv00(date1::Real, date2::Real)
# Initialize function return variables
pvh = zeros(Float64, 3, 2)
pvb = zeros(Float64, 3, 2)
status = ccall((:iauEpv00, libsofa_c), Cint,
(Cdouble, Cdouble,
Ref{Cdouble}, Ref{Cdouble}),
convert(Float64, date1), convert(Float64, date2),
pvh, pvb)
return status, SMatrix{2,3}(pvh'), SMatrix{2,3}(pvb')
end | [
39344,
220,
544,
84,
13807,
85,
405,
198,
37811,
198,
22840,
2292,
290,
15432,
11,
932,
72,
420,
22317,
290,
275,
560,
28577,
11,
351,
198,
15008,
284,
262,
347,
560,
28577,
37231,
20984,
4482,
13,
198,
198,
1212,
2163,
318,
636,
286,
262,
4037,
25398,
22545,
4479,
338,
198,
15821,
7708,
357,
15480,
1371,
3226,
49983,
25398,
9145,
8,
3788,
4947,
13,
198,
198,
19580,
25,
220,
1104,
2163,
13,
198,
198,
15056,
25,
198,
220,
220,
220,
220,
220,
3128,
16,
11,
4475,
17,
220,
4274,
220,
220,
220,
220,
220,
220,
220,
309,
11012,
3128,
357,
6425,
352,
8,
198,
198,
13615,
276,
25,
198,
220,
220,
220,
220,
220,
279,
85,
71,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
58,
17,
7131,
18,
60,
220,
932,
72,
420,
22317,
3668,
2292,
14,
626,
11683,
198,
220,
220,
220,
220,
220,
279,
85,
65,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
58,
17,
7131,
18,
60,
220,
275,
560,
28577,
3668,
2292,
14,
626,
11683,
628,
220,
220,
220,
220,
220,
8229,
276,
357,
8818,
1988,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
25,
657,
796,
7477,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1343,
16,
796,
6509,
25,
3128,
2354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
2837,
21489,
12,
2481,
405,
5984,
198,
198,
16130,
25,
628,
220,
220,
220,
220,
220,
352,
13,
383,
309,
11012,
3128,
3128,
16,
10,
4475,
17,
318,
257,
18322,
7536,
11,
598,
5817,
276,
287,
597,
198,
220,
220,
220,
220,
220,
11282,
835,
1022,
262,
734,
7159,
13,
220,
1114,
1672,
11,
198,
220,
220,
220,
220,
220,
28591,
7,
51,
11012,
47505,
22995,
486,
1954,
13,
22,
714,
307,
6241,
287,
597,
286,
777,
2842,
11,
1871,
198,
220,
220,
220,
220,
220,
1854,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3128,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3128,
17,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29637,
486,
1954,
13,
22,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
657,
13,
15,
220,
220,
220,
220,
220,
220,
357,
37882,
2446,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29637,
1314,
2231,
13,
15,
220,
220,
220,
220,
220,
220,
532,
1415,
2481,
13,
18,
220,
220,
220,
220,
220,
220,
357,
41,
11024,
2446,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1987,
20483,
13,
20,
220,
220,
220,
220,
220,
220,
24555,
1954,
13,
17,
220,
220,
220,
220,
220,
220,
357,
44,
37882,
2446,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29637,
486,
1954,
13,
20,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
657,
13,
17,
220,
220,
220,
220,
220,
220,
357,
4475,
1222,
640,
2446,
8,
628,
220,
220,
220,
220,
220,
383,
28591,
2446,
318,
262,
749,
3288,
290,
11282,
284,
779,
287,
2663,
198,
220,
220,
220,
220,
220,
810,
262,
2994,
286,
1811,
32465,
19561,
286,
6323,
318,
198,
220,
220,
220,
220,
220,
10909,
13,
220,
383,
449,
11024,
2446,
318,
1266,
14451,
284,
262,
835,
262,
198,
220,
220,
220,
220,
220,
4578,
318,
12118,
20947,
290,
481,
5203,
262,
39475,
198,
220,
220,
220,
220,
220,
6323,
13,
220,
383,
33974,
35,
2446,
290,
262,
3128,
1222,
640,
5050,
389,
1111,
198,
220,
220,
220,
220,
220,
922,
38853,
1022,
6323,
290,
15607,
13,
220,
2102,
11,
198,
220,
220,
220,
220,
220,
262,
9922,
286,
262,
1255,
318,
517,
1884,
284,
307,
3614,
416,
262,
198,
220,
220,
220,
220,
220,
11862,
2346,
621,
262,
835,
262,
3128,
468,
587,
6241,
13,
628,
220,
220,
220,
220,
220,
299,
13,
65,
13,
26653,
460,
307,
973,
2427,
286,
309,
11012,
287,
749,
5479,
13,
628,
220,
220,
220,
220,
220,
362,
13,
1550,
1441,
11,
262,
26515,
279,
85,
71,
290,
279,
85,
65,
3994,
262,
1708,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
15,
7131,
15,
60,
220,
2124,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
15,
7131,
16,
60,
220,
331,
220,
220,
220,
220,
220,
220,
1782,
932,
72,
420,
22317,
2292,
11,
35851,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
15,
7131,
17,
60,
220,
1976,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
16,
7131,
15,
60,
220,
2124,
26518,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
16,
7131,
16,
60,
220,
331,
26518,
220,
220,
220,
1782,
932,
72,
420,
22317,
15432,
11,
35851,
14,
67,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
58,
16,
7131,
17,
60,
220,
1976,
26518,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
15,
7131,
15,
60,
220,
2124,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
15,
7131,
16,
60,
220,
331,
220,
220,
220,
220,
220,
220,
1782,
275,
560,
28577,
2292,
11,
35851,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
15,
7131,
17,
60,
220,
1976,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
16,
7131,
15,
60,
220,
2124,
26518,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
16,
7131,
16,
60,
220,
331,
26518,
220,
220,
220,
1782,
275,
560,
28577,
15432,
11,
35851,
14,
67,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
65,
58,
16,
7131,
17,
60,
220,
1976,
26518,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
383,
30104,
389,
351,
2461,
284,
262,
347,
560,
28577,
37231,
198,
220,
220,
220,
220,
220,
20984,
4482,
13,
220,
383,
640,
4326,
318,
530,
1110,
287,
309,
11012,
13,
628,
220,
220,
220,
220,
220,
513,
13,
383,
2163,
318,
257,
23749,
6489,
28343,
36817,
35354,
422,
262,
27047,
4583,
198,
220,
220,
220,
220,
220,
22269,
3185,
11024,
357,
55,
13,
4270,
30927,
11,
350,
13,
39420,
4660,
261,
11,
5878,
11,
15248,
274,
13,
47570,
1222,
198,
220,
220,
220,
220,
220,
39530,
13,
25398,
1539,
4019,
11,
513,
14,
19,
11,
22538,
12,
26427,
8,
290,
318,
281,
16711,
286,
2656,
198,
220,
220,
220,
220,
220,
6401,
2596,
2438,
14275,
416,
350,
13,
39420,
4660,
261,
357,
19734,
725,
1539,
4751,
737,
628,
220,
220,
220,
220,
220,
604,
13,
22565,
9886,
625,
262,
640,
11506,
21489,
12,
2481,
405,
351,
428,
27009,
198,
220,
220,
220,
220,
220,
4610,
290,
262,
449,
6489,
5550,
26598,
2462,
39557,
271,
1577,
262,
1708,
2482,
25,
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,
371,
5653,
220,
220,
220,
3509,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5053,
72,
420,
22317,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2292,
4049,
220,
220,
220,
513,
13,
22,
220,
220,
1367,
13,
17,
220,
220,
10571,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15432,
4049,
220,
220,
220,
352,
13,
19,
220,
220,
220,
642,
13,
15,
220,
220,
8085,
14,
82,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
347,
560,
28577,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2292,
4049,
220,
220,
220,
604,
13,
21,
220,
220,
1511,
13,
19,
220,
220,
10571,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15432,
4049,
220,
220,
220,
352,
13,
19,
220,
220,
220,
604,
13,
24,
220,
220,
8085,
14,
82,
628,
220,
220,
220,
220,
220,
22565,
9886,
351,
262,
449,
6489,
5550,
29703,
2462,
39557,
271,
905,
326,
416,
21431,
290,
198,
220,
220,
220,
220,
220,
362,
2167,
262,
2292,
8563,
389,
6702,
4274,
511,
21489,
12,
2481,
405,
198,
220,
220,
220,
220,
220,
2546,
13,
220,
2750,
20007,
290,
33507,
262,
38495,
318,
257,
5766,
286,
838,
290,
198,
220,
220,
220,
220,
220,
416,
8576,
290,
20343,
257,
5766,
286,
3126,
13,
220,
383,
15432,
9922,
8953,
572,
198,
220,
220,
220,
220,
220,
379,
546,
2063,
326,
2494,
13,
628,
220,
220,
220,
220,
220,
642,
13,
632,
318,
32005,
284,
779,
262,
976,
7177,
329,
279,
85,
71,
290,
279,
85,
65,
11,
543,
198,
220,
220,
220,
220,
220,
481,
3328,
262,
275,
560,
28577,
3815,
13,
198,
198,
1212,
18440,
25,
220,
2177,
2805,
1467,
198,
198,
15821,
7708,
2650,
2864,
12,
486,
12,
1270,
198,
198,
15269,
357,
34,
8,
2864,
314,
26830,
12809,
7708,
5926,
13,
220,
4091,
4710,
379,
886,
13,
198,
37811,
198,
198,
2,
493,
220,
544,
84,
13807,
85,
405,
7,
23352,
3128,
16,
11,
4274,
3128,
17,
11,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4274,
279,
85,
71,
58,
17,
7131,
18,
4357,
4274,
279,
85,
65,
58,
17,
7131,
18,
12962,
198,
198,
8818,
220,
544,
84,
13807,
85,
405,
7,
4475,
16,
3712,
15633,
11,
3128,
17,
3712,
15633,
8,
198,
220,
220,
220,
220,
220,
1303,
20768,
1096,
2163,
1441,
9633,
198,
220,
220,
220,
220,
220,
279,
85,
71,
796,
1976,
27498,
7,
43879,
2414,
11,
513,
11,
362,
8,
198,
220,
220,
220,
220,
220,
279,
85,
65,
796,
1976,
27498,
7,
43879,
2414,
11,
513,
11,
362,
8,
198,
220,
220,
220,
198,
220,
220,
220,
220,
220,
3722,
796,
269,
13345,
19510,
25,
544,
84,
13807,
85,
405,
11,
9195,
568,
13331,
62,
66,
828,
327,
600,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
34,
23352,
11,
327,
23352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6524,
90,
34,
23352,
5512,
6524,
90,
34,
23352,
92,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10385,
7,
43879,
2414,
11,
3128,
16,
828,
10385,
7,
43879,
2414,
11,
3128,
17,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
71,
11,
279,
85,
65,
8,
198,
220,
220,
220,
198,
220,
220,
220,
220,
220,
1441,
3722,
11,
9447,
265,
8609,
90,
17,
11,
18,
92,
7,
79,
85,
71,
33809,
9447,
265,
8609,
90,
17,
11,
18,
92,
7,
79,
85,
65,
11537,
198,
220,
220,
886
] | 2.167251 | 1,997 |