content
stringlengths
5
1.03M
input_ids
sequencelengths
4
823k
ratio_char_token
float64
0.4
12.5
token_count
int64
4
823k
############################################ ################ Structures ################ ############################################ function glb(types...) # If a lower bound is in the types then it is greatest # else we just return Unknown for now for type in types all(type <: t_ for t_ in types) && return type end return Unknown end function input_target_scitypes(models, metalearner) # The target scitype is defined as the greatest lower bound of the # metalearner and the base models in the library all_tg_scitypes = [target_scitype(m) for m in models] tg_scitype = glb(target_scitype(metalearner), all_tg_scitypes...) # The input scitype is defined as the greatest lower bound of the # base models in the library inp_scitype = glb([input_scitype(m) for m in models]...) return inp_scitype, tg_scitype end mutable struct DeterministicStack{modelnames, inp_scitype, tg_scitype} <: DeterministicComposite models::Vector{Supervised} metalearner::Deterministic resampling measures::Union{Nothing,AbstractVector} function DeterministicStack(modelnames, models, metalearner, resampling, measures) inp_scitype, tg_scitype = input_target_scitypes(models, metalearner) return new{modelnames, inp_scitype, tg_scitype}(models, metalearner, resampling, measures) end end mutable struct ProbabilisticStack{modelnames, inp_scitype, tg_scitype} <: ProbabilisticComposite models::Vector{Supervised} metalearner::Probabilistic resampling measures::Union{Nothing,AbstractVector} function ProbabilisticStack(modelnames, models, metalearner, resampling, measures) inp_scitype, tg_scitype = input_target_scitypes(models, metalearner) return new{modelnames, inp_scitype, tg_scitype}(models, metalearner, resampling, measures) end end const Stack{modelnames, inp_scitype, tg_scitype} = Union{DeterministicStack{modelnames, inp_scitype, tg_scitype}, ProbabilisticStack{modelnames, inp_scitype, tg_scitype}} """ Stack(;metalearner=nothing, resampling=CV(), name1=model1, name2=model2, ...) Implements the two-layer generalized stack algorithm introduced by [Wolpert (1992)](https://www.sciencedirect.com/science/article/abs/pii/S0893608005800231) and generalized by [Van der Laan et al (2007)](https://biostats.bepress.com/ucbbiostat/paper222/). Returns an instance of type `ProbablisiticStack` or `DeterministicStack`, depending on the prediction type of `metalearner`. When training a machine bound to such an instance: - The data is split into training/validation sets according to the specified `resampling` strategy. - Each base model `model1`, `model2`, ... is trained on each training subset and outputs predictions on the corresponding validation sets. The multi-fold predictions are spliced together into a so-called out-of-sample prediction for each model. - The adjudicating model, `metalearner`, is subsequently trained on the out-of-sample predictions to learn the best combination of base model predictions. - Each base model is retrained on all supplied data for purposes of passing on new production data onto the adjudicator for making new predictions ### Arguments - `metalearner::Supervised`: The model that will optimize the desired criterion based on its internals. For instance, a LinearRegression model will optimize the squared error. - `resampling`: The resampling strategy used to prepare out-of-sample predictions of the base learners. It can be a user-defined strategy, the only caveat being that it should have a `nfolds` attribute. - `measures`: A measure or iterable over measures, to perform an internal evaluation of the learners in the Stack while training. This is not for the evaluation of the Stack itself. - `name1=model1, name2=model2, ...`: the `Supervised` model instances to be used as base learners. The provided names become properties of the instance created to allow hyper-parameter access ### Example The following code defines a `DeterministicStack` instance for learning a `Continuous` target, and demonstrates that: - Base models can be `Probabilistic` models even if the stack itself is `Deterministic` (`predict_mean` is applied in such cases). - As an alternative to hyperparameter optimization, one can stack multiple copies of given model, mutating the hyper-parameter used in each copy. ```julia using MLJ DecisionTreeRegressor = @load DecisionTreeRegressor pkg=DecisionTree EvoTreeRegressor = @load EvoTreeRegressor XGBoostRegressor = @load XGBoostRegressor KNNRegressor = @load KNNRegressor pkg=NearestNeighborModels LinearRegressor = @load LinearRegressor pkg=MLJLinearModels X, y = make_regression(500, 5) stack = Stack(;metalearner=LinearRegressor(), resampling=CV(), measures=rmse, constant=ConstantRegressor(), tree_2=DecisionTreeRegressor(max_depth=2), tree_3=DecisionTreeRegressor(max_depth=3), evo=EvoTreeRegressor(), knn=KNNRegressor(), xgb=XGBoostRegressor()) mach = machine(stack, X, y) evaluate!(mach; resampling=Holdout(), measure=rmse) ``` The internal evaluation report can be accessed like this and provides a PerformanceEvaluation object for each model: ```julia report(mach).cv_report ``` """ function Stack(;metalearner=nothing, resampling=CV(), measure=nothing, measures=measure, named_models...) metalearner === nothing && throw(ArgumentError("No metalearner specified. Use Stack(metalearner=...)")) nt = NamedTuple(named_models) modelnames = keys(nt) models = collect(nt) if (measures !== nothing) && !(measures isa AbstractVector) measures = [measures, ] end if metalearner isa Deterministic stack = DeterministicStack(modelnames, models, metalearner, resampling, measures) elseif metalearner isa Probabilistic stack = ProbabilisticStack(modelnames, models, metalearner, resampling, measures) else throw(ArgumentError("The metalearner should be a subtype of $(Union{Deterministic, Probabilistic})")) end # Issuing clean! statement message = MMI.clean!(stack) isempty(message) || @warn message # Warning if either input_scitype/target_scitype is # Unknown at construction time params = typeof(stack).parameters params[end-1] == Unknown && @warn "Could not infer input_scitype of the stack" params[end] == Unknown && @warn "Could not infer target_scitype of the stack" return stack end function MMI.clean!(stack::Stack{modelnames, inp_scitype, tg_scitype}) where {modelnames,inp_scitype,tg_scitype} # We only carry checks and don't try to correct the arguments here message = "" # Checking target_scitype and input_scitype have not been changed from the original stack glb_inp_scitype, glb_tg_scitype = input_target_scitypes(getfield(stack, :models), stack.metalearner) glb_inp_scitype == inp_scitype || throw(DomainError(inp_scitype, "The newly inferred input_scitype of the stack doesn't match its original one. You have probably changed one of the base models or the metalearner to a non compatible type.")) glb_tg_scitype == tg_scitype || throw(DomainError(tg_scitype, "The newly inferred target_scitype of the stack doesn't match its original one. You have probably changed one of the base model or the metalearner to a non compatible type.")) # Checking the target scitype is consistent with either Probabilistic/Deterministic Stack target_scitype(stack.metalearner) <: Union{AbstractArray{<:Continuous}, AbstractArray{<:Finite}} || throw(ArgumentError("The metalearner should have target_scitype: $(Union{AbstractArray{<:Continuous}, AbstractArray{<:Finite}})")) return message end Base.propertynames(::Stack{modelnames}) where modelnames = tuple(:resampling, :metalearner, modelnames...) function Base.getproperty(stack::Stack{modelnames}, name::Symbol) where modelnames name === :metalearner && return getfield(stack, :metalearner) name === :resampling && return getfield(stack, :resampling) name == :measures && return getfield(stack, :measures) models = getfield(stack, :models) for j in eachindex(modelnames) name === modelnames[j] && return models[j] end error("type Stack has no property $name") end function Base.setproperty!(stack::Stack{modelnames}, _name::Symbol, val) where modelnames _name === :metalearner && return setfield!(stack, :metalearner, val) _name === :resampling && return setfield!(stack, :resampling, val) _name === :measures && return setfield!(stack, :measures, val) idx = findfirst(==(_name), modelnames) idx isa Nothing || return getfield(stack, :models)[idx] = val error("type Stack has no property $name") end MMI.target_scitype(::Type{<:Stack{modelnames, input_scitype, target_scitype}}) where {modelnames, input_scitype, target_scitype} = target_scitype MMI.input_scitype(::Type{<:Stack{modelnames, input_scitype, target_scitype}}) where {modelnames, input_scitype, target_scitype} = input_scitype MLJBase.load_path(::Type{<:ProbabilisticStack}) = "MLJBase.ProbabilisticStack" MLJBase.load_path(::Type{<:DeterministicStack}) = "MLJBase.DeterministicStack" MLJBase.package_name(::Type{<:Stack}) = "MLJBase" MLJBase.package_uuid(::Type{<:Stack}) = "a7f614a8-145f-11e9-1d2a-a57a1082229d" MLJBase.package_url(::Type{<:Stack}) = "https://github.com/alan-turing-institute/MLJBase.jl" MLJBase.package_license(::Type{<:Stack}) = "MIT" ########################################################### ################# Node operations Methods ################# ########################################################### getfolds(y::AbstractNode, cv::CV, n::Int) = source(train_test_pairs(cv, 1:n)) getfolds(y::AbstractNode, cv::StratifiedCV, n::Int) = node(YY->train_test_pairs(cv, 1:n, YY), y) trainrows(X::AbstractNode, folds::AbstractNode, nfold) = node((XX, ff) -> selectrows(XX, ff[nfold][1]), X, folds) testrows(X::AbstractNode, folds::AbstractNode, nfold) = node((XX, ff) -> selectrows(XX, ff[nfold][2]), X, folds) pre_judge_transform(ŷ::Node, ::Type{<:Probabilistic}, ::Type{<:AbstractArray{<:Finite}}) = node(ŷ -> pdf(ŷ, levels(first(ŷ))), ŷ) pre_judge_transform(ŷ::Node, ::Type{<:Probabilistic}, ::Type{<:AbstractArray{<:Continuous}}) = node(ŷ->mean.(ŷ), ŷ) pre_judge_transform(ŷ::Node, ::Type{<:Deterministic}, ::Type{<:AbstractArray{<:Continuous}}) = ŷ store_for_evaluation(mach::Machine, Xtest::AbstractNode, ytest::AbstractNode, measures::Nothing) = nothing function store_for_evaluation(mach::Machine, Xtest::AbstractNode, ytest::AbstractNode, measures) node((ytest, Xtest) -> [mach, Xtest, ytest], ytest, Xtest) end """ internal_stack_report(m::Stack, verbosity::Int, y::AbstractNode, folds_evaluations::Vararg{Nothing}) When measure/measures is a Nothing, the folds_evaluation won't have been filled by `store_for_evaluation` and we thus return an empty NamedTuple. """ internal_stack_report(m::Stack, verbosity::Int, y::AbstractNode, folds_evaluations::Vararg{Nothing}) = NamedTuple{}() """ internal_stack_report(m::Stack, verbosity::Int, y::AbstractNode, folds_evaluations::Vararg{AbstractNode}) When measure/measures is provided, the folds_evaluation will have been filled by `store_for_evaluation`. This function is not doing any heavy work (not constructing nodes corresponding to measures) but just unpacking all the folds_evaluations in a single node that can be evaluated later. """ function internal_stack_report(m::Stack, verbosity::Int, y::AbstractNode, folds_evaluations::Vararg{AbstractNode}) _internal_stack_report(y, folds_evaluations...) = internal_stack_report(m, verbosity, y, folds_evaluations...) return (report=(cv_report=node(_internal_stack_report, y, folds_evaluations...),),) end """ internal_stack_report(stack::Stack{modelnames,}, verbosity::Int, y, folds_evaluations...) where modelnames Returns a `NamedTuple` of `PerformanceEvaluation` objects, one for each model. The folds_evaluations are built in a flatten array respecting the order given by: (fold_1:(model_1:[mach, Xtest, ytest], model_2:[mach, Xtest, ytest], ...), fold_2:(model_1, model_2, ...), ...) """ function internal_stack_report(stack::Stack{modelnames,}, verbosity::Int, y, folds_evaluations...) where modelnames n_measures = length(stack.measures) nfolds = stack.resampling.nfolds # For each model we record the results mimicking the fields PerformanceEvaluation results = NamedTuple{modelnames}([ (measure=stack.measures, measurement=Vector{Any}(undef, n_measures), operation=_actual_operations(nothing, stack.measures, model, verbosity), per_fold=[Vector{Any}(undef, nfolds) for _ in 1:n_measures], per_observation=Vector{Union{Missing, Vector{Any}}}(missing, n_measures), fitted_params_per_fold=[], report_per_fold=[], train_test_pairs=train_test_pairs(stack.resampling, 1:nrows(y), y) ) for model in getfield(stack, :models)] ) # Update the results index = 1 for foldid in 1:nfolds for modelname in modelnames model_results = results[modelname] mach, Xtest, ytest = folds_evaluations[index] # Update report and fitted_params per fold push!(model_results.fitted_params_per_fold, fitted_params(mach)) push!(model_results.report_per_fold, report(mach)) # Loop over measures to update per_observation and per_fold for (i, (measure, operation)) in enumerate(zip(stack.measures, model_results.operation)) ypred = operation(mach, Xtest) loss = measure(ypred, ytest) # Update per_observation if reports_each_observation(measure) if model_results.per_observation[i] === missing model_results.per_observation[i] = Vector{Any}(undef, nfolds) end model_results.per_observation[i][foldid] = loss end # Update per_fold model_results.per_fold[i][foldid] = reports_each_observation(measure) ? MLJBase.aggregate(loss, measure) : loss end index += 1 end end # Update measurement field by aggregation for modelname in modelnames for (i, measure) in enumerate(stack.measures) model_results = results[modelname] model_results.measurement[i] = MLJBase.aggregate(model_results.per_fold[i], measure) end end return NamedTuple{modelnames}([PerformanceEvaluation(r...) for r in results]) end check_stack_measures(stack, verbosity::Int, measures::Nothing, y) = nothing """ check_stack_measures(stack, measures, y) Check the measures compatibility for each model in the Stack. """ function check_stack_measures(stack, verbosity::Int, measures, y) for model in getfield(stack, :models) operations = _actual_operations(nothing, measures, model, verbosity) _check_measures(measures, operations, model, y) end end """ oos_set(m::Stack, folds::AbstractNode, Xs::Source, ys::Source) This function is building the out-of-sample dataset that is later used by the `judge` for its own training. It also returns the folds_evaluations object if internal cross-validation results are requested. """ function oos_set(m::Stack, folds::AbstractNode, Xs::Source, ys::Source) Zval = [] yval = [] folds_evaluations = [] # Loop over the cross validation folds to build a training set for the metalearner. for nfold in 1:m.resampling.nfolds Xtrain = trainrows(Xs, folds, nfold) ytrain = trainrows(ys, folds, nfold) Xtest = testrows(Xs, folds, nfold) ytest = testrows(ys, folds, nfold) # Train each model on the train fold and predict on the validation fold # predictions are subsequently used as an input to the metalearner Zfold = [] for model in getfield(m, :models) mach = machine(model, Xtrain, ytrain) ypred = predict(mach, Xtest) # Internal evaluation on the fold if required push!(folds_evaluations, store_for_evaluation(mach, Xtest, ytest, m.measures)) # Dispatch the computation of the expected mean based on # the model type and target_scytype ypred = pre_judge_transform(ypred, typeof(model), target_scitype(model)) push!(Zfold, ypred) end Zfold = hcat(Zfold...) push!(Zval, Zfold) push!(yval, ytest) end Zval = MLJBase.table(vcat(Zval...)) yval = vcat(yval...) Zval, yval, folds_evaluations end ####################################### ################# Fit ################# ####################################### """ fit(m::Stack, verbosity::Int, X, y) """ function fit(m::Stack, verbosity::Int, X, y) check_stack_measures(m, verbosity, m.measures, y) n = nrows(y) Xs = source(X) ys = source(y) folds = getfolds(ys, m.resampling, n) Zval, yval, folds_evaluations = oos_set(m, folds, Xs, ys) metamach = machine(m.metalearner, Zval, yval) # Each model is retrained on the original full training set Zpred = [] for model in getfield(m, :models) mach = machine(model, Xs, ys) ypred = predict(mach, Xs) ypred = pre_judge_transform(ypred, typeof(model), target_scitype(model)) push!(Zpred, ypred) end Zpred = MLJBase.table(hcat(Zpred...)) ŷ = predict(metamach, Zpred) internal_report = internal_stack_report(m, verbosity, ys, folds_evaluations...) # We can infer the Surrogate by two calls to supertype mach = machine(supertype(supertype(typeof(m)))(), Xs, ys; predict=ŷ, internal_report...) return!(mach, m, verbosity) end
[ 29113, 7804, 4242, 198, 14468, 32112, 942, 1303, 7804, 4242, 21017, 198, 29113, 7804, 4242, 628, 198, 8818, 1278, 65, 7, 19199, 23029, 198, 220, 220, 220, 1303, 1002, 257, 2793, 5421, 318, 287, 262, 3858, 788, 340, 318, 6000, 198, 220, 220, 220, 1303, 2073, 356, 655, 1441, 16185, 329, 783, 198, 220, 220, 220, 329, 2099, 287, 3858, 198, 220, 220, 220, 220, 220, 220, 220, 477, 7, 4906, 1279, 25, 256, 62, 329, 256, 62, 287, 3858, 8, 11405, 1441, 2099, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 16185, 198, 437, 628, 198, 8818, 5128, 62, 16793, 62, 1416, 414, 12272, 7, 27530, 11, 6147, 451, 1008, 8, 198, 220, 220, 220, 1303, 383, 2496, 629, 414, 431, 318, 5447, 355, 262, 6000, 2793, 5421, 286, 262, 198, 220, 220, 220, 1303, 6147, 451, 1008, 290, 262, 2779, 4981, 287, 262, 5888, 198, 220, 220, 220, 477, 62, 25297, 62, 1416, 414, 12272, 796, 685, 16793, 62, 1416, 414, 431, 7, 76, 8, 329, 285, 287, 4981, 60, 198, 220, 220, 220, 256, 70, 62, 1416, 414, 431, 796, 1278, 65, 7, 16793, 62, 1416, 414, 431, 7, 28469, 451, 1008, 828, 477, 62, 25297, 62, 1416, 414, 12272, 23029, 198, 220, 220, 220, 1303, 383, 5128, 629, 414, 431, 318, 5447, 355, 262, 6000, 2793, 5421, 286, 262, 198, 220, 220, 220, 1303, 2779, 4981, 287, 262, 5888, 198, 220, 220, 220, 287, 79, 62, 1416, 414, 431, 796, 1278, 65, 26933, 15414, 62, 1416, 414, 431, 7, 76, 8, 329, 285, 287, 4981, 60, 23029, 628, 220, 220, 220, 1441, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 198, 437, 628, 198, 76, 18187, 2878, 45559, 49228, 25896, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 92, 1279, 25, 45559, 49228, 5377, 1930, 578, 198, 220, 220, 4981, 3712, 38469, 90, 12442, 16149, 92, 198, 220, 220, 6147, 451, 1008, 3712, 35, 2357, 49228, 198, 220, 220, 581, 321, 11347, 198, 220, 220, 5260, 3712, 38176, 90, 18465, 11, 23839, 38469, 92, 198, 220, 220, 2163, 45559, 49228, 25896, 7, 19849, 14933, 11, 4981, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 220, 220, 220, 220, 220, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 796, 5128, 62, 16793, 62, 1416, 414, 12272, 7, 27530, 11, 6147, 451, 1008, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 92, 7, 27530, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 886, 198, 437, 198, 198, 76, 18187, 2878, 30873, 14991, 2569, 25896, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 92, 1279, 25, 30873, 14991, 2569, 5377, 1930, 578, 198, 220, 220, 220, 4981, 3712, 38469, 90, 12442, 16149, 92, 198, 220, 220, 220, 6147, 451, 1008, 3712, 2964, 65, 14991, 2569, 198, 220, 220, 220, 581, 321, 11347, 198, 220, 220, 220, 5260, 3712, 38176, 90, 18465, 11, 23839, 38469, 92, 198, 220, 220, 220, 2163, 30873, 14991, 2569, 25896, 7, 19849, 14933, 11, 4981, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 220, 220, 220, 220, 220, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 796, 5128, 62, 16793, 62, 1416, 414, 12272, 7, 27530, 11, 6147, 451, 1008, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 92, 7, 27530, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 220, 886, 198, 886, 628, 198, 9979, 23881, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 92, 796, 198, 220, 220, 220, 4479, 90, 35, 2357, 49228, 25896, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30873, 14991, 2569, 25896, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 11709, 198, 198, 37811, 198, 220, 220, 220, 23881, 7, 26, 28469, 451, 1008, 28, 22366, 11, 581, 321, 11347, 28, 33538, 22784, 1438, 16, 28, 19849, 16, 11, 1438, 17, 28, 19849, 17, 11, 2644, 8, 198, 198, 3546, 1154, 902, 262, 734, 12, 29289, 38284, 8931, 11862, 5495, 416, 198, 58, 54, 349, 11766, 198, 7, 23847, 15437, 7, 5450, 1378, 2503, 13, 36216, 5864, 1060, 13, 785, 14, 16801, 14, 20205, 14, 8937, 14, 79, 4178, 14, 50, 2919, 6052, 1899, 7410, 3365, 405, 25667, 8, 198, 392, 38284, 416, 685, 25298, 4587, 4689, 272, 2123, 435, 198, 7, 12726, 15437, 7, 5450, 1378, 8482, 455, 1381, 13, 65, 538, 601, 13, 785, 14, 1229, 65, 8482, 455, 265, 14, 20189, 23148, 14, 737, 16409, 281, 198, 39098, 286, 2099, 4600, 2964, 65, 23117, 271, 16233, 25896, 63, 393, 4600, 35, 2357, 49228, 25896, 47671, 198, 44023, 319, 262, 17724, 2099, 286, 4600, 28469, 451, 1008, 44646, 198, 198, 2215, 3047, 257, 4572, 5421, 284, 884, 281, 4554, 25, 198, 198, 12, 383, 1366, 318, 6626, 656, 3047, 14, 12102, 341, 5621, 1864, 284, 262, 198, 220, 7368, 4600, 411, 321, 11347, 63, 4811, 13, 198, 198, 12, 5501, 2779, 2746, 4600, 19849, 16, 47671, 4600, 19849, 17, 47671, 2644, 318, 8776, 319, 1123, 3047, 198, 220, 24637, 290, 23862, 16277, 319, 262, 11188, 21201, 198, 220, 5621, 13, 383, 5021, 12, 11379, 16277, 389, 4328, 3711, 1978, 656, 257, 198, 220, 523, 12, 7174, 503, 12, 1659, 12, 39873, 17724, 329, 1123, 2746, 13, 198, 198, 12, 383, 33719, 12364, 2746, 11, 4600, 28469, 451, 1008, 47671, 318, 12412, 8776, 319, 198, 220, 262, 503, 12, 1659, 12, 39873, 16277, 284, 2193, 262, 1266, 6087, 286, 2779, 198, 220, 2746, 16277, 13, 198, 198, 12, 5501, 2779, 2746, 318, 1005, 13363, 319, 477, 14275, 1366, 329, 4959, 286, 198, 220, 6427, 319, 649, 3227, 1366, 4291, 262, 33719, 26407, 329, 1642, 649, 198, 220, 16277, 198, 198, 21017, 20559, 2886, 198, 198, 12, 4600, 28469, 451, 1008, 3712, 12442, 16149, 63, 25, 383, 2746, 326, 481, 27183, 262, 10348, 198, 220, 34054, 1912, 319, 663, 1788, 874, 13, 220, 1114, 4554, 11, 257, 44800, 8081, 2234, 198, 220, 2746, 481, 27183, 262, 44345, 4049, 13, 198, 198, 12, 4600, 411, 321, 11347, 63, 25, 383, 581, 321, 11347, 4811, 973, 198, 220, 284, 8335, 503, 12, 1659, 12, 39873, 16277, 286, 262, 2779, 46184, 13, 220, 198, 220, 632, 460, 307, 257, 2836, 12, 23211, 4811, 11, 262, 691, 220, 198, 220, 36531, 852, 326, 340, 815, 423, 257, 4600, 77, 69, 10119, 63, 11688, 13, 198, 198, 12, 4600, 47336, 63, 25, 317, 3953, 393, 11629, 540, 625, 5260, 11, 284, 1620, 281, 5387, 220, 198, 220, 12660, 286, 262, 46184, 287, 262, 23881, 981, 3047, 13, 770, 318, 407, 329, 262, 198, 220, 12660, 286, 262, 23881, 2346, 13, 198, 198, 12, 4600, 3672, 16, 28, 19849, 16, 11, 1438, 17, 28, 19849, 17, 11, 2644, 63, 25, 262, 4600, 12442, 16149, 63, 2746, 10245, 198, 220, 284, 307, 973, 355, 2779, 46184, 13, 220, 383, 2810, 3891, 1716, 6608, 198, 220, 286, 262, 4554, 2727, 284, 1249, 8718, 12, 17143, 2357, 1895, 628, 198, 21017, 17934, 198, 198, 464, 1708, 2438, 15738, 257, 4600, 35, 2357, 49228, 25896, 63, 4554, 329, 198, 40684, 257, 4600, 17875, 5623, 63, 2496, 11, 290, 15687, 326, 25, 198, 198, 12, 7308, 4981, 460, 307, 4600, 2964, 65, 14991, 2569, 63, 4981, 772, 611, 262, 8931, 198, 220, 2346, 318, 4600, 35, 2357, 49228, 63, 357, 63, 79, 17407, 62, 32604, 63, 318, 5625, 287, 884, 2663, 737, 198, 198, 12, 1081, 281, 5559, 284, 8718, 17143, 2357, 23989, 11, 530, 460, 8931, 198, 220, 3294, 9088, 286, 1813, 2746, 11, 4517, 803, 262, 8718, 12, 17143, 2357, 973, 287, 198, 220, 1123, 4866, 13, 628, 198, 15506, 63, 73, 43640, 198, 3500, 10373, 41, 198, 198, 10707, 1166, 27660, 8081, 44292, 796, 2488, 2220, 26423, 27660, 8081, 44292, 279, 10025, 28, 10707, 1166, 27660, 198, 36, 13038, 27660, 8081, 44292, 796, 2488, 2220, 4319, 78, 27660, 8081, 44292, 198, 55, 4579, 78, 455, 8081, 44292, 796, 2488, 2220, 1395, 4579, 78, 455, 8081, 44292, 198, 42, 6144, 8081, 44292, 796, 2488, 2220, 509, 6144, 8081, 44292, 279, 10025, 28, 8199, 12423, 46445, 2865, 5841, 1424, 198, 14993, 451, 8081, 44292, 796, 2488, 2220, 44800, 8081, 44292, 279, 10025, 28, 5805, 41, 14993, 451, 5841, 1424, 198, 198, 55, 11, 331, 796, 787, 62, 2301, 2234, 7, 4059, 11, 642, 8, 198, 198, 25558, 796, 23881, 7, 26, 28469, 451, 1008, 28, 14993, 451, 8081, 44292, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 581, 321, 11347, 28, 33538, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5260, 28, 26224, 325, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6937, 28, 3103, 18797, 8081, 44292, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5509, 62, 17, 28, 10707, 1166, 27660, 8081, 44292, 7, 9806, 62, 18053, 28, 17, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5509, 62, 18, 28, 10707, 1166, 27660, 8081, 44292, 7, 9806, 62, 18053, 28, 18, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 819, 78, 28, 36, 13038, 27660, 8081, 44292, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 638, 77, 28, 42, 6144, 8081, 44292, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 22296, 28, 55, 4579, 78, 455, 8081, 44292, 28955, 198, 198, 76, 620, 796, 4572, 7, 25558, 11, 1395, 11, 331, 8, 198, 49786, 0, 7, 76, 620, 26, 581, 321, 11347, 28, 26807, 448, 22784, 3953, 28, 26224, 325, 8, 198, 198, 15506, 63, 198, 198, 464, 5387, 12660, 989, 460, 307, 17535, 588, 428, 220, 198, 392, 3769, 257, 15193, 36, 2100, 2288, 2134, 329, 1123, 2746, 25, 198, 198, 15506, 63, 73, 43640, 198, 13116, 7, 76, 620, 737, 33967, 62, 13116, 198, 15506, 63, 198, 198, 37811, 198, 8818, 23881, 7, 26, 28469, 451, 1008, 28, 22366, 11, 581, 321, 11347, 28, 33538, 22784, 3953, 28, 22366, 11, 5260, 28, 1326, 5015, 11, 3706, 62, 27530, 23029, 198, 220, 220, 220, 6147, 451, 1008, 24844, 2147, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 2949, 6147, 451, 1008, 7368, 13, 5765, 23881, 7, 28469, 451, 1008, 28, 986, 16725, 4008, 628, 220, 220, 220, 299, 83, 796, 34441, 51, 29291, 7, 13190, 62, 27530, 8, 198, 220, 220, 220, 2746, 14933, 796, 8251, 7, 429, 8, 198, 220, 220, 220, 4981, 796, 2824, 7, 429, 8, 198, 220, 220, 220, 611, 357, 47336, 5145, 855, 2147, 8, 11405, 5145, 7, 47336, 318, 64, 27741, 38469, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5260, 796, 685, 47336, 11, 2361, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 6147, 451, 1008, 318, 64, 45559, 49228, 198, 220, 220, 220, 220, 220, 220, 220, 8931, 796, 220, 45559, 49228, 25896, 7, 19849, 14933, 11, 4981, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 220, 2073, 361, 6147, 451, 1008, 318, 64, 30873, 14991, 2569, 198, 220, 220, 220, 220, 220, 220, 220, 8931, 796, 30873, 14991, 2569, 25896, 7, 19849, 14933, 11, 4981, 11, 6147, 451, 1008, 11, 581, 321, 11347, 11, 5260, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 464, 6147, 451, 1008, 815, 307, 257, 850, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 286, 29568, 38176, 90, 35, 2357, 49228, 11, 30873, 14991, 2569, 92, 16725, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 1849, 27738, 4250, 3424, 0, 2643, 198, 220, 220, 220, 3275, 796, 337, 8895, 13, 27773, 0, 7, 25558, 8, 198, 220, 220, 220, 318, 28920, 7, 20500, 8, 8614, 2488, 40539, 3275, 628, 220, 220, 220, 1303, 15932, 611, 2035, 5128, 62, 1416, 414, 431, 14, 16793, 62, 1416, 414, 431, 318, 198, 220, 220, 220, 1303, 16185, 379, 5103, 640, 198, 220, 220, 220, 42287, 796, 2099, 1659, 7, 25558, 737, 17143, 7307, 198, 220, 220, 220, 42287, 58, 437, 12, 16, 60, 6624, 16185, 11405, 2488, 40539, 366, 23722, 407, 13249, 5128, 62, 1416, 414, 431, 286, 262, 8931, 1, 198, 220, 220, 220, 42287, 58, 437, 60, 6624, 16185, 11405, 2488, 40539, 366, 23722, 407, 13249, 2496, 62, 1416, 414, 431, 286, 262, 8931, 1, 628, 220, 220, 220, 1441, 8931, 198, 437, 628, 198, 8818, 337, 8895, 13, 27773, 0, 7, 25558, 3712, 25896, 90, 19849, 14933, 11, 287, 79, 62, 1416, 414, 431, 11, 256, 70, 62, 1416, 414, 431, 30072, 810, 1391, 19849, 14933, 11, 259, 79, 62, 1416, 414, 431, 11, 25297, 62, 1416, 414, 431, 92, 198, 220, 220, 220, 1303, 775, 691, 3283, 8794, 290, 836, 470, 1949, 284, 3376, 262, 7159, 994, 198, 220, 220, 220, 3275, 796, 13538, 198, 220, 220, 220, 1303, 39432, 2496, 62, 1416, 414, 431, 290, 5128, 62, 1416, 414, 431, 423, 407, 587, 3421, 422, 262, 2656, 8931, 198, 220, 220, 220, 1278, 65, 62, 259, 79, 62, 1416, 414, 431, 11, 1278, 65, 62, 25297, 62, 1416, 414, 431, 796, 5128, 62, 16793, 62, 1416, 414, 12272, 7, 1136, 3245, 7, 25558, 11, 1058, 27530, 828, 8931, 13, 28469, 451, 1008, 8, 198, 220, 220, 220, 1278, 65, 62, 259, 79, 62, 1416, 414, 431, 6624, 287, 79, 62, 1416, 414, 431, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 259, 79, 62, 1416, 414, 431, 11, 366, 464, 8308, 41240, 5128, 62, 1416, 414, 431, 286, 262, 8931, 1595, 470, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2872, 663, 2656, 530, 13, 921, 423, 2192, 3421, 530, 286, 262, 2779, 4981, 393, 262, 6147, 451, 1008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 257, 1729, 11670, 2099, 526, 4008, 198, 220, 220, 220, 1278, 65, 62, 25297, 62, 1416, 414, 431, 6624, 256, 70, 62, 1416, 414, 431, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 25297, 62, 1416, 414, 431, 11, 366, 464, 8308, 41240, 2496, 62, 1416, 414, 431, 286, 262, 8931, 1595, 470, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2872, 663, 2656, 530, 13, 921, 423, 2192, 3421, 530, 286, 262, 2779, 2746, 393, 262, 6147, 451, 1008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 257, 1729, 11670, 2099, 526, 4008, 198, 220, 220, 220, 1303, 39432, 262, 2496, 629, 414, 431, 318, 6414, 351, 2035, 30873, 14991, 2569, 14, 35, 2357, 49228, 23881, 198, 220, 220, 220, 2496, 62, 1416, 414, 431, 7, 25558, 13, 28469, 451, 1008, 8, 1279, 25, 4479, 90, 23839, 19182, 90, 27, 25, 17875, 5623, 5512, 27741, 19182, 90, 27, 25, 37, 9504, 11709, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 464, 6147, 451, 1008, 815, 423, 2496, 62, 1416, 414, 431, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 38176, 90, 23839, 19182, 90, 27, 25, 17875, 5623, 5512, 27741, 19182, 90, 27, 25, 37, 9504, 11709, 16725, 4008, 628, 220, 220, 220, 1441, 3275, 198, 437, 628, 198, 14881, 13, 26745, 14933, 7, 3712, 25896, 90, 19849, 14933, 30072, 810, 2746, 14933, 796, 46545, 7, 25, 411, 321, 11347, 11, 1058, 28469, 451, 1008, 11, 2746, 14933, 23029, 628, 198, 8818, 7308, 13, 1136, 26745, 7, 25558, 3712, 25896, 90, 19849, 14933, 5512, 1438, 3712, 13940, 23650, 8, 810, 2746, 14933, 198, 220, 220, 220, 1438, 24844, 1058, 28469, 451, 1008, 11405, 1441, 651, 3245, 7, 25558, 11, 1058, 28469, 451, 1008, 8, 198, 220, 220, 220, 1438, 24844, 1058, 411, 321, 11347, 11405, 1441, 651, 3245, 7, 25558, 11, 1058, 411, 321, 11347, 8, 198, 220, 220, 220, 1438, 6624, 1058, 47336, 11405, 1441, 651, 3245, 7, 25558, 11, 1058, 47336, 8, 198, 220, 220, 220, 4981, 796, 651, 3245, 7, 25558, 11, 1058, 27530, 8, 198, 220, 220, 220, 329, 474, 287, 1123, 9630, 7, 19849, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 24844, 2746, 14933, 58, 73, 60, 11405, 1441, 4981, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4049, 7203, 4906, 23881, 468, 645, 3119, 720, 3672, 4943, 198, 437, 628, 198, 8818, 7308, 13, 2617, 26745, 0, 7, 25558, 3712, 25896, 90, 19849, 14933, 5512, 4808, 3672, 3712, 13940, 23650, 11, 1188, 8, 810, 2746, 14933, 198, 220, 220, 220, 4808, 3672, 24844, 1058, 28469, 451, 1008, 11405, 1441, 900, 3245, 0, 7, 25558, 11, 1058, 28469, 451, 1008, 11, 1188, 8, 198, 220, 220, 220, 4808, 3672, 24844, 1058, 411, 321, 11347, 11405, 1441, 900, 3245, 0, 7, 25558, 11, 1058, 411, 321, 11347, 11, 1188, 8, 198, 220, 220, 220, 4808, 3672, 24844, 1058, 47336, 11405, 1441, 900, 3245, 0, 7, 25558, 11, 1058, 47336, 11, 1188, 8, 198, 220, 220, 220, 4686, 87, 796, 1064, 11085, 7, 855, 28264, 3672, 828, 2746, 14933, 8, 198, 220, 220, 220, 4686, 87, 318, 64, 10528, 8614, 1441, 651, 3245, 7, 25558, 11, 1058, 27530, 38381, 312, 87, 60, 796, 1188, 198, 220, 220, 220, 4049, 7203, 4906, 23881, 468, 645, 3119, 720, 3672, 4943, 198, 437, 628, 198, 44, 8895, 13, 16793, 62, 1416, 414, 431, 7, 3712, 6030, 90, 27, 25, 25896, 90, 19849, 14933, 11, 5128, 62, 1416, 414, 431, 11, 2496, 62, 1416, 414, 431, 11709, 8, 810, 198, 220, 220, 220, 1391, 19849, 14933, 11, 5128, 62, 1416, 414, 431, 11, 2496, 62, 1416, 414, 431, 92, 796, 2496, 62, 1416, 414, 431, 628, 198, 44, 8895, 13, 15414, 62, 1416, 414, 431, 7, 3712, 6030, 90, 27, 25, 25896, 90, 19849, 14933, 11, 5128, 62, 1416, 414, 431, 11, 2496, 62, 1416, 414, 431, 11709, 8, 810, 198, 220, 220, 220, 1391, 19849, 14933, 11, 5128, 62, 1416, 414, 431, 11, 2496, 62, 1416, 414, 431, 92, 796, 5128, 62, 1416, 414, 431, 628, 198, 5805, 41, 14881, 13, 2220, 62, 6978, 7, 3712, 6030, 90, 27, 25, 2964, 65, 14991, 2569, 25896, 30072, 796, 366, 5805, 41, 14881, 13, 2964, 65, 14991, 2569, 25896, 1, 198, 5805, 41, 14881, 13, 2220, 62, 6978, 7, 3712, 6030, 90, 27, 25, 35, 2357, 49228, 25896, 30072, 796, 366, 5805, 41, 14881, 13, 35, 2357, 49228, 25896, 1, 198, 5805, 41, 14881, 13, 26495, 62, 3672, 7, 3712, 6030, 90, 27, 25, 25896, 30072, 796, 366, 5805, 41, 14881, 1, 198, 5805, 41, 14881, 13, 26495, 62, 12303, 312, 7, 3712, 6030, 90, 27, 25, 25896, 30072, 796, 366, 64, 22, 69, 46841, 64, 23, 12, 18781, 69, 12, 1157, 68, 24, 12, 16, 67, 17, 64, 12, 64, 3553, 64, 15711, 1828, 1959, 67, 1, 198, 5805, 41, 14881, 13, 26495, 62, 6371, 7, 3712, 6030, 90, 27, 25, 25896, 30072, 796, 366, 5450, 1378, 12567, 13, 785, 14, 25786, 12, 83, 870, 12, 8625, 3678, 14, 5805, 41, 14881, 13, 20362, 1, 198, 5805, 41, 14881, 13, 26495, 62, 43085, 7, 3712, 6030, 90, 27, 25, 25896, 30072, 796, 366, 36393, 1, 198, 198, 29113, 14468, 7804, 21017, 198, 14468, 2, 19081, 4560, 25458, 1303, 14468, 198, 29113, 14468, 7804, 21017, 628, 198, 1136, 69, 10119, 7, 88, 3712, 23839, 19667, 11, 269, 85, 3712, 33538, 11, 299, 3712, 5317, 8, 796, 198, 220, 220, 220, 2723, 7, 27432, 62, 9288, 62, 79, 3468, 7, 33967, 11, 352, 25, 77, 4008, 198, 198, 1136, 69, 10119, 7, 88, 3712, 23839, 19667, 11, 269, 85, 3712, 1273, 10366, 1431, 33538, 11, 299, 3712, 5317, 8, 796, 198, 220, 220, 220, 10139, 7, 26314, 3784, 27432, 62, 9288, 62, 79, 3468, 7, 33967, 11, 352, 25, 77, 11, 575, 56, 828, 331, 8, 198, 198, 27432, 8516, 7, 55, 3712, 23839, 19667, 11, 38744, 3712, 23839, 19667, 11, 299, 11379, 8, 796, 198, 220, 220, 220, 10139, 19510, 8051, 11, 31246, 8, 4613, 2922, 8516, 7, 8051, 11, 31246, 58, 77, 11379, 7131, 16, 46570, 1395, 11, 38744, 8, 198, 198, 9288, 8516, 7, 55, 3712, 23839, 19667, 11, 38744, 3712, 23839, 19667, 11, 299, 11379, 8, 796, 198, 220, 220, 220, 10139, 19510, 8051, 11, 31246, 8, 4613, 2922, 8516, 7, 8051, 11, 31246, 58, 77, 11379, 7131, 17, 46570, 1395, 11, 38744, 8, 628, 198, 3866, 62, 10456, 469, 62, 35636, 7, 88, 136, 224, 3712, 19667, 11, 7904, 6030, 90, 27, 25, 2964, 65, 14991, 2569, 5512, 7904, 6030, 90, 27, 25, 23839, 19182, 90, 27, 25, 37, 9504, 11709, 8, 796, 198, 220, 220, 220, 10139, 7, 88, 136, 224, 4613, 37124, 7, 88, 136, 224, 11, 2974, 7, 11085, 7, 88, 136, 224, 4008, 828, 331, 136, 224, 8, 198, 198, 3866, 62, 10456, 469, 62, 35636, 7, 88, 136, 224, 3712, 19667, 11, 7904, 6030, 90, 27, 25, 2964, 65, 14991, 2569, 5512, 7904, 6030, 90, 27, 25, 23839, 19182, 90, 27, 25, 17875, 5623, 11709, 8, 796, 198, 220, 220, 220, 10139, 7, 88, 136, 224, 3784, 32604, 12195, 88, 136, 224, 828, 331, 136, 224, 8, 198, 198, 3866, 62, 10456, 469, 62, 35636, 7, 88, 136, 224, 3712, 19667, 11, 7904, 6030, 90, 27, 25, 35, 2357, 49228, 5512, 7904, 6030, 90, 27, 25, 23839, 19182, 90, 27, 25, 17875, 5623, 11709, 8, 796, 198, 220, 220, 220, 331, 136, 224, 628, 198, 8095, 62, 1640, 62, 18206, 2288, 7, 76, 620, 3712, 37573, 11, 1395, 9288, 3712, 23839, 19667, 11, 331, 9288, 3712, 23839, 19667, 11, 5260, 3712, 18465, 8, 796, 2147, 198, 8818, 3650, 62, 1640, 62, 18206, 2288, 7, 76, 620, 3712, 37573, 11, 1395, 9288, 3712, 23839, 19667, 11, 331, 9288, 3712, 23839, 19667, 11, 5260, 8, 198, 220, 220, 220, 10139, 19510, 88, 9288, 11, 1395, 9288, 8, 4613, 685, 76, 620, 11, 1395, 9288, 11, 331, 9288, 4357, 331, 9288, 11, 1395, 9288, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5387, 62, 25558, 62, 13116, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 331, 3712, 23839, 19667, 11, 38744, 62, 18206, 6055, 3712, 19852, 853, 90, 18465, 30072, 198, 198, 2215, 3953, 14, 47336, 318, 257, 10528, 11, 262, 38744, 62, 18206, 2288, 1839, 470, 423, 587, 5901, 416, 4600, 8095, 62, 1640, 62, 18206, 2288, 63, 198, 392, 356, 4145, 1441, 281, 6565, 34441, 51, 29291, 13, 198, 37811, 198, 32538, 62, 25558, 62, 13116, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 331, 3712, 23839, 19667, 11, 38744, 62, 18206, 6055, 3712, 19852, 853, 90, 18465, 30072, 796, 34441, 51, 29291, 90, 92, 3419, 198, 198, 37811, 198, 220, 220, 220, 5387, 62, 25558, 62, 13116, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 331, 3712, 23839, 19667, 11, 38744, 62, 18206, 6055, 3712, 19852, 853, 90, 23839, 19667, 30072, 198, 198, 2215, 3953, 14, 47336, 318, 2810, 11, 262, 38744, 62, 18206, 2288, 481, 423, 587, 5901, 416, 4600, 8095, 62, 1640, 62, 18206, 2288, 44646, 770, 2163, 318, 220, 198, 1662, 1804, 597, 4334, 670, 357, 1662, 30580, 13760, 11188, 284, 5260, 8, 475, 655, 8593, 5430, 477, 262, 38744, 62, 18206, 6055, 287, 257, 2060, 10139, 326, 198, 5171, 307, 16726, 1568, 13, 198, 37811, 198, 8818, 5387, 62, 25558, 62, 13116, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 331, 3712, 23839, 19667, 11, 38744, 62, 18206, 6055, 3712, 19852, 853, 90, 23839, 19667, 30072, 198, 220, 220, 220, 4808, 32538, 62, 25558, 62, 13116, 7, 88, 11, 38744, 62, 18206, 6055, 23029, 796, 198, 220, 220, 220, 220, 220, 220, 220, 5387, 62, 25558, 62, 13116, 7, 76, 11, 15942, 16579, 11, 331, 11, 38744, 62, 18206, 6055, 23029, 198, 220, 220, 220, 1441, 357, 13116, 16193, 33967, 62, 13116, 28, 17440, 28264, 32538, 62, 25558, 62, 13116, 11, 331, 11, 38744, 62, 18206, 6055, 986, 828, 828, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5387, 62, 25558, 62, 13116, 7, 25558, 3712, 25896, 90, 19849, 14933, 11, 5512, 15942, 16579, 3712, 5317, 11, 331, 11, 38744, 62, 18206, 6055, 23029, 810, 2746, 14933, 198, 198, 35561, 257, 4600, 45, 2434, 51, 29291, 63, 286, 4600, 32273, 36, 2100, 2288, 63, 5563, 11, 530, 329, 1123, 2746, 13, 383, 38744, 62, 18206, 6055, 198, 533, 220, 3170, 287, 257, 27172, 268, 7177, 30796, 262, 1502, 1813, 416, 25, 198, 7, 11379, 62, 16, 37498, 19849, 62, 16, 33250, 76, 620, 11, 1395, 9288, 11, 331, 9288, 4357, 2746, 62, 17, 33250, 76, 620, 11, 1395, 9288, 11, 331, 9288, 4357, 2644, 828, 5591, 62, 17, 37498, 19849, 62, 16, 11, 2746, 62, 17, 11, 2644, 828, 2644, 8, 198, 37811, 198, 8818, 5387, 62, 25558, 62, 13116, 7, 25558, 3712, 25896, 90, 19849, 14933, 11, 5512, 15942, 16579, 3712, 5317, 11, 331, 11, 38744, 62, 18206, 6055, 23029, 810, 2746, 14933, 628, 220, 220, 220, 299, 62, 47336, 796, 4129, 7, 25558, 13, 47336, 8, 198, 220, 220, 220, 299, 69, 10119, 796, 8931, 13, 411, 321, 11347, 13, 77, 69, 10119, 628, 220, 220, 220, 1303, 1114, 1123, 2746, 356, 1700, 262, 2482, 17007, 7958, 262, 7032, 15193, 36, 2100, 2288, 198, 220, 220, 220, 2482, 796, 34441, 51, 29291, 90, 19849, 14933, 92, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 1326, 5015, 28, 25558, 13, 47336, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15558, 28, 38469, 90, 7149, 92, 7, 917, 891, 11, 299, 62, 47336, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4905, 28, 62, 50039, 62, 3575, 602, 7, 22366, 11, 8931, 13, 47336, 11, 2746, 11, 15942, 16579, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 583, 62, 11379, 41888, 38469, 90, 7149, 92, 7, 917, 891, 11, 299, 69, 10119, 8, 329, 4808, 287, 352, 25, 77, 62, 47336, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 583, 62, 672, 3168, 341, 28, 38469, 90, 38176, 90, 43730, 11, 20650, 90, 7149, 42535, 7, 45688, 11, 299, 62, 47336, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18235, 62, 37266, 62, 525, 62, 11379, 41888, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 989, 62, 525, 62, 11379, 41888, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 9288, 62, 79, 3468, 28, 27432, 62, 9288, 62, 79, 3468, 7, 25558, 13, 411, 321, 11347, 11, 352, 25, 77, 8516, 7, 88, 828, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 220, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2746, 287, 651, 3245, 7, 25558, 11, 1058, 27530, 15437, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 10133, 262, 2482, 198, 220, 220, 220, 6376, 796, 352, 198, 220, 220, 220, 329, 5591, 312, 287, 352, 25, 77, 69, 10119, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2746, 3672, 287, 2746, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 43420, 796, 2482, 58, 19849, 3672, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3235, 11, 1395, 9288, 11, 331, 9288, 796, 38744, 62, 18206, 6055, 58, 9630, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10133, 989, 290, 18235, 62, 37266, 583, 5591, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 19849, 62, 43420, 13, 38631, 62, 37266, 62, 525, 62, 11379, 11, 18235, 62, 37266, 7, 76, 620, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 19849, 62, 43420, 13, 13116, 62, 525, 62, 11379, 11, 989, 7, 76, 620, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 26304, 625, 5260, 284, 4296, 583, 62, 672, 3168, 341, 290, 583, 62, 11379, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 357, 1326, 5015, 11, 4905, 4008, 287, 27056, 378, 7, 13344, 7, 25558, 13, 47336, 11, 2746, 62, 43420, 13, 27184, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 28764, 796, 4905, 7, 76, 620, 11, 1395, 9288, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2994, 796, 3953, 7, 4464, 445, 11, 331, 9288, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10133, 583, 62, 672, 3168, 341, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 3136, 62, 27379, 62, 672, 3168, 341, 7, 1326, 5015, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2746, 62, 43420, 13, 525, 62, 672, 3168, 341, 58, 72, 60, 24844, 4814, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 43420, 13, 525, 62, 672, 3168, 341, 58, 72, 60, 796, 20650, 90, 7149, 92, 7, 917, 891, 11, 299, 69, 10119, 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, 220, 220, 220, 220, 2746, 62, 43420, 13, 525, 62, 672, 3168, 341, 58, 72, 7131, 11379, 312, 60, 796, 2994, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10133, 583, 62, 11379, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 43420, 13, 525, 62, 11379, 58, 72, 7131, 11379, 312, 60, 796, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3136, 62, 27379, 62, 672, 3168, 341, 7, 1326, 5015, 8, 5633, 10373, 41, 14881, 13, 9460, 49373, 7, 22462, 11, 3953, 8, 1058, 2994, 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, 6376, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 10133, 15558, 2214, 416, 46500, 198, 220, 220, 220, 329, 2746, 3672, 287, 2746, 14933, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 3953, 8, 287, 27056, 378, 7, 25558, 13, 47336, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 43420, 796, 2482, 58, 19849, 3672, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 43420, 13, 1326, 5015, 434, 58, 72, 60, 796, 10373, 41, 14881, 13, 9460, 49373, 7, 19849, 62, 43420, 13, 525, 62, 11379, 58, 72, 4357, 3953, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 34441, 51, 29291, 90, 19849, 14933, 92, 26933, 32273, 36, 2100, 2288, 7, 81, 23029, 329, 374, 287, 2482, 12962, 198, 437, 628, 198, 9122, 62, 25558, 62, 47336, 7, 25558, 11, 15942, 16579, 3712, 5317, 11, 5260, 3712, 18465, 11, 331, 8, 796, 2147, 198, 37811, 198, 220, 220, 220, 2198, 62, 25558, 62, 47336, 7, 25558, 11, 5260, 11, 331, 8, 198, 198, 9787, 262, 5260, 17764, 329, 1123, 2746, 287, 262, 23881, 13, 198, 37811, 198, 8818, 2198, 62, 25558, 62, 47336, 7, 25558, 11, 15942, 16579, 3712, 5317, 11, 5260, 11, 331, 8, 198, 220, 220, 220, 329, 2746, 287, 651, 3245, 7, 25558, 11, 1058, 27530, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4560, 796, 4808, 50039, 62, 3575, 602, 7, 22366, 11, 5260, 11, 2746, 11, 15942, 16579, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 9122, 62, 47336, 7, 47336, 11, 4560, 11, 2746, 11, 331, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 267, 418, 62, 2617, 7, 76, 3712, 25896, 11, 38744, 3712, 23839, 19667, 11, 1395, 82, 3712, 7416, 11, 331, 82, 3712, 7416, 8, 198, 198, 1212, 2163, 318, 2615, 262, 503, 12, 1659, 12, 39873, 27039, 326, 318, 1568, 973, 416, 262, 4600, 10456, 469, 63, 198, 1640, 663, 898, 3047, 13, 632, 635, 5860, 262, 38744, 62, 18206, 6055, 2134, 611, 5387, 220, 198, 19692, 12, 12102, 341, 2482, 389, 9167, 13, 198, 37811, 198, 8818, 267, 418, 62, 2617, 7, 76, 3712, 25896, 11, 38744, 3712, 23839, 19667, 11, 1395, 82, 3712, 7416, 11, 331, 82, 3712, 7416, 8, 198, 220, 220, 220, 1168, 2100, 796, 17635, 198, 220, 220, 220, 331, 2100, 796, 17635, 198, 220, 220, 220, 38744, 62, 18206, 6055, 796, 17635, 198, 220, 220, 220, 1303, 26304, 625, 262, 3272, 21201, 38744, 284, 1382, 257, 3047, 900, 329, 262, 6147, 451, 1008, 13, 198, 220, 220, 220, 329, 299, 11379, 287, 352, 25, 76, 13, 411, 321, 11347, 13, 77, 69, 10119, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 27432, 796, 4512, 8516, 7, 55, 82, 11, 38744, 11, 299, 11379, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 27432, 796, 4512, 8516, 7, 893, 11, 38744, 11, 299, 11379, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 9288, 796, 1332, 8516, 7, 55, 82, 11, 38744, 11, 299, 11379, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 9288, 796, 1332, 8516, 7, 893, 11, 38744, 11, 299, 11379, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1849, 44077, 1123, 2746, 319, 262, 4512, 5591, 290, 4331, 319, 262, 21201, 5591, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16277, 389, 12412, 973, 355, 281, 5128, 284, 262, 6147, 451, 1008, 198, 220, 220, 220, 220, 220, 220, 220, 1168, 11379, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2746, 287, 651, 3245, 7, 76, 11, 1058, 27530, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3235, 796, 4572, 7, 19849, 11, 1395, 27432, 11, 331, 27432, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 28764, 796, 4331, 7, 76, 620, 11, 1395, 9288, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 18628, 12660, 319, 262, 5591, 611, 2672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 69, 10119, 62, 18206, 6055, 11, 3650, 62, 1640, 62, 18206, 2288, 7, 76, 620, 11, 1395, 9288, 11, 331, 9288, 11, 285, 13, 47336, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35934, 262, 29964, 286, 262, 2938, 1612, 1912, 319, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 262, 2746, 2099, 290, 2496, 62, 82, 948, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 28764, 796, 662, 62, 10456, 469, 62, 35636, 7, 4464, 445, 11, 2099, 1659, 7, 19849, 828, 2496, 62, 1416, 414, 431, 7, 19849, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 57, 11379, 11, 331, 28764, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1168, 11379, 796, 289, 9246, 7, 57, 11379, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 57, 2100, 11, 1168, 11379, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 88, 2100, 11, 331, 9288, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1168, 2100, 796, 10373, 41, 14881, 13, 11487, 7, 85, 9246, 7, 57, 2100, 986, 4008, 198, 220, 220, 220, 331, 2100, 796, 410, 9246, 7, 88, 2100, 23029, 628, 220, 220, 220, 1168, 2100, 11, 331, 2100, 11, 38744, 62, 18206, 6055, 198, 437, 198, 198, 29113, 4242, 21017, 198, 14468, 2, 25048, 1303, 14468, 198, 29113, 4242, 21017, 198, 37811, 198, 220, 220, 220, 4197, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 1395, 11, 331, 8, 198, 37811, 198, 8818, 4197, 7, 76, 3712, 25896, 11, 15942, 16579, 3712, 5317, 11, 1395, 11, 331, 8, 198, 220, 220, 220, 2198, 62, 25558, 62, 47336, 7, 76, 11, 15942, 16579, 11, 285, 13, 47336, 11, 331, 8, 628, 220, 220, 220, 299, 796, 299, 8516, 7, 88, 8, 628, 220, 220, 220, 1395, 82, 796, 2723, 7, 55, 8, 198, 220, 220, 220, 331, 82, 796, 2723, 7, 88, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 38744, 796, 651, 69, 10119, 7, 893, 11, 285, 13, 411, 321, 11347, 11, 299, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1168, 2100, 11, 331, 2100, 11, 38744, 62, 18206, 6055, 796, 267, 418, 62, 2617, 7, 76, 11, 38744, 11, 1395, 82, 11, 331, 82, 8, 628, 220, 220, 220, 1138, 321, 620, 796, 4572, 7, 76, 13, 28469, 451, 1008, 11, 1168, 2100, 11, 331, 2100, 8, 628, 220, 220, 220, 1303, 5501, 2746, 318, 1005, 13363, 319, 262, 2656, 1336, 3047, 900, 198, 220, 220, 220, 1168, 28764, 796, 17635, 198, 220, 220, 220, 329, 2746, 287, 651, 3245, 7, 76, 11, 1058, 27530, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3235, 796, 4572, 7, 19849, 11, 1395, 82, 11, 331, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 28764, 796, 4331, 7, 76, 620, 11, 1395, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 28764, 796, 662, 62, 10456, 469, 62, 35636, 7, 4464, 445, 11, 2099, 1659, 7, 19849, 828, 2496, 62, 1416, 414, 431, 7, 19849, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 57, 28764, 11, 331, 28764, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1168, 28764, 796, 10373, 41, 14881, 13, 11487, 7, 71, 9246, 7, 57, 28764, 986, 4008, 198, 220, 220, 220, 331, 136, 224, 796, 4331, 7, 4164, 321, 620, 11, 1168, 28764, 8, 628, 220, 220, 220, 5387, 62, 13116, 796, 5387, 62, 25558, 62, 13116, 7, 76, 11, 15942, 16579, 11, 331, 82, 11, 38744, 62, 18206, 6055, 23029, 628, 220, 220, 220, 1303, 775, 460, 13249, 262, 4198, 3828, 378, 416, 734, 3848, 284, 2208, 4906, 198, 220, 220, 220, 3235, 796, 4572, 7, 16668, 4906, 7, 16668, 4906, 7, 4906, 1659, 7, 76, 4008, 5769, 828, 1395, 82, 11, 331, 82, 26, 4331, 28, 129, 115, 11, 5387, 62, 13116, 23029, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1441, 0, 7, 76, 620, 11, 285, 11, 15942, 16579, 8, 198, 437, 198 ]
2.708438
6,743
using .Abstract: returntype using IRTools: Variable, returnvalue, blocks, isexpr using IRTools.Inner: iscall struct Trivial end function infer(f, ::Trivial, tr = trace(typeof(f))) r = returntype(tr) r isa Abstract.Const && return Singleton(r.value) any(((v, st),) -> iscall(st.expr, observe), tr) && return r = returnvalue(blocks(tr)[end]) r isa Variable || return ex = tr[r].expr iscall(ex, rand) && ex.args[2] isa Distribution && return ex.args[2] return end
[ 3500, 764, 23839, 25, 1005, 333, 429, 2981, 198, 3500, 314, 14181, 10141, 25, 35748, 11, 1441, 8367, 11, 7021, 11, 318, 31937, 198, 3500, 314, 14181, 10141, 13, 818, 1008, 25, 318, 13345, 198, 198, 7249, 7563, 85, 498, 886, 198, 198, 8818, 13249, 7, 69, 11, 7904, 14824, 85, 498, 11, 491, 796, 12854, 7, 4906, 1659, 7, 69, 22305, 198, 220, 374, 796, 1005, 333, 429, 2981, 7, 2213, 8, 198, 220, 374, 318, 64, 27741, 13, 34184, 11405, 1441, 5573, 10565, 7, 81, 13, 8367, 8, 198, 220, 597, 19510, 7, 85, 11, 336, 828, 8, 4613, 318, 13345, 7, 301, 13, 31937, 11, 12414, 828, 491, 8, 11405, 1441, 198, 220, 374, 796, 1441, 8367, 7, 27372, 7, 2213, 38381, 437, 12962, 198, 220, 374, 318, 64, 35748, 8614, 1441, 198, 220, 409, 796, 491, 58, 81, 4083, 31937, 198, 220, 318, 13345, 7, 1069, 11, 43720, 8, 11405, 409, 13, 22046, 58, 17, 60, 318, 64, 27484, 11405, 1441, 409, 13, 22046, 58, 17, 60, 198, 220, 1441, 198, 437, 198 ]
2.706215
177
print("This host's word size is ", WORD_SIZE, ".") if ENDIAN_BOM == 0x04030201 println("And it is a little-endian machine.") elseif ENDIAN_BOM == 0x01020304 println("And it is a big-endian machine.") else println("ENDIAN_BOM = ", ENDIAN_BOM, ", which is confusing") end
[ 4798, 7203, 1212, 2583, 338, 1573, 2546, 318, 33172, 370, 12532, 62, 33489, 11, 366, 19570, 198, 361, 23578, 16868, 62, 33, 2662, 6624, 657, 87, 36676, 1270, 1264, 198, 220, 220, 220, 44872, 7203, 1870, 340, 318, 257, 1310, 12, 437, 666, 4572, 19570, 198, 17772, 361, 23578, 16868, 62, 33, 2662, 6624, 657, 87, 20943, 1238, 21288, 198, 220, 220, 220, 44872, 7203, 1870, 340, 318, 257, 1263, 12, 437, 666, 4572, 19570, 198, 17772, 198, 220, 220, 220, 44872, 7203, 10619, 16868, 62, 33, 2662, 796, 33172, 23578, 16868, 62, 33, 2662, 11, 33172, 543, 318, 15337, 4943, 198, 437, 198 ]
2.711538
104
# This is a simple `@debug` macro that we can use in the code # without it slowing the code down, unlike `Base.@debug`. const DEBUG_LEVEL = Ref(0) function setdebug!(level::Int) DEBUG_LEVEL[] = level return nothing end """ withdebug(level::Int) do func() end """ function withdebug(f, level) lvl = DEBUG_LEVEL[] try setdebug!(level) f() finally setdebug!(lvl) end end """ @debug 1 "msg" """ macro debug(level, msg) esc(quote if DEBUG_LEVEL[] >= $level println(string("DEBUG: ", $(QuoteNode(__source__.file)), ":", $(QuoteNode(__source__.line)), " ", $msg)) end end) end
[ 2, 770, 318, 257, 2829, 4600, 31, 24442, 63, 15021, 326, 356, 460, 779, 287, 262, 2438, 198, 2, 1231, 340, 21605, 262, 2438, 866, 11, 5023, 4600, 14881, 13, 31, 24442, 44646, 198, 198, 9979, 16959, 62, 2538, 18697, 796, 6524, 7, 15, 8, 198, 198, 8818, 900, 24442, 0, 7, 5715, 3712, 5317, 8, 198, 220, 220, 220, 16959, 62, 2538, 18697, 21737, 796, 1241, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6681, 1765, 1018, 7, 5715, 3712, 5317, 8, 466, 198, 220, 220, 220, 220, 220, 220, 220, 25439, 3419, 198, 220, 220, 220, 886, 198, 37811, 198, 8818, 6681, 1765, 1018, 7, 69, 11, 1241, 8, 198, 220, 220, 220, 33309, 796, 16959, 62, 2538, 18697, 21737, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 900, 24442, 0, 7, 5715, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 3419, 198, 220, 220, 220, 3443, 198, 220, 220, 220, 220, 220, 220, 220, 900, 24442, 0, 7, 47147, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2488, 24442, 352, 366, 19662, 1, 198, 37811, 198, 20285, 305, 14257, 7, 5715, 11, 31456, 8, 198, 220, 220, 220, 3671, 7, 22708, 198, 220, 220, 220, 220, 220, 220, 220, 611, 16959, 62, 2538, 18697, 21737, 18189, 720, 5715, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 8841, 7203, 30531, 25, 33172, 29568, 25178, 19667, 7, 834, 10459, 834, 13, 7753, 36911, 366, 25, 1600, 29568, 25178, 19667, 7, 834, 10459, 834, 13, 1370, 36911, 366, 33172, 720, 19662, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 8, 198, 437, 198 ]
2.282828
297
using DrWatson, GPUAcceleratedTracking, CUDA, Tracking, GNSSSignals, StructArrays, ProgressMeter; import Tracking: Hz, ms; @quickactivate "GPUAcceleratedTracking" N = 2048:32:262_144 err_rel = zeros(length(N)) @showprogress 0.5 for (idx, num_samples) in enumerate(N) # num_samples = 2_048 num_ants = 1 num_correlators = 3 enable_gpu = Val(true) system = GPSL1(use_gpu = Val(true)); # system_h = GPSL1(use_gpu = Val(false)); codes = system.codes # codes_text_mem_simple = CuTexture( # CuTextureArray(codes) # ) codes_text_mem = CuTexture( CuTextureArray(codes), address_mode = CUDA.ADDRESS_MODE_WRAP, interpolation = CUDA.NearestNeighbour(), normalized_coordinates = true ) code_frequency = get_code_frequency(system) code_length = get_code_length(system) start_code_phase = 0.0f0 carrier_phase = 0.0f0 carrier_frequency = 1500Hz prn = 1 # Generate the signal; signal, sampling_frequency = gen_signal(system, prn, carrier_frequency, num_samples, num_ants = NumAnts(num_ants), start_code_phase = start_code_phase, start_carrier_phase = carrier_phase) # Generate correlator; correlator = EarlyPromptLateCorrelator(NumAnts(num_ants), NumAccumulators(num_correlators)) correlator_sample_shifts = get_correlator_sample_shifts(system, correlator, sampling_frequency, 0.5) num_of_shifts = correlator_sample_shifts[end] - correlator_sample_shifts[1] # Generate blank code and carrier replica, and downconverted signal; # code_replica_cpu = zeros(Float32, num_samples + num_of_shifts) code_replica = CUDA.zeros(Float32, num_samples + num_of_shifts) code_replica_text_mem = CUDA.zeros(Float32, num_samples + num_of_shifts) # Generate CUDA kernel tuning parameters; threads_per_block = 768 blocks_per_grid = cld.(num_samples, threads_per_block) @cuda threads=threads_per_block blocks=blocks_per_grid gen_code_replica_texture_mem_kernel!( code_replica_text_mem, codes_text_mem, # texture memory codes code_frequency, sampling_frequency, start_code_phase, prn, num_samples + num_of_shifts, correlator_sample_shifts[1], code_length ) @cuda threads=threads_per_block blocks=blocks_per_grid gen_code_replica_kernel!( code_replica, codes, # texture memory codes code_frequency, sampling_frequency, start_code_phase, prn, num_samples + num_of_shifts, correlator_sample_shifts[1], code_length ) # Tracking.gen_code_replica!(code_replica_cpu, system, code_frequency, sampling_frequency, start_code_phase, 1, num_samples, correlator_sample_shifts, prn) # code_replica_h = Array(code_replica) # code_replica_text_mem_h = Array(code_replica_text_mem) # signal = StructArray{ComplexF32}((ones(Float32, num_samples), zeros(Float32, num_samples) )) # code_phases = get_code_frequency(system) / sampling_frequency .* (0:num_samples-1) .+ start_code_phase # spread_signal = StructArray(signal .* system_h.codes[1 .+ mod.(floor.(Int, code_phases), get_code_length(system)), prn]) # accums_true = Tracking.correlate(correlator, spread_signal, code_replica_cpu, correlator_sample_shifts, 1, num_samples) # accums = Tracking.correlate(correlator, spread_signal, code_replica_h, correlator_sample_shifts, 1, num_samples) # accums_text_mem = Tracking.correlate(correlator, spread_signal, code_replica_text_mem_h, correlator_sample_shifts, 1, num_samples) # err_rel = sum(abs.(code_replica - code_replica_text_mem)) / num_samples err_rel[idx] = sum(abs.(code_replica - code_replica_text_mem)) / num_samples end x = vec(collect(N / 0.001)) # convert to Hz data = vec(100 .* err_rel) data_bar = mean(data) data_med = median(data) data_max = maximum(data) using CairoMakie fig = Figure(font = "Times New Roman") ax = Axis( fig, xlabel = "Sampling Frequency [Hz]", ylabel = "Relative Code Phase Error [%]", xscale = log10, title = "Relative code phase error of the texture memory code replica generation for 1 ms GPS L1 C/A signal", # xlim = [0 400_000], xminorgridvisible = true, xminorticksvisible = true, xminorticks = IntervalsBetween(9), # yticks = (10.0 .^(-5:1:-3)), # yticks = (10.0 .^(-5:1:-3)), xticklabelsize = 18, yticklabelsize = 18 ) xlims!(ax, 10^6, 5*10^8) # string_data_bar = "$(round(data_bar, sigdigits=3))%" # string_data_max = "$(round(data_max, sigdigits=3))%" # string_data_med = "$(round(data_med, sigdigits=3))%" # # textmu = "μ = " * string_data_bar # # textmax = "max = " * string_data_max # textmed = "median = " * string_data_med lines!(ax, x,data) # hlines!(ax, data_bar, color = :dimgrey, linestyle = :dash) # hlines!(ax, data_med, color = :dimgrey, linestyle = :dash) # hlines!(ax, data_max, color = :dimgrey, linestyle = :dash) # text!(textmu, position = (9*10^8, 0.1+data_bar), align = (:right, :baseline)) # text!(textmax, position = (9*10^8, data_max - 0.2), align = (:right, :baseline)) # text!(textmed, position = (5*10^8, 0.5+data_med), align = (:center, :baseline)) fig[1,1] = ax fig @quickactivate "GPUAcceleratedTracking" raw_data_df = collect_results(datadir("benchmarks/codereplica")) sort!(raw_data_df, :num_samples) samples = unique(Vector{Int64}(raw_data_df[!, :num_samples])) algorithm_names = unique(Vector{String}(raw_data_df[!, :algorithm])) samples = unique(Vector{Int64}(raw_data_df[!, :num_samples])) x = samples ./ 0.001 # convert to Hz algorithm_names = unique(Vector{String}(raw_data_df[!, :algorithm])) # fig = Figure( # # resolution = (1000, 700), # font = "Times New Roman" # ) ax2 = Axis( fig, xlabel = "Sampling Frequency [Hz]", ylabel = "Generation Time [s]", xscale = log10, yscale = log10, title = "Comparison between global memory and texture memory code replica generation for 1 ms GPS L1 C/A signal", xminorgridvisible = true, xminorticksvisible = true, xminorticks = IntervalsBetween(9), # yticks = (10.0 .^(-5:1:-3)), xticklabelsize = 18, yticklabelsize = 18 ) xlims!(ax2, 10^6, 5*10^8) ylims!(ax2, 1.0e-5, 3.0e-3) lin = Array{Lines}(undef, length(algorithm_names)); sca = Array{Scatter}(undef, length(algorithm_names)); markers = [:circle, :rect] for (idx, name) = enumerate(algorithm_names) time = 10 ^ (-9) * vec(( raw_data_df |> @filter( _.algorithm == name ) |> DataFrame ).Minimum) lin[idx] = lines!( ax2, x, time ) sca[idx] = scatter!( ax2, x, time, marker = markers[idx], markersize = 15 ) end realtime = lines!(ax2, [10^6, 5 * 10^8], [10 ^ (-3), 10 ^ (-3)], color=:grey, linestyle=:dashdot) fig[2,1] = ax2 fig elements = [[lin[1] sca[1]], [lin[2] sca[2]]] labels = ["Global Memory", "Texture Memory"] axislegend(ax2, elements, labels, "Code Replication Algorithms", position = :lt) fig # save( plotsdir("benchmark_textmem.pdf"), fig) save(plotsdir("code_phase.pdf"), fig)
[ 3500, 1583, 54, 13506, 11, 11362, 12832, 7015, 515, 2898, 5430, 11, 29369, 5631, 11, 37169, 11, 15484, 5432, 11712, 874, 11, 32112, 3163, 20477, 11, 18387, 44, 2357, 26, 198, 11748, 37169, 25, 26109, 11, 13845, 26, 198, 31, 24209, 39022, 366, 33346, 12832, 7015, 515, 2898, 5430, 1, 198, 198, 45, 796, 36117, 25, 2624, 25, 29119, 62, 18444, 198, 8056, 62, 2411, 220, 796, 1976, 27498, 7, 13664, 7, 45, 4008, 198, 31, 12860, 33723, 657, 13, 20, 329, 357, 312, 87, 11, 997, 62, 82, 12629, 8, 287, 27056, 378, 7, 45, 8, 198, 220, 220, 220, 1303, 997, 62, 82, 12629, 796, 362, 62, 47202, 198, 220, 220, 220, 997, 62, 1187, 796, 352, 198, 220, 220, 220, 997, 62, 10215, 2411, 2024, 796, 513, 198, 220, 220, 220, 7139, 62, 46999, 796, 3254, 7, 7942, 8, 198, 220, 220, 220, 1080, 796, 15472, 43, 16, 7, 1904, 62, 46999, 796, 3254, 7, 7942, 18125, 198, 220, 220, 220, 1303, 1080, 62, 71, 796, 15472, 43, 16, 7, 1904, 62, 46999, 796, 3254, 7, 9562, 18125, 198, 220, 220, 220, 12416, 796, 1080, 13, 40148, 198, 220, 220, 220, 1303, 12416, 62, 5239, 62, 11883, 62, 36439, 796, 14496, 32742, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 14496, 32742, 19182, 7, 40148, 8, 198, 220, 220, 220, 1303, 1267, 198, 220, 220, 220, 12416, 62, 5239, 62, 11883, 796, 14496, 32742, 7, 198, 220, 220, 220, 220, 220, 220, 220, 14496, 32742, 19182, 7, 40148, 828, 198, 220, 220, 220, 220, 220, 220, 220, 2209, 62, 14171, 796, 29369, 5631, 13, 2885, 7707, 7597, 62, 49058, 62, 18564, 2969, 11, 198, 220, 220, 220, 220, 220, 220, 220, 39555, 341, 796, 29369, 5631, 13, 8199, 12423, 46445, 6084, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 37652, 17540, 796, 2081, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2438, 62, 35324, 796, 651, 62, 8189, 62, 35324, 7, 10057, 8, 198, 220, 220, 220, 2438, 62, 13664, 796, 651, 62, 8189, 62, 13664, 7, 10057, 8, 198, 220, 220, 220, 923, 62, 8189, 62, 40715, 796, 657, 13, 15, 69, 15, 198, 220, 220, 220, 11920, 62, 40715, 796, 657, 13, 15, 69, 15, 198, 220, 220, 220, 11920, 62, 35324, 796, 20007, 7399, 198, 220, 220, 220, 778, 77, 796, 352, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 2980, 378, 262, 6737, 26, 198, 220, 220, 220, 6737, 11, 19232, 62, 35324, 796, 2429, 62, 12683, 282, 7, 10057, 11, 778, 77, 11, 11920, 62, 35324, 11, 997, 62, 82, 12629, 11, 997, 62, 1187, 796, 31835, 13217, 82, 7, 22510, 62, 1187, 828, 923, 62, 8189, 62, 40715, 796, 923, 62, 8189, 62, 40715, 11, 923, 62, 7718, 5277, 62, 40715, 796, 11920, 62, 40715, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 2980, 378, 10895, 1352, 26, 198, 220, 220, 220, 10895, 1352, 796, 12556, 24129, 457, 26302, 10606, 2411, 1352, 7, 33111, 13217, 82, 7, 22510, 62, 1187, 828, 31835, 17320, 388, 24325, 7, 22510, 62, 10215, 2411, 2024, 4008, 198, 220, 220, 220, 10895, 1352, 62, 39873, 62, 1477, 19265, 796, 651, 62, 10215, 2411, 1352, 62, 39873, 62, 1477, 19265, 7, 10057, 11, 10895, 1352, 11, 19232, 62, 35324, 11, 657, 13, 20, 8, 198, 220, 220, 220, 997, 62, 1659, 62, 1477, 19265, 796, 10895, 1352, 62, 39873, 62, 1477, 19265, 58, 437, 60, 532, 10895, 1352, 62, 39873, 62, 1477, 19265, 58, 16, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 2980, 378, 9178, 2438, 290, 11920, 30069, 11, 290, 866, 1102, 13658, 6737, 26, 198, 220, 220, 220, 1303, 2438, 62, 35666, 3970, 62, 36166, 796, 1976, 27498, 7, 43879, 2624, 11, 997, 62, 82, 12629, 1343, 997, 62, 1659, 62, 1477, 19265, 8, 198, 220, 220, 220, 2438, 62, 35666, 3970, 796, 29369, 5631, 13, 9107, 418, 7, 43879, 2624, 11, 997, 62, 82, 12629, 1343, 997, 62, 1659, 62, 1477, 19265, 8, 198, 220, 220, 220, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 796, 29369, 5631, 13, 9107, 418, 7, 43879, 2624, 11, 997, 62, 82, 12629, 1343, 997, 62, 1659, 62, 1477, 19265, 8, 628, 220, 220, 220, 1303, 2980, 378, 29369, 5631, 9720, 24549, 10007, 26, 198, 220, 220, 220, 14390, 62, 525, 62, 9967, 796, 46720, 198, 220, 220, 220, 7021, 62, 525, 62, 25928, 796, 269, 335, 12195, 22510, 62, 82, 12629, 11, 14390, 62, 525, 62, 9967, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 66, 15339, 14390, 28, 16663, 82, 62, 525, 62, 9967, 7021, 28, 27372, 62, 525, 62, 25928, 2429, 62, 8189, 62, 35666, 3970, 62, 41293, 62, 11883, 62, 33885, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 11, 198, 220, 220, 220, 220, 220, 220, 220, 12416, 62, 5239, 62, 11883, 11, 1303, 11743, 4088, 12416, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 35324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19232, 62, 35324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 923, 62, 8189, 62, 40715, 11, 198, 220, 220, 220, 220, 220, 220, 220, 778, 77, 11, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 82, 12629, 1343, 997, 62, 1659, 62, 1477, 19265, 11, 198, 220, 220, 220, 220, 220, 220, 220, 10895, 1352, 62, 39873, 62, 1477, 19265, 58, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 13664, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2488, 66, 15339, 14390, 28, 16663, 82, 62, 525, 62, 9967, 7021, 28, 27372, 62, 525, 62, 25928, 2429, 62, 8189, 62, 35666, 3970, 62, 33885, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 35666, 3970, 11, 198, 220, 220, 220, 220, 220, 220, 220, 12416, 11, 1303, 11743, 4088, 12416, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 35324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19232, 62, 35324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 923, 62, 8189, 62, 40715, 11, 198, 220, 220, 220, 220, 220, 220, 220, 778, 77, 11, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 82, 12629, 1343, 997, 62, 1659, 62, 1477, 19265, 11, 198, 220, 220, 220, 220, 220, 220, 220, 10895, 1352, 62, 39873, 62, 1477, 19265, 58, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 13664, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1303, 37169, 13, 5235, 62, 8189, 62, 35666, 3970, 0, 7, 8189, 62, 35666, 3970, 62, 36166, 11, 1080, 11, 2438, 62, 35324, 11, 19232, 62, 35324, 11, 923, 62, 8189, 62, 40715, 11, 352, 11, 997, 62, 82, 12629, 11, 10895, 1352, 62, 39873, 62, 1477, 19265, 11, 778, 77, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 2438, 62, 35666, 3970, 62, 71, 796, 15690, 7, 8189, 62, 35666, 3970, 8, 198, 220, 220, 220, 1303, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 62, 71, 796, 15690, 7, 8189, 62, 35666, 3970, 62, 5239, 62, 11883, 8, 198, 220, 220, 220, 1303, 6737, 796, 32112, 19182, 90, 5377, 11141, 37, 2624, 92, 19510, 1952, 7, 43879, 2624, 11, 997, 62, 82, 12629, 828, 1976, 27498, 7, 43879, 2624, 11, 997, 62, 82, 12629, 8, 15306, 198, 220, 220, 220, 1303, 2438, 62, 746, 1386, 796, 651, 62, 8189, 62, 35324, 7, 10057, 8, 1220, 19232, 62, 35324, 764, 9, 357, 15, 25, 22510, 62, 82, 12629, 12, 16, 8, 764, 10, 923, 62, 8189, 62, 40715, 198, 220, 220, 220, 1303, 4104, 62, 12683, 282, 796, 32112, 19182, 7, 12683, 282, 764, 9, 1080, 62, 71, 13, 40148, 58, 16, 764, 10, 953, 12195, 28300, 12195, 5317, 11, 2438, 62, 746, 1386, 828, 651, 62, 8189, 62, 13664, 7, 10057, 36911, 778, 77, 12962, 198, 220, 220, 220, 1303, 697, 5700, 62, 7942, 796, 37169, 13, 10215, 2411, 378, 7, 10215, 2411, 1352, 11, 4104, 62, 12683, 282, 11, 2438, 62, 35666, 3970, 62, 36166, 11, 10895, 1352, 62, 39873, 62, 1477, 19265, 11, 352, 11, 997, 62, 82, 12629, 8, 198, 220, 220, 220, 1303, 697, 5700, 796, 37169, 13, 10215, 2411, 378, 7, 10215, 2411, 1352, 11, 4104, 62, 12683, 282, 11, 2438, 62, 35666, 3970, 62, 71, 11, 10895, 1352, 62, 39873, 62, 1477, 19265, 11, 352, 11, 997, 62, 82, 12629, 8, 198, 220, 220, 220, 1303, 697, 5700, 62, 5239, 62, 11883, 796, 37169, 13, 10215, 2411, 378, 7, 10215, 2411, 1352, 11, 4104, 62, 12683, 282, 11, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 62, 71, 11, 10895, 1352, 62, 39873, 62, 1477, 19265, 11, 352, 11, 997, 62, 82, 12629, 8, 628, 220, 220, 220, 1303, 11454, 62, 2411, 796, 2160, 7, 8937, 12195, 8189, 62, 35666, 3970, 532, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 4008, 1220, 997, 62, 82, 12629, 198, 220, 220, 220, 11454, 62, 2411, 58, 312, 87, 60, 796, 2160, 7, 8937, 12195, 8189, 62, 35666, 3970, 532, 2438, 62, 35666, 3970, 62, 5239, 62, 11883, 4008, 1220, 997, 62, 82, 12629, 198, 437, 628, 198, 87, 796, 43030, 7, 33327, 7, 45, 1220, 657, 13, 8298, 4008, 1303, 10385, 284, 26109, 198, 7890, 796, 43030, 7, 3064, 764, 9, 11454, 62, 2411, 8, 198, 7890, 62, 5657, 796, 1612, 7, 7890, 8, 198, 7890, 62, 1150, 796, 14288, 7, 7890, 8, 198, 7890, 62, 9806, 796, 5415, 7, 7890, 8, 198, 198, 3500, 23732, 44, 461, 494, 198, 5647, 796, 11291, 7, 10331, 796, 366, 28595, 968, 7993, 4943, 198, 897, 796, 38349, 7, 198, 220, 220, 220, 2336, 11, 198, 220, 220, 220, 2124, 18242, 796, 366, 16305, 11347, 31902, 685, 7399, 60, 1600, 198, 220, 220, 220, 331, 18242, 796, 366, 6892, 876, 6127, 18983, 13047, 685, 39850, 1600, 198, 220, 220, 220, 2124, 9888, 796, 2604, 940, 11, 198, 220, 220, 220, 3670, 796, 366, 6892, 876, 2438, 7108, 4049, 286, 262, 11743, 4088, 2438, 30069, 5270, 329, 352, 13845, 15472, 406, 16, 327, 14, 32, 6737, 1600, 198, 220, 220, 220, 1303, 2124, 2475, 796, 685, 15, 7337, 62, 830, 4357, 198, 220, 220, 220, 2124, 1084, 273, 25928, 23504, 796, 2081, 11, 198, 220, 220, 220, 2124, 1084, 419, 3378, 23504, 796, 2081, 11, 198, 220, 220, 220, 2124, 1084, 419, 3378, 796, 4225, 12786, 25262, 7, 24, 828, 198, 220, 220, 220, 1303, 331, 83, 3378, 796, 357, 940, 13, 15, 764, 61, 32590, 20, 25, 16, 21912, 18, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 331, 83, 3378, 796, 357, 940, 13, 15, 764, 61, 32590, 20, 25, 16, 21912, 18, 36911, 628, 220, 220, 220, 220, 742, 624, 23912, 1424, 1096, 796, 1248, 11, 198, 220, 220, 220, 331, 42298, 23912, 1424, 1096, 796, 1248, 198, 8, 198, 87, 2475, 82, 0, 7, 897, 11, 838, 61, 21, 11, 642, 9, 940, 61, 23, 8, 198, 2, 4731, 62, 7890, 62, 5657, 796, 17971, 7, 744, 7, 7890, 62, 5657, 11, 43237, 12894, 896, 28, 18, 4008, 39658, 198, 2, 4731, 62, 7890, 62, 9806, 796, 17971, 7, 744, 7, 7890, 62, 9806, 11, 43237, 12894, 896, 28, 18, 4008, 39658, 198, 2, 4731, 62, 7890, 62, 1150, 796, 17971, 7, 744, 7, 7890, 62, 1150, 11, 43237, 12894, 896, 28, 18, 4008, 39658, 198, 198, 2, 1303, 2420, 30300, 796, 366, 34703, 796, 366, 1635, 4731, 62, 7890, 62, 5657, 220, 198, 2, 1303, 2420, 9806, 796, 366, 9806, 796, 366, 1635, 4731, 62, 7890, 62, 9806, 198, 2, 2420, 1150, 796, 366, 1150, 666, 796, 366, 1635, 4731, 62, 7890, 62, 1150, 198, 6615, 0, 7, 897, 11, 2124, 11, 7890, 8, 198, 2, 289, 6615, 0, 7, 897, 11, 1366, 62, 5657, 11, 3124, 796, 1058, 67, 9600, 4364, 11, 9493, 10992, 796, 1058, 42460, 8, 198, 2, 289, 6615, 0, 7, 897, 11, 1366, 62, 1150, 11, 3124, 796, 1058, 67, 9600, 4364, 11, 9493, 10992, 796, 1058, 42460, 8, 198, 2, 289, 6615, 0, 7, 897, 11, 1366, 62, 9806, 11, 3124, 796, 1058, 67, 9600, 4364, 11, 9493, 10992, 796, 1058, 42460, 8, 198, 2, 2420, 0, 7, 5239, 30300, 11, 2292, 796, 357, 24, 9, 940, 61, 23, 11, 657, 13, 16, 10, 7890, 62, 5657, 828, 10548, 796, 357, 25, 3506, 11, 1058, 12093, 4470, 4008, 198, 2, 2420, 0, 7, 5239, 9806, 11, 2292, 796, 357, 24, 9, 940, 61, 23, 11, 1366, 62, 9806, 532, 657, 13, 17, 828, 10548, 796, 357, 25, 3506, 11, 1058, 12093, 4470, 4008, 198, 2, 2420, 0, 7, 5239, 1150, 11, 2292, 796, 357, 20, 9, 940, 61, 23, 11, 657, 13, 20, 10, 7890, 62, 1150, 828, 10548, 796, 357, 25, 16159, 11, 1058, 12093, 4470, 4008, 198, 198, 5647, 58, 16, 11, 16, 60, 796, 7877, 198, 5647, 198, 198, 31, 24209, 39022, 366, 33346, 12832, 7015, 515, 2898, 5430, 1, 198, 198, 1831, 62, 7890, 62, 7568, 796, 2824, 62, 43420, 7, 19608, 324, 343, 7203, 26968, 14306, 14, 19815, 567, 489, 3970, 48774, 198, 198, 30619, 0, 7, 1831, 62, 7890, 62, 7568, 11, 1058, 22510, 62, 82, 12629, 8, 198, 82, 12629, 796, 3748, 7, 38469, 90, 5317, 2414, 92, 7, 1831, 62, 7890, 62, 7568, 58, 28265, 1058, 22510, 62, 82, 12629, 60, 4008, 198, 282, 42289, 62, 14933, 796, 3748, 7, 38469, 90, 10100, 92, 7, 1831, 62, 7890, 62, 7568, 58, 28265, 1058, 282, 42289, 60, 4008, 198, 82, 12629, 796, 3748, 7, 38469, 90, 5317, 2414, 92, 7, 1831, 62, 7890, 62, 7568, 58, 28265, 1058, 22510, 62, 82, 12629, 60, 4008, 198, 87, 796, 8405, 24457, 657, 13, 8298, 1303, 10385, 284, 26109, 198, 282, 42289, 62, 14933, 796, 3748, 7, 38469, 90, 10100, 92, 7, 1831, 62, 7890, 62, 7568, 58, 28265, 1058, 282, 42289, 60, 4008, 198, 198, 2, 2336, 796, 11291, 7, 198, 2, 220, 220, 220, 220, 1303, 6323, 796, 357, 12825, 11, 13037, 828, 198, 2, 220, 220, 220, 220, 10369, 796, 366, 28595, 968, 7993, 1, 198, 2, 1267, 198, 897, 17, 796, 38349, 7, 198, 220, 220, 220, 2336, 11, 198, 220, 220, 220, 2124, 18242, 796, 366, 16305, 11347, 31902, 685, 7399, 60, 1600, 198, 220, 220, 220, 331, 18242, 796, 366, 8645, 341, 3862, 685, 82, 60, 1600, 198, 220, 220, 220, 2124, 9888, 796, 2604, 940, 11, 198, 220, 220, 220, 331, 9888, 796, 2604, 940, 11, 198, 220, 220, 220, 3670, 796, 366, 50249, 1653, 1022, 3298, 4088, 290, 11743, 4088, 2438, 30069, 5270, 329, 352, 13845, 15472, 406, 16, 327, 14, 32, 6737, 1600, 198, 220, 220, 220, 2124, 1084, 273, 25928, 23504, 796, 2081, 11, 198, 220, 220, 220, 2124, 1084, 419, 3378, 23504, 796, 2081, 11, 198, 220, 220, 220, 2124, 1084, 419, 3378, 796, 4225, 12786, 25262, 7, 24, 828, 198, 220, 220, 220, 1303, 331, 83, 3378, 796, 357, 940, 13, 15, 764, 61, 32590, 20, 25, 16, 21912, 18, 36911, 198, 220, 220, 220, 220, 742, 624, 23912, 1424, 1096, 796, 1248, 11, 198, 220, 220, 220, 331, 42298, 23912, 1424, 1096, 796, 1248, 198, 198, 8, 198, 87, 2475, 82, 0, 7, 897, 17, 11, 838, 61, 21, 11, 642, 9, 940, 61, 23, 8, 198, 88, 2475, 82, 0, 7, 897, 17, 11, 352, 13, 15, 68, 12, 20, 11, 513, 13, 15, 68, 12, 18, 8, 628, 198, 2815, 796, 15690, 90, 43, 1127, 92, 7, 917, 891, 11, 4129, 7, 282, 42289, 62, 14933, 18125, 220, 198, 1416, 64, 796, 15690, 90, 3351, 1436, 92, 7, 917, 891, 11, 4129, 7, 282, 42289, 62, 14933, 18125, 198, 4102, 364, 796, 685, 25, 45597, 11, 1058, 2554, 60, 198, 1640, 357, 312, 87, 11, 1438, 8, 796, 27056, 378, 7, 282, 42289, 62, 14933, 8, 198, 220, 220, 220, 640, 796, 838, 10563, 13841, 24, 8, 1635, 43030, 19510, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 62, 7890, 62, 7568, 930, 29, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 24455, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 13, 282, 42289, 6624, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 930, 29, 6060, 19778, 198, 220, 220, 220, 6739, 44046, 8, 628, 220, 220, 220, 9493, 58, 312, 87, 60, 796, 3951, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 11, 198, 220, 220, 220, 220, 220, 220, 220, 640, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 629, 64, 58, 312, 87, 60, 796, 41058, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 11, 198, 220, 220, 220, 220, 220, 220, 220, 640, 11, 198, 220, 220, 220, 220, 220, 220, 220, 18364, 796, 19736, 58, 312, 87, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 19736, 1096, 796, 1315, 198, 220, 220, 220, 1267, 198, 437, 198, 5305, 2435, 796, 3951, 0, 7, 897, 17, 11, 685, 940, 61, 21, 11, 642, 1635, 838, 61, 23, 4357, 685, 940, 10563, 13841, 18, 828, 838, 10563, 13841, 18, 8, 4357, 3124, 28, 25, 49502, 11, 9493, 10992, 28, 25, 42460, 26518, 8, 628, 198, 198, 5647, 58, 17, 11, 16, 60, 796, 7877, 17, 198, 5647, 198, 68, 3639, 796, 16410, 2815, 58, 16, 60, 629, 64, 58, 16, 60, 4357, 685, 2815, 58, 17, 60, 629, 64, 58, 17, 11907, 60, 198, 23912, 1424, 796, 14631, 22289, 14059, 1600, 366, 32742, 14059, 8973, 198, 22704, 1455, 437, 7, 897, 17, 11, 4847, 11, 14722, 11, 366, 10669, 18407, 3299, 978, 7727, 907, 1600, 220, 2292, 796, 1058, 2528, 8, 198, 5647, 198, 2, 3613, 7, 21528, 15908, 7203, 26968, 4102, 62, 5239, 11883, 13, 12315, 12340, 2336, 8, 198, 198, 21928, 7, 489, 1747, 15908, 7203, 8189, 62, 40715, 13, 12315, 12340, 2336, 8 ]
2.365378
3,027
abstract type PMUType end pmutype(::T) where {T} = error("`pmutype` not defined for arguments of type $T") # Defaults _unitstatus(x::PMUType, i...) = error("`unitstatus` undefined for $(typeof(x))") _unitcontrol(x::PMUType, i...) = error("`unitcontrol` undefined for $(typeof(x))") _counter(x::PMUType, i...) = error("`counter` undefined for $(typeof(x))") _control(x::PMUType, i...) = error("`control` undefined for $(typeof(x))") _extras(x::PMUType, i...) = error("`extras` undefined for $(typeof(x))") writetype(::PMUType) = UInt32 numcounters(x::PMUType) = error("`numcounters` undefined for $(typeof(x))") numbytes(x::PMUType) = sizeof(UInt64) * numcounters(x) unpack(_) = () unitstatus(x, i...) = _unitstatus(pmutype(x), indexzero.((unpack(x)..., i...))...) unitcontrol(x, i...) = _unitcontrol(pmutype(x), indexzero.((unpack(x)..., i...))...) counter(x, i...) = _counter(pmutype(x), indexzero.((unpack(x)..., i...))...) control(x, i...) = _control(pmutype(x), indexzero.((unpack(x)..., i...))...) extras(x, i...) = _extras(pmutype(x), indexzero.((unpack(x)..., i...))...) writetype(x) = writetype(pmutype(x)) numcounters(x) = numcounters(pmutype(x)) numbytes(x) = numbytes(pmutype(x)) ### Integrated Memory Controller struct IMC{T<:AbstractCPU} <: PMUType end _unitstatus(::IMC{SkylakeServer}) = IndexZero(0xF8) _unitcontrol(::IMC{SkylakeServer}) = IndexZero(0xF4) _counter(::IMC{SkylakeServer}, i::IndexZero) = IndexZero(0xA0 + value(i) * 0x8) _control(::IMC{SkylakeServer}, i::IndexZero) = IndexZero(0xD8 + value(i) * 0x4) numcounters(::IMC) = 4 # For now, only read the fixed counters for IceLake servers. # There are 4 such counters, starting at address 0x2290 and they are # DRAM Read, DRAM Write, PM Read, and PM Write respectively _counter(::IMC{IcelakeServer}, i) = IndexZero(0x2290 + value(i) * 0x8) ### CHA Counters struct CHA <: PMUType end _unitstatus(::CHA, i) = IndexZero(0xE07 + value(i) * 0x10) _unitcontrol(::CHA, i) = IndexZero(0xE00 + value(i) * 0x10) _counter(::CHA, cha, i) = IndexZero(0xE08 + value(cha) * 0x10 + value(i)) _control(::CHA, cha, i) = IndexZero(0xE01 + value(cha) * 0x10 + value(i)) _extras(::CHA, cha, i) = IndexZero(0xE05 + value(cha) * 0x10 + value(i)) writetype(::CHA) = UInt64 numcounters(::CHA) = 4 # Customize for various types Specialize abstract type AbstractUncorePMU end ##### IMC Uncore PMU # PMU implementation for monitoring the integrated memory controller struct IMCUncorePMU <: AbstractUncorePMU # A handle to the underlying handle::Handle end unwrap(x::IMCUncorePMU) = x.handle pmutype(::IMCUncorePMU) = IMC{SkylakeServer}() Base.close(x::IMCUncorePMU) = close(x.handle) # IceLake IMC PMU # For now - only return the free-running counters struct IMCUncoreICX <: AbstractUncorePMU mmio::MMIO end unwrap(x::IMCUncoreICX) = x.mmio pmutype(::IMCUncoreICX) = IMC{IcelakeServer}() Base.close(::IMCUncoreICX) = nothing ##### CHA Uncore PMU # PMU implementation for monitoring the CHA struct CHAUncorePMU <: AbstractUncorePMU # We hold on to a single handle for the MSR path, shared by all PMUs handle::Handle # The number of this CHA cha::IndexZero{Int} buffer::Vector{UInt8} # Allow passing a buffer, or manually create one function CHAUncorePMU(handle::Handle, cha, buffer = zeros(UInt8, numbytes(CHA()))) resize!(buffer, numbytes(CHA())) return new(handle, indexzero(cha), buffer) end end unwrap(x::CHAUncorePMU) = x.handle pmutype(::CHAUncorePMU) = CHA() unpack(x::CHAUncorePMU) = (x.cha,) Base.close(x::CHAUncorePMU) = close(x.handle) ##### ##### Low level accessing functions ##### function setunitstatus!(U::AbstractUncorePMU, v) write(unwrap(U), convert(writetype(U), v), unitstatus(U)) end function getunitstatus(U::AbstractUncorePMU) return read(unwrap(U), UInt32, unitstatus(U)) end function setunitcontrol!(U::AbstractUncorePMU, v) write(unwrap(U), convert(writetype(U), v), unitcontrol(U)) end function getunitcontrol(U::AbstractUncorePMU) return read(unwrap(U), UInt32, unitcontrol(U)) end function setcontrol!(U::AbstractUncorePMU, counter, v) return write(unwrap(U), convert(writetype(U), v), control(U, counter)) end function getcontrol(U::AbstractUncorePMU, i) return read(unwrap(U), UInt32, control(U, i)) end function getcounter(U::AbstractUncorePMU, i) return CounterValue(read(unwrap(U), UInt64, counter(U, i))) end function setextra!(U::AbstractUncorePMU, i, v) write(unwrap(U), convert(writetype(U), v), extras(U, i)) end function getextra(U::AbstractUncorePMU, i) return read(unwrap(U), UInt32, extras(U, i)) end ##### ##### Some higher level functions ##### function getallcounters(U::AbstractUncorePMU) return ntuple(i -> getcounter(U, i), Val(numcounters(U))) end function reset!(U::AbstractUncorePMU) # Write to the unit control to clear all counters and control registers val = setbits(zero(writetype(U)), (0, 1, 8, 16, 17)) setunitcontrol!(U, val) end function enable!(U::AbstractUncorePMU) val = setbits(zero(writetype(U)), (16, 17)) setunitcontrol!(U, val) end
[ 397, 8709, 2099, 3122, 3843, 2981, 886, 198, 198, 4426, 315, 2981, 7, 3712, 51, 8, 810, 1391, 51, 92, 796, 4049, 7203, 63, 4426, 315, 2981, 63, 407, 5447, 329, 7159, 286, 2099, 720, 51, 4943, 198, 198, 2, 2896, 13185, 198, 62, 20850, 13376, 7, 87, 3712, 5868, 3843, 2981, 11, 1312, 23029, 796, 4049, 7203, 63, 20850, 13376, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 62, 20850, 13716, 7, 87, 3712, 5868, 3843, 2981, 11, 1312, 23029, 796, 4049, 7203, 63, 20850, 13716, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 62, 24588, 7, 87, 3712, 5868, 3843, 2981, 11, 1312, 23029, 796, 4049, 7203, 63, 24588, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 62, 13716, 7, 87, 3712, 5868, 3843, 2981, 11, 1312, 23029, 796, 4049, 7203, 63, 13716, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 62, 2302, 8847, 7, 87, 3712, 5868, 3843, 2981, 11, 1312, 23029, 796, 4049, 7203, 63, 2302, 8847, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 198, 8933, 2963, 431, 7, 3712, 5868, 3843, 2981, 8, 796, 471, 5317, 2624, 198, 198, 22510, 66, 15044, 7, 87, 3712, 5868, 3843, 2981, 8, 796, 4049, 7203, 63, 22510, 66, 15044, 63, 28721, 329, 29568, 4906, 1659, 7, 87, 4008, 4943, 198, 22510, 33661, 7, 87, 3712, 5868, 3843, 2981, 8, 796, 39364, 7, 52, 5317, 2414, 8, 1635, 997, 66, 15044, 7, 87, 8, 198, 198, 403, 8002, 28264, 8, 796, 7499, 198, 20850, 13376, 7, 87, 11, 1312, 23029, 796, 4808, 20850, 13376, 7, 4426, 315, 2981, 7, 87, 828, 6376, 22570, 12195, 7, 403, 8002, 7, 87, 26513, 11, 1312, 986, 4008, 23029, 198, 20850, 13716, 7, 87, 11, 1312, 23029, 796, 4808, 20850, 13716, 7, 4426, 315, 2981, 7, 87, 828, 6376, 22570, 12195, 7, 403, 8002, 7, 87, 26513, 11, 1312, 986, 4008, 23029, 198, 24588, 7, 87, 11, 1312, 23029, 796, 4808, 24588, 7, 4426, 315, 2981, 7, 87, 828, 6376, 22570, 12195, 7, 403, 8002, 7, 87, 26513, 11, 1312, 986, 4008, 23029, 198, 13716, 7, 87, 11, 1312, 23029, 796, 4808, 13716, 7, 4426, 315, 2981, 7, 87, 828, 6376, 22570, 12195, 7, 403, 8002, 7, 87, 26513, 11, 1312, 986, 4008, 23029, 198, 2302, 8847, 7, 87, 11, 1312, 23029, 796, 4808, 2302, 8847, 7, 4426, 315, 2981, 7, 87, 828, 6376, 22570, 12195, 7, 403, 8002, 7, 87, 26513, 11, 1312, 986, 4008, 23029, 198, 8933, 2963, 431, 7, 87, 8, 796, 1991, 2963, 431, 7, 4426, 315, 2981, 7, 87, 4008, 198, 198, 22510, 66, 15044, 7, 87, 8, 796, 997, 66, 15044, 7, 4426, 315, 2981, 7, 87, 4008, 198, 22510, 33661, 7, 87, 8, 796, 997, 33661, 7, 4426, 315, 2981, 7, 87, 4008, 198, 198, 21017, 35432, 14059, 22741, 198, 7249, 8959, 34, 90, 51, 27, 25, 23839, 36037, 92, 1279, 25, 3122, 3843, 2981, 886, 198, 62, 20850, 13376, 7, 3712, 3955, 34, 90, 22308, 27180, 10697, 30072, 796, 12901, 28667, 7, 15, 87, 37, 23, 8, 198, 62, 20850, 13716, 7, 3712, 3955, 34, 90, 22308, 27180, 10697, 30072, 796, 12901, 28667, 7, 15, 87, 37, 19, 8, 198, 62, 24588, 7, 3712, 3955, 34, 90, 22308, 27180, 10697, 5512, 1312, 3712, 15732, 28667, 8, 796, 12901, 28667, 7, 15, 87, 32, 15, 1343, 1988, 7, 72, 8, 1635, 657, 87, 23, 8, 198, 62, 13716, 7, 3712, 3955, 34, 90, 22308, 27180, 10697, 5512, 1312, 3712, 15732, 28667, 8, 796, 12901, 28667, 7, 15, 87, 35, 23, 1343, 1988, 7, 72, 8, 1635, 657, 87, 19, 8, 198, 22510, 66, 15044, 7, 3712, 3955, 34, 8, 796, 604, 198, 198, 2, 1114, 783, 11, 691, 1100, 262, 5969, 21154, 329, 6663, 43035, 9597, 13, 198, 2, 1318, 389, 604, 884, 21154, 11, 3599, 379, 2209, 657, 87, 1828, 3829, 290, 484, 389, 198, 2, 10560, 2390, 4149, 11, 10560, 2390, 19430, 11, 3122, 4149, 11, 290, 3122, 19430, 8148, 198, 62, 24588, 7, 3712, 3955, 34, 90, 40, 5276, 539, 10697, 5512, 1312, 8, 796, 12901, 28667, 7, 15, 87, 1828, 3829, 1343, 1988, 7, 72, 8, 1635, 657, 87, 23, 8, 198, 198, 21017, 5870, 32, 3545, 1010, 198, 7249, 5870, 32, 1279, 25, 3122, 3843, 2981, 886, 198, 62, 20850, 13376, 7, 3712, 49285, 11, 1312, 8, 796, 12901, 28667, 7, 15, 87, 36, 2998, 1343, 1988, 7, 72, 8, 1635, 657, 87, 940, 8, 198, 62, 20850, 13716, 7, 3712, 49285, 11, 1312, 8, 796, 12901, 28667, 7, 15, 87, 36, 405, 1343, 1988, 7, 72, 8, 1635, 657, 87, 940, 8, 198, 62, 24588, 7, 3712, 49285, 11, 17792, 11, 1312, 8, 796, 12901, 28667, 7, 15, 87, 36, 2919, 1343, 1988, 7, 11693, 8, 1635, 657, 87, 940, 1343, 1988, 7, 72, 4008, 198, 62, 13716, 7, 3712, 49285, 11, 17792, 11, 1312, 8, 796, 12901, 28667, 7, 15, 87, 36, 486, 1343, 1988, 7, 11693, 8, 1635, 657, 87, 940, 1343, 1988, 7, 72, 4008, 198, 62, 2302, 8847, 7, 3712, 49285, 11, 17792, 11, 1312, 8, 796, 12901, 28667, 7, 15, 87, 36, 2713, 1343, 1988, 7, 11693, 8, 1635, 657, 87, 940, 1343, 1988, 7, 72, 4008, 198, 8933, 2963, 431, 7, 3712, 49285, 8, 796, 471, 5317, 2414, 198, 22510, 66, 15044, 7, 3712, 49285, 8, 796, 604, 198, 198, 2, 8562, 1096, 329, 2972, 3858, 6093, 1096, 198, 397, 8709, 2099, 27741, 3118, 7295, 5868, 52, 886, 198, 198, 4242, 2, 8959, 34, 791, 7295, 3122, 52, 198, 2, 3122, 52, 7822, 329, 9904, 262, 11521, 4088, 10444, 198, 7249, 8959, 34, 3118, 7295, 5868, 52, 1279, 25, 27741, 3118, 7295, 5868, 52, 198, 220, 220, 220, 1303, 317, 5412, 284, 262, 10238, 198, 220, 220, 220, 5412, 3712, 37508, 198, 437, 198, 403, 37150, 7, 87, 3712, 3955, 34, 3118, 7295, 5868, 52, 8, 796, 2124, 13, 28144, 198, 4426, 315, 2981, 7, 3712, 3955, 34, 3118, 7295, 5868, 52, 8, 796, 8959, 34, 90, 22308, 27180, 10697, 92, 3419, 198, 14881, 13, 19836, 7, 87, 3712, 3955, 34, 3118, 7295, 5868, 52, 8, 796, 1969, 7, 87, 13, 28144, 8, 198, 198, 2, 6663, 43035, 8959, 34, 3122, 52, 198, 2, 1114, 783, 532, 691, 1441, 262, 1479, 12, 20270, 21154, 198, 7249, 8959, 34, 3118, 7295, 2149, 55, 1279, 25, 27741, 3118, 7295, 5868, 52, 198, 220, 220, 220, 8085, 952, 3712, 44, 8895, 46, 198, 437, 198, 403, 37150, 7, 87, 3712, 3955, 34, 3118, 7295, 2149, 55, 8, 796, 2124, 13, 3020, 952, 198, 4426, 315, 2981, 7, 3712, 3955, 34, 3118, 7295, 2149, 55, 8, 796, 8959, 34, 90, 40, 5276, 539, 10697, 92, 3419, 198, 14881, 13, 19836, 7, 3712, 3955, 34, 3118, 7295, 2149, 55, 8, 796, 2147, 198, 198, 4242, 2, 5870, 32, 791, 7295, 3122, 52, 198, 2, 3122, 52, 7822, 329, 9904, 262, 5870, 32, 198, 7249, 5870, 32, 3118, 7295, 5868, 52, 1279, 25, 27741, 3118, 7295, 5868, 52, 198, 220, 220, 220, 1303, 775, 1745, 319, 284, 257, 2060, 5412, 329, 262, 6579, 49, 3108, 11, 4888, 416, 477, 3122, 5842, 198, 220, 220, 220, 5412, 3712, 37508, 198, 220, 220, 220, 1303, 383, 1271, 286, 428, 5870, 32, 198, 220, 220, 220, 17792, 3712, 15732, 28667, 90, 5317, 92, 198, 220, 220, 220, 11876, 3712, 38469, 90, 52, 5317, 23, 92, 628, 220, 220, 220, 1303, 22507, 6427, 257, 11876, 11, 393, 14500, 2251, 530, 198, 220, 220, 220, 2163, 5870, 32, 3118, 7295, 5868, 52, 7, 28144, 3712, 37508, 11, 17792, 11, 11876, 796, 1976, 27498, 7, 52, 5317, 23, 11, 997, 33661, 7, 49285, 3419, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 47558, 0, 7, 22252, 11, 997, 33661, 7, 49285, 3419, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 7, 28144, 11, 6376, 22570, 7, 11693, 828, 11876, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 403, 37150, 7, 87, 3712, 49285, 3118, 7295, 5868, 52, 8, 796, 2124, 13, 28144, 198, 4426, 315, 2981, 7, 3712, 49285, 3118, 7295, 5868, 52, 8, 796, 5870, 32, 3419, 198, 403, 8002, 7, 87, 3712, 49285, 3118, 7295, 5868, 52, 8, 796, 357, 87, 13, 11693, 35751, 198, 14881, 13, 19836, 7, 87, 3712, 49285, 3118, 7295, 5868, 52, 8, 796, 1969, 7, 87, 13, 28144, 8, 198, 198, 4242, 2, 198, 4242, 2, 7754, 1241, 22534, 5499, 198, 4242, 2, 198, 198, 8818, 900, 20850, 13376, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 410, 8, 198, 220, 220, 220, 3551, 7, 403, 37150, 7, 52, 828, 10385, 7, 8933, 2963, 431, 7, 52, 828, 410, 828, 4326, 13376, 7, 52, 4008, 198, 437, 198, 198, 8818, 651, 20850, 13376, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 8, 198, 220, 220, 220, 1441, 1100, 7, 403, 37150, 7, 52, 828, 471, 5317, 2624, 11, 4326, 13376, 7, 52, 4008, 198, 437, 198, 198, 8818, 900, 20850, 13716, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 410, 8, 198, 220, 220, 220, 3551, 7, 403, 37150, 7, 52, 828, 10385, 7, 8933, 2963, 431, 7, 52, 828, 410, 828, 4326, 13716, 7, 52, 4008, 198, 437, 198, 198, 8818, 651, 20850, 13716, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 8, 198, 220, 220, 220, 1441, 1100, 7, 403, 37150, 7, 52, 828, 471, 5317, 2624, 11, 4326, 13716, 7, 52, 4008, 198, 437, 198, 198, 8818, 900, 13716, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 3753, 11, 410, 8, 198, 220, 220, 220, 1441, 3551, 7, 403, 37150, 7, 52, 828, 10385, 7, 8933, 2963, 431, 7, 52, 828, 410, 828, 1630, 7, 52, 11, 3753, 4008, 198, 437, 198, 198, 8818, 651, 13716, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 1312, 8, 198, 220, 220, 220, 1441, 1100, 7, 403, 37150, 7, 52, 828, 471, 5317, 2624, 11, 1630, 7, 52, 11, 1312, 4008, 198, 437, 198, 198, 8818, 651, 24588, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 1312, 8, 198, 220, 220, 220, 1441, 15034, 11395, 7, 961, 7, 403, 37150, 7, 52, 828, 471, 5317, 2414, 11, 3753, 7, 52, 11, 1312, 22305, 198, 437, 198, 198, 8818, 900, 26086, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 1312, 11, 410, 8, 198, 220, 220, 220, 3551, 7, 403, 37150, 7, 52, 828, 10385, 7, 8933, 2963, 431, 7, 52, 828, 410, 828, 33849, 7, 52, 11, 1312, 4008, 198, 437, 198, 198, 8818, 651, 26086, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 11, 1312, 8, 198, 220, 220, 220, 1441, 1100, 7, 403, 37150, 7, 52, 828, 471, 5317, 2624, 11, 33849, 7, 52, 11, 1312, 4008, 198, 437, 198, 198, 4242, 2, 198, 4242, 2, 2773, 2440, 1241, 5499, 198, 4242, 2, 198, 198, 8818, 651, 439, 66, 15044, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 8, 198, 220, 220, 220, 1441, 299, 83, 29291, 7, 72, 4613, 651, 24588, 7, 52, 11, 1312, 828, 3254, 7, 22510, 66, 15044, 7, 52, 22305, 198, 437, 198, 198, 8818, 13259, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 8, 198, 220, 220, 220, 1303, 19430, 284, 262, 4326, 1630, 284, 1598, 477, 21154, 290, 1630, 28441, 198, 220, 220, 220, 1188, 796, 900, 9895, 7, 22570, 7, 8933, 2963, 431, 7, 52, 36911, 357, 15, 11, 352, 11, 807, 11, 1467, 11, 1596, 4008, 198, 220, 220, 220, 900, 20850, 13716, 0, 7, 52, 11, 1188, 8, 198, 437, 198, 198, 8818, 7139, 0, 7, 52, 3712, 23839, 3118, 7295, 5868, 52, 8, 198, 220, 220, 220, 1188, 796, 900, 9895, 7, 22570, 7, 8933, 2963, 431, 7, 52, 36911, 357, 1433, 11, 1596, 4008, 198, 220, 220, 220, 900, 20850, 13716, 0, 7, 52, 11, 1188, 8, 198, 437, 198 ]
2.563883
1,988
# Helper functions to read Harwell-Boeing and Rutherford-Boeing data. function decode_int_fmt(fmt :: AbstractString) if fmt[1] == '(' fmt = uppercase(fmt[2:end-1]) end return map(s -> isempty(s) ? 1 : parse(Int, s), split(fmt, 'I')) end function decode_real_fmt(fmt :: AbstractString) fmt = join(split(fmt)) # Remove all white spaces. if fmt[1] == '(' fmt = uppercase(fmt[2:end-1]) end scale = "0" if (',' in fmt) # Process scale factor, e.g., 1P,5D16.9 scale, fmt = split(fmt, ',') scale, _ = split(scale, 'P') elseif ('P' in fmt) scale, fmt = split(fmt, 'P') end scale = parse(Int, scale) fmt1 = split(fmt, '.')[1] if occursin('E', fmt1) (npl, len) = map(s -> isempty(s) ? 1 : parse(Int, s), split(fmt1, 'E')) elseif occursin('D', fmt1) (npl, len) = map(s -> isempty(s) ? 1 : parse(Int, s), split(fmt1, 'D')) elseif occursin('F', fmt1) (npl, len) = map(s -> isempty(s) ? 1 : parse(Int, s), split(fmt1, 'F')) else error("Malformed real format") end return (npl, len, scale) end function standardize_real(number_as_str :: AbstractString) s = join(split(number_as_str)) # for numbers in the form "0.24555165E 00". # change ".16000000+006" to ".16000000e+006". The first char could be +/-. if !any(occursin.(['E', 'D', 'e', 'd'], s)) if occursin('+', s[2:end]) s = s[1:1] * join(split(s[2:end], '+'), "e+") elseif occursin('-', s[2:end]) s = s[1:1] * join(split(s[2:end], '-'), "e-") end end return s end function read_array(io :: IO, n :: Int, fmt :: AbstractString; is_complex :: Bool=false) if 'I' in fmt scale = 0 (npl, len) = decode_int_fmt(fmt) conv = s -> parse(Int, s) typ = Int else (npl, len, scale) = decode_real_fmt(fmt) conv = s -> parse(Float64, s) typ = Float64 if is_complex n *= 2 end end x = zeros(typ, n) for j = 1 : div(n, npl) if typ == Float64 line = join(split(uppercase(readline(io)), 'D'), 'e') else line = readline(io) end chunk = [line[len*(i-1)+1:len*i] for i = 1 : npl] if typ == Float64 chunk = map(standardize_real, chunk) end x[npl * (j-1) + 1 : npl * j] = map(conv, chunk) end rem = mod(n, npl) if rem > 0 if typ == Float64 line = join(split(uppercase(readline(io)), 'D'), 'e') else line = readline(io) end chunk = [line[len*(i-1)+1:len*i] for i = 1 : rem] if typ == Float64 chunk = map(standardize_real, chunk) end x[end-rem+1 : end] = map(conv, chunk) end if scale != 0 x /= 10.0^scale end return is_complex ? [ComplexF64(x[i], x[i+1]) for i = 1 : 2 : n-1] : x end function sortsparse!(colptr :: Vector{Ti}, rowind :: Vector{Ti}, values :: Vector{Tf}) where {Ti <: Integer, Tf <: Number} # ensure row indices are sorted in each column ncol = length(colptr) - 1 for col = 1 : ncol colbeg = colptr[col] colend = colptr[col + 1] - 1 rows = rowind[colbeg:colend] if !issorted(rows) p = sortperm(rows) rowind[colbeg:colend] = rows[p] values[colbeg:colend] = values[colbeg:colend][p] end end end
[ 2, 5053, 525, 5499, 284, 1100, 2113, 4053, 12, 33, 2577, 278, 290, 49767, 12, 33, 2577, 278, 1366, 13, 198, 198, 8818, 36899, 62, 600, 62, 69, 16762, 7, 69, 16762, 7904, 27741, 10100, 8, 198, 220, 611, 46996, 58, 16, 60, 6624, 705, 10786, 198, 220, 220, 220, 46996, 796, 334, 39921, 589, 7, 69, 16762, 58, 17, 25, 437, 12, 16, 12962, 198, 220, 886, 198, 220, 1441, 3975, 7, 82, 4613, 318, 28920, 7, 82, 8, 5633, 352, 1058, 21136, 7, 5317, 11, 264, 828, 6626, 7, 69, 16762, 11, 705, 40, 6, 4008, 198, 437, 628, 198, 8818, 36899, 62, 5305, 62, 69, 16762, 7, 69, 16762, 7904, 27741, 10100, 8, 198, 220, 46996, 796, 4654, 7, 35312, 7, 69, 16762, 4008, 220, 1303, 17220, 477, 2330, 9029, 13, 198, 220, 611, 46996, 58, 16, 60, 6624, 705, 10786, 198, 220, 220, 220, 46996, 796, 334, 39921, 589, 7, 69, 16762, 58, 17, 25, 437, 12, 16, 12962, 198, 220, 886, 198, 220, 5046, 796, 366, 15, 1, 198, 220, 611, 357, 41707, 287, 46996, 8, 220, 1303, 10854, 5046, 5766, 11, 304, 13, 70, 1539, 352, 47, 11, 20, 35, 1433, 13, 24, 198, 220, 220, 220, 5046, 11, 46996, 796, 6626, 7, 69, 16762, 11, 705, 4032, 8, 198, 220, 220, 220, 5046, 11, 4808, 796, 6626, 7, 9888, 11, 705, 47, 11537, 198, 220, 2073, 361, 19203, 47, 6, 287, 46996, 8, 198, 220, 220, 220, 5046, 11, 46996, 796, 6626, 7, 69, 16762, 11, 705, 47, 11537, 198, 220, 886, 198, 220, 5046, 796, 21136, 7, 5317, 11, 5046, 8, 628, 220, 46996, 16, 796, 6626, 7, 69, 16762, 11, 705, 2637, 38381, 16, 60, 198, 220, 611, 8833, 259, 10786, 36, 3256, 46996, 16, 8, 198, 220, 220, 220, 357, 77, 489, 11, 18896, 8, 796, 3975, 7, 82, 4613, 318, 28920, 7, 82, 8, 5633, 352, 1058, 21136, 7, 5317, 11, 264, 828, 6626, 7, 69, 16762, 16, 11, 705, 36, 6, 4008, 198, 220, 2073, 361, 8833, 259, 10786, 35, 3256, 46996, 16, 8, 198, 220, 220, 220, 357, 77, 489, 11, 18896, 8, 796, 3975, 7, 82, 4613, 318, 28920, 7, 82, 8, 5633, 352, 1058, 21136, 7, 5317, 11, 264, 828, 6626, 7, 69, 16762, 16, 11, 705, 35, 6, 4008, 198, 220, 2073, 361, 8833, 259, 10786, 37, 3256, 46996, 16, 8, 198, 220, 220, 220, 357, 77, 489, 11, 18896, 8, 796, 3975, 7, 82, 4613, 318, 28920, 7, 82, 8, 5633, 352, 1058, 21136, 7, 5317, 11, 264, 828, 6626, 7, 69, 16762, 16, 11, 705, 37, 6, 4008, 198, 220, 2073, 198, 220, 220, 220, 4049, 7203, 15029, 12214, 1103, 5794, 4943, 198, 220, 886, 628, 220, 1441, 357, 77, 489, 11, 18896, 11, 5046, 8, 198, 437, 628, 198, 8818, 3210, 1096, 62, 5305, 7, 17618, 62, 292, 62, 2536, 7904, 27741, 10100, 8, 198, 220, 264, 796, 4654, 7, 35312, 7, 17618, 62, 292, 62, 2536, 4008, 220, 1303, 329, 3146, 287, 262, 1296, 366, 15, 13, 1731, 31046, 20986, 36, 3571, 1911, 198, 220, 1303, 1487, 27071, 1433, 10535, 10, 28041, 1, 284, 27071, 1433, 10535, 68, 10, 28041, 1911, 383, 717, 1149, 714, 307, 29694, 13, 198, 220, 611, 5145, 1092, 7, 13966, 1834, 259, 12195, 17816, 36, 3256, 705, 35, 3256, 705, 68, 3256, 705, 67, 6, 4357, 264, 4008, 198, 220, 220, 220, 611, 8833, 259, 10786, 10, 3256, 264, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 264, 796, 264, 58, 16, 25, 16, 60, 1635, 4654, 7, 35312, 7, 82, 58, 17, 25, 437, 4357, 705, 10, 33809, 366, 68, 10, 4943, 198, 220, 220, 220, 2073, 361, 8833, 259, 10786, 12, 3256, 264, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 264, 796, 264, 58, 16, 25, 16, 60, 1635, 4654, 7, 35312, 7, 82, 58, 17, 25, 437, 4357, 705, 19355, 828, 366, 68, 12, 4943, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 1441, 264, 198, 437, 628, 198, 8818, 1100, 62, 18747, 7, 952, 7904, 24418, 11, 299, 7904, 2558, 11, 46996, 7904, 27741, 10100, 26, 318, 62, 41887, 7904, 347, 970, 28, 9562, 8, 198, 220, 611, 705, 40, 6, 287, 46996, 198, 220, 220, 220, 5046, 796, 657, 198, 220, 220, 220, 357, 77, 489, 11, 18896, 8, 796, 36899, 62, 600, 62, 69, 16762, 7, 69, 16762, 8, 198, 220, 220, 220, 3063, 796, 264, 4613, 21136, 7, 5317, 11, 264, 8, 198, 220, 220, 220, 2170, 796, 2558, 198, 220, 2073, 198, 220, 220, 220, 357, 77, 489, 11, 18896, 11, 5046, 8, 796, 36899, 62, 5305, 62, 69, 16762, 7, 69, 16762, 8, 198, 220, 220, 220, 3063, 796, 264, 4613, 21136, 7, 43879, 2414, 11, 264, 8, 198, 220, 220, 220, 2170, 796, 48436, 2414, 198, 220, 220, 220, 611, 318, 62, 41887, 198, 220, 220, 220, 220, 220, 299, 1635, 28, 362, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 2124, 796, 1976, 27498, 7, 28004, 11, 299, 8, 198, 220, 329, 474, 796, 352, 1058, 2659, 7, 77, 11, 299, 489, 8, 198, 220, 220, 220, 611, 2170, 6624, 48436, 2414, 198, 220, 220, 220, 220, 220, 1627, 796, 4654, 7, 35312, 7, 7211, 2798, 589, 7, 961, 1370, 7, 952, 36911, 705, 35, 33809, 705, 68, 11537, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1627, 796, 1100, 1370, 7, 952, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 16058, 796, 685, 1370, 58, 11925, 9, 7, 72, 12, 16, 47762, 16, 25, 11925, 9, 72, 60, 329, 1312, 796, 352, 1058, 299, 489, 60, 198, 220, 220, 220, 611, 2170, 6624, 48436, 2414, 198, 220, 220, 220, 220, 220, 16058, 796, 3975, 7, 20307, 1096, 62, 5305, 11, 16058, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2124, 58, 77, 489, 1635, 357, 73, 12, 16, 8, 1343, 352, 1058, 299, 489, 1635, 474, 60, 796, 3975, 7, 42946, 11, 16058, 8, 198, 220, 886, 198, 220, 816, 796, 953, 7, 77, 11, 299, 489, 8, 198, 220, 611, 816, 1875, 657, 198, 220, 220, 220, 611, 2170, 6624, 48436, 2414, 198, 220, 220, 220, 220, 220, 1627, 796, 4654, 7, 35312, 7, 7211, 2798, 589, 7, 961, 1370, 7, 952, 36911, 705, 35, 33809, 705, 68, 11537, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1627, 796, 1100, 1370, 7, 952, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 16058, 796, 685, 1370, 58, 11925, 9, 7, 72, 12, 16, 47762, 16, 25, 11925, 9, 72, 60, 329, 1312, 796, 352, 1058, 816, 60, 198, 220, 220, 220, 611, 2170, 6624, 48436, 2414, 198, 220, 220, 220, 220, 220, 16058, 796, 3975, 7, 20307, 1096, 62, 5305, 11, 16058, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2124, 58, 437, 12, 2787, 10, 16, 1058, 886, 60, 796, 3975, 7, 42946, 11, 16058, 8, 198, 220, 886, 198, 220, 611, 5046, 14512, 657, 198, 220, 220, 220, 2124, 1220, 28, 838, 13, 15, 61, 9888, 198, 220, 886, 198, 220, 1441, 318, 62, 41887, 5633, 685, 5377, 11141, 37, 2414, 7, 87, 58, 72, 4357, 2124, 58, 72, 10, 16, 12962, 329, 1312, 796, 352, 1058, 362, 1058, 299, 12, 16, 60, 1058, 2124, 198, 437, 628, 198, 8818, 10524, 29572, 0, 7, 4033, 20692, 7904, 20650, 90, 40533, 5512, 5752, 521, 7904, 20650, 90, 40533, 5512, 3815, 7904, 20650, 90, 51, 69, 30072, 810, 1391, 40533, 1279, 25, 34142, 11, 309, 69, 1279, 25, 7913, 92, 198, 220, 1303, 4155, 5752, 36525, 389, 23243, 287, 1123, 5721, 198, 220, 299, 4033, 796, 4129, 7, 4033, 20692, 8, 532, 352, 198, 220, 329, 951, 796, 352, 1058, 299, 4033, 198, 220, 220, 220, 951, 1350, 70, 796, 951, 20692, 58, 4033, 60, 198, 220, 220, 220, 951, 437, 796, 951, 20692, 58, 4033, 1343, 352, 60, 532, 352, 198, 220, 220, 220, 15274, 796, 5752, 521, 58, 4033, 1350, 70, 25, 4033, 437, 60, 198, 220, 220, 220, 611, 5145, 747, 9741, 7, 8516, 8, 198, 220, 220, 220, 220, 220, 279, 796, 3297, 16321, 7, 8516, 8, 198, 220, 220, 220, 220, 220, 5752, 521, 58, 4033, 1350, 70, 25, 4033, 437, 60, 796, 15274, 58, 79, 60, 198, 220, 220, 220, 220, 220, 3815, 58, 4033, 1350, 70, 25, 4033, 437, 60, 796, 3815, 58, 4033, 1350, 70, 25, 4033, 437, 7131, 79, 60, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198 ]
2.201117
1,432
using Test using POMDPModels # using POMDPSimulators using POMDPTesting using POMDPs using POMDPModelTools using BeliefUpdaters using Random let problem = BabyPOMDP() # starve policy # when the baby is never fed, the reward for starting in the hungry state should be -100 sim = RolloutSimulator(eps=0.0001) ib = nothing policy = Starve() r = simulate(sim, problem, policy, updater(policy), ib, true) @test r ≈ -100.0 atol=0.01 # test gen(::o,...) o = gen(DDNNode(:o), problem, true, MersenneTwister(1)) @test o == 1 # test vec ov = convert_s(Array{Float64}, true, problem) @test ov == [1.] o = convert_s(Bool, ov, problem) @test o == true POMDPTesting.probability_check(problem) bu = DiscreteUpdater(problem) bp = update(bu, initialize_belief(bu, BoolDistribution(0.0)), false, true) @test pdf(bp, true) ≈ 0.47058823529411764 atol=0.0001 r = simulate(sim, problem, policy, DiscreteUpdater(problem), BoolDistribution(1.0)) @test r ≈ -100.0 atol=0.01 end
[ 3500, 6208, 198, 198, 3500, 350, 2662, 6322, 5841, 1424, 198, 2, 1262, 350, 2662, 35, 3705, 320, 24325, 198, 3500, 350, 2662, 6322, 44154, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 17633, 33637, 198, 3500, 49728, 4933, 67, 8605, 198, 3500, 14534, 198, 198, 1616, 198, 220, 220, 220, 1917, 796, 14801, 47, 2662, 6322, 3419, 628, 220, 220, 220, 1303, 47141, 2450, 198, 220, 220, 220, 1303, 618, 262, 5156, 318, 1239, 11672, 11, 262, 6721, 329, 3599, 287, 262, 14720, 1181, 815, 307, 532, 3064, 198, 220, 220, 220, 985, 796, 8299, 448, 8890, 8927, 7, 25386, 28, 15, 13, 18005, 8, 198, 220, 220, 220, 24283, 796, 2147, 198, 220, 220, 220, 2450, 796, 2907, 303, 3419, 198, 220, 220, 220, 374, 796, 29308, 7, 14323, 11, 1917, 11, 2450, 11, 2325, 729, 7, 30586, 828, 24283, 11, 2081, 8, 198, 220, 220, 220, 2488, 9288, 374, 15139, 230, 532, 3064, 13, 15, 379, 349, 28, 15, 13, 486, 628, 220, 220, 220, 1303, 1332, 2429, 7, 3712, 78, 11, 23029, 198, 220, 220, 220, 267, 796, 2429, 7, 16458, 6144, 1098, 7, 25, 78, 828, 1917, 11, 2081, 11, 337, 364, 29727, 5080, 1694, 7, 16, 4008, 198, 220, 220, 220, 2488, 9288, 267, 6624, 352, 198, 220, 220, 220, 1303, 1332, 43030, 198, 220, 220, 220, 19643, 796, 10385, 62, 82, 7, 19182, 90, 43879, 2414, 5512, 2081, 11, 1917, 8, 198, 220, 220, 220, 2488, 9288, 19643, 6624, 685, 16, 8183, 198, 220, 220, 220, 267, 796, 10385, 62, 82, 7, 33, 970, 11, 19643, 11, 1917, 8, 198, 220, 220, 220, 2488, 9288, 267, 6624, 2081, 628, 220, 220, 220, 350, 2662, 6322, 44154, 13, 1676, 65, 1799, 62, 9122, 7, 45573, 8, 628, 220, 220, 220, 809, 796, 8444, 8374, 4933, 67, 729, 7, 45573, 8, 198, 220, 220, 220, 275, 79, 796, 220, 4296, 7, 11110, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41216, 62, 6667, 2086, 7, 11110, 11, 347, 970, 20344, 3890, 7, 15, 13, 15, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2081, 8, 628, 220, 220, 220, 2488, 9288, 37124, 7, 46583, 11, 2081, 8, 15139, 230, 657, 13, 27790, 39118, 22370, 27696, 17657, 2414, 379, 349, 28, 15, 13, 18005, 198, 220, 220, 220, 374, 796, 29308, 7, 14323, 11, 1917, 11, 2450, 11, 8444, 8374, 4933, 67, 729, 7, 45573, 828, 347, 970, 20344, 3890, 7, 16, 13, 15, 4008, 198, 220, 220, 220, 2488, 9288, 374, 15139, 230, 532, 3064, 13, 15, 379, 349, 28, 15, 13, 486, 198, 437, 198 ]
2.325581
473
# byproducts.jl """ StartWorkers(nwrkrs::Int) Start workers if needed. """ function StartWorkers(nwrkrs::Int) set_workers = nwrkrs nworkers() < set_workers ? addprocs(set_workers) : nothing nworkers() end """ TaskDriver(indx,fn) Broacast / distribute task (fn; e.g. loop_task1) over indices (indx; e.g. file indices) Examples: ``` using CbiomesProcessing, Distributed, SparseArrays TaskDriver(1,CbiomesProcessing.loop_task1) StartWorkers(4) @everywhere using CbiomesProcessing, SparseArrays TaskDriver(1:4,CbiomesProcessing.loop_task1) ``` Visualize results: ``` using FortranFiles, Plots k=1 recl=720*360*4 fil="diags_interp/ETAN/ETAN.0000000732.data" f = FortranFile(fil,"r",access="direct",recl=recl,convert="big-endian") tmp=read(f,rec=k,(Float32,(720,360))); close(f) heatmap(tmp) ``` """ function TaskDriver(indx::Union{UnitRange{Int},Array{Int,1},Int},fn::Function) i=collect(indx) length(i)>1 ? i=distribute(i) : nothing isa(i,DArray) ? println(i.indices) : nothing fn.(i) end """ MetaFileRead(filIn::String) Reads a meta file generated by MITgcm """ function MetaFileRead(FileName::String) MetaFile=FileName[1:end-5]*".meta" f = open(MetaFile) lines = readlines(f) close(f) MetaFile=Dict("MetaFile" => MetaFile) while !isempty(lines) line=popfirst!(lines) i0=findfirst(isequal('='), line) i1=findfirst(isequal(';'), line) !isnothing(i0) ? nam=strip(line[1:i0-1]) : nam="" val=nothing #show(line) if nam=="dimList" #special case: dimList val=fill(0.,(MetaFile["nDims"],3)) for ii=1:MetaFile["nDims"] line=popfirst!(lines) tmp1=split(line,",") #tmp1=map(x->(v = tryparse(Int,x); ismissing(v) ? 0.0 : v),tmp1) val[ii,:]=parse.(Int,tmp1[1:3]) end line=popfirst!(lines) elseif nam=="fldList" #special case: fldList line=popfirst!(lines) tmp1=split(line,"'") val=String.(tmp1[2:2:end]) line=popfirst!(lines) elseif nam=="dataprec" #sepcial case: dataprec tmp1=split(line) tmp1[4]=="'float32'" ? val=Float32 : val=Float64 elseif nam=="nDims" #sepcial case: nDims tmp1=split(line[i0+1:i1-1]) val=parse(Int64,tmp1[2]) end # if ~isnothing(val) tmp2=Dict(nam => val) MetaFile=merge(MetaFile,tmp2) end end return MetaFile end """ MatrixInterp(in::Array{T,N},MTRX,siz) where {T,N} Interpolate `in` using `MTRX` to grid of size `siz`. """ function MatrixInterp(in::Array{T,N},MTRX::SparseMatrixCSC,siz) where {T,N} #input l=size(in,1)*size(in,2); m=size(in,3); tmp1=reshape(in,l,m) tmp0=Float64.(.!(isnan.(tmp1))) tmp1[isnan.(tmp1)].=0. siz=siz[1],siz[2],m #matrix product tmp0=MTRX*tmp0 tmp1=MTRX*tmp1 tmp1=tmp1./tmp0 #this may be redundant: tmp1[tmp0 .== 0.] .= NaN #output out=reshape(tmp1,siz) m==1 ? out=dropdims(out,dims=3) : nothing return out end
[ 2, 416, 29498, 13, 20362, 198, 198, 37811, 198, 220, 220, 220, 7253, 12468, 364, 7, 77, 18351, 74, 3808, 3712, 5317, 8, 198, 198, 10434, 3259, 611, 2622, 13, 198, 37811, 198, 8818, 7253, 12468, 364, 7, 77, 18351, 74, 3808, 3712, 5317, 8, 198, 220, 220, 900, 62, 22896, 796, 299, 18351, 74, 3808, 198, 220, 220, 299, 22896, 3419, 1279, 900, 62, 22896, 5633, 751, 1676, 6359, 7, 2617, 62, 22896, 8, 1058, 2147, 198, 220, 220, 299, 22896, 3419, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 15941, 32103, 7, 521, 87, 11, 22184, 8, 198, 198, 15783, 330, 459, 1220, 14983, 4876, 357, 22184, 26, 304, 13, 70, 13, 9052, 62, 35943, 16, 8, 625, 36525, 357, 521, 87, 26, 304, 13, 70, 13, 2393, 36525, 8, 198, 198, 27730, 25, 198, 198, 15506, 63, 198, 3500, 327, 8482, 2586, 18709, 278, 11, 4307, 6169, 11, 1338, 17208, 3163, 20477, 198, 25714, 32103, 7, 16, 11, 34, 8482, 2586, 18709, 278, 13, 26268, 62, 35943, 16, 8, 198, 198, 10434, 12468, 364, 7, 19, 8, 198, 31, 16833, 3003, 1262, 327, 8482, 2586, 18709, 278, 11, 1338, 17208, 3163, 20477, 198, 25714, 32103, 7, 16, 25, 19, 11, 34, 8482, 2586, 18709, 278, 13, 26268, 62, 35943, 16, 8, 198, 15506, 63, 198, 198, 36259, 1096, 2482, 25, 198, 198, 15506, 63, 198, 3500, 6401, 2596, 25876, 11, 1345, 1747, 198, 74, 28, 16, 198, 260, 565, 28, 23906, 9, 15277, 9, 19, 198, 10379, 2625, 10989, 3775, 62, 3849, 79, 14, 2767, 1565, 14, 2767, 1565, 13, 24598, 22, 2624, 13, 7890, 1, 198, 69, 796, 220, 6401, 2596, 8979, 7, 10379, 553, 81, 1600, 15526, 2625, 12942, 1600, 260, 565, 28, 260, 565, 11, 1102, 1851, 2625, 14261, 12, 437, 666, 4943, 198, 22065, 28, 961, 7, 69, 11, 8344, 28, 74, 11, 7, 43879, 2624, 11, 7, 23906, 11, 15277, 4008, 1776, 1969, 7, 69, 8, 198, 25080, 8899, 7, 22065, 8, 198, 15506, 63, 198, 37811, 198, 8818, 15941, 32103, 7, 521, 87, 3712, 38176, 90, 26453, 17257, 90, 5317, 5512, 19182, 90, 5317, 11, 16, 5512, 5317, 5512, 22184, 3712, 22203, 8, 198, 220, 220, 220, 1312, 28, 33327, 7, 521, 87, 8, 198, 220, 220, 220, 4129, 7, 72, 8, 29, 16, 5633, 1312, 28, 17080, 4163, 7, 72, 8, 1058, 2147, 198, 220, 220, 220, 318, 64, 7, 72, 11, 35, 19182, 8, 5633, 44872, 7, 72, 13, 521, 1063, 8, 1058, 2147, 198, 220, 220, 220, 24714, 12195, 72, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 30277, 8979, 5569, 7, 10379, 818, 3712, 10100, 8, 198, 198, 5569, 82, 257, 13634, 2393, 7560, 416, 17168, 70, 11215, 198, 37811, 198, 8818, 30277, 8979, 5569, 7, 8979, 5376, 3712, 10100, 8, 628, 220, 220, 220, 30277, 8979, 28, 8979, 5376, 58, 16, 25, 437, 12, 20, 60, 9, 1911, 28961, 1, 198, 220, 220, 220, 277, 796, 1280, 7, 48526, 8979, 8, 198, 220, 220, 220, 3951, 796, 1100, 6615, 7, 69, 8, 198, 220, 220, 220, 1969, 7, 69, 8, 628, 220, 220, 220, 30277, 8979, 28, 35, 713, 7203, 48526, 8979, 1, 5218, 30277, 8979, 8, 198, 220, 220, 220, 981, 5145, 271, 28920, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1627, 28, 12924, 11085, 0, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 15, 28, 19796, 11085, 7, 786, 13255, 10786, 11639, 828, 1627, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 16, 28, 19796, 11085, 7, 786, 13255, 10786, 26, 33809, 1627, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 22366, 7, 72, 15, 8, 5633, 299, 321, 28, 36311, 7, 1370, 58, 16, 25, 72, 15, 12, 16, 12962, 1058, 299, 321, 33151, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 28, 22366, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12860, 7, 1370, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 299, 321, 855, 1, 27740, 8053, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20887, 1339, 25, 5391, 8053, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 28, 20797, 7, 15, 1539, 7, 48526, 8979, 14692, 77, 35, 12078, 33116, 18, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 21065, 28, 16, 25, 48526, 8979, 14692, 77, 35, 12078, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 28, 12924, 11085, 0, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 16, 28, 35312, 7, 1370, 553, 553, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 22065, 16, 28, 8899, 7, 87, 3784, 7, 85, 796, 1949, 29572, 7, 5317, 11, 87, 1776, 318, 45688, 7, 85, 8, 5633, 657, 13, 15, 1058, 410, 828, 22065, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 58, 4178, 11, 25, 22241, 29572, 12195, 5317, 11, 22065, 16, 58, 16, 25, 18, 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, 1627, 28, 12924, 11085, 0, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 321, 855, 1, 69, 335, 8053, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20887, 1339, 25, 277, 335, 8053, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 28, 12924, 11085, 0, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 16, 28, 35312, 7, 1370, 553, 6, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 28, 10100, 12195, 22065, 16, 58, 17, 25, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 28, 12924, 11085, 0, 7, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 321, 855, 1, 19608, 499, 8344, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 325, 79, 2413, 1339, 25, 4818, 499, 8344, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 16, 28, 35312, 7, 1370, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 16, 58, 19, 60, 855, 30543, 22468, 2624, 29653, 5633, 1188, 28, 43879, 2624, 1058, 1188, 28, 43879, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 321, 855, 1, 77, 35, 12078, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 325, 79, 2413, 1339, 25, 299, 35, 12078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 16, 28, 35312, 7, 1370, 58, 72, 15, 10, 16, 25, 72, 16, 12, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 28, 29572, 7, 5317, 2414, 11, 22065, 16, 58, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5299, 271, 22366, 7, 2100, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 17, 28, 35, 713, 7, 7402, 5218, 1188, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30277, 8979, 28, 647, 469, 7, 48526, 8979, 11, 22065, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 30277, 8979, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 24936, 9492, 79, 7, 259, 3712, 19182, 90, 51, 11, 45, 5512, 44, 5446, 55, 11, 82, 528, 8, 810, 1391, 51, 11, 45, 92, 198, 198, 9492, 16104, 378, 4600, 259, 63, 1262, 4600, 44, 5446, 55, 63, 284, 10706, 286, 2546, 4600, 82, 528, 44646, 198, 37811, 198, 8818, 24936, 9492, 79, 7, 259, 3712, 19182, 90, 51, 11, 45, 5512, 44, 5446, 55, 3712, 50, 29572, 46912, 34, 6173, 11, 82, 528, 8, 810, 1391, 51, 11, 45, 92, 198, 220, 220, 220, 1303, 15414, 198, 220, 220, 220, 300, 28, 7857, 7, 259, 11, 16, 27493, 7857, 7, 259, 11, 17, 1776, 198, 220, 220, 220, 285, 28, 7857, 7, 259, 11, 18, 1776, 198, 220, 220, 220, 45218, 16, 28, 3447, 1758, 7, 259, 11, 75, 11, 76, 8, 198, 220, 220, 220, 45218, 15, 28, 43879, 2414, 12195, 13, 0, 7, 271, 12647, 12195, 22065, 16, 22305, 198, 220, 220, 220, 45218, 16, 58, 271, 12647, 12195, 22065, 16, 25295, 28, 15, 13, 198, 220, 220, 220, 264, 528, 28, 82, 528, 58, 16, 4357, 82, 528, 58, 17, 4357, 76, 198, 220, 220, 220, 1303, 6759, 8609, 1720, 198, 220, 220, 220, 45218, 15, 28, 44, 5446, 55, 9, 22065, 15, 198, 220, 220, 220, 45218, 16, 28, 44, 5446, 55, 9, 22065, 16, 198, 220, 220, 220, 45218, 16, 28, 22065, 16, 19571, 22065, 15, 198, 220, 220, 220, 1303, 5661, 743, 307, 30806, 25, 198, 220, 220, 220, 45218, 16, 58, 22065, 15, 764, 855, 657, 8183, 764, 28, 11013, 45, 198, 220, 220, 220, 1303, 22915, 198, 220, 220, 220, 503, 28, 3447, 1758, 7, 22065, 16, 11, 82, 528, 8, 198, 220, 220, 220, 285, 855, 16, 5633, 503, 28, 14781, 67, 12078, 7, 448, 11, 67, 12078, 28, 18, 8, 1058, 2147, 198, 220, 220, 220, 1441, 503, 198, 437, 198 ]
1.953602
1,638
# # Example of a medium-scale graphene calculation. Only suitable for running # on a cluster or machine with large memory. #src tags: long # using DFTK kgrid = [12, 12, 4] Tsmear = 0.0009500431544769484 Ecut = 15 lattice = [4.659533614391621 -2.3297668071958104 0.0; 0.0 4.035274479829987 0.0; 0.0 0.0 15.117809010356462] C = ElementPsp(:C, psp=load_psp("hgh/pbe/c-q4")) atoms = [C => [[0.0, 0.0, 0.0], [0.33333333333, 0.66666666667, 0.0]]] model = model_DFT(lattice, atoms, [:gga_x_pbe, :gga_c_pbe]; temperature=Tsmear, smearing=Smearing.Gaussian()) basis = PlaneWaveBasis(model, Ecut, kgrid=kgrid) # Run SCF n_bands = 6 scfres = self_consistent_field(basis; n_bands=n_bands) # Print obtained energies println() display(scfres.energies)
[ 2, 198, 2, 17934, 286, 257, 7090, 12, 9888, 42463, 17952, 13, 5514, 11080, 329, 2491, 198, 2, 319, 257, 13946, 393, 4572, 351, 1588, 4088, 13, 198, 2, 10677, 15940, 25, 890, 198, 2, 198, 198, 3500, 360, 9792, 42, 198, 198, 74, 25928, 796, 685, 1065, 11, 1105, 11, 604, 60, 198, 51, 5796, 451, 796, 657, 13, 830, 3865, 405, 3559, 1314, 34825, 3388, 34137, 198, 36, 8968, 796, 1315, 198, 198, 75, 1078, 501, 796, 685, 19, 13, 2996, 3865, 29211, 1415, 2670, 1433, 2481, 532, 17, 13, 18, 26561, 2791, 36928, 1129, 3365, 13464, 657, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 604, 13, 44215, 1983, 2598, 43240, 1959, 44183, 657, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 657, 13, 15, 1315, 13, 17657, 34583, 20943, 2327, 2414, 5237, 60, 198, 34, 796, 11703, 47, 2777, 7, 25, 34, 11, 279, 2777, 28, 2220, 62, 862, 79, 7203, 71, 456, 14, 79, 1350, 14, 66, 12, 80, 19, 48774, 198, 265, 3150, 796, 685, 34, 5218, 16410, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 4357, 685, 15, 13, 24840, 24840, 20370, 11, 657, 13, 41977, 28933, 11, 657, 13, 15, 11907, 60, 198, 198, 19849, 796, 2746, 62, 8068, 51, 7, 75, 1078, 501, 11, 23235, 11, 685, 25, 1130, 64, 62, 87, 62, 79, 1350, 11, 1058, 1130, 64, 62, 66, 62, 79, 1350, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5951, 28, 51, 5796, 451, 11, 895, 6648, 28, 7556, 6648, 13, 35389, 31562, 28955, 198, 12093, 271, 796, 36829, 39709, 15522, 271, 7, 19849, 11, 412, 8968, 11, 479, 25928, 28, 74, 25928, 8, 198, 198, 2, 5660, 6374, 37, 198, 77, 62, 21397, 796, 718, 198, 1416, 69, 411, 796, 2116, 62, 5936, 7609, 62, 3245, 7, 12093, 271, 26, 299, 62, 21397, 28, 77, 62, 21397, 8, 198, 198, 2, 12578, 6492, 27598, 198, 35235, 3419, 198, 13812, 7, 1416, 69, 411, 13, 877, 70, 444, 8, 198 ]
2.153846
364
#!/usr/bin/env julia #load path to qjulia home directory push!(LOAD_PATH, joinpath(@__DIR__, "..", "core")) push!(LOAD_PATH, joinpath(@__DIR__, "..", "libs/quda-routines")) push!(LOAD_PATH, joinpath(@__DIR__, "..", "libs/scidac-routines")) push!(LOAD_PATH, joinpath(@__DIR__, "..", "main/fields")) import QJuliaBlas import QJuliaReduce import QJuliaUtils import QJuliaEnums import QJuliaInterface import QJuliaGaugeUtils import QJuliaComms import QJuliaSolvers import QUDARoutines import SCIDACRoutines using Random using LinearAlgebra using MPI #create function/type alias double = Float64 float = Float64 load_config_from_file = "/home/astrel/Configs/wl_5p5_x2p38_um0p4125_cfg_1000.lime" ############################################################################################## [QJuliaUtils.gridsize_from_cmdline[i] = 1 for i = 1:length(QJuliaUtils.gridsize_from_cmdline)] QJuliaUtils.get_rank_order("col") #initialize MPI MPI.Init() QUDARoutines.initCommsGridQuda_qj(length(QJuliaUtils.gridsize_from_cmdline), QJuliaUtils.gridsize_from_cmdline, QJuliaUtils.lex_rank_from_coords_t_c, C_NULL) QUDARoutines.initQuda_qj(0) Random.seed!(2019) solve_unit_source = true const lx = 16 const ly = 16 const lz = 16 const lt = 64 const ls = 1 const dim = 4 const vol = lx*ly*lz*lt*ls #field latt point sizes const ssize = 12 const gsize = 9 const splen = vol*ssize const gflen = vol*gsize const sp_real_len = 2*vol*ssize const sp_real_parity_len = Int(sp_real_len / 2) sp_in = Vector{Complex{Float64}}(undef, splen) sp_ou = Vector{Complex{Float64}}(undef, splen) gauge = Matrix{Complex{Float64}}(undef, gflen, 4) if solve_unit_source == false QJuliaUtils.gen_random_spinor!(sp_in) else QJuliaUtils.gen_unit_spinor!(sp_ou) end gauge_param = QJuliaInterface.QJuliaGaugeParam_qj() gauge_param.X = (lx, ly, lz, lt) gauge_param.cpu_prec = QJuliaEnums.QJULIA_DOUBLE_PRECISION gauge_param.t_boundary = QJuliaEnums.QJULIA_PERIODIC_T gauge_param.gtype = QJuliaEnums.QJULIA_WILSON_LINKS gauge_param.anisotropy = 2.38 gauge_param.cuda_prec = QJuliaEnums.QJULIA_DOUBLE_PRECISION gauge_param.reconstruct = QJuliaEnums.QJULIA_RECONSTRUCT_12 gauge_param.cuda_prec_sloppy = QJuliaEnums.QJULIA_SINGLE_PRECISION gauge_param.reconstruct_sloppy = QJuliaEnums.QJULIA_RECONSTRUCT_12 gauge_param.cuda_prec_precondition = QJuliaEnums.QJULIA_DOUBLE_PRECISION gauge_param.reconstruct_precondition = QJuliaEnums.QJULIA_RECONSTRUCT_12 gauge_param.reconstruct_refinement_sloppy = QJuliaEnums.QJULIA_RECONSTRUCT_12 gauge_param.cuda_prec_refinement_sloppy = QJuliaEnums.QJULIA_HALF_PRECISION #println("======= Gauge parameters =======") #QJuliaInterface.printQudaGaugeParam_qj(gauge_param) #load configuration from file or generate random one: gauge_load_type = 1 if load_config_from_file != "" Xdims = Vector{Cint}(undef, 4) for i in 1:length(Xdims); Xdims[i] = gauge_param.X[i] ; end qio_prec = Cint(8) #gauge_param.cuda_prec SCIDACRoutines.QMPInitComms_qj(0, C_NULL, QJuliaUtils.gridsize_from_cmdline) SCIDACRoutines.read_gauge_field_qj(load_config_from_file, gauge, qio_prec, Xdims, 0, C_NULL) gauge_load_type = 2 end QJuliaGaugeUtils.construct_gauge_field!(gauge, gauge_load_type, gauge_param) gauge_param.gtype = QJuliaEnums.QJULIA_SU3_LINKS #currently cannot set QJULIA_WILSON_LINKS (=QJULIA_SU3_LINKS) for QUDA x_face_size = gauge_param.X[2]*gauge_param.X[3]*Int(gauge_param.X[4]/2); y_face_size = gauge_param.X[1]*gauge_param.X[3]*Int(gauge_param.X[4]/2); z_face_size = gauge_param.X[1]*gauge_param.X[2]*Int(gauge_param.X[4]/2); t_face_size = gauge_param.X[1]*gauge_param.X[2]*Int(gauge_param.X[3]/2); gauge_param.ga_pad = max(x_face_size, y_face_size, z_face_size, t_face_size); QUDARoutines.loadGaugeQuda_qj(gauge, gauge_param) #Check plaquette plaq = Array{Cdouble, 1}(undef, 3) QUDARoutines.plaqQuda_qj(plaq) println("Computed plaquette is ", plaq[1], ", (spatial = ", plaq[2], ", temporal = ", plaq[3], ")") mass = -0.4125 #mass = -0.95 inv_param = QJuliaInterface.QJuliaInvertParam_qj() inv_param.residual_type = QJuliaEnums.QJULIA_L2_RELATIVE_RESIDUAL #println("======= Invert parameters =======") #QJuliaInterface.printQudaInvertParam_qj(inv_param) inv_param.mass = mass inv_param.kappa = 1.0 / (2.0 * (1.0 + 3.0/gauge_param.anisotropy + mass)) inv_param.maxiter = 200 inv_param.tol = 1e-9 inv_param.cuda_prec = QJuliaEnums.QJULIA_DOUBLE_PRECISION inv_param.cuda_prec_sloppy = QJuliaEnums.QJULIA_SINGLE_PRECISION inv_param.cuda_prec_precondition = QJuliaEnums.QJULIA_HALF_PRECISION inv_param.solution_type = QJuliaEnums.QJULIA_MATPC_SOLUTION #inv_param.inv_type = QJuliaEnums.QJULIA_PIPEPCG_INVERTER inv_param.inv_type = QJuliaEnums.QJULIA_FCG_INVERTER println("Kappa = ", inv_param.kappa) mdagm(out, inp) = QUDARoutines.MatDagMatQuda_qj(out, inp, inv_param) mat(out, inp) = QUDARoutines.MatQuda_qj(out, inp, inv_param) Doe(out, inp) = QUDARoutines.dslashQuda_qj(out, inp, inv_param, QJuliaEnums.QJULIA_EVEN_PARITY) Deo(out, inp) = QUDARoutines.dslashQuda_qj(out, inp, inv_param, QJuliaEnums.QJULIA_ODD_PARITY ) # Setup preconditioner precond_param = QJuliaInterface.QJuliaInvertParam_qj() precond_param.residual_type = QJuliaEnums.QJULIA_L2_RELATIVE_RESIDUAL #precond_param.inv_type = QJuliaEnums.QJULIA_PIPECG_INVERTER #precond_param.inv_type = QJuliaEnums.QJULIA_INVALID_INVERTER precond_param.inv_type = QJuliaEnums.QJULIA_LANMR_INVERTER #wroks for naive and fails for pipelined precond_param.dslash_type_precondition = QJuliaEnums.QJULIA_WILSON_DSLASH precond_param.kappa = 1.0 / (2.0 * (1 + 3/gauge_param.anisotropy + mass)) precond_param.cuda_prec = QJuliaEnums.QJULIA_DOUBLE_PRECISION precond_param.cuda_prec_sloppy = QJuliaEnums.QJULIA_SINGLE_PRECISION precond_param.cuda_prec_precondition = QJuliaEnums.QJULIA_DOUBLE_PRECISION precond_param.solution_type = QJuliaEnums.QJULIA_MATPC_SOLUTION precond_param.maxiter = precond_param.inv_type == QJuliaEnums.QJULIA_PCG_INVERTER ? 30 : 10 precond_param.Nsteps = 1 mdagmPre(out, inp) = QUDARoutines.MatDagMatQuda_qj(out, inp, precond_param) pre_solv_param = QJuliaSolvers.QJuliaSolverParam_qj() pre_solv_param.inv_type = precond_param.inv_type pre_solv_param.tol = 1e-2 # pre_solv_param.maxiter = precond_param.maxiter pre_solv_param.Nsteps = 1 pre_solv_param.global_reduction = false K(out, inp) = QJuliaSolvers.solve(out, inp, mdagmPre, mdagmPre, pre_solv_param) x_even = view(reinterpret(double, sp_ou), 1:sp_real_parity_len) x_odd = view(reinterpret(double, sp_ou), sp_real_parity_len+1:sp_real_len) b_even = view(reinterpret(double, sp_in), 1:sp_real_parity_len) b_odd = view(reinterpret(double, sp_in), sp_real_parity_len+1:sp_real_len) tmpl_src_norm = norm(sp_ou) if solve_unit_source == true mat(sp_in, sp_ou) sp_ou .=@. 0.0 end init_src_norm = norm(sp_in) println("Initial source norm:: ", init_src_norm, " , template src norm is: ", tmpl_src_norm) #Auxiliary field tmp = Vector{double}(undef, sp_real_len) t_even = view(tmp, 1:sp_real_parity_len) t_odd = view(tmp, sp_real_parity_len+1:sp_real_len) #random intial guess #QJuliaUtils.gen_random_spinor!(sp_ou, splen) #prepare source/solution: if inv_param.matpc_type == QJuliaEnums.QJULIA_MATPC_EVEN_EVEN # src = b_e + k D_eo b_o Deo(t_even, b_odd) x_odd .=@. b_even + inv_param.kappa*t_even end # init_prec_src_norm = norm(x_odd) # println("Initial precondtioned source norm:: ", init_prec_src_norm, " , requested tolerance: ", inv_param.tol) solv_param = QJuliaSolvers.QJuliaSolverParam_qj() # Set up parameters solv_param.inv_type = inv_param.inv_type solv_param.inv_type_precondition = precond_param.inv_type solv_param.tol = inv_param.tol # solv_param.maxiter = inv_param.maxiter solv_param.delta = 1e-2 solv_param.nKrylov = 4 #8 is very good for unit source solv_param.Nsteps = 2 if precond_param.inv_type != QJuliaEnums.QJULIA_INVALID_INVERTER QJuliaSolvers.solve(x_even, x_odd, mdagm, mdagm, solv_param, K) else QJuliaSolvers.solve(x_even, x_odd, mdagm, mdagm, solv_param) end #compute true residual: r = t_odd mdagm(r, x_even) r .=@. x_odd - r r2 = dot(r, r) println("True residual norm: ", sqrt(r2)) #reconstruct source/solution: if inv_param.matpc_type == QJuliaEnums.QJULIA_MATPC_EVEN_EVEN # x_o = b_o + k D_oe x_e Doe(t_odd, x_even) x_odd .=@. b_odd + inv_param.kappa*t_odd end if solve_unit_source == true QJuliaUtils.gen_unit_spinor!(sp_in) sp_ou .=@. sp_in - sp_ou error_norm = norm(sp_ou) println("Solution error: ", error_norm) end QUDARoutines.endQuda_qj() MPI.Finalize()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 2, 2220, 3108, 284, 10662, 73, 43640, 1363, 8619, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 7295, 48774, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 8019, 82, 14, 421, 6814, 12, 81, 448, 1127, 48774, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 8019, 82, 14, 1416, 312, 330, 12, 81, 448, 1127, 48774, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 12417, 14, 25747, 48774, 198, 198, 11748, 1195, 16980, 544, 3629, 292, 198, 11748, 1195, 16980, 544, 7738, 7234, 198, 11748, 1195, 16980, 544, 18274, 4487, 198, 11748, 1195, 16980, 544, 4834, 5700, 198, 11748, 1195, 16980, 544, 39317, 198, 11748, 1195, 16980, 544, 38, 559, 469, 18274, 4487, 198, 11748, 1195, 16980, 544, 5377, 907, 198, 11748, 1195, 16980, 544, 36949, 690, 198, 11748, 1195, 8322, 1503, 448, 1127, 198, 11748, 6374, 2389, 2246, 49, 448, 1127, 198, 198, 3500, 14534, 198, 3500, 44800, 2348, 29230, 198, 3500, 4904, 40, 198, 198, 2, 17953, 2163, 14, 4906, 16144, 198, 23352, 220, 796, 48436, 2414, 198, 22468, 220, 220, 796, 48436, 2414, 198, 198, 2220, 62, 11250, 62, 6738, 62, 7753, 796, 12813, 11195, 14, 459, 2411, 14, 16934, 82, 14, 40989, 62, 20, 79, 20, 62, 87, 17, 79, 2548, 62, 388, 15, 79, 19, 11623, 62, 37581, 62, 12825, 13, 27299, 1, 198, 198, 29113, 29113, 14468, 7804, 4242, 2235, 198, 198, 58, 48, 16980, 544, 18274, 4487, 13, 2164, 2340, 1096, 62, 6738, 62, 28758, 1370, 58, 72, 60, 796, 352, 329, 1312, 796, 352, 25, 13664, 7, 48, 16980, 544, 18274, 4487, 13, 2164, 2340, 1096, 62, 6738, 62, 28758, 1370, 15437, 198, 48, 16980, 544, 18274, 4487, 13, 1136, 62, 43027, 62, 2875, 7203, 4033, 4943, 198, 198, 2, 36733, 1096, 4904, 40, 198, 7378, 40, 13, 31768, 3419, 198, 198, 48, 8322, 1503, 448, 1127, 13, 15003, 5377, 907, 41339, 48, 15339, 62, 80, 73, 7, 13664, 7, 48, 16980, 544, 18274, 4487, 13, 2164, 2340, 1096, 62, 6738, 62, 28758, 1370, 828, 1195, 16980, 544, 18274, 4487, 13, 2164, 2340, 1096, 62, 6738, 62, 28758, 1370, 11, 1195, 16980, 544, 18274, 4487, 13, 2588, 62, 43027, 62, 6738, 62, 1073, 3669, 62, 83, 62, 66, 11, 327, 62, 33991, 8, 198, 198, 48, 8322, 1503, 448, 1127, 13, 15003, 48, 15339, 62, 80, 73, 7, 15, 8, 198, 198, 29531, 13, 28826, 0, 7, 23344, 8, 198, 198, 82, 6442, 62, 20850, 62, 10459, 796, 2081, 198, 198, 9979, 300, 87, 796, 1467, 198, 9979, 22404, 796, 1467, 198, 9979, 300, 89, 796, 1467, 198, 9979, 300, 83, 796, 5598, 198, 9979, 43979, 796, 352, 198, 198, 9979, 5391, 796, 604, 198, 9979, 2322, 796, 300, 87, 9, 306, 9, 75, 89, 9, 2528, 9, 7278, 198, 198, 2, 3245, 47240, 966, 10620, 198, 9979, 264, 7857, 796, 1105, 198, 9979, 308, 7857, 796, 860, 198, 198, 9979, 4328, 268, 796, 2322, 9, 824, 1096, 198, 9979, 308, 2704, 268, 796, 2322, 9, 70, 7857, 198, 198, 9979, 599, 62, 5305, 62, 11925, 796, 362, 9, 10396, 9, 824, 1096, 198, 9979, 599, 62, 5305, 62, 1845, 414, 62, 11925, 796, 2558, 7, 2777, 62, 5305, 62, 11925, 1220, 362, 8, 198, 198, 2777, 62, 259, 796, 20650, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 4328, 268, 8, 198, 2777, 62, 280, 796, 20650, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 4328, 268, 8, 198, 70, 559, 469, 796, 24936, 90, 5377, 11141, 90, 43879, 2414, 11709, 7, 917, 891, 11, 308, 2704, 268, 11, 604, 8, 198, 198, 361, 8494, 62, 20850, 62, 10459, 6624, 3991, 198, 220, 1195, 16980, 544, 18274, 4487, 13, 5235, 62, 25120, 62, 39706, 273, 0, 7, 2777, 62, 259, 8, 198, 17772, 198, 220, 1195, 16980, 544, 18274, 4487, 13, 5235, 62, 20850, 62, 39706, 273, 0, 7, 2777, 62, 280, 8, 198, 437, 198, 198, 70, 559, 469, 62, 17143, 796, 1195, 16980, 544, 39317, 13, 48, 16980, 544, 38, 559, 469, 22973, 62, 80, 73, 3419, 198, 70, 559, 469, 62, 17143, 13, 55, 796, 357, 75, 87, 11, 22404, 11, 300, 89, 11, 300, 83, 8, 198, 70, 559, 469, 62, 17143, 13, 36166, 62, 3866, 66, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 70, 559, 469, 62, 17143, 13, 83, 62, 7784, 560, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 18973, 40, 3727, 2149, 62, 51, 198, 70, 559, 469, 62, 17143, 13, 70, 4906, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 54, 4146, 11782, 62, 43, 17248, 50, 198, 70, 559, 469, 62, 17143, 13, 272, 271, 313, 28338, 796, 362, 13, 2548, 198, 198, 70, 559, 469, 62, 17143, 13, 66, 15339, 62, 3866, 66, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 70, 559, 469, 62, 17143, 13, 260, 41571, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 2200, 10943, 46126, 62, 1065, 198, 70, 559, 469, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 82, 5439, 14097, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 50, 2751, 2538, 62, 47, 38827, 42446, 198, 70, 559, 469, 62, 17143, 13, 260, 41571, 62, 82, 5439, 14097, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 2200, 10943, 46126, 62, 1065, 198, 70, 559, 469, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 3866, 31448, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 70, 559, 469, 62, 17143, 13, 260, 41571, 62, 3866, 31448, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 2200, 10943, 46126, 62, 1065, 198, 70, 559, 469, 62, 17143, 13, 260, 41571, 62, 5420, 21828, 62, 82, 5439, 14097, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 2200, 10943, 46126, 62, 1065, 198, 70, 559, 469, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 5420, 21828, 62, 82, 5439, 14097, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 39, 1847, 37, 62, 47, 38827, 42446, 198, 198, 2, 35235, 7203, 1421, 18604, 35094, 469, 10007, 29335, 855, 4943, 198, 2, 48, 16980, 544, 39317, 13, 4798, 48, 15339, 38, 559, 469, 22973, 62, 80, 73, 7, 70, 559, 469, 62, 17143, 8, 198, 198, 2, 2220, 8398, 422, 2393, 393, 7716, 4738, 530, 25, 198, 70, 559, 469, 62, 2220, 62, 4906, 796, 352, 198, 361, 3440, 62, 11250, 62, 6738, 62, 7753, 14512, 13538, 198, 220, 1395, 67, 12078, 796, 20650, 90, 34, 600, 92, 7, 917, 891, 11, 604, 8, 198, 220, 329, 1312, 287, 352, 25, 13664, 7, 55, 67, 12078, 1776, 1395, 67, 12078, 58, 72, 60, 796, 18266, 62, 17143, 13, 55, 58, 72, 60, 2162, 886, 198, 220, 10662, 952, 62, 3866, 66, 796, 327, 600, 7, 23, 8, 1303, 70, 559, 469, 62, 17143, 13, 66, 15339, 62, 3866, 66, 628, 220, 6374, 2389, 2246, 49, 448, 1127, 13, 48, 7378, 31768, 5377, 907, 62, 80, 73, 7, 15, 11, 327, 62, 33991, 11, 1195, 16980, 544, 18274, 4487, 13, 2164, 2340, 1096, 62, 6738, 62, 28758, 1370, 8, 198, 220, 6374, 2389, 2246, 49, 448, 1127, 13, 961, 62, 70, 559, 469, 62, 3245, 62, 80, 73, 7, 2220, 62, 11250, 62, 6738, 62, 7753, 11, 18266, 11, 10662, 952, 62, 3866, 66, 11, 1395, 67, 12078, 11, 657, 11, 327, 62, 33991, 8, 198, 220, 18266, 62, 2220, 62, 4906, 796, 362, 198, 437, 198, 48, 16980, 544, 38, 559, 469, 18274, 4487, 13, 41571, 62, 70, 559, 469, 62, 3245, 0, 7, 70, 559, 469, 11, 18266, 62, 2220, 62, 4906, 11, 18266, 62, 17143, 8, 198, 198, 70, 559, 469, 62, 17143, 13, 70, 4906, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 12564, 18, 62, 43, 17248, 50, 220, 197, 197, 2, 41745, 2314, 900, 1195, 41, 6239, 3539, 62, 54, 4146, 11782, 62, 43, 17248, 50, 46121, 48, 41, 6239, 3539, 62, 12564, 18, 62, 43, 17248, 50, 8, 220, 329, 19604, 5631, 198, 198, 87, 62, 2550, 62, 7857, 796, 18266, 62, 17143, 13, 55, 58, 17, 60, 9, 70, 559, 469, 62, 17143, 13, 55, 58, 18, 60, 9, 5317, 7, 70, 559, 469, 62, 17143, 13, 55, 58, 19, 60, 14, 17, 1776, 198, 88, 62, 2550, 62, 7857, 796, 18266, 62, 17143, 13, 55, 58, 16, 60, 9, 70, 559, 469, 62, 17143, 13, 55, 58, 18, 60, 9, 5317, 7, 70, 559, 469, 62, 17143, 13, 55, 58, 19, 60, 14, 17, 1776, 198, 89, 62, 2550, 62, 7857, 796, 18266, 62, 17143, 13, 55, 58, 16, 60, 9, 70, 559, 469, 62, 17143, 13, 55, 58, 17, 60, 9, 5317, 7, 70, 559, 469, 62, 17143, 13, 55, 58, 19, 60, 14, 17, 1776, 198, 83, 62, 2550, 62, 7857, 796, 18266, 62, 17143, 13, 55, 58, 16, 60, 9, 70, 559, 469, 62, 17143, 13, 55, 58, 17, 60, 9, 5317, 7, 70, 559, 469, 62, 17143, 13, 55, 58, 18, 60, 14, 17, 1776, 198, 198, 70, 559, 469, 62, 17143, 13, 4908, 62, 15636, 796, 3509, 7, 87, 62, 2550, 62, 7857, 11, 331, 62, 2550, 62, 7857, 11, 1976, 62, 2550, 62, 7857, 11, 256, 62, 2550, 62, 7857, 1776, 198, 198, 48, 8322, 1503, 448, 1127, 13, 2220, 38, 559, 469, 48, 15339, 62, 80, 73, 7, 70, 559, 469, 11, 18266, 62, 17143, 8, 198, 198, 2, 9787, 458, 36129, 5857, 198, 489, 30188, 796, 15690, 90, 34, 23352, 11, 352, 92, 7, 917, 891, 11, 513, 8, 198, 48, 8322, 1503, 448, 1127, 13, 489, 30188, 48, 15339, 62, 80, 73, 7, 489, 30188, 8, 198, 35235, 7203, 5377, 17128, 458, 36129, 5857, 318, 33172, 458, 30188, 58, 16, 4357, 33172, 357, 2777, 34961, 796, 33172, 220, 458, 30188, 58, 17, 4357, 33172, 21964, 796, 33172, 458, 30188, 58, 18, 4357, 366, 8, 4943, 198, 198, 22208, 796, 532, 15, 13, 19, 11623, 198, 2, 22208, 796, 532, 15, 13, 3865, 198, 198, 16340, 62, 17143, 796, 1195, 16980, 544, 39317, 13, 48, 16980, 544, 818, 1851, 22973, 62, 80, 73, 3419, 198, 16340, 62, 17143, 13, 411, 312, 723, 62, 4906, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 43, 17, 62, 16448, 37045, 62, 19535, 2389, 25620, 198, 2, 35235, 7203, 1421, 18604, 554, 1851, 10007, 29335, 855, 4943, 198, 2, 48, 16980, 544, 39317, 13, 4798, 48, 15339, 818, 1851, 22973, 62, 80, 73, 7, 16340, 62, 17143, 8, 198, 198, 16340, 62, 17143, 13, 22208, 796, 2347, 198, 16340, 62, 17143, 13, 74, 20975, 796, 352, 13, 15, 1220, 357, 17, 13, 15, 1635, 357, 16, 13, 15, 1343, 513, 13, 15, 14, 70, 559, 469, 62, 17143, 13, 272, 271, 313, 28338, 1343, 2347, 4008, 198, 16340, 62, 17143, 13, 9806, 2676, 796, 939, 198, 16340, 62, 17143, 13, 83, 349, 220, 796, 352, 68, 12, 24, 198, 198, 16340, 62, 17143, 13, 66, 15339, 62, 3866, 66, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 16340, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 82, 5439, 14097, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 50, 2751, 2538, 62, 47, 38827, 42446, 198, 16340, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 3866, 31448, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 39, 1847, 37, 62, 47, 38827, 42446, 198, 16340, 62, 17143, 13, 82, 2122, 62, 4906, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 41636, 5662, 62, 50, 3535, 35354, 198, 2, 16340, 62, 17143, 13, 16340, 62, 4906, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 47, 4061, 36, 5662, 38, 62, 1268, 5959, 5781, 198, 16340, 62, 17143, 13, 16340, 62, 4906, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 4851, 38, 62, 1268, 5959, 5781, 198, 198, 35235, 7203, 42, 20975, 796, 33172, 220, 800, 62, 17143, 13, 74, 20975, 8, 198, 198, 9132, 363, 76, 7, 448, 11, 287, 79, 8, 220, 220, 220, 796, 1195, 8322, 1503, 448, 1127, 13, 19044, 35, 363, 19044, 48, 15339, 62, 80, 73, 7, 448, 11, 287, 79, 11, 800, 62, 17143, 8, 198, 6759, 7, 448, 11, 287, 79, 8, 220, 220, 220, 796, 1195, 8322, 1503, 448, 1127, 13, 19044, 48, 15339, 62, 80, 73, 7, 448, 11, 287, 79, 11, 800, 62, 17143, 8, 198, 35, 2577, 7, 448, 11, 287, 79, 8, 220, 220, 220, 220, 220, 796, 1195, 8322, 1503, 448, 1127, 13, 67, 6649, 1077, 48, 15339, 62, 80, 73, 7, 448, 11, 287, 79, 11, 800, 62, 17143, 11, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 20114, 1677, 62, 27082, 9050, 8, 198, 5005, 78, 7, 448, 11, 287, 79, 8, 220, 220, 220, 220, 220, 796, 1195, 8322, 1503, 448, 1127, 13, 67, 6649, 1077, 48, 15339, 62, 80, 73, 7, 448, 11, 287, 79, 11, 800, 62, 17143, 11, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 3727, 35, 62, 27082, 9050, 1267, 198, 198, 2, 31122, 3718, 623, 653, 263, 198, 3866, 17561, 62, 17143, 796, 1195, 16980, 544, 39317, 13, 48, 16980, 544, 818, 1851, 22973, 62, 80, 73, 3419, 198, 198, 3866, 17561, 62, 17143, 13, 411, 312, 723, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 43, 17, 62, 16448, 37045, 62, 19535, 2389, 25620, 198, 2, 3866, 17561, 62, 17143, 13, 16340, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 47, 4061, 2943, 38, 62, 1268, 5959, 5781, 198, 2, 3866, 17561, 62, 17143, 13, 16340, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 1268, 23428, 2389, 62, 1268, 5959, 5781, 198, 3866, 17561, 62, 17143, 13, 16340, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 25697, 13599, 62, 1268, 5959, 5781, 1303, 86, 305, 591, 329, 24354, 290, 10143, 329, 7347, 417, 1389, 198, 3866, 17561, 62, 17143, 13, 67, 6649, 1077, 62, 4906, 62, 3866, 31448, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 54, 4146, 11782, 62, 5258, 43, 11211, 198, 3866, 17561, 62, 17143, 13, 74, 20975, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 352, 13, 15, 1220, 357, 17, 13, 15, 1635, 357, 16, 1343, 513, 14, 70, 559, 469, 62, 17143, 13, 272, 271, 313, 28338, 1343, 2347, 4008, 198, 3866, 17561, 62, 17143, 13, 66, 15339, 62, 3866, 66, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 3866, 17561, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 82, 5439, 14097, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 50, 2751, 2538, 62, 47, 38827, 42446, 198, 3866, 17561, 62, 17143, 13, 66, 15339, 62, 3866, 66, 62, 3866, 31448, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 35, 2606, 19146, 62, 47, 38827, 42446, 198, 3866, 17561, 62, 17143, 13, 82, 2122, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 41636, 5662, 62, 50, 3535, 35354, 198, 3866, 17561, 62, 17143, 13, 9806, 2676, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 3718, 623, 62, 17143, 13, 16340, 62, 4906, 6624, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 5662, 38, 62, 1268, 5959, 5781, 5633, 1542, 1058, 838, 198, 3866, 17561, 62, 17143, 13, 45, 20214, 220, 220, 220, 220, 197, 220, 220, 220, 220, 220, 220, 796, 352, 198, 198, 9132, 363, 76, 6719, 7, 448, 11, 287, 79, 8, 220, 796, 1195, 8322, 1503, 448, 1127, 13, 19044, 35, 363, 19044, 48, 15339, 62, 80, 73, 7, 448, 11, 287, 79, 11, 3718, 623, 62, 17143, 8, 198, 198, 3866, 62, 34453, 85, 62, 17143, 796, 1195, 16980, 544, 36949, 690, 13, 48, 16980, 544, 50, 14375, 22973, 62, 80, 73, 3419, 198, 198, 3866, 62, 34453, 85, 62, 17143, 13, 16340, 62, 4906, 220, 796, 3718, 623, 62, 17143, 13, 16340, 62, 4906, 198, 3866, 62, 34453, 85, 62, 17143, 13, 83, 349, 220, 220, 220, 220, 220, 220, 796, 352, 68, 12, 17, 198, 2, 198, 3866, 62, 34453, 85, 62, 17143, 13, 9806, 2676, 220, 220, 796, 3718, 623, 62, 17143, 13, 9806, 2676, 198, 3866, 62, 34453, 85, 62, 17143, 13, 45, 20214, 220, 220, 220, 796, 352, 198, 3866, 62, 34453, 85, 62, 17143, 13, 20541, 62, 445, 8110, 796, 3991, 198, 198, 42, 7, 448, 11, 287, 79, 8, 796, 1195, 16980, 544, 36949, 690, 13, 82, 6442, 7, 448, 11, 287, 79, 11, 45243, 363, 76, 6719, 11, 45243, 363, 76, 6719, 11, 662, 62, 34453, 85, 62, 17143, 8, 198, 198, 87, 62, 10197, 796, 1570, 7, 260, 27381, 7, 23352, 11, 599, 62, 280, 828, 352, 25, 2777, 62, 5305, 62, 1845, 414, 62, 11925, 8, 198, 87, 62, 5088, 220, 796, 1570, 7, 260, 27381, 7, 23352, 11, 599, 62, 280, 828, 599, 62, 5305, 62, 1845, 414, 62, 11925, 10, 16, 25, 2777, 62, 5305, 62, 11925, 8, 198, 198, 65, 62, 10197, 796, 1570, 7, 260, 27381, 7, 23352, 11, 599, 62, 259, 828, 352, 25, 2777, 62, 5305, 62, 1845, 414, 62, 11925, 8, 198, 65, 62, 5088, 220, 796, 1570, 7, 260, 27381, 7, 23352, 11, 599, 62, 259, 828, 599, 62, 5305, 62, 1845, 414, 62, 11925, 10, 16, 25, 2777, 62, 5305, 62, 11925, 8, 198, 198, 17209, 489, 62, 10677, 62, 27237, 796, 2593, 7, 2777, 62, 280, 8, 198, 198, 361, 8494, 62, 20850, 62, 10459, 6624, 2081, 198, 220, 2603, 7, 2777, 62, 259, 11, 599, 62, 280, 8, 198, 220, 599, 62, 280, 764, 28, 31, 13, 657, 13, 15, 198, 437, 198, 198, 15003, 62, 10677, 62, 27237, 796, 2593, 7, 2777, 62, 259, 8, 198, 35235, 7203, 24243, 2723, 2593, 3712, 33172, 2315, 62, 10677, 62, 27237, 11, 366, 837, 11055, 12351, 2593, 318, 25, 33172, 256, 76, 489, 62, 10677, 62, 27237, 8, 198, 198, 2, 32, 2821, 28129, 2214, 198, 22065, 796, 20650, 90, 23352, 92, 7, 917, 891, 11, 599, 62, 5305, 62, 11925, 8, 198, 198, 83, 62, 10197, 796, 1570, 7, 22065, 11, 352, 25, 2777, 62, 5305, 62, 1845, 414, 62, 11925, 8, 198, 83, 62, 5088, 220, 796, 1570, 7, 22065, 11, 599, 62, 5305, 62, 1845, 414, 62, 11925, 10, 16, 25, 2777, 62, 5305, 62, 11925, 8, 198, 198, 2, 25120, 493, 498, 4724, 198, 2, 48, 16980, 544, 18274, 4487, 13, 5235, 62, 25120, 62, 39706, 273, 0, 7, 2777, 62, 280, 11, 4328, 268, 8, 198, 198, 2, 46012, 533, 2723, 14, 82, 2122, 25, 198, 361, 800, 62, 17143, 13, 6759, 14751, 62, 4906, 6624, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 41636, 5662, 62, 20114, 1677, 62, 20114, 1677, 198, 220, 1303, 12351, 796, 275, 62, 68, 1343, 479, 360, 62, 68, 78, 275, 62, 78, 198, 220, 1024, 78, 7, 83, 62, 10197, 11, 275, 62, 5088, 8, 198, 220, 2124, 62, 5088, 764, 28, 31, 13, 275, 62, 10197, 1343, 800, 62, 17143, 13, 74, 20975, 9, 83, 62, 10197, 198, 437, 198, 198, 2, 198, 15003, 62, 3866, 66, 62, 10677, 62, 27237, 796, 2593, 7, 87, 62, 5088, 8, 198, 2, 198, 35235, 7203, 24243, 3718, 623, 5378, 276, 2723, 2593, 3712, 33172, 2315, 62, 3866, 66, 62, 10677, 62, 27237, 11, 366, 837, 9167, 15621, 25, 33172, 800, 62, 17143, 13, 83, 349, 8, 198, 198, 34453, 85, 62, 17143, 796, 1195, 16980, 544, 36949, 690, 13, 48, 16980, 544, 50, 14375, 22973, 62, 80, 73, 3419, 198, 2, 5345, 510, 10007, 198, 34453, 85, 62, 17143, 13, 16340, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 800, 62, 17143, 13, 16340, 62, 4906, 198, 34453, 85, 62, 17143, 13, 16340, 62, 4906, 62, 3866, 31448, 220, 796, 3718, 623, 62, 17143, 13, 16340, 62, 4906, 198, 34453, 85, 62, 17143, 13, 83, 349, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 800, 62, 17143, 13, 83, 349, 198, 2, 198, 34453, 85, 62, 17143, 13, 9806, 2676, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 800, 62, 17143, 13, 9806, 2676, 198, 34453, 85, 62, 17143, 13, 67, 12514, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 352, 68, 12, 17, 198, 34453, 85, 62, 17143, 13, 77, 42, 563, 27086, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 604, 1303, 23, 318, 845, 922, 329, 4326, 2723, 198, 34453, 85, 62, 17143, 13, 45, 20214, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 198, 198, 361, 3718, 623, 62, 17143, 13, 16340, 62, 4906, 14512, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 1268, 23428, 2389, 62, 1268, 5959, 5781, 198, 220, 1195, 16980, 544, 36949, 690, 13, 82, 6442, 7, 87, 62, 10197, 11, 2124, 62, 5088, 11, 45243, 363, 76, 11, 45243, 363, 76, 11, 1540, 85, 62, 17143, 11, 509, 8, 198, 17772, 198, 220, 1195, 16980, 544, 36949, 690, 13, 82, 6442, 7, 87, 62, 10197, 11, 2124, 62, 5088, 11, 45243, 363, 76, 11, 45243, 363, 76, 11, 1540, 85, 62, 17143, 8, 198, 437, 198, 198, 2, 5589, 1133, 2081, 29598, 25, 198, 81, 796, 256, 62, 5088, 198, 9132, 363, 76, 7, 81, 11, 2124, 62, 10197, 8, 198, 81, 220, 764, 28, 31, 13, 2124, 62, 5088, 532, 374, 198, 81, 17, 796, 16605, 7, 81, 11, 374, 8, 198, 35235, 7203, 17821, 29598, 2593, 25, 33172, 19862, 17034, 7, 81, 17, 4008, 198, 198, 2, 260, 41571, 2723, 14, 82, 2122, 25, 198, 361, 800, 62, 17143, 13, 6759, 14751, 62, 4906, 6624, 1195, 16980, 544, 4834, 5700, 13, 48, 41, 6239, 3539, 62, 41636, 5662, 62, 20114, 1677, 62, 20114, 1677, 198, 220, 1303, 2124, 62, 78, 796, 275, 62, 78, 1343, 479, 360, 62, 2577, 2124, 62, 68, 198, 220, 31780, 7, 83, 62, 5088, 11, 2124, 62, 10197, 8, 198, 220, 2124, 62, 5088, 764, 28, 31, 13, 275, 62, 5088, 1343, 800, 62, 17143, 13, 74, 20975, 9, 83, 62, 5088, 198, 437, 198, 198, 361, 8494, 62, 20850, 62, 10459, 6624, 2081, 198, 220, 1195, 16980, 544, 18274, 4487, 13, 5235, 62, 20850, 62, 39706, 273, 0, 7, 2777, 62, 259, 8, 198, 220, 599, 62, 280, 764, 28, 31, 13, 599, 62, 259, 532, 599, 62, 280, 198, 220, 4049, 62, 27237, 796, 2593, 7, 2777, 62, 280, 8, 198, 220, 44872, 7203, 46344, 4049, 25, 33172, 4049, 62, 27237, 8, 198, 437, 628, 198, 48, 8322, 1503, 448, 1127, 13, 437, 48, 15339, 62, 80, 73, 3419, 198, 7378, 40, 13, 19006, 1096, 3419, 198 ]
2.105038
4,208
logpdf0(x, P) = logdensity(Gaussian{(:Σ,)}(P), x) struct Message{T,S} q0::S q::T end message(q0, q) = Message(q0, q) message() = nothing function backward(::BF, k::Union{AffineGaussianKernel,LinearGaussianKernel}, q::Gaussian{(:μ,:Σ)}) ν, Σ = q.μ, q.Σ B, β, Q = params(k) B⁻¹ = inv(B) νp = B⁻¹*(ν - β) Σp = B⁻¹*(Σ + Q)*B⁻¹' q0 = Gaussian{(:μ,:Σ)}(νp, Σp) message(q0, q), q0 end function backward(::BF, k::ConstantGaussianKernel, q::Gaussian{(:F,:Γ)}) message(nothing, q), nothing end function backward(::BF, k::Union{AffineGaussianKernel,LinearGaussianKernel}, q::Gaussian{(:F,:Γ)}) @unpack F, Γ = q # Theorem 7.1 [Automatic BFFG] B, β, Q = params(k) Σ = inv(Γ) # requires invertibility of Γ K = B'*inv(Σ + Q) ν̃ = Σ*F - β Fp = K*ν̃ Γp = K*B q0 = Gaussian{(:F,:Γ)}(Fp, Γp) message(q0, q), q0 end function backward(::BF, k::Union{AffineGaussianKernel,LinearGaussianKernel}, y) # Theorem 7.1 [Automatic BFFG] B, β, Q = params(k) K = B'/Q Fp = K*(y - β) Γp = K*B q0 = Gaussian{(:F,:Γ)}(Fp, Γp) message(q0, Leaf(y)), q0 end backward(method::BFFG, k::Union{AffineGaussianKernel,LinearGaussianKernel}, q::Leaf; kargs...) = backward(method, k, q[]; kargs...) backward(method::BFFG, k, q::Leaf; kargs...) = backward(method, k, q[]; kargs...) function backward(::BFFG, k::Union{AffineGaussianKernel,LinearGaussianKernel}, q::WGaussian{(:F,:Γ,:c)}; unfused=false) @unpack F, Γ, c = q # Theorem 7.1 [Automatic BFFG] B, β, Q = params(k) Σ = inv(Γ) # requires invertibility of Γ K = B'/(Σ + Q) ν̃ = Σ*F - β Fp = K*ν̃ Γp = K*B # Corollary 7.2 [Automatic BFFG] if !unfused cp = c - logdet(B) else cp = c - logdensity0(Gaussian{(:F,:Γ)}(Fp, Γp)) + logpdf0(ν̃, Σ + Q) end q0 = WGaussian{(:F,:Γ,:c)}(Fp, Γp, cp) message(q0, q), q0 end function backward(::BFFG, k::Union{AffineGaussianKernel,LinearGaussianKernel}, y; unfused=false) # Theorem 7.1 [Automatic BFFG] B, β, Q = params(k) K = B'/Q Fp = K*(y - β) Γp = K*B # Corollary 7.2 [Automatic BFFG] if !unfused cp = -logdet(B) else cp = logpdf0(y - β, Q) end q0 = WGaussian{(:F,:Γ,:c)}(Fp, Γp, cp) message(q0, Leaf(y)), Leaf(q0) end function forward(::BF, k::Union{AffineGaussianKernel,LinearGaussianKernel}, m::Message{<:Gaussian{(:F,:Γ)}}) @unpack F, Γ = m.q B, β, Q = params(k) Q⁻ = inv(Q) Qᵒ = inv(Q⁻ + Γ) Bᵒ = Qᵒ*Q⁻*B βᵒ = Qᵒ*(Q⁻*β + F) kernel(Gaussian; μ=AffineMap(Bᵒ, βᵒ), Σ=ConstantMap(Qᵒ)) end function forward(::BF, k::ConstantGaussianKernel, m::Message{<:Gaussian{(:F,:Γ)}}) @unpack F, Γ = m.q β, Q = params(k) Q⁻ = inv(Q) Qᵒ = inv(Q⁻ + Γ) βᵒ = Qᵒ*(Q⁻*β + F) kernel(Gaussian; μ=ConstantMap(βᵒ), Σ=ConstantMap(Qᵒ)) end function forward(::BFFG, k::Union{AffineGaussianKernel,LinearGaussianKernel}, m::Message{<:WGaussian{(:F,:Γ,:c)}}) @unpack F, Γ, c = m.q B, β, Q = params(k) Q⁻ = inv(Q) Qᵒ = inv(Q⁻ + Γ) #μᵒ = Qᵒ*(Q⁻*(B*x + β) + F ) Bᵒ = Qᵒ*Q⁻*B βᵒ = Qᵒ*(Q⁻*β + F) kernel(WGaussian; μ=AffineMap(Bᵒ, βᵒ), Σ=ConstantMap(Qᵒ), c=ConstantMap(0.0)) end function forward(bffg::BFFG, k::Kernel, m::Message, x::Weighted) p = forward_(bffg, k, m, x[]) weighted(p, x.ll) end forward(bffg::BFFG, k::Kernel, m::Message, x) = forward_(bffg, k, m, x) function forward_(::BFFG, k::GaussKernel, m::Message{<:WGaussian{(:F,:Γ,:c)}}, x) @unpack F, Γ, c = m.q c1 = c μ, Q = k.ops # Proposition 7.3. Q⁻ = inv(Q(x)) Qᵒ = inv(Q⁻ + Γ) μᵒ = Qᵒ*(Q⁻*(μ(x)) + F) # Q̃⁻ = inv(Q̃(x)) # Q̃ᵒ = inv(Q̃⁻ + Γ) # μ̃ᵒ = Q̃ᵒ*(Q̃⁻*(μ̃(x)) + F) # c = logpdf0(μ(x), Q(x)) - logpdf0(μ̃(x), Q̃(x)) # c += logpdf0(μ̃ᵒ, Q̃ᵒ) - logpdf0(μᵒ, Qᵒ) # == logpdf0(μ(x) - Γ\F, Q(x) + inv(Γ)) - logpdf0(μ̃(x) - Γ\F, Q̃(x) + inv(Γ)) # logdensity(m.q0, x) - c1 == logpdf0(μ̃(x) - Γ\F, Q̃(x) + inv(Γ)) c = logpdf0(μ(x) - Γ\F, Q(x) + inv(Γ)) - logdensity(m.q0, x) + c1 WGaussian{(:μ,:Σ,:c)}(μᵒ, Qᵒ, c) end function backward(::BFFG, ::Copy, args::Union{Leaf{<:WGaussian{(:μ,:Σ,:c)}},WGaussian{(:μ,:Σ,:c)}}...; unfused=true) unfused = false F, H, c = params(convert(WGaussian{(:F,:Γ,:c)}, args[1])) args[1] isa Leaf || (c += logdensity0(Gaussian{(:F,:Γ)}(F, H))) for b in args[2:end] F2, H2, c2 = params(convert(WGaussian{(:F,:Γ,:c)}, b)) F += F2 H += H2 c += c2 b isa Leaf|| (c += logdensity0(Gaussian{(:F,:Γ)}(F2, H2))) end Δ = -logdensity(Gaussian{(:F,:Γ)}(F, H), 0F) message(), convert(WGaussian{(:μ,:Σ,:c)}, WGaussian{(:F,:Γ,:c)}(F, H, Δ + c)) end function backward(::Union{BFFG,BF}, ::Copy, a::Gaussian{(:F,:Γ)}, args...) F, H = params(a) for b in args F2, H2 = params(b::Gaussian{(:F,:Γ)}) F += F2 H += H2 end message(), Gaussian{(:F,:Γ)}(F, H) end function backward(::BFFG, ::Copy, a::Union{Leaf{<:WGaussian{(:F,:Γ,:c)}}, WGaussian{(:F,:Γ,:c)}}, args...; unfused=true) unfused = false F, H, c = params(convert(WGaussian{(:F,:Γ,:c)}, a)) a isa Leaf || (c += logdensity(Gaussian{(:F,:Γ)}(F, H), 0F)) for b in args F2, H2, c2 = params(convert(WGaussian{(:F,:Γ,:c)}, b)) F += F2 H += H2 c += c2 b isa Leaf || (c += logdensity(Gaussian{(:F,:Γ)}(F2, H2), 0F2)) end Δ = -logdensity(Gaussian{(:F,:Γ)}(F, H), 0F) message(), WGaussian{(:F,:Γ,:c)}(F, H, Δ + c) end function forward(::BFFG, k::Union{AffineGaussianKernel,LinearGaussianKernel}, m::Message{<:Leaf}, x::Weighted) y = m.q Dirac(weighted(y[], x.ll)) end function forward(::BFFG, ::Copy{2}, _, x::Weighted) MeasureTheory.Dirac((x, weighted(x[]))) end
[ 6404, 12315, 15, 7, 87, 11, 350, 8, 796, 2604, 43337, 7, 35389, 31562, 90, 7, 25, 138, 96, 35751, 92, 7, 47, 828, 2124, 8, 198, 198, 7249, 16000, 90, 51, 11, 50, 92, 198, 220, 220, 220, 10662, 15, 3712, 50, 198, 220, 220, 220, 10662, 3712, 51, 198, 437, 198, 20500, 7, 80, 15, 11, 10662, 8, 796, 16000, 7, 80, 15, 11, 10662, 8, 198, 20500, 3419, 796, 2147, 198, 198, 8818, 19528, 7, 3712, 29499, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 10662, 3712, 35389, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 8, 30072, 198, 220, 220, 220, 7377, 121, 11, 7377, 96, 796, 10662, 13, 34703, 11, 10662, 13, 138, 96, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 198, 220, 220, 220, 347, 46256, 119, 126, 117, 796, 800, 7, 33, 8, 198, 220, 220, 220, 7377, 121, 79, 796, 347, 46256, 119, 126, 117, 9, 7, 26180, 532, 27169, 8, 198, 220, 220, 220, 7377, 96, 79, 796, 347, 46256, 119, 126, 117, 9, 7, 138, 96, 1343, 1195, 27493, 33, 46256, 119, 126, 117, 6, 198, 220, 220, 220, 10662, 15, 796, 12822, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 38165, 7, 26180, 79, 11, 7377, 96, 79, 8, 198, 220, 220, 220, 3275, 7, 80, 15, 11, 10662, 828, 10662, 15, 198, 437, 198, 198, 8818, 19528, 7, 3712, 29499, 11, 479, 3712, 3103, 18797, 35389, 31562, 42, 7948, 11, 10662, 3712, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 30072, 198, 220, 220, 220, 3275, 7, 22366, 11, 10662, 828, 2147, 198, 437, 628, 198, 8818, 19528, 7, 3712, 29499, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 10662, 3712, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 30072, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 796, 10662, 198, 220, 220, 220, 1303, 383, 29625, 767, 13, 16, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 198, 220, 220, 220, 7377, 96, 796, 800, 7, 138, 241, 8, 1303, 4433, 287, 1851, 2247, 286, 7377, 241, 198, 220, 220, 220, 509, 796, 347, 6, 9, 16340, 7, 138, 96, 1343, 1195, 8, 198, 220, 220, 220, 7377, 121, 136, 225, 796, 7377, 96, 9, 37, 532, 27169, 198, 220, 220, 220, 376, 79, 796, 509, 9, 26180, 136, 225, 198, 220, 220, 220, 7377, 241, 79, 796, 509, 9, 33, 198, 220, 220, 220, 10662, 15, 796, 12822, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 79, 11, 7377, 241, 79, 8, 198, 220, 220, 220, 3275, 7, 80, 15, 11, 10662, 828, 10662, 15, 198, 437, 628, 198, 8818, 19528, 7, 3712, 29499, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 331, 8, 198, 220, 220, 220, 1303, 383, 29625, 767, 13, 16, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 198, 220, 220, 220, 509, 796, 347, 26488, 48, 198, 220, 220, 220, 376, 79, 796, 509, 9, 7, 88, 532, 27169, 8, 198, 220, 220, 220, 7377, 241, 79, 796, 509, 9, 33, 198, 220, 220, 220, 10662, 15, 796, 12822, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 79, 11, 7377, 241, 79, 8, 198, 220, 220, 220, 3275, 7, 80, 15, 11, 14697, 7, 88, 36911, 10662, 15, 198, 437, 198, 198, 1891, 904, 7, 24396, 3712, 33, 5777, 38, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 10662, 3712, 3123, 1878, 26, 479, 22046, 23029, 796, 19528, 7, 24396, 11, 479, 11, 10662, 58, 11208, 479, 22046, 23029, 198, 1891, 904, 7, 24396, 3712, 33, 5777, 38, 11, 479, 11, 10662, 3712, 3123, 1878, 26, 479, 22046, 23029, 796, 19528, 7, 24396, 11, 479, 11, 10662, 58, 11208, 479, 22046, 23029, 628, 198, 8818, 19528, 7, 3712, 33, 5777, 38, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 10662, 3712, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 19629, 3684, 1484, 28, 9562, 8, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 11, 269, 796, 10662, 198, 220, 220, 220, 1303, 383, 29625, 767, 13, 16, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 198, 220, 220, 220, 7377, 96, 796, 800, 7, 138, 241, 8, 1303, 4433, 287, 1851, 2247, 286, 7377, 241, 198, 220, 220, 220, 509, 796, 347, 26488, 7, 138, 96, 1343, 1195, 8, 198, 220, 220, 220, 7377, 121, 136, 225, 796, 7377, 96, 9, 37, 532, 27169, 198, 220, 220, 220, 376, 79, 796, 509, 9, 26180, 136, 225, 198, 220, 220, 220, 7377, 241, 79, 796, 509, 9, 33, 198, 220, 220, 220, 1303, 2744, 692, 560, 767, 13, 17, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 611, 5145, 403, 69, 1484, 198, 220, 220, 220, 220, 220, 220, 220, 31396, 796, 269, 532, 2604, 15255, 7, 33, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 31396, 796, 269, 532, 2604, 43337, 15, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 79, 11, 7377, 241, 79, 4008, 1343, 2604, 12315, 15, 7, 26180, 136, 225, 11, 7377, 96, 1343, 1195, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 10662, 15, 796, 370, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 7, 37, 79, 11, 7377, 241, 79, 11, 31396, 8, 198, 220, 220, 220, 3275, 7, 80, 15, 11, 10662, 828, 10662, 15, 198, 437, 198, 198, 8818, 19528, 7, 3712, 33, 5777, 38, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 331, 26, 3684, 1484, 28, 9562, 8, 198, 220, 220, 220, 1303, 383, 29625, 767, 13, 16, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 198, 220, 220, 220, 509, 796, 347, 26488, 48, 198, 220, 220, 220, 376, 79, 796, 509, 9, 7, 88, 532, 27169, 8, 198, 220, 220, 220, 7377, 241, 79, 796, 509, 9, 33, 198, 220, 220, 220, 1303, 2744, 692, 560, 767, 13, 17, 685, 16541, 13730, 347, 5777, 38, 60, 198, 220, 220, 220, 611, 5145, 403, 69, 1484, 198, 220, 220, 220, 220, 220, 220, 220, 31396, 796, 532, 6404, 15255, 7, 33, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 31396, 796, 2604, 12315, 15, 7, 88, 532, 27169, 11, 1195, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 10662, 15, 796, 370, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 7, 37, 79, 11, 7377, 241, 79, 11, 31396, 8, 198, 220, 220, 220, 3275, 7, 80, 15, 11, 14697, 7, 88, 36911, 14697, 7, 80, 15, 8, 198, 437, 628, 198, 8818, 2651, 7, 3712, 29499, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 285, 3712, 12837, 90, 27, 25, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 11709, 8, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 796, 285, 13, 80, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 628, 220, 220, 220, 1195, 46256, 119, 796, 800, 7, 48, 8, 198, 220, 220, 220, 1195, 39611, 240, 796, 800, 7, 48, 46256, 119, 1343, 7377, 241, 8, 198, 220, 220, 220, 347, 39611, 240, 796, 1195, 39611, 240, 9, 48, 46256, 119, 9, 33, 198, 220, 220, 220, 27169, 39611, 240, 796, 1195, 39611, 240, 9, 7, 48, 46256, 119, 9, 26638, 1343, 376, 8, 628, 220, 220, 220, 9720, 7, 35389, 31562, 26, 18919, 28, 35191, 500, 13912, 7, 33, 39611, 240, 11, 27169, 39611, 240, 828, 7377, 96, 28, 3103, 18797, 13912, 7, 48, 39611, 240, 4008, 198, 437, 198, 8818, 2651, 7, 3712, 29499, 11, 479, 3712, 3103, 18797, 35389, 31562, 42, 7948, 11, 285, 3712, 12837, 90, 27, 25, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 11709, 8, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 796, 285, 13, 80, 198, 220, 220, 220, 27169, 11, 1195, 796, 42287, 7, 74, 8, 628, 220, 220, 220, 1195, 46256, 119, 796, 800, 7, 48, 8, 198, 220, 220, 220, 1195, 39611, 240, 796, 800, 7, 48, 46256, 119, 1343, 7377, 241, 8, 198, 220, 220, 220, 27169, 39611, 240, 796, 1195, 39611, 240, 9, 7, 48, 46256, 119, 9, 26638, 1343, 376, 8, 628, 220, 220, 220, 9720, 7, 35389, 31562, 26, 18919, 28, 3103, 18797, 13912, 7, 26638, 39611, 240, 828, 7377, 96, 28, 3103, 18797, 13912, 7, 48, 39611, 240, 4008, 198, 437, 628, 198, 198, 8818, 2651, 7, 3712, 33, 5777, 38, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 285, 3712, 12837, 90, 27, 25, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 11709, 8, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 11, 269, 796, 285, 13, 80, 198, 220, 220, 220, 347, 11, 27169, 11, 1195, 796, 42287, 7, 74, 8, 628, 220, 220, 220, 1195, 46256, 119, 796, 800, 7, 48, 8, 198, 220, 220, 220, 1195, 39611, 240, 796, 800, 7, 48, 46256, 119, 1343, 7377, 241, 8, 198, 220, 220, 220, 1303, 34703, 39611, 240, 796, 1195, 39611, 240, 9, 7, 48, 46256, 119, 9, 7, 33, 9, 87, 1343, 27169, 8, 1343, 376, 1267, 198, 220, 220, 220, 347, 39611, 240, 796, 1195, 39611, 240, 9, 48, 46256, 119, 9, 33, 198, 220, 220, 220, 27169, 39611, 240, 796, 1195, 39611, 240, 9, 7, 48, 46256, 119, 9, 26638, 1343, 376, 8, 628, 220, 220, 220, 9720, 7, 54, 35389, 31562, 26, 18919, 28, 35191, 500, 13912, 7, 33, 39611, 240, 11, 27169, 39611, 240, 828, 7377, 96, 28, 3103, 18797, 13912, 7, 48, 39611, 240, 828, 269, 28, 3103, 18797, 13912, 7, 15, 13, 15, 4008, 198, 437, 198, 198, 8818, 2651, 7, 65, 487, 70, 3712, 33, 5777, 38, 11, 479, 3712, 42, 7948, 11, 285, 3712, 12837, 11, 2124, 3712, 25844, 276, 8, 198, 220, 220, 220, 279, 796, 2651, 41052, 65, 487, 70, 11, 479, 11, 285, 11, 2124, 58, 12962, 198, 220, 220, 220, 26356, 7, 79, 11, 2124, 13, 297, 8, 198, 437, 198, 11813, 7, 65, 487, 70, 3712, 33, 5777, 38, 11, 479, 3712, 42, 7948, 11, 285, 3712, 12837, 11, 2124, 8, 796, 2651, 41052, 65, 487, 70, 11, 479, 11, 285, 11, 2124, 8, 198, 8818, 2651, 41052, 3712, 33, 5777, 38, 11, 479, 3712, 35389, 1046, 42, 7948, 11, 285, 3712, 12837, 90, 27, 25, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 5512, 2124, 8, 198, 220, 220, 220, 2488, 403, 8002, 376, 11, 7377, 241, 11, 269, 796, 285, 13, 80, 198, 220, 220, 220, 269, 16, 796, 269, 198, 220, 220, 220, 18919, 11, 1195, 796, 479, 13, 2840, 628, 198, 220, 220, 220, 1303, 44056, 767, 13, 18, 13, 198, 220, 220, 220, 1195, 46256, 119, 796, 800, 7, 48, 7, 87, 4008, 198, 220, 220, 220, 1195, 39611, 240, 796, 800, 7, 48, 46256, 119, 1343, 7377, 241, 8, 198, 220, 220, 220, 18919, 39611, 240, 796, 1195, 39611, 240, 9, 7, 48, 46256, 119, 9, 7, 34703, 7, 87, 4008, 1343, 376, 8, 628, 1303, 220, 220, 1195, 136, 225, 46256, 119, 796, 800, 7, 48, 136, 225, 7, 87, 4008, 198, 1303, 220, 220, 1195, 136, 225, 39611, 240, 796, 800, 7, 48, 136, 225, 46256, 119, 1343, 7377, 241, 8, 198, 1303, 220, 220, 18919, 136, 225, 39611, 240, 796, 1195, 136, 225, 39611, 240, 9, 7, 48, 136, 225, 46256, 119, 9, 7, 34703, 136, 225, 7, 87, 4008, 1343, 376, 8, 628, 1303, 220, 220, 269, 796, 2604, 12315, 15, 7, 34703, 7, 87, 828, 1195, 7, 87, 4008, 532, 2604, 12315, 15, 7, 34703, 136, 225, 7, 87, 828, 1195, 136, 225, 7, 87, 4008, 198, 1303, 220, 220, 269, 15853, 2604, 12315, 15, 7, 34703, 136, 225, 39611, 240, 11, 1195, 136, 225, 39611, 240, 8, 532, 2604, 12315, 15, 7, 34703, 39611, 240, 11, 1195, 39611, 240, 8, 198, 1303, 220, 220, 6624, 2604, 12315, 15, 7, 34703, 7, 87, 8, 532, 7377, 241, 59, 37, 11, 1195, 7, 87, 8, 1343, 800, 7, 138, 241, 4008, 532, 2604, 12315, 15, 7, 34703, 136, 225, 7, 87, 8, 220, 532, 7377, 241, 59, 37, 11, 1195, 136, 225, 7, 87, 8, 1343, 800, 7, 138, 241, 4008, 220, 198, 220, 220, 220, 220, 198, 1303, 220, 220, 2604, 43337, 7, 76, 13, 80, 15, 11, 2124, 8, 532, 269, 16, 6624, 2604, 12315, 15, 7, 34703, 136, 225, 7, 87, 8, 220, 532, 7377, 241, 59, 37, 11, 1195, 136, 225, 7, 87, 8, 1343, 800, 7, 138, 241, 4008, 220, 628, 220, 220, 220, 269, 796, 2604, 12315, 15, 7, 34703, 7, 87, 8, 532, 7377, 241, 59, 37, 11, 1195, 7, 87, 8, 1343, 800, 7, 138, 241, 4008, 532, 2604, 43337, 7, 76, 13, 80, 15, 11, 2124, 8, 1343, 269, 16, 198, 220, 220, 220, 370, 35389, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 11, 25, 66, 38165, 7, 34703, 39611, 240, 11, 1195, 39611, 240, 11, 269, 8, 198, 437, 628, 198, 8818, 19528, 7, 3712, 33, 5777, 38, 11, 7904, 29881, 11, 26498, 3712, 38176, 90, 3123, 1878, 90, 27, 25, 54, 35389, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 11, 25, 66, 38165, 5512, 54, 35389, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 11, 25, 66, 8, 11709, 986, 26, 3684, 1484, 28, 7942, 8, 198, 220, 220, 220, 3684, 1484, 796, 3991, 198, 220, 220, 220, 376, 11, 367, 11, 269, 796, 42287, 7, 1102, 1851, 7, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 5512, 26498, 58, 16, 60, 4008, 198, 220, 220, 220, 26498, 58, 16, 60, 318, 64, 14697, 8614, 357, 66, 15853, 2604, 43337, 15, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 11, 367, 22305, 198, 220, 220, 220, 329, 275, 287, 26498, 58, 17, 25, 437, 60, 198, 220, 220, 220, 220, 220, 220, 220, 376, 17, 11, 367, 17, 11, 269, 17, 796, 42287, 7, 1102, 1851, 7, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 5512, 275, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 376, 15853, 376, 17, 198, 220, 220, 220, 220, 220, 220, 220, 367, 15853, 367, 17, 198, 220, 220, 220, 220, 220, 220, 220, 269, 15853, 269, 17, 198, 220, 220, 220, 220, 220, 220, 220, 275, 318, 64, 14697, 15886, 357, 66, 15853, 2604, 43337, 15, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 17, 11, 367, 17, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 37455, 796, 532, 6404, 43337, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 11, 367, 828, 657, 37, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3275, 22784, 10385, 7, 54, 35389, 31562, 90, 7, 25, 34703, 11, 25, 138, 96, 11, 25, 66, 8, 5512, 370, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 7, 37, 11, 367, 11, 37455, 1343, 269, 4008, 198, 437, 628, 198, 8818, 19528, 7, 3712, 38176, 90, 33, 5777, 38, 11, 29499, 5512, 7904, 29881, 11, 257, 3712, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 5512, 26498, 23029, 198, 220, 220, 220, 376, 11, 367, 796, 42287, 7, 64, 8, 198, 220, 220, 220, 329, 275, 287, 26498, 198, 220, 220, 220, 220, 220, 220, 220, 376, 17, 11, 367, 17, 796, 42287, 7, 65, 3712, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 8, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 376, 15853, 376, 17, 198, 220, 220, 220, 220, 220, 220, 220, 367, 15853, 367, 17, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3275, 22784, 12822, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 11, 367, 8, 198, 437, 198, 198, 8818, 19528, 7, 3712, 33, 5777, 38, 11, 7904, 29881, 11, 257, 3712, 38176, 90, 3123, 1878, 90, 27, 25, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 5512, 370, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 5512, 26498, 986, 26, 3684, 1484, 28, 7942, 8, 198, 220, 220, 220, 3684, 1484, 796, 3991, 198, 220, 220, 220, 376, 11, 367, 11, 269, 796, 42287, 7, 1102, 1851, 7, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 5512, 257, 4008, 198, 220, 220, 220, 257, 318, 64, 14697, 8614, 357, 66, 15853, 2604, 43337, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 11, 367, 828, 657, 37, 4008, 198, 220, 220, 220, 329, 275, 287, 26498, 198, 220, 220, 220, 220, 220, 220, 220, 376, 17, 11, 367, 17, 11, 269, 17, 796, 42287, 7, 1102, 1851, 7, 54, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 8, 5512, 275, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 376, 15853, 376, 17, 198, 220, 220, 220, 220, 220, 220, 220, 367, 15853, 367, 17, 198, 220, 220, 220, 220, 220, 220, 220, 269, 15853, 269, 17, 198, 220, 220, 220, 220, 220, 220, 220, 275, 318, 64, 14697, 8614, 357, 66, 15853, 2604, 43337, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 17, 11, 367, 17, 828, 657, 37, 17, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 37455, 796, 532, 6404, 43337, 7, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 38165, 7, 37, 11, 367, 828, 657, 37, 8, 198, 220, 220, 220, 3275, 22784, 370, 35389, 31562, 90, 7, 25, 37, 11, 25, 138, 241, 11, 25, 66, 38165, 7, 37, 11, 367, 11, 37455, 1343, 269, 8, 198, 437, 198, 198, 8818, 2651, 7, 3712, 33, 5777, 38, 11, 479, 3712, 38176, 90, 35191, 500, 35389, 31562, 42, 7948, 11, 14993, 451, 35389, 31562, 42, 7948, 5512, 285, 3712, 12837, 90, 27, 25, 3123, 1878, 5512, 2124, 3712, 25844, 276, 8, 198, 220, 220, 220, 331, 796, 285, 13, 80, 198, 220, 220, 220, 36202, 330, 7, 6551, 276, 7, 88, 58, 4357, 2124, 13, 297, 4008, 198, 437, 198, 8818, 2651, 7, 3712, 33, 5777, 38, 11, 7904, 29881, 90, 17, 5512, 4808, 11, 2124, 3712, 25844, 276, 8, 198, 220, 220, 220, 24291, 464, 652, 13, 35277, 330, 19510, 87, 11, 26356, 7, 87, 21737, 22305, 198, 437, 198 ]
1.76319
3,298
using NumericalMethodsforEngineers, DataFrames, Plots pyplot(size=(700,700)) ProjDir = dirname(@__FILE__) cd(ProjDir) #do x = [1.0, 3.0, 6.0, 5.0] y = [1.0, 5.0, 10.0, 9.0] xi = [2.0, 4.5] (dfin, dfxi) = lagrangianpolynomial(length(x), x, y, xi) xint = 1:0.1:5 (dfin, dfxint) = lagrangianpolynomial(length(x), x, y, collect(xint)) dfin |> display println() dfxi |> display println() dfxint |> display println() p = plot(dfxint[:xi], dfxint[:yi], line=(:path, 1), label="interpolated curve") scatter!(p, dfin[:x], dfin[:y], marker=(:circle, 4), label="input points", color=:blue) scatter!(p, dfxi[:xi], dfxi[:yi], marker=(:star, 8), color=:red, label="interpolated points") plot(p) savefig("ex.5.1.png") gui() #end
[ 3500, 399, 6975, 605, 46202, 1640, 28620, 11, 6060, 35439, 11, 1345, 1747, 198, 9078, 29487, 7, 7857, 16193, 9879, 11, 9879, 4008, 198, 198, 2964, 73, 35277, 796, 26672, 3672, 7, 31, 834, 25664, 834, 8, 198, 10210, 7, 2964, 73, 35277, 8, 1303, 4598, 198, 220, 220, 198, 220, 2124, 796, 685, 16, 13, 15, 11, 513, 13, 15, 11, 718, 13, 15, 11, 642, 13, 15, 60, 198, 220, 331, 796, 685, 16, 13, 15, 11, 642, 13, 15, 11, 838, 13, 15, 11, 860, 13, 15, 60, 198, 220, 2124, 72, 796, 685, 17, 13, 15, 11, 604, 13, 20, 60, 198, 220, 357, 7568, 259, 11, 288, 21373, 72, 8, 796, 19470, 36985, 666, 35428, 26601, 498, 7, 13664, 7, 87, 828, 2124, 11, 331, 11, 2124, 72, 8, 198, 220, 220, 198, 220, 2124, 600, 796, 352, 25, 15, 13, 16, 25, 20, 198, 220, 357, 7568, 259, 11, 288, 21373, 600, 8, 796, 19470, 36985, 666, 35428, 26601, 498, 7, 13664, 7, 87, 828, 2124, 11, 331, 11, 2824, 7, 87, 600, 4008, 198, 220, 220, 198, 220, 288, 15643, 930, 29, 3359, 198, 220, 44872, 3419, 198, 220, 220, 198, 220, 288, 21373, 72, 930, 29, 3359, 198, 220, 44872, 3419, 198, 220, 220, 198, 220, 288, 21373, 600, 930, 29, 3359, 198, 220, 44872, 3419, 198, 220, 220, 198, 220, 279, 796, 7110, 7, 48753, 600, 58, 25, 29992, 4357, 288, 21373, 600, 58, 25, 48111, 4357, 1627, 16193, 25, 6978, 11, 352, 828, 6167, 2625, 3849, 16104, 515, 12133, 4943, 198, 220, 41058, 0, 7, 79, 11, 288, 15643, 58, 25, 87, 4357, 288, 15643, 58, 25, 88, 4357, 18364, 16193, 25, 45597, 11, 604, 828, 6167, 2625, 15414, 2173, 1600, 3124, 28, 25, 17585, 8, 198, 220, 41058, 0, 7, 79, 11, 288, 21373, 72, 58, 25, 29992, 4357, 288, 21373, 72, 58, 25, 48111, 4357, 18364, 16193, 25, 7364, 11, 807, 828, 3124, 28, 25, 445, 11, 6167, 2625, 3849, 16104, 515, 2173, 4943, 198, 220, 220, 198, 220, 7110, 7, 79, 8, 198, 220, 3613, 5647, 7203, 1069, 13, 20, 13, 16, 13, 11134, 4943, 198, 220, 11774, 3419, 198, 220, 220, 198, 2, 437 ]
2.103261
368
function check(i, j) id, im = div(i, 9), mod(i, 9) jd, jm = div(j, 9), mod(j, 9) jd == id && return true jm == im && return true div(id, 3) == div(jd, 3) && div(jm, 3) == div(im, 3) end const lookup = zeros(Bool, 81, 81) for i in 1:81 for j in 1:81 lookup[i,j] = check(i-1, j-1) end end function solve_sudoku(callback::Function, grid::Array{Int64}) (function solve() for i in 1:81 if grid[i] == 0 t = Dict{Int64, Void}() for j in 1:81 if lookup[i,j] t[grid[j]] = nothing end end for k in 1:9 if !haskey(t, k) grid[i] = k solve() end end grid[i] = 0 return end end callback(grid) end)() end function display(grid) for i in 1:length(grid) print(grid[i], " ") i % 3 == 0 && print(" ") i % 9 == 0 && print("\n") i % 27 == 0 && print("\n") end end grid = Int64[5, 3, 0, 0, 2, 4, 7, 0, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 1, 0, 0, 7, 0, 3, 9, 0, 2, 0, 0, 8, 0, 7, 2, 0, 4, 9, 0, 2, 0, 9, 8, 0, 0, 7, 0, 7, 9, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 3, 0, 5, 0, 6, 9, 6, 0, 0, 1, 0, 3, 0, 0, 0, 5, 0, 6, 9, 0, 0, 1, 0] solve_sudoku(display, grid)
[ 8818, 2198, 7, 72, 11, 474, 8, 198, 220, 220, 220, 4686, 11, 545, 796, 2659, 7, 72, 11, 860, 828, 953, 7, 72, 11, 860, 8, 198, 220, 220, 220, 474, 67, 11, 474, 76, 796, 2659, 7, 73, 11, 860, 828, 953, 7, 73, 11, 860, 8, 628, 220, 220, 220, 474, 67, 6624, 4686, 11405, 1441, 2081, 198, 220, 220, 220, 474, 76, 6624, 545, 11405, 1441, 2081, 628, 220, 220, 220, 2659, 7, 312, 11, 513, 8, 6624, 2659, 7, 73, 67, 11, 513, 8, 11405, 198, 220, 220, 220, 2659, 7, 73, 76, 11, 513, 8, 6624, 2659, 7, 320, 11, 513, 8, 198, 437, 198, 198, 9979, 35847, 796, 1976, 27498, 7, 33, 970, 11, 9773, 11, 9773, 8, 198, 198, 1640, 1312, 287, 352, 25, 6659, 198, 220, 220, 220, 329, 474, 287, 352, 25, 6659, 198, 220, 220, 220, 220, 220, 220, 220, 35847, 58, 72, 11, 73, 60, 796, 2198, 7, 72, 12, 16, 11, 474, 12, 16, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 8494, 62, 82, 463, 11601, 7, 47423, 3712, 22203, 11, 10706, 3712, 19182, 90, 5317, 2414, 30072, 198, 220, 220, 220, 357, 8818, 8494, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 6659, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 10706, 58, 72, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 796, 360, 713, 90, 5317, 2414, 11, 18331, 92, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 6659, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 35847, 58, 72, 11, 73, 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, 256, 58, 25928, 58, 73, 11907, 796, 2147, 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, 220, 220, 220, 220, 329, 479, 287, 352, 25, 24, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 83, 11, 479, 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, 10706, 58, 72, 60, 796, 479, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8494, 3419, 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, 220, 220, 220, 220, 10706, 58, 72, 60, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 23838, 7, 25928, 8, 198, 220, 220, 220, 886, 8, 3419, 198, 437, 198, 198, 8818, 3359, 7, 25928, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 25928, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 25928, 58, 72, 4357, 366, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 4064, 220, 513, 6624, 657, 11405, 3601, 7203, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 4064, 220, 860, 6624, 657, 11405, 3601, 7203, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 4064, 2681, 6624, 657, 11405, 3601, 7203, 59, 77, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 25928, 796, 2558, 2414, 58, 20, 11, 513, 11, 657, 11, 657, 11, 362, 11, 604, 11, 767, 11, 657, 11, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 657, 11, 362, 11, 657, 11, 657, 11, 657, 11, 807, 11, 657, 11, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 11, 657, 11, 657, 11, 767, 11, 657, 11, 513, 11, 860, 11, 657, 11, 362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 657, 11, 807, 11, 657, 11, 767, 11, 362, 11, 657, 11, 604, 11, 860, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 362, 11, 657, 11, 860, 11, 807, 11, 657, 11, 657, 11, 767, 11, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 767, 11, 860, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 11, 807, 11, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 657, 11, 657, 11, 657, 11, 513, 11, 657, 11, 642, 11, 657, 11, 718, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 860, 11, 718, 11, 657, 11, 657, 11, 352, 11, 657, 11, 513, 11, 657, 11, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 642, 11, 657, 11, 718, 11, 860, 11, 657, 11, 657, 11, 352, 11, 657, 60, 198, 198, 82, 6442, 62, 82, 463, 11601, 7, 13812, 11, 10706, 8, 198 ]
1.548096
998
using Distributions using PyPlot using LsqFit using CSV, DataFrames, DataFramesMeta using StatsBase """ Functions for results of Fig. 2E """ # Run: # mean_thrs_delay_1, mean_thrs_delay_3 = SinergiafMRI_datafit.get_state_visits_bootstrapped() function get_state_visits_bootstrapped(; # filestr = "_Sim_", filestr = "" ) # Real: data_path = "./mcmc_rl_fit/projects/fmri/data/SARSPEICZVG_all_fMRI.csv" # Simulated: # data_path = "./mcmc_rl_fit/projects/fmri/data_sim/SARSPEICZVG_all_fMRI_Sim_exporder_SurpAC_run2.csv" max_episodes_per_subj = 40 (all_data, all_stats) = RL_Fit.load_SARSPEI(data_path;max_episodes_per_subj=max_episodes_per_subj) all_subject_ids = all_stats.all_subject_ids println("all_subject_ids: $all_subject_ids") nrOfBootstrapRounds = 200 threshold_delay_matrices_1 = Array{Array{Float64,1}, 1}(undef, nrOfBootstrapRounds) [threshold_delay_matrices_1[i] = zeros(Float64, 7) for i in 1:nrOfBootstrapRounds] threshold_delay_matrices_3 = Array{Array{Float64,1}, 1}(undef, nrOfBootstrapRounds) [threshold_delay_matrices_3[i] = zeros(Float64, 7) for i in 1:nrOfBootstrapRounds] # # threshold_delay_matrices_nofitting_1 = Array{Array{Float64,1}, 1}(undef, nrOfBootstrapRounds) # [threshold_delay_matrices_nofitting_1[i] = zeros(Float64, 7) for i in 1:nrOfBootstrapRounds] # threshold_delay_matrices_nofitting_3 = Array{Array{Float64,1}, 1}(undef, nrOfBootstrapRounds) # [threshold_delay_matrices_nofitting_3[i] = zeros(Float64, 7) for i in 1:nrOfBootstrapRounds] graph_1_subjIDs = [4, 5, 6, 8, 10, 12, 15, 16, 19, 21] graph_3_subjIDs = [1, 2, 3, 7, 9, 11, 13, 14, 17, 18, 20] for i in 1:nrOfBootstrapRounds # Sample with replacement bootstrapped_subject_ids_graph_1 = sample(graph_1_subjIDs, length(graph_1_subjIDs), replace=true) bootstrapped_subject_ids_graph_3 = sample(graph_3_subjIDs, length(graph_3_subjIDs), replace=true) bootstrapped_subject_ids = vcat(bootstrapped_subject_ids_graph_1, bootstrapped_subject_ids_graph_3) # Get graph_visits graph_1_visits, graph_3_visits = get_state_visits_singleround(all_data, bootstrapped_subject_ids, max_episodes_per_subj = max_episodes_per_subj) threshold_delay_matrices_1[i] = get_state_fittedthreshold(1, graph_1_visits) threshold_delay_matrices_3[i] = get_state_fittedthreshold(3, graph_3_visits) # threshold_delay_matrices_nofitting_1[i] = get_state_threshold_nofitting(1, graph_1_visits) # threshold_delay_matrices_nofitting_3[i] = get_state_threshold_nofitting(3, graph_3_visits) end mean_thrs_delay_1, std_thrs_delay_1, stderror_thrs_delay_1 = get_bootstrapped_stats(threshold_delay_matrices_1) mean_thrs_delay_3, std_thrs_delay_3, stderror_thrs_delay_3 = get_bootstrapped_stats(threshold_delay_matrices_3) write_bootstrapped_results_csv(1, mean_thrs_delay_1, std_thrs_delay_1, stderror_thrs_delay_1, filestr = filestr) write_bootstrapped_results_csv(3, mean_thrs_delay_3, std_thrs_delay_3, stderror_thrs_delay_3, filestr = filestr) # ------------------------------------------ # mean_thrs_delay_nofitting_1, std_thrs_delay_nofitting_1, stderror_thrs_delay_nofitting_1 = get_bootstrapped_stats(threshold_delay_matrices_nofitting_1) # mean_thrs_delay_nofitting_3, std_thrs_delay_nofitting_3, stderror_thrs_delay_nofitting_3 = get_bootstrapped_stats(threshold_delay_matrices_nofitting_3) # # write_bootstrapped_results_csv(1, mean_thrs_delay_nofitting_1, std_thrs_delay_nofitting_1, stderror_thrs_delay_nofitting_1, filestr=filestr*"nofitting_") # write_bootstrapped_results_csv(3, mean_thrs_delay_nofitting_3, std_thrs_delay_nofitting_3, stderror_thrs_delay_nofitting_3, filestr=filestr*"nofitting_") mean_thrs_delay_1, mean_thrs_delay_3#, mean_thrs_delay_nofitting_1, mean_thrs_delay_nofitting_3 end """ Similar to get_state_visits() """ function get_state_visits_singleround(all_data, subject_ids; max_episodes_per_subj = 40) graph_1_visits = zeros(Int64, max_episodes_per_subj,7, 2) graph_3_visits = zeros(Int64, max_episodes_per_subj,7, 2) # @show subject_ids for subj_id in subject_ids # @show subj_id subj_data = RL_Fit.filter_by_person(all_data, subj_id) graph_id = subj_data[1,Int(RL_Fit.c_graph_version)] all_episodes = unique(subj_data[:,Int(RL_Fit.c_episode)]) trajectory_count_per_state = zeros(Int64, 7) #count for each state individually how many times it participated in a rewarded episode # per subject, do not count (sum), just set to 0 or 1. state_action_indicator = zeros(Int64, max_episodes_per_subj, 7, 2) for episode in all_episodes for s in 2:7 # check if state s has "contributed" to the current episode. if yes, count this trajectory. if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) ) trajectory_count_per_state[s] += 1 # now count the value of actions. distinguish two cases: # for some states, the two actions are equally valid. In this case count the action # for other states, there is a correct (1) and a wrong(-1) action # action correct: if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) .& (subj_data[:,Int(RL_Fit.c_action_value)] .== 0)) # action A or action B? if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) .& (subj_data[:,Int(RL_Fit.c_action)] .== 1)) # A state_action_indicator[trajectory_count_per_state[s], s, 1] = 1 # do not +=1 end # note: it's not an ELSE here. we check for both and count both options at most once if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) .& (subj_data[:,Int(RL_Fit.c_action)] .== 2)) # B state_action_indicator[trajectory_count_per_state[s], s, 2] = 1 # do not +=1 end else # action correct or wrong? if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) .& (subj_data[:,Int(RL_Fit.c_action_value)] .== +1)) # correct state_action_indicator[trajectory_count_per_state[s], s, 2] = 1 # do not +=1 end # note: it's not an ELSE here. we check for both and count both options at most once if any( (subj_data[:,Int(RL_Fit.c_episode)] .== episode) .& (subj_data[:,Int(RL_Fit.c_state)] .== s) .& (subj_data[:,Int(RL_Fit.c_action_value)] .== -1)) # wrong state_action_indicator[trajectory_count_per_state[s], s, 1] = 1 # do not +=1 end end end end # end all states end # end all episodes # @show state_action_indicator if graph_id == 1 graph_1_visits += state_action_indicator elseif graph_id == 3 graph_3_visits += state_action_indicator else error("unknown graph id: $graph_id") end end # end all subject graph_1_visits, graph_3_visits end function get_state_fittedthreshold(graph_id::Int, graph_state_counts; learning_threshold=0.8, min_visits_requirement = 2, savepath = "/Users/vasia/Desktop/") dfresults = [] graph_info = get_graph_info() states, minimal_dist, state_txt, graph = get_this_graph_info(graph_info, graph_id) init_vals_exp = [0.5, 0.] threshold_delay_matrix = zeros(length(states)+1) for s = states # println(s) counts_per_episode_actionwrong = vec(graph_state_counts[:,s,1]) counts_per_episode_actioncorrect = vec(graph_state_counts[:,s,2]) summed_counts_per_episode = counts_per_episode_actionwrong.+counts_per_episode_actioncorrect episodes_min_visits = findall(summed_counts_per_episode .>= min_visits_requirement) # @show episodes_min_visits ratio = counts_per_episode_actioncorrect[episodes_min_visits] ./ summed_counts_per_episode[episodes_min_visits] weight = (summed_counts_per_episode[episodes_min_visits]) nr_x = length(ratio) x_data = 1:nr_x y_data = ratio # markersize = 1+2*sqrt(weight[i]), threshold_delay = 0. weight = Float64.(weight) if minimal_dist[1,s] != minimal_dist[2,s] fit = curve_fit(model_exp, x_data, y_data, weight, init_vals_exp) # Weighted cost function y_hat = model_exp(x_data, fit.param) threshold_delay = inv_model_exp(learning_threshold, fit.param) end if threshold_delay < 0. if fit.param[2] > 0. threshold_delay = 0. else threshold_delay = Float64(episodes_min_visits[end]) end # @show threshold_delay # println("----------") end if threshold_delay > Float64(episodes_min_visits[end]) threshold_delay = Float64(episodes_min_visits[end]) end threshold_delay_matrix[s] = threshold_delay end threshold_delay_matrix end # NOTE: NOT USED!!! function get_state_threshold_nofitting(graph_id::Int, graph_state_counts; learning_threshold=0.8, min_visits_requirement = 2, savepath = "/Users/vasia/Desktop/") dfresults = [] graph_info = get_graph_info() states, minimal_dist, state_txt, graph = get_this_graph_info(graph_info, graph_id) init_vals_exp = [0.5, 0.] threshold_delay_matrix = zeros(length(states)+1) for s = states # println(s) counts_per_episode_actionwrong = vec(graph_state_counts[:,s,1]) counts_per_episode_actioncorrect = vec(graph_state_counts[:,s,2]) summed_counts_per_episode = counts_per_episode_actionwrong.+counts_per_episode_actioncorrect episodes_min_visits = findall(summed_counts_per_episode .>= min_visits_requirement) # @show episodes_min_visits ratio = counts_per_episode_actioncorrect[episodes_min_visits] ./ summed_counts_per_episode[episodes_min_visits] weight = (summed_counts_per_episode[episodes_min_visits]) nr_x = length(ratio) # markersize = 1+2*sqrt(weight[i]), threshold_delay = 0. weight = Float64.(weight) if minimal_dist[1,s] != minimal_dist[2,s] threshold_delay = findfirst(x-> x.>=0.8, ratio) end if isnothing(threshold_delay) threshold_delay = Float64(episodes_min_visits[end]) end threshold_delay_matrix[s] = threshold_delay end threshold_delay_matrix end function get_bootstrapped_stats(threshold_delay_matrices) thrs_delay_cat = hcat(threshold_delay_matrices...) mean_thrs_delay = mean(thrs_delay_cat, dims=2) std_thrs_delay = std(thrs_delay_cat, dims=2) @show size(threshold_delay_matrices,1) stderror_thrs_delay = std(thrs_delay_cat, dims=2) ./ sqrt(size(threshold_delay_matrices,1)) mean_thrs_delay, std_thrs_delay, stderror_thrs_delay end function write_bootstrapped_results_csv(graph_id::Int64, mean_thrs_delay, std_thrs_delay, stderror_thrs_delay; filestr="", # filestr = "_Sim_", # savepath = "./" ) savepath = makehomesavepath("learningcurvebars_bootstrap") mkdir(savepath) graph_info = get_graph_info() states, minimal_dist, state_txt, graph = get_this_graph_info(graph_info, graph_id) dfresults = DataFrame() for s = states min_dist = sort(minimal_dist[:,s] .- 1.) dfresults[!, Symbol(string(s)*"_"*state_txt[s]*"_thresholddelay_mean")] = [mean_thrs_delay[s]] dfresults[!, Symbol(string(s)*"_"*state_txt[s]*"_thresholddelay_std")] = [std_thrs_delay[s]] dfresults[!, Symbol(string(s)*"_"*state_txt[s]*"_thresholddelay_stderror")] = [stderror_thrs_delay[s]] dfresults[!, Symbol(string(s)*"_"*state_txt[s]*"_dist1vsdist2")] = [string(Int(min_dist[1]))*"-or-"*string(Int(min_dist[2]))] dfresults[!, Symbol(string(s)*"_"*state_txt[s]*"_graphid")] = [graph_id] end CSV.write(joinpath(savepath, "learningcurvebar_bootstrap_"*filestr*"G" * string(graph_id) *".csv"), dfresults, delim = " "); # dfresults end
[ 3500, 46567, 507, 198, 3500, 9485, 43328, 198, 3500, 406, 31166, 31805, 198, 3500, 44189, 11, 6060, 35439, 11, 6060, 35439, 48526, 198, 3500, 20595, 14881, 198, 198, 37811, 40480, 329, 2482, 286, 12138, 13, 362, 36, 37227, 198, 2, 5660, 25, 198, 2, 1612, 62, 400, 3808, 62, 40850, 62, 16, 11, 1612, 62, 400, 3808, 62, 40850, 62, 18, 796, 10884, 6422, 544, 69, 40952, 62, 7890, 11147, 13, 1136, 62, 5219, 62, 4703, 896, 62, 18769, 12044, 1496, 3419, 198, 8818, 651, 62, 5219, 62, 4703, 896, 62, 18769, 12044, 1496, 7, 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, 1303, 1226, 395, 81, 796, 45434, 8890, 62, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1226, 395, 81, 796, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 198, 220, 220, 220, 1303, 6416, 25, 198, 220, 220, 220, 1366, 62, 6978, 796, 366, 19571, 76, 11215, 66, 62, 45895, 62, 11147, 14, 42068, 14, 38353, 380, 14, 7890, 14, 50, 1503, 4303, 36, 2149, 57, 43490, 62, 439, 62, 69, 40952, 13, 40664, 1, 198, 220, 220, 220, 1303, 3184, 4817, 25, 198, 220, 220, 220, 1303, 1366, 62, 6978, 796, 366, 19571, 76, 11215, 66, 62, 45895, 62, 11147, 14, 42068, 14, 38353, 380, 14, 7890, 62, 14323, 14, 50, 1503, 4303, 36, 2149, 57, 43490, 62, 439, 62, 69, 40952, 62, 8890, 62, 11201, 2875, 62, 14214, 79, 2246, 62, 5143, 17, 13, 40664, 1, 628, 220, 220, 220, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 796, 2319, 198, 220, 220, 220, 357, 439, 62, 7890, 11, 477, 62, 34242, 8, 796, 45715, 62, 31805, 13, 2220, 62, 50, 1503, 4303, 36, 40, 7, 7890, 62, 6978, 26, 9806, 62, 538, 8052, 62, 525, 62, 7266, 73, 28, 9806, 62, 538, 8052, 62, 525, 62, 7266, 73, 8, 198, 220, 220, 220, 477, 62, 32796, 62, 2340, 796, 477, 62, 34242, 13, 439, 62, 32796, 62, 2340, 198, 220, 220, 220, 44872, 7203, 439, 62, 32796, 62, 2340, 25, 720, 439, 62, 32796, 62, 2340, 4943, 628, 220, 220, 220, 299, 81, 5189, 36476, 26418, 49, 3733, 796, 939, 628, 220, 220, 220, 11387, 62, 40850, 62, 6759, 45977, 62, 16, 796, 15690, 90, 19182, 90, 43879, 2414, 11, 16, 5512, 352, 92, 7, 917, 891, 11, 299, 81, 5189, 36476, 26418, 49, 3733, 8, 198, 220, 220, 220, 685, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 16, 58, 72, 60, 796, 1976, 27498, 7, 43879, 2414, 11, 767, 8, 329, 1312, 287, 352, 25, 48624, 5189, 36476, 26418, 49, 3733, 60, 198, 220, 220, 220, 11387, 62, 40850, 62, 6759, 45977, 62, 18, 796, 15690, 90, 19182, 90, 43879, 2414, 11, 16, 5512, 352, 92, 7, 917, 891, 11, 299, 81, 5189, 36476, 26418, 49, 3733, 8, 198, 220, 220, 220, 685, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 18, 58, 72, 60, 796, 1976, 27498, 7, 43879, 2414, 11, 767, 8, 329, 1312, 287, 352, 25, 48624, 5189, 36476, 26418, 49, 3733, 60, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 11387, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 16, 796, 15690, 90, 19182, 90, 43879, 2414, 11, 16, 5512, 352, 92, 7, 917, 891, 11, 299, 81, 5189, 36476, 26418, 49, 3733, 8, 198, 220, 220, 220, 1303, 685, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 16, 58, 72, 60, 796, 1976, 27498, 7, 43879, 2414, 11, 767, 8, 329, 1312, 287, 352, 25, 48624, 5189, 36476, 26418, 49, 3733, 60, 198, 220, 220, 220, 1303, 11387, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 18, 796, 15690, 90, 19182, 90, 43879, 2414, 11, 16, 5512, 352, 92, 7, 917, 891, 11, 299, 81, 5189, 36476, 26418, 49, 3733, 8, 198, 220, 220, 220, 1303, 685, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 18, 58, 72, 60, 796, 1976, 27498, 7, 43879, 2414, 11, 767, 8, 329, 1312, 287, 352, 25, 48624, 5189, 36476, 26418, 49, 3733, 60, 628, 220, 220, 220, 4823, 62, 16, 62, 7266, 73, 47954, 796, 685, 19, 11, 642, 11, 718, 11, 807, 11, 838, 11, 1105, 11, 1315, 11, 1467, 11, 678, 11, 2310, 60, 198, 220, 220, 220, 4823, 62, 18, 62, 7266, 73, 47954, 796, 685, 16, 11, 362, 11, 513, 11, 767, 11, 860, 11, 1367, 11, 1511, 11, 1478, 11, 1596, 11, 1248, 11, 1160, 60, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 48624, 5189, 36476, 26418, 49, 3733, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 27565, 351, 9014, 628, 220, 220, 220, 220, 220, 220, 220, 6297, 12044, 1496, 62, 32796, 62, 2340, 62, 34960, 62, 16, 796, 6291, 7, 34960, 62, 16, 62, 7266, 73, 47954, 11, 4129, 7, 34960, 62, 16, 62, 7266, 73, 47954, 828, 6330, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6297, 12044, 1496, 62, 32796, 62, 2340, 62, 34960, 62, 18, 796, 6291, 7, 34960, 62, 18, 62, 7266, 73, 47954, 11, 4129, 7, 34960, 62, 18, 62, 7266, 73, 47954, 828, 6330, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6297, 12044, 1496, 62, 32796, 62, 2340, 796, 410, 9246, 7, 18769, 12044, 1496, 62, 32796, 62, 2340, 62, 34960, 62, 16, 11, 6297, 12044, 1496, 62, 32796, 62, 2340, 62, 34960, 62, 18, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 4823, 62, 4703, 896, 198, 220, 220, 220, 220, 220, 220, 220, 4823, 62, 16, 62, 4703, 896, 11, 4823, 62, 18, 62, 4703, 896, 796, 651, 62, 5219, 62, 4703, 896, 62, 12215, 1754, 633, 7, 439, 62, 7890, 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, 6297, 12044, 1496, 62, 32796, 62, 2340, 11, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 796, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 8, 628, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 62, 6759, 45977, 62, 16, 58, 72, 60, 796, 651, 62, 5219, 62, 38631, 400, 10126, 7, 16, 11, 4823, 62, 16, 62, 4703, 896, 8, 198, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 62, 6759, 45977, 62, 18, 58, 72, 60, 796, 651, 62, 5219, 62, 38631, 400, 10126, 7, 18, 11, 4823, 62, 18, 62, 4703, 896, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 11387, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 16, 58, 72, 60, 796, 651, 62, 5219, 62, 400, 10126, 62, 77, 1659, 2535, 7, 16, 11, 4823, 62, 16, 62, 4703, 896, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11387, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 18, 58, 72, 60, 796, 651, 62, 5219, 62, 400, 10126, 62, 77, 1659, 2535, 7, 18, 11, 4823, 62, 18, 62, 4703, 896, 8, 628, 220, 220, 220, 886, 628, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 62, 16, 11, 14367, 62, 400, 3808, 62, 40850, 62, 16, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 16, 796, 220, 651, 62, 18769, 12044, 1496, 62, 34242, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 16, 8, 198, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 62, 18, 11, 14367, 62, 400, 3808, 62, 40850, 62, 18, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 18, 796, 220, 651, 62, 18769, 12044, 1496, 62, 34242, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 18, 8, 628, 220, 220, 220, 3551, 62, 18769, 12044, 1496, 62, 43420, 62, 40664, 7, 16, 11, 1612, 62, 400, 3808, 62, 40850, 62, 16, 11, 14367, 62, 400, 3808, 62, 40850, 62, 16, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 16, 11, 1226, 395, 81, 796, 1226, 395, 81, 8, 198, 220, 220, 220, 3551, 62, 18769, 12044, 1496, 62, 43420, 62, 40664, 7, 18, 11, 1612, 62, 400, 3808, 62, 40850, 62, 18, 11, 14367, 62, 400, 3808, 62, 40850, 62, 18, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 18, 11, 1226, 395, 81, 796, 1226, 395, 81, 8, 628, 220, 220, 220, 1303, 20368, 35937, 198, 220, 220, 220, 1303, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 14367, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 796, 220, 651, 62, 18769, 12044, 1496, 62, 34242, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 16, 8, 198, 220, 220, 220, 1303, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 11, 14367, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 796, 220, 651, 62, 18769, 12044, 1496, 62, 34242, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 62, 77, 1659, 2535, 62, 18, 8, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 3551, 62, 18769, 12044, 1496, 62, 43420, 62, 40664, 7, 16, 11, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 14367, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 1226, 395, 81, 28, 10379, 395, 81, 9, 1, 77, 1659, 2535, 62, 4943, 198, 220, 220, 220, 1303, 3551, 62, 18769, 12044, 1496, 62, 43420, 62, 40664, 7, 18, 11, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 11, 14367, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 11, 1226, 395, 81, 28, 10379, 395, 81, 9, 1, 77, 1659, 2535, 62, 4943, 628, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 62, 16, 11, 1612, 62, 400, 3808, 62, 40850, 62, 18, 2, 11, 220, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 16, 11, 1612, 62, 400, 3808, 62, 40850, 62, 77, 1659, 2535, 62, 18, 198, 437, 198, 198, 37811, 11014, 284, 651, 62, 5219, 62, 4703, 896, 3419, 37227, 198, 8818, 651, 62, 5219, 62, 4703, 896, 62, 12215, 1754, 633, 7, 439, 62, 7890, 11, 2426, 62, 2340, 26, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 796, 2319, 8, 628, 220, 220, 220, 4823, 62, 16, 62, 4703, 896, 796, 1976, 27498, 7, 5317, 2414, 11, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 11, 22, 11, 362, 8, 198, 220, 220, 220, 4823, 62, 18, 62, 4703, 896, 796, 1976, 27498, 7, 5317, 2414, 11, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 11, 22, 11, 362, 8, 198, 220, 220, 220, 1303, 2488, 12860, 2426, 62, 2340, 198, 220, 220, 220, 329, 850, 73, 62, 312, 287, 2426, 62, 2340, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 12860, 850, 73, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 850, 73, 62, 7890, 796, 45715, 62, 31805, 13, 24455, 62, 1525, 62, 6259, 7, 439, 62, 7890, 11, 850, 73, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4823, 62, 312, 796, 850, 73, 62, 7890, 58, 16, 11, 5317, 7, 7836, 62, 31805, 13, 66, 62, 34960, 62, 9641, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 477, 62, 538, 8052, 796, 3748, 7, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 8, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 22942, 62, 9127, 62, 525, 62, 5219, 796, 1976, 27498, 7, 5317, 2414, 11, 767, 8, 1303, 9127, 329, 1123, 1181, 17033, 703, 867, 1661, 340, 14888, 287, 257, 20945, 4471, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 583, 2426, 11, 466, 407, 954, 357, 16345, 828, 655, 900, 284, 657, 393, 352, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 2673, 62, 521, 26407, 796, 1976, 27498, 7, 5317, 2414, 11, 3509, 62, 538, 8052, 62, 525, 62, 7266, 73, 11, 767, 11, 362, 8, 628, 220, 220, 220, 220, 220, 220, 220, 329, 4471, 287, 477, 62, 538, 8052, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 264, 287, 362, 25, 22, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 611, 1181, 264, 468, 366, 3642, 6169, 1, 284, 262, 1459, 4471, 13, 611, 3763, 11, 954, 428, 22942, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22942, 62, 9127, 62, 525, 62, 5219, 58, 82, 60, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 783, 954, 262, 1988, 286, 4028, 13, 15714, 734, 2663, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 329, 617, 2585, 11, 262, 734, 4028, 389, 8603, 4938, 13, 554, 428, 1339, 954, 262, 2223, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 329, 584, 2585, 11, 612, 318, 257, 3376, 357, 16, 8, 290, 257, 2642, 32590, 16, 8, 2223, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2223, 3376, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 2673, 62, 8367, 15437, 764, 855, 657, 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, 1303, 2223, 317, 393, 2223, 347, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 2673, 15437, 764, 855, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 317, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 2673, 62, 521, 26407, 58, 9535, 752, 652, 62, 9127, 62, 525, 62, 5219, 58, 82, 4357, 264, 11, 352, 60, 796, 352, 1303, 466, 407, 15853, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 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, 3465, 25, 340, 338, 407, 281, 17852, 5188, 994, 13, 356, 2198, 329, 1111, 290, 954, 1111, 3689, 379, 749, 1752, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 2673, 15437, 764, 855, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 347, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 2673, 62, 521, 26407, 58, 9535, 752, 652, 62, 9127, 62, 525, 62, 5219, 58, 82, 4357, 264, 11, 362, 60, 796, 352, 1303, 466, 407, 15853, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 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, 2223, 3376, 393, 2642, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 2673, 62, 8367, 15437, 764, 855, 1343, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3376, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 2673, 62, 521, 26407, 58, 9535, 752, 652, 62, 9127, 62, 525, 62, 5219, 58, 82, 4357, 264, 11, 362, 60, 796, 352, 1303, 466, 407, 15853, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 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, 3465, 25, 340, 338, 407, 281, 17852, 5188, 994, 13, 356, 2198, 329, 1111, 290, 954, 1111, 3689, 379, 749, 1752, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 38668, 15437, 764, 855, 4471, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 5219, 15437, 764, 855, 264, 8, 764, 5, 357, 7266, 73, 62, 7890, 58, 45299, 5317, 7, 7836, 62, 31805, 13, 66, 62, 2673, 62, 8367, 15437, 764, 855, 532, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2642, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 2673, 62, 521, 26407, 58, 9535, 752, 652, 62, 9127, 62, 525, 62, 5219, 58, 82, 4357, 264, 11, 352, 60, 796, 352, 1303, 466, 407, 15853, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 886, 477, 2585, 198, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 886, 477, 8640, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 12860, 1181, 62, 2673, 62, 521, 26407, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4823, 62, 312, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4823, 62, 16, 62, 4703, 896, 15853, 1181, 62, 2673, 62, 521, 26407, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 4823, 62, 312, 6624, 513, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4823, 62, 18, 62, 4703, 896, 15853, 1181, 62, 2673, 62, 521, 26407, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 34680, 4823, 4686, 25, 720, 34960, 62, 312, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 1303, 886, 477, 2426, 198, 220, 220, 220, 4823, 62, 16, 62, 4703, 896, 11, 4823, 62, 18, 62, 4703, 896, 198, 437, 198, 198, 8818, 651, 62, 5219, 62, 38631, 400, 10126, 7, 34960, 62, 312, 3712, 5317, 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, 4823, 62, 5219, 62, 9127, 82, 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, 4673, 62, 400, 10126, 28, 15, 13, 23, 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, 949, 62, 4703, 896, 62, 8897, 24615, 796, 362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 6978, 796, 12813, 14490, 14, 11017, 544, 14, 36881, 14, 4943, 198, 220, 220, 220, 47764, 43420, 796, 17635, 198, 220, 220, 220, 4823, 62, 10951, 796, 651, 62, 34960, 62, 10951, 3419, 198, 220, 220, 220, 2585, 11, 10926, 62, 17080, 11, 1181, 62, 14116, 11, 4823, 796, 651, 62, 5661, 62, 34960, 62, 10951, 7, 34960, 62, 10951, 11, 4823, 62, 312, 8, 628, 220, 220, 220, 2315, 62, 12786, 62, 11201, 796, 685, 15, 13, 20, 11, 657, 8183, 198, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 796, 1976, 27498, 7, 13664, 7, 27219, 47762, 16, 8, 198, 220, 220, 220, 329, 264, 796, 2585, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9853, 62, 525, 62, 38668, 62, 2673, 36460, 796, 43030, 7, 34960, 62, 5219, 62, 9127, 82, 58, 45299, 82, 11, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 9853, 62, 525, 62, 38668, 62, 2673, 30283, 796, 43030, 7, 34960, 62, 5219, 62, 9127, 82, 58, 45299, 82, 11, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 32794, 62, 9127, 82, 62, 525, 62, 38668, 796, 9853, 62, 525, 62, 38668, 62, 2673, 36460, 13, 10, 9127, 82, 62, 525, 62, 38668, 62, 2673, 30283, 198, 220, 220, 220, 220, 220, 220, 220, 8640, 62, 1084, 62, 4703, 896, 796, 1064, 439, 7, 16345, 1150, 62, 9127, 82, 62, 525, 62, 38668, 764, 29, 28, 949, 62, 4703, 896, 62, 8897, 24615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 12860, 8640, 62, 1084, 62, 4703, 896, 198, 220, 220, 220, 220, 220, 220, 220, 8064, 796, 9853, 62, 525, 62, 38668, 62, 2673, 30283, 58, 538, 8052, 62, 1084, 62, 4703, 896, 60, 24457, 32794, 62, 9127, 82, 62, 525, 62, 38668, 58, 538, 8052, 62, 1084, 62, 4703, 896, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 796, 357, 16345, 1150, 62, 9127, 82, 62, 525, 62, 38668, 58, 538, 8052, 62, 1084, 62, 4703, 896, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 299, 81, 62, 87, 796, 4129, 7, 10366, 952, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 7890, 796, 352, 25, 48624, 62, 87, 198, 220, 220, 220, 220, 220, 220, 220, 331, 62, 7890, 796, 8064, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 19736, 1096, 796, 352, 10, 17, 9, 31166, 17034, 7, 6551, 58, 72, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 796, 48436, 2414, 12195, 6551, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 10926, 62, 17080, 58, 16, 11, 82, 60, 14512, 10926, 62, 17080, 58, 17, 11, 82, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4197, 796, 12133, 62, 11147, 7, 19849, 62, 11201, 11, 2124, 62, 7890, 11, 331, 62, 7890, 11, 3463, 11, 2315, 62, 12786, 62, 11201, 8, 1303, 14331, 276, 1575, 2163, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 5183, 796, 2746, 62, 11201, 7, 87, 62, 7890, 11, 4197, 13, 17143, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 800, 62, 19849, 62, 11201, 7, 40684, 62, 400, 10126, 11, 4197, 13, 17143, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 11387, 62, 40850, 1279, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4197, 13, 17143, 58, 17, 60, 1875, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 657, 13, 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, 11387, 62, 40850, 796, 48436, 2414, 7, 538, 8052, 62, 1084, 62, 4703, 896, 58, 437, 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, 2488, 12860, 11387, 62, 40850, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 35937, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 11387, 62, 40850, 1875, 48436, 2414, 7, 538, 8052, 62, 1084, 62, 4703, 896, 58, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 48436, 2414, 7, 538, 8052, 62, 1084, 62, 4703, 896, 58, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 58, 82, 60, 796, 11387, 62, 40850, 198, 220, 220, 220, 886, 198, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 198, 437, 198, 198, 2, 24550, 25, 5626, 1294, 1961, 10185, 198, 8818, 651, 62, 5219, 62, 400, 10126, 62, 77, 1659, 2535, 7, 34960, 62, 312, 3712, 5317, 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, 4823, 62, 5219, 62, 9127, 82, 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, 4673, 62, 400, 10126, 28, 15, 13, 23, 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, 949, 62, 4703, 896, 62, 8897, 24615, 796, 362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 6978, 796, 12813, 14490, 14, 11017, 544, 14, 36881, 14, 4943, 198, 220, 220, 220, 47764, 43420, 796, 17635, 198, 220, 220, 220, 4823, 62, 10951, 796, 651, 62, 34960, 62, 10951, 3419, 198, 220, 220, 220, 2585, 11, 10926, 62, 17080, 11, 1181, 62, 14116, 11, 4823, 796, 651, 62, 5661, 62, 34960, 62, 10951, 7, 34960, 62, 10951, 11, 4823, 62, 312, 8, 628, 220, 220, 220, 2315, 62, 12786, 62, 11201, 796, 685, 15, 13, 20, 11, 657, 8183, 198, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 796, 1976, 27498, 7, 13664, 7, 27219, 47762, 16, 8, 198, 220, 220, 220, 329, 264, 796, 2585, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9853, 62, 525, 62, 38668, 62, 2673, 36460, 796, 43030, 7, 34960, 62, 5219, 62, 9127, 82, 58, 45299, 82, 11, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 9853, 62, 525, 62, 38668, 62, 2673, 30283, 796, 43030, 7, 34960, 62, 5219, 62, 9127, 82, 58, 45299, 82, 11, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 32794, 62, 9127, 82, 62, 525, 62, 38668, 796, 9853, 62, 525, 62, 38668, 62, 2673, 36460, 13, 10, 9127, 82, 62, 525, 62, 38668, 62, 2673, 30283, 198, 220, 220, 220, 220, 220, 220, 220, 8640, 62, 1084, 62, 4703, 896, 796, 1064, 439, 7, 16345, 1150, 62, 9127, 82, 62, 525, 62, 38668, 764, 29, 28, 949, 62, 4703, 896, 62, 8897, 24615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 12860, 8640, 62, 1084, 62, 4703, 896, 198, 220, 220, 220, 220, 220, 220, 220, 8064, 796, 9853, 62, 525, 62, 38668, 62, 2673, 30283, 58, 538, 8052, 62, 1084, 62, 4703, 896, 60, 24457, 32794, 62, 9127, 82, 62, 525, 62, 38668, 58, 538, 8052, 62, 1084, 62, 4703, 896, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 796, 357, 16345, 1150, 62, 9127, 82, 62, 525, 62, 38668, 58, 538, 8052, 62, 1084, 62, 4703, 896, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 299, 81, 62, 87, 796, 4129, 7, 10366, 952, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 19736, 1096, 796, 352, 10, 17, 9, 31166, 17034, 7, 6551, 58, 72, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 796, 48436, 2414, 12195, 6551, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 10926, 62, 17080, 58, 16, 11, 82, 60, 14512, 10926, 62, 17080, 58, 17, 11, 82, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 1064, 11085, 7, 87, 3784, 2124, 13, 29, 28, 15, 13, 23, 11, 8064, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 22366, 7, 400, 10126, 62, 40850, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 796, 48436, 2414, 7, 538, 8052, 62, 1084, 62, 4703, 896, 58, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 58, 82, 60, 796, 11387, 62, 40850, 198, 220, 220, 220, 886, 198, 220, 220, 220, 11387, 62, 40850, 62, 6759, 8609, 198, 437, 628, 198, 8818, 651, 62, 18769, 12044, 1496, 62, 34242, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 8, 198, 220, 220, 220, 294, 3808, 62, 40850, 62, 9246, 796, 289, 9246, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 23029, 198, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 796, 1612, 7, 400, 3808, 62, 40850, 62, 9246, 11, 5391, 82, 28, 17, 8, 198, 220, 220, 220, 14367, 62, 400, 3808, 62, 40850, 796, 14367, 7, 400, 3808, 62, 40850, 62, 9246, 11, 5391, 82, 28, 17, 8, 198, 220, 220, 220, 2488, 12860, 2546, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 11, 16, 8, 198, 220, 220, 220, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 796, 14367, 7, 400, 3808, 62, 40850, 62, 9246, 11, 5391, 82, 28, 17, 8, 24457, 19862, 17034, 7, 7857, 7, 400, 10126, 62, 40850, 62, 6759, 45977, 11, 16, 4008, 198, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 11, 14367, 62, 400, 3808, 62, 40850, 11, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 198, 437, 628, 198, 8818, 3551, 62, 18769, 12044, 1496, 62, 43420, 62, 40664, 7, 34960, 62, 312, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1612, 62, 400, 3808, 62, 40850, 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, 14367, 62, 400, 3808, 62, 40850, 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, 336, 1082, 1472, 62, 400, 3808, 62, 40850, 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, 1226, 395, 81, 2625, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1226, 395, 81, 796, 45434, 8890, 62, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3613, 6978, 796, 366, 19571, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 3613, 6978, 796, 787, 71, 2586, 1015, 6978, 7203, 40684, 22019, 303, 34046, 62, 18769, 26418, 4943, 198, 220, 220, 220, 33480, 15908, 7, 21928, 6978, 8, 628, 220, 220, 220, 4823, 62, 10951, 796, 651, 62, 34960, 62, 10951, 3419, 198, 220, 220, 220, 2585, 11, 10926, 62, 17080, 11, 1181, 62, 14116, 11, 4823, 796, 651, 62, 5661, 62, 34960, 62, 10951, 7, 34960, 62, 10951, 11, 4823, 62, 312, 8, 628, 220, 220, 220, 47764, 43420, 796, 6060, 19778, 3419, 198, 220, 220, 220, 329, 264, 796, 2585, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 17080, 796, 3297, 7, 1084, 4402, 62, 17080, 58, 45299, 82, 60, 764, 12, 352, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 43420, 58, 28265, 38357, 7, 8841, 7, 82, 27493, 1, 62, 1, 9, 5219, 62, 14116, 58, 82, 60, 9, 1, 62, 400, 10126, 40850, 62, 32604, 4943, 60, 796, 685, 32604, 62, 400, 3808, 62, 40850, 58, 82, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 43420, 58, 28265, 38357, 7, 8841, 7, 82, 27493, 1, 62, 1, 9, 5219, 62, 14116, 58, 82, 60, 9, 1, 62, 400, 10126, 40850, 62, 19282, 4943, 60, 796, 685, 19282, 62, 400, 3808, 62, 40850, 58, 82, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 43420, 58, 28265, 38357, 7, 8841, 7, 82, 27493, 1, 62, 1, 9, 5219, 62, 14116, 58, 82, 60, 9, 1, 62, 400, 10126, 40850, 62, 301, 1082, 1472, 4943, 60, 796, 685, 301, 1082, 1472, 62, 400, 3808, 62, 40850, 58, 82, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 43420, 58, 28265, 38357, 7, 8841, 7, 82, 27493, 1, 62, 1, 9, 5219, 62, 14116, 58, 82, 60, 9, 1, 62, 17080, 16, 14259, 17080, 17, 4943, 60, 796, 685, 8841, 7, 5317, 7, 1084, 62, 17080, 58, 16, 60, 4008, 9, 26793, 273, 21215, 9, 8841, 7, 5317, 7, 1084, 62, 17080, 58, 17, 60, 4008, 60, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 43420, 58, 28265, 38357, 7, 8841, 7, 82, 27493, 1, 62, 1, 9, 5219, 62, 14116, 58, 82, 60, 9, 1, 62, 34960, 312, 4943, 60, 796, 685, 34960, 62, 312, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44189, 13, 13564, 7, 22179, 6978, 7, 21928, 6978, 11, 366, 40684, 22019, 303, 5657, 62, 18769, 26418, 62, 1, 9, 10379, 395, 81, 9, 1, 38, 1, 1635, 4731, 7, 34960, 62, 312, 8, 1635, 1911, 40664, 12340, 47764, 43420, 11, 198, 220, 220, 220, 220, 220, 220, 220, 46728, 796, 366, 366, 1776, 198, 220, 220, 220, 1303, 47764, 43420, 198, 437, 198 ]
2.041609
6,537
export JITEventListener, GDBRegistrationListener, IntelJITEventListener, OProfileJITEventListener, PerfJITEventListener @checked struct JITEventListener ref::API.LLVMJITEventListenerRef end Base.unsafe_convert(::Type{API.LLVMJITEventListenerRef}, listener::JITEventListener) = listener.ref GDBRegistrationListener() = JITEventListener(LLVM.API.LLVMCreateGDBRegistrationListener()) IntelJITEventListener() = JITEventListener(LLVM.API.LLVMCreateIntelJITEventListener()) OProfileJITEventListener() = JITEventListener(LLVM.API.LLVMCreateOProfileJITEventListener()) PerfJITEventListener() = JITEventListener(LLVM.API.LLVMCreatePerfJITEventListener())
[ 39344, 449, 2043, 9237, 33252, 11, 402, 11012, 47133, 33252, 11, 8180, 41, 2043, 9237, 33252, 11, 198, 220, 220, 220, 220, 220, 220, 440, 37046, 41, 2043, 9237, 33252, 11, 2448, 69, 41, 2043, 9237, 33252, 198, 198, 31, 26752, 2878, 449, 2043, 9237, 33252, 198, 220, 220, 220, 1006, 3712, 17614, 13, 3069, 15996, 41, 2043, 9237, 33252, 8134, 198, 437, 198, 14881, 13, 13271, 8635, 62, 1102, 1851, 7, 3712, 6030, 90, 17614, 13, 3069, 15996, 41, 2043, 9237, 33252, 8134, 5512, 24783, 3712, 41, 2043, 9237, 33252, 8, 796, 24783, 13, 5420, 198, 198, 38, 11012, 47133, 33252, 3419, 220, 796, 449, 2043, 9237, 33252, 7, 3069, 15996, 13, 17614, 13, 3069, 53, 9655, 260, 378, 38, 11012, 47133, 33252, 28955, 198, 24123, 41, 2043, 9237, 33252, 3419, 220, 220, 220, 796, 449, 2043, 9237, 33252, 7, 3069, 15996, 13, 17614, 13, 3069, 53, 9655, 260, 378, 24123, 41, 2043, 9237, 33252, 28955, 198, 46, 37046, 41, 2043, 9237, 33252, 3419, 796, 449, 2043, 9237, 33252, 7, 3069, 15996, 13, 17614, 13, 3069, 53, 9655, 260, 378, 46, 37046, 41, 2043, 9237, 33252, 28955, 198, 5990, 69, 41, 2043, 9237, 33252, 3419, 220, 220, 220, 220, 796, 449, 2043, 9237, 33252, 7, 3069, 15996, 13, 17614, 13, 3069, 53, 9655, 260, 378, 5990, 69, 41, 2043, 9237, 33252, 28955, 198 ]
2.977679
224
""" hubbard_dispersion(k) Dispersion relation for [`HubbardMom1D`](@ref). Returns `-2cos(k)`. See also [`continuum_dispersion`](@ref). """ hubbard_dispersion(k) = -2cos(k) """ continuum_dispersion(k) Dispersion relation for [`HubbardMom1D`](@ref). Returns `k^2`. See also [`hubbard_dispersion`](@ref). """ continuum_dispersion(k) = k^2 """ HubbardMom1D(address; u=1.0, t=1.0, dispersion=hubbard_dispersion) Implements a one-dimensional Bose Hubbard chain in momentum space. ```math \\hat{H} = \\sum_{k} ϵ_k n_k + \\frac{u}{M}\\sum_{kpqr} a^†_{r} a^†_{q} a_p a_k δ_{r+q,p+k} ``` # Arguments * `address`: the starting address, defines number of particles and sites. * `u`: the interaction parameter. * `t`: the hopping strength. * `dispersion`: defines ``ϵ_k =``` t*dispersion(k)` - [`hubbard_dispersion`](@ref): ``ϵ_k = -2t \\cos(k)`` - [`continuum_dispersion`](@ref): ``ϵ_k = tk^2`` # See also * [`HubbardReal1D`](@ref) * [`ExtendedHubbardReal1D`](@ref) """ struct HubbardMom1D{TT,M,AD<:AbstractFockAddress,U,T} <: AbstractHamiltonian{TT} add::AD # default starting address, should have N particles and M modes ks::SVector{M,TT} # values for k kes::SVector{M,TT} # values for kinetic energy end function HubbardMom1D( add::Union{BoseFS,FermiFS2C}; u=1.0, t=1.0, dispersion = hubbard_dispersion, ) M = num_modes(add) U, T = promote(float(u), float(t)) step = 2π/M if isodd(M) start = -π*(1+1/M) + step else start = -π + step end kr = range(start; step = step, length = M) ks = SVector{M}(kr) # kes = SVector{M}(-2T*cos.(kr)) kes = SVector{M}(T .* dispersion.(kr)) return HubbardMom1D{typeof(U),M,typeof(add),U,T}(add, ks, kes) end function Base.show(io::IO, h::HubbardMom1D) print(io, "HubbardMom1D($(h.add); u=$(h.u), t=$(h.t))") end function starting_address(h::HubbardMom1D) return h.add end LOStructure(::Type{<:HubbardMom1D{<:Real}}) = IsHermitian() Base.getproperty(h::HubbardMom1D, s::Symbol) = getproperty(h, Val(s)) Base.getproperty(h::HubbardMom1D, ::Val{:ks}) = getfield(h, :ks) Base.getproperty(h::HubbardMom1D, ::Val{:kes}) = getfield(h, :kes) Base.getproperty(h::HubbardMom1D, ::Val{:add}) = getfield(h, :add) Base.getproperty(h::HubbardMom1D{<:Any,<:Any,<:Any,U}, ::Val{:u}) where {U} = U Base.getproperty(h::HubbardMom1D{<:Any,<:Any,<:Any,<:Any,T}, ::Val{:t}) where {T} = T ks(h::HubbardMom1D) = getfield(h, :ks) """ num_singly_doubly_occupied_sites(address) Returns the number of singly and doubly occupied sites for a bosonic bit string address. # Example ```jldoctest julia> Hamiltonians.num_singly_doubly_occupied_sites(BoseFS{3,3}((1, 1, 1))) (3, 0) julia> Hamiltonians.num_singly_doubly_occupied_sites(BoseFS{3,3}((2, 0, 1))) (2, 1) ``` """ function num_singly_doubly_occupied_sites(b::BoseFS) singlies = 0 doublies = 0 for (n, _, _) in occupied_modes(b) singlies += 1 doublies += n > 1 end return singlies, doublies end function num_singly_doubly_occupied_sites(onrep::AbstractArray) # this one is faster by about a factor of 2 if you already have the onrep # returns number of singly and doubly occupied sites singlies = 0 doublies = 0 for n in onrep singlies += n > 0 doublies += n > 1 end return singlies, doublies end # standard interface function function num_offdiagonals(ham::HubbardMom1D, add::BoseFS) singlies, doublies = num_singly_doubly_occupied_sites(add) return num_offdiagonals(ham, add, singlies, doublies) end # 4-argument version @inline function num_offdiagonals(ham::HubbardMom1D, add::BoseFS, singlies, doublies) M = num_modes(ham) return singlies * (singlies - 1) * (M - 2) + doublies * (M - 1) end @inline function num_offdiagonals(ham::HubbardMom1D, add::FermiFS2C{N1,N2}) where {N1,N2} M = num_modes(ham) return N1 * N2 * (M - 1) end """ momentum_transfer_diagonal(H, map::OccupiedModeMap) Compute diagonal interaction energy term. # Example ```jldoctest julia> a = BoseFS{6,5}((1,2,3,0,0)) BoseFS{6,5}((1, 2, 3, 0, 0)) julia> H = HubbardMom1D(a); julia> Hamiltonians.momentum_transfer_diagonal(H, OccupiedModeMap(a)) 5.2 ``` """ @inline function momentum_transfer_diagonal( h::HubbardMom1D{<:Any,M,<:BoseFS}, map ) where {M} return h.u / 2M * momentum_transfer_diagonal(map) end @inline function momentum_transfer_diagonal( h::HubbardMom1D{<:Any,M,<:FermiFS2C}, map_a, map_b ) where {M} return h.u / 2M * momentum_transfer_diagonal(map_a, map_b) end @inline function diagonal_element(h::HubbardMom1D, add::BoseFS) map = OccupiedModeMap(add) return dot(h.kes, map) + momentum_transfer_diagonal(h, map) end @inline function diagonal_element(h::HubbardMom1D, add::FermiFS2C) map_a = OccupiedModeMap(add.components[1]) map_b = OccupiedModeMap(add.components[2]) return dot(h.kes, map_a) + dot(h.kes, map_b) + momentum_transfer_diagonal(h, map_a, map_b) end @inline function get_offdiagonal( ham::HubbardMom1D{<:Any,M,A}, add::A, chosen, map=OccupiedModeMap(add) ) where {M,A<:BoseFS} add, onproduct = momentum_transfer_excitation(add, chosen, map) return add, ham.u/(2*M)*onproduct end @inline function get_offdiagonal( ham::HubbardMom1D{<:Any,M,A}, add::A, chosen, map_a=OccupiedModeMap(add.components[1]), map_b=OccupiedModeMap(add.components[2]) ) where {M,A<:FermiFS2C} add_a, add_b = add.components new_add_a, new_add_b, onproduct = momentum_transfer_excitation( add_a, add_b, chosen, map_a, map_b ) return CompositeFS(new_add_a, new_add_b), ham.u/M * onproduct end ### ### offdiagonals ### """ OffdiagonalsBoseMom1D Specialized [`AbstractOffdiagonals`](@ref) that keeps track of singly and doubly occupied sites in current address. """ struct OffdiagonalsBoseMom1D{ A<:BoseFS,T,H<:AbstractHamiltonian{T},O<:OccupiedModeMap } <: AbstractOffdiagonals{A,T} hamiltonian::H address::A length::Int map::O end function offdiagonals(h::HubbardMom1D, a::BoseFS) map = OccupiedModeMap(a) singlies = length(map) doublies = count(i -> i.occnum ≥ 2, map) num = num_offdiagonals(h, a, singlies, doublies) return OffdiagonalsBoseMom1D(h, a, num, map) end function Base.getindex(s::OffdiagonalsBoseMom1D{A,T}, i)::Tuple{A,T} where {A,T} @boundscheck begin 1 ≤ i ≤ s.length || throw(BoundsError(s, i)) end new_address, matrix_element = get_offdiagonal(s.hamiltonian, s.address, i, s.map) return (new_address, matrix_element) end Base.size(s::OffdiagonalsBoseMom1D) = (s.length,) struct OffdiagonalsFermiMom1D2C{ F<:FermiFS2C,T,H<:AbstractHamiltonian{T},O1,O2 } <: AbstractOffdiagonals{F,T} hamiltonian::H address::F length::Int map_a::O1 map_b::O2 end function offdiagonals(h::HubbardMom1D, f::FermiFS2C) comp_a, comp_b = f.components map_a = OccupiedModeMap(comp_a) map_b = OccupiedModeMap(comp_b) num = num_offdiagonals(h, f) return OffdiagonalsFermiMom1D2C(h, f, num, map_a, map_b) end Base.size(s::OffdiagonalsFermiMom1D2C) = (s.length,) function Base.getindex(s::OffdiagonalsFermiMom1D2C{A,T}, i)::Tuple{A,T} where {A,T} @boundscheck begin i ≤ i ≤ s.length || throw(BoundsError(s, i)) end new_address, matrix_element = get_offdiagonal( s.hamiltonian, s.address, i, s.map_a, s.map_b ) return (new_address, matrix_element) end ### ### momentum ### struct MomentumMom1D{T,H<:AbstractHamiltonian{T}} <: AbstractHamiltonian{T} ham::H end LOStructure(::Type{MomentumMom1D{H,T}}) where {H,T <: Real} = IsHermitian() num_offdiagonals(ham::MomentumMom1D, add) = 0 diagonal_element(mom::MomentumMom1D, add) = mod1(onr(add)⋅ks(mom.ham) + π, 2π) - π # fold into (-π, π] momentum(ham::HubbardMom1D) = MomentumMom1D(ham)
[ 37811, 198, 220, 220, 220, 12575, 23024, 62, 6381, 79, 6900, 7, 74, 8, 198, 7279, 79, 6900, 8695, 329, 685, 63, 16066, 23024, 29252, 16, 35, 63, 16151, 31, 5420, 737, 16409, 4600, 12, 17, 6966, 7, 74, 8, 44646, 198, 198, 6214, 635, 685, 63, 18487, 13814, 62, 6381, 79, 6900, 63, 16151, 31, 5420, 737, 198, 37811, 198, 40140, 23024, 62, 6381, 79, 6900, 7, 74, 8, 796, 532, 17, 6966, 7, 74, 8, 198, 198, 37811, 198, 220, 220, 220, 44422, 62, 6381, 79, 6900, 7, 74, 8, 198, 7279, 79, 6900, 8695, 329, 685, 63, 16066, 23024, 29252, 16, 35, 63, 16151, 31, 5420, 737, 16409, 4600, 74, 61, 17, 44646, 198, 198, 6214, 635, 685, 63, 40140, 23024, 62, 6381, 79, 6900, 63, 16151, 31, 5420, 737, 198, 37811, 198, 18487, 13814, 62, 6381, 79, 6900, 7, 74, 8, 796, 479, 61, 17, 198, 198, 37811, 198, 220, 220, 220, 34342, 29252, 16, 35, 7, 21975, 26, 334, 28, 16, 13, 15, 11, 256, 28, 16, 13, 15, 11, 4596, 6900, 28, 40140, 23024, 62, 6381, 79, 6900, 8, 198, 198, 3546, 1154, 902, 257, 530, 12, 19577, 347, 577, 34342, 6333, 287, 12858, 2272, 13, 198, 198, 15506, 63, 11018, 198, 6852, 5183, 90, 39, 92, 796, 220, 26867, 16345, 23330, 74, 92, 18074, 113, 62, 74, 299, 62, 74, 1343, 26867, 31944, 90, 84, 18477, 44, 92, 6852, 16345, 23330, 74, 79, 80, 81, 92, 257, 61, 33912, 23330, 81, 92, 257, 61, 33912, 23330, 80, 92, 257, 62, 79, 257, 62, 74, 7377, 112, 23330, 81, 10, 80, 11, 79, 10, 74, 92, 198, 15506, 63, 198, 198, 2, 20559, 2886, 198, 198, 9, 4600, 21975, 63, 25, 262, 3599, 2209, 11, 15738, 1271, 286, 13166, 290, 5043, 13, 198, 9, 4600, 84, 63, 25, 262, 10375, 11507, 13, 198, 9, 4600, 83, 63, 25, 262, 47153, 4202, 13, 198, 9, 4600, 6381, 79, 6900, 63, 25, 15738, 7559, 139, 113, 62, 74, 796, 15506, 63, 256, 9, 6381, 79, 6900, 7, 74, 8, 63, 198, 220, 220, 220, 532, 685, 63, 40140, 23024, 62, 6381, 79, 6900, 63, 16151, 31, 5420, 2599, 7559, 139, 113, 62, 74, 796, 532, 17, 83, 26867, 6966, 7, 74, 8, 15506, 198, 220, 220, 220, 532, 685, 63, 18487, 13814, 62, 6381, 79, 6900, 63, 16151, 31, 5420, 2599, 7559, 139, 113, 62, 74, 796, 256, 74, 61, 17, 15506, 198, 198, 2, 4091, 635, 198, 198, 9, 685, 63, 16066, 23024, 15633, 16, 35, 63, 16151, 31, 5420, 8, 198, 9, 685, 63, 11627, 1631, 16066, 23024, 15633, 16, 35, 63, 16151, 31, 5420, 8, 198, 37811, 198, 7249, 34342, 29252, 16, 35, 90, 15751, 11, 44, 11, 2885, 27, 25, 23839, 37, 735, 20231, 11, 52, 11, 51, 92, 1279, 25, 27741, 45405, 666, 90, 15751, 92, 198, 220, 220, 220, 751, 3712, 2885, 1303, 4277, 3599, 2209, 11, 815, 423, 399, 13166, 290, 337, 12881, 198, 220, 220, 220, 479, 82, 3712, 50, 38469, 90, 44, 11, 15751, 92, 1303, 3815, 329, 479, 198, 220, 220, 220, 479, 274, 3712, 50, 38469, 90, 44, 11, 15751, 92, 1303, 3815, 329, 37892, 2568, 198, 437, 198, 198, 8818, 34342, 29252, 16, 35, 7, 198, 220, 220, 220, 751, 3712, 38176, 90, 33, 577, 10652, 11, 37, 7780, 72, 10652, 17, 34, 19629, 198, 220, 220, 220, 334, 28, 16, 13, 15, 11, 256, 28, 16, 13, 15, 11, 4596, 6900, 796, 12575, 23024, 62, 6381, 79, 6900, 11, 198, 8, 198, 220, 220, 220, 337, 796, 997, 62, 76, 4147, 7, 2860, 8, 198, 220, 220, 220, 471, 11, 309, 796, 7719, 7, 22468, 7, 84, 828, 12178, 7, 83, 4008, 198, 220, 220, 220, 2239, 796, 362, 46582, 14, 44, 198, 220, 220, 220, 611, 318, 5088, 7, 44, 8, 198, 220, 220, 220, 220, 220, 220, 220, 923, 796, 532, 46582, 9, 7, 16, 10, 16, 14, 44, 8, 1343, 2239, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 923, 796, 532, 46582, 1343, 2239, 198, 220, 220, 220, 886, 198, 220, 220, 220, 479, 81, 796, 2837, 7, 9688, 26, 2239, 796, 2239, 11, 4129, 796, 337, 8, 198, 220, 220, 220, 479, 82, 796, 20546, 9250, 90, 44, 92, 7, 38584, 8, 198, 220, 220, 220, 1303, 479, 274, 796, 20546, 9250, 90, 44, 92, 32590, 17, 51, 9, 6966, 12195, 38584, 4008, 198, 220, 220, 220, 479, 274, 796, 20546, 9250, 90, 44, 92, 7, 51, 764, 9, 4596, 6900, 12195, 38584, 4008, 198, 220, 220, 220, 1441, 34342, 29252, 16, 35, 90, 4906, 1659, 7, 52, 828, 44, 11, 4906, 1659, 7, 2860, 828, 52, 11, 51, 92, 7, 2860, 11, 479, 82, 11, 479, 274, 8, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 289, 3712, 16066, 23024, 29252, 16, 35, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 366, 16066, 23024, 29252, 16, 35, 16763, 7, 71, 13, 2860, 1776, 334, 43641, 7, 71, 13, 84, 828, 256, 43641, 7, 71, 13, 83, 4008, 4943, 198, 437, 198, 198, 8818, 3599, 62, 21975, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 8, 198, 220, 220, 220, 1441, 289, 13, 2860, 198, 437, 198, 198, 21982, 1273, 5620, 7, 3712, 6030, 90, 27, 25, 16066, 23024, 29252, 16, 35, 90, 27, 25, 15633, 11709, 8, 796, 1148, 9360, 2781, 666, 3419, 198, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 264, 3712, 13940, 23650, 8, 796, 651, 26745, 7, 71, 11, 3254, 7, 82, 4008, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 7904, 7762, 90, 25, 591, 30072, 796, 651, 3245, 7, 71, 11, 1058, 591, 8, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 7904, 7762, 90, 25, 5209, 30072, 796, 651, 3245, 7, 71, 11, 1058, 5209, 8, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 7904, 7762, 90, 25, 2860, 30072, 796, 651, 3245, 7, 71, 11, 1058, 2860, 8, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 27, 25, 7149, 11, 27, 25, 7149, 11, 52, 5512, 7904, 7762, 90, 25, 84, 30072, 810, 1391, 52, 92, 796, 471, 198, 14881, 13, 1136, 26745, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 27, 25, 7149, 11, 27, 25, 7149, 11, 27, 25, 7149, 11, 51, 5512, 7904, 7762, 90, 25, 83, 30072, 810, 1391, 51, 92, 796, 309, 198, 198, 591, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 8, 796, 651, 3245, 7, 71, 11, 1058, 591, 8, 198, 198, 37811, 198, 220, 220, 220, 997, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 21975, 8, 198, 198, 35561, 262, 1271, 286, 1702, 306, 290, 3385, 306, 12030, 5043, 329, 257, 37284, 9229, 1643, 4731, 2209, 13, 198, 198, 2, 17934, 198, 198, 15506, 63, 73, 335, 38441, 395, 198, 73, 43640, 29, 11582, 1547, 13, 22510, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 33, 577, 10652, 90, 18, 11, 18, 92, 19510, 16, 11, 352, 11, 352, 22305, 198, 7, 18, 11, 657, 8, 198, 73, 43640, 29, 11582, 1547, 13, 22510, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 33, 577, 10652, 90, 18, 11, 18, 92, 19510, 17, 11, 657, 11, 352, 22305, 198, 7, 17, 11, 352, 8, 198, 15506, 63, 198, 37811, 198, 8818, 997, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 65, 3712, 33, 577, 10652, 8, 198, 220, 220, 220, 1702, 13508, 796, 657, 198, 220, 220, 220, 2255, 2436, 444, 796, 657, 198, 220, 220, 220, 329, 357, 77, 11, 4808, 11, 4808, 8, 287, 12030, 62, 76, 4147, 7, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1702, 13508, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2255, 2436, 444, 15853, 299, 1875, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1702, 13508, 11, 2255, 2436, 444, 198, 437, 198, 198, 8818, 997, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 261, 7856, 3712, 23839, 19182, 8, 198, 220, 220, 220, 1303, 428, 530, 318, 5443, 416, 546, 257, 5766, 286, 362, 611, 345, 1541, 423, 262, 319, 7856, 198, 220, 220, 220, 1303, 5860, 1271, 286, 1702, 306, 290, 3385, 306, 12030, 5043, 198, 220, 220, 220, 1702, 13508, 796, 657, 198, 220, 220, 220, 2255, 2436, 444, 796, 657, 198, 220, 220, 220, 329, 299, 287, 319, 7856, 198, 220, 220, 220, 220, 220, 220, 220, 1702, 13508, 15853, 299, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2255, 2436, 444, 15853, 299, 1875, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1702, 13508, 11, 2255, 2436, 444, 198, 437, 198, 198, 2, 3210, 7071, 2163, 198, 8818, 997, 62, 2364, 10989, 1840, 874, 7, 2763, 3712, 16066, 23024, 29252, 16, 35, 11, 751, 3712, 33, 577, 10652, 8, 198, 220, 220, 220, 1702, 13508, 11, 2255, 2436, 444, 796, 997, 62, 82, 4420, 62, 67, 12944, 306, 62, 28756, 62, 49315, 7, 2860, 8, 198, 220, 220, 220, 1441, 997, 62, 2364, 10989, 1840, 874, 7, 2763, 11, 751, 11, 1702, 13508, 11, 2255, 2436, 444, 8, 198, 437, 198, 198, 2, 604, 12, 49140, 2196, 198, 31, 45145, 2163, 997, 62, 2364, 10989, 1840, 874, 7, 2763, 3712, 16066, 23024, 29252, 16, 35, 11, 751, 3712, 33, 577, 10652, 11, 1702, 13508, 11, 2255, 2436, 444, 8, 198, 220, 220, 220, 337, 796, 997, 62, 76, 4147, 7, 2763, 8, 198, 220, 220, 220, 1441, 1702, 13508, 1635, 357, 12215, 13508, 532, 352, 8, 1635, 357, 44, 532, 362, 8, 1343, 2255, 2436, 444, 1635, 357, 44, 532, 352, 8, 198, 437, 198, 31, 45145, 2163, 997, 62, 2364, 10989, 1840, 874, 7, 2763, 3712, 16066, 23024, 29252, 16, 35, 11, 751, 3712, 37, 7780, 72, 10652, 17, 34, 90, 45, 16, 11, 45, 17, 30072, 810, 1391, 45, 16, 11, 45, 17, 92, 198, 220, 220, 220, 337, 796, 997, 62, 76, 4147, 7, 2763, 8, 198, 220, 220, 220, 1441, 399, 16, 1635, 399, 17, 1635, 357, 44, 532, 352, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 12858, 62, 39437, 62, 10989, 27923, 7, 39, 11, 3975, 3712, 47658, 798, 19076, 13912, 8, 198, 198, 7293, 1133, 40039, 10375, 2568, 3381, 13, 198, 198, 2, 17934, 198, 198, 15506, 63, 73, 335, 38441, 395, 198, 73, 43640, 29, 257, 796, 347, 577, 10652, 90, 21, 11, 20, 92, 19510, 16, 11, 17, 11, 18, 11, 15, 11, 15, 4008, 198, 33, 577, 10652, 90, 21, 11, 20, 92, 19510, 16, 11, 362, 11, 513, 11, 657, 11, 657, 4008, 198, 198, 73, 43640, 29, 367, 796, 34342, 29252, 16, 35, 7, 64, 1776, 198, 198, 73, 43640, 29, 11582, 1547, 13, 32542, 298, 388, 62, 39437, 62, 10989, 27923, 7, 39, 11, 15227, 798, 19076, 13912, 7, 64, 4008, 198, 20, 13, 17, 198, 15506, 63, 198, 37811, 198, 31, 45145, 2163, 12858, 62, 39437, 62, 10989, 27923, 7, 198, 220, 220, 220, 289, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 44, 11, 27, 25, 33, 577, 10652, 5512, 3975, 198, 8, 810, 1391, 44, 92, 198, 220, 220, 220, 1441, 289, 13, 84, 1220, 362, 44, 1635, 12858, 62, 39437, 62, 10989, 27923, 7, 8899, 8, 198, 437, 198, 31, 45145, 2163, 12858, 62, 39437, 62, 10989, 27923, 7, 198, 220, 220, 220, 289, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 44, 11, 27, 25, 37, 7780, 72, 10652, 17, 34, 5512, 3975, 62, 64, 11, 3975, 62, 65, 198, 8, 810, 1391, 44, 92, 198, 220, 220, 220, 1441, 289, 13, 84, 1220, 362, 44, 1635, 12858, 62, 39437, 62, 10989, 27923, 7, 8899, 62, 64, 11, 3975, 62, 65, 8, 198, 437, 198, 198, 31, 45145, 2163, 40039, 62, 30854, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 751, 3712, 33, 577, 10652, 8, 198, 220, 220, 220, 3975, 796, 15227, 798, 19076, 13912, 7, 2860, 8, 198, 220, 220, 220, 1441, 16605, 7, 71, 13, 5209, 11, 3975, 8, 1343, 12858, 62, 39437, 62, 10989, 27923, 7, 71, 11, 3975, 8, 198, 437, 198, 31, 45145, 2163, 40039, 62, 30854, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 751, 3712, 37, 7780, 72, 10652, 17, 34, 8, 198, 220, 220, 220, 3975, 62, 64, 796, 15227, 798, 19076, 13912, 7, 2860, 13, 5589, 3906, 58, 16, 12962, 198, 220, 220, 220, 3975, 62, 65, 796, 15227, 798, 19076, 13912, 7, 2860, 13, 5589, 3906, 58, 17, 12962, 198, 220, 220, 220, 1441, 16605, 7, 71, 13, 5209, 11, 3975, 62, 64, 8, 1343, 16605, 7, 71, 13, 5209, 11, 3975, 62, 65, 8, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 12858, 62, 39437, 62, 10989, 27923, 7, 71, 11, 3975, 62, 64, 11, 3975, 62, 65, 8, 198, 437, 198, 198, 31, 45145, 2163, 651, 62, 2364, 10989, 27923, 7, 198, 220, 220, 220, 8891, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 44, 11, 32, 5512, 751, 3712, 32, 11, 7147, 11, 3975, 28, 47658, 798, 19076, 13912, 7, 2860, 8, 198, 8, 810, 1391, 44, 11, 32, 27, 25, 33, 577, 10652, 92, 198, 220, 220, 220, 751, 11, 319, 11167, 796, 12858, 62, 39437, 62, 41194, 3780, 7, 2860, 11, 7147, 11, 3975, 8, 198, 220, 220, 220, 1441, 751, 11, 8891, 13, 84, 29006, 17, 9, 44, 27493, 261, 11167, 198, 437, 198, 31, 45145, 2163, 651, 62, 2364, 10989, 27923, 7, 198, 220, 220, 220, 8891, 3712, 16066, 23024, 29252, 16, 35, 90, 27, 25, 7149, 11, 44, 11, 32, 5512, 751, 3712, 32, 11, 7147, 11, 198, 220, 220, 220, 3975, 62, 64, 28, 47658, 798, 19076, 13912, 7, 2860, 13, 5589, 3906, 58, 16, 46570, 3975, 62, 65, 28, 47658, 798, 19076, 13912, 7, 2860, 13, 5589, 3906, 58, 17, 12962, 198, 8, 810, 1391, 44, 11, 32, 27, 25, 37, 7780, 72, 10652, 17, 34, 92, 198, 220, 220, 220, 751, 62, 64, 11, 751, 62, 65, 796, 751, 13, 5589, 3906, 198, 220, 220, 220, 649, 62, 2860, 62, 64, 11, 649, 62, 2860, 62, 65, 11, 319, 11167, 796, 12858, 62, 39437, 62, 41194, 3780, 7, 198, 220, 220, 220, 220, 220, 220, 220, 751, 62, 64, 11, 751, 62, 65, 11, 7147, 11, 3975, 62, 64, 11, 3975, 62, 65, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 49355, 10652, 7, 3605, 62, 2860, 62, 64, 11, 649, 62, 2860, 62, 65, 828, 8891, 13, 84, 14, 44, 1635, 319, 11167, 198, 437, 198, 198, 21017, 198, 21017, 572, 10989, 1840, 874, 198, 21017, 198, 37811, 198, 220, 220, 220, 3242, 10989, 1840, 874, 33, 577, 29252, 16, 35, 198, 198, 13409, 1143, 685, 63, 23839, 9362, 10989, 1840, 874, 63, 16151, 31, 5420, 8, 326, 7622, 2610, 286, 1702, 306, 290, 3385, 306, 12030, 198, 49315, 287, 1459, 2209, 13, 198, 37811, 198, 7249, 3242, 10989, 1840, 874, 33, 577, 29252, 16, 35, 90, 198, 220, 220, 220, 317, 27, 25, 33, 577, 10652, 11, 51, 11, 39, 27, 25, 23839, 45405, 666, 90, 51, 5512, 46, 27, 25, 47658, 798, 19076, 13912, 198, 92, 1279, 25, 27741, 9362, 10989, 1840, 874, 90, 32, 11, 51, 92, 198, 220, 220, 220, 8891, 9044, 666, 3712, 39, 198, 220, 220, 220, 2209, 3712, 32, 198, 220, 220, 220, 4129, 3712, 5317, 198, 220, 220, 220, 3975, 3712, 46, 198, 437, 198, 198, 8818, 572, 10989, 1840, 874, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 257, 3712, 33, 577, 10652, 8, 198, 220, 220, 220, 3975, 796, 15227, 798, 19076, 13912, 7, 64, 8, 198, 220, 220, 220, 1702, 13508, 796, 4129, 7, 8899, 8, 198, 220, 220, 220, 2255, 2436, 444, 796, 954, 7, 72, 4613, 1312, 13, 13966, 22510, 26870, 362, 11, 3975, 8, 198, 220, 220, 220, 997, 796, 997, 62, 2364, 10989, 1840, 874, 7, 71, 11, 257, 11, 1702, 13508, 11, 2255, 2436, 444, 8, 198, 220, 220, 220, 1441, 3242, 10989, 1840, 874, 33, 577, 29252, 16, 35, 7, 71, 11, 257, 11, 997, 11, 3975, 8, 198, 437, 198, 198, 8818, 7308, 13, 1136, 9630, 7, 82, 3712, 9362, 10989, 1840, 874, 33, 577, 29252, 16, 35, 90, 32, 11, 51, 5512, 1312, 2599, 25, 51, 29291, 90, 32, 11, 51, 92, 810, 1391, 32, 11, 51, 92, 198, 220, 220, 220, 2488, 7784, 15952, 694, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 352, 41305, 1312, 41305, 264, 13, 13664, 8614, 3714, 7, 33, 3733, 12331, 7, 82, 11, 1312, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 649, 62, 21975, 11, 17593, 62, 30854, 796, 651, 62, 2364, 10989, 27923, 7, 82, 13, 2763, 9044, 666, 11, 264, 13, 21975, 11, 1312, 11, 264, 13, 8899, 8, 198, 220, 220, 220, 1441, 357, 3605, 62, 21975, 11, 17593, 62, 30854, 8, 198, 437, 198, 198, 14881, 13, 7857, 7, 82, 3712, 9362, 10989, 1840, 874, 33, 577, 29252, 16, 35, 8, 796, 357, 82, 13, 13664, 35751, 198, 198, 7249, 3242, 10989, 1840, 874, 37, 7780, 72, 29252, 16, 35, 17, 34, 90, 198, 220, 220, 220, 376, 27, 25, 37, 7780, 72, 10652, 17, 34, 11, 51, 11, 39, 27, 25, 23839, 45405, 666, 90, 51, 5512, 46, 16, 11, 46, 17, 198, 92, 1279, 25, 27741, 9362, 10989, 1840, 874, 90, 37, 11, 51, 92, 198, 220, 220, 220, 8891, 9044, 666, 3712, 39, 198, 220, 220, 220, 2209, 3712, 37, 198, 220, 220, 220, 4129, 3712, 5317, 198, 220, 220, 220, 3975, 62, 64, 3712, 46, 16, 198, 220, 220, 220, 3975, 62, 65, 3712, 46, 17, 198, 437, 198, 198, 8818, 572, 10989, 1840, 874, 7, 71, 3712, 16066, 23024, 29252, 16, 35, 11, 277, 3712, 37, 7780, 72, 10652, 17, 34, 8, 198, 220, 220, 220, 552, 62, 64, 11, 552, 62, 65, 796, 277, 13, 5589, 3906, 198, 220, 220, 220, 3975, 62, 64, 796, 15227, 798, 19076, 13912, 7, 5589, 62, 64, 8, 198, 220, 220, 220, 3975, 62, 65, 796, 15227, 798, 19076, 13912, 7, 5589, 62, 65, 8, 198, 220, 220, 220, 997, 796, 997, 62, 2364, 10989, 1840, 874, 7, 71, 11, 277, 8, 198, 220, 220, 220, 1441, 3242, 10989, 1840, 874, 37, 7780, 72, 29252, 16, 35, 17, 34, 7, 71, 11, 277, 11, 997, 11, 3975, 62, 64, 11, 3975, 62, 65, 8, 198, 437, 198, 198, 14881, 13, 7857, 7, 82, 3712, 9362, 10989, 1840, 874, 37, 7780, 72, 29252, 16, 35, 17, 34, 8, 796, 357, 82, 13, 13664, 35751, 198, 198, 8818, 7308, 13, 1136, 9630, 7, 82, 3712, 9362, 10989, 1840, 874, 37, 7780, 72, 29252, 16, 35, 17, 34, 90, 32, 11, 51, 5512, 1312, 2599, 25, 51, 29291, 90, 32, 11, 51, 92, 810, 1391, 32, 11, 51, 92, 198, 220, 220, 220, 2488, 7784, 15952, 694, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 41305, 1312, 41305, 264, 13, 13664, 8614, 3714, 7, 33, 3733, 12331, 7, 82, 11, 1312, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 649, 62, 21975, 11, 17593, 62, 30854, 796, 651, 62, 2364, 10989, 27923, 7, 198, 220, 220, 220, 220, 220, 220, 220, 264, 13, 2763, 9044, 666, 11, 264, 13, 21975, 11, 1312, 11, 264, 13, 8899, 62, 64, 11, 264, 13, 8899, 62, 65, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 357, 3605, 62, 21975, 11, 17593, 62, 30854, 8, 198, 437, 198, 198, 21017, 198, 21017, 12858, 198, 21017, 198, 7249, 29278, 388, 29252, 16, 35, 90, 51, 11, 39, 27, 25, 23839, 45405, 666, 90, 51, 11709, 1279, 25, 27741, 45405, 666, 90, 51, 92, 198, 220, 220, 220, 8891, 3712, 39, 198, 437, 198, 21982, 1273, 5620, 7, 3712, 6030, 90, 29252, 298, 388, 29252, 16, 35, 90, 39, 11, 51, 11709, 8, 810, 1391, 39, 11, 51, 1279, 25, 6416, 92, 796, 1148, 9360, 2781, 666, 3419, 198, 22510, 62, 2364, 10989, 1840, 874, 7, 2763, 3712, 29252, 298, 388, 29252, 16, 35, 11, 751, 8, 796, 657, 198, 10989, 27923, 62, 30854, 7, 32542, 3712, 29252, 298, 388, 29252, 16, 35, 11, 751, 8, 796, 953, 16, 7, 261, 81, 7, 2860, 8, 158, 233, 227, 591, 7, 32542, 13, 2763, 8, 1343, 18074, 222, 11, 362, 46582, 8, 532, 18074, 222, 1303, 5591, 656, 13841, 46582, 11, 18074, 222, 60, 198, 198, 32542, 298, 388, 7, 2763, 3712, 16066, 23024, 29252, 16, 35, 8, 796, 29278, 388, 29252, 16, 35, 7, 2763, 8, 198 ]
2.239726
3,504
module AtomicLevels using UnicodeFun using Formatting using Parameters using BlockBandedMatrices using WignerSymbols using HalfIntegers using Combinatorics include("common.jl") include("unicode.jl") include("parity.jl") include("orbitals.jl") include("relativistic_orbitals.jl") include("spin_orbitals.jl") include("configurations.jl") include("excited_configurations.jl") include("terms.jl") include("allchoices.jl") include("jj_terms.jl") include("intermediate_terms.jl") include("couple_terms.jl") include("csfs.jl") include("jj2lsj.jl") include("levels.jl") module Utils include("utils/print_states.jl") end # Deprecations @deprecate jj2lsj(args...) jj2ℓsj(args...) end # module
[ 21412, 28976, 4971, 82, 198, 198, 3500, 34371, 24629, 198, 3500, 18980, 889, 198, 3500, 40117, 198, 3500, 9726, 33, 12249, 19044, 45977, 198, 3500, 370, 570, 263, 13940, 2022, 10220, 198, 3500, 13139, 34500, 364, 198, 3500, 955, 8800, 1352, 873, 198, 198, 17256, 7203, 11321, 13, 20362, 4943, 198, 17256, 7203, 46903, 1098, 13, 20362, 4943, 198, 17256, 7203, 1845, 414, 13, 20362, 4943, 198, 17256, 7203, 42594, 874, 13, 20362, 4943, 198, 17256, 7203, 2411, 265, 452, 2569, 62, 42594, 874, 13, 20362, 4943, 198, 17256, 7203, 39706, 62, 42594, 874, 13, 20362, 4943, 198, 17256, 7203, 11250, 20074, 13, 20362, 4943, 198, 17256, 7203, 41194, 863, 62, 11250, 20074, 13, 20362, 4943, 198, 17256, 7203, 38707, 13, 20362, 4943, 198, 17256, 7203, 439, 6679, 1063, 13, 20362, 4943, 198, 17256, 7203, 41098, 62, 38707, 13, 20362, 4943, 198, 17256, 7203, 3849, 13857, 62, 38707, 13, 20362, 4943, 198, 17256, 7203, 66, 43846, 62, 38707, 13, 20362, 4943, 198, 17256, 7203, 6359, 9501, 13, 20362, 4943, 198, 17256, 7203, 41098, 17, 7278, 73, 13, 20362, 4943, 198, 17256, 7203, 46170, 13, 20362, 4943, 198, 198, 21412, 7273, 4487, 198, 17256, 7203, 26791, 14, 4798, 62, 27219, 13, 20362, 4943, 198, 437, 198, 198, 2, 2129, 8344, 602, 198, 31, 10378, 8344, 378, 474, 73, 17, 7278, 73, 7, 22046, 23029, 474, 73, 17, 158, 226, 241, 82, 73, 7, 22046, 23029, 198, 198, 437, 1303, 8265, 198 ]
2.866667
240
module ARCSolver export main, simple using Reexport include("grids.jl") @reexport using .Grids include("render.jl") @reexport using .Render include("solve.jl") @reexport using .Solve include("diff.jl") @reexport using .Diff using Images, ImageView function main() tasks = load_tasks() # warmstart print("warmstarting...") to_img(diff_grids(tasks[14].ios[1]...)) println("done") diffgrids = Vector{ARCDiffGrid}(undef, length(tasks)) @time for i in 1:length(tasks) println(i) diffgrids[i] = diff_grids(tasks[i].ios[1]...) end @time for (i,(grid,task)) in enumerate(zip(diffgrids,tasks)) println(i) Images.save("out/diffs/$(splitpath(task.path)[end]).png",to_img(grid)) end println(sizeof(diffgrids)) println(sizeof(tasks)) end function simple() task = load_tasks(n=20)[14] dg = diff_grids(task.ios[1]...) to_img(dg) end end
[ 21412, 5923, 7902, 14375, 198, 198, 39344, 1388, 11, 2829, 198, 198, 3500, 797, 39344, 198, 17256, 7203, 2164, 2340, 13, 20362, 4943, 198, 31, 631, 87, 634, 1262, 764, 8642, 2340, 198, 198, 17256, 7203, 13287, 13, 20362, 4943, 198, 31, 631, 87, 634, 1262, 764, 45819, 198, 198, 17256, 7203, 82, 6442, 13, 20362, 4943, 198, 31, 631, 87, 634, 1262, 764, 50, 6442, 198, 198, 17256, 7203, 26069, 13, 20362, 4943, 198, 31, 631, 87, 634, 1262, 764, 28813, 198, 198, 3500, 5382, 11, 7412, 7680, 198, 198, 8818, 1388, 3419, 198, 220, 220, 220, 8861, 796, 3440, 62, 83, 6791, 3419, 628, 220, 220, 220, 1303, 5814, 9688, 198, 220, 220, 220, 3601, 7203, 31975, 38690, 9313, 8, 198, 220, 220, 220, 284, 62, 9600, 7, 26069, 62, 2164, 2340, 7, 83, 6791, 58, 1415, 4083, 4267, 58, 16, 60, 986, 4008, 198, 220, 220, 220, 44872, 7203, 28060, 4943, 628, 220, 220, 220, 814, 2164, 2340, 796, 20650, 90, 1503, 8610, 733, 41339, 92, 7, 917, 891, 11, 4129, 7, 83, 6791, 4008, 198, 220, 220, 220, 2488, 2435, 329, 1312, 287, 352, 25, 13664, 7, 83, 6791, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 814, 2164, 2340, 58, 72, 60, 796, 814, 62, 2164, 2340, 7, 83, 6791, 58, 72, 4083, 4267, 58, 16, 60, 23029, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 2435, 329, 357, 72, 11, 7, 25928, 11, 35943, 4008, 287, 27056, 378, 7, 13344, 7, 26069, 2164, 2340, 11, 83, 6791, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5382, 13, 21928, 7203, 448, 14, 67, 10203, 32624, 7, 35312, 6978, 7, 35943, 13, 6978, 38381, 437, 35944, 11134, 1600, 1462, 62, 9600, 7, 25928, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7, 7857, 1659, 7, 26069, 2164, 2340, 4008, 198, 220, 220, 220, 44872, 7, 7857, 1659, 7, 83, 6791, 4008, 198, 437, 198, 198, 8818, 2829, 3419, 198, 220, 220, 220, 4876, 796, 3440, 62, 83, 6791, 7, 77, 28, 1238, 38381, 1415, 60, 198, 220, 220, 220, 288, 70, 796, 814, 62, 2164, 2340, 7, 35943, 13, 4267, 58, 16, 60, 23029, 198, 220, 220, 220, 284, 62, 9600, 7, 67, 70, 8, 198, 437, 198, 198, 437, 198 ]
2.280788
406
int_rules_9_2 = @theory begin #= ::Subsection::Closed:: =# #= 9.2*Derivative*integration*rules =# @apply_utils Antiderivative(((Derivative(~n))(~f))(~x), ~x) => ((Derivative(~n - 1))(~f))(~x) <-- FreeQ([~f, ~n], ~x) @apply_utils Antiderivative((~(c') * (~F) ^ (~(a') + ~(b') * ~x)) ^ ~(p') * ((Derivative(~n))(~f))(~x), ~x) => (~c * (~F) ^ (~a + ~b * ~x)) ^ ~p * ((Derivative(~n - 1))(~f))(~x) - ~b * ~p * log(~F) * Antiderivative((~c * (~F) ^ (~a + ~b * ~x)) ^ ~p * ((Derivative(~n - 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~c, ~f, ~F, ~p], ~x) && IGtQ(~n, 0) @apply_utils Antiderivative((~(c') * (~F) ^ (~(a') + ~(b') * ~x)) ^ ~(p') * ((Derivative(~n))(~f))(~x), ~x) => ((~c * (~F) ^ (~a + ~b * ~x)) ^ ~p * ((Derivative(~n))(~f))(~x)) / (~b * ~p * log(~F)) - (1 / (~b * ~p * log(~F))) * Antiderivative((~c * (~F) ^ (~a + ~b * ~x)) ^ ~p * ((Derivative(~n + 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~c, ~f, ~F, ~p], ~x) && ILtQ(~n, 0) @apply_utils Antiderivative(sin(~(a') + ~(b') * ~x) * ((Derivative(~n))(~f))(~x), ~x) => sin(~a + ~b * ~x) * ((Derivative(~n - 1))(~f))(~x) - ~b * Antiderivative(cos(~a + ~b * ~x) * ((Derivative(~n - 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~f], ~x) && IGtQ(~n, 0) @apply_utils Antiderivative(cos(~(a') + ~(b') * ~x) * ((Derivative(~n))(~f))(~x), ~x) => cos(~a + ~b * ~x) * ((Derivative(~n - 1))(~f))(~x) + ~b * Antiderivative(sin(~a + ~b * ~x) * ((Derivative(~n - 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~f], ~x) && IGtQ(~n, 0) @apply_utils Antiderivative(sin(~(a') + ~(b') * ~x) * ((Derivative(~n))(~f))(~x), ~x) => (-(cos(~a + ~b * ~x)) * ((Derivative(~n))(~f))(~x)) / ~b + (1 / ~b) * Antiderivative(cos(~a + ~b * ~x) * ((Derivative(~n + 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~f], ~x) && ILtQ(~n, 0) @apply_utils Antiderivative(cos(~(a') + ~(b') * ~x) * ((Derivative(~n))(~f))(~x), ~x) => (sin(~a + ~b * ~x) * ((Derivative(~n))(~f))(~x)) / ~b - (1 / ~b) * Antiderivative(sin(~a + ~b * ~x) * ((Derivative(~n + 1))(~f))(~x), ~x) <-- FreeQ([~a, ~b, ~f], ~x) && ILtQ(~n, 0) @apply_utils Antiderivative(~u * ((Derivative(~n))(~f))(~x), ~x) => Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~n - 1))(~f))(~x), ~u, ~x), ~x), ~x), ~x, ((Derivative(~n - 1))(~f))(~x)) <-- FreeQ([~f, ~n], ~x) && FunctionOfQ(((Derivative(~n - 1))(~f))(~x), ~u, ~x) @apply_utils Antiderivative(~u * (~(a') * ((Derivative(1))(~f))(~x) * (~g)(~x) + ~(a') * (~f)(~x) * ((Derivative(1))(~g))(~x)), ~x) => ~a * Subst(Antiderivative(SimplifyIntegrand(SubstFor((~f)(~x) * (~g)(~x), ~u, ~x), ~x), ~x), ~x, (~f)(~x) * (~g)(~x)) <-- FreeQ([~a, ~f, ~g], ~x) && FunctionOfQ((~f)(~x) * (~g)(~x), ~u, ~x) @apply_utils Antiderivative(~u * (~(a') * ((Derivative(~m))(~f))(~x) * (~g)(~x) + ~(a') * ((Derivative(~m1))(~f))(~x) * ((Derivative(1))(~g))(~x)), ~x) => ~a * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) * (~g)(~x), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) * (~g)(~x)) <-- FreeQ([~a, ~f, ~g, ~m], ~x) && (EqQ(~m1, ~m - 1) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) * (~g)(~x), ~u, ~x)) @apply_utils Antiderivative(~u * (~(a') * ((Derivative(~m))(~f))(~x) * ((Derivative(~n1))(~g))(~x) + ~(a') * ((Derivative(~m1))(~f))(~x) * ((Derivative(~n))(~g))(~x)), ~x) => ~a * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) * ((Derivative(~n - 1))(~g))(~x), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) * ((Derivative(~n - 1))(~g))(~x)) <-- FreeQ([~a, ~f, ~g, ~m, ~n], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~n1, ~n - 1) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) * ((Derivative(~n - 1))(~g))(~x), ~u, ~x))) @apply_utils Antiderivative(~u * (~f)(~x) ^ ~(p') * (~(a') * ((Derivative(1))(~f))(~x) * (~g)(~x) + ~(b') * (~f)(~x) * ((Derivative(1))(~g))(~x)), ~x) => ~b * Subst(Antiderivative(SimplifyIntegrand(SubstFor((~f)(~x) ^ (~p + 1) * (~g)(~x), ~u, ~x), ~x), ~x), ~x, (~f)(~x) ^ (~p + 1) * (~g)(~x)) <-- FreeQ([~a, ~b, ~f, ~g, ~p], ~x) && (EqQ(~a, ~b * (~p + 1)) && FunctionOfQ((~f)(~x) ^ (~p + 1) * (~g)(~x), ~u, ~x)) @apply_utils Antiderivative(~u * ((Derivative(~m1))(~f))(~x) ^ ~(p') * (~(a') * ((Derivative(~m))(~f))(~x) * (~g)(~x) + ~(b') * ((Derivative(~m1))(~f))(~x) * ((Derivative(1))(~g))(~x)), ~x) => ~b * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x)) <-- FreeQ([~a, ~b, ~f, ~g, ~m, ~p], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~a, ~b * (~p + 1)) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x), ~u, ~x))) @apply_utils Antiderivative(~u * (~g)(~x) ^ ~(q') * (~(a') * ((Derivative(~m))(~f))(~x) * (~g)(~x) + ~(b') * ((Derivative(~m1))(~f))(~x) * ((Derivative(1))(~g))(~x)), ~x) => ~a * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) * (~g)(~x) ^ (~q + 1), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) * (~g)(~x) ^ (~q + 1)) <-- FreeQ([~a, ~b, ~f, ~g, ~m, ~q], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~a * (~q + 1), ~b) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) * (~g)(~x) ^ (~q + 1), ~u, ~x))) @apply_utils Antiderivative(~u * ((Derivative(~m1))(~f))(~x) ^ ~(p') * (~(a') * ((Derivative(~m))(~f))(~x) * ((Derivative(~n1))(~g))(~x) + ~(b') * ((Derivative(~m1))(~f))(~x) * ((Derivative(~n))(~g))(~x)), ~x) => ~b * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x)) <-- FreeQ([~a, ~b, ~f, ~g, ~m, ~n, ~p], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~n1, ~n - 1) && (EqQ(~a, ~b * (~p + 1)) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x), ~u, ~x)))) @apply_utils Antiderivative(~u * (~f)(~x) ^ ~(p') * (~g)(~x) ^ ~(q') * (~(a') * ((Derivative(1))(~f))(~x) * (~g)(~x) + ~(b') * (~f)(~x) * ((Derivative(1))(~g))(~x)), ~x) => (~a / (~p + 1)) * Subst(Antiderivative(SimplifyIntegrand(SubstFor((~f)(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1), ~u, ~x), ~x), ~x), ~x, (~f)(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1)) <-- FreeQ([~a, ~b, ~f, ~g, ~p, ~q], ~x) && (EqQ(~a * (~q + 1), ~b * (~p + 1)) && FunctionOfQ((~f)(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1), ~u, ~x)) @apply_utils Antiderivative(~u * ((Derivative(~m1))(~f))(~x) ^ ~(p') * (~g)(~x) ^ ~(q') * (~(a') * ((Derivative(~m))(~f))(~x) * (~g)(~x) + ~(b') * ((Derivative(~m1))(~f))(~x) * ((Derivative(1))(~g))(~x)), ~x) => (~a / (~p + 1)) * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1)) <-- FreeQ([~a, ~b, ~f, ~g, ~m, ~p, ~q], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~a * (~q + 1), ~b * (~p + 1)) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * (~g)(~x) ^ (~q + 1), ~u, ~x))) @apply_utils Antiderivative(~u * ((Derivative(~m1))(~f))(~x) ^ ~(p') * ((Derivative(~n1))(~g))(~x) ^ ~(q') * (~(a') * ((Derivative(~m))(~f))(~x) * ((Derivative(~n1))(~g))(~x) + ~(b') * ((Derivative(~m1))(~f))(~x) * ((Derivative(~n))(~g))(~x)), ~x) => (~a / (~p + 1)) * Subst(Antiderivative(SimplifyIntegrand(SubstFor(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x) ^ (~q + 1), ~u, ~x), ~x), ~x), ~x, ((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x) ^ (~q + 1)) <-- FreeQ([~a, ~b, ~f, ~g, ~m, ~n, ~p, ~q], ~x) && (EqQ(~m1, ~m - 1) && (EqQ(~n1, ~n - 1) && (EqQ(~a * (~q + 1), ~b * (~p + 1)) && FunctionOfQ(((Derivative(~m - 1))(~f))(~x) ^ (~p + 1) * ((Derivative(~n - 1))(~g))(~x) ^ (~q + 1), ~u, ~x)))) @apply_utils Antiderivative(((~f)')(~x) * (~g)(~x) + (~f)(~x) * ((~g)')(~x), ~x) => (~f)(~x) * (~g)(~x) <-- FreeQ([~f, ~g], ~x) @apply_utils Antiderivative((((~f)')(~x) * (~g)(~x) - (~f)(~x) * ((~g)')(~x)) / (~g)(~x) ^ 2, ~x) => (~f)(~x) / (~g)(~x) <-- FreeQ([~f, ~g], ~x) @apply_utils Antiderivative((((~f)')(~x) * (~g)(~x) - (~f)(~x) * ((~g)')(~x)) / ((~f)(~x) * (~g)(~x)), ~x) => log((~f)(~x) / (~g)(~x)) <-- FreeQ([~f, ~g], ~x) end
[ 600, 62, 38785, 62, 24, 62, 17, 796, 2488, 1169, 652, 2221, 628, 220, 220, 220, 1303, 28, 7904, 7004, 5458, 3712, 2601, 1335, 3712, 796, 2, 198, 220, 220, 220, 1303, 28, 860, 13, 17, 9, 28532, 452, 876, 9, 18908, 1358, 9, 38785, 796, 2, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 7, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1279, 438, 3232, 48, 26933, 93, 69, 11, 5299, 77, 4357, 5299, 87, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 93, 7, 66, 11537, 1635, 31034, 37, 8, 10563, 31034, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 4008, 10563, 5299, 7, 79, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 31034, 66, 1635, 31034, 37, 8, 10563, 31034, 64, 1343, 5299, 65, 1635, 5299, 87, 4008, 10563, 5299, 79, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 532, 5299, 65, 1635, 5299, 79, 1635, 2604, 7, 93, 37, 8, 1635, 3738, 1304, 452, 876, 19510, 93, 66, 1635, 31034, 37, 8, 10563, 31034, 64, 1343, 5299, 65, 1635, 5299, 87, 4008, 10563, 5299, 79, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 66, 11, 5299, 69, 11, 5299, 37, 11, 5299, 79, 4357, 5299, 87, 8, 11405, 35336, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 93, 7, 66, 11537, 1635, 31034, 37, 8, 10563, 31034, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 4008, 10563, 5299, 7, 79, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 14808, 93, 66, 1635, 31034, 37, 8, 10563, 31034, 64, 1343, 5299, 65, 1635, 5299, 87, 4008, 10563, 5299, 79, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 4008, 1220, 31034, 65, 1635, 5299, 79, 1635, 2604, 7, 93, 37, 4008, 532, 357, 16, 1220, 31034, 65, 1635, 5299, 79, 1635, 2604, 7, 93, 37, 22305, 1635, 3738, 1304, 452, 876, 19510, 93, 66, 1635, 31034, 37, 8, 10563, 31034, 64, 1343, 5299, 65, 1635, 5299, 87, 4008, 10563, 5299, 79, 1635, 14808, 28532, 452, 876, 7, 93, 77, 1343, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 66, 11, 5299, 69, 11, 5299, 37, 11, 5299, 79, 4357, 5299, 87, 8, 11405, 14639, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 31369, 7, 93, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 7813, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 532, 5299, 65, 1635, 3738, 1304, 452, 876, 7, 6966, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 4357, 5299, 87, 8, 11405, 35336, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 6966, 7, 93, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 8615, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1343, 5299, 65, 1635, 3738, 1304, 452, 876, 7, 31369, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 4357, 5299, 87, 8, 11405, 35336, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 31369, 7, 93, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 13841, 7, 6966, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 4008, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 4008, 1220, 5299, 65, 1343, 357, 16, 1220, 5299, 65, 8, 1635, 3738, 1304, 452, 876, 7, 6966, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 1343, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 4357, 5299, 87, 8, 11405, 14639, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 6966, 7, 93, 7, 64, 11537, 1343, 5299, 7, 65, 11537, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 357, 31369, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 4008, 1220, 5299, 65, 532, 357, 16, 1220, 5299, 65, 8, 1635, 3738, 1304, 452, 876, 7, 31369, 7, 93, 64, 1343, 5299, 65, 1635, 5299, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 1343, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 4357, 5299, 87, 8, 11405, 14639, 83, 48, 7, 93, 77, 11, 657, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 87, 8, 5218, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 69, 11, 5299, 77, 4357, 5299, 87, 8, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 64, 11537, 1635, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 64, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 93, 69, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 31034, 69, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 69, 11, 5299, 70, 4357, 5299, 87, 8, 11405, 15553, 5189, 48, 19510, 93, 69, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 64, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 4008, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 1343, 5299, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 64, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 77, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 77, 16, 11, 5299, 77, 532, 352, 8, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 22305, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 69, 5769, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 65, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 93, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 31034, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 79, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 11, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 93, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 4008, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 65, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 79, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 11, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 828, 5299, 84, 11, 5299, 87, 22305, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 5299, 7, 80, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 64, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 80, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 1635, 31034, 80, 1343, 352, 828, 5299, 65, 8, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 22305, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 5299, 65, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 77, 11, 5299, 79, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 77, 16, 11, 5299, 77, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 11, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 828, 5299, 84, 11, 5299, 87, 35514, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 31034, 69, 5769, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 5299, 7, 80, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 31034, 64, 1220, 31034, 79, 1343, 352, 4008, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 93, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 31034, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 79, 11, 5299, 80, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 1635, 31034, 80, 1343, 352, 828, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 93, 69, 5769, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 4008, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 5299, 7, 80, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 31034, 64, 1220, 31034, 79, 1343, 352, 4008, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 79, 11, 5299, 80, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 1635, 31034, 80, 1343, 352, 828, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 31034, 70, 5769, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 22305, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 7, 93, 84, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 5299, 7, 79, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 77, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 10563, 5299, 7, 80, 11537, 1635, 31034, 7, 64, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 16, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 1343, 5299, 7, 65, 11537, 1635, 14808, 28532, 452, 876, 7, 93, 76, 16, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 4008, 7, 93, 70, 4008, 7, 93, 87, 36911, 5299, 87, 8, 5218, 31034, 64, 1220, 31034, 79, 1343, 352, 4008, 1635, 24944, 7, 13217, 1304, 452, 876, 7, 8890, 489, 1958, 34500, 25192, 7, 7004, 301, 1890, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 828, 5299, 87, 828, 5299, 87, 828, 5299, 87, 11, 14808, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 10563, 31034, 80, 1343, 352, 4008, 1279, 438, 3232, 48, 26933, 93, 64, 11, 5299, 65, 11, 5299, 69, 11, 5299, 70, 11, 5299, 76, 11, 5299, 77, 11, 5299, 79, 11, 5299, 80, 4357, 5299, 87, 8, 11405, 357, 36, 80, 48, 7, 93, 76, 16, 11, 5299, 76, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 77, 16, 11, 5299, 77, 532, 352, 8, 11405, 357, 36, 80, 48, 7, 93, 64, 1635, 31034, 80, 1343, 352, 828, 5299, 65, 1635, 31034, 79, 1343, 352, 4008, 11405, 15553, 5189, 48, 19510, 7, 28532, 452, 876, 7, 93, 76, 532, 352, 4008, 7, 93, 69, 4008, 7, 93, 87, 8, 10563, 31034, 79, 1343, 352, 8, 1635, 14808, 28532, 452, 876, 7, 93, 77, 532, 352, 4008, 7, 93, 70, 4008, 7, 93, 87, 8, 10563, 31034, 80, 1343, 352, 828, 5299, 84, 11, 5299, 87, 35514, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 7, 93, 69, 33047, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1343, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 93, 70, 33047, 5769, 93, 87, 828, 5299, 87, 8, 5218, 31034, 69, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 1279, 438, 3232, 48, 26933, 93, 69, 11, 5299, 70, 4357, 5299, 87, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 19510, 93, 69, 33047, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 532, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 93, 70, 33047, 5769, 93, 87, 4008, 1220, 31034, 70, 5769, 93, 87, 8, 10563, 362, 11, 5299, 87, 8, 5218, 31034, 69, 5769, 93, 87, 8, 1220, 31034, 70, 5769, 93, 87, 8, 1279, 438, 3232, 48, 26933, 93, 69, 11, 5299, 70, 4357, 5299, 87, 8, 198, 220, 220, 220, 2488, 39014, 62, 26791, 3738, 1304, 452, 876, 19510, 19510, 93, 69, 33047, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 8, 532, 31034, 69, 5769, 93, 87, 8, 1635, 14808, 93, 70, 33047, 5769, 93, 87, 4008, 1220, 14808, 93, 69, 5769, 93, 87, 8, 1635, 31034, 70, 5769, 93, 87, 36911, 5299, 87, 8, 5218, 2604, 19510, 93, 69, 5769, 93, 87, 8, 1220, 31034, 70, 5769, 93, 87, 4008, 1279, 438, 3232, 48, 26933, 93, 69, 11, 5299, 70, 4357, 5299, 87, 8, 198, 437, 198 ]
1.801952
4,509
# Model include_model("hopper") mb = 3.0 # body mass ml = 0.3 # leg mass Jb = 0.75 # body inertia Jl = 0.075 # leg inertia model = Hopper{Discrete, FixedTime}(n, m, d, mb, ml, Jb, Jl, 0.25, g, qL, qU, uL, uU, nq, nu, nc, nf, nb, ns, idx_u, idx_λ, idx_b, idx_ψ, idx_η, idx_s) model_ft = free_time_model(model) # stair traj @load joinpath(@__DIR__, "hopper_stair.jld2") qm um γm bm ψm ηm μm hm # Stair function ϕ_func(model::Hopper, q) k = kinematics(model, q) if k[1] < 0.125 return @SVector [k[2] - 3 * 0.25] else return @SVector [k[2]] end end # Horizon T = 80 # Time step # tf = 0.75 h = hm #tf / (T - 1) # Bounds _uu = Inf * ones(model_ft.m) _uu[model_ft.idx_u] .= Inf#10.0#model_ft.uU _uu[end] = h#3.0 * h _ul = zeros(model_ft.m) _ul[model_ft.idx_u] .= -Inf#10.0 #model_ft.uL _ul[end] = h#0.2 * h ul, uu = control_bounds(model_ft, T, _ul, _uu) # Initial and final states z_h = 3 * 0.25 q1 = [0.0, 0.5 + z_h, 0.0, 0.5] q11 = [0.0, 0.5 + z_h + 0.125, 0.0, 0.25] qm1 = [0.125, 0.5 + z_h + 0.25, -0.5 * π, 0.25] qm2 = [0.25, 0.5 + z_h + 0.125, -1.5 * π, 0.25] qm3 = [0.375, 0.5 + z_h + 0.0625, -2.0 * π, 0.5] qT = [0.5, 0.5, -2.0 * π, 0.5] ql1 = linear_interpolation(q1, q11, 14) ql2 = linear_interpolation(q11, qm1, 15) ql3 = linear_interpolation(qm1, qm2, 15) ql4 = linear_interpolation(qm2, qm3, 15) ql5 = linear_interpolation(qm3, qT, 14) ql6 = linear_interpolation(qT, qT, 14) q_ref = [ql1..., ql2[2:end]..., ql3[2:end]..., ql4[2:end]..., ql5[2:end]..., ql6[2:end]...] θr = range(0.0, stop = -2.0 * π, length = (58 - 14)) for (i, t) = enumerate(15:58) q_ref[t][3] = θr[i] end # model_ft.qU[2] = 2.5 xl, xu = state_bounds(model_ft, T, [model_ft.qL; model_ft.qL], [model_ft.qU; model_ft.qU], x1 = [q1; q1], xT = [qT; qT]) # Objective include_objective(["velocity", "nonlinear_stage", "control_velocity"]) qp = 0.0 * [0.01; 0.01; 1.0; 1.0] obj_tracking = quadratic_time_tracking_objective( [Diagonal([qp; qp]) for t = 1:T], [Diagonal([1.0e-1, 1.0e-2, 1.0e-5 * ones(model_ft.nc)..., 1.0e-5 * ones(model_ft.nb)..., zeros(model_ft.m - model_ft.nu - model_ft.nc - model_ft.nb - 1)..., 0.0]) for t = 1:T-1], [[qT; qT] for t = 1:T], [zeros(model_ft.m) for t = 1:T], 1.0) obj_contact_penalty = PenaltyObjective(1.0e5, model_ft.m - 1) obj_velocity = velocity_objective( [(t > 20 && t < 60) ? Diagonal(1.0e-2 * [1.0; 1.0; 100.0; 100.0]) : Diagonal(1.0e-2 * [1.0; 1.0; 1.0; 1.0]) for t = 1:T-1], model_ft.nq, h = h, idx_angle = collect([3])) obj_ctrl_vel = control_velocity_objective(Diagonal([1.0e-1 * ones(model_ft.nu); 1.0e-3 * ones(model_ft.nc + model_ft.nb); zeros(model_ft.m - model_ft.nu - model_ft.nc - model_ft.nb)])) function l_stage(x, u, t) J = 0.0 _q1 = view(x, 1:4) p1 = kinematics(model, _q1) _q2 = view(x, 4 .+ (1:4)) p2 = kinematics(model, _q2) v = (p2 - p1) ./ h if t < 40 J += 1000.0 * v[1]^2.0 end if t > 60 J += 1000.0 * v[1]^2.0 end if true#t > 5 #|| (t > 20 && t < T) J += (_q1 - q_ref[t])' * Diagonal([100.0; 100.0; 1000.0; 1000.0]) * (_q1 - q_ref[t]) end return J end l_stage(x) = l_stage(x, nothing, T) obj_stage = nonlinear_stage_objective(l_stage, l_stage) obj = MultiObjective([obj_tracking, obj_contact_penalty, obj_velocity, obj_stage, obj_ctrl_vel]) # Constraints include_constraints(["free_time", "contact", "stage"]) con_free_time = free_time_constraints(T) con_contact = contact_constraints(model_ft, T) p1_ref = kinematics(model, q1) pT_ref = kinematics(model, qT) function pinned1!(c, x, u, t) q = view(x, 1:4) c[1:2] = p1_ref - kinematics(model, q) nothing end function pinnedT!(c, x, u, t) q = view(x, 4 .+ (1:4)) c[1:2] = pT_ref - kinematics(model, q) nothing end function no_foot_slip!(c, x, u, t) q = view(x, 1:4) c[1] = kinematics(model, q)[1] end n_stage = 2 t_idx1 = vcat([t for t = 1:10]...) t_idxT = vcat([(T - 10 + 1):T]...) con_pinned1 = stage_constraints(pinned1!, 2, (1:0), t_idx1) con_pinnedT = stage_constraints(pinnedT!, 2, (1:0), t_idxT) con_no_slip = stage_constraints(no_foot_slip!, 1, (1:1), collect(1:40)) con = multiple_constraints([con_free_time, con_contact, con_pinned1, con_pinnedT, con_no_slip])#, con_loop]) # Problem prob = trajectory_optimization_problem(model_ft, obj, T, xl = xl, xu = xu, ul = ul, uu = uu, con = con) # Trajectory initialization x0 = configuration_to_state(q_ref) # linear interpolation on state u0 = [[1.0e-2 * rand(model_ft.m-1); h] for t = 1:T-1] # random controls # Pack trajectories into vector z0 = pack(x0, u0, prob) #NOTE: may need to run examples multiple times to get good trajectories # Solve nominal problem @time z̄, info = solve(prob, copy(z0), nlp = :ipopt, tol = 1.0e-3, c_tol = 1.0e-3, mapl = 5, time_limit = 60) @show check_slack(z̄, prob) x̄, ū = unpack(z̄, prob) tf, t, h̄ = get_time(ū) q = state_to_configuration(x̄) u = [u[model.idx_u] for u in ū] γ = [u[model.idx_λ] for u in ū] b = [u[model.idx_b] for u in ū] ψ = [u[model.idx_ψ] for u in ū] η = [u[model.idx_η] for u in ū] h̄ = mean(h̄) # @save joinpath(pwd(), "examples/trajectories/hopper_vertical_gait.jld2") z̄ x̄ ū h̄ q u γ b include(joinpath(pwd(), "models/visualize.jl")) vis = Visualizer() open(vis) visualize!(vis, model_ft, q, Δt = h̄[1], scenario = :vertical) setobject!(vis["box"], GeometryBasics.HyperRectangle(Vec(0.0, 0.0, 0.0), Vec(0.25, 0.5, 3 * 0.25)), MeshPhongMaterial(color = RGBA(0.5, 0.5, 0.5, 1.0))) settransform!(vis["box"], Translation(-0.125, -0.25, 0)) using Plots plot(hcat(q_ref...)[1:4, :]', color = :black , width = 2.0) plot!(hcat(q...)[1:4, :]', color = :red, width = 1.0) plot(hcat(u...)', linetype = :steppost) # Save hm = h̄ μm = model.μ qm, um, γm, bm, ψm, ηm = q, u, γ, b, ψ, η @save joinpath(@__DIR__, "hopper_tall_flip.jld2") qm um γm bm ψm ηm μm hm # composite stairs + flip @load joinpath(@__DIR__, "hopper_stair.jld2") qm um γm bm ψm ηm μm hm function step_repeat(q, u, γ, b, ψ, η, T; steps = 2) qm = [deepcopy(q)...] um = [deepcopy(u)...] γm = [deepcopy(γ)...] bm = [deepcopy(b)...] ψm = [deepcopy(ψ)...] ηm = [deepcopy(η)...] stride = zero(qm[1]) for i = 1:(steps-1) @show stride[1] += q[T+1][1] - q[2][1] @show stride[2] += 0.25 for t = 1:T-1 push!(qm, q[t+2] + stride) push!(um, u[t]) push!(γm, γ[t]) push!(bm, b[t]) push!(ψm, ψ[t]) push!(ηm, η[t]) end end return qm, um, γm, bm, ψm, ηm end qm, um, γm, bm, ψm, ηm = step_repeat(qm, um, γm, bm, ψm, ηm, T, steps = 3) @save joinpath(@__DIR__, "hopper_stairs_3.jld2") qm um γm bm ψm ηm μm hm # @load joinpath(@__DIR__, "hopper_stairs_3.jld2") qm um γm bm ψm ηm μm hm setobject!(vis["box1"], GeometryBasics.HyperRectangle(Vec(0.0, 0.0, 0.0), Vec(0.25, 0.5, 0.25)), MeshPhongMaterial(color = RGBA(0.5, 0.5, 0.5, 1.0))) settransform!(vis["box1"], Translation(0.125, -0.25, 0)) setobject!(vis["box2"], GeometryBasics.HyperRectangle(Vec(0.0, 0.0, 0.0), Vec(0.25, 0.5, 2 * 0.25)), MeshPhongMaterial(color = RGBA(0.5, 0.5, 0.5, 1.0))) settransform!(vis["box2"], Translation(0.125 + 0.25, -0.25, 0)) setobject!(vis["box3"], GeometryBasics.HyperRectangle(Vec(0.0, 0.0, 0.0), Vec(0.25, 0.5, 3 * 0.25)), MeshPhongMaterial(color = RGBA(0.5, 0.5, 0.5, 1.0))) settransform!(vis["box3"], Translation(0.125 + 2 * 0.25, -0.25, 0)) tall_flip = load(joinpath(@__DIR__, "hopper_tall_flip.jld2")) qm_f, um_f, γm_f, bm_f, ψm_f, ηm_f, μm_f, hm_f = tall_flip["qm"], tall_flip["um"], tall_flip["γm"], tall_flip["bm"], tall_flip["ψm"], tall_flip["ηm"], tall_flip["μm"], tall_flip["hm"] str = zero(qm[1]) str[1] = qm[end][1] for i = 1:10 t = 1 push!(qm, qm_f[t+2] + str) push!(um, um_f[t]) push!(γm, γm_f[t]) push!(bm, bm_f[t]) push!(ψm, ψm_f[t]) push!(ηm, ηm_f[t]) end for t = 1:length(um_f) push!(qm, qm_f[t+2] + str) push!(um, um_f[t]) push!(γm, γm_f[t]) push!(bm, bm_f[t]) push!(ψm, ψm_f[t]) push!(ηm, ηm_f[t]) end @save joinpath(@__DIR__, "hopper_stairs_3_flip.jld2") qm um γm bm ψm ηm μm hm visualize!(vis, model_ft, qm, Δt = h̄[1], scenario = :stairs) setprop!(vis["/Cameras/default/rotated/<object>"], "zoom", 20) settransform!(vis["/Cameras/default"], compose(Translation(0.0, -90.0, -1.0),LinearMap(RotZ(-0.5 * π))))
[ 2, 9104, 198, 17256, 62, 19849, 7203, 8873, 2848, 4943, 198, 198, 2022, 796, 513, 13, 15, 1303, 1767, 2347, 198, 4029, 796, 657, 13, 18, 220, 1303, 1232, 2347, 198, 41, 65, 796, 657, 13, 2425, 1303, 1767, 48482, 198, 41, 75, 796, 657, 13, 46396, 1303, 1232, 48482, 198, 198, 19849, 796, 9544, 2848, 90, 15642, 8374, 11, 10832, 7575, 92, 7, 77, 11, 285, 11, 288, 11, 198, 197, 197, 197, 220, 220, 285, 65, 11, 25962, 11, 449, 65, 11, 449, 75, 11, 198, 197, 197, 197, 220, 220, 657, 13, 1495, 11, 308, 11, 198, 197, 197, 197, 220, 220, 10662, 43, 11, 10662, 52, 11, 198, 197, 197, 197, 220, 220, 334, 43, 11, 334, 52, 11, 198, 197, 197, 197, 220, 220, 299, 80, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 14364, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 299, 66, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 299, 69, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 299, 65, 11, 198, 197, 197, 220, 220, 220, 197, 220, 220, 36545, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 84, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 39377, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 65, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 139, 230, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 138, 115, 11, 198, 197, 197, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 82, 8, 198, 198, 19849, 62, 701, 796, 1479, 62, 2435, 62, 19849, 7, 19849, 8, 198, 198, 2, 18761, 1291, 73, 198, 31, 2220, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 301, 958, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 198, 2, 520, 958, 198, 8818, 18074, 243, 62, 20786, 7, 19849, 3712, 28900, 2848, 11, 10662, 8, 198, 197, 74, 796, 479, 7749, 23372, 7, 19849, 11, 10662, 8, 198, 197, 361, 479, 58, 16, 60, 1279, 657, 13, 11623, 198, 220, 220, 220, 220, 197, 7783, 2488, 50, 38469, 685, 74, 58, 17, 60, 532, 513, 1635, 657, 13, 1495, 60, 198, 197, 17772, 198, 197, 197, 7783, 2488, 50, 38469, 685, 74, 58, 17, 11907, 198, 197, 437, 198, 437, 198, 198, 2, 22776, 198, 51, 796, 4019, 198, 198, 2, 3862, 2239, 198, 2, 48700, 796, 657, 13, 2425, 198, 71, 796, 289, 76, 1303, 27110, 1220, 357, 51, 532, 352, 8, 198, 198, 2, 347, 3733, 198, 62, 12303, 796, 4806, 1635, 3392, 7, 19849, 62, 701, 13, 76, 8, 198, 62, 12303, 58, 19849, 62, 701, 13, 312, 87, 62, 84, 60, 764, 28, 4806, 2, 940, 13, 15, 2, 19849, 62, 701, 13, 84, 52, 198, 62, 12303, 58, 437, 60, 796, 289, 2, 18, 13, 15, 1635, 289, 198, 62, 377, 796, 1976, 27498, 7, 19849, 62, 701, 13, 76, 8, 198, 62, 377, 58, 19849, 62, 701, 13, 312, 87, 62, 84, 60, 764, 28, 532, 18943, 2, 940, 13, 15, 1303, 19849, 62, 701, 13, 84, 43, 198, 62, 377, 58, 437, 60, 796, 289, 2, 15, 13, 17, 1635, 289, 198, 377, 11, 334, 84, 796, 1630, 62, 65, 3733, 7, 19849, 62, 701, 11, 309, 11, 4808, 377, 11, 4808, 12303, 8, 198, 198, 2, 20768, 290, 2457, 2585, 198, 89, 62, 71, 796, 513, 1635, 657, 13, 1495, 198, 198, 80, 16, 796, 685, 15, 13, 15, 11, 657, 13, 20, 1343, 1976, 62, 71, 11, 657, 13, 15, 11, 657, 13, 20, 60, 198, 80, 1157, 796, 685, 15, 13, 15, 11, 657, 13, 20, 1343, 1976, 62, 71, 1343, 657, 13, 11623, 11, 657, 13, 15, 11, 657, 13, 1495, 60, 198, 80, 76, 16, 796, 685, 15, 13, 11623, 11, 657, 13, 20, 1343, 1976, 62, 71, 1343, 657, 13, 1495, 11, 532, 15, 13, 20, 1635, 18074, 222, 11, 657, 13, 1495, 60, 198, 80, 76, 17, 796, 685, 15, 13, 1495, 11, 657, 13, 20, 1343, 1976, 62, 71, 1343, 657, 13, 11623, 11, 532, 16, 13, 20, 1635, 18074, 222, 11, 657, 13, 1495, 60, 198, 80, 76, 18, 796, 685, 15, 13, 22318, 11, 657, 13, 20, 1343, 1976, 62, 71, 1343, 657, 13, 3312, 1495, 11, 532, 17, 13, 15, 1635, 18074, 222, 11, 657, 13, 20, 60, 198, 80, 51, 796, 685, 15, 13, 20, 11, 657, 13, 20, 11, 532, 17, 13, 15, 1635, 18074, 222, 11, 657, 13, 20, 60, 198, 198, 13976, 16, 796, 14174, 62, 3849, 16104, 341, 7, 80, 16, 11, 10662, 1157, 11, 1478, 8, 198, 13976, 17, 796, 14174, 62, 3849, 16104, 341, 7, 80, 1157, 11, 10662, 76, 16, 11, 1315, 8, 198, 13976, 18, 796, 14174, 62, 3849, 16104, 341, 7, 80, 76, 16, 11, 10662, 76, 17, 11, 1315, 8, 198, 13976, 19, 796, 14174, 62, 3849, 16104, 341, 7, 80, 76, 17, 11, 10662, 76, 18, 11, 1315, 8, 198, 13976, 20, 796, 14174, 62, 3849, 16104, 341, 7, 80, 76, 18, 11, 10662, 51, 11, 1478, 8, 198, 13976, 21, 796, 14174, 62, 3849, 16104, 341, 7, 80, 51, 11, 10662, 51, 11, 1478, 8, 198, 198, 80, 62, 5420, 796, 685, 13976, 16, 986, 11, 198, 197, 197, 10662, 75, 17, 58, 17, 25, 437, 60, 986, 11, 198, 197, 197, 10662, 75, 18, 58, 17, 25, 437, 60, 986, 11, 198, 197, 197, 10662, 75, 19, 58, 17, 25, 437, 60, 986, 11, 198, 197, 197, 10662, 75, 20, 58, 17, 25, 437, 60, 986, 11, 198, 197, 197, 10662, 75, 21, 58, 17, 25, 437, 60, 22345, 198, 198, 138, 116, 81, 796, 2837, 7, 15, 13, 15, 11, 2245, 796, 532, 17, 13, 15, 1635, 18074, 222, 11, 4129, 796, 357, 3365, 532, 1478, 4008, 198, 1640, 357, 72, 11, 256, 8, 796, 27056, 378, 7, 1314, 25, 3365, 8, 198, 197, 80, 62, 5420, 58, 83, 7131, 18, 60, 796, 7377, 116, 81, 58, 72, 60, 198, 437, 198, 2, 2746, 62, 701, 13, 80, 52, 58, 17, 60, 796, 362, 13, 20, 198, 87, 75, 11, 2124, 84, 796, 1181, 62, 65, 3733, 7, 19849, 62, 701, 11, 309, 11, 198, 197, 197, 58, 19849, 62, 701, 13, 80, 43, 26, 2746, 62, 701, 13, 80, 43, 4357, 198, 197, 197, 58, 19849, 62, 701, 13, 80, 52, 26, 2746, 62, 701, 13, 80, 52, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 796, 685, 80, 16, 26, 10662, 16, 4357, 198, 197, 197, 87, 51, 796, 685, 80, 51, 26, 10662, 51, 12962, 198, 198, 2, 37092, 198, 17256, 62, 15252, 425, 7, 14692, 626, 11683, 1600, 366, 13159, 29127, 62, 14247, 1600, 366, 13716, 62, 626, 11683, 8973, 8, 198, 80, 79, 796, 657, 13, 15, 1635, 685, 15, 13, 486, 26, 657, 13, 486, 26, 352, 13, 15, 26, 352, 13, 15, 60, 198, 26801, 62, 36280, 796, 15094, 81, 1512, 62, 2435, 62, 36280, 62, 15252, 425, 7, 198, 220, 220, 220, 685, 18683, 27923, 26933, 80, 79, 26, 10662, 79, 12962, 329, 256, 796, 352, 25, 51, 4357, 198, 220, 220, 220, 685, 18683, 27923, 26933, 16, 13, 15, 68, 12, 16, 11, 352, 13, 15, 68, 12, 17, 11, 198, 197, 197, 16, 13, 15, 68, 12, 20, 1635, 3392, 7, 19849, 62, 701, 13, 10782, 26513, 11, 352, 13, 15, 68, 12, 20, 1635, 3392, 7, 19849, 62, 701, 13, 46803, 26513, 11, 198, 197, 197, 9107, 418, 7, 19849, 62, 701, 13, 76, 532, 2746, 62, 701, 13, 28803, 532, 2746, 62, 701, 13, 10782, 532, 2746, 62, 701, 13, 46803, 532, 352, 26513, 11, 657, 13, 15, 12962, 198, 197, 197, 1640, 256, 796, 352, 25, 51, 12, 16, 4357, 198, 220, 220, 220, 16410, 80, 51, 26, 10662, 51, 60, 329, 256, 796, 352, 25, 51, 4357, 198, 220, 220, 220, 685, 9107, 418, 7, 19849, 62, 701, 13, 76, 8, 329, 256, 796, 352, 25, 51, 4357, 198, 220, 220, 220, 352, 13, 15, 8, 198, 198, 26801, 62, 32057, 62, 3617, 6017, 796, 41676, 10267, 425, 7, 16, 13, 15, 68, 20, 11, 2746, 62, 701, 13, 76, 532, 352, 8, 198, 198, 26801, 62, 626, 11683, 796, 15432, 62, 15252, 425, 7, 198, 220, 220, 220, 47527, 83, 1875, 1160, 11405, 256, 1279, 3126, 8, 5633, 6031, 27923, 7, 16, 13, 15, 68, 12, 17, 1635, 685, 16, 13, 15, 26, 352, 13, 15, 26, 1802, 13, 15, 26, 1802, 13, 15, 12962, 1058, 6031, 27923, 7, 16, 13, 15, 68, 12, 17, 1635, 685, 16, 13, 15, 26, 352, 13, 15, 26, 352, 13, 15, 26, 352, 13, 15, 12962, 329, 256, 796, 352, 25, 51, 12, 16, 4357, 198, 220, 220, 220, 2746, 62, 701, 13, 77, 80, 11, 198, 220, 220, 220, 289, 796, 289, 11, 198, 220, 220, 220, 4686, 87, 62, 9248, 796, 2824, 26933, 18, 60, 4008, 198, 198, 26801, 62, 44755, 62, 626, 796, 1630, 62, 626, 11683, 62, 15252, 425, 7, 18683, 27923, 26933, 16, 13, 15, 68, 12, 16, 1635, 3392, 7, 19849, 62, 701, 13, 28803, 1776, 198, 197, 16, 13, 15, 68, 12, 18, 1635, 3392, 7, 19849, 62, 701, 13, 10782, 1343, 2746, 62, 701, 13, 46803, 1776, 198, 197, 9107, 418, 7, 19849, 62, 701, 13, 76, 532, 2746, 62, 701, 13, 28803, 532, 2746, 62, 701, 13, 10782, 532, 2746, 62, 701, 13, 46803, 15437, 4008, 198, 198, 8818, 300, 62, 14247, 7, 87, 11, 334, 11, 256, 8, 198, 197, 41, 796, 657, 13, 15, 628, 197, 62, 80, 16, 796, 1570, 7, 87, 11, 352, 25, 19, 8, 198, 197, 79, 16, 796, 479, 7749, 23372, 7, 19849, 11, 4808, 80, 16, 8, 628, 197, 62, 80, 17, 796, 1570, 7, 87, 11, 604, 764, 10, 357, 16, 25, 19, 4008, 198, 197, 79, 17, 796, 479, 7749, 23372, 7, 19849, 11, 4808, 80, 17, 8, 628, 197, 85, 796, 357, 79, 17, 532, 279, 16, 8, 24457, 289, 628, 197, 361, 256, 1279, 2319, 198, 197, 197, 41, 15853, 8576, 13, 15, 1635, 410, 58, 16, 60, 61, 17, 13, 15, 198, 197, 437, 628, 197, 361, 256, 1875, 3126, 198, 197, 197, 41, 15853, 8576, 13, 15, 1635, 410, 58, 16, 60, 61, 17, 13, 15, 198, 197, 437, 628, 197, 361, 2081, 2, 83, 1875, 642, 1303, 15886, 357, 83, 1875, 1160, 11405, 256, 1279, 309, 8, 198, 197, 197, 41, 15853, 44104, 80, 16, 532, 10662, 62, 5420, 58, 83, 12962, 6, 1635, 6031, 27923, 26933, 3064, 13, 15, 26, 1802, 13, 15, 26, 8576, 13, 15, 26, 8576, 13, 15, 12962, 1635, 44104, 80, 16, 532, 10662, 62, 5420, 58, 83, 12962, 198, 197, 437, 628, 197, 7783, 449, 198, 437, 198, 198, 75, 62, 14247, 7, 87, 8, 796, 300, 62, 14247, 7, 87, 11, 2147, 11, 309, 8, 198, 198, 26801, 62, 14247, 796, 1729, 29127, 62, 14247, 62, 15252, 425, 7, 75, 62, 14247, 11, 300, 62, 14247, 8, 198, 26801, 796, 15237, 10267, 425, 26933, 26801, 62, 36280, 11, 198, 197, 26801, 62, 32057, 62, 3617, 6017, 11, 198, 197, 26801, 62, 626, 11683, 11, 198, 197, 26801, 62, 14247, 11, 198, 197, 26801, 62, 44755, 62, 626, 12962, 198, 198, 2, 1482, 2536, 6003, 198, 17256, 62, 1102, 2536, 6003, 7, 14692, 5787, 62, 2435, 1600, 366, 32057, 1600, 366, 14247, 8973, 8, 198, 1102, 62, 5787, 62, 2435, 796, 1479, 62, 2435, 62, 1102, 2536, 6003, 7, 51, 8, 198, 1102, 62, 32057, 796, 2800, 62, 1102, 2536, 6003, 7, 19849, 62, 701, 11, 309, 8, 198, 198, 79, 16, 62, 5420, 796, 479, 7749, 23372, 7, 19849, 11, 10662, 16, 8, 198, 79, 51, 62, 5420, 796, 479, 7749, 23372, 7, 19849, 11, 10662, 51, 8, 198, 198, 8818, 25711, 16, 0, 7, 66, 11, 2124, 11, 334, 11, 256, 8, 198, 220, 220, 220, 10662, 796, 1570, 7, 87, 11, 352, 25, 19, 8, 198, 220, 220, 220, 269, 58, 16, 25, 17, 60, 796, 279, 16, 62, 5420, 532, 479, 7749, 23372, 7, 19849, 11, 10662, 8, 198, 197, 22366, 198, 437, 198, 198, 8818, 25711, 51, 0, 7, 66, 11, 2124, 11, 334, 11, 256, 8, 198, 220, 220, 220, 10662, 796, 1570, 7, 87, 11, 604, 764, 10, 357, 16, 25, 19, 4008, 198, 197, 66, 58, 16, 25, 17, 60, 796, 279, 51, 62, 5420, 532, 479, 7749, 23372, 7, 19849, 11, 10662, 8, 198, 197, 22366, 198, 437, 198, 198, 8818, 645, 62, 5898, 62, 6649, 541, 0, 7, 66, 11, 2124, 11, 334, 11, 256, 8, 198, 197, 80, 796, 1570, 7, 87, 11, 352, 25, 19, 8, 628, 197, 66, 58, 16, 60, 796, 479, 7749, 23372, 7, 19849, 11, 10662, 38381, 16, 60, 198, 437, 198, 198, 77, 62, 14247, 796, 362, 198, 83, 62, 312, 87, 16, 796, 410, 9246, 26933, 83, 329, 256, 796, 352, 25, 940, 60, 23029, 198, 83, 62, 312, 87, 51, 796, 410, 9246, 26933, 7, 51, 532, 838, 1343, 352, 2599, 51, 60, 23029, 198, 198, 1102, 62, 11635, 2817, 16, 796, 3800, 62, 1102, 2536, 6003, 7, 11635, 2817, 16, 28265, 362, 11, 357, 16, 25, 15, 828, 256, 62, 312, 87, 16, 8, 198, 1102, 62, 11635, 2817, 51, 796, 3800, 62, 1102, 2536, 6003, 7, 11635, 2817, 51, 28265, 362, 11, 357, 16, 25, 15, 828, 256, 62, 312, 87, 51, 8, 198, 1102, 62, 3919, 62, 6649, 541, 796, 3800, 62, 1102, 2536, 6003, 7, 3919, 62, 5898, 62, 6649, 541, 28265, 352, 11, 357, 16, 25, 16, 828, 2824, 7, 16, 25, 1821, 4008, 198, 198, 1102, 796, 3294, 62, 1102, 2536, 6003, 26933, 1102, 62, 5787, 62, 2435, 11, 369, 62, 32057, 11, 369, 62, 11635, 2817, 16, 11, 369, 62, 11635, 2817, 51, 11, 369, 62, 3919, 62, 6649, 541, 12962, 2, 11, 369, 62, 26268, 12962, 198, 198, 2, 20647, 198, 1676, 65, 796, 22942, 62, 40085, 1634, 62, 45573, 7, 19849, 62, 701, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26181, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 75, 796, 2124, 75, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 84, 796, 2124, 84, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14856, 796, 14856, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 334, 84, 796, 334, 84, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 369, 796, 369, 8, 198, 198, 2, 4759, 752, 652, 37588, 198, 87, 15, 796, 8398, 62, 1462, 62, 5219, 7, 80, 62, 5420, 8, 1303, 14174, 39555, 341, 319, 1181, 198, 84, 15, 796, 16410, 16, 13, 15, 68, 12, 17, 1635, 43720, 7, 19849, 62, 701, 13, 76, 12, 16, 1776, 289, 60, 329, 256, 796, 352, 25, 51, 12, 16, 60, 1303, 4738, 6973, 198, 198, 2, 6400, 20134, 1749, 656, 15879, 198, 89, 15, 796, 2353, 7, 87, 15, 11, 334, 15, 11, 1861, 8, 198, 198, 2, 16580, 25, 743, 761, 284, 1057, 6096, 3294, 1661, 284, 651, 922, 20134, 1749, 198, 2, 4294, 303, 26934, 1917, 198, 31, 2435, 1976, 136, 226, 11, 7508, 796, 8494, 7, 1676, 65, 11, 4866, 7, 89, 15, 828, 198, 197, 21283, 79, 796, 1058, 541, 8738, 11, 198, 197, 83, 349, 796, 352, 13, 15, 68, 12, 18, 11, 269, 62, 83, 349, 796, 352, 13, 15, 68, 12, 18, 11, 17266, 489, 796, 642, 11, 198, 197, 2435, 62, 32374, 796, 3126, 8, 198, 31, 12860, 2198, 62, 6649, 441, 7, 89, 136, 226, 11, 1861, 8, 198, 87, 136, 226, 11, 334, 136, 226, 796, 555, 8002, 7, 89, 136, 226, 11, 1861, 8, 198, 27110, 11, 256, 11, 289, 136, 226, 796, 651, 62, 2435, 7, 84, 136, 226, 8, 198, 198, 80, 796, 1181, 62, 1462, 62, 11250, 3924, 7, 87, 136, 226, 8, 198, 84, 796, 685, 84, 58, 19849, 13, 312, 87, 62, 84, 60, 329, 334, 287, 334, 136, 226, 60, 198, 42063, 796, 685, 84, 58, 19849, 13, 312, 87, 62, 39377, 60, 329, 334, 287, 334, 136, 226, 60, 198, 65, 796, 685, 84, 58, 19849, 13, 312, 87, 62, 65, 60, 329, 334, 287, 334, 136, 226, 60, 198, 139, 230, 796, 685, 84, 58, 19849, 13, 312, 87, 62, 139, 230, 60, 329, 334, 287, 334, 136, 226, 60, 198, 138, 115, 796, 685, 84, 58, 19849, 13, 312, 87, 62, 138, 115, 60, 329, 334, 287, 334, 136, 226, 60, 198, 71, 136, 226, 796, 1612, 7, 71, 136, 226, 8, 198, 2, 2488, 21928, 4654, 6978, 7, 79, 16993, 22784, 366, 1069, 12629, 14, 9535, 752, 1749, 14, 8873, 2848, 62, 1851, 605, 62, 70, 4548, 13, 73, 335, 17, 4943, 1976, 136, 226, 2124, 136, 226, 334, 136, 226, 289, 136, 226, 10662, 334, 7377, 111, 275, 198, 198, 17256, 7, 22179, 6978, 7, 79, 16993, 22784, 366, 27530, 14, 41464, 1096, 13, 20362, 48774, 198, 4703, 796, 15612, 7509, 3419, 198, 9654, 7, 4703, 8, 198, 198, 41464, 1096, 0, 7, 4703, 11, 2746, 62, 701, 11, 198, 197, 80, 11, 198, 197, 138, 242, 83, 796, 289, 136, 226, 58, 16, 4357, 198, 197, 1416, 39055, 796, 1058, 1851, 605, 8, 198, 198, 2617, 15252, 0, 7, 4703, 14692, 3524, 33116, 2269, 15748, 15522, 873, 13, 38197, 45474, 9248, 7, 53, 721, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 828, 198, 197, 53, 721, 7, 15, 13, 1495, 11, 657, 13, 20, 11, 513, 1635, 657, 13, 1495, 36911, 47529, 2725, 506, 17518, 7, 8043, 796, 34359, 4339, 7, 15, 13, 20, 11, 657, 13, 20, 11, 657, 13, 20, 11, 352, 13, 15, 22305, 198, 2617, 35636, 0, 7, 4703, 14692, 3524, 33116, 33322, 32590, 15, 13, 11623, 11, 532, 15, 13, 1495, 11, 657, 4008, 198, 198, 3500, 1345, 1747, 198, 29487, 7, 71, 9246, 7, 80, 62, 5420, 23029, 58, 16, 25, 19, 11, 1058, 60, 3256, 3124, 796, 1058, 13424, 837, 9647, 796, 362, 13, 15, 8, 198, 29487, 0, 7, 71, 9246, 7, 80, 23029, 58, 16, 25, 19, 11, 1058, 60, 3256, 3124, 796, 1058, 445, 11, 9647, 796, 352, 13, 15, 8, 198, 198, 29487, 7, 71, 9246, 7, 84, 23029, 3256, 9493, 2963, 431, 796, 1058, 4169, 381, 455, 8, 628, 198, 2, 12793, 198, 23940, 796, 289, 136, 226, 198, 34703, 76, 796, 2746, 13, 34703, 198, 80, 76, 11, 23781, 11, 7377, 111, 76, 11, 275, 76, 11, 18074, 230, 76, 11, 7377, 115, 76, 796, 10662, 11, 334, 11, 7377, 111, 11, 275, 11, 18074, 230, 11, 7377, 115, 198, 198, 31, 21928, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 35429, 62, 2704, 541, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 198, 2, 24185, 16046, 1343, 14283, 198, 31, 2220, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 301, 958, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 198, 8818, 2239, 62, 44754, 7, 80, 11, 334, 11, 7377, 111, 11, 275, 11, 18074, 230, 11, 7377, 115, 11, 309, 26, 4831, 796, 362, 8, 198, 197, 80, 76, 796, 685, 22089, 30073, 7, 80, 8, 22345, 198, 197, 388, 796, 685, 22089, 30073, 7, 84, 8, 22345, 198, 197, 42063, 76, 796, 685, 22089, 30073, 7, 42063, 8, 22345, 198, 197, 20475, 796, 685, 22089, 30073, 7, 65, 8, 22345, 198, 197, 139, 230, 76, 796, 685, 22089, 30073, 7, 139, 230, 8, 22345, 198, 197, 138, 115, 76, 796, 685, 22089, 30073, 7, 138, 115, 8, 22345, 628, 197, 2536, 485, 796, 6632, 7, 80, 76, 58, 16, 12962, 198, 197, 1640, 1312, 796, 352, 37498, 20214, 12, 16, 8, 198, 197, 197, 31, 12860, 33769, 58, 16, 60, 15853, 10662, 58, 51, 10, 16, 7131, 16, 60, 532, 10662, 58, 17, 7131, 16, 60, 198, 197, 197, 31, 12860, 33769, 58, 17, 60, 15853, 657, 13, 1495, 198, 197, 197, 1640, 256, 796, 352, 25, 51, 12, 16, 198, 197, 197, 197, 14689, 0, 7, 80, 76, 11, 10662, 58, 83, 10, 17, 60, 1343, 33769, 8, 198, 197, 197, 197, 14689, 0, 7, 388, 11, 334, 58, 83, 12962, 198, 197, 197, 197, 14689, 0, 7, 42063, 76, 11, 7377, 111, 58, 83, 12962, 198, 197, 197, 197, 14689, 0, 7, 20475, 11, 275, 58, 83, 12962, 198, 197, 197, 197, 14689, 0, 7, 139, 230, 76, 11, 18074, 230, 58, 83, 12962, 198, 197, 197, 197, 14689, 0, 7, 138, 115, 76, 11, 7377, 115, 58, 83, 12962, 198, 197, 197, 437, 198, 197, 437, 628, 197, 7783, 10662, 76, 11, 23781, 11, 7377, 111, 76, 11, 275, 76, 11, 18074, 230, 76, 11, 7377, 115, 76, 198, 437, 198, 198, 80, 76, 11, 23781, 11, 7377, 111, 76, 11, 275, 76, 11, 18074, 230, 76, 11, 7377, 115, 76, 796, 2239, 62, 44754, 7, 80, 76, 11, 23781, 11, 7377, 111, 76, 11, 275, 76, 11, 18074, 230, 76, 11, 7377, 115, 76, 11, 309, 11, 4831, 796, 513, 8, 198, 198, 31, 21928, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 17617, 62, 18, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 2, 2488, 2220, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 17617, 62, 18, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 198, 2617, 15252, 0, 7, 4703, 14692, 3524, 16, 33116, 2269, 15748, 15522, 873, 13, 38197, 45474, 9248, 7, 53, 721, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 828, 198, 197, 53, 721, 7, 15, 13, 1495, 11, 657, 13, 20, 11, 657, 13, 1495, 36911, 47529, 2725, 506, 17518, 7, 8043, 796, 34359, 4339, 7, 15, 13, 20, 11, 657, 13, 20, 11, 657, 13, 20, 11, 352, 13, 15, 22305, 198, 2617, 35636, 0, 7, 4703, 14692, 3524, 16, 33116, 33322, 7, 15, 13, 11623, 11, 532, 15, 13, 1495, 11, 657, 4008, 198, 198, 2617, 15252, 0, 7, 4703, 14692, 3524, 17, 33116, 2269, 15748, 15522, 873, 13, 38197, 45474, 9248, 7, 53, 721, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 828, 198, 197, 53, 721, 7, 15, 13, 1495, 11, 657, 13, 20, 11, 362, 1635, 657, 13, 1495, 36911, 47529, 2725, 506, 17518, 7, 8043, 796, 34359, 4339, 7, 15, 13, 20, 11, 657, 13, 20, 11, 657, 13, 20, 11, 352, 13, 15, 22305, 198, 2617, 35636, 0, 7, 4703, 14692, 3524, 17, 33116, 33322, 7, 15, 13, 11623, 1343, 657, 13, 1495, 11, 532, 15, 13, 1495, 11, 657, 4008, 198, 198, 2617, 15252, 0, 7, 4703, 14692, 3524, 18, 33116, 2269, 15748, 15522, 873, 13, 38197, 45474, 9248, 7, 53, 721, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 828, 198, 197, 53, 721, 7, 15, 13, 1495, 11, 657, 13, 20, 11, 513, 1635, 657, 13, 1495, 36911, 47529, 2725, 506, 17518, 7, 8043, 796, 34359, 4339, 7, 15, 13, 20, 11, 657, 13, 20, 11, 657, 13, 20, 11, 352, 13, 15, 22305, 198, 2617, 35636, 0, 7, 4703, 14692, 3524, 18, 33116, 33322, 7, 15, 13, 11623, 1343, 362, 1635, 657, 13, 1495, 11, 532, 15, 13, 1495, 11, 657, 4008, 198, 198, 35429, 62, 2704, 541, 796, 3440, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 35429, 62, 2704, 541, 13, 73, 335, 17, 48774, 198, 198, 80, 76, 62, 69, 11, 23781, 62, 69, 11, 7377, 111, 76, 62, 69, 11, 275, 76, 62, 69, 11, 18074, 230, 76, 62, 69, 11, 7377, 115, 76, 62, 69, 11, 18919, 76, 62, 69, 11, 289, 76, 62, 69, 796, 7331, 62, 2704, 541, 14692, 80, 76, 33116, 7331, 62, 2704, 541, 14692, 388, 33116, 7331, 62, 2704, 541, 14692, 42063, 76, 33116, 7331, 62, 2704, 541, 14692, 20475, 33116, 7331, 62, 2704, 541, 14692, 139, 230, 76, 33116, 7331, 62, 2704, 541, 14692, 138, 115, 76, 33116, 7331, 62, 2704, 541, 14692, 34703, 76, 33116, 7331, 62, 2704, 541, 14692, 23940, 8973, 198, 198, 2536, 796, 6632, 7, 80, 76, 58, 16, 12962, 198, 2536, 58, 16, 60, 796, 10662, 76, 58, 437, 7131, 16, 60, 198, 198, 1640, 1312, 796, 352, 25, 940, 198, 197, 83, 796, 352, 198, 197, 14689, 0, 7, 80, 76, 11, 10662, 76, 62, 69, 58, 83, 10, 17, 60, 1343, 965, 8, 198, 197, 14689, 0, 7, 388, 11, 23781, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 42063, 76, 11, 7377, 111, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 20475, 11, 275, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 139, 230, 76, 11, 18074, 230, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 138, 115, 76, 11, 7377, 115, 76, 62, 69, 58, 83, 12962, 198, 437, 198, 198, 1640, 256, 796, 352, 25, 13664, 7, 388, 62, 69, 8, 198, 197, 14689, 0, 7, 80, 76, 11, 10662, 76, 62, 69, 58, 83, 10, 17, 60, 1343, 965, 8, 198, 197, 14689, 0, 7, 388, 11, 23781, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 42063, 76, 11, 7377, 111, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 20475, 11, 275, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 139, 230, 76, 11, 18074, 230, 76, 62, 69, 58, 83, 12962, 198, 197, 14689, 0, 7, 138, 115, 76, 11, 7377, 115, 76, 62, 69, 58, 83, 12962, 198, 437, 198, 198, 31, 21928, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 8873, 2848, 62, 17617, 62, 18, 62, 2704, 541, 13, 73, 335, 17, 4943, 10662, 76, 23781, 7377, 111, 76, 275, 76, 18074, 230, 76, 7377, 115, 76, 18919, 76, 289, 76, 198, 198, 41464, 1096, 0, 7, 4703, 11, 2746, 62, 701, 11, 198, 197, 80, 76, 11, 198, 197, 138, 242, 83, 796, 289, 136, 226, 58, 16, 4357, 198, 197, 1416, 39055, 796, 1058, 17617, 8, 198, 198, 2617, 22930, 0, 7, 4703, 14692, 14, 34, 2382, 292, 14, 12286, 14, 10599, 515, 14, 27, 15252, 24618, 4357, 366, 89, 4207, 1600, 1160, 8, 198, 198, 2617, 35636, 0, 7, 4703, 14692, 14, 34, 2382, 292, 14, 12286, 33116, 198, 197, 785, 3455, 7, 48313, 7, 15, 13, 15, 11, 532, 3829, 13, 15, 11, 532, 16, 13, 15, 828, 14993, 451, 13912, 7, 24864, 57, 32590, 15, 13, 20, 1635, 18074, 222, 35514, 198 ]
1.831924
4,611
function makealltrans(N,n,Ω,basis="Hermite") dim=length(N) if dim==1 Nx = N[1] ωx = Ω[1] #n-field transforms for PGPE x,wx,Tx = nfieldtrans(Nx,n,ω=ωx,basis=basis) return x,wx,Tx elseif dim==2 Nx,Ny = N ωx,ωy = Ω #n-field transforms for PGPE x,wx,Tx = nfieldtrans(Nx,n,ω=ωx,basis=basis) y,wy,Ty = nfieldtrans(Ny,n,ω=ωy,basis=basis) return x,wx,Tx,y,wy,Ty elseif dim==3 Nx,Ny,Nz = N ωx,ωy,ωz = Ω #n-field transforms for PGPE x,wx,Tx = nfieldtrans(Nx,n,ω=ωx,basis=basis) y,wy,Ty = nfieldtrans(Ny,n,ω=ωy,basis=basis) z,wz,Tz = nfieldtrans(Nz,n,ω=ωz,basis=basis) return x,wx,Tx,y,wy,Ty,z,wz,Tz end end
[ 8818, 787, 439, 7645, 7, 45, 11, 77, 11, 138, 102, 11, 12093, 271, 2625, 48523, 578, 4943, 198, 27740, 28, 13664, 7, 45, 8, 198, 361, 5391, 855, 16, 198, 220, 399, 87, 796, 399, 58, 16, 60, 198, 220, 18074, 231, 87, 796, 7377, 102, 58, 16, 60, 198, 220, 1303, 77, 12, 3245, 31408, 329, 23842, 11401, 198, 220, 2124, 11, 49345, 11, 46047, 796, 299, 3245, 7645, 7, 45, 87, 11, 77, 11, 49535, 28, 49535, 87, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 1441, 2124, 11, 49345, 11, 46047, 198, 17772, 361, 5391, 855, 17, 198, 220, 399, 87, 11, 45, 88, 796, 399, 198, 220, 18074, 231, 87, 11, 49535, 88, 796, 7377, 102, 198, 220, 1303, 77, 12, 3245, 31408, 329, 23842, 11401, 198, 220, 2124, 11, 49345, 11, 46047, 796, 299, 3245, 7645, 7, 45, 87, 11, 77, 11, 49535, 28, 49535, 87, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 331, 11, 21768, 11, 25492, 796, 299, 3245, 7645, 7, 45, 88, 11, 77, 11, 49535, 28, 49535, 88, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 1441, 2124, 11, 49345, 11, 46047, 11, 88, 11, 21768, 11, 25492, 198, 17772, 361, 5391, 855, 18, 198, 220, 399, 87, 11, 45, 88, 11, 45, 89, 796, 399, 198, 220, 18074, 231, 87, 11, 49535, 88, 11, 49535, 89, 796, 7377, 102, 198, 220, 1303, 77, 12, 3245, 31408, 329, 23842, 11401, 198, 220, 2124, 11, 49345, 11, 46047, 796, 299, 3245, 7645, 7, 45, 87, 11, 77, 11, 49535, 28, 49535, 87, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 331, 11, 21768, 11, 25492, 796, 299, 3245, 7645, 7, 45, 88, 11, 77, 11, 49535, 28, 49535, 88, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 1976, 11, 86, 89, 11, 51, 89, 796, 299, 3245, 7645, 7, 45, 89, 11, 77, 11, 49535, 28, 49535, 89, 11, 12093, 271, 28, 12093, 271, 8, 198, 220, 1441, 2124, 11, 49345, 11, 46047, 11, 88, 11, 21768, 11, 25492, 11, 89, 11, 86, 89, 11, 51, 89, 198, 437, 198, 437, 198 ]
1.773109
357
import Distributions: logpdf, pdf struct SDT{T1,T2} <: ContinuousUnivariateDistribution d::T1 c::T2 end logpdf(d::SDT, data::Vector{Int64}) = logpdf(d, data...) logpdf(d::SDT, data::Tuple{Vararg{Int64}}) = logpdf(d, data...) function logpdf(d::SDT, hits, fas, Nd) @unpack d,c = d θhit = cdf(Normal(0, 1), d/2-c) θfa = cdf(Normal(0, 1), -d/2-c) loghits = logpdf(Binomial(Nd, θhit), hits) logfas = logpdf(Binomial(Nd, θfa), fas) return loghits + logfas end pdf(d::SDT, data::Vector{Int64}) = exp(logpdf(d, data...))
[ 11748, 46567, 507, 25, 2604, 12315, 11, 37124, 198, 198, 7249, 9834, 51, 90, 51, 16, 11, 51, 17, 92, 1279, 25, 45012, 3118, 42524, 20344, 3890, 198, 220, 220, 220, 288, 3712, 51, 16, 198, 220, 220, 220, 269, 3712, 51, 17, 198, 437, 198, 198, 6404, 12315, 7, 67, 3712, 10305, 51, 11, 1366, 3712, 38469, 90, 5317, 2414, 30072, 796, 2604, 12315, 7, 67, 11, 1366, 23029, 198, 198, 6404, 12315, 7, 67, 3712, 10305, 51, 11, 1366, 3712, 51, 29291, 90, 19852, 853, 90, 5317, 2414, 11709, 8, 796, 2604, 12315, 7, 67, 11, 1366, 23029, 198, 198, 8818, 2604, 12315, 7, 67, 3712, 10305, 51, 11, 7127, 11, 277, 292, 11, 399, 67, 8, 198, 220, 220, 220, 2488, 403, 8002, 288, 11, 66, 796, 288, 198, 220, 220, 220, 7377, 116, 17945, 796, 269, 7568, 7, 26447, 7, 15, 11, 352, 828, 288, 14, 17, 12, 66, 8, 198, 220, 220, 220, 7377, 116, 13331, 796, 269, 7568, 7, 26447, 7, 15, 11, 352, 828, 532, 67, 14, 17, 12, 66, 8, 198, 220, 220, 220, 2376, 456, 896, 796, 2604, 12315, 7, 33, 259, 49070, 7, 45, 67, 11, 7377, 116, 17945, 828, 7127, 8, 198, 220, 220, 220, 2604, 69, 292, 796, 2604, 12315, 7, 33, 259, 49070, 7, 45, 67, 11, 7377, 116, 13331, 828, 277, 292, 8, 198, 220, 220, 220, 1441, 2376, 456, 896, 1343, 2604, 69, 292, 198, 437, 198, 198, 12315, 7, 67, 3712, 10305, 51, 11, 1366, 3712, 38469, 90, 5317, 2414, 30072, 796, 1033, 7, 6404, 12315, 7, 67, 11, 1366, 986, 4008, 198 ]
2.048327
269
# This code is based on the gridap hyperelasticity demo: https://gridap.github.io/Tutorials/dev/pages/t005_hyperelasticity/ # Here I expanded it to 3D and added Makie based model visualisation. # Note this code currently requires: ] add Makie@0.15.2 GLMakie@0.4.6 using Gridap using Gridap.Visualization using Gridap.ReferenceFEs using Gridap.Geometry using FileIO using LineSearches: BackTracking using GLMakie, GeometryBasics using Colors, ColorSchemes # Geometry and BC parameters sample_dim = [1,1,1] #Sample dimensions numElem = [5,5,5] #Number of elements in each direction disp_max = 0.3 #Maximum displacement disp_inc = disp_max/10 #Desired displacement increment per step degree = 2 #Mesh order # Material parameters const λ = 100.0 const μ = 1.0 # Deformation Gradient F(∇u) = one(∇u) + ∇u' #Jacobian = volume ratio J(F) = sqrt(det(C(F))) #Green-Lagrange strain #E(F) = 0.5*( F'*F - one(F) ) #Green-Lagrange strain dE(∇du,∇u) = 0.5*( ∇du⋅F(∇u) + (∇du⋅F(∇u))' ) # Right Cauchy-green deformation tensor C(F) = (F')⋅F # Hyperelastic constitutive law for the Neo hookean material function S(∇u) Cinv = inv(C(F(∇u))) #Inverse of C i.e. B μ*(one(∇u)-Cinv) + λ*log(J(F(∇u)))*Cinv end function dS(∇du,∇u) Cinv = inv(C(F(∇u))) _dE = dE(∇du,∇u) λ*(Cinv⊙_dE)*Cinv + 2*(μ-λ*log(J(F(∇u))))*Cinv⋅_dE⋅(Cinv') end # Cauchy stress tensor σ(∇u) = (1.0/J(F(∇u)))*F(∇u)⋅S(∇u)⋅(F(∇u))' # Model domain = (0,sample_dim[1],0,sample_dim[2],0,sample_dim[3]) partition = (numElem[1],numElem[2],numElem[3]) model = CartesianDiscreteModel(domain,partition) # Define new boundaries labels = get_face_labeling(model) add_tag_from_tags!(labels,"diri_0",[1,3,5,7,13,15,17,19,25]) add_tag_from_tags!(labels,"diri_1",[2,4,6,8,14,16,18,20,26]) # Setup integration Ω = Triangulation(model) dΩ = Measure(Ω,degree) # Weak form res(u,v) = ∫( (dE∘(∇(v),∇(u))) ⊙ (S∘∇(u)) )*dΩ jac_mat(u,du,v) = ∫( (dE∘(∇(v),∇(u))) ⊙ (dS∘(∇(du),∇(u))) )*dΩ jac_geo(u,du,v) = ∫( ∇(v) ⊙ ( (S∘∇(u))⋅∇(du) ) )*dΩ jac(u,du,v) = jac_mat(u,du,v) + jac_geo(u,du,v) # Construct the FEspace reffe = ReferenceFE(lagrangian,VectorValue{3,Float64},1) V = TestFESpace(model,reffe,conformity=:H1,dirichlet_tags = ["diri_0", "diri_1"]) # Setup non-linear solver nls = NLSolver(show_trace=true,method=:newton,linesearch=BackTracking()) solver = FESolver(nls) function run(x0,disp_x,step,nsteps,cache) g0 = VectorValue(0.0,0.0,0.0) g1 = VectorValue(disp_x,0.0,0.0) U = TrialFESpace(V,[g0,g1]) #FE problem op = FEOperator(res,jac,U,V) println("\n+++ Solving for disp_x $disp_x in step $step of $nsteps +++\n") uh = FEFunction(U,x0) uh, cache = solve!(uh,solver,op,cache) return get_free_dof_values(uh), uh, cache end function runs(disp_max,disp_inc) nsteps = ceil(Int,abs(disp_max)/disp_inc) x0 = zeros(Float64,num_free_dofs(V)) nodalDisplacements = Vector{Vector{VectorValue{3, Float64}}}(undef,nsteps+1) cache = nothing for step in 1:nsteps disp_x = step * disp_max / nsteps x0, uh, cache = run(x0,disp_x,step,nsteps,cache) vd = visualization_data(Ω,"",cellfields=["u"=>uh]) nodalDisplacements[step+1] = vd[1].nodaldata["u"] end nodalDisplacements[1]=nodalDisplacements[2].*0 #Add zeros for initial state return nodalDisplacements end function nodesToPointset(V) #Convert gridap coordinate type to Makie Point3f type P=Vector{GeometryBasics.Point{3, Float32}}(undef,size(V,1)) for q=1:1:size(V,1) P[q]=convert(GeometryBasics.Point,convert(Tuple{Float64, Float64, Float64},V[q])) end return P end function convertToFacePointSet(Ω) #TO DO: Implement other element types, hex->quads only shown here #Get gridap element and node descriptions # E=Ω.cell_node_ids[:] #Elements # V=Ω.node_coords[:] #Nodes/Vertices vd=visualization_data(Ω,""); grid = vd[1].grid E = get_cell_node_ids(grid) V = get_node_coordinates(grid) #Get faces and convert to QuadFace type F=Vector{QuadFace{Int64}}(undef,size(E,1)*6) for q=1:1:size(E,1) F[q]=convert(QuadFace{Int64},E[q][[1,2,4,3],1]) #top F[q+size(E,1)*1]=convert(QuadFace{Int64},E[q][[5,6,8,7],1]) #bottom F[q+size(E,1)*2]=convert(QuadFace{Int64},E[q][[1,2,6,5],1]) #side 1 F[q+size(E,1)*3]=convert(QuadFace{Int64},E[q][[4,3,7,8],1]) #side 2 F[q+size(E,1)*4]=convert(QuadFace{Int64},E[q][[2,4,8,6],1]) #front F[q+size(E,1)*5]=convert(QuadFace{Int64},E[q][[3,1,5,7],1]) #back end #Create face type labels faceTypeLabel=[ones(Int64,size(E,1))*1; ones(Int64,size(E,1))*2; ones(Int64,size(E,1))*3; ones(Int64,size(E,1))*4; ones(Int64,size(E,1))*5; ones(Int64,size(E,1))*6;] P=nodesToPointset(V) return P,F, faceTypeLabel end #Do the work! nodalDisplacements = runs(disp_max,disp_inc) #Create makie compatible face and point set pointSet,faceSet,faceTypeLabel=convertToFacePointSet(Ω) function getCoordStep(Ω,nodalDisplacement) vd = visualization_data(Ω,"") grid = vd[1].grid V = get_node_coordinates(grid) V2= V + nodalDisplacement pointSet2=nodesToPointset(V2) return pointSet2 end function getMagnitude(U) M=zeros(size(U,1)) for q=1:1:size(U,1) M[q]=sqrt(U[q][1]^2 + U[q][2]^2 + U[q][3]^2) end return M end pointSet=getCoordStep(Ω,nodalDisplacements[1]) #Gather face and point set as GeometryBasics mesh M=GeometryBasics.Mesh(pointSet,faceSet) nodalColor=getMagnitude(nodalDisplacements[1]) #Visualize mesh fig = Figure() sl_step = Slider(fig[2, 1], range = 1:1:size(nodalDisplacements,1), startvalue = size(nodalDisplacements,1)) nodalColor = lift(sl_step.value) do stepIndex getMagnitude(nodalDisplacements[stepIndex]) end M = lift(sl_step.value) do stepIndex GeometryBasics.Mesh(getCoordStep(Ω,nodalDisplacements[stepIndex]),faceSet) end titleString = lift(sl_step.value) do stepIndex "Step: "*string(stepIndex-1) end ax=Axis3(fig[1, 1], aspect = :data, xlabel = "X", ylabel = "Y", zlabel = "Z", title = titleString) hp=poly!(M, strokewidth=1,shading=false,color=nodalColor, transparency=false, overdraw=false, colormap = (RGB(255.0, 215.0, 0.0)/255,RGB(0.0, 87.0, 183.0)/255),colorrange=(0,disp_max)) Colorbar(fig[1, 2],hp.plots[1],label = "Displacement magnitude [mm]") fig # ax=Axis3(fig[1, 1], aspect = :data, xlabel = "X", ylabel = "Y", zlabel = "Z", title = titleString) # hp=poly!(M, strokewidth=3,shading=true,color=nodalColor, transparency=false, overdraw=false # ,colormap = Reverse(:Spectral),colorrange=(0,0.8)) # Colorbar(fig[1, 2],hp.plots[1],label = "Displacement magnitude [mm]") # fig
[ 2, 770, 2438, 318, 1912, 319, 262, 10706, 499, 20606, 2411, 3477, 414, 13605, 25, 3740, 1378, 25928, 499, 13, 12567, 13, 952, 14, 51, 44917, 82, 14, 7959, 14, 31126, 14, 83, 22544, 62, 71, 2981, 2411, 3477, 414, 14, 198, 2, 3423, 314, 9902, 340, 284, 513, 35, 290, 2087, 15841, 494, 1912, 2746, 5874, 5612, 13, 220, 198, 198, 2, 5740, 428, 2438, 3058, 4433, 25, 2361, 751, 15841, 494, 31, 15, 13, 1314, 13, 17, 10188, 44, 461, 494, 31, 15, 13, 19, 13, 21, 198, 198, 3500, 24846, 499, 220, 198, 3500, 24846, 499, 13, 36259, 1634, 198, 3500, 24846, 499, 13, 26687, 15112, 82, 198, 3500, 24846, 499, 13, 10082, 15748, 198, 3500, 9220, 9399, 198, 3500, 6910, 50, 451, 2052, 25, 5157, 2898, 5430, 198, 3500, 10188, 44, 461, 494, 11, 2269, 15748, 15522, 873, 198, 3500, 29792, 11, 5315, 27054, 6880, 198, 198, 2, 2269, 15748, 290, 11843, 10007, 198, 39873, 62, 27740, 796, 685, 16, 11, 16, 11, 16, 60, 1303, 36674, 15225, 198, 22510, 36, 10671, 220, 220, 220, 796, 685, 20, 11, 20, 11, 20, 60, 1303, 15057, 286, 4847, 287, 1123, 4571, 198, 6381, 79, 62, 9806, 220, 220, 796, 657, 13, 18, 1303, 40541, 29358, 198, 6381, 79, 62, 1939, 220, 220, 796, 4596, 62, 9806, 14, 940, 1303, 5960, 1202, 29358, 18703, 583, 2239, 198, 16863, 220, 220, 220, 220, 796, 362, 1303, 37031, 1502, 198, 198, 2, 14633, 10007, 198, 9979, 7377, 119, 796, 1802, 13, 15, 198, 9979, 18919, 796, 352, 13, 15, 198, 198, 2, 1024, 1161, 17701, 1153, 198, 37, 7, 24861, 229, 84, 8, 796, 530, 7, 24861, 229, 84, 8, 1343, 18872, 229, 84, 6, 198, 198, 2, 46751, 666, 796, 6115, 8064, 198, 41, 7, 37, 8, 796, 19862, 17034, 7, 15255, 7, 34, 7, 37, 22305, 220, 198, 198, 2, 13719, 12, 43, 363, 9521, 14022, 198, 2, 36, 7, 37, 8, 796, 657, 13, 20, 9, 7, 376, 6, 9, 37, 532, 530, 7, 37, 8, 1267, 1303, 13719, 12, 43, 363, 9521, 14022, 198, 67, 36, 7, 24861, 229, 646, 11, 24861, 229, 84, 8, 796, 657, 13, 20, 9, 7, 18872, 229, 646, 158, 233, 227, 37, 7, 24861, 229, 84, 8, 1343, 357, 24861, 229, 646, 158, 233, 227, 37, 7, 24861, 229, 84, 4008, 6, 1267, 198, 198, 2, 6498, 327, 559, 29658, 12, 14809, 390, 1161, 11192, 273, 198, 34, 7, 37, 8, 796, 357, 37, 11537, 158, 233, 227, 37, 198, 198, 2, 367, 2981, 2411, 3477, 7892, 8827, 1099, 329, 262, 21227, 8169, 2088, 272, 2587, 198, 8818, 311, 7, 24861, 229, 84, 8, 198, 220, 327, 16340, 796, 800, 7, 34, 7, 37, 7, 24861, 229, 84, 22305, 1303, 818, 4399, 286, 327, 1312, 13, 68, 13, 347, 198, 220, 18919, 9, 7, 505, 7, 24861, 229, 84, 13219, 34, 16340, 8, 1343, 7377, 119, 9, 6404, 7, 41, 7, 37, 7, 24861, 229, 84, 22305, 9, 34, 16340, 198, 437, 198, 198, 8818, 288, 50, 7, 24861, 229, 646, 11, 24861, 229, 84, 8, 198, 220, 327, 16340, 796, 800, 7, 34, 7, 37, 7, 24861, 229, 84, 22305, 198, 220, 4808, 67, 36, 796, 288, 36, 7, 24861, 229, 646, 11, 24861, 229, 84, 8, 198, 220, 7377, 119, 9, 7, 34, 16340, 158, 232, 247, 62, 67, 36, 27493, 34, 16340, 1343, 362, 9, 7, 34703, 12, 39377, 9, 6404, 7, 41, 7, 37, 7, 24861, 229, 84, 35514, 9, 34, 16340, 158, 233, 227, 62, 67, 36, 158, 233, 227, 7, 34, 16340, 11537, 198, 437, 198, 198, 2, 327, 559, 29658, 5503, 11192, 273, 198, 38392, 7, 24861, 229, 84, 8, 796, 357, 16, 13, 15, 14, 41, 7, 37, 7, 24861, 229, 84, 22305, 9, 37, 7, 24861, 229, 84, 8, 158, 233, 227, 50, 7, 24861, 229, 84, 8, 158, 233, 227, 7, 37, 7, 24861, 229, 84, 4008, 6, 198, 198, 2, 9104, 198, 27830, 796, 357, 15, 11, 39873, 62, 27740, 58, 16, 4357, 15, 11, 39873, 62, 27740, 58, 17, 4357, 15, 11, 39873, 62, 27740, 58, 18, 12962, 198, 3911, 653, 796, 357, 22510, 36, 10671, 58, 16, 4357, 22510, 36, 10671, 58, 17, 4357, 22510, 36, 10671, 58, 18, 12962, 198, 19849, 796, 13690, 35610, 15642, 8374, 17633, 7, 27830, 11, 3911, 653, 8, 198, 198, 2, 2896, 500, 649, 13215, 198, 23912, 1424, 796, 651, 62, 2550, 62, 18242, 278, 7, 19849, 8, 198, 2860, 62, 12985, 62, 6738, 62, 31499, 0, 7, 23912, 1424, 553, 67, 14783, 62, 15, 1600, 58, 16, 11, 18, 11, 20, 11, 22, 11, 1485, 11, 1314, 11, 1558, 11, 1129, 11, 1495, 12962, 198, 2860, 62, 12985, 62, 6738, 62, 31499, 0, 7, 23912, 1424, 553, 67, 14783, 62, 16, 1600, 58, 17, 11, 19, 11, 21, 11, 23, 11, 1415, 11, 1433, 11, 1507, 11, 1238, 11, 2075, 12962, 198, 198, 2, 31122, 11812, 198, 138, 102, 796, 7563, 648, 1741, 7, 19849, 8, 198, 67, 138, 102, 796, 24291, 7, 138, 102, 11, 16863, 8, 198, 198, 2, 28788, 1296, 198, 411, 7, 84, 11, 85, 8, 796, 18872, 104, 7, 357, 67, 36, 24861, 246, 7, 24861, 229, 7, 85, 828, 24861, 229, 7, 84, 22305, 2343, 232, 247, 357, 50, 24861, 246, 24861, 229, 7, 84, 4008, 1267, 9, 67, 138, 102, 198, 198, 30482, 62, 6759, 7, 84, 11, 646, 11, 85, 8, 796, 220, 18872, 104, 7, 357, 67, 36, 24861, 246, 7, 24861, 229, 7, 85, 828, 24861, 229, 7, 84, 22305, 2343, 232, 247, 357, 67, 50, 24861, 246, 7, 24861, 229, 7, 646, 828, 24861, 229, 7, 84, 22305, 1267, 9, 67, 138, 102, 198, 198, 30482, 62, 469, 78, 7, 84, 11, 646, 11, 85, 8, 796, 18872, 104, 7, 18872, 229, 7, 85, 8, 2343, 232, 247, 357, 357, 50, 24861, 246, 24861, 229, 7, 84, 4008, 158, 233, 227, 24861, 229, 7, 646, 8, 1267, 1267, 9, 67, 138, 102, 198, 198, 30482, 7, 84, 11, 646, 11, 85, 8, 796, 474, 330, 62, 6759, 7, 84, 11, 646, 11, 85, 8, 1343, 474, 330, 62, 469, 78, 7, 84, 11, 646, 11, 85, 8, 198, 198, 2, 28407, 262, 18630, 13200, 198, 260, 16658, 796, 20984, 15112, 7, 30909, 36985, 666, 11, 38469, 11395, 90, 18, 11, 43879, 2414, 5512, 16, 8, 198, 53, 796, 6208, 37, 1546, 10223, 7, 19849, 11, 260, 16658, 11, 1102, 687, 414, 28, 25, 39, 16, 11, 15908, 488, 1616, 62, 31499, 796, 14631, 67, 14783, 62, 15, 1600, 366, 67, 14783, 62, 16, 8973, 8, 198, 198, 2, 31122, 1729, 12, 29127, 1540, 332, 198, 77, 7278, 796, 399, 6561, 14375, 7, 12860, 62, 40546, 28, 7942, 11, 24396, 28, 25, 3605, 1122, 11, 6615, 3679, 28, 7282, 2898, 5430, 28955, 198, 82, 14375, 796, 376, 1546, 14375, 7, 77, 7278, 8, 198, 198, 8818, 1057, 7, 87, 15, 11, 6381, 79, 62, 87, 11, 9662, 11, 77, 20214, 11, 23870, 8, 628, 220, 308, 15, 796, 20650, 11395, 7, 15, 13, 15, 11, 15, 13, 15, 11, 15, 13, 15, 8, 198, 220, 308, 16, 796, 20650, 11395, 7, 6381, 79, 62, 87, 11, 15, 13, 15, 11, 15, 13, 15, 8, 198, 220, 471, 796, 21960, 37, 1546, 10223, 7, 53, 17414, 70, 15, 11, 70, 16, 12962, 628, 220, 1303, 15112, 1917, 198, 220, 1034, 796, 376, 4720, 525, 1352, 7, 411, 11, 30482, 11, 52, 11, 53, 8, 628, 220, 44872, 7203, 59, 77, 45340, 4294, 1075, 329, 4596, 62, 87, 720, 6381, 79, 62, 87, 287, 2239, 720, 9662, 286, 720, 77, 20214, 49954, 59, 77, 4943, 628, 220, 21480, 796, 18630, 22203, 7, 52, 11, 87, 15, 8, 628, 220, 21480, 11, 12940, 796, 8494, 0, 7, 7456, 11, 82, 14375, 11, 404, 11, 23870, 8, 628, 220, 1441, 651, 62, 5787, 62, 67, 1659, 62, 27160, 7, 7456, 828, 21480, 11, 12940, 198, 198, 437, 198, 198, 8818, 4539, 7, 6381, 79, 62, 9806, 11, 6381, 79, 62, 1939, 8, 628, 299, 20214, 796, 2906, 346, 7, 5317, 11, 8937, 7, 6381, 79, 62, 9806, 20679, 6381, 79, 62, 1939, 8, 628, 2124, 15, 796, 1976, 27498, 7, 43879, 2414, 11, 22510, 62, 5787, 62, 67, 1659, 82, 7, 53, 4008, 198, 18666, 282, 7279, 489, 28613, 796, 20650, 90, 38469, 90, 38469, 11395, 90, 18, 11, 48436, 2414, 42535, 7, 917, 891, 11, 77, 20214, 10, 16, 8, 628, 12940, 796, 2147, 198, 329, 2239, 287, 352, 25, 77, 20214, 198, 220, 4596, 62, 87, 796, 2239, 1635, 4596, 62, 9806, 1220, 299, 20214, 198, 220, 2124, 15, 11, 21480, 11, 12940, 796, 1057, 7, 87, 15, 11, 6381, 79, 62, 87, 11, 9662, 11, 77, 20214, 11, 23870, 8, 628, 220, 410, 67, 796, 32704, 62, 7890, 7, 138, 102, 553, 1600, 3846, 25747, 28, 14692, 84, 1, 14804, 7456, 12962, 198, 220, 18666, 282, 7279, 489, 28613, 58, 9662, 10, 16, 60, 796, 410, 67, 58, 16, 4083, 77, 375, 1940, 1045, 14692, 84, 8973, 198, 886, 198, 220, 198, 18666, 282, 7279, 489, 28613, 58, 16, 22241, 77, 375, 282, 7279, 489, 28613, 58, 17, 4083, 9, 15, 1303, 4550, 1976, 27498, 329, 4238, 1181, 628, 1441, 18666, 282, 7279, 489, 28613, 198, 437, 628, 198, 8818, 13760, 2514, 12727, 2617, 7, 53, 8, 198, 220, 1303, 3103, 1851, 10706, 499, 20435, 2099, 284, 15841, 494, 6252, 18, 69, 2099, 198, 220, 350, 28, 38469, 90, 10082, 15748, 15522, 873, 13, 12727, 90, 18, 11, 48436, 2624, 11709, 7, 917, 891, 11, 7857, 7, 53, 11, 16, 4008, 198, 220, 329, 10662, 28, 16, 25, 16, 25, 7857, 7, 53, 11, 16, 8, 198, 220, 220, 220, 350, 58, 80, 22241, 1102, 1851, 7, 10082, 15748, 15522, 873, 13, 12727, 11, 1102, 1851, 7, 51, 29291, 90, 43879, 2414, 11, 48436, 2414, 11, 48436, 2414, 5512, 53, 58, 80, 60, 4008, 198, 220, 886, 198, 220, 1441, 350, 198, 437, 198, 198, 8818, 10385, 2514, 32388, 12727, 7248, 7, 138, 102, 8, 198, 220, 1303, 10468, 8410, 25, 48282, 584, 5002, 3858, 11, 17910, 3784, 421, 5643, 691, 3402, 994, 628, 220, 1303, 3855, 10706, 499, 5002, 290, 10139, 16969, 198, 220, 1303, 412, 28, 138, 102, 13, 3846, 62, 17440, 62, 2340, 58, 47715, 1303, 36, 3639, 198, 220, 1303, 569, 28, 138, 102, 13, 17440, 62, 1073, 3669, 58, 47715, 1303, 45, 4147, 14, 42369, 1063, 198, 220, 410, 67, 28, 41464, 1634, 62, 7890, 7, 138, 102, 553, 15341, 198, 220, 10706, 796, 410, 67, 58, 16, 4083, 25928, 198, 220, 412, 796, 651, 62, 3846, 62, 17440, 62, 2340, 7, 25928, 8, 198, 220, 569, 796, 651, 62, 17440, 62, 37652, 17540, 7, 25928, 8, 628, 220, 1303, 3855, 6698, 290, 10385, 284, 20648, 32388, 2099, 198, 220, 376, 28, 38469, 90, 4507, 324, 32388, 90, 5317, 2414, 11709, 7, 917, 891, 11, 7857, 7, 36, 11, 16, 27493, 21, 8, 198, 220, 329, 10662, 28, 16, 25, 16, 25, 7857, 7, 36, 11, 16, 8, 220, 220, 220, 220, 198, 220, 220, 220, 376, 58, 80, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 16, 11, 17, 11, 19, 11, 18, 4357, 16, 12962, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4852, 198, 220, 220, 220, 376, 58, 80, 10, 7857, 7, 36, 11, 16, 27493, 16, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 20, 11, 21, 11, 23, 11, 22, 4357, 16, 12962, 1303, 22487, 198, 220, 220, 220, 376, 58, 80, 10, 7857, 7, 36, 11, 16, 27493, 17, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 16, 11, 17, 11, 21, 11, 20, 4357, 16, 12962, 1303, 1589, 352, 198, 220, 220, 220, 376, 58, 80, 10, 7857, 7, 36, 11, 16, 27493, 18, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 19, 11, 18, 11, 22, 11, 23, 4357, 16, 12962, 1303, 1589, 362, 198, 220, 220, 220, 376, 58, 80, 10, 7857, 7, 36, 11, 16, 27493, 19, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 17, 11, 19, 11, 23, 11, 21, 4357, 16, 12962, 1303, 8534, 198, 220, 220, 220, 376, 58, 80, 10, 7857, 7, 36, 11, 16, 27493, 20, 22241, 1102, 1851, 7, 4507, 324, 32388, 90, 5317, 2414, 5512, 36, 58, 80, 7131, 58, 18, 11, 16, 11, 20, 11, 22, 4357, 16, 12962, 1303, 1891, 198, 220, 886, 628, 220, 1303, 16447, 1986, 2099, 14722, 198, 220, 1986, 6030, 33986, 41888, 1952, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 16, 26, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3392, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 17, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3392, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 18, 26, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3392, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 19, 26, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3392, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 20, 26, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3392, 7, 5317, 2414, 11, 7857, 7, 36, 11, 16, 4008, 9, 21, 26, 60, 628, 220, 350, 28, 77, 4147, 2514, 12727, 2617, 7, 53, 8, 628, 220, 1441, 350, 11, 37, 11, 1986, 6030, 33986, 198, 437, 628, 198, 2, 5211, 262, 670, 0, 198, 77, 375, 282, 7279, 489, 28613, 796, 4539, 7, 6381, 79, 62, 9806, 11, 6381, 79, 62, 1939, 8, 198, 198, 2, 16447, 285, 461, 494, 11670, 1986, 290, 966, 900, 198, 4122, 7248, 11, 2550, 7248, 11, 2550, 6030, 33986, 28, 1102, 1851, 2514, 32388, 12727, 7248, 7, 138, 102, 8, 628, 198, 8818, 651, 7222, 585, 8600, 7, 138, 102, 11, 77, 375, 282, 7279, 489, 5592, 8, 198, 220, 410, 67, 796, 32704, 62, 7890, 7, 138, 102, 553, 4943, 198, 220, 10706, 796, 410, 67, 58, 16, 4083, 25928, 198, 220, 569, 796, 651, 62, 17440, 62, 37652, 17540, 7, 25928, 8, 198, 220, 569, 17, 28, 569, 1343, 18666, 282, 7279, 489, 5592, 198, 220, 966, 7248, 17, 28, 77, 4147, 2514, 12727, 2617, 7, 53, 17, 8, 198, 220, 1441, 966, 7248, 17, 198, 437, 198, 198, 8818, 651, 48017, 3984, 7, 52, 8, 198, 220, 337, 28, 9107, 418, 7, 7857, 7, 52, 11, 16, 4008, 198, 220, 329, 10662, 28, 16, 25, 16, 25, 7857, 7, 52, 11, 16, 8, 198, 220, 220, 220, 337, 58, 80, 22241, 31166, 17034, 7, 52, 58, 80, 7131, 16, 60, 61, 17, 1343, 471, 58, 80, 7131, 17, 60, 61, 17, 1343, 471, 58, 80, 7131, 18, 60, 61, 17, 8, 198, 220, 886, 198, 220, 1441, 337, 198, 437, 198, 198, 4122, 7248, 28, 1136, 7222, 585, 8600, 7, 138, 102, 11, 77, 375, 282, 7279, 489, 28613, 58, 16, 12962, 198, 198, 2, 38, 1032, 1986, 290, 966, 900, 355, 2269, 15748, 15522, 873, 19609, 198, 44, 28, 10082, 15748, 15522, 873, 13, 37031, 7, 4122, 7248, 11, 2550, 7248, 8, 198, 198, 77, 375, 282, 10258, 28, 1136, 48017, 3984, 7, 77, 375, 282, 7279, 489, 28613, 58, 16, 12962, 198, 198, 2, 36259, 1096, 19609, 198, 5647, 796, 11291, 3419, 198, 198, 6649, 62, 9662, 796, 3454, 1304, 7, 5647, 58, 17, 11, 352, 4357, 2837, 796, 352, 25, 16, 25, 7857, 7, 77, 375, 282, 7279, 489, 28613, 11, 16, 828, 923, 8367, 796, 2546, 7, 77, 375, 282, 7279, 489, 28613, 11, 16, 4008, 198, 198, 77, 375, 282, 10258, 796, 10303, 7, 6649, 62, 9662, 13, 8367, 8, 466, 2239, 15732, 198, 220, 651, 48017, 3984, 7, 77, 375, 282, 7279, 489, 28613, 58, 9662, 15732, 12962, 198, 437, 198, 198, 44, 796, 10303, 7, 6649, 62, 9662, 13, 8367, 8, 466, 2239, 15732, 198, 220, 2269, 15748, 15522, 873, 13, 37031, 7, 1136, 7222, 585, 8600, 7, 138, 102, 11, 77, 375, 282, 7279, 489, 28613, 58, 9662, 15732, 46570, 2550, 7248, 8, 198, 437, 198, 198, 7839, 10100, 796, 10303, 7, 6649, 62, 9662, 13, 8367, 8, 466, 2239, 15732, 198, 220, 366, 8600, 25, 366, 9, 8841, 7, 9662, 15732, 12, 16, 8, 198, 437, 198, 198, 897, 28, 31554, 271, 18, 7, 5647, 58, 16, 11, 352, 4357, 4843, 796, 1058, 7890, 11, 2124, 18242, 796, 366, 55, 1600, 331, 18242, 796, 366, 56, 1600, 1976, 18242, 796, 366, 57, 1600, 3670, 796, 3670, 10100, 8, 198, 24831, 28, 35428, 0, 7, 44, 11, 14000, 10394, 28, 16, 11, 1477, 4980, 28, 9562, 11, 8043, 28, 77, 375, 282, 10258, 11, 13902, 28, 9562, 11, 14904, 1831, 28, 9562, 11, 198, 4033, 579, 499, 796, 357, 36982, 7, 13381, 13, 15, 11, 22951, 13, 15, 11, 657, 13, 15, 20679, 13381, 11, 36982, 7, 15, 13, 15, 11, 10083, 13, 15, 11, 28551, 13, 15, 20679, 13381, 828, 8043, 9521, 16193, 15, 11, 6381, 79, 62, 9806, 4008, 198, 10258, 5657, 7, 5647, 58, 16, 11, 362, 4357, 24831, 13, 489, 1747, 58, 16, 4357, 18242, 796, 366, 7279, 489, 5592, 14735, 685, 3020, 60, 4943, 198, 5647, 198, 198, 2, 7877, 28, 31554, 271, 18, 7, 5647, 58, 16, 11, 352, 4357, 4843, 796, 1058, 7890, 11, 2124, 18242, 796, 366, 55, 1600, 331, 18242, 796, 366, 56, 1600, 1976, 18242, 796, 366, 57, 1600, 3670, 796, 3670, 10100, 8, 198, 2, 27673, 28, 35428, 0, 7, 44, 11, 14000, 10394, 28, 18, 11, 1477, 4980, 28, 7942, 11, 8043, 28, 77, 375, 282, 10258, 11, 13902, 28, 9562, 11, 14904, 1831, 28, 9562, 198, 2, 837, 4033, 579, 499, 796, 31849, 7, 25, 49738, 1373, 828, 8043, 9521, 16193, 15, 11, 15, 13, 23, 4008, 198, 2, 5315, 5657, 7, 5647, 58, 16, 11, 362, 4357, 24831, 13, 489, 1747, 58, 16, 4357, 18242, 796, 366, 7279, 489, 5592, 14735, 685, 3020, 60, 4943, 198, 2, 2336, 198 ]
2.127701
3,101
{"score": 8.04, "timestamp": 1580207216.0, "score_count": 256261} {"score": 8.06, "timestamp": 1567156859.0, "score_count": 246192} {"score": 8.06, "timestamp": 1566888606.0, "score_count": 245781} {"score": 8.06, "timestamp": 1565672254.0, "score_count": 244871} {"score": 8.06, "timestamp": 1565469084.0, "score_count": 244871} {"score": 8.06, "timestamp": 1565467411.0, "score_count": 244871} {"score": 8.06, "timestamp": 1565143938.0, "score_count": 244453} {"score": 8.06, "timestamp": 1565141737.0, "score_count": 244453} {"score": 8.06, "timestamp": 1565136435.0, "score_count": 244453} {"score": 8.06, "timestamp": 1565087565.0, "score_count": 244453} {"score": 8.06, "timestamp": 1564853335.0, "score_count": 244453} {"score": 8.06, "timestamp": 1564844609.0, "score_count": 244453} {"score": 8.06, "timestamp": 1564796503.0, "score_count": 244453} {"score": 8.06, "timestamp": 1564529822.0, "score_count": 244155} {"score": 8.06, "timestamp": 1564455235.0, "score_count": 244155} {"score": 8.07, "timestamp": 1561629271.0, "score_count": 242413} {"score": 8.07, "timestamp": 1553317857.0, "score_count": 237858} {"score": 8.11, "timestamp": 1516251698.0, "score_count": 213492} {"score": 8.18, "timestamp": 1475839536.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839535.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839530.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839525.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839521.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839515.0, "score_count": 179925} {"score": 8.18, "timestamp": 1475839516.0, "score_count": 179925} {"score": 8.21, "timestamp": 1462139731.0, "score_count": 166609} {"score": 8.21, "timestamp": 1460755342.0, "score_count": 165208} {"score": 8.25, "timestamp": 1444982827.0, "score_count": 150171} {"score": 8.25, "timestamp": 1442286846.0, "score_count": 147979} {"score": 8.25, "timestamp": 1441705769.0, "score_count": 147531} {"score": 8.26, "timestamp": 1439553727.0, "score_count": 145625} {"score": 8.06, "timestamp": 1564357491.0, "score_count": 244155} {"score": 8.06, "timestamp": 1563037380.0, "score_count": 243384} {"score": 8.06, "timestamp": 1562902104.0, "score_count": 243384} {"score": 8.06, "timestamp": 1562190526.0, "score_count": 242743} {"score": 8.06, "timestamp": 1561844942.0, "score_count": 242743} {"score": 8.06, "timestamp": 1561836533.0, "score_count": 242743} {"score": 8.07, "timestamp": 1561523365.0, "score_count": 242413} {"score": 8.07, "timestamp": 1561253409.0, "score_count": 242413} {"score": 8.07, "timestamp": 1561164753.0, "score_count": 242103} {"score": 8.07, "timestamp": 1560997683.0, "score_count": 242103} {"score": 8.07, "timestamp": 1560892794.0, "score_count": 242103} {"score": 8.07, "timestamp": 1560828587.0, "score_count": 242103} {"score": 8.07, "timestamp": 1560817712.0, "score_count": 242103} {"score": 8.07, "timestamp": 1560545428.0, "score_count": 241838} {"score": 8.07, "timestamp": 1560398612.0, "score_count": 241838} {"score": 8.07, "timestamp": 1560290569.0, "score_count": 241838} {"score": 8.07, "timestamp": 1560246048.0, "score_count": 241838} {"score": 8.07, "timestamp": 1560193280.0, "score_count": 241838} {"score": 8.07, "timestamp": 1560056740.0, "score_count": 241711} {"score": 8.07, "timestamp": 1560031181.0, "score_count": 241711} {"score": 8.07, "timestamp": 1560019574.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559962538.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559956315.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559953411.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559946789.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559943966.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559940608.0, "score_count": 241711} {"score": 8.07, "timestamp": 1559869766.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559843427.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559838796.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559785813.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559773367.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559760117.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559701080.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559678935.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559626276.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559620876.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559404640.0, "score_count": 241418} {"score": 8.07, "timestamp": 1559323906.0, "score_count": 241207} {"score": 8.07, "timestamp": 1559259561.0, "score_count": 241207} {"score": 8.07, "timestamp": 1559185494.0, "score_count": 241207} {"score": 8.07, "timestamp": 1559064963.0, "score_count": 241207} {"score": 8.07, "timestamp": 1559003064.0, "score_count": 241027} {"score": 8.07, "timestamp": 1558980303.0, "score_count": 241027} {"score": 8.07, "timestamp": 1558883092.0, "score_count": 241027} {"score": 8.07, "timestamp": 1558826329.0, "score_count": 241027} {"score": 8.07, "timestamp": 1558803746.0, "score_count": 241027} {"score": 8.07, "timestamp": 1558710714.0, "score_count": 240893} {"score": 8.07, "timestamp": 1558567358.0, "score_count": 240893} {"score": 8.07, "timestamp": 1558464124.0, "score_count": 240703} {"score": 8.07, "timestamp": 1558463519.0, "score_count": 240703} {"score": 8.07, "timestamp": 1558457680.0, "score_count": 240703} {"score": 8.07, "timestamp": 1558047513.0, "score_count": 240579} {"score": 8.07, "timestamp": 1557581323.0, "score_count": 240309} {"score": 8.07, "timestamp": 1557518565.0, "score_count": 240309} {"score": 8.07, "timestamp": 1557369276.0, "score_count": 240186} {"score": 8.07, "timestamp": 1557282456.0, "score_count": 240186} {"score": 8.07, "timestamp": 1557100566.0, "score_count": 239873} {"score": 8.07, "timestamp": 1557097815.0, "score_count": 239873} {"score": 8.07, "timestamp": 1557077344.0, "score_count": 239873} {"score": 8.07, "timestamp": 1557019008.0, "score_count": 239873} {"score": 8.07, "timestamp": 1556833177.0, "score_count": 239873} {"score": 8.07, "timestamp": 1556832100.0, "score_count": 239873} {"score": 8.07, "timestamp": 1556655929.0, "score_count": 239729} {"score": 8.07, "timestamp": 1556638052.0, "score_count": 239729} {"score": 8.07, "timestamp": 1556632641.0, "score_count": 239729} {"score": 8.07, "timestamp": 1556508052.0, "score_count": 239729} {"score": 8.07, "timestamp": 1556396947.0, "score_count": 239609} {"score": 8.07, "timestamp": 1556311418.0, "score_count": 239609} {"score": 8.07, "timestamp": 1556236238.0, "score_count": 239609} {"score": 8.07, "timestamp": 1556141272.0, "score_count": 239444} {"score": 8.07, "timestamp": 1556057467.0, "score_count": 239444} {"score": 8.07, "timestamp": 1555967573.0, "score_count": 239444} {"score": 8.07, "timestamp": 1555446393.0, "score_count": 239162} {"score": 8.07, "timestamp": 1555378287.0, "score_count": 238978} {"score": 8.07, "timestamp": 1555205983.0, "score_count": 238978} {"score": 8.07, "timestamp": 1555017773.0, "score_count": 238832} {"score": 8.07, "timestamp": 1554949617.0, "score_count": 238832} {"score": 8.07, "timestamp": 1554929234.0, "score_count": 238832} {"score": 8.07, "timestamp": 1554586524.0, "score_count": 238529} {"score": 8.07, "timestamp": 1554413105.0, "score_count": 238529} {"score": 8.07, "timestamp": 1554412442.0, "score_count": 238529} {"score": 8.07, "timestamp": 1554392756.0, "score_count": 238529} {"score": 8.07, "timestamp": 1554059339.0, "score_count": 238316} {"score": 8.07, "timestamp": 1553975343.0, "score_count": 238180} {"score": 8.07, "timestamp": 1553969103.0, "score_count": 238180} {"score": 8.07, "timestamp": 1553823754.0, "score_count": 238180} {"score": 8.07, "timestamp": 1553805854.0, "score_count": 238180} {"score": 8.07, "timestamp": 1553634444.0, "score_count": 238023} {"score": 8.07, "timestamp": 1553633529.0, "score_count": 238023} {"score": 8.07, "timestamp": 1553557633.0, "score_count": 238023} {"score": 8.07, "timestamp": 1553402886.0, "score_count": 237858} {"score": 8.07, "timestamp": 1553319046.0, "score_count": 237858} {"score": 8.07, "timestamp": 1553317869.0, "score_count": 237858} {"score": 8.07, "timestamp": 1553313735.0, "score_count": 237858} {"score": 8.07, "timestamp": 1553289134.0, "score_count": 237858} {"score": 8.07, "timestamp": 1553216620.0, "score_count": 237690} {"score": 8.07, "timestamp": 1553135565.0, "score_count": 237690} {"score": 8.07, "timestamp": 1553130946.0, "score_count": 237690} {"score": 8.07, "timestamp": 1553128587.0, "score_count": 237690} {"score": 8.07, "timestamp": 1552987210.0, "score_count": 237543} {"score": 8.07, "timestamp": 1552782150.0, "score_count": 237543} {"score": 8.07, "timestamp": 1552773730.0, "score_count": 237543} {"score": 8.07, "timestamp": 1552747773.0, "score_count": 237543} {"score": 8.07, "timestamp": 1552680529.0, "score_count": 237422} {"score": 8.07, "timestamp": 1552599311.0, "score_count": 237422} {"score": 8.07, "timestamp": 1552528857.0, "score_count": 237422} {"score": 8.07, "timestamp": 1552508398.0, "score_count": 237422} {"score": 8.07, "timestamp": 1552421589.0, "score_count": 237260} {"score": 8.07, "timestamp": 1552363442.0, "score_count": 237260} {"score": 8.07, "timestamp": 1552339350.0, "score_count": 237260} {"score": 8.07, "timestamp": 1552254323.0, "score_count": 237260} {"score": 8.07, "timestamp": 1552230176.0, "score_count": 237260} {"score": 8.07, "timestamp": 1552184939.0, "score_count": 237067} {"score": 8.07, "timestamp": 1552147466.0, "score_count": 237067} {"score": 8.07, "timestamp": 1552100757.0, "score_count": 237067} {"score": 8.07, "timestamp": 1552091195.0, "score_count": 237067} {"score": 8.07, "timestamp": 1552012358.0, "score_count": 237067} {"score": 8.07, "timestamp": 1551907103.0, "score_count": 236892} {"score": 8.07, "timestamp": 1551580898.0, "score_count": 236688} {"score": 8.07, "timestamp": 1551313462.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551224789.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551221944.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551215674.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551139812.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551128162.0, "score_count": 236533} {"score": 8.07, "timestamp": 1551061505.0, "score_count": 236317} {"score": 8.07, "timestamp": 1551059095.0, "score_count": 236317} {"score": 8.07, "timestamp": 1551045165.0, "score_count": 236317} {"score": 8.07, "timestamp": 1551025052.0, "score_count": 236317} {"score": 8.07, "timestamp": 1551019828.0, "score_count": 236317} {"score": 8.07, "timestamp": 1550977088.0, "score_count": 236317} {"score": 8.07, "timestamp": 1550944896.0, "score_count": 236317} {"score": 8.07, "timestamp": 1550697923.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550696168.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550627487.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550621987.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550618620.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550539980.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550511362.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550450092.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550448923.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550425432.0, "score_count": 236101} {"score": 8.07, "timestamp": 1550283921.0, "score_count": 235909} {"score": 8.07, "timestamp": 1550272963.0, "score_count": 235909} {"score": 8.07, "timestamp": 1550193416.0, "score_count": 235909} {"score": 8.08, "timestamp": 1550017054.0, "score_count": 235703} {"score": 8.08, "timestamp": 1550006592.0, "score_count": 235703} {"score": 8.08, "timestamp": 1550005032.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549945599.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549930154.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549925479.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549907089.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549846558.0, "score_count": 235703} {"score": 8.08, "timestamp": 1549752038.0, "score_count": 235703} {"score": 8.08, "timestamp": 1548612648.0, "score_count": 234973} {"score": 8.08, "timestamp": 1547324635.0, "score_count": 234000} {"score": 8.08, "timestamp": 1545418256.0, "score_count": 232888} {"score": 8.08, "timestamp": 1545349675.0, "score_count": 232677} {"score": 8.08, "timestamp": 1545087179.0, "score_count": 232677} {"score": 8.08, "timestamp": 1539895330.0, "score_count": 229769} {"score": 8.09, "timestamp": 1536798557.0, "score_count": 227840} {"score": 8.09, "timestamp": 1534942311.0, "score_count": 226665} {"score": 8.09, "timestamp": 1530985863.0, "score_count": 224287} {"score": 8.09, "timestamp": 1529074145.0, "score_count": 223706} {"score": 8.09, "timestamp": 1528939429.0, "score_count": 223665} {"score": 8.09, "timestamp": 1528923676.0, "score_count": 223665} {"score": 8.1, "timestamp": 1526547588.0, "score_count": 222352} {"score": 8.1, "timestamp": 1525237024.0, "score_count": 221360} {"score": 8.1, "timestamp": 1522273227.0, "score_count": 218643} {"score": 8.11, "timestamp": 1520558798.0, "score_count": 217156} {"score": 8.15, "timestamp": 1492438459.0, "score_count": 193604} {"score": 8.15, "timestamp": 1492432480.0, "score_count": 193604} {"score": 8.16, "timestamp": 1487116102.0, "score_count": 189287} {"score": 8.16, "timestamp": 1485886390.0, "score_count": 188256} {"score": 8.16, "timestamp": 1484582824.0, "score_count": 187070} {"score": 8.16, "timestamp": 1484582656.0, "score_count": 187070} {"score": 8.19, "timestamp": 1472985550.0, "score_count": 177231} {"score": 8.19, "timestamp": 1472985549.0, "score_count": 177231} {"score": 8.19, "timestamp": 1471570309.0, "score_count": 175883} {"score": 8.19, "timestamp": 1468025360.0, "score_count": 172390} {"score": 8.2, "timestamp": 1466066175.0, "score_count": 170252} {"score": 8.2, "timestamp": 1465515181.0, "score_count": 169701} {"score": 8.2, "timestamp": 1464843282.0, "score_count": 169062} {"score": 8.21, "timestamp": 1463801656.0, "score_count": 168059} {"score": 8.21, "timestamp": 1461846842.0, "score_count": 166352} {"score": 8.21, "timestamp": 1461581561.0, "score_count": 166105} {"score": 8.21, "timestamp": 1461255784.0, "score_count": 165782} {"score": 8.21, "timestamp": 1460535721.0, "score_count": 165024} {"score": 8.21, "timestamp": 1459930972.0, "score_count": 164366} {"score": 8.21, "timestamp": 1459324804.0, "score_count": 163636} {"score": 8.22, "timestamp": 1458292227.0, "score_count": 162454} {"score": 8.22, "timestamp": 1458175372.0, "score_count": 162332} {"score": 8.22, "timestamp": 1458121649.0, "score_count": 162292} {"score": 8.22, "timestamp": 1457606419.0, "score_count": 161708} {"score": 8.22, "timestamp": 1457499231.0, "score_count": 161534} {"score": 8.22, "timestamp": 1456808459.0, "score_count": 160941} {"score": 8.22, "timestamp": 1455635742.0, "score_count": 159820} {"score": 8.22, "timestamp": 1454983486.0, "score_count": 159250} {"score": 8.22, "timestamp": 1454372576.0, "score_count": 158720} {"score": 8.23, "timestamp": 1453763673.0, "score_count": 158171} {"score": 8.23, "timestamp": 1453156506.0, "score_count": 157575} {"score": 8.23, "timestamp": 1452411517.0, "score_count": 156753} {"score": 8.23, "timestamp": 1452983213.0, "score_count": 157398} {"score": 8.23, "timestamp": 1452077136.0, "score_count": 156348} {"score": 8.23, "timestamp": 1451761815.0, "score_count": 155917} {"score": 8.23, "timestamp": 1451612800.0, "score_count": 155774} {"score": 8.23, "timestamp": 1451035607.0, "score_count": 155138} {"score": 8.24, "timestamp": 1450404652.0, "score_count": 154564} {"score": 8.24, "timestamp": 1449791564.0, "score_count": 153961} {"score": 8.24, "timestamp": 1448603222.0, "score_count": 153050} {"score": 8.24, "timestamp": 1448598965.0, "score_count": 153047} {"score": 8.24, "timestamp": 1447988532.0, "score_count": 152602} {"score": 8.24, "timestamp": 1446774591.0, "score_count": 151652} {"score": 8.24, "timestamp": 1446153694.0, "score_count": 151152} {"score": 8.25, "timestamp": 1445549203.0, "score_count": 150651} {"score": 8.25, "timestamp": 1444934965.0, "score_count": 150121} {"score": 8.25, "timestamp": 1443245388.0, "score_count": 148725} {"score": 8.25, "timestamp": 1441518519.0, "score_count": 147377} {"score": 8.25, "timestamp": 1440160182.0, "score_count": 146200} {"score": 8.26, "timestamp": 1439549050.0, "score_count": 145619}
[ 4895, 26675, 1298, 807, 13, 3023, 11, 366, 16514, 27823, 1298, 1315, 1795, 1238, 4761, 1433, 13, 15, 11, 366, 26675, 62, 9127, 1298, 17759, 30057, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 3134, 1314, 3104, 3270, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34951, 17477, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2791, 28011, 33206, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 3553, 6659, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2996, 3134, 18182, 19, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 2780, 4869, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 39111, 3388, 2919, 19, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 2780, 4869, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2996, 24669, 42224, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 2780, 4869, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2996, 1415, 2670, 2548, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2996, 1415, 1558, 2718, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2996, 1485, 2414, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 17544, 31360, 2996, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2414, 5332, 2091, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 34287, 2598, 31751, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2414, 3720, 17544, 18, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 36625, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 23871, 2231, 27728, 1828, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 18742, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2414, 30505, 22370, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 18742, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 23871, 1433, 1959, 28977, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1731, 1485, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2091, 23188, 3553, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 1157, 11, 366, 16514, 27823, 1298, 1315, 1433, 1495, 1433, 4089, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28658, 40256, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 2623, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 1270, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 1495, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 2481, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 1314, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1507, 11, 366, 16514, 27823, 1298, 1478, 38569, 31010, 1433, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 2079, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 1478, 5237, 1485, 5607, 3132, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26753, 31751, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 1478, 1899, 38172, 31575, 13, 15, 11, 366, 26675, 62, 9127, 1298, 21409, 21315, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 1478, 2598, 4089, 2078, 1983, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 486, 4869, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 20224, 23815, 3104, 3510, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1478, 3720, 3720, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 20224, 1558, 43526, 3388, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1478, 2425, 3132, 92, 198, 4895, 26675, 1298, 807, 13, 2075, 11, 366, 16514, 27823, 1298, 1478, 2670, 2816, 2718, 1983, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1478, 3980, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 2414, 27277, 41289, 13, 15, 11, 366, 26675, 62, 9127, 1298, 35264, 18742, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 23871, 1270, 2718, 23734, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 2091, 5705, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 23871, 1959, 2999, 13464, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 2091, 5705, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 1315, 5237, 1129, 2713, 2075, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1983, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 23871, 1507, 31911, 3682, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1983, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 3312, 11, 366, 16514, 27823, 1298, 23871, 1507, 24760, 2091, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1983, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 23871, 1314, 1954, 24760, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1731, 1485, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 23871, 1065, 4310, 29416, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1731, 1485, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 23871, 1157, 2414, 44550, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34353, 15197, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1899, 2079, 30610, 18, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34353, 15197, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1899, 4531, 1983, 5824, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34353, 15197, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 28688, 2078, 44617, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34353, 15197, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 28688, 22413, 1065, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34353, 15197, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 32417, 34229, 2078, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1507, 2548, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1899, 2670, 4521, 1065, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1507, 2548, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1899, 1959, 2713, 3388, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1507, 2548, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1899, 1731, 1899, 2780, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1507, 2548, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 23871, 30484, 2624, 1795, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1507, 2548, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 8054, 20, 3134, 1821, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 8054, 36244, 6659, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 8054, 1129, 46900, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2079, 26704, 2548, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2079, 3980, 27936, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 33438, 2682, 1157, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2079, 24669, 4531, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 42691, 2670, 2791, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2079, 1821, 28688, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1558, 1157, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 41292, 40035, 2791, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 5705, 2682, 1983, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 41292, 2548, 41060, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 3695, 3365, 1485, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 3324, 2091, 3134, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 42752, 1558, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 43239, 20943, 1795, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 3134, 4531, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 45191, 27988, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 45734, 21315, 4304, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 1821, 3510, 1821, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1415, 1507, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 49051, 23516, 3312, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1065, 2998, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 1495, 3865, 5333, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1065, 2998, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 21652, 39449, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1065, 2998, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 36993, 2414, 4846, 18, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 1065, 2998, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3270, 405, 1270, 2414, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 40403, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 40022, 22572, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 40403, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 3459, 1270, 5892, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 40403, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 39118, 29558, 1959, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 40403, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 1795, 2718, 3510, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 40403, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 44617, 15982, 1415, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 49682, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 38905, 3134, 31128, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 49682, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 44578, 17464, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 3510, 2327, 1129, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3365, 2231, 4304, 1795, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1795, 32576, 1485, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 41734, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 38569, 1485, 1954, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 26895, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2425, 21652, 2996, 13, 15, 11, 366, 26675, 62, 9127, 1298, 14956, 26895, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3553, 30803, 27988, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 486, 4521, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3553, 2078, 1731, 3980, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1987, 486, 4521, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3553, 3064, 20, 2791, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 31495, 3695, 1314, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2154, 3324, 33535, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3553, 486, 12865, 23, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 3104, 2091, 22413, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 3104, 36453, 405, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4089, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2791, 38605, 1959, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5607, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2791, 23734, 4309, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5607, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2791, 39195, 3901, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5607, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3980, 1120, 1795, 4309, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5607, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3980, 2670, 3388, 2857, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 31751, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 46572, 16562, 1507, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 31751, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3980, 24940, 23721, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 31751, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 3980, 1415, 1065, 4761, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 30272, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1899, 3553, 24669, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 30272, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 2816, 4846, 2425, 4790, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 30272, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 2816, 27260, 26007, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32817, 25061, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 2816, 30695, 27800, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4531, 3695, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 2816, 1238, 3270, 5999, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4531, 3695, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 2816, 486, 3324, 4790, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3459, 2624, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2920, 37747, 1558, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3459, 2624, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2920, 1959, 24409, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3459, 2624, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 29334, 2996, 1731, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5332, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2598, 1485, 13348, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5332, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2598, 1065, 39506, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5332, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4051, 2670, 1983, 3980, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5332, 1959, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1821, 3270, 29626, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5999, 1433, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2670, 2425, 32118, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32544, 15259, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2670, 3388, 15197, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32544, 15259, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2548, 1954, 41874, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32544, 15259, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4310, 1795, 3365, 4051, 13, 15, 11, 366, 26675, 62, 9127, 1298, 32544, 15259, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2623, 33535, 2598, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 1795, 1954, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2623, 27326, 1959, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 1795, 1954, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2327, 37452, 2091, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 1795, 1954, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4310, 1821, 2078, 4521, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2091, 1129, 45438, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2091, 23188, 3388, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2091, 19708, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4310, 27693, 19880, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3695, 3365, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2624, 23055, 1238, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34385, 35844, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4310, 1485, 2816, 2996, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34385, 35844, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 3132, 26895, 3510, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34385, 35844, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4310, 12762, 44617, 13, 15, 11, 366, 26675, 62, 9127, 1298, 34385, 35844, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 27728, 4761, 940, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2425, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 25870, 2481, 1120, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2425, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 27019, 2718, 1270, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2425, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1983, 2857, 46871, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2425, 3559, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2075, 28256, 1959, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4524, 1828, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1495, 2079, 36244, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4524, 1828, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1495, 25270, 3553, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4524, 1828, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4309, 33042, 31952, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4524, 1828, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1731, 23349, 4531, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4761, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1954, 5066, 39506, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4761, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1954, 2670, 14877, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4761, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4309, 1495, 3559, 1954, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4761, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1828, 18938, 4304, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 4761, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4309, 1507, 2920, 2670, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2154, 3134, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4309, 1415, 4524, 2791, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2154, 3134, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 2481, 405, 39251, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2154, 3134, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1238, 6420, 22186, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2154, 3134, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1264, 1954, 3365, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2154, 3134, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1129, 2998, 15197, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3104, 5892, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1314, 28362, 4089, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2791, 3459, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1485, 1485, 39997, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1065, 1731, 40401, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 18376, 1129, 2598, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1065, 1314, 45385, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 1157, 31952, 1065, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4349, 12762, 25061, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2996, 2091, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 940, 5333, 31654, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 940, 3270, 2931, 20, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 940, 2231, 20986, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 940, 9031, 4309, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 4349, 486, 4089, 2078, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 5607, 2154, 3459, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 29022, 2598, 48712, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5066, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 3388, 3720, 1954, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 38205, 14656, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 35638, 1983, 35133, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 5237, 27301, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 35638, 25096, 1238, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 4310, 2079, 1795, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 31654, 1157, 35667, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 2231, 405, 5892, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 2598, 4531, 1954, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 33580, 24970, 2624, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 5333, 486, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 2078, 2670, 2481, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3270, 2931, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 1315, 1120, 1983, 1959, 5066, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3270, 2931, 92, 198, 4895, 26675, 1298, 807, 13, 2998, 11, 366, 16514, 27823, 1298, 20708, 30484, 2682, 1433, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 3270, 2931, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 4059, 1558, 2713, 19, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 20708, 830, 2996, 5892, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 20708, 830, 1120, 2624, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 24235, 2079, 30505, 2079, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 24235, 2079, 18938, 4051, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 24235, 2079, 1495, 31714, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 24235, 34155, 2154, 4531, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 36260, 3510, 40486, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 2920, 2425, 1238, 2548, 13, 15, 11, 366, 26675, 62, 9127, 1298, 28878, 36809, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 34251, 1065, 34287, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2920, 4790, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 37804, 26912, 2327, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 27559, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 34229, 1507, 11645, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2078, 3459, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 2231, 2682, 4846, 2425, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2075, 3324, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 17885, 5774, 21738, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2242, 2075, 3324, 92, 198, 4895, 26675, 1298, 807, 13, 2919, 11, 366, 16514, 27823, 1298, 1315, 31952, 3865, 26073, 13, 15, 11, 366, 26675, 62, 9127, 1298, 362, 26561, 3388, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 2623, 43240, 41948, 13, 15, 11, 366, 26675, 62, 9127, 1298, 362, 25870, 1821, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 2682, 5824, 1954, 1157, 13, 15, 11, 366, 26675, 62, 9127, 1298, 31510, 36879, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 1270, 4089, 3365, 5066, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26063, 27800, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 1959, 2998, 19, 18781, 13, 15, 11, 366, 26675, 62, 9127, 1298, 30299, 35402, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 27693, 2670, 11785, 13, 15, 11, 366, 26675, 62, 9127, 1298, 30299, 36879, 92, 198, 4895, 26675, 1298, 807, 13, 2931, 11, 366, 16514, 27823, 1298, 1315, 27693, 1954, 42548, 13, 15, 11, 366, 26675, 62, 9127, 1298, 30299, 36879, 92, 198, 4895, 26675, 1298, 807, 13, 16, 11, 366, 16514, 27823, 1298, 1315, 2075, 4051, 2425, 3459, 13, 15, 11, 366, 26675, 62, 9127, 1298, 27795, 33394, 92, 198, 4895, 26675, 1298, 807, 13, 16, 11, 366, 16514, 27823, 1298, 1315, 1495, 1954, 2154, 1731, 13, 15, 11, 366, 26675, 62, 9127, 1298, 2534, 1485, 1899, 92, 198, 4895, 26675, 1298, 807, 13, 16, 11, 366, 16514, 27823, 1298, 1315, 1828, 27367, 24403, 13, 15, 11, 366, 26675, 62, 9127, 1298, 29217, 41813, 92, 198, 4895, 26675, 1298, 807, 13, 1157, 11, 366, 16514, 27823, 1298, 1315, 1238, 40486, 43240, 13, 15, 11, 366, 26675, 62, 9127, 1298, 24894, 21599, 92, 198, 4895, 26675, 1298, 807, 13, 1314, 11, 366, 16514, 27823, 1298, 24041, 1731, 2548, 33459, 13, 15, 11, 366, 26675, 62, 9127, 1298, 678, 15277, 19, 92, 198, 4895, 26675, 1298, 807, 13, 1314, 11, 366, 16514, 27823, 1298, 24041, 26660, 1731, 1795, 13, 15, 11, 366, 26675, 62, 9127, 1298, 678, 15277, 19, 92, 198, 4895, 26675, 1298, 807, 13, 1433, 11, 366, 16514, 27823, 1298, 1478, 5774, 18298, 15377, 13, 15, 11, 366, 26675, 62, 9127, 1298, 27230, 27800, 92, 198, 4895, 26675, 1298, 807, 13, 1433, 11, 366, 16514, 27823, 1298, 22613, 3365, 4521, 25964, 13, 15, 11, 366, 26675, 62, 9127, 1298, 27778, 11645, 92, 198, 4895, 26675, 1298, 807, 13, 1433, 11, 366, 16514, 27823, 1298, 22613, 29334, 2078, 1731, 13, 15, 11, 366, 26675, 62, 9127, 1298, 37667, 2154, 92, 198, 4895, 26675, 1298, 807, 13, 1433, 11, 366, 16514, 27823, 1298, 22613, 29334, 2075, 3980, 13, 15, 11, 366, 26675, 62, 9127, 1298, 37667, 2154, 92, 198, 4895, 26675, 1298, 807, 13, 1129, 11, 366, 16514, 27823, 1298, 22909, 27728, 2816, 1120, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26607, 25667, 92, 198, 4895, 26675, 1298, 807, 13, 1129, 11, 366, 16514, 27823, 1298, 22909, 27728, 2816, 2920, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26607, 25667, 92, 198, 4895, 26675, 1298, 807, 13, 1129, 11, 366, 16514, 27823, 1298, 22909, 1314, 2154, 26895, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 3365, 5999, 92, 198, 4895, 26675, 1298, 807, 13, 1129, 11, 366, 16514, 27823, 1298, 22986, 1795, 1495, 15277, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1596, 1954, 3829, 92, 198, 4895, 26675, 1298, 807, 13, 17, 11, 366, 16514, 27823, 1298, 22986, 1899, 2791, 17430, 13, 15, 11, 366, 26675, 62, 9127, 1298, 16677, 22800, 92, 198, 4895, 26675, 1298, 807, 13, 17, 11, 366, 16514, 27823, 1298, 22986, 2816, 1314, 27057, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 5607, 486, 92, 198, 4895, 26675, 1298, 807, 13, 17, 11, 366, 16514, 27823, 1298, 1478, 34287, 3559, 32568, 13, 15, 11, 366, 26675, 62, 9127, 1298, 27191, 3312, 17, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 22986, 2548, 486, 37466, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1795, 3270, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 22986, 22883, 3104, 3682, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26753, 33394, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 22986, 21273, 1314, 5333, 13, 15, 11, 366, 26675, 62, 9127, 1298, 26753, 13348, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 22986, 1065, 2816, 37688, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 3553, 6469, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 1478, 32417, 27277, 2481, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1120, 1731, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 20299, 2079, 26895, 4761, 13, 15, 11, 366, 26675, 62, 9127, 1298, 25307, 32459, 92, 198, 4895, 26675, 1298, 807, 13, 2481, 11, 366, 16514, 27823, 1298, 1478, 3270, 33916, 36088, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 2623, 2623, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3365, 1959, 1828, 1983, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1731, 4051, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3365, 17430, 36720, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1954, 2624, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3365, 1065, 1433, 2920, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1828, 5892, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3553, 1899, 2414, 1129, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1558, 2919, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3553, 28324, 25667, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 1314, 2682, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 3980, 28362, 33459, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1467, 2931, 3901, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 37864, 27277, 3682, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 4089, 1238, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 20299, 36260, 2682, 4521, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 5892, 1120, 92, 198, 4895, 26675, 1298, 807, 13, 1828, 11, 366, 16514, 27823, 1298, 1478, 4051, 2718, 1495, 4304, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 5774, 1238, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 32128, 2623, 4790, 13, 15, 11, 366, 26675, 62, 9127, 1298, 24063, 27192, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 1478, 4310, 1314, 17544, 21, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 2425, 2425, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 1731, 15363, 1558, 13, 15, 11, 366, 26675, 62, 9127, 1298, 23871, 44550, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 27728, 2624, 1485, 13, 15, 11, 366, 26675, 62, 9127, 1298, 23313, 31952, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 1238, 3324, 20809, 13, 15, 11, 366, 26675, 62, 9127, 1298, 23871, 28978, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 24096, 1507, 1314, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 3270, 1558, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 1433, 1065, 7410, 13, 15, 11, 366, 26675, 62, 9127, 1298, 20708, 47582, 92, 198, 4895, 26675, 1298, 807, 13, 1954, 11, 366, 16514, 27823, 1298, 20299, 940, 2327, 31980, 13, 15, 11, 366, 26675, 62, 9127, 1298, 20708, 20107, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 1120, 26429, 43193, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 2231, 2414, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 2920, 3720, 1314, 2414, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 2670, 5333, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 2780, 35642, 23148, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 1270, 1120, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 2780, 3270, 4531, 2996, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 1270, 2857, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 31714, 44230, 2624, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 21719, 17, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 20224, 40179, 2231, 6420, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 1433, 4309, 92, 198, 4895, 26675, 1298, 807, 13, 1731, 11, 366, 16514, 27823, 1298, 1478, 3510, 1314, 2623, 5824, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 1157, 4309, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 1478, 30505, 2920, 22416, 13, 15, 11, 366, 26675, 62, 9127, 1298, 6640, 40639, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 1478, 31911, 27371, 2996, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1315, 486, 2481, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 1478, 3559, 22995, 30460, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1478, 5774, 1495, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 20224, 1314, 21652, 1129, 13, 15, 11, 366, 26675, 62, 9127, 1298, 22909, 26514, 92, 198, 4895, 26675, 1298, 807, 13, 1495, 11, 366, 16514, 27823, 1298, 20224, 27037, 486, 6469, 13, 15, 11, 366, 26675, 62, 9127, 1298, 22986, 2167, 92, 198, 4895, 26675, 1298, 807, 13, 2075, 11, 366, 16514, 27823, 1298, 1478, 31010, 2920, 28669, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1478, 3980, 1129, 92, 198 ]
2.360307
7,044
import UUIDs # This function is based off of a similar function here: # https://github.com/JuliaRegistries/RegistryCI.jl/blob/master/src/RegistryCI.jl function gather_stdlib_uuids() return Set{UUIDs.UUID}(x for x in keys(Pkg.Types.stdlib())) end
[ 11748, 471, 27586, 82, 198, 198, 2, 770, 2163, 318, 1912, 572, 286, 257, 2092, 2163, 994, 25, 198, 2, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 8081, 32995, 14, 8081, 4592, 25690, 13, 20362, 14, 2436, 672, 14, 9866, 14, 10677, 14, 8081, 4592, 25690, 13, 20362, 198, 8818, 6431, 62, 19282, 8019, 62, 12303, 2340, 3419, 198, 220, 220, 220, 1441, 5345, 90, 52, 27586, 82, 13, 52, 27586, 92, 7, 87, 329, 2124, 287, 8251, 7, 47, 10025, 13, 31431, 13, 19282, 8019, 3419, 4008, 198, 437, 198 ]
2.728261
92
module HiveLoader # https://github.com/JuliaDatabases/Hive.jl v0.3.0 using Hive # HiveSession HiveAuth using Octo.Repo: ExecuteResult const current = Dict{Symbol, Any}( :sess => nothing, ) current_sess() = current[:sess] # db_connect function db_connect(; host::String="localhost", port::Integer=10000, auth::HiveAuth=HiveAuth(), tprotocol::Symbol=:binary) sess = HiveSession(host, port, auth; tprotocol=tprotocol) current[:sess] = sess end # db_disconnect function db_disconnect() sess = current_sess() if sess isa HiveSession Hive.close(sess) current[:sess] = nothing end end # query function query(sql::String) sess = current_sess() pending = Hive.execute(sess, sql) rs = Hive.result(pending) sch = Hive.schema(rs) column_names = tuple(Symbol.(getproperty.(sch.columns, :columnName))...) df = reduce(vcat, Hive.records(rs)) nts = NamedTuple{column_names}.(df) Hive.close(rs) nts end function query(prepared::String, vals::Vector) # throw UnsupportedError throw(UnsupportedError("needs to be implemented")) end # execute function execute(sql::String)::ExecuteResult sess = current_sess() result = Hive.execute(sess, sql) ExecuteResult() end function execute(prepared::String, vals::Vector)::ExecuteResult # throw UnsupportedError throw(UnsupportedError("needs to be implemented")) end function execute(prepared::String, nts::Vector{<:NamedTuple})::ExecuteResult # throw UnsupportedError throw(UnsupportedError("needs to be implemented")) end end # module Octo.Backends.HiveLoader
[ 21412, 33235, 17401, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 27354, 18826, 14, 39, 425, 13, 20362, 410, 15, 13, 18, 13, 15, 198, 3500, 33235, 1303, 33235, 36044, 33235, 30515, 198, 3500, 2556, 78, 13, 6207, 78, 25, 8393, 1133, 23004, 198, 198, 9979, 1459, 796, 360, 713, 90, 13940, 23650, 11, 4377, 92, 7, 198, 220, 220, 220, 1058, 82, 408, 5218, 2147, 11, 198, 8, 198, 198, 14421, 62, 82, 408, 3419, 796, 1459, 58, 25, 82, 408, 60, 198, 198, 2, 20613, 62, 8443, 198, 8818, 20613, 62, 8443, 7, 26, 2583, 3712, 10100, 2625, 36750, 1600, 2493, 3712, 46541, 28, 49388, 11, 6284, 3712, 39, 425, 30515, 28, 39, 425, 30515, 22784, 256, 11235, 4668, 3712, 13940, 23650, 28, 25, 39491, 8, 198, 220, 220, 220, 264, 408, 796, 33235, 36044, 7, 4774, 11, 2493, 11, 6284, 26, 256, 11235, 4668, 28, 83, 11235, 4668, 8, 198, 220, 220, 220, 1459, 58, 25, 82, 408, 60, 796, 264, 408, 198, 437, 198, 198, 2, 20613, 62, 6381, 8443, 198, 8818, 20613, 62, 6381, 8443, 3419, 198, 220, 220, 220, 264, 408, 796, 1459, 62, 82, 408, 3419, 198, 220, 220, 220, 611, 264, 408, 318, 64, 33235, 36044, 198, 220, 220, 220, 220, 220, 220, 220, 33235, 13, 19836, 7, 82, 408, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1459, 58, 25, 82, 408, 60, 796, 2147, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 12405, 198, 8818, 12405, 7, 25410, 3712, 10100, 8, 198, 220, 220, 220, 264, 408, 796, 1459, 62, 82, 408, 3419, 198, 220, 220, 220, 13310, 796, 33235, 13, 41049, 7, 82, 408, 11, 44161, 8, 198, 220, 220, 220, 44608, 796, 33235, 13, 20274, 7, 79, 1571, 8, 198, 220, 220, 220, 5513, 796, 33235, 13, 15952, 2611, 7, 3808, 8, 198, 220, 220, 220, 5721, 62, 14933, 796, 46545, 7, 13940, 23650, 12195, 1136, 26745, 12195, 20601, 13, 28665, 82, 11, 1058, 28665, 5376, 4008, 23029, 198, 220, 220, 220, 47764, 796, 4646, 7, 85, 9246, 11, 33235, 13, 8344, 3669, 7, 3808, 4008, 198, 220, 220, 220, 299, 912, 796, 34441, 51, 29291, 90, 28665, 62, 14933, 92, 12195, 7568, 8, 198, 220, 220, 220, 33235, 13, 19836, 7, 3808, 8, 198, 220, 220, 220, 299, 912, 198, 437, 198, 198, 8818, 12405, 7, 3866, 29190, 3712, 10100, 11, 410, 874, 3712, 38469, 8, 1303, 3714, 791, 15999, 12331, 198, 220, 220, 220, 3714, 7, 3118, 15999, 12331, 7203, 50032, 284, 307, 9177, 48774, 198, 437, 198, 198, 2, 12260, 198, 8818, 12260, 7, 25410, 3712, 10100, 2599, 25, 23002, 1133, 23004, 198, 220, 220, 220, 264, 408, 796, 1459, 62, 82, 408, 3419, 198, 220, 220, 220, 1255, 796, 33235, 13, 41049, 7, 82, 408, 11, 44161, 8, 198, 220, 220, 220, 8393, 1133, 23004, 3419, 198, 437, 198, 198, 8818, 12260, 7, 3866, 29190, 3712, 10100, 11, 410, 874, 3712, 38469, 2599, 25, 23002, 1133, 23004, 1303, 3714, 791, 15999, 12331, 198, 220, 220, 220, 3714, 7, 3118, 15999, 12331, 7203, 50032, 284, 307, 9177, 48774, 198, 437, 198, 198, 8818, 12260, 7, 3866, 29190, 3712, 10100, 11, 299, 912, 3712, 38469, 90, 27, 25, 45, 2434, 51, 29291, 92, 2599, 25, 23002, 1133, 23004, 1303, 3714, 791, 15999, 12331, 198, 220, 220, 220, 3714, 7, 3118, 15999, 12331, 7203, 50032, 284, 307, 9177, 48774, 198, 437, 198, 198, 437, 1303, 8265, 2556, 78, 13, 7282, 2412, 13, 39, 425, 17401, 198 ]
2.723077
585
function _permute_front(t::AbstractTensorMap) # make TensorMap{S,N₁+N₂-1,1} I = TensorKit.allind(t) # = (1:N₁+N₂...,) if BraidingStyle(sectortype(t)) isa SymmetricBraiding permute(t, Base.front(I), (I[end],)) else levels = I braid(t, levels, Base.front(I), (I[end],)) end end function _permute_tail(t::AbstractTensorMap) # make TensorMap{S,1,N₁+N₂-1} I = TensorKit.allind(t) # = (1:N₁+N₂...,) if BraidingStyle(sectortype(t)) isa SymmetricBraiding permute(t, (I[1],), Base.tail(I)) else levels = I braid(t, levels, (I[1],), Base.tail(I)) end end function _permute_as(t1::AbstractTensorMap, t2::AbstractTensorMap) if BraidingStyle(sectortype(t1)) isa SymmetricBraiding permute(t1, TensorKit.codomainind(t2), TensorKit.domainind(t2)) else levels = allind(t1) braid(t1, TensorKit.codomainind(t2), TensorKit.domainind(t2)) end end _firstspace(t::AbstractTensorMap) = space(t, 1) _lastspace(t::AbstractTensorMap) = space(t, numind(t)) " Returns spin operators Sx,Sy,Sz,Id for spin s " function spinmatrices(s::Union{Rational{Int},Int}) N = Int(2*s) Sx=zeros(Defaults.eltype,N+1,N+1) Sy=zeros(Defaults.eltype,N+1,N+1) Sz=zeros(Defaults.eltype,N+1,N+1) for row=1:(N+1) for col=1:(N+1) term=sqrt((s+1)*(row+col-1)-row*col)/2.0 if (row+1==col) Sx[row,col]+=term Sy[row,col]-=1im*term end if(row==col+1) Sx[row,col]+=term Sy[row,col]+=1im*term end if(row==col) Sz[row,col]+=s+1-row end end end return Sx,Sy,Sz,one(Sx) end function nonsym_spintensors(s) (Sxd,Syd,Szd) = spinmatrices(s) sp = ComplexSpace(size(Sxd,1)) Sx = TensorMap(Sxd,sp,sp); Sy = TensorMap(Syd,sp,sp); Sz = TensorMap(Szd,sp,sp); return Sx,Sy,Sz,one(Sx) end #given a hamiltonian with unit legs on the side, decompose it using svds to form a "localmpo" function decompose_localmpo(inpmpo::AbstractTensorMap{PS,N1,N2}) where {PS,N1,N2} numind=N1+N2 if(numind==4) return [permute(inpmpo,(1,2),(4,3))] end leftind=(1,2,Int(numind/2+1)) otherind=(ntuple(x->x+2,Val{Int((N1+N2)/2)-2}())..., ntuple(x->x+Int(numind/2+1),Val{Int((N1+N2)/2)-1}())...) (U,S,V) = tsvd(inpmpo,leftind,otherind) T=U*S T=permute(T,(1,2),(4,3)) return [T;decompose_localmpo(V)] end function add_util_leg(tensor::AbstractTensorMap{S,N1,N2}) where {S,N1,N2} #ntuple(x->x,Val{3+4}()) util=Tensor(ones,eltype(tensor),oneunit(space(tensor,1))) tensor1=util*permute(tensor,(),ntuple(x->x,Val{N1+N2}())) return permute(tensor1,ntuple(x->x,Val{N1+N2+1}()),())*util' end
[ 8818, 4808, 16321, 1133, 62, 8534, 7, 83, 3712, 23839, 51, 22854, 13912, 8, 1303, 787, 309, 22854, 13912, 90, 50, 11, 45, 158, 224, 223, 10, 45, 158, 224, 224, 12, 16, 11, 16, 92, 198, 220, 220, 220, 314, 796, 309, 22854, 20827, 13, 439, 521, 7, 83, 8, 1303, 796, 357, 16, 25, 45, 158, 224, 223, 10, 45, 158, 224, 224, 986, 35751, 198, 220, 220, 220, 611, 9718, 2530, 21466, 7, 8831, 419, 2981, 7, 83, 4008, 318, 64, 1632, 3020, 19482, 42333, 2530, 198, 220, 220, 220, 220, 220, 220, 220, 9943, 1133, 7, 83, 11, 7308, 13, 8534, 7, 40, 828, 357, 40, 58, 437, 4357, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2974, 796, 314, 198, 220, 220, 220, 220, 220, 220, 220, 275, 7086, 7, 83, 11, 2974, 11, 7308, 13, 8534, 7, 40, 828, 357, 40, 58, 437, 4357, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 8818, 4808, 16321, 1133, 62, 13199, 7, 83, 3712, 23839, 51, 22854, 13912, 8, 1303, 787, 309, 22854, 13912, 90, 50, 11, 16, 11, 45, 158, 224, 223, 10, 45, 158, 224, 224, 12, 16, 92, 198, 220, 220, 220, 314, 796, 309, 22854, 20827, 13, 439, 521, 7, 83, 8, 1303, 796, 357, 16, 25, 45, 158, 224, 223, 10, 45, 158, 224, 224, 986, 35751, 198, 220, 220, 220, 611, 9718, 2530, 21466, 7, 8831, 419, 2981, 7, 83, 4008, 318, 64, 1632, 3020, 19482, 42333, 2530, 198, 220, 220, 220, 220, 220, 220, 220, 9943, 1133, 7, 83, 11, 357, 40, 58, 16, 4357, 828, 7308, 13, 13199, 7, 40, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2974, 796, 314, 198, 220, 220, 220, 220, 220, 220, 220, 275, 7086, 7, 83, 11, 2974, 11, 357, 40, 58, 16, 4357, 828, 7308, 13, 13199, 7, 40, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 8818, 4808, 16321, 1133, 62, 292, 7, 83, 16, 3712, 23839, 51, 22854, 13912, 11, 256, 17, 3712, 23839, 51, 22854, 13912, 8, 198, 220, 220, 220, 611, 9718, 2530, 21466, 7, 8831, 419, 2981, 7, 83, 16, 4008, 318, 64, 1632, 3020, 19482, 42333, 2530, 198, 220, 220, 220, 220, 220, 220, 220, 9943, 1133, 7, 83, 16, 11, 309, 22854, 20827, 13, 19815, 296, 391, 521, 7, 83, 17, 828, 309, 22854, 20827, 13, 27830, 521, 7, 83, 17, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2974, 796, 477, 521, 7, 83, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 7086, 7, 83, 16, 11, 309, 22854, 20827, 13, 19815, 296, 391, 521, 7, 83, 17, 828, 309, 22854, 20827, 13, 27830, 521, 7, 83, 17, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 62, 11085, 13200, 7, 83, 3712, 23839, 51, 22854, 13912, 8, 796, 2272, 7, 83, 11, 352, 8, 198, 62, 12957, 13200, 7, 83, 3712, 23839, 51, 22854, 13912, 8, 796, 2272, 7, 83, 11, 997, 521, 7, 83, 4008, 198, 198, 1, 198, 220, 220, 220, 16409, 7906, 12879, 311, 87, 11, 13940, 11, 50, 89, 11, 7390, 329, 7906, 264, 198, 1, 198, 8818, 7906, 6759, 45977, 7, 82, 3712, 38176, 90, 49, 864, 90, 5317, 5512, 5317, 30072, 198, 220, 220, 220, 399, 796, 2558, 7, 17, 9, 82, 8, 628, 220, 220, 220, 311, 87, 28, 9107, 418, 7, 7469, 13185, 13, 417, 4906, 11, 45, 10, 16, 11, 45, 10, 16, 8, 198, 220, 220, 220, 1632, 28, 9107, 418, 7, 7469, 13185, 13, 417, 4906, 11, 45, 10, 16, 11, 45, 10, 16, 8, 198, 220, 220, 220, 27974, 28, 9107, 418, 7, 7469, 13185, 13, 417, 4906, 11, 45, 10, 16, 11, 45, 10, 16, 8, 628, 220, 220, 220, 329, 5752, 28, 16, 37498, 45, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 951, 28, 16, 37498, 45, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3381, 28, 31166, 17034, 19510, 82, 10, 16, 27493, 7, 808, 10, 4033, 12, 16, 13219, 808, 9, 4033, 20679, 17, 13, 15, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 808, 10, 16, 855, 4033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 311, 87, 58, 808, 11, 4033, 60, 47932, 4354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1632, 58, 808, 11, 4033, 45297, 28, 16, 320, 9, 4354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7, 808, 855, 4033, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 311, 87, 58, 808, 11, 4033, 60, 47932, 4354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1632, 58, 808, 11, 4033, 60, 47932, 16, 320, 9, 4354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7, 808, 855, 4033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27974, 58, 808, 11, 4033, 60, 47932, 82, 10, 16, 12, 808, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 311, 87, 11, 13940, 11, 50, 89, 11, 505, 7, 50, 87, 8, 198, 437, 198, 198, 8818, 14011, 4948, 62, 2777, 600, 641, 669, 7, 82, 8, 198, 220, 220, 220, 357, 50, 24954, 11, 50, 5173, 11, 50, 89, 67, 8, 796, 7906, 6759, 45977, 7, 82, 8, 198, 220, 220, 220, 599, 796, 19157, 14106, 7, 7857, 7, 50, 24954, 11, 16, 4008, 628, 220, 220, 220, 311, 87, 796, 309, 22854, 13912, 7, 50, 24954, 11, 2777, 11, 2777, 1776, 198, 220, 220, 220, 1632, 796, 309, 22854, 13912, 7, 50, 5173, 11, 2777, 11, 2777, 1776, 198, 220, 220, 220, 27974, 796, 309, 22854, 13912, 7, 50, 89, 67, 11, 2777, 11, 2777, 1776, 628, 220, 220, 220, 1441, 311, 87, 11, 13940, 11, 50, 89, 11, 505, 7, 50, 87, 8, 198, 437, 198, 198, 2, 35569, 257, 8891, 9044, 666, 351, 4326, 7405, 319, 262, 1735, 11, 26969, 3455, 340, 1262, 38487, 9310, 284, 1296, 257, 366, 12001, 3149, 78, 1, 198, 8818, 26969, 3455, 62, 12001, 3149, 78, 7, 259, 79, 3149, 78, 3712, 23839, 51, 22854, 13912, 90, 3705, 11, 45, 16, 11, 45, 17, 30072, 810, 1391, 3705, 11, 45, 16, 11, 45, 17, 92, 198, 220, 220, 220, 997, 521, 28, 45, 16, 10, 45, 17, 198, 220, 220, 220, 611, 7, 22510, 521, 855, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 685, 16321, 1133, 7, 259, 79, 3149, 78, 11, 7, 16, 11, 17, 828, 7, 19, 11, 18, 4008, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1364, 521, 16193, 16, 11, 17, 11, 5317, 7, 22510, 521, 14, 17, 10, 16, 4008, 198, 220, 220, 220, 584, 521, 16193, 429, 29291, 7, 87, 3784, 87, 10, 17, 11, 7762, 90, 5317, 19510, 45, 16, 10, 45, 17, 20679, 17, 13219, 17, 92, 3419, 26513, 11, 299, 83, 29291, 7, 87, 3784, 87, 10, 5317, 7, 22510, 521, 14, 17, 10, 16, 828, 7762, 90, 5317, 19510, 45, 16, 10, 45, 17, 20679, 17, 13219, 16, 92, 28955, 23029, 628, 220, 220, 220, 357, 52, 11, 50, 11, 53, 8, 796, 40379, 20306, 7, 259, 79, 3149, 78, 11, 9464, 521, 11, 847, 521, 8, 628, 220, 220, 220, 309, 28, 52, 9, 50, 628, 220, 220, 220, 309, 28, 16321, 1133, 7, 51, 11, 7, 16, 11, 17, 828, 7, 19, 11, 18, 4008, 628, 198, 220, 220, 220, 1441, 685, 51, 26, 12501, 3361, 577, 62, 12001, 3149, 78, 7, 53, 15437, 198, 437, 198, 198, 8818, 751, 62, 22602, 62, 1455, 7, 83, 22854, 3712, 23839, 51, 22854, 13912, 90, 50, 11, 45, 16, 11, 45, 17, 30072, 810, 1391, 50, 11, 45, 16, 11, 45, 17, 92, 198, 220, 220, 220, 1303, 429, 29291, 7, 87, 3784, 87, 11, 7762, 90, 18, 10, 19, 92, 28955, 628, 220, 220, 220, 7736, 28, 51, 22854, 7, 1952, 11, 417, 4906, 7, 83, 22854, 828, 505, 20850, 7, 13200, 7, 83, 22854, 11, 16, 22305, 198, 220, 220, 220, 11192, 273, 16, 28, 22602, 9, 16321, 1133, 7, 83, 22854, 11, 22784, 429, 29291, 7, 87, 3784, 87, 11, 7762, 90, 45, 16, 10, 45, 17, 92, 3419, 4008, 198, 220, 220, 220, 1441, 9943, 1133, 7, 83, 22854, 16, 11, 429, 29291, 7, 87, 3784, 87, 11, 7762, 90, 45, 16, 10, 45, 17, 10, 16, 92, 3419, 828, 3419, 27493, 22602, 6, 198, 437, 198 ]
1.839974
1,531
function train!(agent::AbstractAgent, game::SnakeAI.Game) # Get the current step old_state = SnakeAI.get_state(game) # Get the predicted move for the state move = get_action(agent, old_state) SnakeAI.send_inputs!(game, move) # Play the step reward, done, score = SnakeAI.play_step!(game) new_state = SnakeAI.get_state(game) # Train the short memory train_short_memory(agent, old_state, move, reward, new_state, done) # Remember remember(agent, old_state, move, reward, new_state, done) if done # Reset the game train_long_memory(agent) SnakeAI.reset!(game) agent.n_games += 1 if score > agent.record agent.record = score # save_model(joinpath(MODELS_PATH, "model_$(agent.n_games).bson"), agent.model) end end return done end function remember( agent::AbstractAgent, state::S, action::S, reward::T, next_state::S, done::Bool ) where {T<:Integer,S<:AbstractArray{<:T}} push!(agent.memory.data, (state, action, [reward], next_state, convert.(Int, [done]))) end function train_short_memory( agent::AbstractAgent, state::S, action::S, reward::T, next_state::S, done::Bool ) where {T<:Integer,S<:AbstractArray{<:T}} update!(agent, state, action, reward, next_state, done) end function train_long_memory(agent::AbstractAgent) if length(agent.memory.data) > BATCH_SIZE mini_sample = sample(agent.memory.data, BATCH_SIZE) else mini_sample = agent.memory.data end states, actions, rewards, next_states, dones = map(x -> getfield.(mini_sample, x), fieldnames(eltype(mini_sample))) update!(agent, states, actions, rewards, next_states, dones) end function get_action(agent::SnakeAgent, state::AbstractArray{<:Integer}; rand_range=1:200) agent.ϵ = 80 - agent.n_games final_move = zeros(Int, 3) if rand(rand_range) < agent.ϵ move = rand(1:3) final_move[move] = 1 else pred = agent.model(state) final_move[Flux.onecold(pred)] = 1 end return final_move end function update!( agent::SnakeAgent, state::Union{A,AA}, action::Union{A,AA}, reward::Union{T,AA}, next_state::Union{A,AA}, done::Union{Bool,AA}; α::Float32=0.9f0 # Step size ) where {T<:Integer,A<:AbstractArray{<:T},AA<:AbstractArray{A}} # Batching the states and converting data to Float32 (done implicitly otherwise) state = Flux.batch(state) |> x -> convert.(Float32, x) next_state = Flux.batch(next_state) |> x -> convert.(Float32, x) action = Flux.batch(action) |> x -> convert.(Float32, x) reward = Flux.batch(reward) |> x -> convert.(Float32, x) done = Flux.batch(done) # Model's prediction for next state y = agent.model(next_state) # Get the model's params for back propagation ps = Flux.params(agent.model) # Calculate the gradients gs = Flux.gradient(ps) do # Forward pass ŷ = agent.model(state) # Creating buffer to allow mutability when calculating gradients Rₙ = Buffer(ŷ, size(ŷ)) # Adjusting values of current state with next state's knowledge for idx in 1:length(done) # Copy preds into buffer Rₙ[:, idx] = ŷ[:, idx] Qₙ = reward[idx] if done[idx] == false Qₙ += α * maximum(y[:, idx]) end # Adjusting the expected reward for selected move Rₙ[argmax(action[:, idx]), idx] = Qₙ end # Calculate the loss agent.criterion(ŷ, copy(Rₙ)) end # Update model weights Flux.Optimise.update!(agent.opt, ps, gs) end
[ 8818, 4512, 0, 7, 25781, 3712, 23839, 36772, 11, 983, 3712, 49795, 20185, 13, 8777, 8, 198, 220, 220, 220, 1303, 3497, 262, 1459, 2239, 198, 220, 220, 220, 1468, 62, 5219, 796, 16705, 20185, 13, 1136, 62, 5219, 7, 6057, 8, 628, 220, 220, 220, 1303, 3497, 262, 11001, 1445, 329, 262, 1181, 198, 220, 220, 220, 1445, 796, 651, 62, 2673, 7, 25781, 11, 1468, 62, 5219, 8, 198, 220, 220, 220, 16705, 20185, 13, 21280, 62, 15414, 82, 0, 7, 6057, 11, 1445, 8, 628, 220, 220, 220, 1303, 3811, 262, 2239, 198, 220, 220, 220, 6721, 11, 1760, 11, 4776, 796, 16705, 20185, 13, 1759, 62, 9662, 0, 7, 6057, 8, 198, 220, 220, 220, 649, 62, 5219, 796, 16705, 20185, 13, 1136, 62, 5219, 7, 6057, 8, 628, 220, 220, 220, 1303, 16835, 262, 1790, 4088, 198, 220, 220, 220, 4512, 62, 19509, 62, 31673, 7, 25781, 11, 1468, 62, 5219, 11, 1445, 11, 6721, 11, 649, 62, 5219, 11, 1760, 8, 628, 220, 220, 220, 1303, 11436, 198, 220, 220, 220, 3505, 7, 25781, 11, 1468, 62, 5219, 11, 1445, 11, 6721, 11, 649, 62, 5219, 11, 1760, 8, 628, 220, 220, 220, 611, 1760, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 30027, 262, 983, 198, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 6511, 62, 31673, 7, 25781, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16705, 20185, 13, 42503, 0, 7, 6057, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5797, 13, 77, 62, 19966, 15853, 352, 628, 220, 220, 220, 220, 220, 220, 220, 611, 4776, 1875, 5797, 13, 22105, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5797, 13, 22105, 796, 4776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3613, 62, 19849, 7, 22179, 6978, 7, 33365, 37142, 62, 34219, 11, 366, 19849, 62, 3, 7, 25781, 13, 77, 62, 19966, 737, 1443, 261, 12340, 5797, 13, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 1760, 198, 437, 198, 198, 8818, 3505, 7, 198, 220, 220, 220, 5797, 3712, 23839, 36772, 11, 198, 220, 220, 220, 1181, 3712, 50, 11, 198, 220, 220, 220, 2223, 3712, 50, 11, 198, 220, 220, 220, 6721, 3712, 51, 11, 198, 220, 220, 220, 1306, 62, 5219, 3712, 50, 11, 198, 220, 220, 220, 1760, 3712, 33, 970, 198, 8, 810, 1391, 51, 27, 25, 46541, 11, 50, 27, 25, 23839, 19182, 90, 27, 25, 51, 11709, 198, 220, 220, 220, 4574, 0, 7, 25781, 13, 31673, 13, 7890, 11, 357, 5219, 11, 2223, 11, 685, 260, 904, 4357, 1306, 62, 5219, 11, 10385, 12195, 5317, 11, 685, 28060, 60, 22305, 198, 437, 198, 198, 8818, 4512, 62, 19509, 62, 31673, 7, 198, 220, 220, 220, 5797, 3712, 23839, 36772, 11, 198, 220, 220, 220, 1181, 3712, 50, 11, 198, 220, 220, 220, 2223, 3712, 50, 11, 198, 220, 220, 220, 6721, 3712, 51, 11, 198, 220, 220, 220, 1306, 62, 5219, 3712, 50, 11, 198, 220, 220, 220, 1760, 3712, 33, 970, 198, 8, 810, 1391, 51, 27, 25, 46541, 11, 50, 27, 25, 23839, 19182, 90, 27, 25, 51, 11709, 198, 220, 220, 220, 4296, 0, 7, 25781, 11, 1181, 11, 2223, 11, 6721, 11, 1306, 62, 5219, 11, 1760, 8, 198, 437, 198, 198, 8818, 4512, 62, 6511, 62, 31673, 7, 25781, 3712, 23839, 36772, 8, 198, 220, 220, 220, 611, 4129, 7, 25781, 13, 31673, 13, 7890, 8, 1875, 347, 11417, 62, 33489, 198, 220, 220, 220, 220, 220, 220, 220, 9927, 62, 39873, 796, 6291, 7, 25781, 13, 31673, 13, 7890, 11, 347, 11417, 62, 33489, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 9927, 62, 39873, 796, 5797, 13, 31673, 13, 7890, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2585, 11, 4028, 11, 11530, 11, 1306, 62, 27219, 11, 836, 274, 796, 3975, 7, 87, 4613, 651, 3245, 12195, 45313, 62, 39873, 11, 2124, 828, 2214, 14933, 7, 417, 4906, 7, 45313, 62, 39873, 22305, 628, 220, 220, 220, 4296, 0, 7, 25781, 11, 2585, 11, 4028, 11, 11530, 11, 1306, 62, 27219, 11, 836, 274, 8, 198, 437, 198, 198, 8818, 651, 62, 2673, 7, 25781, 3712, 49795, 36772, 11, 1181, 3712, 23839, 19182, 90, 27, 25, 46541, 19629, 43720, 62, 9521, 28, 16, 25, 2167, 8, 198, 220, 220, 220, 5797, 13, 139, 113, 796, 4019, 532, 5797, 13, 77, 62, 19966, 198, 220, 220, 220, 2457, 62, 21084, 796, 1976, 27498, 7, 5317, 11, 513, 8, 628, 220, 220, 220, 611, 43720, 7, 25192, 62, 9521, 8, 1279, 5797, 13, 139, 113, 198, 220, 220, 220, 220, 220, 220, 220, 1445, 796, 43720, 7, 16, 25, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2457, 62, 21084, 58, 21084, 60, 796, 352, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 796, 5797, 13, 19849, 7, 5219, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2457, 62, 21084, 58, 37, 22564, 13, 505, 36673, 7, 28764, 15437, 796, 352, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2457, 62, 21084, 198, 437, 198, 198, 8818, 4296, 0, 7, 198, 220, 220, 220, 5797, 3712, 49795, 36772, 11, 198, 220, 220, 220, 1181, 3712, 38176, 90, 32, 11, 3838, 5512, 198, 220, 220, 220, 2223, 3712, 38176, 90, 32, 11, 3838, 5512, 198, 220, 220, 220, 6721, 3712, 38176, 90, 51, 11, 3838, 5512, 198, 220, 220, 220, 1306, 62, 5219, 3712, 38176, 90, 32, 11, 3838, 5512, 198, 220, 220, 220, 1760, 3712, 38176, 90, 33, 970, 11, 3838, 19629, 198, 220, 220, 220, 26367, 3712, 43879, 2624, 28, 15, 13, 24, 69, 15, 220, 220, 220, 1303, 5012, 2546, 198, 8, 810, 1391, 51, 27, 25, 46541, 11, 32, 27, 25, 23839, 19182, 90, 27, 25, 51, 5512, 3838, 27, 25, 23839, 19182, 90, 32, 11709, 198, 220, 220, 220, 1303, 347, 19775, 262, 2585, 290, 23202, 1366, 284, 48436, 2624, 357, 28060, 31821, 4306, 8, 198, 220, 220, 220, 1181, 796, 1610, 2821, 13, 43501, 7, 5219, 8, 930, 29, 2124, 4613, 10385, 12195, 43879, 2624, 11, 2124, 8, 198, 220, 220, 220, 1306, 62, 5219, 796, 1610, 2821, 13, 43501, 7, 19545, 62, 5219, 8, 930, 29, 2124, 4613, 10385, 12195, 43879, 2624, 11, 2124, 8, 198, 220, 220, 220, 2223, 796, 1610, 2821, 13, 43501, 7, 2673, 8, 930, 29, 2124, 4613, 10385, 12195, 43879, 2624, 11, 2124, 8, 198, 220, 220, 220, 6721, 796, 1610, 2821, 13, 43501, 7, 260, 904, 8, 930, 29, 2124, 4613, 10385, 12195, 43879, 2624, 11, 2124, 8, 198, 220, 220, 220, 1760, 796, 1610, 2821, 13, 43501, 7, 28060, 8, 628, 220, 220, 220, 1303, 9104, 338, 17724, 329, 1306, 1181, 198, 220, 220, 220, 331, 796, 5797, 13, 19849, 7, 19545, 62, 5219, 8, 628, 220, 220, 220, 1303, 3497, 262, 2746, 338, 42287, 329, 736, 43594, 198, 220, 220, 220, 26692, 796, 1610, 2821, 13, 37266, 7, 25781, 13, 19849, 8, 628, 220, 220, 220, 1303, 27131, 378, 262, 3915, 2334, 198, 220, 220, 220, 308, 82, 796, 1610, 2821, 13, 49607, 7, 862, 8, 466, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 19530, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 331, 136, 224, 796, 5797, 13, 19849, 7, 5219, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 30481, 11876, 284, 1249, 4517, 1799, 618, 26019, 3915, 2334, 198, 220, 220, 220, 220, 220, 220, 220, 371, 158, 224, 247, 796, 47017, 7, 88, 136, 224, 11, 2546, 7, 88, 136, 224, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 20292, 278, 3815, 286, 1459, 1181, 351, 1306, 1181, 338, 3725, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4686, 87, 287, 352, 25, 13664, 7, 28060, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17393, 2747, 82, 656, 11876, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 158, 224, 247, 58, 45299, 4686, 87, 60, 796, 331, 136, 224, 58, 45299, 4686, 87, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1195, 158, 224, 247, 796, 6721, 58, 312, 87, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1760, 58, 312, 87, 60, 6624, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1195, 158, 224, 247, 15853, 26367, 1635, 5415, 7, 88, 58, 45299, 4686, 87, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20292, 278, 262, 2938, 6721, 329, 6163, 1445, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 158, 224, 247, 58, 853, 9806, 7, 2673, 58, 45299, 4686, 87, 46570, 4686, 87, 60, 796, 1195, 158, 224, 247, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 27131, 378, 262, 2994, 198, 220, 220, 220, 220, 220, 220, 220, 5797, 13, 22213, 28019, 7, 88, 136, 224, 11, 4866, 7, 49, 158, 224, 247, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 10133, 2746, 19590, 198, 220, 220, 220, 1610, 2821, 13, 27871, 320, 786, 13, 19119, 0, 7, 25781, 13, 8738, 11, 26692, 11, 308, 82, 8, 198, 437, 198 ]
2.325857
1,605
using VLConstraintBasedModelGenerationUtilities # setup path to protein sequence file - path_to_vff_file = "/Users/jeffreyvarner/Desktop/julia_work/VLConstraintBasedModelGenerationUtilities.jl/test/data/Test.vff" path_to_system_model_file = "/Users/jeffreyvarner/Desktop/julia_work/VLConstraintBasedModelGenerationUtilities.jl/test/data/Test.bson" # let's build the reaction table - metabolic_reaction_table = build_metabolic_reaction_table(path_to_vff_file) |> check # build the stm - stm = build_stoichiometric_matrix(metabolic_reaction_table) |> check # build the species bounds array - species_table = build_species_table(metabolic_reaction_table) |> check species_bounds_array = build_species_bounds_array(species_table) |> check # build the flux bounds array - flux_bounds_array = build_flux_bounds_array(metabolic_reaction_table) |> check # write the system model file - result = write_system_model_file(path=path_to_system_model_file, stoichiometric_matrix=stm, flux_bounds_array=flux_bounds_array, species_bounds_array=species_bounds_array)
[ 3500, 569, 43, 3103, 2536, 2913, 15001, 17633, 8645, 341, 18274, 2410, 198, 198, 2, 9058, 3108, 284, 7532, 8379, 2393, 532, 198, 6978, 62, 1462, 62, 85, 487, 62, 7753, 796, 12813, 14490, 14, 73, 14822, 4364, 7785, 1008, 14, 36881, 14, 73, 43640, 62, 1818, 14, 47468, 3103, 2536, 2913, 15001, 17633, 8645, 341, 18274, 2410, 13, 20362, 14, 9288, 14, 7890, 14, 14402, 13, 85, 487, 1, 198, 6978, 62, 1462, 62, 10057, 62, 19849, 62, 7753, 796, 12813, 14490, 14, 73, 14822, 4364, 7785, 1008, 14, 36881, 14, 73, 43640, 62, 1818, 14, 47468, 3103, 2536, 2913, 15001, 17633, 8645, 341, 18274, 2410, 13, 20362, 14, 9288, 14, 7890, 14, 14402, 13, 1443, 261, 1, 198, 198, 2, 1309, 338, 1382, 262, 6317, 3084, 532, 198, 4164, 29304, 62, 260, 2673, 62, 11487, 796, 1382, 62, 4164, 29304, 62, 260, 2673, 62, 11487, 7, 6978, 62, 1462, 62, 85, 487, 62, 7753, 8, 930, 29, 2198, 198, 198, 2, 1382, 262, 336, 76, 532, 198, 301, 76, 796, 1382, 62, 301, 78, 16590, 16996, 62, 6759, 8609, 7, 4164, 29304, 62, 260, 2673, 62, 11487, 8, 930, 29, 2198, 198, 198, 2, 1382, 262, 4693, 22303, 7177, 532, 198, 35448, 62, 11487, 796, 1382, 62, 35448, 62, 11487, 7, 4164, 29304, 62, 260, 2673, 62, 11487, 8, 930, 29, 2198, 198, 35448, 62, 65, 3733, 62, 18747, 796, 1382, 62, 35448, 62, 65, 3733, 62, 18747, 7, 35448, 62, 11487, 8, 930, 29, 2198, 198, 198, 2, 1382, 262, 28462, 22303, 7177, 532, 198, 69, 22564, 62, 65, 3733, 62, 18747, 796, 1382, 62, 69, 22564, 62, 65, 3733, 62, 18747, 7, 4164, 29304, 62, 260, 2673, 62, 11487, 8, 930, 29, 2198, 198, 198, 2, 3551, 262, 1080, 2746, 2393, 532, 198, 20274, 796, 3551, 62, 10057, 62, 19849, 62, 7753, 7, 6978, 28, 6978, 62, 1462, 62, 10057, 62, 19849, 62, 7753, 11, 3995, 16590, 16996, 62, 6759, 8609, 28, 301, 76, 11, 220, 198, 220, 220, 220, 28462, 62, 65, 3733, 62, 18747, 28, 69, 22564, 62, 65, 3733, 62, 18747, 11, 4693, 62, 65, 3733, 62, 18747, 28, 35448, 62, 65, 3733, 62, 18747, 8, 628 ]
2.917582
364
using Printf using BenchmarkTools function heat() N = 1001 T0 = Matrix{Float64}(undef,N,N) T1 = Matrix{Float64}(undef,N,N) x = Matrix{Float64}(undef,N,N) y = Matrix{Float64}(undef,N,N) a = 0 b = π; dx = (b-a)/(N-1) for j=1:N for i=1:N x[i,j] = (i-1)*dx end end for j=1:N for i=1:N y[i,j] = (j-1)*dx end end dt = dx tmax = (10-mod(10,dt))/dt k = 0.25*dx alpha = k*dt/dx^2 for i=1:N T1[1,i] = 1.0 T1[N,i] = 1.0 T1[i,1] = 1.0 T1[i,N] = 1.0 end for i=1:N T0[1,i] = 1.0 T0[N,i] = 1.0 T0[i,1] = 1.0 T0[i,N] = 1.0 end t = 0*dt vel = open("Julia.dat", "w") write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end for k=1:tmax for j=2:N-1 for i=2:N-1 T1[i,j] = T0[i,j]+alpha*((T0[i+1,j]-2*T0[i,j]+T0[i-1,j])+(T0[i,j+1]-2*T0[i,j]+T0[i,j-1])) end end T0 .= T1 if mod(k,500)==0 write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end end end t = tmax*dt write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end close(vel) end function heat_Vec() N = 1001 T0 = Matrix{Float64}(undef,N,N) T1 = Matrix{Float64}(undef,N,N) x = Matrix{Float64}(undef,N,N) y = Matrix{Float64}(undef,N,N) a = 0 b = π; dx = (b-a)/(N-1) x[:,1] = (0:N-1)*dx x[:,:] .= x[:,1] y[1,:] = (0:N-1)*dx y[:,:] .= y[1,:] dt = dx tmax = (10-mod(10,dt))/dt k = 0.25*dx alpha = k*dt/dx^2 T1[1,:] .= 1.0 T1[N,:] .= 1.0 T1[:,1] .= 1.0 T1[:,N] .= 1.0 T0[1,:] .= 1.0 T0[N,:] .= 1.0 T0[:,1] .= 1.0 T0[:,N] .= 1.0 t = 0*dt vel = open("Julia.dat", "w") write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end for k=1:tmax T1[2:N-1,2:N-1] .= T0[2:N-1,2:N-1].+alpha.*((T0[3:N,2:N-1].-2 .*T0[2:N-1,2:N-1].+T0[1:N-2,2:N-1]).+ (T0[2:N-1,3:N].-2 .*T0[2:N-1,2:N-1].+T0[2:N-1,1:N-2])) T0 .= T1 if mod(k,500)==0 write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end end end t = tmax*dt write(vel, "title =\"ZoneTime_",string(t),"\""," \n") write(vel, "variables = \"x\", \"y\", \"T\""," \n") write(vel, "zone T=\"Zone_"*string(t)*"\" i=",@sprintf("%d",N)," j=",@sprintf("%d",N)," \n") for j=1:N for i=1:N write(vel, @sprintf("%1.9e",x[i,j])," ",@sprintf("%1.9e",y[i,j])," ",@sprintf("%1.9e",T0[i,j])," \n") end end close(vel) end function heat_wof() N = 1001 T0 = Matrix{Float64}(undef,N,N) T1 = Matrix{Float64}(undef,N,N) x = Matrix{Float64}(undef,N,N) y = Matrix{Float64}(undef,N,N) a = 0 b = π; dx = (b-a)/(N-1) for j=1:N for i=1:N x[i,j] = (i-1)*dx end end for j=1:N for i=1:N y[i,j] = (j-1)*dx end end dt = dx tmax = (10-mod(10,dt))/dt k = 0.25*dx alpha = k*dt/dx^2 for i=1:N T1[1,i] = 1.0 T1[N,i] = 1.0 T1[i,1] = 1.0 T1[i,N] = 1.0 end for i=1:N T0[1,i] = 1.0 T0[N,i] = 1.0 T0[i,1] = 1.0 T0[i,N] = 1.0 end for k=1:tmax for j=2:N-1 for i=2:N-1 T1[i,j] = T0[i,j]+alpha*((T0[i+1,j]-2*T0[i,j]+T0[i-1,j])+(T0[i,j+1]-2*T0[i,j]+T0[i,j-1])) end end T0 .= T1 end end function heat_Vec_wof() N = 1001 T0 = Matrix{Float64}(undef,N,N) T1 = Matrix{Float64}(undef,N,N) x = Matrix{Float64}(undef,N,N) y = Matrix{Float64}(undef,N,N) a = 0 b = π; dx = (b-a)/(N-1) x[:,1] = (0:N-1)*dx x[:,:] .= x[:,1] y[1,:] = (0:N-1)*dx y[:,:] .= y[1,:] dt = dx tmax = (10-mod(10,dt))/dt k = 0.25*dx alpha = k*dt/dx^2 T1[1,:] .= 1.0 T1[N,:] .= 1.0 T1[:,1] .= 1.0 T1[:,N] .= 1.0 T0[1,:] .= 1.0 T0[N,:] .= 1.0 T0[:,1] .= 1.0 T0[:,N] .= 1.0 for k=1:tmax T1[2:N-1,2:N-1] .= T0[2:N-1,2:N-1].+alpha.*((T0[3:N,2:N-1].-2 .*T0[2:N-1,2:N-1].+T0[1:N-2,2:N-1]).+ (T0[2:N-1,3:N].-2 .*T0[2:N-1,2:N-1].+T0[2:N-1,1:N-2])) T0 .= T1 end end results1 = @benchmark heat() results2 = @benchmark heat_Vec() results3 = @benchmark heat_wof() results4 = @benchmark heat_Vec_wof()
[ 3500, 12578, 69, 201, 198, 3500, 25187, 4102, 33637, 201, 198, 8818, 4894, 3419, 201, 198, 220, 220, 220, 399, 796, 1802, 16, 201, 198, 220, 220, 220, 309, 15, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 309, 16, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 2124, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 331, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 257, 796, 657, 201, 198, 220, 220, 220, 275, 796, 18074, 222, 26, 201, 198, 220, 220, 220, 44332, 796, 357, 65, 12, 64, 20679, 7, 45, 12, 16, 8, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 72, 11, 73, 60, 796, 357, 72, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 58, 72, 11, 73, 60, 796, 357, 73, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 288, 83, 796, 44332, 201, 198, 220, 220, 220, 256, 9806, 796, 357, 940, 12, 4666, 7, 940, 11, 28664, 4008, 14, 28664, 201, 198, 220, 220, 220, 479, 796, 657, 13, 1495, 9, 34350, 201, 198, 220, 220, 220, 17130, 796, 479, 9, 28664, 14, 34350, 61, 17, 201, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 16, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 45, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 16, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 45, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 16, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 45, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 72, 11, 16, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 72, 11, 45, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 256, 796, 657, 9, 28664, 201, 198, 220, 220, 220, 11555, 796, 1280, 7203, 16980, 544, 13, 19608, 1600, 366, 86, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 329, 479, 28, 16, 25, 83, 9806, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 17, 25, 45, 12, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 17, 25, 45, 12, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 73, 60, 796, 309, 15, 58, 72, 11, 73, 48688, 26591, 9, 19510, 51, 15, 58, 72, 10, 16, 11, 73, 45297, 17, 9, 51, 15, 58, 72, 11, 73, 48688, 51, 15, 58, 72, 12, 16, 11, 73, 12962, 33747, 51, 15, 58, 72, 11, 73, 10, 16, 45297, 17, 9, 51, 15, 58, 72, 11, 73, 48688, 51, 15, 58, 72, 11, 73, 12, 16, 60, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 764, 28, 309, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 953, 7, 74, 11, 4059, 8, 855, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 256, 796, 256, 9806, 9, 28664, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1969, 7, 626, 8, 201, 198, 437, 201, 198, 201, 198, 8818, 4894, 62, 53, 721, 3419, 201, 198, 220, 220, 220, 399, 796, 1802, 16, 201, 198, 220, 220, 220, 309, 15, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 309, 16, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 2124, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 331, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 257, 796, 657, 201, 198, 220, 220, 220, 275, 796, 18074, 222, 26, 201, 198, 220, 220, 220, 44332, 796, 357, 65, 12, 64, 20679, 7, 45, 12, 16, 8, 201, 198, 220, 220, 220, 2124, 58, 45299, 16, 60, 796, 357, 15, 25, 45, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 2124, 58, 45299, 47715, 764, 28, 2124, 58, 45299, 16, 60, 201, 198, 220, 220, 220, 331, 58, 16, 11, 47715, 796, 357, 15, 25, 45, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 331, 58, 45299, 47715, 764, 28, 331, 58, 16, 11, 47715, 201, 198, 201, 198, 220, 220, 220, 288, 83, 796, 44332, 201, 198, 220, 220, 220, 256, 9806, 796, 357, 940, 12, 4666, 7, 940, 11, 28664, 4008, 14, 28664, 201, 198, 220, 220, 220, 479, 796, 657, 13, 1495, 9, 34350, 201, 198, 220, 220, 220, 17130, 796, 479, 9, 28664, 14, 34350, 61, 17, 201, 198, 220, 220, 220, 309, 16, 58, 16, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45299, 16, 60, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45299, 45, 60, 764, 28, 352, 13, 15, 201, 198, 201, 198, 220, 220, 220, 309, 15, 58, 16, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45299, 16, 60, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45299, 45, 60, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 256, 796, 657, 9, 28664, 201, 198, 220, 220, 220, 11555, 796, 1280, 7203, 16980, 544, 13, 19608, 1600, 366, 86, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 329, 479, 28, 16, 25, 83, 9806, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 60, 764, 28, 309, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 26591, 15885, 19510, 51, 15, 58, 18, 25, 45, 11, 17, 25, 45, 12, 16, 4083, 12, 17, 764, 9, 51, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 51, 15, 58, 16, 25, 45, 12, 17, 11, 17, 25, 45, 12, 16, 35944, 10, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 51, 15, 58, 17, 25, 45, 12, 16, 11, 18, 25, 45, 4083, 12, 17, 764, 9, 51, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 51, 15, 58, 17, 25, 45, 12, 16, 11, 16, 25, 45, 12, 17, 60, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 764, 28, 309, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 953, 7, 74, 11, 4059, 8, 855, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 256, 796, 256, 9806, 9, 28664, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 7839, 796, 7879, 26961, 7575, 62, 1600, 8841, 7, 83, 27267, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 25641, 2977, 796, 19990, 87, 34607, 19990, 88, 34607, 19990, 51, 7879, 2430, 3467, 77, 4943, 201, 198, 220, 220, 220, 3551, 7, 626, 11, 366, 11340, 309, 17553, 26961, 62, 1, 9, 8841, 7, 83, 27493, 1, 7879, 1312, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 474, 28, 1600, 31, 82, 37435, 7203, 4, 67, 1600, 45, 27267, 3467, 77, 4943, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 626, 11, 2488, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 87, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 88, 58, 72, 11, 73, 12962, 553, 33172, 31, 82, 37435, 7203, 4, 16, 13, 24, 68, 1600, 51, 15, 58, 72, 11, 73, 12962, 553, 3467, 77, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1969, 7, 626, 8, 201, 198, 437, 201, 198, 201, 198, 8818, 4894, 62, 86, 1659, 3419, 201, 198, 220, 220, 220, 399, 796, 1802, 16, 201, 198, 220, 220, 220, 309, 15, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 309, 16, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 2124, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 331, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 257, 796, 657, 201, 198, 220, 220, 220, 275, 796, 18074, 222, 26, 201, 198, 220, 220, 220, 44332, 796, 357, 65, 12, 64, 20679, 7, 45, 12, 16, 8, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 72, 11, 73, 60, 796, 357, 72, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 329, 474, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 58, 72, 11, 73, 60, 796, 357, 73, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 288, 83, 796, 44332, 201, 198, 220, 220, 220, 256, 9806, 796, 357, 940, 12, 4666, 7, 940, 11, 28664, 4008, 14, 28664, 201, 198, 220, 220, 220, 479, 796, 657, 13, 1495, 9, 34350, 201, 198, 220, 220, 220, 17130, 796, 479, 9, 28664, 14, 34350, 61, 17, 201, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 16, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 45, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 16, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 45, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 45, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 16, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 45, 11, 72, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 72, 11, 16, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 58, 72, 11, 45, 60, 796, 352, 13, 15, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 329, 479, 28, 16, 25, 83, 9806, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 17, 25, 45, 12, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 28, 17, 25, 45, 12, 16, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 72, 11, 73, 60, 796, 309, 15, 58, 72, 11, 73, 48688, 26591, 9, 19510, 51, 15, 58, 72, 10, 16, 11, 73, 45297, 17, 9, 51, 15, 58, 72, 11, 73, 48688, 51, 15, 58, 72, 12, 16, 11, 73, 12962, 33747, 51, 15, 58, 72, 11, 73, 10, 16, 45297, 17, 9, 51, 15, 58, 72, 11, 73, 48688, 51, 15, 58, 72, 11, 73, 12, 16, 60, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 764, 28, 309, 16, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 201, 198, 8818, 4894, 62, 53, 721, 62, 86, 1659, 3419, 201, 198, 220, 220, 220, 399, 796, 1802, 16, 201, 198, 220, 220, 220, 309, 15, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 309, 16, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 2124, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 331, 220, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 45, 11, 45, 8, 201, 198, 220, 220, 220, 257, 796, 657, 201, 198, 220, 220, 220, 275, 796, 18074, 222, 26, 201, 198, 220, 220, 220, 44332, 796, 357, 65, 12, 64, 20679, 7, 45, 12, 16, 8, 201, 198, 220, 220, 220, 2124, 58, 45299, 16, 60, 796, 357, 15, 25, 45, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 2124, 58, 45299, 47715, 764, 28, 2124, 58, 45299, 16, 60, 201, 198, 220, 220, 220, 331, 58, 16, 11, 47715, 796, 357, 15, 25, 45, 12, 16, 27493, 34350, 201, 198, 220, 220, 220, 331, 58, 45299, 47715, 764, 28, 331, 58, 16, 11, 47715, 201, 198, 201, 198, 220, 220, 220, 288, 83, 796, 44332, 201, 198, 220, 220, 220, 256, 9806, 796, 357, 940, 12, 4666, 7, 940, 11, 28664, 4008, 14, 28664, 201, 198, 220, 220, 220, 479, 796, 657, 13, 1495, 9, 34350, 201, 198, 220, 220, 220, 17130, 796, 479, 9, 28664, 14, 34350, 61, 17, 201, 198, 220, 220, 220, 309, 16, 58, 16, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45299, 16, 60, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 16, 58, 45299, 45, 60, 764, 28, 352, 13, 15, 201, 198, 201, 198, 220, 220, 220, 309, 15, 58, 16, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45, 11, 47715, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45299, 16, 60, 764, 28, 352, 13, 15, 201, 198, 220, 220, 220, 309, 15, 58, 45299, 45, 60, 764, 28, 352, 13, 15, 201, 198, 201, 198, 220, 220, 220, 329, 479, 28, 16, 25, 83, 9806, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 16, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 60, 764, 28, 309, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 26591, 15885, 19510, 51, 15, 58, 18, 25, 45, 11, 17, 25, 45, 12, 16, 4083, 12, 17, 764, 9, 51, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 51, 15, 58, 16, 25, 45, 12, 17, 11, 17, 25, 45, 12, 16, 35944, 10, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 51, 15, 58, 17, 25, 45, 12, 16, 11, 18, 25, 45, 4083, 12, 17, 764, 9, 51, 15, 58, 17, 25, 45, 12, 16, 11, 17, 25, 45, 12, 16, 4083, 10, 51, 15, 58, 17, 25, 45, 12, 16, 11, 16, 25, 45, 12, 17, 60, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 309, 15, 764, 28, 309, 16, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 437, 201, 198, 201, 198, 43420, 16, 796, 2488, 26968, 4102, 4894, 3419, 201, 198, 43420, 17, 796, 2488, 26968, 4102, 4894, 62, 53, 721, 3419, 201, 198, 43420, 18, 796, 2488, 26968, 4102, 4894, 62, 86, 1659, 3419, 201, 198, 43420, 19, 796, 2488, 26968, 4102, 4894, 62, 53, 721, 62, 86, 1659, 3419, 201, 198 ]
1.486057
4,339
######################### Global Time Stepping ########################### function forwardEuler(mesh::Mesh, fluxResidualFn, sln::SolutionState, boundaryConditions, fluid::Fluid, dt) sln.fluxResiduals = fluxResidualFn(mesh, sln, boundaryConditions, fluid) @fastmath sln.cellState .+= sln.fluxResiduals.*dt @fastmath decodeSolution_3D(sln, fluid) return sln end function RK2_Mid(mesh, fluxResidualFn, sln, boundaryConditions, fluid::Fluid, dt) fluxResiduals1 = fluxResidualFn(mesh, sln, boundaryConditions, fluid) halfwayEstimate = sln.cellState .+ fluxResiduals1.*dt/2 solutionState2 = SolutionState(halfwayEstimate, sln.cellFluxes, sln.cellPrimitives, sln.fluxResiduals, sln.faceFluxes) decodeSolution_3D(solutionState2, fluid) sln.fluxResiduals = fluxResidualFn(mesh, solutionState2, boundaryConditions, fluid) sln.cellState .+= sln.fluxResiduals.*dt decodeSolution_3D(sln, fluid) return sln end function RK4(mesh, fluxResidualFn, sln, boundaryConditions, fluid::Fluid, dt) fluxResiduals1 = fluxResidualFn(mesh, sln, boundaryConditions, fluid) halfwayEstimate = sln.cellState .+ fluxResiduals1*dt/2 lastSolutionState = SolutionState(halfwayEstimate, sln.cellFluxes, sln.cellPrimitives, sln.fluxResiduals, sln.faceFluxes) decodeSolution_3D(lastSolutionState, fluid) fluxResiduals2 = fluxResidualFn(mesh, lastSolutionState, boundaryConditions, fluid) halfwayEstimate2 = sln.cellState .+ fluxResiduals2*dt/2 lastSolutionState.cellState = halfwayEstimate2 decodeSolution_3D(lastSolutionState, fluid) fluxResiduals3 = fluxResidualFn(mesh, lastSolutionState, boundaryConditions, fluid) finalEstimate1 = sln.cellState .+ fluxResiduals3*dt lastSolutionState.cellState = finalEstimate1 decodeSolution_3D(lastSolutionState, fluid) fluxResiduals4 = fluxResidualFn(mesh, lastSolutionState, boundaryConditions, fluid) sln.cellState .+= (fluxResiduals1 .+ 2*fluxResiduals2 .+ 2*fluxResiduals3 .+ fluxResiduals4 )*(dt/6) decodeSolution_3D(sln, fluid) return sln end function ShuOsher(mesh, fluxResidualFn, sln, boundaryConditions, fluid::Fluid, dt) fluxResiduals1 = fluxResidualFn(mesh, sln, boundaryConditions, fluid) endEstimate = sln.cellState .+ fluxResiduals1.*dt lastSolutionState = SolutionState(endEstimate, sln.cellFluxes, sln.cellPrimitives, sln.fluxResiduals, sln.faceFluxes) decodeSolution_3D(lastSolutionState, fluid) fluxResiduals2 = fluxResidualFn(mesh, lastSolutionState, boundaryConditions, fluid) estimate2 = (3/4).*sln.cellState .+ (1/4).*(endEstimate .+ fluxResiduals2.*dt) lastSolutionState.cellState = estimate2 decodeSolution_3D(lastSolutionState, fluid) fluxResiduals3 = fluxResidualFn(mesh, lastSolutionState, boundaryConditions, fluid) sln.cellState .= (1/3).*sln.cellState .+ (2/3).*(estimate2 .+ dt.*fluxResiduals3) decodeSolution_3D(sln, fluid) return sln end ######################### Local Time Stepping ########################### # Incomplete, will be commented more fully once it produces nice solutions and the implementation is finalized function LTSEuler(mesh, fluxResidualFn, sln, boundaryConditions, fluid::Fluid, dt) targetCFL = dt[1] fluxResiduals = fluxResidualFn(mesh, sln, boundaryConditions, fluid) CFL!(dt, mesh, sln, fluid, 1) dt .= targetCFL ./ dt smoothTimeStep!(dt, mesh, 0.1) smoothTimeStep!(dt, mesh, 0.1) sln.cellState .+= fluxResiduals .* dt decodeSolution_3D(sln, fluid) return sln end function smoothTimeStep!(dt, mesh::Mesh, diffusionCoefficient=0.2) nCells, nFaces, nBoundaries, nBdryFaces = unstructuredMeshInfo(mesh) timeFluxes = zeros(nCells) surfaceAreas = zeros(nCells) for f in 1:nFaces-nBdryFaces ownerCell = mesh.faces[f][1] neighbourCell = mesh.faces[f][2] timeFlux = (dt[ownerCell] - dt[neighbourCell]) * mag(mesh.fAVecs[f]) surfaceAreas[ownerCell] += mag(mesh.fAVecs[f]) surfaceAreas[neighbourCell] += mag(mesh.fAVecs[f]) timeFluxes[ownerCell] -= timeFlux timeFluxes[neighbourCell] += timeFlux end timeFluxes .*= (diffusionCoefficient ./ surfaceAreas) for i in eachindex(timeFluxes) timeFluxes[i] = min(0, timeFluxes[i]) end dt .+= timeFluxes end #TODO: For implicit methods, need to compute the flux Jacobians at each edge, instead of just the fluxes # Use Jacobians as coefficients in matrix representing timestepping equations # Then solve with GMRES or some other matrix solver
[ 14468, 7804, 2, 8060, 3862, 2441, 2105, 1303, 14468, 7804, 2235, 198, 8818, 2651, 36, 18173, 7, 76, 5069, 3712, 37031, 11, 28462, 4965, 312, 723, 37, 77, 11, 1017, 77, 3712, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 3712, 37, 2290, 312, 11, 288, 83, 8, 198, 220, 220, 220, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 2488, 7217, 11018, 1017, 77, 13, 3846, 9012, 764, 47932, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 15885, 28664, 198, 220, 220, 220, 2488, 7217, 11018, 36899, 46344, 62, 18, 35, 7, 6649, 77, 11, 11711, 8, 628, 220, 220, 220, 1441, 1017, 77, 198, 437, 198, 198, 8818, 371, 42, 17, 62, 22622, 7, 76, 5069, 11, 28462, 4965, 312, 723, 37, 77, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 3712, 37, 2290, 312, 11, 288, 83, 8, 198, 220, 220, 220, 28462, 4965, 312, 723, 82, 16, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 19487, 22362, 1920, 796, 1017, 77, 13, 3846, 9012, 764, 10, 28462, 4965, 312, 723, 82, 16, 15885, 28664, 14, 17, 198, 220, 220, 220, 4610, 9012, 17, 796, 28186, 9012, 7, 13959, 1014, 22362, 1920, 11, 1017, 77, 13, 3846, 37, 22564, 274, 11, 1017, 77, 13, 3846, 23828, 20288, 11, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 11, 1017, 77, 13, 2550, 37, 22564, 274, 8, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 82, 2122, 9012, 17, 11, 11711, 8, 628, 220, 220, 220, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 4610, 9012, 17, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 1017, 77, 13, 3846, 9012, 764, 47932, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 15885, 28664, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 6649, 77, 11, 11711, 8, 628, 220, 220, 220, 1441, 1017, 77, 198, 437, 198, 198, 8818, 371, 42, 19, 7, 76, 5069, 11, 28462, 4965, 312, 723, 37, 77, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 3712, 37, 2290, 312, 11, 288, 83, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 16, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 19487, 22362, 1920, 796, 1017, 77, 13, 3846, 9012, 764, 10, 28462, 4965, 312, 723, 82, 16, 9, 28664, 14, 17, 198, 220, 220, 220, 938, 46344, 9012, 796, 28186, 9012, 7, 13959, 1014, 22362, 1920, 11, 1017, 77, 13, 3846, 37, 22564, 274, 11, 1017, 77, 13, 3846, 23828, 20288, 11, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 11, 1017, 77, 13, 2550, 37, 22564, 274, 8, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 12957, 46344, 9012, 11, 11711, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 17, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 938, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 19487, 22362, 1920, 17, 796, 1017, 77, 13, 3846, 9012, 764, 10, 28462, 4965, 312, 723, 82, 17, 9, 28664, 14, 17, 198, 220, 220, 220, 938, 46344, 9012, 13, 3846, 9012, 796, 19487, 22362, 1920, 17, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 12957, 46344, 9012, 11, 11711, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 18, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 938, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 2457, 22362, 1920, 16, 796, 1017, 77, 13, 3846, 9012, 764, 10, 28462, 4965, 312, 723, 82, 18, 9, 28664, 198, 220, 220, 220, 938, 46344, 9012, 13, 3846, 9012, 796, 2457, 22362, 1920, 16, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 12957, 46344, 9012, 11, 11711, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 19, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 938, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 1017, 77, 13, 3846, 9012, 764, 47932, 357, 69, 22564, 4965, 312, 723, 82, 16, 764, 10, 362, 9, 69, 22564, 4965, 312, 723, 82, 17, 764, 10, 362, 9, 69, 22564, 4965, 312, 723, 82, 18, 764, 10, 28462, 4965, 312, 723, 82, 19, 1267, 9, 7, 28664, 14, 21, 8, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 6649, 77, 11, 11711, 8, 628, 220, 220, 220, 1441, 1017, 77, 198, 437, 198, 198, 8818, 32344, 16748, 372, 7, 76, 5069, 11, 28462, 4965, 312, 723, 37, 77, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 3712, 37, 2290, 312, 11, 288, 83, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 16, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 886, 22362, 1920, 796, 1017, 77, 13, 3846, 9012, 764, 10, 28462, 4965, 312, 723, 82, 16, 15885, 28664, 198, 220, 220, 220, 938, 46344, 9012, 796, 28186, 9012, 7, 437, 22362, 1920, 11, 1017, 77, 13, 3846, 37, 22564, 274, 11, 1017, 77, 13, 3846, 23828, 20288, 11, 1017, 77, 13, 69, 22564, 4965, 312, 723, 82, 11, 1017, 77, 13, 2550, 37, 22564, 274, 8, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 12957, 46344, 9012, 11, 11711, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 17, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 938, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 8636, 17, 796, 357, 18, 14, 19, 737, 9, 6649, 77, 13, 3846, 9012, 764, 10, 357, 16, 14, 19, 737, 9, 7, 437, 22362, 1920, 764, 10, 28462, 4965, 312, 723, 82, 17, 15885, 28664, 8, 198, 220, 220, 220, 938, 46344, 9012, 13, 3846, 9012, 796, 8636, 17, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 12957, 46344, 9012, 11, 11711, 8, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 18, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 938, 46344, 9012, 11, 18645, 25559, 1756, 11, 11711, 8, 198, 220, 220, 220, 1017, 77, 13, 3846, 9012, 764, 28, 357, 16, 14, 18, 737, 9, 6649, 77, 13, 3846, 9012, 764, 10, 357, 17, 14, 18, 737, 9, 7, 395, 1920, 17, 764, 10, 288, 83, 15885, 69, 22564, 4965, 312, 723, 82, 18, 8, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 6649, 77, 11, 11711, 8, 628, 220, 220, 220, 1441, 1017, 77, 198, 437, 198, 198, 14468, 7804, 2, 10714, 3862, 2441, 2105, 1303, 14468, 7804, 2235, 198, 2, 554, 20751, 11, 481, 307, 16476, 517, 3938, 1752, 340, 11073, 3621, 8136, 290, 262, 7822, 318, 32013, 198, 8818, 406, 4694, 36, 18173, 7, 76, 5069, 11, 28462, 4965, 312, 723, 37, 77, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 3712, 37, 2290, 312, 11, 288, 83, 8, 198, 220, 220, 220, 2496, 34, 3697, 796, 288, 83, 58, 16, 60, 628, 220, 220, 220, 28462, 4965, 312, 723, 82, 796, 28462, 4965, 312, 723, 37, 77, 7, 76, 5069, 11, 1017, 77, 11, 18645, 25559, 1756, 11, 11711, 8, 628, 220, 220, 220, 45239, 0, 7, 28664, 11, 19609, 11, 1017, 77, 11, 11711, 11, 352, 8, 198, 220, 220, 220, 288, 83, 764, 28, 2496, 34, 3697, 24457, 288, 83, 198, 220, 220, 220, 7209, 7575, 8600, 0, 7, 28664, 11, 19609, 11, 657, 13, 16, 8, 198, 220, 220, 220, 7209, 7575, 8600, 0, 7, 28664, 11, 19609, 11, 657, 13, 16, 8, 198, 220, 220, 220, 1017, 77, 13, 3846, 9012, 764, 47932, 28462, 4965, 312, 723, 82, 764, 9, 288, 83, 198, 220, 220, 220, 36899, 46344, 62, 18, 35, 7, 6649, 77, 11, 11711, 8, 628, 220, 220, 220, 1441, 1017, 77, 198, 437, 198, 198, 8818, 7209, 7575, 8600, 0, 7, 28664, 11, 19609, 3712, 37031, 11, 44258, 34, 2577, 5632, 28, 15, 13, 17, 8, 198, 220, 220, 220, 299, 34, 19187, 11, 299, 37, 2114, 11, 299, 49646, 3166, 11, 299, 33, 39140, 37, 2114, 796, 555, 7249, 1522, 37031, 12360, 7, 76, 5069, 8, 628, 220, 220, 220, 640, 37, 22564, 274, 796, 1976, 27498, 7, 77, 34, 19187, 8, 198, 220, 220, 220, 4417, 8491, 292, 796, 1976, 27498, 7, 77, 34, 19187, 8, 198, 220, 220, 220, 329, 277, 287, 352, 25, 77, 37, 2114, 12, 77, 33, 39140, 37, 2114, 198, 220, 220, 220, 220, 220, 220, 220, 4870, 28780, 796, 19609, 13, 32186, 58, 69, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 12250, 28780, 796, 19609, 13, 32186, 58, 69, 7131, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 640, 37, 22564, 796, 357, 28664, 58, 18403, 28780, 60, 532, 288, 83, 58, 710, 394, 6084, 28780, 12962, 1635, 2153, 7, 76, 5069, 13, 69, 10116, 721, 82, 58, 69, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 4417, 8491, 292, 58, 18403, 28780, 60, 15853, 2153, 7, 76, 5069, 13, 69, 10116, 721, 82, 58, 69, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 4417, 8491, 292, 58, 710, 394, 6084, 28780, 60, 15853, 2153, 7, 76, 5069, 13, 69, 10116, 721, 82, 58, 69, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 640, 37, 22564, 274, 58, 18403, 28780, 60, 48185, 640, 37, 22564, 198, 220, 220, 220, 220, 220, 220, 220, 640, 37, 22564, 274, 58, 710, 394, 6084, 28780, 60, 15853, 640, 37, 22564, 198, 220, 220, 220, 886, 628, 220, 220, 220, 640, 37, 22564, 274, 764, 9, 28, 357, 26069, 4241, 34, 2577, 5632, 24457, 4417, 8491, 292, 8, 628, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 2435, 37, 22564, 274, 8, 198, 220, 220, 220, 220, 220, 220, 220, 640, 37, 22564, 274, 58, 72, 60, 796, 949, 7, 15, 11, 640, 37, 22564, 274, 58, 72, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 288, 83, 764, 47932, 640, 37, 22564, 274, 198, 437, 198, 198, 2, 51, 3727, 46, 25, 1114, 16992, 5050, 11, 761, 284, 24061, 262, 28462, 12806, 1547, 379, 1123, 5743, 11, 2427, 286, 655, 262, 28462, 274, 198, 220, 220, 220, 1303, 5765, 12806, 1547, 355, 44036, 287, 17593, 10200, 4628, 29872, 2105, 27490, 198, 220, 220, 220, 1303, 3244, 8494, 351, 6951, 19535, 393, 617, 584, 17593, 1540, 332, 198 ]
2.524599
1,809
################################################################################ # # AlgAssRelOrd # ################################################################################ # S is the element type of the base field of the algebra, T the fractional ideal # type of this field mutable struct AlgAssRelOrd{S, T, U} <: Ring algebra::U dim::Int pseudo_basis#::Vector{Tuple{AbsAlgAssElem{S}, T}} basis_matrix::Generic.MatSpaceElem{S} basis_mat_inv::Generic.MatSpaceElem{S} basis_pmatrix::PMat{S, T} disc # an integral ideal in the base field ismaximal::Int # 0 Not known # 1 Known to be maximal # 2 Known to not be maximal trred_matrix::Generic.MatSpaceElem{S} inv_coeff_ideals::Vector{T} isnice::Bool nice_order#Tuple{AlgAssAbsOrd, T} nice_order_ideal::T function AlgAssRelOrd{S, T, U}(A::AbsAlgAss{S}) where {S, T, U} z = new{S, T, U}() z.algebra = A z.dim = dim(A) z.ismaximal = 0 z.isnice = false return z end function AlgAssRelOrd{S, T, U}(A::U, M::PMat{S, T}) where {S, T, U} z = AlgAssRelOrd{S, T, U}(A) z.basis_pmatrix = M z.basis_matrix = M.matrix return z end function AlgAssRelOrd{S, T, U}(A::U, M::Generic.MatSpaceElem{S}) where {S, T, U} z = AlgAssRelOrd{S, T, U}(A) z.basis_matrix = M z.basis_pmatrix = pseudo_matrix(M) return z end end ################################################################################ # # AlgAssRelOrdElem # ################################################################################ mutable struct AlgAssRelOrdElem{S, T, U} <: RingElem parent::AlgAssRelOrd{S, T, U} elem_in_algebra::AbsAlgAssElem{S} coordinates::Vector{S} has_coord::Bool function AlgAssRelOrdElem{S, T, U}(O::AlgAssRelOrd{S, T, U}) where {S, T, U} z = new{S, T, U}() z.parent = O z.elem_in_algebra = zero(algebra(O)) z.coordinates = Vector{S}(undef, degree(O)) z.has_coord = false return z end function AlgAssRelOrdElem{S, T, U}(O::AlgAssRelOrd{S, T, U}, a::AbsAlgAssElem{S}) where {S, T, U} z = new{S, T, U}() z.parent = O z.elem_in_algebra = a z.coordinates = Vector{S}(undef, degree(O)) z.has_coord = false return z end function AlgAssRelOrdElem{S, T, U}(O::AlgAssRelOrd{S, T, U}, a::AbsAlgAssElem{S}, arr::Vector{S}) where {S, T, U} z = new{S, T, U}() z.parent = O z.elem_in_algebra = a z.coordinates = arr z.has_coord = true return z end end ################################################################################ # # AlgAssRelOrdIdl # ################################################################################ mutable struct AlgAssRelOrdIdl{S, T, U} algebra::U pseudo_basis::Vector{Tuple{AbsAlgAssElem{S}, T}} # The basis matrices are in the BASIS of the ALGEBRA! basis_pmatrix::PMat{S, T} basis_matrix::Generic.MatSpaceElem{S} basis_mat_inv::Generic.MatSpaceElem{S} # Basis pseudo-matrices with respect to orders basis_pmatrix_wrt::Dict{AlgAssRelOrd{S, T}, PMat{S, T}} # Left and right order: # The largest orders of which the ideal is a left resp. right ideal. left_order::AlgAssRelOrd{S, T, U} right_order::AlgAssRelOrd{S, T, U} # Any order contained in the left or right order, that is, an order of which # the ideal is a (possibly fractional) ideal. order::AlgAssRelOrd{S, T, U} # isleft and isright with respect to `order` isleft::Int # 0 Not known # 1 Known to be a left ideal # 2 Known not to be a left ideal isright::Int # as for isleft iszero::Int # 0: don't know, 1: known to be zero, 2: known to be not zero norm::Dict{AlgAssRelOrd{S, T, U}, T} # The ideal has different norms with respect # to different orders normred::Dict{AlgAssRelOrd{S, T, U}, T} function AlgAssRelOrdIdl{S, T, U}(A::AbsAlgAss{S}) where {S, T, U} z = new{S, T, U}() z.algebra = A z.isleft = 0 z.isright = 0 z.iszero = 0 z.basis_pmatrix_wrt = Dict{AlgAssRelOrd{S, T, U}, PMat{S, T}}() z.norm = Dict{AlgAssRelOrd{S, T, U}, T}() z.normred = Dict{AlgAssRelOrd{S, T, U}, T}() return z end function AlgAssRelOrdIdl{S, T, U}(A::AbsAlgAss{S}, M::PMat{S, T}) where {S, T, U} z = AlgAssRelOrdIdl{S, T, U}(A) z.basis_pmatrix = M z.basis_matrix = M.matrix return z end end
[ 29113, 29113, 14468, 198, 2, 198, 2, 220, 978, 70, 8021, 6892, 35422, 198, 2, 198, 29113, 29113, 14468, 198, 198, 2, 311, 318, 262, 5002, 2099, 286, 262, 2779, 2214, 286, 262, 37139, 11, 309, 262, 13390, 282, 7306, 198, 2, 2099, 286, 428, 2214, 198, 76, 18187, 2878, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 1279, 25, 12569, 198, 220, 37139, 3712, 52, 198, 220, 5391, 3712, 5317, 198, 220, 24543, 62, 12093, 271, 2, 3712, 38469, 90, 51, 29291, 90, 24849, 2348, 70, 8021, 36, 10671, 90, 50, 5512, 309, 11709, 198, 220, 4308, 62, 6759, 8609, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 92, 198, 220, 4308, 62, 6759, 62, 16340, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 92, 198, 220, 4308, 62, 4426, 265, 8609, 3712, 5868, 265, 90, 50, 11, 309, 92, 628, 220, 1221, 1303, 281, 19287, 7306, 287, 262, 2779, 2214, 628, 220, 318, 9806, 4402, 3712, 5317, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 657, 1892, 1900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 352, 29454, 284, 307, 40708, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 362, 29454, 284, 407, 307, 40708, 628, 220, 491, 445, 62, 6759, 8609, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 92, 628, 220, 800, 62, 1073, 14822, 62, 485, 874, 3712, 38469, 90, 51, 92, 628, 220, 2125, 501, 3712, 33, 970, 198, 220, 3621, 62, 2875, 2, 51, 29291, 90, 2348, 70, 8021, 24849, 35422, 11, 309, 92, 198, 220, 3621, 62, 2875, 62, 485, 282, 3712, 51, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 7, 32, 3712, 24849, 2348, 70, 8021, 90, 50, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 649, 90, 50, 11, 309, 11, 471, 92, 3419, 198, 220, 220, 220, 1976, 13, 282, 29230, 796, 317, 198, 220, 220, 220, 1976, 13, 27740, 796, 5391, 7, 32, 8, 198, 220, 220, 220, 1976, 13, 1042, 897, 4402, 796, 657, 198, 220, 220, 220, 1976, 13, 271, 44460, 796, 3991, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 7, 32, 3712, 52, 11, 337, 3712, 5868, 265, 90, 50, 11, 309, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 7, 32, 8, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 4426, 265, 8609, 796, 337, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 6759, 8609, 796, 337, 13, 6759, 8609, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 7, 32, 3712, 52, 11, 337, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 978, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 7, 32, 8, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 6759, 8609, 796, 337, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 4426, 265, 8609, 796, 24543, 62, 6759, 8609, 7, 44, 8, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 198, 437, 198, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 978, 70, 8021, 6892, 35422, 36, 10671, 198, 2, 198, 29113, 29113, 14468, 198, 198, 76, 18187, 2878, 978, 70, 8021, 6892, 35422, 36, 10671, 90, 50, 11, 309, 11, 471, 92, 1279, 25, 12569, 36, 10671, 198, 220, 2560, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 198, 220, 9766, 76, 62, 259, 62, 282, 29230, 3712, 24849, 2348, 70, 8021, 36, 10671, 90, 50, 92, 198, 220, 22715, 3712, 38469, 90, 50, 92, 198, 220, 468, 62, 37652, 3712, 33, 970, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 36, 10671, 90, 50, 11, 309, 11, 471, 92, 7, 46, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 649, 90, 50, 11, 309, 11, 471, 92, 3419, 198, 220, 220, 220, 1976, 13, 8000, 796, 440, 198, 220, 220, 220, 1976, 13, 68, 10671, 62, 259, 62, 282, 29230, 796, 6632, 7, 282, 29230, 7, 46, 4008, 198, 220, 220, 220, 1976, 13, 37652, 17540, 796, 20650, 90, 50, 92, 7, 917, 891, 11, 4922, 7, 46, 4008, 198, 220, 220, 220, 1976, 13, 10134, 62, 37652, 796, 3991, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 36, 10671, 90, 50, 11, 309, 11, 471, 92, 7, 46, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 257, 3712, 24849, 2348, 70, 8021, 36, 10671, 90, 50, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 649, 90, 50, 11, 309, 11, 471, 92, 3419, 198, 220, 220, 220, 1976, 13, 8000, 796, 440, 198, 220, 220, 220, 1976, 13, 68, 10671, 62, 259, 62, 282, 29230, 796, 257, 198, 220, 220, 220, 1976, 13, 37652, 17540, 796, 20650, 90, 50, 92, 7, 917, 891, 11, 4922, 7, 46, 4008, 198, 220, 220, 220, 1976, 13, 10134, 62, 37652, 796, 3991, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 36, 10671, 90, 50, 11, 309, 11, 471, 92, 7, 46, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 257, 3712, 24849, 2348, 70, 8021, 36, 10671, 90, 50, 5512, 5240, 3712, 38469, 90, 50, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 649, 90, 50, 11, 309, 11, 471, 92, 3419, 198, 220, 220, 220, 1976, 13, 8000, 796, 440, 198, 220, 220, 220, 1976, 13, 68, 10671, 62, 259, 62, 282, 29230, 796, 257, 198, 220, 220, 220, 1976, 13, 37652, 17540, 796, 5240, 198, 220, 220, 220, 1976, 13, 10134, 62, 37652, 796, 2081, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 198, 437, 198, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, 978, 70, 8021, 6892, 35422, 7390, 75, 198, 2, 198, 29113, 29113, 14468, 198, 198, 76, 18187, 2878, 978, 70, 8021, 6892, 35422, 7390, 75, 90, 50, 11, 309, 11, 471, 92, 198, 220, 37139, 3712, 52, 628, 220, 24543, 62, 12093, 271, 3712, 38469, 90, 51, 29291, 90, 24849, 2348, 70, 8021, 36, 10671, 90, 50, 5512, 309, 11709, 198, 220, 1303, 383, 4308, 2603, 45977, 389, 287, 262, 29809, 1797, 286, 262, 8355, 8264, 33, 3861, 0, 198, 220, 4308, 62, 4426, 265, 8609, 3712, 5868, 265, 90, 50, 11, 309, 92, 198, 220, 4308, 62, 6759, 8609, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 92, 198, 220, 4308, 62, 6759, 62, 16340, 3712, 46189, 13, 19044, 14106, 36, 10671, 90, 50, 92, 628, 220, 1303, 6455, 271, 24543, 12, 6759, 45977, 351, 2461, 284, 6266, 198, 220, 4308, 62, 4426, 265, 8609, 62, 86, 17034, 3712, 35, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 5512, 3122, 265, 90, 50, 11, 309, 11709, 628, 220, 1303, 9578, 290, 826, 1502, 25, 198, 220, 1303, 383, 4387, 6266, 286, 543, 262, 7306, 318, 257, 1364, 1217, 13, 826, 7306, 13, 198, 220, 1364, 62, 2875, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 198, 220, 826, 62, 2875, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 628, 220, 1303, 4377, 1502, 7763, 287, 262, 1364, 393, 826, 1502, 11, 326, 318, 11, 281, 1502, 286, 543, 198, 220, 1303, 262, 7306, 318, 257, 357, 39363, 13390, 282, 8, 7306, 13, 198, 220, 1502, 3712, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 92, 628, 220, 1303, 318, 9464, 290, 318, 3506, 351, 2461, 284, 4600, 2875, 63, 198, 220, 318, 9464, 3712, 5317, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 657, 1892, 1900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 352, 29454, 284, 307, 257, 1364, 7306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 362, 29454, 407, 284, 307, 257, 1364, 7306, 198, 220, 318, 3506, 3712, 5317, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 355, 329, 318, 9464, 628, 220, 318, 22570, 3712, 5317, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 657, 25, 836, 470, 760, 11, 352, 25, 1900, 284, 307, 6632, 11, 362, 25, 1900, 284, 307, 407, 6632, 628, 220, 2593, 3712, 35, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 309, 92, 1303, 383, 7306, 468, 1180, 19444, 351, 2461, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 284, 1180, 6266, 198, 220, 2593, 445, 3712, 35, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 309, 92, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 7390, 75, 90, 50, 11, 309, 11, 471, 92, 7, 32, 3712, 24849, 2348, 70, 8021, 90, 50, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 649, 90, 50, 11, 309, 11, 471, 92, 3419, 198, 220, 220, 220, 1976, 13, 282, 29230, 796, 317, 198, 220, 220, 220, 1976, 13, 271, 9464, 796, 657, 198, 220, 220, 220, 1976, 13, 271, 3506, 796, 657, 198, 220, 220, 220, 1976, 13, 271, 22570, 796, 657, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 4426, 265, 8609, 62, 86, 17034, 796, 360, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 3122, 265, 90, 50, 11, 309, 11709, 3419, 198, 220, 220, 220, 1976, 13, 27237, 796, 360, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 309, 92, 3419, 198, 220, 220, 220, 1976, 13, 27237, 445, 796, 360, 713, 90, 2348, 70, 8021, 6892, 35422, 90, 50, 11, 309, 11, 471, 5512, 309, 92, 3419, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 628, 220, 2163, 978, 70, 8021, 6892, 35422, 7390, 75, 90, 50, 11, 309, 11, 471, 92, 7, 32, 3712, 24849, 2348, 70, 8021, 90, 50, 5512, 337, 3712, 5868, 265, 90, 50, 11, 309, 30072, 810, 1391, 50, 11, 309, 11, 471, 92, 198, 220, 220, 220, 1976, 796, 978, 70, 8021, 6892, 35422, 7390, 75, 90, 50, 11, 309, 11, 471, 92, 7, 32, 8, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 4426, 265, 8609, 796, 337, 198, 220, 220, 220, 1976, 13, 12093, 271, 62, 6759, 8609, 796, 337, 13, 6759, 8609, 198, 220, 220, 220, 1441, 1976, 198, 220, 886, 198, 437, 198 ]
2.262766
2,017
" Iterating over an AbstractGroup is the same as iterating over the set. " abstract type AbstractGroup end # TODO: convert `Set` to `AbstractSet` where possible to support OrderedSets et al """ Stucture consisting of a set and a binary operation. No constraints are put on either expression. """ struct Groupoid{T} <: AbstractGroup set::Set{T} operation::Function end """ Group. The following axioms must hold. Assuming a group G = (S, ∘), then - Closure: the group must be closed under the binary operation. ∀x,y ∈ S: x ∘ y ∈ S - Associativity: ∀x,y,z ∈ S: x ∘ (y ∘ z) = (x ∘ y) ∘ z - Identity: ∃e ∈ S: ∀x ∈ S, x ∘ e = x = e ∘ x - Inverses: ∀x ∈ S, ∃ x⁻¹ ∈ S : x ∘ x⁻¹ = e = x⁻¹ ∘ x """ struct Group{T} <: AbstractGroup where {T} set::Set{T} operation::Function Group{T}(set, operation) where T = if _validate_group(Groupoid(set, operation)) new(set, operation) end end Group(set::Set{T}, operation::Function) where {T} = Group{T}(set, operation) """ Subgroup of a group. Create using SubGroup(group, subset). Must be closed under the group operation, include the identity element and include inverses for each element. """ struct SubGroup{T} <: AbstractGroup where {T} group::Group{T} set::Set{T} operation::Function end function SubGroup(group::Group{T}, subset::Set{<:T})::SubGroup{T} where {T} @assert subset ⊆ group.set g = Groupoid(subset, group.operation) assert_closure(g) _assert_inverses(get_identity_element(g), g.set, g.operation) return SubGroup(group, subset, group.operation) end abstract type AbstractGroupAction end struct _GroupActionLike{T} <: AbstractGroupAction where {T} group::Group{<:T} set::Set{<:T} action::Function end struct GroupAction{T} <: AbstractGroupAction where {T} group::Group{<:T} set::Set{<:T} action::Function #GroupAction{T} end # TODO: fix convert below, then simplify code as necessary # import Base: convert # convert(T::Set{S}, x::Array{S, 1}) where {S} = T(_ for _ in x) # convert(Set, Array{Int, 1}([1])) function coset(left::T, set::Set{T}, operation::Function)::Set{T} where {T} #Set(x for x in operation.(left, set)) Set(operation(left, right) for right in set) end function coset(set::Set{T}, right::T, operation::Function)::Set{T} where {T} # Set(x for x in operation.(set, right)) Set(operation(left, right) for left in set) end function coset(left, group::AbstractGroup) coset(left, group.set, group.operation) end function coset(group::AbstractGroup, right) coset(group.set, right, group.operation) end function set_composition(left_set::Set{<:T}, right_set::Set{<:T}, operation::Function)::Set where {T} # `map` is not defined on sets # reduce(union, coset(left, right_set, operation) for left in left_set) Set(operation(left, right) for left in left_set for right in right_set) end function assert_closure(set::Set, closed_in_set::Set, operation::Function)::Nothing # We only check left closure. @assert set_composition(set, closed_in_set, operation) ⊆ closed_in_set end function assert_closure(group::AbstractGroup)::Nothing assert_closure(group.set, group.set, group.operation) end function assert_closure(ga::AbstractGroupAction)::Nothing assert_closure(ga.group.set, ga.set, ga.action) end function assert_associativity(set::Set, operation::Function)::Nothing for x in set for y in set for z in set a = operation(x, operation(y, z)) b = operation(operation(x, y), z) @assert a == b "$x ∘ ($y ∘ $z) = $a ≠ $b = ($x ∘ $y) ∘ $z" end end end end function assert_associativity(group::AbstractGroup)::Nothing assert_associativity(group.set, group.operation) end function _assert_identity_element(element::T, set::Set{T}, operation::Function)::Nothing where {T} # we assume broadcasting works on the operation # @assert operation.(element, set) == set # should be using ordered sets or vectors here for x in set @assert x == operation(element, x) == operation(x, element) end end function get_identity_element(group::AbstractGroup) # TODO: return type for x in group.set try _assert_identity_element(x, group.set, group.operation) return x catch AssertionError continue end end throw(AssertionError("No identity element found")) end function _assert_inverses(identity_element::T, set::Set{T}, operation::Function)::Nothing where {T} for item in set @assert identity_element in coset(item, set, operation) @assert identity_element in coset(set, item, operation) end end function _validate_group(group::AbstractGroup)::Bool # Validation assert_closure(group) assert_associativity(group) e = get_identity_element(group) # This raises on failure _assert_inverses(e, group.set, group.operation) return true end function naive_isequal(x::T, y::T) where T for f in fieldnames(T) if getfield(x, f) != getfield(y, f) return false end end return true end import Base: == ==(x::T, y::T) where T<:AbstractGroup = naive_isequal(x, y) # ==(x::Group, y::Group) = naive_isequal(x, y) # ==(x::SubGroup, y::SubGroup) = naive_isequal(x, y) function ==(x::AbstractGroup, y::SubGroup)::Bool if y.set == x.set && x.operation == y.operation return true end return false end ==(x::SubGroup, y::AbstractGroup) = ==(y, x) # Prevent `MethodError: ==(::SubGroup{Int64}, ::SubGroup{Int64}) is ambiguous` ==(x::SubGroup, y::SubGroup) = naive_isequal(x, y) import Base: iterate iterate(group::AbstractGroup) = iterate(group.set) iterate(group::AbstractGroup, t::T) where {T} = iterate(group.set, t) import Base: length length(x::AbstractGroup) = length(x.set) """ N is a _normal_ subgroup of G if ∀g ∈ G, gN = Ng N is a normal subgroup of G iff N is a subgroup of G and N is a union of conjugacy classes of G """ function isnormal(subgroup::SubGroup) for g in subgroup.group left_coset = coset(g, subgroup) right_coset = coset(subgroup, g) if coset(g, subgroup) != coset(subgroup, g) return false end end return true end function iscyclic(group::AbstractGroup) if length(find_generators(group)) > 0 return true end return false end function quotient_group(subgroup::SubGroup) @assert isnormal(subgroup) "Subgroup must be normal" # The set here is equal to the "partition" of the group into cosets created by group elements with the subgroup f(x::Set, y::Set) = set_composition(x, y, subgroup.operation) return Group(Set(coset(g, subgroup) for g in subgroup.group), f) end function generate_subgroup(group::AbstractGroup, generator)::SubGroup e = get_identity_element(group) generated_set = Set([e generator]) p = group.operation(generator, generator) while p != e push!(generated_set, p) p = group.operation(p, generator) end SubGroup(group, generated_set, group.operation) end function find_generators(group::AbstractGroup)::Set filter(g->generate_subgroup(group, g) == group, group.set) end function _cayley_table(group::AbstractGroup) # TODO: move to utils elements = [x for x in group.set] inside = map(x-> map(y->group.operation(x, y), elements ), elements) return elements, inside end # _cayley_table((generate_subgroup(G, 6) |> quotient_group))[2] """ Conjugate x by g, i.e. perform gxg⁻¹ """ function conjugate(group::AbstractGroup, x::T, g::T) where {T} group.operation(group.operation(g, x), inv(group, g)) end """ Return { gxg⁻¹: ∀g ∈ G} """ function conjugacy_class(group::AbstractGroup, x)::Set Set(conjugate(group, x, g) for g in group) end """ Return the distinct conjugacy classes in `group`. The set of distinct conjugacy classes forms a partition of the group. """ function conjugacy_classes(group::AbstractGroup)::Set Set(conjugacy_class(group, x) for x in group) end """ Obtain the inverse of `x` in `group`. """ function inv(group::AbstractGroup, x) e = get_identity_element(group) for h in group if group.operation(x, h) == group.operation(h, x) == e return h end end return missing # TODO: missing or nothing? end abstract type AbstractHomomorphism end """ An isomorphism ϕ: (G, ∘) → (H, ⋆) is a mapping which satisfies the following properties - ϕ is one-to-one and onto See also: Homomorphism """ struct Isomorphism <: AbstractHomomorphism from_group::AbstractGroup to_group::AbstractGroup mapping::Dict end """ An isomorphism ϕ: (G, ∘) → (H, ⋆) is a mapping which satisfies the following property: ∀x,y ∈ G, ϕ(x ∘ y) = ϕ(x) ⋆ ϕ(y) (i.e. it preserves composites) """ struct Homomorphism <: AbstractHomomorphism from_group::AbstractGroup to_group::AbstractGroup mapping::Dict end function order(group::AbstractGroup) return length(group.set) end function order(group::AbstractGroup, x) return length(generate_subgroup(group, x)) end function get_isomorphism(a::AbstractGroup, b::AbstractGroup) if a == b # Automorphism return Dict(k=>k for k in a) end if iscyclic(a) && iscyclic(b) && order(a) == order(b) # Cyclic subgroups of the same order gen_a, gen_b = find_generators(a) |> first, find_generators(b) |> first mapping = Dict(gen_a => gen_b) p_a = gen_a p_b = gen_b for i in 1:order(a) p_a = a.operation(p_a, gen_a) p_b = b.operation(p_b, gen_b) mapping[p_a] = p_b end return mapping end throw("Not implemented") end """ Assert the following property, where mapping=ϕ, from=(G, ∘), to=(H, ⋆) ∀ x,y ∈ G; ϕ(x, y) = ϕ(x) ⋆ ϕ(y) """ function _assert_homomorphism_property(mapping::Dict, from::AbstractGroup, to::AbstractGroup) for x in from for y in from @assert mapping[from.operation(x, y)] == to.operation(mapping[x], mapping[y]) end end end """ Let (G, ∘) be a group, X be a set and ^ be a group action. ∀ g,h ∈ G; ∀x in X; g ^ (h ^ x) = (g ∘ h) ^ x """ function _assert_homomorphism_property(ga::AbstractGroupAction) for g in ga.group for h in ga.group for x in ga.set @assert ga.action(g, ga.action(h, x)) == ga.action(ga.group.operation(g, h), x) end end end end function _transform(ϕ::Function, arr::Union{Vector, AbstractSet})::Union{Vector, AbstractSet} return ϕ.(arr) end function _transform(ϕ::Dict, arr::Union{Vector, AbstractSet})::Union{Vector, AbstractSet} return _transform(x-> ϕ[x], arr) end """ Let G be a group and ϕ: G → H be a homomorphism. Then, Ker ϕ = {g ∈ G: ϕ(g) = e_H} Let V, W be vector subspaces and t: V → W be a linear transfomation. Then, Ker t = {v⃗ ∈ V: ϕ(v⃗) = 0⃗} """ function kernel(transformation::Union{Function, Dict}, from::Union{AbstractSet, AbstractGroup}, identity) v = [g for g in from] t = _transform(transformation, v) mask = t .== identity return Set(v[mask]) end function image(transformation, from::AbstractSet)::Set _transform(transformation, from) |> Set end function image(transformation, from::AbstractGroup)::Set _transform(transformation, from.set) |> Set end function GroupAction(group::Group{<:T}, set::Set{<:T}, action::Function)::GroupAction{T} where {T} ga = _GroupActionLike(group, set, action) assert_closure(ga) e = get_identity_element(ga.group) for x in ga.set @assert ga.action(e, x) == x end _assert_homomorphism_property(ga) return GroupAction{T}(group, set, action) end """ Orb x = {∀g ∈ G, g ^ x} """ function orbit(ga::AbstractGroupAction, x)::Set # TODO: define type @assert x in ga.set return ga.action.(ga.group, x) |> Set end """ Get the set of all orbits for the group action """ function orbits(ga::AbstractGroupAction)::Set return Set(orbit(ga, x) for x in ga.set) end """ Stab x = {g ∈ G: g^x = x} """ function stabilizer(ga::AbstractGroupAction, x) @assert x in ga.set v = [g for g in ga.group.set] t = ga.action.(v, x) stable_mask = t .== x return Set(v[stable_mask]) end # function stabilizers(ga::AbstractGroupAction) # return Set(stabilizer(ga, x) for x in ga.set) # end """ Fix g = {x ∈ X: g^x = x} """ function fixed_set(ga::AbstractGroupAction, g) @assert g in ga.group.set v = [x for x in ga.set] t = ga.action.(g, v) return Set(v[t .== v]) end
[ 198, 1, 198, 220, 220, 220, 40806, 803, 625, 281, 27741, 13247, 318, 262, 976, 355, 11629, 803, 625, 262, 900, 13, 198, 1, 198, 397, 8709, 2099, 27741, 13247, 886, 198, 198, 2, 16926, 46, 25, 10385, 4600, 7248, 63, 284, 4600, 23839, 7248, 63, 810, 1744, 284, 1104, 14230, 1068, 50, 1039, 2123, 435, 198, 37811, 198, 220, 220, 220, 520, 4782, 495, 17747, 286, 257, 900, 290, 257, 13934, 4905, 13, 1400, 17778, 389, 1234, 319, 2035, 5408, 13, 198, 37811, 198, 7249, 4912, 1868, 90, 51, 92, 1279, 25, 27741, 13247, 198, 220, 220, 220, 900, 3712, 7248, 90, 51, 92, 198, 220, 220, 220, 4905, 3712, 22203, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4912, 13, 198, 220, 220, 220, 383, 1708, 7877, 72, 3150, 1276, 1745, 13, 33238, 257, 1448, 402, 796, 357, 50, 11, 18872, 246, 828, 788, 198, 220, 220, 220, 220, 220, 532, 1012, 4567, 25, 262, 1448, 1276, 307, 4838, 739, 262, 13934, 4905, 13, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 222, 87, 11, 88, 18872, 230, 311, 25, 2124, 18872, 246, 331, 18872, 230, 311, 198, 220, 220, 220, 220, 220, 532, 3928, 22055, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 222, 87, 11, 88, 11, 89, 18872, 230, 311, 25, 2124, 18872, 246, 357, 88, 18872, 246, 1976, 8, 796, 220, 357, 87, 18872, 246, 331, 8, 18872, 246, 1976, 198, 220, 220, 220, 220, 220, 532, 27207, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 225, 68, 18872, 230, 311, 25, 18872, 222, 87, 18872, 230, 311, 11, 2124, 18872, 246, 304, 796, 2124, 796, 304, 18872, 246, 2124, 198, 220, 220, 220, 220, 220, 532, 554, 690, 274, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 222, 87, 18872, 230, 311, 11, 18872, 225, 2124, 46256, 119, 126, 117, 18872, 230, 311, 1058, 2124, 18872, 246, 2124, 46256, 119, 126, 117, 796, 304, 796, 2124, 46256, 119, 126, 117, 18872, 246, 2124, 198, 37811, 198, 7249, 4912, 90, 51, 92, 1279, 25, 27741, 13247, 810, 1391, 51, 92, 198, 220, 220, 220, 900, 3712, 7248, 90, 51, 92, 198, 220, 220, 220, 4905, 3712, 22203, 198, 220, 220, 220, 4912, 90, 51, 92, 7, 2617, 11, 4905, 8, 810, 309, 796, 611, 4808, 12102, 378, 62, 8094, 7, 13247, 1868, 7, 2617, 11, 4905, 4008, 649, 7, 2617, 11, 4905, 8, 886, 198, 437, 198, 13247, 7, 2617, 3712, 7248, 90, 51, 5512, 4905, 3712, 22203, 8, 810, 1391, 51, 92, 796, 4912, 90, 51, 92, 7, 2617, 11, 4905, 8, 198, 198, 37811, 198, 220, 220, 220, 3834, 8094, 286, 257, 1448, 13, 198, 220, 220, 220, 13610, 1262, 3834, 13247, 7, 8094, 11, 24637, 737, 198, 220, 220, 220, 12039, 307, 4838, 739, 262, 1448, 4905, 11, 2291, 262, 5369, 5002, 290, 2291, 287, 690, 274, 329, 1123, 5002, 13, 198, 37811, 198, 7249, 3834, 13247, 90, 51, 92, 1279, 25, 27741, 13247, 810, 1391, 51, 92, 198, 220, 220, 220, 1448, 3712, 13247, 90, 51, 92, 198, 220, 220, 220, 900, 3712, 7248, 90, 51, 92, 198, 220, 220, 220, 4905, 3712, 22203, 198, 437, 198, 198, 8818, 3834, 13247, 7, 8094, 3712, 13247, 90, 51, 5512, 24637, 3712, 7248, 90, 27, 25, 51, 92, 2599, 25, 7004, 13247, 90, 51, 92, 810, 1391, 51, 92, 198, 220, 220, 220, 2488, 30493, 24637, 2343, 232, 228, 1448, 13, 2617, 198, 220, 220, 220, 308, 796, 4912, 1868, 7, 7266, 2617, 11, 1448, 13, 27184, 8, 198, 220, 220, 220, 6818, 62, 17966, 7, 70, 8, 198, 220, 220, 220, 4808, 30493, 62, 259, 690, 274, 7, 1136, 62, 738, 414, 62, 30854, 7, 70, 828, 308, 13, 2617, 11, 308, 13, 27184, 8, 198, 220, 220, 220, 1441, 3834, 13247, 7, 8094, 11, 24637, 11, 1448, 13, 27184, 8, 198, 437, 198, 198, 397, 8709, 2099, 27741, 13247, 12502, 886, 198, 198, 7249, 4808, 13247, 12502, 7594, 90, 51, 92, 1279, 25, 27741, 13247, 12502, 810, 1391, 51, 92, 198, 220, 220, 220, 1448, 3712, 13247, 90, 27, 25, 51, 92, 198, 220, 220, 220, 900, 3712, 7248, 90, 27, 25, 51, 92, 198, 220, 220, 220, 2223, 3712, 22203, 198, 437, 198, 198, 7249, 4912, 12502, 90, 51, 92, 1279, 25, 27741, 13247, 12502, 810, 1391, 51, 92, 198, 220, 220, 220, 1448, 3712, 13247, 90, 27, 25, 51, 92, 198, 220, 220, 220, 900, 3712, 7248, 90, 27, 25, 51, 92, 198, 220, 220, 220, 2223, 3712, 22203, 198, 220, 220, 220, 1303, 13247, 12502, 90, 51, 92, 198, 437, 628, 198, 2, 16926, 46, 25, 4259, 10385, 2174, 11, 788, 30276, 2438, 355, 3306, 198, 2, 1330, 7308, 25, 10385, 198, 2, 10385, 7, 51, 3712, 7248, 90, 50, 5512, 2124, 3712, 19182, 90, 50, 11, 352, 30072, 810, 1391, 50, 92, 796, 309, 28264, 329, 4808, 287, 2124, 8, 198, 2, 10385, 7, 7248, 11, 15690, 90, 5317, 11, 352, 92, 26933, 16, 60, 4008, 198, 8818, 8615, 316, 7, 9464, 3712, 51, 11, 900, 3712, 7248, 90, 51, 5512, 4905, 3712, 22203, 2599, 25, 7248, 90, 51, 92, 810, 1391, 51, 92, 198, 220, 220, 220, 1303, 7248, 7, 87, 329, 2124, 287, 4905, 12195, 9464, 11, 900, 4008, 198, 220, 220, 220, 5345, 7, 27184, 7, 9464, 11, 826, 8, 329, 826, 287, 900, 8, 198, 437, 198, 198, 8818, 8615, 316, 7, 2617, 3712, 7248, 90, 51, 5512, 826, 3712, 51, 11, 4905, 3712, 22203, 2599, 25, 7248, 90, 51, 92, 810, 1391, 51, 92, 198, 2, 220, 220, 220, 5345, 7, 87, 329, 2124, 287, 4905, 12195, 2617, 11, 826, 4008, 198, 220, 220, 220, 5345, 7, 27184, 7, 9464, 11, 826, 8, 329, 1364, 287, 900, 8, 198, 198, 437, 198, 198, 8818, 8615, 316, 7, 9464, 11, 1448, 3712, 23839, 13247, 8, 198, 220, 220, 220, 8615, 316, 7, 9464, 11, 1448, 13, 2617, 11, 1448, 13, 27184, 8, 198, 437, 198, 198, 8818, 8615, 316, 7, 8094, 3712, 23839, 13247, 11, 826, 8, 198, 220, 220, 220, 8615, 316, 7, 8094, 13, 2617, 11, 826, 11, 1448, 13, 27184, 8, 198, 437, 628, 198, 8818, 900, 62, 785, 9150, 7, 9464, 62, 2617, 3712, 7248, 90, 27, 25, 51, 5512, 826, 62, 2617, 3712, 7248, 90, 27, 25, 51, 5512, 4905, 3712, 22203, 2599, 25, 7248, 220, 810, 1391, 51, 92, 198, 220, 220, 220, 1303, 4600, 8899, 63, 318, 407, 5447, 319, 5621, 198, 220, 220, 220, 1303, 4646, 7, 24592, 11, 8615, 316, 7, 9464, 11, 826, 62, 2617, 11, 4905, 8, 329, 1364, 287, 1364, 62, 2617, 8, 198, 220, 220, 220, 5345, 7, 27184, 7, 9464, 11, 826, 8, 329, 1364, 287, 1364, 62, 2617, 329, 826, 287, 826, 62, 2617, 8, 198, 437, 628, 198, 8818, 6818, 62, 17966, 7, 2617, 3712, 7248, 11, 4838, 62, 259, 62, 2617, 3712, 7248, 11, 4905, 3712, 22203, 2599, 25, 18465, 198, 220, 220, 220, 1303, 775, 691, 2198, 1364, 16512, 13, 198, 220, 220, 220, 2488, 30493, 900, 62, 785, 9150, 7, 2617, 11, 4838, 62, 259, 62, 2617, 11, 4905, 8, 2343, 232, 228, 4838, 62, 259, 62, 2617, 198, 437, 198, 198, 8818, 6818, 62, 17966, 7, 8094, 3712, 23839, 13247, 2599, 25, 18465, 198, 220, 220, 220, 6818, 62, 17966, 7, 8094, 13, 2617, 11, 1448, 13, 2617, 11, 1448, 13, 27184, 8, 198, 437, 198, 198, 8818, 6818, 62, 17966, 7, 4908, 3712, 23839, 13247, 12502, 2599, 25, 18465, 198, 220, 220, 220, 6818, 62, 17966, 7, 4908, 13, 8094, 13, 2617, 11, 31986, 13, 2617, 11, 31986, 13, 2673, 8, 198, 437, 198, 198, 8818, 6818, 62, 562, 1733, 22055, 7, 2617, 3712, 7248, 11, 4905, 3712, 22203, 2599, 25, 18465, 198, 220, 220, 220, 329, 2124, 287, 900, 198, 220, 220, 220, 220, 220, 220, 220, 329, 331, 287, 900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1976, 287, 900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 796, 4905, 7, 87, 11, 4905, 7, 88, 11, 1976, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 796, 4905, 7, 27184, 7, 87, 11, 331, 828, 1976, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 257, 6624, 275, 17971, 87, 18872, 246, 7198, 88, 18872, 246, 720, 89, 8, 796, 720, 64, 15139, 254, 720, 65, 796, 7198, 87, 18872, 246, 720, 88, 8, 18872, 246, 720, 89, 1, 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, 6818, 62, 562, 1733, 22055, 7, 8094, 3712, 23839, 13247, 2599, 25, 18465, 198, 220, 220, 220, 6818, 62, 562, 1733, 22055, 7, 8094, 13, 2617, 11, 1448, 13, 27184, 8, 198, 437, 198, 8818, 4808, 30493, 62, 738, 414, 62, 30854, 7, 30854, 3712, 51, 11, 900, 3712, 7248, 90, 51, 5512, 4905, 3712, 22203, 2599, 25, 18465, 810, 1391, 51, 92, 198, 220, 220, 220, 1303, 356, 7048, 22978, 2499, 319, 262, 4905, 198, 220, 220, 220, 1303, 2488, 30493, 4905, 12195, 30854, 11, 900, 8, 6624, 900, 220, 1303, 815, 307, 1262, 6149, 5621, 393, 30104, 994, 198, 220, 220, 220, 329, 2124, 287, 900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 2124, 6624, 4905, 7, 30854, 11, 2124, 8, 6624, 4905, 7, 87, 11, 5002, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 651, 62, 738, 414, 62, 30854, 7, 8094, 3712, 23839, 13247, 8, 1303, 16926, 46, 25, 1441, 2099, 198, 220, 220, 220, 329, 2124, 287, 1448, 13, 2617, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 30493, 62, 738, 414, 62, 30854, 7, 87, 11, 1448, 13, 2617, 11, 1448, 13, 27184, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 2195, 861, 295, 12331, 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, 886, 198, 220, 220, 220, 3714, 7, 8021, 861, 295, 12331, 7203, 2949, 5369, 5002, 1043, 48774, 198, 437, 198, 198, 8818, 4808, 30493, 62, 259, 690, 274, 7, 738, 414, 62, 30854, 3712, 51, 11, 900, 3712, 7248, 90, 51, 5512, 4905, 3712, 22203, 2599, 25, 18465, 810, 1391, 51, 92, 198, 220, 220, 220, 329, 2378, 287, 900, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5369, 62, 30854, 287, 8615, 316, 7, 9186, 11, 900, 11, 4905, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5369, 62, 30854, 287, 8615, 316, 7, 2617, 11, 2378, 11, 4905, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 4808, 12102, 378, 62, 8094, 7, 8094, 3712, 23839, 13247, 2599, 25, 33, 970, 198, 220, 220, 220, 1303, 3254, 24765, 198, 220, 220, 220, 6818, 62, 17966, 7, 8094, 8, 198, 220, 220, 220, 6818, 62, 562, 1733, 22055, 7, 8094, 8, 198, 220, 220, 220, 304, 796, 651, 62, 738, 414, 62, 30854, 7, 8094, 8, 220, 1303, 770, 12073, 319, 5287, 198, 220, 220, 220, 4808, 30493, 62, 259, 690, 274, 7, 68, 11, 1448, 13, 2617, 11, 1448, 13, 27184, 8, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 8818, 24354, 62, 786, 13255, 7, 87, 3712, 51, 11, 331, 3712, 51, 8, 810, 309, 198, 220, 220, 220, 329, 277, 287, 2214, 14933, 7, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 651, 3245, 7, 87, 11, 277, 8, 14512, 651, 3245, 7, 88, 11, 277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 11748, 7308, 25, 6624, 198, 855, 7, 87, 3712, 51, 11, 331, 3712, 51, 8, 810, 309, 27, 25, 23839, 13247, 796, 24354, 62, 786, 13255, 7, 87, 11, 331, 8, 198, 2, 6624, 7, 87, 3712, 13247, 11, 331, 3712, 13247, 8, 796, 24354, 62, 786, 13255, 7, 87, 11, 331, 8, 198, 2, 6624, 7, 87, 3712, 7004, 13247, 11, 331, 3712, 7004, 13247, 8, 796, 24354, 62, 786, 13255, 7, 87, 11, 331, 8, 198, 8818, 6624, 7, 87, 3712, 23839, 13247, 11, 331, 3712, 7004, 13247, 2599, 25, 33, 970, 198, 220, 220, 220, 611, 331, 13, 2617, 6624, 2124, 13, 2617, 11405, 2124, 13, 27184, 6624, 331, 13, 27184, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 3991, 198, 437, 198, 855, 7, 87, 3712, 7004, 13247, 11, 331, 3712, 23839, 13247, 8, 796, 6624, 7, 88, 11, 2124, 8, 198, 2, 31572, 4600, 17410, 12331, 25, 6624, 7, 3712, 7004, 13247, 90, 5317, 2414, 5512, 7904, 7004, 13247, 90, 5317, 2414, 30072, 318, 27102, 63, 198, 855, 7, 87, 3712, 7004, 13247, 11, 331, 3712, 7004, 13247, 8, 796, 24354, 62, 786, 13255, 7, 87, 11, 331, 8, 198, 198, 11748, 7308, 25, 11629, 378, 198, 2676, 378, 7, 8094, 3712, 23839, 13247, 8, 796, 11629, 378, 7, 8094, 13, 2617, 8, 198, 2676, 378, 7, 8094, 3712, 23839, 13247, 11, 256, 3712, 51, 8, 810, 1391, 51, 92, 796, 11629, 378, 7, 8094, 13, 2617, 11, 256, 8, 198, 11748, 7308, 25, 4129, 198, 13664, 7, 87, 3712, 23839, 13247, 8, 796, 4129, 7, 87, 13, 2617, 8, 628, 198, 37811, 198, 220, 220, 220, 399, 318, 257, 4808, 11265, 62, 850, 8094, 286, 402, 611, 18872, 222, 70, 18872, 230, 402, 11, 308, 45, 796, 34786, 198, 220, 220, 220, 399, 318, 257, 3487, 850, 8094, 286, 402, 611, 69, 399, 318, 257, 850, 8094, 286, 402, 290, 399, 318, 257, 6441, 286, 11644, 1018, 1590, 6097, 286, 402, 198, 37811, 198, 8818, 2125, 6636, 7, 7266, 8094, 3712, 7004, 13247, 8, 198, 220, 220, 220, 329, 308, 287, 850, 8094, 13, 8094, 198, 220, 220, 220, 220, 220, 220, 220, 1364, 62, 6966, 316, 796, 8615, 316, 7, 70, 11, 850, 8094, 8, 198, 220, 220, 220, 220, 220, 220, 220, 826, 62, 6966, 316, 796, 8615, 316, 7, 7266, 8094, 11, 308, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8615, 316, 7, 70, 11, 850, 8094, 8, 14512, 8615, 316, 7, 7266, 8094, 11, 308, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 8818, 318, 15539, 291, 7, 8094, 3712, 23839, 13247, 8, 198, 220, 220, 220, 611, 4129, 7, 19796, 62, 8612, 2024, 7, 8094, 4008, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 3991, 198, 437, 198, 198, 8818, 23611, 1153, 62, 8094, 7, 7266, 8094, 3712, 7004, 13247, 8, 198, 220, 220, 220, 2488, 30493, 2125, 6636, 7, 7266, 8094, 8, 366, 7004, 8094, 1276, 307, 3487, 1, 198, 220, 220, 220, 1303, 383, 900, 994, 318, 4961, 284, 262, 366, 3911, 653, 1, 286, 262, 1448, 656, 8615, 1039, 2727, 416, 1448, 4847, 351, 262, 850, 8094, 198, 220, 220, 220, 277, 7, 87, 3712, 7248, 11, 331, 3712, 7248, 8, 796, 900, 62, 785, 9150, 7, 87, 11, 331, 11, 850, 8094, 13, 27184, 8, 198, 220, 220, 220, 1441, 4912, 7, 7248, 7, 6966, 316, 7, 70, 11, 850, 8094, 8, 329, 308, 287, 850, 8094, 13, 8094, 828, 277, 8, 198, 437, 628, 198, 198, 8818, 7716, 62, 7266, 8094, 7, 8094, 3712, 23839, 13247, 11, 17301, 2599, 25, 7004, 13247, 198, 220, 220, 220, 304, 796, 651, 62, 738, 414, 62, 30854, 7, 8094, 8, 198, 220, 220, 220, 7560, 62, 2617, 796, 5345, 26933, 68, 17301, 12962, 198, 220, 220, 220, 279, 796, 1448, 13, 27184, 7, 8612, 1352, 11, 17301, 8, 198, 220, 220, 220, 981, 279, 14512, 304, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 27568, 62, 2617, 11, 279, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 1448, 13, 27184, 7, 79, 11, 17301, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3834, 13247, 7, 8094, 11, 7560, 62, 2617, 11, 1448, 13, 27184, 8, 198, 437, 198, 198, 8818, 1064, 62, 8612, 2024, 7, 8094, 3712, 23839, 13247, 2599, 25, 7248, 198, 220, 220, 220, 8106, 7, 70, 3784, 8612, 378, 62, 7266, 8094, 7, 8094, 11, 308, 8, 6624, 1448, 11, 1448, 13, 2617, 8, 198, 437, 198, 198, 8818, 4808, 66, 323, 1636, 62, 11487, 7, 8094, 3712, 23839, 13247, 8, 1303, 16926, 46, 25, 1445, 284, 3384, 4487, 198, 220, 220, 220, 4847, 796, 685, 87, 329, 2124, 287, 1448, 13, 2617, 60, 198, 220, 220, 220, 2641, 796, 3975, 7, 87, 3784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3975, 7, 88, 3784, 8094, 13, 27184, 7, 87, 11, 331, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 4847, 8, 628, 220, 220, 220, 1441, 4847, 11, 2641, 198, 437, 198, 2, 4808, 66, 323, 1636, 62, 11487, 19510, 8612, 378, 62, 7266, 8094, 7, 38, 11, 718, 8, 930, 29, 23611, 1153, 62, 8094, 4008, 58, 17, 60, 628, 198, 37811, 198, 198, 3103, 31761, 378, 2124, 416, 308, 11, 1312, 13, 68, 13, 1620, 308, 87, 70, 46256, 119, 126, 117, 198, 198, 37811, 198, 8818, 11644, 1018, 378, 7, 8094, 3712, 23839, 13247, 11, 2124, 3712, 51, 11, 308, 3712, 51, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1448, 13, 27184, 7, 8094, 13, 27184, 7, 70, 11, 2124, 828, 800, 7, 8094, 11, 308, 4008, 198, 437, 198, 198, 37811, 198, 13615, 1391, 308, 87, 70, 46256, 119, 126, 117, 25, 18872, 222, 70, 18872, 230, 402, 92, 198, 37811, 198, 8818, 11644, 1018, 1590, 62, 4871, 7, 8094, 3712, 23839, 13247, 11, 2124, 2599, 25, 7248, 198, 220, 220, 220, 5345, 7, 1102, 31761, 378, 7, 8094, 11, 2124, 11, 308, 8, 329, 308, 287, 1448, 8, 198, 437, 198, 198, 37811, 198, 13615, 262, 7310, 11644, 1018, 1590, 6097, 287, 4600, 8094, 44646, 198, 464, 900, 286, 7310, 11644, 1018, 1590, 6097, 5107, 257, 18398, 286, 262, 1448, 13, 198, 37811, 198, 8818, 11644, 1018, 1590, 62, 37724, 7, 8094, 3712, 23839, 13247, 2599, 25, 7248, 198, 220, 220, 220, 5345, 7, 1102, 31761, 1590, 62, 4871, 7, 8094, 11, 2124, 8, 329, 2124, 287, 1448, 8, 198, 437, 198, 198, 37811, 198, 5944, 3153, 262, 34062, 286, 4600, 87, 63, 287, 4600, 8094, 44646, 198, 37811, 198, 8818, 800, 7, 8094, 3712, 23839, 13247, 11, 2124, 8, 198, 220, 220, 220, 304, 796, 651, 62, 738, 414, 62, 30854, 7, 8094, 8, 198, 220, 220, 220, 329, 289, 287, 1448, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1448, 13, 27184, 7, 87, 11, 289, 8, 6624, 1448, 13, 27184, 7, 71, 11, 2124, 8, 6624, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 289, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 4814, 220, 1303, 16926, 46, 25, 4814, 393, 2147, 30, 198, 437, 198, 198, 397, 8709, 2099, 27741, 28718, 25831, 1042, 886, 198, 37811, 198, 2025, 318, 25831, 1042, 18074, 243, 25, 357, 38, 11, 18872, 246, 8, 15168, 357, 39, 11, 2343, 233, 228, 8, 318, 257, 16855, 543, 45104, 262, 1708, 6608, 198, 12, 18074, 243, 318, 530, 12, 1462, 12, 505, 290, 4291, 198, 198, 6214, 635, 25, 8074, 25831, 1042, 198, 37811, 198, 7249, 1148, 25831, 1042, 1279, 25, 27741, 28718, 25831, 1042, 198, 220, 220, 220, 422, 62, 8094, 3712, 23839, 13247, 198, 220, 220, 220, 284, 62, 8094, 3712, 23839, 13247, 198, 220, 220, 220, 16855, 3712, 35, 713, 198, 437, 198, 198, 37811, 198, 2025, 318, 25831, 1042, 18074, 243, 25, 357, 38, 11, 18872, 246, 8, 15168, 357, 39, 11, 2343, 233, 228, 8, 318, 257, 16855, 543, 45104, 262, 1708, 3119, 25, 198, 220, 220, 220, 18872, 222, 87, 11, 88, 18872, 230, 402, 11, 18074, 243, 7, 87, 18872, 246, 331, 8, 796, 18074, 243, 7, 87, 8, 2343, 233, 228, 18074, 243, 7, 88, 8, 220, 220, 357, 72, 13, 68, 13, 340, 43759, 18882, 2737, 8, 198, 37811, 198, 7249, 8074, 25831, 1042, 1279, 25, 27741, 28718, 25831, 1042, 198, 220, 220, 220, 422, 62, 8094, 3712, 23839, 13247, 198, 220, 220, 220, 284, 62, 8094, 3712, 23839, 13247, 198, 220, 220, 220, 16855, 3712, 35, 713, 198, 437, 628, 198, 8818, 1502, 7, 8094, 3712, 23839, 13247, 8, 198, 220, 220, 220, 1441, 4129, 7, 8094, 13, 2617, 8, 198, 437, 198, 198, 8818, 1502, 7, 8094, 3712, 23839, 13247, 11, 2124, 8, 198, 220, 220, 220, 1441, 4129, 7, 8612, 378, 62, 7266, 8094, 7, 8094, 11, 2124, 4008, 198, 437, 198, 198, 8818, 651, 62, 271, 25831, 1042, 7, 64, 3712, 23839, 13247, 11, 275, 3712, 23839, 13247, 8, 198, 220, 220, 220, 611, 257, 6624, 275, 220, 1303, 17406, 13425, 1042, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 360, 713, 7, 74, 14804, 74, 329, 479, 287, 257, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 318, 15539, 291, 7, 64, 8, 11405, 318, 15539, 291, 7, 65, 8, 11405, 1502, 7, 64, 8, 6624, 1502, 7, 65, 8, 220, 1303, 28007, 291, 850, 24432, 286, 262, 976, 1502, 198, 220, 220, 220, 220, 220, 220, 220, 2429, 62, 64, 11, 2429, 62, 65, 796, 1064, 62, 8612, 2024, 7, 64, 8, 930, 29, 717, 11, 1064, 62, 8612, 2024, 7, 65, 8, 930, 29, 717, 198, 220, 220, 220, 220, 220, 220, 220, 16855, 796, 360, 713, 7, 5235, 62, 64, 5218, 2429, 62, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 62, 64, 796, 2429, 62, 64, 198, 220, 220, 220, 220, 220, 220, 220, 279, 62, 65, 796, 2429, 62, 65, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 2875, 7, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 62, 64, 796, 257, 13, 27184, 7, 79, 62, 64, 11, 2429, 62, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 62, 65, 796, 275, 13, 27184, 7, 79, 62, 65, 11, 2429, 62, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16855, 58, 79, 62, 64, 60, 796, 279, 62, 65, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 16855, 198, 220, 220, 220, 886, 198, 220, 220, 220, 3714, 7203, 3673, 9177, 4943, 198, 437, 198, 198, 37811, 198, 8021, 861, 262, 1708, 3119, 11, 810, 16855, 28, 139, 243, 11, 422, 16193, 38, 11, 18872, 246, 828, 284, 16193, 39, 11, 2343, 233, 228, 8, 198, 220, 220, 220, 18872, 222, 2124, 11, 88, 18872, 230, 402, 26, 18074, 243, 7, 87, 11, 331, 8, 796, 18074, 243, 7, 87, 8, 2343, 233, 228, 18074, 243, 7, 88, 8, 198, 37811, 198, 8818, 4808, 30493, 62, 26452, 25831, 1042, 62, 26745, 7, 76, 5912, 3712, 35, 713, 11, 422, 3712, 23839, 13247, 11, 284, 3712, 23839, 13247, 8, 198, 220, 220, 329, 2124, 287, 422, 198, 220, 220, 220, 220, 220, 220, 220, 329, 331, 287, 422, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 16855, 58, 6738, 13, 27184, 7, 87, 11, 331, 15437, 6624, 284, 13, 27184, 7, 76, 5912, 58, 87, 4357, 16855, 58, 88, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 5756, 357, 38, 11, 18872, 246, 8, 307, 257, 1448, 11, 1395, 307, 257, 900, 290, 10563, 307, 257, 1448, 2223, 13, 198, 220, 220, 220, 18872, 222, 308, 11, 71, 18872, 230, 402, 26, 18872, 222, 87, 287, 1395, 26, 308, 10563, 357, 71, 10563, 2124, 8, 796, 357, 70, 18872, 246, 289, 8, 10563, 2124, 198, 37811, 198, 8818, 4808, 30493, 62, 26452, 25831, 1042, 62, 26745, 7, 4908, 3712, 23839, 13247, 12502, 8, 198, 220, 220, 220, 329, 308, 287, 31986, 13, 8094, 198, 220, 220, 220, 220, 220, 220, 220, 329, 289, 287, 31986, 13, 8094, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 31986, 13, 2617, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 31986, 13, 2673, 7, 70, 11, 31986, 13, 2673, 7, 71, 11, 2124, 4008, 6624, 31986, 13, 2673, 7, 4908, 13, 8094, 13, 27184, 7, 70, 11, 289, 828, 2124, 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, 4808, 35636, 7, 139, 243, 3712, 22203, 11, 5240, 3712, 38176, 90, 38469, 11, 27741, 7248, 92, 2599, 25, 38176, 90, 38469, 11, 27741, 7248, 92, 198, 220, 220, 220, 1441, 18074, 243, 12195, 3258, 8, 198, 437, 198, 198, 8818, 4808, 35636, 7, 139, 243, 3712, 35, 713, 11, 5240, 3712, 38176, 90, 38469, 11, 27741, 7248, 92, 2599, 25, 38176, 90, 38469, 11, 27741, 7248, 92, 198, 220, 220, 220, 1441, 4808, 35636, 7, 87, 3784, 18074, 243, 58, 87, 4357, 5240, 8, 198, 437, 198, 198, 37811, 198, 5756, 402, 307, 257, 1448, 290, 18074, 243, 25, 402, 15168, 367, 307, 257, 3488, 25831, 1042, 13, 3244, 11, 198, 220, 220, 220, 17337, 18074, 243, 796, 1391, 70, 18872, 230, 402, 25, 18074, 243, 7, 70, 8, 796, 304, 62, 39, 92, 198, 198, 5756, 569, 11, 370, 307, 15879, 850, 2777, 2114, 290, 256, 25, 569, 15168, 370, 307, 257, 14174, 13501, 296, 341, 13, 3244, 11, 198, 220, 220, 220, 17337, 256, 796, 1391, 85, 158, 225, 245, 18872, 230, 569, 25, 18074, 243, 7, 85, 158, 225, 245, 8, 796, 657, 158, 225, 245, 92, 198, 37811, 198, 8818, 9720, 7, 7645, 1161, 3712, 38176, 90, 22203, 11, 360, 713, 5512, 422, 3712, 38176, 90, 23839, 7248, 11, 27741, 13247, 5512, 5369, 8, 198, 220, 220, 220, 410, 796, 685, 70, 329, 308, 287, 422, 60, 198, 220, 220, 220, 256, 796, 4808, 35636, 7, 7645, 1161, 11, 410, 8, 198, 220, 220, 220, 9335, 796, 256, 764, 855, 5369, 198, 220, 220, 220, 1441, 5345, 7, 85, 58, 27932, 12962, 198, 437, 198, 198, 8818, 2939, 7, 7645, 1161, 11, 422, 3712, 23839, 7248, 2599, 25, 7248, 198, 220, 220, 4808, 35636, 7, 7645, 1161, 11, 422, 8, 930, 29, 5345, 198, 437, 198, 8818, 2939, 7, 7645, 1161, 11, 422, 3712, 23839, 13247, 2599, 25, 7248, 198, 220, 220, 4808, 35636, 7, 7645, 1161, 11, 422, 13, 2617, 8, 930, 29, 5345, 198, 437, 628, 198, 8818, 4912, 12502, 7, 8094, 3712, 13247, 90, 27, 25, 51, 5512, 900, 3712, 7248, 90, 27, 25, 51, 5512, 2223, 3712, 22203, 2599, 25, 13247, 12502, 90, 51, 92, 810, 1391, 51, 92, 198, 220, 220, 220, 31986, 796, 4808, 13247, 12502, 7594, 7, 8094, 11, 900, 11, 2223, 8, 198, 220, 220, 220, 6818, 62, 17966, 7, 4908, 8, 628, 220, 220, 220, 304, 796, 651, 62, 738, 414, 62, 30854, 7, 4908, 13, 8094, 8, 198, 220, 220, 220, 329, 2124, 287, 31986, 13, 2617, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 31986, 13, 2673, 7, 68, 11, 2124, 8, 6624, 2124, 198, 220, 220, 220, 886, 628, 220, 220, 220, 4808, 30493, 62, 26452, 25831, 1042, 62, 26745, 7, 4908, 8, 628, 220, 220, 220, 1441, 4912, 12502, 90, 51, 92, 7, 8094, 11, 900, 11, 2223, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 15839, 2124, 796, 1391, 24861, 222, 70, 18872, 230, 402, 11, 308, 10563, 2124, 92, 198, 37811, 198, 8818, 13066, 7, 4908, 3712, 23839, 13247, 12502, 11, 2124, 2599, 25, 7248, 220, 1303, 16926, 46, 25, 8160, 2099, 198, 220, 220, 220, 2488, 30493, 2124, 287, 31986, 13, 2617, 198, 220, 220, 220, 1441, 31986, 13, 2673, 12195, 4908, 13, 8094, 11, 2124, 8, 930, 29, 5345, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 3497, 262, 900, 286, 477, 37015, 329, 262, 1448, 2223, 198, 37811, 198, 8818, 37015, 7, 4908, 3712, 23839, 13247, 12502, 2599, 25, 7248, 198, 220, 220, 220, 1441, 5345, 7, 42594, 7, 4908, 11, 2124, 8, 329, 2124, 287, 31986, 13, 2617, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 49726, 2124, 796, 1391, 70, 18872, 230, 402, 25, 308, 61, 87, 796, 2124, 92, 198, 37811, 198, 8818, 14349, 7509, 7, 4908, 3712, 23839, 13247, 12502, 11, 2124, 8, 198, 220, 220, 220, 2488, 30493, 2124, 287, 31986, 13, 2617, 198, 220, 220, 220, 410, 796, 685, 70, 329, 308, 287, 31986, 13, 8094, 13, 2617, 60, 198, 220, 220, 220, 256, 796, 31986, 13, 2673, 12195, 85, 11, 2124, 8, 198, 220, 220, 220, 8245, 62, 27932, 796, 256, 764, 855, 2124, 198, 220, 220, 220, 1441, 5345, 7, 85, 58, 31284, 62, 27932, 12962, 198, 437, 198, 198, 2, 2163, 14349, 11341, 7, 4908, 3712, 23839, 13247, 12502, 8, 198, 2, 220, 220, 220, 220, 1441, 5345, 7, 301, 14991, 7509, 7, 4908, 11, 2124, 8, 329, 2124, 287, 31986, 13, 2617, 8, 198, 2, 886, 198, 198, 37811, 198, 220, 220, 220, 13268, 308, 796, 1391, 87, 18872, 230, 1395, 25, 308, 61, 87, 796, 2124, 92, 198, 37811, 198, 8818, 5969, 62, 2617, 7, 4908, 3712, 23839, 13247, 12502, 11, 308, 8, 198, 220, 220, 220, 2488, 30493, 308, 287, 31986, 13, 8094, 13, 2617, 198, 220, 220, 220, 410, 796, 685, 87, 329, 2124, 287, 31986, 13, 2617, 60, 198, 220, 220, 220, 256, 796, 31986, 13, 2673, 12195, 70, 11, 410, 8, 198, 220, 220, 220, 1441, 5345, 7, 85, 58, 83, 764, 855, 410, 12962, 198, 437, 198 ]
2.477052
5,142
# Ospa dist function ospa_dist(pca1::Vector{Pointcloud}, pca2::Vector{Pointcloud}, c::S ) where {S <: Real} #dmat = Matrix{Float64}(length(pca1), length(pca2)) dmat = Matrix{Float64}(undef, length(pca1), length(pca2)) for i=1:length(pca1) for j=1:length(pca2) dmat[i,j] = ospa_dist(pca1[i],pca2[j],c) end end dmat end function ospa_dist(pc1::Pointcloud, pc2::Pointcloud, c::S ) where {S <: Real} if size(pc1)[1] > size(pc2)[1] return ospa_dist(pc2, pc1, c) end dmat = p2dist(pc1, pc2) assignments = hungarian(dmat)[1] cost = sum([min(dmat[i, assignments[i]], c) for i=1:size(pc1)[1] if assignments[i] != 0]) 1/size(pc2)[1]*(cost + c*(size(pc2)[1] - size(pc1)[1])) |> sqrt end function optimal_assignments(barycenter::Pointcloud, measurements::Vector{Pointcloud} ) map(x -> hungarian(p2dist(barycenter, measurements[x]))[1], 1:length(measurements)) end function p2dist(x,y) [sqrt.(sum((x[i,:] .- y[j,:]).^2)) for i=1:size(x)[1], j=1:size(y)[1]] end function p2dist(x) p2dist(x,x) end
[ 2, 440, 2777, 64, 1233, 198, 198, 8818, 267, 2777, 64, 62, 17080, 7, 79, 6888, 16, 3712, 38469, 90, 12727, 17721, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 6888, 17, 3712, 38469, 90, 12727, 17721, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 50, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 50, 1279, 25, 6416, 92, 198, 220, 220, 220, 1303, 67, 6759, 796, 24936, 90, 43879, 2414, 92, 7, 13664, 7, 79, 6888, 16, 828, 4129, 7, 79, 6888, 17, 4008, 198, 220, 220, 220, 288, 6759, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 4129, 7, 79, 6888, 16, 828, 4129, 7, 79, 6888, 17, 4008, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 79, 6888, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 28, 16, 25, 13664, 7, 79, 6888, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 6759, 58, 72, 11, 73, 60, 796, 267, 2777, 64, 62, 17080, 7, 79, 6888, 16, 58, 72, 4357, 79, 6888, 17, 58, 73, 4357, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 288, 6759, 198, 437, 198, 198, 8818, 267, 2777, 64, 62, 17080, 7, 14751, 16, 3712, 12727, 17721, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40653, 17, 3712, 12727, 17721, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 3712, 50, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 50, 1279, 25, 6416, 92, 198, 220, 220, 220, 611, 2546, 7, 14751, 16, 38381, 16, 60, 1875, 2546, 7, 14751, 17, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 267, 2777, 64, 62, 17080, 7, 14751, 17, 11, 40653, 16, 11, 269, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 288, 6759, 796, 279, 17, 17080, 7, 14751, 16, 11, 40653, 17, 8, 198, 220, 220, 220, 25815, 796, 9174, 3699, 7, 67, 6759, 38381, 16, 60, 198, 220, 220, 220, 1575, 796, 2160, 26933, 1084, 7, 67, 6759, 58, 72, 11, 25815, 58, 72, 60, 4357, 269, 8, 329, 1312, 28, 16, 25, 7857, 7, 14751, 16, 38381, 16, 60, 611, 25815, 58, 72, 60, 14512, 657, 12962, 198, 220, 220, 220, 352, 14, 7857, 7, 14751, 17, 38381, 16, 60, 9, 7, 15805, 1343, 269, 9, 7, 7857, 7, 14751, 17, 38381, 16, 60, 532, 2546, 7, 14751, 16, 38381, 16, 60, 4008, 930, 29, 19862, 17034, 198, 437, 198, 198, 8818, 16586, 62, 562, 570, 902, 7, 65, 560, 16159, 3712, 12727, 17721, 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, 13871, 3712, 38469, 90, 12727, 17721, 92, 198, 220, 220, 220, 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, 198, 220, 220, 220, 3975, 7, 87, 4613, 9174, 3699, 7, 79, 17, 17080, 7, 65, 560, 16159, 11, 13871, 58, 87, 60, 4008, 58, 16, 4357, 352, 25, 13664, 7, 1326, 5015, 902, 4008, 198, 437, 198, 198, 8818, 279, 17, 17080, 7, 87, 11, 88, 8, 198, 220, 220, 220, 685, 31166, 17034, 12195, 16345, 19510, 87, 58, 72, 11, 47715, 764, 12, 331, 58, 73, 11, 25, 35944, 61, 17, 4008, 329, 1312, 28, 16, 25, 7857, 7, 87, 38381, 16, 4357, 474, 28, 16, 25, 7857, 7, 88, 38381, 16, 11907, 198, 437, 198, 198, 8818, 279, 17, 17080, 7, 87, 8, 198, 220, 220, 220, 279, 17, 17080, 7, 87, 11, 87, 8, 198, 437, 198 ]
1.779202
702
using Catalyst rn = @reaction_network begin α, S + I --> 2I β, I --> R S^2, R --> 0 end α β # check can make a graph gr = Graph(rn) # check can save a graph fname = Base.Filesystem.tempname() savegraph(gr, fname, "png")
[ 3500, 48238, 198, 35906, 796, 2488, 260, 2673, 62, 27349, 2221, 198, 220, 220, 220, 26367, 11, 311, 1343, 314, 14610, 362, 40, 198, 220, 220, 220, 27169, 11, 314, 14610, 371, 198, 220, 220, 220, 311, 61, 17, 11, 371, 14610, 657, 198, 437, 26367, 27169, 198, 198, 2, 2198, 460, 787, 257, 4823, 198, 2164, 796, 29681, 7, 35906, 8, 198, 198, 2, 2198, 460, 3613, 257, 4823, 198, 69, 3672, 796, 7308, 13, 25876, 6781, 13, 29510, 3672, 3419, 198, 21928, 34960, 7, 2164, 11, 277, 3672, 11, 366, 11134, 4943, 628 ]
2.473684
95
import ..UncertainValues: UncertainScalarPopulation using RecipesBase #@recipe f(::Type{UncertainScalarPopulation{T}}, x::UncertainScalarPopulation{T}) where {T} = # rand(x, 10000) @recipe function f(p::UncertainScalarPopulation{T}) where T @series begin rand(p, 10000) end end @recipe function f(populations::Vector{UncertainScalarPopulation{T}}) where {T} for p in populations @series begin p end end end
[ 11748, 11485, 3118, 39239, 40161, 25, 28304, 1425, 3351, 282, 283, 45251, 198, 198, 3500, 44229, 14881, 628, 198, 2, 31, 29102, 431, 277, 7, 3712, 6030, 90, 3118, 39239, 3351, 282, 283, 45251, 90, 51, 92, 5512, 2124, 3712, 3118, 39239, 3351, 282, 283, 45251, 90, 51, 30072, 810, 1391, 51, 92, 796, 198, 2, 220, 220, 220, 43720, 7, 87, 11, 33028, 8, 628, 198, 31, 29102, 431, 2163, 277, 7, 79, 3712, 3118, 39239, 3351, 282, 283, 45251, 90, 51, 30072, 810, 309, 198, 220, 220, 220, 2488, 25076, 2221, 220, 198, 220, 220, 220, 220, 220, 220, 220, 43720, 7, 79, 11, 33028, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 29102, 431, 2163, 277, 7, 12924, 5768, 3712, 38469, 90, 3118, 39239, 3351, 282, 283, 45251, 90, 51, 11709, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 279, 287, 9684, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 25076, 2221, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437 ]
2.418367
196
export pointwise_log_likelihoods const ARRAY_DIMS_WARNING = "The supplied array of mcmc samples indicates you have more parameters than mcmc samples.This is possible, but highly unusual. Please check that your array of mcmc samples has the following dimensions: [n_samples,n_parms,n_chains]." """ pointwise_log_likelihoods( ll_fun::Function, samples::AbstractArray{<:Real,3}, data; splat::Bool=true ) Compute the pointwise log likelihood. # Arguments - $LIKELIHOOD_FUNCTION_ARG - `samples::AbstractArray`: A three dimensional array of MCMC samples. Here, the first dimension should indicate the iteration of the MCMC ; the second dimension should indicate the parameter ; and the third dimension represents the chains. - `data`: A vector of data used to estimate the parameters of the model. - `splat`: If `true` (default), `f` must be a function of `n` different parameters. Otherwise, `f` is assumed to be a function of a single parameter vector. # Returns - `Array`: A three dimensional array of pointwise log-likelihoods. """ function pointwise_log_likelihoods( ll_fun::Function, samples::AbstractArray{<:Union{Real, Missing}, 3}, data; splat::Bool=true, ) n_posterior, n_parms, n_chains = size(samples) if n_parms > n_posterior @info ARRAY_DIMS_WARNING end if splat fun = (p, d) -> ll_fun(p..., d) else fun = (p, d) -> ll_fun(p, d) end n_posterior, _, n_chains = size(samples) n_data = length(data) pointwise_lls = similar(samples, n_data, n_posterior, n_chains) for index in CartesianIndices(pointwise_lls) datum, iteration, chain = Tuple(index) pointwise_lls[datum, iteration, chain] = fun( samples[iteration, :, chain], data[datum] ) end return pointwise_lls end function pointwise_log_likelihoods( ll_fun::Function, samples::AbstractMatrix{<:Union{Real, Missing}}, data; chain_index::AbstractVector{<:Integer}=_assume_one_chain(samples), kwargs..., ) samples = _convert_to_array(samples, chain_index) return pointwise_log_likelihoods(ll_fun, samples, data) end
[ 39344, 966, 3083, 62, 6404, 62, 2339, 11935, 82, 198, 198, 9979, 5923, 30631, 62, 35, 3955, 50, 62, 31502, 796, 366, 464, 14275, 7177, 286, 285, 11215, 66, 8405, 9217, 345, 423, 517, 220, 198, 17143, 7307, 621, 285, 11215, 66, 8405, 13, 1212, 318, 1744, 11, 475, 4047, 8468, 13, 4222, 2198, 326, 534, 198, 18747, 286, 285, 11215, 66, 8405, 468, 262, 1708, 15225, 25, 685, 77, 62, 82, 12629, 11, 77, 62, 1845, 907, 11, 77, 62, 38861, 29225, 198, 198, 37811, 198, 220, 220, 220, 966, 3083, 62, 6404, 62, 2339, 11935, 82, 7, 198, 220, 220, 220, 220, 220, 220, 220, 32660, 62, 12543, 3712, 22203, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 8405, 3712, 23839, 19182, 90, 27, 25, 15633, 11, 18, 5512, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 26, 198, 220, 220, 220, 220, 220, 220, 220, 4328, 265, 3712, 33, 970, 28, 7942, 198, 220, 220, 220, 1267, 220, 198, 198, 7293, 1133, 262, 966, 3083, 2604, 14955, 13, 198, 198, 2, 20559, 2886, 198, 220, 532, 720, 43, 18694, 3698, 40, 39, 22808, 62, 42296, 4177, 2849, 62, 1503, 38, 198, 220, 532, 4600, 82, 12629, 3712, 23839, 19182, 63, 25, 317, 1115, 38517, 7177, 286, 13122, 9655, 8405, 13, 3423, 11, 262, 717, 198, 220, 220, 220, 15793, 815, 7603, 262, 24415, 286, 262, 13122, 9655, 2162, 262, 1218, 15793, 815, 198, 220, 220, 220, 7603, 262, 11507, 2162, 290, 262, 2368, 15793, 6870, 262, 14659, 13, 220, 198, 220, 532, 4600, 7890, 63, 25, 317, 15879, 286, 1366, 973, 284, 8636, 262, 10007, 286, 262, 2746, 13, 198, 220, 532, 4600, 22018, 265, 63, 25, 1002, 4600, 7942, 63, 357, 12286, 828, 4600, 69, 63, 1276, 307, 257, 2163, 286, 4600, 77, 63, 1180, 10007, 13, 220, 198, 220, 220, 220, 15323, 11, 4600, 69, 63, 318, 9672, 284, 307, 257, 2163, 286, 257, 2060, 11507, 15879, 13, 198, 198, 2, 16409, 198, 220, 532, 4600, 19182, 63, 25, 317, 1115, 38517, 7177, 286, 966, 3083, 2604, 12, 2339, 11935, 82, 13, 198, 37811, 198, 8818, 966, 3083, 62, 6404, 62, 2339, 11935, 82, 7, 198, 220, 220, 220, 32660, 62, 12543, 3712, 22203, 11, 198, 220, 220, 220, 8405, 3712, 23839, 19182, 90, 27, 25, 38176, 90, 15633, 11, 25639, 5512, 513, 5512, 198, 220, 220, 220, 1366, 26, 198, 220, 220, 220, 4328, 265, 3712, 33, 970, 28, 7942, 11, 198, 8, 198, 220, 220, 220, 299, 62, 79, 6197, 1504, 11, 299, 62, 1845, 907, 11, 299, 62, 38861, 796, 2546, 7, 82, 12629, 8, 198, 220, 220, 220, 611, 299, 62, 1845, 907, 1875, 299, 62, 79, 6197, 1504, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 5923, 30631, 62, 35, 3955, 50, 62, 31502, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 4328, 265, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 357, 79, 11, 288, 8, 4613, 32660, 62, 12543, 7, 79, 986, 11, 288, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 796, 357, 79, 11, 288, 8, 4613, 32660, 62, 12543, 7, 79, 11, 288, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 299, 62, 79, 6197, 1504, 11, 4808, 11, 299, 62, 38861, 796, 2546, 7, 82, 12629, 8, 198, 220, 220, 220, 299, 62, 7890, 796, 4129, 7, 7890, 8, 198, 220, 220, 220, 966, 3083, 62, 297, 82, 796, 2092, 7, 82, 12629, 11, 299, 62, 7890, 11, 299, 62, 79, 6197, 1504, 11, 299, 62, 38861, 8, 198, 220, 220, 220, 329, 6376, 287, 13690, 35610, 5497, 1063, 7, 4122, 3083, 62, 297, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4818, 388, 11, 24415, 11, 6333, 796, 309, 29291, 7, 9630, 8, 198, 220, 220, 220, 220, 220, 220, 220, 966, 3083, 62, 297, 82, 58, 19608, 388, 11, 24415, 11, 6333, 60, 796, 1257, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8405, 58, 2676, 341, 11, 1058, 11, 6333, 4357, 1366, 58, 19608, 388, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 966, 3083, 62, 297, 82, 198, 437, 628, 198, 8818, 966, 3083, 62, 6404, 62, 2339, 11935, 82, 7, 198, 220, 220, 220, 32660, 62, 12543, 3712, 22203, 11, 198, 220, 220, 220, 8405, 3712, 23839, 46912, 90, 27, 25, 38176, 90, 15633, 11, 25639, 92, 5512, 198, 220, 220, 220, 1366, 26, 198, 220, 220, 220, 6333, 62, 9630, 3712, 23839, 38469, 90, 27, 25, 46541, 92, 28, 62, 562, 2454, 62, 505, 62, 7983, 7, 82, 12629, 828, 198, 220, 220, 220, 479, 86, 22046, 986, 11, 198, 8, 198, 220, 220, 220, 8405, 796, 4808, 1102, 1851, 62, 1462, 62, 18747, 7, 82, 12629, 11, 6333, 62, 9630, 8, 198, 220, 220, 220, 1441, 966, 3083, 62, 6404, 62, 2339, 11935, 82, 7, 297, 62, 12543, 11, 8405, 11, 1366, 8, 198, 437, 628 ]
2.595041
847
import FinanceLib import Dates @testset "FinanceLib " begin @testset "tv" begin @test FinanceLib.yearFrac(Dates.Date(2027,2,12), Dates.Date(2018,2,12)) ≈ -8.999315537303216 @test FinanceLib.invYearFrac(Dates.Date(2027,2,12), -8.999315537303216) == Dates.Date(2018,2,12) @test FinanceLib.disFactAnnual(0.07) == 0.9345794392523364 @test FinanceLib.disFact(0.09, 3) == 0.7721834800610642 @test FinanceLib.fwdDisFact((0.07, 1), (0.09, 3)) == 0.8262363236653387 @test FinanceLib.xdisFact(0.09, Dates.Date(2015,3,15), Dates.Date(2018,10,8)) == 0.7353328680759499 @test FinanceLib.tMul(0.06/12, -120.0) == 0.5496327333641637 @test FinanceLib.tMul(0.06, -10.0, 12.0) == 0.5496327333641637 @test FinanceLib.rateGwth(7.35, 8.52, 5.0) == -0.029111071029244595 @test FinanceLib.periodGwth(100.0,50.0,0.07) == 10.244768351058712 end @testset "pv" begin @test FinanceLib.pv(10_000_000., 0.09, 5.0) == 6_499_313.862983453 @test FinanceLib.pv(12_704_891.6109538, 0.06, 4.0, 12.0) ≈ 10_000_000. @test FinanceLib.pvr(10_000_000., 1.09, 5.0) == 6_499_313.862983453 @test FinanceLib.pvc(11_735.108709918102, 0.08, 2.0) == 10_000 end @testset "fv" begin @test FinanceLib.fv(6_499_313.862983453, 0.09, 5.0) == 10_000_000.0 @test FinanceLib.fv(10_000_000.0, 0.06, 4.0, 12.0) ≈ 12_704_891.6109538 @test FinanceLib.fvc(10_000., 0.08, 2.0) == 11_735.108709918102 end @testset "annuity" begin @test FinanceLib.pvAnnuity(1000.0, 0.12, 5.0) == 3_604.776202345007 @test FinanceLib.pvAnnuity(7.33764573879378, 0.08, 30.0, 12.0) == 1000 @test FinanceLib.pvAnnuity(100.0, 0.05) == 2000.0 @test FinanceLib.fvAnnuity(1000.0, 0.05, 5.0) == 5_525.631250000007 @test FinanceLib.fvAnnuity(2000.0, 0.24, 5.0, 3.0) == 54_304.2278549568 @test FinanceLib.pmt(3_604.776202345007, 0.12, 5.0) == 1000.0 @test FinanceLib.pmt(1000.0, 0.08, 30.0, 12.0) == 7.33764573879378 @test FinanceLib.fmt(5_525.631250000007, 0.05, 5.0) == 1000 @test FinanceLib.fmt(54_304.2278549568, 0.24, 5.0, 3.0) == 2000 @test FinanceLib.pv(FinanceLib.pvAnnuity(10.0^6,.05,30.0),0.05,9.0) == 9_909_218.99605011 end @testset "effective rates" begin @test FinanceLib.effR(0.08, 2.0) ≈ 0.0816 @test FinanceLib.expR(0.08, 2.0) == 0.07844142630656266 @test FinanceLib.expR(0.08) == 0.0769610411361284 @test FinanceLib.nomR(FinanceLib.effR(0.08, 4), 4) ≈ 0.08 FinanceLib.pvc(20,FinanceLib.expR(0.07,4),4.25) == FinanceLib.pvr(20,1+FinanceLib.effR(0.07,4),4.25) eT = FinanceLib.RateCurve{FinanceLib.NomRate}([0.0016, 0.0021, 0.0027, 0.0033, 0.0037, 0.0041], 2) eR = FinanceLib.effR(eT) @test eR.rate[1] ≈ 0.0016006400 @test eR.rate[2] ≈ 0.0021011025 @test eR.rate[3] ≈ 0.0027018225 @test eR.rate[4] ≈ 0.0033027225 @test eR.rate[5] ≈ 0.0037034225 @test eR.rate[6] ≈ 0.0041042025 eN = FinanceLib.nomR(eR) @test eN.rate[1] ≈ 0.0016 @test eN.rate[2] ≈ 0.0021 @test eN.rate[3] ≈ 0.0027 @test eN.rate[4] ≈ 0.0033 @test eN.rate[5] ≈ 0.0037 @test eN.rate[6] ≈ 0.0041 eZ = FinanceLib.nomR(FinanceLib.effR(FinanceLib.expR(eT))) # N - X - E - N eY = FinanceLib.nomR(FinanceLib.expR(FinanceLib.effR(eT))) # N - E - X - N eW = FinanceLib.nomR(FinanceLib.expR(eT)) # N - X - N @test eZ.rate[3] == eW.rate[3] @test eY.rate[4] == eW.rate[4] @test eZ.rate[2] == eY.rate[2] @test eZ.rate[5] == eY.rate[5] @test eZ.rate[1] == eW.rate[1] end @testset "npv" begin @test FinanceLib.npv(0.05, [0.0:1.0:4.0;],[1000.,2000.0,4000.0,5000.0,6000.0],-1.45)==14709.923338335731 @test FinanceLib.npv(0.08, [0.25,6.25,3.5,4.5,1.25], [-6.25,1.2,1.25,3.6,2.5], -0.45) == 0.36962283798505946 @test FinanceLib.npv(0.08, zip([0.25,6.25,3.5,4.5,1.25],[-6.25,1.2,1.25,3.6,2.5]), -0.45) == 0.36962283798505946 @test FinanceLib.npv(0.08, [0.25,6.25,3.5,4.5,1.25], [-6.25,1.2,1.25,3.6,2.5], 6.25) == 0.619010419015909 @test FinanceLib.irr([0.125,0.29760274,0.49760274,0.55239726,0.812671233], [-10.25,-2.5,3.5,9.5,1.25]) ≈ 0.31813386476788824 ts = collect(zip([0.125,0.29760274,0.49760274,0.55239726,0.812671233], [-10.25,-2.5,3.5,9.5,1.25])) :: FinanceLib.PeriodSeries @test FinanceLib.irr(ts) ≈ 0.31813386476788824 @test FinanceLib.irr(zip([0.125,0.29760274,0.49760274,0.55239726,0.812671233], [-10.25,-2.5,3.5,9.5,1.25])) ≈ 0.31813386476788824 @test FinanceLib.xnpv(0.08, [Dates.Date(2012,2,25), Dates.Date(2012,6,28), Dates.Date(2013,2,15), Dates.Date(2014,9,18), Dates.Date(2015,2,20)], [-15, 5, 25, -10, 50], Dates.Date(2012,1,10) ) == 44.15557928534869 @test FinanceLib.xnpv(0.08, zip([Dates.Date(2012,2,25), Dates.Date(2012,6,28), Dates.Date(2013,2,15), Dates.Date(2014,9,18), Dates.Date(2015,2,20)], [-15, 5, 25, -10, 50.]), Dates.Date(2012,1,10) ) == 44.15557928534869 @test FinanceLib.xirr([Dates.Date(2012,2,25), Dates.Date(2012,6,28), Dates.Date(2013,2,15), Dates.Date(2014,9,18), Dates.Date(2015,2,20)], [-115, 5, 25, -10, 200] ) == 0.2783166029306355 td = collect(zip([Dates.Date(2012,2,25), Dates.Date(2012,6,28), Dates.Date(2013,2,15), Dates.Date(2014,9,18), Dates.Date(2015,2,20)], [-115, 5, 25, -10, 200])) td1 = FinanceLib.dateToPeriodSeries(Dates.Date(2010,05,12), td) @test td1[3][1] == 2.7652292950034223 @test FinanceLib.irr(td1) == 0.2783166029306353 @test FinanceLib.xirr(td) == 0.2783166029306355 @test FinanceLib.xirr(zip([Dates.Date(2012,2,25), Dates.Date(2012,6,28), Dates.Date(2013,2,15), Dates.Date(2014,9,18), Dates.Date(2015,2,20)], [-115, 5, 25, -10, 200]) ) == 0.2783166029306355 @test FinanceLib.npv(FinanceLib.PeriodSeries([(0.5,0.05), (1.25, 0.0575), (2, 0.0485), (3.5, 0.0625), (4.25, 0.055)]), [-150, 20, 15, 80, 100], 0.3) == 31.530253870718543 @test FinanceLib.xnpv(FinanceLib.DateSeries([(Dates.Date(2014,9,20),0.05), (Dates.Date(2015,2,1), 0.0575), (Dates.Date(2016,10,5), 0.0485), (Dates.Date(2017,12,5), 0.0625), (Dates.Date(2019,1,5), 0.055)]), [-150, 20, 15, 80, 100], Dates.Date(2014,2,15)) == 29.323165765999597 end @testset "Sharpe" begin @test FinanceLib.sharpe(1.58,9.26,22.36) ≈ 0.3434704830053667 end @testset "Rates" begin @test FinanceLib.discFactorToNominalRate(FinanceLib.DiscountFactor([0.9524, 0.89, 0.8163, 0.735],1)).rate[3] == 0.0699990723472752 dsc = FinanceLib.discFactorToNominalRate(FinanceLib.DiscountFactor([ 0.99920063949, 0.99790330288, 0.99596091045, 0.99342713542, 0.99080111671, 0.98778777227 ],2)).rate @test dsc[1] ≈ 0.0016 @test dsc[2] ≈ 0.0021 @test dsc[3] ≈ 0.0027 @test dsc[4] ≈ 0.0033 @test dsc[5] ≈ 0.0037 @test dsc[6] ≈ 0.0041 @test FinanceLib.estimR(FinanceLib.RateCurve{FinanceLib.NomRate}([0.05, 0.06, 0.07, 0.08], 2), 1.5) == 0.07 @test FinanceLib.estimR(FinanceLib.RateCurve{FinanceLib.NomRate}([0.05, 0.06, 0.07, 0.08], 2), 1.2) == 0.064 end end include("FixedIncomes/runtests.jl") include("Derivatives/runtests.jl") include("Statements/runtests.jl")
[ 11748, 15007, 25835, 198, 11748, 44712, 198, 198, 31, 9288, 2617, 366, 37, 14149, 25835, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 2221, 628, 220, 2488, 9288, 2617, 366, 14981, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 1941, 6732, 330, 7, 35, 689, 13, 10430, 7, 1238, 1983, 11, 17, 11, 1065, 828, 44712, 13, 10430, 7, 7908, 11, 17, 11, 1065, 4008, 15139, 230, 532, 23, 13, 2079, 6052, 18742, 2718, 1270, 2624, 1433, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 16340, 17688, 6732, 330, 7, 35, 689, 13, 10430, 7, 1238, 1983, 11, 17, 11, 1065, 828, 532, 23, 13, 2079, 6052, 18742, 2718, 1270, 2624, 1433, 8, 6624, 44712, 13, 10430, 7, 7908, 11, 17, 11, 1065, 8, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 6381, 29054, 18858, 723, 7, 15, 13, 2998, 8, 6624, 657, 13, 6052, 2231, 3720, 47106, 1495, 25429, 2414, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 6381, 29054, 7, 15, 13, 2931, 11, 513, 8, 6624, 657, 13, 3324, 28727, 2682, 7410, 39132, 41290, 220, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 16993, 7279, 29054, 19510, 15, 13, 2998, 11, 352, 828, 357, 15, 13, 2931, 11, 513, 4008, 6624, 657, 13, 23, 2075, 1954, 5066, 1954, 36879, 2091, 5774, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 6381, 29054, 7, 15, 13, 2931, 11, 44712, 13, 10430, 7, 4626, 11, 18, 11, 1314, 828, 44712, 13, 10430, 7, 7908, 11, 940, 11, 23, 4008, 6624, 657, 13, 22, 2327, 2091, 27033, 1795, 2425, 5824, 2079, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 83, 44, 377, 7, 15, 13, 3312, 14, 1065, 11, 532, 10232, 13, 15, 8, 6624, 657, 13, 44966, 5066, 1983, 20370, 2414, 1433, 2718, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 83, 44, 377, 7, 15, 13, 3312, 11, 532, 940, 13, 15, 11, 1105, 13, 15, 8, 6624, 657, 13, 44966, 5066, 1983, 20370, 2414, 1433, 2718, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 4873, 38, 86, 400, 7, 22, 13, 2327, 11, 807, 13, 4309, 11, 642, 13, 15, 8, 6624, 532, 15, 13, 48891, 1157, 15982, 940, 1959, 1731, 2231, 3865, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 41007, 38, 86, 400, 7, 3064, 13, 15, 11, 1120, 13, 15, 11, 15, 13, 2998, 8, 6624, 838, 13, 1731, 2857, 3104, 2327, 940, 44617, 1065, 628, 220, 886, 628, 220, 2488, 9288, 2617, 366, 79, 85, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 7, 940, 62, 830, 62, 830, 1539, 657, 13, 2931, 11, 642, 13, 15, 8, 6624, 718, 62, 28324, 62, 25838, 13, 4521, 1959, 5999, 36625, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 7, 1065, 62, 32869, 62, 4531, 16, 13, 39132, 3865, 2548, 11, 657, 13, 3312, 11, 604, 13, 15, 11, 1105, 13, 15, 8, 15139, 230, 838, 62, 830, 62, 830, 13, 220, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 37020, 7, 940, 62, 830, 62, 830, 1539, 352, 13, 2931, 11, 642, 13, 15, 8, 6624, 718, 62, 28324, 62, 25838, 13, 4521, 1959, 5999, 36625, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 28435, 7, 1157, 62, 22, 2327, 13, 15711, 2154, 2079, 1507, 15377, 11, 657, 13, 2919, 11, 362, 13, 15, 8, 6624, 838, 62, 830, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 69, 85, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 85, 7, 21, 62, 28324, 62, 25838, 13, 4521, 1959, 5999, 36625, 11, 657, 13, 2931, 11, 642, 13, 15, 8, 6624, 838, 62, 830, 62, 830, 13, 15, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 85, 7, 940, 62, 830, 62, 830, 13, 15, 11, 657, 13, 3312, 11, 604, 13, 15, 11, 1105, 13, 15, 8, 15139, 230, 1105, 62, 32869, 62, 4531, 16, 13, 39132, 3865, 2548, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 28435, 7, 940, 62, 830, 1539, 657, 13, 2919, 11, 362, 13, 15, 8, 6624, 1367, 62, 22, 2327, 13, 15711, 2154, 2079, 1507, 15377, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 1236, 14834, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 18858, 14834, 7, 12825, 13, 15, 11, 657, 13, 1065, 11, 642, 13, 15, 8, 6624, 513, 62, 31916, 13, 3324, 38850, 1954, 2231, 25816, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 18858, 14834, 7, 22, 13, 2091, 4304, 33032, 2548, 3720, 30695, 11, 657, 13, 2919, 11, 1542, 13, 15, 11, 1105, 13, 15, 8, 6624, 8576, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 18858, 14834, 7, 3064, 13, 15, 11, 657, 13, 2713, 8, 6624, 4751, 13, 15, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 85, 18858, 14834, 7, 12825, 13, 15, 11, 657, 13, 2713, 11, 642, 13, 15, 8, 6624, 642, 62, 39088, 13, 5066, 11623, 10535, 22, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 85, 18858, 14834, 7, 11024, 13, 15, 11, 657, 13, 1731, 11, 642, 13, 15, 11, 513, 13, 15, 8, 6624, 7175, 62, 21288, 13, 1828, 41172, 33781, 3104, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 4426, 83, 7, 18, 62, 31916, 13, 3324, 38850, 1954, 2231, 25816, 11, 657, 13, 1065, 11, 642, 13, 15, 8, 6624, 8576, 13, 15, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 4426, 83, 7, 12825, 13, 15, 11, 657, 13, 2919, 11, 1542, 13, 15, 11, 1105, 13, 15, 8, 6624, 767, 13, 2091, 4304, 33032, 2548, 3720, 30695, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 16762, 7, 20, 62, 39088, 13, 5066, 11623, 10535, 22, 11, 657, 13, 2713, 11, 642, 13, 15, 8, 6624, 8576, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 69, 16762, 7, 4051, 62, 21288, 13, 1828, 41172, 33781, 3104, 11, 657, 13, 1731, 11, 642, 13, 15, 11, 513, 13, 15, 8, 6624, 4751, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 79, 85, 7, 37, 14149, 25835, 13, 79, 85, 18858, 14834, 7, 940, 13, 15, 61, 21, 38508, 2713, 11, 1270, 13, 15, 828, 15, 13, 2713, 11, 24, 13, 15, 8, 6624, 860, 62, 44675, 62, 28727, 13, 2079, 32417, 28555, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 16803, 3965, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 14822, 49, 7, 15, 13, 2919, 11, 362, 13, 15, 8, 15139, 230, 657, 13, 2919, 1433, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 11201, 49, 7, 15, 13, 2919, 11, 362, 13, 15, 8, 6624, 657, 13, 2998, 23, 2598, 1415, 2075, 1270, 37466, 25540, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 11201, 49, 7, 15, 13, 2919, 8, 6624, 657, 13, 2998, 38205, 13464, 1157, 2623, 1065, 5705, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 26601, 49, 7, 37, 14149, 25835, 13, 14822, 49, 7, 15, 13, 2919, 11, 604, 828, 604, 8, 15139, 230, 657, 13, 2919, 628, 220, 220, 220, 15007, 25835, 13, 79, 28435, 7, 1238, 11, 37, 14149, 25835, 13, 11201, 49, 7, 15, 13, 2998, 11, 19, 828, 19, 13, 1495, 8, 6624, 15007, 25835, 13, 79, 37020, 7, 1238, 11, 16, 10, 37, 14149, 25835, 13, 14822, 49, 7, 15, 13, 2998, 11, 19, 828, 19, 13, 1495, 8, 628, 220, 220, 220, 304, 51, 796, 15007, 25835, 13, 32184, 26628, 303, 90, 37, 14149, 25835, 13, 45, 296, 32184, 92, 26933, 15, 13, 405, 1433, 11, 657, 13, 405, 2481, 11, 657, 13, 405, 1983, 11, 657, 13, 405, 2091, 11, 657, 13, 405, 2718, 11, 657, 13, 405, 3901, 4357, 362, 8, 628, 220, 220, 220, 304, 49, 796, 15007, 25835, 13, 14822, 49, 7, 68, 51, 8, 628, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 16, 60, 15139, 230, 657, 13, 405, 36150, 2414, 405, 198, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 17, 60, 15139, 230, 657, 13, 405, 2481, 486, 940, 1495, 198, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 18, 60, 15139, 230, 657, 13, 405, 1983, 486, 6469, 1495, 198, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 19, 60, 15139, 230, 657, 13, 11245, 1270, 1983, 18182, 198, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 20, 60, 15139, 230, 657, 13, 11245, 2154, 2682, 18182, 198, 220, 220, 220, 2488, 9288, 304, 49, 13, 4873, 58, 21, 60, 15139, 230, 657, 13, 22914, 13464, 1238, 1495, 628, 220, 220, 220, 304, 45, 796, 15007, 25835, 13, 26601, 49, 7, 68, 49, 8, 198, 220, 220, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 16, 60, 15139, 230, 657, 13, 405, 1433, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 17, 60, 15139, 230, 657, 13, 405, 2481, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 18, 60, 15139, 230, 657, 13, 405, 1983, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 19, 60, 15139, 230, 657, 13, 405, 2091, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 20, 60, 15139, 230, 657, 13, 405, 2718, 198, 220, 220, 220, 2488, 9288, 304, 45, 13, 4873, 58, 21, 60, 15139, 230, 657, 13, 405, 3901, 628, 220, 220, 220, 304, 57, 796, 15007, 25835, 13, 26601, 49, 7, 37, 14149, 25835, 13, 14822, 49, 7, 37, 14149, 25835, 13, 11201, 49, 7, 68, 51, 22305, 1303, 399, 532, 1395, 532, 412, 532, 399, 198, 220, 220, 220, 304, 56, 796, 15007, 25835, 13, 26601, 49, 7, 37, 14149, 25835, 13, 11201, 49, 7, 37, 14149, 25835, 13, 14822, 49, 7, 68, 51, 22305, 1303, 399, 532, 412, 532, 1395, 532, 399, 198, 220, 220, 220, 304, 54, 796, 15007, 25835, 13, 26601, 49, 7, 37, 14149, 25835, 13, 11201, 49, 7, 68, 51, 4008, 1303, 399, 532, 1395, 532, 399, 628, 220, 220, 220, 2488, 9288, 304, 57, 13, 4873, 58, 18, 60, 6624, 304, 54, 13, 4873, 58, 18, 60, 198, 220, 220, 220, 2488, 9288, 304, 56, 13, 4873, 58, 19, 60, 6624, 304, 54, 13, 4873, 58, 19, 60, 198, 220, 220, 220, 2488, 9288, 304, 57, 13, 4873, 58, 17, 60, 6624, 304, 56, 13, 4873, 58, 17, 60, 198, 220, 220, 220, 2488, 9288, 304, 57, 13, 4873, 58, 20, 60, 6624, 304, 56, 13, 4873, 58, 20, 60, 198, 220, 220, 220, 2488, 9288, 304, 57, 13, 4873, 58, 16, 60, 6624, 304, 54, 13, 4873, 58, 16, 60, 628, 198, 220, 886, 628, 198, 220, 2488, 9288, 2617, 366, 37659, 85, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 37659, 85, 7, 15, 13, 2713, 11, 685, 15, 13, 15, 25, 16, 13, 15, 25, 19, 13, 15, 26, 38430, 12825, 1539, 11024, 13, 15, 11, 27559, 13, 15, 11, 27641, 13, 15, 11, 43434, 13, 15, 4357, 12, 16, 13, 2231, 8, 855, 1415, 31495, 13, 24, 1954, 28460, 2091, 3553, 3132, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 37659, 85, 7, 15, 13, 2919, 11, 685, 15, 13, 1495, 11, 21, 13, 1495, 11, 18, 13, 20, 11, 19, 13, 20, 11, 16, 13, 1495, 4357, 25915, 21, 13, 1495, 11, 16, 13, 17, 11, 16, 13, 1495, 11, 18, 13, 21, 11, 17, 13, 20, 4357, 532, 15, 13, 2231, 8, 6624, 657, 13, 2623, 4846, 23815, 2718, 4089, 1120, 3270, 3510, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 37659, 85, 7, 15, 13, 2919, 11, 19974, 26933, 15, 13, 1495, 11, 21, 13, 1495, 11, 18, 13, 20, 11, 19, 13, 20, 11, 16, 13, 1495, 38430, 12, 21, 13, 1495, 11, 16, 13, 17, 11, 16, 13, 1495, 11, 18, 13, 21, 11, 17, 13, 20, 46570, 532, 15, 13, 2231, 8, 6624, 657, 13, 2623, 4846, 23815, 2718, 4089, 1120, 3270, 3510, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 37659, 85, 7, 15, 13, 2919, 11, 685, 15, 13, 1495, 11, 21, 13, 1495, 11, 18, 13, 20, 11, 19, 13, 20, 11, 16, 13, 1495, 4357, 25915, 21, 13, 1495, 11, 16, 13, 17, 11, 16, 13, 1495, 11, 18, 13, 21, 11, 17, 13, 20, 4357, 718, 13, 1495, 8, 6624, 657, 13, 21, 1129, 486, 3023, 1129, 486, 3270, 2931, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 343, 81, 26933, 15, 13, 11623, 11, 15, 13, 26561, 1899, 28857, 11, 15, 13, 38073, 1899, 28857, 11, 15, 13, 2816, 1954, 5607, 2075, 11, 15, 13, 23, 1065, 3134, 1065, 2091, 4357, 25915, 940, 13, 1495, 12095, 17, 13, 20, 11, 18, 13, 20, 11, 24, 13, 20, 11, 16, 13, 1495, 12962, 15139, 230, 657, 13, 36042, 1485, 2548, 2414, 32059, 28011, 1731, 628, 220, 220, 220, 40379, 796, 2824, 7, 13344, 26933, 15, 13, 11623, 11, 15, 13, 26561, 1899, 28857, 11, 15, 13, 38073, 1899, 28857, 11, 15, 13, 2816, 1954, 5607, 2075, 11, 15, 13, 23, 1065, 3134, 1065, 2091, 4357, 25915, 940, 13, 1495, 12095, 17, 13, 20, 11, 18, 13, 20, 11, 24, 13, 20, 11, 16, 13, 1495, 60, 4008, 7904, 15007, 25835, 13, 5990, 2101, 27996, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 343, 81, 7, 912, 8, 15139, 230, 657, 13, 36042, 1485, 2548, 2414, 32059, 28011, 1731, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 343, 81, 7, 13344, 26933, 15, 13, 11623, 11, 15, 13, 26561, 1899, 28857, 11, 15, 13, 38073, 1899, 28857, 11, 15, 13, 2816, 1954, 5607, 2075, 11, 15, 13, 23, 1065, 3134, 1065, 2091, 4357, 25915, 940, 13, 1495, 12095, 17, 13, 20, 11, 18, 13, 20, 11, 24, 13, 20, 11, 16, 13, 1495, 60, 4008, 15139, 230, 657, 13, 36042, 1485, 2548, 2414, 32059, 28011, 1731, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 37659, 85, 7, 15, 13, 2919, 11, 685, 35, 689, 13, 10430, 7, 6999, 11, 17, 11, 1495, 828, 44712, 13, 10430, 7, 6999, 11, 21, 11, 2078, 828, 220, 198, 220, 220, 220, 220, 220, 44712, 13, 10430, 7, 6390, 11, 17, 11, 1314, 828, 44712, 13, 10430, 7, 4967, 11, 24, 11, 1507, 828, 44712, 13, 10430, 7, 4626, 11, 17, 11, 1238, 8, 4357, 198, 220, 220, 220, 220, 220, 25915, 1314, 11, 642, 11, 1679, 11, 532, 940, 11, 2026, 4357, 44712, 13, 10430, 7, 6999, 11, 16, 11, 940, 8, 1267, 6624, 220, 5846, 13, 1314, 2816, 3720, 26279, 28978, 3388, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 37659, 85, 7, 15, 13, 2919, 11, 19974, 26933, 35, 689, 13, 10430, 7, 6999, 11, 17, 11, 1495, 828, 44712, 13, 10430, 7, 6999, 11, 21, 11, 2078, 828, 220, 198, 220, 220, 220, 220, 220, 44712, 13, 10430, 7, 6390, 11, 17, 11, 1314, 828, 44712, 13, 10430, 7, 4967, 11, 24, 11, 1507, 828, 44712, 13, 10430, 7, 4626, 11, 17, 11, 1238, 8, 4357, 198, 220, 220, 220, 220, 220, 25915, 1314, 11, 642, 11, 1679, 11, 532, 940, 11, 2026, 8183, 828, 44712, 13, 10430, 7, 6999, 11, 16, 11, 940, 8, 1267, 6624, 220, 5846, 13, 1314, 2816, 3720, 26279, 28978, 3388, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 343, 81, 26933, 35, 689, 13, 10430, 7, 6999, 11, 17, 11, 1495, 828, 44712, 13, 10430, 7, 6999, 11, 21, 11, 2078, 828, 220, 198, 220, 220, 220, 220, 220, 44712, 13, 10430, 7, 6390, 11, 17, 11, 1314, 828, 44712, 13, 10430, 7, 4967, 11, 24, 11, 1507, 828, 44712, 13, 10430, 7, 4626, 11, 17, 11, 1238, 8, 4357, 198, 220, 220, 220, 220, 220, 25915, 15363, 11, 642, 11, 1679, 11, 532, 940, 11, 939, 60, 1267, 6624, 220, 657, 13, 1983, 5999, 1433, 1899, 1959, 20548, 28567, 628, 220, 220, 220, 41560, 796, 2824, 7, 13344, 26933, 35, 689, 13, 10430, 7, 6999, 11, 17, 11, 1495, 828, 44712, 13, 10430, 7, 6999, 11, 21, 11, 2078, 828, 220, 198, 220, 220, 220, 44712, 13, 10430, 7, 6390, 11, 17, 11, 1314, 828, 44712, 13, 10430, 7, 4967, 11, 24, 11, 1507, 828, 44712, 13, 10430, 7, 4626, 11, 17, 11, 1238, 8, 4357, 198, 220, 220, 220, 25915, 15363, 11, 642, 11, 1679, 11, 532, 940, 11, 939, 60, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 41560, 16, 796, 15007, 25835, 13, 4475, 2514, 5990, 2101, 27996, 7, 35, 689, 13, 10430, 7, 10333, 11, 2713, 11, 1065, 828, 41560, 8, 198, 220, 220, 220, 2488, 9288, 41560, 16, 58, 18, 7131, 16, 60, 6624, 362, 13, 29143, 23539, 1959, 4059, 2682, 22047, 220, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 343, 81, 7, 8671, 16, 8, 6624, 220, 657, 13, 1983, 5999, 1433, 1899, 1959, 20548, 33319, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 343, 81, 7, 8671, 8, 6624, 220, 657, 13, 1983, 5999, 1433, 1899, 1959, 20548, 28567, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 343, 81, 7, 13344, 26933, 35, 689, 13, 10430, 7, 6999, 11, 17, 11, 1495, 828, 44712, 13, 10430, 7, 6999, 11, 21, 11, 2078, 828, 220, 198, 220, 220, 220, 220, 220, 44712, 13, 10430, 7, 6390, 11, 17, 11, 1314, 828, 44712, 13, 10430, 7, 4967, 11, 24, 11, 1507, 828, 44712, 13, 10430, 7, 4626, 11, 17, 11, 1238, 8, 4357, 198, 220, 220, 220, 220, 220, 25915, 15363, 11, 642, 11, 1679, 11, 532, 940, 11, 939, 12962, 1267, 6624, 220, 657, 13, 1983, 5999, 1433, 1899, 1959, 20548, 28567, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 37659, 85, 7, 37, 14149, 25835, 13, 5990, 2101, 27996, 26933, 7, 15, 13, 20, 11, 15, 13, 2713, 828, 357, 16, 13, 1495, 11, 657, 13, 2713, 2425, 828, 357, 17, 11, 657, 13, 15, 32642, 828, 357, 18, 13, 20, 11, 657, 13, 3312, 1495, 828, 357, 19, 13, 1495, 11, 657, 13, 47838, 15437, 828, 25915, 8628, 11, 1160, 11, 1315, 11, 4019, 11, 1802, 4357, 657, 13, 18, 8, 6624, 3261, 13, 38612, 1495, 2548, 24038, 21652, 3559, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 87, 37659, 85, 7, 37, 14149, 25835, 13, 10430, 27996, 26933, 7, 35, 689, 13, 10430, 7, 4967, 11, 24, 11, 1238, 828, 15, 13, 2713, 828, 357, 35, 689, 13, 10430, 7, 4626, 11, 17, 11, 16, 828, 657, 13, 2713, 2425, 828, 357, 35, 689, 13, 10430, 7, 5304, 11, 940, 11, 20, 828, 657, 13, 15, 32642, 828, 357, 35, 689, 13, 10430, 7, 5539, 11, 1065, 11, 20, 828, 657, 13, 3312, 1495, 828, 357, 35, 689, 13, 10430, 7, 23344, 11, 16, 11, 20, 828, 657, 13, 47838, 15437, 828, 25915, 8628, 11, 1160, 11, 1315, 11, 4019, 11, 1802, 4357, 44712, 13, 10430, 7, 4967, 11, 17, 11, 1314, 4008, 6624, 220, 2808, 13, 32637, 1433, 3553, 2996, 17032, 43239, 220, 628, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 40201, 431, 1, 2221, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 1477, 283, 431, 7, 16, 13, 3365, 11, 24, 13, 2075, 11, 1828, 13, 2623, 8, 15139, 230, 657, 13, 2682, 2682, 2154, 2780, 6200, 44468, 3134, 220, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 49, 689, 1, 2221, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 15410, 41384, 2514, 45, 296, 1292, 32184, 7, 37, 14149, 25835, 13, 15642, 608, 41384, 26933, 15, 13, 3865, 1731, 11, 657, 13, 4531, 11, 657, 13, 23, 24136, 11, 657, 13, 22, 2327, 4357, 16, 29720, 4873, 58, 18, 60, 6624, 657, 13, 3312, 24214, 2998, 1954, 2857, 1983, 4309, 628, 220, 220, 220, 288, 1416, 796, 15007, 25835, 13, 15410, 41384, 2514, 45, 296, 1292, 32184, 7, 37, 14149, 25835, 13, 15642, 608, 41384, 26933, 657, 13, 17032, 13330, 2670, 2920, 11, 657, 13, 2079, 3720, 3070, 1270, 25270, 11, 657, 13, 2079, 3270, 31751, 940, 2231, 11, 657, 13, 2079, 2682, 1983, 17059, 3682, 11, 657, 13, 2079, 2919, 486, 1157, 46250, 11, 657, 13, 4089, 39761, 29331, 24403, 16589, 17, 29720, 4873, 628, 220, 220, 220, 2488, 9288, 288, 1416, 58, 16, 60, 15139, 230, 657, 13, 405, 1433, 198, 220, 220, 220, 2488, 9288, 288, 1416, 58, 17, 60, 15139, 230, 657, 13, 405, 2481, 198, 220, 220, 220, 2488, 9288, 288, 1416, 58, 18, 60, 15139, 230, 657, 13, 405, 1983, 198, 220, 220, 220, 2488, 9288, 288, 1416, 58, 19, 60, 15139, 230, 657, 13, 405, 2091, 198, 220, 220, 220, 2488, 9288, 288, 1416, 58, 20, 60, 15139, 230, 657, 13, 405, 2718, 198, 220, 220, 220, 2488, 9288, 288, 1416, 58, 21, 60, 15139, 230, 657, 13, 405, 3901, 628, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 395, 320, 49, 7, 37, 14149, 25835, 13, 32184, 26628, 303, 90, 37, 14149, 25835, 13, 45, 296, 32184, 92, 26933, 15, 13, 2713, 11, 657, 13, 3312, 11, 657, 13, 2998, 11, 657, 13, 2919, 4357, 362, 828, 352, 13, 20, 8, 6624, 657, 13, 2998, 198, 220, 220, 220, 2488, 9288, 15007, 25835, 13, 395, 320, 49, 7, 37, 14149, 25835, 13, 32184, 26628, 303, 90, 37, 14149, 25835, 13, 45, 296, 32184, 92, 26933, 15, 13, 2713, 11, 657, 13, 3312, 11, 657, 13, 2998, 11, 657, 13, 2919, 4357, 362, 828, 352, 13, 17, 8, 6624, 657, 13, 15, 2414, 628, 220, 886, 198, 198, 437, 198, 198, 17256, 7203, 13715, 818, 8988, 14, 81, 2797, 3558, 13, 20362, 4943, 198, 17256, 7203, 28532, 452, 2929, 14, 81, 2797, 3558, 13, 20362, 4943, 198, 17256, 7203, 17126, 3196, 14, 81, 2797, 3558, 13, 20362, 4943, 198 ]
1.925141
3,727
# .-'''-. _..._ # ' _ \ _______ .-'_..._''. # /| / /` '. \ \ ___ `'. .' .' '.\ # || . | \ ' ' |--.\ \ / .' # || .-,.--. | ' | ' | | \ ' . ' .| # || __ | .-. |\ \ / / __ | | | '| | __ .' |_ # ||/'__ '. | | | | `. ` ..' /.:--.'. | | | || | .:--.'. _ .' | # |:/` '. '| | | | '-...-'`/ | \ | | | ' .'. ' / | \ | .' |'--. .-' # || | || | '- `" __ | | | |___.' /' \ '. .`" __ | | . | / | | # ||\ / '| | .'.''| | /_______.'/ '. `._____.-'/ .'.''| | .'.'| |// | | # |/\'..' / | | / / | |_\_______|/ `-.______ / / / | |_.'.'.-' / | '.' # ' `'-'` |_| \ \._,\ '/ ` \ \._,\ '/.' \_.' | / # `--' `" `--' `" `'-' using Base.Broadcast using Base.Broadcast: Broadcasted, AbstractArrayStyle, DefaultArrayStyle, broadcasted, instantiate, materialize, flatten, combine_eltypes, _broadcast_getindex using ForwardDiff: Dual trim(x, Δ) = reshape(Δ, ntuple(i -> size(Δ, i), Val(ndims(x)))) unbroadcast(x::AbstractArray, Δ) = size(x) == size(Δ) ? Δ : length(x) == length(Δ) ? trim(x, Δ) : trim(x, sum(Δ, dims = ntuple(i -> size(x, i) == 1 ? i : ndims(Δ)+1, Val(ndims(Δ))))) unbroadcast(x::Number, Δ) = sum(Δ) dual(x, p) = x dual(x::Real, p) = Dual(x, p) dualtype(::Type{Dual{G,T,P}}) where {G,T,P} = T function dual_function(f::F) where F function (args::Vararg{Any,N}) where N ds = map(args, ntuple(identity,Val(N))) do x, i dual(x, ntuple(j -> i==j, Val(N))) end return f(ds...) end end dualify(bc::Broadcasted{S}) where S = Broadcasted{S}(dual_function(bc.f), bc.args, bc.axes) function broadcast_gradient!(bc::Broadcasted, dest::AbstractArray, grads::Vararg{Any}) @simd for I in eachindex(bc) @inbounds begin out = bc[I] dest[I] = out.value map((g, p) -> g[I] = p, grads, out.partials.values) end end end function broadcast_gradient(bc::Broadcasted, ::Type{T}) where T dest = similar(bc, T) grads = map(_ -> similar(bc, T), bc.args) broadcast_gradient!(bc, dest, grads...) return dest, grads end @inline function ∇broadcast(bc′::Broadcasted) where {F,N} bc = dualify(instantiate(flatten(bc′))) T = combine_eltypes(bc.f, bc.args) y, gs = broadcast_gradient(bc, dualtype(T)) back(Δ) = map((x, d) -> unbroadcast(x, Δ.*d), bc.args, gs) return y, back end function ∇broadcast(bc::Broadcasted{<:AbstractArrayStyle{0}}) out = dualify(instantiate(flatten(bc)))[] return out.value, Δ -> map(x -> x*Δ, out.partials.values) end using Base: tail _unflatten(x, xs) = first(xs), tail(xs) _unflatten(x::Tuple{}, xs) = (), xs function _unflatten(x::Tuple, xs) t1, xs1 = _unflatten(first(x), xs) t2, xs2 = _unflatten(tail(x), xs1) (t1, t2...), xs2 end function _unflatten(bc::Broadcasted, xs) t, xs′ = _unflatten(bc.args, xs) (args=t,f=nothing,axes=nothing), xs′ end unflatten(x, xs) = _unflatten(x, xs)[1] @grad function broadcasted(f, args...) broadcasted(f, args...), Δ -> (nothing, Δ.args...) end @grad function materialize(bc::Broadcasted{<:DefaultArrayStyle}) let (y, back) = ∇broadcast(bc) y, Δ -> (unflatten(bc, back(Δ)),) end end
[ 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 12, 7061, 29001, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 986, 62, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 220, 220, 4808, 220, 220, 220, 3467, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37405, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 19355, 62, 986, 62, 35384, 198, 2, 220, 1220, 91, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 220, 220, 1220, 63, 45302, 220, 220, 3467, 220, 220, 220, 220, 220, 220, 220, 3467, 220, 46444, 4600, 4458, 220, 220, 220, 220, 764, 6, 764, 6, 220, 220, 220, 220, 220, 45302, 59, 198, 2, 220, 8614, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 220, 220, 930, 220, 220, 220, 220, 3467, 220, 705, 220, 220, 220, 220, 220, 220, 220, 220, 705, 44233, 13, 59, 220, 3467, 220, 220, 1220, 764, 6, 198, 2, 220, 8614, 220, 220, 220, 220, 220, 220, 220, 764, 20995, 9816, 13, 930, 220, 220, 705, 220, 220, 220, 220, 220, 930, 220, 705, 220, 220, 220, 220, 220, 220, 220, 930, 930, 220, 220, 220, 3467, 220, 705, 764, 705, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 91, 198, 2, 220, 8614, 220, 11593, 220, 220, 220, 930, 220, 764, 34507, 930, 59, 220, 220, 220, 3467, 220, 220, 220, 220, 1220, 1220, 220, 11593, 220, 220, 220, 220, 930, 930, 220, 220, 220, 220, 930, 220, 705, 91, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11593, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 6, 930, 62, 198, 2, 220, 8614, 14, 6, 834, 45302, 930, 930, 220, 930, 930, 4600, 13, 220, 220, 4600, 11485, 6, 1220, 11207, 438, 2637, 13, 220, 220, 930, 930, 220, 220, 220, 220, 930, 220, 8614, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 25, 438, 2637, 13, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 220, 764, 6, 220, 220, 220, 220, 930, 198, 2, 220, 930, 14079, 63, 220, 45302, 705, 91, 930, 220, 930, 930, 220, 220, 220, 705, 12, 986, 19355, 63, 14, 930, 220, 220, 3467, 930, 220, 930, 930, 220, 220, 220, 220, 705, 764, 4458, 705, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 930, 220, 220, 3467, 930, 220, 220, 220, 220, 220, 764, 6, 930, 6, 438, 13, 220, 764, 19355, 198, 2, 220, 8614, 220, 220, 220, 220, 930, 8614, 930, 220, 705, 12, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 1, 11593, 930, 930, 220, 930, 930, 17569, 2637, 1220, 6, 220, 3467, 45302, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 63, 1, 11593, 930, 930, 220, 220, 220, 220, 764, 220, 220, 930, 1220, 930, 220, 930, 198, 2, 220, 8614, 59, 220, 220, 220, 1220, 705, 91, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 6, 13531, 91, 930, 1220, 37405, 2637, 14, 220, 220, 220, 45302, 4600, 13, 29343, 7874, 26488, 764, 6, 13531, 91, 930, 220, 220, 764, 6, 2637, 91, 930, 1003, 930, 220, 930, 198, 2, 220, 930, 14, 43054, 492, 6, 1220, 930, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 1220, 220, 220, 930, 930, 62, 59, 37405, 91, 14, 220, 220, 220, 220, 220, 220, 4600, 34507, 25947, 1220, 1220, 1220, 220, 220, 930, 930, 62, 2637, 2637, 7874, 6, 220, 1220, 220, 930, 220, 705, 2637, 198, 2, 220, 705, 220, 4600, 6, 19355, 63, 220, 930, 62, 91, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3467, 3467, 13557, 11, 59, 31051, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 220, 3467, 3467, 13557, 11, 59, 31051, 2637, 220, 220, 3467, 62, 2637, 220, 220, 930, 220, 220, 1220, 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, 4600, 438, 6, 220, 4600, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 438, 6, 220, 4600, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 6, 19355, 198, 198, 3500, 7308, 13, 30507, 2701, 198, 3500, 7308, 13, 30507, 2701, 25, 44244, 276, 11, 27741, 19182, 21466, 11, 15161, 19182, 21466, 11, 7025, 276, 11, 198, 220, 9113, 9386, 11, 2587, 1096, 11, 27172, 268, 11, 12082, 62, 417, 19199, 11, 4808, 36654, 2701, 62, 1136, 9630, 198, 3500, 19530, 28813, 25, 20446, 198, 198, 2213, 320, 7, 87, 11, 37455, 8, 796, 27179, 1758, 7, 138, 242, 11, 299, 83, 29291, 7, 72, 4613, 2546, 7, 138, 242, 11, 1312, 828, 3254, 7, 358, 12078, 7, 87, 35514, 198, 198, 403, 36654, 2701, 7, 87, 3712, 23839, 19182, 11, 37455, 8, 796, 198, 220, 2546, 7, 87, 8, 6624, 2546, 7, 138, 242, 8, 5633, 37455, 1058, 198, 220, 4129, 7, 87, 8, 6624, 4129, 7, 138, 242, 8, 5633, 15797, 7, 87, 11, 37455, 8, 1058, 198, 220, 220, 220, 15797, 7, 87, 11, 2160, 7, 138, 242, 11, 5391, 82, 796, 299, 83, 29291, 7, 72, 4613, 2546, 7, 87, 11, 1312, 8, 6624, 352, 5633, 1312, 1058, 299, 67, 12078, 7, 138, 242, 47762, 16, 11, 3254, 7, 358, 12078, 7, 138, 242, 4008, 22305, 198, 198, 403, 36654, 2701, 7, 87, 3712, 15057, 11, 37455, 8, 796, 2160, 7, 138, 242, 8, 198, 198, 646, 282, 7, 87, 11, 279, 8, 796, 2124, 198, 646, 282, 7, 87, 3712, 15633, 11, 279, 8, 796, 20446, 7, 87, 11, 279, 8, 198, 198, 646, 282, 4906, 7, 3712, 6030, 90, 36248, 90, 38, 11, 51, 11, 47, 11709, 8, 810, 1391, 38, 11, 51, 11, 47, 92, 796, 309, 198, 198, 8818, 10668, 62, 8818, 7, 69, 3712, 37, 8, 810, 376, 198, 220, 2163, 357, 22046, 3712, 19852, 853, 90, 7149, 11, 45, 30072, 810, 399, 198, 220, 220, 220, 288, 82, 796, 3975, 7, 22046, 11, 299, 83, 29291, 7, 738, 414, 11, 7762, 7, 45, 22305, 466, 2124, 11, 1312, 198, 220, 220, 220, 220, 220, 10668, 7, 87, 11, 299, 83, 29291, 7, 73, 4613, 1312, 855, 73, 11, 3254, 7, 45, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 277, 7, 9310, 23029, 198, 220, 886, 198, 437, 198, 198, 646, 282, 1958, 7, 15630, 3712, 30507, 2701, 276, 90, 50, 30072, 810, 311, 796, 44244, 276, 90, 50, 92, 7, 646, 282, 62, 8818, 7, 15630, 13, 69, 828, 47125, 13, 22046, 11, 47125, 13, 897, 274, 8, 198, 198, 8818, 7025, 62, 49607, 0, 7, 15630, 3712, 30507, 2701, 276, 11, 2244, 3712, 23839, 19182, 11, 3915, 82, 3712, 19852, 853, 90, 7149, 30072, 198, 220, 2488, 14323, 67, 329, 314, 287, 1123, 9630, 7, 15630, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 503, 796, 47125, 58, 40, 60, 198, 220, 220, 220, 220, 220, 2244, 58, 40, 60, 796, 503, 13, 8367, 198, 220, 220, 220, 220, 220, 3975, 19510, 70, 11, 279, 8, 4613, 308, 58, 40, 60, 796, 279, 11, 3915, 82, 11, 503, 13, 3911, 8231, 13, 27160, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198, 198, 8818, 7025, 62, 49607, 7, 15630, 3712, 30507, 2701, 276, 11, 7904, 6030, 90, 51, 30072, 810, 309, 198, 220, 2244, 796, 2092, 7, 15630, 11, 309, 8, 198, 220, 3915, 82, 796, 3975, 28264, 4613, 2092, 7, 15630, 11, 309, 828, 47125, 13, 22046, 8, 198, 220, 7025, 62, 49607, 0, 7, 15630, 11, 2244, 11, 3915, 82, 23029, 198, 220, 1441, 2244, 11, 3915, 82, 198, 437, 198, 198, 31, 45145, 2163, 18872, 229, 36654, 2701, 7, 15630, 17478, 3712, 30507, 2701, 276, 8, 810, 1391, 37, 11, 45, 92, 198, 220, 47125, 796, 10668, 1958, 7, 8625, 415, 9386, 7, 2704, 41769, 7, 15630, 17478, 22305, 198, 220, 309, 796, 12082, 62, 417, 19199, 7, 15630, 13, 69, 11, 47125, 13, 22046, 8, 198, 220, 331, 11, 308, 82, 796, 7025, 62, 49607, 7, 15630, 11, 10668, 4906, 7, 51, 4008, 198, 220, 736, 7, 138, 242, 8, 796, 3975, 19510, 87, 11, 288, 8, 4613, 22619, 6344, 2701, 7, 87, 11, 37455, 15885, 67, 828, 47125, 13, 22046, 11, 308, 82, 8, 198, 220, 1441, 331, 11, 736, 198, 437, 198, 198, 8818, 18872, 229, 36654, 2701, 7, 15630, 3712, 30507, 2701, 276, 90, 27, 25, 23839, 19182, 21466, 90, 15, 11709, 8, 198, 220, 503, 796, 10668, 1958, 7, 8625, 415, 9386, 7, 2704, 41769, 7, 15630, 22305, 21737, 198, 220, 1441, 503, 13, 8367, 11, 37455, 4613, 3975, 7, 87, 4613, 2124, 9, 138, 242, 11, 503, 13, 3911, 8231, 13, 27160, 8, 198, 437, 198, 198, 3500, 7308, 25, 7894, 198, 198, 62, 403, 2704, 41769, 7, 87, 11, 2124, 82, 8, 796, 717, 7, 34223, 828, 7894, 7, 34223, 8, 198, 198, 62, 403, 2704, 41769, 7, 87, 3712, 51, 29291, 90, 5512, 2124, 82, 8, 796, 29994, 2124, 82, 198, 198, 8818, 4808, 403, 2704, 41769, 7, 87, 3712, 51, 29291, 11, 2124, 82, 8, 198, 220, 256, 16, 11, 2124, 82, 16, 796, 4808, 403, 2704, 41769, 7, 11085, 7, 87, 828, 2124, 82, 8, 198, 220, 256, 17, 11, 2124, 82, 17, 796, 4808, 403, 2704, 41769, 7, 13199, 7, 87, 828, 2124, 82, 16, 8, 198, 220, 357, 83, 16, 11, 256, 17, 986, 828, 2124, 82, 17, 198, 437, 198, 198, 8818, 4808, 403, 2704, 41769, 7, 15630, 3712, 30507, 2701, 276, 11, 2124, 82, 8, 198, 220, 256, 11, 2124, 82, 17478, 796, 4808, 403, 2704, 41769, 7, 15630, 13, 22046, 11, 2124, 82, 8, 198, 220, 357, 22046, 28, 83, 11, 69, 28, 22366, 11, 897, 274, 28, 22366, 828, 2124, 82, 17478, 198, 437, 198, 198, 403, 2704, 41769, 7, 87, 11, 2124, 82, 8, 796, 4808, 403, 2704, 41769, 7, 87, 11, 2124, 82, 38381, 16, 60, 198, 198, 31, 9744, 2163, 7025, 276, 7, 69, 11, 26498, 23029, 198, 220, 7025, 276, 7, 69, 11, 26498, 986, 828, 37455, 4613, 357, 22366, 11, 37455, 13, 22046, 23029, 198, 437, 198, 198, 31, 9744, 2163, 2587, 1096, 7, 15630, 3712, 30507, 2701, 276, 90, 27, 25, 19463, 19182, 21466, 30072, 198, 220, 1309, 357, 88, 11, 736, 8, 796, 18872, 229, 36654, 2701, 7, 15630, 8, 198, 220, 220, 220, 331, 11, 37455, 4613, 357, 403, 2704, 41769, 7, 15630, 11, 736, 7, 138, 242, 36911, 8, 198, 220, 886, 198, 437, 198 ]
1.831215
1,967
""" The category of finite sets and functions, and its skeleton. """ module FinSets export FinSet, FinFunction, FinDomFunction, TabularSet, TabularLimit, force, is_indexed, preimage, JoinAlgorithm, SmartJoin, NestedLoopJoin, SortMergeJoin, HashJoin, SubFinSet, SubOpBoolean using AutoHashEquals using DataStructures: OrderedDict, IntDisjointSets, union!, find_root! using Reexport import StaticArrays using StaticArrays: StaticVector, SVector, SizedVector, similar_type import Tables, PrettyTables @reexport using ..Sets using ...GAT, ...Theories, ...CSetDataStructures, ...Graphs using ..FinCats, ..FreeDiagrams, ..Limits, ..Subobjects import ...Theories: Ob, meet, ∧, join, ∨, top, ⊤, bottom, ⊥ import ..Categories: ob, hom, dom, codom, compose, id, ob_map, hom_map import ..FinCats: force, ob_generators, hom_generators, graph, is_discrete using ..FinCats: dicttype import ..Limits: limit, colimit, universal, pushout_complement, can_pushout_complement import ..Subobjects: Subobject, SubobjectLattice using ..Sets: IdentityFunction, SetFunctionCallable # Finite sets ############# """ Finite set. A finite set has abstract type `FinSet{S,T}`. The second type parameter `T` is the element type of the set and the first parameter `S` is the collection type, which can be a subtype of `AbstractSet` or another Julia collection type. In addition, the skeleton of the category **FinSet** is the important special case `S = Int`. The set ``{1,…,n}`` is represented by the object `FinSet(n)` of type `FinSet{Int,Int}`. """ abstract type FinSet{S,T} <: SetOb{T} end FinSet(set::FinSet) = set """ Finite set of the form ``{1,…,n}`` for some number ``n ≥ 0``. """ @auto_hash_equals struct FinSetInt <: FinSet{Int,Int} n::Int end FinSet{Int,Int}(n::Int) = FinSetInt(n) FinSet(n::Int) = FinSetInt(n) Base.iterate(set::FinSetInt, args...) = iterate(1:set.n, args...) Base.length(set::FinSetInt) = set.n Base.in(set::FinSetInt, elem) = in(elem, 1:set.n) Base.show(io::IO, set::FinSetInt) = print(io, "FinSet($(set.n))") """ Finite set given by Julia collection. The underlying collection should be a Julia iterable of definite length. It may be, but is not required to be, set-like (a subtype of `AbstractSet`). """ @auto_hash_equals struct FinSetCollection{S,T} <: FinSet{S,T} collection::S end FinSetCollection(collection::S) where S = FinSetCollection{S,eltype(collection)}(collection) FinSet(collection::S) where {T, S<:Union{AbstractVector{T},AbstractSet{T}}} = FinSetCollection{S,T}(collection) Base.iterate(set::FinSetCollection, args...) = iterate(set.collection, args...) Base.length(set::FinSetCollection) = length(set.collection) Base.in(set::FinSetCollection, elem) = in(elem, set.collection) function Base.show(io::IO, set::FinSetCollection) print(io, "FinSet(") show(io, set.collection) print(io, ")") end """ Finite set whose elements are rows of a table. The underlying table should be compliant with Tables.jl. For the sake of uniformity, the rows are provided as named tuples, which assumes that the table is not "extremely wide". This should not be a major limitation in practice but see the Tables.jl documentation for further discussion. """ @auto_hash_equals struct TabularSet{Table,Row} <: FinSet{Table,Row} table::Table function TabularSet(table::Table) where Table schema = Tables.schema(table) new{Table,NamedTuple{schema.names,Tuple{schema.types...}}}(table) end end FinSet(nt::NamedTuple) = TabularSet(nt) Base.iterate(set::TabularSet, args...) = iterate(Tables.namedtupleiterator(set.table), args...) Base.length(set::TabularSet) = Tables.rowcount(set.table) Base.collect(set::TabularSet) = Tables.rowtable(set.table) function Base.show(io::IO, set::TabularSet) print(io, "TabularSet(") show(io, set.table) print(io, ")") end function Base.show(io::IO, ::MIME"text/plain", set::TabularSet{T}) where T print(io, "$(length(set))-element TabularSet{$T}") if !get(io, :compact, false) println(io, ":") PrettyTables.pretty_table(io, set.table, nosubheader=true) end end function Base.show(io::IO, ::MIME"text/html", set::TabularSet) println(io, "<div class=\"tabular-set\">") println(io, "$(length(set))-element TabularSet") PrettyTables.pretty_table(io, set.table, backend=Val(:html), standalone=false, nosubheader=true) println(io, "</div>") end # Discrete categories #-------------------- """ Discrete category on a finite set. The only morphisms in a discrete category are the identities, which are here identified with the objects. """ @auto_hash_equals struct DiscreteCat{Ob,S<:FinSet{<:Any,Ob}} <: FinCat{Ob,Ob} set::S end DiscreteCat(n::Integer) = DiscreteCat(FinSet(n)) FinCat(s::Union{FinSet,Integer}) = DiscreteCat(s) ob_generators(C::DiscreteCat) = C.set hom_generators(::DiscreteCat) = () is_discrete(::DiscreteCat) = true graph(C::DiscreteCat{Int,FinSetInt}) = Graph(length(C.set)) dom(C::DiscreteCat{T}, f) where T = f::T codom(C::DiscreteCat{T}, f) where T = f::T id(C::DiscreteCat{T}, x) where T = x::T compose(C::DiscreteCat{T}, f, g) where T = (f::T == g::T) ? f : error("Nontrivial composite in discrete category: $f != $g") hom_map(F::FinDomFunctor{<:DiscreteCat}, x) = id(codom(F), ob_map(F, x)) Base.show(io::IO, C::DiscreteCat{Int,FinSetInt}) = print(io, "FinCat($(length(C.set)))") # Finite functions ################## """ Function between finite sets. The function can be defined implicitly by an arbitrary Julia function, in which case it is evaluated lazily, or explictly by a vector of integers. In the vector representation, the function (1↦1, 2↦3, 3↦2, 4↦3), for example, is represented by the vector [1,3,2,3]. This type is mildly generalized by [`FinDomFunction`](@ref). """ const FinFunction{S, S′, Dom <: FinSet{S}, Codom <: FinSet{S′}} = SetFunction{Dom,Codom} FinFunction(f::Function, dom, codom) = SetFunctionCallable(f, FinSet(dom), FinSet(codom)) FinFunction(::typeof(identity), args...) = IdentityFunction((FinSet(arg) for arg in args)...) FinFunction(f::AbstractDict, args...) = FinFunctionDict(f, (FinSet(arg) for arg in args)...) function FinFunction(f::AbstractVector{Int}, args...; index=false) if index == false FinDomFunctionVector(f, (FinSet(arg) for arg in args)...) else index = index == true ? nothing : index IndexedFinFunctionVector(f, args...; index=index) end end FinFunction(f::AbstractVector{Int}; kw...) = FinFunction(f, FinSet(isempty(f) ? 0 : maximum(f)); kw...) Sets.show_type_constructor(io::IO, ::Type{<:FinFunction}) = print(io, "FinFunction") """ Function out of a finite set. This class of functions is convenient because it is exactly the class that can be represented explicitly by a vector of values from the codomain. """ const FinDomFunction{S, Dom<:FinSet{S}, Codom<:SetOb} = SetFunction{Dom,Codom} FinDomFunction(f::Function, dom, codom) = SetFunctionCallable(f, FinSet(dom), codom) FinDomFunction(::typeof(identity), args...) = IdentityFunction((FinSet(arg) for arg in args)...) FinDomFunction(f::AbstractDict, args...) = FinDomFunctionDict(f, args...) function FinDomFunction(f::AbstractVector, args...; index=false) if index == false FinDomFunctionVector(f, args...) else index = index == true ? nothing : index IndexedFinDomFunctionVector(f, args...; index=index) end end Sets.show_type_constructor(io::IO, ::Type{<:FinDomFunction}) = print(io, "FinDomFunction") # Note: Cartesian monoidal structure is implemented generically for Set but # cocartesian only for FinSet. @cocartesian_monoidal_instance FinSet FinFunction Ob(C::FinCat{Int}) = FinSet(length(ob_generators(C))) Ob(F::Functor{<:FinCat{Int}}) = FinDomFunction(collect_ob(F), Ob(codom(F))) # Vector-based functions #----------------------- """ Function in **Set** represented by a vector. The domain of this function is always of type `FinSet{Int}`, with elements of the form ``{1,...,n}``. """ struct FinDomFunctionVector{T,V<:AbstractVector{T}, Codom<:SetOb{T}} <: FinDomFunction{Int,FinSetInt,Codom} func::V codom::Codom end FinDomFunctionVector(f::AbstractVector{T}) where T = FinDomFunctionVector(f, TypeSet{T}()) function FinDomFunctionVector(f::AbstractVector, dom::FinSet{Int}, codom) length(f) == length(dom) || error("Length of vector $f does not match domain $dom") FinDomFunctionVector(f, codom) end dom(f::FinDomFunctionVector) = FinSet(length(f.func)) (f::FinDomFunctionVector)(x) = f.func[x] function Base.show(io::IO, f::FinDomFunctionVector) print(io, "FinDomFunction($(f.func), ") Sets.show_domains(io, f) print(io, ")") end force(f::FinDomFunction{Int}) = FinDomFunctionVector(map(f, dom(f)), codom(f)) force(f::FinDomFunctionVector) = f Base.collect(f::SetFunction) = force(f).func """ Function in **FinSet** represented explicitly by a vector. """ const FinFunctionVector{S,T,V<:AbstractVector{T}} = FinDomFunctionVector{T,V,<:FinSet{S,T}} Base.show(io::IO, f::FinFunctionVector) = print(io, "FinFunction($(f.func), $(length(dom(f))), $(length(codom(f))))") Sets.do_compose(f::FinFunctionVector, g::FinDomFunctionVector) = FinDomFunctionVector(g.func[f.func], codom(g)) # Indexed vector-based functions #------------------------------- """ Indexed function out of a finite set of type `FinSet{Int}`. Works in the same way as the special case of [`IndexedFinFunctionVector`](@ref), except that the index is typically a dictionary, not a vector. """ struct IndexedFinDomFunctionVector{T,V<:AbstractVector{T},Index,Codom<:SetOb{T}} <: FinDomFunction{Int,FinSetInt,Codom} func::V index::Index codom::Codom end IndexedFinDomFunctionVector(f::AbstractVector{T}; kw...) where T = IndexedFinDomFunctionVector(f, TypeSet{T}(); kw...) function IndexedFinDomFunctionVector(f::AbstractVector{T}, codom::SetOb{T}; index=nothing) where T if isnothing(index) index = Dict{T,Vector{Int}}() for (i, x) in enumerate(f) push!(get!(index, x) do; Int[] end, i) end end IndexedFinDomFunctionVector(f, index, codom) end Base.:(==)(f::Union{FinDomFunctionVector,IndexedFinDomFunctionVector}, g::Union{FinDomFunctionVector,IndexedFinDomFunctionVector}) = # Ignore index when comparing for equality. f.func == g.func && codom(f) == codom(g) function Base.show(io::IO, f::IndexedFinDomFunctionVector) print(io, "FinDomFunction($(f.func), ") Sets.show_domains(io, f) print(io, ", index=true)") end dom(f::IndexedFinDomFunctionVector) = FinSet(length(f.func)) force(f::IndexedFinDomFunctionVector) = f (f::IndexedFinDomFunctionVector)(x) = f.func[x] """ Whether the given function is indexed, i.e., supports efficient preimages. """ is_indexed(f::SetFunction) = false is_indexed(f::IdentityFunction) = true is_indexed(f::IndexedFinDomFunctionVector) = true is_indexed(f::FinDomFunctionVector{T,<:AbstractRange{T}}) where T = true """ The preimage (inverse image) of the value y in the codomain. """ preimage(f::IdentityFunction, y) = SVector(y) preimage(f::FinDomFunction, y) = [ x for x in dom(f) if f(x) == y ] preimage(f::IndexedFinDomFunctionVector, y) = get_preimage_index(f.index, y) @inline get_preimage_index(index::AbstractDict, y) = get(index, y, 1:0) @inline get_preimage_index(index::AbstractVector, y) = index[y] preimage(f::FinDomFunctionVector{T,<:AbstractRange{T}}, y::T) where T = # Both `in` and `searchsortedfirst` are specialized for AbstractRange. y ∈ f.func ? SVector(searchsortedfirst(f.func, y)) : SVector{0,Int}() """ Indexed function between finite sets of type `FinSet{Int}`. Indexed functions store both the forward map ``f: X → Y``, as a vector of integers, and the backward map ``f: Y → X⁻¹``, as a vector of vectors of integers, accessible through the [`preimage`](@ref) function. The backward map is called the *index*. If it is not supplied through the keyword argument `index`, it is computed when the object is constructed. This type is mildly generalized by [`IndexedFinDomFunctionVector`](@ref). """ const IndexedFinFunctionVector{V,Index} = IndexedFinDomFunctionVector{Int,V,Index,FinSetInt} function IndexedFinFunctionVector(f::AbstractVector{Int}; index=nothing) codom = isnothing(index) ? (isempty(f) ? 0 : maximum(f)) : length(index) IndexedFinFunctionVector(f, codom; index=index) end function IndexedFinFunctionVector(f::AbstractVector{Int}, codom; index=nothing) codom = FinSet(codom) if isnothing(index) index = [ Int[] for j in codom ] for (i, j) in enumerate(f) push!(index[j], i) end elseif length(index) != length(codom) error("Index length $(length(index)) does not match codomain $codom") end IndexedFinDomFunctionVector(f, index, codom) end Base.show(io::IO, f::IndexedFinFunctionVector) = print(io, "FinFunction($(f.func), $(length(dom(f))), $(length(codom(f))), index=true)") # For now, we do not preserve or compose indices, only the function vectors. Sets.do_compose(f::Union{FinFunctionVector,IndexedFinFunctionVector}, g::Union{FinDomFunctionVector,IndexedFinDomFunctionVector}) = FinDomFunctionVector(g.func[f.func], codom(g)) # Dict-based functions #--------------------- """ Function in **Set** represented by a dictionary. The domain is a `FinSet{S}` where `S` is the type of the dictionary's `keys` collection. """ @auto_hash_equals struct FinDomFunctionDict{K,D<:AbstractDict{K},Codom<:SetOb} <: FinDomFunction{D,FinSet{AbstractSet{K},K},Codom} func::D codom::Codom end FinDomFunctionDict(d::AbstractDict{K,V}) where {K,V} = FinDomFunctionDict(d, TypeSet{V}()) dom(f::FinDomFunctionDict) = FinSet(keys(f.func)) (f::FinDomFunctionDict)(x) = f.func[x] function Base.show(io::IO, f::F) where F <: FinDomFunctionDict Sets.show_type_constructor(io, F) print(io, "(") show(io, f.func) print(io, ", ") Sets.show_domains(io, f, domain=false) print(io, ")") end force(f::FinDomFunction) = FinDomFunctionDict(Dict(x => f(x) for x in dom(f)), codom(f)) force(f::FinDomFunctionDict) = f """ Function in **FinSet** represented by a dictionary. """ const FinFunctionDict{K,D<:AbstractDict{K},Codom<:FinSet} = FinDomFunctionDict{K,D,Codom} FinFunctionDict(d::AbstractDict, codom::FinSet) = FinDomFunctionDict(d, codom) FinFunctionDict(d::AbstractDict{K,V}) where {K,V} = FinDomFunctionDict(d, FinSet(Set(values(d)))) Sets.do_compose(f::FinFunctionDict{K,D}, g::FinDomFunctionDict) where {K,D} = FinDomFunctionDict(dicttype(D)(x => g.func[y] for (x,y) in pairs(f.func)), codom(g)) # Limits ######## limit(Xs::EmptyDiagram{<:FinSet{Int}}) = Limit(Xs, SMultispan{0}(FinSet(1))) universal(lim::Limit{<:FinSet{Int},<:EmptyDiagram}, cone::SMultispan{0}) = ConstantFunction(1, apex(cone), FinSet(1)) limit(Xs::SingletonDiagram{<:FinSet{Int}}) = limit(Xs, SpecializeLimit()) function limit(Xs::ObjectPair{<:FinSet{Int}}) m, n = length.(Xs) indices = CartesianIndices((m, n)) π1 = FinFunction(i -> indices[i][1], m*n, m) π2 = FinFunction(i -> indices[i][2], m*n, n) Limit(Xs, Span(π1, π2)) end function universal(lim::Limit{<:FinSet{Int},<:ObjectPair}, cone::Span) f, g = cone m, n = length.(codom.(cone)) indices = LinearIndices((m, n)) FinFunction(i -> indices[f(i),g(i)], apex(cone), ob(lim)) end function limit(Xs::DiscreteDiagram{<:FinSet{Int}}) ns = length.(Xs) indices = CartesianIndices(Tuple(ns)) n = prod(ns) πs = [FinFunction(i -> indices[i][j], n, ns[j]) for j in 1:length(ns)] Limit(Xs, Multispan(FinSet(n), πs)) end function universal(lim::Limit{<:FinSet{Int},<:DiscreteDiagram}, cone::Multispan) ns = length.(codom.(cone)) indices = LinearIndices(Tuple(ns)) FinFunction(i -> indices[(f(i) for f in cone)...], apex(cone), ob(lim)) end function limit(pair::ParallelPair{<:FinSet{Int}}) f, g = pair m = length(dom(pair)) eq = FinFunction(filter(i -> f(i) == g(i), 1:m), m) Limit(pair, SMultispan{1}(eq)) end function limit(para::ParallelMorphisms{<:FinSet{Int}}) @assert !isempty(para) f1, frest = para[1], para[2:end] m = length(dom(para)) eq = FinFunction(filter(i -> all(f1(i) == f(i) for f in frest), 1:m), m) Limit(para, SMultispan{1}(eq)) end function universal(lim::Limit{<:FinSet{Int},<:ParallelMorphisms}, cone::SMultispan{1}) ι = collect(incl(lim)) h = only(cone) FinFunction(Int[only(searchsorted(ι, h(i))) for i in dom(h)], length(ι)) end """ Limit of finite sets with a reverse mapping or index into the limit set. This type provides a fallback for limit algorithms that do not come with a specialized algorithm to apply the universal property of the limit. In such cases, you can explicitly construct a mapping from tuples of elements in the feet of the limit cone to elements in the apex of the cone. The index is constructed the first time it is needed. Thus there is no extra cost to using this type if the universal property will not be invoked. """ mutable struct FinSetIndexedLimit{Ob<:FinSet,Diagram,Cone<:Multispan{Ob}} <: AbstractLimit{Ob,Diagram} diagram::Diagram cone::Cone index::Union{AbstractDict,Nothing} end FinSetIndexedLimit(diagram, cone::Multispan) = FinSetIndexedLimit(diagram, cone, nothing) function make_limit_index(cone::Multispan{<:FinSet}) πs = Tuple(legs(cone)) index = Dict{Tuple{map(eltype∘codom, πs)...}, eltype(apex(cone))}() for x in apex(cone) index[map(π -> π(x), πs)] = x end return index end function universal(lim::FinSetIndexedLimit, cone::Multispan) if isnothing(lim.index) lim.index = make_limit_index(lim.cone) end fs = Tuple(legs(cone)) FinFunction(Int[lim.index[map(f -> f(x), fs)] for x in apex(cone)], apex(cone), ob(lim)) end """ Algorithm for limit of cospan or multicospan with feet being finite sets. In the context of relational databases, such limits are called *joins*. The trivial join algorithm is [`NestedLoopJoin`](@ref), which is algorithmically equivalent to the generic algorithm `ComposeProductEqualizer`. The algorithms [`HashJoin`](@ref) and [`SortMergeJoin`](@ref) are usually much faster. If you are unsure what algorithm to pick, use [`SmartJoin`](@ref). """ abstract type JoinAlgorithm <: LimitAlgorithm end """ Meta-algorithm for joins that attempts to pick an appropriate algorithm. """ struct SmartJoin <: JoinAlgorithm end function limit(cospan::Multicospan{<:SetOb,<:FinDomFunction{Int}}; alg::LimitAlgorithm=ComposeProductEqualizer()) limit(cospan, alg) end function limit(cospan::Multicospan{<:SetOb,<:FinDomFunction{Int}}, ::SmartJoin) # Handle the important special case where one of the legs is a constant # (function out of a singleton set). In this case, we just need to take a # product of preimages of the constant value. funcs = legs(cospan) i = findfirst(f -> length(dom(f)) == 1, funcs) if !isnothing(i) c = funcs[i](1) ιs = map(deleteat(funcs, i)) do f FinFunction(preimage(f, c), dom(f)) end x, πs = if length(ιs) == 1 dom(only(ιs)), ιs else prod = product(map(dom, ιs)) ob(prod), map(compose, legs(prod), ιs) end πs = insert(πs, i, ConstantFunction(1, x, FinSet(1))) return FinSetIndexedLimit(cospan, Multispan(πs)) end # In the general case, for now we always just do a hash join, although # sort-merge joins can sometimes be faster. limit(cospan, HashJoin()) end deleteat(vec::StaticVector, i) = StaticArrays.deleteat(vec, i) deleteat(vec::Vector, i) = deleteat!(copy(vec), i) insert(vec::StaticVector{N,T}, i, x::S) where {N,T,S} = StaticArrays.insert(similar_type(vec, typejoin(T,S))(vec), i, x) insert(vec::Vector{T}, i, x::S) where {T,S} = insert!(collect(typejoin(T,S), vec), i, x) """ [Nested-loop join](https://en.wikipedia.org/wiki/Nested_loop_join) algorithm. This is the naive algorithm for computing joins. """ struct NestedLoopJoin <: JoinAlgorithm end function limit(cospan::Multicospan{<:SetOb,<:FinDomFunction{Int}}, ::NestedLoopJoin) # A nested-loop join is algorithmically the same as `ComposeProductEqualizer`, # but for completeness and performance we give a direct implementation here. funcs = legs(cospan) ns = map(length, feet(cospan)) πs = map(_ -> Int[], funcs) for I in CartesianIndices(Tuple(ns)) values = map((f, i) -> f(I[i]), funcs, eachindex(funcs)) if all(==(values[1]), values) for i in eachindex(πs) push!(πs[i], I[i]) end end end cone = Multispan(map((π,f) -> FinFunction(π, dom(f)), πs, funcs)) FinSetIndexedLimit(cospan, cone) end """ [Sort-merge join](https://en.wikipedia.org/wiki/Sort-merge_join) algorithm. """ struct SortMergeJoin <: JoinAlgorithm end function limit(cospan::Multicospan{<:SetOb,<:FinDomFunction{Int}}, ::SortMergeJoin) funcs = map(collect, legs(cospan)) sorts = map(sortperm, funcs) values = similar_mutable(funcs, eltype(apex(cospan))) ranges = similar_mutable(funcs, UnitRange{Int}) function next_range!(i::Int) f, sort = funcs[i], sorts[i] n = length(f) start = last(ranges[i]) + 1 ranges[i] = if start <= n val = values[i] = f[sort[start]] stop = start + 1 while stop <= n && f[sort[stop]] == val; stop += 1 end start:(stop - 1) else start:n end end πs = map(_ -> Int[], funcs) for i in eachindex(ranges) ranges[i] = 0:0 next_range!(i) end while !any(isempty, ranges) if all(==(values[1]), values) indices = CartesianIndices(Tuple(ranges)) for i in eachindex(πs) append!(πs[i], (sorts[i][I[i]] for I in indices)) next_range!(i) end else next_range!(argmin(values)) end end cone = Multispan(map((π,f) -> FinFunction(π, length(f)), πs, funcs)) FinSetIndexedLimit(cospan, cone) end similar_mutable(x::AbstractVector, T::Type) = similar(x, T) function similar_mutable(x::StaticVector{N}, T::Type) where N # `similar` always returns an `MVector` but `setindex!(::MVector, args...)` # only works when the element type is a bits-type. isbitstype(T) ? similar(x, T) : SizedVector{N}(Vector{T}(undef, N)) end """ [Hash join](https://en.wikipedia.org/wiki/Hash_join) algorithm. """ struct HashJoin <: JoinAlgorithm end function limit(cospan::Multicospan{<:SetOb,<:FinDomFunction{Int}}, ::HashJoin) # We follow the standard terminology for hash joins: in a multiway hash join, # one function, called the *probe*, will be iterated over and need not be # indexed, whereas the other functions, call *build* inputs, must be indexed. # # We choose as probe the unindexed function with largest domain. If all # functions are already indexed, we arbitrarily choose the first one. i = argmax(map(legs(cospan)) do f is_indexed(f) ? -1 : length(dom(f)) end) probe = legs(cospan)[i] builds = map(ensure_indexed, deleteat(legs(cospan), i)) πs_build, π_probe = hash_join(builds, probe) FinSetIndexedLimit(cospan, Multispan(insert(πs_build, i, π_probe))) end function hash_join(builds::AbstractVector{<:FinDomFunction{Int}}, probe::FinDomFunction{Int}) π_builds, πp = map(_ -> Int[], builds), Int[] for y in dom(probe) val = probe(y) preimages = map(build -> preimage(build, val), builds) n_preimages = Tuple(map(length, preimages)) n = prod(n_preimages) if n > 0 indices = CartesianIndices(n_preimages) for j in eachindex(π_builds) πb, xs = π_builds[j], preimages[j] append!(πb, (xs[I[j]] for I in indices)) end append!(πp, (y for i in 1:n)) end end (map(FinFunction, π_builds, map(dom, builds)), FinFunction(πp, dom(probe))) end function hash_join(builds::StaticVector{1,<:FinDomFunction{Int}}, probe::FinDomFunction{Int}) πb, πp = hash_join(builds[1], probe) (SVector((πb,)), πp) end function hash_join(build::FinDomFunction{Int}, probe::FinDomFunction{Int}) πb, πp = Int[], Int[] for y in dom(probe) xs = preimage(build, probe(y)) n = length(xs) if n > 0 append!(πb, xs) append!(πp, (y for i in 1:n)) end end (FinFunction(πb, dom(build)), FinFunction(πp, dom(probe))) end ensure_indexed(f::FinFunction{Int,Int}) = is_indexed(f) ? f : FinFunction(collect(f), codom(f), index=true) ensure_indexed(f::FinDomFunction{Int}) = is_indexed(f) ? f : FinDomFunction(collect(f), index=true) function limit(d::BipartiteFreeDiagram{Ob,Hom}) where {Ob<:SetOb, Hom<:FinDomFunction{Int}} # As in a pullback, this method assumes that all objects in layer 2 have # incoming morphisms. @assert !any(isempty(incident(d, v, :tgt)) for v in vertices₂(d)) d_original = d # For uniformity, e.g. when pairing below, ensure that all objects in layer 2 # are type sets. if !all(x isa TypeSet for x in ob₂(d)) d = map(d, ob₁=identity, ob₂=ensure_type_set, hom=ensure_type_set_codom) end # It is generally optimal to compute all equalizers (self joins) first, so as # to reduce the sizes of later pullbacks (joins) and products (cross joins). d, ιs = equalize_all(d) rem_vertices₂!(d, [v for v in vertices₂(d) if length(incident(d, v, :tgt)) == 1]) # Perform all pairings before computing any joins. d = pair_all(d) # Having done this preprocessing, if there are any nontrivial joins, perform # one of them and recurse; otherwise, we have at most a product to compute. # # In the binary case (`nv₁(d) == 2`), the preprocessing guarantees that there # is at most one nontrivial join, so there are no choices to make. When there # are multiple possible joins, do the one with smallest base cardinality # (product of sizes of relations to join). This is a simple greedy heuristic. # For more control over the order of the joins, create a UWD schedule. if nv₂(d) == 0 # FIXME: Shouldn't need FinSetIndexedLimit in these special cases. if nv₁(d) == 1 FinSetIndexedLimit(d_original, SMultispan{1}(ιs[1])) else πs = legs(product(SVector(ob₁(d)...))) FinSetIndexedLimit(d_original, Multispan(map(compose, πs, ιs))) end else # Select the join to perform. v = argmin(map(vertices₂(d)) do v edges = incident(d, v, :tgt) @assert length(edges) >= 2 prod(e -> length(dom(hom(d, e))), edges) end) # Compute the pullback (inner join). join_edges = incident(d, v, :tgt) to_join = src(d, join_edges) to_keep = setdiff(vertices₁(d), to_join) pb = pullback(SVector(hom(d, join_edges)...), alg=SmartJoin()) # Create a new bipartite diagram with joined vertices. d_joined = BipartiteFreeDiagram{Ob,Hom}() copy_parts!(d_joined, d, V₁=to_keep, V₂=setdiff(vertices₂(d),v), E=edges(d)) joined = add_vertex₁!(d_joined, ob₁=apex(pb)) for (u, π) in zip(to_join, legs(pb)) for e in setdiff(incident(d, u, :src), join_edges) set_subparts!(d_joined, e, src=joined, hom=π⋅hom(d,e)) end end rem_edges!(d_joined, join_edges) # Recursively compute the limit of the new diagram. lim = limit(d_joined) # Assemble limit cone from cones for pullback and reduced limit. πs = Vector{Hom}(undef, nv₁(d)) for (i, u) in enumerate(to_join) πs[u] = compose(last(legs(lim)), legs(pb)[i], ιs[u]) end for (i, u) in enumerate(to_keep) πs[u] = compose(legs(lim)[i], ιs[u]) end FinSetIndexedLimit(d_original, Multispan(πs)) end end ensure_type_set(s::FinSet) = TypeSet(eltype(s)) ensure_type_set(s::TypeSet) = s ensure_type_set_codom(f::FinFunction) = SetFunctionCallable(f, dom(f), TypeSet(eltype(codom(f)))) ensure_type_set_codom(f::IndexedFinFunctionVector) = IndexedFinDomFunctionVector(f.func, index=f.index) ensure_type_set_codom(f::FinDomFunction) = f """ Compute all possible equalizers in a bipartite free diagram. The result is a new bipartite free diagram that has the same vertices but is *simple*, i.e., has no multiple edges. The list of inclusion morphisms into layer 1 of the original diagram is also returned. """ function equalize_all(d::BipartiteFreeDiagram{Ob,Hom}) where {Ob,Hom} d_simple = BipartiteFreeDiagram{Ob,Hom}() copy_parts!(d_simple, d, V₂=vertices₂(d)) ιs = map(vertices₁(d)) do u # Collect outgoing edges of u, key-ed by target vertex. out_edges = OrderedDict{Int,Vector{Int}}() for e in incident(d, u, :src) push!(get!(out_edges, tgt(d,e)) do; Int[] end, e) end # Equalize all sets of parallel edges out of u. ι = id(ob₁(d, u)) for es in values(out_edges) if length(es) > 1 fs = SVector((ι⋅f for f in hom(d, es))...) ι = incl(equalizer(fs)) ⋅ ι end end add_vertex₁!(d_simple, ob₁=dom(ι)) # == u for (v, es) in pairs(out_edges) add_edge!(d_simple, u, v, hom=ι⋅hom(d, first(es))) end ι end (d_simple, ιs) end """ Perform all possible pairings in a bipartite free diagram. The resulting diagram has the same layer 1 vertices but a possibly reduced set of layer 2 vertices. Layer 2 vertices are merged when they have exactly the same multiset of adjacent vertices. """ function pair_all(d::BipartiteFreeDiagram{Ob,Hom}) where {Ob,Hom} d_paired = BipartiteFreeDiagram{Ob,Hom}() copy_parts!(d_paired, d, V₁=vertices₁(d)) # Construct mapping to V₂ vertices from multisets of adjacent V₁ vertices. outmap = OrderedDict{Vector{Int},Vector{Int}}() for v in vertices₂(d) push!(get!(outmap, sort(inneighbors(d, v))) do; Int[] end, v) end for (srcs, tgts) in pairs(outmap) in_edges = map(tgts) do v sort(incident(d, v, :tgt), by=e->src(d,e)) end if length(tgts) == 1 v = add_vertex₂!(d_paired, ob₂=ob₂(d, only(tgts))) add_edges!(d_paired, srcs, fill(v, length(srcs)), hom=hom(d, only(in_edges))) else prod = product(SVector(ob₂(d, tgts)...)) v = add_vertex₂!(d_paired, ob₂=ob(prod)) for (i,u) in enumerate(srcs) f = pair(prod, hom(d, getindex.(in_edges, i))) add_edge!(d_paired, u, v, hom=f) end end end d_paired end """ Limit of general diagram of FinSets computed by product-then-filter. See `Limits.CompositePullback` for a very similar construction. """ struct FinSetCompositeLimit{Ob<:FinSet, Diagram, Cone<:Multispan{Ob}, Prod<:Product{Ob}, Incl<:FinFunction} <: AbstractLimit{Ob,Diagram} diagram::Diagram cone::Cone prod::Prod incl::Incl # Inclusion for the "multi-equalizer" in general formula. end limit(d::FreeDiagram{<:FinSet{Int}}) = limit(FinDomFunctor(d)) function limit(F::Functor{<:FinCat{Int},<:TypeCat{<:FinSet{Int}}}) # Uses the general formula for limits in Set (Leinster, 2014, Basic Category # Theory, Example 5.1.22 / Equation 5.16). This method is simple and direct, # but extremely inefficient! J = dom(F) prod = product(map(x -> ob_map(F, x), ob_generators(J))) n, πs = length(ob(prod)), legs(prod) ι = FinFunction(filter(1:n) do i all(hom_generators(J)) do f s, t, h = dom(J, f), codom(J, f), hom_map(F, f) h(πs[s](i)) == πs[t](i) end end, n) cone = Multispan(dom(ι), map(x -> ι⋅πs[x], ob_generators(J))) FinSetCompositeLimit(F, cone, prod, ι) end function universal(lim::FinSetCompositeLimit, cone::Multispan{<:FinSet{Int}}) ι = collect(lim.incl) h = universal(lim.prod, cone) FinFunction(Int[only(searchsorted(ι, h(i))) for i in dom(h)], apex(cone), ob(lim)) end """ Limit of finite sets viewed as a table. Any limit of finite sets can be canonically viewed as a table ([`TabularSet`](@ref)) whose columns are the legs of the limit cone and whose rows correspond to elements of the limit object. To construct this table from an already computed limit, call `TabularLimit(::AbstractLimit; ...)`. The column names of the table are given by the optional argument `names`. In this tabular form, applying the universal property of the limit is trivial since it is just tupling. Thus, this representation can be useful when the original limit algorithm does not support efficient application of the universal property. On the other hand, this representation has the disadvantage of generally making the element type of the limit set more complicated. """ const TabularLimit = Limit{<:TabularSet} function TabularLimit(lim::AbstractLimit; names=nothing) πs = legs(lim) names = isnothing(names) ? (1:length(πs)) : names names = Tuple(column_name(name) for name in names) table = TabularSet(NamedTuple{names}(Tuple(map(collect, πs)))) cone = Multispan(table, map(πs, eachindex(πs)) do π, i FinFunction(row -> Tables.getcolumn(row, i), table, codom(π)) end) Limit(lim.diagram, cone) end function universal(lim::Limit{<:TabularSet{Table,Row}}, cone::Multispan) where {Table,Row} fs = Tuple(legs(cone)) FinFunction(x -> Row(map(f -> f(x), fs)), apex(cone), ob(lim)) end column_name(name) = Symbol(name) column_name(i::Integer) = Symbol("x$i") # Same default as DataFrames.jl. # Colimits ########## # Colimits in Skel(FinSet) #------------------------- colimit(Xs::EmptyDiagram{<:FinSet{Int}}) = Colimit(Xs, SMulticospan{0}(FinSet(0))) function universal(colim::Initial{<:FinSet{Int}}, cocone::SMulticospan{0}) cod = apex(cocone) FinDomFunction(SVector{0,eltype(cod)}(), cod) end colimit(Xs::SingletonDiagram{<:FinSet{Int}}) = colimit(Xs, SpecializeColimit()) function colimit(Xs::ObjectPair{<:FinSet{Int}}) m, n = length.(Xs) ι1 = FinFunction(1:m, m, m+n) ι2 = FinFunction(m+1:m+n, n, m+n) Colimit(Xs, Cospan(ι1, ι2)) end function universal(colim::BinaryCoproduct{<:FinSet{Int}}, cocone::Cospan) f, g = cocone FinDomFunction(vcat(collect(f), collect(g)), ob(colim), apex(cocone)) end function colimit(Xs::DiscreteDiagram{<:FinSet{Int}}) ns = length.(Xs) n = sum(ns) offsets = [0,cumsum(ns)...] ιs = [FinFunction((1:ns[j]) .+ offsets[j],ns[j],n) for j in 1:length(ns)] Colimit(Xs, Multicospan(FinSet(n), ιs)) end function universal(colim::Coproduct{<:FinSet{Int}}, cocone::Multicospan) cod = apex(cocone) FinDomFunction(mapreduce(collect, vcat, cocone, init=eltype(cod)[]), ob(colim), cod) end function colimit(pair::ParallelPair{<:FinSet{Int}}) f, g = pair m, n = length(dom(pair)), length(codom(pair)) sets = IntDisjointSets(n) for i in 1:m union!(sets, f(i), g(i)) end Colimit(pair, SMulticospan{1}(quotient_projection(sets))) end function colimit(para::ParallelMorphisms{<:FinSet{Int}}) @assert !isempty(para) f1, frest = para[1], para[2:end] m, n = length(dom(para)), length(codom(para)) sets = IntDisjointSets(n) for i in 1:m for f in frest union!(sets, f1(i), f(i)) end end Colimit(para, SMulticospan{1}(quotient_projection(sets))) end function universal(coeq::Coequalizer{<:FinSet{Int}}, cocone::SMulticospan{1}) pass_to_quotient(proj(coeq), only(cocone)) end """ Create projection map π: X → X/∼ from partition of X. """ function quotient_projection(sets::IntDisjointSets) h = [ find_root!(sets, i) for i in 1:length(sets) ] roots = unique!(sort(h)) FinFunction([ searchsortedfirst(roots, r) for r in h ], length(roots)) end """ Given h: X → Y, pass to quotient q: X/~ → Y under projection π: X → X/~. """ function pass_to_quotient(π::FinFunction{Int,Int}, h::FinFunction{Int,Int}) @assert dom(π) == dom(h) q = zeros(Int, length(codom(π))) for i in dom(h) j = π(i) if q[j] == 0 q[j] = h(i) else q[j] == h(i) || error("Quotient map of colimit is ill-defined") end end any(==(0), q) && error("Projection map is not surjective") FinFunction(q, codom(h)) end function pass_to_quotient(π::FinFunction{Int,Int}, h::FinDomFunction{Int}) @assert dom(π) == dom(h) q = Vector{Union{Some{eltype(codom(h))},Nothing}}(nothing, length(codom(π))) for i in dom(h) j = π(i) if isnothing(q[j]) q[j] = Some(h(i)) else something(q[j]) == h(i) || error("Quotient map of colimit is ill-defined") end end any(isnothing, q) && error("Projection map is not surjective") FinDomFunction(map(something, q), codom(h)) end function colimit(span::Multispan{<:FinSet{Int}}) colimit(span, ComposeCoproductCoequalizer()) end """ Colimit of general diagram of FinSets computed by coproduct-then-quotient. See `Limits.CompositePushout` for a very similar construction. """ struct FinSetCompositeColimit{Ob<:FinSet, Diagram, Cocone<:Multicospan{Ob}, Coprod<:Coproduct{Ob}, Proj<:FinFunction} <: AbstractColimit{Ob,Diagram} diagram::Diagram cocone::Cocone coprod::Coprod proj::Proj # Projection for the "multi-coequalizer" in general formula. end function colimit(d::BipartiteFreeDiagram{<:FinSet{Int}}) # As in a pushout, this method assume that all objects in layer 1 have # outgoing morphisms so that they can be excluded from the coproduct. @assert !any(isempty(incident(d, u, :src)) for u in vertices₁(d)) coprod = coproduct(ob₂(d)) n, ιs = length(ob(coprod)), legs(coprod) sets = IntDisjointSets(n) for u in vertices₁(d) out_edges = incident(d, u, :src) for (e1, e2) in zip(out_edges[1:end-1], out_edges[2:end]) h1, h2 = hom(d, e1), hom(d, e2) ι1, ι2 = ιs[tgt(d, e1)], ιs[tgt(d, e2)] for i in ob₁(d, u) union!(sets, ι1(h1(i)), ι2(h2(i))) end end end π = quotient_projection(sets) cocone = Multicospan(codom(π), [ ιs[i]⋅π for i in vertices₂(d) ]) FinSetCompositeColimit(d, cocone, coprod, π) end colimit(d::FreeDiagram{<:FinSet{Int}}) = colimit(FinDomFunctor(d)) function colimit(F::Functor{<:FinCat{Int},<:TypeCat{<:FinSet{Int}}}) # Uses the general formula for colimits in Set (Leinster, 2014, Basic Category # Theory, Example 5.2.16). J = dom(F) coprod = coproduct(map(x -> ob_map(F, x), ob_generators(J))) n, ιs = length(ob(coprod)), legs(coprod) sets = IntDisjointSets(n) for f in hom_generators(J) s, t, h = dom(J, f), codom(J, f), hom_map(F, f) for i in dom(h) union!(sets, ιs[s](i), ιs[t](h(i))) end end π = quotient_projection(sets) cocone = Multicospan(codom(π), map(x -> ιs[x]⋅π, ob_generators(J))) FinSetCompositeColimit(F, cocone, coprod, π) end function universal(colim::FinSetCompositeColimit, cocone::Multicospan) h = universal(colim.coprod, cocone) pass_to_quotient(colim.proj, h) end # Colimits with names #-------------------- """ Compute colimit of finite sets whose elements are meaningfully named. This situation seems to be mathematically uninteresting but is practically important. The colimit is computed by reduction to the skeleton of **FinSet** (`FinSet{Int}`) and the names are assigned afterwards, following some reasonable conventions and add tags where necessary to avoid name clashes. """ struct NamedColimit <: ColimitAlgorithm end function colimit(::Type{<:Tuple{<:FinSet{<:Any,T},<:FinFunction}}, d) where {T <: Union{Symbol,AbstractString}} colimit(d, NamedColimit()) end function colimit(d::FixedShapeFreeDiagram{<:FinSet{<:Any,T},Hom}, alg::NamedColimit) where {T,Hom} # Reducing to the case of bipartite free diagrams is a bit lazy, but at least # using `SpecializeColimit` below should avoid some gross inefficiencies. colimit(BipartiteFreeDiagram{FinSet{<:Any,T},Hom}(d), alg) end function colimit(d::BipartiteFreeDiagram{<:FinSet{<:Any,T}}, ::NamedColimit) where T # Compute colimit of diagram in the skeleton of FinSet (`FinSet{Int}`). # Note: no performance would be gained by using `DisjointSets{T}` from # DataStructures.jl because it is just a wrapper around `IntDisjointSets` that # internally builds the very same indices that we use below. sets₁_skel = map(set -> skeletize(set, index=false), ob₁(d)) sets₂_skel = map(set -> skeletize(set, index=true), ob₂(d)) funcs = map(edges(d)) do e skeletize(hom(d,e), sets₁_skel[src(d,e)], sets₂_skel[tgt(d,e)]) end d_skel = BipartiteFreeDiagram{FinSetInt,eltype(funcs)}() add_vertices₁!(d_skel, nv₁(d), ob₁=dom.(sets₁_skel)) add_vertices₂!(d_skel, nv₂(d), ob₂=dom.(sets₂_skel)) add_edges!(d_skel, src(d), tgt(d), hom=funcs) colim_skel = colimit(d_skel, SpecializeColimit()) # Assign elements/names to the colimit set. elems = Vector{T}(undef, length(apex(colim_skel))) for (ι, Y) in zip(colim_skel, sets₂_skel) for i in dom(Y) elems[ι(i)] = Y(i) end end # The vector should already be filled, but to reduce arbitrariness we prefer # names from the layer 1 sets whenever possible. For example, when computing a # pushout, we prefer names from the apex of cospan to names from the feet. for (u, X) in zip(vertices₁(d_skel), sets₁_skel) e = first(incident(d_skel, u, :src)) f, ι = hom(d_skel, e), legs(colim_skel)[tgt(d_skel, e)] for i in dom(X) elems[ι(f(i))] = X(i) end end # Eliminate clashes in provisional list of names. unique_by_tagging!(elems) ιs = map(colim_skel, sets₂_skel) do ι, Y FinFunction(Dict(Y(i) => elems[ι(i)] for i in dom(Y)), FinSet(elems)) end Colimit(d, Multicospan(FinSet(elems), ιs)) end function skeletize(set::FinSet; index::Bool=false) # FIXME: We should support `unique_index` and it should be used here. FinDomFunction(collect(set), set, index=index) end function skeletize(f::FinFunction, X, Y) FinFunction(i -> only(preimage(Y, f(X(i)))), dom(X), dom(Y)) end """ Make list of elements unique by adding tags if necessary. If the elements are already unique, they will not be mutated. """ function unique_by_tagging!(elems::AbstractVector{T}; tag=default_tag) where T tag_count = Dict{T,Int}() for x in elems tag_count[x] = haskey(tag_count, x) ? 1 : 0 end for (i, x) in enumerate(elems) (j = tag_count[x]) > 0 || continue tagged = tag(x, j) @assert !haskey(tag_count, tagged) # Don't conflict with original elems! elems[i] = tagged tag_count[x] += 1 end elems end default_tag(x::Symbol, t) = Symbol(x, "#", t) default_tag(x::AbstractString, t) = string(x, "#", t) # Pushout complements #-------------------- """ Compute a pushout complement of finite sets, if possible. Given functions ``l: I → L`` and ``m: L → G`` to form a pushout square l L ← I m ↓ ↓k G ← K g define the set ``K := G / m(L / l(I))`` and take ``g: K ↪ G`` to be the inclusion. Then the map ``k: I → K`` is determined by the map ``l⋅m: I → G`` from the requirement that the square commutes. Pushout complements exist only if the identification condition is satisfied. An error will be raised if the pushout complement cannot be constructed. To check this in advance, use [`can_pushout_complement`](@ref). """ function pushout_complement(pair::ComposablePair{<:FinSet{Int}}) l, m = pair I, L, G = dom(l), codom(l), codom(m) # Construct inclusion g: K ↪ G. l_image = Set(collect(l)) m_image = Set([ m(x) for x in L if x ∉ l_image ]) g = FinFunction([x for x in G if x ∉ m_image], G) K = dom(g) # Construct morphism k: I → K using partial inverse of g. g_inv = Dict{Int,Int}(zip(collect(g), K)) k = FinFunction(map(I) do x y = m(l(x)) get(g_inv, y) do; error("Identification failed for domain element $x") end end, I, K) return ComposablePair(k, g) end can_pushout_complement(pair::ComposablePair{<:FinSet{Int}}) = all(isempty, id_condition(pair)) """ Check identification condition for pushout complement of finite sets. The identification condition says that the functions do not map (1) both a deleted item and a preserved item in L to the same item in G or (2) two distinct deleted items to the same item. It is trivially satisfied for injective functions. Returns pair of iterators of (1) a nondeleted item that maps to a deleted item in G (2) a pair of distinct items in L that are deleted yet mapped to the same item in G. """ function id_condition(pair::ComposablePair{<:FinSet{Int}}) l, m = pair l_image = Set(collect(l)) l_imageᶜ = [ x for x in codom(l) if x ∉ l_image ] m_image = Set(map(m, l_imageᶜ)) ((i for i in l_image if m(i) ∈ m_image), ((i, j) for i in eachindex(l_imageᶜ) for j in i+1:length(l_imageᶜ) if m(l_imageᶜ[i]) == m(l_imageᶜ[j]))) end # Subsets ######### """ Subset of a finite set. """ const SubFinSet{S,T} = Subobject{<:FinSet{S,T}} Subobject(X::FinSet, f) = Subobject(FinFunction(f, X)) SubFinSet(X, f) = Subobject(FinFunction(f, X)) force(A::SubFinSet{Int}) = Subobject(force(hom(A))) Base.collect(A::SubFinSet) = collect(hom(A)) Base.sort(A::SubFinSet) = SubFinSet(ob(A), sort(collect(A))) const AbstractBoolVector = Union{AbstractVector{Bool},BitVector} """ Subset of a finite set represented as a boolean vector. This is the subobject classifier representation since `Bool` is the subobject classifier for `Set`. """ @auto_hash_equals struct SubFinSetVector{S<:FinSet} <: Subobject{S} set::S predicate::AbstractBoolVector function SubFinSetVector(X::S, pred::AbstractBoolVector) where S<:FinSet length(pred) == length(X) || error("Size of predicate $pred does not equal size of object $X") new{S}(X, pred) end end Subobject(X::FinSet, pred::AbstractBoolVector) = SubFinSetVector(X, pred) SubFinSet(pred::AbstractBoolVector) = Subobject(FinSet(length(pred)), pred) ob(A::SubFinSetVector) = A.set hom(A::SubFinSetVector) = FinFunction(findall(A.predicate), A.set) predicate(A::SubFinSetVector) = A.predicate function predicate(A::SubFinSet) f = hom(A) pred = falses(length(codom(f))) for x in dom(f) pred[f(x)] = true end pred end @instance SubobjectLattice{FinSet,SubFinSet} begin @import ob meet(A::SubFinSet, B::SubFinSet) = meet(A, B, SubOpBoolean()) join(A::SubFinSet, B::SubFinSet) = join(A, B, SubOpBoolean()) top(X::FinSet) = top(X, SubOpWithLimits()) bottom(X::FinSet) = bottom(X, SubOpWithLimits()) end """ Algorithm to compute subobject operations using elementwise boolean logic. """ struct SubOpBoolean <: SubOpAlgorithm end meet(A::SubFinSet{Int}, B::SubFinSet{Int}, ::SubOpBoolean) = SubFinSet(predicate(A) .& predicate(B)) join(A::SubFinSet{Int}, B::SubFinSet{Int}, ::SubOpBoolean) = SubFinSet(predicate(A) .| predicate(B)) top(X::FinSet{Int}, ::SubOpBoolean) = SubFinSet(trues(length(X))) bottom(X::FinSet{Int}, ::SubOpBoolean) = SubFinSet(falses(length(X))) end
[ 37811, 383, 6536, 286, 27454, 5621, 290, 5499, 11, 290, 663, 18328, 13, 198, 37811, 198, 21412, 4463, 50, 1039, 198, 39344, 4463, 7248, 11, 4463, 22203, 11, 4463, 24510, 22203, 11, 16904, 934, 7248, 11, 16904, 934, 39184, 11, 198, 220, 2700, 11, 318, 62, 9630, 276, 11, 662, 9060, 11, 198, 220, 15251, 2348, 42289, 11, 10880, 18234, 11, 399, 7287, 39516, 18234, 11, 33947, 13102, 469, 18234, 11, 21059, 18234, 11, 198, 220, 3834, 18467, 7248, 11, 3834, 18257, 46120, 13087, 198, 198, 3500, 11160, 26257, 23588, 874, 198, 3500, 6060, 44909, 942, 25, 14230, 1068, 35, 713, 11, 2558, 7279, 73, 1563, 50, 1039, 11, 6441, 28265, 1064, 62, 15763, 0, 198, 3500, 797, 39344, 198, 11748, 36125, 3163, 20477, 198, 3500, 36125, 3163, 20477, 25, 36125, 38469, 11, 20546, 9250, 11, 311, 1143, 38469, 11, 2092, 62, 4906, 198, 11748, 33220, 11, 20090, 51, 2977, 198, 198, 31, 631, 87, 634, 1262, 11485, 50, 1039, 198, 3500, 2644, 38, 1404, 11, 2644, 464, 1749, 11, 2644, 34, 7248, 6601, 44909, 942, 11, 2644, 37065, 82, 198, 3500, 11485, 18467, 34, 1381, 11, 11485, 11146, 18683, 6713, 82, 11, 11485, 19352, 896, 11, 11485, 7004, 48205, 198, 11748, 2644, 464, 1749, 25, 1835, 11, 1826, 11, 18872, 100, 11, 4654, 11, 18872, 101, 11, 1353, 11, 2343, 232, 97, 11, 4220, 11, 2343, 232, 98, 198, 11748, 11485, 34, 26129, 25, 909, 11, 3488, 11, 2401, 11, 14873, 296, 11, 36664, 11, 4686, 11, 909, 62, 8899, 11, 3488, 62, 8899, 198, 11748, 11485, 18467, 34, 1381, 25, 2700, 11, 909, 62, 8612, 2024, 11, 3488, 62, 8612, 2024, 11, 4823, 11, 318, 62, 15410, 8374, 198, 3500, 11485, 18467, 34, 1381, 25, 8633, 4906, 198, 11748, 11485, 19352, 896, 25, 4179, 11, 951, 320, 270, 11, 10112, 11, 4574, 448, 62, 785, 26908, 11, 198, 220, 460, 62, 14689, 448, 62, 785, 26908, 198, 11748, 11485, 7004, 48205, 25, 3834, 15252, 11, 3834, 15252, 43, 1078, 501, 198, 3500, 11485, 50, 1039, 25, 27207, 22203, 11, 5345, 22203, 14134, 540, 198, 198, 2, 4463, 578, 5621, 198, 7804, 4242, 2, 198, 198, 37811, 4463, 578, 900, 13, 198, 198, 32, 27454, 900, 468, 12531, 2099, 4600, 18467, 7248, 90, 50, 11, 51, 92, 44646, 383, 1218, 2099, 11507, 4600, 51, 63, 318, 198, 1169, 5002, 2099, 286, 262, 900, 290, 262, 717, 11507, 4600, 50, 63, 318, 262, 4947, 2099, 11, 198, 4758, 460, 307, 257, 850, 4906, 286, 4600, 23839, 7248, 63, 393, 1194, 22300, 4947, 2099, 13, 554, 198, 2860, 653, 11, 262, 18328, 286, 262, 6536, 12429, 18467, 7248, 1174, 318, 262, 1593, 2041, 1339, 198, 63, 50, 796, 2558, 44646, 383, 900, 7559, 90, 16, 11, 1399, 11, 77, 92, 15506, 318, 7997, 416, 262, 2134, 4600, 18467, 7248, 7, 77, 8, 63, 286, 2099, 198, 63, 18467, 7248, 90, 5317, 11, 5317, 92, 44646, 198, 37811, 198, 397, 8709, 2099, 4463, 7248, 90, 50, 11, 51, 92, 1279, 25, 5345, 5944, 90, 51, 92, 886, 198, 198, 18467, 7248, 7, 2617, 3712, 18467, 7248, 8, 796, 900, 198, 198, 37811, 4463, 578, 900, 286, 262, 1296, 7559, 90, 16, 11, 1399, 11, 77, 92, 15506, 329, 617, 1271, 7559, 77, 26870, 657, 15506, 13, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 4463, 7248, 5317, 1279, 25, 4463, 7248, 90, 5317, 11, 5317, 92, 198, 220, 299, 3712, 5317, 198, 437, 198, 198, 18467, 7248, 90, 5317, 11, 5317, 92, 7, 77, 3712, 5317, 8, 796, 4463, 7248, 5317, 7, 77, 8, 198, 18467, 7248, 7, 77, 3712, 5317, 8, 796, 4463, 7248, 5317, 7, 77, 8, 198, 198, 14881, 13, 2676, 378, 7, 2617, 3712, 18467, 7248, 5317, 11, 26498, 23029, 796, 11629, 378, 7, 16, 25, 2617, 13, 77, 11, 26498, 23029, 198, 14881, 13, 13664, 7, 2617, 3712, 18467, 7248, 5317, 8, 796, 900, 13, 77, 198, 14881, 13, 259, 7, 2617, 3712, 18467, 7248, 5317, 11, 9766, 76, 8, 796, 287, 7, 68, 10671, 11, 352, 25, 2617, 13, 77, 8, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 900, 3712, 18467, 7248, 5317, 8, 796, 3601, 7, 952, 11, 366, 18467, 7248, 16763, 7, 2617, 13, 77, 4008, 4943, 198, 198, 37811, 4463, 578, 900, 1813, 416, 22300, 4947, 13, 198, 198, 464, 10238, 4947, 815, 307, 257, 22300, 11629, 540, 286, 21892, 4129, 13, 632, 743, 198, 1350, 11, 475, 318, 407, 2672, 284, 307, 11, 900, 12, 2339, 357, 64, 850, 4906, 286, 4600, 23839, 7248, 63, 737, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 4463, 7248, 36307, 90, 50, 11, 51, 92, 1279, 25, 4463, 7248, 90, 50, 11, 51, 92, 198, 220, 4947, 3712, 50, 198, 437, 198, 18467, 7248, 36307, 7, 43681, 3712, 50, 8, 810, 311, 796, 198, 220, 4463, 7248, 36307, 90, 50, 11, 417, 4906, 7, 43681, 38165, 7, 43681, 8, 198, 198, 18467, 7248, 7, 43681, 3712, 50, 8, 810, 1391, 51, 11, 311, 27, 25, 38176, 90, 23839, 38469, 90, 51, 5512, 23839, 7248, 90, 51, 42535, 796, 198, 220, 4463, 7248, 36307, 90, 50, 11, 51, 92, 7, 43681, 8, 198, 198, 14881, 13, 2676, 378, 7, 2617, 3712, 18467, 7248, 36307, 11, 26498, 23029, 796, 11629, 378, 7, 2617, 13, 43681, 11, 26498, 23029, 198, 14881, 13, 13664, 7, 2617, 3712, 18467, 7248, 36307, 8, 796, 4129, 7, 2617, 13, 43681, 8, 198, 14881, 13, 259, 7, 2617, 3712, 18467, 7248, 36307, 11, 9766, 76, 8, 796, 287, 7, 68, 10671, 11, 900, 13, 43681, 8, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 900, 3712, 18467, 7248, 36307, 8, 198, 220, 3601, 7, 952, 11, 366, 18467, 7248, 7, 4943, 198, 220, 905, 7, 952, 11, 900, 13, 43681, 8, 198, 220, 3601, 7, 952, 11, 366, 8, 4943, 198, 437, 198, 198, 37811, 4463, 578, 900, 3025, 4847, 389, 15274, 286, 257, 3084, 13, 198, 198, 464, 10238, 3084, 815, 307, 31332, 351, 33220, 13, 20362, 13, 1114, 262, 11060, 286, 198, 403, 6933, 414, 11, 262, 15274, 389, 2810, 355, 3706, 12777, 2374, 11, 543, 18533, 326, 262, 3084, 198, 271, 407, 366, 41073, 3094, 1911, 770, 815, 407, 307, 257, 1688, 17385, 287, 3357, 475, 198, 3826, 262, 33220, 13, 20362, 10314, 329, 2252, 5114, 13, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 16904, 934, 7248, 90, 10962, 11, 25166, 92, 1279, 25, 4463, 7248, 90, 10962, 11, 25166, 92, 198, 220, 3084, 3712, 10962, 628, 220, 2163, 16904, 934, 7248, 7, 11487, 3712, 10962, 8, 810, 8655, 198, 220, 220, 220, 32815, 796, 33220, 13, 15952, 2611, 7, 11487, 8, 198, 220, 220, 220, 649, 90, 10962, 11, 45, 2434, 51, 29291, 90, 15952, 2611, 13, 14933, 11, 51, 29291, 90, 15952, 2611, 13, 19199, 986, 42535, 7, 11487, 8, 198, 220, 886, 198, 437, 198, 198, 18467, 7248, 7, 429, 3712, 45, 2434, 51, 29291, 8, 796, 16904, 934, 7248, 7, 429, 8, 198, 198, 14881, 13, 2676, 378, 7, 2617, 3712, 33349, 934, 7248, 11, 26498, 23029, 796, 198, 220, 11629, 378, 7, 51, 2977, 13, 13190, 83, 29291, 48727, 7, 2617, 13, 11487, 828, 26498, 23029, 198, 14881, 13, 13664, 7, 2617, 3712, 33349, 934, 7248, 8, 796, 33220, 13, 808, 9127, 7, 2617, 13, 11487, 8, 198, 14881, 13, 33327, 7, 2617, 3712, 33349, 934, 7248, 8, 796, 33220, 13, 808, 11487, 7, 2617, 13, 11487, 8, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 900, 3712, 33349, 934, 7248, 8, 198, 220, 3601, 7, 952, 11, 366, 33349, 934, 7248, 7, 4943, 198, 220, 905, 7, 952, 11, 900, 13, 11487, 8, 198, 220, 3601, 7, 952, 11, 366, 8, 4943, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 7904, 44, 12789, 1, 5239, 14, 25638, 1600, 900, 3712, 33349, 934, 7248, 90, 51, 30072, 810, 309, 198, 220, 3601, 7, 952, 11, 17971, 7, 13664, 7, 2617, 4008, 12, 30854, 16904, 934, 7248, 90, 3, 51, 92, 4943, 198, 220, 611, 5145, 1136, 7, 952, 11, 1058, 5589, 529, 11, 3991, 8, 198, 220, 220, 220, 44872, 7, 952, 11, 366, 25, 4943, 198, 220, 220, 220, 20090, 51, 2977, 13, 37784, 62, 11487, 7, 952, 11, 900, 13, 11487, 11, 43630, 549, 25677, 28, 7942, 8, 198, 220, 886, 198, 437, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 7904, 44, 12789, 1, 5239, 14, 6494, 1600, 900, 3712, 33349, 934, 7248, 8, 198, 220, 44872, 7, 952, 11, 33490, 7146, 1398, 17553, 8658, 934, 12, 2617, 38214, 4943, 198, 220, 44872, 7, 952, 11, 17971, 7, 13664, 7, 2617, 4008, 12, 30854, 16904, 934, 7248, 4943, 198, 220, 20090, 51, 2977, 13, 37784, 62, 11487, 7, 952, 11, 900, 13, 11487, 11, 30203, 28, 7762, 7, 25, 6494, 828, 27669, 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, 220, 220, 220, 220, 220, 220, 43630, 549, 25677, 28, 7942, 8, 198, 220, 44872, 7, 952, 11, 366, 3556, 7146, 29, 4943, 198, 437, 198, 198, 2, 8444, 8374, 9376, 198, 2, 19351, 198, 198, 37811, 8444, 8374, 6536, 319, 257, 27454, 900, 13, 198, 198, 464, 691, 17488, 6583, 287, 257, 28810, 6536, 389, 262, 18413, 11, 543, 389, 994, 198, 19107, 351, 262, 5563, 13, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 8444, 8374, 21979, 90, 5944, 11, 50, 27, 25, 18467, 7248, 90, 27, 25, 7149, 11, 5944, 11709, 1279, 25, 4463, 21979, 90, 5944, 11, 5944, 92, 198, 220, 900, 3712, 50, 198, 437, 198, 15642, 8374, 21979, 7, 77, 3712, 46541, 8, 796, 8444, 8374, 21979, 7, 18467, 7248, 7, 77, 4008, 198, 198, 18467, 21979, 7, 82, 3712, 38176, 90, 18467, 7248, 11, 46541, 30072, 796, 8444, 8374, 21979, 7, 82, 8, 198, 198, 672, 62, 8612, 2024, 7, 34, 3712, 15642, 8374, 21979, 8, 796, 327, 13, 2617, 198, 26452, 62, 8612, 2024, 7, 3712, 15642, 8374, 21979, 8, 796, 7499, 198, 271, 62, 15410, 8374, 7, 3712, 15642, 8374, 21979, 8, 796, 2081, 198, 34960, 7, 34, 3712, 15642, 8374, 21979, 90, 5317, 11, 18467, 7248, 5317, 30072, 796, 29681, 7, 13664, 7, 34, 13, 2617, 4008, 198, 198, 3438, 7, 34, 3712, 15642, 8374, 21979, 90, 51, 5512, 277, 8, 810, 309, 796, 277, 3712, 51, 198, 19815, 296, 7, 34, 3712, 15642, 8374, 21979, 90, 51, 5512, 277, 8, 810, 309, 796, 277, 3712, 51, 198, 312, 7, 34, 3712, 15642, 8374, 21979, 90, 51, 5512, 2124, 8, 810, 309, 796, 2124, 3712, 51, 198, 785, 3455, 7, 34, 3712, 15642, 8374, 21979, 90, 51, 5512, 277, 11, 308, 8, 810, 309, 796, 357, 69, 3712, 51, 6624, 308, 3712, 51, 8, 5633, 277, 1058, 198, 220, 4049, 7203, 45, 756, 15104, 498, 24185, 287, 28810, 6536, 25, 720, 69, 14512, 720, 70, 4943, 198, 198, 26452, 62, 8899, 7, 37, 3712, 18467, 24510, 24629, 2715, 90, 27, 25, 15642, 8374, 21979, 5512, 2124, 8, 796, 4686, 7, 19815, 296, 7, 37, 828, 909, 62, 8899, 7, 37, 11, 2124, 4008, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 327, 3712, 15642, 8374, 21979, 90, 5317, 11, 18467, 7248, 5317, 30072, 796, 198, 220, 3601, 7, 952, 11, 366, 18467, 21979, 16763, 7, 13664, 7, 34, 13, 2617, 22305, 4943, 198, 198, 2, 4463, 578, 5499, 198, 14468, 2235, 198, 198, 37811, 15553, 1022, 27454, 5621, 13, 198, 198, 464, 2163, 460, 307, 5447, 31821, 416, 281, 14977, 22300, 2163, 11, 287, 543, 198, 7442, 340, 318, 16726, 37296, 813, 11, 393, 1193, 713, 306, 416, 257, 15879, 286, 37014, 13, 554, 262, 15879, 198, 15603, 341, 11, 262, 2163, 357, 16, 29705, 99, 16, 11, 362, 29705, 99, 18, 11, 513, 29705, 99, 17, 11, 604, 29705, 99, 18, 828, 329, 1672, 11, 318, 7997, 198, 1525, 262, 15879, 685, 16, 11, 18, 11, 17, 11, 18, 4083, 198, 198, 1212, 2099, 318, 33544, 38284, 416, 685, 63, 18467, 24510, 22203, 63, 16151, 31, 5420, 737, 198, 37811, 198, 9979, 4463, 22203, 90, 50, 11, 311, 17478, 11, 9666, 1279, 25, 4463, 7248, 90, 50, 5512, 18720, 296, 1279, 25, 4463, 7248, 90, 50, 17478, 11709, 796, 198, 220, 5345, 22203, 90, 24510, 11, 43806, 296, 92, 198, 198, 18467, 22203, 7, 69, 3712, 22203, 11, 2401, 11, 14873, 296, 8, 796, 198, 220, 5345, 22203, 14134, 540, 7, 69, 11, 4463, 7248, 7, 3438, 828, 4463, 7248, 7, 19815, 296, 4008, 198, 18467, 22203, 7, 3712, 4906, 1659, 7, 738, 414, 828, 26498, 23029, 796, 198, 220, 27207, 22203, 19510, 18467, 7248, 7, 853, 8, 329, 1822, 287, 26498, 8, 23029, 198, 18467, 22203, 7, 69, 3712, 23839, 35, 713, 11, 26498, 23029, 796, 198, 220, 4463, 22203, 35, 713, 7, 69, 11, 357, 18467, 7248, 7, 853, 8, 329, 1822, 287, 26498, 8, 23029, 198, 198, 8818, 4463, 22203, 7, 69, 3712, 23839, 38469, 90, 5317, 5512, 26498, 986, 26, 6376, 28, 9562, 8, 198, 220, 611, 6376, 6624, 3991, 198, 220, 220, 220, 4463, 24510, 22203, 38469, 7, 69, 11, 357, 18467, 7248, 7, 853, 8, 329, 1822, 287, 26498, 8, 23029, 198, 220, 2073, 198, 220, 220, 220, 6376, 796, 6376, 6624, 2081, 5633, 2147, 1058, 6376, 198, 220, 220, 220, 12901, 276, 18467, 22203, 38469, 7, 69, 11, 26498, 986, 26, 6376, 28, 9630, 8, 198, 220, 886, 198, 437, 198, 18467, 22203, 7, 69, 3712, 23839, 38469, 90, 5317, 19629, 479, 86, 23029, 796, 198, 220, 4463, 22203, 7, 69, 11, 4463, 7248, 7, 271, 28920, 7, 69, 8, 5633, 657, 1058, 5415, 7, 69, 18125, 479, 86, 23029, 198, 198, 50, 1039, 13, 12860, 62, 4906, 62, 41571, 273, 7, 952, 3712, 9399, 11, 7904, 6030, 90, 27, 25, 18467, 22203, 30072, 796, 198, 220, 3601, 7, 952, 11, 366, 18467, 22203, 4943, 198, 198, 37811, 15553, 503, 286, 257, 27454, 900, 13, 198, 198, 1212, 1398, 286, 5499, 318, 11282, 780, 340, 318, 3446, 262, 1398, 326, 460, 198, 1350, 7997, 11777, 416, 257, 15879, 286, 3815, 422, 262, 14873, 296, 391, 13, 198, 37811, 198, 9979, 4463, 24510, 22203, 90, 50, 11, 9666, 27, 25, 18467, 7248, 90, 50, 5512, 18720, 296, 27, 25, 7248, 5944, 92, 796, 5345, 22203, 90, 24510, 11, 43806, 296, 92, 198, 198, 18467, 24510, 22203, 7, 69, 3712, 22203, 11, 2401, 11, 14873, 296, 8, 796, 198, 220, 5345, 22203, 14134, 540, 7, 69, 11, 4463, 7248, 7, 3438, 828, 14873, 296, 8, 198, 18467, 24510, 22203, 7, 3712, 4906, 1659, 7, 738, 414, 828, 26498, 23029, 796, 198, 220, 27207, 22203, 19510, 18467, 7248, 7, 853, 8, 329, 1822, 287, 26498, 8, 23029, 198, 18467, 24510, 22203, 7, 69, 3712, 23839, 35, 713, 11, 26498, 23029, 796, 4463, 24510, 22203, 35, 713, 7, 69, 11, 26498, 23029, 198, 198, 8818, 4463, 24510, 22203, 7, 69, 3712, 23839, 38469, 11, 26498, 986, 26, 6376, 28, 9562, 8, 198, 220, 611, 6376, 6624, 3991, 198, 220, 220, 220, 4463, 24510, 22203, 38469, 7, 69, 11, 26498, 23029, 198, 220, 2073, 198, 220, 220, 220, 6376, 796, 6376, 6624, 2081, 5633, 2147, 1058, 6376, 198, 220, 220, 220, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 11, 26498, 986, 26, 6376, 28, 9630, 8, 198, 220, 886, 198, 437, 198, 198, 50, 1039, 13, 12860, 62, 4906, 62, 41571, 273, 7, 952, 3712, 9399, 11, 7904, 6030, 90, 27, 25, 18467, 24510, 22203, 30072, 796, 198, 220, 3601, 7, 952, 11, 366, 18467, 24510, 22203, 4943, 198, 198, 2, 5740, 25, 13690, 35610, 937, 47502, 4645, 318, 9177, 1152, 1146, 329, 5345, 475, 198, 2, 8954, 433, 35610, 691, 329, 4463, 7248, 13, 198, 31, 66, 420, 433, 35610, 62, 2144, 47502, 62, 39098, 4463, 7248, 4463, 22203, 198, 198, 5944, 7, 34, 3712, 18467, 21979, 90, 5317, 30072, 796, 4463, 7248, 7, 13664, 7, 672, 62, 8612, 2024, 7, 34, 22305, 198, 5944, 7, 37, 3712, 24629, 2715, 90, 27, 25, 18467, 21979, 90, 5317, 11709, 8, 796, 4463, 24510, 22203, 7, 33327, 62, 672, 7, 37, 828, 1835, 7, 19815, 296, 7, 37, 22305, 198, 198, 2, 20650, 12, 3106, 5499, 198, 2, 19351, 6329, 198, 198, 37811, 15553, 287, 12429, 7248, 1174, 7997, 416, 257, 15879, 13, 198, 198, 464, 7386, 286, 428, 2163, 318, 1464, 286, 2099, 4600, 18467, 7248, 90, 5317, 92, 47671, 351, 4847, 286, 198, 1169, 1296, 7559, 90, 16, 42303, 11, 77, 92, 15506, 13, 198, 37811, 198, 7249, 4463, 24510, 22203, 38469, 90, 51, 11, 53, 27, 25, 23839, 38469, 90, 51, 5512, 18720, 296, 27, 25, 7248, 5944, 90, 51, 11709, 1279, 25, 198, 220, 220, 220, 4463, 24510, 22203, 90, 5317, 11, 18467, 7248, 5317, 11, 43806, 296, 92, 198, 220, 25439, 3712, 53, 198, 220, 14873, 296, 3712, 43806, 296, 198, 437, 198, 198, 18467, 24510, 22203, 38469, 7, 69, 3712, 23839, 38469, 90, 51, 30072, 810, 309, 796, 198, 220, 4463, 24510, 22203, 38469, 7, 69, 11, 5994, 7248, 90, 51, 92, 28955, 198, 198, 8818, 4463, 24510, 22203, 38469, 7, 69, 3712, 23839, 38469, 11, 2401, 3712, 18467, 7248, 90, 5317, 5512, 14873, 296, 8, 198, 220, 4129, 7, 69, 8, 6624, 4129, 7, 3438, 8, 8614, 198, 220, 220, 220, 4049, 7203, 24539, 286, 15879, 720, 69, 857, 407, 2872, 7386, 720, 3438, 4943, 198, 220, 4463, 24510, 22203, 38469, 7, 69, 11, 14873, 296, 8, 198, 437, 198, 198, 3438, 7, 69, 3712, 18467, 24510, 22203, 38469, 8, 796, 4463, 7248, 7, 13664, 7, 69, 13, 20786, 4008, 198, 198, 7, 69, 3712, 18467, 24510, 22203, 38469, 5769, 87, 8, 796, 277, 13, 20786, 58, 87, 60, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 277, 3712, 18467, 24510, 22203, 38469, 8, 198, 220, 3601, 7, 952, 11, 366, 18467, 24510, 22203, 16763, 7, 69, 13, 20786, 828, 366, 8, 198, 220, 21394, 13, 12860, 62, 3438, 1299, 7, 952, 11, 277, 8, 198, 220, 3601, 7, 952, 11, 366, 8, 4943, 198, 437, 198, 198, 3174, 7, 69, 3712, 18467, 24510, 22203, 90, 5317, 30072, 796, 4463, 24510, 22203, 38469, 7, 8899, 7, 69, 11, 2401, 7, 69, 36911, 14873, 296, 7, 69, 4008, 198, 3174, 7, 69, 3712, 18467, 24510, 22203, 38469, 8, 796, 277, 198, 198, 14881, 13, 33327, 7, 69, 3712, 7248, 22203, 8, 796, 2700, 7, 69, 737, 20786, 198, 198, 37811, 15553, 287, 12429, 18467, 7248, 1174, 7997, 11777, 416, 257, 15879, 13, 198, 37811, 198, 9979, 4463, 22203, 38469, 90, 50, 11, 51, 11, 53, 27, 25, 23839, 38469, 90, 51, 11709, 796, 198, 220, 4463, 24510, 22203, 38469, 90, 51, 11, 53, 11, 27, 25, 18467, 7248, 90, 50, 11, 51, 11709, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 277, 3712, 18467, 22203, 38469, 8, 796, 198, 220, 3601, 7, 952, 11, 366, 18467, 22203, 16763, 7, 69, 13, 20786, 828, 29568, 13664, 7, 3438, 7, 69, 4008, 828, 29568, 13664, 7, 19815, 296, 7, 69, 35514, 4943, 198, 198, 50, 1039, 13, 4598, 62, 785, 3455, 7, 69, 3712, 18467, 22203, 38469, 11, 308, 3712, 18467, 24510, 22203, 38469, 8, 796, 198, 220, 4463, 24510, 22203, 38469, 7, 70, 13, 20786, 58, 69, 13, 20786, 4357, 14873, 296, 7, 70, 4008, 198, 198, 2, 12901, 276, 15879, 12, 3106, 5499, 198, 2, 1783, 24305, 198, 198, 37811, 12901, 276, 2163, 503, 286, 257, 27454, 900, 286, 2099, 4600, 18467, 7248, 90, 5317, 92, 44646, 198, 198, 23044, 287, 262, 976, 835, 355, 262, 2041, 1339, 286, 685, 63, 15732, 276, 18467, 22203, 38469, 63, 16151, 31, 5420, 828, 198, 16341, 326, 262, 6376, 318, 6032, 257, 22155, 11, 407, 257, 15879, 13, 198, 37811, 198, 7249, 12901, 276, 18467, 24510, 22203, 38469, 90, 51, 11, 53, 27, 25, 23839, 38469, 90, 51, 5512, 15732, 11, 43806, 296, 27, 25, 7248, 5944, 90, 51, 11709, 1279, 25, 198, 220, 220, 220, 4463, 24510, 22203, 90, 5317, 11, 18467, 7248, 5317, 11, 43806, 296, 92, 198, 220, 25439, 3712, 53, 198, 220, 6376, 3712, 15732, 198, 220, 14873, 296, 3712, 43806, 296, 198, 437, 198, 198, 15732, 276, 18467, 24510, 22203, 38469, 7, 69, 3712, 23839, 38469, 90, 51, 19629, 479, 86, 23029, 810, 309, 796, 198, 220, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 11, 5994, 7248, 90, 51, 92, 9783, 479, 86, 23029, 198, 198, 8818, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 3712, 23839, 38469, 90, 51, 5512, 14873, 296, 3712, 7248, 5944, 90, 51, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 28, 22366, 8, 810, 309, 198, 220, 611, 318, 22366, 7, 9630, 8, 198, 220, 220, 220, 6376, 796, 360, 713, 90, 51, 11, 38469, 90, 5317, 11709, 3419, 198, 220, 220, 220, 329, 357, 72, 11, 2124, 8, 287, 27056, 378, 7, 69, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 1136, 0, 7, 9630, 11, 2124, 8, 466, 26, 2558, 21737, 886, 11, 1312, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 11, 6376, 11, 14873, 296, 8, 198, 437, 198, 198, 14881, 11207, 7, 855, 5769, 69, 3712, 38176, 90, 18467, 24510, 22203, 38469, 11, 15732, 276, 18467, 24510, 22203, 38469, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 3712, 38176, 90, 18467, 24510, 22203, 38469, 11, 15732, 276, 18467, 24510, 22203, 38469, 30072, 796, 198, 220, 1303, 41032, 6376, 618, 14176, 329, 10537, 13, 198, 220, 277, 13, 20786, 6624, 308, 13, 20786, 11405, 14873, 296, 7, 69, 8, 6624, 14873, 296, 7, 70, 8, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 277, 3712, 15732, 276, 18467, 24510, 22203, 38469, 8, 198, 220, 3601, 7, 952, 11, 366, 18467, 24510, 22203, 16763, 7, 69, 13, 20786, 828, 366, 8, 198, 220, 21394, 13, 12860, 62, 3438, 1299, 7, 952, 11, 277, 8, 198, 220, 3601, 7, 952, 11, 33172, 6376, 28, 7942, 8, 4943, 198, 437, 198, 198, 3438, 7, 69, 3712, 15732, 276, 18467, 24510, 22203, 38469, 8, 796, 4463, 7248, 7, 13664, 7, 69, 13, 20786, 4008, 198, 3174, 7, 69, 3712, 15732, 276, 18467, 24510, 22203, 38469, 8, 796, 277, 198, 198, 7, 69, 3712, 15732, 276, 18467, 24510, 22203, 38469, 5769, 87, 8, 796, 277, 13, 20786, 58, 87, 60, 198, 198, 37811, 10127, 262, 1813, 2163, 318, 41497, 11, 1312, 13, 68, 1539, 6971, 6942, 662, 17566, 13, 198, 37811, 198, 271, 62, 9630, 276, 7, 69, 3712, 7248, 22203, 8, 796, 3991, 198, 271, 62, 9630, 276, 7, 69, 3712, 7390, 26858, 22203, 8, 796, 2081, 198, 271, 62, 9630, 276, 7, 69, 3712, 15732, 276, 18467, 24510, 22203, 38469, 8, 796, 2081, 198, 271, 62, 9630, 276, 7, 69, 3712, 18467, 24510, 22203, 38469, 90, 51, 11, 27, 25, 23839, 17257, 90, 51, 11709, 8, 810, 309, 796, 2081, 198, 198, 37811, 383, 662, 9060, 357, 259, 4399, 2939, 8, 286, 262, 1988, 331, 287, 262, 14873, 296, 391, 13, 198, 37811, 198, 3866, 9060, 7, 69, 3712, 7390, 26858, 22203, 11, 331, 8, 796, 20546, 9250, 7, 88, 8, 198, 3866, 9060, 7, 69, 3712, 18467, 24510, 22203, 11, 331, 8, 796, 685, 2124, 329, 2124, 287, 2401, 7, 69, 8, 611, 277, 7, 87, 8, 6624, 331, 2361, 198, 3866, 9060, 7, 69, 3712, 15732, 276, 18467, 24510, 22203, 38469, 11, 331, 8, 796, 651, 62, 3866, 9060, 62, 9630, 7, 69, 13, 9630, 11, 331, 8, 198, 198, 31, 45145, 651, 62, 3866, 9060, 62, 9630, 7, 9630, 3712, 23839, 35, 713, 11, 331, 8, 796, 651, 7, 9630, 11, 331, 11, 352, 25, 15, 8, 198, 31, 45145, 651, 62, 3866, 9060, 62, 9630, 7, 9630, 3712, 23839, 38469, 11, 331, 8, 796, 6376, 58, 88, 60, 198, 198, 3866, 9060, 7, 69, 3712, 18467, 24510, 22203, 38469, 90, 51, 11, 27, 25, 23839, 17257, 90, 51, 92, 5512, 331, 3712, 51, 8, 810, 309, 796, 198, 220, 1303, 5747, 4600, 259, 63, 290, 4600, 12947, 82, 9741, 11085, 63, 389, 16976, 329, 27741, 17257, 13, 198, 220, 331, 18872, 230, 277, 13, 20786, 5633, 20546, 9250, 7, 12947, 82, 9741, 11085, 7, 69, 13, 20786, 11, 331, 4008, 1058, 20546, 9250, 90, 15, 11, 5317, 92, 3419, 198, 198, 37811, 12901, 276, 2163, 1022, 27454, 5621, 286, 2099, 4600, 18467, 7248, 90, 5317, 92, 44646, 198, 198, 15732, 276, 5499, 3650, 1111, 262, 2651, 3975, 7559, 69, 25, 1395, 15168, 575, 15506, 11, 355, 257, 15879, 286, 198, 18908, 364, 11, 290, 262, 19528, 3975, 7559, 69, 25, 575, 15168, 1395, 46256, 119, 126, 117, 15506, 11, 355, 257, 15879, 286, 30104, 286, 198, 18908, 364, 11, 9857, 832, 262, 685, 63, 3866, 9060, 63, 16151, 31, 5420, 8, 2163, 13, 383, 19528, 3975, 198, 271, 1444, 262, 1635, 9630, 24620, 1002, 340, 318, 407, 14275, 832, 262, 21179, 4578, 198, 63, 9630, 47671, 340, 318, 29231, 618, 262, 2134, 318, 12006, 13, 198, 198, 1212, 2099, 318, 33544, 38284, 416, 685, 63, 15732, 276, 18467, 24510, 22203, 38469, 63, 16151, 31, 5420, 737, 198, 37811, 198, 9979, 12901, 276, 18467, 22203, 38469, 90, 53, 11, 15732, 92, 796, 198, 220, 12901, 276, 18467, 24510, 22203, 38469, 90, 5317, 11, 53, 11, 15732, 11, 18467, 7248, 5317, 92, 198, 198, 8818, 12901, 276, 18467, 22203, 38469, 7, 69, 3712, 23839, 38469, 90, 5317, 19629, 6376, 28, 22366, 8, 198, 220, 14873, 296, 796, 318, 22366, 7, 9630, 8, 5633, 357, 271, 28920, 7, 69, 8, 5633, 657, 1058, 5415, 7, 69, 4008, 1058, 4129, 7, 9630, 8, 198, 220, 12901, 276, 18467, 22203, 38469, 7, 69, 11, 14873, 296, 26, 6376, 28, 9630, 8, 198, 437, 198, 198, 8818, 12901, 276, 18467, 22203, 38469, 7, 69, 3712, 23839, 38469, 90, 5317, 5512, 14873, 296, 26, 6376, 28, 22366, 8, 198, 220, 14873, 296, 796, 4463, 7248, 7, 19815, 296, 8, 198, 220, 611, 318, 22366, 7, 9630, 8, 198, 220, 220, 220, 6376, 796, 685, 2558, 21737, 329, 474, 287, 14873, 296, 2361, 198, 220, 220, 220, 329, 357, 72, 11, 474, 8, 287, 27056, 378, 7, 69, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 9630, 58, 73, 4357, 1312, 8, 198, 220, 220, 220, 886, 198, 220, 2073, 361, 4129, 7, 9630, 8, 14512, 4129, 7, 19815, 296, 8, 198, 220, 220, 220, 4049, 7203, 15732, 4129, 29568, 13664, 7, 9630, 4008, 857, 407, 2872, 14873, 296, 391, 720, 19815, 296, 4943, 198, 220, 886, 198, 220, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 11, 6376, 11, 14873, 296, 8, 198, 437, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 277, 3712, 15732, 276, 18467, 22203, 38469, 8, 796, 198, 220, 3601, 7, 952, 11, 366, 18467, 22203, 16763, 7, 69, 13, 20786, 828, 29568, 13664, 7, 3438, 7, 69, 4008, 828, 29568, 13664, 7, 19815, 296, 7, 69, 4008, 828, 6376, 28, 7942, 8, 4943, 198, 198, 2, 1114, 783, 11, 356, 466, 407, 12201, 393, 36664, 36525, 11, 691, 262, 2163, 30104, 13, 198, 50, 1039, 13, 4598, 62, 785, 3455, 7, 69, 3712, 38176, 90, 18467, 22203, 38469, 11, 15732, 276, 18467, 22203, 38469, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 3712, 38176, 90, 18467, 24510, 22203, 38469, 11, 15732, 276, 18467, 24510, 22203, 38469, 30072, 796, 198, 220, 4463, 24510, 22203, 38469, 7, 70, 13, 20786, 58, 69, 13, 20786, 4357, 14873, 296, 7, 70, 4008, 198, 198, 2, 360, 713, 12, 3106, 5499, 198, 2, 19351, 12, 198, 198, 37811, 15553, 287, 12429, 7248, 1174, 7997, 416, 257, 22155, 13, 198, 198, 464, 7386, 318, 257, 4600, 18467, 7248, 90, 50, 92, 63, 810, 4600, 50, 63, 318, 262, 2099, 286, 262, 22155, 338, 4600, 13083, 63, 198, 43681, 13, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 4463, 24510, 22203, 35, 713, 90, 42, 11, 35, 27, 25, 23839, 35, 713, 90, 42, 5512, 43806, 296, 27, 25, 7248, 5944, 92, 1279, 25, 198, 220, 220, 220, 4463, 24510, 22203, 90, 35, 11, 18467, 7248, 90, 23839, 7248, 90, 42, 5512, 42, 5512, 43806, 296, 92, 198, 220, 25439, 3712, 35, 198, 220, 14873, 296, 3712, 43806, 296, 198, 437, 198, 198, 18467, 24510, 22203, 35, 713, 7, 67, 3712, 23839, 35, 713, 90, 42, 11, 53, 30072, 810, 1391, 42, 11, 53, 92, 796, 198, 220, 4463, 24510, 22203, 35, 713, 7, 67, 11, 5994, 7248, 90, 53, 92, 28955, 198, 198, 3438, 7, 69, 3712, 18467, 24510, 22203, 35, 713, 8, 796, 4463, 7248, 7, 13083, 7, 69, 13, 20786, 4008, 198, 198, 7, 69, 3712, 18467, 24510, 22203, 35, 713, 5769, 87, 8, 796, 277, 13, 20786, 58, 87, 60, 198, 198, 8818, 7308, 13, 12860, 7, 952, 3712, 9399, 11, 277, 3712, 37, 8, 810, 376, 1279, 25, 4463, 24510, 22203, 35, 713, 198, 220, 21394, 13, 12860, 62, 4906, 62, 41571, 273, 7, 952, 11, 376, 8, 198, 220, 3601, 7, 952, 11, 30629, 4943, 198, 220, 905, 7, 952, 11, 277, 13, 20786, 8, 198, 220, 3601, 7, 952, 11, 33172, 366, 8, 198, 220, 21394, 13, 12860, 62, 3438, 1299, 7, 952, 11, 277, 11, 7386, 28, 9562, 8, 198, 220, 3601, 7, 952, 11, 366, 8, 4943, 198, 437, 198, 198, 3174, 7, 69, 3712, 18467, 24510, 22203, 8, 796, 198, 220, 4463, 24510, 22203, 35, 713, 7, 35, 713, 7, 87, 5218, 277, 7, 87, 8, 329, 2124, 287, 2401, 7, 69, 36911, 14873, 296, 7, 69, 4008, 198, 3174, 7, 69, 3712, 18467, 24510, 22203, 35, 713, 8, 796, 277, 198, 198, 37811, 15553, 287, 12429, 18467, 7248, 1174, 7997, 416, 257, 22155, 13, 198, 37811, 198, 9979, 4463, 22203, 35, 713, 90, 42, 11, 35, 27, 25, 23839, 35, 713, 90, 42, 5512, 43806, 296, 27, 25, 18467, 7248, 92, 796, 198, 220, 4463, 24510, 22203, 35, 713, 90, 42, 11, 35, 11, 43806, 296, 92, 198, 198, 18467, 22203, 35, 713, 7, 67, 3712, 23839, 35, 713, 11, 14873, 296, 3712, 18467, 7248, 8, 796, 4463, 24510, 22203, 35, 713, 7, 67, 11, 14873, 296, 8, 198, 18467, 22203, 35, 713, 7, 67, 3712, 23839, 35, 713, 90, 42, 11, 53, 30072, 810, 1391, 42, 11, 53, 92, 796, 198, 220, 4463, 24510, 22203, 35, 713, 7, 67, 11, 4463, 7248, 7, 7248, 7, 27160, 7, 67, 35514, 198, 198, 50, 1039, 13, 4598, 62, 785, 3455, 7, 69, 3712, 18467, 22203, 35, 713, 90, 42, 11, 35, 5512, 308, 3712, 18467, 24510, 22203, 35, 713, 8, 810, 1391, 42, 11, 35, 92, 796, 198, 220, 4463, 24510, 22203, 35, 713, 7, 11600, 4906, 7, 35, 5769, 87, 5218, 308, 13, 20786, 58, 88, 60, 329, 357, 87, 11, 88, 8, 287, 14729, 7, 69, 13, 20786, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14873, 296, 7, 70, 4008, 198, 198, 2, 44943, 198, 7804, 198, 198, 32374, 7, 55, 82, 3712, 40613, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 27272, 7, 55, 82, 11, 9447, 586, 271, 6839, 90, 15, 92, 7, 18467, 7248, 7, 16, 22305, 198, 198, 40082, 7, 2475, 3712, 39184, 90, 27, 25, 18467, 7248, 90, 5317, 5512, 27, 25, 40613, 18683, 6713, 5512, 27763, 3712, 12310, 586, 271, 6839, 90, 15, 30072, 796, 198, 220, 20217, 22203, 7, 16, 11, 40167, 7, 49180, 828, 4463, 7248, 7, 16, 4008, 198, 198, 32374, 7, 55, 82, 3712, 29974, 10565, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 4179, 7, 55, 82, 11, 6093, 1096, 39184, 28955, 198, 198, 8818, 4179, 7, 55, 82, 3712, 10267, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 285, 11, 299, 796, 4129, 12195, 55, 82, 8, 198, 220, 36525, 796, 13690, 35610, 5497, 1063, 19510, 76, 11, 299, 4008, 198, 220, 18074, 222, 16, 796, 4463, 22203, 7, 72, 4613, 36525, 58, 72, 7131, 16, 4357, 285, 9, 77, 11, 285, 8, 198, 220, 18074, 222, 17, 796, 4463, 22203, 7, 72, 4613, 36525, 58, 72, 7131, 17, 4357, 285, 9, 77, 11, 299, 8, 198, 220, 27272, 7, 55, 82, 11, 49101, 7, 46582, 16, 11, 18074, 222, 17, 4008, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 39184, 90, 27, 25, 18467, 7248, 90, 5317, 5512, 27, 25, 10267, 47, 958, 5512, 27763, 3712, 4561, 272, 8, 198, 220, 277, 11, 308, 796, 27763, 198, 220, 285, 11, 299, 796, 4129, 12195, 19815, 296, 12195, 49180, 4008, 198, 220, 36525, 796, 44800, 5497, 1063, 19510, 76, 11, 299, 4008, 198, 220, 4463, 22203, 7, 72, 4613, 36525, 58, 69, 7, 72, 828, 70, 7, 72, 8, 4357, 40167, 7, 49180, 828, 909, 7, 2475, 4008, 198, 437, 198, 198, 8818, 4179, 7, 55, 82, 3712, 15642, 8374, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 36545, 796, 4129, 12195, 55, 82, 8, 198, 220, 36525, 796, 13690, 35610, 5497, 1063, 7, 51, 29291, 7, 5907, 4008, 198, 220, 299, 796, 40426, 7, 5907, 8, 198, 220, 18074, 222, 82, 796, 685, 18467, 22203, 7, 72, 4613, 36525, 58, 72, 7131, 73, 4357, 299, 11, 36545, 58, 73, 12962, 329, 474, 287, 352, 25, 13664, 7, 5907, 15437, 198, 220, 27272, 7, 55, 82, 11, 7854, 271, 6839, 7, 18467, 7248, 7, 77, 828, 18074, 222, 82, 4008, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 39184, 90, 27, 25, 18467, 7248, 90, 5317, 5512, 27, 25, 15642, 8374, 18683, 6713, 5512, 27763, 3712, 15205, 271, 6839, 8, 198, 220, 36545, 796, 4129, 12195, 19815, 296, 12195, 49180, 4008, 198, 220, 36525, 796, 44800, 5497, 1063, 7, 51, 29291, 7, 5907, 4008, 198, 220, 4463, 22203, 7, 72, 4613, 36525, 58, 7, 69, 7, 72, 8, 329, 277, 287, 27763, 26513, 4357, 40167, 7, 49180, 828, 909, 7, 2475, 4008, 198, 437, 198, 198, 8818, 4179, 7, 24874, 3712, 10044, 29363, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 277, 11, 308, 796, 5166, 198, 220, 285, 796, 4129, 7, 3438, 7, 24874, 4008, 198, 220, 37430, 796, 4463, 22203, 7, 24455, 7, 72, 4613, 277, 7, 72, 8, 6624, 308, 7, 72, 828, 352, 25, 76, 828, 285, 8, 198, 220, 27272, 7, 24874, 11, 9447, 586, 271, 6839, 90, 16, 92, 7, 27363, 4008, 198, 437, 198, 198, 8818, 4179, 7, 1845, 64, 3712, 10044, 29363, 44, 13425, 6583, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 2488, 30493, 5145, 271, 28920, 7, 1845, 64, 8, 198, 220, 277, 16, 11, 2030, 301, 796, 31215, 58, 16, 4357, 31215, 58, 17, 25, 437, 60, 198, 220, 285, 796, 4129, 7, 3438, 7, 1845, 64, 4008, 198, 220, 37430, 796, 4463, 22203, 7, 24455, 7, 72, 4613, 477, 7, 69, 16, 7, 72, 8, 6624, 277, 7, 72, 8, 329, 277, 287, 2030, 301, 828, 352, 25, 76, 828, 285, 8, 198, 220, 27272, 7, 1845, 64, 11, 9447, 586, 271, 6839, 90, 16, 92, 7, 27363, 4008, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 39184, 90, 27, 25, 18467, 7248, 90, 5317, 5512, 27, 25, 10044, 29363, 44, 13425, 6583, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27763, 3712, 12310, 586, 271, 6839, 90, 16, 30072, 198, 220, 7377, 117, 796, 2824, 7, 259, 565, 7, 2475, 4008, 198, 220, 289, 796, 691, 7, 49180, 8, 198, 220, 4463, 22203, 7, 5317, 58, 8807, 7, 12947, 82, 9741, 7, 29945, 11, 289, 7, 72, 22305, 329, 1312, 287, 2401, 7, 71, 8, 4357, 4129, 7, 29945, 4008, 198, 437, 198, 198, 37811, 27272, 286, 27454, 5621, 351, 257, 9575, 16855, 393, 6376, 656, 262, 4179, 900, 13, 198, 198, 1212, 2099, 3769, 257, 2121, 1891, 329, 4179, 16113, 326, 466, 407, 1282, 351, 257, 198, 20887, 1143, 11862, 284, 4174, 262, 10112, 3119, 286, 262, 4179, 13, 554, 884, 198, 33964, 11, 345, 460, 11777, 5678, 257, 16855, 422, 12777, 2374, 286, 4847, 287, 262, 198, 39690, 286, 262, 4179, 27763, 284, 4847, 287, 262, 40167, 286, 262, 27763, 13, 198, 198, 464, 6376, 318, 12006, 262, 717, 640, 340, 318, 2622, 13, 6660, 612, 318, 645, 3131, 198, 15805, 284, 1262, 428, 2099, 611, 262, 10112, 3119, 481, 407, 307, 24399, 13, 198, 37811, 198, 76, 18187, 2878, 4463, 7248, 15732, 276, 39184, 90, 5944, 27, 25, 18467, 7248, 11, 18683, 6713, 11, 34, 505, 27, 25, 15205, 271, 6839, 90, 5944, 11709, 1279, 25, 198, 220, 220, 220, 27741, 39184, 90, 5944, 11, 18683, 6713, 92, 198, 220, 16362, 3712, 18683, 6713, 198, 220, 27763, 3712, 34, 505, 198, 220, 6376, 3712, 38176, 90, 23839, 35, 713, 11, 18465, 92, 198, 437, 198, 18467, 7248, 15732, 276, 39184, 7, 10989, 6713, 11, 27763, 3712, 15205, 271, 6839, 8, 796, 198, 220, 4463, 7248, 15732, 276, 39184, 7, 10989, 6713, 11, 27763, 11, 2147, 8, 198, 198, 8818, 787, 62, 32374, 62, 9630, 7, 49180, 3712, 15205, 271, 6839, 90, 27, 25, 18467, 7248, 30072, 198, 220, 18074, 222, 82, 796, 309, 29291, 7, 1455, 82, 7, 49180, 4008, 198, 220, 6376, 796, 360, 713, 90, 51, 29291, 90, 8899, 7, 417, 4906, 24861, 246, 19815, 296, 11, 18074, 222, 82, 26513, 5512, 1288, 4906, 7, 1758, 87, 7, 49180, 4008, 92, 3419, 198, 220, 329, 2124, 287, 40167, 7, 49180, 8, 198, 220, 220, 220, 6376, 58, 8899, 7, 46582, 4613, 18074, 222, 7, 87, 828, 18074, 222, 82, 15437, 796, 2124, 198, 220, 886, 198, 220, 1441, 6376, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 18467, 7248, 15732, 276, 39184, 11, 27763, 3712, 15205, 271, 6839, 8, 198, 220, 611, 318, 22366, 7, 2475, 13, 9630, 8, 198, 220, 220, 220, 1761, 13, 9630, 796, 787, 62, 32374, 62, 9630, 7, 2475, 13, 49180, 8, 198, 220, 886, 198, 220, 43458, 796, 309, 29291, 7, 1455, 82, 7, 49180, 4008, 198, 220, 4463, 22203, 7, 5317, 58, 2475, 13, 9630, 58, 8899, 7, 69, 4613, 277, 7, 87, 828, 43458, 15437, 329, 2124, 287, 40167, 7, 49180, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40167, 7, 49180, 828, 909, 7, 2475, 4008, 198, 437, 198, 198, 37811, 978, 42289, 329, 4179, 286, 269, 2117, 272, 393, 47368, 2117, 272, 351, 3625, 852, 27454, 5621, 13, 198, 198, 818, 262, 4732, 286, 50126, 20083, 11, 884, 7095, 389, 1444, 1635, 7639, 1040, 24620, 383, 198, 83, 15104, 498, 4654, 11862, 318, 685, 63, 45, 7287, 39516, 18234, 63, 16151, 31, 5420, 828, 543, 318, 11862, 1146, 198, 4853, 29540, 284, 262, 14276, 11862, 4600, 7293, 577, 15667, 36, 13255, 7509, 44646, 383, 16113, 198, 58, 63, 26257, 18234, 63, 16151, 31, 5420, 8, 290, 685, 63, 42758, 13102, 469, 18234, 63, 16151, 31, 5420, 8, 389, 3221, 881, 5443, 13, 1002, 345, 198, 533, 22147, 644, 11862, 284, 2298, 11, 779, 685, 63, 25610, 18234, 63, 16151, 31, 5420, 737, 198, 37811, 198, 397, 8709, 2099, 15251, 2348, 42289, 1279, 25, 27272, 2348, 42289, 886, 198, 198, 37811, 30277, 12, 282, 42289, 329, 15449, 326, 6370, 284, 2298, 281, 5035, 11862, 13, 198, 37811, 198, 7249, 10880, 18234, 1279, 25, 15251, 2348, 42289, 886, 198, 198, 8818, 4179, 7, 66, 2117, 272, 3712, 15205, 291, 2117, 272, 90, 27, 25, 7248, 5944, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 11709, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 70, 3712, 39184, 2348, 42289, 28, 7293, 577, 15667, 36, 13255, 7509, 28955, 198, 220, 4179, 7, 66, 2117, 272, 11, 435, 70, 8, 198, 437, 198, 198, 8818, 4179, 7, 66, 2117, 272, 3712, 15205, 291, 2117, 272, 90, 27, 25, 7248, 5944, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 7904, 25610, 18234, 8, 198, 220, 1303, 33141, 262, 1593, 2041, 1339, 810, 530, 286, 262, 7405, 318, 257, 6937, 198, 220, 1303, 357, 8818, 503, 286, 257, 2060, 1122, 900, 737, 554, 428, 1339, 11, 356, 655, 761, 284, 1011, 257, 198, 220, 1303, 1720, 286, 662, 17566, 286, 262, 6937, 1988, 13, 198, 220, 1257, 6359, 796, 7405, 7, 66, 2117, 272, 8, 198, 220, 1312, 796, 1064, 11085, 7, 69, 4613, 4129, 7, 3438, 7, 69, 4008, 6624, 352, 11, 1257, 6359, 8, 198, 220, 611, 5145, 271, 22366, 7, 72, 8, 198, 220, 220, 220, 269, 796, 1257, 6359, 58, 72, 16151, 16, 8, 198, 220, 220, 220, 7377, 117, 82, 796, 3975, 7, 33678, 265, 7, 12543, 6359, 11, 1312, 4008, 466, 277, 198, 220, 220, 220, 220, 220, 4463, 22203, 7, 3866, 9060, 7, 69, 11, 269, 828, 2401, 7, 69, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2124, 11, 18074, 222, 82, 796, 611, 4129, 7, 29945, 82, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 2401, 7, 8807, 7, 29945, 82, 36911, 7377, 117, 82, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 40426, 796, 1720, 7, 8899, 7, 3438, 11, 7377, 117, 82, 4008, 198, 220, 220, 220, 220, 220, 909, 7, 1676, 67, 828, 3975, 7, 785, 3455, 11, 7405, 7, 1676, 67, 828, 7377, 117, 82, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 18074, 222, 82, 796, 7550, 7, 46582, 82, 11, 1312, 11, 20217, 22203, 7, 16, 11, 2124, 11, 4463, 7248, 7, 16, 22305, 198, 220, 220, 220, 1441, 4463, 7248, 15732, 276, 39184, 7, 66, 2117, 272, 11, 7854, 271, 6839, 7, 46582, 82, 4008, 198, 220, 886, 628, 220, 1303, 554, 262, 2276, 1339, 11, 329, 783, 356, 1464, 655, 466, 257, 12234, 4654, 11, 3584, 198, 220, 1303, 3297, 12, 647, 469, 15449, 460, 3360, 307, 5443, 13, 198, 220, 4179, 7, 66, 2117, 272, 11, 21059, 18234, 28955, 198, 437, 198, 198, 33678, 265, 7, 35138, 3712, 45442, 38469, 11, 1312, 8, 796, 36125, 3163, 20477, 13, 33678, 265, 7, 35138, 11, 1312, 8, 198, 33678, 265, 7, 35138, 3712, 38469, 11, 1312, 8, 796, 12233, 265, 0, 7, 30073, 7, 35138, 828, 1312, 8, 198, 198, 28463, 7, 35138, 3712, 45442, 38469, 90, 45, 11, 51, 5512, 1312, 11, 2124, 3712, 50, 8, 810, 1391, 45, 11, 51, 11, 50, 92, 796, 198, 220, 36125, 3163, 20477, 13, 28463, 7, 38610, 62, 4906, 7, 35138, 11, 2099, 22179, 7, 51, 11, 50, 4008, 7, 35138, 828, 1312, 11, 2124, 8, 198, 28463, 7, 35138, 3712, 38469, 90, 51, 5512, 1312, 11, 2124, 3712, 50, 8, 810, 1391, 51, 11, 50, 92, 796, 198, 220, 7550, 0, 7, 33327, 7, 4906, 22179, 7, 51, 11, 50, 828, 43030, 828, 1312, 11, 2124, 8, 198, 198, 37811, 685, 45, 7287, 12, 26268, 4654, 16151, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 45, 7287, 62, 26268, 62, 22179, 8, 11862, 13, 198, 198, 1212, 318, 262, 24354, 11862, 329, 14492, 15449, 13, 198, 37811, 198, 7249, 399, 7287, 39516, 18234, 1279, 25, 15251, 2348, 42289, 886, 198, 198, 8818, 4179, 7, 66, 2117, 272, 3712, 15205, 291, 2117, 272, 90, 27, 25, 7248, 5944, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7904, 45, 7287, 39516, 18234, 8, 198, 220, 1303, 317, 28376, 12, 26268, 4654, 318, 11862, 1146, 262, 976, 355, 4600, 7293, 577, 15667, 36, 13255, 7509, 47671, 198, 220, 1303, 475, 329, 1224, 43205, 290, 2854, 356, 1577, 257, 1277, 7822, 994, 13, 198, 220, 1257, 6359, 796, 7405, 7, 66, 2117, 272, 8, 198, 220, 36545, 796, 3975, 7, 13664, 11, 3625, 7, 66, 2117, 272, 4008, 198, 220, 18074, 222, 82, 796, 3975, 28264, 4613, 2558, 58, 4357, 1257, 6359, 8, 198, 220, 329, 314, 287, 13690, 35610, 5497, 1063, 7, 51, 29291, 7, 5907, 4008, 198, 220, 220, 220, 3815, 796, 3975, 19510, 69, 11, 1312, 8, 4613, 277, 7, 40, 58, 72, 46570, 1257, 6359, 11, 1123, 9630, 7, 12543, 6359, 4008, 198, 220, 220, 220, 611, 477, 7, 855, 7, 27160, 58, 16, 46570, 3815, 8, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 46582, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 46582, 82, 58, 72, 4357, 314, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 27763, 796, 7854, 271, 6839, 7, 8899, 19510, 46582, 11, 69, 8, 4613, 4463, 22203, 7, 46582, 11, 2401, 7, 69, 36911, 18074, 222, 82, 11, 1257, 6359, 4008, 198, 220, 4463, 7248, 15732, 276, 39184, 7, 66, 2117, 272, 11, 27763, 8, 198, 437, 198, 198, 37811, 685, 42758, 12, 647, 469, 4654, 16151, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 42758, 12, 647, 469, 62, 22179, 8, 11862, 13, 198, 37811, 198, 7249, 33947, 13102, 469, 18234, 1279, 25, 15251, 2348, 42289, 886, 198, 198, 8818, 4179, 7, 66, 2117, 272, 3712, 15205, 291, 2117, 272, 90, 27, 25, 7248, 5944, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7904, 42758, 13102, 469, 18234, 8, 198, 220, 1257, 6359, 796, 3975, 7, 33327, 11, 7405, 7, 66, 2117, 272, 4008, 198, 220, 10524, 796, 3975, 7, 30619, 16321, 11, 1257, 6359, 8, 198, 220, 3815, 796, 2092, 62, 76, 18187, 7, 12543, 6359, 11, 1288, 4906, 7, 1758, 87, 7, 66, 2117, 272, 22305, 198, 220, 16069, 796, 2092, 62, 76, 18187, 7, 12543, 6359, 11, 11801, 17257, 90, 5317, 30072, 628, 220, 2163, 1306, 62, 9521, 0, 7, 72, 3712, 5317, 8, 198, 220, 220, 220, 277, 11, 3297, 796, 1257, 6359, 58, 72, 4357, 10524, 58, 72, 60, 198, 220, 220, 220, 299, 796, 4129, 7, 69, 8, 198, 220, 220, 220, 923, 796, 938, 7, 81, 6231, 58, 72, 12962, 1343, 352, 198, 220, 220, 220, 16069, 58, 72, 60, 796, 611, 923, 19841, 299, 198, 220, 220, 220, 220, 220, 1188, 796, 3815, 58, 72, 60, 796, 277, 58, 30619, 58, 9688, 11907, 198, 220, 220, 220, 220, 220, 2245, 796, 923, 1343, 352, 198, 220, 220, 220, 220, 220, 981, 2245, 19841, 299, 11405, 277, 58, 30619, 58, 11338, 11907, 6624, 1188, 26, 2245, 15853, 352, 886, 198, 220, 220, 220, 220, 220, 923, 37498, 11338, 532, 352, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 923, 25, 77, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 18074, 222, 82, 796, 3975, 28264, 4613, 2558, 58, 4357, 1257, 6359, 8, 198, 220, 329, 1312, 287, 1123, 9630, 7, 81, 6231, 8, 198, 220, 220, 220, 16069, 58, 72, 60, 796, 657, 25, 15, 198, 220, 220, 220, 1306, 62, 9521, 0, 7, 72, 8, 198, 220, 886, 198, 220, 981, 5145, 1092, 7, 271, 28920, 11, 16069, 8, 198, 220, 220, 220, 611, 477, 7, 855, 7, 27160, 58, 16, 46570, 3815, 8, 198, 220, 220, 220, 220, 220, 36525, 796, 13690, 35610, 5497, 1063, 7, 51, 29291, 7, 81, 6231, 4008, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 46582, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 46582, 82, 58, 72, 4357, 357, 82, 2096, 58, 72, 7131, 40, 58, 72, 11907, 329, 314, 287, 36525, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 9521, 0, 7, 72, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1306, 62, 9521, 0, 7, 853, 1084, 7, 27160, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 27763, 796, 7854, 271, 6839, 7, 8899, 19510, 46582, 11, 69, 8, 4613, 4463, 22203, 7, 46582, 11, 4129, 7, 69, 36911, 18074, 222, 82, 11, 1257, 6359, 4008, 198, 220, 4463, 7248, 15732, 276, 39184, 7, 66, 2117, 272, 11, 27763, 8, 198, 437, 198, 198, 38610, 62, 76, 18187, 7, 87, 3712, 23839, 38469, 11, 309, 3712, 6030, 8, 796, 2092, 7, 87, 11, 309, 8, 198, 198, 8818, 2092, 62, 76, 18187, 7, 87, 3712, 45442, 38469, 90, 45, 5512, 309, 3712, 6030, 8, 810, 399, 198, 220, 1303, 4600, 38610, 63, 1464, 5860, 281, 4600, 44, 38469, 63, 475, 4600, 2617, 9630, 0, 7, 3712, 44, 38469, 11, 26498, 23029, 63, 198, 220, 1303, 691, 2499, 618, 262, 5002, 2099, 318, 257, 10340, 12, 4906, 13, 198, 220, 318, 2545, 301, 2981, 7, 51, 8, 5633, 2092, 7, 87, 11, 309, 8, 1058, 311, 1143, 38469, 90, 45, 92, 7, 38469, 90, 51, 92, 7, 917, 891, 11, 399, 4008, 198, 437, 198, 198, 37811, 685, 26257, 4654, 16151, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 26257, 62, 22179, 8, 11862, 13, 198, 37811, 198, 7249, 21059, 18234, 1279, 25, 15251, 2348, 42289, 886, 198, 198, 8818, 4179, 7, 66, 2117, 272, 3712, 15205, 291, 2117, 272, 90, 27, 25, 7248, 5944, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 7904, 26257, 18234, 8, 198, 220, 1303, 775, 1061, 262, 3210, 29191, 329, 12234, 15449, 25, 287, 257, 5021, 1014, 12234, 4654, 11, 198, 220, 1303, 530, 2163, 11, 1444, 262, 1635, 1676, 1350, 25666, 481, 307, 11629, 515, 625, 290, 761, 407, 307, 198, 220, 1303, 41497, 11, 9472, 262, 584, 5499, 11, 869, 1635, 11249, 9, 17311, 11, 1276, 307, 41497, 13, 198, 220, 1303, 198, 220, 1303, 775, 3853, 355, 12774, 262, 555, 9630, 276, 2163, 351, 4387, 7386, 13, 1002, 477, 198, 220, 1303, 5499, 389, 1541, 41497, 11, 356, 40647, 3853, 262, 717, 530, 13, 198, 220, 1312, 796, 1822, 9806, 7, 8899, 7, 1455, 82, 7, 66, 2117, 272, 4008, 466, 277, 198, 220, 220, 220, 318, 62, 9630, 276, 7, 69, 8, 5633, 532, 16, 1058, 4129, 7, 3438, 7, 69, 4008, 198, 220, 886, 8, 198, 220, 12774, 796, 7405, 7, 66, 2117, 272, 38381, 72, 60, 198, 220, 12188, 796, 3975, 7, 641, 495, 62, 9630, 276, 11, 12233, 265, 7, 1455, 82, 7, 66, 2117, 272, 828, 1312, 4008, 198, 220, 18074, 222, 82, 62, 11249, 11, 18074, 222, 62, 1676, 1350, 796, 12234, 62, 22179, 7, 11249, 82, 11, 12774, 8, 198, 220, 4463, 7248, 15732, 276, 39184, 7, 66, 2117, 272, 11, 7854, 271, 6839, 7, 28463, 7, 46582, 82, 62, 11249, 11, 1312, 11, 18074, 222, 62, 1676, 1350, 22305, 198, 437, 198, 198, 8818, 12234, 62, 22179, 7, 11249, 82, 3712, 23839, 38469, 90, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12774, 3712, 18467, 24510, 22203, 90, 5317, 30072, 198, 220, 18074, 222, 62, 11249, 82, 11, 18074, 222, 79, 796, 3975, 28264, 4613, 2558, 58, 4357, 12188, 828, 2558, 21737, 198, 220, 329, 331, 287, 2401, 7, 1676, 1350, 8, 198, 220, 220, 220, 1188, 796, 12774, 7, 88, 8, 198, 220, 220, 220, 662, 17566, 796, 3975, 7, 11249, 4613, 662, 9060, 7, 11249, 11, 1188, 828, 12188, 8, 198, 220, 220, 220, 299, 62, 3866, 17566, 796, 309, 29291, 7, 8899, 7, 13664, 11, 662, 17566, 4008, 198, 220, 220, 220, 299, 796, 40426, 7, 77, 62, 3866, 17566, 8, 198, 220, 220, 220, 611, 299, 1875, 657, 198, 220, 220, 220, 220, 220, 36525, 796, 13690, 35610, 5497, 1063, 7, 77, 62, 3866, 17566, 8, 198, 220, 220, 220, 220, 220, 329, 474, 287, 1123, 9630, 7, 46582, 62, 11249, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 65, 11, 2124, 82, 796, 18074, 222, 62, 11249, 82, 58, 73, 4357, 662, 17566, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 46582, 65, 11, 357, 34223, 58, 40, 58, 73, 11907, 329, 314, 287, 36525, 4008, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 46582, 79, 11, 357, 88, 329, 1312, 287, 352, 25, 77, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 357, 8899, 7, 18467, 22203, 11, 18074, 222, 62, 11249, 82, 11, 3975, 7, 3438, 11, 12188, 36911, 4463, 22203, 7, 46582, 79, 11, 2401, 7, 1676, 1350, 22305, 198, 437, 198, 198, 8818, 12234, 62, 22179, 7, 11249, 82, 3712, 45442, 38469, 90, 16, 11, 27, 25, 18467, 24510, 22203, 90, 5317, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12774, 3712, 18467, 24510, 22203, 90, 5317, 30072, 198, 220, 18074, 222, 65, 11, 18074, 222, 79, 796, 12234, 62, 22179, 7, 11249, 82, 58, 16, 4357, 12774, 8, 198, 220, 357, 50, 38469, 19510, 46582, 65, 35751, 828, 18074, 222, 79, 8, 198, 437, 198, 8818, 12234, 62, 22179, 7, 11249, 3712, 18467, 24510, 22203, 90, 5317, 5512, 12774, 3712, 18467, 24510, 22203, 90, 5317, 30072, 198, 220, 18074, 222, 65, 11, 18074, 222, 79, 796, 2558, 58, 4357, 2558, 21737, 198, 220, 329, 331, 287, 2401, 7, 1676, 1350, 8, 198, 220, 220, 220, 2124, 82, 796, 662, 9060, 7, 11249, 11, 12774, 7, 88, 4008, 198, 220, 220, 220, 299, 796, 4129, 7, 34223, 8, 198, 220, 220, 220, 611, 299, 1875, 657, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 46582, 65, 11, 2124, 82, 8, 198, 220, 220, 220, 220, 220, 24443, 0, 7, 46582, 79, 11, 357, 88, 329, 1312, 287, 352, 25, 77, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 357, 18467, 22203, 7, 46582, 65, 11, 2401, 7, 11249, 36911, 4463, 22203, 7, 46582, 79, 11, 2401, 7, 1676, 1350, 22305, 198, 437, 198, 198, 641, 495, 62, 9630, 276, 7, 69, 3712, 18467, 22203, 90, 5317, 11, 5317, 30072, 796, 318, 62, 9630, 276, 7, 69, 8, 5633, 277, 1058, 198, 220, 4463, 22203, 7, 33327, 7, 69, 828, 14873, 296, 7, 69, 828, 6376, 28, 7942, 8, 198, 641, 495, 62, 9630, 276, 7, 69, 3712, 18467, 24510, 22203, 90, 5317, 30072, 796, 318, 62, 9630, 276, 7, 69, 8, 5633, 277, 1058, 198, 220, 4463, 24510, 22203, 7, 33327, 7, 69, 828, 6376, 28, 7942, 8, 198, 198, 8818, 4179, 7, 67, 3712, 33, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 30072, 810, 198, 220, 220, 220, 1391, 5944, 27, 25, 7248, 5944, 11, 8074, 27, 25, 18467, 24510, 22203, 90, 5317, 11709, 198, 220, 1303, 1081, 287, 257, 2834, 1891, 11, 428, 2446, 18533, 326, 477, 5563, 287, 7679, 362, 423, 198, 220, 1303, 15619, 17488, 6583, 13, 198, 220, 2488, 30493, 5145, 1092, 7, 271, 28920, 7, 1939, 738, 7, 67, 11, 410, 11, 1058, 83, 13655, 4008, 329, 410, 287, 9421, 1063, 158, 224, 224, 7, 67, 4008, 198, 220, 288, 62, 14986, 796, 288, 628, 220, 1303, 1114, 8187, 414, 11, 304, 13, 70, 13, 618, 27356, 2174, 11, 4155, 326, 477, 5563, 287, 7679, 362, 198, 220, 1303, 389, 2099, 5621, 13, 198, 220, 611, 5145, 439, 7, 87, 318, 64, 5994, 7248, 329, 2124, 287, 909, 158, 224, 224, 7, 67, 4008, 198, 220, 220, 220, 288, 796, 3975, 7, 67, 11, 909, 158, 224, 223, 28, 738, 414, 11, 909, 158, 224, 224, 28, 641, 495, 62, 4906, 62, 2617, 11, 3488, 28, 641, 495, 62, 4906, 62, 2617, 62, 19815, 296, 8, 198, 220, 886, 628, 220, 1303, 632, 318, 4143, 16586, 284, 24061, 477, 4961, 11341, 357, 944, 15449, 8, 717, 11, 523, 355, 198, 220, 1303, 284, 4646, 262, 10620, 286, 1568, 2834, 10146, 357, 7639, 1040, 8, 290, 3186, 357, 19692, 15449, 737, 198, 220, 288, 11, 7377, 117, 82, 796, 4961, 1096, 62, 439, 7, 67, 8, 198, 220, 816, 62, 1851, 1063, 158, 224, 224, 0, 7, 67, 11, 685, 85, 329, 410, 287, 9421, 1063, 158, 224, 224, 7, 67, 8, 611, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4129, 7, 1939, 738, 7, 67, 11, 410, 11, 1058, 83, 13655, 4008, 6624, 352, 12962, 628, 220, 1303, 35006, 477, 5166, 654, 878, 14492, 597, 15449, 13, 198, 220, 288, 796, 5166, 62, 439, 7, 67, 8, 628, 220, 1303, 11136, 1760, 428, 662, 36948, 11, 611, 612, 389, 597, 45930, 15104, 498, 15449, 11, 1620, 198, 220, 1303, 530, 286, 606, 290, 664, 12321, 26, 4306, 11, 356, 423, 379, 749, 257, 1720, 284, 24061, 13, 198, 220, 1303, 198, 220, 1303, 554, 262, 13934, 1339, 357, 63, 48005, 158, 224, 223, 7, 67, 8, 6624, 362, 63, 828, 262, 662, 36948, 19026, 326, 612, 198, 220, 1303, 318, 379, 749, 530, 45930, 15104, 498, 4654, 11, 523, 612, 389, 645, 7747, 284, 787, 13, 1649, 612, 198, 220, 1303, 389, 3294, 1744, 15449, 11, 466, 262, 530, 351, 18197, 2779, 38691, 414, 198, 220, 1303, 357, 11167, 286, 10620, 286, 2316, 284, 4654, 737, 770, 318, 257, 2829, 31828, 339, 27915, 13, 198, 220, 1303, 1114, 517, 1630, 625, 262, 1502, 286, 262, 15449, 11, 2251, 257, 471, 22332, 7269, 13, 198, 220, 611, 299, 85, 158, 224, 224, 7, 67, 8, 6624, 657, 198, 220, 220, 220, 1303, 44855, 11682, 25, 10358, 77, 470, 761, 4463, 7248, 15732, 276, 39184, 287, 777, 2041, 2663, 13, 198, 220, 220, 220, 611, 299, 85, 158, 224, 223, 7, 67, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 4463, 7248, 15732, 276, 39184, 7, 67, 62, 14986, 11, 9447, 586, 271, 6839, 90, 16, 92, 7, 29945, 82, 58, 16, 60, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 18074, 222, 82, 796, 7405, 7, 11167, 7, 50, 38469, 7, 672, 158, 224, 223, 7, 67, 26513, 22305, 198, 220, 220, 220, 220, 220, 4463, 7248, 15732, 276, 39184, 7, 67, 62, 14986, 11, 7854, 271, 6839, 7, 8899, 7, 785, 3455, 11, 18074, 222, 82, 11, 7377, 117, 82, 22305, 198, 220, 220, 220, 886, 198, 220, 2073, 198, 220, 220, 220, 1303, 9683, 262, 4654, 284, 1620, 13, 198, 220, 220, 220, 410, 796, 1822, 1084, 7, 8899, 7, 1851, 1063, 158, 224, 224, 7, 67, 4008, 466, 410, 198, 220, 220, 220, 220, 220, 13015, 796, 4519, 7, 67, 11, 410, 11, 1058, 83, 13655, 8, 198, 220, 220, 220, 220, 220, 2488, 30493, 4129, 7, 276, 3212, 8, 18189, 362, 198, 220, 220, 220, 220, 220, 40426, 7, 68, 4613, 4129, 7, 3438, 7, 26452, 7, 67, 11, 304, 4008, 828, 13015, 8, 198, 220, 220, 220, 886, 8, 628, 220, 220, 220, 1303, 3082, 1133, 262, 2834, 1891, 357, 5083, 4654, 737, 198, 220, 220, 220, 4654, 62, 276, 3212, 796, 4519, 7, 67, 11, 410, 11, 1058, 83, 13655, 8, 198, 220, 220, 220, 284, 62, 22179, 796, 12351, 7, 67, 11, 4654, 62, 276, 3212, 8, 198, 220, 220, 220, 284, 62, 14894, 796, 900, 26069, 7, 1851, 1063, 158, 224, 223, 7, 67, 828, 284, 62, 22179, 8, 198, 220, 220, 220, 279, 65, 796, 2834, 1891, 7, 50, 38469, 7, 26452, 7, 67, 11, 4654, 62, 276, 3212, 26513, 828, 435, 70, 28, 25610, 18234, 28955, 628, 220, 220, 220, 1303, 13610, 257, 649, 14141, 433, 578, 16362, 351, 5399, 9421, 1063, 13, 198, 220, 220, 220, 288, 62, 46416, 796, 347, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 92, 3419, 198, 220, 220, 220, 4866, 62, 42632, 0, 7, 67, 62, 46416, 11, 288, 11, 569, 158, 224, 223, 28, 1462, 62, 14894, 11, 569, 158, 224, 224, 28, 2617, 26069, 7, 1851, 1063, 158, 224, 224, 7, 67, 828, 85, 828, 412, 28, 276, 3212, 7, 67, 4008, 198, 220, 220, 220, 5399, 796, 751, 62, 332, 16886, 158, 224, 223, 0, 7, 67, 62, 46416, 11, 909, 158, 224, 223, 28, 1758, 87, 7, 40842, 4008, 198, 220, 220, 220, 329, 357, 84, 11, 18074, 222, 8, 287, 19974, 7, 1462, 62, 22179, 11, 7405, 7, 40842, 4008, 198, 220, 220, 220, 220, 220, 329, 304, 287, 900, 26069, 7, 1939, 738, 7, 67, 11, 334, 11, 1058, 10677, 828, 4654, 62, 276, 3212, 8, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 7266, 42632, 0, 7, 67, 62, 46416, 11, 304, 11, 12351, 28, 46416, 11, 3488, 28, 46582, 158, 233, 227, 26452, 7, 67, 11, 68, 4008, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 816, 62, 276, 3212, 0, 7, 67, 62, 46416, 11, 4654, 62, 276, 3212, 8, 628, 220, 220, 220, 1303, 3311, 1834, 2280, 24061, 262, 4179, 286, 262, 649, 16362, 13, 198, 220, 220, 220, 1761, 796, 4179, 7, 67, 62, 46416, 8, 628, 220, 220, 220, 1303, 1081, 15140, 4179, 27763, 422, 47314, 329, 2834, 1891, 290, 5322, 4179, 13, 198, 220, 220, 220, 18074, 222, 82, 796, 20650, 90, 28718, 92, 7, 917, 891, 11, 299, 85, 158, 224, 223, 7, 67, 4008, 198, 220, 220, 220, 329, 357, 72, 11, 334, 8, 287, 27056, 378, 7, 1462, 62, 22179, 8, 198, 220, 220, 220, 220, 220, 18074, 222, 82, 58, 84, 60, 796, 36664, 7, 12957, 7, 1455, 82, 7, 2475, 36911, 7405, 7, 40842, 38381, 72, 4357, 7377, 117, 82, 58, 84, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 357, 72, 11, 334, 8, 287, 27056, 378, 7, 1462, 62, 14894, 8, 198, 220, 220, 220, 220, 220, 18074, 222, 82, 58, 84, 60, 796, 36664, 7, 1455, 82, 7, 2475, 38381, 72, 4357, 7377, 117, 82, 58, 84, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4463, 7248, 15732, 276, 39184, 7, 67, 62, 14986, 11, 7854, 271, 6839, 7, 46582, 82, 4008, 198, 220, 886, 198, 437, 198, 198, 641, 495, 62, 4906, 62, 2617, 7, 82, 3712, 18467, 7248, 8, 796, 5994, 7248, 7, 417, 4906, 7, 82, 4008, 198, 641, 495, 62, 4906, 62, 2617, 7, 82, 3712, 6030, 7248, 8, 796, 264, 198, 641, 495, 62, 4906, 62, 2617, 62, 19815, 296, 7, 69, 3712, 18467, 22203, 8, 796, 198, 220, 5345, 22203, 14134, 540, 7, 69, 11, 2401, 7, 69, 828, 5994, 7248, 7, 417, 4906, 7, 19815, 296, 7, 69, 35514, 198, 641, 495, 62, 4906, 62, 2617, 62, 19815, 296, 7, 69, 3712, 15732, 276, 18467, 22203, 38469, 8, 796, 198, 220, 12901, 276, 18467, 24510, 22203, 38469, 7, 69, 13, 20786, 11, 6376, 28, 69, 13, 9630, 8, 198, 641, 495, 62, 4906, 62, 2617, 62, 19815, 296, 7, 69, 3712, 18467, 24510, 22203, 8, 796, 277, 198, 198, 37811, 3082, 1133, 477, 1744, 4961, 11341, 287, 257, 14141, 433, 578, 1479, 16362, 13, 198, 198, 464, 1255, 318, 257, 649, 14141, 433, 578, 1479, 16362, 326, 468, 262, 976, 9421, 1063, 475, 318, 198, 9, 36439, 25666, 1312, 13, 68, 1539, 468, 645, 3294, 13015, 13, 383, 1351, 286, 14900, 17488, 6583, 656, 198, 29289, 352, 286, 262, 2656, 16362, 318, 635, 4504, 13, 198, 37811, 198, 8818, 4961, 1096, 62, 439, 7, 67, 3712, 33, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 30072, 810, 1391, 5944, 11, 28718, 92, 198, 220, 288, 62, 36439, 796, 347, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 92, 3419, 198, 220, 4866, 62, 42632, 0, 7, 67, 62, 36439, 11, 288, 11, 569, 158, 224, 224, 28, 1851, 1063, 158, 224, 224, 7, 67, 4008, 198, 220, 7377, 117, 82, 796, 3975, 7, 1851, 1063, 158, 224, 223, 7, 67, 4008, 466, 334, 198, 220, 220, 220, 1303, 9745, 28181, 13015, 286, 334, 11, 1994, 12, 276, 416, 2496, 37423, 13, 198, 220, 220, 220, 503, 62, 276, 3212, 796, 14230, 1068, 35, 713, 90, 5317, 11, 38469, 90, 5317, 11709, 3419, 198, 220, 220, 220, 329, 304, 287, 4519, 7, 67, 11, 334, 11, 1058, 10677, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 1136, 0, 7, 448, 62, 276, 3212, 11, 256, 13655, 7, 67, 11, 68, 4008, 466, 26, 2558, 21737, 886, 11, 304, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 28701, 1096, 477, 5621, 286, 10730, 13015, 503, 286, 334, 13, 198, 220, 220, 220, 7377, 117, 796, 4686, 7, 672, 158, 224, 223, 7, 67, 11, 334, 4008, 198, 220, 220, 220, 329, 1658, 287, 3815, 7, 448, 62, 276, 3212, 8, 198, 220, 220, 220, 220, 220, 611, 4129, 7, 274, 8, 1875, 352, 198, 220, 220, 220, 220, 220, 220, 220, 43458, 796, 20546, 9250, 19510, 29945, 158, 233, 227, 69, 329, 277, 287, 3488, 7, 67, 11, 1658, 4008, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 117, 796, 13358, 7, 40496, 7509, 7, 9501, 4008, 2343, 233, 227, 7377, 117, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 751, 62, 332, 16886, 158, 224, 223, 0, 7, 67, 62, 36439, 11, 909, 158, 224, 223, 28, 3438, 7, 29945, 4008, 1303, 6624, 334, 198, 220, 220, 220, 329, 357, 85, 11, 1658, 8, 287, 14729, 7, 448, 62, 276, 3212, 8, 198, 220, 220, 220, 220, 220, 751, 62, 14907, 0, 7, 67, 62, 36439, 11, 334, 11, 410, 11, 3488, 28, 29945, 158, 233, 227, 26452, 7, 67, 11, 717, 7, 274, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7377, 117, 198, 220, 886, 198, 220, 357, 67, 62, 36439, 11, 7377, 117, 82, 8, 198, 437, 198, 198, 37811, 35006, 477, 1744, 5166, 654, 287, 257, 14141, 433, 578, 1479, 16362, 13, 198, 198, 464, 7186, 16362, 468, 262, 976, 7679, 352, 9421, 1063, 475, 257, 5457, 5322, 900, 198, 1659, 7679, 362, 9421, 1063, 13, 34398, 362, 9421, 1063, 389, 23791, 618, 484, 423, 3446, 262, 976, 198, 16680, 271, 316, 286, 15909, 9421, 1063, 13, 198, 37811, 198, 8818, 5166, 62, 439, 7, 67, 3712, 33, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 30072, 810, 1391, 5944, 11, 28718, 92, 198, 220, 288, 62, 8957, 1202, 796, 347, 541, 433, 578, 11146, 18683, 6713, 90, 5944, 11, 28718, 92, 3419, 198, 220, 4866, 62, 42632, 0, 7, 67, 62, 8957, 1202, 11, 288, 11, 569, 158, 224, 223, 28, 1851, 1063, 158, 224, 223, 7, 67, 4008, 628, 220, 1303, 28407, 16855, 284, 569, 158, 224, 224, 9421, 1063, 422, 1963, 271, 1039, 286, 15909, 569, 158, 224, 223, 9421, 1063, 13, 198, 220, 503, 8899, 796, 14230, 1068, 35, 713, 90, 38469, 90, 5317, 5512, 38469, 90, 5317, 11709, 3419, 198, 220, 329, 410, 287, 9421, 1063, 158, 224, 224, 7, 67, 8, 198, 220, 220, 220, 4574, 0, 7, 1136, 0, 7, 448, 8899, 11, 3297, 7, 259, 710, 394, 32289, 7, 67, 11, 410, 22305, 466, 26, 2558, 21737, 886, 11, 410, 8, 198, 220, 886, 628, 220, 329, 357, 10677, 82, 11, 256, 70, 912, 8, 287, 14729, 7, 448, 8899, 8, 198, 220, 220, 220, 287, 62, 276, 3212, 796, 3975, 7, 25297, 912, 8, 466, 410, 198, 220, 220, 220, 220, 220, 3297, 7, 1939, 738, 7, 67, 11, 410, 11, 1058, 83, 13655, 828, 416, 28, 68, 3784, 10677, 7, 67, 11, 68, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 4129, 7, 25297, 912, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 410, 796, 751, 62, 332, 16886, 158, 224, 224, 0, 7, 67, 62, 8957, 1202, 11, 909, 158, 224, 224, 28, 672, 158, 224, 224, 7, 67, 11, 691, 7, 25297, 912, 22305, 198, 220, 220, 220, 220, 220, 751, 62, 276, 3212, 0, 7, 67, 62, 8957, 1202, 11, 12351, 82, 11, 6070, 7, 85, 11, 4129, 7, 10677, 82, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3488, 28, 26452, 7, 67, 11, 691, 7, 259, 62, 276, 3212, 22305, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 40426, 796, 1720, 7, 50, 38469, 7, 672, 158, 224, 224, 7, 67, 11, 256, 70, 912, 26513, 4008, 198, 220, 220, 220, 220, 220, 410, 796, 751, 62, 332, 16886, 158, 224, 224, 0, 7, 67, 62, 8957, 1202, 11, 909, 158, 224, 224, 28, 672, 7, 1676, 67, 4008, 198, 220, 220, 220, 220, 220, 329, 357, 72, 11, 84, 8, 287, 27056, 378, 7, 10677, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 5166, 7, 1676, 67, 11, 3488, 7, 67, 11, 651, 9630, 12195, 259, 62, 276, 3212, 11, 1312, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 751, 62, 14907, 0, 7, 67, 62, 8957, 1202, 11, 334, 11, 410, 11, 3488, 28, 69, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 288, 62, 8957, 1202, 198, 437, 198, 198, 37811, 27272, 286, 2276, 16362, 286, 4463, 50, 1039, 29231, 416, 1720, 12, 8524, 12, 24455, 13, 198, 198, 6214, 4600, 19352, 896, 13, 5377, 1930, 578, 42940, 1891, 63, 329, 257, 845, 2092, 5103, 13, 198, 37811, 198, 7249, 4463, 7248, 5377, 1930, 578, 39184, 90, 5944, 27, 25, 18467, 7248, 11, 6031, 6713, 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, 327, 505, 27, 25, 15205, 271, 6839, 90, 5944, 5512, 1041, 67, 27, 25, 15667, 90, 5944, 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, 554, 565, 27, 25, 18467, 22203, 92, 1279, 25, 27741, 39184, 90, 5944, 11, 18683, 6713, 92, 198, 220, 16362, 3712, 18683, 6713, 198, 220, 27763, 3712, 34, 505, 198, 220, 40426, 3712, 2964, 67, 198, 220, 13358, 3712, 818, 565, 1303, 554, 4717, 329, 262, 366, 41684, 12, 40496, 7509, 1, 287, 2276, 10451, 13, 198, 437, 198, 198, 32374, 7, 67, 3712, 11146, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 4179, 7, 18467, 24510, 24629, 2715, 7, 67, 4008, 198, 198, 8818, 4179, 7, 37, 3712, 24629, 2715, 90, 27, 25, 18467, 21979, 90, 5317, 5512, 27, 25, 6030, 21979, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 30072, 198, 220, 1303, 36965, 262, 2276, 10451, 329, 7095, 287, 5345, 357, 3123, 259, 1706, 11, 1946, 11, 14392, 21743, 198, 220, 1303, 17003, 11, 17934, 642, 13, 16, 13, 1828, 1220, 7889, 341, 642, 13, 1433, 737, 770, 2446, 318, 2829, 290, 1277, 11, 198, 220, 1303, 475, 4457, 30904, 0, 198, 220, 449, 796, 2401, 7, 37, 8, 198, 220, 40426, 796, 1720, 7, 8899, 7, 87, 4613, 909, 62, 8899, 7, 37, 11, 2124, 828, 909, 62, 8612, 2024, 7, 41, 22305, 198, 220, 299, 11, 18074, 222, 82, 796, 4129, 7, 672, 7, 1676, 67, 36911, 7405, 7, 1676, 67, 8, 198, 220, 7377, 117, 796, 4463, 22203, 7, 24455, 7, 16, 25, 77, 8, 466, 1312, 198, 220, 220, 220, 477, 7, 26452, 62, 8612, 2024, 7, 41, 4008, 466, 277, 198, 220, 220, 220, 220, 220, 264, 11, 256, 11, 289, 796, 2401, 7, 41, 11, 277, 828, 14873, 296, 7, 41, 11, 277, 828, 3488, 62, 8899, 7, 37, 11, 277, 8, 198, 220, 220, 220, 220, 220, 289, 7, 46582, 82, 58, 82, 16151, 72, 4008, 6624, 18074, 222, 82, 58, 83, 16151, 72, 8, 198, 220, 220, 220, 886, 198, 220, 886, 11, 299, 8, 198, 220, 27763, 796, 7854, 271, 6839, 7, 3438, 7, 29945, 828, 3975, 7, 87, 4613, 7377, 117, 158, 233, 227, 46582, 82, 58, 87, 4357, 909, 62, 8612, 2024, 7, 41, 22305, 198, 220, 4463, 7248, 5377, 1930, 578, 39184, 7, 37, 11, 27763, 11, 40426, 11, 7377, 117, 8, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 18467, 7248, 5377, 1930, 578, 39184, 11, 27763, 3712, 15205, 271, 6839, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 7377, 117, 796, 2824, 7, 2475, 13, 259, 565, 8, 198, 220, 289, 796, 10112, 7, 2475, 13, 1676, 67, 11, 27763, 8, 198, 220, 4463, 22203, 7, 5317, 58, 8807, 7, 12947, 82, 9741, 7, 29945, 11, 289, 7, 72, 22305, 329, 1312, 287, 2401, 7, 71, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40167, 7, 49180, 828, 909, 7, 2475, 4008, 198, 437, 198, 198, 37811, 27272, 286, 27454, 5621, 9569, 355, 257, 3084, 13, 198, 198, 7149, 4179, 286, 27454, 5621, 460, 307, 18061, 1146, 9569, 355, 257, 3084, 198, 26933, 63, 33349, 934, 7248, 63, 16151, 31, 5420, 4008, 3025, 15180, 389, 262, 7405, 286, 262, 4179, 27763, 290, 3025, 198, 8516, 6053, 284, 4847, 286, 262, 4179, 2134, 13, 1675, 5678, 428, 3084, 422, 281, 198, 282, 1493, 29231, 4179, 11, 869, 4600, 33349, 934, 39184, 7, 3712, 23839, 39184, 26, 2644, 8, 44646, 383, 5721, 198, 14933, 286, 262, 3084, 389, 1813, 416, 262, 11902, 4578, 4600, 14933, 44646, 198, 198, 818, 428, 7400, 934, 1296, 11, 11524, 262, 10112, 3119, 286, 262, 4179, 318, 20861, 198, 20777, 340, 318, 655, 12777, 11347, 13, 6660, 11, 428, 10552, 460, 307, 4465, 618, 262, 198, 14986, 4179, 11862, 857, 407, 1104, 6942, 3586, 286, 262, 10112, 198, 26745, 13, 1550, 262, 584, 1021, 11, 428, 10552, 468, 262, 21407, 286, 198, 8612, 453, 1642, 262, 5002, 2099, 286, 262, 4179, 900, 517, 8253, 13, 198, 37811, 198, 9979, 16904, 934, 39184, 796, 27272, 90, 27, 25, 33349, 934, 7248, 92, 198, 198, 8818, 16904, 934, 39184, 7, 2475, 3712, 23839, 39184, 26, 3891, 28, 22366, 8, 198, 220, 18074, 222, 82, 796, 7405, 7, 2475, 8, 198, 220, 3891, 796, 318, 22366, 7, 14933, 8, 5633, 357, 16, 25, 13664, 7, 46582, 82, 4008, 1058, 3891, 198, 220, 3891, 796, 309, 29291, 7, 28665, 62, 3672, 7, 3672, 8, 329, 1438, 287, 3891, 8, 198, 220, 3084, 796, 16904, 934, 7248, 7, 45, 2434, 51, 29291, 90, 14933, 92, 7, 51, 29291, 7, 8899, 7, 33327, 11, 18074, 222, 82, 35514, 198, 220, 27763, 796, 7854, 271, 6839, 7, 11487, 11, 3975, 7, 46582, 82, 11, 1123, 9630, 7, 46582, 82, 4008, 466, 18074, 222, 11, 1312, 198, 220, 220, 220, 4463, 22203, 7, 808, 4613, 33220, 13, 1136, 28665, 7, 808, 11, 1312, 828, 3084, 11, 14873, 296, 7, 46582, 4008, 198, 220, 886, 8, 198, 220, 27272, 7, 2475, 13, 10989, 6713, 11, 27763, 8, 198, 437, 198, 198, 8818, 10112, 7, 2475, 3712, 39184, 90, 27, 25, 33349, 934, 7248, 90, 10962, 11, 25166, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27763, 3712, 15205, 271, 6839, 8, 810, 1391, 10962, 11, 25166, 92, 198, 220, 43458, 796, 309, 29291, 7, 1455, 82, 7, 49180, 4008, 198, 220, 4463, 22203, 7, 87, 4613, 11314, 7, 8899, 7, 69, 4613, 277, 7, 87, 828, 43458, 36911, 40167, 7, 49180, 828, 909, 7, 2475, 4008, 198, 437, 198, 198, 28665, 62, 3672, 7, 3672, 8, 796, 38357, 7, 3672, 8, 198, 28665, 62, 3672, 7, 72, 3712, 46541, 8, 796, 38357, 7203, 87, 3, 72, 4943, 1303, 16766, 4277, 355, 6060, 35439, 13, 20362, 13, 198, 198, 2, 1623, 320, 896, 198, 7804, 2235, 198, 198, 2, 1623, 320, 896, 287, 311, 7750, 7, 18467, 7248, 8, 198, 2, 22369, 12, 198, 198, 4033, 320, 270, 7, 55, 82, 3712, 40613, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 1623, 320, 270, 7, 55, 82, 11, 9447, 586, 291, 2117, 272, 90, 15, 92, 7, 18467, 7248, 7, 15, 22305, 198, 198, 8818, 10112, 7, 4033, 320, 3712, 24243, 90, 27, 25, 18467, 7248, 90, 5317, 92, 5512, 8954, 505, 3712, 12310, 586, 291, 2117, 272, 90, 15, 30072, 198, 220, 14873, 796, 40167, 7, 66, 420, 505, 8, 198, 220, 4463, 24510, 22203, 7, 50, 38469, 90, 15, 11, 417, 4906, 7, 19815, 38165, 22784, 14873, 8, 198, 437, 198, 198, 4033, 320, 270, 7, 55, 82, 3712, 29974, 10565, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 951, 320, 270, 7, 55, 82, 11, 6093, 1096, 5216, 320, 270, 28955, 198, 198, 8818, 951, 320, 270, 7, 55, 82, 3712, 10267, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 285, 11, 299, 796, 4129, 12195, 55, 82, 8, 198, 220, 7377, 117, 16, 796, 4463, 22203, 7, 16, 25, 76, 11, 285, 11, 285, 10, 77, 8, 198, 220, 7377, 117, 17, 796, 4463, 22203, 7, 76, 10, 16, 25, 76, 10, 77, 11, 299, 11, 285, 10, 77, 8, 198, 220, 1623, 320, 270, 7, 55, 82, 11, 327, 2117, 272, 7, 29945, 16, 11, 7377, 117, 17, 4008, 198, 437, 198, 198, 8818, 10112, 7, 4033, 320, 3712, 33, 3219, 13379, 2076, 310, 90, 27, 25, 18467, 7248, 90, 5317, 92, 5512, 8954, 505, 3712, 34, 2117, 272, 8, 198, 220, 277, 11, 308, 796, 8954, 505, 198, 220, 4463, 24510, 22203, 7, 85, 9246, 7, 33327, 7, 69, 828, 2824, 7, 70, 36911, 909, 7, 4033, 320, 828, 40167, 7, 66, 420, 505, 4008, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 55, 82, 3712, 15642, 8374, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 36545, 796, 4129, 12195, 55, 82, 8, 198, 220, 299, 796, 2160, 7, 5907, 8, 198, 220, 49005, 796, 685, 15, 11, 66, 5700, 388, 7, 5907, 8, 22345, 198, 220, 7377, 117, 82, 796, 685, 18467, 22203, 19510, 16, 25, 5907, 58, 73, 12962, 764, 10, 49005, 58, 73, 4357, 5907, 58, 73, 4357, 77, 8, 329, 474, 287, 352, 25, 13664, 7, 5907, 15437, 198, 220, 1623, 320, 270, 7, 55, 82, 11, 7854, 291, 2117, 272, 7, 18467, 7248, 7, 77, 828, 7377, 117, 82, 4008, 198, 437, 198, 198, 8818, 10112, 7, 4033, 320, 3712, 13379, 2076, 310, 90, 27, 25, 18467, 7248, 90, 5317, 92, 5512, 8954, 505, 3712, 15205, 291, 2117, 272, 8, 198, 220, 14873, 796, 40167, 7, 66, 420, 505, 8, 198, 220, 4463, 24510, 22203, 7, 8899, 445, 7234, 7, 33327, 11, 410, 9246, 11, 8954, 505, 11, 2315, 28, 417, 4906, 7, 19815, 8, 21737, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 909, 7, 4033, 320, 828, 14873, 8, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 24874, 3712, 10044, 29363, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 277, 11, 308, 796, 5166, 198, 220, 285, 11, 299, 796, 4129, 7, 3438, 7, 24874, 36911, 4129, 7, 19815, 296, 7, 24874, 4008, 198, 220, 5621, 796, 2558, 7279, 73, 1563, 50, 1039, 7, 77, 8, 198, 220, 329, 1312, 287, 352, 25, 76, 198, 220, 220, 220, 6441, 0, 7, 28709, 11, 277, 7, 72, 828, 308, 7, 72, 4008, 198, 220, 886, 198, 220, 1623, 320, 270, 7, 24874, 11, 9447, 586, 291, 2117, 272, 90, 16, 92, 7, 421, 313, 1153, 62, 16302, 295, 7, 28709, 22305, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 1845, 64, 3712, 10044, 29363, 44, 13425, 6583, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 2488, 30493, 5145, 271, 28920, 7, 1845, 64, 8, 198, 220, 277, 16, 11, 2030, 301, 796, 31215, 58, 16, 4357, 31215, 58, 17, 25, 437, 60, 198, 220, 285, 11, 299, 796, 4129, 7, 3438, 7, 1845, 64, 36911, 4129, 7, 19815, 296, 7, 1845, 64, 4008, 198, 220, 5621, 796, 2558, 7279, 73, 1563, 50, 1039, 7, 77, 8, 198, 220, 329, 1312, 287, 352, 25, 76, 198, 220, 220, 220, 329, 277, 287, 2030, 301, 198, 220, 220, 220, 220, 220, 6441, 0, 7, 28709, 11, 277, 16, 7, 72, 828, 277, 7, 72, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 1623, 320, 270, 7, 1845, 64, 11, 9447, 586, 291, 2117, 272, 90, 16, 92, 7, 421, 313, 1153, 62, 16302, 295, 7, 28709, 22305, 198, 437, 198, 198, 8818, 10112, 7, 1073, 27363, 3712, 34, 2577, 13255, 7509, 90, 27, 25, 18467, 7248, 90, 5317, 92, 5512, 8954, 505, 3712, 12310, 586, 291, 2117, 272, 90, 16, 30072, 198, 220, 1208, 62, 1462, 62, 421, 313, 1153, 7, 1676, 73, 7, 1073, 27363, 828, 691, 7, 66, 420, 505, 4008, 198, 437, 198, 198, 37811, 13610, 20128, 3975, 18074, 222, 25, 1395, 15168, 1395, 14, 24861, 120, 422, 18398, 286, 1395, 13, 198, 37811, 198, 8818, 23611, 1153, 62, 16302, 295, 7, 28709, 3712, 5317, 7279, 73, 1563, 50, 1039, 8, 198, 220, 289, 796, 685, 1064, 62, 15763, 0, 7, 28709, 11, 1312, 8, 329, 1312, 287, 352, 25, 13664, 7, 28709, 8, 2361, 198, 220, 11135, 796, 3748, 0, 7, 30619, 7, 71, 4008, 198, 220, 4463, 22203, 26933, 2989, 82, 9741, 11085, 7, 19150, 11, 374, 8, 329, 374, 287, 289, 16589, 4129, 7, 19150, 4008, 198, 437, 198, 198, 37811, 11259, 289, 25, 1395, 15168, 575, 11, 1208, 284, 23611, 1153, 10662, 25, 1395, 14, 93, 15168, 575, 739, 20128, 18074, 222, 25, 1395, 15168, 1395, 14, 93, 13, 198, 37811, 198, 8818, 1208, 62, 1462, 62, 421, 313, 1153, 7, 46582, 3712, 18467, 22203, 90, 5317, 11, 5317, 5512, 289, 3712, 18467, 22203, 90, 5317, 11, 5317, 30072, 198, 220, 2488, 30493, 2401, 7, 46582, 8, 6624, 2401, 7, 71, 8, 198, 220, 10662, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 19815, 296, 7, 46582, 22305, 198, 220, 329, 1312, 287, 2401, 7, 71, 8, 198, 220, 220, 220, 474, 796, 18074, 222, 7, 72, 8, 198, 220, 220, 220, 611, 10662, 58, 73, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 10662, 58, 73, 60, 796, 289, 7, 72, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 10662, 58, 73, 60, 6624, 289, 7, 72, 8, 8614, 4049, 7203, 4507, 313, 1153, 3975, 286, 951, 320, 270, 318, 2801, 12, 23211, 4943, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 597, 7, 855, 7, 15, 828, 10662, 8, 11405, 4049, 7203, 16775, 295, 3975, 318, 407, 969, 752, 425, 4943, 198, 220, 4463, 22203, 7, 80, 11, 14873, 296, 7, 71, 4008, 198, 437, 198, 198, 8818, 1208, 62, 1462, 62, 421, 313, 1153, 7, 46582, 3712, 18467, 22203, 90, 5317, 11, 5317, 5512, 289, 3712, 18467, 24510, 22203, 90, 5317, 30072, 198, 220, 2488, 30493, 2401, 7, 46582, 8, 6624, 2401, 7, 71, 8, 198, 220, 10662, 796, 20650, 90, 38176, 90, 4366, 90, 417, 4906, 7, 19815, 296, 7, 71, 4008, 5512, 18465, 11709, 7, 22366, 11, 4129, 7, 19815, 296, 7, 46582, 22305, 198, 220, 329, 1312, 287, 2401, 7, 71, 8, 198, 220, 220, 220, 474, 796, 18074, 222, 7, 72, 8, 198, 220, 220, 220, 611, 318, 22366, 7, 80, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 10662, 58, 73, 60, 796, 2773, 7, 71, 7, 72, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1223, 7, 80, 58, 73, 12962, 6624, 289, 7, 72, 8, 8614, 4049, 7203, 4507, 313, 1153, 3975, 286, 951, 320, 270, 318, 2801, 12, 23211, 4943, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 597, 7, 271, 22366, 11, 10662, 8, 11405, 4049, 7203, 16775, 295, 3975, 318, 407, 969, 752, 425, 4943, 198, 220, 4463, 24510, 22203, 7, 8899, 7, 18927, 11, 10662, 828, 14873, 296, 7, 71, 4008, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 12626, 3712, 15205, 271, 6839, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 951, 320, 270, 7, 12626, 11, 3082, 577, 13379, 2076, 310, 34, 2577, 13255, 7509, 28955, 198, 437, 198, 198, 37811, 1623, 320, 270, 286, 2276, 16362, 286, 4463, 50, 1039, 29231, 416, 2243, 2076, 310, 12, 8524, 12, 421, 313, 1153, 13, 198, 198, 6214, 4600, 19352, 896, 13, 5377, 1930, 578, 49222, 448, 63, 329, 257, 845, 2092, 5103, 13, 198, 37811, 198, 7249, 4463, 7248, 5377, 1930, 578, 5216, 320, 270, 90, 5944, 27, 25, 18467, 7248, 11, 6031, 6713, 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, 18490, 505, 27, 25, 15205, 291, 2117, 272, 90, 5944, 5512, 6955, 14892, 27, 25, 13379, 2076, 310, 90, 5944, 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, 1041, 73, 27, 25, 18467, 22203, 92, 1279, 25, 27741, 5216, 320, 270, 90, 5944, 11, 18683, 6713, 92, 198, 220, 16362, 3712, 18683, 6713, 198, 220, 8954, 505, 3712, 34, 420, 505, 198, 220, 2243, 14892, 3712, 13379, 14892, 198, 220, 386, 73, 3712, 2964, 73, 1303, 4935, 295, 329, 262, 366, 41684, 12, 1073, 40496, 7509, 1, 287, 2276, 10451, 13, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 67, 3712, 33, 541, 433, 578, 11146, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 1303, 1081, 287, 257, 4574, 448, 11, 428, 2446, 7048, 326, 477, 5563, 287, 7679, 352, 423, 198, 220, 1303, 28181, 17488, 6583, 523, 326, 484, 460, 307, 15009, 422, 262, 2243, 2076, 310, 13, 198, 220, 2488, 30493, 5145, 1092, 7, 271, 28920, 7, 1939, 738, 7, 67, 11, 334, 11, 1058, 10677, 4008, 329, 334, 287, 9421, 1063, 158, 224, 223, 7, 67, 4008, 198, 220, 2243, 14892, 796, 2243, 2076, 310, 7, 672, 158, 224, 224, 7, 67, 4008, 198, 220, 299, 11, 7377, 117, 82, 796, 4129, 7, 672, 7, 22163, 14892, 36911, 7405, 7, 22163, 14892, 8, 198, 220, 5621, 796, 2558, 7279, 73, 1563, 50, 1039, 7, 77, 8, 198, 220, 329, 334, 287, 9421, 1063, 158, 224, 223, 7, 67, 8, 198, 220, 220, 220, 503, 62, 276, 3212, 796, 4519, 7, 67, 11, 334, 11, 1058, 10677, 8, 198, 220, 220, 220, 329, 357, 68, 16, 11, 304, 17, 8, 287, 19974, 7, 448, 62, 276, 3212, 58, 16, 25, 437, 12, 16, 4357, 503, 62, 276, 3212, 58, 17, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 289, 16, 11, 289, 17, 796, 3488, 7, 67, 11, 304, 16, 828, 3488, 7, 67, 11, 304, 17, 8, 198, 220, 220, 220, 220, 220, 7377, 117, 16, 11, 7377, 117, 17, 796, 7377, 117, 82, 58, 83, 13655, 7, 67, 11, 304, 16, 8, 4357, 7377, 117, 82, 58, 83, 13655, 7, 67, 11, 304, 17, 15437, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 909, 158, 224, 223, 7, 67, 11, 334, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6441, 0, 7, 28709, 11, 7377, 117, 16, 7, 71, 16, 7, 72, 36911, 7377, 117, 17, 7, 71, 17, 7, 72, 22305, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 18074, 222, 796, 23611, 1153, 62, 16302, 295, 7, 28709, 8, 198, 220, 8954, 505, 796, 7854, 291, 2117, 272, 7, 19815, 296, 7, 46582, 828, 685, 7377, 117, 82, 58, 72, 60, 158, 233, 227, 46582, 329, 1312, 287, 9421, 1063, 158, 224, 224, 7, 67, 8, 33761, 198, 220, 4463, 7248, 5377, 1930, 578, 5216, 320, 270, 7, 67, 11, 8954, 505, 11, 2243, 14892, 11, 18074, 222, 8, 198, 437, 198, 198, 4033, 320, 270, 7, 67, 3712, 11146, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 951, 320, 270, 7, 18467, 24510, 24629, 2715, 7, 67, 4008, 198, 198, 8818, 951, 320, 270, 7, 37, 3712, 24629, 2715, 90, 27, 25, 18467, 21979, 90, 5317, 5512, 27, 25, 6030, 21979, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 30072, 198, 220, 1303, 36965, 262, 2276, 10451, 329, 951, 320, 896, 287, 5345, 357, 3123, 259, 1706, 11, 1946, 11, 14392, 21743, 198, 220, 1303, 17003, 11, 17934, 642, 13, 17, 13, 1433, 737, 198, 220, 449, 796, 2401, 7, 37, 8, 198, 220, 2243, 14892, 796, 2243, 2076, 310, 7, 8899, 7, 87, 4613, 909, 62, 8899, 7, 37, 11, 2124, 828, 909, 62, 8612, 2024, 7, 41, 22305, 198, 220, 299, 11, 7377, 117, 82, 796, 4129, 7, 672, 7, 22163, 14892, 36911, 7405, 7, 22163, 14892, 8, 198, 220, 5621, 796, 2558, 7279, 73, 1563, 50, 1039, 7, 77, 8, 198, 220, 329, 277, 287, 3488, 62, 8612, 2024, 7, 41, 8, 198, 220, 220, 220, 264, 11, 256, 11, 289, 796, 2401, 7, 41, 11, 277, 828, 14873, 296, 7, 41, 11, 277, 828, 3488, 62, 8899, 7, 37, 11, 277, 8, 198, 220, 220, 220, 329, 1312, 287, 2401, 7, 71, 8, 198, 220, 220, 220, 220, 220, 6441, 0, 7, 28709, 11, 7377, 117, 82, 58, 82, 16151, 72, 828, 7377, 117, 82, 58, 83, 16151, 71, 7, 72, 22305, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 18074, 222, 796, 23611, 1153, 62, 16302, 295, 7, 28709, 8, 198, 220, 8954, 505, 796, 7854, 291, 2117, 272, 7, 19815, 296, 7, 46582, 828, 3975, 7, 87, 4613, 7377, 117, 82, 58, 87, 60, 158, 233, 227, 46582, 11, 909, 62, 8612, 2024, 7, 41, 22305, 198, 220, 4463, 7248, 5377, 1930, 578, 5216, 320, 270, 7, 37, 11, 8954, 505, 11, 2243, 14892, 11, 18074, 222, 8, 198, 437, 198, 198, 8818, 10112, 7, 4033, 320, 3712, 18467, 7248, 5377, 1930, 578, 5216, 320, 270, 11, 8954, 505, 3712, 15205, 291, 2117, 272, 8, 198, 220, 289, 796, 10112, 7, 4033, 320, 13, 22163, 14892, 11, 8954, 505, 8, 198, 220, 1208, 62, 1462, 62, 421, 313, 1153, 7, 4033, 320, 13, 1676, 73, 11, 289, 8, 198, 437, 198, 198, 2, 1623, 320, 896, 351, 3891, 198, 2, 19351, 198, 198, 37811, 3082, 1133, 951, 320, 270, 286, 27454, 5621, 3025, 4847, 389, 3616, 2759, 3706, 13, 198, 198, 1212, 3074, 2331, 284, 307, 2603, 46558, 555, 47914, 475, 318, 14547, 198, 18049, 13, 383, 951, 320, 270, 318, 29231, 416, 7741, 284, 262, 18328, 286, 12429, 18467, 7248, 1174, 198, 7, 63, 18467, 7248, 90, 5317, 92, 63, 8, 290, 262, 3891, 389, 8686, 12979, 11, 1708, 617, 6397, 198, 1102, 16593, 290, 751, 15940, 810, 3306, 284, 3368, 1438, 21022, 13, 198, 37811, 198, 7249, 34441, 5216, 320, 270, 1279, 25, 1623, 320, 270, 2348, 42289, 886, 198, 198, 8818, 951, 320, 270, 7, 3712, 6030, 90, 27, 25, 51, 29291, 90, 27, 25, 18467, 7248, 90, 27, 25, 7149, 11, 51, 5512, 27, 25, 18467, 22203, 92, 5512, 288, 8, 810, 198, 220, 220, 220, 1391, 51, 1279, 25, 4479, 90, 13940, 23650, 11, 23839, 10100, 11709, 198, 220, 951, 320, 270, 7, 67, 11, 34441, 5216, 320, 270, 28955, 198, 437, 198, 198, 8818, 951, 320, 270, 7, 67, 3712, 13715, 33383, 11146, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 27, 25, 7149, 11, 51, 5512, 28718, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 70, 3712, 45, 2434, 5216, 320, 270, 8, 810, 1391, 51, 11, 28718, 92, 198, 220, 1303, 2297, 25648, 284, 262, 1339, 286, 14141, 433, 578, 1479, 37067, 318, 257, 1643, 16931, 11, 475, 379, 1551, 198, 220, 1303, 1262, 4600, 13409, 1096, 5216, 320, 270, 63, 2174, 815, 3368, 617, 10319, 287, 24531, 22139, 13, 198, 220, 951, 320, 270, 7, 33, 541, 433, 578, 11146, 18683, 6713, 90, 18467, 7248, 90, 27, 25, 7149, 11, 51, 5512, 28718, 92, 7, 67, 828, 435, 70, 8, 198, 437, 198, 8818, 951, 320, 270, 7, 67, 3712, 33, 541, 433, 578, 11146, 18683, 6713, 90, 27, 25, 18467, 7248, 90, 27, 25, 7149, 11, 51, 92, 5512, 7904, 45, 2434, 5216, 320, 270, 8, 810, 309, 198, 220, 1303, 3082, 1133, 951, 320, 270, 286, 16362, 287, 262, 18328, 286, 4463, 7248, 357, 63, 18467, 7248, 90, 5317, 92, 63, 737, 198, 220, 1303, 5740, 25, 645, 2854, 561, 307, 8618, 416, 1262, 4600, 7279, 73, 1563, 50, 1039, 90, 51, 92, 63, 422, 198, 220, 1303, 6060, 44909, 942, 13, 20362, 780, 340, 318, 655, 257, 29908, 1088, 4600, 5317, 7279, 73, 1563, 50, 1039, 63, 326, 198, 220, 1303, 20947, 12188, 262, 845, 976, 36525, 326, 356, 779, 2174, 13, 198, 220, 5621, 158, 224, 223, 62, 82, 7750, 796, 3975, 7, 2617, 4613, 17773, 1096, 7, 2617, 11, 6376, 28, 9562, 828, 909, 158, 224, 223, 7, 67, 4008, 198, 220, 5621, 158, 224, 224, 62, 82, 7750, 796, 3975, 7, 2617, 4613, 17773, 1096, 7, 2617, 11, 6376, 28, 7942, 828, 909, 158, 224, 224, 7, 67, 4008, 198, 220, 1257, 6359, 796, 3975, 7, 276, 3212, 7, 67, 4008, 466, 304, 198, 220, 220, 220, 17773, 1096, 7, 26452, 7, 67, 11, 68, 828, 5621, 158, 224, 223, 62, 82, 7750, 58, 10677, 7, 67, 11, 68, 8, 4357, 5621, 158, 224, 224, 62, 82, 7750, 58, 83, 13655, 7, 67, 11, 68, 8, 12962, 198, 220, 886, 198, 220, 288, 62, 82, 7750, 796, 347, 541, 433, 578, 11146, 18683, 6713, 90, 18467, 7248, 5317, 11, 417, 4906, 7, 12543, 6359, 38165, 3419, 198, 220, 751, 62, 1851, 1063, 158, 224, 223, 0, 7, 67, 62, 82, 7750, 11, 299, 85, 158, 224, 223, 7, 67, 828, 909, 158, 224, 223, 28, 3438, 12195, 28709, 158, 224, 223, 62, 82, 7750, 4008, 198, 220, 751, 62, 1851, 1063, 158, 224, 224, 0, 7, 67, 62, 82, 7750, 11, 299, 85, 158, 224, 224, 7, 67, 828, 909, 158, 224, 224, 28, 3438, 12195, 28709, 158, 224, 224, 62, 82, 7750, 4008, 198, 220, 751, 62, 276, 3212, 0, 7, 67, 62, 82, 7750, 11, 12351, 7, 67, 828, 256, 13655, 7, 67, 828, 3488, 28, 12543, 6359, 8, 198, 220, 951, 320, 62, 82, 7750, 796, 951, 320, 270, 7, 67, 62, 82, 7750, 11, 6093, 1096, 5216, 320, 270, 28955, 628, 220, 1303, 2195, 570, 4847, 14, 14933, 284, 262, 951, 320, 270, 900, 13, 198, 220, 9766, 907, 796, 20650, 90, 51, 92, 7, 917, 891, 11, 4129, 7, 1758, 87, 7, 4033, 320, 62, 82, 7750, 22305, 198, 220, 329, 357, 29945, 11, 575, 8, 287, 19974, 7, 4033, 320, 62, 82, 7750, 11, 5621, 158, 224, 224, 62, 82, 7750, 8, 198, 220, 220, 220, 329, 1312, 287, 2401, 7, 56, 8, 198, 220, 220, 220, 220, 220, 9766, 907, 58, 29945, 7, 72, 15437, 796, 575, 7, 72, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 1303, 383, 15879, 815, 1541, 307, 5901, 11, 475, 284, 4646, 9277, 20040, 1272, 356, 4702, 198, 220, 1303, 3891, 422, 262, 7679, 352, 5621, 8797, 1744, 13, 1114, 1672, 11, 618, 14492, 257, 198, 220, 1303, 4574, 448, 11, 356, 4702, 3891, 422, 262, 40167, 286, 269, 2117, 272, 284, 3891, 422, 262, 3625, 13, 198, 220, 329, 357, 84, 11, 1395, 8, 287, 19974, 7, 1851, 1063, 158, 224, 223, 7, 67, 62, 82, 7750, 828, 5621, 158, 224, 223, 62, 82, 7750, 8, 198, 220, 220, 220, 304, 796, 717, 7, 1939, 738, 7, 67, 62, 82, 7750, 11, 334, 11, 1058, 10677, 4008, 198, 220, 220, 220, 277, 11, 7377, 117, 796, 3488, 7, 67, 62, 82, 7750, 11, 304, 828, 7405, 7, 4033, 320, 62, 82, 7750, 38381, 83, 13655, 7, 67, 62, 82, 7750, 11, 304, 15437, 198, 220, 220, 220, 329, 1312, 287, 2401, 7, 55, 8, 198, 220, 220, 220, 220, 220, 9766, 907, 58, 29945, 7, 69, 7, 72, 4008, 60, 796, 1395, 7, 72, 8, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 1303, 27405, 4559, 21022, 287, 37042, 1351, 286, 3891, 13, 198, 220, 3748, 62, 1525, 62, 12985, 2667, 0, 7, 11129, 907, 8, 628, 220, 7377, 117, 82, 796, 3975, 7, 4033, 320, 62, 82, 7750, 11, 5621, 158, 224, 224, 62, 82, 7750, 8, 466, 7377, 117, 11, 575, 198, 220, 220, 220, 4463, 22203, 7, 35, 713, 7, 56, 7, 72, 8, 5218, 9766, 907, 58, 29945, 7, 72, 15437, 329, 1312, 287, 2401, 7, 56, 36911, 4463, 7248, 7, 11129, 907, 4008, 198, 220, 886, 198, 220, 1623, 320, 270, 7, 67, 11, 7854, 291, 2117, 272, 7, 18467, 7248, 7, 11129, 907, 828, 7377, 117, 82, 4008, 198, 437, 198, 198, 8818, 17773, 1096, 7, 2617, 3712, 18467, 7248, 26, 6376, 3712, 33, 970, 28, 9562, 8, 198, 220, 1303, 44855, 11682, 25, 775, 815, 1104, 4600, 34642, 62, 9630, 63, 290, 340, 815, 307, 973, 994, 13, 198, 220, 4463, 24510, 22203, 7, 33327, 7, 2617, 828, 900, 11, 6376, 28, 9630, 8, 198, 437, 198, 8818, 17773, 1096, 7, 69, 3712, 18467, 22203, 11, 1395, 11, 575, 8, 198, 220, 4463, 22203, 7, 72, 4613, 691, 7, 3866, 9060, 7, 56, 11, 277, 7, 55, 7, 72, 22305, 828, 2401, 7, 55, 828, 2401, 7, 56, 4008, 198, 437, 198, 198, 37811, 6889, 1351, 286, 4847, 3748, 416, 4375, 15940, 611, 3306, 13, 198, 198, 1532, 262, 4847, 389, 1541, 3748, 11, 484, 481, 407, 307, 48865, 13, 198, 37811, 198, 8818, 3748, 62, 1525, 62, 12985, 2667, 0, 7, 11129, 907, 3712, 23839, 38469, 90, 51, 19629, 7621, 28, 12286, 62, 12985, 8, 810, 309, 198, 220, 7621, 62, 9127, 796, 360, 713, 90, 51, 11, 5317, 92, 3419, 198, 220, 329, 2124, 287, 9766, 907, 198, 220, 220, 220, 7621, 62, 9127, 58, 87, 60, 796, 468, 2539, 7, 12985, 62, 9127, 11, 2124, 8, 5633, 352, 1058, 657, 198, 220, 886, 198, 220, 329, 357, 72, 11, 2124, 8, 287, 27056, 378, 7, 11129, 907, 8, 198, 220, 220, 220, 357, 73, 796, 7621, 62, 9127, 58, 87, 12962, 1875, 657, 8614, 2555, 198, 220, 220, 220, 30509, 796, 7621, 7, 87, 11, 474, 8, 198, 220, 220, 220, 2488, 30493, 5145, 10134, 2539, 7, 12985, 62, 9127, 11, 30509, 8, 1303, 2094, 470, 5358, 351, 2656, 9766, 907, 0, 198, 220, 220, 220, 9766, 907, 58, 72, 60, 796, 30509, 198, 220, 220, 220, 7621, 62, 9127, 58, 87, 60, 15853, 352, 198, 220, 886, 198, 220, 9766, 907, 198, 437, 198, 198, 12286, 62, 12985, 7, 87, 3712, 13940, 23650, 11, 256, 8, 796, 38357, 7, 87, 11, 25113, 1600, 256, 8, 198, 12286, 62, 12985, 7, 87, 3712, 23839, 10100, 11, 256, 8, 796, 4731, 7, 87, 11, 25113, 1600, 256, 8, 198, 198, 2, 23691, 448, 1224, 902, 198, 2, 19351, 198, 198, 37811, 3082, 1133, 257, 4574, 448, 16829, 286, 27454, 5621, 11, 611, 1744, 13, 198, 198, 15056, 5499, 7559, 75, 25, 314, 15168, 406, 15506, 290, 7559, 76, 25, 406, 15168, 402, 15506, 284, 1296, 257, 4574, 448, 6616, 628, 220, 220, 220, 300, 198, 220, 406, 17804, 238, 314, 198, 76, 17804, 241, 220, 220, 17804, 241, 74, 198, 220, 402, 17804, 238, 509, 198, 220, 220, 220, 308, 198, 198, 13086, 262, 900, 7559, 42, 19039, 402, 1220, 285, 7, 43, 1220, 300, 7, 40, 4008, 15506, 290, 1011, 7559, 70, 25, 509, 17804, 103, 402, 15506, 284, 307, 262, 198, 259, 4717, 13, 3244, 262, 3975, 7559, 74, 25, 314, 15168, 509, 15506, 318, 5295, 416, 262, 3975, 7559, 75, 158, 233, 227, 76, 25, 314, 15168, 402, 15506, 198, 6738, 262, 9079, 326, 262, 6616, 725, 1769, 13, 198, 198, 49222, 448, 1224, 902, 2152, 691, 611, 262, 11795, 4006, 318, 11378, 13, 1052, 198, 18224, 481, 307, 4376, 611, 262, 4574, 448, 16829, 2314, 307, 12006, 13, 1675, 2198, 198, 5661, 287, 5963, 11, 779, 685, 63, 5171, 62, 14689, 448, 62, 785, 26908, 63, 16151, 31, 5420, 737, 198, 37811, 198, 8818, 4574, 448, 62, 785, 26908, 7, 24874, 3712, 5377, 1930, 540, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 300, 11, 285, 796, 5166, 198, 220, 314, 11, 406, 11, 402, 796, 2401, 7, 75, 828, 14873, 296, 7, 75, 828, 14873, 296, 7, 76, 8, 628, 220, 1303, 28407, 14900, 308, 25, 509, 17804, 103, 402, 13, 198, 220, 300, 62, 9060, 796, 5345, 7, 33327, 7, 75, 4008, 198, 220, 285, 62, 9060, 796, 5345, 26933, 285, 7, 87, 8, 329, 2124, 287, 406, 611, 2124, 18872, 231, 300, 62, 9060, 33761, 198, 220, 308, 796, 4463, 22203, 26933, 87, 329, 2124, 287, 402, 611, 2124, 18872, 231, 285, 62, 9060, 4357, 402, 8, 198, 220, 509, 796, 2401, 7, 70, 8, 628, 220, 1303, 28407, 17488, 1042, 479, 25, 314, 15168, 509, 1262, 13027, 34062, 286, 308, 13, 198, 220, 308, 62, 16340, 796, 360, 713, 90, 5317, 11, 5317, 92, 7, 13344, 7, 33327, 7, 70, 828, 509, 4008, 198, 220, 479, 796, 4463, 22203, 7, 8899, 7, 40, 8, 466, 2124, 198, 220, 220, 220, 331, 796, 285, 7, 75, 7, 87, 4008, 198, 220, 220, 220, 651, 7, 70, 62, 16340, 11, 331, 8, 466, 26, 4049, 7203, 33234, 2649, 4054, 329, 7386, 5002, 720, 87, 4943, 886, 198, 220, 886, 11, 314, 11, 509, 8, 628, 220, 1441, 29936, 540, 47, 958, 7, 74, 11, 308, 8, 198, 437, 198, 198, 5171, 62, 14689, 448, 62, 785, 26908, 7, 24874, 3712, 5377, 1930, 540, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 796, 198, 220, 477, 7, 271, 28920, 11, 4686, 62, 31448, 7, 24874, 4008, 198, 198, 37811, 6822, 11795, 4006, 329, 4574, 448, 16829, 286, 27454, 5621, 13, 198, 198, 464, 11795, 4006, 1139, 326, 262, 5499, 466, 407, 3975, 357, 16, 8, 1111, 257, 198, 2934, 33342, 2378, 290, 257, 17232, 2378, 287, 406, 284, 262, 976, 2378, 287, 402, 393, 357, 17, 8, 734, 7310, 198, 2934, 33342, 3709, 284, 262, 976, 2378, 13, 632, 318, 19876, 1927, 11378, 329, 8677, 425, 5499, 13, 198, 198, 35561, 5166, 286, 11629, 2024, 286, 628, 220, 357, 16, 8, 257, 30745, 11129, 1513, 2378, 326, 8739, 284, 257, 13140, 2378, 287, 402, 198, 220, 357, 17, 8, 257, 5166, 286, 7310, 3709, 287, 406, 326, 389, 13140, 1865, 27661, 284, 262, 976, 198, 220, 220, 220, 220, 220, 2378, 287, 402, 13, 198, 37811, 198, 8818, 4686, 62, 31448, 7, 24874, 3712, 5377, 1930, 540, 47, 958, 90, 27, 25, 18467, 7248, 90, 5317, 11709, 8, 198, 220, 300, 11, 285, 796, 5166, 198, 220, 300, 62, 9060, 796, 5345, 7, 33327, 7, 75, 4008, 198, 220, 300, 62, 9060, 157, 114, 250, 796, 685, 2124, 329, 2124, 287, 14873, 296, 7, 75, 8, 611, 2124, 18872, 231, 300, 62, 9060, 2361, 198, 220, 285, 62, 9060, 796, 5345, 7, 8899, 7, 76, 11, 300, 62, 9060, 157, 114, 250, 4008, 198, 220, 14808, 72, 329, 1312, 287, 300, 62, 9060, 611, 285, 7, 72, 8, 18872, 230, 285, 62, 9060, 828, 198, 220, 220, 14808, 72, 11, 474, 8, 329, 1312, 287, 1123, 9630, 7, 75, 62, 9060, 157, 114, 250, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 1312, 10, 16, 25, 13664, 7, 75, 62, 9060, 157, 114, 250, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 285, 7, 75, 62, 9060, 157, 114, 250, 58, 72, 12962, 6624, 285, 7, 75, 62, 9060, 157, 114, 250, 58, 73, 60, 22305, 198, 437, 198, 198, 2, 3834, 28709, 198, 7804, 2, 198, 198, 37811, 3834, 2617, 286, 257, 27454, 900, 13, 198, 37811, 198, 9979, 3834, 18467, 7248, 90, 50, 11, 51, 92, 796, 3834, 15252, 90, 27, 25, 18467, 7248, 90, 50, 11, 51, 11709, 198, 198, 7004, 15252, 7, 55, 3712, 18467, 7248, 11, 277, 8, 796, 3834, 15252, 7, 18467, 22203, 7, 69, 11, 1395, 4008, 198, 7004, 18467, 7248, 7, 55, 11, 277, 8, 796, 3834, 15252, 7, 18467, 22203, 7, 69, 11, 1395, 4008, 198, 198, 3174, 7, 32, 3712, 7004, 18467, 7248, 90, 5317, 30072, 796, 3834, 15252, 7, 3174, 7, 26452, 7, 32, 22305, 198, 14881, 13, 33327, 7, 32, 3712, 7004, 18467, 7248, 8, 796, 2824, 7, 26452, 7, 32, 4008, 198, 14881, 13, 30619, 7, 32, 3712, 7004, 18467, 7248, 8, 796, 3834, 18467, 7248, 7, 672, 7, 32, 828, 3297, 7, 33327, 7, 32, 22305, 198, 198, 9979, 27741, 33, 970, 38469, 796, 4479, 90, 23839, 38469, 90, 33, 970, 5512, 13128, 38469, 92, 198, 198, 37811, 3834, 2617, 286, 257, 27454, 900, 7997, 355, 257, 25131, 15879, 13, 198, 198, 1212, 318, 262, 850, 15252, 1398, 7483, 10552, 1201, 4600, 33, 970, 63, 318, 262, 850, 15252, 198, 4871, 7483, 329, 4600, 7248, 44646, 198, 37811, 198, 31, 23736, 62, 17831, 62, 4853, 874, 2878, 3834, 18467, 7248, 38469, 90, 50, 27, 25, 18467, 7248, 92, 1279, 25, 3834, 15252, 90, 50, 92, 198, 220, 900, 3712, 50, 198, 220, 44010, 3712, 23839, 33, 970, 38469, 628, 220, 2163, 3834, 18467, 7248, 38469, 7, 55, 3712, 50, 11, 2747, 3712, 23839, 33, 970, 38469, 8, 810, 311, 27, 25, 18467, 7248, 198, 220, 220, 220, 4129, 7, 28764, 8, 6624, 4129, 7, 55, 8, 8614, 198, 220, 220, 220, 220, 220, 4049, 7203, 10699, 286, 44010, 720, 28764, 857, 407, 4961, 2546, 286, 2134, 720, 55, 4943, 198, 220, 220, 220, 649, 90, 50, 92, 7, 55, 11, 2747, 8, 198, 220, 886, 198, 437, 198, 198, 7004, 15252, 7, 55, 3712, 18467, 7248, 11, 2747, 3712, 23839, 33, 970, 38469, 8, 796, 3834, 18467, 7248, 38469, 7, 55, 11, 2747, 8, 198, 7004, 18467, 7248, 7, 28764, 3712, 23839, 33, 970, 38469, 8, 796, 3834, 15252, 7, 18467, 7248, 7, 13664, 7, 28764, 36911, 2747, 8, 198, 198, 672, 7, 32, 3712, 7004, 18467, 7248, 38469, 8, 796, 317, 13, 2617, 198, 26452, 7, 32, 3712, 7004, 18467, 7248, 38469, 8, 796, 4463, 22203, 7, 19796, 439, 7, 32, 13, 28764, 5344, 828, 317, 13, 2617, 8, 198, 28764, 5344, 7, 32, 3712, 7004, 18467, 7248, 38469, 8, 796, 317, 13, 28764, 5344, 198, 198, 8818, 44010, 7, 32, 3712, 7004, 18467, 7248, 8, 198, 220, 277, 796, 3488, 7, 32, 8, 198, 220, 2747, 796, 27807, 274, 7, 13664, 7, 19815, 296, 7, 69, 22305, 198, 220, 329, 2124, 287, 2401, 7, 69, 8, 198, 220, 220, 220, 2747, 58, 69, 7, 87, 15437, 796, 2081, 198, 220, 886, 198, 220, 2747, 198, 437, 198, 198, 31, 39098, 3834, 15252, 43, 1078, 501, 90, 18467, 7248, 11, 7004, 18467, 7248, 92, 2221, 198, 220, 2488, 11748, 909, 198, 220, 1826, 7, 32, 3712, 7004, 18467, 7248, 11, 347, 3712, 7004, 18467, 7248, 8, 796, 1826, 7, 32, 11, 347, 11, 3834, 18257, 46120, 13087, 28955, 198, 220, 4654, 7, 32, 3712, 7004, 18467, 7248, 11, 347, 3712, 7004, 18467, 7248, 8, 796, 4654, 7, 32, 11, 347, 11, 3834, 18257, 46120, 13087, 28955, 198, 220, 1353, 7, 55, 3712, 18467, 7248, 8, 796, 1353, 7, 55, 11, 3834, 18257, 3152, 19352, 896, 28955, 198, 220, 4220, 7, 55, 3712, 18467, 7248, 8, 796, 4220, 7, 55, 11, 3834, 18257, 3152, 19352, 896, 28955, 198, 437, 198, 198, 37811, 978, 42289, 284, 24061, 850, 15252, 4560, 1262, 5002, 3083, 25131, 9156, 13, 198, 37811, 198, 7249, 3834, 18257, 46120, 13087, 1279, 25, 3834, 18257, 2348, 42289, 886, 198, 198, 47745, 7, 32, 3712, 7004, 18467, 7248, 90, 5317, 5512, 347, 3712, 7004, 18467, 7248, 90, 5317, 5512, 7904, 7004, 18257, 46120, 13087, 8, 796, 198, 220, 3834, 18467, 7248, 7, 28764, 5344, 7, 32, 8, 764, 5, 44010, 7, 33, 4008, 198, 22179, 7, 32, 3712, 7004, 18467, 7248, 90, 5317, 5512, 347, 3712, 7004, 18467, 7248, 90, 5317, 5512, 7904, 7004, 18257, 46120, 13087, 8, 796, 198, 220, 3834, 18467, 7248, 7, 28764, 5344, 7, 32, 8, 764, 91, 44010, 7, 33, 4008, 198, 4852, 7, 55, 3712, 18467, 7248, 90, 5317, 5512, 7904, 7004, 18257, 46120, 13087, 8, 796, 3834, 18467, 7248, 7, 83, 622, 274, 7, 13664, 7, 55, 22305, 198, 22487, 7, 55, 3712, 18467, 7248, 90, 5317, 5512, 7904, 7004, 18257, 46120, 13087, 8, 796, 3834, 18467, 7248, 7, 69, 874, 274, 7, 13664, 7, 55, 22305, 198, 198, 437, 198 ]
2.538183
18,254
""" ForceDirectedLayout The fields are, in order: - `move`, a tuple to specify whether moves on the x and y axes are allowed - `k`, a tuple (kₐ,kᵣ) giving the strength of attraction and repulsion - `exponents`, a tuple (a,b,c,d) giving the exponents for the attraction and repulsion functions - `gravity`, the strength of attraction towards the center, set to `0.0` as a default - `δ`, a floating point constant regulating the attractive force of interaction strength -- when set to its default value of 0.0, all edges have the same attraction - `degree`, a boolean to specificy whether the nodes repel one another according to their degree The various coefficients are used to decide how strongly nodes will *attract* or *repel* one another, as a function of their distance Δ. Specifically, the default is that connected nodes will attract one another proportionally to (Δᵃ)×(kₐᵇ), with a=2 and b=-1, and all nodes repel one another proportionally to (Δᶜ)×(kᵣᵈ) with c=-1 and d=2. The parameterization for the Fruchterman-Rheingold layout is the default one, particularly if kₐ=kᵣ. The Force Atlas 2 parameters are kₐ=1 (or b=0), kᵣ set to any value, a=1, c=-1, d=1. Note that in all cases, the gravity is a multiplying constant of the resulting attraction force, so it will also be sensitive to these choices. The `FruchtermanRheingold` and `ForceAtlas2` functions will return a `ForceDirectedLayout` -- as this object is mutable, you can replace the exponents at any time. The δ parameter is particularly important for probabilistic networks, as these tend to have *all* their interactions set to non-zero values. As such, setting a value of δ=1 means that the interactions only attract as much as they are probable. """ mutable struct ForceDirectedLayout move::Tuple{Bool,Bool} k::Tuple{Float64,Float64} exponents::Tuple{Float64,Float64,Float64,Float64} gravity::Float64 δ::Float64 degree::Bool end """ ForceDirectedLayout(ka::Float64, kr::Float64; gravity::Float64=0.75) TODO """ ForceDirectedLayout(ka::Float64, kr::Float64; gravity::Float64=0.75) = ForceDirectedLayout((true,true), (ka,kr), (2.0, -1.0, -1.0, 2.0), gravity, 0.0, true) """ FruchtermanRheingold(k::Float64; gravity::Float64=0.75) The default `ForceDirectedLayout` uses the Fruchterman-Rheingold parameters - this function is simply here to make the code more explicity, and to use a "strict" version where kᵣ=kₐ. """ FruchtermanRheingold(k::Float64; gravity::Float64=0.75) = ForceDirectedLayout(k, k; gravity=gravity) """ ForceAtlas2(k::Float64; gravity::Float64=0.75) In the Force Atlas 2 layout, the attraction is proportional to the distance, and the repulsion to the inverse of the distance. Note that kₐ in this layout is set to 1, so kᵣ is the *relative* repulsion. """ ForceAtlas2(k::Float64; gravity::Float64=0.75) = ForceDirectedLayout((true, true), (1.0, k), (1.0, 0.0, -1.0, 1.0), gravity, 0.0, true) """ SpringElectric(k::Float64; gravity::Float64=0.75) In the spring electric layout, attraction is proportional to distance, and repulsion to the inverse of the distance squared. """ SpringElectric(k::Float64; gravity::Float64=0.75) = ForceDirectedLayout((true,true), (k, k), (1.0, 1.0, -2.0, 1.0), gravity, 0.0, true) """ Stops the movement of a node position. """ function stop!(n::NodePosition) n.vx = 0.0 n.vy = 0.0 end """ Repel two nodes """ function repel!(LA::T, n1::NodePosition, n2::NodePosition, fr) where {T <: ForceDirectedLayout} δx = n1.x - n2.x δy = n1.y - n2.y Δ = sqrt(δx^2.0+δy^2.0) Δ = Δ == 0.0 ? 0.0001 : Δ if LA.move[1] n1.vx += δx/Δ*fr(Δ) n2.vx -= δx/Δ*fr(Δ) end if LA.move[2] n1.vy += δy/Δ*fr(Δ) n2.vy -= δy/Δ*fr(Δ) end end """ Attract two connected nodes """ function attract!(LA::T, n1::NodePosition, n2::NodePosition, fa) where {T <: ForceDirectedLayout} δx = n1.x - n2.x δy = n1.y - n2.y Δ = sqrt(δx^2.0+δy^2.0) if !iszero(Δ) if LA.move[1] n1.vx -= δx/Δ*fa(Δ) n2.vx += δx/Δ*fa(Δ) end if LA.move[2] n1.vy -= δy/Δ*fa(Δ) n2.vy += δy/Δ*fa(Δ) end end end """ Update the position of a node """ function update!(n::NodePosition) Δ = sqrt(n.vx^2.0+n.vy^2.0) if !iszero(Δ) n.x += n.vx/Δ*min(Δ, 0.01) n.y += n.vy/Δ*min(Δ, 0.01) end stop!(n) end """ position!(LA::ForceDirectedLayout, L::Dict{K,NodePosition}, N::T) where {T <: EcologicalNetworks.AbstractEcologicalNetwork} where {K} One iteration of the force-directed layout routine. Because these algorithms can take some time to converge, it may be useful to stop every 500 iterations to have a look at the results. Note that to avoid oscillations, the maximum displacement at any given time is set to 0.01 units. These layouts tend to have O(N³) complexity, where N is the number of nodes in the network. This is because repulsion required to do (N×(N-1))/2 visits on pairs of nodes, and an optimal layout usually requires s×N steps to converge. With the maximal displacement set to 0.01, we have found that k ≈ 100 gives acceptable results. This will depend on the complexity of the network, and its connectance, as well as the degree and edge strengths distributions. """ function position!(LA::ForceDirectedLayout, L::Dict{K,NodePosition}, N::T) where {T <: EcologicalNetworks.AbstractEcologicalNetwork} where {K} degdistr = degree(N) # Exponents and forces - the attraction and repulsion functions are # (Δᵃ)×(kₐᵇ) and (Δᶜ)×(kᵣᵈ) a,b,c,d = LA.exponents ka, kr = LA.k fa(x) = (x^a)*(ka^b) fr(x) = (x^c)*(kr^d) plotcenter = NodePosition(0.0, 0.0, 0.0, 0.0) for (i, s1) in enumerate(species(N)) attract!(LA, L[s1], plotcenter, (x) -> LA.gravity*fa(x)) for (j, s2) in enumerate(species(N)) if j > i if LA.degree repel!(LA, L[s1], L[s2], (x) -> (degdistr[s1]+1)*(degdistr[s2]+1)*fr(x)) else repel!(LA, L[s1], L[s2], fr) end end end end for int in interactions(N) # We can do Bool^δ and it returns the Bool, so that's tight attract!(LA, L[int.from], L[int.to], (x) -> N[int.from, int.to]^LA.δ*fa(x)) end for s in species(N) update!(L[s]) end end
[ 37811, 198, 220, 220, 220, 5221, 13470, 276, 32517, 198, 198, 464, 7032, 389, 11, 287, 1502, 25, 198, 198, 12, 4600, 21084, 47671, 257, 46545, 284, 11986, 1771, 6100, 319, 262, 2124, 290, 331, 34197, 389, 3142, 198, 12, 4600, 74, 47671, 257, 46545, 357, 74, 158, 224, 238, 11, 74, 39611, 96, 8, 3501, 262, 4202, 286, 17416, 290, 1128, 15204, 198, 12, 4600, 11201, 3906, 47671, 257, 46545, 357, 64, 11, 65, 11, 66, 11, 67, 8, 3501, 262, 1033, 3906, 329, 262, 17416, 290, 198, 220, 1128, 15204, 5499, 198, 12, 4600, 46453, 47671, 262, 4202, 286, 17416, 3371, 262, 3641, 11, 900, 284, 4600, 15, 13, 15, 63, 355, 257, 198, 220, 4277, 198, 12, 4600, 138, 112, 47671, 257, 12462, 966, 6937, 26379, 262, 10966, 2700, 286, 10375, 198, 220, 4202, 1377, 618, 900, 284, 663, 4277, 1988, 286, 657, 13, 15, 11, 477, 13015, 423, 262, 976, 198, 220, 17416, 198, 12, 4600, 16863, 47671, 257, 25131, 284, 2176, 88, 1771, 262, 13760, 1128, 417, 530, 1194, 1864, 198, 220, 284, 511, 4922, 198, 198, 464, 2972, 44036, 389, 973, 284, 5409, 703, 7634, 13760, 481, 1635, 1078, 974, 9, 393, 198, 9, 7856, 417, 9, 530, 1194, 11, 355, 257, 2163, 286, 511, 5253, 37455, 13, 22426, 11, 262, 198, 12286, 318, 326, 5884, 13760, 481, 4729, 530, 1194, 9823, 453, 284, 198, 7, 138, 242, 39611, 225, 8, 12906, 7, 74, 158, 224, 238, 39611, 229, 828, 351, 257, 28, 17, 290, 275, 10779, 16, 11, 290, 477, 13760, 1128, 417, 530, 1194, 9823, 453, 284, 198, 7, 138, 242, 157, 114, 250, 8, 12906, 7, 74, 39611, 96, 39611, 230, 8, 351, 269, 10779, 16, 290, 288, 28, 17, 13, 198, 198, 464, 11507, 1634, 329, 262, 376, 622, 354, 353, 805, 12, 49, 258, 278, 727, 12461, 318, 262, 4277, 530, 11, 198, 31722, 611, 479, 158, 224, 238, 28, 74, 39611, 96, 13, 383, 5221, 22494, 362, 10007, 389, 479, 158, 224, 238, 28, 16, 357, 273, 275, 28, 15, 828, 479, 39611, 96, 900, 284, 198, 1092, 1988, 11, 257, 28, 16, 11, 269, 10779, 16, 11, 288, 28, 16, 13, 5740, 326, 287, 477, 2663, 11, 262, 13522, 318, 257, 48816, 198, 9979, 415, 286, 262, 7186, 17416, 2700, 11, 523, 340, 481, 635, 307, 8564, 284, 198, 27218, 7747, 13, 383, 4600, 37, 622, 354, 353, 805, 49, 258, 278, 727, 63, 290, 4600, 10292, 2953, 21921, 17, 63, 5499, 481, 198, 7783, 257, 4600, 10292, 13470, 276, 32517, 63, 1377, 355, 428, 2134, 318, 4517, 540, 11, 345, 460, 6330, 262, 198, 11201, 3906, 379, 597, 640, 13, 198, 198, 464, 7377, 112, 11507, 318, 3573, 1593, 329, 1861, 14991, 2569, 7686, 11, 355, 777, 198, 83, 437, 284, 423, 1635, 439, 9, 511, 12213, 900, 284, 1729, 12, 22570, 3815, 13, 1081, 884, 11, 4634, 257, 198, 8367, 286, 7377, 112, 28, 16, 1724, 326, 262, 12213, 691, 4729, 355, 881, 355, 484, 389, 198, 1676, 33460, 13, 198, 37811, 198, 76, 18187, 2878, 5221, 13470, 276, 32517, 198, 220, 220, 220, 1445, 3712, 51, 29291, 90, 33, 970, 11, 33, 970, 92, 198, 220, 220, 220, 479, 3712, 51, 29291, 90, 43879, 2414, 11, 43879, 2414, 92, 198, 220, 220, 220, 1033, 3906, 3712, 51, 29291, 90, 43879, 2414, 11, 43879, 2414, 11, 43879, 2414, 11, 43879, 2414, 92, 198, 220, 220, 220, 13522, 3712, 43879, 2414, 198, 220, 220, 220, 7377, 112, 3712, 43879, 2414, 198, 220, 220, 220, 4922, 3712, 33, 970, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5221, 13470, 276, 32517, 7, 4914, 3712, 43879, 2414, 11, 479, 81, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 198, 198, 51, 3727, 46, 198, 37811, 198, 10292, 13470, 276, 32517, 7, 4914, 3712, 43879, 2414, 11, 479, 81, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 796, 5221, 13470, 276, 32517, 19510, 7942, 11, 7942, 828, 357, 4914, 11, 38584, 828, 357, 17, 13, 15, 11, 532, 16, 13, 15, 11, 532, 16, 13, 15, 11, 362, 13, 15, 828, 13522, 11, 657, 13, 15, 11, 2081, 8, 198, 198, 37811, 198, 220, 220, 220, 376, 622, 354, 353, 805, 49, 258, 278, 727, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 198, 198, 464, 4277, 4600, 10292, 13470, 276, 32517, 63, 3544, 262, 376, 622, 354, 353, 805, 12, 49, 258, 278, 727, 10007, 532, 198, 5661, 2163, 318, 2391, 994, 284, 787, 262, 2438, 517, 1193, 8467, 11, 290, 284, 779, 257, 198, 1, 301, 2012, 1, 2196, 810, 479, 39611, 96, 28, 74, 158, 224, 238, 13, 220, 198, 37811, 198, 37, 622, 354, 353, 805, 49, 258, 278, 727, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 796, 5221, 13470, 276, 32517, 7, 74, 11, 479, 26, 13522, 28, 46453, 8, 198, 198, 37811, 198, 220, 220, 220, 5221, 2953, 21921, 17, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 198, 198, 818, 262, 5221, 22494, 362, 12461, 11, 262, 17416, 318, 27111, 284, 262, 5253, 11, 290, 198, 1169, 1128, 15204, 284, 262, 34062, 286, 262, 5253, 13, 5740, 326, 479, 158, 224, 238, 287, 428, 12461, 318, 900, 198, 1462, 352, 11, 523, 479, 39611, 96, 318, 262, 1635, 43762, 9, 1128, 15204, 13, 198, 37811, 198, 10292, 2953, 21921, 17, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 796, 5221, 13470, 276, 32517, 19510, 7942, 11, 2081, 828, 357, 16, 13, 15, 11, 479, 828, 357, 16, 13, 15, 11, 657, 13, 15, 11, 532, 16, 13, 15, 11, 352, 13, 15, 828, 13522, 11, 657, 13, 15, 11, 2081, 8, 198, 198, 37811, 198, 220, 220, 220, 8225, 44132, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 198, 198, 818, 262, 6076, 5186, 12461, 11, 17416, 318, 27111, 284, 5253, 11, 290, 198, 7856, 15204, 284, 262, 34062, 286, 262, 5253, 44345, 13, 198, 37811, 198, 30387, 44132, 7, 74, 3712, 43879, 2414, 26, 13522, 3712, 43879, 2414, 28, 15, 13, 2425, 8, 796, 5221, 13470, 276, 32517, 19510, 7942, 11, 7942, 828, 357, 74, 11, 479, 828, 357, 16, 13, 15, 11, 352, 13, 15, 11, 532, 17, 13, 15, 11, 352, 13, 15, 828, 13522, 11, 657, 13, 15, 11, 2081, 8, 198, 198, 37811, 198, 1273, 2840, 262, 3356, 286, 257, 10139, 2292, 13, 198, 37811, 198, 8818, 2245, 0, 7, 77, 3712, 19667, 26545, 8, 198, 220, 220, 220, 299, 13, 85, 87, 796, 657, 13, 15, 198, 220, 220, 220, 299, 13, 7670, 796, 657, 13, 15, 198, 437, 198, 198, 37811, 198, 6207, 417, 734, 13760, 198, 37811, 198, 8818, 1128, 417, 0, 7, 13534, 3712, 51, 11, 299, 16, 3712, 19667, 26545, 11, 299, 17, 3712, 19667, 26545, 11, 1216, 8, 810, 1391, 51, 1279, 25, 5221, 13470, 276, 32517, 92, 198, 220, 220, 220, 7377, 112, 87, 796, 299, 16, 13, 87, 532, 299, 17, 13, 87, 198, 220, 220, 220, 7377, 112, 88, 796, 299, 16, 13, 88, 532, 299, 17, 13, 88, 198, 220, 220, 220, 37455, 796, 19862, 17034, 7, 138, 112, 87, 61, 17, 13, 15, 10, 138, 112, 88, 61, 17, 13, 15, 8, 198, 220, 220, 220, 37455, 796, 37455, 6624, 657, 13, 15, 5633, 657, 13, 18005, 1058, 37455, 198, 220, 220, 220, 611, 9131, 13, 21084, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 299, 16, 13, 85, 87, 15853, 7377, 112, 87, 14, 138, 242, 9, 8310, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 17, 13, 85, 87, 48185, 7377, 112, 87, 14, 138, 242, 9, 8310, 7, 138, 242, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 9131, 13, 21084, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 299, 16, 13, 7670, 15853, 7377, 112, 88, 14, 138, 242, 9, 8310, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 17, 13, 7670, 48185, 7377, 112, 88, 14, 138, 242, 9, 8310, 7, 138, 242, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 8086, 974, 734, 5884, 13760, 198, 37811, 198, 8818, 4729, 0, 7, 13534, 3712, 51, 11, 299, 16, 3712, 19667, 26545, 11, 299, 17, 3712, 19667, 26545, 11, 24685, 8, 810, 1391, 51, 1279, 25, 5221, 13470, 276, 32517, 92, 198, 220, 220, 220, 7377, 112, 87, 796, 299, 16, 13, 87, 532, 299, 17, 13, 87, 198, 220, 220, 220, 7377, 112, 88, 796, 299, 16, 13, 88, 532, 299, 17, 13, 88, 198, 220, 220, 220, 37455, 796, 19862, 17034, 7, 138, 112, 87, 61, 17, 13, 15, 10, 138, 112, 88, 61, 17, 13, 15, 8, 198, 220, 220, 220, 611, 5145, 271, 22570, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 9131, 13, 21084, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 16, 13, 85, 87, 48185, 7377, 112, 87, 14, 138, 242, 9, 13331, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 17, 13, 85, 87, 15853, 7377, 112, 87, 14, 138, 242, 9, 13331, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 9131, 13, 21084, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 16, 13, 7670, 48185, 7377, 112, 88, 14, 138, 242, 9, 13331, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 17, 13, 7670, 15853, 7377, 112, 88, 14, 138, 242, 9, 13331, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 10260, 262, 2292, 286, 257, 10139, 198, 37811, 198, 8818, 4296, 0, 7, 77, 3712, 19667, 26545, 8, 198, 220, 220, 220, 37455, 796, 19862, 17034, 7, 77, 13, 85, 87, 61, 17, 13, 15, 10, 77, 13, 7670, 61, 17, 13, 15, 8, 198, 220, 220, 220, 611, 5145, 271, 22570, 7, 138, 242, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 13, 87, 15853, 299, 13, 85, 87, 14, 138, 242, 9, 1084, 7, 138, 242, 11, 657, 13, 486, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 13, 88, 15853, 299, 13, 7670, 14, 138, 242, 9, 1084, 7, 138, 242, 11, 657, 13, 486, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2245, 0, 7, 77, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2292, 0, 7, 13534, 3712, 10292, 13470, 276, 32517, 11, 406, 3712, 35, 713, 90, 42, 11, 19667, 26545, 5512, 399, 3712, 51, 8, 810, 1391, 51, 1279, 25, 14003, 2770, 7934, 5225, 13, 23839, 49136, 2770, 26245, 92, 810, 1391, 42, 92, 198, 198, 3198, 24415, 286, 262, 2700, 12, 34762, 12461, 8027, 13, 4362, 777, 16113, 460, 198, 20657, 617, 640, 284, 47873, 11, 340, 743, 307, 4465, 284, 2245, 790, 5323, 34820, 284, 198, 14150, 257, 804, 379, 262, 2482, 13, 5740, 326, 284, 3368, 24969, 602, 11, 262, 5415, 198, 6381, 489, 5592, 379, 597, 1813, 640, 318, 900, 284, 657, 13, 486, 4991, 13, 198, 198, 4711, 38489, 4327, 284, 423, 440, 7, 45, 126, 111, 8, 13357, 11, 810, 399, 318, 262, 1271, 286, 13760, 287, 198, 1169, 3127, 13, 770, 318, 780, 1128, 15204, 2672, 284, 466, 357, 45, 12906, 7, 45, 12, 16, 4008, 14, 17, 11864, 319, 198, 79, 3468, 286, 13760, 11, 290, 281, 16586, 12461, 3221, 4433, 264, 12906, 45, 4831, 284, 47873, 13, 198, 3152, 262, 40708, 29358, 900, 284, 657, 13, 486, 11, 356, 423, 1043, 326, 479, 15139, 230, 1802, 3607, 198, 16037, 2482, 13, 770, 481, 4745, 319, 262, 13357, 286, 262, 3127, 11, 290, 663, 198, 8443, 590, 11, 355, 880, 355, 262, 4922, 290, 5743, 18929, 24570, 13, 198, 37811, 198, 8818, 2292, 0, 7, 13534, 3712, 10292, 13470, 276, 32517, 11, 406, 3712, 35, 713, 90, 42, 11, 19667, 26545, 5512, 399, 3712, 51, 8, 810, 1391, 51, 1279, 25, 14003, 2770, 7934, 5225, 13, 23839, 49136, 2770, 26245, 92, 810, 1391, 42, 92, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3396, 17080, 81, 796, 4922, 7, 45, 8, 628, 220, 220, 220, 1303, 5518, 3906, 290, 3386, 532, 262, 17416, 290, 1128, 15204, 5499, 389, 198, 220, 220, 220, 1303, 357, 138, 242, 39611, 225, 8, 12906, 7, 74, 158, 224, 238, 39611, 229, 8, 290, 357, 138, 242, 157, 114, 250, 8, 12906, 7, 74, 39611, 96, 39611, 230, 8, 198, 220, 220, 220, 257, 11, 65, 11, 66, 11, 67, 796, 9131, 13, 11201, 3906, 198, 220, 220, 220, 38387, 11, 479, 81, 796, 9131, 13, 74, 198, 220, 220, 220, 24685, 7, 87, 8, 796, 357, 87, 61, 64, 27493, 7, 4914, 61, 65, 8, 198, 220, 220, 220, 1216, 7, 87, 8, 796, 357, 87, 61, 66, 27493, 7, 38584, 61, 67, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 7110, 16159, 796, 19081, 26545, 7, 15, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 11, 657, 13, 15, 8, 628, 220, 220, 220, 329, 357, 72, 11, 264, 16, 8, 287, 27056, 378, 7, 35448, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4729, 0, 7, 13534, 11, 406, 58, 82, 16, 4357, 7110, 16159, 11, 357, 87, 8, 4613, 9131, 13, 46453, 9, 13331, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 73, 11, 264, 17, 8, 287, 27056, 378, 7, 35448, 7, 45, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 474, 1875, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 9131, 13, 16863, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1128, 417, 0, 7, 13534, 11, 406, 58, 82, 16, 4357, 406, 58, 82, 17, 4357, 357, 87, 8, 4613, 357, 13500, 17080, 81, 58, 82, 16, 48688, 16, 27493, 7, 13500, 17080, 81, 58, 82, 17, 48688, 16, 27493, 8310, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1128, 417, 0, 7, 13534, 11, 406, 58, 82, 16, 4357, 406, 58, 82, 17, 4357, 1216, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 493, 287, 12213, 7, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 460, 466, 347, 970, 61, 138, 112, 290, 340, 5860, 262, 347, 970, 11, 523, 326, 338, 5381, 198, 220, 220, 220, 220, 220, 220, 220, 4729, 0, 7, 13534, 11, 406, 58, 600, 13, 6738, 4357, 406, 58, 600, 13, 1462, 4357, 357, 87, 8, 4613, 399, 58, 600, 13, 6738, 11, 493, 13, 1462, 60, 61, 13534, 13, 138, 112, 9, 13331, 7, 87, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 329, 264, 287, 4693, 7, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4296, 0, 7, 43, 58, 82, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 437, 198 ]
2.401645
2,674
type GMR{M<:MvNormal} # μ₁₋₂ = μ₁ + Σ₁₂ * Σ₂₂⁻¹ * (x₂ - μ₂) = A*x₂ + b vec_A::Vector{Matrix{Float64}} # [n_components [ntargets×nindicators]] vec_b::Vector{Vector{Float64}} # [n_components [ntargets]] # pdf(p), all pre-computed. Used to compute βⱼ(p) mixture_Obs::MixtureModel{Multivariate,Continuous,M} # p(obs), all pre-computed, should never be edited # pdf(a|p), means μⱼ_ₚ and weights βⱼ(p) are functions of p and must be updated every time, covariance is constant mixture_Act_given_Obs::MixtureModel{Multivariate,Continuous,M} end function GMR{M<:MvNormal}(mix::MixtureModel{Multivariate,Continuous,M}, n_targets::Int=2) #= Construct a Gaussian Mixture Regressor using a Gaussian mixture over both the features and the actions, and the features are at the end of the input =# weights = probs(mix.prior) # [n_components] n_components = length(weights) n_indicators = length(mix) - n_targets vec_A = Array(Matrix{Float64}, n_components) # μ₁₋₂ = μ₁ + Σ₁₂ * Σ₂₂⁻¹ * (x₂ - μ₂) = A*x₂ + b vec_b = Array(Vector{Float64}, n_components) vec_G = Array(MvNormal, n_components) vec_H = Array(MvNormal, n_components) for i = 1 : n_components μ = mix.components[i].μ μₐ = μ[1:n_targets] μₚ = μ[n_targets+1:end] Σ = full(mix.components[i].Σ) Σₐₐ = Σ[1:n_targets,1:n_targets] Σₐₚ = Σ[1:n_targets,n_targets+1:end] Σₚₚ = nearestSPD(Σ[n_targets+1:end,n_targets+1:end]) iΣₚₚ = inv(Σₚₚ) A = Σₐₚ * iΣₚₚ vec_A[i] = A vec_b[i] = vec(μₐ - A*μₚ) C = nearestSPD(Σₐₐ - Σₐₚ * iΣₚₚ * ((Σₐₚ)')) vec_G[i] = MvNormal(Array(Float64, n_targets), C) # p(action|obs), mean and weighting must be updated with each observation, cov is pre-computed vec_H[i] = MvNormal(μₚ, Σₚₚ) # p(obs), all pre-computed, should never be edited end mixture_Act_given_Obs = MixtureModel(vec_G) # p(action|obs), mean and weighting must be updated with each observation, cov is pre-computed mixture_Obs = MixtureModel(vec_H, weights) # p(obs), all pre-computed, should never be edited GMR(vec_A, vec_b, mixture_Obs, mixture_Act_given_Obs) end function Base.print(model::GMR) println("GMR:") for (i, mat) in enumerate(model.vec_A) println(i) print("\t[") for j in 1:size(mat,2) @printf(" %10.6f", mat[1,j]) end @printf("] + [ %10.6f]\n", model.vec_b[i][1]) print("\t[") for j in 1:size(mat,2) @printf(" %10.6f", mat[2,j]) end @printf("] + [ %10.6f]\n", model.vec_b[i][2]) end println("\tmixture_Obs: ") println("\t\tprior: ", model.mixture_Obs.prior) end n_targets(gmr::GMR) = size(gmr.vec_A[1], 1) n_features(gmr::GMR) = size(gmr.vec_A[1], 2) n_components(gmr::GMR) = length(gmr.vec_A) function nsuffstats(gmr::GMR) dimA = length(gmr.vec_A[1]) n_components(gmr) * (2*dimA + 2 # bias + 3 # covariance in mixture_Act_given_Obs + div(dimA*dimA,2)) # covariance for mixture_Obs end function nearestSPD(A::Matrix{Float64}) # see http://www.mathworks.com/matlabcentral/fileexchange/42885-nearestspd # output: # α, β ≥ 0.0 such that # α ≤ δ₂(A) ≤ β ≤ α + 2 max(fα, tol) # and a PSD matrix X such that |A - X|₂ = β n = size(A, 1) @assert(n == size(A, 2)) # ensure it is square I = eye(n) # symmetrize A into B B = (A+A')./2 # Compute the symmetric polar factor of B. Call it H. # Clearly H is itself SPD. U, σ, V = svd(B) H = V*diagm(σ)*V' # get Ahat in the above formula Ahat = (B+H)/2 # ensure symmetry Ahat = (Ahat + Ahat')/2; # test that Ahat is in fact PD. if it is not so, then tweak it just a bit. worked = false iteration_count = 0 while !worked && iteration_count < 100 iteration_count += 1 try chol(Ahat) worked = true catch # do nothing end if !worked # Ahat failed the chol test. It must have been just a hair off, # due to floating point trash, so it is simplest now just to # tweak by adding a tiny multiple of an identity matrix. min_eig = minimum(eigvals(Ahat)) Ahat = Ahat + (-min_eig*iteration_count.^2 + eps(Float32))*I end end Ahat end @compat function (gmr::GMR)(features::Vector{Float64}) mixture_Act_given_Obs = gmr.mixture_Act_given_Obs mixture_Obs = gmr.mixture_Obs nc = n_components(gmr) for j in 1 : nc # compute the β value, unweighted # βⱼ(f) ∝ wⱼ Nⱼ(μₚ, Σₚ) wⱼ = mixture_Obs.prior.p[j] Nⱼ = mixture_Obs.components[j] mixture_Act_given_Obs.prior.p[j] = wⱼ * pdf(Nⱼ, features) # compute the conditional mean # μₐ_ₚ = A⋅f + b A = gmr.vec_A[j] b = gmr.vec_b[j] copy!(mixture_Act_given_Obs.components[j].μ, A*features + b) end # normalize the β values sum_β = sum(mixture_Act_given_Obs.prior.p) if sum_β > 0.0 && !isnan(sum_β) && !isinf(sum_β) for i in 1 : nc mixture_Act_given_Obs.prior.p[i] /= sum_β end else fill!(mixture_Act_given_Obs.prior.p, 1/nc) # set all to equal weight for i in 1 : nc fill!(mixture_Act_given_Obs.components[i].μ, 0.0) # set mean to zero end end mixture_Act_given_Obs end
[ 4906, 6951, 49, 90, 44, 27, 25, 44, 85, 26447, 92, 628, 220, 220, 220, 1303, 18919, 158, 224, 223, 158, 224, 233, 158, 224, 224, 796, 18919, 158, 224, 223, 1343, 7377, 96, 158, 224, 223, 158, 224, 224, 1635, 7377, 96, 158, 224, 224, 158, 224, 224, 46256, 119, 126, 117, 1635, 357, 87, 158, 224, 224, 532, 18919, 158, 224, 224, 8, 796, 317, 9, 87, 158, 224, 224, 1343, 275, 198, 220, 220, 220, 43030, 62, 32, 3712, 38469, 90, 46912, 90, 43879, 2414, 11709, 1303, 685, 77, 62, 5589, 3906, 685, 429, 853, 1039, 12906, 77, 521, 44549, 11907, 198, 220, 220, 220, 43030, 62, 65, 3712, 38469, 90, 38469, 90, 43879, 2414, 11709, 1303, 685, 77, 62, 5589, 3906, 685, 429, 853, 1039, 11907, 628, 220, 220, 220, 1303, 37124, 7, 79, 828, 477, 662, 12, 785, 17128, 13, 16718, 284, 24061, 27169, 158, 109, 120, 7, 79, 8, 198, 220, 220, 220, 11710, 62, 31310, 3712, 44, 9602, 17633, 90, 15205, 42524, 11, 17875, 5623, 11, 44, 92, 1303, 279, 7, 8158, 828, 477, 662, 12, 785, 17128, 11, 815, 1239, 307, 13012, 628, 220, 220, 220, 1303, 37124, 7, 64, 91, 79, 828, 1724, 18919, 158, 109, 120, 62, 158, 224, 248, 290, 19590, 27169, 158, 109, 120, 7, 79, 8, 389, 5499, 286, 279, 290, 1276, 307, 6153, 790, 640, 11, 44829, 590, 318, 6937, 198, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 3712, 44, 9602, 17633, 90, 15205, 42524, 11, 17875, 5623, 11, 44, 92, 198, 437, 198, 8818, 6951, 49, 90, 44, 27, 25, 44, 85, 26447, 92, 7, 19816, 3712, 44, 9602, 17633, 90, 15205, 42524, 11, 17875, 5623, 11, 44, 5512, 299, 62, 83, 853, 1039, 3712, 5317, 28, 17, 8, 628, 220, 220, 220, 1303, 28, 198, 220, 220, 220, 28407, 257, 12822, 31562, 337, 9602, 3310, 44292, 1262, 257, 12822, 31562, 11710, 625, 1111, 198, 220, 220, 220, 262, 3033, 290, 262, 4028, 11, 290, 262, 3033, 389, 379, 262, 886, 286, 262, 5128, 198, 220, 220, 220, 796, 2, 628, 220, 220, 220, 19590, 796, 386, 1443, 7, 19816, 13, 3448, 273, 8, 1303, 685, 77, 62, 5589, 3906, 60, 198, 220, 220, 220, 299, 62, 5589, 3906, 796, 4129, 7, 43775, 8, 198, 220, 220, 220, 299, 62, 521, 44549, 796, 4129, 7, 19816, 8, 532, 299, 62, 83, 853, 1039, 628, 220, 220, 220, 43030, 62, 32, 796, 15690, 7, 46912, 90, 43879, 2414, 5512, 299, 62, 5589, 3906, 8, 1303, 18919, 158, 224, 223, 158, 224, 233, 158, 224, 224, 796, 18919, 158, 224, 223, 1343, 7377, 96, 158, 224, 223, 158, 224, 224, 1635, 7377, 96, 158, 224, 224, 158, 224, 224, 46256, 119, 126, 117, 1635, 357, 87, 158, 224, 224, 532, 18919, 158, 224, 224, 8, 796, 317, 9, 87, 158, 224, 224, 1343, 275, 198, 220, 220, 220, 43030, 62, 65, 796, 15690, 7, 38469, 90, 43879, 2414, 5512, 299, 62, 5589, 3906, 8, 198, 220, 220, 220, 43030, 62, 38, 796, 15690, 7, 44, 85, 26447, 11, 299, 62, 5589, 3906, 8, 198, 220, 220, 220, 43030, 62, 39, 796, 15690, 7, 44, 85, 26447, 11, 299, 62, 5589, 3906, 8, 628, 220, 220, 220, 329, 1312, 796, 352, 1058, 299, 62, 5589, 3906, 628, 220, 220, 220, 220, 220, 220, 220, 18919, 796, 5022, 13, 5589, 3906, 58, 72, 4083, 34703, 198, 220, 220, 220, 220, 220, 220, 220, 18919, 158, 224, 238, 796, 18919, 58, 16, 25, 77, 62, 83, 853, 1039, 60, 198, 220, 220, 220, 220, 220, 220, 220, 18919, 158, 224, 248, 796, 18919, 58, 77, 62, 83, 853, 1039, 10, 16, 25, 437, 60, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 796, 1336, 7, 19816, 13, 5589, 3906, 58, 72, 4083, 138, 96, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 158, 224, 238, 158, 224, 238, 796, 7377, 96, 58, 16, 25, 77, 62, 83, 853, 1039, 11, 16, 25, 77, 62, 83, 853, 1039, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 158, 224, 238, 158, 224, 248, 796, 7377, 96, 58, 16, 25, 77, 62, 83, 853, 1039, 11, 77, 62, 83, 853, 1039, 10, 16, 25, 437, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 158, 224, 248, 158, 224, 248, 796, 16936, 4303, 35, 7, 138, 96, 58, 77, 62, 83, 853, 1039, 10, 16, 25, 437, 11, 77, 62, 83, 853, 1039, 10, 16, 25, 437, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 138, 96, 158, 224, 248, 158, 224, 248, 796, 800, 7, 138, 96, 158, 224, 248, 158, 224, 248, 8, 628, 220, 220, 220, 220, 220, 220, 220, 317, 796, 7377, 96, 158, 224, 238, 158, 224, 248, 1635, 1312, 138, 96, 158, 224, 248, 158, 224, 248, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 62, 32, 58, 72, 60, 796, 317, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 62, 65, 58, 72, 60, 796, 43030, 7, 34703, 158, 224, 238, 532, 317, 9, 34703, 158, 224, 248, 8, 198, 220, 220, 220, 220, 220, 220, 220, 327, 796, 16936, 4303, 35, 7, 138, 96, 158, 224, 238, 158, 224, 238, 532, 7377, 96, 158, 224, 238, 158, 224, 248, 1635, 1312, 138, 96, 158, 224, 248, 158, 224, 248, 1635, 14808, 138, 96, 158, 224, 238, 158, 224, 248, 33047, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 43030, 62, 38, 58, 72, 60, 796, 337, 85, 26447, 7, 19182, 7, 43879, 2414, 11, 299, 62, 83, 853, 1039, 828, 327, 8, 1303, 279, 7, 2673, 91, 8158, 828, 1612, 290, 3463, 278, 1276, 307, 6153, 351, 1123, 13432, 11, 39849, 318, 662, 12, 785, 17128, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 62, 39, 58, 72, 60, 796, 337, 85, 26447, 7, 34703, 158, 224, 248, 11, 7377, 96, 158, 224, 248, 158, 224, 248, 8, 1303, 279, 7, 8158, 828, 477, 662, 12, 785, 17128, 11, 815, 1239, 307, 13012, 198, 220, 220, 220, 886, 628, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 796, 337, 9602, 17633, 7, 35138, 62, 38, 8, 1303, 279, 7, 2673, 91, 8158, 828, 1612, 290, 3463, 278, 1276, 307, 6153, 351, 1123, 13432, 11, 39849, 318, 662, 12, 785, 17128, 198, 220, 220, 220, 11710, 62, 31310, 796, 337, 9602, 17633, 7, 35138, 62, 39, 11, 19590, 8, 1303, 279, 7, 8158, 828, 477, 662, 12, 785, 17128, 11, 815, 1239, 307, 13012, 198, 220, 220, 220, 6951, 49, 7, 35138, 62, 32, 11, 43030, 62, 65, 11, 11710, 62, 31310, 11, 11710, 62, 6398, 62, 35569, 62, 31310, 8, 198, 437, 198, 198, 8818, 7308, 13, 4798, 7, 19849, 3712, 38, 13599, 8, 198, 220, 220, 220, 44872, 7203, 38, 13599, 25, 4943, 198, 220, 220, 220, 329, 357, 72, 11, 2603, 8, 287, 27056, 378, 7, 19849, 13, 35138, 62, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 59, 83, 58, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 7857, 7, 6759, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 220, 4064, 940, 13, 21, 69, 1600, 2603, 58, 16, 11, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 60, 1343, 685, 220, 4064, 940, 13, 21, 69, 60, 59, 77, 1600, 2746, 13, 35138, 62, 65, 58, 72, 7131, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 59, 83, 58, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 7857, 7, 6759, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 220, 4064, 940, 13, 21, 69, 1600, 2603, 58, 17, 11, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 60, 1343, 685, 220, 4064, 940, 13, 21, 69, 60, 59, 77, 1600, 2746, 13, 35138, 62, 65, 58, 72, 7131, 17, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7203, 59, 17209, 9602, 62, 31310, 25, 366, 8, 198, 220, 220, 220, 44872, 7203, 59, 83, 59, 83, 3448, 273, 25, 33172, 2746, 13, 76, 9602, 62, 31310, 13, 3448, 273, 8, 198, 437, 198, 198, 77, 62, 83, 853, 1039, 7, 39870, 81, 3712, 38, 13599, 8, 796, 2546, 7, 39870, 81, 13, 35138, 62, 32, 58, 16, 4357, 352, 8, 198, 77, 62, 40890, 7, 39870, 81, 3712, 38, 13599, 8, 796, 2546, 7, 39870, 81, 13, 35138, 62, 32, 58, 16, 4357, 362, 8, 198, 77, 62, 5589, 3906, 7, 39870, 81, 3712, 38, 13599, 8, 796, 4129, 7, 39870, 81, 13, 35138, 62, 32, 8, 198, 8818, 36545, 1648, 34242, 7, 39870, 81, 3712, 38, 13599, 8, 198, 220, 220, 220, 5391, 32, 796, 4129, 7, 39870, 81, 13, 35138, 62, 32, 58, 16, 12962, 198, 220, 220, 220, 299, 62, 5589, 3906, 7, 39870, 81, 8, 1635, 357, 17, 9, 27740, 32, 1343, 362, 1303, 10690, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 513, 1303, 44829, 590, 287, 11710, 62, 6398, 62, 35569, 62, 31310, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 2659, 7, 27740, 32, 9, 27740, 32, 11, 17, 4008, 1303, 44829, 590, 329, 11710, 62, 31310, 198, 437, 198, 8818, 16936, 4303, 35, 7, 32, 3712, 46912, 90, 43879, 2414, 30072, 628, 220, 220, 220, 1303, 766, 2638, 1378, 2503, 13, 11018, 5225, 13, 785, 14, 6759, 23912, 31463, 14, 7753, 1069, 3803, 14, 40173, 5332, 12, 710, 12423, 2777, 67, 628, 220, 220, 220, 1303, 5072, 25, 198, 220, 220, 220, 1303, 220, 26367, 11, 27169, 26870, 657, 13, 15, 884, 326, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 41305, 7377, 112, 158, 224, 224, 7, 32, 8, 41305, 27169, 41305, 26367, 1343, 362, 3509, 7, 69, 17394, 11, 284, 75, 8, 198, 220, 220, 220, 1303, 220, 290, 257, 6599, 35, 17593, 1395, 884, 326, 930, 32, 532, 1395, 91, 158, 224, 224, 796, 27169, 628, 220, 220, 220, 299, 796, 2546, 7, 32, 11, 352, 8, 198, 220, 220, 220, 2488, 30493, 7, 77, 6624, 2546, 7, 32, 11, 362, 4008, 1303, 4155, 340, 318, 6616, 628, 220, 220, 220, 314, 796, 4151, 7, 77, 8, 628, 220, 220, 220, 1303, 23606, 316, 380, 2736, 317, 656, 347, 198, 220, 220, 220, 347, 796, 357, 32, 10, 32, 27691, 14, 17, 628, 220, 220, 220, 1303, 3082, 1133, 262, 23606, 19482, 13559, 5766, 286, 347, 13, 4889, 340, 367, 13, 198, 220, 220, 220, 1303, 23730, 367, 318, 2346, 30628, 13, 198, 220, 220, 220, 471, 11, 18074, 225, 11, 569, 796, 264, 20306, 7, 33, 8, 198, 220, 220, 220, 367, 796, 569, 9, 10989, 363, 76, 7, 38392, 27493, 53, 6, 628, 220, 220, 220, 1303, 651, 317, 5183, 287, 262, 2029, 10451, 198, 220, 220, 220, 317, 5183, 796, 357, 33, 10, 39, 20679, 17, 628, 220, 220, 220, 1303, 4155, 40686, 198, 220, 220, 220, 317, 5183, 796, 357, 32, 5183, 1343, 317, 5183, 11537, 14, 17, 26, 628, 220, 220, 220, 1303, 1332, 326, 317, 5183, 318, 287, 1109, 14340, 13, 611, 340, 318, 407, 523, 11, 788, 25393, 340, 655, 257, 1643, 13, 198, 220, 220, 220, 3111, 796, 3991, 198, 220, 220, 220, 24415, 62, 9127, 796, 657, 198, 220, 220, 220, 981, 5145, 32931, 11405, 24415, 62, 9127, 1279, 1802, 628, 220, 220, 220, 220, 220, 220, 220, 24415, 62, 9127, 15853, 352, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 442, 349, 7, 32, 5183, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3111, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 466, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 32931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 317, 5183, 4054, 262, 442, 349, 1332, 13, 632, 1276, 423, 587, 655, 257, 4190, 572, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2233, 284, 12462, 966, 13913, 11, 523, 340, 318, 24043, 783, 655, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 25393, 416, 4375, 257, 7009, 3294, 286, 281, 5369, 17593, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 68, 328, 796, 5288, 7, 68, 328, 12786, 7, 32, 5183, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 5183, 796, 317, 5183, 1343, 13841, 1084, 62, 68, 328, 9, 2676, 341, 62, 9127, 13, 61, 17, 1343, 304, 862, 7, 43879, 2624, 4008, 9, 40, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 317, 5183, 198, 437, 198, 198, 31, 5589, 265, 2163, 357, 39870, 81, 3712, 38, 13599, 5769, 40890, 3712, 38469, 90, 43879, 2414, 30072, 628, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 796, 308, 43395, 13, 76, 9602, 62, 6398, 62, 35569, 62, 31310, 198, 220, 220, 220, 11710, 62, 31310, 796, 308, 43395, 13, 76, 9602, 62, 31310, 198, 220, 220, 220, 299, 66, 796, 299, 62, 5589, 3906, 7, 39870, 81, 8, 628, 220, 220, 220, 329, 474, 287, 352, 1058, 299, 66, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 24061, 262, 27169, 1988, 11, 555, 6551, 276, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 27169, 158, 109, 120, 7, 69, 8, 18872, 251, 266, 158, 109, 120, 399, 158, 109, 120, 7, 34703, 158, 224, 248, 11, 7377, 96, 158, 224, 248, 8, 198, 220, 220, 220, 220, 220, 220, 220, 266, 158, 109, 120, 796, 11710, 62, 31310, 13, 3448, 273, 13, 79, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 399, 158, 109, 120, 796, 11710, 62, 31310, 13, 5589, 3906, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 13, 3448, 273, 13, 79, 58, 73, 60, 796, 266, 158, 109, 120, 1635, 37124, 7, 45, 158, 109, 120, 11, 3033, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 24061, 262, 26340, 1612, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 18919, 158, 224, 238, 62, 158, 224, 248, 796, 317, 158, 233, 227, 69, 1343, 275, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 308, 43395, 13, 35138, 62, 32, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 308, 43395, 13, 35138, 62, 65, 58, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 4866, 0, 7, 76, 9602, 62, 6398, 62, 35569, 62, 31310, 13, 5589, 3906, 58, 73, 4083, 34703, 11, 317, 9, 40890, 1343, 275, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 3487, 1096, 262, 27169, 3815, 198, 220, 220, 220, 2160, 62, 26638, 796, 2160, 7, 76, 9602, 62, 6398, 62, 35569, 62, 31310, 13, 3448, 273, 13, 79, 8, 628, 220, 220, 220, 611, 2160, 62, 26638, 1875, 657, 13, 15, 11405, 5145, 271, 12647, 7, 16345, 62, 26638, 8, 11405, 5145, 271, 10745, 7, 16345, 62, 26638, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 1058, 299, 66, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 13, 3448, 273, 13, 79, 58, 72, 60, 1220, 28, 2160, 62, 26638, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 0, 7, 76, 9602, 62, 6398, 62, 35569, 62, 31310, 13, 3448, 273, 13, 79, 11, 352, 14, 10782, 8, 1303, 900, 477, 284, 4961, 3463, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 1058, 299, 66, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6070, 0, 7, 76, 9602, 62, 6398, 62, 35569, 62, 31310, 13, 5589, 3906, 58, 72, 4083, 34703, 11, 657, 13, 15, 8, 1303, 900, 1612, 284, 6632, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 11710, 62, 6398, 62, 35569, 62, 31310, 198, 437, 198 ]
1.929293
2,871
import Base: position using FFTW """ PositionBasis(xmin, xmax, Npoints) PositionBasis(b::MomentumBasis) Basis for a particle in real space. For simplicity periodic boundaries are assumed which means that the rightmost point defined by `xmax` is not included in the basis but is defined to be the same as `xmin`. When a [`MomentumBasis`](@ref) is given as argument the exact values of ``x_{min}`` and ``x_{max}`` are due to the periodic boundary conditions more or less arbitrary and are chosen to be ``-\\pi/dp`` and ``\\pi/dp`` with ``dp=(p_{max}-p_{min})/N``. """ struct PositionBasis{T,X1,X2} <: Basis shape::Vector{T} xmin::Float64 xmax::Float64 N::T function PositionBasis{X1,X2}(xmin::Real, xmax::Real, N::T) where {X1,X2,T<:Int} @assert isa(X1, Real) && isa(X2, Real) new{T,X1,X2}([N], xmin, xmax, N) end end PositionBasis(xmin::Real, xmax::Real, N::Int) = PositionBasis{xmin,xmax}(xmin,xmax,N) """ MomentumBasis(pmin, pmax, Npoints) MomentumBasis(b::PositionBasis) Basis for a particle in momentum space. For simplicity periodic boundaries are assumed which means that `pmax` is not included in the basis but is defined to be the same as `pmin`. When a [`PositionBasis`](@ref) is given as argument the exact values of ``p_{min}`` and ``p_{max}`` are due to the periodic boundary conditions more or less arbitrary and are chosen to be ``-\\pi/dx`` and ``\\pi/dx`` with ``dx=(x_{max}-x_{min})/N``. """ struct MomentumBasis{P1,P2} <: Basis shape::Vector{Int} pmin::Float64 pmax::Float64 N::Int function MomentumBasis{P1,P2}(pmin::Real, pmax::Real, N::Int) where {P1,P2} @assert isa(P1, Real) && isa(P2, Real) new([N], pmin, pmax, N) end end MomentumBasis(pmin::Real, pmax::Real, N::Int) = MomentumBasis{pmin,pmax}(pmin, pmax, N) PositionBasis(b::MomentumBasis) = (dp = (b.pmax - b.pmin)/b.N; PositionBasis(-pi/dp, pi/dp, b.N)) MomentumBasis(b::PositionBasis) = (dx = (b.xmax - b.xmin)/b.N; MomentumBasis(-pi/dx, pi/dx, b.N)) ==(b1::PositionBasis, b2::PositionBasis) = b1.xmin==b2.xmin && b1.xmax==b2.xmax && b1.N==b2.N ==(b1::MomentumBasis, b2::MomentumBasis) = b1.pmin==b2.pmin && b1.pmax==b2.pmax && b1.N==b2.N """ gaussianstate(b::PositionBasis, x0, p0, sigma) gaussianstate(b::MomentumBasis, x0, p0, sigma) Create a Gaussian state around `x0` and` p0` with width `sigma`. In real space the gaussian state is defined as ```math \\Psi(x) = \\frac{1}{\\pi^{1/4}\\sqrt{\\sigma}} e^{i p_0 (x-\\frac{x_0}{2}) - \\frac{(x-x_0)^2}{2 \\sigma^2}} ``` and is connected to the momentum space definition ```math \\Psi(p) = \\frac{\\sqrt{\\sigma}}{\\pi^{1/4}} e^{-i x_0 (p-\\frac{p_0}{2}) - \\frac{1}{2}(p-p_0)^2 \\sigma^2} ``` via a Fourier-transformation ```math \\Psi(p) = \\frac{1}{\\sqrt{2\\pi}} \\int_{-\\infty}^{\\infty} e^{-ipx}\\Psi(x) \\mathrm{d}x ``` The state has the properties * ``⟨p⟩ = p_0`` * ``⟨x⟩ = x_0`` * ``\\mathrm{Var}(x) = \\frac{σ^2}{2}`` * ``\\mathrm{Var}(p) = \\frac{1}{2 σ^2}`` Due to the numerically necessary discretization additional scaling factors ``\\sqrt{Δx}`` and ``\\sqrt{Δp}`` are used so that ``\\langle x_i|Ψ\\rangle = \\sqrt{Δ x} Ψ(x_i)`` and ``\\langle p_i|Ψ\\rangle = \\sqrt{Δ p} Ψ(p_i)`` so that the resulting Ket state is normalized. """ function gaussianstate(b::PositionBasis, x0::Real, p0::Real, sigma::Real) psi = Ket(b) dx = spacing(b) alpha = 1.0/(pi^(1/4)*sqrt(sigma))*sqrt(dx) x = b.xmin for i=1:b.N psi.data[i] = alpha*exp(1im*p0*(x-x0/2) - (x-x0)^2/(2*sigma^2)) x += dx end return psi end function gaussianstate(b::MomentumBasis, x0::Real, p0::Real, sigma::Real) psi = Ket(b) dp = spacing(b) alpha = sqrt(sigma)/pi^(1/4)*sqrt(dp) p = b.pmin for i=1:b.N psi.data[i] = alpha*exp(-1im*x0*(p-p0/2) - (p-p0)^2/2*sigma^2) p += dp end return psi end """ spacing(b::PositionBasis) Difference between two adjacent points of the real space basis. """ spacing(b::PositionBasis) = (b.xmax - b.xmin)/b.N """ spacing(b::MomentumBasis) Momentum difference between two adjacent points of the momentum basis. """ spacing(b::MomentumBasis) = (b.pmax - b.pmin)/b.N """ samplepoints(b::PositionBasis) x values of the real space basis. """ samplepoints(b::PositionBasis) = (dx = spacing(b); Float64[b.xmin + i*dx for i=0:b.N-1]) """ samplepoints(b::MomentumBasis) p values of the momentum basis. """ samplepoints(b::MomentumBasis) = (dp = spacing(b); Float64[b.pmin + i*dp for i=0:b.N-1]) """ position(b::PositionBasis) Position operator in real space. """ position(b::PositionBasis) = SparseOperator(b, sparse(Diagonal(complex(samplepoints(b))))) """ position(b:MomentumBasis) Position operator in momentum space. """ function position(b::MomentumBasis) b_pos = PositionBasis(b) transform(b, b_pos)*dense(position(b_pos))*transform(b_pos, b) end """ momentum(b:MomentumBasis) Momentum operator in momentum space. """ momentum(b::MomentumBasis) = SparseOperator(b, sparse(Diagonal(complex(samplepoints(b))))) """ momentum(b::PositionBasis) Momentum operator in real space. """ function momentum(b::PositionBasis) b_mom = MomentumBasis(b) transform(b, b_mom)*dense(momentum(b_mom))*transform(b_mom, b) end """ potentialoperator(b::PositionBasis, V(x)) Operator representing a potential ``V(x)`` in real space. """ function potentialoperator(b::PositionBasis, V::Function) x = samplepoints(b) diagonaloperator(b, V.(x)) end """ potentialoperator(b::MomentumBasis, V(x)) Operator representing a potential ``V(x)`` in momentum space. """ function potentialoperator(b::MomentumBasis, V::Function) b_pos = PositionBasis(b) transform(b, b_pos)*dense(potentialoperator(b_pos, V))*transform(b_pos, b) end """ potentialoperator(b::CompositeBasis, V(x, y, z, ...)) Operator representing a potential ``V`` in more than one dimension. # Arguments * `b`: Composite basis consisting purely either of `PositionBasis` or `MomentumBasis`. Note, that calling this with a composite basis in momentum space might consume a large amount of memory. * `V`: Function describing the potential. ATTENTION: The number of arguments accepted by `V` must match the spatial dimension. Furthermore, the order of the arguments has to match that of the order of the tensor product of bases (e.g. if `b=bx⊗by⊗bz`, then `V(x,y,z)`). """ function potentialoperator(b::CompositeBasis, V::Function) if isa(b.bases[1], PositionBasis) potentialoperator_position(b, V) elseif isa(b.bases[1], MomentumBasis) potentialoperator_momentum(b, V) else throw(IncompatibleBases()) end end function potentialoperator_position(b::CompositeBasis, V::Function) for base=b.bases @assert isa(base, PositionBasis) end points = [samplepoints(b1) for b1=b.bases] dims = length.(points) n = length(b.bases) data = Array{ComplexF64}(undef, dims...) @inbounds for i=1:length(data) index = Tuple(CartesianIndices(data)[i]) args = (points[j][index[j]] for j=1:n) data[i] = V(args...) end diagonaloperator(b, data[:]) end function potentialoperator_momentum(b::CompositeBasis, V::Function) bases_pos = [] for base=b.bases @assert isa(base, MomentumBasis) push!(bases_pos, PositionBasis(base)) end b_pos = tensor(bases_pos...) transform(b, b_pos)*dense(potentialoperator_position(b_pos, V))*transform(b_pos, b) end """ FFTOperator Abstract type for all implementations of FFT operators. """ abstract type FFTOperator{BL<:Basis, BR<:Basis, T} <: AbstractOperator{BL,BR} end Base.eltype(x::FFTOperator) = promote_type(eltype(x.mul_before), eltype(x.mul_after)) """ FFTOperators Operator performing a fast fourier transformation when multiplied with a state that is a Ket or an Operator. """ mutable struct FFTOperators{BL<:Basis,BR<:Basis,T<:Array,P1,P2,P3,P4} <: FFTOperator{BL, BR, T} basis_l::BL basis_r::BR fft_l!::P1 fft_r!::P2 fft_l2!::P3 fft_r2!::P4 mul_before::T mul_after::T function FFTOperators(b1::BL, b2::BR, fft_l!::P1, fft_r!::P2, fft_l2!::P3, fft_r2!::P4, mul_before::T, mul_after::T) where {BL<:Basis,BR<:Basis,T,P1,P2,P3,P4} new{BL,BR,T,P1,P2,P3,P4}(b1, b2, fft_l!, fft_r!, fft_l2!, fft_r2!, mul_before, mul_after) end end """ FFTKets Operator that can only perform fast fourier transformations on Kets. This is much more memory efficient when only working with Kets. """ mutable struct FFTKets{BL<:Basis,BR<:Basis,T<:Array,P1,P2} <: FFTOperator{BL, BR, T} basis_l::BL basis_r::BR fft_l!::P1 fft_r!::P2 mul_before::T mul_after::T function FFTKets(b1::BL, b2::BR, fft_l!::P1, fft_r!::P2, mul_before::T, mul_after::T) where {BL<:Basis,BR<:Basis, T, P1, P2} new{BL, BR, T, P1, P2}(b1, b2, fft_l!, fft_r!, mul_before, mul_after) end end """ transform(b1::MomentumBasis, b2::PositionBasis) transform(b1::PositionBasis, b2::MomentumBasis) Transformation operator between position basis and momentum basis. """ function transform(basis_l::MomentumBasis, basis_r::PositionBasis; ket_only::Bool=false) Lx = (basis_r.xmax - basis_r.xmin) dp = spacing(basis_l) dx = spacing(basis_r) if basis_l.N != basis_r.N || abs(2*pi/dp - Lx)/Lx > 1e-12 throw(IncompatibleBases()) end mul_before = exp.(-1im*basis_l.pmin*(samplepoints(basis_r) .- basis_r.xmin)) mul_after = exp.(-1im*basis_r.xmin*samplepoints(basis_l))/sqrt(basis_r.N) x = Vector{ComplexF64}(undef, length(basis_r)) if ket_only FFTKets(basis_l, basis_r, plan_bfft!(x), plan_fft!(x), mul_before, mul_after) else A = Matrix{ComplexF64}(undef, length(basis_r), length(basis_r)) FFTOperators(basis_l, basis_r, plan_bfft!(x), plan_fft!(x), plan_bfft!(A, 2), plan_fft!(A, 1), mul_before, mul_after) end end """ transform(b1::CompositeBasis, b2::CompositeBasis) Transformation operator between two composite bases. Each of the bases has to contain bases of type PositionBasis and the other one a corresponding MomentumBasis. """ function transform(basis_l::PositionBasis, basis_r::MomentumBasis; ket_only::Bool=false) Lx = (basis_l.xmax - basis_l.xmin) dp = spacing(basis_r) dx = spacing(basis_l) if basis_l.N != basis_r.N || abs(2*pi/dp - Lx)/Lx > 1e-12 throw(IncompatibleBases()) end mul_before = exp.(1im*basis_l.xmin*(samplepoints(basis_r) .- basis_r.pmin)) mul_after = exp.(1im*basis_r.pmin*samplepoints(basis_l))/sqrt(basis_r.N) x = Vector{ComplexF64}(undef, length(basis_r)) if ket_only FFTKets(basis_l, basis_r, plan_fft!(x), plan_bfft!(x), mul_before, mul_after) else A = Matrix{ComplexF64}(undef, length(basis_r), length(basis_r)) FFTOperators(basis_l, basis_r, plan_fft!(x), plan_bfft!(x), plan_fft!(A, 2), plan_bfft!(A, 1), mul_before, mul_after) end end function transform(basis_l::CompositeBasis, basis_r::CompositeBasis; ket_only::Bool=false, index::Vector{Int}=Int[]) @assert length(basis_l.bases) == length(basis_r.bases) if length(index) == 0 check_pos = [isa.(basis_l.bases, PositionBasis)...] check_mom = [isa.(basis_l.bases, MomentumBasis)...] if any(check_pos) && !any(check_mom) index = [1:length(basis_l.bases);][check_pos] elseif any(check_mom) && !any(check_pos) index = [1:length(basis_l.bases);][check_mom] else throw(IncompatibleBases()) end end if all(isa.(basis_l.bases[index], PositionBasis)) @assert all(isa.(basis_r.bases[index], MomentumBasis)) transform_xp(basis_l, basis_r, index; ket_only=ket_only) elseif all(isa.(basis_l.bases[index], MomentumBasis)) @assert all(isa.(basis_r.bases[index], PositionBasis)) transform_px(basis_l, basis_r, index; ket_only=ket_only) else throw(IncompatibleBases()) end end function transform_xp(basis_l::CompositeBasis, basis_r::CompositeBasis, index::Vector{Int}; ket_only::Bool=false) n = length(basis_l.bases) Lx = [(b.xmax - b.xmin) for b=basis_l.bases[index]] dp = [spacing(b) for b=basis_r.bases[index]] dx = [spacing(b) for b=basis_l.bases[index]] N = [length(b) for b=basis_l.bases] for i=1:n if N[i] != length(basis_r.bases[i]) throw(IncompatibleBases()) end end for i=1:length(index) if abs(2*pi/dp[i] - Lx[i])/Lx[i] > 1e-12 throw(IncompatibleBases()) end end if index[1] == 1 mul_before = exp.(1im*basis_l.bases[1].xmin*(samplepoints(basis_r.bases[1]) .- basis_r.bases[1].pmin)) mul_after = exp.(1im*basis_r.bases[1].pmin*samplepoints(basis_l.bases[1]))/sqrt(basis_r.bases[1].N) else mul_before = ones(N[1]) mul_after = ones(N[1]) end for i=2:n if any(i .== index) mul_before = kron(exp.(1im*basis_l.bases[i].xmin*(samplepoints(basis_r.bases[i]) .- basis_r.bases[i].pmin)), mul_before) mul_after = kron(exp.(1im*basis_r.bases[i].pmin*samplepoints(basis_l.bases[i]))/sqrt(basis_r.bases[i].N), mul_after) else mul_before = kron(ones(N[i]), mul_before) mul_after = kron(ones(N[i]), mul_after) end end mul_before = reshape(mul_before, (N...,)) mul_after = reshape(mul_after, (N...,)) x = Array{ComplexF64}(undef, N...) if ket_only FFTKets(basis_l, basis_r, plan_fft!(x, index), plan_bfft!(x, index), mul_before, mul_after) else A = Array{ComplexF64}(undef, [N; N]...) FFTOperators(basis_l, basis_r, plan_fft!(x, index), plan_bfft!(x, index), plan_fft!(A, [n + 1:2n;][index]), plan_bfft!(A, [1:n;][index]), mul_before, mul_after) end end function transform_px(basis_l::CompositeBasis, basis_r::CompositeBasis, index::Vector{Int}; ket_only::Bool=false) n = length(basis_l.bases) Lx = [(b.xmax - b.xmin) for b=basis_r.bases[index]] dp = [spacing(b) for b=basis_l.bases[index]] dx = [spacing(b) for b=basis_r.bases[index]] N = [length(b) for b=basis_l.bases] for i=1:n if N[i] != length(basis_r.bases[i]) throw(IncompatibleBases()) end end for i=1:length(index) if abs(2*pi/dp[i] - Lx[i])/Lx[i] > 1e-12 throw(IncompatibleBases()) end end if index[1] == 1 mul_before = exp.(-1im*basis_l.bases[1].pmin*(samplepoints(basis_r.bases[1]) .- basis_r.bases[1].xmin)) mul_after = exp.(-1im*basis_r.bases[1].xmin*samplepoints(basis_l.bases[1]))/sqrt(N[1]) else mul_before = ones(N[1]) mul_after = ones(N[1]) end for i=2:n if i in index mul_before = kron(exp.(-1im*basis_l.bases[i].pmin*(samplepoints(basis_r.bases[i]) .- basis_r.bases[i].xmin)), mul_before) mul_after = kron(exp.(-1im*basis_r.bases[i].xmin*samplepoints(basis_l.bases[i]))/sqrt(N[i]), mul_after) else mul_before = kron(ones(N[i]), mul_before) mul_after = kron(ones(N[i]), mul_after) end end mul_before = reshape(mul_before, (N...,)) mul_after = reshape(mul_after, (N...,)) x = Array{ComplexF64}(undef, N...) if ket_only FFTKets(basis_l, basis_r, plan_bfft!(x, index), plan_fft!(x, index), mul_before, mul_after) else A = Array{ComplexF64}(undef, [N; N]...) FFTOperators(basis_l, basis_r, plan_bfft!(x, index), plan_fft!(x, index), plan_bfft!(A, [n + 1:2n;][index]), plan_fft!(A, [1:n;][index]), mul_before, mul_after) end end DenseOperator(op::FFTOperator) = op*identityoperator(DenseOpType, op.basis_r) dagger(op::FFTOperators) = transform(op.basis_r, op.basis_l) dagger(op::FFTKets) = transform(op.basis_r, op.basis_l; ket_only=true) tensor(A::FFTOperators, B::FFTOperators) = transform(tensor(A.basis_l, B.basis_l), tensor(A.basis_r, B.basis_r)) tensor(A::FFTKets, B::FFTKets) = transform(tensor(A.basis_l, B.basis_l), tensor(A.basis_r, B.basis_r); ket_only=true) function mul!(result::Ket{B1},M::FFTOperator{B1,B2},b::Ket{B2},alpha_,beta_) where {B1<:Basis,B2<:Basis} alpha = convert(ComplexF64, alpha_) beta = convert(ComplexF64, beta_) N::Int = length(M.basis_r) if beta==Complex(0.) @inbounds for i=1:N result.data[i] = M.mul_before[i] * b.data[i] end M.fft_r! * reshape(result.data, size(M.mul_before)) @inbounds for i=1:N result.data[i] *= M.mul_after[i] * alpha end else psi_ = Ket(M.basis_l, copy(b.data)) @inbounds for i=1:N psi_.data[i] *= M.mul_before[i] end M.fft_r! * reshape(psi_.data, size(M.mul_before)) @inbounds for i=1:N result.data[i] = beta*result.data[i] + alpha * psi_.data[i] * M.mul_after[i] end end result end function mul!(result::Bra{B2},b::Bra{B1},M::FFTOperator{B1,B2},alpha_,beta_) where {B1<:Basis,B2<:Basis} alpha = convert(ComplexF64, alpha_) beta = convert(ComplexF64, beta_) N::Int = length(M.basis_l) if beta==Complex(0.) @inbounds for i=1:N result.data[i] = conj(M.mul_after[i]) * conj(b.data[i]) end M.fft_l! * reshape(result.data, size(M.mul_after)) @inbounds for i=1:N result.data[i] = conj(result.data[i]) * M.mul_before[i] * alpha end else psi_ = Bra(M.basis_r, conj(b.data)) @inbounds for i=1:N psi_.data[i] *= conj(M.mul_after[i]) end M.fft_l! * reshape(psi_.data, size(M.mul_after)) @inbounds for i=1:N result.data[i] = beta*result.data[i] + alpha * conj(psi_.data[i]) * M.mul_before[i] end end result end function mul!(result::Operator{B1,B3,T},A::Operator{B1,B2},B::FFTOperators{B2,B3},alpha_,beta_) where {B1<:Basis,B2<:Basis,B3<:Basis,T} alpha = convert(ComplexF64, alpha_) beta = convert(ComplexF64, beta_) if beta != Complex(0.) data = similar(result.data, size(result.data, 1), size(result.data, 2)) else data = result.data end copyto!(data, A.data) @inbounds for j=1:length(B.mul_after), i=1:length(B.mul_after) data[i, j] *= B.mul_after[j] end conj!(data) n = size(B.mul_after) B.fft_l2! * reshape(data, n..., n...) conj!(data) N = prod(n) @inbounds for j=1:N, i=1:N data[i, j] *= B.mul_before[j] end if alpha != Complex(1.) lmul!(alpha, data) end if beta != Complex(0.) rmul!(result.data, beta) result.data += data end result end function mul!(result::Operator{B1,B3,T},A::FFTOperators{B1,B2},B::Operator{B2,B3},alpha_,beta_) where {B1<:Basis,B2<:Basis,B3<:Basis,T} alpha = convert(ComplexF64, alpha_) beta = convert(ComplexF64, beta_) if beta != Complex(0.) data = similar(result.data, size(result.data, 1), size(result.data, 2)) else data = result.data end copyto!(data, B.data) @inbounds for j=1:length(A.mul_before), i=1:length(A.mul_before) data[i, j] *= A.mul_before[i] end n = size(A.mul_before) A.fft_r2! * reshape(data, n...,n...) N = prod(n) @inbounds for j=1:N, i=1:N data[i, j] *= A.mul_after[i] end if alpha != Complex(1.) lmul!(alpha, data) end if beta != Complex(0.) rmul!(result.data, beta) result.data += data end result end
[ 11748, 7308, 25, 2292, 198, 3500, 376, 9792, 54, 198, 198, 37811, 198, 220, 220, 220, 23158, 15522, 271, 7, 87, 1084, 11, 2124, 9806, 11, 399, 13033, 8, 198, 220, 220, 220, 23158, 15522, 271, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 198, 198, 15522, 271, 329, 257, 18758, 287, 1103, 2272, 13, 198, 198, 1890, 21654, 27458, 13215, 389, 9672, 543, 1724, 326, 198, 1169, 826, 1712, 966, 5447, 416, 4600, 87, 9806, 63, 318, 407, 3017, 287, 262, 4308, 198, 4360, 318, 5447, 284, 307, 262, 976, 355, 4600, 87, 1084, 44646, 198, 198, 2215, 257, 685, 63, 29252, 298, 388, 15522, 271, 63, 16151, 31, 5420, 8, 318, 1813, 355, 4578, 262, 2748, 3815, 198, 1659, 7559, 87, 23330, 1084, 92, 15506, 290, 7559, 87, 23330, 9806, 92, 15506, 389, 2233, 284, 262, 27458, 18645, 3403, 198, 3549, 393, 1342, 14977, 290, 389, 7147, 284, 307, 198, 15506, 12, 6852, 14415, 14, 26059, 15506, 290, 7559, 6852, 14415, 14, 26059, 15506, 351, 7559, 26059, 16193, 79, 23330, 9806, 92, 12, 79, 23330, 1084, 92, 20679, 45, 15506, 13, 198, 37811, 198, 7249, 23158, 15522, 271, 90, 51, 11, 55, 16, 11, 55, 17, 92, 1279, 25, 6455, 271, 198, 220, 220, 220, 5485, 3712, 38469, 90, 51, 92, 198, 220, 220, 220, 2124, 1084, 3712, 43879, 2414, 198, 220, 220, 220, 2124, 9806, 3712, 43879, 2414, 198, 220, 220, 220, 399, 3712, 51, 198, 220, 220, 220, 2163, 23158, 15522, 271, 90, 55, 16, 11, 55, 17, 92, 7, 87, 1084, 3712, 15633, 11, 2124, 9806, 3712, 15633, 11, 399, 3712, 51, 8, 810, 1391, 55, 16, 11, 55, 17, 11, 51, 27, 25, 5317, 92, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 318, 64, 7, 55, 16, 11, 6416, 8, 11405, 318, 64, 7, 55, 17, 11, 6416, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 90, 51, 11, 55, 16, 11, 55, 17, 92, 26933, 45, 4357, 2124, 1084, 11, 2124, 9806, 11, 399, 8, 198, 220, 220, 220, 886, 198, 437, 198, 26545, 15522, 271, 7, 87, 1084, 3712, 15633, 11, 2124, 9806, 3712, 15633, 11, 399, 3712, 5317, 8, 796, 23158, 15522, 271, 90, 87, 1084, 11, 87, 9806, 92, 7, 87, 1084, 11, 87, 9806, 11, 45, 8, 198, 198, 37811, 198, 220, 220, 220, 29278, 388, 15522, 271, 7, 79, 1084, 11, 9114, 897, 11, 399, 13033, 8, 198, 220, 220, 220, 29278, 388, 15522, 271, 7, 65, 3712, 26545, 15522, 271, 8, 198, 198, 15522, 271, 329, 257, 18758, 287, 12858, 2272, 13, 198, 198, 1890, 21654, 27458, 13215, 389, 9672, 543, 1724, 326, 198, 63, 4426, 897, 63, 318, 407, 3017, 287, 262, 4308, 475, 318, 5447, 284, 307, 262, 976, 355, 4600, 79, 1084, 44646, 198, 198, 2215, 257, 685, 63, 26545, 15522, 271, 63, 16151, 31, 5420, 8, 318, 1813, 355, 4578, 262, 2748, 3815, 198, 1659, 7559, 79, 23330, 1084, 92, 15506, 290, 7559, 79, 23330, 9806, 92, 15506, 389, 2233, 284, 262, 27458, 18645, 3403, 198, 3549, 393, 1342, 14977, 290, 389, 7147, 284, 307, 198, 15506, 12, 6852, 14415, 14, 34350, 15506, 290, 7559, 6852, 14415, 14, 34350, 15506, 351, 7559, 34350, 16193, 87, 23330, 9806, 92, 12, 87, 23330, 1084, 92, 20679, 45, 15506, 13, 198, 37811, 198, 7249, 29278, 388, 15522, 271, 90, 47, 16, 11, 47, 17, 92, 1279, 25, 6455, 271, 198, 220, 220, 220, 5485, 3712, 38469, 90, 5317, 92, 198, 220, 220, 220, 279, 1084, 3712, 43879, 2414, 198, 220, 220, 220, 9114, 897, 3712, 43879, 2414, 198, 220, 220, 220, 399, 3712, 5317, 198, 220, 220, 220, 2163, 29278, 388, 15522, 271, 90, 47, 16, 11, 47, 17, 92, 7, 79, 1084, 3712, 15633, 11, 9114, 897, 3712, 15633, 11, 399, 3712, 5317, 8, 810, 1391, 47, 16, 11, 47, 17, 92, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 318, 64, 7, 47, 16, 11, 6416, 8, 11405, 318, 64, 7, 47, 17, 11, 6416, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 26933, 45, 4357, 279, 1084, 11, 9114, 897, 11, 399, 8, 198, 220, 220, 220, 886, 198, 437, 198, 29252, 298, 388, 15522, 271, 7, 79, 1084, 3712, 15633, 11, 9114, 897, 3712, 15633, 11, 399, 3712, 5317, 8, 796, 29278, 388, 15522, 271, 90, 79, 1084, 11, 4426, 897, 92, 7, 79, 1084, 11, 9114, 897, 11, 399, 8, 198, 198, 26545, 15522, 271, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 796, 357, 26059, 796, 357, 65, 13, 4426, 897, 532, 275, 13, 79, 1084, 20679, 65, 13, 45, 26, 23158, 15522, 271, 32590, 14415, 14, 26059, 11, 31028, 14, 26059, 11, 275, 13, 45, 4008, 198, 29252, 298, 388, 15522, 271, 7, 65, 3712, 26545, 15522, 271, 8, 796, 357, 34350, 796, 357, 65, 13, 87, 9806, 532, 275, 13, 87, 1084, 20679, 65, 13, 45, 26, 29278, 388, 15522, 271, 32590, 14415, 14, 34350, 11, 31028, 14, 34350, 11, 275, 13, 45, 4008, 198, 198, 855, 7, 65, 16, 3712, 26545, 15522, 271, 11, 275, 17, 3712, 26545, 15522, 271, 8, 796, 275, 16, 13, 87, 1084, 855, 65, 17, 13, 87, 1084, 11405, 275, 16, 13, 87, 9806, 855, 65, 17, 13, 87, 9806, 11405, 275, 16, 13, 45, 855, 65, 17, 13, 45, 198, 855, 7, 65, 16, 3712, 29252, 298, 388, 15522, 271, 11, 275, 17, 3712, 29252, 298, 388, 15522, 271, 8, 796, 275, 16, 13, 79, 1084, 855, 65, 17, 13, 79, 1084, 11405, 275, 16, 13, 4426, 897, 855, 65, 17, 13, 4426, 897, 11405, 275, 16, 13, 45, 855, 65, 17, 13, 45, 628, 198, 37811, 198, 220, 220, 220, 31986, 31562, 5219, 7, 65, 3712, 26545, 15522, 271, 11, 2124, 15, 11, 279, 15, 11, 264, 13495, 8, 198, 220, 220, 220, 31986, 31562, 5219, 7, 65, 3712, 29252, 298, 388, 15522, 271, 11, 2124, 15, 11, 279, 15, 11, 264, 13495, 8, 198, 198, 16447, 257, 12822, 31562, 1181, 1088, 4600, 87, 15, 63, 290, 63, 279, 15, 63, 351, 9647, 4600, 82, 13495, 44646, 198, 198, 818, 1103, 2272, 262, 31986, 31562, 1181, 318, 5447, 355, 198, 198, 15506, 63, 11018, 198, 6852, 12016, 72, 7, 87, 8, 796, 26867, 31944, 90, 16, 18477, 6852, 14415, 36796, 16, 14, 19, 92, 6852, 31166, 17034, 90, 6852, 82, 13495, 11709, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 36796, 72, 279, 62, 15, 357, 87, 12, 6852, 31944, 90, 87, 62, 15, 18477, 17, 30072, 532, 26867, 31944, 90, 7, 87, 12, 87, 62, 15, 8, 61, 17, 18477, 17, 26867, 82, 13495, 61, 17, 11709, 198, 15506, 63, 198, 198, 392, 318, 5884, 284, 262, 12858, 2272, 6770, 198, 198, 15506, 63, 11018, 198, 6852, 12016, 72, 7, 79, 8, 796, 26867, 31944, 90, 6852, 31166, 17034, 90, 6852, 82, 13495, 11709, 90, 6852, 14415, 36796, 16, 14, 19, 11709, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 36796, 12, 72, 2124, 62, 15, 357, 79, 12, 6852, 31944, 90, 79, 62, 15, 18477, 17, 30072, 532, 26867, 31944, 90, 16, 18477, 17, 92, 7, 79, 12, 79, 62, 15, 8, 61, 17, 26867, 82, 13495, 61, 17, 92, 198, 15506, 63, 198, 198, 8869, 257, 34296, 5277, 12, 7645, 1161, 198, 198, 15506, 63, 11018, 198, 6852, 12016, 72, 7, 79, 8, 796, 26867, 31944, 90, 16, 18477, 6852, 31166, 17034, 90, 17, 6852, 14415, 11709, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26867, 600, 23330, 12, 6852, 259, 19628, 92, 36796, 6852, 259, 19628, 92, 304, 36796, 12, 541, 87, 92, 6852, 12016, 72, 7, 87, 8, 26867, 11018, 26224, 90, 67, 92, 87, 198, 15506, 63, 198, 198, 464, 1181, 468, 262, 6608, 198, 198, 9, 7559, 158, 253, 101, 79, 158, 253, 102, 796, 279, 62, 15, 15506, 198, 9, 7559, 158, 253, 101, 87, 158, 253, 102, 796, 2124, 62, 15, 15506, 198, 9, 7559, 6852, 11018, 26224, 90, 19852, 92, 7, 87, 8, 796, 26867, 31944, 90, 38392, 61, 17, 18477, 17, 92, 15506, 198, 9, 7559, 6852, 11018, 26224, 90, 19852, 92, 7, 79, 8, 796, 26867, 31944, 90, 16, 18477, 17, 18074, 225, 61, 17, 92, 15506, 198, 198, 22229, 284, 262, 5470, 1146, 3306, 1221, 1186, 1634, 3224, 20796, 198, 22584, 669, 7559, 6852, 31166, 17034, 90, 138, 242, 87, 92, 15506, 290, 7559, 6852, 31166, 17034, 90, 138, 242, 79, 92, 15506, 389, 973, 523, 326, 198, 15506, 6852, 75, 9248, 2124, 62, 72, 91, 138, 101, 6852, 81, 9248, 796, 26867, 31166, 17034, 90, 138, 242, 2124, 92, 7377, 101, 7, 87, 62, 72, 8, 15506, 290, 7559, 6852, 75, 9248, 279, 62, 72, 91, 138, 101, 6852, 81, 9248, 796, 26867, 31166, 17034, 90, 138, 242, 279, 92, 7377, 101, 7, 79, 62, 72, 8, 15506, 523, 198, 5562, 262, 7186, 43092, 1181, 318, 39279, 13, 198, 37811, 198, 8818, 31986, 31562, 5219, 7, 65, 3712, 26545, 15522, 271, 11, 2124, 15, 3712, 15633, 11, 279, 15, 3712, 15633, 11, 264, 13495, 3712, 15633, 8, 198, 220, 220, 220, 46231, 796, 43092, 7, 65, 8, 198, 220, 220, 220, 44332, 796, 31050, 7, 65, 8, 198, 220, 220, 220, 17130, 796, 352, 13, 15, 29006, 14415, 61, 7, 16, 14, 19, 27493, 31166, 17034, 7, 82, 13495, 4008, 9, 31166, 17034, 7, 34350, 8, 198, 220, 220, 220, 2124, 796, 275, 13, 87, 1084, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 65, 13, 45, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 13, 7890, 58, 72, 60, 796, 17130, 9, 11201, 7, 16, 320, 9, 79, 15, 9, 7, 87, 12, 87, 15, 14, 17, 8, 532, 357, 87, 12, 87, 15, 8, 61, 17, 29006, 17, 9, 82, 13495, 61, 17, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15853, 44332, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 46231, 198, 437, 198, 198, 8818, 31986, 31562, 5219, 7, 65, 3712, 29252, 298, 388, 15522, 271, 11, 2124, 15, 3712, 15633, 11, 279, 15, 3712, 15633, 11, 264, 13495, 3712, 15633, 8, 198, 220, 220, 220, 46231, 796, 43092, 7, 65, 8, 198, 220, 220, 220, 288, 79, 796, 31050, 7, 65, 8, 198, 220, 220, 220, 17130, 796, 19862, 17034, 7, 82, 13495, 20679, 14415, 61, 7, 16, 14, 19, 27493, 31166, 17034, 7, 26059, 8, 198, 220, 220, 220, 279, 796, 275, 13, 79, 1084, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 65, 13, 45, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 13, 7890, 58, 72, 60, 796, 17130, 9, 11201, 32590, 16, 320, 9, 87, 15, 9, 7, 79, 12, 79, 15, 14, 17, 8, 532, 357, 79, 12, 79, 15, 8, 61, 17, 14, 17, 9, 82, 13495, 61, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 15853, 288, 79, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 46231, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 31050, 7, 65, 3712, 26545, 15522, 271, 8, 198, 198, 28813, 1945, 1022, 734, 15909, 2173, 286, 262, 1103, 2272, 4308, 13, 198, 37811, 198, 2777, 4092, 7, 65, 3712, 26545, 15522, 271, 8, 796, 357, 65, 13, 87, 9806, 532, 275, 13, 87, 1084, 20679, 65, 13, 45, 198, 37811, 198, 220, 220, 220, 31050, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 198, 198, 29252, 298, 388, 3580, 1022, 734, 15909, 2173, 286, 262, 12858, 4308, 13, 198, 37811, 198, 2777, 4092, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 796, 357, 65, 13, 4426, 897, 532, 275, 13, 79, 1084, 20679, 65, 13, 45, 198, 198, 37811, 198, 220, 220, 220, 6291, 13033, 7, 65, 3712, 26545, 15522, 271, 8, 198, 198, 87, 3815, 286, 262, 1103, 2272, 4308, 13, 198, 37811, 198, 39873, 13033, 7, 65, 3712, 26545, 15522, 271, 8, 796, 357, 34350, 796, 31050, 7, 65, 1776, 48436, 2414, 58, 65, 13, 87, 1084, 1343, 1312, 9, 34350, 329, 1312, 28, 15, 25, 65, 13, 45, 12, 16, 12962, 198, 37811, 198, 220, 220, 220, 6291, 13033, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 198, 198, 79, 3815, 286, 262, 12858, 4308, 13, 198, 37811, 198, 39873, 13033, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 796, 357, 26059, 796, 31050, 7, 65, 1776, 48436, 2414, 58, 65, 13, 79, 1084, 1343, 1312, 9, 26059, 329, 1312, 28, 15, 25, 65, 13, 45, 12, 16, 12962, 198, 198, 37811, 198, 220, 220, 220, 2292, 7, 65, 3712, 26545, 15522, 271, 8, 198, 198, 26545, 10088, 287, 1103, 2272, 13, 198, 37811, 198, 9150, 7, 65, 3712, 26545, 15522, 271, 8, 796, 1338, 17208, 18843, 1352, 7, 65, 11, 29877, 7, 18683, 27923, 7, 41887, 7, 39873, 13033, 7, 65, 4008, 22305, 628, 198, 37811, 198, 220, 220, 220, 2292, 7, 65, 25, 29252, 298, 388, 15522, 271, 8, 198, 198, 26545, 10088, 287, 12858, 2272, 13, 198, 37811, 198, 8818, 2292, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 198, 220, 220, 220, 275, 62, 1930, 796, 23158, 15522, 271, 7, 65, 8, 198, 220, 220, 220, 6121, 7, 65, 11, 275, 62, 1930, 27493, 67, 1072, 7, 9150, 7, 65, 62, 1930, 4008, 9, 35636, 7, 65, 62, 1930, 11, 275, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 12858, 7, 65, 25, 29252, 298, 388, 15522, 271, 8, 198, 198, 29252, 298, 388, 10088, 287, 12858, 2272, 13, 198, 37811, 198, 32542, 298, 388, 7, 65, 3712, 29252, 298, 388, 15522, 271, 8, 796, 1338, 17208, 18843, 1352, 7, 65, 11, 29877, 7, 18683, 27923, 7, 41887, 7, 39873, 13033, 7, 65, 4008, 22305, 198, 198, 37811, 198, 220, 220, 220, 12858, 7, 65, 3712, 26545, 15522, 271, 8, 198, 198, 29252, 298, 388, 10088, 287, 1103, 2272, 13, 198, 37811, 198, 8818, 12858, 7, 65, 3712, 26545, 15522, 271, 8, 198, 220, 220, 220, 275, 62, 32542, 796, 29278, 388, 15522, 271, 7, 65, 8, 198, 220, 220, 220, 6121, 7, 65, 11, 275, 62, 32542, 27493, 67, 1072, 7, 32542, 298, 388, 7, 65, 62, 32542, 4008, 9, 35636, 7, 65, 62, 32542, 11, 275, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2785, 46616, 7, 65, 3712, 26545, 15522, 271, 11, 569, 7, 87, 4008, 198, 198, 18843, 1352, 10200, 257, 2785, 7559, 53, 7, 87, 8, 15506, 287, 1103, 2272, 13, 198, 37811, 198, 8818, 2785, 46616, 7, 65, 3712, 26545, 15522, 271, 11, 569, 3712, 22203, 8, 198, 220, 220, 220, 2124, 796, 6291, 13033, 7, 65, 8, 198, 220, 220, 220, 40039, 46616, 7, 65, 11, 569, 12195, 87, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2785, 46616, 7, 65, 3712, 29252, 298, 388, 15522, 271, 11, 569, 7, 87, 4008, 198, 198, 18843, 1352, 10200, 257, 2785, 7559, 53, 7, 87, 8, 15506, 287, 12858, 2272, 13, 198, 37811, 198, 8818, 2785, 46616, 7, 65, 3712, 29252, 298, 388, 15522, 271, 11, 569, 3712, 22203, 8, 198, 220, 220, 220, 275, 62, 1930, 796, 23158, 15522, 271, 7, 65, 8, 198, 220, 220, 220, 6121, 7, 65, 11, 275, 62, 1930, 27493, 67, 1072, 7, 13059, 1843, 46616, 7, 65, 62, 1930, 11, 569, 4008, 9, 35636, 7, 65, 62, 1930, 11, 275, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2785, 46616, 7, 65, 3712, 5377, 1930, 578, 15522, 271, 11, 569, 7, 87, 11, 331, 11, 1976, 11, 2644, 4008, 198, 198, 18843, 1352, 10200, 257, 2785, 7559, 53, 15506, 287, 517, 621, 530, 15793, 13, 198, 198, 2, 20559, 2886, 198, 9, 4600, 65, 63, 25, 49355, 4308, 17747, 14177, 2035, 286, 4600, 26545, 15522, 271, 63, 393, 198, 220, 220, 220, 4600, 29252, 298, 388, 15522, 271, 44646, 5740, 11, 326, 4585, 428, 351, 257, 24185, 4308, 287, 198, 220, 220, 220, 12858, 2272, 1244, 15000, 257, 1588, 2033, 286, 4088, 13, 198, 9, 4600, 53, 63, 25, 15553, 12059, 262, 2785, 13, 26195, 45589, 25, 383, 1271, 286, 7159, 198, 220, 220, 220, 6292, 416, 4600, 53, 63, 1276, 2872, 262, 21739, 15793, 13, 11399, 11, 262, 1502, 198, 220, 220, 220, 286, 262, 7159, 468, 284, 2872, 326, 286, 262, 1502, 286, 262, 11192, 273, 1720, 286, 198, 220, 220, 220, 12536, 357, 68, 13, 70, 13, 611, 4600, 65, 28, 65, 87, 158, 232, 245, 1525, 158, 232, 245, 65, 89, 47671, 788, 4600, 53, 7, 87, 11, 88, 11, 89, 8, 63, 737, 198, 37811, 198, 8818, 2785, 46616, 7, 65, 3712, 5377, 1930, 578, 15522, 271, 11, 569, 3712, 22203, 8, 198, 220, 220, 220, 611, 318, 64, 7, 65, 13, 65, 1386, 58, 16, 4357, 23158, 15522, 271, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2785, 46616, 62, 9150, 7, 65, 11, 569, 8, 198, 220, 220, 220, 2073, 361, 318, 64, 7, 65, 13, 65, 1386, 58, 16, 4357, 29278, 388, 15522, 271, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2785, 46616, 62, 32542, 298, 388, 7, 65, 11, 569, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 886, 198, 437, 198, 8818, 2785, 46616, 62, 9150, 7, 65, 3712, 5377, 1930, 578, 15522, 271, 11, 569, 3712, 22203, 8, 198, 220, 220, 220, 329, 2779, 28, 65, 13, 65, 1386, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 318, 64, 7, 8692, 11, 23158, 15522, 271, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2173, 796, 685, 39873, 13033, 7, 65, 16, 8, 329, 275, 16, 28, 65, 13, 65, 1386, 60, 198, 220, 220, 220, 5391, 82, 796, 4129, 12195, 13033, 8, 198, 220, 220, 220, 299, 796, 4129, 7, 65, 13, 65, 1386, 8, 198, 220, 220, 220, 1366, 796, 15690, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 5391, 82, 23029, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 13664, 7, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 309, 29291, 7, 43476, 35610, 5497, 1063, 7, 7890, 38381, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 26498, 796, 357, 13033, 58, 73, 7131, 9630, 58, 73, 11907, 329, 474, 28, 16, 25, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 60, 796, 569, 7, 22046, 23029, 198, 220, 220, 220, 886, 628, 220, 220, 220, 40039, 46616, 7, 65, 11, 1366, 58, 25, 12962, 198, 437, 198, 8818, 2785, 46616, 62, 32542, 298, 388, 7, 65, 3712, 5377, 1930, 578, 15522, 271, 11, 569, 3712, 22203, 8, 198, 220, 220, 220, 12536, 62, 1930, 796, 17635, 198, 220, 220, 220, 329, 2779, 28, 65, 13, 65, 1386, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 318, 64, 7, 8692, 11, 29278, 388, 15522, 271, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 65, 1386, 62, 1930, 11, 23158, 15522, 271, 7, 8692, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 275, 62, 1930, 796, 11192, 273, 7, 65, 1386, 62, 1930, 23029, 198, 220, 220, 220, 6121, 7, 65, 11, 275, 62, 1930, 27493, 67, 1072, 7, 13059, 1843, 46616, 62, 9150, 7, 65, 62, 1930, 11, 569, 4008, 9, 35636, 7, 65, 62, 1930, 11, 275, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 376, 9792, 18843, 1352, 198, 198, 23839, 2099, 329, 477, 25504, 286, 376, 9792, 12879, 13, 198, 37811, 198, 397, 8709, 2099, 376, 9792, 18843, 1352, 90, 9148, 27, 25, 15522, 271, 11, 11177, 27, 25, 15522, 271, 11, 309, 92, 1279, 25, 27741, 18843, 1352, 90, 9148, 11, 11473, 92, 886, 198, 198, 14881, 13, 417, 4906, 7, 87, 3712, 5777, 10468, 525, 1352, 8, 796, 7719, 62, 4906, 7, 417, 4906, 7, 87, 13, 76, 377, 62, 19052, 828, 1288, 4906, 7, 87, 13, 76, 377, 62, 8499, 4008, 198, 198, 37811, 198, 220, 220, 220, 376, 9792, 18843, 2024, 198, 198, 18843, 1352, 9489, 257, 3049, 46287, 5277, 13389, 618, 33096, 351, 257, 1181, 198, 5562, 318, 257, 43092, 393, 281, 35946, 13, 198, 37811, 198, 76, 18187, 2878, 376, 9792, 18843, 2024, 90, 9148, 27, 25, 15522, 271, 11, 11473, 27, 25, 15522, 271, 11, 51, 27, 25, 19182, 11, 47, 16, 11, 47, 17, 11, 47, 18, 11, 47, 19, 92, 1279, 25, 376, 9792, 18843, 1352, 90, 9148, 11, 11177, 11, 309, 92, 198, 220, 220, 220, 4308, 62, 75, 3712, 9148, 198, 220, 220, 220, 4308, 62, 81, 3712, 11473, 198, 220, 220, 220, 277, 701, 62, 75, 0, 3712, 47, 16, 198, 220, 220, 220, 277, 701, 62, 81, 0, 3712, 47, 17, 198, 220, 220, 220, 277, 701, 62, 75, 17, 0, 3712, 47, 18, 198, 220, 220, 220, 277, 701, 62, 81, 17, 0, 3712, 47, 19, 198, 220, 220, 220, 35971, 62, 19052, 3712, 51, 198, 220, 220, 220, 35971, 62, 8499, 3712, 51, 198, 220, 220, 220, 2163, 376, 9792, 18843, 2024, 7, 65, 16, 3712, 9148, 11, 275, 17, 3712, 11473, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 75, 0, 3712, 47, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 81, 0, 3712, 47, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 75, 17, 0, 3712, 47, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 81, 17, 0, 3712, 47, 19, 11, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 3712, 51, 11, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 3712, 51, 8, 810, 1391, 9148, 27, 25, 15522, 271, 11, 11473, 27, 25, 15522, 271, 11, 51, 11, 47, 16, 11, 47, 17, 11, 47, 18, 11, 47, 19, 92, 198, 220, 220, 220, 220, 220, 220, 220, 649, 90, 9148, 11, 11473, 11, 51, 11, 47, 16, 11, 47, 17, 11, 47, 18, 11, 47, 19, 92, 7, 65, 16, 11, 275, 17, 11, 277, 701, 62, 75, 28265, 277, 701, 62, 81, 28265, 277, 701, 62, 75, 17, 28265, 277, 701, 62, 81, 17, 28265, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 376, 9792, 42, 1039, 198, 198, 18843, 1352, 326, 460, 691, 1620, 3049, 46287, 5277, 38226, 319, 509, 1039, 13, 198, 1212, 318, 881, 517, 4088, 6942, 618, 691, 1762, 351, 509, 1039, 13, 198, 37811, 198, 76, 18187, 2878, 376, 9792, 42, 1039, 90, 9148, 27, 25, 15522, 271, 11, 11473, 27, 25, 15522, 271, 11, 51, 27, 25, 19182, 11, 47, 16, 11, 47, 17, 92, 1279, 25, 376, 9792, 18843, 1352, 90, 9148, 11, 11177, 11, 309, 92, 198, 220, 220, 220, 4308, 62, 75, 3712, 9148, 198, 220, 220, 220, 4308, 62, 81, 3712, 11473, 198, 220, 220, 220, 277, 701, 62, 75, 0, 3712, 47, 16, 198, 220, 220, 220, 277, 701, 62, 81, 0, 3712, 47, 17, 198, 220, 220, 220, 35971, 62, 19052, 3712, 51, 198, 220, 220, 220, 35971, 62, 8499, 3712, 51, 198, 220, 220, 220, 2163, 376, 9792, 42, 1039, 7, 65, 16, 3712, 9148, 11, 275, 17, 3712, 11473, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 75, 0, 3712, 47, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 277, 701, 62, 81, 0, 3712, 47, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 3712, 51, 11, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 3712, 51, 8, 810, 1391, 9148, 27, 25, 15522, 271, 11, 11473, 27, 25, 15522, 271, 11, 309, 11, 350, 16, 11, 350, 17, 92, 198, 220, 220, 220, 220, 220, 220, 220, 649, 90, 9148, 11, 11177, 11, 309, 11, 350, 16, 11, 350, 17, 92, 7, 65, 16, 11, 275, 17, 11, 277, 701, 62, 75, 28265, 277, 701, 62, 81, 28265, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6121, 7, 65, 16, 3712, 29252, 298, 388, 15522, 271, 11, 275, 17, 3712, 26545, 15522, 271, 8, 198, 220, 220, 220, 6121, 7, 65, 16, 3712, 26545, 15522, 271, 11, 275, 17, 3712, 29252, 298, 388, 15522, 271, 8, 198, 198, 8291, 1161, 10088, 1022, 2292, 4308, 290, 12858, 4308, 13, 198, 37811, 198, 8818, 6121, 7, 12093, 271, 62, 75, 3712, 29252, 298, 388, 15522, 271, 11, 4308, 62, 81, 3712, 26545, 15522, 271, 26, 22354, 62, 8807, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 406, 87, 796, 357, 12093, 271, 62, 81, 13, 87, 9806, 532, 4308, 62, 81, 13, 87, 1084, 8, 198, 220, 220, 220, 288, 79, 796, 31050, 7, 12093, 271, 62, 75, 8, 198, 220, 220, 220, 44332, 796, 31050, 7, 12093, 271, 62, 81, 8, 198, 220, 220, 220, 611, 4308, 62, 75, 13, 45, 14512, 4308, 62, 81, 13, 45, 8614, 2352, 7, 17, 9, 14415, 14, 26059, 532, 406, 87, 20679, 43, 87, 1875, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 886, 198, 220, 220, 220, 35971, 62, 19052, 796, 1033, 12195, 12, 16, 320, 9, 12093, 271, 62, 75, 13, 79, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 8, 764, 12, 4308, 62, 81, 13, 87, 1084, 4008, 198, 220, 220, 220, 35971, 62, 8499, 796, 1033, 12195, 12, 16, 320, 9, 12093, 271, 62, 81, 13, 87, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 4008, 14, 31166, 17034, 7, 12093, 271, 62, 81, 13, 45, 8, 198, 220, 220, 220, 2124, 796, 20650, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 4129, 7, 12093, 271, 62, 81, 4008, 198, 220, 220, 220, 611, 22354, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 42, 1039, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 65, 487, 83, 0, 7, 87, 828, 1410, 62, 487, 83, 0, 7, 87, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 24936, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 4129, 7, 12093, 271, 62, 81, 828, 4129, 7, 12093, 271, 62, 81, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 18843, 2024, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 65, 487, 83, 0, 7, 87, 828, 1410, 62, 487, 83, 0, 7, 87, 828, 1410, 62, 65, 487, 83, 0, 7, 32, 11, 362, 828, 1410, 62, 487, 83, 0, 7, 32, 11, 352, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6121, 7, 65, 16, 3712, 5377, 1930, 578, 15522, 271, 11, 275, 17, 3712, 5377, 1930, 578, 15522, 271, 8, 198, 198, 8291, 1161, 10088, 1022, 734, 24185, 12536, 13, 5501, 286, 262, 12536, 198, 10134, 284, 3994, 12536, 286, 2099, 23158, 15522, 271, 290, 262, 584, 530, 257, 11188, 198, 29252, 298, 388, 15522, 271, 13, 198, 37811, 198, 8818, 6121, 7, 12093, 271, 62, 75, 3712, 26545, 15522, 271, 11, 4308, 62, 81, 3712, 29252, 298, 388, 15522, 271, 26, 22354, 62, 8807, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 406, 87, 796, 357, 12093, 271, 62, 75, 13, 87, 9806, 532, 4308, 62, 75, 13, 87, 1084, 8, 198, 220, 220, 220, 288, 79, 796, 31050, 7, 12093, 271, 62, 81, 8, 198, 220, 220, 220, 44332, 796, 31050, 7, 12093, 271, 62, 75, 8, 198, 220, 220, 220, 611, 4308, 62, 75, 13, 45, 14512, 4308, 62, 81, 13, 45, 8614, 2352, 7, 17, 9, 14415, 14, 26059, 532, 406, 87, 20679, 43, 87, 1875, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 886, 198, 220, 220, 220, 35971, 62, 19052, 796, 1033, 12195, 16, 320, 9, 12093, 271, 62, 75, 13, 87, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 8, 764, 12, 4308, 62, 81, 13, 79, 1084, 4008, 198, 220, 220, 220, 35971, 62, 8499, 796, 1033, 12195, 16, 320, 9, 12093, 271, 62, 81, 13, 79, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 4008, 14, 31166, 17034, 7, 12093, 271, 62, 81, 13, 45, 8, 198, 220, 220, 220, 2124, 796, 20650, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 4129, 7, 12093, 271, 62, 81, 4008, 198, 220, 220, 220, 611, 22354, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 42, 1039, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 487, 83, 0, 7, 87, 828, 1410, 62, 65, 487, 83, 0, 7, 87, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 24936, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 4129, 7, 12093, 271, 62, 81, 828, 4129, 7, 12093, 271, 62, 81, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 18843, 2024, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 487, 83, 0, 7, 87, 828, 1410, 62, 65, 487, 83, 0, 7, 87, 828, 1410, 62, 487, 83, 0, 7, 32, 11, 362, 828, 1410, 62, 65, 487, 83, 0, 7, 32, 11, 352, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 6121, 7, 12093, 271, 62, 75, 3712, 5377, 1930, 578, 15522, 271, 11, 4308, 62, 81, 3712, 5377, 1930, 578, 15522, 271, 26, 22354, 62, 8807, 3712, 33, 970, 28, 9562, 11, 6376, 3712, 38469, 90, 5317, 92, 28, 5317, 58, 12962, 198, 220, 220, 220, 2488, 30493, 4129, 7, 12093, 271, 62, 75, 13, 65, 1386, 8, 6624, 4129, 7, 12093, 271, 62, 81, 13, 65, 1386, 8, 198, 220, 220, 220, 611, 4129, 7, 9630, 8, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 1930, 796, 685, 9160, 12195, 12093, 271, 62, 75, 13, 65, 1386, 11, 23158, 15522, 271, 8, 22345, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 32542, 796, 685, 9160, 12195, 12093, 271, 62, 75, 13, 65, 1386, 11, 29278, 388, 15522, 271, 8, 22345, 198, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 9122, 62, 1930, 8, 11405, 5145, 1092, 7, 9122, 62, 32542, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 685, 16, 25, 13664, 7, 12093, 271, 62, 75, 13, 65, 1386, 1776, 7131, 9122, 62, 1930, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 597, 7, 9122, 62, 32542, 8, 11405, 5145, 1092, 7, 9122, 62, 1930, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 685, 16, 25, 13664, 7, 12093, 271, 62, 75, 13, 65, 1386, 1776, 7131, 9122, 62, 32542, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 477, 7, 9160, 12195, 12093, 271, 62, 75, 13, 65, 1386, 58, 9630, 4357, 23158, 15522, 271, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 477, 7, 9160, 12195, 12093, 271, 62, 81, 13, 65, 1386, 58, 9630, 4357, 29278, 388, 15522, 271, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 6121, 62, 42372, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 6376, 26, 22354, 62, 8807, 28, 7126, 62, 8807, 8, 198, 220, 220, 220, 2073, 361, 477, 7, 9160, 12195, 12093, 271, 62, 75, 13, 65, 1386, 58, 9630, 4357, 29278, 388, 15522, 271, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 477, 7, 9160, 12195, 12093, 271, 62, 81, 13, 65, 1386, 58, 9630, 4357, 23158, 15522, 271, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 6121, 62, 8416, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 6376, 26, 22354, 62, 8807, 28, 7126, 62, 8807, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 6121, 62, 42372, 7, 12093, 271, 62, 75, 3712, 5377, 1930, 578, 15522, 271, 11, 4308, 62, 81, 3712, 5377, 1930, 578, 15522, 271, 11, 6376, 3712, 38469, 90, 5317, 19629, 22354, 62, 8807, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 299, 796, 4129, 7, 12093, 271, 62, 75, 13, 65, 1386, 8, 198, 220, 220, 220, 406, 87, 796, 47527, 65, 13, 87, 9806, 532, 275, 13, 87, 1084, 8, 329, 275, 28, 12093, 271, 62, 75, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 288, 79, 796, 685, 2777, 4092, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 81, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 44332, 796, 685, 2777, 4092, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 75, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 399, 796, 685, 13664, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 75, 13, 65, 1386, 60, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 399, 58, 72, 60, 14512, 4129, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 9630, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2352, 7, 17, 9, 14415, 14, 26059, 58, 72, 60, 532, 406, 87, 58, 72, 12962, 14, 43, 87, 58, 72, 60, 1875, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 6376, 58, 16, 60, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 1033, 12195, 16, 320, 9, 12093, 271, 62, 75, 13, 65, 1386, 58, 16, 4083, 87, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 16, 12962, 764, 12, 4308, 62, 81, 13, 65, 1386, 58, 16, 4083, 79, 1084, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 1033, 12195, 16, 320, 9, 12093, 271, 62, 81, 13, 65, 1386, 58, 16, 4083, 79, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 13, 65, 1386, 58, 16, 60, 4008, 14, 31166, 17034, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 16, 4083, 45, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 3392, 7, 45, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 3392, 7, 45, 58, 16, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 28, 17, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 597, 7, 72, 764, 855, 6376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 479, 1313, 7, 11201, 12195, 16, 320, 9, 12093, 271, 62, 75, 13, 65, 1386, 58, 72, 4083, 87, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 12962, 764, 12, 4308, 62, 81, 13, 65, 1386, 58, 72, 4083, 79, 1084, 36911, 35971, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 479, 1313, 7, 11201, 12195, 16, 320, 9, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 4083, 79, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 13, 65, 1386, 58, 72, 60, 4008, 14, 31166, 17034, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 4083, 45, 828, 35971, 62, 8499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 479, 1313, 7, 1952, 7, 45, 58, 72, 46570, 35971, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 479, 1313, 7, 1952, 7, 45, 58, 72, 46570, 35971, 62, 8499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 35971, 62, 19052, 796, 27179, 1758, 7, 76, 377, 62, 19052, 11, 357, 45, 986, 11, 4008, 198, 220, 220, 220, 35971, 62, 8499, 796, 27179, 1758, 7, 76, 377, 62, 8499, 11, 357, 45, 986, 11, 4008, 628, 220, 220, 220, 2124, 796, 15690, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 399, 23029, 198, 220, 220, 220, 611, 22354, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 42, 1039, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 65, 487, 83, 0, 7, 87, 11, 6376, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 15690, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 685, 45, 26, 399, 60, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 18843, 2024, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 65, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 487, 83, 0, 7, 32, 11, 685, 77, 1343, 352, 25, 17, 77, 26, 7131, 9630, 46570, 1410, 62, 65, 487, 83, 0, 7, 32, 11, 685, 16, 25, 77, 26, 7131, 9630, 46570, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 6121, 62, 8416, 7, 12093, 271, 62, 75, 3712, 5377, 1930, 578, 15522, 271, 11, 4308, 62, 81, 3712, 5377, 1930, 578, 15522, 271, 11, 6376, 3712, 38469, 90, 5317, 19629, 22354, 62, 8807, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 299, 796, 4129, 7, 12093, 271, 62, 75, 13, 65, 1386, 8, 198, 220, 220, 220, 406, 87, 796, 47527, 65, 13, 87, 9806, 532, 275, 13, 87, 1084, 8, 329, 275, 28, 12093, 271, 62, 81, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 288, 79, 796, 685, 2777, 4092, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 75, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 44332, 796, 685, 2777, 4092, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 81, 13, 65, 1386, 58, 9630, 11907, 198, 220, 220, 220, 399, 796, 685, 13664, 7, 65, 8, 329, 275, 28, 12093, 271, 62, 75, 13, 65, 1386, 60, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 399, 58, 72, 60, 14512, 4129, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 9630, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2352, 7, 17, 9, 14415, 14, 26059, 58, 72, 60, 532, 406, 87, 58, 72, 12962, 14, 43, 87, 58, 72, 60, 1875, 352, 68, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 818, 38532, 33, 1386, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 6376, 58, 16, 60, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 1033, 12195, 12, 16, 320, 9, 12093, 271, 62, 75, 13, 65, 1386, 58, 16, 4083, 79, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 16, 12962, 764, 12, 4308, 62, 81, 13, 65, 1386, 58, 16, 4083, 87, 1084, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 1033, 12195, 12, 16, 320, 9, 12093, 271, 62, 81, 13, 65, 1386, 58, 16, 4083, 87, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 13, 65, 1386, 58, 16, 60, 4008, 14, 31166, 17034, 7, 45, 58, 16, 12962, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 3392, 7, 45, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 3392, 7, 45, 58, 16, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 1312, 28, 17, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 287, 6376, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 479, 1313, 7, 11201, 12195, 12, 16, 320, 9, 12093, 271, 62, 75, 13, 65, 1386, 58, 72, 4083, 79, 1084, 9, 7, 39873, 13033, 7, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 12962, 764, 12, 4308, 62, 81, 13, 65, 1386, 58, 72, 4083, 87, 1084, 36911, 35971, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 479, 1313, 7, 11201, 12195, 12, 16, 320, 9, 12093, 271, 62, 81, 13, 65, 1386, 58, 72, 4083, 87, 1084, 9, 39873, 13033, 7, 12093, 271, 62, 75, 13, 65, 1386, 58, 72, 60, 4008, 14, 31166, 17034, 7, 45, 58, 72, 46570, 35971, 62, 8499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 19052, 796, 479, 1313, 7, 1952, 7, 45, 58, 72, 46570, 35971, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35971, 62, 8499, 796, 479, 1313, 7, 1952, 7, 45, 58, 72, 46570, 35971, 62, 8499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 35971, 62, 19052, 796, 27179, 1758, 7, 76, 377, 62, 19052, 11, 357, 45, 986, 11, 4008, 198, 220, 220, 220, 35971, 62, 8499, 796, 27179, 1758, 7, 76, 377, 62, 8499, 11, 357, 45, 986, 11, 4008, 628, 220, 220, 220, 2124, 796, 15690, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 399, 23029, 198, 220, 220, 220, 611, 22354, 62, 8807, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 42, 1039, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 65, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 487, 83, 0, 7, 87, 11, 6376, 828, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 15690, 90, 5377, 11141, 37, 2414, 92, 7, 917, 891, 11, 685, 45, 26, 399, 60, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 376, 9792, 18843, 2024, 7, 12093, 271, 62, 75, 11, 4308, 62, 81, 11, 1410, 62, 65, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 487, 83, 0, 7, 87, 11, 6376, 828, 1410, 62, 65, 487, 83, 0, 7, 32, 11, 685, 77, 1343, 352, 25, 17, 77, 26, 7131, 9630, 46570, 1410, 62, 487, 83, 0, 7, 32, 11, 685, 16, 25, 77, 26, 7131, 9630, 46570, 35971, 62, 19052, 11, 35971, 62, 8499, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 35, 1072, 18843, 1352, 7, 404, 3712, 5777, 10468, 525, 1352, 8, 796, 1034, 9, 738, 414, 46616, 7, 35, 1072, 18257, 6030, 11, 1034, 13, 12093, 271, 62, 81, 8, 198, 198, 67, 7928, 7, 404, 3712, 5777, 10468, 525, 2024, 8, 796, 6121, 7, 404, 13, 12093, 271, 62, 81, 11, 1034, 13, 12093, 271, 62, 75, 8, 198, 67, 7928, 7, 404, 3712, 5777, 51, 42, 1039, 8, 796, 6121, 7, 404, 13, 12093, 271, 62, 81, 11, 1034, 13, 12093, 271, 62, 75, 26, 22354, 62, 8807, 28, 7942, 8, 198, 198, 83, 22854, 7, 32, 3712, 5777, 10468, 525, 2024, 11, 347, 3712, 5777, 10468, 525, 2024, 8, 796, 6121, 7, 83, 22854, 7, 32, 13, 12093, 271, 62, 75, 11, 347, 13, 12093, 271, 62, 75, 828, 11192, 273, 7, 32, 13, 12093, 271, 62, 81, 11, 347, 13, 12093, 271, 62, 81, 4008, 198, 83, 22854, 7, 32, 3712, 5777, 51, 42, 1039, 11, 347, 3712, 5777, 51, 42, 1039, 8, 796, 6121, 7, 83, 22854, 7, 32, 13, 12093, 271, 62, 75, 11, 347, 13, 12093, 271, 62, 75, 828, 11192, 273, 7, 32, 13, 12093, 271, 62, 81, 11, 347, 13, 12093, 271, 62, 81, 1776, 22354, 62, 8807, 28, 7942, 8, 198, 198, 8818, 35971, 0, 7, 20274, 3712, 42, 316, 90, 33, 16, 5512, 44, 3712, 5777, 10468, 525, 1352, 90, 33, 16, 11, 33, 17, 5512, 65, 3712, 42, 316, 90, 33, 17, 5512, 26591, 62, 11, 31361, 62, 8, 810, 1391, 33, 16, 27, 25, 15522, 271, 11, 33, 17, 27, 25, 15522, 271, 92, 198, 220, 220, 220, 17130, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 17130, 62, 8, 198, 220, 220, 220, 12159, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 12159, 62, 8, 198, 220, 220, 220, 399, 3712, 5317, 796, 4129, 7, 44, 13, 12093, 271, 62, 81, 8, 198, 220, 220, 220, 611, 12159, 855, 5377, 11141, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 796, 337, 13, 76, 377, 62, 19052, 58, 72, 60, 1635, 275, 13, 7890, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 337, 13, 487, 83, 62, 81, 0, 1635, 27179, 1758, 7, 20274, 13, 7890, 11, 2546, 7, 44, 13, 76, 377, 62, 19052, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 1635, 28, 337, 13, 76, 377, 62, 8499, 58, 72, 60, 1635, 17130, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 62, 796, 43092, 7, 44, 13, 12093, 271, 62, 75, 11, 4866, 7, 65, 13, 7890, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 46231, 44807, 7890, 58, 72, 60, 1635, 28, 337, 13, 76, 377, 62, 19052, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 337, 13, 487, 83, 62, 81, 0, 1635, 27179, 1758, 7, 862, 72, 44807, 7890, 11, 2546, 7, 44, 13, 76, 377, 62, 19052, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 796, 12159, 9, 20274, 13, 7890, 58, 72, 60, 1343, 17130, 1635, 46231, 44807, 7890, 58, 72, 60, 1635, 337, 13, 76, 377, 62, 8499, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1255, 198, 437, 198, 198, 8818, 35971, 0, 7, 20274, 3712, 42333, 90, 33, 17, 5512, 65, 3712, 42333, 90, 33, 16, 5512, 44, 3712, 5777, 10468, 525, 1352, 90, 33, 16, 11, 33, 17, 5512, 26591, 62, 11, 31361, 62, 8, 810, 1391, 33, 16, 27, 25, 15522, 271, 11, 33, 17, 27, 25, 15522, 271, 92, 198, 220, 220, 220, 17130, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 17130, 62, 8, 198, 220, 220, 220, 12159, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 12159, 62, 8, 198, 220, 220, 220, 399, 3712, 5317, 796, 4129, 7, 44, 13, 12093, 271, 62, 75, 8, 198, 220, 220, 220, 611, 12159, 855, 5377, 11141, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 796, 11644, 7, 44, 13, 76, 377, 62, 8499, 58, 72, 12962, 1635, 11644, 7, 65, 13, 7890, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 337, 13, 487, 83, 62, 75, 0, 1635, 27179, 1758, 7, 20274, 13, 7890, 11, 2546, 7, 44, 13, 76, 377, 62, 8499, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 796, 11644, 7, 20274, 13, 7890, 58, 72, 12962, 1635, 337, 13, 76, 377, 62, 19052, 58, 72, 60, 1635, 17130, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 46231, 62, 796, 9718, 7, 44, 13, 12093, 271, 62, 81, 11, 11644, 7, 65, 13, 7890, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 46231, 44807, 7890, 58, 72, 60, 1635, 28, 11644, 7, 44, 13, 76, 377, 62, 8499, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 337, 13, 487, 83, 62, 75, 0, 1635, 27179, 1758, 7, 862, 72, 44807, 7890, 11, 2546, 7, 44, 13, 76, 377, 62, 8499, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 58, 72, 60, 796, 12159, 9, 20274, 13, 7890, 58, 72, 60, 1343, 17130, 1635, 11644, 7, 862, 72, 44807, 7890, 58, 72, 12962, 1635, 337, 13, 76, 377, 62, 19052, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1255, 198, 437, 198, 198, 8818, 35971, 0, 7, 20274, 3712, 18843, 1352, 90, 33, 16, 11, 33, 18, 11, 51, 5512, 32, 3712, 18843, 1352, 90, 33, 16, 11, 33, 17, 5512, 33, 3712, 5777, 10468, 525, 2024, 90, 33, 17, 11, 33, 18, 5512, 26591, 62, 11, 31361, 62, 8, 810, 1391, 33, 16, 27, 25, 15522, 271, 11, 33, 17, 27, 25, 15522, 271, 11, 33, 18, 27, 25, 15522, 271, 11, 51, 92, 198, 220, 220, 220, 17130, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 17130, 62, 8, 198, 220, 220, 220, 12159, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 12159, 62, 8, 198, 220, 220, 220, 611, 12159, 14512, 19157, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 2092, 7, 20274, 13, 7890, 11, 2546, 7, 20274, 13, 7890, 11, 352, 828, 2546, 7, 20274, 13, 7890, 11, 362, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1255, 13, 7890, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4866, 1462, 0, 7, 7890, 11, 317, 13, 7890, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 28, 16, 25, 13664, 7, 33, 13, 76, 377, 62, 8499, 828, 1312, 28, 16, 25, 13664, 7, 33, 13, 76, 377, 62, 8499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 474, 60, 1635, 28, 347, 13, 76, 377, 62, 8499, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 11644, 0, 7, 7890, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 33, 13, 76, 377, 62, 8499, 8, 198, 220, 220, 220, 347, 13, 487, 83, 62, 75, 17, 0, 1635, 27179, 1758, 7, 7890, 11, 299, 986, 11, 299, 23029, 198, 220, 220, 220, 11644, 0, 7, 7890, 8, 198, 220, 220, 220, 399, 796, 40426, 7, 77, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 28, 16, 25, 45, 11, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 474, 60, 1635, 28, 347, 13, 76, 377, 62, 19052, 58, 73, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 17130, 14512, 19157, 7, 16, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 300, 76, 377, 0, 7, 26591, 11, 1366, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 12159, 14512, 19157, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 42721, 377, 0, 7, 20274, 13, 7890, 11, 12159, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 15853, 1366, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1255, 198, 437, 198, 198, 8818, 35971, 0, 7, 20274, 3712, 18843, 1352, 90, 33, 16, 11, 33, 18, 11, 51, 5512, 32, 3712, 5777, 10468, 525, 2024, 90, 33, 16, 11, 33, 17, 5512, 33, 3712, 18843, 1352, 90, 33, 17, 11, 33, 18, 5512, 26591, 62, 11, 31361, 62, 8, 810, 1391, 33, 16, 27, 25, 15522, 271, 11, 33, 17, 27, 25, 15522, 271, 11, 33, 18, 27, 25, 15522, 271, 11, 51, 92, 198, 220, 220, 220, 17130, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 17130, 62, 8, 198, 220, 220, 220, 12159, 796, 10385, 7, 5377, 11141, 37, 2414, 11, 12159, 62, 8, 198, 220, 220, 220, 611, 12159, 14512, 19157, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 2092, 7, 20274, 13, 7890, 11, 2546, 7, 20274, 13, 7890, 11, 352, 828, 2546, 7, 20274, 13, 7890, 11, 362, 4008, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1255, 13, 7890, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4866, 1462, 0, 7, 7890, 11, 347, 13, 7890, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 28, 16, 25, 13664, 7, 32, 13, 76, 377, 62, 19052, 828, 1312, 28, 16, 25, 13664, 7, 32, 13, 76, 377, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 474, 60, 1635, 28, 317, 13, 76, 377, 62, 19052, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 299, 796, 2546, 7, 32, 13, 76, 377, 62, 19052, 8, 198, 220, 220, 220, 317, 13, 487, 83, 62, 81, 17, 0, 1635, 27179, 1758, 7, 7890, 11, 299, 986, 11, 77, 23029, 198, 220, 220, 220, 399, 796, 40426, 7, 77, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 474, 28, 16, 25, 45, 11, 1312, 28, 16, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 474, 60, 1635, 28, 317, 13, 76, 377, 62, 8499, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 17130, 14512, 19157, 7, 16, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 300, 76, 377, 0, 7, 26591, 11, 1366, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 12159, 14512, 19157, 7, 15, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 42721, 377, 0, 7, 20274, 13, 7890, 11, 12159, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 7890, 15853, 1366, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1255, 198, 437, 198 ]
2.07227
9,506
#Constant mean function """ MeanConst <: Mean Constant mean function ```math m(x) = β ``` with constant ``β``. """ mutable struct MeanConst <: Mean "Constant" β::Float64 "Priors for mean parameters" priors::Array """ MeanConst(β::Float64) Create `MeanConst` with constant `β`. """ MeanConst(β::Float64) = new(β, []) end mean(mConst::MeanConst, x::AbstractVector) = mConst.β mean(mConst::MeanConst, X::AbstractMatrix) = fill(mConst.β, size(X,2)) get_params(mConst::MeanConst) = Float64[mConst.β] get_param_names(::MeanConst) = [:β] num_params(mConst::MeanConst) = 1 function set_params!(mConst::MeanConst, hyp::AbstractVector) length(hyp) == 1 || throw(ArgumentError("Constant mean function only has 1 parameter")) mConst.β = hyp[1] end function grad_mean(mConst::MeanConst, x::AbstractVector) dM_theta = ones(1) return dM_theta end
[ 2, 3103, 18797, 1612, 2163, 198, 198, 37811, 198, 220, 220, 220, 22728, 34184, 1279, 25, 22728, 198, 198, 3103, 18797, 1612, 2163, 198, 15506, 63, 11018, 198, 76, 7, 87, 8, 796, 27169, 198, 15506, 63, 198, 4480, 6937, 7559, 26638, 15506, 13, 198, 37811, 198, 76, 18187, 2878, 22728, 34184, 1279, 25, 22728, 198, 220, 220, 220, 366, 3103, 18797, 1, 198, 220, 220, 220, 27169, 3712, 43879, 2414, 198, 220, 220, 220, 366, 47, 8657, 329, 1612, 10007, 1, 198, 220, 220, 220, 1293, 669, 3712, 19182, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 22728, 34184, 7, 26638, 3712, 43879, 2414, 8, 628, 220, 220, 220, 13610, 4600, 5308, 272, 34184, 63, 351, 6937, 4600, 26638, 44646, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 22728, 34184, 7, 26638, 3712, 43879, 2414, 8, 796, 649, 7, 26638, 11, 685, 12962, 198, 437, 198, 198, 32604, 7, 76, 34184, 3712, 5308, 272, 34184, 11, 2124, 3712, 23839, 38469, 8, 796, 285, 34184, 13, 26638, 198, 32604, 7, 76, 34184, 3712, 5308, 272, 34184, 11, 1395, 3712, 23839, 46912, 8, 796, 6070, 7, 76, 34184, 13, 26638, 11, 2546, 7, 55, 11, 17, 4008, 198, 198, 1136, 62, 37266, 7, 76, 34184, 3712, 5308, 272, 34184, 8, 796, 48436, 2414, 58, 76, 34184, 13, 26638, 60, 198, 1136, 62, 17143, 62, 14933, 7, 3712, 5308, 272, 34184, 8, 796, 685, 25, 26638, 60, 198, 22510, 62, 37266, 7, 76, 34184, 3712, 5308, 272, 34184, 8, 796, 352, 198, 8818, 900, 62, 37266, 0, 7, 76, 34184, 3712, 5308, 272, 34184, 11, 5328, 3712, 23839, 38469, 8, 198, 220, 220, 220, 4129, 7, 36362, 8, 6624, 352, 8614, 3714, 7, 28100, 1713, 12331, 7203, 3103, 18797, 1612, 2163, 691, 468, 352, 11507, 48774, 198, 220, 220, 220, 285, 34184, 13, 26638, 796, 5328, 58, 16, 60, 198, 437, 198, 8818, 3915, 62, 32604, 7, 76, 34184, 3712, 5308, 272, 34184, 11, 2124, 3712, 23839, 38469, 8, 198, 220, 220, 220, 288, 44, 62, 1169, 8326, 796, 3392, 7, 16, 8, 198, 220, 220, 220, 1441, 288, 44, 62, 1169, 8326, 198, 437, 198 ]
2.494444
360
# __BEGIN_LICENSE__ # # ThreeDeconv.jl # # Copyright (c) 2018, Stanford University # # All rights reserved. # # Redistribution and use in source and binary forms for academic and other # non-commercial purposes with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code, including modified source code, must retain # the above copyright notice, this list of conditions and the following # disclaimer. # # * Redistributions in binary form or a modified form of the source code must # reproduce the above copyright notice, this list of conditions and the # following disclaimer in the documentation and/or other materials provided with # the distribution. # # * Neither the name of The Leland Stanford Junior University, any of its # trademarks, the names of its employees, nor contributors to the source code # may be used to endorse or promote products derived from this software without # specific prior written permission. # # * Where a modified version of the source code is redistributed publicly in # source or binary forms, the modified source code must be published in a freely # accessible manner, or otherwise redistributed at no charge to anyone # requesting a copy of the modified source code, subject to the same terms as # this agreement. # # THIS SOFTWARE IS PROVIDED BY THE TRUSTEES OF THE LELAND STANFORD JUNIOR # UNIVERSITY "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LELAND STANFORD JUNIOR # UNIVERSITY OR ITS TRUSTEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY # OF SUCH DAMAGE. # # __END_LICENSE__ using QuadGK import Optim const ϵ_reg = 1e-6 struct ParametricNoiseModel m_hat::Vector{Float64} σ_hat::Vector{Float64} model::Function model_init::Function params params_init end struct localEstimation{T<:AbstractFloat} y::T σ::T κ::T n::Int end function foi_noiseestimation(z::AbstractArray{Float32}; τ=0.2, maxnum_pairs::Int, verbose::Bool=false) # τ = 0.2 is good to reject a lot of outliers. @assert maximum(z) <= 1.0 @assert minimum(z) >= 0.0 # Compute the local sample mean and standard deviation over a smooth region println("Computing local noise variance.") num_imgs = size(z,3) z_stack = (z[:,:,i] for i in 1:num_imgs) est_pairs_array = map(x->localnoiseestimation(x, τ)[1], z_stack) est_pairs = vcat(est_pairs_array...) println("Initializing parameters by least-squares.") ab_init, y_hat, σ_hat = initialize_parameters(est_pairs) num_pairs = length(est_pairs) if num_pairs > maxnum_pairs idx = rand(1:num_pairs, maxnum_pairs) est_pairs = est_pairs[idx] end println("Initialization done.") println("Starting likelihood maximization.") likelihood0(x::Vector{Float64}) = nonclipped_negloglikelihood(x, est_pairs) result = Optim.optimize(likelihood0, ab_init, Optim.NelderMead(), Optim.Options(show_trace = verbose)) println("Finished the maximization.") ab_hat = Optim.minimizer(result) @assert Optim.converged(result) return ab_hat end function localnoiseestimation(z::AbstractArray{Float32,2}, τ) # Wavelet and scaling functions used in the original paper are the followings: # ψ = Array{Float32}([0.035, 0.085, -0.135, -0.460, 0.807, -0.333]) # ϕ = Array{Float32}([0.025, -0.060, -0.095, 0.325, 0.571, 0.235]) ϕ = [0.035226291882100656f0, -0.08544127388224149f0, -0.13501102001039084f0, 0.4598775021193313f0, 0.8068915093133388f0, 0.3326705529509569f0] ϕ ./= sum(ϕ) ψ = [-0.3326705529509569f0, 0.8068915093133388f0, -0.4598775021193313f0, -0.13501102001039084f0, 0.08544127388224149f0, 0.035226291882100656f0] ψ ./= norm(ψ) σ_gauss = 1.2f0 gauss = [exp(-x^2 / (2.0f0 * σ_gauss^2)) for x in -10.f0:10.f0] gauss ./= sum(gauss) z_wdet = circconv(z, ψ)[1:2:end, 1:2:end] z_wapp = circconv(z, ϕ)[1:2:end, 1:2:end] ω = ones(Float32, 7) ./ 7.0f0 z_smo = circconv(z_wapp, ω, ω) s = sqrt(0.5 * π) .* circconv(abs.(z_wdet), ω, ω) g = [-0.5f0, 0.0f0, 0.5f0] smoothed_zwapp = circconv(z_wapp, gauss, gauss) dx_wapp = circconv(smoothed_zwapp, [1.0f0], g) dy_wapp = circconv(smoothed_zwapp, g, [1.0f0]) x_smo = sqrt.(dx_wapp.^2 .+ dy_wapp.^2) .< τ .* s N = length(z_smo) num_bins = 300 histogram_zwapp = [Vector{Float32}() for _ in 1:num_bins] histogram_zwdet = [Vector{Float32}() for _ in 1:num_bins] min_wapp = sum(ϕ[ϕ .< 0.f0]) max_wapp = sum(ϕ[ϕ .>= 0.f0]) Δ = (max_wapp - min_wapp) / num_bins for i in 1:N if x_smo[i] idx = floor(Int, (z_smo[i] - min_wapp) / Δ) push!(histogram_zwapp[idx], z_wapp[i]) push!(histogram_zwdet[idx], z_wdet[i]) end end est_pairs = Vector{localEstimation{Float64}}() for i in 1:num_bins if histogram_zwdet[i] != [] n = length(histogram_zwdet[i]) κ = madBiasFactor(n) σ = sqrt(max(Float64(mad(histogram_zwdet[i], κ))^2, .0)) y = Float64(mean(histogram_zwapp[i])) push!(est_pairs, localEstimation(y, σ, κ, n)) end end return est_pairs, x_smo end function initialize_parameters(est_pairs::Vector{localEstimation{T}}) where T num_pairs = length(est_pairs) y_hat = zeros(num_pairs) σ_hat = zeros(num_pairs) Φ_tmp = Vector{Float64}() v = Vector{Float64}() for i = 1:num_pairs tmp = est_pairs[i] y_hat[i] = tmp.y σ_hat[i] = tmp.σ push!(Φ_tmp, tmp.y) push!(v, tmp.σ^2) end Φ = hcat(Φ_tmp, ones(length(Φ_tmp))) ab0 = Φ \ v return ab0, y_hat, σ_hat end function nonclipped_negloglikelihood(ab::Vector{Float64}, est_pairs::Vector{localEstimation{T}}) where T Δ = .1 total_val = .0 for l in est_pairs c_i = 1.0 / l.n d_i = 1.35 / (l.n + 1.5) y_i = l.y σ_i = l.σ # This integrand is sometimes a very sharp peak-like function like a Dirac funciton. # Therefore, the direct numerical integration over [0.0, 1.0] is realatively difficult # because the algorithm may not evaluate the integrand around the peak. # To avoid this issue, the integration interval is separated into multiple intervals. # Since the peak is known to be close to y_i, the function value at y_i should be enough large than zero. integrand(y::Float64)::Float64 = 1.0 / σsq_reg(y, ab) * exp(-1.0 / (2.0 * σsq_reg(y, ab)) * ( (y_i - y)^2 / c_i + (σ_i - sqrt(σsq_reg(y, ab)) )^2 / d_i)) val = .0 if y_i - Δ > .0 val += quadgk(integrand, .0, y_i - Δ)[1] end val += quadgk(integrand, max(.0, y_i - Δ), y_i)[1] val += quadgk(integrand, y_i, min(1.0, y_i + Δ))[1] if y_i + Δ < 1.0 val += quadgk(integrand, y_i + Δ, 1.0)[1] end total_val -= log(1 / (2π * sqrt(c_i * d_i) ) * abs(val) + ϵ_reg) end return total_val end σsq_reg(y::Float64, ab::Vector{Float64}) = max(ϵ_reg^2, σsq(y, ab)) σsq(y::Float64, ab::Vector{Float64}) = ab[1] * y + ab[2]
[ 2, 11593, 33, 43312, 62, 43, 2149, 24290, 834, 198, 2, 198, 2, 7683, 10707, 261, 85, 13, 20362, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 11, 13863, 2059, 198, 2, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 329, 8233, 290, 584, 198, 2, 1729, 12, 36313, 4959, 351, 393, 1231, 17613, 11, 389, 10431, 2810, 198, 2, 326, 262, 1708, 3403, 389, 1138, 25, 198, 2, 198, 2, 1635, 2297, 396, 2455, 507, 286, 2723, 2438, 11, 1390, 9518, 2723, 2438, 11, 1276, 12377, 198, 2, 220, 220, 262, 2029, 6634, 4003, 11, 428, 1351, 286, 3403, 290, 262, 1708, 198, 2, 220, 220, 37592, 13, 198, 2, 198, 2, 1635, 2297, 396, 2455, 507, 287, 13934, 1296, 393, 257, 9518, 1296, 286, 262, 2723, 2438, 1276, 198, 2, 220, 220, 22919, 262, 2029, 6634, 4003, 11, 428, 1351, 286, 3403, 290, 262, 198, 2, 220, 220, 1708, 37592, 287, 262, 10314, 290, 14, 273, 584, 5696, 2810, 351, 198, 2, 220, 220, 262, 6082, 13, 198, 2, 198, 2, 1635, 16126, 262, 1438, 286, 383, 406, 8822, 13863, 20000, 2059, 11, 597, 286, 663, 198, 2, 220, 220, 27346, 11, 262, 3891, 286, 663, 4409, 11, 4249, 20420, 284, 262, 2723, 2438, 198, 2, 220, 220, 743, 307, 973, 284, 11438, 393, 7719, 3186, 10944, 422, 428, 3788, 1231, 198, 2, 220, 220, 2176, 3161, 3194, 7170, 13, 198, 2, 198, 2, 1635, 6350, 257, 9518, 2196, 286, 262, 2723, 2438, 318, 38913, 7271, 287, 198, 2, 220, 220, 2723, 393, 13934, 5107, 11, 262, 9518, 2723, 2438, 1276, 307, 3199, 287, 257, 12748, 198, 2, 220, 220, 9857, 5642, 11, 393, 4306, 38913, 379, 645, 3877, 284, 2687, 198, 2, 220, 220, 20623, 257, 4866, 286, 262, 9518, 2723, 2438, 11, 2426, 284, 262, 976, 2846, 355, 198, 2, 220, 220, 428, 4381, 13, 198, 2, 198, 2, 12680, 47466, 3180, 36592, 2389, 1961, 11050, 3336, 7579, 7759, 36, 1546, 3963, 3336, 406, 3698, 6981, 3563, 1565, 37, 12532, 449, 4944, 41254, 198, 2, 49677, 9050, 366, 1921, 3180, 1, 5357, 15529, 7788, 32761, 6375, 8959, 49094, 34764, 11015, 11, 47783, 2751, 11, 21728, 5626, 198, 2, 40880, 5390, 11, 3336, 8959, 49094, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 5357, 376, 46144, 7473, 317, 198, 2, 16652, 2149, 37232, 33079, 48933, 15986, 13954, 48778, 1961, 13, 3268, 8005, 49261, 50163, 3336, 406, 3698, 6981, 3563, 1565, 37, 12532, 449, 4944, 41254, 198, 2, 49677, 9050, 6375, 42437, 7579, 7759, 36, 1546, 9348, 43031, 19146, 7473, 15529, 42242, 11, 3268, 17931, 23988, 11, 19387, 25256, 1847, 11, 198, 2, 38846, 11, 7788, 3620, 6489, 13153, 11, 6375, 7102, 5188, 10917, 3525, 12576, 29506, 25552, 357, 1268, 39149, 2751, 11, 21728, 5626, 40880, 5390, 11, 198, 2, 41755, 11335, 10979, 3963, 28932, 2257, 2043, 37780, 21090, 50, 6375, 49254, 26, 406, 18420, 3963, 23210, 11, 42865, 11, 6375, 4810, 19238, 29722, 26, 6375, 198, 2, 43949, 44180, 23255, 49, 8577, 24131, 8, 29630, 36, 5959, 7257, 2937, 1961, 5357, 6177, 15529, 3336, 15513, 3963, 43031, 25382, 11, 7655, 2767, 16879, 3268, 198, 2, 27342, 10659, 11, 19269, 18379, 43031, 25382, 11, 6375, 309, 9863, 357, 1268, 39149, 2751, 399, 7156, 43, 3528, 18310, 6375, 25401, 54, 24352, 8, 5923, 1797, 2751, 198, 2, 3268, 15529, 34882, 16289, 3963, 3336, 23210, 3963, 12680, 47466, 11, 45886, 16876, 5984, 29817, 1961, 3963, 3336, 28069, 11584, 25382, 198, 2, 3963, 13558, 3398, 29506, 11879, 13, 198, 2, 198, 2, 11593, 10619, 62, 43, 2149, 24290, 834, 628, 198, 3500, 20648, 38, 42, 198, 11748, 30011, 198, 198, 9979, 18074, 113, 62, 2301, 796, 352, 68, 12, 21, 198, 198, 7249, 25139, 19482, 2949, 786, 17633, 198, 220, 220, 220, 285, 62, 5183, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 18074, 225, 62, 5183, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 2746, 3712, 22203, 198, 220, 220, 220, 2746, 62, 15003, 3712, 22203, 198, 220, 220, 220, 42287, 198, 220, 220, 220, 42287, 62, 15003, 198, 437, 198, 198, 7249, 1957, 22362, 18991, 90, 51, 27, 25, 23839, 43879, 92, 198, 220, 220, 220, 331, 3712, 51, 198, 220, 220, 220, 18074, 225, 3712, 51, 198, 220, 220, 220, 7377, 118, 3712, 51, 198, 220, 220, 220, 299, 3712, 5317, 198, 437, 198, 198, 8818, 11511, 72, 62, 3919, 786, 395, 18991, 7, 89, 3712, 23839, 19182, 90, 43879, 2624, 19629, 46651, 28, 15, 13, 17, 11, 3509, 22510, 62, 79, 3468, 3712, 5317, 11, 15942, 577, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 1303, 46651, 796, 657, 13, 17, 318, 922, 284, 4968, 257, 1256, 286, 41528, 3183, 13, 628, 220, 220, 220, 2488, 30493, 5415, 7, 89, 8, 19841, 352, 13, 15, 198, 220, 220, 220, 2488, 30493, 5288, 7, 89, 8, 18189, 657, 13, 15, 628, 220, 220, 220, 1303, 3082, 1133, 262, 1957, 6291, 1612, 290, 3210, 28833, 625, 257, 7209, 3814, 198, 220, 220, 220, 44872, 7203, 5377, 48074, 1957, 7838, 24198, 19570, 198, 220, 220, 220, 997, 62, 9600, 82, 796, 2546, 7, 89, 11, 18, 8, 198, 220, 220, 220, 1976, 62, 25558, 796, 357, 89, 58, 45299, 45299, 72, 60, 329, 1312, 287, 352, 25, 22510, 62, 9600, 82, 8, 198, 220, 220, 220, 1556, 62, 79, 3468, 62, 18747, 796, 3975, 7, 87, 3784, 12001, 3919, 786, 395, 18991, 7, 87, 11, 46651, 38381, 16, 4357, 1976, 62, 25558, 8, 198, 220, 220, 220, 1556, 62, 79, 3468, 796, 410, 9246, 7, 395, 62, 79, 3468, 62, 18747, 23029, 628, 220, 220, 220, 44872, 7203, 24243, 2890, 10007, 416, 1551, 12, 16485, 3565, 19570, 198, 220, 220, 220, 450, 62, 15003, 11, 331, 62, 5183, 11, 18074, 225, 62, 5183, 796, 41216, 62, 17143, 7307, 7, 395, 62, 79, 3468, 8, 628, 220, 220, 220, 997, 62, 79, 3468, 796, 4129, 7, 395, 62, 79, 3468, 8, 198, 220, 220, 220, 611, 997, 62, 79, 3468, 1875, 3509, 22510, 62, 79, 3468, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 43720, 7, 16, 25, 22510, 62, 79, 3468, 11, 3509, 22510, 62, 79, 3468, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1556, 62, 79, 3468, 796, 1556, 62, 79, 3468, 58, 312, 87, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 44872, 7203, 24243, 1634, 1760, 19570, 198, 220, 220, 220, 44872, 7203, 22851, 14955, 12991, 1634, 19570, 628, 220, 220, 220, 14955, 15, 7, 87, 3712, 38469, 90, 43879, 2414, 30072, 796, 1729, 565, 3949, 62, 710, 4743, 519, 2339, 11935, 7, 87, 11, 1556, 62, 79, 3468, 8, 198, 220, 220, 220, 1255, 796, 30011, 13, 40085, 1096, 7, 2339, 11935, 15, 11, 450, 62, 15003, 11, 30011, 13, 8199, 6499, 44, 1329, 22784, 30011, 13, 29046, 7, 12860, 62, 40546, 796, 15942, 577, 4008, 628, 220, 220, 220, 44872, 7203, 18467, 1348, 262, 12991, 1634, 19570, 628, 220, 220, 220, 450, 62, 5183, 796, 30011, 13, 1084, 320, 7509, 7, 20274, 8, 198, 220, 220, 220, 2488, 30493, 30011, 13, 1102, 332, 2004, 7, 20274, 8, 628, 220, 220, 220, 1441, 450, 62, 5183, 198, 437, 628, 198, 8818, 1957, 3919, 786, 395, 18991, 7, 89, 3712, 23839, 19182, 90, 43879, 2624, 11, 17, 5512, 46651, 8, 198, 220, 220, 220, 1303, 17084, 1616, 290, 20796, 5499, 973, 287, 262, 2656, 3348, 389, 262, 1061, 654, 25, 198, 220, 220, 220, 1303, 18074, 230, 796, 15690, 90, 43879, 2624, 92, 26933, 15, 13, 44215, 11, 657, 13, 2919, 20, 11, 532, 15, 13, 17059, 11, 532, 15, 13, 34716, 11, 657, 13, 36928, 11, 532, 15, 13, 20370, 12962, 198, 220, 220, 220, 1303, 18074, 243, 796, 15690, 90, 43879, 2624, 92, 26933, 15, 13, 36629, 11, 532, 15, 13, 41322, 11, 532, 15, 13, 2931, 20, 11, 657, 13, 26582, 11, 657, 13, 42875, 11, 657, 13, 22370, 12962, 198, 220, 220, 220, 18074, 243, 796, 685, 15, 13, 44215, 24909, 1959, 20356, 2481, 405, 37466, 69, 15, 11, 532, 15, 13, 2919, 47576, 16799, 2548, 6469, 1731, 19442, 69, 15, 11, 532, 15, 13, 17059, 486, 940, 2167, 940, 2670, 2919, 19, 69, 15, 11, 657, 13, 2231, 4089, 3324, 1120, 2481, 1129, 2091, 1485, 69, 15, 11, 657, 13, 1795, 3104, 6420, 1120, 6052, 1485, 2091, 3459, 69, 15, 11, 657, 13, 2091, 2075, 2154, 2816, 1959, 1120, 3865, 3388, 69, 15, 60, 198, 220, 220, 220, 18074, 243, 24457, 28, 2160, 7, 139, 243, 8, 628, 220, 220, 220, 18074, 230, 796, 25915, 15, 13, 2091, 2075, 2154, 2816, 1959, 1120, 3865, 3388, 69, 15, 11, 657, 13, 1795, 3104, 6420, 1120, 6052, 1485, 2091, 3459, 69, 15, 11, 532, 15, 13, 2231, 4089, 3324, 1120, 2481, 1129, 2091, 1485, 69, 15, 11, 532, 15, 13, 17059, 486, 940, 2167, 940, 2670, 2919, 19, 69, 15, 11, 657, 13, 2919, 47576, 16799, 2548, 6469, 1731, 19442, 69, 15, 11, 657, 13, 44215, 24909, 1959, 20356, 2481, 405, 37466, 69, 15, 60, 198, 220, 220, 220, 18074, 230, 24457, 28, 2593, 7, 139, 230, 8, 628, 220, 220, 220, 18074, 225, 62, 4908, 1046, 796, 352, 13, 17, 69, 15, 198, 220, 220, 220, 31986, 1046, 796, 685, 11201, 32590, 87, 61, 17, 1220, 357, 17, 13, 15, 69, 15, 1635, 18074, 225, 62, 4908, 1046, 61, 17, 4008, 329, 2124, 287, 532, 940, 13, 69, 15, 25, 940, 13, 69, 15, 60, 198, 220, 220, 220, 31986, 1046, 24457, 28, 2160, 7, 4908, 1046, 8, 628, 220, 220, 220, 1976, 62, 86, 15255, 796, 10774, 535, 261, 85, 7, 89, 11, 18074, 230, 38381, 16, 25, 17, 25, 437, 11, 352, 25, 17, 25, 437, 60, 198, 220, 220, 220, 1976, 62, 86, 1324, 796, 10774, 535, 261, 85, 7, 89, 11, 18074, 243, 38381, 16, 25, 17, 25, 437, 11, 352, 25, 17, 25, 437, 60, 628, 220, 220, 220, 18074, 231, 796, 3392, 7, 43879, 2624, 11, 767, 8, 24457, 767, 13, 15, 69, 15, 198, 220, 220, 220, 1976, 62, 5796, 78, 796, 10774, 535, 261, 85, 7, 89, 62, 86, 1324, 11, 18074, 231, 11, 18074, 231, 8, 198, 220, 220, 220, 264, 796, 19862, 17034, 7, 15, 13, 20, 1635, 18074, 222, 8, 764, 9, 10774, 535, 261, 85, 7, 8937, 12195, 89, 62, 86, 15255, 828, 18074, 231, 11, 18074, 231, 8, 628, 220, 220, 220, 308, 796, 25915, 15, 13, 20, 69, 15, 11, 657, 13, 15, 69, 15, 11, 657, 13, 20, 69, 15, 60, 198, 220, 220, 220, 32746, 704, 62, 89, 86, 1324, 796, 10774, 535, 261, 85, 7, 89, 62, 86, 1324, 11, 31986, 1046, 11, 31986, 1046, 8, 198, 220, 220, 220, 44332, 62, 86, 1324, 796, 10774, 535, 261, 85, 7, 5796, 1025, 704, 62, 89, 86, 1324, 11, 685, 16, 13, 15, 69, 15, 4357, 308, 8, 198, 220, 220, 220, 20268, 62, 86, 1324, 796, 10774, 535, 261, 85, 7, 5796, 1025, 704, 62, 89, 86, 1324, 11, 308, 11, 685, 16, 13, 15, 69, 15, 12962, 628, 220, 220, 220, 2124, 62, 5796, 78, 796, 19862, 17034, 12195, 34350, 62, 86, 1324, 13, 61, 17, 764, 10, 20268, 62, 86, 1324, 13, 61, 17, 8, 764, 27, 46651, 764, 9, 264, 198, 220, 220, 220, 399, 796, 4129, 7, 89, 62, 5796, 78, 8, 198, 220, 220, 220, 997, 62, 65, 1040, 796, 5867, 198, 220, 220, 220, 1554, 21857, 62, 89, 86, 1324, 796, 685, 38469, 90, 43879, 2624, 92, 3419, 329, 4808, 287, 352, 25, 22510, 62, 65, 1040, 60, 198, 220, 220, 220, 1554, 21857, 62, 89, 86, 15255, 796, 685, 38469, 90, 43879, 2624, 92, 3419, 329, 4808, 287, 352, 25, 22510, 62, 65, 1040, 60, 198, 220, 220, 220, 949, 62, 86, 1324, 796, 2160, 7, 139, 243, 58, 139, 243, 764, 27, 220, 657, 13, 69, 15, 12962, 198, 220, 220, 220, 3509, 62, 86, 1324, 796, 2160, 7, 139, 243, 58, 139, 243, 764, 29, 28, 657, 13, 69, 15, 12962, 198, 220, 220, 220, 37455, 796, 357, 9806, 62, 86, 1324, 532, 949, 62, 86, 1324, 8, 1220, 997, 62, 65, 1040, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2124, 62, 5796, 78, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 4314, 7, 5317, 11, 357, 89, 62, 5796, 78, 58, 72, 60, 532, 949, 62, 86, 1324, 8, 1220, 37455, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 10034, 21857, 62, 89, 86, 1324, 58, 312, 87, 4357, 1976, 62, 86, 1324, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 10034, 21857, 62, 89, 86, 15255, 58, 312, 87, 4357, 1976, 62, 86, 15255, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1556, 62, 79, 3468, 796, 20650, 90, 12001, 22362, 18991, 90, 43879, 2414, 11709, 3419, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 22510, 62, 65, 1040, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1554, 21857, 62, 89, 86, 15255, 58, 72, 60, 14512, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 4129, 7, 10034, 21857, 62, 89, 86, 15255, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 118, 796, 8805, 33, 4448, 41384, 7, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 796, 19862, 17034, 7, 9806, 7, 43879, 2414, 7, 9937, 7, 10034, 21857, 62, 89, 86, 15255, 58, 72, 4357, 7377, 118, 4008, 61, 17, 11, 764, 15, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 796, 48436, 2414, 7, 32604, 7, 10034, 21857, 62, 89, 86, 1324, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 395, 62, 79, 3468, 11, 1957, 22362, 18991, 7, 88, 11, 18074, 225, 11, 7377, 118, 11, 299, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 1556, 62, 79, 3468, 11, 2124, 62, 5796, 78, 198, 437, 628, 198, 8818, 41216, 62, 17143, 7307, 7, 395, 62, 79, 3468, 3712, 38469, 90, 12001, 22362, 18991, 90, 51, 11709, 8, 810, 309, 198, 220, 220, 220, 997, 62, 79, 3468, 796, 4129, 7, 395, 62, 79, 3468, 8, 628, 220, 220, 220, 331, 62, 5183, 796, 1976, 27498, 7, 22510, 62, 79, 3468, 8, 198, 220, 220, 220, 18074, 225, 62, 5183, 796, 1976, 27498, 7, 22510, 62, 79, 3468, 8, 628, 220, 220, 220, 7377, 99, 62, 22065, 796, 20650, 90, 43879, 2414, 92, 3419, 198, 220, 220, 220, 410, 796, 20650, 90, 43879, 2414, 92, 3419, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 22510, 62, 79, 3468, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 796, 1556, 62, 79, 3468, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 331, 62, 5183, 58, 72, 60, 796, 45218, 13, 88, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 62, 5183, 58, 72, 60, 796, 45218, 13, 38392, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 138, 99, 62, 22065, 11, 45218, 13, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 85, 11, 45218, 13, 38392, 61, 17, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7377, 99, 796, 289, 9246, 7, 138, 99, 62, 22065, 11, 3392, 7, 13664, 7, 138, 99, 62, 22065, 22305, 198, 220, 220, 220, 450, 15, 796, 220, 7377, 99, 3467, 410, 198, 220, 220, 220, 1441, 450, 15, 11, 331, 62, 5183, 11, 18074, 225, 62, 5183, 198, 437, 628, 198, 8818, 1729, 565, 3949, 62, 710, 4743, 519, 2339, 11935, 7, 397, 3712, 38469, 90, 43879, 2414, 5512, 220, 1556, 62, 79, 3468, 3712, 38469, 90, 12001, 22362, 18991, 90, 51, 11709, 8, 810, 309, 628, 220, 220, 220, 37455, 796, 764, 16, 198, 220, 220, 220, 2472, 62, 2100, 796, 764, 15, 628, 220, 220, 220, 329, 300, 287, 1556, 62, 79, 3468, 198, 220, 220, 220, 220, 220, 220, 220, 269, 62, 72, 796, 352, 13, 15, 1220, 300, 13, 77, 198, 220, 220, 220, 220, 220, 220, 220, 288, 62, 72, 796, 352, 13, 2327, 1220, 357, 75, 13, 77, 1343, 352, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 62, 72, 796, 300, 13, 88, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 225, 62, 72, 796, 300, 13, 38392, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 770, 4132, 25192, 318, 3360, 257, 845, 7786, 9103, 12, 2339, 2163, 588, 257, 36202, 330, 25439, 37752, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 8447, 11, 262, 1277, 29052, 11812, 625, 685, 15, 13, 15, 11, 352, 13, 15, 60, 318, 1103, 9404, 2408, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 780, 262, 11862, 743, 407, 13446, 262, 4132, 25192, 1088, 262, 9103, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1675, 3368, 428, 2071, 11, 262, 11812, 16654, 318, 11266, 656, 3294, 20016, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4619, 262, 9103, 318, 1900, 284, 307, 1969, 284, 331, 62, 72, 11, 262, 2163, 1988, 379, 331, 62, 72, 815, 307, 1576, 1588, 621, 6632, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4132, 25192, 7, 88, 3712, 43879, 2414, 2599, 25, 43879, 2414, 796, 352, 13, 15, 1220, 18074, 225, 31166, 62, 2301, 7, 88, 11, 450, 8, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1033, 32590, 16, 13, 15, 1220, 357, 17, 13, 15, 1635, 18074, 225, 31166, 62, 2301, 7, 88, 11, 450, 4008, 1635, 357, 357, 88, 62, 72, 532, 331, 8, 61, 17, 1220, 269, 62, 72, 1343, 357, 38392, 62, 72, 532, 19862, 17034, 7, 38392, 31166, 62, 2301, 7, 88, 11, 450, 4008, 1267, 61, 17, 1220, 288, 62, 72, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 764, 15, 198, 220, 220, 220, 220, 220, 220, 220, 611, 331, 62, 72, 532, 37455, 1875, 764, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 15853, 15094, 70, 74, 7, 18908, 25192, 11, 764, 15, 11, 331, 62, 72, 532, 37455, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 15853, 15094, 70, 74, 7, 18908, 25192, 11, 3509, 7, 13, 15, 11, 331, 62, 72, 532, 37455, 828, 331, 62, 72, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 15853, 15094, 70, 74, 7, 18908, 25192, 11, 331, 62, 72, 11, 949, 7, 16, 13, 15, 11, 331, 62, 72, 1343, 37455, 4008, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 331, 62, 72, 1343, 37455, 1279, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 15853, 15094, 70, 74, 7, 18908, 25192, 11, 331, 62, 72, 1343, 37455, 11, 352, 13, 15, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 2100, 48185, 2604, 7, 16, 1220, 357, 17, 46582, 1635, 19862, 17034, 7, 66, 62, 72, 1635, 288, 62, 72, 8, 1267, 1635, 2352, 7, 2100, 8, 1343, 18074, 113, 62, 2301, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2472, 62, 2100, 198, 437, 628, 198, 38392, 31166, 62, 2301, 7, 88, 3712, 43879, 2414, 11, 450, 3712, 38469, 90, 43879, 2414, 30072, 796, 3509, 7, 139, 113, 62, 2301, 61, 17, 11, 18074, 225, 31166, 7, 88, 11, 450, 4008, 198, 38392, 31166, 7, 88, 3712, 43879, 2414, 11, 450, 3712, 38469, 90, 43879, 2414, 30072, 796, 450, 58, 16, 60, 1635, 331, 1343, 450, 58, 17, 60, 198 ]
2.277254
3,394
{"score": 7.47, "score_count": 105041, "timestamp": 1567156691.0} {"score": 7.47, "score_count": 104512, "timestamp": 1565255920.0} {"score": 7.48, "score_count": 103497, "timestamp": 1560521897.0} {"score": 7.48, "score_count": 103335, "timestamp": 1559873532.0} {"score": 7.48, "score_count": 103198, "timestamp": 1559003157.0} {"score": 7.48, "score_count": 103052, "timestamp": 1558463581.0} {"score": 7.48, "score_count": 102789, "timestamp": 1557516079.0} {"score": 7.48, "score_count": 101524, "timestamp": 1552987254.0} {"score": 7.49, "score_count": 100705, "timestamp": 1550375712.0} {"score": 7.49, "score_count": 99947, "timestamp": 1547695191.0} {"score": 7.49, "score_count": 99947, "timestamp": 1547687718.0} {"score": 7.51, "score_count": 95020, "timestamp": 1529254514.0} {"score": 7.51, "score_count": 92899, "timestamp": 1522339580.0} {"score": 7.52, "score_count": 91002, "timestamp": 1516872218.0} {"score": 7.53, "score_count": 89448, "timestamp": 1513059306.0} {"score": 7.48, "score_count": 103721, "timestamp": 1561629302.0} {"score": 7.52, "score_count": 91002, "timestamp": 1516872202.0} {"score": 7.53, "score_count": 89161, "timestamp": 1512000427.0} {"score": 7.61, "score_count": 68355, "timestamp": 1460091010.0} {"score": 7.63, "score_count": 63191, "timestamp": 1448940393.0} {"score": 7.64, "score_count": 60580, "timestamp": 1441778723.0} {"score": 7.53, "score_count": 89161, "timestamp": 1512000504.0} {"score": 7.57, "score_count": 78551, "timestamp": 1484614279.0} {"score": 7.57, "score_count": 78551, "timestamp": 1484614083.0} {"score": 7.57, "score_count": 77762, "timestamp": 1483740846.0} {"score": 7.57, "score_count": 77762, "timestamp": 1483740565.0} {"score": 7.57, "score_count": 76955, "timestamp": 1482315429.0} {"score": 7.59, "score_count": 73055, "timestamp": 1471569583.0} {"score": 7.59, "score_count": 71544, "timestamp": 1467977324.0} {"score": 7.6, "score_count": 69360, "timestamp": 1462469333.0} {"score": 7.6, "score_count": 69086, "timestamp": 1461802266.0} {"score": 7.6, "score_count": 68917, "timestamp": 1461442258.0} {"score": 7.61, "score_count": 67692, "timestamp": 1458728550.0} {"score": 7.61, "score_count": 67553, "timestamp": 1458389046.0} {"score": 7.61, "score_count": 67425, "timestamp": 1458105758.0} {"score": 7.61, "score_count": 67038, "timestamp": 1457206805.0} {"score": 7.62, "score_count": 66676, "timestamp": 1456247903.0} {"score": 7.62, "score_count": 66396, "timestamp": 1455586820.0} {"score": 7.62, "score_count": 65922, "timestamp": 1454420322.0} {"score": 7.62, "score_count": 64558, "timestamp": 1451761564.0} {"score": 7.62, "score_count": 64111, "timestamp": 1451038037.0} {"score": 7.63, "score_count": 63703, "timestamp": 1450143738.0} {"score": 7.63, "score_count": 63545, "timestamp": 1449791766.0} {"score": 7.63, "score_count": 62257, "timestamp": 1446153782.0}
[ 4895, 26675, 1298, 767, 13, 2857, 11, 366, 26675, 62, 9127, 1298, 47235, 3901, 11, 366, 16514, 27823, 1298, 1315, 3134, 1314, 2791, 6420, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2857, 11, 366, 26675, 62, 9127, 1298, 838, 2231, 1065, 11, 366, 16514, 27823, 1298, 1315, 2996, 1495, 3270, 1238, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 838, 2682, 5607, 11, 366, 16514, 27823, 1298, 1315, 1899, 4309, 1507, 5607, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 838, 2091, 2327, 11, 366, 16514, 27823, 1298, 1315, 3270, 5774, 2327, 2624, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 15349, 22337, 11, 366, 16514, 27823, 1298, 1315, 3270, 11245, 18458, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 838, 1270, 4309, 11, 366, 16514, 27823, 1298, 1315, 3365, 3510, 2327, 6659, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 838, 1983, 4531, 11, 366, 16514, 27823, 1298, 20708, 2425, 1433, 2998, 24, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 8949, 48057, 11, 366, 16514, 27823, 1298, 20708, 1959, 5774, 24970, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2920, 11, 366, 26675, 62, 9127, 1298, 1802, 34801, 11, 366, 16514, 27823, 1298, 1315, 1120, 22318, 49517, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2920, 11, 366, 26675, 62, 9127, 1298, 36006, 2857, 11, 366, 16514, 27823, 1298, 1315, 2857, 37381, 26492, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2920, 11, 366, 26675, 62, 9127, 1298, 36006, 2857, 11, 366, 16514, 27823, 1298, 1315, 2857, 3104, 3324, 1507, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4349, 11, 366, 26675, 62, 9127, 1298, 38384, 1238, 11, 366, 16514, 27823, 1298, 1315, 1959, 1495, 2231, 1415, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4349, 11, 366, 26675, 62, 9127, 1298, 860, 2078, 2079, 11, 366, 16514, 27823, 1298, 1315, 1828, 2091, 3865, 1795, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4309, 11, 366, 26675, 62, 9127, 1298, 860, 3064, 17, 11, 366, 16514, 27823, 1298, 1315, 1433, 5774, 1828, 1507, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4310, 11, 366, 26675, 62, 9127, 1298, 9919, 31115, 11, 366, 16514, 27823, 1298, 1315, 12952, 3270, 20548, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2780, 11, 366, 26675, 62, 9127, 1298, 838, 2718, 2481, 11, 366, 16514, 27823, 1298, 23871, 1433, 1959, 22709, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4309, 11, 366, 26675, 62, 9127, 1298, 860, 3064, 17, 11, 366, 16514, 27823, 1298, 1315, 14656, 4761, 19004, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4310, 11, 366, 26675, 62, 9127, 1298, 9919, 25948, 11, 366, 16514, 27823, 1298, 1315, 1065, 830, 42363, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5333, 11, 366, 26675, 62, 9127, 1298, 8257, 28567, 11, 366, 16514, 27823, 1298, 1478, 8054, 6420, 20943, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5066, 11, 366, 26675, 62, 9127, 1298, 8093, 26492, 11, 366, 16514, 27823, 1298, 1478, 35890, 1821, 26007, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 2414, 11, 366, 26675, 62, 9127, 1298, 718, 2713, 1795, 11, 366, 16514, 27823, 1298, 20224, 1558, 41019, 1954, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 4310, 11, 366, 26675, 62, 9127, 1298, 9919, 25948, 11, 366, 16514, 27823, 1298, 1315, 1065, 830, 33580, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3553, 11, 366, 26675, 62, 9127, 1298, 8699, 43697, 11, 366, 16514, 27823, 1298, 22613, 3510, 1415, 26050, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3553, 11, 366, 26675, 62, 9127, 1298, 8699, 43697, 11, 366, 16514, 27823, 1298, 22613, 3510, 1415, 48290, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3553, 11, 366, 26675, 62, 9127, 1298, 35534, 5237, 11, 366, 16514, 27823, 1298, 22613, 2718, 26200, 3510, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3553, 11, 366, 26675, 62, 9127, 1298, 35534, 5237, 11, 366, 16514, 27823, 1298, 22613, 2718, 26598, 2996, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3553, 11, 366, 26675, 62, 9127, 1298, 767, 3388, 2816, 11, 366, 16514, 27823, 1298, 22613, 1954, 1314, 11785, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3270, 11, 366, 26675, 62, 9127, 1298, 767, 1270, 2816, 11, 366, 16514, 27823, 1298, 22909, 1314, 3388, 46239, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 3270, 11, 366, 26675, 62, 9127, 1298, 767, 1314, 2598, 11, 366, 16514, 27823, 1298, 1478, 37601, 3324, 33916, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 21, 11, 366, 26675, 62, 9127, 1298, 718, 6052, 1899, 11, 366, 16514, 27823, 1298, 22986, 1731, 3388, 20370, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 21, 11, 366, 26675, 62, 9127, 1298, 8644, 2919, 21, 11, 366, 16514, 27823, 1298, 22986, 15259, 1828, 2791, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 21, 11, 366, 26675, 62, 9127, 1298, 718, 4531, 1558, 11, 366, 16514, 27823, 1298, 22986, 1415, 3682, 25600, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5333, 11, 366, 26675, 62, 9127, 1298, 8275, 46589, 11, 366, 16514, 27823, 1298, 1478, 44617, 2078, 22730, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5333, 11, 366, 26675, 62, 9127, 1298, 718, 2425, 4310, 11, 366, 16514, 27823, 1298, 1478, 3365, 29769, 45438, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5333, 11, 366, 26675, 62, 9127, 1298, 718, 4524, 1495, 11, 366, 16514, 27823, 1298, 1478, 3365, 13348, 38569, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5333, 11, 366, 26675, 62, 9127, 1298, 48136, 2548, 11, 366, 16514, 27823, 1298, 1478, 3553, 22136, 28256, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5237, 11, 366, 26675, 62, 9127, 1298, 43364, 4304, 11, 366, 16514, 27823, 1298, 1478, 3980, 1731, 3720, 3070, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5237, 11, 366, 26675, 62, 9127, 1298, 7930, 34107, 11, 366, 16514, 27823, 1298, 1478, 2816, 3365, 3104, 1238, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5237, 11, 366, 26675, 62, 9127, 1298, 718, 3270, 1828, 11, 366, 16514, 27823, 1298, 20299, 2598, 22416, 1828, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5237, 11, 366, 26675, 62, 9127, 1298, 718, 2231, 3365, 11, 366, 16514, 27823, 1298, 20299, 24096, 1314, 2414, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5237, 11, 366, 26675, 62, 9127, 1298, 5598, 16243, 11, 366, 16514, 27823, 1298, 20299, 15197, 1795, 2718, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5066, 11, 366, 26675, 62, 9127, 1298, 8093, 36809, 11, 366, 16514, 27823, 1298, 20299, 28645, 2718, 2548, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5066, 11, 366, 26675, 62, 9127, 1298, 718, 2327, 2231, 11, 366, 16514, 27823, 1298, 1478, 2920, 3720, 1558, 2791, 13, 15, 92, 198, 4895, 26675, 1298, 767, 13, 5066, 11, 366, 26675, 62, 9127, 1298, 8190, 28676, 11, 366, 16514, 27823, 1298, 1478, 3510, 1314, 2718, 6469, 13, 15, 92, 198 ]
2.344235
1,223
@testset "isconvex" begin m = JuMP.Model() JuMP.@variables m begin x y z end # AffExpr @test MultilinearOpt.isconvex(x + y) @test MultilinearOpt.isconvex(x - z - 3) # QuadExpr @test MultilinearOpt.isconvex(x^2) @test MultilinearOpt.isconvex(x^2 + 0 * z^2) # test positive semidefinite gramian @test MultilinearOpt.isconvex(x^2 + 3 * y - z + 5) @test !MultilinearOpt.isconvex(-x^2) @test !MultilinearOpt.isconvex(x + y - z ^2 + x^2 + y^2) G = rand(3, 3) G = G * G' vars = [x, y, z] expr = dot(vars, G * vars) G_back, vars_back = MultilinearOpt.gramian(expr) @test vars_back == vars @test G_back ≈ G atol=1e-10 @test MultilinearOpt.isconvex(expr) # LinearConstraint @test MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, x + 3 * y == 0))) @test MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, 2 * x - y >= z))) @test MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, 2 * x - y <= z))) # QuadConstr @test !MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, x == y * z))) @test MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, x^2 + y^2 <= z))) @test !MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, x^2 + y^2 <= z^2))) @test MultilinearOpt.isconvex(JuMP.constraint_object(JuMP.@constraint(m, -x^2 - y^2 >= -z))) end
[ 31, 9288, 2617, 366, 271, 1102, 303, 87, 1, 2221, 198, 220, 220, 220, 285, 796, 12585, 7378, 13, 17633, 3419, 628, 220, 220, 220, 12585, 7378, 13, 31, 25641, 2977, 285, 2221, 198, 220, 220, 220, 220, 220, 220, 2124, 198, 220, 220, 220, 220, 220, 220, 331, 198, 220, 220, 220, 220, 220, 220, 1976, 198, 220, 220, 886, 628, 220, 220, 1303, 6708, 3109, 1050, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 1343, 331, 8, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 532, 1976, 532, 513, 8, 628, 220, 220, 1303, 20648, 3109, 1050, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 61, 17, 8, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 61, 17, 1343, 657, 1635, 1976, 61, 17, 8, 1303, 1332, 3967, 5026, 485, 69, 9504, 14599, 666, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 61, 17, 1343, 513, 1635, 331, 532, 1976, 1343, 642, 8, 198, 220, 220, 2488, 9288, 5145, 15205, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 32590, 87, 61, 17, 8, 198, 220, 220, 2488, 9288, 5145, 15205, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 87, 1343, 331, 532, 1976, 10563, 17, 1343, 2124, 61, 17, 1343, 331, 61, 17, 8, 198, 220, 220, 402, 796, 43720, 7, 18, 11, 513, 8, 198, 220, 220, 402, 796, 402, 1635, 402, 6, 198, 220, 220, 410, 945, 796, 685, 87, 11, 331, 11, 1976, 60, 198, 220, 220, 44052, 796, 16605, 7, 85, 945, 11, 402, 1635, 410, 945, 8, 198, 220, 220, 402, 62, 1891, 11, 410, 945, 62, 1891, 796, 7854, 346, 259, 451, 27871, 13, 4546, 666, 7, 31937, 8, 198, 220, 220, 2488, 9288, 410, 945, 62, 1891, 6624, 410, 945, 198, 220, 220, 2488, 9288, 402, 62, 1891, 15139, 230, 402, 379, 349, 28, 16, 68, 12, 940, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 31937, 8, 628, 220, 220, 1303, 44800, 3103, 2536, 2913, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 2124, 1343, 513, 1635, 331, 6624, 657, 22305, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 362, 1635, 2124, 532, 331, 18189, 1976, 22305, 198, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 362, 1635, 2124, 532, 331, 19841, 1976, 22305, 628, 220, 220, 1303, 20648, 3103, 2536, 198, 220, 220, 2488, 9288, 5145, 15205, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 2124, 6624, 331, 1635, 1976, 22305, 628, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 2124, 61, 17, 1343, 331, 61, 17, 19841, 1976, 22305, 628, 220, 220, 2488, 9288, 5145, 15205, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 2124, 61, 17, 1343, 331, 61, 17, 19841, 1976, 61, 17, 22305, 628, 220, 220, 2488, 9288, 7854, 346, 259, 451, 27871, 13, 271, 1102, 303, 87, 7, 33018, 7378, 13, 1102, 2536, 2913, 62, 15252, 7, 33018, 7378, 13, 31, 1102, 2536, 2913, 7, 76, 11, 532, 87, 61, 17, 532, 331, 61, 17, 18189, 532, 89, 22305, 198, 437, 198 ]
2.048433
702
module FullRegisterGate export expandGateToFullRegister # expandGateToFullRegister expands the given gate with optional control qubits to entire quantum register with the given size. function expandGateToFullRegister(register_size::Integer, gate::AbstractMatrix{Complex{Float64}}, gate_lowest_index::Integer, control_bit_indexes::AbstractArray{Int64,1} = Array{Int64,1}([]) )::AbstractMatrix{Complex{Float64}} small_gate_size = size(gate)[1] small_gate_qubit_count = Int(log2(small_gate_size)) gate_bitmask = gate_full_register_bitmask(small_gate_qubit_count, gate_lowest_index) if gate_bitmask == 0 error("gate_bitmask cannot be 0") end n = 2 ^ register_size big_gate = zeros(Complex{Float64}, n, n) control_bitmask = control_full_register_bitmask(control_bit_indexes) for big_gate_column_index ∈ 0:n-1 if !all_control_bits_set(big_gate_column_index, control_bitmask) big_gate[big_gate_column_index+1, big_gate_column_index+1] = Complex(1) continue end target_bits = (big_gate_column_index & gate_bitmask) >>> gate_lowest_index output_state = gate[:,target_bits+1] # Selecting a column here yields the result of matrix-vector multiplication. for state_index ∈ 0:small_gate_size-1 big_gate_row_index = (big_gate_column_index & ~gate_bitmask) | (state_index << gate_lowest_index) big_gate[big_gate_row_index+1, big_gate_column_index+1] = Complex(output_state[state_index+1]) end end return big_gate end function gate_full_register_bitmask(gate_qubit_count::Integer, gate_lowest_index::Integer)::UInt64 bitmask = zero(UInt64) for _ ∈ 1:gate_qubit_count bitmask <<= 1 bitmask |= 1 end return bitmask << gate_lowest_index end function control_full_register_bitmask(control_bit_indexes::AbstractArray{Int64,1})::UInt64 bitmask = zero(UInt64) for i ∈ control_bit_indexes bitmask |= one(UInt64) << i end return bitmask end @inline function all_control_bits_set(i::Integer, control_bitmask::Integer) return i & control_bitmask == control_bitmask end end # module
[ 21412, 6462, 38804, 22628, 198, 198, 39344, 4292, 22628, 2514, 13295, 38804, 198, 198, 2, 4292, 22628, 2514, 13295, 38804, 27513, 262, 1813, 8946, 351, 11902, 1630, 627, 9895, 284, 2104, 14821, 7881, 351, 262, 1813, 2546, 13, 198, 8818, 4292, 22628, 2514, 13295, 38804, 7, 30238, 62, 7857, 3712, 46541, 11, 198, 197, 10494, 3712, 23839, 46912, 90, 5377, 11141, 90, 43879, 2414, 92, 5512, 198, 197, 10494, 62, 9319, 395, 62, 9630, 3712, 46541, 11, 198, 197, 13716, 62, 2545, 62, 9630, 274, 3712, 23839, 19182, 90, 5317, 2414, 11, 16, 92, 796, 15690, 90, 5317, 2414, 11, 16, 92, 26933, 12962, 198, 197, 2599, 25, 23839, 46912, 90, 5377, 11141, 90, 43879, 2414, 11709, 628, 197, 17470, 62, 10494, 62, 7857, 796, 2546, 7, 10494, 38381, 16, 60, 198, 197, 17470, 62, 10494, 62, 421, 2545, 62, 9127, 796, 2558, 7, 6404, 17, 7, 17470, 62, 10494, 62, 7857, 4008, 198, 197, 10494, 62, 2545, 27932, 796, 8946, 62, 12853, 62, 30238, 62, 2545, 27932, 7, 17470, 62, 10494, 62, 421, 2545, 62, 9127, 11, 8946, 62, 9319, 395, 62, 9630, 8, 198, 197, 361, 8946, 62, 2545, 27932, 6624, 657, 198, 197, 197, 18224, 7203, 10494, 62, 2545, 27932, 2314, 307, 657, 4943, 198, 197, 437, 198, 197, 77, 796, 362, 10563, 7881, 62, 7857, 198, 197, 14261, 62, 10494, 796, 1976, 27498, 7, 5377, 11141, 90, 43879, 2414, 5512, 299, 11, 299, 8, 198, 197, 13716, 62, 2545, 27932, 796, 1630, 62, 12853, 62, 30238, 62, 2545, 27932, 7, 13716, 62, 2545, 62, 9630, 274, 8, 198, 197, 1640, 1263, 62, 10494, 62, 28665, 62, 9630, 18872, 230, 657, 25, 77, 12, 16, 198, 197, 197, 361, 5145, 439, 62, 13716, 62, 9895, 62, 2617, 7, 14261, 62, 10494, 62, 28665, 62, 9630, 11, 1630, 62, 2545, 27932, 8, 198, 197, 197, 197, 14261, 62, 10494, 58, 14261, 62, 10494, 62, 28665, 62, 9630, 10, 16, 11, 1263, 62, 10494, 62, 28665, 62, 9630, 10, 16, 60, 796, 19157, 7, 16, 8, 198, 197, 197, 197, 43043, 198, 197, 197, 437, 198, 197, 197, 16793, 62, 9895, 796, 357, 14261, 62, 10494, 62, 28665, 62, 9630, 1222, 8946, 62, 2545, 27932, 8, 13163, 8946, 62, 9319, 395, 62, 9630, 198, 197, 197, 22915, 62, 5219, 796, 8946, 58, 45299, 16793, 62, 9895, 10, 16, 60, 1303, 9683, 278, 257, 5721, 994, 19299, 262, 1255, 286, 17593, 12, 31364, 48473, 13, 198, 197, 197, 1640, 1181, 62, 9630, 18872, 230, 657, 25, 17470, 62, 10494, 62, 7857, 12, 16, 198, 197, 197, 197, 14261, 62, 10494, 62, 808, 62, 9630, 796, 357, 14261, 62, 10494, 62, 28665, 62, 9630, 1222, 5299, 10494, 62, 2545, 27932, 8, 930, 357, 5219, 62, 9630, 9959, 8946, 62, 9319, 395, 62, 9630, 8, 198, 197, 197, 197, 14261, 62, 10494, 58, 14261, 62, 10494, 62, 808, 62, 9630, 10, 16, 11, 1263, 62, 10494, 62, 28665, 62, 9630, 10, 16, 60, 796, 19157, 7, 22915, 62, 5219, 58, 5219, 62, 9630, 10, 16, 12962, 198, 197, 197, 437, 198, 197, 437, 198, 197, 7783, 1263, 62, 10494, 198, 437, 198, 198, 8818, 8946, 62, 12853, 62, 30238, 62, 2545, 27932, 7, 10494, 62, 421, 2545, 62, 9127, 3712, 46541, 11, 8946, 62, 9319, 395, 62, 9630, 3712, 46541, 2599, 25, 52, 5317, 2414, 198, 197, 2545, 27932, 796, 6632, 7, 52, 5317, 2414, 8, 198, 197, 1640, 4808, 18872, 230, 352, 25, 10494, 62, 421, 2545, 62, 9127, 198, 197, 197, 2545, 27932, 9959, 28, 352, 198, 197, 197, 2545, 27932, 930, 28, 352, 198, 197, 437, 198, 197, 7783, 1643, 27932, 9959, 8946, 62, 9319, 395, 62, 9630, 198, 437, 198, 198, 8818, 1630, 62, 12853, 62, 30238, 62, 2545, 27932, 7, 13716, 62, 2545, 62, 9630, 274, 3712, 23839, 19182, 90, 5317, 2414, 11, 16, 92, 2599, 25, 52, 5317, 2414, 198, 197, 2545, 27932, 796, 6632, 7, 52, 5317, 2414, 8, 198, 197, 1640, 1312, 18872, 230, 1630, 62, 2545, 62, 9630, 274, 198, 197, 197, 2545, 27932, 930, 28, 530, 7, 52, 5317, 2414, 8, 9959, 1312, 198, 197, 437, 198, 197, 7783, 1643, 27932, 198, 437, 198, 198, 31, 45145, 2163, 477, 62, 13716, 62, 9895, 62, 2617, 7, 72, 3712, 46541, 11, 1630, 62, 2545, 27932, 3712, 46541, 8, 198, 197, 7783, 1312, 1222, 1630, 62, 2545, 27932, 6624, 1630, 62, 2545, 27932, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
2.738128
737
# --- # layout: post # title: "π day" # date: 2019-03-13 00:00:00 +0000 # categories: blog # mathjax: true # --- # >In the UK we have started to celebrate π day (the 3rd month's 14th day) every year, even though we don't use the USA's date formatting convention of `monthnumber` followed by `daynumber`. But we can't really celebrate the 31st of April (31/4) or the 3rd of Quatember (?) (3/14), so we'll happily celebrate π day on 14/3 along with everyone else! # >I set myself a challenge at the beginning of March: make a π-related image using Julia and the Luxor.jl package every day until π day. Some days it worked out well, others didn't, but I've gathered them all here anyway. This post has a fair few images, but not very much code or mathematical content. # The images here are in low-resolution: they should be available on my [Flickr page](https://www.flickr.com/photos/153311384@N03/) at their full resolution if you want to download or re-use them. # ### Day 1: Circle packing # Circle packing may be a well-trodden path, but it always looks neat, and it's a nice easy start. You maintain a list of circles (center point and radius). Then you create a random circle, check it against all the other ones, draw it if it doesn't overlap, or reduce the radius and try again. It's not very efficient but you can set it going and go and make some coffee. # To make the π shape appear, the code creates a path: #md fontsize(480) #md textoutlines("π", O, :path, halign=:center, valign=:middle) #md πoutline = first(pathtopoly()) # then checks whether each circle's centerpoint is inside or outside the outline of the π shape: #md isinside(pt, πoutline) # and colors it accordingly. # ![image label](IMAGEFOLDER/t-800.png) # ### Day 2: Dry and wet # I repeated myself today, thinking I could develop the circles a bit more, and ended up with this glossier wet-look version. The apparently random-looking shapes in the background are Bézier splodges that are supposed to be splashes... # ![image label](IMAGEFOLDER/pi-reds-balls-wet-800.png) # ### Day 3: π packing # This is π packing rather than circle packing, although the code is again quite similar in outline: choose a point at random, find the largest font size at which the π character fits without overlapping others in the list, and then place it and add it to the list. The colors are a bit murky though. # ![image label](IMAGEFOLDER/pi-swarm-3-800.png) # ### Day 4: Rainbow # Combining concentric circles and rainbow colors, this image shows about 350 digits of π. # ![image label](IMAGEFOLDER/digits-of-pi-avenir-800.png) # To generate the digits of π, I use this function: function pidigits(n) result = BigInt[] k, a, b, a1, b1 = big.([2, 4, 1, 12, 4]) while n > 0 p, q, k = k^2, 2k + 1, k + 1 a, b, a1, b1 = a1, b1, p * a + q * a1, p * b + q * b1 d, d1 = a ÷ b, a1 ÷ b1 while d == d1 push!(result, d) n -= 1 a, a1 = 10(a % b), 10(a1 % b1) d, d1 = a ÷ b, a1 ÷ b1 end end return result end # It looks like witchcraft to me, but I understand that it's a "spigot" algorithm. I was hoping for a while that it was named after a Professor Spigot, but in fact it's describing the way the digits trickle out one by one like drops of water. It's quick enough for a thousand digits or so, but slows down a lot when you ask for 100_000 or more, probably due to the hard work that the big integer library has to do: even when you're just calculating the first 15 digits of π, the values of `a1` and `b1` are way over the limits of Int64s. #md julia-1.1> @time pidigits(1000); #md 0.014522 seconds (44.90 k allocations: 9.425 MiB, 28.97% gc time) # The image might work better on white: # ![image label](IMAGEFOLDER/digits-of-pi-avenir-on-white-800.png) # Sometimes I wanted to check where certain sequences of digits appeared. I couldn't find a built-in function that looked for a sequence of digits in an array, but this worked well enough for my purposes: function findsubsequence(needle, haystack) result = Int64[] for k in 1:length(haystack) - length(needle) if needle == view(haystack, k:k + length(needle) - 1) push!(result, k) end end return result end findsubsequence(str::String, digits) = findsubsequence(map(x -> parse(Int, x), split(str, "")), digits) findsubsequence("999999", pidigits(2000)) # => [763] # ### Day 5: Low-fat # A chunky typeface like the Avenir Heavy I used yesterday is good for masking and clipping. But I wondered how the narrowest typeface would look. I found Briem Akademi, designed by Gunnlaugur Briem at the Royal Academy of Fine Arts in Copenhagen. Adobe's description says: # >The most compressed version works best where legibility is less important than dramatic visual effect. # and I like the abstract look even though it's almost illegible... Would this make nice bathroom tiles? # ![image label](IMAGEFOLDER/many-digits-of-pi-briem-800.png) # ### Day 6 Breakfast and Tiffany # I'm still thinking about using typefaces. I'm a fan of Ed Benguiat's ITC Tiffany font, his nostalgic look back from the 1970s to the age of Edwardian elegance. # ![image label](IMAGEFOLDER/pi-digits-appearing-800.png) # It's easy to do this with tables. Like the circle packing, the code checks whether the coordinates of each table cell fall within a given perimeter, and changes the font accordingly. # ### Day 7 Distinguished # The excellent Colors.jl package has a function called `distinguishable_colors()` (which fortunately tab-completes). The help text says: # > This uses a greedy brute-force approach to choose `n` colors that are maximally distinguishable. Given `seed` color(s), and a set of possible hue, chroma, and lightness values (in LCHab space), it repeatedly chooses the next color as the one that maximizes the minimum pairwise distance to any of the colors already in the palette. # Much to do with color depends on the viewer's perception, but I think it works well here. It starts at the top left, and works from left to right. (That pesky decimal point defaults to using the previous color...) You can spot the Feynman point (`999999`) halfway down on the left (look for the six consecutive sandy brown squares), or the four purple sevens on the bottom row. # ![image label](IMAGEFOLDER/pi-distinguishable_colors-800.png) # I remembered to try to choose the color for the small labels (probably unreadable in the low-resolution PNG you see here) so that they're either light on dark, or dark on light. #md ... r, g, b = color of square #md gamma = 2.2 #md luminance = 0.2126 * r^gamma + 0.7152 * g^gamma + 0.0722 * b^gamma #md (luminance > 0.5^gamma) ? sethue("black") : sethue("white") # ### Day 8 Candy crush edition # ![image label](IMAGEFOLDER/candy-crush.png) # I must have seen an advert for CandyCrush yesterday, or perhaps all that talk of gamma and LCHab spaces caused a reaction, but this sugar rush of an image was the result. The SVG version looks tasty but is too big for this web page. # ### Day 9 Like a circle in a spiral, a wheel within a wheel # Arranging the sweets in a spiral looks tidy. # ![image label](IMAGEFOLDER/pi-digits-in-spiral-balls-800.png) # ### Day 10 π into circumference # Luxor's `polysample()` function takes a polygon and samples it at regular intervals. This allows the following idea, where each point on a shape (here, the outline of the π character) is slowly moved to a matching location on the circular shape around the outside. # ![image label](IMAGEFOLDER/pi-to-circle-800.png) # For a point on the π border `p1`, and a matching point on the circumference polygon `p2`, the intermediate point is given by `between(p1, p2, n)`, where `n` is between 0 and 1. # I like the almost 3D effect you get from this. # ### Day 11 Charcoal # Time for a charcoal sketch: # ![image label](IMAGEFOLDER/pi-charcoal-1-800.png) # The crinkly edges of the paper are made by the `polysample()` function on a rectangle then applying simplex-`noise()`-y nudges to the vertices. The paper is textured with `rule()`d lines, and there's some very low values for `setopacity()` smudges. Shifting the Bézier curve handles slightly for each iteration gives a brushy/sketchy feel. (It's fortunate I can copy and paste some of this code from drawings I've made before: I've learnt the hard way that it's better keep things than throw them away...) # ### Day 12 # I ran out of time on this one, and there are still some problems with the text spacing. The idea is to have the infinite digits of π spiral into some fiery star with some space-y stuff. Probably not the sort of image I should be attempting at all with simple vector-based 2D graphics tools, but it feels like a challenge. Those wispy trails are the same as yesterday's brush strokes, but using custom `setdash()` dashing patterns. # ![image label](IMAGEFOLDER/pi cosmic spiral-800.png) # ### Day 13 # The idea here is to show which digit of π is the current leader, in terms of how many times that digit has appeared already. (Yes, a stupid idea, I know!) Then I couldn't decide on how many digits to show, so it's going to be an animated GIF showing the first 1000 digits. At the 200 digit mark poor old "7" is struggling at the back of the field, but the glory days are ahead - after 1000 digits, it's overtaken 0, 4, and 6. # ![image label](IMAGEFOLDER/200-digits-of-pi-800.png) # The animation turned into a video rather than a GIF, because I don't like the low resolution of GIFs today. # And now of course I have to add a suitable audio soundtrack. Luckily I've recently been playing with George Datseris' [MIDI interface for Julia](https://github.com/JuliaMusic), so it was easy enough to make a musical version of the first 1000 digits of π, where the digits from 0 to 9 choose the appropriate note from a reasonably harmonious scale. using MIDI function savetrack(track, notes) file = MIDIFile() addnotes!(track, notes) addtrackname!(track, "a track") push!(file.tracks, track) writeMIDIFile("/tmp/sound-of-pi.mid", file) end scales = [46, 48, 51, 53, 55, 57, 58, 60, 62, 65, 67] function generatetune!(notes) pos = 1 dur = 80 k = 1 manypidigits = pidigits(1000) for i in manypidigits dur = k * 960 pos += k * 960 n = scales[i + 1] note = Note(n, 76, pos, dur) push!(notes, note) end end notes = Notes() track = MIDITrack() generatetune!(notes) savetrack(track, notes) # ![image label](IMAGEFOLDER/music-credits.png) # This "sonification" (or "audification") is just for fun. For a more convincing critique of these sonifications than I can provide, watch the always entertaining [Tantacrul](https://www.youtube.com/watch?v=Ocq3NeudsVk)'s presentation on YouTube. # And while you're on YouTube, the π video is on [my YouTube channel](https://www.youtube.com/channel/UCfd52kTA5JpzOEItSqXLQxg), and it's my entry for YouTube's Most Boring Video of 2019 competition, but I suspect it won't do very well—competition in this category is fierce, even if sometimes the contestants are unwilling participants. # Happy π day! # [2019-03-13] # ![cormullion signing off](http://steampiano.net/cormullionknot.gif?piday){: .center-image} using Literate #src # preprocess for notebooks #src function setimagefolder(content) #src content = replace(content, "IMAGEFOLDER" => "$IMAGEFOLDER") #src return content #src end #src # for Jupyter notebook, put images in subfolder #src #IMAGEFOLDER = "images/piday" #src #Literate.notebook("source/piday.jl", "notebooks", preprocess = setimagefolder) #src # for Markdown/Jekyll notebook, put images in "/images" #src IMAGEFOLDER = "/images/piday" #src Literate.markdown("source/piday.jl", ".", name="_posts/2019-03-13-piday", #src preprocess = setimagefolder, #src codefence = "{% highlight julia %}" => "{% endhighlight julia %}", #src documenter=false) #src #src
[ 2, 11420, 198, 2, 12461, 25, 1281, 198, 2, 3670, 25, 366, 46582, 1110, 1, 198, 2, 3128, 25, 13130, 12, 3070, 12, 1485, 3571, 25, 405, 25, 405, 1343, 2388, 198, 2, 9376, 25, 4130, 198, 2, 10688, 73, 897, 25, 2081, 198, 2, 11420, 198, 198, 2, 1875, 818, 262, 3482, 356, 423, 2067, 284, 10648, 18074, 222, 1110, 357, 1169, 513, 4372, 1227, 338, 1478, 400, 1110, 8, 790, 614, 11, 772, 996, 356, 836, 470, 779, 262, 4916, 338, 3128, 33313, 9831, 286, 4600, 8424, 17618, 63, 3940, 416, 4600, 820, 17618, 44646, 887, 356, 460, 470, 1107, 10648, 262, 3261, 301, 286, 3035, 357, 3132, 14, 19, 8, 393, 262, 513, 4372, 286, 2264, 265, 1491, 357, 10091, 357, 18, 14, 1415, 828, 523, 356, 1183, 18177, 10648, 18074, 222, 1110, 319, 1478, 14, 18, 1863, 351, 2506, 2073, 0, 198, 198, 2, 1875, 40, 900, 3589, 257, 4427, 379, 262, 3726, 286, 2805, 25, 787, 257, 18074, 222, 12, 5363, 2939, 1262, 22300, 290, 262, 17145, 273, 13, 20362, 5301, 790, 1110, 1566, 18074, 222, 1110, 13, 2773, 1528, 340, 3111, 503, 880, 11, 1854, 1422, 470, 11, 475, 314, 1053, 9272, 606, 477, 994, 6949, 13, 770, 1281, 468, 257, 3148, 1178, 4263, 11, 475, 407, 845, 881, 2438, 393, 18069, 2695, 13, 198, 198, 2, 383, 4263, 994, 389, 287, 1877, 12, 29268, 25, 484, 815, 307, 1695, 319, 616, 685, 47250, 2443, 16151, 5450, 1378, 2503, 13, 2704, 18994, 13, 785, 14, 24729, 14, 1314, 2091, 1157, 22842, 31, 45, 3070, 34729, 379, 511, 1336, 6323, 611, 345, 765, 284, 4321, 393, 302, 12, 1904, 606, 13, 198, 198, 2, 44386, 3596, 352, 25, 16291, 24157, 198, 198, 2, 16291, 24157, 743, 307, 257, 880, 12, 23528, 4742, 3108, 11, 475, 340, 1464, 3073, 15049, 11, 290, 340, 338, 257, 3621, 2562, 923, 13, 921, 5529, 257, 1351, 286, 13332, 357, 16159, 966, 290, 16874, 737, 3244, 345, 2251, 257, 4738, 9197, 11, 2198, 340, 1028, 477, 262, 584, 3392, 11, 3197, 340, 611, 340, 1595, 470, 21721, 11, 393, 4646, 262, 16874, 290, 1949, 757, 13, 632, 338, 407, 845, 6942, 475, 345, 460, 900, 340, 1016, 290, 467, 290, 787, 617, 6891, 13, 198, 198, 2, 1675, 787, 262, 18074, 222, 5485, 1656, 11, 262, 2438, 8075, 257, 3108, 25, 198, 198, 2, 9132, 10369, 7857, 7, 22148, 8, 198, 2, 9132, 2420, 448, 6615, 7203, 46582, 1600, 440, 11, 1058, 6978, 11, 10284, 570, 28, 25, 16159, 11, 1188, 570, 28, 25, 27171, 8, 198, 2, 9132, 18074, 222, 448, 1370, 796, 717, 7, 6978, 4852, 3366, 28955, 198, 198, 2, 788, 8794, 1771, 1123, 9197, 338, 3641, 4122, 318, 2641, 393, 2354, 262, 19001, 286, 262, 18074, 222, 5485, 25, 198, 198, 2, 9132, 318, 48787, 7, 457, 11, 18074, 222, 448, 1370, 8, 198, 198, 2, 290, 7577, 340, 16062, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 83, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 362, 25, 22408, 290, 9583, 198, 198, 2, 314, 5100, 3589, 1909, 11, 3612, 314, 714, 1205, 262, 13332, 257, 1643, 517, 11, 290, 4444, 510, 351, 428, 21194, 959, 9583, 12, 5460, 2196, 13, 383, 5729, 4738, 12, 11534, 15268, 287, 262, 4469, 389, 347, 2634, 89, 959, 4328, 375, 3212, 326, 389, 4385, 284, 307, 4328, 7465, 986, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 445, 82, 12, 21591, 12, 86, 316, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 513, 25, 18074, 222, 24157, 198, 198, 2, 770, 318, 18074, 222, 24157, 2138, 621, 9197, 24157, 11, 3584, 262, 2438, 318, 757, 2407, 2092, 287, 19001, 25, 3853, 257, 966, 379, 4738, 11, 1064, 262, 4387, 10369, 2546, 379, 543, 262, 18074, 222, 2095, 11414, 1231, 32997, 1854, 287, 262, 1351, 11, 290, 788, 1295, 340, 290, 751, 340, 284, 262, 1351, 13, 383, 7577, 389, 257, 1643, 39574, 996, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 2032, 1670, 12, 18, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 604, 25, 19909, 198, 198, 2, 14336, 3191, 5280, 1173, 13332, 290, 27223, 7577, 11, 428, 2939, 2523, 546, 13803, 19561, 286, 18074, 222, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 12894, 896, 12, 1659, 12, 14415, 12, 4005, 343, 12, 7410, 13, 11134, 8, 198, 198, 2, 1675, 7716, 262, 19561, 286, 18074, 222, 11, 314, 779, 428, 2163, 25, 198, 198, 8818, 46514, 328, 896, 7, 77, 8, 198, 220, 220, 220, 1255, 796, 4403, 5317, 21737, 198, 220, 220, 220, 479, 11, 257, 11, 275, 11, 257, 16, 11, 275, 16, 796, 1263, 12195, 58, 17, 11, 604, 11, 352, 11, 1105, 11, 604, 12962, 198, 220, 220, 220, 981, 299, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 279, 11, 10662, 11, 479, 796, 479, 61, 17, 11, 362, 74, 1343, 352, 11, 479, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 257, 11, 275, 11, 257, 16, 11, 275, 16, 796, 257, 16, 11, 275, 16, 11, 279, 1635, 257, 220, 1343, 220, 10662, 1635, 257, 16, 11, 279, 1635, 275, 220, 1343, 220, 10662, 1635, 275, 16, 198, 220, 220, 220, 220, 220, 220, 220, 288, 11, 288, 16, 796, 257, 6184, 115, 275, 11, 257, 16, 6184, 115, 275, 16, 198, 220, 220, 220, 220, 220, 220, 220, 981, 288, 6624, 288, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 20274, 11, 288, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 48185, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 11, 257, 16, 796, 838, 7, 64, 4064, 275, 828, 838, 7, 64, 16, 4064, 275, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 11, 288, 16, 796, 257, 6184, 115, 275, 11, 257, 16, 6184, 115, 275, 16, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1255, 198, 437, 198, 198, 2, 632, 3073, 588, 48646, 284, 502, 11, 475, 314, 1833, 326, 340, 338, 257, 366, 2777, 328, 313, 1, 11862, 13, 314, 373, 7725, 329, 257, 981, 326, 340, 373, 3706, 706, 257, 8129, 1338, 328, 313, 11, 475, 287, 1109, 340, 338, 12059, 262, 835, 262, 19561, 41854, 503, 530, 416, 530, 588, 10532, 286, 1660, 13, 632, 338, 2068, 1576, 329, 257, 7319, 19561, 393, 523, 11, 475, 33019, 866, 257, 1256, 618, 345, 1265, 329, 1802, 62, 830, 393, 517, 11, 2192, 2233, 284, 262, 1327, 670, 326, 262, 1263, 18253, 5888, 468, 284, 466, 25, 772, 618, 345, 821, 655, 26019, 262, 717, 1315, 19561, 286, 18074, 222, 11, 262, 3815, 286, 4600, 64, 16, 63, 290, 4600, 65, 16, 63, 389, 835, 625, 262, 7095, 286, 2558, 2414, 82, 13, 198, 198, 2, 9132, 474, 43640, 12, 16, 13, 16, 29, 2488, 2435, 46514, 328, 896, 7, 12825, 1776, 198, 2, 9132, 220, 657, 13, 486, 2231, 1828, 4201, 357, 2598, 13, 3829, 479, 49157, 25, 860, 13, 32114, 13756, 33, 11, 2579, 13, 5607, 4, 308, 66, 640, 8, 198, 198, 2, 383, 2939, 1244, 670, 1365, 319, 2330, 25, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 12894, 896, 12, 1659, 12, 14415, 12, 4005, 343, 12, 261, 12, 11186, 12, 7410, 13, 11134, 8, 198, 198, 2, 8975, 314, 2227, 284, 2198, 810, 1728, 16311, 286, 19561, 4120, 13, 314, 3521, 470, 1064, 257, 3170, 12, 259, 2163, 326, 3114, 329, 257, 8379, 286, 19561, 287, 281, 7177, 11, 475, 428, 3111, 880, 1576, 329, 616, 4959, 25, 198, 198, 8818, 7228, 549, 43167, 7, 31227, 293, 11, 27678, 25558, 8, 198, 220, 220, 220, 1255, 796, 2558, 2414, 21737, 198, 220, 220, 220, 329, 479, 287, 352, 25, 13664, 7, 71, 323, 25558, 8, 532, 4129, 7, 31227, 293, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 17598, 6624, 1570, 7, 71, 323, 25558, 11, 479, 25, 74, 1343, 4129, 7, 31227, 293, 8, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 20274, 11, 479, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1255, 198, 437, 198, 198, 19796, 7266, 43167, 7, 2536, 3712, 10100, 11, 19561, 8, 796, 198, 220, 220, 220, 7228, 549, 43167, 7, 8899, 7, 87, 4613, 21136, 7, 5317, 11, 2124, 828, 6626, 7, 2536, 11, 366, 4943, 828, 19561, 8, 198, 198, 19796, 7266, 43167, 7203, 24214, 2079, 1600, 46514, 328, 896, 7, 11024, 4008, 1303, 5218, 685, 49641, 60, 198, 198, 2, 44386, 3596, 642, 25, 7754, 12, 17359, 198, 198, 2, 317, 442, 28898, 2099, 2550, 588, 262, 15053, 343, 14089, 314, 973, 7415, 318, 922, 329, 9335, 278, 290, 45013, 13, 887, 314, 14028, 703, 262, 7135, 395, 2099, 2550, 561, 804, 13, 314, 1043, 25866, 368, 9084, 36920, 72, 11, 3562, 416, 6748, 21283, 7493, 333, 25866, 368, 379, 262, 8111, 8581, 286, 17867, 11536, 287, 31104, 13, 21771, 338, 6764, 1139, 25, 198, 198, 2, 1875, 464, 749, 25388, 2196, 2499, 1266, 810, 1232, 2247, 318, 1342, 1593, 621, 10092, 5874, 1245, 13, 198, 198, 2, 290, 314, 588, 262, 12531, 804, 772, 996, 340, 338, 2048, 4416, 856, 986, 10928, 428, 787, 3621, 12436, 19867, 30, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 21834, 12, 12894, 896, 12, 1659, 12, 14415, 12, 65, 380, 368, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 718, 32175, 290, 40928, 198, 198, 2, 314, 1101, 991, 3612, 546, 1262, 2099, 32186, 13, 314, 1101, 257, 4336, 286, 1717, 347, 13561, 5375, 338, 314, 4825, 40928, 10369, 11, 465, 40459, 804, 736, 422, 262, 8069, 82, 284, 262, 2479, 286, 10443, 666, 49198, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 12894, 896, 12, 1324, 6648, 12, 7410, 13, 11134, 8, 198, 198, 2, 632, 338, 2562, 284, 466, 428, 351, 8893, 13, 4525, 262, 9197, 24157, 11, 262, 2438, 8794, 1771, 262, 22715, 286, 1123, 3084, 2685, 2121, 1626, 257, 1813, 25317, 11, 290, 2458, 262, 10369, 16062, 13, 198, 198, 2, 44386, 3596, 767, 4307, 46709, 198, 198, 2, 383, 6275, 29792, 13, 20362, 5301, 468, 257, 2163, 1444, 4600, 17080, 41726, 62, 4033, 669, 3419, 63, 357, 4758, 39955, 7400, 12, 785, 1154, 4879, 737, 383, 1037, 2420, 1139, 25, 198, 198, 2, 1875, 770, 3544, 257, 31828, 33908, 12, 3174, 3164, 284, 3853, 4600, 77, 63, 7577, 326, 389, 12991, 453, 15714, 540, 13, 11259, 4600, 28826, 63, 3124, 7, 82, 828, 290, 257, 900, 286, 1744, 37409, 11, 15358, 64, 11, 290, 1657, 1108, 3815, 357, 259, 406, 3398, 397, 2272, 828, 340, 7830, 19769, 262, 1306, 3124, 355, 262, 530, 326, 12991, 4340, 262, 5288, 5166, 3083, 5253, 284, 597, 286, 262, 7577, 1541, 287, 262, 27043, 13, 198, 198, 2, 13111, 284, 466, 351, 3124, 8338, 319, 262, 19091, 338, 11202, 11, 475, 314, 892, 340, 2499, 880, 994, 13, 632, 4940, 379, 262, 1353, 1364, 11, 290, 2499, 422, 1364, 284, 826, 13, 357, 2504, 49109, 32465, 966, 26235, 284, 1262, 262, 2180, 3124, 23029, 921, 460, 4136, 262, 5452, 2047, 805, 966, 357, 63, 24214, 2079, 63, 8, 19487, 866, 319, 262, 1364, 357, 5460, 329, 262, 2237, 12785, 44039, 7586, 24438, 828, 393, 262, 1440, 14032, 3598, 82, 319, 262, 4220, 5752, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 17080, 41726, 62, 4033, 669, 12, 7410, 13, 11134, 8, 198, 198, 2, 314, 12086, 284, 1949, 284, 3853, 262, 3124, 329, 262, 1402, 14722, 357, 26949, 555, 46155, 287, 262, 1877, 12, 29268, 36182, 345, 766, 994, 8, 523, 326, 484, 821, 2035, 1657, 319, 3223, 11, 393, 3223, 319, 1657, 13, 198, 198, 2, 9132, 2644, 374, 11, 308, 11, 275, 796, 3124, 286, 6616, 198, 2, 9132, 34236, 796, 362, 13, 17, 198, 2, 9132, 29763, 590, 796, 657, 13, 17, 19420, 1635, 374, 61, 28483, 2611, 1343, 657, 13, 22, 17827, 1635, 308, 61, 28483, 2611, 1343, 657, 13, 2998, 1828, 1635, 275, 61, 28483, 2611, 198, 2, 9132, 357, 75, 7230, 590, 1875, 657, 13, 20, 61, 28483, 2611, 8, 5633, 900, 71, 518, 7203, 13424, 4943, 1058, 900, 71, 518, 7203, 11186, 4943, 198, 198, 2, 44386, 3596, 807, 24680, 19813, 8313, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 66, 10757, 12, 6098, 1530, 13, 11134, 8, 198, 198, 2, 314, 1276, 423, 1775, 281, 6728, 329, 24680, 13916, 1530, 7415, 11, 393, 3737, 477, 326, 1561, 286, 34236, 290, 406, 3398, 397, 9029, 4073, 257, 6317, 11, 475, 428, 7543, 10484, 286, 281, 2939, 373, 262, 1255, 13, 383, 45809, 2196, 3073, 25103, 475, 318, 1165, 1263, 329, 428, 3992, 2443, 13, 198, 198, 2, 44386, 3596, 860, 4525, 257, 9197, 287, 257, 23642, 11, 257, 7825, 1626, 257, 7825, 198, 198, 2, 943, 32319, 262, 42402, 287, 257, 23642, 3073, 43044, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 12894, 896, 12, 259, 12, 2777, 21093, 12, 21591, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 838, 18074, 222, 656, 38447, 198, 198, 2, 17145, 273, 338, 4600, 35428, 39873, 3419, 63, 2163, 2753, 257, 7514, 14520, 290, 8405, 340, 379, 3218, 20016, 13, 770, 3578, 262, 1708, 2126, 11, 810, 1123, 966, 319, 257, 5485, 357, 1456, 11, 262, 19001, 286, 262, 18074, 222, 2095, 8, 318, 6364, 3888, 284, 257, 12336, 4067, 319, 262, 18620, 5485, 1088, 262, 2354, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 1462, 12, 45597, 12, 7410, 13, 11134, 8, 198, 198, 2, 1114, 257, 966, 319, 262, 18074, 222, 4865, 4600, 79, 16, 47671, 290, 257, 12336, 966, 319, 262, 38447, 7514, 14520, 4600, 79, 17, 47671, 262, 19898, 966, 318, 1813, 416, 4600, 23395, 7, 79, 16, 11, 279, 17, 11, 299, 8, 47671, 810, 4600, 77, 63, 318, 1022, 657, 290, 352, 13, 198, 198, 2, 314, 588, 262, 2048, 513, 35, 1245, 345, 651, 422, 428, 13, 198, 198, 2, 44386, 3596, 1367, 3178, 25140, 198, 198, 2, 3862, 329, 257, 33512, 17548, 25, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 12, 10641, 25140, 12, 16, 12, 7410, 13, 11134, 8, 198, 198, 2, 383, 1067, 676, 306, 13015, 286, 262, 3348, 389, 925, 416, 262, 4600, 35428, 39873, 3419, 63, 2163, 319, 257, 35991, 788, 11524, 2829, 87, 12, 63, 3919, 786, 3419, 63, 12, 88, 26731, 3212, 284, 262, 9421, 1063, 13, 383, 3348, 318, 2420, 1522, 351, 4600, 25135, 3419, 63, 67, 3951, 11, 290, 612, 338, 617, 845, 1877, 3815, 329, 4600, 2617, 404, 4355, 3419, 63, 895, 463, 3212, 13, 911, 13309, 262, 347, 2634, 89, 959, 12133, 17105, 4622, 329, 1123, 24415, 3607, 257, 14093, 88, 14, 82, 7126, 29658, 1254, 13, 357, 1026, 338, 20200, 314, 460, 4866, 290, 17008, 617, 286, 428, 2438, 422, 23388, 314, 1053, 925, 878, 25, 314, 1053, 26338, 262, 1327, 835, 326, 340, 338, 1365, 1394, 1243, 621, 3714, 606, 1497, 23029, 198, 198, 2, 44386, 3596, 1105, 198, 198, 2, 314, 4966, 503, 286, 640, 319, 428, 530, 11, 290, 612, 389, 991, 617, 2761, 351, 262, 2420, 31050, 13, 383, 2126, 318, 284, 423, 262, 15541, 19561, 286, 18074, 222, 23642, 656, 617, 27810, 3491, 351, 617, 2272, 12, 88, 3404, 13, 18578, 407, 262, 3297, 286, 2939, 314, 815, 307, 9361, 379, 477, 351, 2829, 15879, 12, 3106, 362, 35, 9382, 4899, 11, 475, 340, 5300, 588, 257, 4427, 13, 5845, 266, 8802, 88, 19196, 389, 262, 976, 355, 7415, 338, 14093, 29483, 11, 475, 1262, 2183, 4600, 2617, 42460, 3419, 63, 288, 2140, 7572, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 14415, 23464, 23642, 12, 7410, 13, 11134, 8, 198, 198, 2, 44386, 3596, 1511, 198, 198, 2, 383, 2126, 994, 318, 284, 905, 543, 16839, 286, 18074, 222, 318, 262, 1459, 3554, 11, 287, 2846, 286, 703, 867, 1661, 326, 16839, 468, 4120, 1541, 13, 357, 5297, 11, 257, 8531, 2126, 11, 314, 760, 8133, 3244, 314, 3521, 470, 5409, 319, 703, 867, 19561, 284, 905, 11, 523, 340, 338, 1016, 284, 307, 281, 15108, 24984, 4478, 262, 717, 8576, 19561, 13, 1629, 262, 939, 16839, 1317, 3595, 1468, 366, 22, 1, 318, 9648, 379, 262, 736, 286, 262, 2214, 11, 475, 262, 13476, 1528, 389, 4058, 532, 706, 8576, 19561, 11, 340, 338, 9929, 1685, 657, 11, 604, 11, 290, 718, 13, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 2167, 12, 12894, 896, 12, 1659, 12, 14415, 12, 7410, 13, 11134, 8, 198, 198, 2, 383, 11034, 2900, 656, 257, 2008, 2138, 621, 257, 24984, 11, 780, 314, 836, 470, 588, 262, 1877, 6323, 286, 24984, 82, 1909, 13, 198, 198, 2, 843, 783, 286, 1781, 314, 423, 284, 751, 257, 11080, 6597, 21751, 13, 24262, 314, 1053, 2904, 587, 2712, 351, 4502, 360, 1381, 263, 271, 6, 685, 44, 2389, 40, 7071, 329, 22300, 16151, 5450, 1378, 12567, 13, 785, 14, 16980, 544, 22648, 828, 523, 340, 373, 2562, 1576, 284, 787, 257, 10530, 2196, 286, 262, 717, 8576, 19561, 286, 18074, 222, 11, 810, 262, 19561, 422, 657, 284, 860, 3853, 262, 5035, 3465, 422, 257, 13025, 25625, 699, 5046, 13, 198, 198, 3500, 33439, 198, 198, 8818, 3613, 11659, 7, 11659, 11, 4710, 8, 198, 220, 220, 220, 2393, 796, 25269, 5064, 576, 3419, 198, 220, 220, 220, 751, 17815, 0, 7, 11659, 11, 4710, 8, 198, 220, 220, 220, 751, 11659, 3672, 0, 7, 11659, 11, 366, 64, 2610, 4943, 198, 220, 220, 220, 4574, 0, 7, 7753, 13, 46074, 11, 2610, 8, 198, 220, 220, 220, 3551, 44, 2389, 5064, 576, 7203, 14, 22065, 14, 23661, 12, 1659, 12, 14415, 13, 13602, 1600, 2393, 8, 198, 437, 198, 198, 1416, 2040, 796, 685, 3510, 11, 4764, 11, 6885, 11, 7192, 11, 5996, 11, 7632, 11, 7618, 11, 3126, 11, 8190, 11, 6135, 11, 8275, 60, 198, 198, 8818, 1152, 265, 316, 1726, 0, 7, 17815, 8, 198, 220, 220, 220, 1426, 796, 352, 198, 220, 220, 220, 22365, 796, 4019, 198, 220, 220, 220, 479, 796, 352, 198, 220, 220, 220, 867, 35317, 328, 896, 796, 46514, 328, 896, 7, 12825, 8, 198, 220, 220, 220, 329, 1312, 287, 867, 35317, 328, 896, 198, 220, 220, 220, 220, 220, 220, 220, 22365, 796, 479, 1635, 41263, 198, 220, 220, 220, 220, 220, 220, 220, 1426, 15853, 479, 1635, 41263, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 16252, 58, 72, 1343, 352, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3465, 796, 5740, 7, 77, 11, 8684, 11, 1426, 11, 22365, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 17815, 11, 3465, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 17815, 796, 11822, 3419, 198, 11659, 796, 25269, 2043, 39638, 3419, 198, 8612, 265, 316, 1726, 0, 7, 17815, 8, 198, 21928, 11659, 7, 11659, 11, 4710, 8, 198, 198, 2, 5145, 58, 9060, 6167, 16151, 3955, 11879, 37, 3535, 14418, 14, 28965, 12, 66, 20696, 13, 11134, 8, 198, 198, 2, 770, 366, 1559, 2649, 1, 357, 273, 366, 3885, 2649, 4943, 318, 655, 329, 1257, 13, 1114, 257, 517, 17101, 19976, 286, 777, 3367, 6637, 621, 314, 460, 2148, 11, 2342, 262, 1464, 17774, 685, 51, 415, 330, 81, 377, 16151, 5450, 1378, 2503, 13, 11604, 13, 785, 14, 8340, 30, 85, 28, 46, 66, 80, 18, 8199, 24786, 53, 74, 33047, 82, 10470, 319, 7444, 13, 198, 198, 2, 843, 981, 345, 821, 319, 7444, 11, 262, 18074, 222, 2008, 318, 319, 685, 1820, 7444, 6518, 16151, 5450, 1378, 2503, 13, 11604, 13, 785, 14, 17620, 14, 9598, 16344, 4309, 74, 5603, 20, 41, 79, 89, 27799, 1026, 50, 80, 32457, 48, 87, 70, 828, 290, 340, 338, 616, 5726, 329, 7444, 338, 4042, 347, 3255, 7623, 286, 13130, 5449, 11, 475, 314, 4099, 340, 1839, 470, 466, 845, 880, 960, 5589, 15620, 287, 428, 6536, 318, 14800, 11, 772, 611, 3360, 262, 37851, 389, 19084, 6809, 13, 198, 198, 2, 14628, 18074, 222, 1110, 0, 198, 198, 2, 685, 23344, 12, 3070, 12, 1485, 60, 198, 198, 2, 5145, 58, 66, 579, 724, 295, 8415, 572, 16151, 4023, 1378, 4169, 696, 10115, 13, 3262, 14, 66, 579, 724, 295, 74, 1662, 13, 27908, 30, 79, 2567, 19953, 25, 764, 16159, 12, 9060, 92, 198, 198, 3500, 17667, 378, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 2, 662, 14681, 329, 43935, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 8818, 900, 9060, 43551, 7, 11299, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 220, 220, 220, 2695, 796, 6330, 7, 11299, 11, 366, 3955, 11879, 37, 3535, 14418, 1, 5218, 17971, 3955, 11879, 37, 3535, 14418, 4943, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 220, 220, 220, 1441, 2695, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 437, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 198, 2, 329, 449, 929, 88, 353, 20922, 11, 1234, 4263, 287, 850, 43551, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 2, 3955, 11879, 37, 3535, 14418, 796, 366, 17566, 14, 79, 2567, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 198, 2, 43460, 378, 13, 11295, 2070, 7203, 10459, 14, 79, 2567, 13, 20362, 1600, 366, 11295, 12106, 1600, 662, 14681, 796, 900, 9060, 43551, 8, 1303, 10677, 198, 198, 2, 329, 2940, 2902, 14, 41, 988, 25727, 20922, 11, 1234, 4263, 287, 12813, 17566, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 198, 3955, 11879, 37, 3535, 14418, 796, 12813, 17566, 14, 79, 2567, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 198, 43460, 378, 13, 4102, 2902, 7203, 10459, 14, 79, 2567, 13, 20362, 1600, 366, 33283, 1438, 2625, 62, 24875, 14, 23344, 12, 3070, 12, 1485, 12, 79, 2567, 1600, 220, 220, 220, 220, 220, 1303, 10677, 198, 662, 14681, 796, 900, 9060, 43551, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 14873, 891, 594, 796, 45144, 4, 7238, 474, 43640, 4064, 36786, 5218, 45144, 4, 886, 8929, 2971, 474, 43640, 4064, 92, 1600, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 3188, 263, 28, 9562, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10677, 198, 198, 2, 10677, 198 ]
2.886067
4,371
typealias ReComp Union{Real,Complex} immutable Dual{T<:ReComp} <: Number value::T epsilon::T end Dual{S<:ReComp,T<:ReComp}(x::S, y::T) = Dual(promote(x,y)...) Dual(x::ReComp) = Dual(x, zero(x)) const ɛ = Dual(false, true) const imɛ = Dual(Complex(false, false), Complex(false, true)) typealias Dual128 Dual{Float64} typealias Dual64 Dual{Float32} typealias Dual32 Dual{Float16} typealias DualComplex256 Dual{Complex128} typealias DualComplex128 Dual{Complex64} typealias DualComplex64 Dual{Complex32} convert{T<:ReComp}(::Type{Dual{T}}, z::Dual{T}) = z convert{T<:ReComp}(::Type{Dual{T}}, z::Dual) = Dual{T}(convert(T, value(z)), convert(T, epsilon(z))) convert{T<:ReComp}(::Type{Dual{T}}, x::Number) = Dual{T}(convert(T, x), convert(T, 0)) convert{T<:ReComp}(::Type{T}, z::Dual) = (epsilon(z)==0 ? convert(T, value(z)) : throw(InexactError())) promote_rule{T<:ReComp, S<:ReComp}(::Type{Dual{T}}, ::Type{Dual{S}}) = Dual{promote_type(T, S)} promote_rule{T<:ReComp, S<:ReComp}(::Type{Dual{T}}, ::Type{S}) = Dual{promote_type(T, S)} promote_rule{T<:ReComp}(::Type{Dual{T}}, ::Type{T}) = Dual{T} widen{T}(::Type{Dual{T}}) = Dual{widen(T)} value(z::Dual) = z.value epsilon(z::Dual) = z.epsilon dual(x::ReComp, y::ReComp) = Dual(x, y) dual(x::ReComp) = Dual(x) dual(z::Dual) = z Compat.@dep_vectorize_1arg ReComp dual Compat.@dep_vectorize_2arg ReComp dual Compat.@dep_vectorize_1arg Dual dual Compat.@dep_vectorize_1arg Dual value Compat.@dep_vectorize_1arg Dual epsilon const realpart = value const dualpart = epsilon isnan(z::Dual) = isnan(value(z)) isinf(z::Dual) = isinf(value(z)) isfinite(z::Dual) = isfinite(value(z)) isdual(x::Dual) = true isdual(x::Number) = false eps(z::Dual) = eps(value(z)) eps{T}(::Type{Dual{T}}) = eps(T) function dual_show{T<:Real}(io::IO, z::Dual{T}, compact::Bool) x, y = value(z), epsilon(z) if isnan(x) || isfinite(y) compact ? showcompact(io,x) : show(io,x) if signbit(y)==1 && !isnan(y) y = -y print(io, compact ? "-" : " - ") else print(io, compact ? "+" : " + ") end compact ? showcompact(io, y) : show(io, y) printtimes(io, y) print(io, "ɛ") else print(io, "Dual{",T,"}(", x, ",", y, ")") end end function dual_show{T<:Complex}(io::IO, z::Dual{T}, compact::Bool) x, y = value(z), epsilon(z) xr, xi = reim(x) yr, yi = reim(y) if isnan(x) || isfinite(y) compact ? showcompact(io,x) : show(io,x) if signbit(yr)==1 && !isnan(y) yr = -yr print(io, " - ") else print(io, " + ") end if compact if signbit(yi)==1 && !isnan(y) yi = -yi showcompact(io, yr) printtimes(io, yr) print(io, "ɛ-") showcompact(io, yi) else showcompact(io, yr) print(io, "ɛ+") showcompact(io, yi) end else if signbit(yi)==1 && !isnan(y) yi = -yi show(io, yr) printtimes(io, yr) print(io, "ɛ - ") show(io, yi) else show(io, yr) print(io, "ɛ + ") show(io, yi) end end printtimes(io, yi) print(io, "imɛ") else print(io, "Dual{",T,"}(", x, ",", y, ")") end end function dual_show{T<:Bool}(io::IO, z::Dual{T}, compact::Bool) x, y = value(z), epsilon(z) if !value(z) && epsilon(z) print(io, "ɛ") else print(io, "Dual{",T,"}(", x, ",", y, ")") end end function dual_show{T<:Bool}(io::IO, z::Dual{Complex{T}}, compact::Bool) x, y = value(z), epsilon(z) xr, xi = reim(x) yr, yi = reim(y) if !xr if xi*!yr*!yi print(io, "im") elseif !xi*yr*!yi print(io, "ɛ") elseif !xi*!yr*yi print(io, "imɛ") end else print(io, "Dual{",T,"}(", x, ",", y, ")") end end function printtimes(io::IO, x::Real) if !(isa(x,Integer) || isa(x,Rational) || isa(x,AbstractFloat) && isfinite(x)) print(io, "*") end end show(io::IO, z::Dual) = dual_show(io, z, false) showcompact(io::IO, z::Dual) = dual_show(io, z, true) function read{T<:ReComp}(s::IO, ::Type{Dual{T}}) x = read(s, T) y = read(s, T) Dual{T}(x, y) end function write(s::IO, z::Dual) write(s, value(z)) write(s, epsilon(z)) end ## Generic functions of dual numbers ## convert(::Type{Dual}, z::Dual) = z convert(::Type{Dual}, x::Number) = Dual(x) ==(z::Dual, w::Dual) = value(z) == value(w) ==(z::Dual, x::Number) = value(z) == x ==(x::Number, z::Dual) = value(z) == x isequal(z::Dual, w::Dual) = isequal(value(z),value(w)) && isequal(epsilon(z), epsilon(w)) isequal(z::Dual, x::Number) = isequal(value(z), x) && isequal(epsilon(z), zero(x)) isequal(x::Number, z::Dual) = isequal(z, x) isless{T<:Real}(z::Dual{T},w::Dual{T}) = value(z) < value(w) isless{T<:Real}(z::Real,w::Dual{T}) = z < value(w) isless{T<:Real}(z::Dual{T},w::Real) = value(z) < w hash(z::Dual) = (x = hash(value(z)); epsilon(z)==0 ? x : bitmix(x,hash(epsilon(z)))) float{T<:AbstractFloat}(z::Union{Dual{T},Dual{Complex{T}}})=z complex{T<:Real}(z::Dual{Complex{T}})=z floor{T<:Real}(::Type{T}, z::Dual) = floor(T, value(z)) ceil{ T<:Real}(::Type{T}, z::Dual) = ceil( T, value(z)) trunc{T<:Real}(::Type{T}, z::Dual) = trunc(T, value(z)) round{T<:Real}(::Type{T}, z::Dual) = round(T, value(z)) for op in (:real,:imag,:conj,:float,:complex) @eval begin $op(z::Dual) = Dual($op(value(z)),$op(epsilon(z))) end end abs(z::Dual) = sqrt(abs2(z)) abs2(z::Dual) = real(conj(z)*z) real{T<:Real}(z::Dual{T}) = z abs{T<:Real}(z::Dual{T}) = z ≥ 0 ? z : -z angle{T<:Real}(z::Dual{T}) = z ≥ 0 ? zero(z) : one(z)*π angle{T<:Real}(z::Dual{Complex{T}}) = z == 0 ? (imag(epsilon(z)) == 0 ? Dual(zero(T),zero(T)) : Dual(zero(T),convert(T, Inf))) : real(log(sign(z))/im) # algebraic definitions conjdual(z::Dual) = Dual(value(z),-epsilon(z)) absdual(z::Dual) = abs(value(z)) abs2dual(z::Dual) = abs2(value(z)) # algebra +(z::Dual, w::Dual) = Dual(value(z)+value(w), epsilon(z)+epsilon(w)) +(z::Number, w::Dual) = Dual(z+value(w), epsilon(w)) +(z::Dual, w::Number) = Dual(value(z)+w, epsilon(z)) -(z::Dual) = Dual(-value(z), -epsilon(z)) -(z::Dual, w::Dual) = Dual(value(z)-value(w), epsilon(z)-epsilon(w)) -(z::Number, w::Dual) = Dual(z-value(w), -epsilon(w)) -(z::Dual, w::Number) = Dual(value(z)-w, epsilon(z)) # avoid ambiguous definition with Bool*Number *(x::Bool, z::Dual) = ifelse(x, z, ifelse(signbit(real(value(z)))==0, zero(z), -zero(z))) *(x::Dual, z::Bool) = z*x *(z::Dual, w::Dual) = Dual(value(z)*value(w), epsilon(z)*value(w)+value(z)*epsilon(w)) *(x::Number, z::Dual) = Dual(x*value(z), x*epsilon(z)) *(z::Dual, x::Number) = Dual(x*value(z), x*epsilon(z)) /(z::Dual, w::Dual) = Dual(value(z)/value(w), (epsilon(z)*value(w)-value(z)*epsilon(w))/(value(w)*value(w))) /(z::Number, w::Dual) = Dual(z/value(w), -z*epsilon(w)/value(w)^2) /(z::Dual, x::Number) = Dual(value(z)/x, epsilon(z)/x) for f in [:^, :(NaNMath.pow)] @eval function ($f)(z::Dual, w::Dual) if epsilon(w) == 0.0 return $f(z,value(w)) end val = $f(value(z),value(w)) du = epsilon(z)*value(w)*(($f)(value(z),value(w)-1))+epsilon(w)*($f)(value(z),value(w))*log(value(z)) Dual(val, du) end end mod(z::Dual, n::Number) = Dual(mod(value(z), n), epsilon(z)) # these two definitions are needed to fix ambiguity warnings ^(z::Dual, n::Integer) = Dual(value(z)^n, epsilon(z)*n*value(z)^(n-1)) ^(z::Dual, n::Rational) = Dual(value(z)^n, epsilon(z)*n*value(z)^(n-1)) ^(z::Dual, n::Number) = Dual(value(z)^n, epsilon(z)*n*value(z)^(n-1)) NaNMath.pow(z::Dual, n::Number) = Dual(NaNMath.pow(value(z),n), epsilon(z)*n*NaNMath.pow(value(z),n-1)) NaNMath.pow(z::Number, w::Dual) = Dual(NaNMath.pow(z,value(w)), epsilon(w)*NaNMath.pow(z,value(w))*log(z)) # force use of NaNMath functions in derivative calculations function to_nanmath(x::Expr) if x.head == :call funsym = Expr(:.,:NaNMath,Base.Meta.quot(x.args[1])) return Expr(:call,funsym,[to_nanmath(z) for z in x.args[2:end]]...) else return Expr(:call,[to_nanmath(z) for z in x.args]...) end end to_nanmath(x) = x for (funsym, exp) in Calculus.symbolic_derivatives_1arg() funsym == :exp && continue funsym == :abs2 && continue @eval function $(funsym)(z::Dual) x = value(z) xp = epsilon(z) Dual($(funsym)(x),xp*$exp) end # extend corresponding NaNMath methods if funsym in (:sin, :cos, :tan, :asin, :acos, :acosh, :atanh, :log, :log2, :log10, :lgamma, :log1p) funsym = Expr(:.,:NaNMath,Base.Meta.quot(funsym)) @eval function $(funsym)(z::Dual) x = value(z) xp = epsilon(z) Dual($(funsym)(x),xp*$(to_nanmath(exp))) end end end # only need to compute exp/cis once exp(z::Dual) = (expval = exp(value(z)); Dual(expval, epsilon(z)*expval)) cis(z::Dual) = (cisval = cis(value(z)); Dual(cisval, im*epsilon(z)*cisval)) ## TODO: should be generated in Calculus sinpi(z::Dual) = Dual(sinpi(value(z)),epsilon(z)*cospi(value(z))*π) cospi(z::Dual) = Dual(cospi(value(z)),-epsilon(z)*sinpi(value(z))*π)
[ 4906, 26011, 797, 7293, 4479, 90, 15633, 11, 5377, 11141, 92, 198, 198, 8608, 18187, 20446, 90, 51, 27, 25, 3041, 7293, 92, 1279, 25, 7913, 198, 220, 220, 220, 1988, 3712, 51, 198, 220, 220, 220, 304, 862, 33576, 3712, 51, 198, 437, 198, 36248, 90, 50, 27, 25, 3041, 7293, 11, 51, 27, 25, 3041, 7293, 92, 7, 87, 3712, 50, 11, 331, 3712, 51, 8, 796, 20446, 7, 16963, 1258, 7, 87, 11, 88, 8, 23029, 198, 36248, 7, 87, 3712, 3041, 7293, 8, 796, 20446, 7, 87, 11, 6632, 7, 87, 4008, 198, 198, 9979, 220, 133, 249, 796, 20446, 7, 9562, 11, 2081, 8, 198, 9979, 545, 133, 249, 796, 20446, 7, 5377, 11141, 7, 9562, 11, 3991, 828, 19157, 7, 9562, 11, 2081, 4008, 198, 198, 4906, 26011, 20446, 12762, 20446, 90, 43879, 2414, 92, 198, 4906, 26011, 20446, 2414, 220, 20446, 90, 43879, 2624, 92, 198, 4906, 26011, 20446, 2624, 220, 20446, 90, 43879, 1433, 92, 198, 4906, 26011, 20446, 5377, 11141, 11645, 20446, 90, 5377, 11141, 12762, 92, 198, 4906, 26011, 20446, 5377, 11141, 12762, 20446, 90, 5377, 11141, 2414, 92, 198, 4906, 26011, 20446, 5377, 11141, 2414, 220, 20446, 90, 5377, 11141, 2624, 92, 198, 198, 1102, 1851, 90, 51, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 1976, 3712, 36248, 90, 51, 30072, 796, 1976, 198, 1102, 1851, 90, 51, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 1976, 3712, 36248, 8, 796, 20446, 90, 51, 92, 7, 1102, 1851, 7, 51, 11, 1988, 7, 89, 36911, 10385, 7, 51, 11, 304, 862, 33576, 7, 89, 22305, 198, 1102, 1851, 90, 51, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 2124, 3712, 15057, 8, 796, 20446, 90, 51, 92, 7, 1102, 1851, 7, 51, 11, 2124, 828, 10385, 7, 51, 11, 657, 4008, 198, 1102, 1851, 90, 51, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 51, 5512, 1976, 3712, 36248, 8, 796, 357, 538, 18217, 261, 7, 89, 8, 855, 15, 5633, 10385, 7, 51, 11, 1988, 7, 89, 4008, 1058, 3714, 7, 40, 12413, 529, 12331, 3419, 4008, 198, 198, 16963, 1258, 62, 25135, 90, 51, 27, 25, 3041, 7293, 11, 311, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 7904, 6030, 90, 36248, 90, 50, 11709, 8, 796, 20446, 90, 16963, 1258, 62, 4906, 7, 51, 11, 311, 38165, 198, 16963, 1258, 62, 25135, 90, 51, 27, 25, 3041, 7293, 11, 311, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 7904, 6030, 90, 50, 30072, 796, 20446, 90, 16963, 1258, 62, 4906, 7, 51, 11, 311, 38165, 198, 16963, 1258, 62, 25135, 90, 51, 27, 25, 3041, 7293, 92, 7, 3712, 6030, 90, 36248, 90, 51, 92, 5512, 7904, 6030, 90, 51, 30072, 796, 20446, 90, 51, 92, 198, 198, 86, 14029, 90, 51, 92, 7, 3712, 6030, 90, 36248, 90, 51, 11709, 8, 796, 20446, 90, 86, 14029, 7, 51, 38165, 198, 198, 8367, 7, 89, 3712, 36248, 8, 796, 1976, 13, 8367, 198, 538, 18217, 261, 7, 89, 3712, 36248, 8, 796, 1976, 13, 538, 18217, 261, 198, 198, 646, 282, 7, 87, 3712, 3041, 7293, 11, 331, 3712, 3041, 7293, 8, 796, 20446, 7, 87, 11, 331, 8, 198, 646, 282, 7, 87, 3712, 3041, 7293, 8, 796, 20446, 7, 87, 8, 198, 646, 282, 7, 89, 3712, 36248, 8, 796, 1976, 198, 198, 40073, 13, 31, 10378, 62, 31364, 1096, 62, 16, 853, 797, 7293, 10668, 198, 40073, 13, 31, 10378, 62, 31364, 1096, 62, 17, 853, 797, 7293, 10668, 198, 40073, 13, 31, 10378, 62, 31364, 1096, 62, 16, 853, 20446, 10668, 198, 40073, 13, 31, 10378, 62, 31364, 1096, 62, 16, 853, 20446, 1988, 198, 40073, 13, 31, 10378, 62, 31364, 1096, 62, 16, 853, 20446, 304, 862, 33576, 198, 198, 9979, 1103, 3911, 796, 1988, 198, 9979, 10668, 3911, 796, 304, 862, 33576, 198, 198, 271, 12647, 7, 89, 3712, 36248, 8, 796, 2125, 272, 7, 8367, 7, 89, 4008, 198, 271, 10745, 7, 89, 3712, 36248, 8, 796, 318, 10745, 7, 8367, 7, 89, 4008, 198, 4468, 9504, 7, 89, 3712, 36248, 8, 796, 318, 69, 9504, 7, 8367, 7, 89, 4008, 198, 271, 646, 282, 7, 87, 3712, 36248, 8, 796, 2081, 198, 271, 646, 282, 7, 87, 3712, 15057, 8, 796, 3991, 198, 25386, 7, 89, 3712, 36248, 8, 796, 304, 862, 7, 8367, 7, 89, 4008, 198, 25386, 90, 51, 92, 7, 3712, 6030, 90, 36248, 90, 51, 11709, 8, 796, 304, 862, 7, 51, 8, 198, 198, 8818, 10668, 62, 12860, 90, 51, 27, 25, 15633, 92, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 90, 51, 5512, 16001, 3712, 33, 970, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 1988, 7, 89, 828, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 611, 2125, 272, 7, 87, 8, 8614, 318, 69, 9504, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16001, 5633, 905, 5589, 529, 7, 952, 11, 87, 8, 1058, 905, 7, 952, 11, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1051, 2545, 7, 88, 8, 855, 16, 11405, 5145, 271, 12647, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 796, 532, 88, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 16001, 5633, 366, 21215, 1058, 366, 532, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 16001, 5633, 43825, 1, 1058, 366, 1343, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 16001, 5633, 905, 5589, 529, 7, 952, 11, 331, 8, 1058, 905, 7, 952, 11, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 22355, 7, 952, 11, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 36248, 90, 1600, 51, 553, 92, 7, 1600, 2124, 11, 366, 553, 11, 331, 11, 366, 8, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 10668, 62, 12860, 90, 51, 27, 25, 5377, 11141, 92, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 90, 51, 5512, 16001, 3712, 33, 970, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 1988, 7, 89, 828, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 2124, 81, 11, 2124, 72, 796, 21123, 7, 87, 8, 198, 220, 220, 220, 42635, 11, 331, 72, 796, 21123, 7, 88, 8, 198, 220, 220, 220, 611, 2125, 272, 7, 87, 8, 8614, 318, 69, 9504, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16001, 5633, 905, 5589, 529, 7, 952, 11, 87, 8, 1058, 905, 7, 952, 11, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1051, 2545, 7, 2417, 8, 855, 16, 11405, 5145, 271, 12647, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42635, 796, 532, 2417, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 532, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 1343, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 16001, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1051, 2545, 7, 48111, 8, 855, 16, 11405, 5145, 271, 12647, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 72, 796, 532, 48111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 5589, 529, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 22355, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 12, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 5589, 529, 7, 952, 11, 331, 72, 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, 905, 5589, 529, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 10, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 5589, 529, 7, 952, 11, 331, 72, 8, 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, 611, 1051, 2545, 7, 48111, 8, 855, 16, 11405, 5145, 271, 12647, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 72, 796, 532, 48111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 22355, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 532, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 7, 952, 11, 331, 72, 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, 905, 7, 952, 11, 42635, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 1343, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 905, 7, 952, 11, 331, 72, 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, 3601, 22355, 7, 952, 11, 331, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 320, 133, 249, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 36248, 90, 1600, 51, 553, 92, 7, 1600, 2124, 11, 366, 553, 11, 331, 11, 366, 8, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 10668, 62, 12860, 90, 51, 27, 25, 33, 970, 92, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 90, 51, 5512, 16001, 3712, 33, 970, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 1988, 7, 89, 828, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 611, 5145, 8367, 7, 89, 8, 11405, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 36248, 90, 1600, 51, 553, 92, 7, 1600, 2124, 11, 366, 553, 11, 331, 11, 366, 8, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 10668, 62, 12860, 90, 51, 27, 25, 33, 970, 92, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 90, 5377, 11141, 90, 51, 92, 5512, 16001, 3712, 33, 970, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 1988, 7, 89, 828, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 2124, 81, 11, 2124, 72, 796, 21123, 7, 87, 8, 198, 220, 220, 220, 42635, 11, 331, 72, 796, 21123, 7, 88, 8, 198, 220, 220, 220, 611, 5145, 87, 81, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2124, 72, 9, 0, 2417, 9, 0, 48111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 320, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 5145, 29992, 9, 2417, 9, 0, 48111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 133, 249, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 5145, 29992, 9, 0, 2417, 9, 48111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 320, 133, 249, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 36248, 90, 1600, 51, 553, 92, 7, 1600, 2124, 11, 366, 553, 11, 331, 11, 366, 8, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 3601, 22355, 7, 952, 3712, 9399, 11, 2124, 3712, 15633, 8, 198, 220, 220, 220, 611, 5145, 7, 9160, 7, 87, 11, 46541, 8, 8614, 318, 64, 7, 87, 11, 49, 864, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 318, 64, 7, 87, 11, 23839, 43879, 8, 11405, 318, 69, 9504, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 366, 9, 4943, 198, 220, 220, 220, 886, 198, 437, 198, 198, 12860, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 8, 796, 10668, 62, 12860, 7, 952, 11, 1976, 11, 3991, 8, 198, 12860, 5589, 529, 7, 952, 3712, 9399, 11, 1976, 3712, 36248, 8, 796, 10668, 62, 12860, 7, 952, 11, 1976, 11, 2081, 8, 198, 198, 8818, 1100, 90, 51, 27, 25, 3041, 7293, 92, 7, 82, 3712, 9399, 11, 7904, 6030, 90, 36248, 90, 51, 11709, 8, 198, 220, 220, 220, 2124, 796, 1100, 7, 82, 11, 309, 8, 198, 220, 220, 220, 331, 796, 1100, 7, 82, 11, 309, 8, 198, 220, 220, 220, 20446, 90, 51, 92, 7, 87, 11, 331, 8, 198, 437, 198, 8818, 3551, 7, 82, 3712, 9399, 11, 1976, 3712, 36248, 8, 198, 220, 220, 220, 3551, 7, 82, 11, 1988, 7, 89, 4008, 198, 220, 220, 220, 3551, 7, 82, 11, 304, 862, 33576, 7, 89, 4008, 198, 437, 628, 198, 2235, 42044, 5499, 286, 10668, 3146, 22492, 198, 198, 1102, 1851, 7, 3712, 6030, 90, 36248, 5512, 1976, 3712, 36248, 8, 796, 1976, 198, 1102, 1851, 7, 3712, 6030, 90, 36248, 5512, 2124, 3712, 15057, 8, 796, 20446, 7, 87, 8, 198, 198, 855, 7, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 1988, 7, 89, 8, 6624, 1988, 7, 86, 8, 198, 855, 7, 89, 3712, 36248, 11, 2124, 3712, 15057, 8, 796, 1988, 7, 89, 8, 6624, 2124, 198, 855, 7, 87, 3712, 15057, 11, 1976, 3712, 36248, 8, 796, 1988, 7, 89, 8, 6624, 2124, 198, 198, 786, 13255, 7, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 318, 40496, 7, 8367, 7, 89, 828, 8367, 7, 86, 4008, 11405, 318, 40496, 7, 538, 18217, 261, 7, 89, 828, 304, 862, 33576, 7, 86, 4008, 198, 786, 13255, 7, 89, 3712, 36248, 11, 2124, 3712, 15057, 8, 796, 318, 40496, 7, 8367, 7, 89, 828, 2124, 8, 11405, 318, 40496, 7, 538, 18217, 261, 7, 89, 828, 6632, 7, 87, 4008, 198, 786, 13255, 7, 87, 3712, 15057, 11, 1976, 3712, 36248, 8, 796, 318, 40496, 7, 89, 11, 2124, 8, 198, 198, 271, 1203, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 51, 5512, 86, 3712, 36248, 90, 51, 30072, 796, 1988, 7, 89, 8, 1279, 1988, 7, 86, 8, 198, 271, 1203, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 15633, 11, 86, 3712, 36248, 90, 51, 30072, 796, 1976, 1279, 1988, 7, 86, 8, 198, 271, 1203, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 51, 5512, 86, 3712, 15633, 8, 796, 1988, 7, 89, 8, 1279, 266, 198, 198, 17831, 7, 89, 3712, 36248, 8, 796, 357, 87, 796, 12234, 7, 8367, 7, 89, 18125, 304, 862, 33576, 7, 89, 8, 855, 15, 5633, 2124, 1058, 1643, 19816, 7, 87, 11, 17831, 7, 538, 18217, 261, 7, 89, 35514, 198, 198, 22468, 90, 51, 27, 25, 23839, 43879, 92, 7, 89, 3712, 38176, 90, 36248, 90, 51, 5512, 36248, 90, 5377, 11141, 90, 51, 11709, 30072, 28, 89, 198, 41887, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 5377, 11141, 90, 51, 11709, 47505, 89, 198, 198, 28300, 90, 51, 27, 25, 15633, 92, 7, 3712, 6030, 90, 51, 5512, 1976, 3712, 36248, 8, 796, 4314, 7, 51, 11, 1988, 7, 89, 4008, 198, 344, 346, 90, 309, 27, 25, 15633, 92, 7, 3712, 6030, 90, 51, 5512, 1976, 3712, 36248, 8, 796, 2906, 346, 7, 309, 11, 1988, 7, 89, 4008, 198, 2213, 19524, 90, 51, 27, 25, 15633, 92, 7, 3712, 6030, 90, 51, 5512, 1976, 3712, 36248, 8, 796, 40122, 7, 51, 11, 1988, 7, 89, 4008, 198, 744, 90, 51, 27, 25, 15633, 92, 7, 3712, 6030, 90, 51, 5512, 1976, 3712, 36248, 8, 796, 2835, 7, 51, 11, 1988, 7, 89, 4008, 198, 198, 1640, 1034, 287, 357, 25, 5305, 11, 25, 48466, 11, 25, 1102, 73, 11, 25, 22468, 11, 25, 41887, 8, 198, 220, 220, 220, 2488, 18206, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 720, 404, 7, 89, 3712, 36248, 8, 796, 20446, 16763, 404, 7, 8367, 7, 89, 36911, 3, 404, 7, 538, 18217, 261, 7, 89, 22305, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8937, 7, 89, 3712, 36248, 8, 796, 19862, 17034, 7, 8937, 17, 7, 89, 4008, 198, 8937, 17, 7, 89, 3712, 36248, 8, 796, 1103, 7, 1102, 73, 7, 89, 27493, 89, 8, 198, 198, 5305, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 51, 30072, 796, 1976, 198, 8937, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 51, 30072, 796, 1976, 26870, 657, 5633, 1976, 1058, 532, 89, 198, 198, 9248, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 51, 30072, 796, 1976, 26870, 657, 5633, 6632, 7, 89, 8, 1058, 530, 7, 89, 27493, 46582, 198, 9248, 90, 51, 27, 25, 15633, 92, 7, 89, 3712, 36248, 90, 5377, 11141, 90, 51, 11709, 8, 796, 1976, 6624, 657, 5633, 357, 48466, 7, 538, 18217, 261, 7, 89, 4008, 6624, 657, 5633, 20446, 7, 22570, 7, 51, 828, 22570, 7, 51, 4008, 1058, 20446, 7, 22570, 7, 51, 828, 1102, 1851, 7, 51, 11, 4806, 22305, 1058, 1103, 7, 6404, 7, 12683, 7, 89, 4008, 14, 320, 8, 198, 198, 2, 37139, 291, 17336, 198, 1102, 73, 646, 282, 7, 89, 3712, 36248, 8, 796, 20446, 7, 8367, 7, 89, 828, 12, 538, 18217, 261, 7, 89, 4008, 198, 8937, 646, 282, 7, 89, 3712, 36248, 8, 796, 2352, 7, 8367, 7, 89, 4008, 198, 8937, 17, 646, 282, 7, 89, 3712, 36248, 8, 796, 2352, 17, 7, 8367, 7, 89, 4008, 198, 198, 2, 37139, 198, 198, 33747, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 20446, 7, 8367, 7, 89, 47762, 8367, 7, 86, 828, 304, 862, 33576, 7, 89, 47762, 538, 18217, 261, 7, 86, 4008, 198, 33747, 89, 3712, 15057, 11, 266, 3712, 36248, 8, 796, 20446, 7, 89, 10, 8367, 7, 86, 828, 304, 862, 33576, 7, 86, 4008, 198, 33747, 89, 3712, 36248, 11, 266, 3712, 15057, 8, 796, 20446, 7, 8367, 7, 89, 47762, 86, 11, 304, 862, 33576, 7, 89, 4008, 198, 198, 30420, 89, 3712, 36248, 8, 796, 20446, 32590, 8367, 7, 89, 828, 532, 538, 18217, 261, 7, 89, 4008, 198, 30420, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 20446, 7, 8367, 7, 89, 13219, 8367, 7, 86, 828, 304, 862, 33576, 7, 89, 13219, 538, 18217, 261, 7, 86, 4008, 198, 30420, 89, 3712, 15057, 11, 266, 3712, 36248, 8, 796, 20446, 7, 89, 12, 8367, 7, 86, 828, 532, 538, 18217, 261, 7, 86, 4008, 198, 30420, 89, 3712, 36248, 11, 266, 3712, 15057, 8, 796, 20446, 7, 8367, 7, 89, 13219, 86, 11, 304, 862, 33576, 7, 89, 4008, 198, 198, 2, 3368, 27102, 6770, 351, 347, 970, 9, 15057, 198, 9, 7, 87, 3712, 33, 970, 11, 1976, 3712, 36248, 8, 796, 611, 17772, 7, 87, 11, 1976, 11, 611, 17772, 7, 12683, 2545, 7, 5305, 7, 8367, 7, 89, 22305, 855, 15, 11, 6632, 7, 89, 828, 532, 22570, 7, 89, 22305, 198, 9, 7, 87, 3712, 36248, 11, 1976, 3712, 33, 970, 8, 796, 1976, 9, 87, 198, 198, 9, 7, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 20446, 7, 8367, 7, 89, 27493, 8367, 7, 86, 828, 304, 862, 33576, 7, 89, 27493, 8367, 7, 86, 47762, 8367, 7, 89, 27493, 538, 18217, 261, 7, 86, 4008, 198, 9, 7, 87, 3712, 15057, 11, 1976, 3712, 36248, 8, 796, 20446, 7, 87, 9, 8367, 7, 89, 828, 2124, 9, 538, 18217, 261, 7, 89, 4008, 198, 9, 7, 89, 3712, 36248, 11, 2124, 3712, 15057, 8, 796, 20446, 7, 87, 9, 8367, 7, 89, 828, 2124, 9, 538, 18217, 261, 7, 89, 4008, 198, 198, 29006, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 796, 20446, 7, 8367, 7, 89, 20679, 8367, 7, 86, 828, 357, 538, 18217, 261, 7, 89, 27493, 8367, 7, 86, 13219, 8367, 7, 89, 27493, 538, 18217, 261, 7, 86, 4008, 29006, 8367, 7, 86, 27493, 8367, 7, 86, 22305, 198, 29006, 89, 3712, 15057, 11, 266, 3712, 36248, 8, 796, 20446, 7, 89, 14, 8367, 7, 86, 828, 532, 89, 9, 538, 18217, 261, 7, 86, 20679, 8367, 7, 86, 8, 61, 17, 8, 198, 29006, 89, 3712, 36248, 11, 2124, 3712, 15057, 8, 796, 20446, 7, 8367, 7, 89, 20679, 87, 11, 304, 862, 33576, 7, 89, 20679, 87, 8, 198, 198, 1640, 277, 287, 685, 25, 61, 11, 36147, 26705, 32755, 776, 13, 79, 322, 15437, 198, 220, 220, 220, 2488, 18206, 2163, 7198, 69, 5769, 89, 3712, 36248, 11, 266, 3712, 36248, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 304, 862, 33576, 7, 86, 8, 6624, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 720, 69, 7, 89, 11, 8367, 7, 86, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 720, 69, 7, 8367, 7, 89, 828, 8367, 7, 86, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 7043, 796, 198, 220, 220, 220, 220, 220, 220, 220, 304, 862, 33576, 7, 89, 27493, 8367, 7, 86, 27493, 7, 16763, 69, 5769, 8367, 7, 89, 828, 8367, 7, 86, 13219, 16, 4008, 10, 538, 18217, 261, 7, 86, 27493, 16763, 69, 5769, 8367, 7, 89, 828, 8367, 7, 86, 4008, 9, 6404, 7, 8367, 7, 89, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 20446, 7, 2100, 11, 7043, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 4666, 7, 89, 3712, 36248, 11, 299, 3712, 15057, 8, 796, 20446, 7, 4666, 7, 8367, 7, 89, 828, 299, 828, 304, 862, 33576, 7, 89, 4008, 198, 198, 2, 777, 734, 17336, 389, 2622, 284, 4259, 33985, 14601, 198, 61, 7, 89, 3712, 36248, 11, 299, 3712, 46541, 8, 796, 20446, 7, 8367, 7, 89, 8, 61, 77, 11, 304, 862, 33576, 7, 89, 27493, 77, 9, 8367, 7, 89, 8, 61, 7, 77, 12, 16, 4008, 198, 61, 7, 89, 3712, 36248, 11, 299, 3712, 49, 864, 8, 796, 20446, 7, 8367, 7, 89, 8, 61, 77, 11, 304, 862, 33576, 7, 89, 27493, 77, 9, 8367, 7, 89, 8, 61, 7, 77, 12, 16, 4008, 198, 198, 61, 7, 89, 3712, 36248, 11, 299, 3712, 15057, 8, 796, 20446, 7, 8367, 7, 89, 8, 61, 77, 11, 304, 862, 33576, 7, 89, 27493, 77, 9, 8367, 7, 89, 8, 61, 7, 77, 12, 16, 4008, 198, 26705, 32755, 776, 13, 79, 322, 7, 89, 3712, 36248, 11, 299, 3712, 15057, 8, 796, 20446, 7, 26705, 32755, 776, 13, 79, 322, 7, 8367, 7, 89, 828, 77, 828, 304, 862, 33576, 7, 89, 27493, 77, 9, 26705, 32755, 776, 13, 79, 322, 7, 8367, 7, 89, 828, 77, 12, 16, 4008, 198, 26705, 32755, 776, 13, 79, 322, 7, 89, 3712, 15057, 11, 266, 3712, 36248, 8, 796, 20446, 7, 26705, 32755, 776, 13, 79, 322, 7, 89, 11, 8367, 7, 86, 36911, 304, 862, 33576, 7, 86, 27493, 26705, 32755, 776, 13, 79, 322, 7, 89, 11, 8367, 7, 86, 4008, 9, 6404, 7, 89, 4008, 198, 198, 2, 2700, 779, 286, 11013, 32755, 776, 5499, 287, 27255, 16765, 198, 8818, 284, 62, 12647, 11018, 7, 87, 3712, 3109, 1050, 8, 198, 220, 220, 220, 611, 2124, 13, 2256, 6624, 1058, 13345, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 37047, 796, 1475, 1050, 7, 25, 1539, 25, 26705, 32755, 776, 11, 14881, 13, 48526, 13, 421, 313, 7, 87, 13, 22046, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1475, 1050, 7, 25, 13345, 11, 12543, 37047, 17414, 1462, 62, 12647, 11018, 7, 89, 8, 329, 1976, 287, 2124, 13, 22046, 58, 17, 25, 437, 11907, 23029, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1475, 1050, 7, 25, 13345, 17414, 1462, 62, 12647, 11018, 7, 89, 8, 329, 1976, 287, 2124, 13, 22046, 60, 23029, 198, 220, 220, 220, 886, 198, 437, 198, 1462, 62, 12647, 11018, 7, 87, 8, 796, 2124, 198, 198, 1640, 357, 12543, 37047, 11, 1033, 8, 287, 2199, 17576, 13, 1837, 2022, 4160, 62, 1082, 452, 2929, 62, 16, 853, 3419, 198, 220, 220, 220, 1257, 37047, 6624, 1058, 11201, 11405, 2555, 198, 220, 220, 220, 1257, 37047, 6624, 1058, 8937, 17, 11405, 2555, 198, 220, 220, 220, 2488, 18206, 2163, 29568, 12543, 37047, 5769, 89, 3712, 36248, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 1988, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20446, 16763, 7, 12543, 37047, 5769, 87, 828, 42372, 9, 3, 11201, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 9117, 11188, 11013, 32755, 776, 5050, 198, 220, 220, 220, 611, 1257, 37047, 287, 357, 25, 31369, 11, 1058, 6966, 11, 1058, 38006, 11, 1058, 47337, 11, 1058, 330, 418, 11, 1058, 330, 3768, 11, 1058, 39036, 71, 11, 1058, 6404, 11, 1058, 6404, 17, 11, 1058, 6404, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 75, 28483, 2611, 11, 1058, 6404, 16, 79, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1257, 37047, 796, 1475, 1050, 7, 25, 1539, 25, 26705, 32755, 776, 11, 14881, 13, 48526, 13, 421, 313, 7, 12543, 37047, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18206, 2163, 29568, 12543, 37047, 5769, 89, 3712, 36248, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 1988, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 304, 862, 33576, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20446, 16763, 7, 12543, 37047, 5769, 87, 828, 42372, 9, 3, 7, 1462, 62, 12647, 11018, 7, 11201, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 691, 761, 284, 24061, 1033, 14, 66, 271, 1752, 198, 11201, 7, 89, 3712, 36248, 8, 796, 357, 11201, 2100, 796, 1033, 7, 8367, 7, 89, 18125, 20446, 7, 11201, 2100, 11, 304, 862, 33576, 7, 89, 27493, 11201, 2100, 4008, 198, 66, 271, 7, 89, 3712, 36248, 8, 796, 357, 66, 271, 2100, 796, 33325, 7, 8367, 7, 89, 18125, 20446, 7, 66, 271, 2100, 11, 545, 9, 538, 18217, 261, 7, 89, 27493, 66, 271, 2100, 4008, 198, 198, 2235, 16926, 46, 25, 815, 307, 7560, 287, 2199, 17576, 198, 31369, 14415, 7, 89, 3712, 36248, 8, 796, 20446, 7, 31369, 14415, 7, 8367, 7, 89, 36911, 538, 18217, 261, 7, 89, 27493, 66, 2117, 72, 7, 8367, 7, 89, 4008, 9, 46582, 8, 198, 66, 2117, 72, 7, 89, 3712, 36248, 8, 796, 20446, 7, 66, 2117, 72, 7, 8367, 7, 89, 36911, 12, 538, 18217, 261, 7, 89, 27493, 31369, 14415, 7, 8367, 7, 89, 4008, 9, 46582, 8, 198 ]
1.935233
4,879
using Plots using MCMCChain n_iter = 500 n_name = 3 n_chain = 2 val = randn(n_iter, n_name, n_chain) .+ [1, 2, 3]' val = hcat(val, rand(1:2, n_iter, 1, n_chain)) chn = Chains(val) # plotting singe plotting types ps_trace = plot(chn, :trace) ps_mean = plot(chn, :mean) ps_density = plot(chn, :density) ps_autocor = plot(chn, :autocor) #ps_contour = plot(chn, :contour) ps_hist = plot(chn, :histogram) ps_mixed = plot(chn, :mixeddensity) # plotting combinations ps_trace_mean = plot(chn, [:trace, :mean]) ps_mixed_auto = plot(chn, [:mixeddensity, :autocor])
[ 3500, 1345, 1747, 198, 3500, 13122, 9655, 35491, 198, 198, 77, 62, 2676, 796, 5323, 198, 77, 62, 3672, 796, 513, 198, 77, 62, 7983, 796, 362, 198, 198, 2100, 796, 43720, 77, 7, 77, 62, 2676, 11, 299, 62, 3672, 11, 299, 62, 7983, 8, 764, 10, 685, 16, 11, 362, 11, 513, 49946, 198, 2100, 796, 289, 9246, 7, 2100, 11, 43720, 7, 16, 25, 17, 11, 299, 62, 2676, 11, 352, 11, 299, 62, 7983, 4008, 198, 198, 1349, 796, 34950, 7, 2100, 8, 198, 198, 2, 29353, 1702, 68, 29353, 3858, 198, 862, 62, 40546, 796, 7110, 7, 1349, 11, 1058, 40546, 8, 198, 862, 62, 32604, 796, 7110, 7, 1349, 11, 1058, 32604, 8, 198, 862, 62, 43337, 796, 7110, 7, 1349, 11, 1058, 43337, 8, 198, 862, 62, 2306, 420, 273, 796, 7110, 7, 1349, 11, 1058, 2306, 420, 273, 8, 198, 2, 862, 62, 3642, 454, 796, 7110, 7, 1349, 11, 1058, 3642, 454, 8, 198, 862, 62, 10034, 796, 7110, 7, 1349, 11, 1058, 10034, 21857, 8, 198, 862, 62, 76, 2966, 796, 7110, 7, 1349, 11, 1058, 76, 2966, 43337, 8, 198, 198, 2, 29353, 17790, 198, 862, 62, 40546, 62, 32604, 796, 7110, 7, 1349, 11, 685, 25, 40546, 11, 1058, 32604, 12962, 198, 862, 62, 76, 2966, 62, 23736, 796, 7110, 7, 1349, 11, 685, 25, 76, 2966, 43337, 11, 1058, 2306, 420, 273, 12962, 198 ]
2.367089
237
using Test using TightlyBound using Suppressor #include("../includes_laguerre.jl") #include("../Ewald.jl") TESTDIR=TightlyBound.TESTDIR function loaddata(dirs; scf=true) tbc_list = [] dft_list = [] for t in dirs # println(t*"/qe.save") tfull = "$TESTDIR/"*t dft = TightlyBound.QE.loadXML(tfull*"/qe.save") tbc = [] tbc_scf = [] try if scf tbc_scf = TightlyBound.TB.read_tb_crys("projham_scf.xml.gz", directory=tfull) else tbc_scf = TightlyBound.TB.read_tb_crys("projham.xml.gz", directory=tfull) end catch tbc = TightlyBound.AtomicProj.projwfx_workf(dft, directory=tfull, writefile="projham.xml", skip_og=true, skip_proj=true, freeze=true, localized_factor = 0.15) if scf tbc_scf = TightlyBound.SCF.remove_scf_from_tbc(tbc) TightlyBound.TB.write_tb_crys(t*"/projham_scf.xml.gz", tbc_scf) else tbc_scf = tbc end end push!(dft_list, dft) push!(tbc_list, tbc_scf) end return tbc_list, dft_list end function test_force() @testset "testing force dimer" begin if true # @suppress begin ft = open("$TESTDIR/data_forces/fil_MgS_dimer", "r"); dirst = readlines(ft); close(ft); # println(dirst) # for scf = [false true] f_cart = zeros(2,3) f_cartFD = 0.0 for scf = [false, true] @suppress begin tbc_list, dft_list = loaddata(dirst, scf=scf); database_rec = TightlyBound.FitTB.do_fitting_recursive(tbc_list,dft_list = dft_list, fit_threebody=false, fit_threebody_onsite=false); x = 4; smearing = 0.01; #en, tbc_x, flag = scf_energy(tbc_list[x].crys, database = database_rec) #en, f_cart,stress = TightlyBound.Force_Stress.get_energy_force_stress(tbc_x, database_rec, smearing = smearing); en, f_cart,stress = TightlyBound.Force_Stress.get_energy_force_stress(tbc_list[x].crys, database_rec, smearing = smearing); enFD, f_cartFD = TightlyBound.Force_Stress.finite_diff(tbc_list[x].crys, database_rec,1, 3, smearing = smearing); end # println(scf, " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ", f_cartFD, " ", f_cart[1,3]) @test abs(f_cartFD - f_cart[1,3]) < 1e-3 # @test abs(f_cartFD - f_cart_fft[1,3]) < 1e-3 # println("SCF $scf TEST1 finite diff: ", f_cartFD , " autodiff: ", f_cart[1,3], " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") # println("TEST1 dft ref ", dft_list[x].forces[1,3]) end # x = 3; # smearing = 0.01; # en, f_cart,stress = Force_Stress.get_energy_force_stress(tbc_list[x].crys, database_rec, smearing = smearing); # enFD, f_cartFD = Force_Stress.finite_diff(tbc_list[x].crys, database_rec,1, 3, smearing = smearing); # @test abs(f_cartFD - f_cart[1,3]) < 1e-3 # println("TEST3 finite diff: ", f_cartFD , " autodiff: ", f_cart[1,3], " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") # println("TEST3 dft ref ", dft_list[x].forces[1,3]) end end end function test_stress() @testset "testing force znse" begin @suppress begin ft = open("$TESTDIR/data_forces/fil_MgS_znse", "r"); dirst = readlines(ft); close(ft); # println(dirst) tbc_list, dft_list = loaddata(dirst, scf=false); database = TightlyBound.FitTB.do_fitting(tbc_list, fit_threebody=false, fit_threebody_onsite=false, do_plot=false); # database = FitTB.do_fitting_recursive(tbc_list,dft_list = dft_list, fit_threebody=true, fit_threebody_onsite=false); x = 1; smearing = 0.01; en, f_cart, stress = TightlyBound.Force_Stress.get_energy_force_stress(tbc_list[x].crys, database, smearing = smearing); enFD, f_cartFD = TightlyBound.Force_Stress.finite_diff(tbc_list[x].crys, database,1, 3, smearing = smearing); # println("TEST force finite diff: ", f_cartFD , " autodiff: ", f_cart[1,3], " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") # println("TEST dft ref ", dft_list[x].forces[1,3]) @test abs(f_cartFD - f_cart[1,3]) < 1e-4 x=1 enFD, stressFD = TightlyBound.Force_Stress.finite_diff(tbc_list[x].crys, database,1, 1, stress_mode=true, smearing = smearing); # println("TEST stress11 finite diff: ", stressFD , " autodiff: ", stress[1,1], " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") # println("TEST dft ref ", dft_list[x].stress[1,1]) @test abs(stressFD - stress[1,1]) < 1e-5 x=1 enFD, stressFD = TightlyBound.Force_Stress.finite_diff(tbc_list[x].crys, database,1, 2, stress_mode=true, smearing = smearing); # println("TEST stress12 finite diff: ", stressFD , " autodiff: ", stress[1,2], " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") # println("TEST dft ref ", dft_list[x].stress[1,2]) @test abs(stressFD - stress[1,2]) < 1e-5 # println("done") end end end test_force() #println("sleep ") #sleep(3) test_stress()
[ 3500, 6208, 198, 3500, 44643, 306, 49646, 198, 3500, 8105, 44292, 198, 198, 2, 17256, 7203, 40720, 42813, 62, 75, 11433, 263, 260, 13, 20362, 4943, 198, 2, 17256, 7203, 40720, 36, 21667, 13, 20362, 4943, 198, 198, 51, 6465, 34720, 28, 51, 432, 306, 49646, 13, 51, 6465, 34720, 198, 198, 8818, 3440, 7890, 7, 15908, 82, 26, 629, 69, 28, 7942, 8, 198, 220, 220, 220, 256, 15630, 62, 4868, 220, 796, 17635, 198, 220, 220, 220, 288, 701, 62, 4868, 796, 17635, 628, 220, 220, 220, 329, 256, 287, 288, 17062, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 83, 9, 1, 14, 80, 68, 13, 21928, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 256, 12853, 796, 17971, 51, 6465, 34720, 30487, 9, 83, 198, 220, 220, 220, 220, 220, 220, 220, 288, 701, 796, 44643, 306, 49646, 13, 48, 36, 13, 2220, 55, 5805, 7, 83, 12853, 9, 1, 14, 80, 68, 13, 21928, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 62, 1416, 69, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 629, 69, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 62, 1416, 69, 796, 44643, 306, 49646, 13, 22737, 13, 961, 62, 83, 65, 62, 66, 19753, 7203, 1676, 73, 2763, 62, 1416, 69, 13, 19875, 13, 34586, 1600, 8619, 28, 83, 12853, 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, 256, 15630, 62, 1416, 69, 796, 44643, 306, 49646, 13, 22737, 13, 961, 62, 83, 65, 62, 66, 19753, 7203, 1676, 73, 2763, 13, 19875, 13, 34586, 1600, 8619, 28, 83, 12853, 8, 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, 256, 15630, 796, 44643, 306, 49646, 13, 2953, 10179, 2964, 73, 13, 1676, 73, 86, 21373, 62, 1818, 69, 7, 67, 701, 11, 8619, 28, 83, 12853, 11, 3551, 7753, 2625, 1676, 73, 2763, 13, 19875, 1600, 14267, 62, 519, 28, 7942, 11, 14267, 62, 1676, 73, 28, 7942, 11, 16611, 28, 7942, 11, 36618, 62, 31412, 796, 657, 13, 1314, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 629, 69, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 62, 1416, 69, 796, 44643, 306, 49646, 13, 6173, 37, 13, 28956, 62, 1416, 69, 62, 6738, 62, 83, 15630, 7, 83, 15630, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44643, 306, 49646, 13, 22737, 13, 13564, 62, 83, 65, 62, 66, 19753, 7, 83, 9, 1, 14, 1676, 73, 2763, 62, 1416, 69, 13, 19875, 13, 34586, 1600, 256, 15630, 62, 1416, 69, 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, 256, 15630, 62, 1416, 69, 796, 256, 15630, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 67, 701, 62, 4868, 11, 288, 701, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 83, 15630, 62, 4868, 11, 256, 15630, 62, 1416, 69, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 220, 220, 220, 220, 256, 15630, 62, 4868, 11, 288, 701, 62, 4868, 198, 437, 628, 198, 8818, 1332, 62, 3174, 3419, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2700, 5391, 263, 1, 2221, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2081, 198, 2, 220, 220, 220, 220, 220, 220, 220, 2488, 18608, 601, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10117, 796, 1280, 7203, 3, 51, 6465, 34720, 14, 7890, 62, 27087, 14, 10379, 62, 44, 70, 50, 62, 67, 22723, 1600, 366, 81, 15341, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 667, 796, 1100, 6615, 7, 701, 1776, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1969, 7, 701, 1776, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 67, 667, 8, 628, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 629, 69, 796, 685, 9562, 2081, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 26674, 796, 1976, 27498, 7, 17, 11, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 26674, 26009, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 629, 69, 796, 685, 9562, 11, 2081, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 18608, 601, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 62, 4868, 11, 288, 701, 62, 4868, 796, 3440, 7890, 7, 67, 667, 11, 629, 69, 28, 1416, 69, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6831, 62, 8344, 796, 44643, 306, 49646, 13, 31805, 22737, 13, 4598, 62, 32232, 62, 8344, 30753, 7, 83, 15630, 62, 4868, 11, 67, 701, 62, 4868, 796, 288, 701, 62, 4868, 11, 220, 4197, 62, 15542, 2618, 28, 9562, 11, 4197, 62, 15542, 2618, 62, 684, 578, 28, 9562, 1776, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 604, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 895, 6648, 796, 657, 13, 486, 26, 220, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 268, 11, 256, 15630, 62, 87, 11, 6056, 796, 629, 69, 62, 22554, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 796, 6831, 62, 8344, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 268, 11, 277, 62, 26674, 11, 41494, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 1136, 62, 22554, 62, 3174, 62, 41494, 7, 83, 15630, 62, 87, 11, 6831, 62, 8344, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 11, 277, 62, 26674, 11, 41494, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 1136, 62, 22554, 62, 3174, 62, 41494, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 62, 8344, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 26009, 11, 277, 62, 26674, 26009, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 69, 9504, 62, 26069, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 62, 8344, 11, 16, 11, 513, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 1416, 69, 11, 366, 2124, 24223, 24223, 24223, 24223, 12343, 87, 220, 33172, 277, 62, 26674, 26009, 11, 366, 220, 33172, 277, 62, 26674, 58, 16, 11, 18, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 69, 62, 26674, 26009, 532, 277, 62, 26674, 58, 16, 11, 18, 12962, 1279, 352, 68, 12, 18, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 69, 62, 26674, 26009, 532, 277, 62, 26674, 62, 487, 83, 58, 16, 11, 18, 12962, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 6173, 37, 720, 1416, 69, 43001, 16, 27454, 814, 25, 33172, 277, 62, 26674, 26009, 837, 366, 1960, 375, 733, 25, 220, 220, 33172, 277, 62, 26674, 58, 16, 11, 18, 4357, 366, 2124, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 12343, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 16, 288, 701, 1006, 33172, 288, 701, 62, 4868, 58, 87, 4083, 27087, 58, 16, 11, 18, 12962, 628, 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, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 513, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 895, 6648, 796, 657, 13, 486, 26, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 551, 11, 277, 62, 26674, 11, 41494, 796, 5221, 62, 1273, 601, 13, 1136, 62, 22554, 62, 3174, 62, 41494, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 62, 8344, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 551, 26009, 11, 277, 62, 26674, 26009, 796, 5221, 62, 1273, 601, 13, 69, 9504, 62, 26069, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 62, 8344, 11, 16, 11, 513, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 69, 62, 26674, 26009, 532, 277, 62, 26674, 58, 16, 11, 18, 12962, 1279, 352, 68, 12, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 18, 27454, 814, 25, 33172, 277, 62, 26674, 26009, 837, 366, 1960, 375, 733, 25, 220, 220, 33172, 277, 62, 26674, 58, 16, 11, 18, 4357, 366, 2124, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 12343, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 18, 288, 701, 1006, 33172, 288, 701, 62, 4868, 58, 87, 4083, 27087, 58, 16, 11, 18, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 1332, 62, 41494, 3419, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2700, 1976, 77, 325, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 18608, 601, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10117, 796, 1280, 7203, 3, 51, 6465, 34720, 14, 7890, 62, 27087, 14, 10379, 62, 44, 70, 50, 62, 47347, 325, 1600, 366, 81, 15341, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 667, 796, 1100, 6615, 7, 701, 1776, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1969, 7, 701, 1776, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 67, 667, 8, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15630, 62, 4868, 11, 288, 701, 62, 4868, 796, 3440, 7890, 7, 67, 667, 11, 629, 69, 28, 9562, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6831, 796, 44643, 306, 49646, 13, 31805, 22737, 13, 4598, 62, 32232, 7, 83, 15630, 62, 4868, 11, 4197, 62, 15542, 2618, 28, 9562, 11, 4197, 62, 15542, 2618, 62, 684, 578, 28, 9562, 11, 466, 62, 29487, 28, 9562, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 6831, 796, 25048, 22737, 13, 4598, 62, 32232, 62, 8344, 30753, 7, 83, 15630, 62, 4868, 11, 67, 701, 62, 4868, 796, 288, 701, 62, 4868, 11, 220, 4197, 62, 15542, 2618, 28, 7942, 11, 4197, 62, 15542, 2618, 62, 684, 578, 28, 9562, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 352, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 895, 6648, 796, 657, 13, 486, 26, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 11, 277, 62, 26674, 11, 5503, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 1136, 62, 22554, 62, 3174, 62, 41494, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 26009, 11, 277, 62, 26674, 26009, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 69, 9504, 62, 26069, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 11, 16, 11, 513, 11, 220, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 2700, 27454, 814, 25, 33172, 277, 62, 26674, 26009, 837, 366, 1960, 375, 733, 25, 220, 220, 33172, 277, 62, 26674, 58, 16, 11, 18, 4357, 366, 2124, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 12343, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 288, 701, 1006, 33172, 288, 701, 62, 4868, 58, 87, 4083, 27087, 58, 16, 11, 18, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 69, 62, 26674, 26009, 532, 277, 62, 26674, 58, 16, 11, 18, 12962, 1279, 352, 68, 12, 19, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 26009, 11, 5503, 26009, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 69, 9504, 62, 26069, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 11, 16, 11, 352, 11, 5503, 62, 14171, 28, 7942, 11, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 5503, 1157, 27454, 814, 25, 33172, 5503, 26009, 837, 366, 1960, 375, 733, 25, 220, 220, 33172, 5503, 58, 16, 11, 16, 4357, 366, 2124, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 12343, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 288, 701, 1006, 33172, 288, 701, 62, 4868, 58, 87, 4083, 41494, 58, 16, 11, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 41494, 26009, 532, 5503, 58, 16, 11, 16, 12962, 1279, 352, 68, 12, 20, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 551, 26009, 11, 5503, 26009, 796, 44643, 306, 49646, 13, 10292, 62, 1273, 601, 13, 69, 9504, 62, 26069, 7, 83, 15630, 62, 4868, 58, 87, 4083, 66, 19753, 11, 6831, 11, 16, 11, 362, 11, 5503, 62, 14171, 28, 7942, 11, 220, 895, 6648, 796, 895, 6648, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 5503, 1065, 27454, 814, 25, 33172, 5503, 26009, 837, 366, 1960, 375, 733, 25, 220, 220, 33172, 5503, 58, 16, 11, 17, 4357, 366, 2124, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 24223, 12343, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 51, 6465, 288, 701, 1006, 33172, 288, 701, 62, 4868, 58, 87, 4083, 41494, 58, 16, 11, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 7, 41494, 26009, 532, 5503, 58, 16, 11, 17, 12962, 1279, 352, 68, 12, 20, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 28060, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 628, 198, 9288, 62, 3174, 3419, 198, 198, 2, 35235, 7203, 42832, 366, 8, 198, 2, 42832, 7, 18, 8, 198, 198, 9288, 62, 41494, 3419, 198 ]
1.919845
3,094
struct Match rule::AbstractRule # the rhs pattern to instantiate pat_to_inst::Union{Nothing,Pattern} # the substitution sub::Sub # the id the matched the lhs id::EClassId end const MatchesBuf = Vector{Match} function cached_ids(g::EGraph, p::Pattern)# ::Vector{Int64} collect(keys(g.classes)) end # FIXME function cached_ids(g::EGraph, p::PatTerm) # println("pattern $p, $(p.head)") # println("all ids") # keys(g.classes) |> println # println("cached symbols") # cached = get(g.symcache, p.head, Set{Int64}()) # println("symbols where $(p.head) appears") # appears = Set{Int64}() # for (id, class) ∈ g.classes # for n ∈ class # if n.head == p.head # push!(appears, id) # end # end # end # # println(appears) # if !(cached == appears) # @show cached # @show appears # end collect(keys(g.classes)) # cached # get(g.symcache, p.head, []) end # function cached_ids(g::EGraph, p::PatLiteral) # get(g.symcache, p.val, []) # end function (r::SymbolicRule)(g::EGraph, id::EClassId) ematch(g, r.ematch_program, id) .|> sub -> Match(r, r.right, sub, id) end function (r::DynamicRule)(g::EGraph, id::EClassId) ematch(g, r.ematch_program, id) .|> sub -> Match(r, nothing, sub, id) end function (r::BidirRule)(g::EGraph, id::EClassId) vcat(ematch(g, r.ematch_program_l, id) .|> sub -> Match(r, r.right, sub, id), ematch(g, r.ematch_program_r, id) .|> sub -> Match(r, r.left, sub, id)) end macro maybethreaded(x, body) esc(quote if $x Threads.@threads $body else $body end end) end """ Returns an iterator of `Match`es. """ function eqsat_search!(egraph::EGraph, theory::Vector{<:AbstractRule}, scheduler::AbstractScheduler, report; threaded=false) match_groups = Vector{Match}[] function pmap(f, xs) # const propagation should be able to optimze one of the branch away if threaded # # try to divide the work evenly between threads without adding much overhead # chunks = Threads.nthreads() * 10 # basesize = max(length(xs) ÷ chunks, 1) # ThreadsX.mapi(f, xs; basesize=basesize) ThreadsX.map(f, xs) else map(f, xs) end end inequalities = filter(Base.Fix2(isa, UnequalRule), theory) # never skip contradiction checks append_time = TimerOutput() for rule ∈ inequalities @timeit report.to repr(rule) begin ids = cached_ids(egraph, rule.left) rule_matches = pmap(i -> rule(egraph, i), ids) @timeit append_time "appending matches" begin append!(match_groups, rule_matches) end end end other_rules = filter(theory) do rule !(rule isa UnequalRule) end for rule ∈ other_rules @timeit report.to repr(rule) begin # don't apply banned rules if !cansearch(scheduler, rule) # println("skipping banned rule $rule") continue end ids = cached_ids(egraph, rule.left) rule_matches = pmap(i -> rule(egraph, i), ids) n_matches = sum(length, rule_matches) can_yield = inform!(scheduler, rule, n_matches) if can_yield @timeit append_time "appending matches" begin append!(match_groups, rule_matches) end end end end # @timeit append_time "appending matches" begin # result = reduce(vcat, match_groups) # this should be more efficient than multiple appends # end merge!(report.to, append_time, tree_point=["Search"]) return Iterators.flatten(match_groups) # return result end
[ 7249, 13225, 198, 220, 220, 220, 3896, 3712, 23839, 31929, 220, 198, 220, 220, 220, 1303, 262, 9529, 82, 3912, 284, 9113, 9386, 220, 198, 220, 220, 220, 1458, 62, 1462, 62, 8625, 3712, 38176, 90, 18465, 11, 47546, 92, 198, 220, 220, 220, 1303, 262, 32097, 198, 220, 220, 220, 850, 3712, 7004, 220, 198, 220, 220, 220, 1303, 262, 4686, 262, 14451, 262, 300, 11994, 220, 220, 198, 220, 220, 220, 4686, 3712, 36, 9487, 7390, 198, 437, 198, 198, 9979, 6550, 2052, 33, 3046, 796, 20650, 90, 23850, 92, 198, 198, 8818, 39986, 62, 2340, 7, 70, 3712, 7156, 1470, 11, 279, 3712, 47546, 8, 2, 7904, 38469, 90, 5317, 2414, 92, 198, 220, 220, 220, 2824, 7, 13083, 7, 70, 13, 37724, 4008, 198, 437, 198, 198, 2, 44855, 11682, 220, 198, 8818, 39986, 62, 2340, 7, 70, 3712, 7156, 1470, 11, 279, 3712, 12130, 40596, 8, 198, 220, 220, 220, 1303, 44872, 7203, 33279, 720, 79, 11, 29568, 79, 13, 2256, 8, 4943, 198, 220, 220, 220, 1303, 44872, 7203, 439, 220, 2340, 4943, 198, 220, 220, 220, 1303, 8251, 7, 70, 13, 37724, 8, 930, 29, 44872, 198, 220, 220, 220, 1303, 44872, 7203, 66, 2317, 14354, 4943, 198, 220, 220, 220, 1303, 39986, 796, 651, 7, 70, 13, 1837, 23209, 4891, 11, 279, 13, 2256, 11, 5345, 90, 5317, 2414, 92, 28955, 198, 220, 220, 220, 1303, 44872, 7203, 1837, 2022, 10220, 810, 29568, 79, 13, 2256, 8, 3568, 4943, 198, 220, 220, 220, 1303, 3568, 796, 5345, 90, 5317, 2414, 92, 3419, 220, 198, 220, 220, 220, 1303, 329, 357, 312, 11, 1398, 8, 18872, 230, 308, 13, 37724, 220, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 329, 299, 18872, 230, 1398, 220, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 611, 299, 13, 2256, 6624, 279, 13, 2256, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 1324, 4127, 11, 4686, 8, 220, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 886, 198, 220, 220, 220, 1303, 1303, 44872, 7, 1324, 4127, 8, 198, 220, 220, 220, 1303, 611, 5145, 7, 66, 2317, 6624, 3568, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2488, 12860, 39986, 220, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2488, 12860, 3568, 198, 220, 220, 220, 1303, 886, 628, 220, 220, 220, 2824, 7, 13083, 7, 70, 13, 37724, 4008, 198, 220, 220, 220, 1303, 39986, 198, 220, 220, 220, 1303, 651, 7, 70, 13, 1837, 23209, 4891, 11, 279, 13, 2256, 11, 685, 12962, 198, 437, 198, 198, 2, 2163, 39986, 62, 2340, 7, 70, 3712, 7156, 1470, 11, 279, 3712, 12130, 43, 270, 1691, 8, 198, 2, 220, 220, 220, 220, 651, 7, 70, 13, 1837, 23209, 4891, 11, 279, 13, 2100, 11, 685, 12962, 198, 2, 886, 198, 198, 8818, 357, 81, 3712, 13940, 2022, 4160, 31929, 5769, 70, 3712, 7156, 1470, 11, 4686, 3712, 36, 9487, 7390, 8, 198, 220, 220, 220, 795, 963, 7, 70, 11, 374, 13, 368, 963, 62, 23065, 11, 4686, 8, 764, 91, 29, 850, 4613, 13225, 7, 81, 11, 374, 13, 3506, 11, 850, 11, 4686, 8, 198, 437, 198, 198, 8818, 357, 81, 3712, 44090, 31929, 5769, 70, 3712, 7156, 1470, 11, 4686, 3712, 36, 9487, 7390, 8, 198, 220, 220, 220, 795, 963, 7, 70, 11, 374, 13, 368, 963, 62, 23065, 11, 4686, 8, 764, 91, 29, 850, 4613, 13225, 7, 81, 11, 2147, 11, 850, 11, 4686, 8, 198, 437, 198, 198, 8818, 357, 81, 3712, 33, 312, 343, 31929, 5769, 70, 3712, 7156, 1470, 11, 4686, 3712, 36, 9487, 7390, 8, 198, 220, 220, 220, 410, 9246, 7, 368, 963, 7, 70, 11, 374, 13, 368, 963, 62, 23065, 62, 75, 11, 4686, 8, 764, 91, 29, 850, 4613, 13225, 7, 81, 11, 374, 13, 3506, 11, 850, 11, 4686, 828, 198, 220, 220, 220, 220, 220, 220, 220, 795, 963, 7, 70, 11, 374, 13, 368, 963, 62, 23065, 62, 81, 11, 4686, 8, 764, 91, 29, 850, 4613, 13225, 7, 81, 11, 374, 13, 9464, 11, 850, 11, 4686, 4008, 198, 437, 628, 198, 20285, 305, 743, 65, 2788, 961, 276, 7, 87, 11, 1767, 8, 198, 220, 220, 220, 3671, 7, 22708, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 720, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14122, 82, 13, 31, 16663, 82, 720, 2618, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 2618, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 8, 198, 437, 198, 198, 37811, 198, 35561, 281, 41313, 286, 4600, 23850, 63, 274, 13, 198, 37811, 198, 8818, 37430, 49720, 62, 12947, 0, 7, 1533, 1470, 3712, 7156, 1470, 11, 4583, 3712, 38469, 90, 27, 25, 23839, 31929, 5512, 198, 220, 220, 220, 6038, 18173, 3712, 23839, 50, 1740, 18173, 11, 989, 26, 40945, 28, 9562, 8, 198, 220, 220, 220, 2872, 62, 24432, 796, 20650, 90, 23850, 92, 21737, 198, 220, 220, 220, 2163, 279, 8899, 7, 69, 11, 2124, 82, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1500, 43594, 815, 307, 1498, 284, 6436, 2736, 530, 286, 262, 8478, 1497, 198, 220, 220, 220, 220, 220, 220, 220, 611, 40945, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1303, 1949, 284, 14083, 262, 670, 21894, 1022, 14390, 1231, 4375, 881, 16965, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 22716, 796, 14122, 82, 13, 77, 16663, 82, 3419, 1635, 838, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12536, 1096, 796, 3509, 7, 13664, 7, 34223, 8, 6184, 115, 22716, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14122, 82, 55, 13, 8899, 72, 7, 69, 11, 2124, 82, 26, 12536, 1096, 28, 65, 1386, 1096, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14122, 82, 55, 13, 8899, 7, 69, 11, 2124, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3975, 7, 69, 11, 2124, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 45460, 796, 8106, 7, 14881, 13, 22743, 17, 7, 9160, 11, 471, 710, 13255, 31929, 828, 4583, 8, 198, 220, 220, 220, 1303, 1239, 14267, 25741, 8794, 198, 220, 220, 220, 24443, 62, 2435, 796, 5045, 263, 26410, 3419, 198, 220, 220, 220, 329, 3896, 18872, 230, 45460, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 2435, 270, 989, 13, 1462, 41575, 7, 25135, 8, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 796, 39986, 62, 2340, 7, 1533, 1470, 11, 3896, 13, 9464, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3896, 62, 6759, 2052, 796, 279, 8899, 7, 72, 4613, 3896, 7, 1533, 1470, 11, 1312, 828, 220, 2340, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 2435, 270, 24443, 62, 2435, 366, 1324, 1571, 7466, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 15699, 62, 24432, 11, 3896, 62, 6759, 2052, 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, 584, 62, 38785, 796, 8106, 7, 1169, 652, 8, 466, 3896, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 7, 25135, 318, 64, 471, 710, 13255, 31929, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 3896, 18872, 230, 584, 62, 38785, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 2435, 270, 989, 13, 1462, 41575, 7, 25135, 8, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 836, 470, 4174, 9301, 3173, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 5171, 12947, 7, 1416, 704, 18173, 11, 3896, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44872, 7203, 20545, 2105, 9301, 3896, 720, 25135, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 796, 39986, 62, 2340, 7, 1533, 1470, 11, 3896, 13, 9464, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3896, 62, 6759, 2052, 796, 279, 8899, 7, 72, 4613, 3896, 7, 1533, 1470, 11, 1312, 828, 220, 2340, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 62, 6759, 2052, 796, 2160, 7, 13664, 11, 3896, 62, 6759, 2052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 460, 62, 88, 1164, 796, 4175, 0, 7, 1416, 704, 18173, 11, 3896, 11, 299, 62, 6759, 2052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 460, 62, 88, 1164, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 2435, 270, 24443, 62, 2435, 366, 1324, 1571, 7466, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 15699, 62, 24432, 11, 3896, 62, 6759, 2052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 2488, 2435, 270, 24443, 62, 2435, 366, 1324, 1571, 7466, 1, 2221, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1255, 796, 4646, 7, 85, 9246, 11, 2872, 62, 24432, 8, 1303, 428, 815, 307, 517, 6942, 621, 3294, 598, 2412, 198, 220, 220, 220, 1303, 886, 198, 220, 220, 220, 20121, 0, 7, 13116, 13, 1462, 11, 24443, 62, 2435, 11, 5509, 62, 4122, 28, 14692, 18243, 8973, 8, 628, 220, 220, 220, 1441, 40806, 2024, 13, 2704, 41769, 7, 15699, 62, 24432, 8, 198, 220, 220, 220, 1303, 1441, 1255, 198, 437, 198, 220, 220, 220, 220 ]
2.135194
1,827
import Knet.Ops20: rnnforw using Knet.Ops20: RNN using Knet.KnetArrays: DevArray, KnetArray, Cptr using CUDA: CuArray, CUDNN, CU_NULL using AutoGrad: AutoGrad, @primitive1, value, recording, Param, Value "RNN descriptor" mutable struct RD; ptr; end "Dropout descriptor" mutable struct DD; ptr; states; end "Keeps an array of 3D tensor descriptors" mutable struct TDs; pvec::Vector{Cptr}; xDesc::Vector{TD}; end # Keep xDesc in TDs so it does not get gc'ed Base.unsafe_convert(::Type{Cptr}, dd::DD)=dd.ptr Base.unsafe_convert(::Type{Cptr}, rd::RD)=rd.ptr Base.unsafe_convert(::Type{Ptr{Cptr}}, tds::TDs)=pointer(tds.pvec) function DD(; atype, handle=CUDNN.handle(), dropout=0.0, seed=0, o...) if seed==0; seed=floor(Culonglong,time()); end d = Cptr[0]; s = Csize_t[0] # TODO: Can multiple RNNs share dropout descriptors? Can dropout probability be changed? CUDNN.cudnnCreateDropoutDescriptor(d) CUDNN.cudnnDropoutGetStatesSize(handle,s) states = rnnworkspace(s[1], atype) @cudnn_retry CUDNN.unsafe_cudnnSetDropoutDescriptor(d[1],handle,dropout,states,bytes(states),seed) dd = DD(d[1],states) finalizer(x->CUDNN.cudnnDestroyDropoutDescriptor(x.ptr),dd) return dd end function RD() d = Cptr[0] @cudnn_retry CUDNN.unsafe_cudnnCreateRNNDescriptor(d) rd = RD(d[1]) finalizer(x->CUDNN.cudnnDestroyRNNDescriptor(x.ptr),rd) return rd end function RD(hiddenSize,numLayers,dropoutDesc,inputMode,direction,mode,algo,dataType; handle=CUDNN.handle()) rnnDesc = RD() inputMode = CUDNN.cudnnRNNInputMode_t(inputMode) direction = CUDNN.cudnnDirectionMode_t(direction) mode = CUDNN.cudnnRNNMode_t(mode) algo = CUDNN.cudnnRNNAlgo_t(algo) dt = CUDNN.cudnnDataType_t(DT(dataType)) if CUDNN.version() < v"8" CUDNN.cudnnSetRNNDescriptor(handle,rnnDesc,hiddenSize,numLayers,dropoutDesc,inputMode,direction,mode,algo,dt) else CUDNN.cudnnSetRNNDescriptor_v6(handle,rnnDesc,hiddenSize,numLayers,dropoutDesc,inputMode,direction,mode,algo,dt) end return rnnDesc end Base.length(tds::TDs)=length(tds.pvec) function TDs(x::DevArray{A},::Nothing) where {A} # Treat x: (X,B?,T?) as a 4D array: (1,X,B,T) xDesc = TD(A,1,size(x,1),size(x,2)) # we can use a single xDesc pvec = Vector{Cptr}(undef, size(x,3)) pvec[:] .= xDesc.ptr return TDs(pvec, [xDesc]) end function TDs(x::DevArray{A},batchSizes) where {A} # x: (X,B*), batchSizes gives us Bt sizes @assert sum(batchSizes) == div(length(x),size(x,1)) X = size(x,1) xs = [ TD(A,1,X,B) for B in batchSizes ] ps = [ xd.ptr for xd in xs ] return TDs(ps,xs) end function TD3(a::DevArray) # Treat a as a 3D array, pad from right n = ndims(a) if n==3; TD(a) elseif n==2; TD(reshape(a, size(a,1), size(a,2), 1)) elseif n==1; TD(reshape(a, size(a,1), 1, 1)) else; throw(DimensionMismatch()) end end function FD3(a::DevArray) # Treat a as a 3D array, pad from left n = ndims(a) if n==3; FD(a) elseif n==2; FD(reshape(a, 1, size(a,1), size(a,2))) elseif n==1; FD(reshape(a, 1, 1, size(a,1))) else; throw(DimensionMismatch()) end end function rnnforw(r::RNN, w, x::Union{DevArray{T},Value{<:DevArray{T}}}, hx=nothing, cx=nothing; handle=CUDNN.handle(), batchSizes=nothing, hy = (hx != nothing), cy = (cx != nothing && r.mode == 2)) where T @assert value(w) === value(r.w) @assert size(x,1) == r.inputSize x3 = reshape(value(x), size(x,1), size(x,2), size(x,3)) @assert typeof(x3) == typeof(value(w)) "$(typeof(value(w))) weights do not match $(typeof(x)) input. Please use RNN(;atype) option." if r.rnnDesc === nothing # initialize rnn for gpu with first input r.dataType = eltype(x3) r.dropoutDesc = DD(handle=CUDNN.handle(),dropout=r.dropout,seed=r.seed,atype=typeof(x3)) r.rnnDesc = RD(r.hiddenSize,r.numLayers,r.dropoutDesc,r.inputMode,r.direction,r.mode,r.algo,r.dataType) end _rnnforw(w,x,hx,cx; rnn=r,handle=handle,batchSizes=batchSizes,hy=hy,cy=cy) end function _rnnforw(w, x, hx, cx; rnn, handle, batchSizes, hy, cy) # Input descriptors seqLength = batchSizes==nothing ? size(x,3) : length(batchSizes) # (X,B,T) or (X,B+) with batchSizes wDesc = FD3(w) # (1,1,W) xtds = TDs(x,batchSizes) # (1,X,Bt) x T isnothing(a) = a === nothing || a === C_NULL || a === CU_NULL if hx==nothing; hx=CU_NULL; hxDesc=C_NULL; else; hxDesc=TD3(hx); end # (H,B,L/2L) if cx==nothing || rnn.mode != 2; cx=CU_NULL; cxDesc=C_NULL; else; cxDesc=TD3(cx); end # Output arrays and descriptors ysize = collect(size(x)) ysize[1] = rnn.hiddenSize * (rnn.direction == 1 ? 2 : 1) y = similar(x, ysize...) # (H/2H,B,T) or (H/2H,B+) -- y mirrors x except for the first dimension ytds = TDs(y,batchSizes) # (1,H/2H,Bt) x T # Optionally output hidden and cell of last step hyout = cyout = CU_NULL hyDesc = cyDesc = C_NULL if hy || cy firstBatchSize = batchSizes==nothing ? size(x,2) : batchSizes[1] hsize = (Int(rnn.hiddenSize), Int(firstBatchSize), Int(rnn.numLayers * (rnn.direction == 1 ? 2 : 1))) # (H,B,L/2L) if hy; hyout=similar(y,hsize); hyDesc=TD3(hyout); end if cy && rnn.mode==2; cyout=similar(y,hsize); cyDesc=TD3(cyout); end if !isnothing(hx) && any(size(hx,i)!=hsize[i] for i=1:3) # compare one by one in case hx is 1-D or 2-D throw(DimensionMismatch("size(hx)=$(size(hx)) does not match hsize=$(hsize)")) end if !isnothing(cx) && rnn.mode == 2 && any(size(cx,i)!=hsize[i] for i=1:3) throw(DimensionMismatch("size(cx)=$(size(cx)) does not match hsize=$(hsize)")) end end # workSpace and reserveSpace wss = cudnnGetRNNWorkspaceSize(rnn.rnnDesc, xtds; handle=handle) ws = rnnworkspace(wss, typeof(value(w))) if AutoGrad.recording() rss = cudnnGetRNNTrainingReserveSize(rnn.rnnDesc, xtds; handle=handle) rs = rnnworkspace(rss, typeof(value(w))) @cudnn_retry CUDNN.unsafe_cudnnRNNForwardTraining(handle, rnn.rnnDesc, seqLength, xtds, x, hxDesc, hx, cxDesc, cx, wDesc, w, ytds, y, hyDesc, hyout, cyDesc, cyout, ws, wss, rs, rss) else rs = nothing @cudnn_retry CUDNN.unsafe_cudnnRNNForwardInference(handle, rnn.rnnDesc, seqLength, xtds, x, hxDesc, hx, cxDesc, cx, wDesc, w, ytds, y, hyDesc, hyout, cyDesc, cyout, ws, wss) end if hyout === CU_NULL; hyout = nothing; end if cyout === CU_NULL; cyout = nothing; end return y, hyout, cyout, rs, ws end function _rnnback(dt, t, w, x, hx, cx; rnn, o...) @assert value(rnn.w) === value(w) y,hy,cy,rs,ws = value(t) dy,dhy,dcy,drs,dws = value(dt) rnn=value(rnn); w=value(w); x=value(x); hx=value(hx); cx=value(cx) # To prevent dependencies to next iteration we need to clear the Result type from rnn.h,rnn.c # We can't do this during forward, because another forward may be run within the same iteration. # Doing it here is safe, means the iteration is done and we are taking gradients. # Note that this does not work on the cpu and these have to be cleaned by hand. # The cpu version is not a primitive and has no back function. (TODO: find better solution) rnn.h = value(rnn.h); rnn.c = value(rnn.c) _rnnback2(rnn, w, x, y, dy, hx, cx, dhy, dcy, rs, ws; o...) end function _rnnback2(r, w, x, y, dy, hx, cx, dhy, dcy, rs, ws; handle=CUDNN.handle(), batchSizes=nothing, o...) @assert value(r.w) === value(w) # Input descriptors: seqLength = batchSizes==nothing ? size(x,3) : length(batchSizes) # (X,B,T) or (X,B+) with batchSizes wDesc = FD3(w) # (1,1,W) xtds = TDs(x,batchSizes) # (X,B,T) -> (1,X,B) x T ytds = TDs(y,batchSizes) # (H/2H,B,T) -> (1,H/2H,B) x T # dytds = TDs(dy,batchSizes) # we use ytds for dytds if dy == nothing; dy=zero(y); end if hx == nothing; hx=CU_NULL; hxDesc=C_NULL; else; hxDesc=TD3(hx); end if cx == nothing || r.mode != 2; cx=CU_NULL; cxDesc=C_NULL; else; cxDesc=TD3(cx); end if dhy == nothing; dhy=CU_NULL; dhyDesc=C_NULL; else; dhyDesc=TD3(dhy); end if dcy == nothing || r.mode != 2; dcy=CU_NULL; dcyDesc=C_NULL; else; dcyDesc=TD3(dcy); end # Output arrays and descriptors: dx = similar(x) # (X,B,T) or (X,B+) with batchSizes # dxtds = TDs(dx,batchSizes) # we use xtds here dw = zero(w) # dw is used additively, so we need zero dwDesc = FD3(dw) if hx === CU_NULL; dhx=CU_NULL; dhxDesc=C_NULL; else; dhx=similar(hx); dhxDesc=TD3(dhx); end if cx === CU_NULL; dcx=CU_NULL; dcxDesc=C_NULL; else; dcx=similar(cx); dcxDesc=TD3(dcx); end # workSpace and reserveSpace # ws = cudnnWorkSpace() wss = bytes(ws) rss = bytes(rs) @cudnn_retry CUDNN.unsafe_cudnnRNNBackwardData(handle, r.rnnDesc, seqLength, ytds, y, ytds, dy, dhyDesc, dhy, dcyDesc, dcy, wDesc, w, hxDesc, hx, cxDesc, cx, xtds, dx, dhxDesc, dhx, dcxDesc, dcx, ws, wss, rs, rss) @cudnn_retry CUDNN.unsafe_cudnnRNNBackwardWeights(handle, r.rnnDesc, seqLength, xtds, x, hxDesc, hx, ytds, y, ws, wss, dwDesc, dw, rs, rss) # Update the cache if dhx===CU_NULL; dhx=nothing; end if dcx===CU_NULL; dcx=nothing; end r.dx, r.dhx, r.dcx = dx, dhx, dcx return dw end @primitive1 _rnnforw(w,x,hx,cx; rnn, o...),dy,y _rnnback(dy,y,w,x,hx,cx; rnn=rnn, o...) value(rnn).dx value(rnn).dhx value(rnn).dcx #506: Because r.dx,dhx,dcx may be freed by gcnode, their C_NULL pointers cause trouble in deepcopy. import Base: deepcopy_internal function deepcopy_internal(x::RNN, s::IdDict) if !haskey(s,x) s[x] = RNN(deepcopy_internal(x.w,s), deepcopy_internal(x.h,s), deepcopy_internal(x.c,s), x.inputSize, x.hiddenSize, x.numLayers, x.dropout, x.seed, x.inputMode, x.direction, x.mode, x.algo, x.dataType, deepcopy_internal(x.rnnDesc,s), deepcopy_internal(x.dropoutDesc,s), nothing, nothing, nothing) end return s[x] end function rnnworkspace(n, type) n8 = (n-1)÷sizeof(Int)+1 if type <: KnetArray buf = KnetArray{Int}(undef, n8) elseif type <: CuArray buf = CuArray{Int}(undef, n8) else error("$type not a known GPU array type.") end return buf end function cudnnGetRNNParamsSize(r::RNN) res = Csize_t[0] xDesc = TD(r.dataType, 1, r.inputSize, 1) # xDesc: (1,X,B) where X = inputSize, B is ignored, so assume 1 dt = CUDNN.cudnnDataType_t(DT(r.dataType)) CUDNN.cudnnGetRNNParamsSize(CUDNN.handle(), r.rnnDesc, xDesc, res, dt) div(res[1], sizeof(r.dataType)) end # This is buggy, why? # X,H,L,I = r.inputSize, r.hiddenSize, r.numLayers, rnnids(r) # biases = L*I # inputMatrices = (r.inputMode == 1 ? 0 : r.direction == 1 ? I : div(I,2)) # hiddenMatrices = (r.direction == 1 ? (L-1)*I : (L-1)*I + div(I,2)) # biases * H + inputMatrices * X * H + hiddenMatrices * H * H function cudnnGetRNNWorkspaceSize(rd::RD, tds::TDs; handle=CUDNN.handle()) res = Csize_t[1] CUDNN.cudnnGetRNNWorkspaceSize(handle, rd, length(tds), tds, res) return Int(res[1]) end function cudnnGetRNNTrainingReserveSize(rd::RD, tds::TDs; handle=CUDNN.handle()) res = Csize_t[1] CUDNN.cudnnGetRNNTrainingReserveSize(handle, rd, length(tds), tds, res) return Int(res[1]) end # Return eltype,size function cudnnGetFilterNdDescriptor(wDesc::FD; nbDimsRequested = 8) dataType = Cint[0] format = Cint[0] nbDims = Cint[0] filterDimA = Vector{Cint}(undef,nbDimsRequested) CUDNN.cudnnGetFilterNdDescriptor(wDesc, nbDimsRequested, dataType, format, nbDims, filterDimA) if nbDims[1] > nbDimsRequested cudnnGetFilterNdDescriptor(wDesc::FD; nbDimsRequested = nbDims[1]) else (Float32,Float64,Float16)[1+dataType[1]], (filterDimA[nbDims[1]:-1:1]...,) end end function cudnnGetRNNParam(r::RNN, layer::Integer, id::Integer, par::Integer; useview=false) params_are_good = ((1 <= par <= 2) && ((r.direction == 0 && 1 <= layer <= r.numLayers) || (r.direction == 1 && 1 <= layer <= 2*r.numLayers)) && ((r.mode == 0 && 1 <= id <= 2) || (r.mode == 1 && 1 <= id <= 2) || (r.mode == 2 && 1 <= id <= 8) || (r.mode == 3 && 1 <= id <= 6))) params_are_good || throw(ArgumentError("Bad arguments for rnnparam, please see doc.")) should_return_nothing = ((r.inputMode == 1) && (par == 1) && ((r.mode == 0 && id == 1) || (r.mode == 1 && id == 1) || (r.mode == 2 && 1 <= id <= 4) || (r.mode == 3 && 1 <= id <= 3)) && ((layer == 1) || (r.direction == 1 && layer == 2))) i1 = i2 = len = 0 w = value(r.w) @assert isa(w, DevArray) T = eltype(w) xDesc = TD(T,1,r.inputSize,1) wDesc = FD(T,1,1,length(w)) paramDesc = FD(T,1,1,1,1) param = Cptr[0] if par == 1 # matrix CUDNN.cudnnGetRNNLinLayerMatrixParams(handle, r.rnnDesc, layer-1, xDesc, wDesc, w, id-1, paramDesc, param) else # bias CUDNN.cudnnGetRNNLinLayerBiasParams(handle, r.rnnDesc, layer-1, xDesc, wDesc, w, id-1, paramDesc, param) end dt,sz = cudnnGetFilterNdDescriptor(paramDesc) if should_return_nothing @assert param[1] === C_NULL @assert sz == () return nothing end len = prod(sz) i1 = 1 + div(Int(param[1] - pointer(w)), sizeof(T)) i2 = i1 + len - 1 if i1 > i2 @assert should_return_nothing nothing elseif par == 1 # matrix; weights are transposed h = Int(r.hiddenSize) reshape(view(r.w, i1:i2),:,h) else # bias view(r.w, i1:i2) end end # CuArray specific support: should move this to cuarrays TD(a::CuArray{T}) where {T} = TD(T, size(a)) FD(a::CuArray{T}) where {T} = FD(T, size(a)) bytes(x::CuArray{T}) where T = length(x)*sizeof(T) # KnetArray getindex contiguous indices already returns a view. # We need the following for rnnparam/rnntest to work: Base.view(A::KnetArray, I::AbstractUnitRange{Int}) = getindex(A, I) # This supports cpucopy/gpucopy: import Knet.KnetArrays: _ser function _ser(x::RNN, s::IdDict, m::Val) if !haskey(s,x) # we need rd,dd only if there is a gpu, we are not in cpumode, # and if we are in jldmode we are loading, not saving # if (CUDA.functional() && m != CPUMODE && !(m == JLDMODE && x.rnnDesc != nothing)) # dd = DD(dropout=x.dropout,seed=x.seed) # rd = RD(x.hiddenSize,x.numLayers,dd,x.inputMode,x.direction,x.mode,x.algo,x.dataType) # else # rd = dd = nothing # end # 20200806: We no longer need to load/save rd/dd: rnnforw will construct as needed. rd = dd = nothing # dx, dhx, dcx are temporary fields used by rnnback, they do not need to be copied # gcnode sets dx.ptr to C_NULL which breaks serialize, best not to try s[x] = RNN(_ser(x.w,s,m), _ser(x.h,s,m), _ser(x.c,s,m), x.inputSize, x.hiddenSize, x.numLayers, x.dropout, x.seed, x.inputMode, x.direction, x.mode, x.algo, x.dataType, rd, dd, nothing, nothing, nothing) end return s[x] end import JLD2 struct JLD2RNN; w; h; c; inputSize; hiddenSize; numLayers; dropout; seed; inputMode; direction; mode; algo; dataType; end JLD2RNN(x::RNN) = JLD2RNN(x.w, x.h, x.c, x.inputSize, x.hiddenSize, x.numLayers, x.dropout, x.seed, x.inputMode, x.direction, x.mode, x.algo, x.dataType) RNN(x::JLD2RNN) = RNN(x.w, x.h, x.c, x.inputSize, x.hiddenSize, x.numLayers, x.dropout, x.seed, x.inputMode, x.direction, x.mode, x.algo, x.dataType, nothing, nothing, nothing, nothing, nothing) JLD2.writeas(::Type{RNN}) = JLD2RNN JLD2.wconvert(::Type{JLD2RNN}, x::RNN) = JLD2RNN(x) JLD2.rconvert(::Type{RNN}, x::JLD2RNN) = RNN(x)
[ 11748, 509, 3262, 13, 41472, 1238, 25, 374, 20471, 1640, 86, 198, 3500, 509, 3262, 13, 41472, 1238, 25, 371, 6144, 198, 3500, 509, 3262, 13, 42, 3262, 3163, 20477, 25, 6245, 19182, 11, 509, 3262, 19182, 11, 327, 20692, 198, 3500, 29369, 5631, 25, 14496, 19182, 11, 327, 8322, 6144, 11, 29369, 62, 33991, 198, 3500, 11160, 42731, 25, 11160, 42731, 11, 2488, 19795, 1800, 16, 11, 1988, 11, 8296, 11, 25139, 11, 11052, 198, 198, 1, 49, 6144, 43087, 1, 198, 76, 18187, 2878, 31475, 26, 50116, 26, 886, 198, 198, 1, 26932, 448, 43087, 1, 198, 76, 18187, 2878, 20084, 26, 50116, 26, 2585, 26, 886, 198, 198, 1, 15597, 82, 281, 7177, 286, 513, 35, 11192, 273, 12145, 669, 1, 198, 76, 18187, 2878, 42873, 26, 279, 35138, 3712, 38469, 90, 34, 20692, 19629, 2124, 24564, 3712, 38469, 90, 21016, 19629, 886, 220, 220, 220, 220, 1303, 9175, 2124, 24564, 287, 42873, 523, 340, 857, 407, 651, 308, 66, 6, 276, 198, 198, 14881, 13, 13271, 8635, 62, 1102, 1851, 7, 3712, 6030, 90, 34, 20692, 5512, 49427, 3712, 16458, 47505, 1860, 13, 20692, 198, 14881, 13, 13271, 8635, 62, 1102, 1851, 7, 3712, 6030, 90, 34, 20692, 5512, 374, 67, 3712, 35257, 47505, 4372, 13, 20692, 198, 14881, 13, 13271, 8635, 62, 1102, 1851, 7, 3712, 6030, 90, 46745, 90, 34, 20692, 92, 5512, 256, 9310, 3712, 21016, 82, 47505, 29536, 7, 8671, 82, 13, 79, 35138, 8, 198, 198, 8818, 20084, 7, 26, 379, 2981, 11, 5412, 28, 34, 8322, 6144, 13, 28144, 22784, 4268, 448, 28, 15, 13, 15, 11, 9403, 28, 15, 11, 267, 23029, 198, 220, 220, 220, 611, 9403, 855, 15, 26, 9403, 28, 28300, 7, 34, 377, 506, 6511, 11, 2435, 35430, 886, 198, 220, 220, 220, 288, 796, 327, 20692, 58, 15, 11208, 264, 796, 327, 7857, 62, 83, 58, 15, 60, 1303, 16926, 46, 25, 1680, 3294, 371, 6144, 82, 2648, 4268, 448, 12145, 669, 30, 1680, 4268, 448, 12867, 307, 3421, 30, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 16447, 26932, 448, 24564, 1968, 273, 7, 67, 8, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 26932, 448, 3855, 42237, 10699, 7, 28144, 11, 82, 8, 198, 220, 220, 220, 2585, 796, 374, 20471, 5225, 10223, 7, 82, 58, 16, 4357, 379, 2981, 8, 198, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 7248, 26932, 448, 24564, 1968, 273, 7, 67, 58, 16, 4357, 28144, 11, 14781, 448, 11, 27219, 11, 33661, 7, 27219, 828, 28826, 8, 198, 220, 220, 220, 49427, 796, 20084, 7, 67, 58, 16, 4357, 27219, 8, 198, 220, 220, 220, 2457, 7509, 7, 87, 3784, 34, 8322, 6144, 13, 66, 463, 20471, 49174, 26932, 448, 24564, 1968, 273, 7, 87, 13, 20692, 828, 1860, 8, 198, 220, 220, 220, 1441, 49427, 198, 437, 198, 198, 8818, 31475, 3419, 198, 220, 220, 220, 288, 796, 327, 20692, 58, 15, 60, 198, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 16447, 49, 6144, 24564, 1968, 273, 7, 67, 8, 198, 220, 220, 220, 374, 67, 796, 31475, 7, 67, 58, 16, 12962, 198, 220, 220, 220, 2457, 7509, 7, 87, 3784, 34, 8322, 6144, 13, 66, 463, 20471, 49174, 49, 6144, 24564, 1968, 273, 7, 87, 13, 20692, 828, 4372, 8, 198, 220, 220, 220, 1441, 374, 67, 198, 437, 198, 198, 8818, 31475, 7, 30342, 10699, 11, 22510, 43, 6962, 11, 14781, 448, 24564, 11, 15414, 19076, 11, 37295, 11, 14171, 11, 282, 2188, 11, 7890, 6030, 26, 5412, 28, 34, 8322, 6144, 13, 28144, 28955, 198, 220, 220, 220, 374, 20471, 24564, 796, 31475, 3419, 198, 220, 220, 220, 5128, 19076, 796, 327, 8322, 6144, 13, 66, 463, 20471, 49, 6144, 20560, 19076, 62, 83, 7, 15414, 19076, 8, 198, 220, 220, 220, 4571, 796, 327, 8322, 6144, 13, 66, 463, 20471, 35, 4154, 19076, 62, 83, 7, 37295, 8, 198, 220, 220, 220, 4235, 796, 327, 8322, 6144, 13, 66, 463, 20471, 49, 6144, 19076, 62, 83, 7, 14171, 8, 198, 220, 220, 220, 435, 2188, 796, 327, 8322, 6144, 13, 66, 463, 20471, 49, 6144, 2348, 2188, 62, 83, 7, 282, 2188, 8, 198, 220, 220, 220, 288, 83, 796, 327, 8322, 6144, 13, 66, 463, 20471, 6601, 6030, 62, 83, 7, 24544, 7, 7890, 6030, 4008, 198, 220, 220, 220, 611, 327, 8322, 6144, 13, 9641, 3419, 1279, 410, 1, 23, 1, 198, 220, 220, 220, 220, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 7248, 49, 6144, 24564, 1968, 273, 7, 28144, 11, 81, 20471, 24564, 11, 30342, 10699, 11, 22510, 43, 6962, 11, 14781, 448, 24564, 11, 15414, 19076, 11, 37295, 11, 14171, 11, 282, 2188, 11, 28664, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 7248, 49, 6144, 24564, 1968, 273, 62, 85, 21, 7, 28144, 11, 81, 20471, 24564, 11, 30342, 10699, 11, 22510, 43, 6962, 11, 14781, 448, 24564, 11, 15414, 19076, 11, 37295, 11, 14171, 11, 282, 2188, 11, 28664, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 374, 20471, 24564, 198, 437, 198, 198, 14881, 13, 13664, 7, 8671, 82, 3712, 21016, 82, 47505, 13664, 7, 8671, 82, 13, 79, 35138, 8, 198, 198, 8818, 42873, 7, 87, 3712, 13603, 19182, 90, 32, 5512, 3712, 18465, 8, 810, 1391, 32, 92, 1303, 11217, 2124, 25, 357, 55, 11, 33, 21747, 51, 10091, 355, 257, 604, 35, 7177, 25, 357, 16, 11, 55, 11, 33, 11, 51, 8, 198, 220, 220, 220, 2124, 24564, 796, 13320, 7, 32, 11, 16, 11, 7857, 7, 87, 11, 16, 828, 7857, 7, 87, 11, 17, 4008, 1303, 356, 460, 779, 257, 2060, 2124, 24564, 198, 220, 220, 220, 279, 35138, 796, 20650, 90, 34, 20692, 92, 7, 917, 891, 11, 2546, 7, 87, 11, 18, 4008, 198, 220, 220, 220, 279, 35138, 58, 47715, 764, 28, 2124, 24564, 13, 20692, 198, 220, 220, 220, 1441, 42873, 7, 79, 35138, 11, 685, 87, 24564, 12962, 198, 437, 198, 198, 8818, 42873, 7, 87, 3712, 13603, 19182, 90, 32, 5512, 43501, 50, 4340, 8, 810, 1391, 32, 92, 1303, 2124, 25, 357, 55, 11, 33, 9, 828, 15458, 50, 4340, 3607, 514, 347, 83, 10620, 198, 220, 220, 220, 2488, 30493, 2160, 7, 43501, 50, 4340, 8, 6624, 2659, 7, 13664, 7, 87, 828, 7857, 7, 87, 11, 16, 4008, 198, 220, 220, 220, 1395, 796, 2546, 7, 87, 11, 16, 8, 198, 220, 220, 220, 2124, 82, 796, 685, 13320, 7, 32, 11, 16, 11, 55, 11, 33, 8, 329, 347, 287, 15458, 50, 4340, 2361, 198, 220, 220, 220, 26692, 796, 685, 2124, 67, 13, 20692, 329, 2124, 67, 287, 2124, 82, 2361, 198, 220, 220, 220, 1441, 42873, 7, 862, 11, 34223, 8, 198, 437, 198, 198, 8818, 13320, 18, 7, 64, 3712, 13603, 19182, 8, 1303, 11217, 257, 355, 257, 513, 35, 7177, 11, 14841, 422, 826, 198, 220, 220, 220, 299, 796, 299, 67, 12078, 7, 64, 8, 198, 220, 220, 220, 611, 299, 855, 18, 26, 13320, 7, 64, 8, 198, 220, 220, 220, 2073, 361, 299, 855, 17, 26, 13320, 7, 3447, 1758, 7, 64, 11, 2546, 7, 64, 11, 16, 828, 2546, 7, 64, 11, 17, 828, 352, 4008, 198, 220, 220, 220, 2073, 361, 299, 855, 16, 26, 13320, 7, 3447, 1758, 7, 64, 11, 2546, 7, 64, 11, 16, 828, 352, 11, 352, 4008, 198, 220, 220, 220, 2073, 26, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 30002, 18, 7, 64, 3712, 13603, 19182, 8, 1303, 11217, 257, 355, 257, 513, 35, 7177, 11, 14841, 422, 1364, 198, 220, 220, 220, 299, 796, 299, 67, 12078, 7, 64, 8, 198, 220, 220, 220, 611, 299, 855, 18, 26, 30002, 7, 64, 8, 198, 220, 220, 220, 2073, 361, 299, 855, 17, 26, 30002, 7, 3447, 1758, 7, 64, 11, 352, 11, 2546, 7, 64, 11, 16, 828, 2546, 7, 64, 11, 17, 22305, 198, 220, 220, 220, 2073, 361, 299, 855, 16, 26, 30002, 7, 3447, 1758, 7, 64, 11, 352, 11, 352, 11, 2546, 7, 64, 11, 16, 22305, 198, 220, 220, 220, 2073, 26, 3714, 7, 29271, 3004, 44, 1042, 963, 28955, 198, 220, 220, 220, 886, 198, 437, 628, 198, 8818, 374, 20471, 1640, 86, 7, 81, 3712, 49, 6144, 11, 266, 11, 2124, 3712, 38176, 90, 13603, 19182, 90, 51, 5512, 11395, 90, 27, 25, 13603, 19182, 90, 51, 11709, 5512, 289, 87, 28, 22366, 11, 43213, 28, 22366, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5412, 28, 34, 8322, 6144, 13, 28144, 22784, 15458, 50, 4340, 28, 22366, 11, 2537, 796, 357, 71, 87, 14512, 2147, 828, 3075, 796, 357, 66, 87, 14512, 2147, 11405, 374, 13, 14171, 6624, 362, 4008, 810, 309, 198, 220, 220, 220, 2488, 30493, 1988, 7, 86, 8, 24844, 1988, 7, 81, 13, 86, 8, 198, 220, 220, 220, 2488, 30493, 2546, 7, 87, 11, 16, 8, 6624, 374, 13, 15414, 10699, 198, 220, 220, 220, 2124, 18, 796, 27179, 1758, 7, 8367, 7, 87, 828, 2546, 7, 87, 11, 16, 828, 2546, 7, 87, 11, 17, 828, 2546, 7, 87, 11, 18, 4008, 198, 220, 220, 220, 2488, 30493, 2099, 1659, 7, 87, 18, 8, 6624, 2099, 1659, 7, 8367, 7, 86, 4008, 17971, 7, 4906, 1659, 7, 8367, 7, 86, 22305, 19590, 466, 407, 2872, 29568, 4906, 1659, 7, 87, 4008, 5128, 13, 4222, 779, 371, 6144, 7, 26, 265, 2981, 8, 3038, 526, 198, 220, 220, 220, 611, 374, 13, 81, 20471, 24564, 24844, 2147, 220, 220, 220, 1303, 41216, 374, 20471, 329, 308, 19944, 351, 717, 5128, 198, 220, 220, 220, 220, 220, 220, 220, 374, 13, 7890, 6030, 796, 1288, 4906, 7, 87, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 13, 14781, 448, 24564, 796, 20084, 7, 28144, 28, 34, 8322, 6144, 13, 28144, 22784, 14781, 448, 28, 81, 13, 14781, 448, 11, 28826, 28, 81, 13, 28826, 11, 265, 2981, 28, 4906, 1659, 7, 87, 18, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 374, 13, 81, 20471, 24564, 796, 31475, 7, 81, 13, 30342, 10699, 11, 81, 13, 22510, 43, 6962, 11, 81, 13, 14781, 448, 24564, 11, 81, 13, 15414, 19076, 11, 81, 13, 37295, 11, 81, 13, 14171, 11, 81, 13, 282, 2188, 11, 81, 13, 7890, 6030, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4808, 81, 20471, 1640, 86, 7, 86, 11, 87, 11, 71, 87, 11, 66, 87, 26, 374, 20471, 28, 81, 11, 28144, 28, 28144, 11, 43501, 50, 4340, 28, 43501, 50, 4340, 11, 12114, 28, 12114, 11, 948, 28, 948, 8, 198, 437, 628, 198, 8818, 4808, 81, 20471, 1640, 86, 7, 86, 11, 2124, 11, 289, 87, 11, 43213, 26, 374, 20471, 11, 5412, 11, 15458, 50, 4340, 11, 2537, 11, 3075, 8, 198, 220, 220, 220, 1303, 23412, 12145, 669, 198, 220, 220, 220, 33756, 24539, 796, 15458, 50, 4340, 855, 22366, 5633, 2546, 7, 87, 11, 18, 8, 1058, 4129, 7, 43501, 50, 4340, 8, 1303, 357, 55, 11, 33, 11, 51, 8, 393, 357, 55, 11, 33, 28988, 351, 15458, 50, 4340, 198, 220, 220, 220, 266, 24564, 796, 30002, 18, 7, 86, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 16, 11, 16, 11, 54, 8, 198, 220, 220, 220, 220, 742, 9310, 796, 42873, 7, 87, 11, 43501, 50, 4340, 8, 220, 220, 220, 1303, 357, 16, 11, 55, 11, 33, 83, 8, 2124, 309, 198, 220, 220, 220, 318, 22366, 7, 64, 8, 796, 257, 24844, 2147, 8614, 257, 24844, 327, 62, 33991, 8614, 257, 24844, 29369, 62, 33991, 198, 220, 220, 220, 611, 289, 87, 855, 22366, 26, 289, 87, 28, 43633, 62, 33991, 26, 289, 87, 24564, 28, 34, 62, 33991, 26, 2073, 26, 289, 87, 24564, 28, 21016, 18, 7, 71, 87, 1776, 886, 1303, 357, 39, 11, 33, 11, 43, 14, 17, 43, 8, 198, 220, 220, 220, 611, 43213, 855, 22366, 8614, 374, 20471, 13, 14171, 14512, 362, 26, 43213, 28, 43633, 62, 33991, 26, 43213, 24564, 28, 34, 62, 33991, 26, 2073, 26, 43213, 24564, 28, 21016, 18, 7, 66, 87, 1776, 886, 628, 220, 220, 220, 1303, 25235, 26515, 290, 12145, 669, 198, 220, 220, 220, 331, 7857, 796, 2824, 7, 7857, 7, 87, 4008, 198, 220, 220, 220, 331, 7857, 58, 16, 60, 796, 374, 20471, 13, 30342, 10699, 1635, 357, 81, 20471, 13, 37295, 6624, 352, 5633, 362, 1058, 352, 8, 198, 220, 220, 220, 331, 796, 2092, 7, 87, 11, 331, 7857, 23029, 220, 220, 220, 1303, 357, 39, 14, 17, 39, 11, 33, 11, 51, 8, 393, 357, 39, 14, 17, 39, 11, 33, 28988, 1377, 331, 22353, 2124, 2845, 329, 262, 717, 15793, 198, 220, 220, 220, 331, 8671, 82, 796, 42873, 7, 88, 11, 43501, 50, 4340, 8, 220, 220, 220, 1303, 357, 16, 11, 39, 14, 17, 39, 11, 33, 83, 8, 2124, 309, 628, 220, 220, 220, 1303, 16018, 453, 5072, 7104, 290, 2685, 286, 938, 2239, 198, 220, 220, 220, 2537, 448, 796, 3075, 448, 796, 29369, 62, 33991, 198, 220, 220, 220, 2537, 24564, 796, 3075, 24564, 796, 327, 62, 33991, 198, 220, 220, 220, 611, 2537, 8614, 3075, 198, 220, 220, 220, 220, 220, 220, 220, 717, 33, 963, 10699, 796, 15458, 50, 4340, 855, 22366, 5633, 2546, 7, 87, 11, 17, 8, 1058, 15458, 50, 4340, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 289, 7857, 796, 357, 5317, 7, 81, 20471, 13, 30342, 10699, 828, 2558, 7, 11085, 33, 963, 10699, 828, 2558, 7, 81, 20471, 13, 22510, 43, 6962, 1635, 357, 81, 20471, 13, 37295, 6624, 352, 5633, 362, 1058, 352, 22305, 1303, 357, 39, 11, 33, 11, 43, 14, 17, 43, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2537, 26, 2537, 448, 28, 38610, 7, 88, 11, 71, 7857, 1776, 2537, 24564, 28, 21016, 18, 7, 12114, 448, 1776, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3075, 11405, 374, 20471, 13, 14171, 855, 17, 26, 3075, 448, 28, 38610, 7, 88, 11, 71, 7857, 1776, 3075, 24564, 28, 21016, 18, 7, 948, 448, 1776, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 71, 87, 8, 11405, 597, 7, 7857, 7, 71, 87, 11, 72, 31520, 28, 71, 7857, 58, 72, 60, 329, 1312, 28, 16, 25, 18, 8, 1303, 8996, 530, 416, 530, 287, 1339, 289, 87, 318, 352, 12, 35, 393, 362, 12, 35, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 29271, 3004, 44, 1042, 963, 7203, 7857, 7, 71, 87, 8, 43641, 7, 7857, 7, 71, 87, 4008, 857, 407, 2872, 289, 7857, 43641, 7, 71, 7857, 16725, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 22366, 7, 66, 87, 8, 11405, 374, 20471, 13, 14171, 6624, 362, 11405, 597, 7, 7857, 7, 66, 87, 11, 72, 31520, 28, 71, 7857, 58, 72, 60, 329, 1312, 28, 16, 25, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 29271, 3004, 44, 1042, 963, 7203, 7857, 7, 66, 87, 8, 43641, 7, 7857, 7, 66, 87, 4008, 857, 407, 2872, 289, 7857, 43641, 7, 71, 7857, 16725, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 670, 14106, 290, 11515, 14106, 198, 220, 220, 220, 266, 824, 796, 269, 463, 20471, 3855, 49, 6144, 23044, 10223, 10699, 7, 81, 20471, 13, 81, 20471, 24564, 11, 220, 742, 9310, 26, 5412, 28, 28144, 8, 198, 220, 220, 220, 266, 82, 796, 374, 20471, 5225, 10223, 7, 86, 824, 11, 2099, 1659, 7, 8367, 7, 86, 22305, 628, 220, 220, 220, 611, 11160, 42731, 13, 8344, 1284, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 374, 824, 796, 269, 463, 20471, 3855, 49, 6144, 44357, 4965, 3760, 10699, 7, 81, 20471, 13, 81, 20471, 24564, 11, 220, 742, 9310, 26, 5412, 28, 28144, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44608, 796, 374, 20471, 5225, 10223, 7, 42216, 11, 2099, 1659, 7, 8367, 7, 86, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 49, 6144, 39746, 44357, 7, 28144, 11, 374, 20471, 13, 81, 20471, 24564, 11, 33756, 24539, 11, 220, 742, 9310, 11, 2124, 11, 289, 87, 24564, 11, 289, 87, 11, 43213, 24564, 11, 43213, 11, 266, 24564, 11, 266, 11, 331, 8671, 82, 11, 331, 11, 2537, 24564, 11, 2537, 448, 11, 3075, 24564, 11, 3075, 448, 11, 266, 82, 11, 266, 824, 11, 44608, 11, 374, 824, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 44608, 796, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 49, 6144, 39746, 818, 4288, 7, 28144, 11, 374, 20471, 13, 81, 20471, 24564, 11, 33756, 24539, 11, 220, 742, 9310, 11, 2124, 11, 289, 87, 24564, 11, 289, 87, 11, 43213, 24564, 11, 43213, 11, 266, 24564, 11, 266, 11, 331, 8671, 82, 11, 331, 11, 2537, 24564, 11, 2537, 448, 11, 3075, 24564, 11, 3075, 448, 11, 266, 82, 11, 266, 824, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 2537, 448, 24844, 29369, 62, 33991, 26, 2537, 448, 796, 2147, 26, 886, 198, 220, 220, 220, 611, 3075, 448, 24844, 29369, 62, 33991, 26, 3075, 448, 796, 2147, 26, 886, 198, 220, 220, 220, 1441, 331, 11, 2537, 448, 11, 3075, 448, 11, 44608, 11, 266, 82, 198, 437, 198, 198, 8818, 4808, 81, 20471, 1891, 7, 28664, 11, 256, 11, 266, 11, 2124, 11, 289, 87, 11, 43213, 26, 374, 20471, 11, 267, 23029, 198, 220, 220, 220, 2488, 30493, 1988, 7, 81, 20471, 13, 86, 8, 24844, 1988, 7, 86, 8, 198, 220, 220, 220, 331, 11, 12114, 11, 948, 11, 3808, 11, 18504, 796, 1988, 7, 83, 8, 198, 220, 220, 220, 20268, 11, 67, 12114, 11, 67, 948, 11, 67, 3808, 11, 67, 18504, 796, 1988, 7, 28664, 8, 198, 220, 220, 220, 374, 20471, 28, 8367, 7, 81, 20471, 1776, 266, 28, 8367, 7, 86, 1776, 2124, 28, 8367, 7, 87, 1776, 289, 87, 28, 8367, 7, 71, 87, 1776, 43213, 28, 8367, 7, 66, 87, 8, 198, 220, 220, 220, 1303, 1675, 2948, 20086, 284, 1306, 24415, 356, 761, 284, 1598, 262, 25414, 2099, 422, 374, 20471, 13, 71, 11, 81, 20471, 13, 66, 198, 220, 220, 220, 1303, 775, 460, 470, 466, 428, 1141, 2651, 11, 780, 1194, 2651, 743, 307, 1057, 1626, 262, 976, 24415, 13, 198, 220, 220, 220, 1303, 25327, 340, 994, 318, 3338, 11, 1724, 262, 24415, 318, 1760, 290, 356, 389, 2263, 3915, 2334, 13, 198, 220, 220, 220, 1303, 5740, 326, 428, 857, 407, 670, 319, 262, 42804, 290, 777, 423, 284, 307, 20750, 416, 1021, 13, 198, 220, 220, 220, 1303, 383, 42804, 2196, 318, 407, 257, 20049, 290, 468, 645, 736, 2163, 13, 357, 51, 3727, 46, 25, 1064, 1365, 4610, 8, 198, 220, 220, 220, 374, 20471, 13, 71, 796, 1988, 7, 81, 20471, 13, 71, 1776, 374, 20471, 13, 66, 796, 1988, 7, 81, 20471, 13, 66, 8, 220, 198, 220, 220, 220, 4808, 81, 20471, 1891, 17, 7, 81, 20471, 11, 266, 11, 2124, 11, 331, 11, 20268, 11, 289, 87, 11, 43213, 11, 288, 12114, 11, 288, 948, 11, 44608, 11, 266, 82, 26, 267, 23029, 198, 437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 8818, 4808, 81, 20471, 1891, 17, 7, 81, 11, 266, 11, 2124, 11, 331, 11, 20268, 11, 289, 87, 11, 43213, 11, 288, 12114, 11, 288, 948, 11, 44608, 11, 266, 82, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5412, 28, 34, 8322, 6144, 13, 28144, 22784, 15458, 50, 4340, 28, 22366, 11, 267, 23029, 220, 198, 220, 220, 220, 2488, 30493, 1988, 7, 81, 13, 86, 8, 24844, 1988, 7, 86, 8, 198, 220, 220, 220, 1303, 23412, 12145, 669, 25, 198, 220, 220, 220, 33756, 24539, 796, 15458, 50, 4340, 855, 22366, 5633, 2546, 7, 87, 11, 18, 8, 1058, 4129, 7, 43501, 50, 4340, 8, 1303, 357, 55, 11, 33, 11, 51, 8, 393, 357, 55, 11, 33, 28988, 351, 15458, 50, 4340, 198, 220, 220, 220, 266, 24564, 796, 30002, 18, 7, 86, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 16, 11, 16, 11, 54, 8, 198, 220, 220, 220, 220, 742, 9310, 796, 42873, 7, 87, 11, 43501, 50, 4340, 8, 220, 220, 220, 1303, 357, 55, 11, 33, 11, 51, 8, 4613, 357, 16, 11, 55, 11, 33, 8, 2124, 309, 198, 220, 220, 220, 331, 8671, 82, 796, 42873, 7, 88, 11, 43501, 50, 4340, 8, 220, 220, 220, 1303, 357, 39, 14, 17, 39, 11, 33, 11, 51, 8, 4613, 357, 16, 11, 39, 14, 17, 39, 11, 33, 8, 2124, 309, 198, 220, 220, 220, 1303, 20268, 8671, 82, 796, 42873, 7, 9892, 11, 43501, 50, 4340, 8, 220, 1303, 356, 779, 331, 8671, 82, 329, 20268, 8671, 82, 198, 220, 220, 220, 611, 20268, 6624, 2147, 26, 20268, 28, 22570, 7, 88, 1776, 886, 198, 220, 220, 220, 611, 289, 87, 6624, 2147, 26, 289, 87, 28, 43633, 62, 33991, 26, 289, 87, 24564, 28, 34, 62, 33991, 26, 2073, 26, 289, 87, 24564, 28, 21016, 18, 7, 71, 87, 1776, 886, 198, 220, 220, 220, 611, 43213, 6624, 2147, 8614, 374, 13, 14171, 14512, 362, 26, 43213, 28, 43633, 62, 33991, 26, 43213, 24564, 28, 34, 62, 33991, 26, 2073, 26, 43213, 24564, 28, 21016, 18, 7, 66, 87, 1776, 886, 198, 220, 220, 220, 611, 288, 12114, 6624, 2147, 26, 288, 12114, 28, 43633, 62, 33991, 26, 288, 12114, 24564, 28, 34, 62, 33991, 26, 2073, 26, 288, 12114, 24564, 28, 21016, 18, 7, 67, 12114, 1776, 886, 198, 220, 220, 220, 611, 288, 948, 6624, 2147, 8614, 374, 13, 14171, 14512, 362, 26, 288, 948, 28, 43633, 62, 33991, 26, 288, 948, 24564, 28, 34, 62, 33991, 26, 2073, 26, 288, 948, 24564, 28, 21016, 18, 7, 67, 948, 1776, 886, 628, 220, 220, 220, 1303, 25235, 26515, 290, 12145, 669, 25, 198, 220, 220, 220, 44332, 796, 2092, 7, 87, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 357, 55, 11, 33, 11, 51, 8, 393, 357, 55, 11, 33, 28988, 351, 15458, 50, 4340, 198, 220, 220, 220, 1303, 288, 742, 9310, 796, 42873, 7, 34350, 11, 43501, 50, 4340, 8, 220, 1303, 356, 779, 220, 742, 9310, 994, 198, 220, 220, 220, 43756, 796, 6632, 7, 86, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 43756, 318, 973, 38298, 306, 11, 523, 356, 761, 6632, 198, 220, 220, 220, 43756, 24564, 796, 30002, 18, 7, 67, 86, 8, 198, 220, 220, 220, 611, 289, 87, 24844, 29369, 62, 33991, 26, 34590, 87, 28, 43633, 62, 33991, 26, 34590, 87, 24564, 28, 34, 62, 33991, 26, 2073, 26, 34590, 87, 28, 38610, 7, 71, 87, 1776, 34590, 87, 24564, 28, 21016, 18, 7, 34985, 87, 1776, 886, 198, 220, 220, 220, 611, 43213, 24844, 29369, 62, 33991, 26, 30736, 87, 28, 43633, 62, 33991, 26, 30736, 87, 24564, 28, 34, 62, 33991, 26, 2073, 26, 30736, 87, 28, 38610, 7, 66, 87, 1776, 30736, 87, 24564, 28, 21016, 18, 7, 17896, 87, 1776, 886, 628, 220, 220, 220, 1303, 670, 14106, 290, 11515, 14106, 198, 220, 220, 220, 1303, 266, 82, 796, 269, 463, 20471, 12468, 14106, 3419, 198, 220, 220, 220, 266, 824, 796, 9881, 7, 18504, 8, 198, 220, 220, 220, 374, 824, 796, 9881, 7, 3808, 8, 198, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 49, 6144, 7282, 904, 6601, 7, 28144, 11, 374, 13, 81, 20471, 24564, 11, 33756, 24539, 11, 331, 8671, 82, 11, 331, 11, 331, 8671, 82, 11, 20268, 11, 288, 12114, 24564, 11, 288, 12114, 11, 288, 948, 24564, 11, 288, 948, 11, 266, 24564, 11, 266, 11, 289, 87, 24564, 11, 289, 87, 11, 43213, 24564, 11, 43213, 11, 220, 742, 9310, 11, 44332, 11, 34590, 87, 24564, 11, 34590, 87, 11, 30736, 87, 24564, 11, 30736, 87, 11, 266, 82, 11, 266, 824, 11, 44608, 11, 374, 824, 8, 198, 220, 220, 220, 2488, 66, 463, 20471, 62, 1186, 563, 327, 8322, 6144, 13, 13271, 8635, 62, 66, 463, 20471, 49, 6144, 7282, 904, 1135, 2337, 7, 28144, 11, 374, 13, 81, 20471, 24564, 11, 33756, 24539, 11, 220, 742, 9310, 11, 2124, 11, 289, 87, 24564, 11, 289, 87, 11, 331, 8671, 82, 11, 331, 11, 266, 82, 11, 266, 824, 11, 43756, 24564, 11, 43756, 11, 44608, 11, 374, 824, 8, 198, 220, 220, 220, 1303, 10133, 262, 12940, 198, 220, 220, 220, 611, 34590, 87, 18604, 43633, 62, 33991, 26, 34590, 87, 28, 22366, 26, 886, 198, 220, 220, 220, 611, 30736, 87, 18604, 43633, 62, 33991, 26, 30736, 87, 28, 22366, 26, 886, 198, 220, 220, 220, 374, 13, 34350, 11, 374, 13, 34985, 87, 11, 374, 13, 17896, 87, 796, 44332, 11, 34590, 87, 11, 30736, 87, 198, 220, 220, 220, 1441, 43756, 198, 437, 198, 198, 31, 19795, 1800, 16, 4808, 81, 20471, 1640, 86, 7, 86, 11, 87, 11, 71, 87, 11, 66, 87, 26, 374, 20471, 11, 267, 986, 828, 9892, 11, 88, 220, 4808, 81, 20471, 1891, 7, 9892, 11, 88, 11, 86, 11, 87, 11, 71, 87, 11, 66, 87, 26, 374, 20471, 28, 81, 20471, 11, 267, 23029, 1988, 7, 81, 20471, 737, 34350, 1988, 7, 81, 20471, 737, 34985, 87, 1988, 7, 81, 20471, 737, 17896, 87, 198, 198, 2, 35638, 25, 4362, 374, 13, 34350, 11, 34985, 87, 11, 17896, 87, 743, 307, 13459, 416, 308, 66, 17440, 11, 511, 327, 62, 33991, 32007, 2728, 5876, 287, 2769, 30073, 13, 198, 11748, 7308, 25, 2769, 30073, 62, 32538, 198, 8818, 2769, 30073, 62, 32538, 7, 87, 3712, 49, 6144, 11, 264, 3712, 7390, 35, 713, 8, 198, 220, 220, 220, 611, 5145, 10134, 2539, 7, 82, 11, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 58, 87, 60, 796, 371, 6144, 7, 22089, 30073, 62, 32538, 7, 87, 13, 86, 11, 82, 828, 2769, 30073, 62, 32538, 7, 87, 13, 71, 11, 82, 828, 2769, 30073, 62, 32538, 7, 87, 13, 66, 11, 82, 828, 2124, 13, 15414, 10699, 11, 2124, 13, 30342, 10699, 11, 2124, 13, 22510, 43, 6962, 11, 2124, 13, 14781, 448, 11, 2124, 13, 28826, 11, 2124, 13, 15414, 19076, 11, 2124, 13, 37295, 11, 2124, 13, 14171, 11, 2124, 13, 282, 2188, 11, 2124, 13, 7890, 6030, 11, 2769, 30073, 62, 32538, 7, 87, 13, 81, 20471, 24564, 11, 82, 828, 2769, 30073, 62, 32538, 7, 87, 13, 14781, 448, 24564, 11, 82, 828, 2147, 11, 2147, 11, 2147, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 264, 58, 87, 60, 198, 437, 198, 198, 8818, 374, 20471, 5225, 10223, 7, 77, 11, 2099, 8, 198, 220, 220, 220, 299, 23, 796, 357, 77, 12, 16, 8, 127, 115, 7857, 1659, 7, 5317, 47762, 16, 198, 220, 220, 220, 611, 2099, 1279, 25, 509, 3262, 19182, 198, 220, 220, 220, 220, 220, 220, 220, 42684, 796, 509, 3262, 19182, 90, 5317, 92, 7, 917, 891, 11, 299, 23, 8, 198, 220, 220, 220, 2073, 361, 2099, 1279, 25, 14496, 19182, 198, 220, 220, 220, 220, 220, 220, 220, 42684, 796, 14496, 19182, 90, 5317, 92, 7, 917, 891, 11, 299, 23, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 3, 4906, 407, 257, 1900, 11362, 7177, 2099, 19570, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 42684, 198, 437, 198, 198, 8818, 269, 463, 20471, 3855, 49, 6144, 10044, 4105, 10699, 7, 81, 3712, 49, 6144, 8, 198, 220, 220, 220, 581, 796, 327, 7857, 62, 83, 58, 15, 60, 198, 220, 220, 220, 2124, 24564, 796, 13320, 7, 81, 13, 7890, 6030, 11, 352, 11, 374, 13, 15414, 10699, 11, 352, 8, 220, 220, 220, 1303, 2124, 24564, 25, 357, 16, 11, 55, 11, 33, 8, 810, 1395, 796, 5128, 10699, 11, 347, 318, 9514, 11, 523, 7048, 352, 198, 220, 220, 220, 288, 83, 796, 327, 8322, 6144, 13, 66, 463, 20471, 6601, 6030, 62, 83, 7, 24544, 7, 81, 13, 7890, 6030, 4008, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 49, 6144, 10044, 4105, 10699, 7, 34, 8322, 6144, 13, 28144, 22784, 374, 13, 81, 20471, 24564, 11, 2124, 24564, 11, 581, 11, 288, 83, 8, 198, 220, 220, 220, 2659, 7, 411, 58, 16, 4357, 39364, 7, 81, 13, 7890, 6030, 4008, 198, 437, 198, 198, 2, 770, 318, 46542, 11, 1521, 30, 198, 2, 1395, 11, 39, 11, 43, 11, 40, 796, 374, 13, 15414, 10699, 11, 374, 13, 30342, 10699, 11, 374, 13, 22510, 43, 6962, 11, 374, 20471, 2340, 7, 81, 8, 198, 2, 29275, 796, 406, 9, 40, 198, 2, 5128, 19044, 45977, 796, 357, 81, 13, 15414, 19076, 6624, 352, 5633, 657, 1058, 374, 13, 37295, 6624, 352, 5633, 314, 1058, 2659, 7, 40, 11, 17, 4008, 198, 2, 7104, 19044, 45977, 796, 357, 81, 13, 37295, 6624, 352, 5633, 357, 43, 12, 16, 27493, 40, 1058, 357, 43, 12, 16, 27493, 40, 1343, 2659, 7, 40, 11, 17, 4008, 198, 2, 29275, 1635, 367, 1343, 5128, 19044, 45977, 1635, 1395, 1635, 367, 1343, 7104, 19044, 45977, 1635, 367, 1635, 367, 198, 198, 8818, 269, 463, 20471, 3855, 49, 6144, 23044, 10223, 10699, 7, 4372, 3712, 35257, 11, 256, 9310, 3712, 21016, 82, 26, 5412, 28, 34, 8322, 6144, 13, 28144, 28955, 198, 220, 220, 220, 581, 796, 327, 7857, 62, 83, 58, 16, 60, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 49, 6144, 23044, 10223, 10699, 7, 28144, 11, 374, 67, 11, 4129, 7, 8671, 82, 828, 256, 9310, 11, 581, 8, 198, 220, 220, 220, 1441, 2558, 7, 411, 58, 16, 12962, 198, 437, 198, 198, 8818, 269, 463, 20471, 3855, 49, 6144, 44357, 4965, 3760, 10699, 7, 4372, 3712, 35257, 11, 256, 9310, 3712, 21016, 82, 26, 5412, 28, 34, 8322, 6144, 13, 28144, 28955, 198, 220, 220, 220, 581, 796, 327, 7857, 62, 83, 58, 16, 60, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 49, 6144, 44357, 4965, 3760, 10699, 7, 28144, 11, 374, 67, 11, 4129, 7, 8671, 82, 828, 256, 9310, 11, 581, 8, 198, 220, 220, 220, 1441, 2558, 7, 411, 58, 16, 12962, 198, 437, 198, 198, 2, 8229, 1288, 4906, 11, 7857, 198, 8818, 269, 463, 20471, 3855, 22417, 45, 67, 24564, 1968, 273, 7, 86, 24564, 3712, 26009, 26, 299, 65, 35, 12078, 18453, 276, 796, 807, 8, 198, 220, 220, 220, 1366, 6030, 796, 327, 600, 58, 15, 60, 198, 220, 220, 220, 5794, 796, 327, 600, 58, 15, 60, 198, 220, 220, 220, 299, 65, 35, 12078, 796, 327, 600, 58, 15, 60, 198, 220, 220, 220, 8106, 29271, 32, 796, 20650, 90, 34, 600, 92, 7, 917, 891, 11, 46803, 35, 12078, 18453, 276, 8, 198, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 22417, 45, 67, 24564, 1968, 273, 7, 86, 24564, 11, 299, 65, 35, 12078, 18453, 276, 11, 1366, 6030, 11, 5794, 11, 299, 65, 35, 12078, 11, 8106, 29271, 32, 8, 198, 220, 220, 220, 611, 299, 65, 35, 12078, 58, 16, 60, 1875, 299, 65, 35, 12078, 18453, 276, 198, 220, 220, 220, 220, 220, 220, 220, 269, 463, 20471, 3855, 22417, 45, 67, 24564, 1968, 273, 7, 86, 24564, 3712, 26009, 26, 299, 65, 35, 12078, 18453, 276, 796, 299, 65, 35, 12078, 58, 16, 12962, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 357, 43879, 2624, 11, 43879, 2414, 11, 43879, 1433, 38381, 16, 10, 7890, 6030, 58, 16, 60, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 357, 24455, 29271, 32, 58, 46803, 35, 12078, 58, 16, 5974, 12, 16, 25, 16, 60, 986, 35751, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 269, 463, 20471, 3855, 49, 6144, 22973, 7, 81, 3712, 49, 6144, 11, 7679, 3712, 46541, 11, 4686, 3712, 46541, 11, 1582, 3712, 46541, 26, 779, 1177, 28, 9562, 8, 198, 220, 220, 220, 42287, 62, 533, 62, 11274, 796, 220, 198, 220, 220, 220, 14808, 16, 19841, 1582, 19841, 362, 8, 11405, 198, 220, 220, 220, 220, 14808, 81, 13, 37295, 6624, 657, 11405, 352, 19841, 7679, 19841, 374, 13, 22510, 43, 6962, 8, 8614, 198, 220, 220, 220, 220, 220, 357, 81, 13, 37295, 6624, 352, 11405, 352, 19841, 7679, 19841, 362, 9, 81, 13, 22510, 43, 6962, 4008, 11405, 198, 220, 220, 220, 220, 14808, 81, 13, 14171, 6624, 657, 11405, 352, 19841, 4686, 19841, 362, 8, 8614, 198, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 352, 11405, 352, 19841, 4686, 19841, 362, 8, 8614, 198, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 362, 11405, 352, 19841, 4686, 19841, 807, 8, 8614, 198, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 513, 11405, 352, 19841, 4686, 19841, 718, 22305, 198, 220, 220, 220, 42287, 62, 533, 62, 11274, 8614, 3714, 7, 28100, 1713, 12331, 7203, 22069, 7159, 329, 374, 20471, 17143, 11, 3387, 766, 2205, 526, 4008, 198, 220, 220, 220, 815, 62, 7783, 62, 22366, 796, 198, 220, 220, 220, 220, 220, 220, 220, 14808, 81, 13, 15414, 19076, 6624, 352, 8, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 357, 1845, 6624, 352, 8, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 14808, 81, 13, 14171, 6624, 657, 11405, 4686, 6624, 352, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 352, 11405, 4686, 6624, 352, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 362, 11405, 352, 19841, 4686, 19841, 604, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 81, 13, 14171, 6624, 513, 11405, 352, 19841, 4686, 19841, 513, 4008, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 14808, 29289, 6624, 352, 8, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 81, 13, 37295, 6624, 352, 11405, 7679, 6624, 362, 22305, 628, 220, 220, 220, 1312, 16, 796, 1312, 17, 796, 18896, 796, 657, 198, 220, 220, 220, 266, 796, 1988, 7, 81, 13, 86, 8, 198, 220, 220, 220, 2488, 30493, 318, 64, 7, 86, 11, 6245, 19182, 8, 198, 220, 220, 220, 309, 796, 1288, 4906, 7, 86, 8, 198, 220, 220, 220, 2124, 24564, 796, 13320, 7, 51, 11, 16, 11, 81, 13, 15414, 10699, 11, 16, 8, 198, 220, 220, 220, 266, 24564, 796, 30002, 7, 51, 11, 16, 11, 16, 11, 13664, 7, 86, 4008, 198, 220, 220, 220, 5772, 24564, 796, 30002, 7, 51, 11, 16, 11, 16, 11, 16, 11, 16, 8, 198, 220, 220, 220, 5772, 796, 327, 20692, 58, 15, 60, 198, 220, 220, 220, 611, 1582, 6624, 352, 1303, 17593, 198, 220, 220, 220, 220, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 49, 6144, 14993, 49925, 46912, 10044, 4105, 7, 28144, 11, 374, 13, 81, 20471, 24564, 11, 7679, 12, 16, 11, 2124, 24564, 11, 266, 24564, 11, 266, 11, 4686, 12, 16, 11, 5772, 24564, 11, 5772, 8, 198, 220, 220, 220, 2073, 1303, 10690, 198, 220, 220, 220, 220, 220, 220, 220, 327, 8322, 6144, 13, 66, 463, 20471, 3855, 49, 6144, 14993, 49925, 33, 4448, 10044, 4105, 7, 28144, 11, 374, 13, 81, 20471, 24564, 11, 7679, 12, 16, 11, 2124, 24564, 11, 266, 24564, 11, 266, 11, 4686, 12, 16, 11, 5772, 24564, 11, 5772, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 288, 83, 11, 82, 89, 796, 269, 463, 20471, 3855, 22417, 45, 67, 24564, 1968, 273, 7, 17143, 24564, 8, 198, 220, 220, 220, 611, 815, 62, 7783, 62, 22366, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 5772, 58, 16, 60, 24844, 327, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 264, 89, 6624, 7499, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2147, 198, 220, 220, 220, 886, 198, 220, 220, 220, 18896, 796, 40426, 7, 82, 89, 8, 198, 220, 220, 220, 1312, 16, 796, 352, 1343, 2659, 7, 5317, 7, 17143, 58, 16, 60, 532, 17562, 7, 86, 36911, 39364, 7, 51, 4008, 198, 220, 220, 220, 1312, 17, 796, 1312, 16, 1343, 18896, 532, 352, 198, 220, 220, 220, 611, 1312, 16, 1875, 1312, 17, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 815, 62, 7783, 62, 22366, 198, 220, 220, 220, 220, 220, 220, 220, 2147, 198, 220, 220, 220, 2073, 361, 1582, 6624, 352, 1303, 17593, 26, 19590, 389, 1007, 29813, 198, 220, 220, 220, 220, 220, 220, 220, 289, 796, 2558, 7, 81, 13, 30342, 10699, 8, 198, 220, 220, 220, 220, 220, 220, 220, 27179, 1758, 7, 1177, 7, 81, 13, 86, 11, 1312, 16, 25, 72, 17, 828, 45299, 71, 8, 198, 220, 220, 220, 2073, 1303, 10690, 198, 220, 220, 220, 220, 220, 220, 220, 1570, 7, 81, 13, 86, 11, 1312, 16, 25, 72, 17, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 2, 14496, 19182, 2176, 1104, 25, 815, 1445, 428, 284, 18912, 3258, 592, 198, 21016, 7, 64, 3712, 46141, 19182, 90, 51, 30072, 810, 1391, 51, 92, 796, 13320, 7, 51, 11, 2546, 7, 64, 4008, 198, 26009, 7, 64, 3712, 46141, 19182, 90, 51, 30072, 810, 1391, 51, 92, 796, 30002, 7, 51, 11, 2546, 7, 64, 4008, 198, 33661, 7, 87, 3712, 46141, 19182, 90, 51, 30072, 810, 309, 796, 4129, 7, 87, 27493, 7857, 1659, 7, 51, 8, 628, 198, 2, 509, 3262, 19182, 651, 9630, 48627, 36525, 1541, 5860, 257, 1570, 13, 198, 2, 775, 761, 262, 1708, 329, 374, 20471, 17143, 14, 35906, 429, 395, 284, 670, 25, 220, 220, 220, 220, 220, 220, 220, 220, 198, 14881, 13, 1177, 7, 32, 3712, 42, 3262, 19182, 11, 314, 3712, 23839, 26453, 17257, 90, 5317, 30072, 796, 651, 9630, 7, 32, 11, 314, 8, 198, 198, 2, 770, 6971, 31396, 1229, 11081, 14, 31197, 1229, 11081, 25, 198, 11748, 509, 3262, 13, 42, 3262, 3163, 20477, 25, 4808, 2655, 198, 8818, 4808, 2655, 7, 87, 3712, 49, 6144, 11, 264, 3712, 7390, 35, 713, 11, 285, 3712, 7762, 8, 198, 220, 220, 220, 611, 5145, 10134, 2539, 7, 82, 11, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 356, 761, 374, 67, 11, 1860, 691, 611, 612, 318, 257, 308, 19944, 11, 356, 389, 407, 287, 31396, 388, 1098, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 290, 611, 356, 389, 287, 474, 335, 14171, 356, 389, 11046, 11, 407, 8914, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 357, 43633, 5631, 13, 45124, 3419, 11405, 285, 14512, 9135, 49058, 11405, 5145, 7, 76, 6624, 449, 11163, 49058, 11405, 2124, 13, 81, 20471, 24564, 14512, 2147, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 49427, 796, 20084, 7, 14781, 448, 28, 87, 13, 14781, 448, 11, 28826, 28, 87, 13, 28826, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 374, 67, 796, 31475, 7, 87, 13, 30342, 10699, 11, 87, 13, 22510, 43, 6962, 11, 1860, 11, 87, 13, 15414, 19076, 11, 87, 13, 37295, 11, 87, 13, 14171, 11, 87, 13, 282, 2188, 11, 87, 13, 7890, 6030, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 374, 67, 796, 49427, 796, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1160, 2167, 37988, 25, 775, 645, 2392, 761, 284, 3440, 14, 21928, 374, 67, 14, 1860, 25, 374, 20471, 1640, 86, 481, 5678, 355, 2622, 13, 198, 220, 220, 220, 220, 220, 220, 220, 374, 67, 796, 49427, 796, 2147, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 44332, 11, 34590, 87, 11, 30736, 87, 389, 8584, 7032, 973, 416, 374, 20471, 1891, 11, 484, 466, 407, 761, 284, 307, 18984, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 308, 66, 17440, 5621, 44332, 13, 20692, 284, 327, 62, 33991, 543, 9457, 11389, 1096, 11, 1266, 407, 284, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 264, 58, 87, 60, 796, 371, 6144, 28264, 2655, 7, 87, 13, 86, 11, 82, 11, 76, 828, 4808, 2655, 7, 87, 13, 71, 11, 82, 11, 76, 828, 4808, 2655, 7, 87, 13, 66, 11, 82, 11, 76, 828, 2124, 13, 15414, 10699, 11, 2124, 13, 30342, 10699, 11, 2124, 13, 22510, 43, 6962, 11, 2124, 13, 14781, 448, 11, 2124, 13, 28826, 11, 2124, 13, 15414, 19076, 11, 2124, 13, 37295, 11, 2124, 13, 14171, 11, 2124, 13, 282, 2188, 11, 2124, 13, 7890, 6030, 11, 374, 67, 11, 49427, 11, 2147, 11, 2147, 11, 2147, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 264, 58, 87, 60, 198, 437, 198, 198, 11748, 449, 11163, 17, 198, 198, 7249, 449, 11163, 17, 49, 6144, 26, 266, 26, 289, 26, 269, 26, 5128, 10699, 26, 7104, 10699, 26, 997, 43, 6962, 26, 4268, 448, 26, 9403, 26, 5128, 19076, 26, 4571, 26, 4235, 26, 435, 2188, 26, 1366, 6030, 26, 886, 198, 41, 11163, 17, 49, 6144, 7, 87, 3712, 49, 6144, 8, 796, 449, 11163, 17, 49, 6144, 7, 87, 13, 86, 11, 2124, 13, 71, 11, 2124, 13, 66, 11, 2124, 13, 15414, 10699, 11, 2124, 13, 30342, 10699, 11, 2124, 13, 22510, 43, 6962, 11, 2124, 13, 14781, 448, 11, 2124, 13, 28826, 11, 2124, 13, 15414, 19076, 11, 2124, 13, 37295, 11, 2124, 13, 14171, 11, 2124, 13, 282, 2188, 11, 2124, 13, 7890, 6030, 8, 198, 49, 6144, 7, 87, 3712, 41, 11163, 17, 49, 6144, 8, 796, 371, 6144, 7, 87, 13, 86, 11, 2124, 13, 71, 11, 2124, 13, 66, 11, 2124, 13, 15414, 10699, 11, 2124, 13, 30342, 10699, 11, 2124, 13, 22510, 43, 6962, 11, 2124, 13, 14781, 448, 11, 2124, 13, 28826, 11, 2124, 13, 15414, 19076, 11, 2124, 13, 37295, 11, 2124, 13, 14171, 11, 2124, 13, 282, 2188, 11, 2124, 13, 7890, 6030, 11, 2147, 11, 2147, 11, 2147, 11, 2147, 11, 2147, 8, 198, 198, 41, 11163, 17, 13, 13564, 292, 7, 3712, 6030, 90, 49, 6144, 30072, 796, 449, 11163, 17, 49, 6144, 198, 41, 11163, 17, 13, 86, 1102, 1851, 7, 3712, 6030, 90, 41, 11163, 17, 49, 6144, 5512, 2124, 3712, 49, 6144, 8, 796, 449, 11163, 17, 49, 6144, 7, 87, 8, 198, 41, 11163, 17, 13, 81, 1102, 1851, 7, 3712, 6030, 90, 49, 6144, 5512, 2124, 3712, 41, 11163, 17, 49, 6144, 8, 796, 371, 6144, 7, 87, 8, 198 ]
2.143206
7,367
""" critic(decisionMat, fns) Apply CRITIC (Combined Compromise Solution) method for a given matrix and criteria types. # Arguments: - `decisionMat::DataFrame`: n × m matrix of objective values for n alternatives and m criteria - `fns::Array{Function, 1}`: m-vector of functions to be applied on the columns. # Description critic() applies the CRITIC method to rank n alterntives subject to m criteria which are supposed to be either maximized or minimized. # Output - `::CRITICResult`: CRITICResult object that holds multiple outputs including weighting and best index. # Examples ```julia-repl julia> decmat 3×4 Array{Float64,2}: 12.9918 0.7264 -1.1009 1.59814 4.1201 5.8824 3.4483 1.02156 4.1039 0.0 -0.5076 0.984469 julia> df = makeDecisionMatrix(decmat) 3×4 DataFrame Row │ Crt1 Crt2 Crt3 Crt4 │ Float64 Float64 Float64 Float64 ─────┼───────────────────────────────────── 1 │ 12.9918 0.7264 -1.1009 1.59814 2 │ 4.1201 5.8824 3.4483 1.02156 3 │ 4.1039 0.0 -0.5076 0.984469 julia> fns = [maximum, maximum, minimum, maximum]; julia> result = critic(df, fns); julia> result.w 4-element Array{Float64,1}: 0.16883905506169491 0.41844653698732126 0.24912338769165807 0.16359102025932576 julia> result.bestIndex 2 ``` # References Diakoulaki, D., Mavrotas, G., & Papayannakis, L. (1995). Determining objective weights in multiple criteria problems: The critic method. Computers & Operations Research, 22(7), 763–770. doi:10.1016/0305-0548(94)00059-h Akçakanat, Ö., Aksoy, E., Teker, T. (2018). CRITIC ve MDL Temelli EDAS Yöntemi ile TR-61 Bölgesi Bankalarının Performans Değerlendirmesi. Süleyman Demirel Üniversitesi Sosyal Bilimler Enstitüsü Dergisi, 1 (32), 1-24. """ function critic(decisionMat::DataFrame, fns::Array{Function,1})::CRITICResult row, col = size(decisionMat) colMax = colmaxs(decisionMat) colMin = colmins(decisionMat) A = similar(decisionMat) for i in 1:row for j in 1:col if fns[j] == maximum @inbounds A[i, j] = (decisionMat[i, j] - colMin[j]) / (colMax[j] - colMin[j]) elseif fns[j] == minimum @inbounds A[i, j] = (colMax[j] - decisionMat[i, j]) / (colMax[j] - colMin[j]) end end end # normalizedMat = convert(Matrix, A) normalizedMat = Matrix(A) corMat = 1 .- cor(normalizedMat) scores = zeros(Float64, col) for i in 1:col scores[i] = sum(corMat[:, i]) .* std(normalizedMat[:, i]) end w = zeros(Float64, col) for i in 1:col w[i] = scores[i] ./ sum(scores) end rankings = sortperm(w) bestIndex = rankings |> last result = CRITICResult( decisionMat, w, rankings, bestIndex ) return result end """ critic(setting) Apply CRITIC (Combined Compromise Solution) method for a given matrix and criteria types. # Arguments: - `setting::MCDMSetting`: MCDMSetting object. # Description critic() applies the CRITIC method to rank n alterntives subject to m criteria which are supposed to be either maximized or minimized. # Output - `::CRITICResult`: CRITICResult object that holds multiple outputs including weighting and best index. """ function critic(setting::MCDMSetting)::CRITICResult critic( setting.df, setting.fns ) end
[ 37811, 198, 220, 220, 220, 220, 220, 220, 220, 4014, 7, 12501, 1166, 19044, 11, 277, 5907, 8, 198, 198, 44836, 8740, 2043, 2149, 357, 20575, 1389, 3082, 398, 786, 28186, 8, 2446, 329, 257, 1813, 17593, 290, 9987, 3858, 13, 198, 198, 2, 20559, 2886, 25, 198, 532, 4600, 12501, 1166, 19044, 3712, 6601, 19778, 63, 25, 299, 13958, 285, 17593, 286, 9432, 3815, 329, 299, 14693, 290, 285, 9987, 220, 198, 532, 4600, 69, 5907, 3712, 19182, 90, 22203, 11, 352, 92, 63, 25, 285, 12, 31364, 286, 5499, 284, 307, 5625, 319, 262, 15180, 13, 198, 198, 2, 12489, 220, 198, 22213, 291, 3419, 8991, 262, 8740, 2043, 2149, 2446, 284, 4279, 299, 8343, 429, 1083, 2426, 284, 285, 9987, 543, 389, 4385, 284, 307, 220, 198, 31336, 12991, 1143, 393, 49491, 13, 198, 198, 2, 25235, 220, 198, 12, 4600, 3712, 9419, 2043, 2149, 23004, 63, 25, 8740, 2043, 2149, 23004, 2134, 326, 6622, 3294, 23862, 1390, 3463, 278, 290, 1266, 6376, 13, 198, 198, 2, 21066, 198, 15506, 63, 73, 43640, 12, 35666, 198, 198, 73, 43640, 29, 875, 6759, 198, 18, 12906, 19, 15690, 90, 43879, 2414, 11, 17, 38362, 198, 1105, 13, 2079, 1507, 220, 657, 13, 22, 18897, 220, 532, 16, 13, 3064, 24, 220, 352, 13, 41292, 1415, 198, 220, 604, 13, 1065, 486, 220, 642, 13, 3459, 1731, 220, 220, 513, 13, 2598, 5999, 220, 352, 13, 2999, 21599, 198, 220, 604, 13, 940, 2670, 220, 657, 13, 15, 220, 220, 220, 220, 532, 15, 13, 1120, 4304, 220, 657, 13, 4089, 2598, 3388, 198, 198, 73, 43640, 29, 47764, 796, 787, 10707, 1166, 46912, 7, 12501, 6759, 8, 198, 198, 18, 12906, 19, 6060, 19778, 198, 11314, 19421, 3864, 83, 16, 220, 220, 220, 220, 3864, 83, 17, 220, 220, 220, 220, 3864, 83, 18, 220, 220, 220, 220, 3864, 83, 19, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 19421, 48436, 2414, 220, 48436, 2414, 220, 48436, 2414, 220, 48436, 2414, 220, 220, 198, 16068, 7280, 6552, 120, 28542, 28542, 28542, 28542, 16068, 7280, 198, 220, 220, 352, 19421, 1105, 13, 2079, 1507, 220, 220, 657, 13, 22, 18897, 220, 532, 16, 13, 3064, 24, 220, 352, 13, 41292, 1415, 198, 220, 220, 362, 19421, 220, 604, 13, 1065, 486, 220, 220, 642, 13, 3459, 1731, 220, 220, 513, 13, 2598, 5999, 220, 352, 13, 2999, 21599, 198, 220, 220, 513, 19421, 220, 604, 13, 940, 2670, 220, 220, 657, 13, 15, 220, 220, 220, 220, 532, 15, 13, 1120, 4304, 220, 657, 13, 4089, 2598, 3388, 198, 198, 73, 43640, 29, 277, 5907, 796, 685, 47033, 11, 5415, 11, 5288, 11, 5415, 11208, 198, 198, 73, 43640, 29, 1255, 796, 4014, 7, 7568, 11, 277, 5907, 1776, 198, 198, 73, 43640, 29, 1255, 13, 86, 198, 19, 12, 30854, 15690, 90, 43879, 2414, 11, 16, 38362, 198, 657, 13, 1433, 3459, 2670, 2713, 35638, 22172, 41289, 198, 657, 13, 39667, 2598, 2996, 2623, 44183, 2624, 19420, 198, 657, 13, 21626, 1065, 2091, 5774, 3388, 20986, 36928, 198, 657, 13, 1433, 30743, 940, 1238, 1495, 6052, 1495, 4304, 198, 198, 73, 43640, 29, 1255, 13, 13466, 15732, 198, 17, 198, 15506, 63, 198, 2, 31458, 198, 198, 18683, 461, 2852, 8182, 11, 360, 1539, 337, 615, 10599, 292, 11, 402, 1539, 1222, 14185, 323, 1236, 27321, 11, 406, 13, 357, 21908, 737, 360, 13221, 278, 9432, 19590, 287, 3294, 9987, 2761, 25, 383, 4014, 2446, 13, 22476, 364, 1222, 16205, 4992, 11, 2534, 7, 22, 828, 767, 5066, 1906, 41820, 13, 23899, 25, 940, 13, 27956, 14, 15, 22515, 12, 2713, 2780, 7, 5824, 8, 830, 3270, 12, 71, 220, 198, 33901, 16175, 461, 272, 265, 11, 43307, 1539, 9084, 568, 88, 11, 412, 1539, 309, 28233, 11, 309, 13, 357, 7908, 737, 8740, 2043, 2149, 1569, 10670, 43, 5825, 23225, 8392, 1921, 575, 9101, 429, 43967, 220, 576, 7579, 12, 5333, 347, 9101, 75, 3212, 72, 5018, 282, 283, 30102, 77, 30102, 77, 35006, 504, 1024, 33133, 263, 75, 437, 2533, 46551, 13, 311, 9116, 1636, 805, 1897, 557, 75, 49363, 77, 1191, 2737, 72, 311, 418, 88, 282, 24207, 320, 1754, 2039, 301, 270, 9116, 82, 9116, 360, 6422, 23267, 11, 352, 357, 2624, 828, 352, 12, 1731, 13, 198, 198, 37811, 198, 8818, 4014, 7, 12501, 1166, 19044, 3712, 6601, 19778, 11, 277, 5907, 3712, 19182, 90, 22203, 11, 16, 92, 2599, 25, 9419, 2043, 2149, 23004, 198, 220, 220, 220, 220, 198, 220, 220, 220, 5752, 11, 951, 796, 2546, 7, 12501, 1166, 19044, 8, 198, 220, 220, 220, 951, 11518, 796, 951, 9806, 82, 7, 12501, 1166, 19044, 8, 198, 220, 220, 220, 951, 9452, 796, 951, 42951, 7, 12501, 1166, 19044, 8, 628, 220, 220, 220, 317, 796, 2092, 7, 12501, 1166, 19044, 8, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 808, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 352, 25, 4033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 277, 5907, 58, 73, 60, 6624, 5415, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 317, 58, 72, 11, 474, 60, 796, 357, 12501, 1166, 19044, 58, 72, 11, 474, 60, 532, 951, 9452, 58, 73, 12962, 1220, 357, 4033, 11518, 58, 73, 60, 532, 951, 9452, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 277, 5907, 58, 73, 60, 6624, 5288, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 317, 58, 72, 11, 474, 60, 796, 357, 4033, 11518, 58, 73, 60, 532, 2551, 19044, 58, 72, 11, 474, 12962, 1220, 357, 4033, 11518, 58, 73, 60, 532, 951, 9452, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 39279, 19044, 796, 10385, 7, 46912, 11, 317, 8, 198, 220, 220, 220, 39279, 19044, 796, 24936, 7, 32, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1162, 19044, 796, 352, 764, 12, 1162, 7, 11265, 1143, 19044, 8, 628, 220, 220, 220, 8198, 796, 1976, 27498, 7, 43879, 2414, 11, 951, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 4033, 198, 220, 220, 220, 220, 220, 220, 220, 8198, 58, 72, 60, 796, 2160, 7, 10215, 19044, 58, 45299, 1312, 12962, 764, 9, 14367, 7, 11265, 1143, 19044, 58, 45299, 1312, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 266, 796, 1976, 27498, 7, 43879, 2414, 11, 951, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 4033, 198, 220, 220, 220, 220, 220, 220, 220, 266, 58, 72, 60, 796, 8198, 58, 72, 60, 24457, 2160, 7, 1416, 2850, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 16905, 796, 3297, 16321, 7, 86, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1266, 15732, 796, 16905, 930, 29, 938, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1255, 796, 8740, 2043, 2149, 23004, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2551, 19044, 11, 198, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 16905, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1266, 15732, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1441, 1255, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 4014, 7, 33990, 8, 198, 198, 44836, 8740, 2043, 2149, 357, 20575, 1389, 3082, 398, 786, 28186, 8, 2446, 329, 257, 1813, 17593, 290, 9987, 3858, 13, 198, 198, 2, 20559, 2886, 25, 198, 532, 4600, 33990, 3712, 44, 8610, 5653, 35463, 63, 25, 337, 8610, 5653, 35463, 2134, 13, 220, 198, 220, 198, 2, 12489, 220, 198, 22213, 291, 3419, 8991, 262, 8740, 2043, 2149, 2446, 284, 4279, 299, 8343, 429, 1083, 2426, 284, 285, 9987, 543, 389, 4385, 284, 307, 220, 198, 31336, 12991, 1143, 393, 49491, 13, 198, 198, 2, 25235, 220, 198, 12, 4600, 3712, 9419, 2043, 2149, 23004, 63, 25, 8740, 2043, 2149, 23004, 2134, 326, 6622, 3294, 23862, 1390, 3463, 278, 290, 1266, 6376, 13, 198, 37811, 198, 8818, 4014, 7, 33990, 3712, 44, 8610, 5653, 35463, 2599, 25, 9419, 2043, 2149, 23004, 198, 220, 220, 220, 4014, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4634, 13, 7568, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4634, 13, 69, 5907, 198, 220, 220, 220, 1267, 198, 437, 220 ]
2.334459
1,480
using InfrastructureSystems using PowerSystems using InteractiveUtils const IS = InfrastructureSystems const PSY = PowerSystems IS.strip_module_name function _check_exception(T, exceptions::Vector) for type_exception in exceptions if T <: type_exception return true end end return false end function _write_first_level_markdown(c::String) file_name = "model_library/generated_$(c).md" open(joinpath("docs/src", file_name), "w") do io print( io, """ # $(c) ```@autodocs Modules = [PowerSystems] Pages = ["generated/$(c).jl"] Order = [:type, :function] Public = true ``` """, ) end return file_name end function _write_second_level_markdown(input::DataType, subtypes::Vector{DataType}, exceptions) c = IS.strip_module_name(input) file_name = "model_library/generated_$(c).md" open(joinpath("docs/src", file_name), "w") do io print(io, "# $input\n\n") for T_ in subtypes _check_exception(T_, exceptions) && continue T = IS.strip_module_name(T_) print( io, """ ## $(T) ```@autodocs Modules = [PowerSystems] Pages = ["/$(T).jl"] Order = [:type, :function] Public = true ``` """, ) end end return file_name end function make_dynamics_library!(model_library; dyn_categories =[ PSY.DynamicGeneratorComponent, PSY.DynamicInverterComponent, ], exceptions = [PSY.OuterControl, PSY.ActivePowerControl, PSY.ReactivePowerControl,], manual_additions = Dict{String, Any}("DynamicInverterComponent" => Any["OuterControl" => "model_library/outer_control.md"]) ) for abstract_type in dyn_categories @info "Making entries for subtypes of $abstract_type" abstract_type_string = IS.strip_module_name(abstract_type) addition = Dict{String, Any}() internal_index = Any[] for c_ in subtypes(abstract_type) c_string = IS.strip_module_name(c_) _check_exception(c_, exceptions) && continue concretes = IS.get_all_concrete_subtypes(c_) file_name = _write_second_level_markdown(c_, concretes, exceptions) push!(internal_index, c_string => file_name) end push!(model_library, abstract_type_string => internal_index) if haskey(manual_additions, abstract_type_string) addition = get(manual_additions, abstract_type_string, nothing) push!(model_library[abstract_type_string], addition...) end end end function make_model_library(; categories = [], exceptions = [], manual_additions = Dict{String, Any}() ) model_library = Dict{String, Any}() for abstract_type in categories @info "Making entries for subtypes of $abstract_type" internal_index = Any[] concrete = IS.get_all_concrete_subtypes(abstract_type) for c_ in concrete _check_exception(c_, exceptions) && continue c = IS.strip_module_name(c_) file_name = _write_first_level_markdown(c) push!(internal_index, c => file_name) end isempty(internal_index) && continue model_library[IS.strip_module_name(abstract_type)] = internal_index end make_dynamics_library!(model_library) for (k, v) in manual_additions if haskey(model_library, k) push!(model_library[k], v...) else model_library[k] = v end end return Any[p for p in model_library] end
[ 3500, 33709, 11964, 82, 198, 3500, 4333, 11964, 82, 198, 3500, 21365, 18274, 4487, 198, 9979, 3180, 796, 33709, 11964, 82, 198, 9979, 6599, 56, 796, 4333, 11964, 82, 198, 198, 1797, 13, 36311, 62, 21412, 62, 3672, 198, 198, 8818, 4808, 9122, 62, 1069, 4516, 7, 51, 11, 13269, 3712, 38469, 8, 198, 220, 220, 220, 329, 2099, 62, 1069, 4516, 287, 13269, 198, 220, 220, 220, 220, 220, 220, 220, 611, 309, 1279, 25, 2099, 62, 1069, 4516, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 3991, 198, 437, 198, 198, 8818, 4808, 13564, 62, 11085, 62, 5715, 62, 4102, 2902, 7, 66, 3712, 10100, 8, 198, 220, 220, 220, 2393, 62, 3672, 796, 366, 19849, 62, 32016, 14, 27568, 62, 3, 7, 66, 737, 9132, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 7, 22179, 6978, 7203, 31628, 14, 10677, 1600, 2393, 62, 3672, 828, 366, 86, 4943, 466, 33245, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33245, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29568, 66, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 31, 2306, 375, 420, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3401, 5028, 796, 685, 13434, 11964, 82, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28221, 220, 220, 796, 14631, 27568, 32624, 7, 66, 737, 20362, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8284, 796, 685, 25, 4906, 11, 1058, 8818, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5094, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2393, 62, 3672, 198, 437, 198, 198, 8818, 4808, 13564, 62, 12227, 62, 5715, 62, 4102, 2902, 7, 15414, 3712, 6601, 6030, 11, 850, 19199, 3712, 38469, 90, 6601, 6030, 5512, 13269, 8, 198, 220, 220, 220, 269, 796, 3180, 13, 36311, 62, 21412, 62, 3672, 7, 15414, 8, 198, 220, 220, 220, 2393, 62, 3672, 796, 366, 19849, 62, 32016, 14, 27568, 62, 3, 7, 66, 737, 9132, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1280, 7, 22179, 6978, 7203, 31628, 14, 10677, 1600, 2393, 62, 3672, 828, 366, 86, 4943, 466, 33245, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 25113, 720, 15414, 59, 77, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 309, 62, 287, 850, 19199, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 9122, 62, 1069, 4516, 7, 51, 62, 11, 13269, 8, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 796, 3180, 13, 36311, 62, 21412, 62, 3672, 7, 51, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33245, 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, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22492, 29568, 51, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 31, 2306, 375, 420, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3401, 5028, 796, 685, 13434, 11964, 82, 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, 28221, 220, 220, 796, 14631, 32624, 7, 51, 737, 20362, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8284, 796, 685, 25, 4906, 11, 1058, 8818, 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, 5094, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2393, 62, 3672, 198, 437, 198, 198, 8818, 787, 62, 67, 4989, 873, 62, 32016, 0, 7, 19849, 62, 32016, 26, 198, 67, 2047, 62, 66, 26129, 796, 58, 198, 220, 220, 220, 6599, 56, 13, 44090, 8645, 1352, 21950, 11, 198, 220, 220, 220, 6599, 56, 13, 44090, 818, 332, 353, 21950, 11, 198, 4357, 198, 1069, 11755, 796, 685, 3705, 56, 13, 7975, 263, 15988, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6599, 56, 13, 13739, 13434, 15988, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6599, 56, 13, 3041, 5275, 13434, 15988, 11, 4357, 198, 198, 805, 723, 62, 2860, 1756, 796, 360, 713, 90, 10100, 11, 4377, 92, 7203, 44090, 818, 332, 353, 21950, 1, 5218, 4377, 14692, 7975, 263, 15988, 1, 5218, 366, 19849, 62, 32016, 14, 39605, 62, 13716, 13, 9132, 8973, 8, 198, 8, 198, 220, 220, 220, 329, 12531, 62, 4906, 287, 37860, 62, 66, 26129, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 23874, 12784, 329, 850, 19199, 286, 720, 397, 8709, 62, 4906, 1, 198, 220, 220, 220, 220, 220, 220, 220, 12531, 62, 4906, 62, 8841, 796, 3180, 13, 36311, 62, 21412, 62, 3672, 7, 397, 8709, 62, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3090, 796, 360, 713, 90, 10100, 11, 4377, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5387, 62, 9630, 796, 4377, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 62, 287, 850, 19199, 7, 397, 8709, 62, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 62, 8841, 796, 3180, 13, 36311, 62, 21412, 62, 3672, 7, 66, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 9122, 62, 1069, 4516, 7, 66, 62, 11, 13269, 8, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1673, 1186, 274, 796, 3180, 13, 1136, 62, 439, 62, 1102, 38669, 62, 7266, 19199, 7, 66, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 3672, 796, 4808, 13564, 62, 12227, 62, 5715, 62, 4102, 2902, 7, 66, 62, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1673, 1186, 274, 11, 13269, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 32538, 62, 9630, 11, 269, 62, 8841, 5218, 2393, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 19849, 62, 32016, 11, 12531, 62, 4906, 62, 8841, 5218, 5387, 62, 9630, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 805, 723, 62, 2860, 1756, 11, 12531, 62, 4906, 62, 8841, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3090, 796, 651, 7, 805, 723, 62, 2860, 1756, 11, 12531, 62, 4906, 62, 8841, 11, 2147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 19849, 62, 32016, 58, 397, 8709, 62, 4906, 62, 8841, 4357, 3090, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 787, 62, 19849, 62, 32016, 7, 26, 198, 220, 220, 220, 9376, 796, 685, 4357, 198, 220, 220, 220, 13269, 796, 685, 4357, 198, 220, 220, 220, 10107, 62, 2860, 1756, 796, 360, 713, 90, 10100, 11, 4377, 92, 3419, 198, 8, 628, 220, 220, 220, 2746, 62, 32016, 796, 360, 713, 90, 10100, 11, 4377, 92, 3419, 628, 220, 220, 220, 329, 12531, 62, 4906, 287, 9376, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 23874, 12784, 329, 850, 19199, 286, 720, 397, 8709, 62, 4906, 1, 198, 220, 220, 220, 220, 220, 220, 220, 5387, 62, 9630, 796, 4377, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 10017, 796, 3180, 13, 1136, 62, 439, 62, 1102, 38669, 62, 7266, 19199, 7, 397, 8709, 62, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 269, 62, 287, 10017, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 9122, 62, 1069, 4516, 7, 66, 62, 11, 13269, 8, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 796, 3180, 13, 36311, 62, 21412, 62, 3672, 7, 66, 62, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 3672, 796, 4808, 13564, 62, 11085, 62, 5715, 62, 4102, 2902, 7, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 32538, 62, 9630, 11, 269, 5218, 2393, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 318, 28920, 7, 32538, 62, 9630, 8, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 32016, 58, 1797, 13, 36311, 62, 21412, 62, 3672, 7, 397, 8709, 62, 4906, 15437, 796, 5387, 62, 9630, 198, 220, 220, 220, 886, 628, 220, 220, 220, 787, 62, 67, 4989, 873, 62, 32016, 0, 7, 19849, 62, 32016, 8, 628, 220, 220, 220, 329, 357, 74, 11, 410, 8, 287, 10107, 62, 2860, 1756, 198, 220, 220, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 19849, 62, 32016, 11, 479, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 19849, 62, 32016, 58, 74, 4357, 410, 23029, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 32016, 58, 74, 60, 796, 410, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 4377, 58, 79, 329, 279, 287, 2746, 62, 32016, 60, 198, 437, 198 ]
1.971566
2,075
# create Vec @testset "Vec{$ST}" begin vtype = PETSc.C.VECMPI vec = PETSc.Vec(ST, vtype) resize!(vec, 4) @test_throws ArgumentError resize!(vec) len_ret = length(vec) @test length(vec) == 4 @test size(vec) == (4,) @test lengthlocal(vec) == 4 @test sizelocal(vec) == (4,) @test PETSc.gettype(vec) == PETSc.C.VECMPI vt = complex(2.,2) # use vt to hold temporary values vec[1] = RC(vt) val_ret = vec[1] @test vec[1] == RC(vt) vec2 = similar(vec,ST) PETSc.AssemblyBegin(vec2) PETSc.AssemblyEnd(vec2) @test isassembled(vec2) val2_ret = vec2[1] @test val2_ret != val_ret if gettype(vec2) == PETSc.C.VECSEQ lv2 = localpart(vec2) @test lv2 == vec2 end vec_tmp = Vec([1., 2, 3]) @test PETSc.isfinalized(vec_tmp) == false PETSc.PetscDestroy(vec_tmp) @test PETSc.isfinalized(vec_tmp) == true vec3 = similar(vec, ST, 5) @test length(vec3) == 5 vec4 = copy(vec) @test vec4 ≈ vec idx = [1,3, 4] vt = RC(complex(2.,2)) vec4[idx] = vt vals_ret = vec4[idx] @test vals_ret == fill(vt,length(idx)) vt = RC(complex(3.,3)) fill!(vec4, vt) @test vec4 ≈ fill(vt,length(vec4)) vt = RC(complex( 4.,4)) vec4[1:2] = vt @test vec4[1:2] == [vt, vt] vals = [RC(complex(1,1.)), RC(complex(3.,3)), RC(complex(4., 3))] vec4[idx] = vals @test vec4[idx] == vals vec5 = Vec(Float64, 4) varr = LocalVector(vec5) @test length(vec5) == 4 @test length(varr) == length(vec5) @test stride(varr, 1) == 1 vec5j = [1., 2, 3, 4] for i=1:length(vec5) varr[i] = vec5j[i] end @test varr[1] == vec5j[1] @test varr == vec5j varr2 = similar(varr) T2 = eltype(varr) @test typeof(varr2) == Array{eltype(T2), 1} ptr = Base.unsafe_convert(Ptr{T2}, varr) @test ptr == varr.ref[] restore(varr) @test vec5 == vec5j varr = LocalVector_readonly(vec5) for i=1:length(vec5) @test varr[i] == vec5[i] end restore(varr) # test mlocal constructor vec5 = Vec(ST, mlocal=3) @test length(vec5) == 3 @testset "testing logical indexing" begin logicals = Array(Bool, length(vec4)) for i=eachindex(logicals) logicals[i] = false end logicals[2] = true vt = RC(complex(5,5.)) vec4[logicals] = vt @test vec4[2] ≈ vt @test vec4[1] != vt vt = RC(complex(rand(), rand())) vals = [vt] vec4[logicals] = vals @test vec4[2] ≈ vals[1] @test vec4[1] != vals[1] # reset vec4 vec4_j = zeros(ST, length(vec4)) for i=1:length(vec4) vec4[i] = RC(complex(Float64(-i), Float64(-i))) vec4_j[i] = RC(complex(Float64(-i), Float64(-i))) end end @testset "testing math functions" begin @testset "testin chop" begin jvec = RC([complex(1.0, 1.0), complex(2.0, 2.0), complex(3.0, 3.0)]) pvec = Vec(jvec) chop!(pvec, RT(1.5)) jvec[1] = 0.0 @test pvec ≈ jvec end vec4_j = zeros(ST, length(vec4)) for i=1:length(vec4) vec4[i] = RC(complex(Float64(-i), Float64(-i))) vec4_j[i] = RC(complex(Float64(-i), Float64(-i))) end @testset "testing abs" begin vec4_j = abs(vec4_j) absv4 = abs(vec4) abs!(vec4) if VERSION >= v"0.5.0-dev+0" @test real(vec4) ≈ vec4_j @test real(absv4) ≈ vec4_j @test imag(vec4) ≈ zeros(vec4_j) @test imag(absv4) ≈ zeros(vec4_j) else @test vec4 == vec4_j @test absv4 == vec4_j end end @testset "testing exp" begin vec4_j = exp(vec4_j) exp!(vec4) @test vec4 ≈ vec4_j end @testset "testing log" begin vec4_j = log(vec4_j) log!(vec4) @test vec4 ≈ vec4_j end onevec = PETSc.Vec(ST, vtype) resize!(onevec, 4) PETSc.AssemblyBegin(onevec) PETSc.AssemblyEnd(onevec) for i=1:length(onevec) onevec[i] = one(ST) end @testset "testing norm" begin @test_throws ArgumentError norm(onevec,3) @test norm(onevec,Inf) == 1 normvec = copy(onevec) PETSc.normalize!(normvec) @test norm(normvec,2) == one(ST) end if ST <: Real @testset "testing max and min" begin maxvec = copy(onevec) maxvec[1] = ST(2) @test maximum(maxvec) == 2 @test findmax(maxvec) == (2.0,1) minvec = copy(onevec) minvec[1] = ST(0) @test minimum(minvec) == 0 @test findmin(minvec) == (0.0,1) end end @testset "testing pointwise max, min, /" begin div1vec = 2*copy(onevec) div2vec = 4*copy(onevec) @test max(div1vec,div2vec) == div2vec @test min(div1vec,div2vec) == div1vec @test div1vec .* div2vec == 8*onevec @test div2vec ./ div1vec == div1vec end @testset "testing scale! and negation" begin scalevec = scale!(copy(onevec),2) @test scalevec == fill(2,length(onevec)) minusvec = -onevec @test minusvec == -onevec end @testset "testing sum, +, -, *, and /" begin @test sum(onevec) == length(onevec) multvec = copy(onevec) multvec = multvec * 2 * 3 * 4 @test multvec == 24*onevec multvec = copy(onevec) multvec = 2 .* multvec @test multvec == 2*onevec divvec = copy(onevec) divvec = divvec * 2 * 3 divvec = divvec ./ 2 @test divvec == 3*onevec divvec = 3 .\ divvec @test divvec == onevec divvec = 2*copy(onevec) divvec = 2 ./ divvec @test divvec == onevec addvec = copy(onevec) addvec = addvec + 2 addvec = addvec - 2 @test addvec == onevec addvec = copy(onevec) addvec = 2 - addvec addvec = 2 + addvec @test addvec == 3*onevec end end @testset "testing dot product" begin val = dot(vec4, vec) val_j = dot(vec4, vec) @test val == val_j end # make copies of vecs 1 2 4 @testset "testing level 1 Blas" begin vecj = zeros(ST, length(vec)) vec2j = zeros(ST, length(vec)) vec4j = zeros(ST, length(vec)) for i=1:length(vec) vecj[i] = vec[i] vec2j[i] = vec2[i] vec4j[i] = vec4[i] end @testset "testing axpy" begin vt = RC(complex(2.,2)) axpy!(vt, vec, vec2) vec2j = vt*vecj + vec2j @test vec2j == vec2 @testset "testing 4 argument axpy" begin axpy!(vt, vec, vec2, vec4) vec4j = vt*vecj + vec2j @test vec2j == vec2 end @testset "testing aypx" begin aypx!(vec, vt, vec2) vec2j = vt*vec2j + vec @test vec2j == vec2 end vt2 = RC(complex(3.,3)) vt3 = RC(complex(4.,4)) @testset "testing axpby" begin axpby!(vt, vec, vt2, vec2) vec2j = vt*vecj + vt2*vec2j @test vec2j == vec2 axpbypcz!(vt, vec, vt2, vec2, vt3, vec4) vec4j = vt*vecj + vt2*vec2j + vt3*vec4j @test vec4j == vec4 end vecs = Array(typeof(vec), 2) vecs[1] = vec vecs[2] = vec2 alphas = [vt2, vt3] axpy!(vec4, alphas, vecs) vec4j = vec4j + vt2*vecj + vt3*vec2j @test vec4j == vec4 end @testset "testing .*, ./, .^" begin vec5 = Vec(ST, 3, vtype=PETSc.C.VECMPI) vec6 = similar(vec5) vec5j = zeros(ST, 3) vec6j = zeros(ST, 3) for i=1:3 i_float = Float64(i) vec5[i] = RC(complex(i_float, i_float)) vec6[i] = RC(complex(i_float+3, i_float+3)) vec5j[i] = RC(complex(i_float, i_float)) vec6j[i] = RC(complex(i_float +3, i_float+3)) end vec7 = vec5.*vec6 vec7j = vec5j.*vec6j @test vec7 ≈ vec7j vec8 = vec5./vec6 vec8j = vec5j./vec6j @test vec8 ≈ vec8j vec9 = vec5.^3 vec9j = vec5j.^3 @test vec9 ≈ vec9j vec10 = vec5 + vec6 vec10j = vec5j + vec6j @test vec10 ≈ vec10j vec11 = vec5 - vec6 vec11j = vec5j - vec6j @test vec11 ≈ vec11j end @testset "test unconjugated dot product" begin x = Vec(ST, 2) y = Vec(ST, 2) copy!(y, [1, 1]) if ST <: Complex copy!(x, [1, im]) @test (x'*y)[1] == 1-im @test (x.'*y)[1] == 1+im else copy!(x, [2, 3]) @test (x'*y)[1] == 5 @test (x.'*y)[1] == 5 end end end let x = rand(ST, 7) @test Vec(x) == x end @testset "map" begin x = rand(3) y = Vec(x) map!(sin, x) map!(sin, y) @test x ≈ y x2 = map(sin, x) y2 = map(sin, y) @test x2 ≈ y2 function myfunc(a, b) return a + b end x3 = copy(x2) y3 = copy(y2) map!(myfunc, x3, x2, x) map!(myfunc, y3, y2, y) @test x3 ≈ y3 end @testset "advanced indexing" begin x = zeros(ST, 5) y = Vec(ST, 5) idxs = Int32[0, 1] vals = ST[1, 2] set_values!(x, idxs, vals) set_values!(y, idxs, vals) assemble(x) assemble(y) for i=1:length(idxs) @test x[idxs[i]+1] ≈ vals[i] @test y[idxs[i]+1] ≈ vals[i] end vals = ST[2,3] ltog = local_to_global_mapping(y) set_local_to_global_mapping(y, ltog) set_values_local!(x, idxs, vals) set_values_local!(y, idxs, vals) assemble(x) assemble(y) for i=1:length(idxs) @test x[idxs[i]+1] ≈ vals[i] @test y[idxs[i]+1] ≈ vals[i] end y2 = Vec(ST, 4, bs=2) @test get_blocksize(y2) == 2 idxs = Int32[0] vals = ST[1, 2] set_values_blocked!(y2, idxs, vals) @test y2[idxs[1]+1] ≈ vals[1] @test y2[idxs[1]+2] ≈ vals[2] rng = localpart(y2) ltog = local_to_global_mapping(y2) set_local_to_global_mapping(y2, ltog) idx = Int32[1] vals = ST[2,3] set_values_blocked_local!(y2, idxs, vals) @test y2[idxs[1]+1] ≈ vals[1] @test y2[idxs[1]+2] ≈ vals[2] end end
[ 2, 2251, 38692, 198, 31, 9288, 2617, 366, 53, 721, 90, 3, 2257, 36786, 2221, 198, 220, 410, 4906, 796, 32043, 3351, 13, 34, 13, 53, 2943, 7378, 40, 198, 220, 43030, 796, 32043, 3351, 13, 53, 721, 7, 2257, 11, 410, 4906, 8, 198, 220, 47558, 0, 7, 35138, 11, 604, 8, 198, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 47558, 0, 7, 35138, 8, 198, 220, 18896, 62, 1186, 796, 4129, 7, 35138, 8, 628, 220, 2488, 9288, 4129, 7, 35138, 8, 6624, 604, 198, 220, 2488, 9288, 2546, 7, 35138, 8, 6624, 357, 19, 35751, 198, 220, 2488, 9288, 4129, 12001, 7, 35138, 8, 6624, 604, 198, 220, 2488, 9288, 264, 528, 417, 4374, 7, 35138, 8, 6624, 357, 19, 35751, 198, 220, 2488, 9288, 32043, 3351, 13, 1136, 4906, 7, 35138, 8, 6624, 32043, 3351, 13, 34, 13, 53, 2943, 7378, 40, 628, 198, 220, 410, 83, 796, 3716, 7, 17, 1539, 17, 8, 220, 1303, 779, 410, 83, 284, 1745, 8584, 3815, 198, 220, 43030, 58, 16, 60, 796, 13987, 7, 36540, 8, 198, 220, 1188, 62, 1186, 796, 43030, 58, 16, 60, 198, 220, 2488, 9288, 43030, 58, 16, 60, 6624, 13987, 7, 36540, 8, 628, 220, 43030, 17, 796, 2092, 7, 35138, 11, 2257, 8, 198, 220, 32043, 3351, 13, 49670, 44140, 7, 35138, 17, 8, 198, 220, 32043, 3351, 13, 49670, 12915, 7, 35138, 17, 8, 628, 220, 2488, 9288, 318, 46826, 7, 35138, 17, 8, 198, 220, 1188, 17, 62, 1186, 796, 43030, 17, 58, 16, 60, 628, 220, 2488, 9288, 1188, 17, 62, 1186, 14512, 1188, 62, 1186, 628, 220, 611, 651, 4906, 7, 35138, 17, 8, 6624, 32043, 3351, 13, 34, 13, 53, 2943, 5188, 48, 198, 220, 220, 220, 300, 85, 17, 796, 1957, 3911, 7, 35138, 17, 8, 198, 220, 220, 220, 2488, 9288, 300, 85, 17, 6624, 43030, 17, 198, 220, 886, 628, 220, 43030, 62, 22065, 796, 38692, 26933, 16, 1539, 362, 11, 513, 12962, 198, 220, 2488, 9288, 32043, 3351, 13, 4468, 1292, 1143, 7, 35138, 62, 22065, 8, 6624, 3991, 198, 220, 32043, 3351, 13, 47, 1039, 66, 49174, 7, 35138, 62, 22065, 8, 198, 220, 2488, 9288, 32043, 3351, 13, 4468, 1292, 1143, 7, 35138, 62, 22065, 8, 6624, 2081, 628, 220, 43030, 18, 796, 2092, 7, 35138, 11, 3563, 11, 642, 8, 198, 220, 2488, 9288, 4129, 7, 35138, 18, 8, 6624, 642, 628, 220, 43030, 19, 796, 4866, 7, 35138, 8, 198, 220, 2488, 9288, 43030, 19, 15139, 230, 43030, 628, 220, 4686, 87, 796, 685, 16, 11, 18, 11, 604, 60, 198, 220, 410, 83, 796, 13987, 7, 41887, 7, 17, 1539, 17, 4008, 198, 220, 43030, 19, 58, 312, 87, 60, 796, 410, 83, 198, 220, 410, 874, 62, 1186, 796, 43030, 19, 58, 312, 87, 60, 198, 220, 2488, 9288, 410, 874, 62, 1186, 6624, 6070, 7, 36540, 11, 13664, 7, 312, 87, 4008, 628, 220, 410, 83, 796, 13987, 7, 41887, 7, 18, 1539, 18, 4008, 198, 220, 6070, 0, 7, 35138, 19, 11, 410, 83, 8, 628, 220, 2488, 9288, 43030, 19, 15139, 230, 6070, 7, 36540, 11, 13664, 7, 35138, 19, 4008, 628, 220, 410, 83, 796, 13987, 7, 41887, 7, 604, 1539, 19, 4008, 198, 220, 43030, 19, 58, 16, 25, 17, 60, 796, 410, 83, 628, 220, 2488, 9288, 43030, 19, 58, 16, 25, 17, 60, 6624, 685, 36540, 11, 410, 83, 60, 628, 220, 410, 874, 796, 685, 7397, 7, 41887, 7, 16, 11, 16, 2014, 828, 13987, 7, 41887, 7, 18, 1539, 18, 36911, 13987, 7, 41887, 7, 19, 1539, 513, 4008, 60, 198, 220, 43030, 19, 58, 312, 87, 60, 796, 410, 874, 628, 220, 2488, 9288, 43030, 19, 58, 312, 87, 60, 6624, 410, 874, 628, 198, 220, 43030, 20, 796, 38692, 7, 43879, 2414, 11, 604, 8, 198, 220, 1401, 81, 796, 10714, 38469, 7, 35138, 20, 8, 198, 220, 2488, 9288, 4129, 7, 35138, 20, 8, 6624, 604, 198, 220, 2488, 9288, 4129, 7, 85, 3258, 8, 6624, 4129, 7, 35138, 20, 8, 198, 220, 2488, 9288, 33769, 7, 85, 3258, 11, 352, 8, 6624, 352, 198, 220, 43030, 20, 73, 796, 685, 16, 1539, 362, 11, 513, 11, 604, 60, 198, 220, 329, 1312, 28, 16, 25, 13664, 7, 35138, 20, 8, 220, 1401, 81, 58, 72, 60, 796, 43030, 20, 73, 58, 72, 60, 886, 198, 220, 220, 198, 220, 2488, 9288, 1401, 81, 58, 16, 60, 6624, 43030, 20, 73, 58, 16, 60, 198, 220, 2488, 9288, 1401, 81, 6624, 43030, 20, 73, 628, 220, 1401, 81, 17, 796, 2092, 7, 85, 3258, 8, 198, 220, 309, 17, 796, 1288, 4906, 7, 85, 3258, 8, 198, 220, 2488, 9288, 2099, 1659, 7, 85, 3258, 17, 8, 6624, 15690, 90, 417, 4906, 7, 51, 17, 828, 352, 92, 198, 220, 50116, 796, 7308, 13, 13271, 8635, 62, 1102, 1851, 7, 46745, 90, 51, 17, 5512, 1401, 81, 8, 220, 198, 220, 2488, 9288, 50116, 6624, 1401, 81, 13, 5420, 21737, 628, 220, 11169, 7, 85, 3258, 8, 628, 220, 2488, 9288, 43030, 20, 6624, 43030, 20, 73, 628, 220, 1401, 81, 796, 10714, 38469, 62, 961, 8807, 7, 35138, 20, 8, 198, 220, 329, 1312, 28, 16, 25, 13664, 7, 35138, 20, 8, 2488, 9288, 1401, 81, 58, 72, 60, 6624, 220, 43030, 20, 58, 72, 60, 886, 198, 220, 11169, 7, 85, 3258, 8, 198, 220, 220, 628, 220, 1303, 1332, 285, 12001, 23772, 198, 220, 43030, 20, 796, 38692, 7, 2257, 11, 285, 12001, 28, 18, 8, 198, 220, 2488, 9288, 4129, 7, 35138, 20, 8, 6624, 513, 628, 220, 2488, 9288, 2617, 366, 33407, 12219, 6376, 278, 1, 2221, 198, 220, 220, 220, 220, 220, 12219, 82, 796, 15690, 7, 33, 970, 11, 4129, 7, 35138, 19, 4008, 198, 220, 220, 220, 220, 220, 329, 1312, 28, 27379, 9630, 7, 6404, 20155, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12219, 82, 58, 72, 60, 796, 3991, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 12219, 82, 58, 17, 60, 796, 2081, 628, 220, 220, 220, 220, 220, 410, 83, 796, 13987, 7, 41887, 7, 20, 11, 20, 2014, 8, 198, 220, 220, 220, 220, 220, 43030, 19, 58, 6404, 20155, 60, 796, 410, 83, 628, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 58, 17, 60, 15139, 230, 410, 83, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 58, 16, 60, 14512, 410, 83, 628, 220, 220, 220, 220, 220, 410, 83, 796, 13987, 7, 41887, 7, 25192, 22784, 43720, 3419, 4008, 198, 220, 220, 220, 220, 220, 410, 874, 796, 685, 36540, 60, 198, 220, 220, 220, 220, 220, 43030, 19, 58, 6404, 20155, 60, 796, 410, 874, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 58, 17, 60, 15139, 230, 410, 874, 58, 16, 60, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 58, 16, 60, 14512, 410, 874, 58, 16, 60, 628, 220, 220, 220, 220, 220, 1303, 13259, 43030, 19, 198, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 796, 1976, 27498, 7, 2257, 11, 4129, 7, 35138, 19, 4008, 198, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 19, 58, 72, 60, 796, 13987, 7, 41887, 7, 43879, 2414, 32590, 72, 828, 48436, 2414, 32590, 72, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 58, 72, 60, 796, 13987, 7, 41887, 7, 43879, 2414, 32590, 72, 828, 48436, 2414, 32590, 72, 22305, 198, 220, 220, 220, 220, 220, 886, 198, 220, 886, 198, 220, 2488, 9288, 2617, 366, 33407, 10688, 5499, 1, 2221, 628, 220, 220, 220, 2488, 9288, 2617, 366, 9288, 259, 30506, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 474, 35138, 796, 13987, 26933, 41887, 7, 16, 13, 15, 11, 352, 13, 15, 828, 3716, 7, 17, 13, 15, 11, 362, 13, 15, 828, 3716, 7, 18, 13, 15, 11, 513, 13, 15, 8, 12962, 198, 220, 220, 220, 220, 220, 220, 279, 35138, 796, 38692, 7, 73, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 30506, 0, 7, 79, 35138, 11, 11923, 7, 16, 13, 20, 4008, 198, 220, 220, 220, 220, 220, 220, 474, 35138, 58, 16, 60, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 2488, 9288, 279, 35138, 15139, 230, 474, 35138, 198, 220, 220, 220, 886, 220, 628, 220, 220, 220, 43030, 19, 62, 73, 796, 1976, 27498, 7, 2257, 11, 4129, 7, 35138, 19, 4008, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 43030, 19, 58, 72, 60, 796, 13987, 7, 41887, 7, 43879, 2414, 32590, 72, 828, 48436, 2414, 32590, 72, 22305, 198, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 58, 72, 60, 796, 13987, 7, 41887, 7, 43879, 2414, 32590, 72, 828, 48436, 2414, 32590, 72, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2352, 1, 2221, 198, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 796, 2352, 7, 35138, 19, 62, 73, 8, 198, 220, 220, 220, 220, 220, 2352, 85, 19, 220, 796, 2352, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 2352, 0, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 611, 44156, 2849, 18189, 410, 1, 15, 13, 20, 13, 15, 12, 7959, 10, 15, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1103, 7, 35138, 19, 8, 15139, 230, 43030, 19, 62, 73, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1103, 7, 8937, 85, 19, 8, 15139, 230, 43030, 19, 62, 73, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 3590, 7, 35138, 19, 8, 15139, 230, 1976, 27498, 7, 35138, 19, 62, 73, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 3590, 7, 8937, 85, 19, 8, 15139, 230, 1976, 27498, 7, 35138, 19, 62, 73, 8, 198, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 6624, 43030, 19, 62, 73, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2352, 85, 19, 6624, 43030, 19, 62, 73, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 1033, 1, 2221, 198, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 796, 1033, 7, 35138, 19, 62, 73, 8, 198, 220, 220, 220, 220, 220, 1033, 0, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 15139, 230, 43030, 19, 62, 73, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2604, 1, 2221, 198, 220, 220, 220, 220, 220, 43030, 19, 62, 73, 796, 2604, 7, 35138, 19, 62, 73, 8, 198, 220, 220, 220, 220, 220, 2604, 0, 7, 35138, 19, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 15139, 230, 43030, 19, 62, 73, 198, 220, 220, 220, 886, 198, 220, 220, 220, 530, 35138, 796, 32043, 3351, 13, 53, 721, 7, 2257, 11, 410, 4906, 8, 198, 220, 220, 220, 47558, 0, 7, 505, 35138, 11, 604, 8, 198, 220, 220, 220, 32043, 3351, 13, 49670, 44140, 7, 505, 35138, 8, 198, 220, 220, 220, 32043, 3351, 13, 49670, 12915, 7, 505, 35138, 8, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 220, 530, 35138, 58, 72, 60, 796, 530, 7, 2257, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2593, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 2593, 7, 505, 35138, 11, 18, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 2593, 7, 505, 35138, 11, 18943, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 2593, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 32043, 3351, 13, 11265, 1096, 0, 7, 27237, 35138, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 2593, 7, 27237, 35138, 11, 17, 8, 6624, 530, 7, 2257, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 3563, 1279, 25, 6416, 198, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 3509, 290, 949, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 35138, 58, 16, 60, 796, 3563, 7, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 5415, 7, 9806, 35138, 8, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1064, 9806, 7, 9806, 35138, 8, 6624, 357, 17, 13, 15, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 949, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 220, 949, 35138, 58, 16, 60, 796, 3563, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 5288, 7, 1084, 35138, 8, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1064, 1084, 7, 1084, 35138, 8, 6624, 357, 15, 13, 15, 11, 16, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 966, 3083, 3509, 11, 949, 11, 1220, 1, 2221, 198, 220, 220, 220, 220, 220, 2659, 16, 35138, 796, 362, 9, 30073, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 2659, 17, 35138, 796, 604, 9, 30073, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 3509, 7, 7146, 16, 35138, 11, 7146, 17, 35138, 8, 6624, 2659, 17, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 949, 7, 7146, 16, 35138, 11, 7146, 17, 35138, 8, 6624, 2659, 16, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 2659, 16, 35138, 764, 9, 2659, 17, 35138, 6624, 807, 9, 505, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 2659, 17, 35138, 24457, 2659, 16, 35138, 6624, 2659, 16, 35138, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 5046, 0, 290, 2469, 341, 1, 2221, 198, 220, 220, 220, 220, 220, 5046, 35138, 796, 5046, 0, 7, 30073, 7, 505, 35138, 828, 17, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 5046, 35138, 6624, 6070, 7, 17, 11, 13664, 7, 505, 35138, 4008, 198, 220, 220, 220, 220, 220, 20208, 35138, 796, 532, 505, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 20208, 35138, 6624, 532, 505, 35138, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 2160, 11, 1343, 11, 532, 11, 1635, 11, 290, 1220, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 2160, 7, 505, 35138, 8, 6624, 4129, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 1963, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 1963, 35138, 796, 1963, 35138, 1635, 362, 1635, 513, 1635, 604, 198, 220, 220, 220, 220, 220, 2488, 9288, 1963, 35138, 6624, 1987, 9, 505, 35138, 198, 220, 220, 220, 220, 220, 1963, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 1963, 35138, 796, 362, 764, 9, 1963, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 1963, 35138, 6624, 362, 9, 505, 35138, 198, 220, 220, 220, 220, 220, 2659, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 2659, 35138, 796, 2659, 35138, 1635, 362, 1635, 513, 198, 220, 220, 220, 220, 220, 2659, 35138, 796, 2659, 35138, 24457, 362, 198, 220, 220, 220, 220, 220, 2488, 9288, 2659, 35138, 6624, 513, 9, 505, 35138, 198, 220, 220, 220, 220, 220, 2659, 35138, 796, 513, 764, 59, 2659, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 2659, 35138, 6624, 530, 35138, 628, 220, 220, 220, 220, 220, 2659, 35138, 796, 362, 9, 30073, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 2659, 35138, 796, 362, 24457, 2659, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 2659, 35138, 6624, 530, 35138, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 751, 35138, 1343, 362, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 751, 35138, 532, 362, 198, 220, 220, 220, 220, 220, 2488, 9288, 751, 35138, 6624, 530, 35138, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 4866, 7, 505, 35138, 8, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 362, 532, 751, 35138, 198, 220, 220, 220, 220, 220, 751, 35138, 796, 362, 1343, 751, 35138, 198, 220, 220, 220, 220, 220, 2488, 9288, 751, 35138, 6624, 513, 9, 505, 35138, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 33407, 16605, 1720, 1, 2221, 198, 220, 220, 220, 1188, 796, 16605, 7, 35138, 19, 11, 43030, 8, 198, 220, 220, 220, 1188, 62, 73, 796, 16605, 7, 35138, 19, 11, 43030, 8, 198, 220, 220, 220, 2488, 9288, 1188, 6624, 1188, 62, 73, 198, 220, 886, 198, 220, 1303, 787, 9088, 286, 1569, 6359, 352, 362, 604, 628, 220, 2488, 9288, 2617, 366, 33407, 1241, 352, 1086, 292, 1, 2221, 628, 220, 220, 220, 43030, 73, 796, 1976, 27498, 7, 2257, 11, 4129, 7, 35138, 4008, 198, 220, 220, 220, 43030, 17, 73, 796, 1976, 27498, 7, 2257, 11, 4129, 7, 35138, 4008, 198, 220, 220, 220, 43030, 19, 73, 796, 1976, 27498, 7, 2257, 11, 4129, 7, 35138, 4008, 628, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 35138, 8, 198, 220, 220, 220, 220, 220, 43030, 73, 58, 72, 60, 796, 43030, 58, 72, 60, 198, 220, 220, 220, 220, 220, 43030, 17, 73, 58, 72, 60, 796, 43030, 17, 58, 72, 60, 198, 220, 220, 220, 220, 220, 43030, 19, 73, 58, 72, 60, 796, 43030, 19, 58, 72, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 7877, 9078, 1, 2221, 198, 220, 220, 220, 220, 220, 410, 83, 796, 13987, 7, 41887, 7, 17, 1539, 17, 4008, 198, 220, 220, 220, 220, 220, 7877, 9078, 0, 7, 36540, 11, 43030, 11, 43030, 17, 8, 198, 220, 220, 220, 220, 220, 43030, 17, 73, 796, 410, 83, 9, 35138, 73, 1343, 43030, 17, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 17, 73, 6624, 43030, 17, 628, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 604, 4578, 7877, 9078, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 9078, 0, 7, 36540, 11, 43030, 11, 43030, 17, 11, 43030, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 19, 73, 796, 410, 83, 9, 35138, 73, 1343, 43030, 17, 73, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 43030, 17, 73, 6624, 43030, 17, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 257, 4464, 87, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 257, 4464, 87, 0, 7, 35138, 11, 410, 83, 11, 43030, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 17, 73, 796, 410, 83, 9, 35138, 17, 73, 1343, 43030, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 43030, 17, 73, 6624, 43030, 17, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 410, 83, 17, 796, 13987, 7, 41887, 7, 18, 1539, 18, 4008, 198, 220, 220, 220, 220, 220, 410, 83, 18, 796, 13987, 7, 41887, 7, 19, 1539, 19, 4008, 198, 220, 220, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 7877, 79, 1525, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 79, 1525, 0, 7, 36540, 11, 43030, 11, 410, 83, 17, 11, 43030, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 17, 73, 796, 410, 83, 9, 35138, 73, 1343, 410, 83, 17, 9, 35138, 17, 73, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 43030, 17, 73, 6624, 43030, 17, 628, 220, 220, 220, 220, 220, 220, 220, 7877, 79, 1525, 14751, 89, 0, 7, 36540, 11, 43030, 11, 410, 83, 17, 11, 43030, 17, 11, 410, 83, 18, 11, 43030, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 19, 73, 796, 410, 83, 9, 35138, 73, 1343, 410, 83, 17, 9, 35138, 17, 73, 1343, 410, 83, 18, 9, 35138, 19, 73, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 73, 6624, 43030, 19, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 1569, 6359, 796, 15690, 7, 4906, 1659, 7, 35138, 828, 362, 8, 198, 220, 220, 220, 220, 220, 1569, 6359, 58, 16, 60, 796, 43030, 198, 220, 220, 220, 220, 220, 1569, 6359, 58, 17, 60, 796, 43030, 17, 198, 220, 220, 220, 220, 220, 435, 5902, 796, 685, 36540, 17, 11, 410, 83, 18, 60, 198, 220, 220, 220, 220, 220, 7877, 9078, 0, 7, 35138, 19, 11, 435, 5902, 11, 1569, 6359, 8, 198, 220, 220, 220, 220, 220, 43030, 19, 73, 796, 43030, 19, 73, 1343, 410, 83, 17, 9, 35138, 73, 1343, 410, 83, 18, 9, 35138, 17, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 19, 73, 6624, 43030, 19, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 33407, 764, 25666, 24457, 11, 764, 61, 1, 2221, 198, 220, 220, 220, 220, 220, 43030, 20, 796, 38692, 7, 2257, 11, 513, 11, 410, 4906, 28, 47731, 3351, 13, 34, 13, 53, 2943, 7378, 40, 8, 198, 220, 220, 220, 220, 220, 43030, 21, 796, 2092, 7, 35138, 20, 8, 198, 220, 220, 220, 220, 220, 43030, 20, 73, 796, 1976, 27498, 7, 2257, 11, 513, 8, 198, 220, 220, 220, 220, 220, 43030, 21, 73, 796, 1976, 27498, 7, 2257, 11, 513, 8, 628, 220, 220, 220, 220, 220, 329, 1312, 28, 16, 25, 18, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 22468, 796, 48436, 2414, 7, 72, 8, 628, 220, 220, 220, 220, 220, 220, 220, 43030, 20, 58, 72, 60, 796, 13987, 7, 41887, 7, 72, 62, 22468, 11, 1312, 62, 22468, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 21, 58, 72, 60, 796, 13987, 7, 41887, 7, 72, 62, 22468, 10, 18, 11, 1312, 62, 22468, 10, 18, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 20, 73, 58, 72, 60, 796, 13987, 7, 41887, 7, 72, 62, 22468, 11, 1312, 62, 22468, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 21, 73, 58, 72, 60, 796, 13987, 7, 41887, 7, 72, 62, 22468, 1343, 18, 11, 1312, 62, 22468, 10, 18, 4008, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 43030, 22, 796, 43030, 20, 15885, 35138, 21, 198, 220, 220, 220, 220, 220, 43030, 22, 73, 796, 43030, 20, 73, 15885, 35138, 21, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 22, 15139, 230, 43030, 22, 73, 628, 220, 220, 220, 220, 220, 43030, 23, 796, 43030, 20, 19571, 35138, 21, 198, 220, 220, 220, 220, 220, 43030, 23, 73, 796, 43030, 20, 73, 19571, 35138, 21, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 23, 15139, 230, 43030, 23, 73, 628, 220, 220, 220, 220, 220, 43030, 24, 796, 43030, 20, 13, 61, 18, 198, 220, 220, 220, 220, 220, 43030, 24, 73, 796, 43030, 20, 73, 13, 61, 18, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 24, 15139, 230, 43030, 24, 73, 628, 220, 220, 220, 220, 220, 43030, 940, 796, 43030, 20, 1343, 43030, 21, 198, 220, 220, 220, 220, 220, 43030, 940, 73, 796, 43030, 20, 73, 1343, 43030, 21, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 940, 15139, 230, 43030, 940, 73, 628, 220, 220, 220, 220, 220, 43030, 1157, 796, 43030, 20, 532, 43030, 21, 198, 220, 220, 220, 220, 220, 43030, 1157, 73, 796, 43030, 20, 73, 532, 43030, 21, 73, 198, 220, 220, 220, 220, 220, 2488, 9288, 43030, 1157, 15139, 230, 43030, 1157, 73, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 9288, 21254, 31761, 515, 16605, 1720, 1, 2221, 198, 220, 220, 220, 220, 220, 2124, 796, 38692, 7, 2257, 11, 362, 8, 198, 220, 220, 220, 220, 220, 331, 796, 38692, 7, 2257, 11, 362, 8, 198, 220, 220, 220, 220, 220, 4866, 0, 7, 88, 11, 685, 16, 11, 352, 12962, 198, 220, 220, 220, 220, 220, 611, 3563, 1279, 25, 19157, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4866, 0, 7, 87, 11, 685, 16, 11, 545, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 87, 6, 9, 88, 38381, 16, 60, 6624, 352, 12, 320, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 87, 2637, 9, 88, 38381, 16, 60, 6624, 352, 10, 320, 198, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4866, 0, 7, 87, 11, 685, 17, 11, 513, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 87, 6, 9, 88, 38381, 16, 60, 6624, 642, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 87, 2637, 9, 88, 38381, 16, 60, 6624, 642, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 1309, 2124, 796, 43720, 7, 2257, 11, 767, 8, 198, 220, 220, 220, 2488, 9288, 38692, 7, 87, 8, 6624, 2124, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 8899, 1, 2221, 198, 220, 220, 220, 2124, 796, 43720, 7, 18, 8, 198, 220, 220, 220, 331, 796, 38692, 7, 87, 8, 198, 220, 220, 220, 3975, 0, 7, 31369, 11, 2124, 8, 198, 220, 220, 220, 3975, 0, 7, 31369, 11, 331, 8, 198, 220, 220, 220, 2488, 9288, 2124, 15139, 230, 331, 198, 220, 220, 220, 2124, 17, 796, 3975, 7, 31369, 11, 2124, 8, 198, 220, 220, 220, 331, 17, 796, 3975, 7, 31369, 11, 331, 8, 198, 220, 220, 220, 2488, 9288, 2124, 17, 15139, 230, 331, 17, 628, 220, 220, 220, 2163, 616, 20786, 7, 64, 11, 275, 8, 198, 220, 220, 220, 220, 220, 1441, 257, 1343, 275, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2124, 18, 796, 4866, 7, 87, 17, 8, 198, 220, 220, 220, 331, 18, 796, 4866, 7, 88, 17, 8, 198, 220, 220, 220, 3975, 0, 7, 1820, 20786, 11, 2124, 18, 11, 2124, 17, 11, 2124, 8, 198, 220, 220, 220, 3975, 0, 7, 1820, 20786, 11, 331, 18, 11, 331, 17, 11, 331, 8, 198, 220, 220, 220, 2488, 9288, 2124, 18, 15139, 230, 331, 18, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 32225, 2903, 6376, 278, 1, 2221, 198, 220, 220, 220, 2124, 796, 1976, 27498, 7, 2257, 11, 642, 8, 198, 220, 220, 220, 331, 796, 38692, 7, 2257, 11, 642, 8, 198, 220, 220, 220, 4686, 34223, 796, 2558, 2624, 58, 15, 11, 352, 60, 198, 220, 220, 220, 410, 874, 796, 3563, 58, 16, 11, 362, 60, 198, 220, 220, 220, 900, 62, 27160, 0, 7, 87, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 900, 62, 27160, 0, 7, 88, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 25432, 7, 87, 8, 198, 220, 220, 220, 25432, 7, 88, 8, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 2124, 58, 312, 34223, 58, 72, 48688, 16, 60, 15139, 230, 410, 874, 58, 72, 60, 198, 220, 220, 220, 220, 220, 2488, 9288, 331, 58, 312, 34223, 58, 72, 48688, 16, 60, 15139, 230, 410, 874, 58, 72, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 410, 874, 796, 3563, 58, 17, 11, 18, 60, 198, 220, 220, 220, 300, 83, 519, 796, 1957, 62, 1462, 62, 20541, 62, 76, 5912, 7, 88, 8, 198, 220, 220, 220, 900, 62, 12001, 62, 1462, 62, 20541, 62, 76, 5912, 7, 88, 11, 300, 83, 519, 8, 198, 220, 220, 220, 900, 62, 27160, 62, 12001, 0, 7, 87, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 900, 62, 27160, 62, 12001, 0, 7, 88, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 25432, 7, 87, 8, 198, 220, 220, 220, 25432, 7, 88, 8, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 312, 34223, 8, 198, 220, 220, 220, 220, 220, 2488, 9288, 2124, 58, 312, 34223, 58, 72, 48688, 16, 60, 15139, 230, 410, 874, 58, 72, 60, 198, 220, 220, 220, 220, 220, 2488, 9288, 331, 58, 312, 34223, 58, 72, 48688, 16, 60, 15139, 230, 410, 874, 58, 72, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 331, 17, 796, 38692, 7, 2257, 11, 604, 11, 275, 82, 28, 17, 8, 198, 220, 220, 220, 2488, 9288, 651, 62, 27372, 1096, 7, 88, 17, 8, 6624, 362, 198, 220, 220, 220, 4686, 34223, 796, 2558, 2624, 58, 15, 60, 198, 220, 220, 220, 410, 874, 796, 3563, 58, 16, 11, 362, 60, 198, 220, 220, 220, 900, 62, 27160, 62, 2436, 3543, 0, 7, 88, 17, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 2488, 9288, 331, 17, 58, 312, 34223, 58, 16, 48688, 16, 60, 15139, 230, 410, 874, 58, 16, 60, 198, 220, 220, 220, 2488, 9288, 331, 17, 58, 312, 34223, 58, 16, 48688, 17, 60, 15139, 230, 410, 874, 58, 17, 60, 628, 198, 220, 220, 220, 374, 782, 796, 1957, 3911, 7, 88, 17, 8, 198, 220, 220, 220, 300, 83, 519, 796, 1957, 62, 1462, 62, 20541, 62, 76, 5912, 7, 88, 17, 8, 198, 220, 220, 220, 900, 62, 12001, 62, 1462, 62, 20541, 62, 76, 5912, 7, 88, 17, 11, 300, 83, 519, 8, 198, 220, 220, 220, 4686, 87, 796, 2558, 2624, 58, 16, 60, 198, 220, 220, 220, 410, 874, 796, 3563, 58, 17, 11, 18, 60, 198, 220, 220, 220, 900, 62, 27160, 62, 2436, 3543, 62, 12001, 0, 7, 88, 17, 11, 4686, 34223, 11, 410, 874, 8, 198, 220, 220, 220, 2488, 9288, 331, 17, 58, 312, 34223, 58, 16, 48688, 16, 60, 15139, 230, 410, 874, 58, 16, 60, 198, 220, 220, 220, 2488, 9288, 331, 17, 58, 312, 34223, 58, 16, 48688, 17, 60, 15139, 230, 410, 874, 58, 17, 60, 628, 628, 628, 628, 220, 886, 198, 198, 437, 198 ]
1.88146
5,205
export SymbolContext, ContextualSymbol, show import Base.show, Base.show_unquoted import Crayons: CrayonStack, Crayon """ SymbolContext(syms, function [,display_expression]) A symbol context is a special function, evaluating symbols within the body of the function within the context of a single argument. Generally, these are constructed with the `@syms` macro, which will modify an expression, replacing any unescaped symbols in the expression with calls to `sym(<obj>, :symbol)` This allows contexts to be described for arbitrary objects and for better extension of symbols as a domain-specific abstraction to arbitrary data. ### Arguments * `syms` : An `Array` of `Symbol`s, itemizing which symbols are represented contextually. * `function` : A unary function which is to be called with the contextual data, or alternatively with keyworded arguments for each of the symbols. * `display_expression` : An optional argument used to store a cleaned expression for printing the symbolic expression that was used to generate the contextual function. ### Examples Creating a symbol context from a hand-crafted function, representing symbols as calls to `sym`. Generally, creating a context in this way is only done by developers. ``` julia> SymbolContext([:x, :y], x -> sym(x, :x) + sym(x, :y)) ``` More commonly a symbol context is created using the `@syms` macro ``` julia> @syms begin :x + :y end ``` """ struct SymbolContext syms::AbstractArray f::Function display_expr end SymbolContext(syms, f) = SymbolContext(syms, f, nothing) (x::SymbolContext)(; kwargs...) = x(kwargs) function (x::SymbolContext)(arg) found, miss = match_syms(arg, setdiff(x.syms, [:.])) @assert(length(miss) == 0, "Context of type `$(type_pretty(typeof(arg)))` cannot find " * "representation for symbol(s) " * join(":" .* string.(miss[1:(end-1)]), ", ") * (length(miss) > 1 ? " and " : "") * ":" * string(miss[end])) x.f(arg) end function show(io::IO, x::SymbolContext) stack = CrayonStack(incremental = true) print("SymbolContext[") for (i, sym)=enumerate(x.syms) print(i == 1 ? "" : ",") print(io, push!(stack, Crayon(foreground = :blue))) print(":") show_unquoted(io, sym) print(io, pop!(stack)) end print("] ") if !(x.display_expr isa Expr && x.display_expr.head == :block) println() end Base.show_unquoted(io, x.display_expr) end struct Highlighted{T} x::T end function show(io::IO, x::Highlighted{<:Number}) stack = CrayonStack(incremental = true) print(io, push!(stack, Crayon(foreground = :blue))) print(":") show(io, x.x) print(io, pop!(stack)) end function show(io::IO, x::Highlighted{<:Symbol}) stack = CrayonStack(incremental = true) print(io, push!(stack, Crayon(foreground = :blue))) if x.x == :.; print(":.") else; show(io, x.x) end print(io, pop!(stack)) end
[ 39344, 38357, 21947, 11, 30532, 723, 13940, 23650, 11, 905, 198, 198, 11748, 7308, 13, 12860, 11, 7308, 13, 12860, 62, 403, 421, 5191, 198, 11748, 327, 2433, 684, 25, 327, 2433, 261, 25896, 11, 327, 2433, 261, 628, 198, 198, 37811, 198, 220, 220, 220, 38357, 21947, 7, 1837, 907, 11, 2163, 685, 11, 13812, 62, 38011, 12962, 198, 198, 32, 6194, 4732, 318, 257, 2041, 2163, 11, 22232, 14354, 1626, 262, 1767, 286, 220, 198, 1169, 2163, 1626, 262, 4732, 286, 257, 2060, 4578, 13, 23904, 11, 777, 389, 220, 198, 1102, 16242, 351, 262, 4600, 31, 1837, 907, 63, 15021, 11, 543, 481, 13096, 281, 5408, 11, 13586, 198, 1092, 555, 3798, 5813, 14354, 287, 262, 5408, 351, 3848, 284, 4600, 37047, 7, 27, 26801, 22330, 1058, 1837, 23650, 8, 63, 220, 198, 1212, 3578, 26307, 284, 307, 3417, 329, 14977, 5563, 290, 329, 1365, 220, 198, 2302, 3004, 286, 14354, 355, 257, 7386, 12, 11423, 34651, 284, 14977, 1366, 13, 220, 198, 198, 21017, 20559, 2886, 220, 198, 198, 9, 4600, 1837, 907, 63, 1058, 1052, 4600, 19182, 63, 286, 4600, 13940, 23650, 63, 82, 11, 2378, 2890, 543, 14354, 389, 7997, 198, 220, 220, 220, 4732, 935, 13, 198, 9, 4600, 8818, 63, 1058, 317, 555, 560, 2163, 543, 318, 284, 307, 1444, 351, 262, 38356, 1366, 11, 220, 198, 220, 220, 220, 393, 46596, 351, 21179, 276, 7159, 329, 1123, 286, 262, 14354, 13, 198, 9, 4600, 13812, 62, 38011, 63, 1058, 1052, 11902, 4578, 973, 284, 3650, 257, 20750, 5408, 198, 220, 220, 220, 329, 13570, 262, 18975, 5408, 326, 373, 973, 284, 7716, 262, 38356, 198, 220, 220, 220, 2163, 13, 198, 198, 21017, 21066, 198, 198, 32071, 257, 6194, 4732, 422, 257, 1021, 12, 39160, 2163, 11, 10200, 14354, 198, 292, 3848, 284, 4600, 37047, 44646, 23904, 11, 4441, 257, 4732, 287, 428, 835, 318, 691, 1760, 198, 1525, 6505, 13, 220, 198, 198, 15506, 63, 198, 73, 43640, 29, 38357, 21947, 26933, 25, 87, 11, 1058, 88, 4357, 2124, 4613, 5659, 7, 87, 11, 1058, 87, 8, 1343, 5659, 7, 87, 11, 1058, 88, 4008, 198, 15506, 63, 198, 198, 5167, 8811, 257, 6194, 4732, 318, 2727, 1262, 262, 4600, 31, 1837, 907, 63, 15021, 198, 198, 15506, 63, 198, 73, 43640, 29, 2488, 1837, 907, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 87, 1343, 1058, 88, 198, 220, 220, 220, 220, 220, 220, 886, 198, 15506, 63, 198, 37811, 198, 7249, 38357, 21947, 198, 220, 220, 220, 827, 907, 3712, 23839, 19182, 198, 220, 220, 220, 277, 3712, 22203, 198, 220, 220, 220, 3359, 62, 31937, 198, 437, 198, 198, 13940, 23650, 21947, 7, 1837, 907, 11, 277, 8, 796, 38357, 21947, 7, 1837, 907, 11, 277, 11, 2147, 8, 198, 198, 7, 87, 3712, 13940, 23650, 21947, 5769, 26, 479, 86, 22046, 23029, 796, 2124, 7, 46265, 22046, 8, 198, 8818, 357, 87, 3712, 13940, 23650, 21947, 5769, 853, 8, 198, 220, 220, 220, 1043, 11, 2051, 796, 2872, 62, 1837, 907, 7, 853, 11, 900, 26069, 7, 87, 13, 1837, 907, 11, 685, 25, 8183, 4008, 628, 220, 220, 220, 2488, 30493, 7, 13664, 7, 3927, 8, 6624, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 21947, 286, 2099, 4600, 3, 7, 4906, 62, 37784, 7, 4906, 1659, 7, 853, 22305, 63, 2314, 1064, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15603, 341, 329, 6194, 7, 82, 8, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 4654, 7, 2404, 764, 9, 4731, 12195, 3927, 58, 16, 37498, 437, 12, 16, 15437, 828, 33172, 366, 8, 1635, 220, 198, 220, 220, 220, 220, 220, 220, 220, 357, 13664, 7, 3927, 8, 1875, 352, 5633, 366, 290, 366, 1058, 366, 4943, 1635, 220, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11097, 1635, 4731, 7, 3927, 58, 437, 60, 4008, 628, 220, 220, 220, 2124, 13, 69, 7, 853, 8, 198, 437, 628, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 2124, 3712, 13940, 23650, 21947, 8, 220, 198, 220, 220, 220, 8931, 796, 327, 2433, 261, 25896, 7, 24988, 37098, 796, 2081, 8, 198, 220, 220, 220, 3601, 7203, 13940, 23650, 21947, 58, 4943, 198, 220, 220, 220, 329, 357, 72, 11, 5659, 47505, 268, 6975, 378, 7, 87, 13, 1837, 907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 72, 6624, 352, 5633, 13538, 1058, 366, 553, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 4574, 0, 7, 25558, 11, 327, 2433, 261, 7, 754, 2833, 796, 1058, 17585, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 2404, 8, 198, 220, 220, 220, 220, 220, 220, 220, 905, 62, 403, 421, 5191, 7, 952, 11, 5659, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 952, 11, 1461, 0, 7, 25558, 4008, 198, 220, 220, 220, 886, 220, 198, 220, 220, 220, 3601, 7203, 60, 366, 8, 198, 220, 220, 220, 611, 5145, 7, 87, 13, 13812, 62, 31937, 318, 64, 1475, 1050, 11405, 2124, 13, 13812, 62, 31937, 13, 2256, 6624, 1058, 9967, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 3419, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7308, 13, 12860, 62, 403, 421, 5191, 7, 952, 11, 2124, 13, 13812, 62, 31937, 8, 198, 437, 628, 198, 198, 7249, 3334, 2971, 276, 90, 51, 92, 198, 220, 220, 220, 2124, 3712, 51, 198, 437, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 2124, 3712, 11922, 2971, 276, 90, 27, 25, 15057, 30072, 198, 220, 220, 220, 8931, 796, 327, 2433, 261, 25896, 7, 24988, 37098, 796, 2081, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 4574, 0, 7, 25558, 11, 327, 2433, 261, 7, 754, 2833, 796, 1058, 17585, 22305, 198, 220, 220, 220, 3601, 7, 2404, 8, 198, 220, 220, 220, 905, 7, 952, 11, 2124, 13, 87, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 1461, 0, 7, 25558, 4008, 198, 437, 198, 198, 8818, 905, 7, 952, 3712, 9399, 11, 2124, 3712, 11922, 2971, 276, 90, 27, 25, 13940, 23650, 30072, 198, 220, 220, 220, 8931, 796, 327, 2433, 261, 25896, 7, 24988, 37098, 796, 2081, 8, 198, 220, 220, 220, 3601, 7, 952, 11, 4574, 0, 7, 25558, 11, 327, 2433, 261, 7, 754, 2833, 796, 1058, 17585, 22305, 628, 220, 220, 220, 611, 2124, 13, 87, 6624, 1058, 15089, 3601, 7, 1298, 19570, 198, 220, 220, 220, 2073, 26, 905, 7, 952, 11, 2124, 13, 87, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 3601, 7, 952, 11, 1461, 0, 7, 25558, 4008, 198, 437, 628 ]
2.682948
1,126
using Logging function log_test() debug("debug message") info("info message") warn("warning message") err("error message") critical("critical message") end println("Setting level=DEBUG") Logging.configure(level=DEBUG) log_test() println() println("Setting level=INFO") Logging.configure(level=INFO) log_test() println() println("Setting level=WARNING") Logging.configure(level=WARNING) log_test() println() println("Setting level=ERROR") Logging.configure(level=ERROR) log_test() println() println("Setting level=CRITICAL") Logging.configure(level=CRITICAL) log_test()
[ 3500, 5972, 2667, 198, 198, 8818, 2604, 62, 9288, 3419, 198, 220, 220, 220, 14257, 7203, 24442, 3275, 4943, 198, 220, 220, 220, 7508, 7203, 10951, 3275, 4943, 198, 220, 220, 220, 9828, 7203, 43917, 3275, 4943, 198, 220, 220, 220, 11454, 7203, 18224, 3275, 4943, 198, 220, 220, 220, 4688, 7203, 34666, 3275, 4943, 198, 437, 198, 198, 35235, 7203, 34149, 1241, 28, 30531, 4943, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 30531, 8, 198, 6404, 62, 9288, 3419, 198, 198, 35235, 3419, 198, 35235, 7203, 34149, 1241, 28, 10778, 4943, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 10778, 8, 198, 6404, 62, 9288, 3419, 198, 198, 35235, 3419, 198, 35235, 7203, 34149, 1241, 28, 31502, 4943, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 31502, 8, 198, 6404, 62, 9288, 3419, 198, 198, 35235, 3419, 198, 35235, 7203, 34149, 1241, 28, 24908, 4943, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 24908, 8, 198, 6404, 62, 9288, 3419, 198, 198, 35235, 3419, 198, 35235, 7203, 34149, 1241, 28, 9419, 2043, 20151, 4943, 198, 11187, 2667, 13, 11250, 495, 7, 5715, 28, 9419, 2043, 20151, 8, 198, 6404, 62, 9288, 3419, 628 ]
2.994975
199
####################################################################### # # An example of creating an Excel charts with a date axis using # XlsxWriter. # # Original Python Copyright 2013-2016, John McNamara, jmcnamara@cpan.org # https://github.com/jmcnamara/XlsxWriter using Dates using XlsxWriter function test() wb = Workbook("chart_date_axis.xlsx") ws = add_worksheet!(wb) # Add a format for the headings. chart = add_chart!(wb, Dict("type"=> "line")) date_format = add_format!(wb, Dict("num_format"=> "dd/mm/yyyy")) # Widen the first column to display the dates. set_column!(ws, "A:A", 12) # Some data to be plotted in the worksheet. dates = [Date(2013, 1, 1), Date(2013, 1, 2), Date(2013, 1, 3), Date(2013, 1, 4), Date(2013, 1, 5), Date(2013, 1, 6), Date(2013, 1, 7), Date(2013, 1, 8), Date(2013, 1, 9), Date(2013, 1, 10)] values = [10, 30, 20, 40, 20, 60, 50, 40, 30, 30] # Write the date to the worksheet. write_column!(ws, "A1", dates, fmt=date_format) write_column!(ws, "B1", values) # Add a series to the chart. add_series!(chart, Dict( "categories"=> "=Sheet1!\$A\$1:\$A\$10", "values"=> "=Sheet1!\$B\$1:\$B\$10", )) # Configure the X axis as a Date axis and set the max and min limits. set_x_axis!(chart, Dict( "date_axis"=> true, "min"=> Date(2013, 1, 2), "max"=> Date(2013, 1, 9), )) # Turn off the legend. set_legend!(chart, Dict("none"=> true)) # Insert the chart into the worksheet. insert_chart!(ws, "D2", chart) close(wb) isfile("chart_date_axis.xlsx") end test()
[ 29113, 29113, 4242, 21017, 198, 2, 198, 2, 1052, 1672, 286, 4441, 281, 24134, 15907, 351, 257, 3128, 16488, 1262, 198, 2, 1395, 7278, 87, 34379, 13, 198, 2, 198, 2, 13745, 11361, 15069, 2211, 12, 5304, 11, 1757, 22586, 47848, 11, 474, 23209, 7402, 3301, 31, 66, 6839, 13, 2398, 198, 2, 3740, 1378, 12567, 13, 785, 14, 73, 23209, 7402, 3301, 14, 55, 7278, 87, 34379, 198, 198, 3500, 44712, 198, 3500, 1395, 7278, 87, 34379, 198, 198, 8818, 1332, 3419, 628, 197, 39346, 796, 5521, 2070, 7203, 40926, 62, 4475, 62, 22704, 13, 87, 7278, 87, 4943, 198, 197, 18504, 796, 751, 62, 5225, 25473, 0, 7, 39346, 8, 628, 197, 2, 3060, 257, 5794, 329, 262, 1182, 654, 13, 628, 197, 40926, 796, 751, 62, 40926, 0, 7, 39346, 11, 360, 713, 7203, 4906, 1, 14804, 366, 1370, 48774, 198, 197, 4475, 62, 18982, 796, 751, 62, 18982, 0, 7, 39346, 11, 360, 713, 7203, 22510, 62, 18982, 1, 14804, 366, 1860, 14, 3020, 14, 22556, 22556, 48774, 628, 197, 2, 370, 14029, 262, 717, 5721, 284, 3359, 262, 9667, 13, 198, 197, 2617, 62, 28665, 0, 7, 18504, 11, 366, 32, 25, 32, 1600, 1105, 8, 628, 197, 2, 2773, 1366, 284, 307, 37515, 287, 262, 2499, 25473, 13, 198, 197, 19581, 796, 685, 10430, 7, 6390, 11, 352, 11, 352, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 362, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 513, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 604, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 642, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 718, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 767, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 807, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 860, 828, 198, 197, 197, 197, 7536, 7, 6390, 11, 352, 11, 838, 15437, 628, 197, 27160, 796, 685, 940, 11, 1542, 11, 1160, 11, 2319, 11, 1160, 11, 3126, 11, 2026, 11, 2319, 11, 1542, 11, 1542, 60, 628, 197, 2, 19430, 262, 3128, 284, 262, 2499, 25473, 13, 198, 197, 13564, 62, 28665, 0, 7, 18504, 11, 366, 32, 16, 1600, 9667, 11, 46996, 28, 4475, 62, 18982, 8, 198, 197, 13564, 62, 28665, 0, 7, 18504, 11, 366, 33, 16, 1600, 3815, 8, 628, 197, 2, 3060, 257, 2168, 284, 262, 8262, 13, 198, 197, 2860, 62, 25076, 0, 7, 40926, 11, 360, 713, 7, 198, 197, 197, 1, 66, 26129, 1, 14804, 366, 28, 3347, 316, 16, 0, 59, 3, 32, 59, 3, 16, 7479, 3, 32, 59, 3, 940, 1600, 198, 197, 197, 1, 27160, 1, 14804, 366, 28, 3347, 316, 16, 0, 59, 3, 33, 59, 3, 16, 7479, 3, 33, 59, 3, 940, 1600, 198, 197, 4008, 628, 197, 2, 17056, 495, 262, 1395, 16488, 355, 257, 7536, 16488, 290, 900, 262, 3509, 290, 949, 7095, 13, 198, 197, 2617, 62, 87, 62, 22704, 0, 7, 40926, 11, 360, 713, 7, 198, 197, 197, 1, 4475, 62, 22704, 1, 14804, 2081, 11, 198, 197, 197, 1, 1084, 1, 14804, 7536, 7, 6390, 11, 352, 11, 362, 828, 198, 197, 197, 1, 9806, 1, 14804, 7536, 7, 6390, 11, 352, 11, 860, 828, 198, 197, 4008, 628, 197, 2, 6756, 572, 262, 8177, 13, 198, 197, 2617, 62, 1455, 437, 0, 7, 40926, 11, 360, 713, 7203, 23108, 1, 14804, 2081, 4008, 628, 197, 2, 35835, 262, 8262, 656, 262, 2499, 25473, 13, 198, 197, 28463, 62, 40926, 0, 7, 18504, 11, 366, 35, 17, 1600, 8262, 8, 628, 197, 19836, 7, 39346, 8, 198, 197, 4468, 576, 7203, 40926, 62, 4475, 62, 22704, 13, 87, 7278, 87, 4943, 198, 437, 198, 198, 9288, 3419, 198 ]
2.440124
643
module julia_sets using PyPlot export gen_jset,show_jset function gen_jset{T<:Real,U<:Real}(R::Function,x::Array{T,1},y::Array{T,1},n_iter::Int64,escape_tol::U) A = zeros(length(x),length(y)); for i=1:length(x) for j=1:length(y) z = Complex(x[i],y[j]) for k = 1:n_iter z = R(z) if abs(z) > escape_tol A[i,j] = k break; end end if A[i,j]==0 A[i,j] = escape_tol+1; end end end return A end function show_jset{T<:Real}(A::Array{T,2}) matshow(A) end end
[ 21412, 474, 43640, 62, 28709, 198, 3500, 9485, 43328, 198, 39344, 2429, 62, 73, 2617, 11, 12860, 62, 73, 2617, 198, 198, 8818, 2429, 62, 73, 2617, 90, 51, 27, 25, 15633, 11, 52, 27, 25, 15633, 92, 7, 49, 3712, 22203, 11, 87, 3712, 19182, 90, 51, 11, 16, 5512, 88, 3712, 19182, 90, 51, 11, 16, 5512, 77, 62, 2676, 3712, 5317, 2414, 11, 41915, 62, 83, 349, 3712, 52, 8, 198, 220, 220, 198, 220, 317, 796, 1976, 27498, 7, 13664, 7, 87, 828, 13664, 7, 88, 18125, 198, 220, 329, 1312, 28, 16, 25, 13664, 7, 87, 8, 198, 220, 220, 220, 329, 474, 28, 16, 25, 13664, 7, 88, 8, 198, 220, 220, 220, 220, 220, 1976, 796, 19157, 7, 87, 58, 72, 4357, 88, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 329, 479, 796, 352, 25, 77, 62, 2676, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 796, 371, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2352, 7, 89, 8, 1875, 6654, 62, 83, 349, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 60, 796, 479, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 611, 317, 58, 72, 11, 73, 60, 855, 15, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 72, 11, 73, 60, 796, 6654, 62, 83, 349, 10, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 886, 198, 220, 220, 198, 220, 1441, 317, 198, 437, 198, 198, 8818, 905, 62, 73, 2617, 90, 51, 27, 25, 15633, 92, 7, 32, 3712, 19182, 90, 51, 11, 17, 30072, 198, 46054, 4919, 7, 32, 8, 198, 437, 198, 198, 437, 628, 198 ]
1.739938
323
using DataFrames using CSV data = CSV.read("data/multilane_Saturday_28_Apr_16_17.csv") means = by(data, :solver) do df n = size(df, 1) return DataFrame(reward=mean(df[:reward]), reward_sem=std(df[:reward])/sqrt(n) ) end println(means)
[ 3500, 6060, 35439, 198, 3500, 44189, 198, 198, 7890, 796, 44189, 13, 961, 7203, 7890, 14, 16680, 346, 1531, 62, 19844, 62, 2078, 62, 13680, 62, 1433, 62, 1558, 13, 40664, 4943, 198, 198, 1326, 504, 796, 416, 7, 7890, 11, 1058, 82, 14375, 8, 466, 47764, 198, 220, 220, 220, 299, 796, 2546, 7, 7568, 11, 352, 8, 198, 220, 220, 220, 1441, 6060, 19778, 7, 260, 904, 28, 32604, 7, 7568, 58, 25, 260, 904, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6721, 62, 43616, 28, 19282, 7, 7568, 58, 25, 260, 904, 12962, 14, 31166, 17034, 7, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 437, 198, 198, 35235, 7, 1326, 504, 8, 198 ]
1.939189
148
# Routines related to fragmenting CAD entities in gmsh, while preserving physical groups function process_material_hierarchy!( new_physical_groups::Dict{String, Vector{Tuple{Int32,Int32}}}, material_hierarchy::Vector{String}) # Get the material groups and the entities in each group groups = collect(keys(new_physical_groups)) material_indices = findall(x->occursin("MATERIAL", x), groups) material_groups = groups[material_indices] # Ensure each material group is present in the hierarchy and warn now if it's not. # Otherwise the error that occurs later is not as easy to decipher for material in material_groups @assert material ∈ material_hierarchy "material_hierarchy does not contain: '$material'" end material_dict = Dict{String, Vector{Tuple{Int32,Int32}}}() all_material_entities = Tuple{Int32,Int32}[] for material in material_groups # Note that this is assignment by reference. Changes to material_dict are reflected # in new_physical_groups material_dict[material] = new_physical_groups[material] append!(all_material_entities, new_physical_groups[material]) end # Remove duplicates all_material_entities = collect(Set(all_material_entities)) # For each entity with a material, ensure that it only exists in one of material groups. # If it exists in more than one material group, apply the material hierarchy so that the # entity only has one material. numerical_material_hierarchy = Dict{String,Int32}() i = 1 for material in material_hierarchy numerical_material_hierarchy[material] = i i += 1 end for ent in all_material_entities materials = String[] for material in material_groups if ent ∈ material_dict[material] push!(materials, material) end end if 1 < length(materials) # Get the highest priority material mat_num = minimum([numerical_material_hierarchy[mat] for mat in materials]) priority_mat = material_hierarchy[mat_num] # Pop ent from all other materials in dict deleteat!(materials, materials .== priority_mat) for material in materials deleteat!(material_dict[material], findfirst(x-> x == ent, material_dict[material])) end end end end function gmsh_group_preserving_fragment(object_dim_tags::Vector{Tuple{Signed,Int32}}, tool_dim_tags::Vector{Tuple{Signed,Int32}}; material_hierarchy::Vector{String} = String[]) # Get all the physical groups old_physical_groups = Dict{String,Array{Tuple{Int32,Int32},1}}() groups = gmsh.model.get_physical_groups() names = [gmsh.model.get_physical_name(grp[1], grp[2]) for grp in groups] for (i, name) in enumerate(names) ents = gmsh.model.get_entities_for_physical_group(groups[i][1], groups[i][2]) dim = groups[i][1] old_physical_groups[name] = [(dim, ent) for ent in ents] end # Fragment nents = length(object_dim_tags) + length(tool_dim_tags) @info "Fragmenting $nents entities" out_dim_tags, out_dim_tags_map = gmsh.model.occ.fragment(object_dim_tags, tool_dim_tags) # Create a dictionary of new physical groups using the parent child relationship # between input_dim_tags and out_dim_tags_map. The parent at index i of input_dim_tags # has children out_dim_tags_map[i] new_physical_groups = Dict{String, Vector{Tuple{Int32,Int32}}}() input_dim_tags = vcat(object_dim_tags, tool_dim_tags) # For each physical group for name in names new_physical_groups[name] = Tuple{Int32, Int32}[] # For each of the dim tags in the physical group for dim_tag in old_physical_groups[name] # If the dim_tag was one of the entities in the fragment if dim_tag ∈ input_dim_tags # Get its children index = findfirst(x->x == dim_tag, input_dim_tags) children = out_dim_tags_map[index] # Add the children to the new physical group for child in children if child ∉ new_physical_groups[name] push!(new_physical_groups[name], child) end end else # If it wasn't in the fragment, no changes necessary. push!(new_physical_groups[name], dim_tag) end end end # Remove old groups and synchronize for name in names gmsh.model.remove_physical_name(name) end @debug "Synchronizing model" gmsh.model.occ.synchronize() # Process the material hierarchy if it exists so that each entity has one # or less material physical groups if 0 < length(material_hierarchy) process_material_hierarchy!(new_physical_groups, material_hierarchy) end # Create new physical groups for (i, name) in enumerate(names) dim = groups[i][1] tags = [dim_tag[2] for dim_tag in new_physical_groups[name]] ptag = gmsh.model.add_physical_group(dim, tags) gmsh.model.set_physical_name(dim, ptag, name) end return out_dim_tags end function gmsh_group_preserving_fragment(object_dim_tags::Vector{Tuple{Int32,Int32}}, tool_dim_tags::Vector{Tuple{Int32,Int32}}; material_hierarchy::Vector{String} = String[]) # Get all the physical groups old_physical_groups = Dict{String, Vector{Tuple{Int32,Int32}}}() groups = gmsh.model.get_physical_groups() names = [gmsh.model.get_physical_name(grp[1], grp[2]) for grp in groups] for (i, name) in enumerate(names) ents = gmsh.model.get_entities_for_physical_group(groups[i][1], groups[i][2]) dim = groups[i][1] old_physical_groups[name] = [(dim, ent) for ent in ents] end # Fragment nents = length(object_dim_tags) + length(tool_dim_tags) @info "Fragmenting $nents entities" out_dim_tags, out_dim_tags_map = gmsh.model.occ.fragment(object_dim_tags, tool_dim_tags) # Create a dictionary of new physical groups using the parent child relationship # between input_dim_tags and out_dim_tags_map. The parent at index i of input_dim_tags # has children out_dim_tags_map[i] new_physical_groups = Dict{String, Vector{Tuple{Int32,Int32}}}() input_dim_tags = vcat(object_dim_tags, tool_dim_tags) # For each physical group for name in names new_physical_groups[name] = Tuple{Int32,Int32}[] # For each of the dim tags in the physical group for dim_tag in old_physical_groups[name] # If the dim_tag was one of the entities in the fragment if dim_tag ∈ input_dim_tags # Get its children index = findfirst(x->x == dim_tag, input_dim_tags) children = out_dim_tags_map[index] # Add the children to the new physical group for child in children if child ∉ new_physical_groups[name] push!(new_physical_groups[name], child) end end else # If it wasn't in the fragment, no changes necessary. push!(new_physical_groups[name], dim_tag) end end end # Remove old groups and synchronize for name in names gmsh.model.remove_physical_name(name) end @debug "Synchronizing model" gmsh.model.occ.synchronize() # Process the material hierarchy if it exists so that each entity has one # or less material physical groups if 0 < length(material_hierarchy) process_material_hierarchy!(new_physical_groups, material_hierarchy) end # Create new physical groups for (i, name) in enumerate(names) dim = groups[i][1] tags = [dim_tag[2] for dim_tag in new_physical_groups[name]] ptag = gmsh.model.add_physical_group(dim, tags) gmsh.model.set_physical_name(dim, ptag, name) end return out_dim_tags end
[ 2, 39602, 1127, 3519, 284, 24225, 278, 37292, 12066, 287, 308, 907, 71, 11, 981, 23934, 3518, 2628, 198, 198, 8818, 1429, 62, 33665, 62, 71, 959, 9282, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 42854, 62, 24432, 3712, 35, 713, 90, 10100, 11, 20650, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 11709, 5512, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2587, 62, 71, 959, 9282, 3712, 38469, 90, 10100, 30072, 198, 220, 220, 220, 1303, 3497, 262, 2587, 2628, 290, 262, 12066, 287, 1123, 1448, 198, 220, 220, 220, 2628, 796, 2824, 7, 13083, 7, 3605, 62, 42854, 62, 24432, 4008, 198, 220, 220, 220, 2587, 62, 521, 1063, 796, 1064, 439, 7, 87, 3784, 13966, 1834, 259, 7203, 44, 23261, 12576, 1600, 2124, 828, 2628, 8, 198, 220, 220, 220, 2587, 62, 24432, 796, 2628, 58, 33665, 62, 521, 1063, 60, 198, 220, 220, 220, 1303, 48987, 1123, 2587, 1448, 318, 1944, 287, 262, 18911, 290, 9828, 783, 611, 340, 338, 407, 13, 220, 198, 220, 220, 220, 1303, 15323, 262, 4049, 326, 8833, 1568, 318, 407, 355, 2562, 284, 42790, 198, 220, 220, 220, 329, 2587, 287, 2587, 62, 24432, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 2587, 18872, 230, 2587, 62, 71, 959, 9282, 366, 33665, 62, 71, 959, 9282, 857, 407, 3994, 25, 705, 3, 33665, 29653, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2587, 62, 11600, 796, 360, 713, 90, 10100, 11, 20650, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 42535, 3419, 198, 220, 220, 220, 477, 62, 33665, 62, 298, 871, 796, 309, 29291, 90, 5317, 2624, 11, 5317, 2624, 92, 21737, 198, 220, 220, 220, 329, 2587, 287, 2587, 62, 24432, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5740, 326, 428, 318, 16237, 416, 4941, 13, 19179, 284, 2587, 62, 11600, 389, 12548, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 287, 649, 62, 42854, 62, 24432, 198, 220, 220, 220, 220, 220, 220, 220, 2587, 62, 11600, 58, 33665, 60, 796, 649, 62, 42854, 62, 24432, 58, 33665, 60, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 0, 7, 439, 62, 33665, 62, 298, 871, 11, 649, 62, 42854, 62, 24432, 58, 33665, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 17220, 14184, 16856, 198, 220, 220, 220, 477, 62, 33665, 62, 298, 871, 796, 2824, 7, 7248, 7, 439, 62, 33665, 62, 298, 871, 4008, 198, 220, 220, 220, 1303, 1114, 1123, 9312, 351, 257, 2587, 11, 4155, 326, 340, 691, 7160, 287, 530, 286, 2587, 2628, 13, 198, 220, 220, 220, 1303, 1002, 340, 7160, 287, 517, 621, 530, 2587, 1448, 11, 4174, 262, 2587, 18911, 523, 326, 262, 220, 198, 220, 220, 220, 1303, 9312, 691, 468, 530, 2587, 13, 198, 220, 220, 220, 29052, 62, 33665, 62, 71, 959, 9282, 796, 360, 713, 90, 10100, 11, 5317, 2624, 92, 3419, 198, 220, 220, 220, 1312, 796, 352, 198, 220, 220, 220, 329, 2587, 287, 2587, 62, 71, 959, 9282, 198, 220, 220, 220, 220, 220, 220, 220, 29052, 62, 33665, 62, 71, 959, 9282, 58, 33665, 60, 796, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 920, 287, 477, 62, 33665, 62, 298, 871, 198, 220, 220, 220, 220, 220, 220, 220, 5696, 796, 10903, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2587, 287, 2587, 62, 24432, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 920, 18872, 230, 220, 2587, 62, 11600, 58, 33665, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 33665, 82, 11, 2587, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 352, 1279, 4129, 7, 33665, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 262, 4511, 8475, 2587, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2603, 62, 22510, 796, 5288, 26933, 77, 6975, 605, 62, 33665, 62, 71, 959, 9282, 58, 6759, 60, 329, 2603, 287, 5696, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8475, 62, 6759, 796, 2587, 62, 71, 959, 9282, 58, 6759, 62, 22510, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 8099, 920, 422, 477, 584, 5696, 287, 8633, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12233, 265, 0, 7, 33665, 82, 11, 5696, 764, 855, 8475, 62, 6759, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2587, 287, 5696, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12233, 265, 0, 7, 33665, 62, 11600, 58, 33665, 4357, 1064, 11085, 7, 87, 3784, 2124, 6624, 920, 11, 2587, 62, 11600, 58, 33665, 60, 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, 886, 198, 437, 198, 198, 8818, 308, 907, 71, 62, 8094, 62, 18302, 14344, 62, 8310, 363, 434, 7, 15252, 62, 27740, 62, 31499, 3712, 38469, 90, 51, 29291, 90, 50, 3916, 11, 5317, 2624, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2891, 62, 27740, 62, 31499, 3712, 38469, 90, 51, 29291, 90, 50, 3916, 11, 5317, 2624, 11709, 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, 2587, 62, 71, 959, 9282, 3712, 38469, 90, 10100, 92, 796, 10903, 58, 12962, 198, 220, 220, 220, 1303, 3497, 477, 262, 3518, 2628, 198, 220, 220, 220, 1468, 62, 42854, 62, 24432, 796, 360, 713, 90, 10100, 11, 19182, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 5512, 16, 11709, 3419, 198, 220, 220, 220, 2628, 796, 308, 907, 71, 13, 19849, 13, 1136, 62, 42854, 62, 24432, 3419, 198, 220, 220, 220, 3891, 796, 685, 70, 907, 71, 13, 19849, 13, 1136, 62, 42854, 62, 3672, 7, 2164, 79, 58, 16, 4357, 1036, 79, 58, 17, 12962, 329, 1036, 79, 287, 2628, 60, 198, 220, 220, 220, 329, 357, 72, 11, 1438, 8, 287, 27056, 378, 7, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 658, 796, 308, 907, 71, 13, 19849, 13, 1136, 62, 298, 871, 62, 1640, 62, 42854, 62, 8094, 7, 24432, 58, 72, 7131, 16, 4357, 2628, 58, 72, 7131, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 796, 2628, 58, 72, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1468, 62, 42854, 62, 24432, 58, 3672, 60, 796, 47527, 27740, 11, 920, 8, 329, 920, 287, 220, 658, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 24229, 434, 198, 220, 220, 220, 299, 658, 796, 4129, 7, 15252, 62, 27740, 62, 31499, 8, 1343, 4129, 7, 25981, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 2488, 10951, 366, 42974, 434, 278, 720, 77, 658, 12066, 1, 198, 220, 220, 220, 503, 62, 27740, 62, 31499, 11, 503, 62, 27740, 62, 31499, 62, 8899, 796, 308, 907, 71, 13, 19849, 13, 13966, 13, 8310, 363, 434, 7, 15252, 62, 27740, 62, 31499, 11, 2891, 62, 27740, 62, 31499, 8, 628, 220, 220, 220, 1303, 13610, 257, 22155, 286, 649, 3518, 2628, 1262, 262, 2560, 1200, 2776, 198, 220, 220, 220, 1303, 1022, 5128, 62, 27740, 62, 31499, 290, 503, 62, 27740, 62, 31499, 62, 8899, 13, 383, 2560, 379, 6376, 1312, 286, 5128, 62, 27740, 62, 31499, 220, 198, 220, 220, 220, 1303, 468, 1751, 503, 62, 27740, 62, 31499, 62, 8899, 58, 72, 60, 198, 220, 220, 220, 649, 62, 42854, 62, 24432, 796, 360, 713, 90, 10100, 11, 20650, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 42535, 3419, 198, 220, 220, 220, 5128, 62, 27740, 62, 31499, 796, 410, 9246, 7, 15252, 62, 27740, 62, 31499, 11, 2891, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 1303, 1114, 1123, 3518, 1448, 198, 220, 220, 220, 329, 1438, 287, 3891, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 42854, 62, 24432, 58, 3672, 60, 796, 309, 29291, 90, 5317, 2624, 11, 2558, 2624, 92, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1114, 1123, 286, 262, 5391, 15940, 287, 262, 3518, 1448, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5391, 62, 12985, 287, 1468, 62, 42854, 62, 24432, 58, 3672, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 262, 5391, 62, 12985, 373, 530, 286, 262, 12066, 287, 262, 24225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5391, 62, 12985, 18872, 230, 220, 5128, 62, 27740, 62, 31499, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 663, 1751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 1064, 11085, 7, 87, 3784, 87, 6624, 5391, 62, 12985, 11, 5128, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1751, 796, 503, 62, 27740, 62, 31499, 62, 8899, 58, 9630, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3060, 262, 1751, 284, 262, 649, 3518, 1448, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1200, 287, 1751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1200, 18872, 231, 220, 649, 62, 42854, 62, 24432, 58, 3672, 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, 3605, 62, 42854, 62, 24432, 58, 3672, 4357, 1200, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 340, 2492, 470, 287, 262, 24225, 11, 645, 2458, 3306, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 3605, 62, 42854, 62, 24432, 58, 3672, 4357, 5391, 62, 12985, 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, 1303, 17220, 1468, 2628, 290, 18305, 1096, 198, 220, 220, 220, 329, 1438, 287, 3891, 198, 220, 220, 220, 220, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 28956, 62, 42854, 62, 3672, 7, 3672, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 24442, 366, 50, 24871, 2890, 2746, 1, 198, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 13966, 13, 28869, 11413, 1096, 3419, 628, 220, 220, 220, 1303, 10854, 262, 2587, 18911, 611, 340, 7160, 523, 326, 1123, 9312, 468, 530, 198, 220, 220, 220, 1303, 393, 1342, 2587, 3518, 2628, 198, 220, 220, 220, 611, 657, 1279, 4129, 7, 33665, 62, 71, 959, 9282, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1429, 62, 33665, 62, 71, 959, 9282, 0, 7, 3605, 62, 42854, 62, 24432, 11, 2587, 62, 71, 959, 9282, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 13610, 649, 3518, 2628, 198, 220, 220, 220, 329, 357, 72, 11, 1438, 8, 287, 27056, 378, 7, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 796, 2628, 58, 72, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 15940, 796, 685, 27740, 62, 12985, 58, 17, 60, 329, 5391, 62, 12985, 287, 649, 62, 42854, 62, 24432, 58, 3672, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 279, 12985, 796, 308, 907, 71, 13, 19849, 13, 2860, 62, 42854, 62, 8094, 7, 27740, 11, 15940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 2617, 62, 42854, 62, 3672, 7, 27740, 11, 279, 12985, 11, 1438, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 503, 62, 27740, 62, 31499, 198, 437, 198, 198, 8818, 308, 907, 71, 62, 8094, 62, 18302, 14344, 62, 8310, 363, 434, 7, 15252, 62, 27740, 62, 31499, 3712, 38469, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2891, 62, 27740, 62, 31499, 3712, 38469, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 11709, 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, 2587, 62, 71, 959, 9282, 3712, 38469, 90, 10100, 92, 796, 10903, 58, 12962, 198, 220, 220, 220, 1303, 3497, 477, 262, 3518, 2628, 198, 220, 220, 220, 1468, 62, 42854, 62, 24432, 796, 360, 713, 90, 10100, 11, 20650, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 42535, 3419, 198, 220, 220, 220, 2628, 796, 308, 907, 71, 13, 19849, 13, 1136, 62, 42854, 62, 24432, 3419, 198, 220, 220, 220, 3891, 796, 685, 70, 907, 71, 13, 19849, 13, 1136, 62, 42854, 62, 3672, 7, 2164, 79, 58, 16, 4357, 1036, 79, 58, 17, 12962, 329, 1036, 79, 287, 2628, 60, 198, 220, 220, 220, 329, 357, 72, 11, 1438, 8, 287, 27056, 378, 7, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 658, 796, 308, 907, 71, 13, 19849, 13, 1136, 62, 298, 871, 62, 1640, 62, 42854, 62, 8094, 7, 24432, 58, 72, 7131, 16, 4357, 2628, 58, 72, 7131, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 796, 2628, 58, 72, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1468, 62, 42854, 62, 24432, 58, 3672, 60, 796, 47527, 27740, 11, 920, 8, 329, 920, 287, 220, 658, 60, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 24229, 434, 198, 220, 220, 220, 299, 658, 796, 4129, 7, 15252, 62, 27740, 62, 31499, 8, 1343, 4129, 7, 25981, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 2488, 10951, 366, 42974, 434, 278, 720, 77, 658, 12066, 1, 198, 220, 220, 220, 503, 62, 27740, 62, 31499, 11, 503, 62, 27740, 62, 31499, 62, 8899, 796, 308, 907, 71, 13, 19849, 13, 13966, 13, 8310, 363, 434, 7, 15252, 62, 27740, 62, 31499, 11, 2891, 62, 27740, 62, 31499, 8, 628, 220, 220, 220, 1303, 13610, 257, 22155, 286, 649, 3518, 2628, 1262, 262, 2560, 1200, 2776, 198, 220, 220, 220, 1303, 1022, 5128, 62, 27740, 62, 31499, 290, 503, 62, 27740, 62, 31499, 62, 8899, 13, 383, 2560, 379, 6376, 1312, 286, 5128, 62, 27740, 62, 31499, 220, 198, 220, 220, 220, 1303, 468, 1751, 503, 62, 27740, 62, 31499, 62, 8899, 58, 72, 60, 198, 220, 220, 220, 649, 62, 42854, 62, 24432, 796, 360, 713, 90, 10100, 11, 20650, 90, 51, 29291, 90, 5317, 2624, 11, 5317, 2624, 42535, 3419, 198, 220, 220, 220, 5128, 62, 27740, 62, 31499, 796, 410, 9246, 7, 15252, 62, 27740, 62, 31499, 11, 2891, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 1303, 1114, 1123, 3518, 1448, 198, 220, 220, 220, 329, 1438, 287, 3891, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 42854, 62, 24432, 58, 3672, 60, 796, 309, 29291, 90, 5317, 2624, 11, 5317, 2624, 92, 21737, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1114, 1123, 286, 262, 5391, 15940, 287, 262, 3518, 1448, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5391, 62, 12985, 287, 1468, 62, 42854, 62, 24432, 58, 3672, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 262, 5391, 62, 12985, 373, 530, 286, 262, 12066, 287, 262, 24225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5391, 62, 12985, 18872, 230, 220, 5128, 62, 27740, 62, 31499, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 663, 1751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 1064, 11085, 7, 87, 3784, 87, 6624, 5391, 62, 12985, 11, 5128, 62, 27740, 62, 31499, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1751, 796, 503, 62, 27740, 62, 31499, 62, 8899, 58, 9630, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3060, 262, 1751, 284, 262, 649, 3518, 1448, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1200, 287, 1751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1200, 18872, 231, 220, 649, 62, 42854, 62, 24432, 58, 3672, 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, 3605, 62, 42854, 62, 24432, 58, 3672, 4357, 1200, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 340, 2492, 470, 287, 262, 24225, 11, 645, 2458, 3306, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 3605, 62, 42854, 62, 24432, 58, 3672, 4357, 5391, 62, 12985, 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, 1303, 17220, 1468, 2628, 290, 18305, 1096, 198, 220, 220, 220, 329, 1438, 287, 3891, 198, 220, 220, 220, 220, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 28956, 62, 42854, 62, 3672, 7, 3672, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 24442, 366, 50, 24871, 2890, 2746, 1, 198, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 13966, 13, 28869, 11413, 1096, 3419, 628, 220, 220, 220, 1303, 10854, 262, 2587, 18911, 611, 340, 7160, 523, 326, 1123, 9312, 468, 530, 198, 220, 220, 220, 1303, 393, 1342, 2587, 3518, 2628, 198, 220, 220, 220, 611, 657, 1279, 4129, 7, 33665, 62, 71, 959, 9282, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1429, 62, 33665, 62, 71, 959, 9282, 0, 7, 3605, 62, 42854, 62, 24432, 11, 2587, 62, 71, 959, 9282, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 13610, 649, 3518, 2628, 198, 220, 220, 220, 329, 357, 72, 11, 1438, 8, 287, 27056, 378, 7, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 796, 2628, 58, 72, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 15940, 796, 685, 27740, 62, 12985, 58, 17, 60, 329, 5391, 62, 12985, 287, 649, 62, 42854, 62, 24432, 58, 3672, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 279, 12985, 796, 308, 907, 71, 13, 19849, 13, 2860, 62, 42854, 62, 8094, 7, 27740, 11, 15940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 308, 907, 71, 13, 19849, 13, 2617, 62, 42854, 62, 3672, 7, 27740, 11, 279, 12985, 11, 1438, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 503, 62, 27740, 62, 31499, 198, 437, 198 ]
2.352891
3,511
using Test; using AdalmPluto; @testset "libIIO/scan.jl" begin # disable the assertions toggleNoAssertions(true); C_iio_has_backend("usb") || (@error "Library doesn't have the USB backend available. Skipping tests."; return;) @testset "Scan context" begin # C_iio_create_scan_context @test (global scan_context = C_iio_create_scan_context("usb")) != C_NULL; if scan_context == C_NULL @error "C_iio_create_scan_context failed, skipping the remaining tests"; else info = Ref{Ptr{Ptr{iio_context_info}}}(0); # C_iio_scan_context_get_info_list @test (global nb_contexts = C_iio_scan_context_get_info_list(scan_context, info)) > 0; if nb_contexts < 0 @error "C_iio_scan_context_get_info_list failed, skipping the remaining tests"; C_iio_scan_context_destroy(scan_context); elseif nb_contexts == 0 @warn "0 contexts found, skipping the remaining tests"; C_iio_context_info_list_free(info[]); C_iio_scan_context_destroy(scan_context); else loaded_info = unsafe_load(info[], 1); # C_iio_context_info_get_description @test C_iio_context_info_get_description(loaded_info) != ""; # C_iio_context_info_get_uri @test C_iio_context_info_get_uri(loaded_info) != ""; # C_iio_context_info_list_free @test C_iio_context_info_list_free(info[]) === nothing; # C_iio_scan_context_destroy @test C_iio_scan_context_destroy(scan_context) === nothing; end end end # @testset "Scan block" begin # # C_iio_create_scan_block # @test (global scan_block = C_iio_create_scan_block("usb")) != C_NULL; # if scan_block == C_NULL # @error "C_iio_create_scan_block failed, skipping the remaining tests."; # else # # C_iio_scan_block_scan # @test (global nb_contexts = C_iio_scan_block_scan(scan_block)) > 0; # if nb_contexts < 0 # @error "C_iio_scan_block_scan failed, skipping the remaining tests"; # C_iio_scan_block_destroy(scan_block); # elseif nb_contexts == 0 # @warn "0 contexts found, skipping the remaining tests"; # C_iio_scan_block_destroy(scan_block); # else # # C_iio_scan_block_get_info # @test C_iio_scan_block_get_info(scan_block, UInt32(0)) != C_NULL; # # C_iio_scan_block_destroy # @test C_iio_scan_block_destroy(scan_block) === nothing; # end # end # end end
[ 3500, 6208, 26, 198, 198, 3500, 1215, 38182, 3646, 9390, 26, 198, 198, 31, 9288, 2617, 366, 8019, 3978, 46, 14, 35836, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 15560, 262, 29965, 198, 220, 220, 220, 19846, 2949, 8021, 861, 507, 7, 7942, 1776, 198, 220, 220, 220, 327, 62, 72, 952, 62, 10134, 62, 1891, 437, 7203, 43319, 4943, 8614, 4275, 18224, 366, 23377, 1595, 470, 423, 262, 8450, 30203, 1695, 13, 3661, 4501, 5254, 526, 26, 1441, 26, 8, 628, 220, 220, 220, 2488, 9288, 2617, 366, 33351, 4732, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 17953, 62, 35836, 62, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 20541, 9367, 62, 22866, 796, 327, 62, 72, 952, 62, 17953, 62, 35836, 62, 22866, 7203, 43319, 48774, 14512, 327, 62, 33991, 26, 628, 220, 220, 220, 220, 220, 220, 220, 611, 9367, 62, 22866, 6624, 327, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 34, 62, 72, 952, 62, 17953, 62, 35836, 62, 22866, 4054, 11, 31017, 262, 5637, 5254, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 796, 6524, 90, 46745, 90, 46745, 90, 72, 952, 62, 22866, 62, 10951, 42535, 7, 15, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 1136, 62, 10951, 62, 4868, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 20541, 299, 65, 62, 22866, 82, 796, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 1136, 62, 10951, 62, 4868, 7, 35836, 62, 22866, 11, 7508, 4008, 1875, 657, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 299, 65, 62, 22866, 82, 1279, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 18224, 366, 34, 62, 72, 952, 62, 35836, 62, 22866, 62, 1136, 62, 10951, 62, 4868, 4054, 11, 31017, 262, 5637, 5254, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 41659, 7, 35836, 62, 22866, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 299, 65, 62, 22866, 82, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 366, 15, 26307, 1043, 11, 31017, 262, 5637, 5254, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 4868, 62, 5787, 7, 10951, 21737, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 41659, 7, 35836, 62, 22866, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9639, 62, 10951, 796, 21596, 62, 2220, 7, 10951, 58, 4357, 352, 1776, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 1136, 62, 11213, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 1136, 62, 11213, 7, 14578, 62, 10951, 8, 14512, 366, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 1136, 62, 9900, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 1136, 62, 9900, 7, 14578, 62, 10951, 8, 14512, 366, 8172, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 4868, 62, 5787, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 327, 62, 72, 952, 62, 22866, 62, 10951, 62, 4868, 62, 5787, 7, 10951, 58, 12962, 24844, 2147, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 41659, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 327, 62, 72, 952, 62, 35836, 62, 22866, 62, 41659, 7, 35836, 62, 22866, 8, 24844, 2147, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 2488, 9288, 2617, 366, 33351, 2512, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1303, 327, 62, 72, 952, 62, 17953, 62, 35836, 62, 9967, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 357, 20541, 9367, 62, 9967, 796, 327, 62, 72, 952, 62, 17953, 62, 35836, 62, 9967, 7203, 43319, 48774, 14512, 327, 62, 33991, 26, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 9367, 62, 9967, 6624, 327, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 18224, 366, 34, 62, 72, 952, 62, 17953, 62, 35836, 62, 9967, 4054, 11, 31017, 262, 5637, 5254, 526, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1303, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 35836, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 357, 20541, 299, 65, 62, 22866, 82, 796, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 35836, 7, 35836, 62, 9967, 4008, 1875, 657, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 299, 65, 62, 22866, 82, 1279, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 18224, 366, 34, 62, 72, 952, 62, 35836, 62, 9967, 62, 35836, 4054, 11, 31017, 262, 5637, 5254, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 41659, 7, 35836, 62, 9967, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 361, 299, 65, 62, 22866, 82, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 40539, 366, 15, 26307, 1043, 11, 31017, 262, 5637, 5254, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 41659, 7, 35836, 62, 9967, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1303, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 1136, 62, 10951, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 1136, 62, 10951, 7, 35836, 62, 9967, 11, 471, 5317, 2624, 7, 15, 4008, 14512, 327, 62, 33991, 26, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1303, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 41659, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 9288, 327, 62, 72, 952, 62, 35836, 62, 9967, 62, 41659, 7, 35836, 62, 9967, 8, 24844, 2147, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 886, 198, 220, 220, 220, 1303, 886, 628, 198, 437, 198 ]
1.997143
1,400
# check speed of new and old sparse filter using Revise using LarSurf using LinearAlgebraicRepresentation Lar = LinearAlgebraicRepresentation using Plasm, SparseArrays using Pandas using Seaborn using Dates using Logging using Profile using ProfileView b3, something = LarSurf.get_boundary3([30,30,30]) LarSurf.sparse_filter!(b3, 1, 1, 0) LarSurf.sparse_filter_old!(b3, 1, 1, 0) println("start") @time LarSurf.sparse_filter!(b3, 1, 1, 0) @time LarSurf.sparse_filter!(b3, 1, 1, 0) @time LarSurf.sparse_filter!(b3, 1, 1, 0) @time LarSurf.sparse_filter!(b3, 1, 1, 0) @time LarSurf.sparse_filter!(b3, 1, 1, 0) println("asdf") # b3 = LarSurf.get_boundary3([30,30,30]) @time LarSurf.sparse_filter_old!(b3, 1, 1, 0) # b3 = LarSurf.get_boundary3([30,30,30]) @time LarSurf.sparse_filter_old!(b3, 1, 1, 0) @time LarSurf.sparse_filter_old!(b3, 1, 1, 0) @time LarSurf.sparse_filter_old!(b3, 1, 1, 0) @time LarSurf.sparse_filter_old!(b3, 1, 1, 0)
[ 2, 2198, 2866, 286, 649, 290, 1468, 29877, 8106, 198, 198, 3500, 5416, 786, 198, 3500, 25577, 14214, 69, 198, 3500, 44800, 2348, 29230, 291, 40171, 341, 198, 43, 283, 796, 44800, 2348, 29230, 291, 40171, 341, 198, 3500, 1345, 8597, 11, 1338, 17208, 3163, 20477, 198, 3500, 16492, 292, 198, 3500, 1001, 397, 1211, 198, 3500, 44712, 198, 3500, 5972, 2667, 198, 198, 3500, 13118, 198, 3500, 13118, 7680, 628, 198, 65, 18, 11, 1223, 796, 25577, 14214, 69, 13, 1136, 62, 7784, 560, 18, 26933, 1270, 11, 1270, 11, 1270, 12962, 198, 43, 283, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 43, 283, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 35235, 7203, 9688, 4943, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 198, 35235, 7203, 292, 7568, 4943, 198, 2, 275, 18, 796, 25577, 14214, 69, 13, 1136, 62, 7784, 560, 18, 26933, 1270, 11, 1270, 11, 1270, 12962, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 2, 275, 18, 796, 25577, 14214, 69, 13, 1136, 62, 7784, 560, 18, 26933, 1270, 11, 1270, 11, 1270, 12962, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198, 31, 2435, 25577, 14214, 69, 13, 82, 29572, 62, 24455, 62, 727, 0, 7, 65, 18, 11, 352, 11, 352, 11, 657, 8, 198 ]
2.225118
422
module PySCF using PyCall: pyimport pyscf = pyimport("pyscf") mp = pyimport("pyscf.mp") # Had to import mp alone ??! cc = pyimport("pyscf.cc") # Had to import mp alone ??! # Utilities function pyscf_atom_from_xyz(fpath::String) join(split(read(open(fpath),String),"\n")[3:end],"\n") end function index(i::Int,j::Int) m,M = minmax(i-1,j-1) M*(M+1)÷2 + m + 1 end # Compound indices ijkl function get_4idx(i::Int,j::Int,k::Int,l::Int) ij = index(i,j) kl = index(k,l) index(ij,kl) end # Calculation of the electronic structure of a molecule # with the help of PySCF to calculate AO integrals and hold molecular data # * Restricted Hartree-Fock # * Møller-Plesset order 2 # * Coupled Cluster Singles and Doubles # Calculates the energy of any molecule. # Instructions at https://github.com/CrawfordGroup/ProgrammingProjects # may be of interest. using Formatting: printfmt using LinearAlgebra: Diagonal, Hermitian, eigen, norm, tr, diag, dot include("diis.jl") include("scf.jl") include("mp2.jl") include("ccsd.jl") include("properties.jl") end
[ 198, 21412, 9485, 6173, 37, 198, 198, 3500, 9485, 14134, 25, 12972, 11748, 198, 198, 79, 893, 12993, 796, 12972, 11748, 7203, 79, 893, 12993, 4943, 198, 3149, 796, 12972, 11748, 7203, 79, 893, 12993, 13, 3149, 4943, 220, 220, 1303, 11161, 284, 1330, 29034, 3436, 19153, 0, 198, 535, 796, 12972, 11748, 7203, 79, 893, 12993, 13, 535, 4943, 1303, 11161, 284, 1330, 29034, 3436, 19153, 0, 198, 198, 2, 41086, 198, 8818, 279, 893, 12993, 62, 37696, 62, 6738, 62, 5431, 89, 7, 69, 6978, 3712, 10100, 8, 198, 220, 220, 4654, 7, 35312, 7, 961, 7, 9654, 7, 69, 6978, 828, 10100, 27267, 59, 77, 4943, 58, 18, 25, 437, 17241, 59, 77, 4943, 198, 437, 198, 198, 8818, 6376, 7, 72, 3712, 5317, 11, 73, 3712, 5317, 8, 198, 220, 220, 285, 11, 44, 796, 949, 9806, 7, 72, 12, 16, 11, 73, 12, 16, 8, 198, 220, 220, 337, 9, 7, 44, 10, 16, 8, 127, 115, 17, 1343, 285, 1343, 352, 198, 437, 198, 198, 2, 3082, 633, 36525, 1312, 73, 41582, 198, 8818, 651, 62, 19, 312, 87, 7, 72, 3712, 5317, 11, 73, 3712, 5317, 11, 74, 3712, 5317, 11, 75, 3712, 5317, 8, 198, 220, 220, 1312, 73, 796, 6376, 7, 72, 11, 73, 8, 198, 220, 220, 479, 75, 796, 6376, 7, 74, 11, 75, 8, 198, 220, 220, 6376, 7, 2926, 11, 41582, 8, 198, 437, 198, 198, 2, 2199, 14902, 286, 262, 7914, 4645, 286, 257, 27756, 198, 2, 351, 262, 1037, 286, 9485, 6173, 37, 284, 15284, 317, 46, 4132, 30691, 290, 1745, 18955, 1366, 198, 2, 1635, 8324, 20941, 11345, 631, 12, 37, 735, 198, 2, 1635, 337, 24172, 6051, 12, 47, 1203, 316, 1502, 362, 198, 2, 1635, 15062, 10137, 38279, 5573, 829, 290, 5728, 7689, 198, 2, 27131, 689, 262, 2568, 286, 597, 27756, 13, 198, 2, 27759, 379, 3740, 1378, 12567, 13, 785, 14, 34, 1831, 3841, 13247, 14, 15167, 2229, 16775, 82, 198, 2, 743, 307, 286, 1393, 13, 198, 198, 3500, 18980, 889, 25, 30812, 16762, 198, 3500, 44800, 2348, 29230, 25, 6031, 27923, 11, 2332, 2781, 666, 11, 304, 9324, 11, 2593, 11, 491, 11, 2566, 363, 11, 16605, 198, 198, 17256, 7203, 10989, 271, 13, 20362, 4943, 198, 17256, 7203, 1416, 69, 13, 20362, 4943, 198, 17256, 7203, 3149, 17, 13, 20362, 4943, 198, 17256, 7203, 535, 21282, 13, 20362, 4943, 198, 17256, 7203, 48310, 13, 20362, 4943, 198, 198, 437, 198 ]
2.590799
413
# Code used for latency profiling using StatsBase, Statistics, Dates struct ProfilerInput worker::Int θ::Float64 q::Float64 timestamp::Time comp_delay::Float64 comm_delay::Float64 end struct ProfilerOutput worker::Int # worker index θ::Float64 # fraction of the dataset stored by this worker, averaged over all input samples that make up this output q::Float64 # fraction of local data processed per iteration, averaged over all input samples that make up this output comp_mc::Float64 # = (mean comp. delay) / (θ*q) comp_vc::Float64 # = (var of comp. delay) / (θ*q) comm_mc::Float64 # = mean comm. delay comm_vc::Float64 # = var of comm. delay end Base.isless(p::Pair{Time, CodedComputing.ProfilerInput}, q::Pair{Time, CodedComputing.ProfilerInput}) = isless(first(p), first(q)) function setup_profiler_channels(;chin_size=200, chout_size=200) chin = ConcurrentCircularBuffer{ProfilerInput}(chin_size) chout = ConcurrentCircularBuffer{ProfilerOutput}(chout_size) chin, chout end function StatsBase.var(f::Function, itr) g = (x) -> f(x)^2 mean(g, itr) - mean(f, itr)^2 end """ Remove all values at the end of the window older than windowsize, and return the number of elements removed. """ function Base.filter!(w::CircularBuffer{ProfilerInput}; windowsize) rv = 0 while length(w) > 0 && (w[1].timestamp - w[end].timestamp) > windowsize pop!(w) rv += 1 end rv end """ Return a view into the elements of w in beween the qlower and qupper quantiles. """ function comp_quantile_view(w::CircularBuffer{ProfilerInput}, buffer::Vector{ProfilerInput}, qlower::Real, qupper::Real) 0 <= qlower <= qupper <= 1.0 || throw(ArgumentError("qlower is $qlower and qupper is $qupper")) n = length(w) for i in 1:n buffer[i] = w[i] end @views sort!(buffer[1:n], by=(x)->getfield(x, :comp_delay), alg=QuickSort) il = max(1, ceil(Int, n*qlower)) iu = min(length(buffer), floor(Int, n*qupper)) view(buffer, il:iu) end """ Return a view into the elements of w in beween the qlower and qupper quantiles. """ function comm_quantile_view(w::CircularBuffer{ProfilerInput}, buffer::Vector{ProfilerInput}, qlower::Real, qupper::Real) 0 <= qlower <= qupper <= 1.0 || throw(ArgumentError("qlower is $qlower and qupper is $qupper")) n = length(w) for i in 1:n buffer[i] = w[i] end @views sort!(buffer[1:n], by=(x)->getfield(x, :comm_delay), alg=QuickSort) il = max(1, ceil(Int, n*qlower)) iu = min(length(buffer), floor(Int, n*qupper)) view(buffer, il:iu) end function comp_mean_var(w::CircularBuffer{ProfilerInput}; buffer::Vector{ProfilerInput}, qlower::Real, qupper::Real, minsamples::Integer) vs = comp_quantile_view(w, buffer, qlower, qupper) if length(vs) < minsamples return NaN, NaN end m = mean((x)->getfield(x, :comp_delay) / (getfield(x, :θ) * getfield(x, :q)), vs) v = var((x)->getfield(x, :comp_delay) / (getfield(x, :θ) * getfield(x, :q)), vs) m, v end function comm_mean_var(w::CircularBuffer{ProfilerInput}; buffer::Vector{ProfilerInput}, qlower::Real, qupper::Real, minsamples::Integer) vs = comm_quantile_view(w, buffer, qlower, qupper) if length(vs) < minsamples return NaN, NaN end m = mean((x)->getfield(x, :comm_delay), vs) v = var((x)->getfield(x, :comm_delay), vs) m, v end function process_window(w::CircularBuffer{ProfilerInput}, i::Integer; buffer::Vector{ProfilerInput}, qlower::Real, qupper::Real, minsamples::Integer)::ProfilerOutput length(w) > 0 || throw(ArgumentError("window must not be empty")) θ = mean((x)->getfield(x, :θ), w) q = mean((x)->getfield(x, :q), w) comp_mc, comp_vc = comp_mean_var(w; buffer, qlower, qupper, minsamples) comm_mc, comm_vc = comm_mean_var(w; buffer, qlower, qupper, minsamples) ProfilerOutput(i, θ, q, comp_mc, comp_vc, comm_mc, comm_vc) end """ Latency profiling sub-system. Receives latency observations on `chin`, computes the mean and variance over a moving time window of length `windowsize`, and sends the results on `chout`. """ function latency_profiler(chin::ConcurrentCircularBuffer{ProfilerInput}, chout::ConcurrentCircularBuffer{ProfilerOutput}; nworkers::Integer, qlower::Real=0.1, qupper::Real=0.9, buffersize::Integer=1000, minsamples::Integer=10, windowsize::Dates.AbstractTime=Second(60)) 0 < nworkers || throw(ArgumentError("nworkers is $nworkers")) 0 <= qlower <= qupper <= 1.0 || throw(ArgumentError("qlower is $qlower and qupper is $qupper")) @info "latency_profiler task started with windowsize $windowsize and minsamples $minsamples on thread $(Threads.threadid())" # maintain a window of latency samples for each worker ws = [CircularBuffer{CodedComputing.ProfilerInput}(buffersize) for _ in 1:nworkers] buffer = Vector{ProfilerInput}(undef, buffersize) # process incoming latency samples while isopen(chin) # consume all values currently in the channel try vin::ProfilerInput = take!(chin) if !isnan(vin.comp_delay) && !isnan(vin.comm_delay) pushfirst!(ws[vin.worker], vin) end catch e if e isa InvalidStateException @info "error taking value from input channel" e break else rethrow() end end while isready(chin) try vin::ProfilerInput = take!(chin) if !isnan(vin.comp_delay) && !isnan(vin.comm_delay) pushfirst!(ws[vin.worker], vin) end catch e if e isa InvalidStateException @info "error taking value from input channel" e break else rethrow() end end end # filter out values older than windowsize for i in 1:nworkers filter!(ws[i]; windowsize) end # compute updated statistics for all workers for i in 1:nworkers if length(ws[i]) == 0 continue end vout = process_window(ws[i], i; buffer, qlower, qupper, minsamples) if isnan(vout.θ) || isnan(vout.q) || isnan(vout.comp_mc) || isnan(vout.comp_vc) || isnan(vout.comm_mc) || isnan(vout.comm_vc) continue end if vout.comp_mc < 0 || vout.comp_vc < 0 || vout.comm_mc < 0 || vout.comm_vc < 0 continue end if isapprox(vout.comp_mc, 0) || isapprox(vout.comp_vc, 0) || isapprox(vout.comm_mc, 0) || isapprox(vout.comm_vc, 0) continue end try push!(chout, vout) catch e if e isa InvalidStateException @info "error pushing value into output channel" e break else rethrow() end end end end @info "latency_profiler task finished" end
[ 2, 6127, 973, 329, 24812, 31582, 198, 3500, 20595, 14881, 11, 14370, 11, 44712, 198, 198, 7249, 4415, 5329, 20560, 198, 220, 220, 220, 8383, 3712, 5317, 198, 220, 220, 220, 7377, 116, 3712, 43879, 2414, 198, 220, 220, 220, 10662, 3712, 43879, 2414, 198, 220, 220, 220, 41033, 3712, 7575, 220, 220, 220, 220, 198, 220, 220, 220, 552, 62, 40850, 3712, 43879, 2414, 198, 220, 220, 220, 725, 62, 40850, 3712, 43879, 2414, 220, 220, 220, 220, 198, 437, 198, 198, 7249, 4415, 5329, 26410, 198, 220, 220, 220, 8383, 3712, 5317, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 8383, 6376, 198, 220, 220, 220, 7377, 116, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13390, 286, 262, 27039, 8574, 416, 428, 8383, 11, 16449, 625, 477, 5128, 8405, 326, 787, 510, 428, 5072, 198, 220, 220, 220, 10662, 3712, 43879, 2414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13390, 286, 1957, 1366, 13686, 583, 24415, 11, 16449, 625, 477, 5128, 8405, 326, 787, 510, 428, 5072, 198, 220, 220, 220, 552, 62, 23209, 3712, 43879, 2414, 220, 220, 220, 1303, 796, 357, 32604, 552, 13, 5711, 8, 1220, 357, 138, 116, 9, 80, 8, 198, 220, 220, 220, 552, 62, 28435, 3712, 43879, 2414, 220, 220, 220, 1303, 796, 357, 7785, 286, 552, 13, 5711, 8, 1220, 357, 138, 116, 9, 80, 8, 198, 220, 220, 220, 725, 62, 23209, 3712, 43879, 2414, 220, 220, 220, 1303, 796, 1612, 725, 13, 5711, 198, 220, 220, 220, 725, 62, 28435, 3712, 43879, 2414, 220, 220, 220, 1303, 796, 1401, 286, 725, 13, 5711, 198, 437, 198, 198, 14881, 13, 271, 1203, 7, 79, 3712, 47, 958, 90, 7575, 11, 327, 9043, 5377, 48074, 13, 15404, 5329, 20560, 5512, 10662, 3712, 47, 958, 90, 7575, 11, 327, 9043, 5377, 48074, 13, 15404, 5329, 20560, 30072, 796, 318, 1203, 7, 11085, 7, 79, 828, 717, 7, 80, 4008, 198, 198, 8818, 9058, 62, 5577, 5329, 62, 354, 8961, 7, 26, 24658, 62, 7857, 28, 2167, 11, 442, 448, 62, 7857, 28, 2167, 8, 198, 220, 220, 220, 22531, 796, 13223, 6657, 31560, 934, 28632, 90, 15404, 5329, 20560, 92, 7, 24658, 62, 7857, 8, 198, 220, 220, 220, 442, 448, 796, 13223, 6657, 31560, 934, 28632, 90, 15404, 5329, 26410, 92, 7, 354, 448, 62, 7857, 8, 198, 220, 220, 220, 22531, 11, 442, 448, 198, 437, 198, 198, 8818, 20595, 14881, 13, 7785, 7, 69, 3712, 22203, 11, 340, 81, 8, 198, 220, 220, 220, 308, 796, 357, 87, 8, 4613, 277, 7, 87, 8, 61, 17, 198, 220, 220, 220, 1612, 7, 70, 11, 340, 81, 8, 532, 1612, 7, 69, 11, 340, 81, 8, 61, 17, 198, 437, 198, 198, 37811, 198, 198, 27914, 477, 3815, 379, 262, 886, 286, 262, 4324, 4697, 621, 9168, 1096, 11, 290, 1441, 262, 1271, 286, 220, 198, 68, 3639, 4615, 13, 198, 37811, 198, 8818, 7308, 13, 24455, 0, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 19629, 9168, 1096, 8, 198, 220, 220, 220, 374, 85, 796, 657, 198, 220, 220, 220, 981, 4129, 7, 86, 8, 1875, 657, 11405, 357, 86, 58, 16, 4083, 16514, 27823, 532, 266, 58, 437, 4083, 16514, 27823, 8, 1875, 9168, 1096, 198, 220, 220, 220, 220, 220, 220, 220, 1461, 0, 7, 86, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 85, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 374, 85, 198, 437, 198, 198, 37811, 198, 198, 13615, 257, 1570, 656, 262, 4847, 286, 266, 287, 307, 975, 262, 10662, 21037, 290, 627, 2848, 5554, 2915, 13, 198, 37811, 198, 8818, 552, 62, 40972, 576, 62, 1177, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 5512, 11876, 3712, 38469, 90, 15404, 5329, 20560, 5512, 10662, 21037, 3712, 15633, 11, 627, 2848, 3712, 15633, 8, 198, 220, 220, 220, 657, 19841, 10662, 21037, 19841, 627, 2848, 19841, 352, 13, 15, 8614, 3714, 7, 28100, 1713, 12331, 7203, 13976, 789, 318, 720, 13976, 789, 290, 627, 2848, 318, 720, 421, 2848, 48774, 198, 220, 220, 220, 299, 796, 4129, 7, 86, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 58, 72, 60, 796, 266, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 33571, 3297, 0, 7, 22252, 58, 16, 25, 77, 4357, 416, 16193, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 5589, 62, 40850, 828, 435, 70, 28, 21063, 42758, 8, 198, 220, 220, 220, 4229, 796, 3509, 7, 16, 11, 2906, 346, 7, 5317, 11, 299, 9, 13976, 789, 4008, 198, 220, 220, 220, 1312, 84, 796, 949, 7, 13664, 7, 22252, 828, 4314, 7, 5317, 11, 299, 9, 421, 2848, 4008, 198, 220, 220, 220, 1570, 7, 22252, 11, 4229, 25, 16115, 8, 198, 437, 198, 198, 37811, 198, 198, 13615, 257, 1570, 656, 262, 4847, 286, 266, 287, 307, 975, 262, 10662, 21037, 290, 627, 2848, 5554, 2915, 13, 198, 37811, 198, 8818, 725, 62, 40972, 576, 62, 1177, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 5512, 11876, 3712, 38469, 90, 15404, 5329, 20560, 5512, 10662, 21037, 3712, 15633, 11, 627, 2848, 3712, 15633, 8, 198, 220, 220, 220, 657, 19841, 10662, 21037, 19841, 627, 2848, 19841, 352, 13, 15, 8614, 3714, 7, 28100, 1713, 12331, 7203, 13976, 789, 318, 720, 13976, 789, 290, 627, 2848, 318, 720, 421, 2848, 48774, 198, 220, 220, 220, 299, 796, 4129, 7, 86, 8, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 58, 72, 60, 796, 266, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 33571, 3297, 0, 7, 22252, 58, 16, 25, 77, 4357, 416, 16193, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 9503, 62, 40850, 828, 435, 70, 28, 21063, 42758, 8, 198, 220, 220, 220, 4229, 796, 3509, 7, 16, 11, 2906, 346, 7, 5317, 11, 299, 9, 13976, 789, 4008, 198, 220, 220, 220, 1312, 84, 796, 949, 7, 13664, 7, 22252, 828, 4314, 7, 5317, 11, 299, 9, 421, 2848, 4008, 198, 220, 220, 220, 1570, 7, 22252, 11, 4229, 25, 16115, 8, 198, 437, 198, 198, 8818, 552, 62, 32604, 62, 7785, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 19629, 11876, 3712, 38469, 90, 15404, 5329, 20560, 5512, 10662, 21037, 3712, 15633, 11, 627, 2848, 3712, 15633, 11, 23550, 12629, 3712, 46541, 8, 198, 220, 220, 220, 3691, 796, 552, 62, 40972, 576, 62, 1177, 7, 86, 11, 11876, 11, 10662, 21037, 11, 627, 2848, 8, 198, 220, 220, 220, 611, 4129, 7, 14259, 8, 1279, 23550, 12629, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 11013, 45, 11, 11013, 45, 198, 220, 220, 220, 886, 198, 220, 220, 220, 285, 796, 1612, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 5589, 62, 40850, 8, 1220, 357, 1136, 3245, 7, 87, 11, 1058, 138, 116, 8, 1635, 651, 3245, 7, 87, 11, 1058, 80, 36911, 3691, 8, 198, 220, 220, 220, 410, 796, 1401, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 5589, 62, 40850, 8, 1220, 357, 1136, 3245, 7, 87, 11, 1058, 138, 116, 8, 1635, 651, 3245, 7, 87, 11, 1058, 80, 36911, 3691, 8, 198, 220, 220, 220, 285, 11, 410, 198, 437, 198, 198, 8818, 725, 62, 32604, 62, 7785, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 19629, 11876, 3712, 38469, 90, 15404, 5329, 20560, 5512, 10662, 21037, 3712, 15633, 11, 627, 2848, 3712, 15633, 11, 23550, 12629, 3712, 46541, 8, 198, 220, 220, 220, 3691, 796, 725, 62, 40972, 576, 62, 1177, 7, 86, 11, 11876, 11, 10662, 21037, 11, 627, 2848, 8, 198, 220, 220, 220, 611, 4129, 7, 14259, 8, 1279, 23550, 12629, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 11013, 45, 11, 11013, 45, 198, 220, 220, 220, 886, 198, 220, 220, 220, 285, 796, 1612, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 9503, 62, 40850, 828, 3691, 8, 198, 220, 220, 220, 410, 796, 1401, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 9503, 62, 40850, 828, 3691, 8, 198, 220, 220, 220, 285, 11, 410, 198, 437, 198, 198, 8818, 1429, 62, 17497, 7, 86, 3712, 31560, 934, 28632, 90, 15404, 5329, 20560, 5512, 1312, 3712, 46541, 26, 11876, 3712, 38469, 90, 15404, 5329, 20560, 5512, 10662, 21037, 3712, 15633, 11, 627, 2848, 3712, 15633, 11, 23550, 12629, 3712, 46541, 2599, 25, 15404, 5329, 26410, 198, 220, 220, 220, 4129, 7, 86, 8, 1875, 657, 8614, 3714, 7, 28100, 1713, 12331, 7203, 17497, 1276, 407, 307, 6565, 48774, 198, 220, 220, 220, 7377, 116, 796, 1612, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 138, 116, 828, 266, 8, 198, 220, 220, 220, 10662, 796, 1612, 19510, 87, 8, 3784, 1136, 3245, 7, 87, 11, 1058, 80, 828, 266, 8, 198, 220, 220, 220, 552, 62, 23209, 11, 552, 62, 28435, 796, 552, 62, 32604, 62, 7785, 7, 86, 26, 11876, 11, 10662, 21037, 11, 627, 2848, 11, 23550, 12629, 8, 198, 220, 220, 220, 725, 62, 23209, 11, 725, 62, 28435, 796, 725, 62, 32604, 62, 7785, 7, 86, 26, 11876, 11, 10662, 21037, 11, 627, 2848, 11, 23550, 12629, 8, 198, 220, 220, 220, 4415, 5329, 26410, 7, 72, 11, 7377, 116, 11, 10662, 11, 552, 62, 23209, 11, 552, 62, 28435, 11, 725, 62, 23209, 11, 725, 62, 28435, 8, 198, 437, 198, 198, 37811, 198, 198, 24220, 1387, 31582, 850, 12, 10057, 13, 19520, 1083, 24812, 13050, 319, 4600, 24658, 47671, 552, 1769, 262, 1612, 290, 220, 198, 25641, 590, 625, 257, 3867, 640, 4324, 286, 4129, 4600, 28457, 1096, 47671, 290, 12800, 262, 2482, 319, 4600, 354, 448, 44646, 198, 37811, 198, 8818, 24812, 62, 5577, 5329, 7, 24658, 3712, 3103, 14421, 31560, 934, 28632, 90, 15404, 5329, 20560, 5512, 442, 448, 3712, 3103, 14421, 31560, 934, 28632, 90, 15404, 5329, 26410, 19629, 299, 22896, 3712, 46541, 11, 10662, 21037, 3712, 15633, 28, 15, 13, 16, 11, 627, 2848, 3712, 15633, 28, 15, 13, 24, 11, 39334, 1096, 3712, 46541, 28, 12825, 11, 23550, 12629, 3712, 46541, 28, 940, 11, 9168, 1096, 3712, 35, 689, 13, 23839, 7575, 28, 12211, 7, 1899, 4008, 198, 220, 220, 220, 657, 1279, 299, 22896, 8614, 3714, 7, 28100, 1713, 12331, 7203, 77, 22896, 318, 720, 77, 22896, 48774, 198, 220, 220, 220, 657, 19841, 10662, 21037, 19841, 627, 2848, 19841, 352, 13, 15, 8614, 3714, 7, 28100, 1713, 12331, 7203, 13976, 789, 318, 720, 13976, 789, 290, 627, 2848, 318, 720, 421, 2848, 48774, 198, 220, 220, 220, 2488, 10951, 366, 15460, 1387, 62, 5577, 5329, 4876, 2067, 351, 9168, 1096, 720, 28457, 1096, 290, 23550, 12629, 720, 42951, 12629, 319, 4704, 29568, 16818, 82, 13, 16663, 312, 3419, 16725, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 5529, 257, 4324, 286, 24812, 8405, 329, 1123, 8383, 198, 220, 220, 220, 266, 82, 796, 685, 31560, 934, 28632, 90, 34, 9043, 5377, 48074, 13, 15404, 5329, 20560, 92, 7, 36873, 364, 1096, 8, 329, 4808, 287, 352, 25, 77, 22896, 60, 198, 220, 220, 220, 11876, 796, 20650, 90, 15404, 5329, 20560, 92, 7, 917, 891, 11, 39334, 1096, 8, 628, 220, 220, 220, 1303, 1429, 15619, 24812, 8405, 198, 220, 220, 220, 981, 318, 9654, 7, 24658, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 15000, 477, 3815, 3058, 287, 262, 6518, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 259, 3712, 15404, 5329, 20560, 796, 1011, 0, 7, 24658, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 12647, 7, 7114, 13, 5589, 62, 40850, 8, 11405, 5145, 271, 12647, 7, 7114, 13, 9503, 62, 40850, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 11085, 0, 7, 18504, 58, 7114, 13, 28816, 4357, 410, 259, 8, 198, 220, 220, 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, 220, 220, 611, 304, 318, 64, 17665, 9012, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 18224, 2263, 1988, 422, 5128, 6518, 1, 304, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 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, 302, 16939, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 981, 318, 1493, 7, 24658, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 259, 3712, 15404, 5329, 20560, 796, 1011, 0, 7, 24658, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 271, 12647, 7, 7114, 13, 5589, 62, 40850, 8, 11405, 5145, 271, 12647, 7, 7114, 13, 9503, 62, 40850, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 11085, 0, 7, 18504, 58, 7114, 13, 28816, 4357, 410, 259, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4929, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 304, 318, 64, 17665, 9012, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 18224, 2263, 1988, 422, 5128, 6518, 1, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 302, 16939, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 8106, 503, 3815, 4697, 621, 9168, 1096, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 22896, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8106, 0, 7, 18504, 58, 72, 11208, 9168, 1096, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 24061, 6153, 7869, 329, 477, 3259, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 22896, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 18504, 58, 72, 12962, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 448, 796, 1429, 62, 17497, 7, 18504, 58, 72, 4357, 1312, 26, 11876, 11, 10662, 21037, 11, 627, 2848, 11, 23550, 12629, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2125, 272, 7, 85, 448, 13, 138, 116, 8, 8614, 2125, 272, 7, 85, 448, 13, 80, 8, 8614, 2125, 272, 7, 85, 448, 13, 5589, 62, 23209, 8, 8614, 2125, 272, 7, 85, 448, 13, 5589, 62, 28435, 8, 8614, 2125, 272, 7, 85, 448, 13, 9503, 62, 23209, 8, 8614, 2125, 272, 7, 85, 448, 13, 9503, 62, 28435, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 410, 448, 13, 5589, 62, 23209, 1279, 657, 8614, 410, 448, 13, 5589, 62, 28435, 1279, 657, 8614, 410, 448, 13, 9503, 62, 23209, 1279, 657, 8614, 410, 448, 13, 9503, 62, 28435, 1279, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 1324, 13907, 7, 85, 448, 13, 5589, 62, 23209, 11, 657, 8, 8614, 318, 1324, 13907, 7, 85, 448, 13, 5589, 62, 28435, 11, 657, 8, 8614, 318, 1324, 13907, 7, 85, 448, 13, 9503, 62, 23209, 11, 657, 8, 8614, 318, 1324, 13907, 7, 85, 448, 13, 9503, 62, 28435, 11, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 354, 448, 11, 410, 448, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4929, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 304, 318, 64, 17665, 9012, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 18224, 7796, 1988, 656, 5072, 6518, 1, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 302, 16939, 3419, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 10951, 366, 15460, 1387, 62, 5577, 5329, 4876, 5201, 1, 198, 437 ]
2.246359
3,227
# Names follow: # https://draculatheme.com/contribute#color-palette dracula_palette = [ colorant"#8be9fd" # Cyan colorant"#ff79c6" # Pink colorant"#50fa7b" # Green colorant"#bd93f9" # Purple colorant"#ffb86c" # Orange colorant"#ff5555" # Red colorant"#f1fa8c" # Yellow colorant"#6272a4" # Comment ] dracula_bg = colorant"#282a36" dracula_fg = colorant"#f8f8f2" _themes[:dracula] = PlotTheme( bg = dracula_bg, bginside = colorant"#30343B", fg = dracula_fg, fgtext = dracula_fg, fgguide = dracula_fg, fglegend = dracula_fg, legendfontcolor = dracula_fg, legendtitlefontcolor = dracula_fg, titlefontcolor = dracula_fg, palette = expand_palette(dracula_bg, dracula_palette), colorgradient = :viridis )
[ 2, 28531, 1061, 25, 198, 2, 3740, 1378, 7109, 330, 377, 26221, 1326, 13, 785, 14, 3642, 4163, 2, 8043, 12, 18596, 5857, 198, 7109, 330, 4712, 62, 18596, 5857, 796, 685, 198, 220, 220, 220, 3124, 415, 1, 2, 23, 1350, 24, 16344, 1, 1303, 41025, 198, 220, 220, 220, 3124, 415, 1, 2, 487, 3720, 66, 21, 1, 1303, 14657, 198, 220, 220, 220, 3124, 415, 1, 2, 1120, 13331, 22, 65, 1, 1303, 3469, 198, 220, 220, 220, 3124, 415, 1, 2, 17457, 6052, 69, 24, 1, 1303, 17265, 198, 220, 220, 220, 3124, 415, 1, 2, 487, 65, 4521, 66, 1, 1303, 11942, 198, 220, 220, 220, 3124, 415, 1, 2, 487, 2816, 2816, 1, 1303, 2297, 198, 220, 220, 220, 3124, 415, 1, 2, 69, 16, 13331, 23, 66, 1, 1303, 12550, 198, 220, 220, 220, 3124, 415, 1, 2, 21, 29807, 64, 19, 1, 1303, 18957, 198, 60, 198, 7109, 330, 4712, 62, 35904, 796, 3124, 415, 1, 2, 32568, 64, 2623, 1, 198, 7109, 330, 4712, 62, 40616, 796, 3124, 415, 1, 2, 69, 23, 69, 23, 69, 17, 1, 198, 198, 62, 1169, 6880, 58, 25, 7109, 330, 4712, 60, 796, 28114, 47863, 7, 198, 220, 220, 220, 275, 70, 796, 1553, 330, 4712, 62, 35904, 11, 198, 220, 220, 220, 275, 29878, 485, 796, 3124, 415, 1, 2, 1270, 32118, 33, 1600, 198, 220, 220, 220, 277, 70, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 277, 70, 5239, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 277, 1130, 84, 485, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 277, 70, 1455, 437, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 8177, 10331, 8043, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 8177, 7839, 10331, 8043, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 3670, 10331, 8043, 796, 1553, 330, 4712, 62, 40616, 11, 198, 220, 220, 220, 27043, 796, 4292, 62, 18596, 5857, 7, 7109, 330, 4712, 62, 35904, 11, 1553, 330, 4712, 62, 18596, 5857, 828, 198, 220, 220, 220, 3124, 49607, 796, 1058, 37040, 29207, 198, 8, 198 ]
2.105978
368
# Reexport SinkingParticles as they are useful outside too #@reexport module SinkingParticles using Unitful using LinearAlgebra, SparseArrays using OceanGrids """ PFDO(grd; w_top) Builds the particle-flux-divergence operator `PFDO` for a given particle sinking speed (`w_top`). Schematic of a grid cell: ``` top ┌─────────────────────────────────┐ ┬ │ ↓ w_top ↓ Φ_top │ │ │ (settling velovity) (flux) │ │ │ │ │ │ x │ δz │ (particle conc.) │ │ │ │ │ │ │ │ bottom └─────────────────────────────────┘ ┴ ``` - `δz` is the height of grid cell [m] - `w_top` is the particle sinking speed at the top of the grid cell [m s⁻¹] - `Φ_top` is the flux at the top of the grid cell [mol m⁻² s⁻¹] - `x` is the particle concentration of the cell [mol m⁻³] The PFDO is defined by PFDO * x = δΦ/δz ≈ dΦ/dz, i.e., so that applied to `x` it approximates the flux divergence of `x`, dΦ/δz. It is calculated as the matrix product of DIVO and FATO: PFDO = DIVO * FATO. where the divergence operator `DIVO`, is defined by (`z` increasing downward) DIVO * ϕ_top = 1/δz * (ϕ_top[below] - ϕ_top) = δϕ/δz ≈ dΦ/δz. and FATO, the flux-at-top operator, is defined by FATO * x = w_top * x[above] ≈ ϕ_top. # Example ```julia-repl julia> PFDO(grd, w_top=1.0) # 1.0 m/s (SI units assumed) ``` """ function PFDO(grd; w_top) iwet = findall(vec(grd.wet3D)) DIVO = DIVO(grd) Iabove = buildIabove(grd.wet3D, iwet) w_top = ustrip.(upreferred.(w_top)) return PFDO(w_top, DIVO, Iabove) end """ PFDO(w, DIVO, Iabove) Returns `DIVO * FATO(w, Iabove)` This function is useful to avoid reconstructing `DIVO` and `Iabove` every time. It should allow for faster runs. """ PFDO(w_top, DIVO, Iabove) = DIVO * FATO(w_top, Iabove) """ PFDO(grd, δz, w_top, w_bot, frac_seafloor, cumfrac_seafloor, fsedremin, Iabove) Returns the particle-flux-divergence operator for a given sinking speed as a function of depth. This is a slightly different construction where I take in top and bottom settling velocities, and where the bottom one can be modified to further allow a fraction of particles to sink through (buried into) the sea floor. Below is a detailed explanation of how this function computes the particle-flux divergence. Take these 3 boxes on top of each other: ``` ┌──────────────────┐ │ water │ │←----c----→ │ ├───────────┲━━━━━━┥ ←- Φ_top │ ┃⣿⣿⣿⣿⣿⣿│ │ ┃⣿⣿⣿⣿⣿⣿│ │←-d-→ ←-a-→┃⣿⣿⣿⣿⣿⣿│ ├─────┲━━━━━┹──────┤ ←- Φ_bot │ ┃←----b-----→│ │ ┃⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ │ ┃⣿⣿⣿ land ⣿⣿⣿│ │ ┃⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿│ └━━━━━┹────────────┘ ``` A part of each of these boxes is water, while the rest is land. For the middle box, we will use the fractional area `a = frac_seafloor` of seafloor, and the cumulated fractional area `b = cumfrac_seafloor` of seafloor, to determine the flux of particles at the top `ϕ_top` and bottom `ϕ_bot`. From the top box, only the particles in the water can enter the middle box. So the flux at the top of the middle box, `ϕ_top`, is proportional to `c = 1 - Iabove * b`. At the bottom of the middle box, we have to take care of the case of particles hitting the sediments and potentially buried there, or kept in the water. For the part going through the area `d`, the flux is proportional to `d = 1 - b`. For the part going through `a` (hitting the sediments), the flux is proportional to `a * (1 - f)` where `f` is the fraction of particles forcibly kept in the water. (So if `f = 0`, the particles appear to move out of the middle box, but are not carried into the bottom one, and thus are removed from the system / buried.) """ function PFDO(grd, δz, w_top, w_bot, frac_seafloor, cumfrac_seafloor, fsedremin, Iabove) fw_bot = @. (1.0 - cumfrac_seafloor + (1.0 - fsedremin) * frac_seafloor) * w_bot fw_top = (1.0 .- Iabove * cumfrac_seafloor) .* w_top return sparse(Diagonal(fw_bot ./ δz)) - sparse(Diagonal(fw_top ./ δz)) * Iabove end """ DIVO(grd) Build the `DIVO` operator such that DIVO * ϕ_top = 1/δz * (ϕ_top - ϕ_top[below]) ≈ dΦ/δz. """ function DIVO(grd) Ibelow = buildIbelow(grd) iwet = indices_of_wet_boxes(grd) δz = ustrip.(grd.δz_3D[iwet]) return sparse(Diagonal(1 ./ δz)) * (Ibelow - I) # divergence with positive downwards end """ FATO(w_top, Iabove) Build the `FATO` operator for a particle sinking speed `w_top` (`w_top` is the sinking speed at the top of each grid cell.) The `FATO` operator is defined by FATO * x = w_top * x(above) ≈ ϕ_top. """ FATO(w_top::Vector, Iabove) = sparse(Diagonal(w_top)) * Iabove FATO(w_top::Number, Iabove) = w_top * Iabove export DIVO, PFDO, FATO #end # module """ transportoperator(grd, w) Returns the transportoperator for the given settling velocity `w`. The settling velocity can be provided as either a scalar (e.g., `w = 100.0` in units of meters per second) or as a function of depth (e.g., `w(z) = 2z + 1`). # Examples Create the particle flux divergence with settling velocity of 100m/s ```julia-repl julia> T = transportoperator(grd, 100.0) ``` Or with settling velocity function w(z) = 2z + 1 ```julia-repl julia> T = transportoperator(grd, z -> 2z + 1) ``` By default, the seafloor flux is set to zero, so that all the particles that reach it are remineralized there. You can let particles go through by setting `fsedremin=0.0`, via, e.g., ```julia-repl julia> T = transportoperator(grd, z -> 2z + 1; fsedremin=0.0) ``` For finer control and advanced use, see the particle-flux divergence operator function, `PFDO`. """ transportoperator(grd, w_top; DIVop=DIVO(grd), Iabove=buildIabove(grd)) = PFDO(w_top, DIVop, Iabove) function transportoperator(grd, w::Function; δz = ustrip.(grd.δz_3D[iswet(grd)]), Iabove = buildIabove(grd), fsedremin = 1.0, z_top = topdepthvec(grd), z_bot = bottomdepthvec(grd), frac_seafloor = float.(isseafloorvec(grd)), cumfrac_seafloor = zcumsum(frac_seafloor, grd)) return PFDO(grd, δz, ustrip.(upreferred.(w.(z_top))), ustrip.(upreferred.(w.(z_bot))), frac_seafloor, cumfrac_seafloor, fsedremin, Iabove) end export transportoperator
[ 2, 797, 39344, 311, 8040, 7841, 2983, 355, 484, 389, 4465, 2354, 1165, 198, 2, 31, 631, 87, 634, 8265, 311, 8040, 7841, 2983, 198, 198, 3500, 11801, 913, 198, 3500, 44800, 2348, 29230, 11, 1338, 17208, 3163, 20477, 198, 3500, 10692, 8642, 2340, 628, 198, 37811, 198, 220, 220, 220, 28223, 18227, 7, 2164, 67, 26, 266, 62, 4852, 8, 198, 198, 15580, 82, 262, 18758, 12, 69, 22564, 12, 67, 1428, 12745, 10088, 4600, 42668, 18227, 63, 329, 257, 1813, 18758, 27141, 2866, 198, 7, 63, 86, 62, 4852, 63, 737, 198, 198, 27054, 13849, 286, 257, 10706, 2685, 25, 198, 15506, 63, 198, 220, 220, 220, 220, 1353, 220, 13305, 234, 28542, 28542, 28542, 28542, 7280, 6552, 238, 220, 220, 13305, 105, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 17804, 241, 266, 62, 4852, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17804, 241, 7377, 99, 62, 4852, 220, 220, 19421, 220, 220, 19421, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 357, 17744, 1359, 11555, 709, 414, 8, 220, 220, 220, 357, 69, 22564, 8, 220, 220, 19421, 220, 220, 19421, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 19421, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 7377, 112, 89, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 357, 3911, 1548, 1673, 2014, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 19421, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 19421, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 220, 220, 19421, 198, 220, 4220, 220, 13305, 242, 28542, 28542, 28542, 28542, 7280, 6552, 246, 220, 220, 13305, 112, 198, 15506, 63, 198, 198, 12, 4600, 138, 112, 89, 63, 318, 262, 6001, 286, 10706, 2685, 685, 76, 60, 198, 12, 4600, 86, 62, 4852, 63, 318, 262, 18758, 27141, 2866, 379, 262, 1353, 286, 262, 10706, 2685, 685, 76, 264, 46256, 119, 126, 117, 60, 198, 12, 4600, 138, 99, 62, 4852, 63, 318, 262, 28462, 379, 262, 1353, 286, 262, 10706, 2685, 685, 43132, 285, 46256, 119, 31185, 264, 46256, 119, 126, 117, 60, 198, 12, 4600, 87, 63, 318, 262, 18758, 10368, 286, 262, 2685, 685, 43132, 285, 46256, 119, 126, 111, 60, 198, 198, 464, 28223, 18227, 318, 5447, 416, 628, 220, 220, 220, 28223, 18227, 1635, 2124, 796, 7377, 112, 138, 99, 14, 138, 112, 89, 15139, 230, 288, 138, 99, 14, 67, 89, 11, 198, 198, 72, 13, 68, 1539, 523, 326, 5625, 284, 4600, 87, 63, 340, 5561, 26748, 262, 28462, 43366, 286, 4600, 87, 47671, 288, 138, 99, 14, 138, 112, 89, 13, 198, 1026, 318, 10488, 355, 262, 17593, 1720, 286, 360, 3824, 46, 290, 47200, 46, 25, 628, 220, 220, 220, 28223, 18227, 796, 360, 3824, 46, 1635, 47200, 46, 13, 198, 198, 3003, 262, 43366, 10088, 4600, 33569, 46, 47671, 318, 5447, 416, 357, 63, 89, 63, 3649, 20841, 8, 628, 220, 220, 220, 360, 3824, 46, 1635, 18074, 243, 62, 4852, 796, 352, 14, 138, 112, 89, 1635, 357, 139, 243, 62, 4852, 58, 35993, 60, 532, 18074, 243, 62, 4852, 8, 796, 7377, 112, 139, 243, 14, 138, 112, 89, 15139, 230, 288, 138, 99, 14, 138, 112, 89, 13, 198, 198, 392, 47200, 46, 11, 262, 28462, 12, 265, 12, 4852, 10088, 11, 318, 5447, 416, 628, 220, 220, 220, 47200, 46, 1635, 2124, 796, 266, 62, 4852, 1635, 2124, 58, 29370, 60, 15139, 230, 18074, 243, 62, 4852, 13, 198, 198, 2, 17934, 198, 198, 15506, 63, 73, 43640, 12, 35666, 198, 73, 43640, 29, 28223, 18227, 7, 2164, 67, 11, 266, 62, 4852, 28, 16, 13, 15, 8, 1303, 352, 13, 15, 285, 14, 82, 357, 11584, 4991, 9672, 8, 198, 15506, 63, 198, 37811, 198, 8818, 28223, 18227, 7, 2164, 67, 26, 266, 62, 4852, 8, 198, 220, 220, 220, 1312, 86, 316, 796, 1064, 439, 7, 35138, 7, 2164, 67, 13, 86, 316, 18, 35, 4008, 198, 220, 220, 220, 360, 3824, 46, 796, 360, 3824, 46, 7, 2164, 67, 8, 198, 220, 220, 220, 314, 29370, 796, 1382, 40, 29370, 7, 2164, 67, 13, 86, 316, 18, 35, 11, 1312, 86, 316, 8, 198, 220, 220, 220, 266, 62, 4852, 796, 334, 36311, 12195, 929, 260, 18186, 12195, 86, 62, 4852, 4008, 198, 220, 220, 220, 1441, 28223, 18227, 7, 86, 62, 4852, 11, 360, 3824, 46, 11, 314, 29370, 8, 198, 437, 198, 37811, 198, 220, 220, 220, 28223, 18227, 7, 86, 11, 360, 3824, 46, 11, 314, 29370, 8, 198, 198, 35561, 4600, 33569, 46, 1635, 47200, 46, 7, 86, 11, 314, 29370, 8, 63, 198, 198, 1212, 2163, 318, 4465, 284, 3368, 31081, 278, 4600, 33569, 46, 63, 290, 4600, 40, 29370, 63, 790, 640, 13, 198, 1026, 815, 1249, 329, 5443, 4539, 13, 198, 37811, 198, 42668, 18227, 7, 86, 62, 4852, 11, 360, 3824, 46, 11, 314, 29370, 8, 796, 360, 3824, 46, 1635, 47200, 46, 7, 86, 62, 4852, 11, 314, 29370, 8, 198, 198, 37811, 198, 220, 220, 220, 28223, 18227, 7, 2164, 67, 11, 7377, 112, 89, 11, 266, 62, 4852, 11, 266, 62, 13645, 11, 1216, 330, 62, 325, 1878, 75, 2675, 11, 10973, 31944, 62, 325, 1878, 75, 2675, 11, 277, 36622, 260, 1084, 11, 314, 29370, 8, 198, 198, 35561, 262, 18758, 12, 69, 22564, 12, 67, 1428, 12745, 10088, 329, 257, 1813, 27141, 2866, 355, 257, 2163, 286, 6795, 13, 198, 198, 1212, 318, 257, 4622, 1180, 5103, 810, 314, 1011, 287, 1353, 290, 4220, 25446, 11555, 420, 871, 11, 198, 392, 810, 262, 4220, 530, 460, 307, 9518, 284, 2252, 1249, 257, 13390, 286, 13166, 284, 14595, 832, 198, 7, 6236, 798, 656, 8, 262, 5417, 4314, 13, 198, 198, 21106, 318, 257, 6496, 7468, 286, 703, 428, 2163, 552, 1769, 262, 18758, 12, 69, 22564, 43366, 13, 198, 12322, 777, 513, 10559, 319, 1353, 286, 1123, 584, 25, 198, 198, 15506, 63, 198, 6552, 234, 28542, 28542, 8418, 6552, 238, 198, 6552, 224, 1660, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19421, 198, 6552, 224, 29705, 238, 650, 66, 650, 39310, 220, 220, 220, 220, 220, 220, 19421, 198, 6552, 250, 28542, 8418, 7280, 6552, 110, 47486, 47486, 47486, 47486, 47486, 47486, 6552, 98, 17804, 238, 12, 7377, 99, 62, 4852, 198, 6552, 224, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13305, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 224, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13305, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 224, 29705, 238, 12, 67, 12, 39310, 17804, 238, 12, 64, 12, 39310, 6552, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 250, 16068, 7280, 6552, 110, 47486, 47486, 47486, 47486, 47486, 6552, 117, 16068, 8418, 6552, 97, 17804, 238, 12, 7377, 99, 62, 13645, 198, 6552, 224, 220, 220, 220, 220, 13305, 225, 29705, 238, 650, 65, 30934, 39310, 6552, 224, 198, 6552, 224, 220, 220, 220, 220, 13305, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 224, 220, 220, 220, 220, 13305, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 1956, 2343, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 224, 220, 220, 220, 220, 13305, 225, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 158, 96, 123, 6552, 224, 198, 6552, 242, 47486, 47486, 47486, 47486, 47486, 6552, 117, 28542, 16068, 6552, 246, 198, 15506, 63, 198, 198, 32, 636, 286, 1123, 286, 777, 10559, 318, 1660, 11, 981, 262, 1334, 318, 1956, 13, 1114, 262, 3504, 3091, 11, 198, 732, 481, 779, 262, 13390, 282, 1989, 4600, 64, 796, 1216, 330, 62, 325, 1878, 75, 2675, 63, 286, 25127, 75, 2675, 11, 198, 392, 262, 10973, 4817, 13390, 282, 1989, 4600, 65, 796, 10973, 31944, 62, 325, 1878, 75, 2675, 63, 286, 25127, 75, 2675, 11, 284, 5004, 262, 198, 69, 22564, 286, 13166, 379, 262, 1353, 4600, 139, 243, 62, 4852, 63, 290, 4220, 4600, 139, 243, 62, 13645, 44646, 198, 198, 4863, 262, 1353, 3091, 11, 691, 262, 13166, 287, 262, 1660, 460, 3802, 262, 3504, 3091, 13, 1406, 262, 28462, 198, 265, 262, 1353, 286, 262, 3504, 3091, 11, 4600, 139, 243, 62, 4852, 47671, 318, 27111, 284, 4600, 66, 796, 352, 532, 314, 29370, 1635, 275, 44646, 198, 2953, 262, 4220, 286, 262, 3504, 3091, 11, 356, 423, 284, 1011, 1337, 286, 262, 1339, 286, 13166, 9008, 198, 1169, 10081, 6800, 290, 6196, 11694, 612, 11, 393, 4030, 287, 262, 1660, 13, 198, 1890, 262, 636, 1016, 832, 262, 1989, 4600, 67, 47671, 262, 28462, 318, 27111, 284, 4600, 67, 796, 352, 532, 275, 44646, 198, 1890, 262, 636, 1016, 832, 4600, 64, 63, 357, 48320, 262, 10081, 6800, 828, 262, 28462, 318, 27111, 284, 198, 63, 64, 1635, 357, 16, 532, 277, 8, 63, 810, 4600, 69, 63, 318, 262, 13390, 286, 13166, 30522, 4030, 287, 262, 1660, 13, 198, 7, 2396, 611, 4600, 69, 796, 657, 47671, 262, 13166, 1656, 284, 1445, 503, 286, 262, 3504, 3091, 11, 475, 389, 407, 5281, 198, 20424, 262, 4220, 530, 11, 290, 4145, 389, 4615, 422, 262, 1080, 1220, 11694, 2014, 198, 37811, 198, 8818, 28223, 18227, 7, 2164, 67, 11, 7377, 112, 89, 11, 266, 62, 4852, 11, 266, 62, 13645, 11, 1216, 330, 62, 325, 1878, 75, 2675, 11, 10973, 31944, 62, 325, 1878, 75, 2675, 11, 277, 36622, 260, 1084, 11, 314, 29370, 8, 198, 220, 220, 220, 277, 86, 62, 13645, 796, 2488, 13, 357, 16, 13, 15, 532, 10973, 31944, 62, 325, 1878, 75, 2675, 1343, 357, 16, 13, 15, 532, 277, 36622, 260, 1084, 8, 1635, 1216, 330, 62, 325, 1878, 75, 2675, 8, 1635, 266, 62, 13645, 198, 220, 220, 220, 277, 86, 62, 4852, 796, 357, 16, 13, 15, 764, 12, 314, 29370, 1635, 10973, 31944, 62, 325, 1878, 75, 2675, 8, 764, 9, 266, 62, 4852, 198, 220, 220, 220, 1441, 29877, 7, 18683, 27923, 7, 44482, 62, 13645, 24457, 7377, 112, 89, 4008, 532, 29877, 7, 18683, 27923, 7, 44482, 62, 4852, 24457, 7377, 112, 89, 4008, 1635, 314, 29370, 198, 437, 628, 628, 198, 198, 37811, 198, 220, 220, 220, 360, 3824, 46, 7, 2164, 67, 8, 198, 198, 15580, 262, 4600, 33569, 46, 63, 10088, 884, 326, 628, 220, 220, 220, 360, 3824, 46, 1635, 18074, 243, 62, 4852, 796, 352, 14, 138, 112, 89, 1635, 357, 139, 243, 62, 4852, 532, 18074, 243, 62, 4852, 58, 35993, 12962, 15139, 230, 288, 138, 99, 14, 138, 112, 89, 13, 198, 37811, 198, 8818, 360, 3824, 46, 7, 2164, 67, 8, 198, 220, 220, 220, 314, 35993, 796, 1382, 40, 35993, 7, 2164, 67, 8, 198, 220, 220, 220, 1312, 86, 316, 796, 36525, 62, 1659, 62, 86, 316, 62, 29305, 7, 2164, 67, 8, 198, 220, 220, 220, 7377, 112, 89, 796, 334, 36311, 12195, 2164, 67, 13, 138, 112, 89, 62, 18, 35, 58, 14246, 316, 12962, 198, 220, 220, 220, 1441, 29877, 7, 18683, 27923, 7, 16, 24457, 7377, 112, 89, 4008, 1635, 357, 40, 35993, 532, 314, 8, 1303, 43366, 351, 3967, 44890, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 47200, 46, 7, 86, 62, 4852, 11, 314, 29370, 8, 198, 198, 15580, 262, 4600, 37, 1404, 46, 63, 10088, 329, 257, 18758, 27141, 2866, 4600, 86, 62, 4852, 63, 198, 198, 7, 63, 86, 62, 4852, 63, 318, 262, 27141, 2866, 379, 262, 1353, 286, 1123, 10706, 2685, 2014, 198, 198, 464, 4600, 37, 1404, 46, 63, 10088, 318, 5447, 416, 628, 220, 220, 220, 47200, 46, 1635, 2124, 796, 266, 62, 4852, 1635, 2124, 7, 29370, 8, 15139, 230, 18074, 243, 62, 4852, 13, 198, 37811, 198, 37, 1404, 46, 7, 86, 62, 4852, 3712, 38469, 11, 314, 29370, 8, 796, 29877, 7, 18683, 27923, 7, 86, 62, 4852, 4008, 1635, 314, 29370, 198, 37, 1404, 46, 7, 86, 62, 4852, 3712, 15057, 11, 314, 29370, 8, 796, 266, 62, 4852, 1635, 314, 29370, 198, 198, 39344, 360, 3824, 46, 11, 28223, 18227, 11, 47200, 46, 198, 2, 437, 1303, 8265, 198, 198, 37811, 198, 220, 220, 220, 4839, 46616, 7, 2164, 67, 11, 266, 8, 198, 198, 35561, 262, 4839, 46616, 329, 262, 1813, 25446, 15432, 4600, 86, 44646, 198, 198, 464, 25446, 15432, 460, 307, 2810, 355, 2035, 257, 16578, 283, 198, 7, 68, 13, 70, 1539, 4600, 86, 796, 1802, 13, 15, 63, 287, 4991, 286, 10700, 583, 1218, 8, 198, 273, 355, 257, 2163, 286, 6795, 198, 7, 68, 13, 70, 1539, 4600, 86, 7, 89, 8, 796, 362, 89, 1343, 352, 63, 737, 198, 198, 2, 21066, 198, 198, 16447, 262, 18758, 28462, 43366, 351, 25446, 15432, 286, 1802, 76, 14, 82, 198, 198, 15506, 63, 73, 43640, 12, 35666, 198, 73, 43640, 29, 309, 796, 4839, 46616, 7, 2164, 67, 11, 1802, 13, 15, 8, 198, 15506, 63, 198, 198, 5574, 351, 25446, 15432, 2163, 266, 7, 89, 8, 796, 362, 89, 1343, 352, 198, 198, 15506, 63, 73, 43640, 12, 35666, 198, 73, 43640, 29, 309, 796, 4839, 46616, 7, 2164, 67, 11, 1976, 4613, 362, 89, 1343, 352, 8, 198, 15506, 63, 198, 198, 3886, 4277, 11, 262, 25127, 75, 2675, 28462, 318, 900, 284, 6632, 11, 523, 326, 477, 262, 13166, 198, 5562, 3151, 340, 389, 816, 259, 1691, 1143, 612, 13, 921, 460, 1309, 13166, 467, 832, 198, 1525, 4634, 4600, 9501, 276, 260, 1084, 28, 15, 13, 15, 47671, 2884, 11, 304, 13, 70, 1539, 198, 198, 15506, 63, 73, 43640, 12, 35666, 198, 73, 43640, 29, 309, 796, 4839, 46616, 7, 2164, 67, 11, 1976, 4613, 362, 89, 1343, 352, 26, 277, 36622, 260, 1084, 28, 15, 13, 15, 8, 198, 15506, 63, 198, 198, 1890, 38575, 1630, 290, 6190, 779, 11, 766, 262, 18758, 12, 69, 22564, 43366, 198, 46616, 2163, 11, 4600, 42668, 18227, 44646, 198, 37811, 198, 7645, 634, 46616, 7, 2164, 67, 11, 266, 62, 4852, 26, 360, 3824, 404, 28, 33569, 46, 7, 2164, 67, 828, 314, 29370, 28, 11249, 40, 29370, 7, 2164, 67, 4008, 796, 28223, 18227, 7, 86, 62, 4852, 11, 360, 3824, 404, 11, 314, 29370, 8, 198, 8818, 4839, 46616, 7, 2164, 67, 11, 266, 3712, 22203, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 89, 796, 334, 36311, 12195, 2164, 67, 13, 138, 112, 89, 62, 18, 35, 58, 271, 86, 316, 7, 2164, 67, 15437, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 314, 29370, 796, 1382, 40, 29370, 7, 2164, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 36622, 260, 1084, 796, 352, 13, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 4852, 796, 1353, 18053, 35138, 7, 2164, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 13645, 796, 4220, 18053, 35138, 7, 2164, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1216, 330, 62, 325, 1878, 75, 2675, 796, 12178, 12195, 20782, 1878, 75, 2675, 35138, 7, 2164, 67, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10973, 31944, 62, 325, 1878, 75, 2675, 796, 1976, 66, 5700, 388, 7, 31944, 62, 325, 1878, 75, 2675, 11, 1036, 67, 4008, 198, 220, 220, 220, 1441, 28223, 18227, 7, 2164, 67, 11, 7377, 112, 89, 11, 334, 36311, 12195, 929, 260, 18186, 12195, 86, 12195, 89, 62, 4852, 4008, 828, 334, 36311, 12195, 929, 260, 18186, 12195, 86, 12195, 89, 62, 13645, 4008, 828, 1216, 330, 62, 325, 1878, 75, 2675, 11, 10973, 31944, 62, 325, 1878, 75, 2675, 11, 277, 36622, 260, 1084, 11, 314, 29370, 8, 198, 437, 628, 198, 39344, 4839, 46616, 628 ]
2.19959
2,926
@testset "Nodes initialization algorithm n=3 entry = 3 output = 2" begin M = 1 # Constante para la función rampa # Bien definido para tamaño n = 2 y salida de dimensión 1 f_regression(x,y,z)=[x*y-z,x] data_set_size = 6 entry_dimension = 3 output_dimension = 2 # Número de neuronas n = data_set_size # Debe de ser mayor que 1 para que no de error X_train= rand(Float32, data_set_size, entry_dimension) Y_train::Matrix = mapreduce(permutedims, vcat, map(x->f_regression(x...), eachrow(X_train))) h = nn_from_data(X_train, Y_train, n, M) # veamos que el tamaño de la salida es la adecuada @test size(h.W1) == (n,entry_dimension+1) @test size(h.W2) == (output_dimension,n) # Si ha sido bien construida: # Evaluar la red neuronal en los datos con los que se construyó # debería de resultar el valor de Y_train respectivo evaluar(x)=forward_propagation(h, RampFunction,x) for i in 1:n @test evaluar(X_train[i,:]) ≈ Y_train[i,:] end end
[ 2488, 9288, 2617, 366, 45, 4147, 37588, 11862, 299, 28, 18, 5726, 796, 513, 5072, 796, 362, 1, 2221, 198, 220, 220, 220, 337, 796, 352, 1303, 4757, 12427, 31215, 8591, 1257, 979, 18840, 10454, 64, 198, 220, 220, 220, 1303, 347, 2013, 2730, 17305, 31215, 256, 1689, 31329, 299, 796, 362, 331, 3664, 3755, 390, 5391, 641, 72, 18840, 352, 198, 220, 220, 220, 277, 62, 2301, 2234, 7, 87, 11, 88, 11, 89, 8, 41888, 87, 9, 88, 12, 89, 11, 87, 60, 198, 220, 220, 220, 1366, 62, 2617, 62, 7857, 796, 220, 718, 198, 220, 220, 220, 5726, 62, 46156, 796, 513, 198, 220, 220, 220, 5072, 62, 46156, 796, 362, 198, 220, 220, 220, 1303, 399, 21356, 647, 78, 390, 43164, 292, 220, 198, 220, 220, 220, 299, 796, 1366, 62, 2617, 62, 7857, 1303, 1024, 1350, 390, 1055, 9591, 8358, 352, 31215, 8358, 645, 390, 4049, 198, 220, 220, 220, 1395, 62, 27432, 28, 43720, 7, 43879, 2624, 11, 1366, 62, 2617, 62, 7857, 11, 5726, 62, 46156, 8, 198, 220, 220, 220, 575, 62, 27432, 3712, 46912, 796, 220, 3975, 445, 7234, 7, 16321, 7241, 12078, 11, 410, 9246, 11, 3975, 7, 87, 3784, 69, 62, 2301, 2234, 7, 87, 986, 828, 1123, 808, 7, 55, 62, 27432, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 289, 796, 299, 77, 62, 6738, 62, 7890, 7, 55, 62, 27432, 11, 575, 62, 27432, 11, 299, 11, 337, 8, 628, 220, 220, 220, 1303, 1569, 321, 418, 8358, 1288, 256, 1689, 31329, 390, 8591, 3664, 3755, 1658, 8591, 512, 721, 84, 4763, 198, 220, 220, 220, 2488, 9288, 2546, 7, 71, 13, 54, 16, 8, 6624, 357, 77, 11, 13000, 62, 46156, 10, 16, 8, 198, 220, 220, 220, 2488, 9288, 2546, 7, 71, 13, 54, 17, 8, 6624, 357, 22915, 62, 46156, 11, 77, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 15638, 387, 9785, 78, 275, 2013, 1500, 622, 3755, 25, 198, 220, 220, 220, 1303, 26439, 84, 283, 8591, 2266, 36347, 551, 22346, 4818, 418, 369, 22346, 8358, 384, 1500, 622, 88, 10205, 220, 198, 220, 220, 220, 1303, 390, 527, 29690, 390, 1255, 283, 1288, 1188, 273, 390, 575, 62, 27432, 2461, 23593, 198, 220, 220, 220, 5418, 84, 283, 7, 87, 47505, 11813, 62, 22930, 363, 341, 7, 71, 11, 198, 220, 220, 220, 220, 26882, 22203, 11, 87, 8, 628, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 5418, 84, 283, 7, 55, 62, 27432, 58, 72, 11, 25, 12962, 15139, 230, 575, 62, 27432, 58, 72, 11, 47715, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 437, 220, 628, 198 ]
2.22547
479
@testset "operations.jl" begin @testset "ewise" begin m = GBMatrix([[1,2,3] [4,5,6]]) n = GBMatrix([1,2,3,2], [1,2,2,1], [1,2,3,4]) #eadd correctness @test eadd(m, n) == GBMatrix([1,1,2,2,3,3], [1,2,1,2,1,2], [2,4,6,7,3,9]) @test eadd(m, n, BinaryOps.GT)[1, 1] == 0 #check that the (+) op is being picked up from the semiring. @test eadd(m, n, Semirings.PLUS_MAX) == eadd(m, n, BinaryOps.PLUS) #emul correctness @test emul(m, n, BinaryOps.POW)[3, 2] == m[3,2] ^ n[3,2] #check that the (*) op is being picked up from the semiring @test emul(m, n, Semirings.MAX_PLUS) == emul(m, n, BinaryOps.PLUS) @test eltype(m .== n) == Bool end @testset "kron" begin m1 = GBMatrix(UInt64[1, 2, 3, 5], UInt64[1, 3, 1, 2], Int8[1, 2, 3, 5]) n1 = GBMatrix(ones(UInt32, 4, 4)) m2 = sparse([1, 2, 3, 5], [1, 3, 1, 2], Int8[1, 2, 3, 5]) n2 = ones(Int32, 4, 4) o1 = kron(m1, n1) @test o1 == GBMatrix(kron(m2, n2)) #basic kron is equivalent mask = GBMatrix{Bool}(20, 12) mask[17:20, 5:8] = false #don't care value, using structural #mask out bottom chunk using structural complement o2 = kron(m1, n1; mask, desc=SC) @test o2[20, 5] === nothing #We don't want values in masked out area @test o2[1:2:15, :] == o1[1:2:15, :] #The rest should match, test indexing too. end @testset "map" begin m = sprand(5, 5, 0.25) n = GBMatrix(m) @test map(UnaryOps.LOG, n)[1,1] == map(log, m)[1,1] o = map!(BinaryOps.GT, GBMatrix{Bool}(5, 5), 0.1, n) @test o[1,4] == (0.1 > m[1,4]) @test map(BinaryOps.SECOND, n, 1.5)[1,1] == 1.5 @test (n .* 10)[1,1] == n[1,1] * 10 end @testset "mul" begin m = rand(10, 10) n = rand(10, 100) #NOTE: Can someone check this, not sure if that's fine, or egregious. @test isapprox(Matrix(mul(GBMatrix(m), GBMatrix(n))), m * n, atol=8e-15) m = GBMatrix([1,3,5,7], [7,5,3,1], [1,2,3,4]) n = GBMatrix{Int8}(7, 1) n[1:2:7, 1] = [1, 10, 20, 30] o = mul(m, n) @test size(o) == (7,1) @test eltype(o) == Int64 @test o[7, 1] == 4 && o[5, 1] == 30 o = GBMatrix(ones(Int64, 7, 1)) mask = GBMatrix(ones(Bool, 7, 1)) mask[3,1] = false @test mul!(o, m, n; mask, accum=BinaryOps.PLUS) == GBMatrix([31,1,1,1,31,1,5]) m = GBMatrix([[1,2,3] [4,5,6]]) n = GBVector([10,20,30]) @test_throws DimensionMismatch m * n @test m' * n == GBVector([140, 320]) == n * m end @testset "reduce" begin m = GBMatrix([[1,2,3] [4,5,6] [7,8,9]]) reduce(max, m, dims=2) == reduce(Monoids.MAX_MONOID, m) #this only works for dense reduce(Monoids.MAX_MONOID, m, dims=(1,2)) == 9 @test_throws ArgumentError reduce(BinaryOps.TIMES, m) end @testset "select" begin m = GBMatrix([[1,2,3] [4,5,6] [7,8,9]]) s = select(tril, m) @test s[1,2] === nothing && s[3,1] == 3 s = select(<, m, 6) @test s[2,2] == 5 && s[3,3] === nothing end @testset "transpose" begin m = GBMatrix(sprand(3, 3, 0.5)) @test gbtranspose(m') == m @test m[1,2] == m'[2,1] @test m[1,2] == gbtranspose(m)[2,1] end end
[ 31, 9288, 2617, 366, 3575, 602, 13, 20362, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 413, 786, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 26933, 58, 16, 11, 17, 11, 18, 60, 685, 19, 11, 20, 11, 21, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 402, 12261, 265, 8609, 26933, 16, 11, 17, 11, 18, 11, 17, 4357, 685, 16, 11, 17, 11, 17, 11, 16, 4357, 685, 16, 11, 17, 11, 18, 11, 19, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1329, 67, 29409, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 304, 2860, 7, 76, 11, 299, 8, 6624, 402, 12261, 265, 8609, 26933, 16, 11, 16, 11, 17, 11, 17, 11, 18, 11, 18, 4357, 685, 16, 11, 17, 11, 16, 11, 17, 11, 16, 11, 17, 4357, 685, 17, 11, 19, 11, 21, 11, 22, 11, 18, 11, 24, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 304, 2860, 7, 76, 11, 299, 11, 45755, 41472, 13, 19555, 38381, 16, 11, 352, 60, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9122, 326, 262, 11502, 8, 1034, 318, 852, 6497, 510, 422, 262, 5026, 3428, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 304, 2860, 7, 76, 11, 299, 11, 12449, 343, 654, 13, 6489, 2937, 62, 22921, 8, 6624, 304, 2860, 7, 76, 11, 299, 11, 45755, 41472, 13, 6489, 2937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 368, 377, 29409, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 795, 377, 7, 76, 11, 299, 11, 45755, 41472, 13, 47, 3913, 38381, 18, 11, 362, 60, 6624, 285, 58, 18, 11, 17, 60, 10563, 299, 58, 18, 11, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9122, 326, 262, 20789, 8, 1034, 318, 852, 6497, 510, 422, 262, 5026, 3428, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 795, 377, 7, 76, 11, 299, 11, 12449, 343, 654, 13, 22921, 62, 6489, 2937, 8, 6624, 795, 377, 7, 76, 11, 299, 11, 45755, 41472, 13, 6489, 2937, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 76, 764, 855, 299, 8, 6624, 347, 970, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 74, 1313, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 16, 796, 402, 12261, 265, 8609, 7, 52, 5317, 2414, 58, 16, 11, 362, 11, 513, 11, 642, 4357, 471, 5317, 2414, 58, 16, 11, 513, 11, 352, 11, 362, 4357, 2558, 23, 58, 16, 11, 362, 11, 513, 11, 642, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 299, 16, 796, 402, 12261, 265, 8609, 7, 1952, 7, 52, 5317, 2624, 11, 604, 11, 604, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 285, 17, 796, 29877, 26933, 16, 11, 362, 11, 513, 11, 642, 4357, 685, 16, 11, 513, 11, 352, 11, 362, 4357, 2558, 23, 58, 16, 11, 362, 11, 513, 11, 642, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 299, 17, 796, 3392, 7, 5317, 2624, 11, 604, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 267, 16, 796, 479, 1313, 7, 76, 16, 11, 299, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 267, 16, 6624, 402, 12261, 265, 8609, 7, 74, 1313, 7, 76, 17, 11, 299, 17, 4008, 1303, 35487, 479, 1313, 318, 7548, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 796, 402, 12261, 265, 8609, 90, 33, 970, 92, 7, 1238, 11, 1105, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 58, 1558, 25, 1238, 11, 642, 25, 23, 60, 796, 3991, 1303, 9099, 470, 1337, 1988, 11, 1262, 13204, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 27932, 503, 4220, 16058, 1262, 13204, 16829, 198, 220, 220, 220, 220, 220, 220, 220, 267, 17, 796, 479, 1313, 7, 76, 16, 11, 299, 16, 26, 9335, 11, 1715, 28, 6173, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 267, 17, 58, 1238, 11, 642, 60, 24844, 2147, 1303, 1135, 836, 470, 765, 3815, 287, 29229, 503, 1989, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 267, 17, 58, 16, 25, 17, 25, 1314, 11, 1058, 60, 6624, 267, 16, 58, 16, 25, 17, 25, 1314, 11, 1058, 60, 1303, 464, 1334, 815, 2872, 11, 1332, 6376, 278, 1165, 13, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 8899, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 7500, 392, 7, 20, 11, 642, 11, 657, 13, 1495, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 402, 12261, 265, 8609, 7, 76, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 3975, 7, 3118, 560, 41472, 13, 25294, 11, 299, 38381, 16, 11, 16, 60, 6624, 3975, 7, 6404, 11, 285, 38381, 16, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 3975, 0, 7, 33, 3219, 41472, 13, 19555, 11, 402, 12261, 265, 8609, 90, 33, 970, 92, 7, 20, 11, 642, 828, 220, 657, 13, 16, 11, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 267, 58, 16, 11, 19, 60, 6624, 357, 15, 13, 16, 1875, 285, 58, 16, 11, 19, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 3975, 7, 33, 3219, 41472, 13, 23683, 18672, 11, 299, 11, 352, 13, 20, 38381, 16, 11, 16, 60, 6624, 352, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 357, 77, 764, 9, 838, 38381, 16, 11, 16, 60, 6624, 299, 58, 16, 11, 16, 60, 1635, 838, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 76, 377, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 43720, 7, 940, 11, 838, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 43720, 7, 940, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16580, 25, 1680, 2130, 2198, 428, 11, 407, 1654, 611, 326, 338, 3734, 11, 393, 34372, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 46912, 7, 76, 377, 7, 4579, 46912, 7, 76, 828, 402, 12261, 265, 8609, 7, 77, 4008, 828, 285, 1635, 299, 11, 379, 349, 28, 23, 68, 12, 1314, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 26933, 16, 11, 18, 11, 20, 11, 22, 4357, 685, 22, 11, 20, 11, 18, 11, 16, 4357, 685, 16, 11, 17, 11, 18, 11, 19, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 402, 12261, 265, 8609, 90, 5317, 23, 92, 7, 22, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 58, 16, 25, 17, 25, 22, 11, 352, 60, 796, 685, 16, 11, 838, 11, 1160, 11, 1542, 60, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 35971, 7, 76, 11, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2546, 7, 78, 8, 6624, 357, 22, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 1288, 4906, 7, 78, 8, 6624, 2558, 2414, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 267, 58, 22, 11, 352, 60, 6624, 604, 11405, 267, 58, 20, 11, 352, 60, 6624, 1542, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 402, 12261, 265, 8609, 7, 1952, 7, 5317, 2414, 11, 767, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 796, 402, 12261, 265, 8609, 7, 1952, 7, 33, 970, 11, 767, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 58, 18, 11, 16, 60, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 35971, 0, 7, 78, 11, 285, 11, 299, 26, 9335, 11, 10507, 28, 33, 3219, 41472, 13, 6489, 2937, 8, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 402, 12261, 265, 8609, 26933, 3132, 11, 16, 11, 16, 11, 16, 11, 3132, 11, 16, 11, 20, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 26933, 58, 16, 11, 17, 11, 18, 60, 685, 19, 11, 20, 11, 21, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 13124, 38469, 26933, 940, 11, 1238, 11, 1270, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 34024, 44, 1042, 963, 285, 1635, 299, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 285, 6, 1635, 299, 6624, 13124, 38469, 26933, 15187, 11, 20959, 12962, 6624, 299, 1635, 285, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 445, 7234, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 26933, 58, 16, 11, 17, 11, 18, 60, 685, 19, 11, 20, 11, 21, 60, 685, 22, 11, 23, 11, 24, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4646, 7, 9806, 11, 285, 11, 5391, 82, 28, 17, 8, 6624, 4646, 7, 9069, 10994, 13, 22921, 62, 27857, 46, 2389, 11, 285, 8, 1303, 5661, 691, 2499, 329, 15715, 198, 220, 220, 220, 220, 220, 220, 220, 4646, 7, 9069, 10994, 13, 22921, 62, 27857, 46, 2389, 11, 285, 11, 5391, 82, 16193, 16, 11, 17, 4008, 6624, 860, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 4646, 7, 33, 3219, 41472, 13, 51, 3955, 1546, 11, 285, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 19738, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 26933, 58, 16, 11, 17, 11, 18, 60, 685, 19, 11, 20, 11, 21, 60, 685, 22, 11, 23, 11, 24, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 2922, 7, 2213, 346, 11, 285, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 264, 58, 16, 11, 17, 60, 24844, 2147, 11405, 264, 58, 18, 11, 16, 60, 6624, 513, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 2922, 7, 27, 11, 285, 11, 718, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 264, 58, 17, 11, 17, 60, 6624, 642, 11405, 264, 58, 18, 11, 18, 60, 24844, 2147, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 7645, 3455, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 402, 12261, 265, 8609, 7, 34975, 392, 7, 18, 11, 513, 11, 657, 13, 20, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 308, 65, 7645, 3455, 7, 76, 11537, 6624, 285, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 285, 58, 16, 11, 17, 60, 6624, 285, 6, 58, 17, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 285, 58, 16, 11, 17, 60, 6624, 308, 65, 7645, 3455, 7, 76, 38381, 17, 11, 16, 60, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.777952
1,914
using SimpleTest using YAML println("Enter two numbers") num1 = parse(Float64, readline()) num2 = parse(Float64, readline()) result = simple_operation(num1, num2) println("The sum is ", result) sep = "/" working_path = pwd() settings_path = joinpath(working_path, "settings.yml") testpath = joinpath(pwd(), "src") push!(LOAD_PATH, testpath) settings = YAML.load(open(settings_path)) output_path = joinpath(working_path, "output") start_of_opt(settings, sep, output_path)
[ 3500, 17427, 14402, 198, 3500, 575, 2390, 43, 198, 35235, 7203, 17469, 734, 3146, 4943, 198, 22510, 16, 796, 21136, 7, 43879, 2414, 11, 1100, 1370, 28955, 198, 22510, 17, 796, 21136, 7, 43879, 2414, 11, 1100, 1370, 28955, 198, 20274, 796, 2829, 62, 27184, 7, 22510, 16, 11, 997, 17, 8, 198, 35235, 7203, 464, 2160, 318, 33172, 1255, 8, 198, 325, 79, 796, 12813, 1, 198, 16090, 62, 6978, 796, 279, 16993, 3419, 198, 33692, 62, 6978, 796, 4654, 6978, 7, 16090, 62, 6978, 11, 366, 33692, 13, 88, 4029, 4943, 198, 9288, 6978, 796, 4654, 6978, 7, 79, 16993, 22784, 366, 10677, 4943, 198, 14689, 0, 7, 35613, 62, 34219, 11, 1332, 6978, 8, 198, 33692, 796, 575, 2390, 43, 13, 2220, 7, 9654, 7, 33692, 62, 6978, 4008, 198, 22915, 62, 6978, 796, 4654, 6978, 7, 16090, 62, 6978, 11, 366, 22915, 4943, 198, 9688, 62, 1659, 62, 8738, 7, 33692, 11, 41767, 11, 5072, 62, 6978, 8 ]
2.901235
162
@testset "fsm_active_close.jl" begin base_seq = WrappingInt32(1 << 31) DEFAULT_CAPACITY = 64000 TIMEOUT_DFLT = 1000 @testset "start in TIME_WAIT, timeout" begin conn = TCPConnection() #Listen will do nothing expect_state(conn, JLSponge.LISTEN) tick!(conn, 1) expect_state(conn, JLSponge.LISTEN) send_syn!(conn, WrappingInt32(0)) tick!(conn, 1) seg = expect_one_seg(conn; ack=true, syn=true, ackno=WrappingInt32(1)) expect_state(conn, JLSponge.SYN_RCVD) send_ack!(conn, WrappingInt32(1), seg.header.seqno + 1) tick!(conn, 1) expect_no_seg(conn) expect_state(conn, JLSponge.ESTABLISHED) end end
[ 31, 9288, 2617, 366, 69, 5796, 62, 5275, 62, 19836, 13, 20362, 1, 2221, 198, 220, 220, 220, 2779, 62, 41068, 796, 27323, 2105, 5317, 2624, 7, 16, 9959, 3261, 8, 198, 220, 220, 220, 5550, 38865, 62, 33177, 2246, 9050, 796, 5598, 830, 198, 220, 220, 220, 20460, 12425, 62, 35, 3697, 51, 796, 8576, 198, 220, 220, 220, 2488, 9288, 2617, 366, 9688, 287, 20460, 62, 15543, 2043, 11, 26827, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 48260, 796, 23633, 32048, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 23061, 481, 466, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 1607, 62, 5219, 7, 37043, 11, 449, 43, 4561, 14220, 13, 45849, 1677, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4378, 0, 7, 37043, 11, 352, 8, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1607, 62, 5219, 7, 37043, 11, 449, 43, 4561, 14220, 13, 45849, 1677, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 3758, 62, 28869, 0, 7, 37043, 11, 27323, 2105, 5317, 2624, 7, 15, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4378, 0, 7, 37043, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 384, 70, 796, 1607, 62, 505, 62, 325, 70, 7, 37043, 26, 257, 694, 28, 7942, 11, 6171, 28, 7942, 11, 257, 694, 3919, 28, 36918, 2105, 5317, 2624, 7, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1607, 62, 5219, 7, 37043, 11, 449, 43, 4561, 14220, 13, 23060, 45, 62, 7397, 8898, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3758, 62, 441, 0, 7, 37043, 11, 27323, 2105, 5317, 2624, 7, 16, 828, 384, 70, 13, 25677, 13, 41068, 3919, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4378, 0, 7, 37043, 11, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1607, 62, 3919, 62, 325, 70, 7, 37043, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1607, 62, 5219, 7, 37043, 11, 449, 43, 4561, 14220, 13, 1546, 5603, 9148, 18422, 1961, 8, 198, 220, 220, 220, 886, 198, 437 ]
1.97035
371
using Test @testset "config" begin include("config.jl") end @testset "fileio" begin include("fileio.jl") end @testset "json" begin include("json.jl") end
[ 3500, 6208, 198, 198, 31, 9288, 2617, 366, 11250, 1, 2221, 198, 220, 220, 220, 2291, 7203, 11250, 13, 20362, 4943, 198, 437, 198, 198, 31, 9288, 2617, 366, 7753, 952, 1, 2221, 198, 220, 220, 220, 2291, 7203, 7753, 952, 13, 20362, 4943, 198, 437, 198, 198, 31, 9288, 2617, 366, 17752, 1, 2221, 198, 220, 220, 220, 2291, 7203, 17752, 13, 20362, 4943, 198, 437 ]
2.507463
67
module LifeContingencies using ActuaryUtilities using MortalityTables using Transducers using Dates using Yields const mt = MortalityTables export LifeContingency, Insurance, AnnuityDue, AnnuityImmediate, APV, SingleLife, Frasier, JointLife, LastSurvivor, survival, reserve_premium_net, insurance, annuity_due, annuity_immediate, premium_net, omega, survival, discount, benefit, probability, cashflows, cashflows, timepoints, present_value # 'actuarial objects' that combine multiple forms of decrements (lapse, interest, death, etc) abstract type Life end """ struct SingleLife mort issue_age::Int alive::Bool fractional_assump::MortalityTables.DeathDistribution end A `Life` object containing the necessary assumptions for contingent maths related to a single life. Use with a `LifeContingency` to do many actuarial present value calculations. Keyword arguments: - `mort` pass a mortality vector, which is an array of applicable mortality rates indexed by attained age - `issue_age` is the assumed issue age for the `SingleLife` and is the basis of many contingency calculations. - `alive` Default value is `true`. Useful for joint insurances with different status on the lives insured. - `fractional_assump`. Default value is `Uniform()`. This is a `DeathDistribution` from the `MortalityTables.jl` package and is the assumption to use for non-integer ages/times. # Examples using MortalityTables mort = MortalityTables.table("2001 VBT Residual Standard Select and Ultimate - Male Nonsmoker, ANB") SingleLife( mort = mort.select[30], issue_age = 30 ) """ struct SingleLife <: Life mort issue_age alive fractional_assump end function SingleLife(;mort,issue_age=nothing,alive=true,fractional_assump = mt.Uniform()) return SingleLife(mort;issue_age,alive,fractional_assump) end function SingleLife(mort;issue_age=nothing,alive=true,fractional_assump = mt.Uniform()) if isnothing(issue_age) issue_age = firstindex(mort) end if !(eltype(mort) <: Real) # most likely case is that mort is an array of vectors # use issue age to select the right one (assuming indexed with issue age return SingleLife(mort[issue_age],issue_age,alive,fractional_assump) else return SingleLife(mort,issue_age,alive,fractional_assump) end end """ JointAssumption() An abstract type representing the different assumed relationship between the survival of the lives on a JointLife. Available options to use include: - `Frasier()` """ abstract type JointAssumption end """ Frasier() The assumption of independnt lives in a joint life calculation. Is a subtype of `JointAssumption`. """ struct Frasier <: JointAssumption end """ Contingency() An abstract type representing the different triggers for contingent benefits. Available options to use include: - `LastSurvivor()` """ abstract type Contingency end """ LastSurvivor() The contingency whereupon benefits are payable upon both lives passing. Is a subtype of `Contingency` """ struct LastSurvivor <: Contingency end # TODO: Not Implemented # """ # FirstToDie() # The contingency whereupon benefits are payable upon the first life passing. # Is a subtype of `Contingency` # """ # struct FirstToDie <: Contingency end """ struct JointLife lives contingency joint_assumption end A `Life` object containing the necessary assumptions for contingent maths related to a joint life insurance. Use with a `LifeContingency` to do many actuarial present value calculations. Keyword arguments: - `lives` is a tuple of two `SingleLife`s - `contingency` default is `LastSurvivor()`. It is the trigger for contingent benefits. See `?Contingency`. - `joint_assumption` Default value is `Frasier()`. It is the assumed relationship between the mortality of the two lives. See `?JointAssumption`. # Examples using MortalityTables mort = MortalityTables.table("2001 VBT Residual Standard Select and Ultimate - Male Nonsmoker, ANB") l1 = SingleLife( mort = mort.select[30], issue_age = 30 ) l2 = SingleLife( mort = mort.select[30], issue_age = 30 ) jl = JointLife( lives = (l1,l2), contingency = LastSurvivor(), joint_assumption = Frasier() ) """ Base.@kwdef struct JointLife <: Life lives::Tuple{SingleLife,SingleLife} contingency::Contingency = LastSurvivor() joint_assumption::JointAssumption = Frasier() end """ struct LifeContingency life::Life """ struct LifeContingency life::Life int end Base.broadcastable(lc::LifeContingency) = Ref(lc) """ omega(lc::LifeContingency) omega(l::Life) omega(i::InterestRate) # `Life`s and `LifeContingency`s Returns the last defined time_period for both the interest rate and mortality table. Note that this is *different* than calling `omega` on a `MortalityTable`, which will give you the last `attained_age`. Example: if the `LifeContingency` has issue age 60, and the last defined attained age for the `MortalityTable` is 100, then `omega` of the `MortalityTable` will be `100` and `omega` of the `LifeContingency` will be `40`. # `InterestRate`s The last period that the interest rate is defined for. Assumed to be infinite (`Inf`) for functional and constant interest rate types. Returns the `lastindex` of the vector if a vector type. """ function mt.omega(lc::LifeContingency) # if one of the omegas is infinity, that's a Float so we need # to narrow the type with Int return Int(omega(lc.life)) end function mt.omega(l::SingleLife) return mt.omega(l.mort) - l.issue_age + 1 end function mt.omega(l::JointLife) return minimum( omega.(l.lives) ) end ################### ## COMMUTATIONS ### ################### """ D(lc::LifeContingency, to_time) ``D_x`` is a retrospective actuarial commutation function which is the product of the survival and discount factor. """ function D(lc::LifeContingency, to_time) return discount(lc.int, to_time) * survival(lc,to_time) end """ l(lc::LifeContingency, to_time) ``l_x`` is a retrospective actuarial commutation function which is the survival up to a certain point in time. By default, will have a unitary basis (ie `1.0`), but you can specify `basis` keyword argument to use something different (e.g. `1000` is common in the literature.) """ function l(lc::LifeContingency, to_time; basis=1.0) return survival(lc.life,to_time) * basis end """ C(lc::LifeContingency, to_time) ``C_x`` is a retrospective actuarial commutation function which is the product of the discount factor and the difference in `l` (``l_x``). """ function C(lc::LifeContingency, to_time) discount(lc.int, to_time+1) * (l(lc,to_time) - l(lc, to_time+1)) end """ N(lc::LifeContingency, from_time) ``N_x`` is a prospective actuarial commutation function which is the sum of the `D` (``D_x``) values from the given time to the end of the mortality table. """ function N(lc::LifeContingency, from_time) range = from_time:(omega(lc)-1) return foldxt(+,Map(from_time->D(lc, from_time)), range) end """ M(lc::LifeContingency, from_time) The ``M_x`` actuarial commutation function where the `from_time` argument is `x`. Issue age is based on the issue_age in the LifeContingency `lc`. """ function M(lc::LifeContingency, from_time) range = from_time:omega(lc)-1 return foldxt(+,Map(from_time->C(lc, from_time)), range) end E(lc::LifeContingency, t, x) = D(lc,x + t) / D(lc,x) ################## ### Insurances ### ################## abstract type Insurance end LifeContingency(ins::Insurance) = LifeContingency(ins.life,ins.int) struct WholeLife <: Insurance life int end struct Term <: Insurance life int n end """ Insurance(lc::LifeContingency; n=nothing) Insurance(life,interest; n=nothing) Life insurance with a term period of `n`. If `n` is `nothing`, then whole life insurance. Issue age is based on the `issue_age` in the LifeContingency `lc`. # Examples ``` ins = Insurance( SingleLife(mort = UltimateMortality([0.5,0.5]),issue_age = 0), Yields.Constant(0.05), n = 1 ) ``` """ Insurance(lc::LifeContingency; n=nothing) = Insurance(lc.life,lc.int;n) function Insurance(lc,int;n=nothing) if isnothing(n) return WholeLife(lc,int) elseif n < 1 return ZeroBenefit(lc,int) else Term(lc,int,n) end end struct Due end struct Immediate end struct Annuity <: Insurance life int payable n start_time certain frequency end struct ZeroBenefit <: Insurance life int end function ZeroBenefit(lc::LifeContingency) return ZeroBenefit(lc.life,lc.int) end """ AnnuityDue(lc::LifeContingency; n=nothing, start_time=0; certain=nothing,frequency=1) AnnuityDue(life, interest; n=nothing, start_time=0; certain=nothing,frequency=1) Annuity due with the benefit period starting at `start_time` and ending after `n` periods with `frequency` payments per year of `1/frequency` amount and a `certain` period with non-contingent payments. # Examples ``` ins = AnnuityDue( SingleLife(mort = UltimateMortality([0.5,0.5]),issue_age = 0), Yields.Constant(0.05), n = 1 ) ``` """ function AnnuityDue(life, int; n=nothing,start_time=0,certain=nothing,frequency=1) if ~isnothing(n) && n < 1 return ZeroBenefit(life,int) else Annuity(life,int,Due(),n,start_time,certain,frequency) end end function AnnuityDue(lc::LifeContingency; n=nothing,start_time=0,certain=nothing,frequency=1) return AnnuityDue(lc.life,lc.int;n,start_time,certain,frequency) end """ AnnuityImmediate(lc::LifeContingency; n=nothing, start_time=0; certain=nothing,frequency=1) AnnuityImmediate(life, interest; n=nothing, start_time=0; certain=nothing,frequency=1) Annuity immediate with the benefit period starting at `start_time` and ending after `n` periods with `frequency` payments per year of `1/frequency` amount and a `certain` period with non-contingent payments. # Examples ``` ins = AnnuityImmediate( SingleLife(mort = UltimateMortality([0.5,0.5]),issue_age = 0), Yields.Constant(0.05), n = 1 ) ``` """ function AnnuityImmediate(life, int; n=nothing,start_time=0,certain=nothing,frequency=1) if ~isnothing(n) && n < 1 return ZeroBenefit(life,int) else return Annuity(life,int,Immediate(),n,start_time,certain,frequency) end end function AnnuityImmediate(lc::LifeContingency; n=nothing,start_time=0,certain=nothing,frequency=1) return AnnuityImmediate(lc.life,lc.int;n,start_time,certain,frequency) end """ survival(Insurance) The survorship vector for the given insurance. """ function MortalityTables.survival(ins::Insurance) return [survival(ins.life,t-1) for t in timepoints(ins)] end function MortalityTables.survival(ins::Annuity) return [survival(ins.life,t) for t in timepoints(ins)] end """ discount(Insurance) The discount vector for the given insurance. """ function Yields.discount(ins::Insurance) return Yields.discount.(ins.int,timepoints(ins)) end """ benefit(Insurance) The unit benefit vector for the given insurance. """ function benefit(ins::Insurance) return ones(length(timepoints(ins))) end function benefit(ins::ZeroBenefit) return zeros(length(timepoints(ins))) end function benefit(ins::Annuity) return ones(length(timepoints(ins))) ./ ins.frequency end """ probability(Insurance) The vector of contingent benefit probabilities for the given insurance. """ function probability(ins::Insurance) return [survival(ins.life,t-1) * decrement(ins.life,t-1,t) for t in timepoints(ins)] end function probability(ins::ZeroBenefit) return ones(length(timepoints(ins))) end function probability(ins::Annuity) if isnothing(ins.certain) return [survival(ins.life,t) for t in timepoints(ins)] else return [t <= ins.certain + ins.start_time ? 1.0 : survival(ins.life,t) for t in timepoints(ins)] end end """ cashflows(Insurance) The vector of decremented benefit cashflows for the given insurance. """ function cashflows(ins::Insurance) return probability(ins) .* benefit(ins) end """ timepoints(Insurance) The vector of times corresponding to the cashflow vector for the given insurance. """ function timepoints(ins::Insurance) return collect(1:omega(ins.life)) end function timepoints(ins::Term) return collect(1:min(omega(ins.life),ins.n)) end function timepoints(ins::ZeroBenefit) return [0.] end function timepoints(ins::Annuity) return timepoints(ins,ins.payable) end function timepoints(ins::Annuity,payable::Due) if isnothing(ins.n) end_time = omega(ins.life) else end_time = ins.n + ins.start_time - 1 / ins.frequency end timestep = 1 / ins.frequency collect(ins.start_time:timestep:end_time) end function timepoints(ins::Annuity,payable::Immediate) if isnothing(ins.n) end_time = omega(ins.life) else end_time = ins.n + ins.start_time end timestep = 1 / ins.frequency end_time = max(ins.start_time + timestep,end_time) # return at least one timepoint to avoid returning empty array collect((ins.start_time + timestep):timestep:end_time) end """ present_value(Insurance) The actuarial present value of the given insurance. """ function ActuaryUtilities.present_value(ins) return present_value(ins.int,cashflows(ins),timepoints(ins)) end """ premium_net(lc::LifeContingency) premium_net(lc::LifeContingency,to_time) The net premium for a whole life insurance (without second argument) or a term life insurance through `to_time`. The net premium is based on 1 unit of insurance with the death benfit payable at the end of the year and assuming annual net premiums. """ premium_net(lc::LifeContingency) = A(lc) / ä(lc) premium_net(lc::LifeContingency,to_time) = A(lc,to_time) / ä(lc,to_time) """ reserve_premium_net(lc::LifeContingency,time) The net premium reserve at the end of year `time`. """ function reserve_premium_net(lc::LifeContingency, time) PVFB = A(lc) - A(lc,n=time) PVFP = premium_net(lc) * (ä(lc) - ä(lc,n=time)) return (PVFB - PVFP) / APV(lc,time) end """ APV(lc::LifeContingency,to_time) The **actuarial present value** which is the survival times the discount factor for the life contingency. """ function APV(lc::LifeContingency,to_time) return survival(lc,to_time) * discount(lc.int,to_time) end """ decrement(lc::LifeContingency,to_time) decrement(lc::LifeContingency,from_time,to_time) Return the probablity of death for the given LifeContingency. """ mt.decrement(lc::LifeContingency,from_time,to_time) = 1 - survival(lc.life,from_time,to_time) """ survival(lc::LifeContingency,from_time,to_time) survival(lc::LifeContingency,to_time) Return the probablity of survival for the given LifeContingency. """ mt.survival(lc::LifeContingency,to_time) = survival(lc.life, 0, to_time) mt.survival(lc::LifeContingency,from_time,to_time) = survival(lc.life, from_time, to_time) mt.survival(l::SingleLife,to_time) = survival(l,0,to_time) mt.survival(l::SingleLife,from_time,to_time) =survival(l.mort,l.issue_age + from_time,l.issue_age + to_time, l.fractional_assump) """ surival(life) Return a survival vector for the given life. """ function mt.survival(l::Life) ω = omega(l) return [survival(l,t) for t in 0:ω] end mt.survival(l::JointLife,to_time) = survival(l::JointLife,0,to_time) function mt.survival(l::JointLife,from_time,to_time) return survival(l.contingency,l.joint_assumption,l::JointLife,from_time,to_time) end function mt.survival(ins::LastSurvivor,assump::JointAssumption,l::JointLife,from_time,to_time) to_time == 0 && return 1.0 l1,l2 = l.lives ₜpₓ = survival(l1.mort,l1.issue_age + from_time,l1.issue_age + to_time,l1.fractional_assump) ₜpᵧ = survival(l2.mort,l2.issue_age + from_time,l2.issue_age + to_time,l2.fractional_assump) return ₜpₓ + ₜpᵧ - ₜpₓ * ₜpᵧ end Yields.discount(lc::LifeContingency,t) = discount(lc.int,t) Yields.discount(lc::LifeContingency,t1,t2) = discount(lc.int,t1,t2) # function compostion with kwargs. # https://stackoverflow.com/questions/64740010/how-to-alias-composite-function-with-keyword-arguments ⋄(f, g) = (x...; kw...)->f(g(x...; kw...)) # unexported aliases const V = reserve_premium_net const v = Yields.discount const A = present_value ⋄ Insurance const a = present_value ⋄ AnnuityImmediate const ä = present_value ⋄ AnnuityDue const P = premium_net const ω = omega end # module
[ 21412, 5155, 4264, 278, 3976, 198, 198, 3500, 2191, 2838, 18274, 2410, 198, 3500, 10788, 1483, 51, 2977, 198, 3500, 3602, 41213, 198, 3500, 44712, 198, 3500, 575, 1164, 82, 198, 220, 220, 220, 220, 198, 9979, 45079, 796, 10788, 1483, 51, 2977, 198, 198, 39344, 5155, 4264, 278, 1387, 11, 198, 220, 220, 220, 17541, 11, 5506, 14834, 22229, 11, 5506, 14834, 3546, 13857, 11, 198, 220, 220, 220, 3486, 53, 11, 198, 220, 220, 220, 14206, 14662, 11, 1305, 292, 959, 11, 16798, 14662, 11, 198, 220, 220, 220, 4586, 34652, 452, 273, 11, 198, 220, 220, 220, 9441, 11, 198, 220, 220, 220, 11515, 62, 31605, 1505, 62, 3262, 11, 198, 220, 220, 220, 5096, 11, 198, 220, 220, 220, 1529, 14834, 62, 23301, 11, 198, 220, 220, 220, 1529, 14834, 62, 320, 13857, 11, 198, 220, 220, 220, 8683, 62, 3262, 11, 198, 220, 220, 220, 37615, 11, 198, 220, 220, 220, 9441, 11, 198, 220, 220, 220, 9780, 11, 198, 220, 220, 220, 4414, 11, 198, 220, 220, 220, 12867, 11, 198, 220, 220, 220, 5003, 44041, 11, 198, 220, 220, 220, 5003, 44041, 11, 198, 220, 220, 220, 640, 13033, 11, 198, 220, 220, 220, 1944, 62, 8367, 628, 628, 198, 198, 2, 705, 529, 84, 36098, 5563, 6, 326, 12082, 3294, 5107, 286, 5255, 902, 357, 75, 7512, 11, 1393, 11, 1918, 11, 3503, 8, 198, 397, 8709, 2099, 5155, 886, 628, 198, 37811, 198, 220, 220, 220, 2878, 14206, 14662, 198, 220, 220, 220, 220, 220, 220, 220, 5596, 198, 220, 220, 220, 220, 220, 220, 220, 2071, 62, 496, 3712, 5317, 198, 220, 220, 220, 220, 220, 220, 220, 6776, 3712, 33, 970, 198, 220, 220, 220, 220, 220, 220, 220, 13390, 282, 62, 562, 931, 3712, 44, 28337, 51, 2977, 13, 20148, 20344, 3890, 198, 220, 220, 220, 886, 198, 198, 32, 4600, 14662, 63, 2134, 7268, 262, 3306, 14895, 329, 25477, 47761, 3519, 284, 257, 2060, 1204, 13, 5765, 351, 257, 4600, 14662, 4264, 278, 1387, 63, 284, 466, 867, 43840, 36098, 1944, 1988, 16765, 13, 220, 198, 198, 9218, 4775, 7159, 25, 198, 12, 4600, 30171, 63, 1208, 257, 12430, 15879, 11, 543, 318, 281, 7177, 286, 9723, 12430, 3965, 41497, 416, 28681, 2479, 198, 12, 4600, 21949, 62, 496, 63, 318, 262, 9672, 2071, 2479, 329, 262, 4600, 28008, 14662, 63, 290, 318, 262, 4308, 286, 867, 38820, 16765, 13, 198, 12, 4600, 282, 425, 63, 15161, 1988, 318, 4600, 7942, 44646, 49511, 329, 6466, 1035, 31741, 351, 1180, 3722, 319, 262, 3160, 31977, 13, 198, 12, 4600, 69, 7861, 282, 62, 562, 931, 44646, 15161, 1988, 318, 4600, 3118, 6933, 3419, 44646, 770, 318, 257, 4600, 20148, 20344, 3890, 63, 422, 262, 4600, 44, 28337, 51, 2977, 13, 20362, 63, 5301, 290, 318, 262, 13196, 284, 779, 329, 1729, 12, 41433, 9337, 14, 22355, 13, 198, 198, 2, 21066, 198, 220, 220, 220, 1262, 10788, 1483, 51, 2977, 198, 220, 220, 220, 5596, 796, 10788, 1483, 51, 2977, 13, 11487, 7203, 14585, 569, 19313, 1874, 312, 723, 8997, 9683, 290, 11165, 532, 12674, 399, 684, 76, 11020, 11, 3537, 33, 4943, 628, 220, 220, 220, 14206, 14662, 7, 198, 220, 220, 220, 220, 220, 220, 220, 5596, 220, 220, 220, 220, 220, 220, 796, 5596, 13, 19738, 58, 1270, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2071, 62, 496, 220, 796, 1542, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 1267, 198, 37811, 198, 7249, 14206, 14662, 1279, 25, 5155, 198, 220, 220, 220, 5596, 198, 220, 220, 220, 2071, 62, 496, 198, 220, 220, 220, 6776, 198, 220, 220, 220, 13390, 282, 62, 562, 931, 198, 437, 198, 198, 8818, 14206, 14662, 7, 26, 30171, 11, 21949, 62, 496, 28, 22366, 11, 282, 425, 28, 7942, 11, 69, 7861, 282, 62, 562, 931, 796, 45079, 13, 3118, 6933, 28955, 198, 220, 220, 220, 1441, 14206, 14662, 7, 30171, 26, 21949, 62, 496, 11, 282, 425, 11, 69, 7861, 282, 62, 562, 931, 8, 198, 437, 198, 198, 8818, 14206, 14662, 7, 30171, 26, 21949, 62, 496, 28, 22366, 11, 282, 425, 28, 7942, 11, 69, 7861, 282, 62, 562, 931, 796, 45079, 13, 3118, 6933, 28955, 198, 220, 220, 220, 611, 318, 22366, 7, 21949, 62, 496, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2071, 62, 496, 796, 717, 9630, 7, 30171, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 5145, 7, 417, 4906, 7, 30171, 8, 1279, 25, 6416, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 749, 1884, 1339, 318, 326, 5596, 318, 281, 7177, 286, 30104, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 779, 2071, 2479, 284, 2922, 262, 826, 530, 357, 32935, 41497, 351, 2071, 2479, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 14206, 14662, 7, 30171, 58, 21949, 62, 496, 4357, 21949, 62, 496, 11, 282, 425, 11, 69, 7861, 282, 62, 562, 931, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 14206, 14662, 7, 30171, 11, 21949, 62, 496, 11, 282, 425, 11, 69, 7861, 282, 62, 562, 931, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 437, 198, 198, 37811, 220, 198, 220, 220, 220, 16798, 8021, 24098, 3419, 198, 198, 2025, 12531, 2099, 10200, 262, 1180, 9672, 2776, 1022, 262, 9441, 286, 262, 3160, 319, 257, 16798, 14662, 13, 14898, 3689, 284, 779, 2291, 25, 198, 12, 4600, 6732, 292, 959, 3419, 63, 198, 37811, 198, 397, 8709, 2099, 16798, 8021, 24098, 886, 198, 198, 37811, 220, 198, 220, 220, 220, 1305, 292, 959, 3419, 198, 198, 464, 13196, 286, 3485, 429, 3160, 287, 257, 6466, 1204, 17952, 13, 198, 3792, 257, 850, 4906, 286, 4600, 41, 1563, 8021, 24098, 44646, 198, 37811, 198, 7249, 1305, 292, 959, 1279, 25, 16798, 8021, 24098, 886, 198, 198, 37811, 220, 198, 220, 220, 220, 2345, 278, 1387, 3419, 198, 198, 2025, 12531, 2099, 10200, 262, 1180, 20022, 329, 25477, 4034, 13, 14898, 3689, 284, 779, 2291, 25, 198, 12, 4600, 5956, 34652, 452, 273, 3419, 63, 198, 37811, 198, 397, 8709, 2099, 2345, 278, 1387, 886, 198, 198, 37811, 198, 220, 220, 220, 4586, 34652, 452, 273, 3419, 198, 464, 38820, 810, 27287, 4034, 389, 28538, 2402, 1111, 3160, 6427, 13, 198, 3792, 257, 850, 4906, 286, 4600, 4264, 278, 1387, 63, 198, 37811, 198, 7249, 4586, 34652, 452, 273, 1279, 25, 2345, 278, 1387, 886, 198, 198, 2, 16926, 46, 25, 1892, 1846, 1154, 12061, 198, 2, 37227, 198, 2, 220, 220, 220, 220, 3274, 2514, 32423, 3419, 198, 2, 383, 38820, 810, 27287, 4034, 389, 28538, 2402, 262, 717, 1204, 6427, 13, 198, 198, 2, 1148, 257, 850, 4906, 286, 4600, 4264, 278, 1387, 63, 198, 2, 37227, 198, 2, 2878, 3274, 2514, 32423, 1279, 25, 2345, 278, 1387, 886, 198, 198, 37811, 198, 220, 220, 220, 2878, 16798, 14662, 198, 220, 220, 220, 220, 220, 220, 220, 3160, 198, 220, 220, 220, 220, 220, 220, 220, 38820, 198, 220, 220, 220, 220, 220, 220, 220, 6466, 62, 562, 24098, 198, 220, 220, 220, 886, 628, 220, 220, 220, 317, 4600, 14662, 63, 2134, 7268, 262, 3306, 14895, 329, 25477, 47761, 3519, 284, 257, 6466, 1204, 5096, 13, 5765, 351, 257, 4600, 14662, 4264, 278, 1387, 63, 284, 466, 867, 43840, 36098, 1944, 1988, 16765, 13, 220, 198, 198, 9218, 4775, 7159, 25, 198, 12, 4600, 75, 1083, 63, 318, 257, 46545, 286, 734, 4600, 28008, 14662, 63, 82, 198, 12, 4600, 3642, 278, 1387, 63, 4277, 318, 4600, 5956, 34652, 452, 273, 3419, 44646, 632, 318, 262, 7616, 329, 25477, 4034, 13, 4091, 4600, 30, 4264, 278, 1387, 44646, 220, 198, 12, 4600, 73, 1563, 62, 562, 24098, 63, 15161, 1988, 318, 4600, 6732, 292, 959, 3419, 44646, 632, 318, 262, 9672, 2776, 1022, 262, 12430, 286, 262, 734, 3160, 13, 4091, 4600, 30, 41, 1563, 8021, 24098, 44646, 220, 198, 198, 2, 21066, 198, 220, 220, 220, 1262, 10788, 1483, 51, 2977, 198, 220, 220, 220, 5596, 796, 10788, 1483, 51, 2977, 13, 11487, 7203, 14585, 569, 19313, 1874, 312, 723, 8997, 9683, 290, 11165, 532, 12674, 399, 684, 76, 11020, 11, 3537, 33, 4943, 628, 220, 220, 220, 300, 16, 796, 14206, 14662, 7, 198, 220, 220, 220, 220, 220, 220, 220, 5596, 220, 220, 220, 220, 220, 220, 796, 5596, 13, 19738, 58, 1270, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2071, 62, 496, 220, 796, 1542, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 300, 17, 796, 14206, 14662, 7, 198, 220, 220, 220, 220, 220, 220, 220, 5596, 220, 220, 220, 220, 220, 220, 796, 5596, 13, 19738, 58, 1270, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2071, 62, 496, 220, 796, 1542, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 474, 75, 796, 16798, 14662, 7, 198, 220, 220, 220, 220, 220, 220, 220, 3160, 796, 357, 75, 16, 11, 75, 17, 828, 198, 220, 220, 220, 220, 220, 220, 220, 38820, 796, 4586, 34652, 452, 273, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 6466, 62, 562, 24098, 796, 1305, 292, 959, 3419, 198, 220, 220, 220, 1267, 198, 37811, 198, 14881, 13, 31, 46265, 4299, 2878, 16798, 14662, 1279, 25, 5155, 198, 220, 220, 220, 3160, 3712, 51, 29291, 90, 28008, 14662, 11, 28008, 14662, 92, 198, 220, 220, 220, 38820, 3712, 4264, 278, 1387, 796, 4586, 34652, 452, 273, 3419, 198, 220, 220, 220, 6466, 62, 562, 24098, 3712, 41, 1563, 8021, 24098, 796, 1305, 292, 959, 3419, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2878, 5155, 4264, 278, 1387, 198, 220, 220, 220, 220, 220, 220, 220, 1204, 3712, 14662, 198, 37811, 198, 7249, 5155, 4264, 278, 1387, 198, 220, 220, 220, 1204, 3712, 14662, 198, 220, 220, 220, 493, 198, 437, 198, 198, 14881, 13, 36654, 2701, 540, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 796, 6524, 7, 44601, 8, 198, 198, 37811, 198, 220, 220, 220, 37615, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 198, 220, 220, 220, 37615, 7, 75, 3712, 14662, 8, 198, 220, 220, 220, 37615, 7, 72, 3712, 19302, 32184, 8, 198, 198, 2, 4600, 14662, 63, 82, 290, 4600, 14662, 4264, 278, 1387, 63, 82, 198, 198, 35561, 262, 938, 5447, 640, 62, 41007, 329, 1111, 262, 1393, 2494, 290, 12430, 3084, 13, 198, 6425, 326, 428, 318, 1635, 39799, 9, 621, 4585, 4600, 462, 4908, 63, 319, 257, 4600, 44, 28337, 10962, 47671, 543, 481, 1577, 345, 262, 938, 4600, 1078, 1328, 62, 496, 44646, 198, 198, 16281, 25, 611, 262, 4600, 14662, 4264, 278, 1387, 63, 468, 2071, 2479, 3126, 11, 290, 262, 938, 5447, 28681, 2479, 329, 262, 4600, 44, 28337, 10962, 63, 318, 1802, 11, 788, 4600, 462, 4908, 63, 286, 262, 4600, 44, 28337, 10962, 63, 481, 307, 4600, 3064, 63, 290, 4600, 462, 4908, 63, 286, 262, 220, 198, 63, 14662, 4264, 278, 1387, 63, 481, 307, 4600, 1821, 44646, 198, 198, 2, 4600, 19302, 32184, 63, 82, 198, 198, 464, 938, 2278, 326, 262, 1393, 2494, 318, 5447, 329, 13, 2195, 18940, 284, 307, 15541, 357, 63, 18943, 63, 8, 329, 220, 198, 220, 220, 220, 10345, 290, 6937, 1393, 2494, 3858, 13, 16409, 262, 4600, 12957, 9630, 63, 286, 262, 15879, 611, 220, 198, 220, 220, 220, 257, 15879, 2099, 13, 198, 37811, 198, 8818, 45079, 13, 462, 4908, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 198, 220, 220, 220, 1303, 611, 530, 286, 262, 267, 1326, 22649, 318, 37174, 11, 326, 338, 257, 48436, 523, 356, 761, 198, 220, 220, 220, 1303, 284, 7135, 262, 2099, 351, 2558, 198, 220, 220, 220, 1441, 2558, 7, 462, 4908, 7, 44601, 13, 6042, 4008, 198, 437, 198, 198, 8818, 45079, 13, 462, 4908, 7, 75, 3712, 28008, 14662, 8, 198, 220, 220, 220, 1441, 45079, 13, 462, 4908, 7, 75, 13, 30171, 8, 532, 300, 13, 21949, 62, 496, 1343, 352, 220, 220, 220, 220, 198, 437, 198, 198, 8818, 45079, 13, 462, 4908, 7, 75, 3712, 41, 1563, 14662, 8, 198, 220, 220, 220, 1441, 5288, 7, 37615, 12195, 75, 13, 75, 1083, 8, 1267, 220, 220, 220, 220, 198, 437, 628, 198, 14468, 21017, 198, 2235, 22240, 3843, 18421, 44386, 198, 14468, 21017, 198, 198, 37811, 198, 220, 220, 220, 360, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 8, 198, 198, 15506, 35, 62, 87, 15506, 318, 257, 41432, 43840, 36098, 725, 7094, 2163, 543, 318, 262, 1720, 286, 262, 9441, 290, 9780, 5766, 13, 198, 37811, 198, 8818, 360, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 8, 198, 220, 220, 220, 1441, 9780, 7, 44601, 13, 600, 11, 284, 62, 2435, 8, 1635, 9441, 7, 44601, 11, 1462, 62, 2435, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 300, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 8, 198, 198, 15506, 75, 62, 87, 15506, 318, 257, 41432, 43840, 36098, 725, 7094, 2163, 543, 318, 262, 9441, 510, 284, 257, 1728, 966, 287, 640, 13, 2750, 4277, 11, 481, 423, 257, 4326, 560, 4308, 357, 494, 4600, 16, 13, 15, 63, 828, 475, 345, 460, 11986, 4600, 12093, 271, 63, 21179, 4578, 284, 779, 1223, 1180, 357, 68, 13, 70, 13, 4600, 12825, 63, 318, 2219, 287, 262, 9285, 2014, 198, 37811, 198, 8818, 300, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 26, 4308, 28, 16, 13, 15, 8, 198, 220, 220, 220, 1441, 9441, 7, 44601, 13, 6042, 11, 1462, 62, 2435, 8, 1635, 4308, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 327, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 8, 198, 198, 15506, 34, 62, 87, 15506, 318, 257, 41432, 43840, 36098, 725, 7094, 2163, 543, 318, 262, 1720, 286, 262, 9780, 5766, 290, 262, 3580, 287, 4600, 75, 63, 357, 15506, 75, 62, 87, 15506, 737, 198, 37811, 198, 8818, 327, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 284, 62, 2435, 8, 198, 220, 220, 220, 9780, 7, 44601, 13, 600, 11, 284, 62, 2435, 10, 16, 8, 1635, 357, 75, 7, 44601, 11, 1462, 62, 2435, 8, 532, 300, 7, 44601, 11, 284, 62, 2435, 10, 16, 4008, 198, 220, 220, 220, 220, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 399, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 422, 62, 2435, 8, 198, 198, 15506, 45, 62, 87, 15506, 318, 257, 17530, 43840, 36098, 725, 7094, 2163, 543, 318, 262, 2160, 286, 262, 4600, 35, 63, 357, 15506, 35, 62, 87, 15506, 8, 3815, 422, 262, 1813, 640, 284, 262, 886, 286, 262, 12430, 3084, 13, 198, 37811, 198, 8818, 399, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 422, 62, 2435, 8, 198, 220, 220, 220, 2837, 796, 422, 62, 2435, 37498, 462, 4908, 7, 44601, 13219, 16, 8, 198, 220, 220, 220, 1441, 5591, 742, 7, 28200, 13912, 7, 6738, 62, 2435, 3784, 35, 7, 44601, 11, 422, 62, 2435, 36911, 2837, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 337, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 422, 62, 2435, 8, 198, 198, 464, 7559, 44, 62, 87, 15506, 43840, 36098, 725, 7094, 2163, 810, 262, 4600, 6738, 62, 2435, 63, 4578, 318, 4600, 87, 44646, 198, 45147, 2479, 318, 1912, 319, 262, 2071, 62, 496, 287, 262, 5155, 4264, 278, 1387, 4600, 44601, 44646, 198, 37811, 198, 8818, 337, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 422, 62, 2435, 8, 198, 220, 220, 220, 2837, 796, 422, 62, 2435, 25, 462, 4908, 7, 44601, 13219, 16, 198, 220, 220, 220, 1441, 5591, 742, 7, 28200, 13912, 7, 6738, 62, 2435, 3784, 34, 7, 44601, 11, 422, 62, 2435, 36911, 2837, 8, 198, 437, 198, 198, 36, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 256, 11, 2124, 8, 796, 360, 7, 44601, 11, 87, 1343, 256, 8, 1220, 360, 7, 44601, 11, 87, 8, 628, 198, 14468, 2235, 198, 21017, 7088, 31741, 44386, 198, 14468, 2235, 198, 198, 397, 8709, 2099, 17541, 886, 198, 198, 14662, 4264, 278, 1387, 7, 1040, 3712, 20376, 3874, 8, 796, 5155, 4264, 278, 1387, 7, 1040, 13, 6042, 11, 1040, 13, 600, 8, 198, 198, 7249, 23431, 14662, 1279, 25, 17541, 198, 220, 220, 220, 1204, 198, 220, 220, 220, 493, 198, 437, 198, 198, 7249, 35118, 1279, 25, 17541, 198, 220, 220, 220, 1204, 198, 220, 220, 220, 493, 198, 220, 220, 220, 299, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 17541, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 8, 198, 220, 220, 220, 17541, 7, 6042, 11, 9446, 26, 299, 28, 22366, 8, 198, 198, 14662, 5096, 351, 257, 3381, 2278, 286, 4600, 77, 44646, 1002, 4600, 77, 63, 318, 4600, 22366, 47671, 788, 2187, 1204, 5096, 13, 198, 198, 45147, 2479, 318, 1912, 319, 262, 4600, 21949, 62, 496, 63, 287, 262, 5155, 4264, 278, 1387, 4600, 44601, 44646, 198, 198, 2, 21066, 198, 198, 15506, 63, 198, 1040, 796, 17541, 7, 198, 220, 220, 220, 14206, 14662, 7, 30171, 796, 11165, 44, 28337, 26933, 15, 13, 20, 11, 15, 13, 20, 46570, 21949, 62, 496, 796, 657, 828, 198, 220, 220, 220, 575, 1164, 82, 13, 3103, 18797, 7, 15, 13, 2713, 828, 198, 220, 220, 220, 299, 796, 352, 198, 8, 220, 198, 15506, 63, 198, 37811, 198, 20376, 3874, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 8, 796, 17541, 7, 44601, 13, 6042, 11, 44601, 13, 600, 26, 77, 8, 198, 198, 8818, 17541, 7, 44601, 11, 600, 26, 77, 28, 22366, 8, 198, 220, 220, 220, 611, 318, 22366, 7, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 23431, 14662, 7, 44601, 11, 600, 8, 198, 220, 220, 220, 2073, 361, 299, 1279, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 12169, 42166, 270, 7, 44601, 11, 600, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 35118, 7, 44601, 11, 600, 11, 77, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 7249, 14444, 886, 198, 7249, 1846, 13857, 886, 198, 198, 7249, 5506, 14834, 1279, 25, 17541, 198, 220, 220, 220, 1204, 198, 220, 220, 220, 493, 198, 220, 220, 220, 28538, 198, 220, 220, 220, 299, 198, 220, 220, 220, 923, 62, 2435, 198, 220, 220, 220, 1728, 198, 220, 220, 220, 8373, 198, 437, 198, 198, 7249, 12169, 42166, 270, 1279, 25, 17541, 198, 220, 220, 220, 1204, 198, 220, 220, 220, 493, 198, 437, 198, 198, 8818, 12169, 42166, 270, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 220, 198, 220, 220, 220, 1441, 12169, 42166, 270, 7, 44601, 13, 6042, 11, 44601, 13, 600, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5506, 14834, 22229, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 11, 923, 62, 2435, 28, 15, 26, 1728, 28, 22366, 11, 35324, 28, 16, 8, 198, 220, 220, 220, 5506, 14834, 22229, 7, 6042, 11, 1393, 26, 299, 28, 22366, 11, 923, 62, 2435, 28, 15, 26, 1728, 28, 22366, 11, 35324, 28, 16, 8, 198, 198, 18858, 14834, 2233, 351, 262, 4414, 2278, 3599, 379, 4600, 9688, 62, 2435, 63, 290, 7464, 706, 4600, 77, 63, 9574, 351, 4600, 35324, 63, 7524, 583, 614, 286, 4600, 16, 14, 35324, 63, 2033, 290, 257, 4600, 39239, 63, 2278, 351, 1729, 12, 3642, 278, 298, 7524, 13, 220, 198, 198, 2, 21066, 198, 198, 15506, 63, 198, 1040, 796, 5506, 14834, 22229, 7, 198, 220, 220, 220, 14206, 14662, 7, 30171, 796, 11165, 44, 28337, 26933, 15, 13, 20, 11, 15, 13, 20, 46570, 21949, 62, 496, 796, 657, 828, 198, 220, 220, 220, 575, 1164, 82, 13, 3103, 18797, 7, 15, 13, 2713, 828, 198, 220, 220, 220, 299, 796, 352, 198, 8, 220, 198, 15506, 63, 198, 198, 37811, 198, 8818, 5506, 14834, 22229, 7, 6042, 11, 493, 26, 299, 28, 22366, 11, 9688, 62, 2435, 28, 15, 11, 39239, 28, 22366, 11, 35324, 28, 16, 8, 220, 198, 220, 220, 220, 611, 5299, 271, 22366, 7, 77, 8, 11405, 299, 1279, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 12169, 42166, 270, 7, 6042, 11, 600, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 5506, 14834, 7, 6042, 11, 600, 11, 22229, 22784, 77, 11, 9688, 62, 2435, 11, 39239, 11, 35324, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 5506, 14834, 22229, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 11, 9688, 62, 2435, 28, 15, 11, 39239, 28, 22366, 11, 35324, 28, 16, 8, 220, 198, 220, 220, 220, 1441, 5506, 14834, 22229, 7, 44601, 13, 6042, 11, 44601, 13, 600, 26, 77, 11, 9688, 62, 2435, 11, 39239, 11, 35324, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 5506, 14834, 3546, 13857, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 11, 923, 62, 2435, 28, 15, 26, 1728, 28, 22366, 11, 35324, 28, 16, 8, 198, 220, 220, 220, 5506, 14834, 3546, 13857, 7, 6042, 11, 1393, 26, 299, 28, 22366, 11, 923, 62, 2435, 28, 15, 26, 1728, 28, 22366, 11, 35324, 28, 16, 8, 198, 198, 18858, 14834, 7103, 351, 262, 4414, 2278, 3599, 379, 4600, 9688, 62, 2435, 63, 290, 7464, 706, 4600, 77, 63, 9574, 351, 4600, 35324, 63, 7524, 583, 614, 286, 4600, 16, 14, 35324, 63, 2033, 290, 257, 4600, 39239, 63, 2278, 351, 1729, 12, 3642, 278, 298, 7524, 13, 220, 198, 198, 2, 21066, 198, 198, 15506, 63, 198, 1040, 796, 5506, 14834, 3546, 13857, 7, 198, 220, 220, 220, 14206, 14662, 7, 30171, 796, 11165, 44, 28337, 26933, 15, 13, 20, 11, 15, 13, 20, 46570, 21949, 62, 496, 796, 657, 828, 198, 220, 220, 220, 575, 1164, 82, 13, 3103, 18797, 7, 15, 13, 2713, 828, 198, 220, 220, 220, 299, 796, 352, 198, 8, 220, 198, 15506, 63, 198, 198, 37811, 198, 8818, 5506, 14834, 3546, 13857, 7, 6042, 11, 493, 26, 299, 28, 22366, 11, 9688, 62, 2435, 28, 15, 11, 39239, 28, 22366, 11, 35324, 28, 16, 8, 220, 198, 220, 220, 220, 611, 5299, 271, 22366, 7, 77, 8, 11405, 299, 1279, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 12169, 42166, 270, 7, 6042, 11, 600, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 5506, 14834, 7, 6042, 11, 600, 11, 3546, 13857, 22784, 77, 11, 9688, 62, 2435, 11, 39239, 11, 35324, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 5506, 14834, 3546, 13857, 7, 44601, 3712, 14662, 4264, 278, 1387, 26, 299, 28, 22366, 11, 9688, 62, 2435, 28, 15, 11, 39239, 28, 22366, 11, 35324, 28, 16, 8, 220, 220, 198, 220, 220, 220, 1441, 5506, 14834, 3546, 13857, 7, 44601, 13, 6042, 11, 44601, 13, 600, 26, 77, 11, 9688, 62, 2435, 11, 39239, 11, 35324, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 9441, 7, 20376, 3874, 8, 198, 198, 464, 3343, 11094, 15879, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 10788, 1483, 51, 2977, 13, 48846, 2473, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 220, 1441, 685, 48846, 2473, 7, 1040, 13, 6042, 11, 83, 12, 16, 8, 329, 256, 287, 640, 13033, 7, 1040, 15437, 198, 437, 198, 198, 8818, 10788, 1483, 51, 2977, 13, 48846, 2473, 7, 1040, 3712, 18858, 14834, 8, 198, 220, 220, 220, 1441, 685, 48846, 2473, 7, 1040, 13, 6042, 11, 83, 8, 329, 256, 287, 640, 13033, 7, 1040, 15437, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 9780, 7, 20376, 3874, 8, 198, 198, 464, 9780, 15879, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 575, 1164, 82, 13, 15410, 608, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 220, 1441, 575, 1164, 82, 13, 15410, 608, 12195, 1040, 13, 600, 11, 2435, 13033, 7, 1040, 4008, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 4414, 7, 20376, 3874, 8, 198, 198, 464, 4326, 4414, 15879, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 4414, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 220, 1441, 3392, 7, 13664, 7, 2435, 13033, 7, 1040, 22305, 198, 437, 198, 198, 8818, 4414, 7, 1040, 3712, 28667, 42166, 270, 8, 198, 220, 220, 220, 1441, 1976, 27498, 7, 13664, 7, 2435, 13033, 7, 1040, 22305, 198, 437, 198, 198, 8818, 4414, 7, 1040, 3712, 18858, 14834, 8, 198, 220, 220, 220, 1441, 3392, 7, 13664, 7, 2435, 13033, 7, 1040, 22305, 24457, 1035, 13, 35324, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 12867, 7, 20376, 3874, 8, 198, 198, 464, 15879, 286, 25477, 4414, 39522, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 12867, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 220, 1441, 685, 48846, 2473, 7, 1040, 13, 6042, 11, 83, 12, 16, 8, 1635, 5255, 434, 7, 1040, 13, 6042, 11, 83, 12, 16, 11, 83, 8, 329, 256, 287, 640, 13033, 7, 1040, 15437, 198, 437, 198, 198, 8818, 12867, 7, 1040, 3712, 28667, 42166, 270, 8, 198, 220, 220, 220, 1441, 3392, 7, 13664, 7, 2435, 13033, 7, 1040, 22305, 198, 437, 198, 198, 8818, 12867, 7, 1040, 3712, 18858, 14834, 8, 198, 220, 220, 220, 611, 318, 22366, 7, 1040, 13, 39239, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 220, 685, 48846, 2473, 7, 1040, 13, 6042, 11, 83, 8, 329, 256, 287, 640, 13033, 7, 1040, 15437, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 685, 83, 19841, 1035, 13, 39239, 1343, 1035, 13, 9688, 62, 2435, 5633, 352, 13, 15, 1058, 9441, 7, 1040, 13, 6042, 11, 83, 8, 329, 256, 287, 640, 13033, 7, 1040, 15437, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 5003, 44041, 7, 20376, 3874, 8, 198, 198, 464, 15879, 286, 5255, 12061, 4414, 5003, 44041, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 5003, 44041, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 1441, 12867, 7, 1040, 8, 764, 9, 4414, 7, 1040, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 640, 13033, 7, 20376, 3874, 8, 198, 198, 464, 15879, 286, 1661, 11188, 284, 262, 5003, 11125, 15879, 329, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 640, 13033, 7, 1040, 3712, 20376, 3874, 8, 198, 220, 220, 220, 1441, 2824, 7, 16, 25, 462, 4908, 7, 1040, 13, 6042, 4008, 198, 437, 198, 198, 8818, 640, 13033, 7, 1040, 3712, 40596, 8, 198, 220, 220, 220, 1441, 2824, 7, 16, 25, 1084, 7, 462, 4908, 7, 1040, 13, 6042, 828, 1040, 13, 77, 4008, 198, 437, 198, 198, 8818, 640, 13033, 7, 1040, 3712, 28667, 42166, 270, 8, 198, 220, 220, 220, 1441, 685, 15, 8183, 198, 437, 198, 198, 8818, 640, 13033, 7, 1040, 3712, 18858, 14834, 8, 198, 220, 220, 220, 1441, 640, 13033, 7, 1040, 11, 1040, 13, 15577, 540, 8, 198, 437, 198, 198, 8818, 640, 13033, 7, 1040, 3712, 18858, 14834, 11, 15577, 540, 3712, 22229, 8, 198, 220, 220, 220, 611, 318, 22366, 7, 1040, 13, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 62, 2435, 796, 37615, 7, 1040, 13, 6042, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 886, 62, 2435, 796, 1035, 13, 77, 1343, 1035, 13, 9688, 62, 2435, 532, 352, 1220, 1035, 13, 35324, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4628, 395, 538, 796, 352, 1220, 1035, 13, 35324, 198, 220, 220, 220, 2824, 7, 1040, 13, 9688, 62, 2435, 25, 16514, 395, 538, 25, 437, 62, 2435, 8, 198, 437, 198, 198, 8818, 640, 13033, 7, 1040, 3712, 18858, 14834, 11, 15577, 540, 3712, 3546, 13857, 8, 198, 220, 220, 220, 611, 318, 22366, 7, 1040, 13, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 62, 2435, 796, 37615, 7, 1040, 13, 6042, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 886, 62, 2435, 796, 1035, 13, 77, 1343, 1035, 13, 9688, 62, 2435, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4628, 395, 538, 796, 352, 1220, 1035, 13, 35324, 198, 220, 220, 220, 886, 62, 2435, 796, 3509, 7, 1040, 13, 9688, 62, 2435, 1343, 4628, 395, 538, 11, 437, 62, 2435, 8, 1303, 1441, 379, 1551, 530, 640, 4122, 284, 3368, 8024, 6565, 7177, 198, 220, 220, 220, 2824, 19510, 1040, 13, 9688, 62, 2435, 1343, 4628, 395, 538, 2599, 16514, 395, 538, 25, 437, 62, 2435, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1944, 62, 8367, 7, 20376, 3874, 8, 198, 198, 464, 43840, 36098, 1944, 1988, 286, 262, 1813, 5096, 13, 198, 37811, 198, 8818, 2191, 2838, 18274, 2410, 13, 25579, 62, 8367, 7, 1040, 8, 198, 220, 220, 220, 1441, 1944, 62, 8367, 7, 1040, 13, 600, 11, 30350, 44041, 7, 1040, 828, 2435, 13033, 7, 1040, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 8683, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 198, 220, 220, 220, 8683, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 198, 198, 464, 2010, 8683, 329, 257, 2187, 1204, 5096, 357, 19419, 1218, 4578, 8, 393, 257, 3381, 1204, 5096, 832, 4600, 1462, 62, 2435, 44646, 198, 198, 464, 2010, 8683, 318, 1912, 319, 352, 4326, 286, 5096, 351, 262, 1918, 1888, 11147, 28538, 379, 262, 886, 286, 262, 614, 290, 13148, 5079, 2010, 21884, 13, 198, 37811, 198, 31605, 1505, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 8, 796, 317, 7, 44601, 8, 1220, 257, 136, 230, 7, 44601, 8, 198, 31605, 1505, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 796, 317, 7, 44601, 11, 1462, 62, 2435, 8, 1220, 257, 136, 230, 7, 44601, 11, 1462, 62, 2435, 8, 198, 198, 37811, 198, 220, 220, 220, 220, 11515, 62, 31605, 1505, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 2435, 8, 198, 198, 464, 2010, 8683, 11515, 379, 262, 886, 286, 614, 4600, 2435, 44646, 198, 37811, 198, 8818, 220, 11515, 62, 31605, 1505, 62, 3262, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 640, 8, 198, 220, 220, 220, 31392, 26001, 796, 317, 7, 44601, 8, 532, 317, 7, 44601, 11, 77, 28, 2435, 8, 198, 220, 220, 220, 31392, 5837, 796, 8683, 62, 3262, 7, 44601, 8, 1635, 357, 64, 136, 230, 7, 44601, 8, 532, 257, 136, 230, 7, 44601, 11, 77, 28, 2435, 4008, 198, 220, 220, 220, 1441, 357, 47, 53, 26001, 532, 31392, 5837, 8, 1220, 3486, 53, 7, 44601, 11, 2435, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 3486, 53, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 198, 198, 464, 12429, 529, 84, 36098, 1944, 1988, 1174, 543, 318, 262, 9441, 1661, 262, 9780, 5766, 329, 262, 1204, 38820, 13, 198, 37811, 198, 8818, 3486, 53, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 198, 220, 220, 220, 1441, 9441, 7, 44601, 11, 1462, 62, 2435, 8, 1635, 9780, 7, 44601, 13, 600, 11, 1462, 62, 2435, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5255, 434, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 198, 220, 220, 220, 5255, 434, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 198, 198, 13615, 262, 1861, 23117, 414, 286, 1918, 329, 262, 1813, 5155, 4264, 278, 1387, 13, 220, 198, 37811, 198, 16762, 13, 12501, 260, 434, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 796, 352, 532, 9441, 7, 44601, 13, 6042, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 628, 198, 37811, 198, 220, 220, 220, 9441, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 198, 220, 220, 220, 9441, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 198, 198, 13615, 262, 1861, 23117, 414, 286, 9441, 329, 262, 1813, 5155, 4264, 278, 1387, 13, 220, 198, 37811, 198, 16762, 13, 48846, 2473, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 1462, 62, 2435, 8, 796, 9441, 7, 44601, 13, 6042, 11, 657, 11, 284, 62, 2435, 8, 198, 16762, 13, 48846, 2473, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 796, 9441, 7, 44601, 13, 6042, 11, 422, 62, 2435, 11, 284, 62, 2435, 8, 198, 198, 16762, 13, 48846, 2473, 7, 75, 3712, 28008, 14662, 11, 1462, 62, 2435, 8, 796, 9441, 7, 75, 11, 15, 11, 1462, 62, 2435, 8, 198, 16762, 13, 48846, 2473, 7, 75, 3712, 28008, 14662, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 796, 48846, 2473, 7, 75, 13, 30171, 11, 75, 13, 21949, 62, 496, 1343, 422, 62, 2435, 11, 75, 13, 21949, 62, 496, 1343, 284, 62, 2435, 11, 300, 13, 69, 7861, 282, 62, 562, 931, 8, 198, 198, 37811, 198, 220, 220, 220, 969, 2473, 7, 6042, 8, 198, 198, 13615, 257, 9441, 15879, 329, 262, 1813, 1204, 13, 198, 37811, 198, 8818, 45079, 13, 48846, 2473, 7, 75, 3712, 14662, 8, 220, 198, 220, 220, 220, 18074, 231, 796, 220, 220, 37615, 7, 75, 8, 198, 220, 220, 220, 1441, 685, 48846, 2473, 7, 75, 11, 83, 8, 329, 256, 287, 657, 25, 49535, 60, 198, 437, 198, 198, 16762, 13, 48846, 2473, 7, 75, 3712, 41, 1563, 14662, 11, 1462, 62, 2435, 8, 796, 9441, 7, 75, 3712, 41, 1563, 14662, 11, 15, 11, 1462, 62, 2435, 8, 198, 8818, 45079, 13, 48846, 2473, 7, 75, 3712, 41, 1563, 14662, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 220, 198, 220, 220, 220, 1441, 9441, 7, 75, 13, 3642, 278, 1387, 11, 75, 13, 73, 1563, 62, 562, 24098, 11, 75, 3712, 41, 1563, 14662, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 198, 437, 198, 198, 8818, 45079, 13, 48846, 2473, 7, 1040, 3712, 5956, 34652, 452, 273, 11, 562, 931, 3712, 41, 1563, 8021, 24098, 11, 75, 3712, 41, 1563, 14662, 11, 6738, 62, 2435, 11, 1462, 62, 2435, 8, 198, 220, 220, 220, 284, 62, 2435, 6624, 657, 11405, 1441, 352, 13, 15, 198, 220, 220, 220, 220, 198, 220, 220, 220, 300, 16, 11, 75, 17, 796, 300, 13, 75, 1083, 198, 220, 220, 220, 2343, 224, 250, 79, 158, 224, 241, 796, 9441, 7, 75, 16, 13, 30171, 11, 75, 16, 13, 21949, 62, 496, 1343, 422, 62, 2435, 11, 75, 16, 13, 21949, 62, 496, 1343, 284, 62, 2435, 11, 75, 16, 13, 69, 7861, 282, 62, 562, 931, 8, 198, 220, 220, 220, 2343, 224, 250, 79, 39611, 100, 796, 9441, 7, 75, 17, 13, 30171, 11, 75, 17, 13, 21949, 62, 496, 1343, 422, 62, 2435, 11, 75, 17, 13, 21949, 62, 496, 1343, 284, 62, 2435, 11, 75, 17, 13, 69, 7861, 282, 62, 562, 931, 8, 198, 220, 220, 220, 1441, 2343, 224, 250, 79, 158, 224, 241, 1343, 2343, 224, 250, 79, 39611, 100, 532, 2343, 224, 250, 79, 158, 224, 241, 1635, 2343, 224, 250, 79, 39611, 100, 198, 437, 198, 198, 56, 1164, 82, 13, 15410, 608, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 83, 8, 796, 9780, 7, 44601, 13, 600, 11, 83, 8, 198, 56, 1164, 82, 13, 15410, 608, 7, 44601, 3712, 14662, 4264, 278, 1387, 11, 83, 16, 11, 83, 17, 8, 796, 9780, 7, 44601, 13, 600, 11, 83, 16, 11, 83, 17, 8, 198, 198, 2, 2163, 36541, 295, 351, 479, 86, 22046, 13, 220, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2414, 4524, 37187, 14, 4919, 12, 1462, 12, 26011, 12, 785, 1930, 578, 12, 8818, 12, 4480, 12, 2539, 4775, 12, 853, 2886, 198, 158, 233, 226, 7, 69, 11, 308, 8, 796, 357, 87, 986, 26, 479, 86, 23029, 3784, 69, 7, 70, 7, 87, 986, 26, 479, 86, 986, 4008, 198, 198, 2, 8522, 9213, 47217, 198, 9979, 569, 796, 11515, 62, 31605, 1505, 62, 3262, 198, 9979, 410, 796, 575, 1164, 82, 13, 15410, 608, 198, 9979, 317, 796, 1944, 62, 8367, 2343, 233, 226, 17541, 198, 9979, 257, 796, 1944, 62, 8367, 2343, 233, 226, 5506, 14834, 3546, 13857, 198, 9979, 257, 136, 230, 796, 1944, 62, 8367, 2343, 233, 226, 5506, 14834, 22229, 198, 9979, 350, 796, 8683, 62, 3262, 198, 9979, 18074, 231, 796, 37615, 198, 198, 437, 1303, 8265, 198 ]
2.724505
6,207
include("orderbook.jl") include("blotter.jl") include("trades.jl") include("portfolio.jl") include("account.jl") include("utilities.jl")
[ 17256, 7203, 2875, 2070, 13, 20362, 4943, 198, 17256, 7203, 2436, 313, 353, 13, 20362, 4943, 198, 17256, 7203, 2213, 2367, 13, 20362, 4943, 198, 17256, 7203, 634, 13652, 13, 20362, 4943, 198, 17256, 7203, 23317, 13, 20362, 4943, 198, 17256, 7203, 315, 2410, 13, 20362, 4943, 198 ]
2.854167
48
using StanSample, DataFrames model = " data { int<lower=0> N; int<lower=0,upper=1> y[N]; } parameters { real<lower=0,upper=1> theta; } model { theta ~ beta(1,1); y ~ bernoulli(theta); } "; sm = SampleModel("bernoulli", model); data = Dict("N" => 10, "y" => [0, 1, 0, 1, 0, 0, 0, 0, 0, 1]); rc = stan_sample(sm; num_chains=4, data); if success(rc) df = read_samples(sm, :dataframe); df |> display end
[ 3500, 7299, 36674, 11, 6060, 35439, 198, 198, 19849, 796, 366, 198, 7890, 1391, 220, 198, 220, 493, 27, 21037, 28, 15, 29, 399, 26, 220, 198, 220, 493, 27, 21037, 28, 15, 11, 45828, 28, 16, 29, 331, 58, 45, 11208, 198, 92, 220, 198, 17143, 7307, 1391, 198, 220, 1103, 27, 21037, 28, 15, 11, 45828, 28, 16, 29, 262, 8326, 26, 198, 92, 220, 198, 19849, 1391, 198, 220, 262, 8326, 5299, 12159, 7, 16, 11, 16, 1776, 198, 220, 220, 220, 331, 5299, 275, 1142, 280, 15516, 7, 1169, 8326, 1776, 198, 92, 198, 8172, 198, 198, 5796, 796, 27565, 17633, 7203, 33900, 280, 15516, 1600, 2746, 1776, 198, 198, 7890, 796, 360, 713, 7203, 45, 1, 5218, 838, 11, 366, 88, 1, 5218, 685, 15, 11, 352, 11, 657, 11, 352, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 11, 352, 36563, 198, 198, 6015, 796, 336, 272, 62, 39873, 7, 5796, 26, 997, 62, 38861, 28, 19, 11, 1366, 1776, 198, 198, 361, 1943, 7, 6015, 8, 198, 220, 47764, 796, 1100, 62, 82, 12629, 7, 5796, 11, 1058, 7890, 14535, 1776, 198, 220, 47764, 930, 29, 3359, 198, 437, 198 ]
2.135678
199
###Define functions to be used in testing below ###Test functions for TargetModel function targetsin!(r::Vector,t::AbstractVector,paras::Vector) for i=1:length(t) r[i] = sin(paras[1]*t[i]) end r end targetsin(t::AbstractVector,paras::Vector) = targetsin!(zeros(eltype(t),length(t)),t,paras) ###Test function for ODEModel function odesin(t,y,ydot,paras) ydot[1] = paras[1]*cos(paras[1]*t) end ######################################################################################################### ### Test model creation and evaluation functions timepoints1 = linspace(0.0,10.0,100) parameters1 = parameters([:a],[1.0],[5.0],[3.0]) measurements1 = data(:function,timepoints1,targetsin,timepoints1,[3.0]) measurements2 = data(:function,timepoints1,targetsin,timepoints1,[2.5]) measurements3 = data(:function,timepoints1,targetsin,timepoints1,[2.0]) noisemodel1 = noise(:gaussian,[0.01]) initial1 = [0.0] model1 = model(:target,parameters1,measurements1,noisemodel1,targetsin;name="Test") model2 = model(:target!,parameters1,measurements1,noisemodel1,targetsin!;name="Test!") model3 = model(:ode,parameters1,measurements1,noisemodel1,odesin,initial1,1,[1];name="Test") @test_approx_eq_eps evaluate!(model1,[3.0]) measurements(model1) 1e-4 @test_approx_eq_eps evaluate!(model2,[3.0]) measurements(model2) 1e-4 @test_approx_eq_eps evaluate!(model3,[3.0]) measurements(model3) 1e-4 ######################################################################################################### ### Test the common initialize! function s0 = samples(:base,1,1,Float64,Float64) @test initialize!(trait(:initialize,:default),model1,s0).values == [3.0] @test (srand(345) ; initialize!(trait(:initialize,:prior),model1,s0).values) == (srand(345) ; [rand(parameters1[1].prior)]) ### Test the common interface functions type TestModel <: AbstractModel parameters::Vector end @test numparas(TestModel(parameters1)) == 1 @test parameters(TestModel(parameters1)) == parameters1 @test_throws MethodError evaluate!(TestModel(parameters1),[1.0]) @test_throws MethodError dataindex(TestModel(parameters1)) @test_throws MethodError measurements(TestModel(parameters1)) @test_throws MethodError noisemodel(TestModel(parameters1)) ######################################################################################################## ### Test the geometry calculations r1 = copy(evaluate!(model1,[3.0])) r2 = copy(evaluate!(model2,[2.5])) r3 = copy(evaluate!(model3,[2.0])) @test_approx_eq loglikelihood(model1,r1) loglikelihood(noisemodel1,datavalues(measurements1),r1) @test_approx_eq loglikelihood(model2,r2) loglikelihood(noisemodel1,datavalues(measurements1),r2) @test_approx_eq loglikelihood(model3,r3) loglikelihood(noisemodel1,datavalues(measurements1),r3) ### Test the geometry function for zero-order samples for m in [model1,model2,model3] s = samples(:base,1,3,Float64,Float64) copy!(s.values,[3.0,2.0,0.0]) geometry!(m,s) ll = [loglikelihood(m,evaluate!(m,[3.0])) loglikelihood(m,evaluate!(m,[2.0])) -Inf] @test_approx_eq s.logprior logprior(parameters1,s.values,Float64) @test_approx_eq s.loglikelihood ll end ###test the show functions println() println("====================") println("Test show() function") println("====================") show(model1) show(model2) show(model3) println("====================") println("End show() function") println("====================") println()
[ 21017, 7469, 500, 5499, 284, 307, 973, 287, 4856, 2174, 198, 198, 21017, 14402, 5499, 329, 12744, 17633, 198, 8818, 6670, 259, 0, 7, 81, 3712, 38469, 11, 83, 3712, 23839, 38469, 11, 1845, 292, 3712, 38469, 8, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 13664, 7, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 58, 72, 60, 796, 7813, 7, 1845, 292, 58, 16, 60, 9, 83, 58, 72, 12962, 198, 220, 220, 220, 886, 198, 220, 220, 220, 374, 198, 437, 198, 198, 83, 853, 1039, 259, 7, 83, 3712, 23839, 38469, 11, 1845, 292, 3712, 38469, 8, 796, 6670, 259, 0, 7, 9107, 418, 7, 417, 4906, 7, 83, 828, 13664, 7, 83, 36911, 83, 11, 1845, 292, 8, 198, 198, 21017, 14402, 2163, 329, 31245, 3620, 375, 417, 198, 8818, 267, 8906, 259, 7, 83, 11, 88, 11, 5173, 313, 11, 1845, 292, 8, 198, 220, 220, 220, 331, 26518, 58, 16, 60, 796, 17850, 58, 16, 60, 9, 6966, 7, 1845, 292, 58, 16, 60, 9, 83, 8, 198, 437, 198, 198, 29113, 29113, 29113, 7804, 2, 198, 198, 21017, 6208, 2746, 6282, 290, 12660, 5499, 198, 198, 2435, 13033, 16, 796, 300, 1040, 10223, 7, 15, 13, 15, 11, 940, 13, 15, 11, 3064, 8, 198, 17143, 7307, 16, 796, 10007, 26933, 25, 64, 38430, 16, 13, 15, 38430, 20, 13, 15, 38430, 18, 13, 15, 12962, 198, 1326, 5015, 902, 16, 796, 1366, 7, 25, 8818, 11, 2435, 13033, 16, 11, 83, 853, 1039, 259, 11, 2435, 13033, 16, 17414, 18, 13, 15, 12962, 198, 1326, 5015, 902, 17, 796, 1366, 7, 25, 8818, 11, 2435, 13033, 16, 11, 83, 853, 1039, 259, 11, 2435, 13033, 16, 17414, 17, 13, 20, 12962, 198, 1326, 5015, 902, 18, 796, 1366, 7, 25, 8818, 11, 2435, 13033, 16, 11, 83, 853, 1039, 259, 11, 2435, 13033, 16, 17414, 17, 13, 15, 12962, 198, 3919, 271, 368, 375, 417, 16, 796, 7838, 7, 25, 4908, 31562, 17414, 15, 13, 486, 12962, 198, 36733, 16, 796, 685, 15, 13, 15, 60, 198, 198, 19849, 16, 796, 2746, 7, 25, 16793, 11, 17143, 7307, 16, 11, 1326, 5015, 902, 16, 11, 3919, 271, 368, 375, 417, 16, 11, 83, 853, 1039, 259, 26, 3672, 2625, 14402, 4943, 198, 19849, 17, 796, 2746, 7, 25, 16793, 28265, 17143, 7307, 16, 11, 1326, 5015, 902, 16, 11, 3919, 271, 368, 375, 417, 16, 11, 83, 853, 1039, 259, 0, 26, 3672, 2625, 14402, 2474, 8, 198, 19849, 18, 796, 2746, 7, 25, 1098, 11, 17143, 7307, 16, 11, 1326, 5015, 902, 16, 11, 3919, 271, 368, 375, 417, 16, 11, 4147, 259, 11, 36733, 16, 11, 16, 17414, 16, 11208, 3672, 2625, 14402, 4943, 198, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 13446, 0, 7, 19849, 16, 17414, 18, 13, 15, 12962, 13871, 7, 19849, 16, 8, 352, 68, 12, 19, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 13446, 0, 7, 19849, 17, 17414, 18, 13, 15, 12962, 13871, 7, 19849, 17, 8, 352, 68, 12, 19, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 62, 25386, 13446, 0, 7, 19849, 18, 17414, 18, 13, 15, 12962, 13871, 7, 19849, 18, 8, 352, 68, 12, 19, 198, 198, 29113, 29113, 29113, 7804, 2, 198, 198, 21017, 6208, 262, 2219, 41216, 0, 2163, 198, 82, 15, 796, 8405, 7, 25, 8692, 11, 16, 11, 16, 11, 43879, 2414, 11, 43879, 2414, 8, 198, 31, 9288, 41216, 0, 7, 9535, 270, 7, 25, 36733, 1096, 11, 25, 12286, 828, 19849, 16, 11, 82, 15, 737, 27160, 6624, 685, 18, 13, 15, 60, 198, 31, 9288, 357, 82, 25192, 7, 27712, 8, 2162, 41216, 0, 7, 9535, 270, 7, 25, 36733, 1096, 11, 25, 3448, 273, 828, 19849, 16, 11, 82, 15, 737, 27160, 8, 6624, 357, 82, 25192, 7, 27712, 8, 2162, 685, 25192, 7, 17143, 7307, 16, 58, 16, 4083, 3448, 273, 8, 12962, 198, 198, 21017, 6208, 262, 2219, 7071, 5499, 198, 4906, 6208, 17633, 1279, 25, 27741, 17633, 198, 220, 220, 220, 10007, 3712, 38469, 198, 437, 198, 198, 31, 9288, 299, 931, 283, 292, 7, 14402, 17633, 7, 17143, 7307, 16, 4008, 6624, 352, 198, 31, 9288, 10007, 7, 14402, 17633, 7, 17143, 7307, 16, 4008, 6624, 10007, 16, 198, 198, 31, 9288, 62, 400, 8516, 11789, 12331, 13446, 0, 7, 14402, 17633, 7, 17143, 7307, 16, 828, 58, 16, 13, 15, 12962, 198, 31, 9288, 62, 400, 8516, 11789, 12331, 4818, 391, 67, 1069, 7, 14402, 17633, 7, 17143, 7307, 16, 4008, 198, 31, 9288, 62, 400, 8516, 11789, 12331, 13871, 7, 14402, 17633, 7, 17143, 7307, 16, 4008, 198, 31, 9288, 62, 400, 8516, 11789, 12331, 645, 271, 368, 375, 417, 7, 14402, 17633, 7, 17143, 7307, 16, 4008, 198, 198, 29113, 29113, 29113, 7804, 198, 198, 21017, 6208, 262, 22939, 16765, 198, 81, 16, 796, 4866, 7, 49786, 0, 7, 19849, 16, 17414, 18, 13, 15, 60, 4008, 198, 81, 17, 796, 4866, 7, 49786, 0, 7, 19849, 17, 17414, 17, 13, 20, 60, 4008, 198, 81, 18, 796, 4866, 7, 49786, 0, 7, 19849, 18, 17414, 17, 13, 15, 60, 4008, 198, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 2604, 2339, 11935, 7, 19849, 16, 11, 81, 16, 8, 2604, 2339, 11935, 7, 3919, 271, 368, 375, 417, 16, 11, 19608, 9226, 947, 7, 1326, 5015, 902, 16, 828, 81, 16, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 2604, 2339, 11935, 7, 19849, 17, 11, 81, 17, 8, 2604, 2339, 11935, 7, 3919, 271, 368, 375, 417, 16, 11, 19608, 9226, 947, 7, 1326, 5015, 902, 16, 828, 81, 17, 8, 198, 31, 9288, 62, 1324, 13907, 62, 27363, 2604, 2339, 11935, 7, 19849, 18, 11, 81, 18, 8, 2604, 2339, 11935, 7, 3919, 271, 368, 375, 417, 16, 11, 19608, 9226, 947, 7, 1326, 5015, 902, 16, 828, 81, 18, 8, 198, 198, 21017, 6208, 262, 22939, 2163, 329, 6632, 12, 2875, 8405, 198, 1640, 285, 287, 685, 19849, 16, 11, 19849, 17, 11, 19849, 18, 60, 198, 220, 220, 220, 264, 796, 8405, 7, 25, 8692, 11, 16, 11, 18, 11, 43879, 2414, 11, 43879, 2414, 8, 198, 220, 220, 220, 4866, 0, 7, 82, 13, 27160, 17414, 18, 13, 15, 11, 17, 13, 15, 11, 15, 13, 15, 12962, 198, 220, 220, 220, 22939, 0, 7, 76, 11, 82, 8, 198, 220, 220, 220, 32660, 796, 685, 6404, 2339, 11935, 7, 76, 11, 49786, 0, 7, 76, 17414, 18, 13, 15, 60, 4008, 2604, 2339, 11935, 7, 76, 11, 49786, 0, 7, 76, 17414, 17, 13, 15, 60, 4008, 532, 18943, 60, 198, 220, 220, 220, 2488, 9288, 62, 1324, 13907, 62, 27363, 264, 13, 6404, 3448, 273, 2604, 3448, 273, 7, 17143, 7307, 16, 11, 82, 13, 27160, 11, 43879, 2414, 8, 198, 220, 220, 220, 2488, 9288, 62, 1324, 13907, 62, 27363, 264, 13, 6404, 2339, 11935, 32660, 198, 437, 198, 198, 21017, 9288, 262, 905, 5499, 198, 35235, 3419, 198, 35235, 7203, 4770, 1421, 4943, 198, 35235, 7203, 14402, 905, 3419, 2163, 4943, 198, 35235, 7203, 4770, 1421, 4943, 198, 12860, 7, 19849, 16, 8, 198, 12860, 7, 19849, 17, 8, 198, 12860, 7, 19849, 18, 8, 198, 35235, 7203, 4770, 1421, 4943, 198, 35235, 7203, 12915, 220, 905, 3419, 2163, 4943, 198, 35235, 7203, 4770, 1421, 4943, 198, 35235, 3419, 628, 628, 628, 628, 628, 628, 628, 628, 628 ]
2.779294
1,246
using Plots @testset "plotting" begin @testset "plotsdf" begin @test_throws ArgumentError plotsdf(1.0) @test_throws ArgumentError plotsdf(OU,1:2) @test_throws ArgumentError plotsdf(1.0,1:2) @test_throws ArgumentError plotsdf(OU(1.0,1.0),1) @test_throws ArgumentError plotsdf(OU(1.0,1.0),1:2,1) end @testset "plotasdf" begin @test_throws ArgumentError plotasdf(1.0) @test_throws ArgumentError plotasdf(OU,1:2,1) @test_throws ArgumentError plotasdf(OU(1.0,1.0),1:2) @test_throws ArgumentError plotasdf(OU(1.0,1.0),1:2,-1) @test_throws ArgumentError plotasdf(OU(1.0,1.0),1:2,-1,1) end @testset "plotacv" begin @test_throws ArgumentError plotacv(1.0) @test_throws ArgumentError plotacv(OU,1:2) @test_throws ArgumentError plotacv(OUUnknown{1}(1.0,1.0),1:2) @test_throws ArgumentError plotacv(OU,10,1) @test_throws ArgumentError plotacv(OU(1.0,1.0),1:2,1) @test_throws ArgumentError plotacv(OU(1.0,1.0),10,-1) @test_throws ArgumentError plotacv(OU(1.0,1.0),-10,1) @test_throws ArgumentError plotacv(OU(1.0,1.0),10,1im) @test_throws ArgumentError plotacv(OU(1.0,1.0),10,1,1) end @testset "plotei" begin @test_throws ArgumentError plotei(1.0) @test_throws ArgumentError plotei(OU,10,1) @test_throws ArgumentError plotei(OU(1.0,1.0),10) @test_throws ArgumentError plotei(OU(1.0,1.0),1:2,1) @test_throws ArgumentError plotei(OU(1.0,1.0),10,-1) @test_throws ArgumentError plotei(OU(1.0,1.0),-10,1) @test_throws ArgumentError plotei(OU(1.0,1.0),10,1im) @test_throws ArgumentError plotei(OU(1.0,1.0),10,1,1) end end
[ 3500, 1345, 1747, 198, 31, 9288, 2617, 366, 29487, 889, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 489, 1747, 7568, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 21528, 7568, 7, 16, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 21528, 7568, 7, 2606, 11, 16, 25, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 21528, 7568, 7, 16, 13, 15, 11, 16, 25, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 21528, 7568, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 21528, 7568, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 11, 16, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 29487, 292, 7568, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 292, 7568, 7, 16, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 292, 7568, 7, 2606, 11, 16, 25, 17, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 292, 7568, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 292, 7568, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 12095, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 292, 7568, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 12095, 16, 11, 16, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 29487, 330, 85, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 16, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 11, 16, 25, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 20035, 90, 16, 92, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 11, 940, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 12095, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 12, 940, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 11, 16, 320, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 7110, 330, 85, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 11, 16, 11, 16, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 489, 1258, 72, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 16, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 11, 940, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 16, 25, 17, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 12095, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 12, 940, 11, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 11, 16, 320, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 458, 1258, 72, 7, 2606, 7, 16, 13, 15, 11, 16, 13, 15, 828, 940, 11, 16, 11, 16, 8, 198, 220, 220, 220, 886, 198, 437 ]
1.927313
908
# Visualization function plot_state_city(state) qiskit.visualization.plot_state_city(state) end function plot_histogram(data) qiskit.visualization.plot_histogram(data) end
[ 2, 15612, 1634, 198, 198, 8818, 7110, 62, 5219, 62, 19205, 7, 5219, 8, 198, 220, 220, 220, 10662, 1984, 270, 13, 41464, 1634, 13, 29487, 62, 5219, 62, 19205, 7, 5219, 8, 198, 437, 198, 198, 8818, 7110, 62, 10034, 21857, 7, 7890, 8, 198, 220, 220, 220, 10662, 1984, 270, 13, 41464, 1634, 13, 29487, 62, 10034, 21857, 7, 7890, 8, 198, 437, 198 ]
2.757576
66
# AbstractBandedMatrix must implement # A BlockBandedMatrix is a BlockMatrix, but is not a BandedMatrix abstract type AbstractBlockBandedMatrix{T} <: AbstractBlockMatrix{T} end """ blockbandwidths(A) Returns a tuple containing the upper and lower blockbandwidth of `A`. """ blockbandwidths(A::AbstractMatrix) = (nblocks(A,1)-1 , nblocks(A,2)-1) """ blockbandwidth(A,i) Returns the lower blockbandwidth (`i==1`) or the upper blockbandwidth (`i==2`). """ blockbandwidth(A::AbstractMatrix, k::Integer) = blockbandwidths(A)[k] """ bandrange(A) Returns the range `-blockbandwidth(A,1):blockbandwidth(A,2)`. """ blockbandrange(A::AbstractMatrix) = -blockbandwidth(A,1):blockbandwidth(A,2) # start/stop indices of the i-th column/row, bounded by actual matrix size @inline blockcolstart(A::AbstractVecOrMat, i::Integer) = Block(max(i-colblockbandwidth(A,2)[i], 1)) @inline blockcolstop(A::AbstractVecOrMat, i::Integer) = Block(max(min(i+colblockbandwidth(A,1)[i], nblocks(A, 1)), 0)) @inline blockrowstart(A::AbstractVecOrMat, i::Integer) = Block(max(i-rowblockbandwidth(A,1)[i], 1)) @inline blockrowstop(A::AbstractVecOrMat, i::Integer) = Block(max(min(i+rowblockbandwidth(A,2)[i], nblocks(A, 2)), 0)) for Func in (:blockcolstart, :blockcolstop, :blockrowstart, :blockrowstop) @eval $Func(A, i::Block{1}) = $Func(A, Int(i)) end @inline blockcolrange(A::AbstractVecOrMat, i) = blockcolstart(A,i):blockcolstop(A,i) @inline blockrowrange(A::AbstractVecOrMat, i) = blockrowstart(A,i):blockrowstop(A,i) # length of i-the column/row @inline blockcollength(A::AbstractVecOrMat, i) = max(Int(blockcolstop(A, i)) - Int(blockcolstart(A, i)) + 1, 0) @inline blockrowlength(A::AbstractVecOrMat, i) = max(Int(blockrowstop(A, i)) - Int(blockrowstart(A, i)) + 1, 0) # this gives the block bandwidth in each block column/row @inline colblockbandwidths(A::AbstractMatrix) = Fill.(blockbandwidths(A), nblocks(A,2)) @inline rowblockbandwidths(A::AbstractMatrix) = Fill.(blockbandwidths(A), nblocks(A,1)) @inline colblockbandwidth(bs, i::Int) = colblockbandwidths(bs)[i] @inline rowblockbandwidth(bs, i::Int) = rowblockbandwidths(bs)[i] """ isblockbanded(A) returns true if a matrix implements the block banded interface. """ isblockbanded(::AbstractBlockBandedMatrix) = true isblockbanded(_) = false # override bandwidth(A,k) for each AbstractBandedMatrix # override inbands_getindex(A,k,j) # return id of first empty diagonal intersected along row k function _firstblockdiagrow(A::AbstractMatrix, k::Int) a, b = blockrowstart(A, k), blockrowstop(A, k) c = a == 1 ? b+1 : a-1 c-k end # return id of first empty diagonal intersected along column j function _firstblockdiagcol(A::AbstractMatrix, j::Int) a, b = blockcolstart(A, j), blockcolstop(A, j) r = a == 1 ? b+1 : a-1 j-r end ## BlockSlice1 is a conveneience for views const BlockSlice1 = BlockSlice{Block{1,Int}} ###################################### # RaggedMatrix interface ###################################### @inline function colstart(A::AbstractBlockBandedMatrix, i::Integer) bs = A.block_sizes.block_sizes bs.cumul_sizes[1][Int(blockcolstart(A, _find_block(bs, 2, i)[1]))] end @inline function colstop(A::AbstractBlockBandedMatrix, i::Integer) bs = A.block_sizes.block_sizes bs.cumul_sizes[1][Int(blockcolstop(A, _find_block(bs, 2, i)[1]))+1]-1 end @inline function rowstart(A::AbstractBlockBandedMatrix, i::Integer) bs = A.block_sizes.block_sizes bs.cumul_sizes[2][Int(blockrowstart(A, _find_block(bs, 1, i)[1]))] end @inline function rowstop(A::AbstractBlockBandedMatrix, i::Integer) bs = A.block_sizes.block_sizes bs.cumul_sizes[2][Int(blockrowstop(A, _find_block(bs, 1, i)[1]))+1]-1 end # default implementation loops over all indices, including zeros function fill!(A::AbstractBlockBandedMatrix, val::Any) iszero(val) || throw(BandError(A)) fill!(A.data, val) A end
[ 2, 27741, 33, 12249, 46912, 1276, 3494, 198, 198, 2, 317, 9726, 33, 12249, 46912, 318, 257, 9726, 46912, 11, 475, 318, 407, 257, 10243, 276, 46912, 198, 397, 8709, 2099, 27741, 12235, 33, 12249, 46912, 90, 51, 92, 1279, 25, 27741, 12235, 46912, 90, 51, 92, 886, 628, 198, 37811, 198, 220, 220, 220, 2512, 3903, 10394, 82, 7, 32, 8, 198, 198, 35561, 257, 46545, 7268, 262, 6727, 290, 2793, 2512, 3903, 10394, 286, 4600, 32, 44646, 198, 37811, 198, 9967, 3903, 10394, 82, 7, 32, 3712, 23839, 46912, 8, 796, 357, 77, 27372, 7, 32, 11, 16, 13219, 16, 837, 299, 27372, 7, 32, 11, 17, 13219, 16, 8, 198, 198, 37811, 198, 220, 220, 220, 2512, 3903, 10394, 7, 32, 11, 72, 8, 198, 198, 35561, 262, 2793, 2512, 3903, 10394, 357, 63, 72, 855, 16, 63, 8, 393, 262, 6727, 2512, 3903, 10394, 357, 63, 72, 855, 17, 63, 737, 198, 37811, 198, 9967, 3903, 10394, 7, 32, 3712, 23839, 46912, 11, 479, 3712, 46541, 8, 796, 2512, 3903, 10394, 82, 7, 32, 38381, 74, 60, 198, 198, 37811, 198, 220, 220, 220, 4097, 9521, 7, 32, 8, 198, 198, 35561, 262, 2837, 4600, 12, 9967, 3903, 10394, 7, 32, 11, 16, 2599, 9967, 3903, 10394, 7, 32, 11, 17, 8, 44646, 198, 37811, 198, 9967, 3903, 9521, 7, 32, 3712, 23839, 46912, 8, 796, 532, 9967, 3903, 10394, 7, 32, 11, 16, 2599, 9967, 3903, 10394, 7, 32, 11, 17, 8, 628, 198, 198, 2, 923, 14, 11338, 36525, 286, 262, 1312, 12, 400, 5721, 14, 808, 11, 49948, 416, 4036, 17593, 2546, 198, 31, 45145, 2512, 4033, 9688, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 3712, 46541, 8, 796, 9726, 7, 9806, 7, 72, 12, 4033, 9967, 3903, 10394, 7, 32, 11, 17, 38381, 72, 4357, 352, 4008, 198, 31, 45145, 220, 2512, 4033, 11338, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 3712, 46541, 8, 796, 9726, 7, 9806, 7, 1084, 7, 72, 10, 4033, 9967, 3903, 10394, 7, 32, 11, 16, 38381, 72, 4357, 299, 27372, 7, 32, 11, 352, 36911, 657, 4008, 198, 31, 45145, 2512, 808, 9688, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 3712, 46541, 8, 796, 9726, 7, 9806, 7, 72, 12, 808, 9967, 3903, 10394, 7, 32, 11, 16, 38381, 72, 4357, 352, 4008, 198, 31, 45145, 220, 2512, 808, 11338, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 3712, 46541, 8, 796, 9726, 7, 9806, 7, 1084, 7, 72, 10, 808, 9967, 3903, 10394, 7, 32, 11, 17, 38381, 72, 4357, 299, 27372, 7, 32, 11, 362, 36911, 657, 4008, 198, 198, 1640, 11138, 66, 287, 357, 25, 9967, 4033, 9688, 11, 1058, 9967, 4033, 11338, 11, 1058, 9967, 808, 9688, 11, 1058, 9967, 808, 11338, 8, 198, 220, 220, 220, 2488, 18206, 720, 37, 19524, 7, 32, 11, 1312, 3712, 12235, 90, 16, 30072, 796, 720, 37, 19524, 7, 32, 11, 2558, 7, 72, 4008, 198, 437, 198, 198, 31, 45145, 2512, 4033, 9521, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 8, 796, 2512, 4033, 9688, 7, 32, 11, 72, 2599, 9967, 4033, 11338, 7, 32, 11, 72, 8, 198, 31, 45145, 2512, 808, 9521, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 8, 796, 2512, 808, 9688, 7, 32, 11, 72, 2599, 9967, 808, 11338, 7, 32, 11, 72, 8, 628, 198, 2, 4129, 286, 1312, 12, 1169, 5721, 14, 808, 198, 31, 45145, 2512, 26000, 3286, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 8, 796, 3509, 7, 5317, 7, 9967, 4033, 11338, 7, 32, 11, 1312, 4008, 532, 2558, 7, 9967, 4033, 9688, 7, 32, 11, 1312, 4008, 1343, 352, 11, 657, 8, 198, 31, 45145, 2512, 808, 13664, 7, 32, 3712, 23839, 53, 721, 5574, 19044, 11, 1312, 8, 796, 3509, 7, 5317, 7, 9967, 808, 11338, 7, 32, 11, 1312, 4008, 532, 2558, 7, 9967, 808, 9688, 7, 32, 11, 1312, 4008, 1343, 352, 11, 657, 8, 198, 198, 2, 428, 3607, 262, 2512, 19484, 287, 1123, 2512, 5721, 14, 808, 198, 31, 45145, 951, 9967, 3903, 10394, 82, 7, 32, 3712, 23839, 46912, 8, 796, 27845, 12195, 9967, 3903, 10394, 82, 7, 32, 828, 299, 27372, 7, 32, 11, 17, 4008, 198, 31, 45145, 5752, 9967, 3903, 10394, 82, 7, 32, 3712, 23839, 46912, 8, 796, 27845, 12195, 9967, 3903, 10394, 82, 7, 32, 828, 299, 27372, 7, 32, 11, 16, 4008, 198, 198, 31, 45145, 951, 9967, 3903, 10394, 7, 1443, 11, 1312, 3712, 5317, 8, 796, 951, 9967, 3903, 10394, 82, 7, 1443, 38381, 72, 60, 198, 31, 45145, 5752, 9967, 3903, 10394, 7, 1443, 11, 1312, 3712, 5317, 8, 796, 5752, 9967, 3903, 10394, 82, 7, 1443, 38381, 72, 60, 198, 198, 37811, 198, 220, 220, 220, 318, 9967, 3903, 276, 7, 32, 8, 198, 198, 7783, 82, 2081, 611, 257, 17593, 23986, 262, 2512, 4097, 276, 7071, 13, 198, 37811, 198, 271, 9967, 3903, 276, 7, 3712, 23839, 12235, 33, 12249, 46912, 8, 796, 2081, 198, 271, 9967, 3903, 276, 28264, 8, 796, 3991, 198, 198, 2, 20957, 19484, 7, 32, 11, 74, 8, 329, 1123, 27741, 33, 12249, 46912, 198, 2, 20957, 287, 21397, 62, 1136, 9630, 7, 32, 11, 74, 11, 73, 8, 628, 198, 2, 1441, 4686, 286, 717, 6565, 40039, 36177, 276, 1863, 5752, 479, 198, 8818, 4808, 11085, 9967, 10989, 363, 808, 7, 32, 3712, 23839, 46912, 11, 479, 3712, 5317, 8, 198, 220, 220, 220, 257, 11, 275, 796, 2512, 808, 9688, 7, 32, 11, 479, 828, 2512, 808, 11338, 7, 32, 11, 479, 8, 198, 220, 220, 220, 269, 796, 257, 6624, 352, 5633, 275, 10, 16, 1058, 257, 12, 16, 198, 220, 220, 220, 269, 12, 74, 198, 437, 198, 198, 2, 1441, 4686, 286, 717, 6565, 40039, 36177, 276, 1863, 5721, 474, 198, 8818, 4808, 11085, 9967, 10989, 363, 4033, 7, 32, 3712, 23839, 46912, 11, 474, 3712, 5317, 8, 198, 220, 220, 220, 257, 11, 275, 796, 2512, 4033, 9688, 7, 32, 11, 474, 828, 2512, 4033, 11338, 7, 32, 11, 474, 8, 198, 220, 220, 220, 374, 796, 257, 6624, 352, 5633, 275, 10, 16, 1058, 257, 12, 16, 198, 220, 220, 220, 474, 12, 81, 198, 437, 628, 198, 2235, 9726, 11122, 501, 16, 318, 257, 7292, 68, 1240, 329, 5009, 198, 198, 9979, 9726, 11122, 501, 16, 796, 9726, 11122, 501, 90, 12235, 90, 16, 11, 5317, 11709, 628, 198, 29113, 4242, 2235, 198, 2, 220, 371, 14655, 46912, 7071, 198, 29113, 4242, 2235, 628, 198, 198, 31, 45145, 2163, 951, 9688, 7, 32, 3712, 23839, 12235, 33, 12249, 46912, 11, 1312, 3712, 46541, 8, 198, 220, 220, 220, 275, 82, 796, 317, 13, 9967, 62, 82, 4340, 13, 9967, 62, 82, 4340, 198, 220, 220, 220, 275, 82, 13, 36340, 377, 62, 82, 4340, 58, 16, 7131, 5317, 7, 9967, 4033, 9688, 7, 32, 11, 4808, 19796, 62, 9967, 7, 1443, 11, 362, 11, 1312, 38381, 16, 60, 4008, 60, 198, 437, 198, 31, 45145, 2163, 951, 11338, 7, 32, 3712, 23839, 12235, 33, 12249, 46912, 11, 1312, 3712, 46541, 8, 198, 220, 220, 220, 275, 82, 796, 317, 13, 9967, 62, 82, 4340, 13, 9967, 62, 82, 4340, 198, 220, 220, 220, 275, 82, 13, 36340, 377, 62, 82, 4340, 58, 16, 7131, 5317, 7, 9967, 4033, 11338, 7, 32, 11, 4808, 19796, 62, 9967, 7, 1443, 11, 362, 11, 1312, 38381, 16, 60, 4008, 10, 16, 45297, 16, 198, 437, 198, 31, 45145, 2163, 5752, 9688, 7, 32, 3712, 23839, 12235, 33, 12249, 46912, 11, 1312, 3712, 46541, 8, 198, 220, 220, 220, 275, 82, 796, 317, 13, 9967, 62, 82, 4340, 13, 9967, 62, 82, 4340, 198, 220, 220, 220, 275, 82, 13, 36340, 377, 62, 82, 4340, 58, 17, 7131, 5317, 7, 9967, 808, 9688, 7, 32, 11, 4808, 19796, 62, 9967, 7, 1443, 11, 352, 11, 1312, 38381, 16, 60, 4008, 60, 198, 437, 198, 31, 45145, 2163, 5752, 11338, 7, 32, 3712, 23839, 12235, 33, 12249, 46912, 11, 1312, 3712, 46541, 8, 198, 220, 220, 220, 275, 82, 796, 317, 13, 9967, 62, 82, 4340, 13, 9967, 62, 82, 4340, 198, 220, 220, 220, 275, 82, 13, 36340, 377, 62, 82, 4340, 58, 17, 7131, 5317, 7, 9967, 808, 11338, 7, 32, 11, 4808, 19796, 62, 9967, 7, 1443, 11, 352, 11, 1312, 38381, 16, 60, 4008, 10, 16, 45297, 16, 198, 437, 198, 198, 2, 4277, 7822, 23607, 625, 477, 36525, 11, 1390, 1976, 27498, 198, 8818, 6070, 0, 7, 32, 3712, 23839, 12235, 33, 12249, 46912, 11, 1188, 3712, 7149, 8, 198, 220, 318, 22570, 7, 2100, 8, 8614, 3714, 7, 31407, 12331, 7, 32, 4008, 198, 220, 6070, 0, 7, 32, 13, 7890, 11, 1188, 8, 198, 220, 317, 198, 437, 198 ]
2.656969
1,478
function [D,J,JInv,X]=JacobiSphere(ksi,F,Grid) Rad=Grid.Rad; X1=Grid.Nodes(F.N(1)).P(1)... +(Grid.Nodes(F.N(2)).P(1)-Grid.Nodes(F.N(1)).P(1))*ksi(1)... +(Grid.Nodes(F.N(4)).P(1)-Grid.Nodes(F.N(1)).P(1))*ksi(2)... +(Grid.Nodes(F.N(3)).P(1)-Grid.Nodes(F.N(4)).P(1)-Grid.Nodes(F.N(2)).P(1)+Grid.Nodes(F.N(1)).P(1))*ksi(1)*ksi(2); X2=Grid.Nodes(F.N(1)).P(2)... +(Grid.Nodes(F.N(2)).P(2)-Grid.Nodes(F.N(1)).P(2))*ksi(1)... +(Grid.Nodes(F.N(4)).P(2)-Grid.Nodes(F.N(1)).P(2))*ksi(2)... +(Grid.Nodes(F.N(3)).P(2)-Grid.Nodes(F.N(4)).P(2)-Grid.Nodes(F.N(2)).P(2)+Grid.Nodes(F.N(1)).P(2))*ksi(1)*ksi(2); X3=Grid.Nodes(F.N(1)).P(3)... +(Grid.Nodes(F.N(2)).P(3)-Grid.Nodes(F.N(1)).P(3))*ksi(1)... +(Grid.Nodes(F.N(4)).P(3)-Grid.Nodes(F.N(1)).P(3))*ksi(2)... +(Grid.Nodes(F.N(3)).P(3)-Grid.Nodes(F.N(4)).P(3)-Grid.Nodes(F.N(2)).P(3)+Grid.Nodes(F.N(1)).P(3))*ksi(1)*ksi(2); f=Rad*(X1^2+X2^2+X3^2)^(-3/2); dx1dX1=f*(X2^2+X3^2); dx1dX2=-f*X1*X2; dx1dX3=-f*X1*X3; dx2dX1=dx1dX2; dx2dX2=f*(X1^2+X3^2); dx2dX3=-f*X2*X3; dx3dX1=dx1dX3; dx3dX2=dx2dX3; dx3dX3=f*(X1^2+X2^2); % dx1dX1=1; % dx1dX2=-0; % dx1dX3=0; % dx2dX1=0; % dx2dX2=1; % dx2dX3=0; % dx3dX1=0; % dx3dX2=0; % dx3dX3=1; dX1dksi1=(Grid.Nodes(F.N(2)).P(1)-Grid.Nodes(F.N(1)).P(1))... +(Grid.Nodes(F.N(3)).P(1)-Grid.Nodes(F.N(4)).P(1)... -Grid.Nodes(F.N(2)).P(1)+Grid.Nodes(F.N(1)).P(1))*ksi(2); dX1dksi2=(Grid.Nodes(F.N(4)).P(1)-Grid.Nodes(F.N(1)).P(1))... +(Grid.Nodes(F.N(3)).P(1)-Grid.Nodes(F.N(4)).P(1)... -Grid.Nodes(F.N(2)).P(1)+Grid.Nodes(F.N(1)).P(1))*ksi(1); dX2dksi1=(Grid.Nodes(F.N(2)).P(2)-Grid.Nodes(F.N(1)).P(2))... +(Grid.Nodes(F.N(3)).P(2)-Grid.Nodes(F.N(4)).P(2)... -Grid.Nodes(F.N(2)).P(2)+Grid.Nodes(F.N(1)).P(2))*ksi(2); dX2dksi2=(Grid.Nodes(F.N(4)).P(2)-Grid.Nodes(F.N(1)).P(2))... +(Grid.Nodes(F.N(3)).P(2)-Grid.Nodes(F.N(4)).P(2)... -Grid.Nodes(F.N(2)).P(2)+Grid.Nodes(F.N(1)).P(2))*ksi(1); dX3dksi1=(Grid.Nodes(F.N(2)).P(3)-Grid.Nodes(F.N(1)).P(3))... +(Grid.Nodes(F.N(3)).P(3)-Grid.Nodes(F.N(4)).P(3)... -Grid.Nodes(F.N(2)).P(3)+Grid.Nodes(F.N(1)).P(3))*ksi(2); dX3dksi2=(Grid.Nodes(F.N(4)).P(3)-Grid.Nodes(F.N(1)).P(3))... +(Grid.Nodes(F.N(3)).P(3)-Grid.Nodes(F.N(4)).P(3)... -Grid.Nodes(F.N(2)).P(3)+Grid.Nodes(F.N(1)).P(3))*ksi(1); J=zeros(3,2); J(1,1)=dx1dX1*dX1dksi1+dx1dX2*dX2dksi1+dx1dX3*dX3dksi1; J(2,1)=dx2dX1*dX1dksi1+dx2dX2*dX2dksi1+dx2dX3*dX3dksi1; J(3,1)=dx3dX1*dX1dksi1+dx3dX2*dX2dksi1+dx3dX3*dX3dksi1; J(1,2)=dx1dX1*dX1dksi2+dx1dX2*dX2dksi2+dx1dX3*dX3dksi2; J(2,2)=dx2dX1*dX1dksi2+dx2dX2*dX2dksi2+dx2dX3*dX3dksi2; J(3,2)=dx3dX1*dX1dksi2+dx3dX2*dX2dksi2+dx3dX3*dX3dksi2; D=norm(cross(J(:,1),J(:,2)),2); if nargout > 2 X=[X1 X2 X3]*(Rad/sqrt((X1^2+X2^2+X3^2))); X=[X1 X2 X3]; end JInv=inv(J'*J)*J'*sqrt(det(J'*J)); end
[ 8818, 685, 35, 11, 41, 11, 41, 19904, 11, 55, 22241, 28821, 13411, 38882, 7, 591, 72, 11, 37, 11, 41339, 8, 198, 15546, 28, 41339, 13, 15546, 26, 198, 55, 16, 28, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 9, 591, 72, 7, 16, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 9, 591, 72, 7, 17, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 16, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 9, 591, 72, 7, 16, 27493, 591, 72, 7, 17, 1776, 198, 55, 17, 28, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 9, 591, 72, 7, 16, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 9, 591, 72, 7, 17, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 17, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 9, 591, 72, 7, 16, 27493, 591, 72, 7, 17, 1776, 198, 55, 18, 28, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 9, 591, 72, 7, 16, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 9, 591, 72, 7, 17, 26513, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 18, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 9, 591, 72, 7, 16, 27493, 591, 72, 7, 17, 1776, 198, 69, 28, 15546, 9, 7, 55, 16, 61, 17, 10, 55, 17, 61, 17, 10, 55, 18, 61, 17, 8, 61, 32590, 18, 14, 17, 1776, 198, 198, 34350, 16, 67, 55, 16, 28, 69, 9, 7, 55, 17, 61, 17, 10, 55, 18, 61, 17, 1776, 198, 34350, 16, 67, 55, 17, 10779, 69, 9, 55, 16, 9, 55, 17, 26, 220, 198, 34350, 16, 67, 55, 18, 10779, 69, 9, 55, 16, 9, 55, 18, 26, 198, 34350, 17, 67, 55, 16, 28, 34350, 16, 67, 55, 17, 26, 220, 198, 34350, 17, 67, 55, 17, 28, 69, 9, 7, 55, 16, 61, 17, 10, 55, 18, 61, 17, 1776, 220, 198, 34350, 17, 67, 55, 18, 10779, 69, 9, 55, 17, 9, 55, 18, 26, 198, 34350, 18, 67, 55, 16, 28, 34350, 16, 67, 55, 18, 26, 220, 198, 34350, 18, 67, 55, 17, 28, 34350, 17, 67, 55, 18, 26, 220, 198, 34350, 18, 67, 55, 18, 28, 69, 9, 7, 55, 16, 61, 17, 10, 55, 17, 61, 17, 1776, 198, 198, 4, 44332, 16, 67, 55, 16, 28, 16, 26, 198, 4, 44332, 16, 67, 55, 17, 10779, 15, 26, 220, 198, 4, 44332, 16, 67, 55, 18, 28, 15, 26, 198, 4, 44332, 17, 67, 55, 16, 28, 15, 26, 220, 198, 4, 44332, 17, 67, 55, 17, 28, 16, 26, 220, 198, 4, 44332, 17, 67, 55, 18, 28, 15, 26, 198, 4, 44332, 18, 67, 55, 16, 28, 15, 26, 220, 198, 4, 44332, 18, 67, 55, 17, 28, 15, 26, 220, 198, 4, 44332, 18, 67, 55, 18, 28, 16, 26, 198, 198, 67, 55, 16, 67, 591, 72, 16, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 16, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 16, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 9, 591, 72, 7, 17, 1776, 198, 67, 55, 16, 67, 591, 72, 17, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 16, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 16, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 16, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 16, 4008, 9, 591, 72, 7, 16, 1776, 198, 67, 55, 17, 67, 591, 72, 16, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 17, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 17, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 9, 591, 72, 7, 17, 1776, 198, 67, 55, 17, 67, 591, 72, 17, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 17, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 17, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 17, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 17, 4008, 9, 591, 72, 7, 16, 1776, 198, 67, 55, 18, 67, 591, 72, 16, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 18, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 18, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 9, 591, 72, 7, 17, 1776, 198, 67, 55, 18, 67, 591, 72, 17, 16193, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 986, 198, 220, 1343, 7, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 18, 29720, 47, 7, 18, 13219, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 19, 29720, 47, 7, 18, 26513, 198, 220, 532, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 17, 29720, 47, 7, 18, 47762, 41339, 13, 45, 4147, 7, 37, 13, 45, 7, 16, 29720, 47, 7, 18, 4008, 9, 591, 72, 7, 16, 1776, 198, 198, 41, 28, 9107, 418, 7, 18, 11, 17, 1776, 198, 198, 41, 7, 16, 11, 16, 47505, 34350, 16, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 16, 10, 34350, 16, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 16, 10, 34350, 16, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 16, 26, 198, 41, 7, 17, 11, 16, 47505, 34350, 17, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 16, 10, 34350, 17, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 16, 10, 34350, 17, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 16, 26, 198, 41, 7, 18, 11, 16, 47505, 34350, 18, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 16, 10, 34350, 18, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 16, 10, 34350, 18, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 16, 26, 198, 41, 7, 16, 11, 17, 47505, 34350, 16, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 17, 10, 34350, 16, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 17, 10, 34350, 16, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 17, 26, 198, 41, 7, 17, 11, 17, 47505, 34350, 17, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 17, 10, 34350, 17, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 17, 10, 34350, 17, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 17, 26, 198, 41, 7, 18, 11, 17, 47505, 34350, 18, 67, 55, 16, 9, 67, 55, 16, 67, 591, 72, 17, 10, 34350, 18, 67, 55, 17, 9, 67, 55, 17, 67, 591, 72, 17, 10, 34350, 18, 67, 55, 18, 9, 67, 55, 18, 67, 591, 72, 17, 26, 198, 198, 35, 28, 27237, 7, 19692, 7, 41, 7, 45299, 16, 828, 41, 7, 45299, 17, 36911, 17, 1776, 198, 361, 299, 853, 448, 1875, 362, 198, 220, 1395, 41888, 55, 16, 1395, 17, 1395, 18, 60, 9, 7, 15546, 14, 31166, 17034, 19510, 55, 16, 61, 17, 10, 55, 17, 61, 17, 10, 55, 18, 61, 17, 4008, 1776, 220, 220, 1395, 41888, 55, 16, 1395, 17, 1395, 18, 11208, 198, 437, 198, 41, 19904, 28, 16340, 7, 41, 6, 9, 41, 27493, 41, 6, 9, 31166, 17034, 7, 15255, 7, 41, 6, 9, 41, 18125, 198, 437, 628 ]
1.444503
1,910
module JungleHelperSpiderBoss using ..Ahorn, Maple @mapdef Entity "JungleHelper/SpiderBoss" SpiderBoss(x::Integer, y::Integer, color::String="Blue", sprite::String="", webSprite::String="", flag::String="") const bossColors = String["Blue", "Purple", "Red"] const bossSprites = Dict{String, String}( "Blue" => "JungleHelper/SpiderBoss/spider_b_00", "Purple" => "JungleHelper/SpiderBoss/spider_p_00", "Red" => "JungleHelper/SpiderBoss/spider_r_00" ) const placements = Ahorn.PlacementDict( "Spider Boss ($(color)) (Jungle Helper)" => Ahorn.EntityPlacement( SpiderBoss, "point", Dict{String, Any}( "color" => color ) ) for color in bossColors ) Ahorn.editingOptions(entity::SpiderBoss) = Dict{String, Any}( "color" => bossColors ) function Ahorn.selection(entity::SpiderBoss) x, y = Ahorn.position(entity) return Ahorn.Rectangle(x - 9, y - 9, 17, 17) end function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::SpiderBoss, room::Maple.Room) color = get(entity.data, "color", "Blue") Ahorn.drawSprite(ctx, bossSprites[color], 0, 0) end end
[ 21412, 26411, 47429, 41294, 37310, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 31, 8899, 4299, 20885, 366, 41, 13687, 47429, 14, 41294, 37310, 1, 12648, 37310, 7, 87, 3712, 46541, 11, 331, 3712, 46541, 11, 3124, 3712, 10100, 2625, 14573, 1600, 33810, 3712, 10100, 2625, 1600, 3992, 38454, 578, 3712, 10100, 2625, 1600, 6056, 3712, 10100, 2625, 4943, 198, 198, 9979, 6478, 5216, 669, 796, 10903, 14692, 14573, 1600, 366, 30026, 1154, 1600, 366, 7738, 8973, 198, 198, 9979, 6478, 4561, 23156, 796, 360, 713, 90, 10100, 11, 10903, 92, 7, 198, 197, 1, 14573, 1, 5218, 366, 41, 13687, 47429, 14, 41294, 37310, 14, 2777, 1304, 62, 65, 62, 405, 1600, 198, 197, 1, 30026, 1154, 1, 5218, 366, 41, 13687, 47429, 14, 41294, 37310, 14, 2777, 1304, 62, 79, 62, 405, 1600, 198, 197, 1, 7738, 1, 5218, 366, 41, 13687, 47429, 14, 41294, 37310, 14, 2777, 1304, 62, 81, 62, 405, 1, 198, 8, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, 198, 197, 1, 41294, 15718, 7198, 7, 8043, 4008, 357, 41, 13687, 5053, 525, 16725, 5218, 7900, 1211, 13, 32398, 3646, 5592, 7, 198, 197, 197, 41294, 37310, 11, 198, 197, 197, 1, 4122, 1600, 198, 197, 197, 35, 713, 90, 10100, 11, 4377, 92, 7, 198, 197, 197, 197, 1, 8043, 1, 5218, 3124, 198, 197, 197, 8, 198, 197, 8, 329, 3124, 287, 6478, 5216, 669, 198, 8, 198, 198, 10910, 1211, 13, 276, 1780, 29046, 7, 26858, 3712, 41294, 37310, 8, 796, 360, 713, 90, 10100, 11, 4377, 92, 7, 198, 197, 1, 8043, 1, 5218, 6478, 5216, 669, 198, 8, 198, 198, 8818, 7900, 1211, 13, 49283, 7, 26858, 3712, 41294, 37310, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 7900, 1211, 13, 9150, 7, 26858, 8, 198, 220, 220, 220, 1441, 7900, 1211, 13, 45474, 9248, 7, 87, 532, 860, 11, 331, 532, 860, 11, 1596, 11, 1596, 8, 198, 437, 198, 198, 8818, 7900, 1211, 13, 13287, 7, 49464, 3712, 10910, 1211, 13, 34, 18131, 13, 34, 18131, 21947, 11, 9312, 3712, 41294, 37310, 11, 2119, 3712, 13912, 293, 13, 41178, 8, 198, 197, 8043, 796, 651, 7, 26858, 13, 7890, 11, 366, 8043, 1600, 366, 14573, 4943, 198, 197, 10910, 1211, 13, 19334, 38454, 578, 7, 49464, 11, 6478, 4561, 23156, 58, 8043, 4357, 657, 11, 657, 8, 198, 437, 198, 198, 437, 198 ]
2.655172
406
import ONNXRunTime function onnxruntime_infer(f, inputs...) reversedims(a::AbstractArray{T,N}) where {T, N} = permutedims(a, N:-1:1) mktempdir() do dir modelfile = joinpath(dir, "model.onnx") save(modelfile, f, size.(inputs)...) model = ONNXRunTime.load_inference(modelfile) return model(Dict(ONNXRunTime.input_names(model) .=> reversedims.(inputs))) |> values .|> reversedims |> Tuple end end
[ 198, 11748, 440, 6144, 55, 10987, 7575, 198, 8818, 319, 77, 87, 43282, 62, 259, 2232, 7, 69, 11, 17311, 23029, 628, 197, 260, 690, 276, 12078, 7, 64, 3712, 23839, 19182, 90, 51, 11, 45, 30072, 810, 1391, 51, 11, 399, 92, 796, 9943, 7241, 12078, 7, 64, 11, 399, 21912, 16, 25, 16, 8, 198, 197, 198, 197, 28015, 29510, 15908, 3419, 466, 26672, 198, 197, 197, 4666, 7046, 576, 796, 4654, 6978, 7, 15908, 11, 366, 19849, 13, 261, 77, 87, 4943, 198, 197, 197, 21928, 7, 4666, 7046, 576, 11, 277, 11, 2546, 12195, 15414, 82, 8, 23029, 628, 197, 197, 19849, 796, 440, 6144, 55, 10987, 7575, 13, 2220, 62, 259, 4288, 7, 4666, 7046, 576, 8, 198, 197, 197, 7783, 2746, 7, 35, 713, 7, 1340, 45, 55, 10987, 7575, 13, 15414, 62, 14933, 7, 19849, 8, 764, 14804, 17687, 12078, 12195, 15414, 82, 22305, 930, 29, 3815, 764, 91, 29, 17687, 12078, 930, 29, 309, 29291, 198, 197, 437, 198, 198, 437, 198 ]
2.417647
170
#Load the Distributions package. Use `Pkg.install("Distributions")` to install first time. using Distributions: TDist, ccdf type regress_results coefs yhat res vcv tstat pval end # Keyword arguments are placed after semicolon. # Symbols start with colon, e.g. `:symbol`. function ols(y, X; corr=:none, lags::Int=Int(floor(size(X,1)^(1/4)))) # β̂ = X \ y is more stable than β̂ = inv(X'*X) * X' \ y # see notes at bottom of case 1 notebook β̂ = X \ y ŷ = X * β̂ μ̂ = y - ŷ T, K = size(X) σ̂² = dot(μ̂, μ̂) / (T - K) #use correction for variance covariance if corr == :none vcv = σ̂² * inv(X'*X) elseif corr == :white vcv = newey_west(X, μ̂, 0) elseif corr == :newey_west vcv = newey_west(X, μ̂, lags) else error("wrong argument for correction keyword") end # T statistics for H₀: βᵢ = 0 tstat = β̂ ./ sqrt(diag(vcv)) # absolute value and times two for double sided test pval = 2 * ccdf(TDist(T-K), abs(tstat)) regress_results(β̂, ŷ, μ̂, vcv, tstat, pval) end function newey_west(X, μ̂, lags::Integer) XtXInv = inv(X'*X) T, K = size(X) if lags==0 # White estimator return XtXInv * X' * diagm(μ̂.^2) * X * XtXInv end vcv = zeros(K, K) for t = 1:T vcv += μ̂[t]^2 * (X[t,:] * X[t,:]') end for lag in 1:lags w = 1 - lag / (lags + 1) for t in (lag + 1):T # Calculates the off-diagonal terms vcv += w * μ̂[t] * μ̂[t-lag] * (X[t-lag,:]*X[t,:]' + X[t,:]*X[t-lag,:]') end end vcv = XtXInv * vcv * XtXInv end function gls(y, X, Ω) P = chol(inv(Ω)) return ols(P*y, P*X) end function gmm(y, X, Z; corr=:none, lags=nothing) T, Kx = size(X) T, Kz = size(Z) if corr==:none # Generalized 1-step IV estimator W = inv(Z'*Z) elseif corr==:white | corr==:newey_west if corr==:white lags=0 end gmm1_res = gmm(y,X,Z;corr=:none) μ̂ = gmm1_res.res W = zeros(Kz, Kz) for lag in 0:lags w = 1 - lag / (lags + 1) for t in (lag + 1):T # Calculates the off-diagonal terms update = w * μ̂[t] * μ̂[t-lag] * (Z[t-lag,:]*Z[t,:]' + Z[t,:]*Z[t-lag,:]') W = W + update end end else error("wrong argument for correction keyword") end ZtX = Z'*X XtZ = X'*Z XtZ_W_ZtXInv = inv(XtZ*W*ZtX) β̂ = XtZ_W_ZtXInv*(XtZ*W*Z'*y) ŷ = X * β̂ μ̂ = y - ŷ σ̂² = dot(μ̂, μ̂) / (T - Kz) vcv = σ̂² * XtZ_W_ZtXInv # T statistics for H₀: β₀ = 0 tstat = β̂ ./ sqrt(diag(vcv)) # absolute value and times two for double sided test pval = 2 * ccdf(TDist(T-K), abs(tstat)) return regress_results(β̂, ŷ, μ̂, vcv, tstat, pval) end
[ 2, 8912, 262, 46567, 507, 5301, 13, 5765, 4600, 47, 10025, 13, 17350, 7203, 20344, 2455, 507, 4943, 63, 284, 2721, 717, 640, 13, 198, 3500, 46567, 507, 25, 13320, 396, 11, 36624, 7568, 198, 198, 4906, 50252, 62, 43420, 198, 220, 220, 220, 763, 891, 82, 198, 220, 220, 220, 331, 5183, 198, 220, 220, 220, 581, 198, 220, 220, 220, 410, 33967, 198, 220, 220, 220, 256, 14269, 198, 220, 220, 220, 279, 2100, 198, 437, 198, 198, 2, 7383, 4775, 7159, 389, 4624, 706, 5026, 27045, 261, 13, 198, 2, 41327, 10220, 923, 351, 7633, 11, 304, 13, 70, 13, 4600, 25, 1837, 23650, 44646, 198, 8818, 267, 7278, 7, 88, 11, 1395, 26, 1162, 81, 28, 25, 23108, 11, 300, 3775, 3712, 5317, 28, 5317, 7, 28300, 7, 7857, 7, 55, 11, 16, 8, 61, 7, 16, 14, 19, 35514, 628, 220, 220, 220, 1303, 27169, 136, 224, 796, 1395, 3467, 331, 318, 517, 8245, 621, 27169, 136, 224, 796, 800, 7, 55, 6, 9, 55, 8, 1635, 1395, 6, 3467, 331, 220, 198, 220, 220, 220, 1303, 766, 4710, 379, 4220, 286, 1339, 352, 20922, 198, 220, 220, 220, 27169, 136, 224, 796, 1395, 3467, 331, 198, 220, 220, 220, 331, 136, 224, 796, 1395, 1635, 27169, 136, 224, 198, 220, 220, 220, 18919, 136, 224, 796, 331, 532, 331, 136, 224, 628, 220, 220, 220, 309, 11, 509, 796, 2546, 7, 55, 8, 198, 220, 220, 220, 18074, 225, 136, 224, 31185, 796, 16605, 7, 34703, 136, 224, 11, 18919, 136, 224, 8, 1220, 357, 51, 532, 509, 8, 628, 220, 220, 220, 1303, 1904, 17137, 329, 24198, 44829, 590, 198, 220, 220, 220, 611, 1162, 81, 6624, 1058, 23108, 198, 220, 220, 220, 220, 220, 220, 220, 410, 33967, 796, 18074, 225, 136, 224, 31185, 1635, 800, 7, 55, 6, 9, 55, 8, 198, 220, 220, 220, 2073, 361, 1162, 81, 6624, 1058, 11186, 198, 220, 220, 220, 220, 220, 220, 220, 410, 33967, 796, 649, 2959, 62, 7038, 7, 55, 11, 18919, 136, 224, 11, 657, 8, 198, 220, 220, 220, 2073, 361, 1162, 81, 6624, 1058, 3605, 2959, 62, 7038, 198, 220, 220, 220, 220, 220, 220, 220, 410, 33967, 796, 649, 2959, 62, 7038, 7, 55, 11, 18919, 136, 224, 11, 300, 3775, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 36460, 4578, 329, 17137, 21179, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 309, 7869, 329, 367, 158, 224, 222, 25, 27169, 39611, 95, 796, 657, 198, 220, 220, 220, 256, 14269, 796, 27169, 136, 224, 24457, 19862, 17034, 7, 10989, 363, 7, 28435, 85, 4008, 628, 220, 220, 220, 1303, 4112, 1988, 290, 1661, 734, 329, 4274, 34384, 1332, 198, 220, 220, 220, 279, 2100, 220, 796, 362, 1635, 36624, 7568, 7, 51, 20344, 7, 51, 12, 42, 828, 2352, 7, 83, 14269, 4008, 628, 220, 220, 220, 50252, 62, 43420, 7, 26638, 136, 224, 11, 331, 136, 224, 11, 18919, 136, 224, 11, 410, 33967, 11, 256, 14269, 11, 279, 2100, 8, 198, 437, 628, 198, 8818, 649, 2959, 62, 7038, 7, 55, 11, 18919, 136, 224, 11, 300, 3775, 3712, 46541, 8, 628, 220, 220, 220, 1395, 83, 55, 19904, 796, 800, 7, 55, 6, 9, 55, 8, 198, 220, 220, 220, 309, 11, 509, 796, 2546, 7, 55, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 611, 300, 3775, 855, 15, 1303, 2635, 3959, 1352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1395, 83, 55, 19904, 1635, 1395, 6, 1635, 2566, 363, 76, 7, 34703, 136, 224, 13, 61, 17, 8, 1635, 1395, 1635, 1395, 83, 55, 19904, 198, 220, 220, 220, 886, 628, 220, 220, 220, 410, 33967, 796, 1976, 27498, 7, 42, 11, 509, 8, 198, 220, 220, 220, 329, 256, 796, 352, 25, 51, 198, 220, 220, 220, 220, 220, 220, 220, 410, 33967, 15853, 18919, 136, 224, 58, 83, 60, 61, 17, 1635, 357, 55, 58, 83, 11, 47715, 1635, 1395, 58, 83, 11, 47715, 11537, 198, 220, 220, 220, 886, 198, 220, 220, 220, 329, 19470, 287, 352, 25, 75, 3775, 198, 220, 220, 220, 220, 220, 220, 220, 266, 796, 352, 532, 19470, 1220, 357, 75, 3775, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 256, 287, 357, 30909, 1343, 352, 2599, 51, 1303, 27131, 689, 262, 572, 12, 10989, 27923, 2846, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 33967, 15853, 266, 1635, 18919, 136, 224, 58, 83, 60, 1635, 18919, 136, 224, 58, 83, 12, 30909, 60, 1635, 357, 55, 58, 83, 12, 30909, 11, 47715, 9, 55, 58, 83, 11, 47715, 6, 1343, 1395, 58, 83, 11, 47715, 9, 55, 58, 83, 12, 30909, 11, 47715, 11537, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 410, 33967, 796, 1395, 83, 55, 19904, 1635, 410, 33967, 1635, 1395, 83, 55, 19904, 198, 437, 198, 198, 8818, 1278, 82, 7, 88, 11, 1395, 11, 7377, 102, 8, 628, 220, 350, 796, 442, 349, 7, 16340, 7, 138, 102, 4008, 198, 220, 1441, 267, 7278, 7, 47, 9, 88, 11, 350, 9, 55, 8, 198, 198, 437, 198, 198, 8818, 308, 3020, 7, 88, 11, 1395, 11, 1168, 26, 1162, 81, 28, 25, 23108, 11, 300, 3775, 28, 22366, 8, 628, 220, 309, 11, 509, 87, 796, 2546, 7, 55, 8, 198, 220, 309, 11, 509, 89, 796, 2546, 7, 57, 8, 628, 220, 611, 1162, 81, 855, 25, 23108, 628, 220, 220, 220, 1303, 3611, 1143, 352, 12, 9662, 8363, 3959, 1352, 198, 220, 220, 220, 370, 796, 800, 7, 57, 6, 9, 57, 8, 628, 220, 2073, 361, 1162, 81, 855, 25, 11186, 930, 1162, 81, 855, 25, 3605, 2959, 62, 7038, 628, 220, 220, 220, 611, 1162, 81, 855, 25, 11186, 198, 220, 220, 220, 220, 220, 300, 3775, 28, 15, 198, 220, 220, 220, 886, 628, 220, 220, 220, 308, 3020, 16, 62, 411, 796, 308, 3020, 7, 88, 11, 55, 11, 57, 26, 10215, 81, 28, 25, 23108, 8, 198, 220, 220, 220, 18919, 136, 224, 796, 308, 3020, 16, 62, 411, 13, 411, 628, 220, 220, 220, 370, 796, 1976, 27498, 7, 42, 89, 11, 509, 89, 8, 198, 220, 220, 220, 329, 19470, 287, 657, 25, 75, 3775, 198, 220, 220, 220, 220, 220, 220, 220, 266, 796, 352, 532, 19470, 1220, 357, 75, 3775, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 256, 287, 357, 30909, 1343, 352, 2599, 51, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 27131, 689, 262, 572, 12, 10989, 27923, 2846, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4296, 796, 266, 1635, 18919, 136, 224, 58, 83, 60, 1635, 18919, 136, 224, 58, 83, 12, 30909, 60, 1635, 357, 57, 58, 83, 12, 30909, 11, 47715, 9, 57, 58, 83, 11, 47715, 6, 1343, 1168, 58, 83, 11, 47715, 9, 57, 58, 83, 12, 30909, 11, 47715, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 370, 796, 370, 1343, 4296, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 2073, 198, 220, 220, 220, 220, 220, 4049, 7203, 36460, 4578, 329, 17137, 21179, 4943, 198, 220, 886, 628, 220, 1168, 83, 55, 796, 1168, 6, 9, 55, 198, 220, 1395, 83, 57, 796, 1395, 6, 9, 57, 628, 220, 1395, 83, 57, 62, 54, 62, 57, 83, 55, 19904, 796, 800, 7, 55, 83, 57, 9, 54, 9, 57, 83, 55, 8, 198, 220, 27169, 136, 224, 220, 796, 1395, 83, 57, 62, 54, 62, 57, 83, 55, 19904, 9, 7, 55, 83, 57, 9, 54, 9, 57, 6, 9, 88, 8, 198, 220, 331, 136, 224, 796, 1395, 1635, 27169, 136, 224, 198, 220, 18919, 136, 224, 796, 331, 532, 331, 136, 224, 198, 220, 18074, 225, 136, 224, 31185, 796, 16605, 7, 34703, 136, 224, 11, 18919, 136, 224, 8, 1220, 357, 51, 532, 509, 89, 8, 198, 220, 410, 33967, 796, 18074, 225, 136, 224, 31185, 1635, 1395, 83, 57, 62, 54, 62, 57, 83, 55, 19904, 628, 220, 1303, 309, 7869, 329, 367, 158, 224, 222, 25, 27169, 158, 224, 222, 796, 657, 198, 220, 256, 14269, 796, 27169, 136, 224, 24457, 19862, 17034, 7, 10989, 363, 7, 28435, 85, 4008, 628, 220, 1303, 4112, 1988, 290, 1661, 734, 329, 4274, 34384, 1332, 198, 220, 279, 2100, 220, 796, 362, 1635, 36624, 7568, 7, 51, 20344, 7, 51, 12, 42, 828, 2352, 7, 83, 14269, 4008, 628, 220, 1441, 50252, 62, 43420, 7, 26638, 136, 224, 11, 331, 136, 224, 11, 18919, 136, 224, 11, 410, 33967, 11, 256, 14269, 11, 279, 2100, 8, 198, 198, 437, 198 ]
1.852048
1,514
""" grd2kml(cmd0::String="", arg1=nothing, kwargs...) Reads a 2-D grid file and makes a quadtree of PNG images and KML wrappers for Google Earth using the selected tile size [256x256 pixels]. Full option list at [`grd2kml`]($(GMTdoc)grd2kml.html) Parameters ---------- - $(GMT.opt_C) - **E** | **url** :: [Type => Str] `Arg = url` Instead of hosting the files locally, prepend a site URL. The top-level prefix.kml file will then use this URL to find the other files it references.`` ($(GMTdoc)grd2kml.html#e) - **F** | **filter** :: [Type => Str] Specifies the filter to use for the downsampling of the grid for more distant viewing. Choose among boxcar, cosine arch, gaussian, or median [Gaussian]. ($(GMTdoc)grd2kml.html#e) - **H** | **sub_pixel** :: [Type => Int] `Arg = factor` Improve the quality of rasterization by passing the sub-pixel smoothing factor to psconvert. ($(GMTdoc)grd2kml.html#h) - **I** | **shade** | **shading** | **intensity** :: [Type => Str | GMTgrid] Gives the name of a grid file or GMTgrid with intensities in the (-1,+1) range, or a grdgradient shading flags. ($(GMTdoc)grd2kml.html#i) - **L** | **tile_size** :: [Type => Number] `Arg = tilesize` Sets the fixed size of the image building blocks. Must be an integer that is radix 2. Typical values are 256 or 512 [256]. ($(GMTdoc)grd2kml.html#l) - **N** | **prefix** [Type => Str] `Arg = prefix` Sets a unique name prefixed used for the top-level KML filename and the directory where all referenced KML files and PNG images will be written [GMT_Quadtree]. ($(GMTdoc)grd2kml.html#n) - **Q** | **nan_t** | **nan_alpha** :: [Type => Bool] Make grid nodes with z = NaN transparent, using the color-masking feature in PostScript Level 3. ($(GMTdoc)grd2kml.html#q) - **T** | **title** :: [Type => Str] `Arg = title` Sets the title of the top-level document (i.e., its description). ($(GMTdoc)grd2kml.html#t) - $(GMT.opt_V) - $(GMT.opt_write) - $(GMT.opt_append) - $(GMT.opt_f) """ function grd2kml(cmd0::String="", arg1=nothing; kwargs...) arg2 = nothing; arg3 = nothing; # for CPT and/or illum length(kwargs) == 0 && occursin(" -", cmd0) && return monolitic("grd2kml", cmd0, arg1, arg2) d = init_module(false, kwargs...)[1] # Also checks if the user wants ONLY the HELP mode cmd, = parse_common_opts(d, "", [:V_params :f]) cmd = parse_these_opts(cmd, d, [[:E :url], [:F :filter], [:H :sub_pixel], [:L :tile_size], [:N :prefix], [:Q :nan_t :nan_alpha], [:T :title]]) cmd, got_fname, arg1 = find_data(d, cmd0, cmd, arg1) # Find how data was transmitted cmd, N_used, arg1, arg2, = get_cpt_set_R(d, cmd0, cmd, opt_R, got_fname, arg1, arg2) cmd, arg1, arg2, arg3 = common_shade(d, cmd, arg1, arg2, arg3, nothing, "grd2kml") common_grd(d, "grd2kml " * cmd, arg1, arg2, arg3) # Finish build cmd and run it end # --------------------------------------------------------------------------------------------------- grd2kml(arg1, cmd0::String=""; kw...) = grd2kml(cmd0, arg1; kw...)
[ 37811, 198, 197, 2164, 67, 17, 74, 4029, 7, 28758, 15, 3712, 10100, 2625, 1600, 1822, 16, 28, 22366, 11, 479, 86, 22046, 23029, 198, 198, 5569, 82, 257, 362, 12, 35, 10706, 2393, 290, 1838, 257, 15094, 21048, 286, 36182, 4263, 290, 509, 5805, 7917, 11799, 329, 3012, 3668, 198, 3500, 262, 6163, 17763, 2546, 685, 11645, 87, 11645, 17848, 4083, 198, 198, 13295, 3038, 1351, 379, 685, 63, 2164, 67, 17, 74, 4029, 63, 16151, 3, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 8, 198, 198, 48944, 198, 35937, 198, 198, 12, 29568, 49424, 13, 8738, 62, 34, 8, 198, 12, 12429, 36, 1174, 930, 12429, 6371, 1174, 7904, 685, 6030, 5218, 4285, 60, 197, 197, 63, 28100, 796, 19016, 63, 628, 220, 220, 220, 5455, 286, 13662, 262, 3696, 15726, 11, 3143, 437, 257, 2524, 10289, 13, 383, 1353, 12, 5715, 21231, 13, 74, 4029, 2393, 198, 220, 220, 220, 481, 788, 779, 428, 10289, 284, 1064, 262, 584, 3696, 340, 10288, 13, 15506, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 68, 8, 198, 12, 12429, 37, 1174, 930, 12429, 24455, 1174, 7904, 685, 6030, 5218, 4285, 60, 628, 220, 220, 220, 18291, 6945, 262, 8106, 284, 779, 329, 262, 21838, 321, 11347, 286, 262, 10706, 329, 517, 12899, 11681, 13, 198, 220, 220, 220, 17489, 1871, 3091, 7718, 11, 8615, 500, 3934, 11, 31986, 31562, 11, 393, 14288, 685, 35389, 31562, 4083, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 68, 8, 198, 12, 12429, 39, 1174, 930, 12429, 7266, 62, 32515, 1174, 7904, 685, 6030, 5218, 2558, 60, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 28100, 796, 5766, 63, 628, 220, 220, 220, 20580, 262, 3081, 286, 374, 1603, 1634, 416, 6427, 262, 850, 12, 32515, 32746, 722, 5766, 284, 26692, 1102, 1851, 13, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 71, 8, 198, 12, 12429, 40, 1174, 930, 12429, 1477, 671, 1174, 930, 12429, 1477, 4980, 1174, 930, 12429, 47799, 1174, 7904, 685, 6030, 5218, 4285, 930, 16987, 25928, 60, 628, 220, 220, 220, 402, 1083, 262, 1438, 286, 257, 10706, 2393, 393, 16987, 25928, 351, 17509, 871, 287, 262, 13841, 16, 11, 10, 16, 8, 2837, 11, 198, 220, 220, 220, 393, 257, 1036, 67, 49607, 49065, 9701, 13, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 72, 8, 198, 12, 12429, 43, 1174, 930, 12429, 40927, 62, 7857, 1174, 7904, 685, 6030, 5218, 7913, 60, 197, 197, 197, 63, 28100, 796, 19867, 1096, 63, 628, 220, 220, 220, 21394, 262, 5969, 2546, 286, 262, 2939, 2615, 7021, 13, 12039, 307, 281, 18253, 326, 318, 2511, 844, 362, 13, 198, 220, 220, 220, 48752, 3815, 389, 17759, 393, 22243, 685, 11645, 4083, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 75, 8, 198, 12, 12429, 45, 1174, 930, 12429, 40290, 1174, 685, 6030, 5218, 4285, 60, 197, 197, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 28100, 796, 21231, 63, 628, 220, 220, 220, 21394, 257, 3748, 1438, 7694, 2966, 973, 329, 262, 1353, 12, 5715, 509, 5805, 29472, 290, 262, 8619, 810, 477, 198, 220, 220, 220, 20717, 509, 5805, 3696, 290, 36182, 4263, 481, 307, 3194, 685, 49424, 62, 4507, 324, 21048, 4083, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 77, 8, 198, 12, 12429, 48, 1174, 930, 12429, 12647, 62, 83, 1174, 930, 12429, 12647, 62, 26591, 1174, 7904, 685, 6030, 5218, 347, 970, 60, 628, 220, 220, 220, 6889, 10706, 13760, 351, 1976, 796, 11013, 45, 13245, 11, 1262, 262, 3124, 12, 27932, 278, 3895, 287, 2947, 7391, 5684, 513, 13, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 80, 8, 198, 12, 12429, 51, 1174, 930, 12429, 7839, 1174, 7904, 685, 6030, 5218, 4285, 60, 197, 197, 220, 220, 220, 220, 220, 220, 220, 4600, 28100, 796, 3670, 63, 628, 220, 220, 220, 21394, 262, 3670, 286, 262, 1353, 12, 5715, 3188, 357, 72, 13, 68, 1539, 663, 6764, 737, 198, 220, 220, 220, 7198, 7, 49424, 15390, 8, 2164, 67, 17, 74, 4029, 13, 6494, 2, 83, 8, 198, 12, 29568, 49424, 13, 8738, 62, 53, 8, 198, 12, 29568, 49424, 13, 8738, 62, 13564, 8, 198, 12, 29568, 49424, 13, 8738, 62, 33295, 8, 198, 12, 29568, 49424, 13, 8738, 62, 69, 8, 198, 37811, 198, 8818, 1036, 67, 17, 74, 4029, 7, 28758, 15, 3712, 10100, 2625, 1600, 1822, 16, 28, 22366, 26, 479, 86, 22046, 23029, 628, 197, 853, 17, 796, 2147, 26, 220, 220, 220, 220, 1822, 18, 796, 2147, 26, 220, 220, 220, 220, 1303, 329, 327, 11571, 290, 14, 273, 16116, 198, 197, 13664, 7, 46265, 22046, 8, 6624, 657, 11405, 8833, 259, 7203, 532, 1600, 23991, 15, 8, 11405, 1441, 937, 6212, 291, 7203, 2164, 67, 17, 74, 4029, 1600, 23991, 15, 11, 1822, 16, 11, 1822, 17, 8, 628, 197, 67, 796, 2315, 62, 21412, 7, 9562, 11, 479, 86, 22046, 23029, 58, 16, 60, 197, 197, 2, 4418, 8794, 611, 262, 2836, 3382, 22224, 262, 49944, 4235, 628, 197, 28758, 11, 796, 21136, 62, 11321, 62, 404, 912, 7, 67, 11, 366, 1600, 685, 25, 53, 62, 37266, 1058, 69, 12962, 198, 197, 28758, 220, 796, 21136, 62, 27218, 62, 404, 912, 7, 28758, 11, 288, 11, 16410, 25, 36, 1058, 6371, 4357, 685, 25, 37, 1058, 24455, 4357, 685, 25, 39, 1058, 7266, 62, 32515, 4357, 685, 25, 43, 1058, 40927, 62, 7857, 4357, 198, 197, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 25, 45, 1058, 40290, 4357, 685, 25, 48, 1058, 12647, 62, 83, 1058, 12647, 62, 26591, 4357, 685, 25, 51, 1058, 7839, 11907, 8, 628, 197, 28758, 11, 1392, 62, 69, 3672, 11, 1822, 16, 796, 1064, 62, 7890, 7, 67, 11, 23991, 15, 11, 23991, 11, 1822, 16, 8, 197, 197, 2, 9938, 703, 1366, 373, 18307, 198, 197, 28758, 11, 399, 62, 1484, 11, 1822, 16, 11, 1822, 17, 11, 796, 651, 62, 66, 457, 62, 2617, 62, 49, 7, 67, 11, 23991, 15, 11, 23991, 11, 2172, 62, 49, 11, 1392, 62, 69, 3672, 11, 1822, 16, 11, 1822, 17, 8, 198, 197, 28758, 11, 1822, 16, 11, 1822, 17, 11, 1822, 18, 796, 2219, 62, 1477, 671, 7, 67, 11, 23991, 11, 1822, 16, 11, 1822, 17, 11, 1822, 18, 11, 2147, 11, 366, 2164, 67, 17, 74, 4029, 4943, 198, 197, 11321, 62, 2164, 67, 7, 67, 11, 366, 2164, 67, 17, 74, 4029, 366, 1635, 23991, 11, 1822, 16, 11, 1822, 17, 11, 1822, 18, 8, 197, 197, 2, 32585, 1382, 23991, 290, 1057, 340, 198, 437, 198, 198, 2, 16529, 3880, 6329, 198, 2164, 67, 17, 74, 4029, 7, 853, 16, 11, 23991, 15, 3712, 10100, 2625, 8172, 479, 86, 23029, 796, 1036, 67, 17, 74, 4029, 7, 28758, 15, 11, 1822, 16, 26, 479, 86, 23029 ]
2.545455
1,232
using SimLynx using Test @testset "SimLynx.jl" begin @test greet() == "Hello World!" end
[ 3500, 3184, 37207, 87, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 8890, 37207, 87, 13, 20362, 1, 2221, 198, 220, 220, 220, 2488, 9288, 12589, 3419, 6624, 366, 15496, 2159, 2474, 198, 437, 198 ]
2.611111
36
# Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder # Collection of sources required to build LCIOWrapBuilder sources = [ "LCIOWrapBuilder" ] # Bash recipe for building across all platforms function getscript(version) shortversion = version[1:3] return """ cd \$WORKSPACE/srcdir mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=\$prefix -DCMAKE_TOOLCHAIN_FILE=/opt/\$target/\$target.toolchain -DCMAKE_FIND_ROOT_PATH=\$prefix -DJulia_PREFIX=\$prefix .. VERBOSE=ON cmake --build . --config Release --target install """ end # These are the platforms we will build for by default, unless further # platforms are passed in on the command line platforms = Platform[ Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc7, :cxx11)), Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc8, :cxx11)), MacOS(:x86_64, compiler_abi=CompilerABI(:gcc7)), MacOS(:x86_64, compiler_abi=CompilerABI(:gcc8)), ] # The products that we will ensure are always built products(prefix) = [ LibraryProduct(prefix, "liblciowrap", :lciowrap) ] # Dependencies that must be installed before this package can be built dependencies = [ "https://github.com/JuliaInterop/libcxxwrap-julia/releases/download/v0.6.2/build_libcxxwrap-julia-1.0.v0.6.2.jl" "https://github.com/JuliaPackaging/JuliaBuilder/releases/download/v1.0.0-2/build_Julia.v1.0.0.jl" "https://github.com/jstrube/LCIOBuilder/releases/download/v2.12.1-4/build_LCIOBuilder.v2.12.1-4.jl" ] # Build the tarballs, and possibly a `build.jl` as well. version_number = get(ENV, "TRAVIS_TAG", "") if version_number == "" version_number = "v0.99" end build_tarballs(ARGS, "LCIOWrapBuilder-1.0", VersionNumber(version_number), sources, getscript("1.0.0"), platforms, products, dependencies)
[ 2, 5740, 326, 428, 4226, 460, 2453, 617, 3614, 3141, 12, 1370, 7159, 11, 1057, 198, 2, 4600, 73, 43640, 1382, 62, 18870, 21591, 13, 20362, 1377, 16794, 63, 284, 766, 257, 8748, 3275, 13, 198, 3500, 45755, 32875, 198, 198, 2, 12251, 286, 4237, 2672, 284, 1382, 22228, 40, 3913, 2416, 32875, 198, 82, 2203, 796, 685, 198, 220, 220, 220, 366, 5639, 40, 3913, 2416, 32875, 1, 198, 60, 198, 198, 2, 15743, 8364, 329, 2615, 1973, 477, 9554, 198, 8818, 651, 12048, 7, 9641, 8, 198, 197, 19509, 9641, 796, 2196, 58, 16, 25, 18, 60, 198, 197, 7783, 37227, 198, 197, 10210, 3467, 3, 33249, 4303, 11598, 14, 10677, 15908, 198, 197, 28015, 15908, 1382, 11405, 22927, 1382, 198, 197, 11215, 539, 532, 9697, 5673, 7336, 62, 38604, 7036, 62, 47, 31688, 10426, 28, 59, 3, 40290, 532, 9697, 5673, 7336, 62, 10468, 3535, 3398, 29833, 62, 25664, 33223, 8738, 14, 59, 3, 16793, 14, 59, 3, 16793, 13, 25981, 7983, 532, 9697, 5673, 7336, 62, 37, 12115, 62, 13252, 2394, 62, 34219, 28, 59, 3, 40290, 532, 35, 16980, 544, 62, 47, 31688, 10426, 28, 59, 3, 40290, 11485, 198, 197, 5959, 33, 14058, 28, 1340, 12067, 539, 1377, 11249, 764, 1377, 11250, 13868, 1377, 16793, 2721, 198, 197, 37811, 198, 437, 198, 198, 2, 2312, 389, 262, 9554, 356, 481, 1382, 329, 416, 4277, 11, 4556, 2252, 198, 2, 9554, 389, 3804, 287, 319, 262, 3141, 1627, 198, 24254, 82, 796, 19193, 58, 198, 220, 220, 220, 7020, 7, 25, 87, 4521, 62, 2414, 11, 9195, 66, 28, 25, 4743, 571, 66, 11, 17050, 62, 17914, 28, 7293, 5329, 32, 3483, 7, 25, 70, 535, 22, 11, 1058, 66, 5324, 1157, 36911, 198, 220, 220, 220, 7020, 7, 25, 87, 4521, 62, 2414, 11, 9195, 66, 28, 25, 4743, 571, 66, 11, 17050, 62, 17914, 28, 7293, 5329, 32, 3483, 7, 25, 70, 535, 23, 11, 1058, 66, 5324, 1157, 36911, 198, 220, 220, 220, 4100, 2640, 7, 25, 87, 4521, 62, 2414, 11, 17050, 62, 17914, 28, 7293, 5329, 32, 3483, 7, 25, 70, 535, 22, 36911, 198, 220, 220, 220, 4100, 2640, 7, 25, 87, 4521, 62, 2414, 11, 17050, 62, 17914, 28, 7293, 5329, 32, 3483, 7, 25, 70, 535, 23, 36911, 198, 60, 198, 198, 2, 383, 3186, 326, 356, 481, 4155, 389, 1464, 3170, 198, 29498, 7, 40290, 8, 796, 685, 198, 220, 220, 220, 10074, 15667, 7, 40290, 11, 366, 8019, 75, 979, 322, 2416, 1600, 1058, 75, 979, 322, 2416, 8, 198, 60, 198, 198, 2, 37947, 3976, 326, 1276, 307, 6589, 878, 428, 5301, 460, 307, 3170, 198, 45841, 3976, 796, 685, 198, 197, 1, 5450, 1378, 12567, 13, 785, 14, 16980, 544, 9492, 404, 14, 8019, 66, 5324, 37150, 12, 73, 43640, 14, 260, 29329, 14, 15002, 14, 85, 15, 13, 21, 13, 17, 14, 11249, 62, 8019, 66, 5324, 37150, 12, 73, 43640, 12, 16, 13, 15, 13, 85, 15, 13, 21, 13, 17, 13, 20362, 1, 198, 197, 1, 5450, 1378, 12567, 13, 785, 14, 16980, 544, 11869, 3039, 14, 16980, 544, 32875, 14, 260, 29329, 14, 15002, 14, 85, 16, 13, 15, 13, 15, 12, 17, 14, 11249, 62, 16980, 544, 13, 85, 16, 13, 15, 13, 15, 13, 20362, 1, 198, 197, 1, 5450, 1378, 12567, 13, 785, 14, 73, 2536, 3266, 14, 5639, 9399, 32875, 14, 260, 29329, 14, 15002, 14, 85, 17, 13, 1065, 13, 16, 12, 19, 14, 11249, 62, 5639, 9399, 32875, 13, 85, 17, 13, 1065, 13, 16, 12, 19, 13, 20362, 1, 198, 60, 198, 198, 2, 10934, 262, 13422, 21591, 11, 290, 5457, 257, 4600, 11249, 13, 20362, 63, 355, 880, 13, 198, 9641, 62, 17618, 796, 651, 7, 1677, 53, 11, 366, 51, 3861, 29817, 62, 42197, 1600, 366, 4943, 198, 361, 2196, 62, 17618, 6624, 13538, 198, 220, 220, 220, 2196, 62, 17618, 796, 366, 85, 15, 13, 2079, 1, 198, 437, 198, 11249, 62, 18870, 21591, 7, 1503, 14313, 11, 366, 5639, 40, 3913, 2416, 32875, 12, 16, 13, 15, 1600, 10628, 15057, 7, 9641, 62, 17618, 828, 4237, 11, 651, 12048, 7203, 16, 13, 15, 13, 15, 12340, 9554, 11, 3186, 11, 20086, 8, 628 ]
2.652482
705
const CuDense{ElT,VecT} = Dense{ElT,VecT} where {VecT<:CuVector} const CuDenseTensor{ElT,N,StoreT,IndsT} = Tensor{ElT,N,StoreT,IndsT} where {StoreT<:CuDense} Dense{T, SA}(x::Dense{T, SB}) where {T<:Number, SA<:CuArray, SB<:Array} = Dense{T, SA}(CuArray(x)) Dense{T, SA}(x::Dense{T, SB}) where {T<:Number, SA<:Array, SB<:CuArray} = Dense{T, SA}(collect(x.data)) Dense{T, S}(size::Integer) where {T, S<:CuArray{<:T}} = Dense{T, S}(CuArrays.zeros(T, size)) function Dense{T, S}(x::T, size::Integer) where {T, S<:CuArray{<:T}} arr = CuArray{T}(undef, size) fill!(arr, x) Dense{T, S}(arr) end Base.collect(x::CuDense{T}) where {T<:Number} = Dense(collect(x.data)) Base.complex(::Type{Dense{ElT, VT}}) where {ElT, VT<:CuArray} = Dense{complex(ElT),CuVector{complex(ElT), Nothing}} CuArrays.CuArray(x::CuDense{ElT}) where {ElT} = CuVector{ElT}(data(x)) CuArrays.CuArray{ElT, N}(x::CuDenseTensor{ElT, N}) where {ElT, N} = CuArray{ElT, N}(reshape(data(store(x)), dims(inds(x)))) CuArrays.CuArray(x::CuDenseTensor{ElT, N}) where {ElT, N} = CuArray{ElT, N}(x) *(D::Dense{T, AT},x::S) where {T,AT<:CuArray,S<:Number} = Dense(x .* data(D)) Base.:(==)(::Type{<:CuDense{ElT1,CVec1}}, ::Type{<:CuDense{ElT2,CVec2}}) where {ElT1,ElT2,CVec1,CVec2} = (ElT1 == ElT2) Base.getindex(D::CuDense{<:Number}) = collect(data(D))[] Base.getindex(D::CuDenseTensor{<:Number, 0}) = store(D)[] LinearAlgebra.norm(T::CuDenseTensor) = norm(data(store(T))) # This is for type promotion for Scalar*Dense function Base.promote_rule(::Type{<:Dense{ElT1,CuVector{ElT1}}}, ::Type{ElT2}) where {ElT1, ElT2<:Number} ElR = promote_type(ElT1,ElT2) VecR = CuVector{ElR} return Dense{ElR,VecR} end function Base.permutedims(T::CuDenseTensor{<:Number,N}, perm::NTuple{N,Int}) where {N} Tp = similar(T,permute(inds(T),perm)) permute!(Tp,T) return Tp end function Base.permutedims!(R::CuDenseTensor{<:Number,N}, T::CuDenseTensor{<:Number,N}, perm::NTuple{N,Int}) where {N} return permutedims!!(R, T, perm) end function permutedims!!(B::Tensor{ElT,N,StoreT,IndsB}, A::Tensor{ElT,N,StoreT,IndsA}, perm::NTuple{N,Int}, f::Function=(r,t)->permute!(r,t)) where {N,ElT,IndsB,IndsA,StoreT<:CuDense{ElT}} Ais = inds(A) Bis = permute(inds(A), perm) B = f(B, A) return B end function Base.similar(::Type{<:CuDenseTensor{ElT}}, inds) where {ElT} storage_arr = CuVector{ElT}(undef,dim(inds)) return Tensor(Dense(storage_arr),inds) end function outer!(R::CuDenseTensor, T1::CuDenseTensor, T2::CuDenseTensor) R_dat = vec(array(T1))*transpose(vec(array(T2))) copyto!(data(store(R)), vec(R_dat)) inds_outer = unioninds(inds(T1),inds(T2)) return R end function contract!!(R::CuDenseTensor{<:Number,NR}, labelsR::NTuple{NR}, T1::CuDenseTensor{<:Number,N1}, labelsT1::NTuple{N1}, T2::CuDenseTensor{<:Number,N2}, labelsT2::NTuple{N2}) where {NR,N1,N2} if N1==0 # TODO: replace with an add! function? # What about doing `R .= T1[] .* PermutedDimsArray(T2,perm)`? perm = getperm(labelsR,labelsT2) newT2 = Tensor(Dense(data(store(T1)).*data(store(T2))), inds(T2)) permute!(R,newT2) elseif N2==0 perm = getperm(labelsR,labelsT1) newT1 = Tensor(Dense(data(store(T2)).*data(store(T1))), inds(T1)) permute!(R,newT1) elseif N1+N2==NR # TODO: permute T1 and T2 appropriately first (can be more efficient # then permuting the result of T1⊗T2) # TODO: implement the in-place version directly R = outer!!(R,T1,T2) inds_outer = unioninds(inds(T1),inds(T2)) R = Tensor(store(R), inds_outer) else R = _contract!!(R,labelsR,T1,labelsT1,T2,labelsT2) end return R end function permutedims!!(B::CuDenseTensor{ElT,0}, A::CuDenseTensor{ElT,0}, perm::NTuple{0,Int}, f=(r,t)->permute!(r,t)) where {ElT<:Number} Cs = f(B, A) return Tensor(Dense(vec(Cs)), IndexSet{0}()) end function permutedims!!(B::CuDenseTensor{ElT,N}, A::CuDenseTensor{ElT,0}, perm::NTuple{N,Int}, f=(r,t)->permute!(r,t)) where {N, ElT<:Number} Cis = permute(inds(B), perm) Cs = f(B, A) return Tensor(Dense(vec(Cs)), Cis) end function _contract!(CT::CuDenseTensor{El,NC}, AT::CuDenseTensor{El,NA}, BT::CuDenseTensor{El,NB}, props::ContractionProperties, α::Number=one(El),β::Number=zero(El)) where {El,NC,NA,NB} Ainds = inds(AT) Adims = dims(Ainds) Binds = inds(BT) Bdims = dims(Binds) Cinds = inds(CT) Cdims = dims(Cinds) Adata = reshape(data(store(AT)),Adims) Bdata = reshape(data(store(BT)),Bdims) Cdata = reshape(data(store(CT)),Cdims) contracted = commoninds(Ainds, Binds) A_only = uniqueinds(Ainds, Binds) B_only = uniqueinds(Binds, Ainds) ind_dict = Vector{Index}() for (idx, i) in enumerate(contracted) push!(ind_dict, i) end if length(A_only) > 0 for (idx, i) in enumerate(A_only) push!(ind_dict, i) end end if length(B_only) > 0 for (idx, i) in enumerate(B_only) push!(ind_dict, i) end end ctainds = zeros(Int, length(Ainds)) ctbinds = zeros(Int, length(Binds)) ctcinds = zeros(Int, length(Cinds)) for (ii, ia) in enumerate(Ainds) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Binds) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end for (ii, ic) in enumerate(Cinds) ctcinds[ii] = findfirst(x->x==ic, ind_dict) end id_op = CuArrays.CUTENSOR.CUTENSOR_OP_IDENTITY dict_key = "" for cc in zip(ctcinds, Cdims) dict_key *= string(cc[1]) * "," * string(cc[2]) * "," end for aa in zip(ctainds, Adims) dict_key *= string(aa[1]) * "," * string(aa[2]) * "," end for bb in zip(ctbinds, Bdims) dict_key *= string(bb[1]) * "," * string(bb[2]) * "," end if haskey(ENV, "CUTENSOR_AUTOTUNE") && tryparse(Int, ENV["CUTENSOR_AUTOTUNE"]) == 1 if haskey(ContractionPlans, dict_key) dict_val = ContractionPlans[dict_key] algo = dict_val #plan = dict_val[2] Cdata = CuArrays.CUTENSOR.contraction!(α, Adata, Vector{Char}(ctainds), id_op, Bdata, Vector{Char}(ctbinds), id_op, β, Cdata, Vector{Char}(ctcinds), id_op, id_op; algo=algo) else # loop through all algos # pick the fastest one # store that plan! best_time = 1e6 best_plan = nothing best_algo = nothing max_algos = Ref{Int32}(C_NULL) CuArrays.CUTENSOR.cutensorContractionMaxAlgos(max_algos) # fix once the other options are documented #algos = collect(Cint(CuArrays.CUTENSOR.CUTENSOR_ALGO_GETT):Cint(max_algos[] - 1)) algos = collect(Cint(CuArrays.CUTENSOR.CUTENSOR_ALGO_GETT):Cint(-1)) for algo in reverse(algos) try #this_plan = CuArrays.CUTENSOR.contraction_plan(Adata, Vector{Char}(ctainds), id_op, Bdata, Vector{Char}(ctbinds), id_op, Cdata, Vector{Char}(ctcinds), id_op, id_op; algo=CuArrays.CUTENSOR.cutensorAlgo_t(algo), pref=CuArrays.CUTENSOR.CUTENSOR_WORKSPACE_MAX) Cdata, this_time, bytes, gctime, memallocs = @timed CuArrays.CUTENSOR.contraction!(α, Adata, Vector{Char}(ctainds), id_op, Bdata, Vector{Char}(ctbinds), id_op, β, Cdata, Vector{Char}(ctcinds), id_op, id_op; algo=CuArrays.CUTENSOR.cutensorAlgo_t(algo)) if this_time < best_time best_time = this_time #best_plan = this_plan best_algo = CuArrays.CUTENSOR.cutensorAlgo_t(algo) end catch err @warn "Algorithm $algo not supported" end end ContractionPlans[dict_key] = best_algo end else Cdata = CuArrays.CUTENSOR.contraction!(α, Adata, Vector{Char}(ctainds), id_op, Bdata, Vector{Char}(ctbinds), id_op, β, Cdata, Vector{Char}(ctcinds), id_op, id_op) end return parent(Cdata) end function Base.:+(B::CuDenseTensor, A::CuDenseTensor) opC = CUTENSOR.CUTENSOR_OP_IDENTITY opA = CUTENSOR.CUTENSOR_OP_IDENTITY opAC = CUTENSOR.CUTENSOR_OP_ADD Ais = inds(A) Bis = inds(B) ind_dict = Vector{Index}() for (idx, i) in enumerate(inds(A)) push!(ind_dict, i) end Adata = data(store(A)) Bdata = data(store(B)) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end ctcinds = copy(ctbinds) C = CuArrays.zeros(eltype(Bdata), dims(Bis)) CUTENSOR.elementwiseBinary!(one(eltype(Adata)), reshapeAdata, ctainds, opA, one(eltype(Bdata)), reshapeBdata, ctbinds, opC, C, ctcinds, opAC) copyto!(data(store(B)), vec(C)) return B end function Base.:+(B::CuDense, Bis::IndexSet, A::CuDense, Ais::IndexSet) opA = CUTENSOR.CUTENSOR_OP_IDENTITY opC = CUTENSOR.CUTENSOR_OP_IDENTITY opAC = CUTENSOR.CUTENSOR_OP_ADD ind_dict = Vector{Index}() for (idx, i) in enumerate(Ais) push!(ind_dict, i) end Adata = data(A) Bdata = data(B) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end ctcinds = copy(ctbinds) C = CuArrays.zeros(eltype(Bdata), dims(Bis)) Cis = Bis C = CUTENSOR.elementwiseBinary!(1, reshapeAdata, ctainds, opA, 1, reshapeBdata, ctbinds, opC, C, ctcinds, opAC) copyto!(data(B), vec(C)) return C end function Base.:-(B::CuDenseTensor, A::CuDenseTensor) opC = CUTENSOR.CUTENSOR_OP_IDENTITY opA = CUTENSOR.CUTENSOR_OP_IDENTITY opAC = CUTENSOR.CUTENSOR_OP_ADD Ais = inds(A) Bis = inds(B) ind_dict = Vector{Index}() for (idx, i) in enumerate(inds(A)) push!(ind_dict, i) end Adata = data(store(A)) Bdata = data(store(B)) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end ctcinds = copy(ctbinds) C = CuArrays.zeros(eltype(Bdata), dims(Bis)) CUTENSOR.elementwiseBinary!(one(eltype(Adata)), reshapeAdata, ctainds, opA, -one(eltype(Bdata)), reshapeBdata, ctbinds, opC, C, ctcinds, opAC) copyto!(data(store(B)), vec(C)) return B end function Base.:-(A::CuDense, Ais::IndexSet, B::CuDense, Bis::IndexSet) opA = CUTENSOR.CUTENSOR_OP_IDENTITY opC = CUTENSOR.CUTENSOR_OP_IDENTITY opAC = CUTENSOR.CUTENSOR_OP_ADD ind_dict = Vector{Index}() for (idx, i) in enumerate(Ais) push!(ind_dict, i) end Adata = data(A) Bdata = data(B) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end ctcinds = copy(ctbinds) C = CuArrays.zeros(eltype(Bdata), dims(Bis)) Cis = Bis C = CUTENSOR.elementwiseBinary!(one(eltype(Adata)), reshapeAdata, ctainds, opA, -one(eltype(Bdata)), reshapeBdata, ctbinds, opC, C, ctcinds, opAC) copyto!(data(B), vec(C)) return C end function Base.permute!(B::CuDenseTensor, A::CuDenseTensor) Ais = inds(A) Bis = inds(B) ind_dict = Vector{Index}() for (idx, i) in enumerate(Ais) push!(ind_dict, i) end Adata = data(store(A)) Bdata = data(store(B)) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end CuArrays.CUTENSOR.permutation!(one(eltype(Adata)), reshapeAdata, Vector{Char}(ctainds), reshapeBdata, Vector{Char}(ctbinds)) return vec(reshapeBdata) end function Base.permute!(B::CuDense, Bis::IndexSet, A::CuDense, Ais::IndexSet) ind_dict = Vector{Index}() for (idx, i) in enumerate(Ais) push!(ind_dict, i) end Adata = data(A) Bdata = data(B) reshapeBdata = reshape(Bdata,dims(Bis)) reshapeAdata = reshape(Adata,dims(Ais)) ctainds = zeros(Int, length(Ais)) ctbinds = zeros(Int, length(Bis)) for (ii, ia) in enumerate(Ais) ctainds[ii] = findfirst(x->x==ia, ind_dict) end for (ii, ib) in enumerate(Bis) ctbinds[ii] = findfirst(x->x==ib, ind_dict) end CuArrays.CUTENSOR.permutation!(one(eltype(Adata)), reshapeAdata, Vector{Char}(ctainds), reshapeBdata, Vector{Char}(ctbinds)) return vec(reshapeBdata) end
[ 9979, 14496, 35, 1072, 90, 9527, 51, 11, 53, 721, 51, 92, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 360, 1072, 90, 9527, 51, 11, 53, 721, 51, 92, 810, 1391, 53, 721, 51, 27, 25, 46141, 38469, 92, 198, 9979, 14496, 35, 1072, 51, 22854, 90, 9527, 51, 11, 45, 11, 22658, 51, 11, 5497, 82, 51, 92, 796, 309, 22854, 90, 9527, 51, 11, 45, 11, 22658, 51, 11, 5497, 82, 51, 92, 810, 1391, 22658, 51, 27, 25, 46141, 35, 1072, 92, 198, 198, 35, 1072, 90, 51, 11, 14719, 92, 7, 87, 3712, 35, 1072, 90, 51, 11, 18056, 30072, 810, 1391, 51, 27, 25, 15057, 11, 14719, 27, 25, 46141, 19182, 11, 18056, 27, 25, 19182, 92, 796, 360, 1072, 90, 51, 11, 14719, 92, 7, 46141, 19182, 7, 87, 4008, 198, 35, 1072, 90, 51, 11, 14719, 92, 7, 87, 3712, 35, 1072, 90, 51, 11, 18056, 30072, 810, 1391, 51, 27, 25, 15057, 11, 14719, 27, 25, 19182, 11, 18056, 27, 25, 46141, 19182, 92, 796, 360, 1072, 90, 51, 11, 14719, 92, 7, 33327, 7, 87, 13, 7890, 4008, 198, 35, 1072, 90, 51, 11, 311, 92, 7, 7857, 3712, 46541, 8, 810, 1391, 51, 11, 311, 27, 25, 46141, 19182, 90, 27, 25, 51, 11709, 796, 360, 1072, 90, 51, 11, 311, 92, 7, 46141, 3163, 20477, 13, 9107, 418, 7, 51, 11, 2546, 4008, 198, 8818, 360, 1072, 90, 51, 11, 311, 92, 7, 87, 3712, 51, 11, 2546, 3712, 46541, 8, 810, 1391, 51, 11, 311, 27, 25, 46141, 19182, 90, 27, 25, 51, 11709, 198, 220, 220, 220, 5240, 796, 14496, 19182, 90, 51, 92, 7, 917, 891, 11, 2546, 8, 198, 220, 220, 220, 6070, 0, 7, 3258, 11, 2124, 8, 198, 220, 220, 220, 360, 1072, 90, 51, 11, 311, 92, 7, 3258, 8, 198, 437, 198, 14881, 13, 33327, 7, 87, 3712, 46141, 35, 1072, 90, 51, 30072, 810, 1391, 51, 27, 25, 15057, 92, 796, 360, 1072, 7, 33327, 7, 87, 13, 7890, 4008, 198, 14881, 13, 41887, 7, 3712, 6030, 90, 35, 1072, 90, 9527, 51, 11, 32751, 11709, 8, 810, 1391, 9527, 51, 11, 32751, 27, 25, 46141, 19182, 92, 796, 360, 1072, 90, 41887, 7, 9527, 51, 828, 46141, 38469, 90, 41887, 7, 9527, 51, 828, 10528, 11709, 198, 198, 46141, 3163, 20477, 13, 46141, 19182, 7, 87, 3712, 46141, 35, 1072, 90, 9527, 51, 30072, 810, 1391, 9527, 51, 92, 796, 14496, 38469, 90, 9527, 51, 92, 7, 7890, 7, 87, 4008, 198, 46141, 3163, 20477, 13, 46141, 19182, 90, 9527, 51, 11, 399, 92, 7, 87, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 399, 30072, 810, 1391, 9527, 51, 11, 399, 92, 796, 14496, 19182, 90, 9527, 51, 11, 399, 92, 7, 3447, 1758, 7, 7890, 7, 8095, 7, 87, 36911, 5391, 82, 7, 521, 82, 7, 87, 35514, 198, 46141, 3163, 20477, 13, 46141, 19182, 7, 87, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 399, 30072, 810, 1391, 9527, 51, 11, 399, 92, 796, 14496, 19182, 90, 9527, 51, 11, 399, 92, 7, 87, 8, 198, 198, 9, 7, 35, 3712, 35, 1072, 90, 51, 11, 5161, 5512, 87, 3712, 50, 8, 810, 1391, 51, 11, 1404, 27, 25, 46141, 19182, 11, 50, 27, 25, 15057, 92, 796, 360, 1072, 7, 87, 764, 9, 1366, 7, 35, 4008, 198, 198, 14881, 11207, 7, 855, 5769, 3712, 6030, 90, 27, 25, 46141, 35, 1072, 90, 9527, 51, 16, 11, 33538, 721, 16, 92, 5512, 7904, 6030, 90, 27, 25, 46141, 35, 1072, 90, 9527, 51, 17, 11, 33538, 721, 17, 11709, 8, 810, 1391, 9527, 51, 16, 11, 9527, 51, 17, 11, 33538, 721, 16, 11, 33538, 721, 17, 92, 796, 357, 9527, 51, 16, 6624, 2574, 51, 17, 8, 198, 14881, 13, 1136, 9630, 7, 35, 3712, 46141, 35, 1072, 90, 27, 25, 15057, 30072, 220, 220, 220, 220, 220, 220, 796, 2824, 7, 7890, 7, 35, 4008, 21737, 198, 14881, 13, 1136, 9630, 7, 35, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 657, 30072, 796, 3650, 7, 35, 8, 21737, 198, 14993, 451, 2348, 29230, 13, 27237, 7, 51, 3712, 46141, 35, 1072, 51, 22854, 8, 796, 2593, 7, 7890, 7, 8095, 7, 51, 22305, 198, 198, 2, 770, 318, 329, 2099, 12148, 329, 34529, 283, 9, 35, 1072, 198, 8818, 7308, 13, 16963, 1258, 62, 25135, 7, 3712, 6030, 90, 27, 25, 35, 1072, 90, 9527, 51, 16, 11, 46141, 38469, 90, 9527, 51, 16, 11709, 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, 7904, 6030, 90, 9527, 51, 17, 30072, 810, 1391, 9527, 51, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2574, 51, 17, 27, 25, 15057, 92, 198, 220, 2574, 49, 220, 796, 7719, 62, 4906, 7, 9527, 51, 16, 11, 9527, 51, 17, 8, 198, 220, 38692, 49, 796, 14496, 38469, 90, 9527, 49, 92, 198, 220, 1441, 360, 1072, 90, 9527, 49, 11, 53, 721, 49, 92, 198, 437, 198, 198, 8818, 7308, 13, 16321, 7241, 12078, 7, 51, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 45, 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, 9943, 3712, 11251, 29291, 90, 45, 11, 5317, 30072, 810, 1391, 45, 92, 198, 220, 309, 79, 796, 2092, 7, 51, 11, 16321, 1133, 7, 521, 82, 7, 51, 828, 16321, 4008, 198, 220, 9943, 1133, 0, 7, 51, 79, 11, 51, 8, 198, 220, 1441, 309, 79, 198, 437, 198, 198, 8818, 7308, 13, 16321, 7241, 12078, 0, 7, 49, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 45, 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, 309, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 45, 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, 9943, 3712, 11251, 29291, 90, 45, 11, 5317, 30072, 810, 1391, 45, 92, 198, 220, 220, 220, 1441, 9943, 7241, 12078, 3228, 7, 49, 11, 309, 11, 9943, 8, 198, 437, 198, 198, 8818, 9943, 7241, 12078, 3228, 7, 33, 3712, 51, 22854, 90, 9527, 51, 11, 45, 11, 22658, 51, 11, 5497, 82, 33, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 3712, 51, 22854, 90, 9527, 51, 11, 45, 11, 22658, 51, 11, 5497, 82, 32, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9943, 3712, 11251, 29291, 90, 45, 11, 5317, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3712, 22203, 16193, 81, 11, 83, 8, 3784, 16321, 1133, 0, 7, 81, 11, 83, 4008, 810, 1391, 45, 11, 9527, 51, 11, 5497, 82, 33, 11, 5497, 82, 32, 11, 22658, 51, 27, 25, 46141, 35, 1072, 90, 9527, 51, 11709, 198, 220, 317, 271, 796, 773, 82, 7, 32, 8, 198, 220, 38045, 796, 9943, 1133, 7, 521, 82, 7, 32, 828, 9943, 8, 198, 220, 347, 796, 277, 7, 33, 11, 317, 8, 198, 220, 1441, 347, 198, 437, 198, 198, 8818, 7308, 13, 38610, 7, 3712, 6030, 90, 27, 25, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 773, 82, 8, 810, 1391, 9527, 51, 92, 198, 220, 220, 220, 6143, 62, 3258, 796, 14496, 38469, 90, 9527, 51, 92, 7, 917, 891, 11, 27740, 7, 521, 82, 4008, 220, 198, 220, 220, 220, 1441, 309, 22854, 7, 35, 1072, 7, 35350, 62, 3258, 828, 521, 82, 8, 198, 437, 628, 198, 8818, 12076, 0, 7, 49, 3712, 46141, 35, 1072, 51, 22854, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 16, 3712, 46141, 35, 1072, 51, 22854, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 17, 3712, 46141, 35, 1072, 51, 22854, 8, 198, 220, 371, 62, 19608, 796, 43030, 7, 18747, 7, 51, 16, 4008, 9, 7645, 3455, 7, 35138, 7, 18747, 7, 51, 17, 22305, 198, 220, 4866, 1462, 0, 7, 7890, 7, 8095, 7, 49, 36911, 43030, 7, 49, 62, 19608, 4008, 220, 198, 220, 773, 82, 62, 39605, 796, 6441, 521, 82, 7, 521, 82, 7, 51, 16, 828, 521, 82, 7, 51, 17, 4008, 198, 220, 1441, 371, 198, 437, 198, 198, 8818, 2775, 3228, 7, 49, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 24723, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14722, 49, 3712, 11251, 29291, 90, 24723, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 16, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 45, 16, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14722, 51, 16, 3712, 11251, 29291, 90, 45, 16, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 17, 3712, 46141, 35, 1072, 51, 22854, 90, 27, 25, 15057, 11, 45, 17, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14722, 51, 17, 3712, 11251, 29291, 90, 45, 17, 30072, 810, 1391, 24723, 11, 45, 16, 11, 45, 17, 92, 198, 220, 611, 399, 16, 855, 15, 198, 220, 220, 220, 1303, 16926, 46, 25, 6330, 351, 281, 751, 0, 2163, 30, 198, 220, 220, 220, 1303, 1867, 546, 1804, 4600, 49, 764, 28, 309, 16, 21737, 764, 9, 2448, 76, 7241, 35, 12078, 19182, 7, 51, 17, 11, 16321, 8, 63, 30, 198, 220, 220, 220, 9943, 796, 651, 16321, 7, 23912, 1424, 49, 11, 23912, 1424, 51, 17, 8, 198, 220, 220, 220, 649, 51, 17, 796, 309, 22854, 7, 35, 1072, 7, 7890, 7, 8095, 7, 51, 16, 29720, 9, 7890, 7, 8095, 7, 51, 17, 4008, 828, 773, 82, 7, 51, 17, 4008, 198, 220, 220, 220, 9943, 1133, 0, 7, 49, 11, 3605, 51, 17, 8, 198, 220, 2073, 361, 399, 17, 855, 15, 198, 220, 220, 220, 9943, 796, 651, 16321, 7, 23912, 1424, 49, 11, 23912, 1424, 51, 16, 8, 198, 220, 220, 220, 649, 51, 16, 796, 309, 22854, 7, 35, 1072, 7, 7890, 7, 8095, 7, 51, 17, 29720, 9, 7890, 7, 8095, 7, 51, 16, 4008, 828, 773, 82, 7, 51, 16, 4008, 198, 220, 220, 220, 9943, 1133, 0, 7, 49, 11, 3605, 51, 16, 8, 198, 220, 2073, 361, 399, 16, 10, 45, 17, 855, 24723, 198, 220, 220, 220, 1303, 16926, 46, 25, 9943, 1133, 309, 16, 290, 309, 17, 20431, 717, 357, 5171, 307, 517, 6942, 198, 220, 220, 220, 1303, 788, 9943, 15129, 262, 1255, 286, 309, 16, 158, 232, 245, 51, 17, 8, 198, 220, 220, 220, 1303, 16926, 46, 25, 3494, 262, 287, 12, 5372, 2196, 3264, 198, 220, 220, 220, 371, 796, 12076, 3228, 7, 49, 11, 51, 16, 11, 51, 17, 8, 198, 220, 220, 220, 773, 82, 62, 39605, 796, 6441, 521, 82, 7, 521, 82, 7, 51, 16, 828, 521, 82, 7, 51, 17, 4008, 198, 220, 220, 220, 371, 796, 309, 22854, 7, 8095, 7, 49, 828, 773, 82, 62, 39605, 8, 198, 220, 2073, 198, 220, 220, 220, 371, 796, 4808, 28484, 3228, 7, 49, 11, 23912, 1424, 49, 11, 51, 16, 11, 23912, 1424, 51, 16, 11, 51, 17, 11, 23912, 1424, 51, 17, 8, 198, 220, 886, 198, 220, 1441, 371, 198, 437, 198, 198, 8818, 9943, 7241, 12078, 3228, 7, 33, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 15, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 15, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9943, 3712, 11251, 29291, 90, 15, 11, 5317, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 16193, 81, 11, 83, 8, 3784, 16321, 1133, 0, 7, 81, 11, 83, 4008, 810, 1391, 9527, 51, 27, 25, 15057, 92, 198, 220, 220, 220, 327, 82, 796, 277, 7, 33, 11, 317, 8, 198, 220, 220, 220, 1441, 309, 22854, 7, 35, 1072, 7, 35138, 7, 32274, 36911, 12901, 7248, 90, 15, 92, 28955, 220, 198, 437, 198, 198, 8818, 9943, 7241, 12078, 3228, 7, 33, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 45, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 51, 11, 15, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9943, 3712, 11251, 29291, 90, 45, 11, 5317, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 16193, 81, 11, 83, 8, 3784, 16321, 1133, 0, 7, 81, 11, 83, 4008, 810, 1391, 45, 11, 2574, 51, 27, 25, 15057, 92, 198, 220, 220, 220, 327, 271, 796, 9943, 1133, 7, 521, 82, 7, 33, 828, 9943, 8, 198, 220, 220, 220, 327, 82, 796, 277, 7, 33, 11, 317, 8, 198, 220, 220, 220, 1441, 309, 22854, 7, 35, 1072, 7, 35138, 7, 32274, 36911, 327, 271, 8, 220, 198, 437, 198, 198, 8818, 4808, 28484, 0, 7, 4177, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 11, 7792, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5161, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 11, 4535, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22205, 3712, 46141, 35, 1072, 51, 22854, 90, 9527, 11, 32819, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25744, 3712, 4264, 7861, 2964, 18200, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 3712, 15057, 28, 505, 7, 9527, 828, 26638, 3712, 15057, 28, 22570, 7, 9527, 4008, 810, 1391, 9527, 11, 7792, 11, 4535, 11, 32819, 92, 198, 220, 317, 521, 82, 796, 773, 82, 7, 1404, 8, 198, 220, 1215, 12078, 796, 5391, 82, 7, 32, 521, 82, 8, 198, 220, 41211, 82, 796, 773, 82, 7, 19313, 8, 198, 220, 347, 67, 12078, 796, 5391, 82, 7, 36180, 82, 8, 198, 220, 24445, 82, 796, 773, 82, 7, 4177, 8, 198, 220, 327, 67, 12078, 796, 5391, 82, 7, 34, 521, 82, 8, 198, 220, 1215, 1045, 796, 27179, 1758, 7, 7890, 7, 8095, 7, 1404, 36911, 2782, 12078, 8, 198, 220, 347, 7890, 796, 27179, 1758, 7, 7890, 7, 8095, 7, 19313, 36911, 33, 67, 12078, 8, 198, 220, 327, 7890, 796, 27179, 1758, 7, 7890, 7, 8095, 7, 4177, 36911, 34, 67, 12078, 8, 198, 220, 23407, 796, 2219, 521, 82, 7, 32, 521, 82, 11, 41211, 82, 8, 198, 220, 317, 62, 8807, 796, 3748, 521, 82, 7, 32, 521, 82, 11, 41211, 82, 8, 198, 220, 347, 62, 8807, 796, 3748, 521, 82, 7, 36180, 82, 11, 317, 521, 82, 8, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 3642, 20216, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 611, 4129, 7, 32, 62, 8807, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 32, 62, 8807, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 886, 198, 220, 611, 4129, 7, 33, 62, 8807, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 33, 62, 8807, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 886, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 521, 82, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 36180, 82, 4008, 198, 220, 269, 23047, 521, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 34, 521, 82, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 521, 82, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 36180, 82, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 14158, 8, 287, 27056, 378, 7, 34, 521, 82, 8, 198, 220, 220, 220, 220, 220, 269, 23047, 521, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 291, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 4686, 62, 404, 220, 220, 220, 796, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 8633, 62, 2539, 796, 13538, 198, 220, 329, 36624, 287, 19974, 7, 310, 66, 521, 82, 11, 327, 67, 12078, 8, 198, 220, 220, 220, 220, 220, 8633, 62, 2539, 1635, 28, 4731, 7, 535, 58, 16, 12962, 1635, 366, 553, 1635, 4731, 7, 535, 58, 17, 12962, 1635, 366, 553, 198, 220, 886, 220, 198, 220, 329, 257, 64, 287, 19974, 7, 310, 391, 9310, 11, 1215, 12078, 8, 198, 220, 220, 220, 220, 220, 8633, 62, 2539, 1635, 28, 4731, 7, 7252, 58, 16, 12962, 1635, 366, 553, 1635, 4731, 7, 7252, 58, 17, 12962, 1635, 366, 553, 198, 220, 886, 220, 198, 220, 329, 275, 65, 287, 19974, 7, 310, 21653, 82, 11, 347, 67, 12078, 8, 198, 220, 220, 220, 220, 220, 8633, 62, 2539, 1635, 28, 4731, 7, 11848, 58, 16, 12962, 1635, 366, 553, 1635, 4731, 7, 11848, 58, 17, 12962, 1635, 366, 553, 198, 220, 886, 198, 220, 611, 468, 2539, 7, 1677, 53, 11, 366, 34, 3843, 16938, 1581, 62, 39371, 2394, 41884, 4943, 11405, 1949, 29572, 7, 5317, 11, 12964, 53, 14692, 34, 3843, 16938, 1581, 62, 39371, 2394, 41884, 8973, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 4264, 7861, 3646, 504, 11, 8633, 62, 2539, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 62, 2100, 796, 2345, 7861, 3646, 504, 58, 11600, 62, 2539, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 2188, 220, 796, 8633, 62, 2100, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 11578, 220, 796, 8633, 62, 2100, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 7890, 796, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 3642, 7861, 0, 7, 17394, 11, 1215, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 4686, 62, 404, 11, 347, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 828, 4686, 62, 404, 11, 27169, 11, 327, 7890, 11, 20650, 90, 12441, 92, 7, 310, 66, 521, 82, 828, 4686, 62, 404, 11, 4686, 62, 404, 26, 435, 2188, 28, 282, 2188, 8, 198, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9052, 832, 477, 435, 70, 418, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2298, 262, 14162, 530, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3650, 326, 1410, 0, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 2435, 796, 352, 68, 21, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 11578, 796, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 282, 2188, 796, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 14016, 418, 796, 6524, 90, 5317, 2624, 92, 7, 34, 62, 33991, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 8968, 22854, 4264, 7861, 11518, 2348, 70, 418, 7, 9806, 62, 14016, 418, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4259, 1752, 262, 584, 3689, 389, 12395, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 14016, 418, 796, 2824, 7, 34, 600, 7, 46141, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 1847, 11230, 62, 18851, 51, 2599, 34, 600, 7, 9806, 62, 14016, 418, 21737, 532, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 435, 70, 418, 796, 2824, 7, 34, 600, 7, 46141, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 1847, 11230, 62, 18851, 51, 2599, 34, 600, 32590, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 435, 2188, 287, 9575, 7, 14016, 418, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5661, 62, 11578, 796, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 3642, 7861, 62, 11578, 7, 2782, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 4686, 62, 404, 11, 347, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 828, 4686, 62, 404, 11, 327, 7890, 11, 20650, 90, 12441, 92, 7, 310, 66, 521, 82, 828, 4686, 62, 404, 11, 4686, 62, 404, 26, 435, 2188, 28, 46141, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 8968, 22854, 2348, 2188, 62, 83, 7, 282, 2188, 828, 7694, 28, 46141, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 33249, 4303, 11598, 62, 22921, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 7890, 11, 428, 62, 2435, 11, 9881, 11, 308, 310, 524, 11, 1066, 32332, 82, 796, 2488, 16514, 276, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 3642, 7861, 0, 7, 17394, 11, 1215, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 4686, 62, 404, 11, 347, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 828, 4686, 62, 404, 11, 27169, 11, 327, 7890, 11, 20650, 90, 12441, 92, 7, 310, 66, 521, 82, 828, 4686, 62, 404, 11, 4686, 62, 404, 26, 435, 2188, 28, 46141, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 8968, 22854, 2348, 2188, 62, 83, 7, 282, 2188, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 428, 62, 2435, 1279, 1266, 62, 2435, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 2435, 796, 428, 62, 2435, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13466, 62, 11578, 796, 428, 62, 11578, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 282, 2188, 796, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 8968, 22854, 2348, 2188, 62, 83, 7, 282, 2188, 8, 198, 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, 4929, 11454, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 366, 2348, 42289, 720, 282, 2188, 407, 4855, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2345, 7861, 3646, 504, 58, 11600, 62, 2539, 60, 796, 1266, 62, 282, 2188, 198, 220, 220, 220, 220, 220, 886, 198, 220, 2073, 198, 220, 220, 220, 220, 220, 327, 7890, 796, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 3642, 7861, 0, 7, 17394, 11, 1215, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 4686, 62, 404, 11, 347, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 828, 4686, 62, 404, 11, 27169, 11, 327, 7890, 11, 20650, 90, 12441, 92, 7, 310, 66, 521, 82, 828, 4686, 62, 404, 11, 4686, 62, 404, 8, 198, 220, 886, 198, 220, 1441, 2560, 7, 34, 7890, 8, 198, 437, 198, 198, 8818, 7308, 11207, 33747, 33, 3712, 46141, 35, 1072, 51, 22854, 11, 317, 3712, 46141, 35, 1072, 51, 22854, 8, 198, 220, 1034, 34, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 32, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 2246, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 29266, 198, 220, 317, 271, 796, 773, 82, 7, 32, 8, 198, 220, 38045, 796, 773, 82, 7, 33, 8, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 521, 82, 7, 32, 4008, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 8095, 7, 32, 4008, 198, 220, 347, 7890, 796, 1366, 7, 8095, 7, 33, 4008, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 269, 23047, 521, 82, 796, 4866, 7, 310, 21653, 82, 8, 198, 220, 327, 796, 14496, 3163, 20477, 13, 9107, 418, 7, 417, 4906, 7, 33, 7890, 828, 5391, 82, 7, 33, 271, 4008, 198, 220, 327, 3843, 16938, 1581, 13, 30854, 3083, 33, 3219, 0, 7, 505, 7, 417, 4906, 7, 2782, 1045, 36911, 27179, 1758, 2782, 1045, 11, 269, 3153, 9310, 11, 1034, 32, 11, 530, 7, 417, 4906, 7, 33, 7890, 36911, 27179, 1758, 33, 7890, 11, 269, 83, 21653, 82, 11, 1034, 34, 11, 327, 11, 269, 23047, 521, 82, 11, 1034, 2246, 8, 198, 220, 4866, 1462, 0, 7, 7890, 7, 8095, 7, 33, 36911, 43030, 7, 34, 4008, 198, 220, 1441, 347, 198, 437, 198, 198, 8818, 7308, 11207, 33747, 33, 3712, 46141, 35, 1072, 11, 38045, 3712, 15732, 7248, 11, 317, 3712, 46141, 35, 1072, 11, 317, 271, 3712, 15732, 7248, 8, 198, 220, 1034, 32, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 34, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 2246, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 29266, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 32, 8, 198, 220, 347, 7890, 796, 1366, 7, 33, 8, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 269, 23047, 521, 82, 796, 4866, 7, 310, 21653, 82, 8, 198, 220, 327, 796, 14496, 3163, 20477, 13, 9107, 418, 7, 417, 4906, 7, 33, 7890, 828, 5391, 82, 7, 33, 271, 4008, 198, 220, 327, 271, 796, 38045, 198, 220, 327, 796, 327, 3843, 16938, 1581, 13, 30854, 3083, 33, 3219, 0, 7, 16, 11, 27179, 1758, 2782, 1045, 11, 269, 3153, 9310, 11, 1034, 32, 11, 352, 11, 27179, 1758, 33, 7890, 11, 269, 83, 21653, 82, 11, 1034, 34, 11, 327, 11, 269, 23047, 521, 82, 11, 1034, 2246, 8, 198, 220, 4866, 1462, 0, 7, 7890, 7, 33, 828, 43030, 7, 34, 4008, 198, 220, 1441, 327, 198, 437, 198, 198, 8818, 7308, 11207, 30420, 33, 3712, 46141, 35, 1072, 51, 22854, 11, 317, 3712, 46141, 35, 1072, 51, 22854, 8, 198, 220, 1034, 34, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 32, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 2246, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 29266, 198, 220, 317, 271, 796, 773, 82, 7, 32, 8, 198, 220, 38045, 796, 773, 82, 7, 33, 8, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 521, 82, 7, 32, 4008, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 8095, 7, 32, 4008, 198, 220, 347, 7890, 796, 1366, 7, 8095, 7, 33, 4008, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 269, 23047, 521, 82, 796, 4866, 7, 310, 21653, 82, 8, 198, 220, 327, 796, 14496, 3163, 20477, 13, 9107, 418, 7, 417, 4906, 7, 33, 7890, 828, 5391, 82, 7, 33, 271, 4008, 198, 220, 327, 3843, 16938, 1581, 13, 30854, 3083, 33, 3219, 0, 7, 505, 7, 417, 4906, 7, 2782, 1045, 36911, 27179, 1758, 2782, 1045, 11, 269, 3153, 9310, 11, 1034, 32, 11, 532, 505, 7, 417, 4906, 7, 33, 7890, 36911, 27179, 1758, 33, 7890, 11, 269, 83, 21653, 82, 11, 1034, 34, 11, 327, 11, 269, 23047, 521, 82, 11, 1034, 2246, 8, 198, 220, 4866, 1462, 0, 7, 7890, 7, 8095, 7, 33, 36911, 43030, 7, 34, 4008, 198, 220, 1441, 347, 198, 437, 198, 198, 8818, 7308, 11207, 30420, 32, 3712, 46141, 35, 1072, 11, 317, 271, 3712, 15732, 7248, 11, 347, 3712, 46141, 35, 1072, 11, 38045, 3712, 15732, 7248, 8, 198, 220, 1034, 32, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 34, 220, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 25256, 9050, 198, 220, 1034, 2246, 796, 327, 3843, 16938, 1581, 13, 34, 3843, 16938, 1581, 62, 3185, 62, 29266, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 32, 8, 198, 220, 347, 7890, 796, 1366, 7, 33, 8, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 269, 23047, 521, 82, 796, 4866, 7, 310, 21653, 82, 8, 198, 220, 327, 796, 14496, 3163, 20477, 13, 9107, 418, 7, 417, 4906, 7, 33, 7890, 828, 5391, 82, 7, 33, 271, 4008, 198, 220, 327, 271, 796, 38045, 198, 220, 327, 796, 327, 3843, 16938, 1581, 13, 30854, 3083, 33, 3219, 0, 7, 505, 7, 417, 4906, 7, 2782, 1045, 36911, 27179, 1758, 2782, 1045, 11, 269, 3153, 9310, 11, 1034, 32, 11, 532, 505, 7, 417, 4906, 7, 33, 7890, 36911, 27179, 1758, 33, 7890, 11, 269, 83, 21653, 82, 11, 1034, 34, 11, 327, 11, 269, 23047, 521, 82, 11, 1034, 2246, 8, 198, 220, 4866, 1462, 0, 7, 7890, 7, 33, 828, 43030, 7, 34, 4008, 198, 220, 1441, 327, 198, 437, 198, 198, 8818, 7308, 13, 16321, 1133, 0, 7, 33, 3712, 46141, 35, 1072, 51, 22854, 11, 317, 3712, 46141, 35, 1072, 51, 22854, 8, 198, 220, 317, 271, 796, 773, 82, 7, 32, 8, 198, 220, 38045, 796, 773, 82, 7, 33, 8, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 8095, 7, 32, 4008, 198, 220, 347, 7890, 796, 1366, 7, 8095, 7, 33, 4008, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 220, 198, 220, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 16321, 7094, 0, 7, 505, 7, 417, 4906, 7, 2782, 1045, 36911, 27179, 1758, 2782, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 27179, 1758, 33, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 4008, 220, 198, 220, 1441, 43030, 7, 3447, 1758, 33, 7890, 8, 220, 198, 437, 198, 198, 8818, 7308, 13, 16321, 1133, 0, 7, 33, 3712, 46141, 35, 1072, 11, 38045, 3712, 15732, 7248, 11, 317, 3712, 46141, 35, 1072, 11, 317, 271, 3712, 15732, 7248, 8, 198, 220, 773, 62, 11600, 796, 20650, 90, 15732, 92, 3419, 198, 220, 329, 357, 312, 87, 11, 1312, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 62, 11600, 11, 1312, 8, 198, 220, 886, 198, 220, 1215, 1045, 796, 1366, 7, 32, 8, 198, 220, 347, 7890, 796, 1366, 7, 33, 8, 198, 220, 27179, 1758, 33, 7890, 796, 27179, 1758, 7, 33, 7890, 11, 67, 12078, 7, 33, 271, 4008, 198, 220, 27179, 1758, 2782, 1045, 796, 27179, 1758, 7, 2782, 1045, 11, 67, 12078, 7, 32, 271, 4008, 198, 220, 269, 3153, 9310, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 32, 271, 4008, 198, 220, 269, 83, 21653, 82, 796, 1976, 27498, 7, 5317, 11, 4129, 7, 33, 271, 4008, 198, 220, 329, 357, 4178, 11, 220, 544, 8, 287, 27056, 378, 7, 32, 271, 8, 198, 220, 220, 220, 220, 220, 269, 3153, 9310, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 544, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 329, 357, 4178, 11, 24283, 8, 287, 27056, 378, 7, 33, 271, 8, 198, 220, 220, 220, 220, 220, 269, 83, 21653, 82, 58, 4178, 60, 796, 1064, 11085, 7, 87, 3784, 87, 855, 571, 11, 773, 62, 11600, 8, 198, 220, 886, 198, 220, 220, 198, 220, 14496, 3163, 20477, 13, 34, 3843, 16938, 1581, 13, 16321, 7094, 0, 7, 505, 7, 417, 4906, 7, 2782, 1045, 36911, 27179, 1758, 2782, 1045, 11, 20650, 90, 12441, 92, 7, 310, 391, 9310, 828, 27179, 1758, 33, 7890, 11, 20650, 90, 12441, 92, 7, 310, 21653, 82, 4008, 220, 198, 220, 1441, 43030, 7, 3447, 1758, 33, 7890, 8, 220, 198, 437, 628 ]
1.967434
6,909
using FEMBase, Test # From the beginning of a project we had a clear concept in our mind: "everything # is a field". That is, everything can vary temporally and spatially. We think # that constant is just a special case of field which does not vary in temporal # nor spatial direction. Fields can vary in spatial direction, i.e. can be either # constant or variable, and in temporal direction, i.e. can be time variant or # time invariant. From this pondering we can think that there exists four kind of # (discrete) fields: # - discrete, constant, time invariant (DCTI) # - discrete, variable, time invariant (DVTI) # - discrete, constant, time variant (DCTV) # - discrete, variable, time variant (DVTV) # Discrete, in this context, means that field is defined in point-wise in # $1 \ldots n$ locations, from where it is then interpolated to whole domain # using some interpolation polynomials, i.e. # ```math # u(\xi, t) = \sum_{i} u_i[t] N_{i}(\xi,t), # ```math # where # $N_{i}(\xi, t)$ # is the basis function or interpolation polymial corresponding to $i$^{th} # discrete value and # $u_{i}$ # is the discrete value. # Then we have continuous fields, which are defined in whole domain, or at least # not point-wise. By following the already used abbreviations, we have four more # fields: # - continuous, constant, time invariant (CCTI) # - continuous, variable, time invariant (CVTI) # - continuous, constant, time variant (DCTV) # - continuous, variable, time variant (CVTV) # Continuous, again in this context, does not mean that field has to be defined # everywhere. It's enough that it's defined in function of spatial and/or temporal # coordinates, i.e. we have $u \equiv u(\xi, t)$, without a some spesific basis # needed to interpolate from discrete values. # Field itself can be in principle anything. However, usually either scalar, # vector or tensor (matrix). Time does not to have be real, it can be for example # angle of some rotating machine or even complex value. # From these starting points, we assume that the mentioned field system can # describe all imaginable situations. # ## Creating new fields # For discrete fields that are varying in spatial direction, value for each # discrete point is defined using NTuple. The order of points is implicitly # assumed to be same than node ordering in ABAQUS. That is, first corner nodes # in anti-clockwise direction and after that middle nodes. # For example, `(1, 2, 3, 4)` is a scalar field having length of 4 and # `([1,2],[2,3],[3,4],[4,5])` is a vector field having length of 4. # For fields that are varying in temporal direction, `time => value` syntax is # used. The first item in pair is time (or similar) and second item is value # assigned to that time. For example, `0.0 => 1.0` is a time-dependent scalar # field having value 1.0 at time 0.0. # ## Dicrete, constant, time invariant field (DCTI) # The most simple field is a field that is constant in both time and spatial # direction. Discrete, constant, time invariant field. For example, youngs # modulus could be this kind of field. a = DCTI(1) # Accessing data is done using `interpolate`. In FEM codes, we try to hide the # actual type of the field, so for example interpolating constant field works, # but the result is quite unsuprising. @test interpolate(a, 0.0) == 1 # Field value value can be updated with `update!` function: update!(a, 2) @test a == 2 # Constant field of course doesn't have to be scalar field. It can be e.g. # vector field. I use here packate Tensors.jl because of its excellent # performance and other features, but normal `Vector` would work just fine # also: using Tensors b = DCTI(Vec(1, 2)) # Interpolation, again, returns just the original data: @test interpolate(b, 0.0) == [1, 2] # Updating field is done using `update!`-function: update!(b, Vec(2, 3)) @test interpolate(b, 0.0) == [2, 3] # Constant tensor field: c = DCTI(Tensor{2,2}((1.0, 2.0, 3.0, 4.0))) # Data can be accessed also using `getindex`. Also things like `length` and # `size` are defined. @test interpolate(c, 0.0) == [1 3; 2 4] @test c[1] == [1 3; 2 4] @test length(c) == 4 @test size(c) == (2, 2) # For now everything might look like extra complexity, but later on we see how # to combine field with some basis functions in order to interpolate in element # domain. Another nice feature is that we can interpolate fields in time. In this # particular case of time invariant fields it of course doesn't give anything # extra. # ## Dicrete, variable, time invariant fields (DVTI) @testset "DVTI field" begin # scalar field a = DVTI((1, 2)) @test a[1] == 1 @test a[2] == 2 @test interpolate(a, 0.0) == (1, 2) update!(a, (2, 3)) @test a == (2, 3) @test (2, 3) == a # vector field b = DVTI(([1, 2], [2, 3])) @test b[1] == [1, 2] @test b[2] == [2, 3] @test interpolate(b, 0.0) == ([1, 2], [2, 3]) update!(b, ([2, 3], [4, 5])) @test b == ([2, 3], [4, 5]) # tensor field c = DVTI(([1 2; 3 4], [2 3; 4 5])) @test c[1] == [1 2; 3 4] @test c[2] == [2 3; 4 5] @test interpolate(c, 0.0) == ([1 2; 3 4], [2 3; 4 5]) update!(c, ([2 3; 4 5], [5 6; 7 8])) @test c == ([2 3; 4 5], [5 6; 7 8]) d = DVTI(2, 3) @test a == d end @testset "DCTV field" begin # scalar field a = DCTV(0.0 => 0.0, 1.0 => 1.0) @test isapprox(interpolate(a, -1.0), 0.0) @test isapprox(interpolate(a, 0.0), 0.0) @test isapprox(interpolate(a, 0.5), 0.5) @test isapprox(interpolate(a, 1.0), 1.0) update!(a, 1.0 => 2.0) @test isapprox(interpolate(a, 0.5), 1.0) update!(a, 2.0 => 1.0) @test isapprox(interpolate(a, 1.5), 1.5) # vector field b = DCTV(0.0 => [1.0, 2.0], 1.0 => [2.0, 3.0]) @test isapprox(interpolate(b, 0.5), [1.5, 2.5]) # tensor field c = DCTV(0.0 => [1.0 2.0; 3.0 4.0], 1.0 => [2.0 3.0; 4.0 5.0]) @test isapprox(interpolate(c, 0.5), [1.5 2.5; 3.5 4.5]) end @testset "DVTV field" begin # scalar field a = DVTV(0.0 => (0.0, 1.0), 1.0 => (1.0, 0.0)) update!(a, 2.0 => (2.0, 0.0)) r = interpolate(a, 0.5) @test isapprox(r[1], 0.5) @test isapprox(r[2], 0.5) update!(a, 2.0 => (4.0, 0.0)) end @testset "CVTV field" begin f = CVTV((xi, t) -> xi[1] * xi[2] * t) @test isapprox(f([1.0, 2.0], 3.0), 6.0) end @testset "Dictionary fields" begin X = Dict(1 => [0.0, 0.0], 1000 => [1.0, 0.0], 100000 => [1.0, 1.0]) G = DVTId(X) @test isapprox(G[1], X[1]) @test isapprox(G[1000], X[1000]) @test isapprox(G[100000], X[100000]) Y = Dict(1 => [2.0, 2.0], 1000 => [3.0, 2.0], 100000 => [3.0, 3.0]) F = DVTVd(0.0 => X, 1.0 => Y) @test isapprox(interpolate(F, 0.5)[100000], [2.0, 2.0]) end @testset "update dictionary field" begin f1 = Dict(1 => 1.0, 2 => 2.0, 3 => 3.0) f2 = Dict(1 => 2.0, 2 => 3.0, 3 => 4.0) fld = DVTVd(0.0 => f1) update!(fld, 1.0 => f2) @test isapprox(interpolate(fld, 0.5)[1], 1.5) update!(fld, 1.0 => f1) @test isapprox(interpolate(fld, 0.5)[1], 1.0) end @testset "use of common constructor field" begin @test isa(field(1.0), DCTI) @test isa(field(1.0 => 1.0), DCTV) @test isa(field((1.0, 2.0)), DVTI) @test isa(field(1, 2), DVTI) @test isa(field(1.0 => (1.0, 2.0)), DVTV) @test isa(field((xi, t) -> xi[1] * t), CVTV) @test isa(field(1 => [1.0, 2.0], 10 => [2.0, 3.0]), DVTId) @test isa(field(0.0 => (1 => 1.0, 10 => 2.0), 1.0 => (1 => 2.0, 10 => 3.0)), DVTVd) X = Dict(1 => [0.0, 0.0], 2 => [1.0, 0.0]) X1 = field(X) X2 = field(0.0 => X) @test isa(X1, DVTId) @test isa(X2, DVTVd) end @testset "general interpolation" begin a = [1, 2, 3] b = (2, 3, 4) @test interpolate(a, b) == 2 + 6 + 12 a = (1, 2) b = (2, 3, 4) @test interpolate(a, b) == 2 + 6 @test_throws AssertionError interpolate(b, a) end
[ 3500, 376, 3620, 14881, 11, 6208, 198, 198, 2, 3574, 262, 3726, 286, 257, 1628, 356, 550, 257, 1598, 3721, 287, 674, 2000, 25, 366, 37814, 198, 2, 318, 257, 2214, 1911, 1320, 318, 11, 2279, 460, 7565, 10042, 453, 290, 15246, 1927, 13, 775, 892, 198, 2, 326, 6937, 318, 655, 257, 2041, 1339, 286, 2214, 543, 857, 407, 7565, 287, 21964, 198, 2, 4249, 21739, 4571, 13, 23948, 460, 7565, 287, 21739, 4571, 11, 1312, 13, 68, 13, 460, 307, 2035, 198, 2, 6937, 393, 7885, 11, 290, 287, 21964, 4571, 11, 1312, 13, 68, 13, 460, 307, 640, 15304, 393, 198, 2, 640, 25275, 415, 13, 3574, 428, 16723, 1586, 356, 460, 892, 326, 612, 7160, 1440, 1611, 286, 198, 2, 357, 15410, 8374, 8, 7032, 25, 198, 198, 2, 532, 28810, 11, 6937, 11, 640, 25275, 415, 357, 35, 4177, 40, 8, 198, 2, 532, 28810, 11, 7885, 11, 640, 25275, 415, 357, 35, 53, 25621, 8, 198, 2, 532, 28810, 11, 6937, 11, 640, 15304, 357, 35, 30428, 8, 198, 2, 532, 28810, 11, 7885, 11, 640, 15304, 357, 35, 53, 6849, 8, 198, 198, 2, 8444, 8374, 11, 287, 428, 4732, 11, 1724, 326, 2214, 318, 5447, 287, 966, 12, 3083, 287, 198, 2, 720, 16, 3467, 335, 1747, 299, 3, 7064, 11, 422, 810, 340, 318, 788, 39555, 515, 284, 2187, 7386, 198, 2, 1262, 617, 39555, 341, 745, 6213, 296, 8231, 11, 1312, 13, 68, 13, 198, 2, 7559, 63, 11018, 198, 2, 334, 38016, 29992, 11, 256, 8, 796, 3467, 16345, 23330, 72, 92, 334, 62, 72, 58, 83, 60, 399, 23330, 72, 92, 38016, 29992, 11, 83, 828, 198, 2, 7559, 63, 11018, 198, 2, 810, 198, 2, 220, 220, 220, 220, 720, 45, 23330, 72, 92, 38016, 29992, 11, 256, 8, 3, 198, 2, 318, 262, 4308, 2163, 393, 39555, 341, 7514, 76, 498, 11188, 284, 720, 72, 3, 36796, 400, 92, 198, 2, 28810, 1988, 290, 220, 198, 2, 220, 220, 220, 220, 720, 84, 23330, 72, 92, 3, 198, 2, 318, 262, 28810, 1988, 13, 198, 198, 2, 3244, 356, 423, 12948, 7032, 11, 543, 389, 5447, 287, 2187, 7386, 11, 393, 379, 1551, 198, 2, 407, 966, 12, 3083, 13, 2750, 1708, 262, 1541, 973, 37640, 602, 11, 356, 423, 1440, 517, 198, 2, 7032, 25, 198, 198, 2, 532, 12948, 11, 6937, 11, 640, 25275, 415, 357, 4093, 25621, 8, 198, 2, 532, 12948, 11, 7885, 11, 640, 25275, 415, 357, 33538, 25621, 8, 198, 2, 532, 12948, 11, 6937, 11, 640, 15304, 357, 35, 30428, 8, 198, 2, 532, 12948, 11, 7885, 11, 640, 15304, 357, 33538, 6849, 8, 198, 198, 2, 45012, 11, 757, 287, 428, 4732, 11, 857, 407, 1612, 326, 2214, 468, 284, 307, 5447, 198, 2, 8347, 13, 632, 338, 1576, 326, 340, 338, 5447, 287, 2163, 286, 21739, 290, 14, 273, 21964, 198, 2, 22715, 11, 1312, 13, 68, 13, 356, 423, 720, 84, 3467, 4853, 452, 334, 38016, 29992, 11, 256, 8, 47113, 1231, 257, 617, 599, 274, 811, 4308, 198, 2, 2622, 284, 39555, 378, 422, 28810, 3815, 13, 220, 198, 198, 2, 7663, 2346, 460, 307, 287, 7989, 1997, 13, 2102, 11, 3221, 2035, 16578, 283, 11, 198, 2, 15879, 393, 11192, 273, 357, 6759, 8609, 737, 3862, 857, 407, 284, 423, 307, 1103, 11, 340, 460, 307, 329, 1672, 198, 2, 9848, 286, 617, 24012, 4572, 393, 772, 3716, 1988, 13, 220, 198, 198, 2, 3574, 777, 3599, 2173, 11, 356, 7048, 326, 262, 4750, 2214, 1080, 460, 198, 2, 6901, 477, 40758, 7445, 13, 198, 198, 2, 22492, 30481, 649, 7032, 198, 198, 2, 1114, 28810, 7032, 326, 389, 15874, 287, 21739, 4571, 11, 1988, 329, 1123, 198, 2, 28810, 966, 318, 5447, 1262, 24563, 29291, 13, 383, 1502, 286, 2173, 318, 31821, 198, 2, 9672, 284, 307, 976, 621, 10139, 16216, 287, 317, 4339, 48, 2937, 13, 1320, 318, 11, 717, 5228, 13760, 198, 2, 287, 3098, 12, 15750, 3083, 4571, 290, 706, 326, 3504, 13760, 13, 198, 198, 2, 1114, 1672, 11, 4600, 7, 16, 11, 362, 11, 513, 11, 604, 8, 63, 318, 257, 16578, 283, 2214, 1719, 4129, 286, 604, 290, 198, 2, 4600, 26933, 16, 11, 17, 38430, 17, 11, 18, 38430, 18, 11, 19, 38430, 19, 11, 20, 12962, 63, 318, 257, 15879, 2214, 1719, 4129, 286, 604, 13, 198, 198, 2, 1114, 7032, 326, 389, 15874, 287, 21964, 4571, 11, 4600, 2435, 5218, 1988, 63, 15582, 318, 198, 2, 973, 13, 383, 717, 2378, 287, 5166, 318, 640, 357, 273, 2092, 8, 290, 1218, 2378, 318, 1988, 220, 198, 2, 8686, 284, 326, 640, 13, 1114, 1672, 11, 4600, 15, 13, 15, 5218, 352, 13, 15, 63, 318, 257, 640, 12, 21186, 16578, 283, 198, 2, 2214, 1719, 1988, 352, 13, 15, 379, 640, 657, 13, 15, 13, 198, 198, 2, 22492, 360, 291, 8374, 11, 6937, 11, 640, 25275, 415, 2214, 357, 35, 4177, 40, 8, 198, 198, 2, 383, 749, 2829, 2214, 318, 257, 2214, 326, 318, 6937, 287, 1111, 640, 290, 21739, 198, 2, 4571, 13, 8444, 8374, 11, 6937, 11, 640, 25275, 415, 2214, 13, 1114, 1672, 11, 1862, 82, 198, 2, 953, 23515, 714, 307, 428, 1611, 286, 2214, 13, 198, 198, 64, 796, 360, 4177, 40, 7, 16, 8, 198, 198, 2, 8798, 278, 1366, 318, 1760, 1262, 4600, 3849, 16104, 378, 44646, 554, 376, 3620, 12416, 11, 356, 1949, 284, 7808, 262, 198, 2, 4036, 2099, 286, 262, 2214, 11, 523, 329, 1672, 39555, 803, 6937, 2214, 2499, 11, 198, 2, 475, 262, 1255, 318, 2407, 5576, 929, 22610, 13, 198, 198, 31, 9288, 39555, 378, 7, 64, 11, 657, 13, 15, 8, 6624, 352, 198, 198, 2, 7663, 1988, 1988, 460, 307, 6153, 351, 4600, 19119, 0, 63, 2163, 25, 198, 198, 19119, 0, 7, 64, 11, 362, 8, 198, 31, 9288, 257, 6624, 362, 198, 198, 2, 20217, 2214, 286, 1781, 1595, 470, 423, 284, 307, 16578, 283, 2214, 13, 632, 460, 307, 304, 13, 70, 13, 198, 2, 15879, 2214, 13, 314, 779, 994, 2353, 378, 40280, 669, 13, 20362, 780, 286, 663, 6275, 198, 2, 2854, 290, 584, 3033, 11, 475, 3487, 4600, 38469, 63, 561, 670, 655, 3734, 198, 2, 635, 25, 198, 198, 3500, 40280, 669, 198, 198, 65, 796, 360, 4177, 40, 7, 53, 721, 7, 16, 11, 362, 4008, 198, 198, 2, 4225, 16104, 341, 11, 757, 11, 5860, 655, 262, 2656, 1366, 25, 198, 198, 31, 9288, 39555, 378, 7, 65, 11, 657, 13, 15, 8, 6624, 685, 16, 11, 362, 60, 198, 198, 2, 3205, 38734, 2214, 318, 1760, 1262, 4600, 19119, 0, 63, 12, 8818, 25, 198, 198, 19119, 0, 7, 65, 11, 38692, 7, 17, 11, 513, 4008, 198, 31, 9288, 39555, 378, 7, 65, 11, 657, 13, 15, 8, 6624, 685, 17, 11, 513, 60, 198, 198, 2, 20217, 11192, 273, 2214, 25, 198, 198, 66, 796, 360, 4177, 40, 7, 51, 22854, 90, 17, 11, 17, 92, 19510, 16, 13, 15, 11, 362, 13, 15, 11, 513, 13, 15, 11, 604, 13, 15, 22305, 198, 198, 2, 6060, 460, 307, 17535, 635, 1262, 4600, 1136, 9630, 44646, 4418, 1243, 588, 4600, 13664, 63, 290, 198, 2, 4600, 7857, 63, 389, 5447, 13, 198, 198, 31, 9288, 39555, 378, 7, 66, 11, 657, 13, 15, 8, 6624, 685, 16, 513, 26, 362, 604, 60, 198, 31, 9288, 269, 58, 16, 60, 6624, 685, 16, 513, 26, 362, 604, 60, 198, 31, 9288, 4129, 7, 66, 8, 6624, 604, 198, 31, 9288, 2546, 7, 66, 8, 6624, 357, 17, 11, 362, 8, 198, 198, 2, 1114, 783, 2279, 1244, 804, 588, 3131, 13357, 11, 475, 1568, 319, 356, 766, 703, 198, 2, 284, 12082, 2214, 351, 617, 4308, 5499, 287, 1502, 284, 39555, 378, 287, 5002, 198, 2, 7386, 13, 6023, 3621, 3895, 318, 326, 356, 460, 39555, 378, 7032, 287, 640, 13, 554, 428, 198, 2, 1948, 1339, 286, 640, 25275, 415, 7032, 340, 286, 1781, 1595, 470, 1577, 1997, 198, 2, 3131, 13, 198, 198, 2, 22492, 360, 291, 8374, 11, 7885, 11, 640, 25275, 415, 7032, 357, 35, 53, 25621, 8, 198, 198, 31, 9288, 2617, 366, 35, 53, 25621, 2214, 1, 2221, 628, 220, 220, 220, 1303, 16578, 283, 2214, 198, 220, 220, 220, 257, 796, 29854, 25621, 19510, 16, 11, 362, 4008, 198, 220, 220, 220, 2488, 9288, 257, 58, 16, 60, 6624, 352, 198, 220, 220, 220, 2488, 9288, 257, 58, 17, 60, 6624, 362, 198, 220, 220, 220, 2488, 9288, 39555, 378, 7, 64, 11, 657, 13, 15, 8, 6624, 357, 16, 11, 362, 8, 198, 220, 220, 220, 4296, 0, 7, 64, 11, 357, 17, 11, 513, 4008, 198, 220, 220, 220, 2488, 9288, 257, 6624, 357, 17, 11, 513, 8, 198, 220, 220, 220, 2488, 9288, 357, 17, 11, 513, 8, 6624, 257, 628, 220, 220, 220, 1303, 15879, 2214, 198, 220, 220, 220, 275, 796, 29854, 25621, 19510, 58, 16, 11, 362, 4357, 685, 17, 11, 513, 60, 4008, 198, 220, 220, 220, 2488, 9288, 275, 58, 16, 60, 6624, 685, 16, 11, 362, 60, 198, 220, 220, 220, 2488, 9288, 275, 58, 17, 60, 6624, 685, 17, 11, 513, 60, 198, 220, 220, 220, 2488, 9288, 39555, 378, 7, 65, 11, 657, 13, 15, 8, 6624, 29565, 16, 11, 362, 4357, 685, 17, 11, 513, 12962, 198, 220, 220, 220, 4296, 0, 7, 65, 11, 29565, 17, 11, 513, 4357, 685, 19, 11, 642, 60, 4008, 198, 220, 220, 220, 2488, 9288, 275, 6624, 29565, 17, 11, 513, 4357, 685, 19, 11, 642, 12962, 628, 220, 220, 220, 1303, 11192, 273, 2214, 198, 220, 220, 220, 269, 796, 29854, 25621, 19510, 58, 16, 362, 26, 513, 604, 4357, 685, 17, 513, 26, 604, 642, 60, 4008, 198, 220, 220, 220, 2488, 9288, 269, 58, 16, 60, 6624, 685, 16, 362, 26, 513, 604, 60, 198, 220, 220, 220, 2488, 9288, 269, 58, 17, 60, 6624, 685, 17, 513, 26, 604, 642, 60, 198, 220, 220, 220, 2488, 9288, 39555, 378, 7, 66, 11, 657, 13, 15, 8, 6624, 29565, 16, 362, 26, 513, 604, 4357, 685, 17, 513, 26, 604, 642, 12962, 198, 220, 220, 220, 4296, 0, 7, 66, 11, 29565, 17, 513, 26, 604, 642, 4357, 685, 20, 718, 26, 767, 807, 60, 4008, 198, 220, 220, 220, 2488, 9288, 269, 6624, 29565, 17, 513, 26, 604, 642, 4357, 685, 20, 718, 26, 767, 807, 12962, 628, 220, 220, 220, 288, 796, 29854, 25621, 7, 17, 11, 513, 8, 198, 220, 220, 220, 2488, 9288, 257, 6624, 288, 198, 437, 198, 198, 31, 9288, 2617, 366, 35, 30428, 2214, 1, 2221, 628, 220, 220, 220, 1303, 16578, 283, 2214, 198, 220, 220, 220, 257, 796, 360, 30428, 7, 15, 13, 15, 5218, 657, 13, 15, 11, 352, 13, 15, 5218, 352, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 532, 16, 13, 15, 828, 657, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 657, 13, 15, 828, 657, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 657, 13, 20, 828, 657, 13, 20, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 352, 13, 15, 828, 352, 13, 15, 8, 198, 220, 220, 220, 4296, 0, 7, 64, 11, 352, 13, 15, 5218, 362, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 657, 13, 20, 828, 352, 13, 15, 8, 198, 220, 220, 220, 4296, 0, 7, 64, 11, 362, 13, 15, 5218, 352, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 64, 11, 352, 13, 20, 828, 352, 13, 20, 8, 628, 220, 220, 220, 1303, 15879, 2214, 198, 220, 220, 220, 275, 796, 360, 30428, 7, 15, 13, 15, 5218, 685, 16, 13, 15, 11, 362, 13, 15, 4357, 352, 13, 15, 5218, 685, 17, 13, 15, 11, 513, 13, 15, 12962, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 65, 11, 657, 13, 20, 828, 685, 16, 13, 20, 11, 362, 13, 20, 12962, 628, 220, 220, 220, 1303, 11192, 273, 2214, 198, 220, 220, 220, 269, 796, 360, 30428, 7, 15, 13, 15, 5218, 685, 16, 13, 15, 362, 13, 15, 26, 513, 13, 15, 604, 13, 15, 4357, 352, 13, 15, 5218, 685, 17, 13, 15, 513, 13, 15, 26, 604, 13, 15, 642, 13, 15, 12962, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 66, 11, 657, 13, 20, 828, 685, 16, 13, 20, 362, 13, 20, 26, 513, 13, 20, 604, 13, 20, 12962, 198, 437, 198, 198, 31, 9288, 2617, 366, 35, 53, 6849, 2214, 1, 2221, 198, 220, 220, 220, 1303, 16578, 283, 2214, 198, 220, 220, 220, 257, 796, 29854, 6849, 7, 15, 13, 15, 5218, 357, 15, 13, 15, 11, 352, 13, 15, 828, 352, 13, 15, 5218, 357, 16, 13, 15, 11, 657, 13, 15, 4008, 198, 220, 220, 220, 4296, 0, 7, 64, 11, 362, 13, 15, 5218, 357, 17, 13, 15, 11, 657, 13, 15, 4008, 198, 220, 220, 220, 374, 796, 39555, 378, 7, 64, 11, 657, 13, 20, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 81, 58, 16, 4357, 657, 13, 20, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 81, 58, 17, 4357, 657, 13, 20, 8, 198, 220, 220, 220, 4296, 0, 7, 64, 11, 362, 13, 15, 5218, 357, 19, 13, 15, 11, 657, 13, 15, 4008, 198, 437, 198, 198, 31, 9288, 2617, 366, 33538, 6849, 2214, 1, 2221, 198, 220, 220, 220, 277, 796, 26196, 6849, 19510, 29992, 11, 256, 8, 4613, 2124, 72, 58, 16, 60, 1635, 2124, 72, 58, 17, 60, 1635, 256, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 69, 26933, 16, 13, 15, 11, 362, 13, 15, 4357, 513, 13, 15, 828, 718, 13, 15, 8, 198, 437, 198, 198, 31, 9288, 2617, 366, 35, 14188, 7032, 1, 2221, 198, 220, 220, 220, 1395, 796, 360, 713, 7, 16, 5218, 685, 15, 13, 15, 11, 657, 13, 15, 4357, 8576, 5218, 685, 16, 13, 15, 11, 657, 13, 15, 4357, 1802, 830, 5218, 685, 16, 13, 15, 11, 352, 13, 15, 12962, 198, 220, 220, 220, 402, 796, 29854, 51, 7390, 7, 55, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 38, 58, 16, 4357, 1395, 58, 16, 12962, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 38, 58, 12825, 4357, 1395, 58, 12825, 12962, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 38, 58, 3064, 830, 4357, 1395, 58, 3064, 830, 12962, 198, 220, 220, 220, 575, 796, 360, 713, 7, 16, 5218, 685, 17, 13, 15, 11, 362, 13, 15, 4357, 8576, 5218, 685, 18, 13, 15, 11, 362, 13, 15, 4357, 1802, 830, 5218, 685, 18, 13, 15, 11, 513, 13, 15, 12962, 198, 220, 220, 220, 376, 796, 29854, 6849, 67, 7, 15, 13, 15, 5218, 1395, 11, 352, 13, 15, 5218, 575, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 37, 11, 657, 13, 20, 38381, 3064, 830, 4357, 685, 17, 13, 15, 11, 362, 13, 15, 12962, 198, 437, 198, 198, 31, 9288, 2617, 366, 19119, 22155, 2214, 1, 2221, 198, 220, 220, 220, 277, 16, 796, 360, 713, 7, 16, 5218, 352, 13, 15, 11, 362, 5218, 362, 13, 15, 11, 513, 5218, 513, 13, 15, 8, 198, 220, 220, 220, 277, 17, 796, 360, 713, 7, 16, 5218, 362, 13, 15, 11, 362, 5218, 513, 13, 15, 11, 513, 5218, 604, 13, 15, 8, 198, 220, 220, 220, 277, 335, 796, 29854, 6849, 67, 7, 15, 13, 15, 5218, 277, 16, 8, 198, 220, 220, 220, 4296, 0, 7, 69, 335, 11, 352, 13, 15, 5218, 277, 17, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 69, 335, 11, 657, 13, 20, 38381, 16, 4357, 352, 13, 20, 8, 198, 220, 220, 220, 4296, 0, 7, 69, 335, 11, 352, 13, 15, 5218, 277, 16, 8, 198, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 3849, 16104, 378, 7, 69, 335, 11, 657, 13, 20, 38381, 16, 4357, 352, 13, 15, 8, 198, 437, 198, 198, 31, 9288, 2617, 366, 1904, 286, 2219, 23772, 2214, 1, 2221, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 16, 13, 15, 828, 360, 4177, 40, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 16, 13, 15, 5218, 352, 13, 15, 828, 360, 30428, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 19510, 16, 13, 15, 11, 362, 13, 15, 36911, 29854, 25621, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 16, 11, 362, 828, 29854, 25621, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 16, 13, 15, 5218, 357, 16, 13, 15, 11, 362, 13, 15, 36911, 29854, 6849, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 19510, 29992, 11, 256, 8, 4613, 2124, 72, 58, 16, 60, 1635, 256, 828, 26196, 6849, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 16, 5218, 685, 16, 13, 15, 11, 362, 13, 15, 4357, 838, 5218, 685, 17, 13, 15, 11, 513, 13, 15, 46570, 29854, 51, 7390, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 3245, 7, 15, 13, 15, 5218, 357, 16, 5218, 352, 13, 15, 11, 838, 5218, 362, 13, 15, 828, 352, 13, 15, 5218, 357, 16, 5218, 362, 13, 15, 11, 838, 5218, 513, 13, 15, 36911, 29854, 6849, 67, 8, 198, 220, 220, 220, 1395, 796, 360, 713, 7, 16, 5218, 685, 15, 13, 15, 11, 657, 13, 15, 4357, 362, 5218, 685, 16, 13, 15, 11, 657, 13, 15, 12962, 198, 220, 220, 220, 1395, 16, 796, 2214, 7, 55, 8, 198, 220, 220, 220, 1395, 17, 796, 2214, 7, 15, 13, 15, 5218, 1395, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 55, 16, 11, 29854, 51, 7390, 8, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 55, 17, 11, 29854, 6849, 67, 8, 198, 437, 198, 198, 31, 9288, 2617, 366, 24622, 39555, 341, 1, 2221, 198, 220, 220, 220, 257, 796, 685, 16, 11, 362, 11, 513, 60, 198, 220, 220, 220, 275, 796, 357, 17, 11, 513, 11, 604, 8, 198, 220, 220, 220, 2488, 9288, 39555, 378, 7, 64, 11, 275, 8, 6624, 362, 1343, 718, 1343, 1105, 198, 220, 220, 220, 257, 796, 357, 16, 11, 362, 8, 198, 220, 220, 220, 275, 796, 357, 17, 11, 513, 11, 604, 8, 198, 220, 220, 220, 2488, 9288, 39555, 378, 7, 64, 11, 275, 8, 6624, 362, 1343, 718, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 2195, 861, 295, 12331, 39555, 378, 7, 65, 11, 257, 8, 198, 437, 198 ]
2.452063
3,223
# This file contains a function # to write input data to a file """ write(input::InputStruct, file::AbstractString) Write input data from an instance of [`InputStruct`](@ref) to a file. # Usage ```jldoctest; output = false using Scats s = Scats.API() file, _ = mktemp() s.Input.write(file) # output ``` """ function write(input::InputStruct, file::AbstractString) open(file, "w") do f # Print println(f, "Sample size") println(f, input.N) println(f, "\nSample step") println(f, input.Δt) println(f, "\nSignificance level") println(f, input.q) println(f, "\nTime array") println(f, input.t) println(f, "\nValues array") println(f, input.x) end end
[ 2, 770, 2393, 4909, 257, 2163, 198, 2, 284, 3551, 5128, 1366, 284, 257, 2393, 198, 198, 37811, 198, 220, 220, 220, 3551, 7, 15414, 3712, 20560, 44909, 11, 2393, 3712, 23839, 10100, 8, 198, 198, 16594, 5128, 1366, 422, 281, 4554, 286, 685, 63, 20560, 44909, 63, 16151, 31, 5420, 8, 284, 257, 2393, 13, 198, 198, 2, 29566, 198, 198, 15506, 63, 73, 335, 38441, 395, 26, 5072, 796, 3991, 198, 3500, 1446, 1381, 198, 82, 796, 1446, 1381, 13, 17614, 3419, 198, 7753, 11, 4808, 796, 33480, 29510, 3419, 198, 82, 13, 20560, 13, 13564, 7, 7753, 8, 198, 198, 2, 5072, 628, 198, 15506, 63, 198, 37811, 198, 8818, 3551, 7, 15414, 3712, 20560, 44909, 11, 2393, 3712, 23839, 10100, 8, 628, 220, 220, 220, 1280, 7, 7753, 11, 366, 86, 4943, 466, 277, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 12578, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 366, 36674, 2546, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 5128, 13, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 37082, 77, 36674, 2239, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 5128, 13, 138, 242, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 37082, 77, 11712, 811, 590, 1241, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 5128, 13, 80, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 37082, 77, 7575, 7177, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 5128, 13, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 37082, 77, 40161, 7177, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 5128, 13, 87, 8, 198, 220, 220, 220, 886, 198, 198, 437, 198 ]
2.326154
325
module TreeTools using FastaIO using JSON using Dates ## Includes include("objects.jl") include("objectsmethods.jl") include("mutations.jl") include("prunegraft.jl") include("datamethods.jl") include("reading.jl") include("writing.jl") include("misc.jl") include("lbi.jl") end ## Todo # the child field of `TreeNode` should be a set and not an array since ordering is not relevant? Howver it makes accessing more difficult. For now, giving up on this idea since I do not benefit from `Set` specific function implemented in Julia: they ultimately fall back to `===` which will consider equal nodes to be different.
[ 21412, 12200, 33637, 628, 198, 3500, 12549, 64, 9399, 198, 3500, 19449, 198, 3500, 44712, 198, 2235, 29581, 198, 17256, 7203, 48205, 13, 20362, 4943, 198, 17256, 7203, 48205, 24396, 82, 13, 20362, 4943, 198, 17256, 7203, 21973, 602, 13, 20362, 4943, 198, 17256, 7203, 1050, 403, 1533, 1617, 13, 20362, 4943, 198, 17256, 7203, 19608, 321, 316, 2065, 82, 13, 20362, 4943, 198, 17256, 7203, 25782, 13, 20362, 4943, 198, 17256, 7203, 16502, 13, 20362, 4943, 198, 17256, 7203, 44374, 13, 20362, 4943, 198, 17256, 7203, 75, 8482, 13, 20362, 4943, 198, 198, 437, 198, 198, 2235, 309, 24313, 198, 2, 262, 1200, 2214, 286, 4600, 27660, 19667, 63, 815, 307, 257, 900, 290, 407, 281, 7177, 1201, 16216, 318, 407, 5981, 30, 1374, 332, 340, 1838, 22534, 517, 2408, 13, 1114, 783, 11, 3501, 510, 319, 428, 2126, 1201, 314, 466, 407, 4414, 422, 4600, 7248, 63, 2176, 2163, 9177, 287, 22300, 25, 484, 6165, 2121, 736, 284, 4600, 18604, 63, 543, 481, 2074, 4961, 13760, 284, 307, 1180, 13, 220, 628, 198 ]
3.548571
175
function maxpool2x2relu!(B, A) @avx for i₁ ∈ axes(B,1), i₂ ∈ axes(B,2), i₃ ∈ axes(B,3), i₄ ∈ axes(B,4) A₁ = A[2i₁-1,2i₂-1,i₃,i₄] A₂ = A[2i₁-1,2i₂ ,i₃,i₄] A₃ = A[2i₁ ,2i₂-1,i₃,i₄] A₄ = A[2i₁ ,2i₂ ,i₃,i₄] B[i₁,i₂,i₃,i₄] = max(max(max(A₁, A₂), max(A₃, A₄)), zero(eltype(A))) end B end function maxpool2x2relureverse!(A, B̄, B) @avx unroll=(1,1) for i₁ ∈ axes(B,1), i₂ ∈ axes(B,2), i₃ ∈ axes(B,3), i₄ ∈ axes(B,4) Bₘ = B[i₁,i₂,i₃,i₄] B̄ᵢ = B̄[i₁,i₂,i₃,i₄] A[2i₁-1,2i₂-1,i₃,i₄] = (A[2i₁-1,2i₂-1,i₃,i₄] == Bₘ) * B̄ᵢ A[2i₁-1,2i₂ ,i₃,i₄] = (A[2i₁-1,2i₂ ,i₃,i₄] == Bₘ) * B̄ᵢ A[2i₁ ,2i₂-1,i₃,i₄] = (A[2i₁ ,2i₂-1,i₃,i₄] == Bₘ) * B̄ᵢ A[2i₁ ,2i₂ ,i₃,i₄] = (A[2i₁ ,2i₂ ,i₃,i₄] == Bₘ) * B̄ᵢ end end function maxpool2x2relureversev2!(A, B̄) @avx unroll=(1,1) for i₁ ∈ axes(B̄,1), i₂ ∈ axes(B̄,2), i₃ ∈ axes(B̄,3), i₄ ∈ axes(B̄,4) A₁ = A[2i₁-1,2i₂-1,i₃,i₄] A₂ = A[2i₁-1,2i₂ ,i₃,i₄] A₃ = A[2i₁ ,2i₂-1,i₃,i₄] A₄ = A[2i₁ ,2i₂ ,i₃,i₄] Bₘ = max(max(max(A₁, A₂), max(A₃, A₄)), zero(eltype(A))) B̄ᵢ = B̄[i₁,i₂,i₃,i₄] A[2i₁-1,2i₂-1,i₃,i₄] = (A₁ == Bₘ) * B̄ᵢ A[2i₁-1,2i₂ ,i₃,i₄] = (A₂ == Bₘ) * B̄ᵢ A[2i₁ ,2i₂-1,i₃,i₄] = (A₃ == Bₘ) * B̄ᵢ A[2i₁ ,2i₂ ,i₃,i₄] = (A₄ == Bₘ) * B̄ᵢ end end @generated function halve12(x::Tuple{Vararg{<:Any,N}}) where {N} out = Expr(:tuple) for n in 1:N r = Expr(:ref, :x, n) if n ≤ 2 r = Expr(:call, :>>>, r, Expr(:call, Expr(:curly, :Static, 1))) end push!(out.args, r) end out end function default_alloc_maxpool(mp::MaxPool2x2Layer, img::AbstractArray{T}) where {T} s = halve12(maybestaticsize(img)) _, p = PaddedMatrices.size_permute_tuples(img) B = allocarray(T, s) PermutedDimsArray(B, p) end function (sp::StatckPointer)(::typeof(default_alloc_maxpool), mp::MaxPool2x2Layer, img::AbstractArray{T}) where {T} s = halve12(maybestaticsize(img)) _, p = PaddedMatrices.size_permute_tuples(img) sp, B = PtrArray{T}(sp, s) sp, PermutedDimsArray(B, p) end function alloc_maxpool_pad12(mp::MaxPool2x2Layer, img::AbstractArray{T,4}) where {T} strunc = halve12(maybestaticsize(img)) s = (vadd(strunc[1], Static{2}()), vadd(strunc[2], Static{2}()), strunc[3], strunc[4]) _, p = PaddedMatrices.size_permute_tuples(img) B = allocarray(T, s) PermutedDimsArray(B, p) end function (sp::StatckPointer)(::typeof(default_alloc_maxpool), mp::MaxPool2x2Layer, img::AbstractArray{T,4}) where {T} s = halve12(maybestaticsize(img)) _, p = PaddedMatrices.size_permute_tuples(img) sp, B = PtrArray{T}(sp, s) sp, PermutedDimsArray(B, p) end struct MaxPool2x2Layer{F} <: AbstractLayer f::F end MaxPool2x2Layer() = MaxPool2x2Layer(default_alloc_maxpool) parameters(::MaxPool2x2Layer) = nothing grad(::MaxPool2x2Layer) = nothing returns(mp::MaxPool2x2Layer) = mp.o function forward(sp::StackPointer, mp::MaxPool2x2Layer, img) sp, out = stack_pointer_call(mp.f, sp, img) maxpool2x2relu!(out, img) out, pb, out end forward!(mp::MaxPool2x2Layer, img) = (maxpool2x2relu!(returns(mp), img), img) reverse_grad!(::MaxPool2x2Layer) = nothing function reverse_chain!(mp::MaxPool2x2Layer, img, ōūt̄) maxpool2x2relureversev2!(img, ōūt̄) end # function maxpool2x2relureversev3!(A, B̄) # for i₁ ∈ axes(B̄,1), i₂ ∈ axes(B̄,2), i₄ ∈ axes(B̄,4) # @inbounds @simd ivdep for i₃ ∈ axes(B̄,3) # A₁ = A[2i₁-1,2i₂-1,i₃,i₄] # A₂ = A[2i₁-1,2i₂ ,i₃,i₄] # A₃ = A[2i₁ ,2i₂-1,i₃,i₄] # A₄ = A[2i₁ ,2i₂ ,i₃,i₄] # Bₘ = max(max(max(A₁, A₂), max(A₃, A₄)), zero(eltype(A))) # B̄ᵢ = B̄[i₁,i₂,i₃,i₄] # A[2i₁-1,2i₂-1,i₃,i₄] = (A₁ == Bₘ) * B̄ᵢ # A[2i₁-1,2i₂ ,i₃,i₄] = (A₂ == Bₘ) * B̄ᵢ # A[2i₁ ,2i₂-1,i₃,i₄] = (A₃ == Bₘ) * B̄ᵢ # A[2i₁ ,2i₂ ,i₃,i₄] = (A₄ == Bₘ) * B̄ᵢ # end # end # end
[ 8818, 3509, 7742, 17, 87, 17, 260, 2290, 0, 7, 33, 11, 317, 8, 198, 220, 220, 220, 2488, 615, 87, 329, 1312, 158, 224, 223, 18872, 230, 34197, 7, 33, 11, 16, 828, 1312, 158, 224, 224, 18872, 230, 34197, 7, 33, 11, 17, 828, 1312, 158, 224, 225, 18872, 230, 34197, 7, 33, 11, 18, 828, 1312, 158, 224, 226, 18872, 230, 34197, 7, 33, 11, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 223, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 224, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 225, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 226, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 347, 58, 72, 158, 224, 223, 11, 72, 158, 224, 224, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 3509, 7, 9806, 7, 9806, 7, 32, 158, 224, 223, 11, 317, 158, 224, 224, 828, 3509, 7, 32, 158, 224, 225, 11, 317, 158, 224, 226, 36911, 6632, 7, 417, 4906, 7, 32, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 347, 198, 437, 198, 8818, 3509, 7742, 17, 87, 17, 2411, 495, 4399, 0, 7, 32, 11, 347, 136, 226, 11, 347, 8, 198, 220, 220, 220, 2488, 615, 87, 555, 2487, 16193, 16, 11, 16, 8, 329, 1312, 158, 224, 223, 18872, 230, 34197, 7, 33, 11, 16, 828, 1312, 158, 224, 224, 18872, 230, 34197, 7, 33, 11, 17, 828, 1312, 158, 224, 225, 18872, 230, 34197, 7, 33, 11, 18, 828, 1312, 158, 224, 226, 18872, 230, 34197, 7, 33, 11, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 347, 158, 224, 246, 796, 347, 58, 72, 158, 224, 223, 11, 72, 158, 224, 224, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 347, 136, 226, 39611, 95, 796, 347, 136, 226, 58, 72, 158, 224, 223, 11, 72, 158, 224, 224, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 886, 198, 437, 198, 8818, 3509, 7742, 17, 87, 17, 2411, 495, 4399, 85, 17, 0, 7, 32, 11, 347, 136, 226, 8, 198, 220, 220, 220, 2488, 615, 87, 555, 2487, 16193, 16, 11, 16, 8, 329, 1312, 158, 224, 223, 18872, 230, 34197, 7, 33, 136, 226, 11, 16, 828, 1312, 158, 224, 224, 18872, 230, 34197, 7, 33, 136, 226, 11, 17, 828, 1312, 158, 224, 225, 18872, 230, 34197, 7, 33, 136, 226, 11, 18, 828, 1312, 158, 224, 226, 18872, 230, 34197, 7, 33, 136, 226, 11, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 223, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 224, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 225, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 226, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 347, 158, 224, 246, 796, 3509, 7, 9806, 7, 9806, 7, 32, 158, 224, 223, 11, 317, 158, 224, 224, 828, 3509, 7, 32, 158, 224, 225, 11, 317, 158, 224, 226, 36911, 6632, 7, 417, 4906, 7, 32, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 347, 136, 226, 39611, 95, 796, 347, 136, 226, 58, 72, 158, 224, 223, 11, 72, 158, 224, 224, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 223, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 224, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 225, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 226, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 27568, 2163, 10284, 303, 1065, 7, 87, 3712, 51, 29291, 90, 19852, 853, 90, 27, 25, 7149, 11, 45, 11709, 8, 810, 1391, 45, 92, 198, 220, 220, 220, 503, 796, 1475, 1050, 7, 25, 83, 29291, 8, 198, 220, 220, 220, 329, 299, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1475, 1050, 7, 25, 5420, 11, 1058, 87, 11, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 299, 41305, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 1475, 1050, 7, 25, 13345, 11, 1058, 4211, 22330, 374, 11, 1475, 1050, 7, 25, 13345, 11, 1475, 1050, 7, 25, 22019, 306, 11, 1058, 45442, 11, 352, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 448, 13, 22046, 11, 374, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 503, 198, 437, 198, 8818, 4277, 62, 32332, 62, 9806, 7742, 7, 3149, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 3712, 23839, 19182, 90, 51, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 264, 796, 10284, 303, 1065, 7, 11261, 13466, 23372, 1096, 7, 9600, 4008, 198, 220, 220, 220, 4808, 11, 279, 796, 350, 29373, 19044, 45977, 13, 7857, 62, 16321, 1133, 62, 28047, 2374, 7, 9600, 8, 198, 220, 220, 220, 347, 796, 36836, 18747, 7, 51, 11, 264, 8, 198, 220, 220, 220, 2448, 76, 7241, 35, 12078, 19182, 7, 33, 11, 279, 8, 198, 437, 198, 8818, 357, 2777, 3712, 17126, 694, 18833, 3849, 5769, 3712, 4906, 1659, 7, 12286, 62, 32332, 62, 9806, 7742, 828, 29034, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 3712, 23839, 19182, 90, 51, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 264, 796, 10284, 303, 1065, 7, 11261, 13466, 23372, 1096, 7, 9600, 4008, 198, 220, 220, 220, 4808, 11, 279, 796, 350, 29373, 19044, 45977, 13, 7857, 62, 16321, 1133, 62, 28047, 2374, 7, 9600, 8, 198, 220, 220, 220, 599, 11, 347, 796, 350, 2213, 19182, 90, 51, 92, 7, 2777, 11, 264, 8, 198, 220, 220, 220, 599, 11, 2448, 76, 7241, 35, 12078, 19182, 7, 33, 11, 279, 8, 198, 437, 198, 8818, 36836, 62, 9806, 7742, 62, 15636, 1065, 7, 3149, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 3712, 23839, 19182, 90, 51, 11, 19, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 965, 19524, 796, 10284, 303, 1065, 7, 11261, 13466, 23372, 1096, 7, 9600, 4008, 198, 220, 220, 220, 264, 796, 357, 85, 2860, 7, 2536, 19524, 58, 16, 4357, 36125, 90, 17, 92, 3419, 828, 410, 2860, 7, 2536, 19524, 58, 17, 4357, 36125, 90, 17, 92, 3419, 828, 965, 19524, 58, 18, 4357, 965, 19524, 58, 19, 12962, 198, 220, 220, 220, 4808, 11, 279, 796, 350, 29373, 19044, 45977, 13, 7857, 62, 16321, 1133, 62, 28047, 2374, 7, 9600, 8, 198, 220, 220, 220, 347, 796, 36836, 18747, 7, 51, 11, 264, 8, 198, 220, 220, 220, 2448, 76, 7241, 35, 12078, 19182, 7, 33, 11, 279, 8, 198, 437, 198, 8818, 357, 2777, 3712, 17126, 694, 18833, 3849, 5769, 3712, 4906, 1659, 7, 12286, 62, 32332, 62, 9806, 7742, 828, 29034, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 3712, 23839, 19182, 90, 51, 11, 19, 30072, 810, 1391, 51, 92, 198, 220, 220, 220, 264, 796, 10284, 303, 1065, 7, 11261, 13466, 23372, 1096, 7, 9600, 4008, 198, 220, 220, 220, 4808, 11, 279, 796, 350, 29373, 19044, 45977, 13, 7857, 62, 16321, 1133, 62, 28047, 2374, 7, 9600, 8, 198, 220, 220, 220, 599, 11, 347, 796, 350, 2213, 19182, 90, 51, 92, 7, 2777, 11, 264, 8, 198, 220, 220, 220, 599, 11, 2448, 76, 7241, 35, 12078, 19182, 7, 33, 11, 279, 8, 198, 437, 198, 198, 7249, 5436, 27201, 17, 87, 17, 49925, 90, 37, 92, 1279, 25, 27741, 49925, 198, 220, 220, 220, 277, 3712, 37, 198, 437, 198, 11518, 27201, 17, 87, 17, 49925, 3419, 796, 5436, 27201, 17, 87, 17, 49925, 7, 12286, 62, 32332, 62, 9806, 7742, 8, 198, 198, 17143, 7307, 7, 3712, 11518, 27201, 17, 87, 17, 49925, 8, 796, 2147, 198, 9744, 7, 3712, 11518, 27201, 17, 87, 17, 49925, 8, 796, 2147, 198, 7783, 82, 7, 3149, 3712, 11518, 27201, 17, 87, 17, 49925, 8, 796, 29034, 13, 78, 628, 198, 198, 8818, 2651, 7, 2777, 3712, 25896, 18833, 3849, 11, 29034, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 8, 628, 220, 220, 220, 599, 11, 503, 796, 8931, 62, 29536, 62, 13345, 7, 3149, 13, 69, 11, 599, 11, 33705, 8, 628, 220, 220, 220, 3509, 7742, 17, 87, 17, 260, 2290, 0, 7, 448, 11, 33705, 8, 198, 220, 220, 220, 503, 11, 279, 65, 11, 503, 198, 437, 198, 11813, 0, 7, 3149, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 8, 796, 357, 9806, 7742, 17, 87, 17, 260, 2290, 0, 7, 7783, 82, 7, 3149, 828, 33705, 828, 33705, 8, 198, 50188, 62, 9744, 0, 7, 3712, 11518, 27201, 17, 87, 17, 49925, 8, 796, 2147, 198, 8818, 9575, 62, 7983, 0, 7, 3149, 3712, 11518, 27201, 17, 87, 17, 49925, 11, 33705, 11, 267, 136, 226, 84, 136, 226, 83, 136, 226, 8, 198, 220, 220, 220, 3509, 7742, 17, 87, 17, 2411, 495, 4399, 85, 17, 0, 7, 9600, 11, 267, 136, 226, 84, 136, 226, 83, 136, 226, 8, 198, 437, 198, 198, 2, 2163, 3509, 7742, 17, 87, 17, 2411, 495, 4399, 85, 18, 0, 7, 32, 11, 347, 136, 226, 8, 198, 2, 220, 220, 220, 220, 329, 1312, 158, 224, 223, 18872, 230, 34197, 7, 33, 136, 226, 11, 16, 828, 1312, 158, 224, 224, 18872, 230, 34197, 7, 33, 136, 226, 11, 17, 828, 1312, 158, 224, 226, 18872, 230, 34197, 7, 33, 136, 226, 11, 19, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2488, 14323, 67, 21628, 10378, 329, 1312, 158, 224, 225, 18872, 230, 34197, 7, 33, 136, 226, 11, 18, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 223, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 224, 796, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 225, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 158, 224, 226, 796, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 347, 158, 224, 246, 796, 3509, 7, 9806, 7, 9806, 7, 32, 158, 224, 223, 11, 317, 158, 224, 224, 828, 3509, 7, 32, 158, 224, 225, 11, 317, 158, 224, 226, 36911, 6632, 7, 417, 4906, 7, 32, 22305, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 347, 136, 226, 39611, 95, 796, 347, 136, 226, 58, 72, 158, 224, 223, 11, 72, 158, 224, 224, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 223, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 12, 16, 11, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 224, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 12, 16, 11, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 225, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 17, 72, 158, 224, 223, 220, 837, 17, 72, 158, 224, 224, 220, 837, 72, 158, 224, 225, 11, 72, 158, 224, 226, 60, 796, 357, 32, 158, 224, 226, 6624, 347, 158, 224, 246, 8, 1635, 347, 136, 226, 39611, 95, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 2, 220, 220, 220, 220, 886, 198, 2, 886, 628, 198 ]
1.394836
2,905
# functions related to negative binomial distribution # R implementations using .RFunctions: nbinompdf, nbinomlogpdf, nbinomcdf, nbinomccdf, nbinomlogcdf, nbinomlogccdf, nbinominvcdf, nbinominvccdf, nbinominvlogcdf, nbinominvlogccdf
[ 2, 5499, 3519, 284, 4633, 9874, 49070, 6082, 198, 198, 2, 371, 25504, 198, 3500, 764, 49, 24629, 2733, 25, 198, 220, 220, 220, 299, 8800, 3361, 7568, 11, 198, 220, 220, 220, 299, 8800, 296, 6404, 12315, 11, 198, 220, 220, 220, 299, 8800, 296, 66, 7568, 11, 198, 220, 220, 220, 299, 8800, 296, 535, 7568, 11, 198, 220, 220, 220, 299, 8800, 296, 6404, 66, 7568, 11, 198, 220, 220, 220, 299, 8800, 296, 6404, 535, 7568, 11, 198, 220, 220, 220, 299, 8800, 6351, 28435, 7568, 11, 198, 220, 220, 220, 299, 8800, 6351, 85, 535, 7568, 11, 198, 220, 220, 220, 299, 8800, 6351, 85, 6404, 66, 7568, 11, 198, 220, 220, 220, 299, 8800, 6351, 85, 6404, 535, 7568, 198 ]
2.174603
126
if haskey(ENV, "CI") ENV["PLOTS_TEST"] = "true" ENV["GKSwstype"] = "100" # gr segfault workaround end using Plots using RobustAndOptimalControl using LinearAlgebra using Test @testset "RobustAndOptimalControl.jl" begin @testset "extendedstatespace" begin @info "Testing extendedstatespace" include("test_extendedstatespace.jl") end @testset "utils" begin @info "Testing utils" include("test_utils.jl") end @testset "descriptor" begin @info "Testing descriptor" include("test_descriptor.jl") end @testset "uncertainty" begin @info "Testing uncertainty" include("test_uncertainty.jl") end @testset "diskmargin" begin @info "Testing diskmargin" include("test_diskmargin.jl") end @testset "weights" begin @info "Testing weights" include("test_weights.jl") end @testset "hinfpartition" begin @info "Testing hinfpartition" include("test_hinfpartition.jl") end @testset "H∞ design" begin @info "Testing hinf_design" include("test_hinf_design.jl") end @testset "H2 design" begin @info "Testing H2 design" include("test_h2_design.jl") end @testset "LQG" begin @info "Testing LQG" include("test_lqg.jl") end @testset "Named systems" begin @info "Testing Named systems" include("test_named_systems2.jl") end @testset "find_lft" begin @info "Testing find_lft" include("test_find_lft.jl") end @testset "reduction" begin @info "Testing test_reduction" include("test_reduction.jl") end @testset "augmentation" begin @info "Testing augmentation" include("test_augmentation.jl") end @testset "glover_mcfarlane" begin @info "Testing glover_mcfarlane" include("test_glover_mcfarlane.jl") end @testset "hinfgrad" begin @info "Testing hinfgrad" include("test_hinfgrad.jl") end end
[ 361, 468, 2539, 7, 1677, 53, 11, 366, 25690, 4943, 198, 220, 220, 220, 12964, 53, 14692, 6489, 33472, 62, 51, 6465, 8973, 796, 366, 7942, 1, 198, 220, 220, 220, 12964, 53, 14692, 38, 42, 10462, 301, 2981, 8973, 796, 366, 3064, 1, 1303, 1036, 384, 70, 69, 1721, 46513, 198, 437, 198, 3500, 1345, 1747, 198, 3500, 3851, 436, 1870, 27871, 4402, 15988, 198, 3500, 44800, 2348, 29230, 198, 3500, 6208, 628, 198, 31, 9288, 2617, 366, 14350, 436, 1870, 27871, 4402, 15988, 13, 20362, 1, 2221, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2302, 1631, 27219, 10223, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 7083, 27219, 10223, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 2302, 1631, 27219, 10223, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 26791, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 3384, 4487, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 26791, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 20147, 1968, 273, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 43087, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 20147, 1968, 273, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 19524, 1425, 774, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 13479, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 19524, 1425, 774, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 39531, 36153, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 11898, 36153, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 39531, 36153, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 43775, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 19590, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 43775, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 71, 10745, 3911, 653, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 289, 10745, 3911, 653, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 71, 10745, 3911, 653, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 39, 24861, 252, 1486, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 289, 10745, 62, 26124, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 71, 10745, 62, 26124, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 39, 17, 1486, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 367, 17, 1486, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 71, 17, 62, 26124, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 43, 48, 38, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 406, 48, 38, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 75, 80, 70, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 45, 2434, 3341, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 34441, 3341, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 13190, 62, 10057, 82, 17, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 19796, 62, 75, 701, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 1064, 62, 75, 701, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 19796, 62, 75, 701, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 445, 8110, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 1332, 62, 445, 8110, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 445, 8110, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 559, 5154, 341, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 16339, 14374, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 559, 5154, 341, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 4743, 2502, 62, 76, 12993, 49344, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 1278, 2502, 62, 76, 12993, 49344, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 4743, 2502, 62, 76, 12993, 49344, 13, 20362, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 71, 10745, 9744, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 44154, 289, 10745, 9744, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 7203, 9288, 62, 71, 10745, 9744, 13, 20362, 4943, 198, 220, 220, 220, 886, 198, 198, 437, 198 ]
2.234088
927
################################################################################ # Augmented Gradient Search ARS ################################################################################ using LinearAlgebra using Statistics import LinearAlgebra.normalize import GeometryBasics.update function train(env::Environment, policy::Policy{T}, normalizer::Normalizer{T}, hp::HyperParameters{T}) where T envs = [deepcopy(env) for i = 1:Threads.nthreads()] output_size, input_size = size(policy.θ) nx = input_size nu = output_size nθ = output_size * input_size # Rollout data X = [zeros(nx) for k = 1:hp.horizon+1] A = [zeros(nu) for k = 1:hp.horizon] fx = [zeros(nx,nx) for k = 1:hp.horizon] fu = [zeros(nx,nu) for k = 1:hp.horizon] # Gradient data ∇θ = zeros(1,nθ) ∂x∂θ = [zeros(nx, nθ) for k = 1:hp.horizon] for episode = 1:hp.main_loop_size # Stem state = reset(env) X[1] .= copy(state) done = false sum_reward = 0 num_plays = 0 for k = 1:hp.horizon done && break observe(normalizer, state) state = normalize(normalizer, state) action = evaluate(policy, state) A[k] .= copy(action) state, reward, done, _ = step(env, action, diff = true) X[k+1] .= copy(state) fx[k] .= copy(env.dynamics_jacobian_state) fu[k] .= copy(env.dynamics_jacobian_input) reward = max(min(reward, 1), -1) sum_reward += reward num_plays += 1 end ∇θ .= 0.0 ∂u∂θ = [cat([X[k]' for i = 1:output_size]..., dims = (1,2)) for k = 1:num_plays] ∂r∂x = [FiniteDiff.finite_difference_jacobian(x -> [-cost(env, x, A[k])], X[k]) for k = 1:num_plays] ∂r∂u = [FiniteDiff.finite_difference_jacobian(u -> [-cost(env, X[k], u)], A[k]) for k = 1:num_plays] for k = 2:num_plays ∂x∂θ[k] .= fx[k-1] * ∂x∂θ[k-1] + fu[k-1] * ∂u∂θ[k-1] #TODO end for k = 1:num_plays if norm(∇θ, Inf) > 8e2 println("grad up to step $k") break end ∇θ += ∂r∂x[k] * ∂x∂θ[k] + ∂r∂u[k] * ∂u∂θ[k] end ∇ = transpose(reshape(∇θ, (input_size, output_size))) (norm(∇, Inf) < 1e3) && gradient_update(policy, ∇) # finish, print: println("episode $episode ∇∞ $(scn(norm(∇, Inf))) r $sum_reward") end return nothing end function gradient_update(policy::Policy, ∇) policy.θ += policy.hp.step_size * ∇ ./ norm(∇, Inf) return nothing end
[ 29113, 29113, 14468, 198, 2, 2447, 12061, 17701, 1153, 11140, 5923, 50, 198, 29113, 29113, 14468, 198, 3500, 44800, 2348, 29230, 198, 3500, 14370, 198, 198, 11748, 44800, 2348, 29230, 13, 11265, 1096, 198, 11748, 2269, 15748, 15522, 873, 13, 19119, 198, 198, 8818, 4512, 7, 24330, 3712, 31441, 11, 2450, 3712, 36727, 90, 51, 5512, 3487, 7509, 3712, 26447, 7509, 90, 51, 5512, 27673, 3712, 38197, 48944, 90, 51, 30072, 810, 309, 198, 220, 220, 220, 551, 14259, 796, 685, 22089, 30073, 7, 24330, 8, 329, 1312, 796, 352, 25, 16818, 82, 13, 77, 16663, 82, 3419, 60, 628, 220, 220, 220, 5072, 62, 7857, 11, 5128, 62, 7857, 796, 2546, 7, 30586, 13, 138, 116, 8, 198, 220, 220, 220, 299, 87, 796, 5128, 62, 7857, 198, 220, 220, 220, 14364, 796, 5072, 62, 7857, 198, 220, 220, 220, 299, 138, 116, 796, 5072, 62, 7857, 1635, 5128, 62, 7857, 198, 220, 220, 220, 1303, 8299, 448, 1366, 198, 220, 220, 220, 1395, 796, 685, 9107, 418, 7, 77, 87, 8, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 10, 16, 60, 198, 220, 220, 220, 317, 796, 685, 9107, 418, 7, 28803, 8, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 60, 198, 220, 220, 220, 277, 87, 796, 685, 9107, 418, 7, 77, 87, 11, 77, 87, 8, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 60, 198, 220, 220, 220, 14035, 796, 685, 9107, 418, 7, 77, 87, 11, 28803, 8, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 60, 198, 220, 220, 220, 1303, 17701, 1153, 1366, 198, 220, 220, 220, 18872, 229, 138, 116, 796, 1976, 27498, 7, 16, 11, 77, 138, 116, 8, 198, 220, 220, 220, 18872, 224, 87, 24861, 224, 138, 116, 796, 685, 9107, 418, 7, 77, 87, 11, 299, 138, 116, 8, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 60, 628, 220, 220, 220, 329, 4471, 796, 352, 25, 24831, 13, 12417, 62, 26268, 62, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 520, 368, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 13259, 7, 24330, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 58, 16, 60, 764, 28, 4866, 7, 5219, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1760, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 2160, 62, 260, 904, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 26024, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 352, 25, 24831, 13, 17899, 8637, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1760, 11405, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12414, 7, 11265, 7509, 11, 1181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 3487, 1096, 7, 11265, 7509, 11, 1181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2223, 796, 13446, 7, 30586, 11, 1181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 58, 74, 60, 764, 28, 4866, 7, 2673, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 11, 6721, 11, 1760, 11, 4808, 796, 2239, 7, 24330, 11, 2223, 11, 814, 796, 2081, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1395, 58, 74, 10, 16, 60, 764, 28, 4866, 7, 5219, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 87, 58, 74, 60, 764, 28, 4866, 7, 24330, 13, 67, 4989, 873, 62, 30482, 672, 666, 62, 5219, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14035, 58, 74, 60, 764, 28, 4866, 7, 24330, 13, 67, 4989, 873, 62, 30482, 672, 666, 62, 15414, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6721, 796, 3509, 7, 1084, 7, 260, 904, 11, 352, 828, 532, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2160, 62, 260, 904, 15853, 6721, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 26024, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 138, 116, 764, 28, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 224, 84, 24861, 224, 138, 116, 796, 685, 9246, 26933, 55, 58, 74, 49946, 329, 1312, 796, 352, 25, 22915, 62, 7857, 60, 986, 11, 5391, 82, 796, 357, 16, 11, 17, 4008, 329, 479, 796, 352, 25, 22510, 62, 26024, 60, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 224, 81, 24861, 224, 87, 796, 685, 37, 9504, 28813, 13, 69, 9504, 62, 26069, 1945, 62, 30482, 672, 666, 7, 87, 4613, 25915, 15805, 7, 24330, 11, 2124, 11, 317, 58, 74, 12962, 4357, 1395, 58, 74, 12962, 329, 479, 796, 352, 25, 22510, 62, 26024, 60, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 224, 81, 24861, 224, 84, 796, 685, 37, 9504, 28813, 13, 69, 9504, 62, 26069, 1945, 62, 30482, 672, 666, 7, 84, 4613, 25915, 15805, 7, 24330, 11, 1395, 58, 74, 4357, 334, 8, 4357, 317, 58, 74, 12962, 329, 479, 796, 352, 25, 22510, 62, 26024, 60, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 362, 25, 22510, 62, 26024, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18872, 224, 87, 24861, 224, 138, 116, 58, 74, 60, 764, 28, 277, 87, 58, 74, 12, 16, 60, 1635, 18872, 224, 87, 24861, 224, 138, 116, 58, 74, 12, 16, 60, 1343, 14035, 58, 74, 12, 16, 60, 1635, 18872, 224, 84, 24861, 224, 138, 116, 58, 74, 12, 16, 60, 1303, 51, 3727, 46, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 352, 25, 22510, 62, 26024, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2593, 7, 24861, 229, 138, 116, 11, 4806, 8, 1875, 807, 68, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 9744, 510, 284, 2239, 720, 74, 4943, 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, 220, 220, 220, 220, 18872, 229, 138, 116, 15853, 18872, 224, 81, 24861, 224, 87, 58, 74, 60, 1635, 18872, 224, 87, 24861, 224, 138, 116, 58, 74, 60, 1343, 18872, 224, 81, 24861, 224, 84, 58, 74, 60, 1635, 18872, 224, 84, 24861, 224, 138, 116, 58, 74, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 18872, 229, 796, 1007, 3455, 7, 3447, 1758, 7, 24861, 229, 138, 116, 11, 357, 15414, 62, 7857, 11, 5072, 62, 7857, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 357, 27237, 7, 24861, 229, 11, 4806, 8, 1279, 352, 68, 18, 8, 11405, 31312, 62, 19119, 7, 30586, 11, 18872, 229, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5461, 11, 3601, 25, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 38668, 720, 38668, 18872, 229, 24861, 252, 29568, 1416, 77, 7, 27237, 7, 24861, 229, 11, 4806, 22305, 374, 720, 16345, 62, 260, 904, 4943, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 31312, 62, 19119, 7, 30586, 3712, 36727, 11, 18872, 229, 8, 198, 220, 220, 220, 2450, 13, 138, 116, 15853, 2450, 13, 24831, 13, 9662, 62, 7857, 1635, 18872, 229, 24457, 2593, 7, 24861, 229, 11, 4806, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198 ]
1.96544
1,331
using GadgetUnits using GadgetIO function readSingleCRShockDataFromOutputFile(file::String) # read file into memory f = open(file) lines = readlines(f) close(f) # filter only relevant lines. Output of every line starts with "CR DATA". g = occursin.("CR DATA", lines) lines = lines[g] # get number of output lines N = length(lines) # init datatype for analyze cr = CRShockData(N) for i ∈ 1:N line_content = split(lines[i]) cr.dt[i] = parse(Float64,line_content[3]) cr.Mach[i] = parse(Float64,line_content[4]) cr.Shock_Speed[i] = parse(Float64,line_content[5]) cr.Shock_Compress[i] = parse(Float64,line_content[6]) cr.Shock_Energy_In[i] = parse(Float64,line_content[7]) cr.Shock_Energy_Real[i] = parse(Float64,line_content[8]) cr.Energy_P[i] = parse(Float64,line_content[9]) cr.Energy_e[i] = parse(Float64,line_content[10]) end return cr end """ getCRMomentumDistributionFromPartID( snap_file::String, ID::Integer; pmin::Real=1.0, pmax::Real=1.0e6, Nbins::Integer=0, mode::Int64=3) Reads the spectra from a single SPH particle via the particle ID. """ function getCRMomentumDistributionFromPartID(snap_file::String, ID::Integer; pmin::Real=1.0, pmax::Real=1.0e6, Nbins::Integer=0, mode::Int64=3, protons::Bool=true, electrons::Bool=true) h = head_to_obj(snap_file) info = read_info(snap_file) if info == 1 if Nbins == 0 error("Can't read spectrum! No info block present!\nSupply number of momentum bins to proceed!") else info = Array{InfoLine,1}(undef,7) info[1] = InfoLine("ID", UInt32, Int32(1), [1, 0, 0, 0, 0, 0]) info[2] = InfoLine("CRpN", Float32, Int32(Nbins), [1, 0, 0, 0, 0, 0]) info[3] = InfoLine("CRpS", Float32, Int32(Nbins), [1, 0, 0, 0, 0, 0]) info[4] = InfoLine("CRpC", Float32, Int32(1), [1, 0, 0, 0, 0, 0]) info[5] = InfoLine("CReN", Float32, Int32(Nbins), [1, 0, 0, 0, 0, 0]) info[6] = InfoLine("CReS", Float32, Int32(Nbins), [1, 0, 0, 0, 0, 0]) info[7] = InfoLine("CReC", Float32, Int32(1), [1, 0, 0, 0, 0, 0]) end end # read block positions to speed up IO block_positions = GadgetIO.get_block_positions(snap_file) id = read_block(snap_file, "ID", info=info[getfield.(info, :block_name) .== "ID"][1], parttype=0, block_position=block_positions["ID"]) # select the position of the requested ID part = findfirst( id .== UInt32(ID) )[1] # protons if protons CRpN = Float64.( read_block(snap_file, "CRpN", info=info[getfield.(info, :block_name) .== "CRpN"][1], parttype=0, block_position=block_positions["CRpN"])[:,part] ) CRpS = read_block(snap_file, "CRpS", info=info[getfield.(info, :block_name) .== "CRpS"][1], parttype=0, block_position=block_positions["CRpS"])[:,part] CRpC = read_block(snap_file, "CRpC", info=info[getfield.(info, :block_name) .== "CRpC"][1], parttype=0, block_position=block_positions["CRpC"])[part] Nbins = size(CRpS,1) end # electrons if electrons CReN = Float64.( read_block(snap_file, "CReN", info=info[getfield.(info, :block_name) .== "CReN"][1], parttype=0, block_position=block_positions["CReN"])[:,part] ) CReS = read_block(snap_file, "CReS", info=info[getfield.(info, :block_name) .== "CReS"][1], parttype=0, block_position=block_positions["CReS"])[:,part] CReC = read_block(snap_file, "CReC", info=info[getfield.(info, :block_name) .== "CReC"][1], parttype=0, block_position=block_positions["CReC"])[part] Nbins = size(CReS,1) end par = CRMomentumDistributionConfig(pmin, pmax, Nbins, mode) if protons && electrons return CRMomentumDistribution( CRpN, CRpS, CRpC, par.pmin, par.pmax, par.mc_e ), CRMomentumDistribution( CReN, CReS, CReC, par.pmin, par.pmax, par.mc_p ) elseif protons return CRMomentumDistribution( CRpN, CRpS, CRpC, par.pmin, par.pmax, par.mc_e ) elseif electrons return CRMomentumDistribution( CReN, CReS, CReC, par.pmin, par.pmax, par.mc_p ) end end """ write_crp_cre_to_txt( t::Vector{<:Real}, CRp::CRMomentumDistribution, CRe::CRMomentumDistribution, output_file::String ) Write CR Proton and Electron spectra for a series of time steps `t` to a txt file. """ function write_crp_cre_to_txt(t::Vector{<:Real}, CRp::CRMomentumDistribution, CRe::CRMomentumDistribution, output_file::String) data = Matrix{Float64}(undef, length(t), 1+4*length(CRp[1].norm)) for i = 1:length(t) data[i,:] = [t[i] CRp[i].bound[1:end-1]' CRp[i].norm' CRe[i].bound[1:end-1]' CRe[i].norm' ] end writedlm(output_file, data) end """ read_crp_cre_from_txt(filename::String) Read CR Proton and Electron spectra from a txt file. """ function read_crp_cre_from_txt(filename::String) data = readdlm(filename) N = size(data,1) Nbins = Int64((size(data,2) - 1) / 8) CRp = Array{CRMomentumDistribution,1}(undef,N) CRe = Array{CRMomentumDistribution,1}(undef,N) t = data[:,1] for i = 1:N CRp[i] = CRMomentumDistribution([data[i,2:2Nbins+1]; data[i,2Nbins+1]], data[i,2Nbins+2:4Nbins+1]) CRe[i] = CRMomentumDistribution([data[i,4Nbins+2:6Nbins+1]; data[i,6Nbins+1]], data[i,6Nbins+2:8Nbins+1]) end return t, CRp, CRe end function write_cr_to_txt(t::Vector{<:Real}, CR::Vector{CRMomentumDistribution}, output_file::String) data = Matrix{Float64}(undef, length(t), 1+2*length(CR[1].norm)) for i = 1:length(t) data[i,:] = [t[i] CR[i].bound[1:end-1]' CR[i].norm' ] end writedlm(output_file, data) end function read_cr_from_txt(fi) data = readdlm(fi) N = size(data,1) Nbins = Int64((size(data,2) - 1) / 4) CR = Array{CRMomentumDistribution,1}(undef,N) t = data[:,1] for i = 1:N CR[i] = CRMomentumDistribution([data[i,2:2Nbins+1]; data[i,2Nbins+1]], data[i,2Nbins+2:4Nbins+1]) end return t, CR end
[ 3500, 39266, 3118, 896, 198, 3500, 39266, 9399, 198, 198, 8818, 1100, 28008, 9419, 31646, 6601, 4863, 26410, 8979, 7, 7753, 3712, 10100, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1100, 2393, 656, 4088, 198, 220, 220, 220, 220, 220, 220, 220, 277, 796, 1280, 7, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3951, 796, 1100, 6615, 7, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1969, 7, 69, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 8106, 691, 5981, 3951, 13, 25235, 286, 790, 1627, 4940, 351, 366, 9419, 42865, 1911, 198, 220, 220, 220, 220, 220, 220, 220, 308, 796, 8833, 259, 13, 7203, 9419, 42865, 1600, 3951, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3951, 796, 3951, 58, 70, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 1271, 286, 5072, 3951, 198, 220, 220, 220, 220, 220, 220, 220, 399, 796, 4129, 7, 6615, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2315, 4818, 265, 2981, 329, 16602, 198, 220, 220, 220, 220, 220, 220, 220, 1067, 796, 8740, 31646, 6601, 7, 45, 8, 628, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 18872, 230, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 62, 11299, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 6626, 7, 6615, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 28664, 58, 72, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 18, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 49999, 58, 72, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 19, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 31646, 62, 22785, 58, 72, 60, 220, 220, 220, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 20, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 31646, 62, 7293, 601, 58, 72, 60, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 21, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 31646, 62, 28925, 62, 818, 58, 72, 60, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 22, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 31646, 62, 28925, 62, 15633, 58, 72, 60, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 23, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 28925, 62, 47, 58, 72, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 24, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1067, 13, 28925, 62, 68, 58, 72, 60, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21136, 7, 43879, 2414, 11, 1370, 62, 11299, 58, 940, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 1067, 198, 437, 628, 198, 198, 37811, 198, 220, 220, 220, 651, 9419, 29252, 298, 388, 20344, 3890, 4863, 7841, 2389, 7, 11495, 62, 7753, 3712, 10100, 11, 4522, 3712, 46541, 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, 279, 1084, 3712, 15633, 28, 16, 13, 15, 11, 9114, 897, 3712, 15633, 28, 16, 13, 15, 68, 21, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 65, 1040, 3712, 46541, 28, 15, 11, 4235, 3712, 5317, 2414, 28, 18, 8, 198, 198, 5569, 82, 262, 5444, 430, 422, 257, 2060, 6226, 39, 18758, 2884, 262, 18758, 4522, 13, 198, 37811, 198, 8818, 651, 9419, 29252, 298, 388, 20344, 3890, 4863, 7841, 2389, 7, 45380, 62, 7753, 3712, 10100, 11, 4522, 3712, 46541, 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, 220, 220, 279, 1084, 3712, 15633, 28, 16, 13, 15, 11, 9114, 897, 3712, 15633, 28, 16, 13, 15, 68, 21, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 65, 1040, 3712, 46541, 28, 15, 11, 4235, 3712, 5317, 2414, 28, 18, 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, 1237, 684, 3712, 33, 970, 28, 7942, 11, 28722, 3712, 33, 970, 28, 7942, 8, 628, 220, 220, 220, 289, 796, 1182, 62, 1462, 62, 26801, 7, 45380, 62, 7753, 8, 198, 220, 220, 220, 7508, 796, 1100, 62, 10951, 7, 45380, 62, 7753, 8, 628, 220, 220, 220, 611, 7508, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 611, 399, 65, 1040, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 6090, 470, 1100, 10958, 0, 1400, 7508, 2512, 1944, 0, 59, 77, 15979, 306, 1271, 286, 12858, 41701, 284, 5120, 2474, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 796, 15690, 90, 12360, 13949, 11, 16, 92, 7, 917, 891, 11, 22, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 16, 60, 796, 14151, 13949, 7203, 2389, 1600, 220, 220, 220, 471, 5317, 2624, 11, 2558, 2624, 7, 16, 828, 220, 220, 220, 220, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 17, 60, 796, 14151, 13949, 7203, 9419, 79, 45, 1600, 48436, 2624, 11, 2558, 2624, 7, 45, 65, 1040, 828, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 18, 60, 796, 14151, 13949, 7203, 9419, 79, 50, 1600, 48436, 2624, 11, 2558, 2624, 7, 45, 65, 1040, 828, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 19, 60, 796, 14151, 13949, 7203, 9419, 79, 34, 1600, 48436, 2624, 11, 2558, 2624, 7, 16, 828, 220, 220, 220, 220, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 20, 60, 796, 14151, 13949, 7203, 34, 3041, 45, 1600, 48436, 2624, 11, 2558, 2624, 7, 45, 65, 1040, 828, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 21, 60, 796, 14151, 13949, 7203, 34, 3041, 50, 1600, 48436, 2624, 11, 2558, 2624, 7, 45, 65, 1040, 828, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 58, 22, 60, 796, 14151, 13949, 7203, 34, 3041, 34, 1600, 48436, 2624, 11, 2558, 2624, 7, 16, 828, 220, 220, 220, 220, 685, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 1100, 2512, 6116, 284, 2866, 510, 24418, 198, 220, 220, 220, 2512, 62, 1930, 1756, 796, 39266, 9399, 13, 1136, 62, 9967, 62, 1930, 1756, 7, 45380, 62, 7753, 8, 628, 220, 220, 220, 4686, 796, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 2389, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 2389, 1, 7131, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 2389, 8973, 8, 628, 220, 220, 220, 1303, 2922, 262, 2292, 286, 262, 9167, 4522, 198, 220, 220, 220, 636, 796, 1064, 11085, 7, 4686, 764, 855, 471, 5317, 2624, 7, 2389, 8, 1267, 58, 16, 60, 628, 220, 220, 220, 1303, 1237, 684, 198, 220, 220, 220, 611, 1237, 684, 198, 220, 220, 220, 220, 220, 220, 220, 8740, 79, 45, 796, 48436, 2414, 12195, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 9419, 79, 45, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 9419, 79, 45, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 9419, 79, 45, 8973, 38381, 45299, 3911, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 8740, 79, 50, 796, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 9419, 79, 50, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 9419, 79, 50, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 9419, 79, 50, 8973, 38381, 45299, 3911, 60, 198, 220, 220, 220, 220, 220, 220, 220, 8740, 79, 34, 796, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 9419, 79, 34, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 9419, 79, 34, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 9419, 79, 34, 8973, 38381, 3911, 60, 628, 220, 220, 220, 220, 220, 220, 220, 399, 65, 1040, 796, 2546, 7, 9419, 79, 50, 11, 16, 8, 628, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 28722, 198, 220, 220, 220, 611, 28722, 198, 220, 220, 220, 220, 220, 220, 220, 327, 3041, 45, 796, 48436, 2414, 12195, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 34, 3041, 45, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 34, 3041, 45, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 34, 3041, 45, 8973, 38381, 45299, 3911, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 327, 3041, 50, 796, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 34, 3041, 50, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 34, 3041, 50, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 34, 3041, 50, 8973, 38381, 45299, 3911, 60, 198, 220, 220, 220, 220, 220, 220, 220, 327, 3041, 34, 796, 1100, 62, 9967, 7, 45380, 62, 7753, 11, 366, 34, 3041, 34, 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, 7508, 28, 10951, 58, 1136, 3245, 12195, 10951, 11, 1058, 9967, 62, 3672, 8, 764, 855, 366, 34, 3041, 34, 1, 7131, 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, 636, 4906, 28, 15, 11, 2512, 62, 9150, 28, 9967, 62, 1930, 1756, 14692, 34, 3041, 34, 8973, 38381, 3911, 60, 628, 220, 220, 220, 220, 220, 220, 220, 399, 65, 1040, 796, 2546, 7, 34, 3041, 50, 11, 16, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1582, 796, 8740, 29252, 298, 388, 20344, 3890, 16934, 7, 79, 1084, 11, 9114, 897, 11, 399, 65, 1040, 11, 4235, 8, 628, 220, 220, 220, 611, 1237, 684, 11405, 28722, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8740, 29252, 298, 388, 20344, 3890, 7, 8740, 79, 45, 11, 8740, 79, 50, 11, 8740, 79, 34, 11, 1582, 13, 79, 1084, 11, 1582, 13, 4426, 897, 11, 1582, 13, 23209, 62, 68, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8740, 29252, 298, 388, 20344, 3890, 7, 327, 3041, 45, 11, 327, 3041, 50, 11, 327, 3041, 34, 11, 1582, 13, 79, 1084, 11, 1582, 13, 4426, 897, 11, 1582, 13, 23209, 62, 79, 1267, 198, 220, 220, 220, 2073, 361, 1237, 684, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8740, 29252, 298, 388, 20344, 3890, 7, 8740, 79, 45, 11, 8740, 79, 50, 11, 8740, 79, 34, 11, 1582, 13, 79, 1084, 11, 1582, 13, 4426, 897, 11, 1582, 13, 23209, 62, 68, 1267, 198, 220, 220, 220, 2073, 361, 28722, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8740, 29252, 298, 388, 20344, 3890, 7, 327, 3041, 45, 11, 327, 3041, 50, 11, 327, 3041, 34, 11, 1582, 13, 79, 1084, 11, 1582, 13, 4426, 897, 11, 1582, 13, 23209, 62, 79, 1267, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 3551, 62, 6098, 79, 62, 7513, 62, 1462, 62, 14116, 7, 256, 3712, 38469, 90, 27, 25, 15633, 5512, 8740, 79, 3712, 9419, 29252, 298, 388, 20344, 3890, 11, 327, 3041, 3712, 9419, 29252, 298, 388, 20344, 3890, 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, 5072, 62, 7753, 3712, 10100, 1267, 198, 198, 16594, 8740, 1041, 1122, 290, 5903, 1313, 5444, 430, 329, 257, 2168, 286, 640, 4831, 4600, 83, 63, 284, 257, 256, 742, 2393, 13, 198, 37811, 198, 8818, 3551, 62, 6098, 79, 62, 7513, 62, 1462, 62, 14116, 7, 83, 3712, 38469, 90, 27, 25, 15633, 5512, 8740, 79, 3712, 9419, 29252, 298, 388, 20344, 3890, 11, 327, 3041, 3712, 9419, 29252, 298, 388, 20344, 3890, 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, 5072, 62, 7753, 3712, 10100, 8, 628, 220, 220, 220, 1366, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 4129, 7, 83, 828, 352, 10, 19, 9, 13664, 7, 9419, 79, 58, 16, 4083, 27237, 4008, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 47715, 796, 685, 83, 58, 72, 60, 8740, 79, 58, 72, 4083, 7784, 58, 16, 25, 437, 12, 16, 49946, 8740, 79, 58, 72, 4083, 27237, 6, 327, 3041, 58, 72, 4083, 7784, 58, 16, 25, 437, 12, 16, 49946, 327, 3041, 58, 72, 4083, 27237, 6, 2361, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1991, 276, 75, 76, 7, 22915, 62, 7753, 11, 1366, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 1100, 62, 6098, 79, 62, 7513, 62, 6738, 62, 14116, 7, 34345, 3712, 10100, 8, 198, 198, 5569, 8740, 1041, 1122, 290, 5903, 1313, 5444, 430, 422, 257, 256, 742, 2393, 13, 198, 37811, 198, 8818, 1100, 62, 6098, 79, 62, 7513, 62, 6738, 62, 14116, 7, 34345, 3712, 10100, 8, 628, 220, 220, 220, 1366, 796, 1100, 25404, 76, 7, 34345, 8, 628, 220, 220, 220, 399, 796, 2546, 7, 7890, 11, 16, 8, 198, 220, 220, 220, 399, 65, 1040, 796, 2558, 2414, 19510, 7857, 7, 7890, 11, 17, 8, 532, 352, 8, 1220, 807, 8, 628, 220, 220, 220, 8740, 79, 796, 15690, 90, 9419, 29252, 298, 388, 20344, 3890, 11, 16, 92, 7, 917, 891, 11, 45, 8, 198, 220, 220, 220, 327, 3041, 796, 15690, 90, 9419, 29252, 298, 388, 20344, 3890, 11, 16, 92, 7, 917, 891, 11, 45, 8, 628, 220, 220, 220, 256, 796, 1366, 58, 45299, 16, 60, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 8740, 79, 58, 72, 60, 796, 8740, 29252, 298, 388, 20344, 3890, 26933, 7890, 58, 72, 11, 17, 25, 17, 45, 65, 1040, 10, 16, 11208, 1366, 58, 72, 11, 17, 45, 65, 1040, 10, 16, 60, 4357, 1366, 58, 72, 11, 17, 45, 65, 1040, 10, 17, 25, 19, 45, 65, 1040, 10, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 327, 3041, 58, 72, 60, 796, 8740, 29252, 298, 388, 20344, 3890, 26933, 7890, 58, 72, 11, 19, 45, 65, 1040, 10, 17, 25, 21, 45, 65, 1040, 10, 16, 11208, 1366, 58, 72, 11, 21, 45, 65, 1040, 10, 16, 60, 4357, 1366, 58, 72, 11, 21, 45, 65, 1040, 10, 17, 25, 23, 45, 65, 1040, 10, 16, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 256, 11, 8740, 79, 11, 327, 3041, 198, 437, 628, 198, 8818, 3551, 62, 6098, 62, 1462, 62, 14116, 7, 83, 3712, 38469, 90, 27, 25, 15633, 5512, 8740, 3712, 38469, 90, 9419, 29252, 298, 388, 20344, 3890, 5512, 5072, 62, 7753, 3712, 10100, 8, 628, 220, 220, 220, 1366, 796, 24936, 90, 43879, 2414, 92, 7, 917, 891, 11, 4129, 7, 83, 828, 352, 10, 17, 9, 13664, 7, 9419, 58, 16, 4083, 27237, 4008, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 72, 11, 47715, 796, 685, 83, 58, 72, 60, 8740, 58, 72, 4083, 7784, 58, 16, 25, 437, 12, 16, 49946, 8740, 58, 72, 4083, 27237, 6, 2361, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1991, 276, 75, 76, 7, 22915, 62, 7753, 11, 1366, 8, 198, 437, 198, 198, 8818, 1100, 62, 6098, 62, 6738, 62, 14116, 7, 12463, 8, 628, 220, 220, 220, 1366, 796, 1100, 25404, 76, 7, 12463, 8, 628, 220, 220, 220, 399, 796, 2546, 7, 7890, 11, 16, 8, 198, 220, 220, 220, 399, 65, 1040, 796, 2558, 2414, 19510, 7857, 7, 7890, 11, 17, 8, 532, 352, 8, 1220, 604, 8, 628, 220, 220, 220, 8740, 796, 15690, 90, 9419, 29252, 298, 388, 20344, 3890, 11, 16, 92, 7, 917, 891, 11, 45, 8, 628, 220, 220, 220, 256, 796, 1366, 58, 45299, 16, 60, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 8740, 58, 72, 60, 796, 8740, 29252, 298, 388, 20344, 3890, 26933, 7890, 58, 72, 11, 17, 25, 17, 45, 65, 1040, 10, 16, 11208, 1366, 58, 72, 11, 17, 45, 65, 1040, 10, 16, 60, 4357, 1366, 58, 72, 11, 17, 45, 65, 1040, 10, 17, 25, 19, 45, 65, 1040, 10, 16, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 256, 11, 8740, 198, 437 ]
1.885839
3,679
import Base.CoreLogging: AbstractLogger, LogLevel, handle_message, min_enabled_level, shouldlog, global_logger struct BaseLogger <: AbstractLogger min_level::LogLevel end min_enabled_level(logger::BaseLogger) = logger.min_level shouldlog(logger::BaseLogger, args...) = true function handle_message(::BaseLogger, cl_level, msg, mod, group, id, filepath, line; kwargs...) logger = getlogger(mod) level = lowercase(string(cl_level)) log(logger, logger.record(logger.name, level, getlevels(logger)[level], msg)) end function substitute!(level::LogLevel=min_enabled_level(global_logger())) global_logger(BaseLogger(level)) notice(getlogger(@__MODULE__), "Substituting global logging with Memento") end
[ 11748, 7308, 13, 14055, 11187, 2667, 25, 198, 220, 220, 220, 27741, 11187, 1362, 11, 198, 220, 220, 220, 5972, 4971, 11, 198, 220, 220, 220, 5412, 62, 20500, 11, 198, 220, 220, 220, 949, 62, 25616, 62, 5715, 11, 198, 220, 220, 220, 815, 6404, 11, 198, 220, 220, 220, 3298, 62, 6404, 1362, 198, 198, 7249, 7308, 11187, 1362, 1279, 25, 27741, 11187, 1362, 198, 220, 220, 220, 949, 62, 5715, 3712, 11187, 4971, 198, 437, 198, 198, 1084, 62, 25616, 62, 5715, 7, 6404, 1362, 3712, 14881, 11187, 1362, 8, 796, 49706, 13, 1084, 62, 5715, 198, 21754, 6404, 7, 6404, 1362, 3712, 14881, 11187, 1362, 11, 26498, 23029, 796, 2081, 198, 198, 8818, 5412, 62, 20500, 7, 3712, 14881, 11187, 1362, 11, 537, 62, 5715, 11, 31456, 11, 953, 11, 1448, 11, 4686, 11, 2393, 6978, 11, 1627, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 49706, 796, 651, 6404, 1362, 7, 4666, 8, 198, 220, 220, 220, 1241, 796, 2793, 7442, 7, 8841, 7, 565, 62, 5715, 4008, 198, 220, 220, 220, 2604, 7, 6404, 1362, 11, 49706, 13, 22105, 7, 6404, 1362, 13, 3672, 11, 1241, 11, 651, 46170, 7, 6404, 1362, 38381, 5715, 4357, 31456, 4008, 198, 437, 198, 198, 8818, 15373, 0, 7, 5715, 3712, 11187, 4971, 28, 1084, 62, 25616, 62, 5715, 7, 20541, 62, 6404, 1362, 3419, 4008, 198, 220, 220, 220, 3298, 62, 6404, 1362, 7, 14881, 11187, 1362, 7, 5715, 4008, 198, 220, 220, 220, 4003, 7, 1136, 6404, 1362, 7, 31, 834, 33365, 24212, 834, 828, 366, 7004, 301, 270, 15129, 3298, 18931, 351, 337, 972, 78, 4943, 198, 437, 198 ]
2.723636
275
using CUDA using MOCNeutronTransport using BenchmarkTools using Test # Number of points to use in vectors N = 2^20 println("Using Point arrays of length $N") # Check num threads and give warning nthreads = Threads.nthreads() if nthreads === 1 @warn "Only using single-thread for cpu. Try restarting julia with 'julia --threads n'" else println("Using $nthreads threads for CPU multi-threading") end # Single threads CPU add function sequential_add!(x, y, z) for i in eachindex(x, y) @inbounds z[i] = x[i] + y[i] end return nothing end # Multithreaded CPU add function parallel_add!(x, y, z) Threads.@threads for i in eachindex(x, y) @inbounds z[i] = y[i] + x[i] end return nothing end # Single threaded GPU add function gpu_1_thread_add!(x, y, z) for i = 1:length(x) @inbounds z[i] = x[i] + y[i] end return nothing end function bench_gpu_1_thread_add!(x, y, z) CUDA.@sync begin @cuda gpu_1_thread_add!(x, y, z) end end # Single block GPU add function gpu_1_block_add!(x, y, z) index = threadIdx().x # this example only requires linear indexing, so just use `x` stride = blockDim().x for i = index:stride:length(x) @inbounds z[i] = x[i] + y[i] end return nothing end function bench_gpu_1_block_add!(x, y, z) CUDA.@sync begin @cuda threads=512 gpu_1_block_add!(x, y, z) end end # Multiple blocks GPU add function gpu_multiblock_add!(x, y, z) index = (blockIdx().x - 1) * blockDim().x + threadIdx().x stride = gridDim().x * blockDim().x for i = index:stride:length(y) @inbounds z[index] = x[index] + y[index] end return nothing end function bench_gpu_multiblock_add!(x, y, z) numblocks = ceil(Int, length(x)/512) CUDA.@sync begin @cuda threads=512 blocks=numblocks gpu_multiblock_add!(x, y, z) end end # Use the occupancy API to determine threads and blocks to saturate the GPU function bench_gpu_multiblock_autooccupancy!(x, y, z) kernel = @cuda launch=false gpu_multiblock_add!(x, y, z) config = launch_configuration(kernel.fun) threads = min(length(y), config.threads) blocks = cld(length(y), threads) CUDA.@sync begin kernel(x, y, z; threads, blocks) end end cpu_time = 0.0 for T = [Float64, Float32] println("Using Point of type $T") x = fill(Point_2D{T}(1, 1), N) y = fill(Point_2D{T}(2, 2), N) z = fill(Point_2D{T}(0, 0), N) time = @belapsed sequential_add!($x, $y, $z) μs = 1e6*time if T == Float64 global cpu_time = μs end speedup = cpu_time/μs println(" CPU: single-thread = $μs μs") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(z .== Point_2D{T}(3, 3)) fill!(z, Point_2D{T}(0, 0)) time = @belapsed parallel_add!($x, $y, $z) μs = 1e6*time speedup = cpu_time/μs println(" CPU: $nthreads threads = $μs μs.") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(z .== Point_2D{T}(3, 3)) x_d = CUDA.fill(Point_2D{T}(1, 1), N) y_d = CUDA.fill(Point_2D{T}(2, 2), N) z_d = CUDA.fill(Point_2D{T}(0, 0), N) time = @belapsed bench_gpu_1_thread_add!($x_d, $y_d, $z_d) μs = 1e6*time speedup = cpu_time/μs println(" GPU: single-thread/block, 1 blocks = $μs μs.") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(Array(z_d) .== Point_2D{T}(3, 3)) fill!(z_d, Point_2D{T}(0, 0)) time = @belapsed bench_gpu_1_block_add!($x_d, $y_d, $z_d) μs = 1e6*time speedup = cpu_time/μs println(" GPU: 512 threads/block, 1 blocks = $μs μs.") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(Array(z_d) .== Point_2D{T}(3, 3)) fill!(z_d, Point_2D{T}(0, 0)) time = @belapsed bench_gpu_multiblock_add!($x_d, $y_d, $z_d) μs = 1e6*time speedup = cpu_time/μs numblocks = ceil(Int64, N/512) println(" GPU: 512 threads/block, $numblocks blocks = $μs μs.") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(Array(z_d) .== Point_2D{T}(3, 3)) fill!(z_d, Point_2D{T}(0, 0)) time = @belapsed bench_gpu_multiblock_autooccupancy!($x_d, $y_d, $z_d) μs = 1e6*time speedup = cpu_time/μs kernel = @cuda launch=false gpu_multiblock_add!(x_d, y_d, z_d) config = launch_configuration(kernel.fun) threads = min(N, config.threads) blocks = cld(N, threads) println(" GPU: $threads threads/block, $blocks blocks = $μs μs.") println(" Speed up compared to single-thread CPU & Float64 Points = $speedup") @test all(Array(z_d) .== Point_2D{T}(3, 3)) end
[ 3500, 29369, 5631, 198, 3500, 337, 4503, 8199, 315, 1313, 8291, 634, 198, 3500, 25187, 4102, 33637, 198, 3500, 6208, 198, 198, 2, 7913, 286, 2173, 284, 779, 287, 30104, 198, 45, 796, 362, 61, 1238, 198, 35235, 7203, 12814, 6252, 26515, 286, 4129, 720, 45, 4943, 198, 198, 2, 6822, 997, 14390, 290, 1577, 6509, 198, 77, 16663, 82, 796, 14122, 82, 13, 77, 16663, 82, 3419, 198, 361, 299, 16663, 82, 24844, 352, 198, 220, 220, 220, 2488, 40539, 366, 10049, 1262, 2060, 12, 16663, 329, 42804, 13, 9993, 15765, 278, 474, 43640, 351, 705, 73, 43640, 1377, 16663, 82, 299, 29653, 198, 17772, 198, 220, 220, 220, 44872, 7203, 12814, 720, 77, 16663, 82, 14390, 329, 9135, 5021, 12, 16663, 278, 4943, 198, 437, 198, 198, 2, 14206, 14390, 9135, 751, 198, 8818, 35582, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 87, 11, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 1976, 58, 72, 60, 796, 2124, 58, 72, 60, 1343, 331, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 2, 7854, 342, 961, 276, 9135, 751, 198, 8818, 10730, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 14122, 82, 13, 31, 16663, 82, 329, 1312, 287, 1123, 9630, 7, 87, 11, 331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 1976, 58, 72, 60, 796, 331, 58, 72, 60, 1343, 2124, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 2, 14206, 40945, 11362, 751, 198, 8818, 308, 19944, 62, 16, 62, 16663, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 1976, 58, 72, 60, 796, 2124, 58, 72, 60, 1343, 331, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7624, 62, 46999, 62, 16, 62, 16663, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 29369, 5631, 13, 31, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 15339, 308, 19944, 62, 16, 62, 16663, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 14206, 2512, 11362, 751, 198, 8818, 308, 19944, 62, 16, 62, 9967, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 6376, 796, 4704, 7390, 87, 22446, 87, 220, 220, 220, 1303, 428, 1672, 691, 4433, 14174, 6376, 278, 11, 523, 655, 779, 4600, 87, 63, 198, 220, 220, 220, 33769, 796, 2512, 29271, 22446, 87, 198, 220, 220, 220, 329, 1312, 796, 6376, 25, 2536, 485, 25, 13664, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 1976, 58, 72, 60, 796, 2124, 58, 72, 60, 1343, 331, 58, 72, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7624, 62, 46999, 62, 16, 62, 9967, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 29369, 5631, 13, 31, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 15339, 14390, 28, 25836, 308, 19944, 62, 16, 62, 9967, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 20401, 7021, 11362, 751, 198, 8818, 308, 19944, 62, 16680, 571, 5354, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 6376, 796, 357, 9967, 7390, 87, 22446, 87, 532, 352, 8, 1635, 2512, 29271, 22446, 87, 1343, 4704, 7390, 87, 22446, 87, 198, 220, 220, 220, 33769, 796, 10706, 29271, 22446, 87, 1635, 2512, 29271, 22446, 87, 198, 220, 220, 220, 329, 1312, 796, 6376, 25, 2536, 485, 25, 13664, 7, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 1976, 58, 9630, 60, 796, 2124, 58, 9630, 60, 1343, 331, 58, 9630, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 7624, 62, 46999, 62, 16680, 571, 5354, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 997, 27372, 796, 2906, 346, 7, 5317, 11, 4129, 7, 87, 20679, 25836, 8, 198, 220, 220, 220, 29369, 5631, 13, 31, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 66, 15339, 14390, 28, 25836, 7021, 28, 77, 2178, 28860, 308, 19944, 62, 16680, 571, 5354, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 5765, 262, 42498, 7824, 284, 5004, 14390, 290, 7021, 284, 17373, 378, 262, 11362, 198, 8818, 7624, 62, 46999, 62, 16680, 571, 5354, 62, 23736, 19596, 3883, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 9720, 796, 2488, 66, 15339, 4219, 28, 9562, 308, 19944, 62, 16680, 571, 5354, 62, 2860, 0, 7, 87, 11, 331, 11, 1976, 8, 198, 220, 220, 220, 4566, 796, 4219, 62, 11250, 3924, 7, 33885, 13, 12543, 8, 198, 220, 220, 220, 14390, 796, 949, 7, 13664, 7, 88, 828, 4566, 13, 16663, 82, 8, 198, 220, 220, 220, 7021, 796, 269, 335, 7, 13664, 7, 88, 828, 14390, 8, 628, 220, 220, 220, 29369, 5631, 13, 31, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 9720, 7, 87, 11, 331, 11, 1976, 26, 14390, 11, 7021, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 36166, 62, 2435, 796, 657, 13, 15, 198, 1640, 309, 796, 685, 43879, 2414, 11, 48436, 2624, 60, 198, 220, 220, 220, 44872, 7203, 12814, 6252, 286, 2099, 720, 51, 4943, 198, 220, 220, 220, 2124, 796, 6070, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 16, 11, 352, 828, 399, 8, 198, 220, 220, 220, 331, 796, 6070, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 17, 11, 362, 828, 399, 8, 198, 220, 220, 220, 1976, 796, 6070, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 828, 399, 8, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 35582, 62, 2860, 0, 16763, 87, 11, 720, 88, 11, 720, 89, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 611, 309, 6624, 48436, 2414, 220, 198, 220, 220, 220, 220, 220, 220, 220, 3298, 42804, 62, 2435, 796, 18919, 82, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 9135, 25, 2060, 12, 16663, 796, 720, 34703, 82, 18919, 82, 4943, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 89, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 628, 220, 220, 220, 220, 198, 220, 220, 220, 6070, 0, 7, 89, 11, 6252, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 4008, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 10730, 62, 2860, 0, 16763, 87, 11, 720, 88, 11, 720, 89, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 9135, 25, 720, 77, 16663, 82, 14390, 796, 720, 34703, 82, 18919, 82, 19570, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 89, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2124, 62, 67, 796, 29369, 5631, 13, 20797, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 16, 11, 352, 828, 399, 8, 198, 220, 220, 220, 331, 62, 67, 796, 29369, 5631, 13, 20797, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 17, 11, 362, 828, 399, 8, 198, 220, 220, 220, 1976, 62, 67, 796, 29369, 5631, 13, 20797, 7, 12727, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 828, 399, 8, 198, 220, 220, 220, 220, 220, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 7624, 62, 46999, 62, 16, 62, 16663, 62, 2860, 0, 16763, 87, 62, 67, 11, 720, 88, 62, 67, 11, 720, 89, 62, 67, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 11362, 25, 2060, 12, 16663, 14, 9967, 11, 352, 7021, 796, 720, 34703, 82, 18919, 82, 19570, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 19182, 7, 89, 62, 67, 8, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 6070, 0, 7, 89, 62, 67, 11, 6252, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 4008, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 7624, 62, 46999, 62, 16, 62, 9967, 62, 2860, 0, 16763, 87, 62, 67, 11, 720, 88, 62, 67, 11, 720, 89, 62, 67, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 11362, 25, 22243, 14390, 14, 9967, 11, 352, 7021, 796, 720, 34703, 82, 18919, 82, 19570, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 19182, 7, 89, 62, 67, 8, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 6070, 0, 7, 89, 62, 67, 11, 6252, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 4008, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 7624, 62, 46999, 62, 16680, 571, 5354, 62, 2860, 0, 16763, 87, 62, 67, 11, 720, 88, 62, 67, 11, 720, 89, 62, 67, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 997, 27372, 796, 2906, 346, 7, 5317, 2414, 11, 399, 14, 25836, 8, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 11362, 25, 22243, 14390, 14, 9967, 11, 720, 77, 2178, 28860, 7021, 796, 720, 34703, 82, 18919, 82, 19570, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 19182, 7, 89, 62, 67, 8, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 628, 220, 220, 220, 6070, 0, 7, 89, 62, 67, 11, 6252, 62, 17, 35, 90, 51, 92, 7, 15, 11, 657, 4008, 198, 220, 220, 220, 640, 796, 2488, 6667, 28361, 7624, 62, 46999, 62, 16680, 571, 5354, 62, 23736, 19596, 3883, 0, 16763, 87, 62, 67, 11, 720, 88, 62, 67, 11, 720, 89, 62, 67, 8, 198, 220, 220, 220, 18919, 82, 796, 352, 68, 21, 9, 2435, 198, 220, 220, 220, 2866, 929, 796, 42804, 62, 2435, 14, 34703, 82, 198, 220, 220, 220, 9720, 796, 2488, 66, 15339, 4219, 28, 9562, 308, 19944, 62, 16680, 571, 5354, 62, 2860, 0, 7, 87, 62, 67, 11, 331, 62, 67, 11, 1976, 62, 67, 8, 198, 220, 220, 220, 4566, 796, 4219, 62, 11250, 3924, 7, 33885, 13, 12543, 8, 198, 220, 220, 220, 14390, 796, 949, 7, 45, 11, 4566, 13, 16663, 82, 8, 198, 220, 220, 220, 7021, 796, 269, 335, 7, 45, 11, 14390, 8, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 11362, 25, 720, 16663, 82, 14390, 14, 9967, 11, 720, 27372, 7021, 796, 720, 34703, 82, 18919, 82, 19570, 198, 220, 220, 220, 44872, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 8729, 510, 3688, 284, 2060, 12, 16663, 9135, 1222, 48436, 2414, 11045, 796, 720, 12287, 929, 4943, 198, 220, 220, 220, 2488, 9288, 477, 7, 19182, 7, 89, 62, 67, 8, 764, 855, 6252, 62, 17, 35, 90, 51, 92, 7, 18, 11, 513, 4008, 198, 437, 628 ]
2.181368
2,222