text:
# This implementation of calculation of z is the same for all the link functions
@inline function Z(link::AbstractLink, y::Array{T, 1}, mu::Array{T, 1},
            eta::Array{T, 1})::Array{T, 1} where {T <: AbstractFloat}
  return (deta_dmu(link, mu, eta) .* (y .- mu)) .+ eta
end

function Z(link::AbstractLink, y::Array{Array{T, 1}, 1}, mu::Array{Array{T, 1}, 1},
            eta::Array{Array{T, 1}, 1}) where {T <: AbstractFloat}
  nBlocks::Int64 = length(y)
  return [(deta_dmu(link, mu[i], eta[i]) .* (y[i] .- mu[i])) .+ eta[i] for i in 1:nBlocks]
end

function Z(::Block1DParallel, link::AbstractLink, y::Array{Array{T, 1}, 1}, mu::Array{Array{T, 1}, 1},
            eta::Array{Array{T, 1}, 1}) where {T <: AbstractFloat}
  nBlocks::Int64 = length(y)
  ret::Array{Array{T, 1}, 1} = Array{Array{T, 1}, 1}(undef, nBlocks)
  @threads for i in 1:nBlocks
    ret[i] = (deta_dmu(link, mu[i], eta[i]) .* (y[i] .- mu[i])) .+ eta[i]
  end
  return ret
end

# For parameters for GLM
struct Control{T <: AbstractFloat}
  epsilon::T
  maxit::Int64
  printError::Bool
  printCoef::Bool
  minstep::T
  function Control{T}(;epsilon::T = T(1E-7), maxit::Int64 = 25,
                    printError::Bool = false, printCoef::Bool = false,
                    minstep::T = T(1E-5)) where {T <: AbstractFloat}
    return new{T}(epsilon, maxit, printError, printCoef, minstep)
  end
end

# Error functions
using LinearAlgebra: norm
@inline function absoluteError(x::Array{T, 1}, y::Array{T, 1}) where {T <: AbstractFloat}
  return norm(x .- y)
end
@inline function absoluteError(x::T, y::T) where {T <: AbstractFloat}
  return abs(x - y)
end
@inline function relativeError(x::Array{T, 1}, y::Array{T, 1}) where {T <: AbstractFloat}
  return norm(x .- y)/(1E-5 + norm(x))
end
@inline function relativeError(x::T, y::T) where {T <: AbstractFloat}
  return abs(x - y)/(0.1 + abs(x))
end

#=
GLM Class Object
=#

abstract type AbstractGLM end

struct GLM{T <: AbstractFloat} <: AbstractGLM
  link::AbstractLink
  distrib::AbstractDistribution
  phi::T
  coefficients::Array{T, 1}
  covariance::Array{T, 2}
  iterations::Int64
  relativeError::T
  absoluteError::T
  converged::Bool
  deviance::T
  residuals::Array{T, 1}
  function GLM(link::AbstractLink, distrib::AbstractDistribution,
                phi::T, coefficients::Array{T, 1},
                covariance::Array{T, 2}, iterations::Int64,
                relativeError::T, absoluteError::T,
                converged::Bool, deviance::T,
                residuals::Array{T, 1}) where {T <: AbstractFloat}
  return new{T}(link, distrib, phi, coefficients, covariance, iterations,
              relativeError, absoluteError, converged, deviance, residuals)
  end
end

struct GLMBlock1D{T <: AbstractFloat} <: AbstractGLM
  link::AbstractLink
  distrib::AbstractDistribution
  phi::T
  coefficients::Array{T, 1}
  covariance::Array{T, 2}
  iterations::Int64
  relativeError::T
  absoluteError::T
  converged::Bool
  deviance::T
  residuals::Array{Array{T, 1}, 1}
  function GLMBlock1D(link::AbstractLink, distrib::AbstractDistribution,
                phi::T, coefficients::Array{T, 1},
                covariance::Array{T, 2}, iterations::Int64,
                relativeError::T, absoluteError::T,
                converged::Bool, deviance::T,
                residuals::Array{Array{T, 1}, 1}) where {T <: AbstractFloat}
  return new{T}(link, distrib, phi, coefficients, covariance, iterations,
              relativeError, absoluteError, converged, deviance, residuals)
  end
end

#=
  Show Method for GLMs
=#
function Base.show(io::IO, ::MIME"text/plain", model::AbstractGLM)
  rep::String = "GLM(" * string(model.link) * ", " * string(model.distrib) * ")\n"
  rep *= "Info(Convergence = " * string(model.converged) * ", " *
          "Iterations = " * string(model.iterations) * ")\n"
  rep *= "Error(AbsoluteError = " * string(model.absoluteError) *
         ", RelativeError = " * string(model.relativeError) *
         ", Deviance = " * string(model.deviance) * ", phi = " * string(model.phi) * ")\n"
  rep *= "Coefficients:\n" * string(model.coefficients) * "\n"
  standardError = [model.covariance[i, i]^0.5 for i in 1:size(model.covariance)[1]]
  rep *= "Standard Error:\n" * string(standardError) * "\n"
  print(io, rep)
end

max_stars_repo_name: dataPulverizer/glmSolver

max_issues_repo_name: dataPulverizer/glmSolver

max_forks_repo_name: dataPulverizer/glmSolver


text:
const g = JSON3.read(read(joinpath(include_dir, "spirv.core.grammar.json"), String))

const magic_number = parse(UInt32, g[:magic_number])
const grammar_version = VersionNumber(getindex.(Ref(g), [:major_version, :minor_version, :revision])...)
const instructions = g[:instructions]
const operand_kinds = g[:operand_kinds]

"""
Generate enumeration values representing SPIR-V operand kind categories.
These enumerations are not defined by the specification.
"""
function generate_category_as_enum(category)
    _operand_kinds = filter(x -> x["category"] == category, operand_kinds)
    kinds = getproperty.(_operand_kinds, :kind)

    typedecl = :($(Symbol(category))::Int)
    vals = (:($(Symbol(kind)) = $val) for (val, kind) in enumerate(kinds))
    :(@enum $typedecl begin $(vals...) end)
end

function extra_operands(enumerant)::Vector{Expr}
    if hasproperty(enumerant, :parameters)
        params = map(enumerant[:parameters]) do param
            Dict(k => (k == :kind ? Symbol(v) : strip(v, '\'')) for (k, v) ∈ param)
        end
        [Expr(:tuple, (:($k = $v) for (k, v) ∈ param)...) for param ∈ params]
    else
        []
    end
end

function generate_enum(operand)
    kind = Symbol(operand["kind"])
    enum_vals = []
    extra_operands_parameters = Expr[]

    foreach(operand["enumerants"]) do enumerant
        name = enumerant["enumerant"]
        enum_name = Symbol(kind, name)

        val = operand[:category] == "BitEnum" ? parse(UInt32, enumerant["value"]) : enumerant["value"]
        push!(enum_vals, :($enum_name = $val))

        parameters = extra_operands(enumerant)
        if !isempty(parameters)
            push!(extra_operands_parameters, :($enum_name => [$(parameters...)]))
        end
    end

    extra_operands_dict = isempty(extra_operands_parameters) ? nothing : :($kind => Dict($(extra_operands_parameters...)))
    :(@cenum $kind::UInt32 begin $(enum_vals...) end), extra_operands_dict
end

function generate_enums()
    enums = []
    extra_operands = []
    for op ∈ operand_kinds
        category = op["category"]
        if category ∈ ("ValueEnum", "BitEnum")
            enum_expr, extra_operands_expr = generate_enum(op)
            !isnothing(extra_operands_expr) && push!(extra_operands, extra_operands_expr)
            push!(enums, enum_expr)
        end
    end

    parameter_dict = :(const extra_operands = Dict($(extra_operands...)))

    vcat(enums, parameter_dict)
end

function generate_instruction_printing_class(insts_pc)
    insts_pc_noexclude = insts_pc[2:end]
    classes = getindex.(insts_pc_noexclude, "tag")
    strs = getindex.(insts_pc_noexclude, "heading")

    dict_args = vcat(:(Symbol("@exclude") => ""), [:(Symbol($class) => $str) for (class, str) ∈ zip(classes, strs)])

    :(const class_printing = Dict($(dict_args...)))
end

function attrs(operand)
    map(zip(keys(operand), values(operand))) do (name, value)
        if name == :kind
            :($name = $(Symbol(value)))
        else
            :($name = $(strip(value, '\'')))
        end
    end
end

function generate_instructions(insts)
    names = Symbol.(getproperty.(insts, :opname))
    classes = getproperty.(insts, :class)

    info(inst) = "operands" ∈ keys(inst) ? [:(tuple($(attrs(operand)...))) for operand ∈ inst["operands"]] : Expr[]

    dict_args = [:($name => $(:(tuple(Symbol($class), [$(info(insts[i])...)])))) for (i, (name, class)) ∈ enumerate(zip(names, classes))]

    [
        :(@cenum OpCode::UInt32 begin $(map((name, val) -> :($name = $val), names, getproperty.(insts, :opcode))...) end),
        :(const classes = Dict($(dict_args...))),
    ]
end

function generate_kind_to_category()
    :(const kind_to_category = Dict($([:($(Symbol(operand["kind"])) => $(operand["category"])) for operand ∈ operand_kinds]...)))
end

function pretty_dump(io, expr::Expr)
    custom_print(io, expr)
    println(io)
end

pretty_dump(io, exprs) = foreach(x -> pretty_dump(io, x), exprs)

src_dir(x...) = joinpath(dirname(@__DIR__), "src", x...)

function generate()
    @info "Generating files:"
    @info "  - instructions.jl"

    open(src_dir("generated", "instructions.jl"), "w+") do io
        pretty_dump(io, generate_instructions(instructions))
        pretty_dump(io, generate_instruction_printing_class(g[:instruction_printing_class]))
        pretty_dump(io, generate_kind_to_category())
    end

    @info "  - enums.jl"

    open(src_dir("generated", "enums.jl"), "w+") do io
        pretty_dump(io, generate_category_as_enum("Id"))
        pretty_dump(io, generate_category_as_enum("Literal"))
        pretty_dump(io, generate_category_as_enum("Composite"))
        pretty_dump(io, generate_enums())
    end

    true
end

ext: jl


text:
module TEST_LINKED_GATE
using Samsara, Conception, Test

@testset "LinkedGate construction -- with end-nodes" begin
    n1, n2 = SAT(:preNode), SAT(:postNode)
    case = LinkedGate(n1, n2)

    @test isa(LinkedGate(n1, n2), Conception.AbstractConcept)
    """ Definere plass for LinkedGate mtp. typehierarki """

    @test case.pre_node == n1
    @test case.post_node == n2
    """ We can create a linked gate with pre-node and post-node by ctor """

    @test Samsara.gate_is_open(case) == false
    """ default value for a gate is 'closed' """
end

@testset "LinkedGate with only one side -- empty end-node" begin
    fromSAT = SAT(:from)
    case = LinkedGate(fromSAT)
    @test case.pre_node == fromSAT
    @test isnothing(case.post_node)
    " gate can also be contructed with only one side defined "

    Samsara.gate_set_connected_node!(case, SAT(:to))
    @test case.post_node == SAT(:to)
    " We can set post-node by gate_set_connected_node!(gate, node) "

    @test_throws ArgumentError Samsara.gate_set_connected_node!(case, SAT(:whatever))
    " Cannot reset an allready set gate.. "

    Samsara.gate_set_connected_node!(case, nothing)
    @test isnothing(case.post_node)
    " ... unless we set it to nothing "

end

@testset "LinkedGate function: Opening, closing, activating, etc" begin
    Conception.__purge_everything!!()

    the_muex= MuExS()
    n1 = SAT(:preNode, inMuExS=the_muex)
    n2 = SAT(:postNode, inMuExS=the_muex)
    activate!(n1)
    @assert Conception.the_active_event_of(the_muex) == n1
    case = LinkedGate(n1, n2)
    """ Setting up the situation:
    - Gate n1 ⟶ n2      (n1 and n2 are MuExS)
    - We're in n1, before the gate.
    """

    Samsara.open_gate!(case)
    @test Samsara.gate_is_open(case) == true
    Samsara.open_gate!(case, false)
    @test Samsara.gate_is_open(case) == false
    Samsara.open_gate!(case, true)
    @test Samsara.gate_is_open(case) == true
    """ explicit opening and closing the gate """

    Samsara.open_gate!(case, true)
    activate!(case)
    @test Conception.the_active_event_of(the_muex) == n2
    activate!(case)
    @test Conception.the_active_event_of(the_muex) == n1
    activate!(case)
    activate!(case)
    @test Conception.the_active_event_of(the_muex) == n1
    """ activate OPEN gate => move throught it """

    oneSidedCase = LinkedGate(n1)
    Samsara.open_gate!(oneSidedCase)
    @assert is_active(n1)
    activate!(oneSidedCase)
    @test is_active(n1)
    """ One-sided case (with nodeB = nothing) does not transfer to 'other side': All ok """

    Samsara.open_gate!(case, false)
    @assert Conception.the_active_event_of(the_muex) == n1
    activate!(case)
    @test Conception.the_active_event_of(the_muex) == n1
    """ activate CLOSED gate => nothing happens """
end

@testset "LinkedGate that is gated by an AbstractConcept activation" begin
    Conception.__purge_everything!!()
    the_muex= MuExS()
    n1 = SAT(:preNode, inMuExS=the_muex)
    n2 = SAT(:postNode, inMuExS=the_muex)
    activate!(n1)
    @assert Conception.the_active_event_of(the_muex) == n1
    some_SAT = SAT(:conditional_SAT)
    case = LinkedGate(n1, n2, conditional=some_SAT)
    @test case._unlocked_by_trait == some_SAT
    """ Setting up the situation:
    - Gate n1 ⟶ n2 | cSAT     (n1 and n2 are MuExS, cSAT is not.)
    - We're in n1, before the gate.
    """

    case = LinkedGate(n1, n2, conditional=SAT(:some_condition))
    @test Samsara.gate_is_closed(case)
    activate!(SAT(:some_condition))
    @test Samsara.gate_is_open(case)
    deactivate!(SAT(:some_condition))
    @test Samsara.gate_is_closed(case)
    """ The gate can be conditioned on some external trait: some SAT from ctor ~10 lines up
    When the gated SAT --SAT(:some_condition) in the example-- is active, gate is open
    """
end

end # module

max_stars_repo_name: leikanger/Samsara

max_issues_repo_name: leikanger/Samsara

max_forks_repo_name: leikanger/Samsara


text:
export find_max_sunarray, iterative_find_max_subarray

#=
#                   Case III
#          <--- cross the midpoint --->
# [p][][][][][][][][][q][q+1][][][][][][][][][r]
# <--- in arr[p..q] ---><--- in arr[q+1..r] --->
#         Case I                Case II
=#

function find_max_crossing(arr::Vector, p::Int64, q::Int64, r::Int64)
    s1 = -Inf
    max_left = 0
    current_sum = 0
    for i=q:-1:p
        current_sum += arr[i]
        if current_sum > s1
            s1 = current_sum
            max_left = i
        end
    end

    s2 = -Inf
    max_right = 0
    current_sum = 0
    for i=q+1:r
        current_sum += arr[i]
        if current_sum > s2
            s2 = current_sum
            max_right = i
        end
    end

    return (max_left, max_right, s1+s2)
end

function find_max_subarray(arr::Vector, p::Int64, r::Int64)
    if p == r
        return (p, p, arr[p])
    end

    q = floor(Int, (p+r)/2)

    # case I
    i1, j1, s1 = find_max_subarray(arr, p, q)
    # case II
    i2, j2, s2 = find_max_subarray(arr, q+1, r)
    # case III
    i3, j3, s3 = find_max_crossing(arr, p, q, r)

    if s1 > s2
        return (i1, j1, s1)
    elseif s2 > s3
        return (i2, j2, s2)
    else
        return (i3, j3, s3)
    end
end

#=
# [][][i][][][][][][][][][j][j+1][][][]
# <----either this range--->
#     <----- or this range ----->
=#

function iterative_find_max_subarray(arr::Vector)
    n = length(arr)

    max_sum = -Inf
    max_i = max_j = 0
    sum = 0
    sum_i = 1

    for j=1:n
        sum += arr[j]
        if sum > max_sum
            max_i = sum_i; max_j = j
            max_sum = sum
        elseif sum < 0
            sum = 0
            sum_i = j+1
        end
    end

    return (max_i, max_j, max_sum)
end


text:
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test, LinearAlgebra, SparseArrays
let ambig = detect_ambiguities(SparseArrays; recursive=true)
    @test_broken isempty(ambig)
    ambig = Set{Any}(((m1.sig, m2.sig) for (m1, m2) in ambig))
    expect = []

    push!(expect, (Tuple{typeof(dot),AbstractVector{Tx},Union{SparseVector{Ty,Ti}, SubArray{Ty,1,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},Int},false} where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{Ty,Ti}, SubArray{Ty,1,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}}},false} where var"#s843"<:AbstractSparseVector{Ty,Ti}} where Ti} where Ty<:Number where Tx<:Number, Tuple{typeof(dot),Union{SparseVector{Tx,Ti}, SubArray{Tx,1,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},Int},false} where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{Tx,Ti}, SubArray{Tx,1,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}}},false} where var"#s843"<:AbstractSparseVector{Tx,Ti}} where Ti,AbstractVector{Ty}} where Ty<:Number where Tx<:Number))
    push!(expect, (Tuple{typeof(hcat),Vararg{AbstractSparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(hcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Hermitian{T,A} where A<:(Matrix{T} where T) where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841"},N} where N}))
    push!(expect, (Tuple{typeof(hcat),Vararg{AbstractSparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(hcat),Vararg{SparseArrays.AbstractSparseMatrixCSC,N} where N}, Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(hcat),Vararg{SparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(hcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Hermitian{T,A} where A<:(Matrix{T} where T) where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841"},N} where N}))
    push!(expect, (Tuple{typeof(hcat),Vararg{SparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(hcat),Vararg{Union{Vector{T} where T, AbstractSparseVector{Tv,Ti} where Ti where Tv},N} where N}, Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(hcat),Vararg{BitVector,N} where N}))
    push!(expect, (Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(hcat),Vararg{Number,N} where N}))
    push!(expect, (Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(hcat),Vararg{Union{BitMatrix, BitVector},N} where N}))
    push!(expect, (Tuple{typeof(hcat),Vararg{Vector{T} where T,N} where N}, Tuple{typeof(hcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(hvcat),Tuple{Vararg{Int,N} where N},Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(hvcat),Tuple{Vararg{Int,N} where N},Vararg{Number,N} where N}))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s806",var"#s805"} where var"#s805"<:(LowerTriangular{T,var"#s804"} where var"#s804"<:(StridedMatrix{T} where T)) where var"#s806",StridedVecOrMat{T}} where T<:Union{ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s806",var"#s805"} where var"#s805"<:(UnitLowerTriangular{T,var"#s804"} where var"#s804"<:(StridedMatrix{T} where T)) where var"#s806",StridedVecOrMat{T}} where T<:Union{ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s806",var"#s805"} where var"#s805"<:(UnitUpperTriangular{T,var"#s804"} where var"#s804"<:(StridedMatrix{T} where T)) where var"#s806",StridedVecOrMat{T}} where T<:Union{ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s806",var"#s805"} where var"#s805"<:(UpperTriangular{T,var"#s804"} where var"#s804"<:(StridedMatrix{T} where T)) where var"#s806",StridedVecOrMat{T}} where T<:Union{ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Diagonal{T,V} where V<:AbstractVector{T}) where var"#s843",AbstractVecOrMat{T}} where T, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s843",var"#s842"} where var"#s842"<:(LU{var"#s841",var"#s840"} where var"#s840"<:(StridedMatrix{T} where T) where var"#s841") where var"#s843",StridedVecOrMat{T} where T}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Adjoint{var"#s843",var"#s842"} where var"#s842"<:Hessenberg where var"#s843",AbstractVecOrMat{T} where T}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s812",var"#s811"} where var"#s811"<:(LowerTriangular{T,var"#s810"} where var"#s810"<:(StridedMatrix{T} where T)) where var"#s812",StridedVecOrMat{T}} where T<:Union{Float32, Float64, ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s812",var"#s811"} where var"#s811"<:(UnitLowerTriangular{T,var"#s810"} where var"#s810"<:(StridedMatrix{T} where T)) where var"#s812",StridedVecOrMat{T}} where T<:Union{Float32, Float64, ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s812",var"#s811"} where var"#s811"<:(UnitUpperTriangular{T,var"#s810"} where var"#s810"<:(StridedMatrix{T} where T)) where var"#s812",StridedVecOrMat{T}} where T<:Union{Float32, Float64, ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s812",var"#s811"} where var"#s811"<:(UpperTriangular{T,var"#s810"} where var"#s810"<:(StridedMatrix{T} where T)) where var"#s812",StridedVecOrMat{T}} where T<:Union{Float32, Float64, ComplexF32, ComplexF64}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s843",var"#s842"} where var"#s842"<:(Diagonal{T,V} where V<:AbstractVector{T}) where var"#s843",AbstractVecOrMat{T}} where T, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s843",var"#s842"} where var"#s842"<:(LU{var"#s841",var"#s840"} where var"#s840"<:(StridedMatrix{T} where T) where var"#s841") where var"#s843",StridedVecOrMat{T} where T}, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(ldiv!),Transpose{var"#s843",var"#s842"} where var"#s842"<:LU{T,Tridiagonal{T,V}} where var"#s843",AbstractVecOrMat{T} where T} where V where T, Tuple{typeof(ldiv!),Union{Adjoint{T,var"#s843"} where var"#s843"<:(UpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitUpperTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s843"} where var"#s843"<:(LowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Adjoint{T,var"#s841"} where var"#s841"<:(UnitLowerTriangular{T,var"#s840"} where var"#s840"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), LowerTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), Transpose{T,var"#s839"} where var"#s839"<:(UpperTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitUpperTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s839"} where var"#s839"<:(LowerTriangular{T,var"#s838"} where var"#s838"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), Transpose{T,var"#s837"} where var"#s837"<:(UnitLowerTriangular{T,var"#s836"} where var"#s836"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)), UnitLowerTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UnitUpperTriangular{T,var"#s842"} where var"#s842"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti), UpperTriangular{T,var"#s843"} where var"#s843"<:(Union{SparseArrays.AbstractSparseMatrixCSC{T,Ti}, SubArray{T,2,var"#s843",Tuple{Base.Slice{Base.OneTo{Int}},I},L} where L where var"#s843"<:SparseArrays.AbstractSparseMatrixCSC{T,Ti} where I<:AbstractUnitRange} where Ti)},StridedVecOrMat{T}} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{AbstractSparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Hermitian{T,A} where A<:(Matrix{T} where T) where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841"},N} where N}))
    push!(expect, (Tuple{typeof(vcat),Vararg{AbstractSparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{SparseArrays.AbstractSparseMatrixCSC,N} where N}, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{SparseVector,N} where N}, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{SparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Hermitian{T,A} where A<:(Matrix{T} where T) where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841"},N} where N}))
    push!(expect, (Tuple{typeof(vcat),Vararg{SparseVector{Tv,Ti},N} where N} where Ti<:Integer where Tv, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, AbstractSparseVector{Tv,Ti} where Ti where Tv},N} where N}, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Hermitian{T,A} where A<:(Matrix{T} where T) where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841"},N} where N}, Tuple{typeof(vcat),Vararg{AbstractRange{T},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, Matrix{T} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:Union{Adjoint{var"#s843",var"#s842"} where var"#s842"<:SparseVector where var"#s843", Bidiagonal, Diagonal, SymTridiagonal, Transpose{var"#s841",var"#s840"} where var"#s840"<:SparseVector where var"#s841", Tridiagonal, SparseArrays.AbstractSparseMatrixCSC, SparseVector} where T, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T) where T, Adjoint{var"#s843",var"#s842"} where var"#s842"<:(Vector{T} where T) where var"#s843", Adjoint{var"#s843",var"#s842"} where var"#s842"<:SparseVector where var"#s843", Bidiagonal, Diagonal, Hermitian{T,A} where A<:Union{Adjoint{var"#s843",var"#s842"} where var"#s842"<:SparseVector where var"#s843", Bidiagonal, Diagonal, SymTridiagonal, Transpose{var"#s841",var"#s840"} where var"#s840"<:SparseVector where var"#s841", Tridiagonal, SparseArrays.AbstractSparseMatrixCSC, SparseVector} where T, Hermitian{T,A} where A<:(Matrix{T} where T) where T, SymTridiagonal, Symmetric{T,A} where A<:Union{Adjoint{var"#s843",var"#s842"} where var"#s842"<:SparseVector where var"#s843", Bidiagonal, Diagonal, SymTridiagonal, Transpose{var"#s841",var"#s840"} where var"#s840"<:SparseVector where var"#s841", Tridiagonal, SparseArrays.AbstractSparseMatrixCSC, SparseVector} where T, Symmetric{T,A} where A<:(Matrix{T} where T) where T, Transpose{var"#s841",var"#s840"} where var"#s840"<:(Vector{T} where T) where var"#s841", Transpose{var"#s841",var"#s840"} where var"#s840"<:SparseVector where var"#s841", Tridiagonal, SparseArrays.AbstractSparseMatrixCSC, SparseVector},N} where N}, Tuple{typeof(vcat),Vararg{AbstractRange{T},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T} where T, SparseVector},N} where N}, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(vcat),Vararg{AbstractRange{T},N} where N} where T))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(vcat),Vararg{BitMatrix,N} where N}))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(vcat),Vararg{BitVector,N} where N}))
    push!(expect, (Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T, Tuple{typeof(vcat),Vararg{Number,N} where N}))
    push!(expect, (Tuple{typeof(vcat),Vararg{Vector{T} where T,N} where N}, Tuple{typeof(vcat),Vararg{Union{Vector{T}, Matrix{T}, Adjoint{T,Vector{T}}, Transpose{T,Vector{T}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Matrix{T} where T), Hermitian{T,A} where A<:(Matrix{T} where T), Symmetric{T,A} where A<:(Matrix{T} where T)},N} where N} where T))

    good = true
    while !isempty(ambig)
        sigs = pop!(ambig)
        i = findfirst(==(sigs), expect)
        if i === nothing
            println(stderr, "push!(expect, (", sigs[1], ", ", sigs[2], "))")
            good = false
            continue
        end
        deleteat!(expect, i)
    end
    @test isempty(expect)
    @test good
end

max_stars_repo_name: ExpandingMan/julia

max_issues_repo_name: ExpandingMan/julia

max_forks_repo_name: ExpandingMan/julia


text:
function calculate_pixel_reliability(pixel_image::AbstractArray{T, 2}, pixel_index, pixel_shifts) where T
    @inbounds D1 = wrap_val(pixel_image[pixel_index+pixel_shifts[2]].val - pixel_image[pixel_index].val)
    @inbounds D2 = wrap_val(pixel_image[pixel_index+pixel_shifts[4]].val - pixel_image[pixel_index].val)
    @inbounds H  = wrap_val(pixel_image[pixel_index+pixel_shifts[6]].val - pixel_image[pixel_index].val)
    @inbounds V  = wrap_val(pixel_image[pixel_index+pixel_shifts[8]].val - pixel_image[pixel_index].val)
    return H*H + V*V + D1*D1 + D2*D2
end

max_forks_repo_name: platawiec/Unwrap


text:
function merge!(data::Array, scratch::Array, left::Int, right::Int, stop::Int)
	leftstop = right - 1
	scratchindex = left
	start = left
	while left <= leftstop || right <= stop
		if left > leftstop
			scratch[scratchindex] = data[right]
			right += 1
		elseif right > stop
			scratch[scratchindex] = data[left]
			left += 1
		else
			if data[left] < data[right]
				scratch[scratchindex] = data[left]
				left += 1
			else
				scratch[scratchindex] = data[right]
				right += 1
			end
		end
		scratchindex += 1
	end

	for i in start : stop
		data[i] = scratch[i]
	end
end

function mergesort!(data::Array, scratch::Array, start::Int, stop::Int)
	if stop - start < 1
		return
	end

	mergesort!(data, scratch, start, fld(start + stop, 2))
	mergesort!(data, scratch, fld(start + stop, 2) + 1, stop)
	merge!(data, scratch, start, fld(start + stop, 2) + 1, stop)
end

function mergesort!(data::Array)
	scratch = copy(data)
	mergesort!(data, scratch, 1, length(data))
end

function multisort!(data::Array, num_threads::Int=8)
	indices::Array{Int64, 1} = Array{Int64, 1}(undef, num_threads + 1)
	indices[1] = 1
	indices[num_threads + 1] = length(data) + 1
	for i in 1 : num_threads - 1
		indices[i + 1] = floor(i * length(data) / num_threads)
	end

	Threads.@threads for i in 1 : num_threads
		quicksort!(data, indices[i], indices[i + 1] - 1)
	end

	scratch = Array{typeof(data[1]), 1}(undef, length(data))

	for i in 1 : num_threads - 1
		merge!(data, scratch, 1, indices[i + 1], indices[i + 2] - 1)
	end
end


text:
# specific tests for CICO_ONE_PASS

@testset "f_1p" begin
    res0 = [get_right_endpoint(
        [3.0],
        (x::Vector{Float64}) -> x[i],
        (x::Vector{Float64}) -> f_1p(x) - 9.,
        Val(:CICO_ONE_PASS)
    ) for i in 1:1]
    @test isapprox(res0[1][1], 5., atol=1e-2)
    @test res0[1][3] == :BORDER_FOUND_BY_SCAN_TOL
end


text:
module LPA

using StatsBase
using Graphs

export label_propagation, modularity, nmi, voi, neighbor_strength

include("labelpropagation.jl")
include("modularity.jl")
include("nmi.jl")
include("voi.jl")
include("utils.jl")

end # module


text:
"""
Generate landmarks data, or read landmarks data.
- dataset: specifies type of data to be generated/loaded
- P:
- t: grid used for generating data
- σobs: standard deviation of observation noise

Returns
- x0: initial state without noise
- xobs0, xobsT: (observed initial and final states with noise)
- Xf: forward simulated path
- P: only adjusted in case of 'real' data, like the bearskull data
- pb: plotting bounds used in animation

Example
    x0, xobs0, xobsT, Xf, P, pb = generatedata(dataset,P,t,σobs)

"""
function generatedata(dataset,P,t,σobs)

    n = P.n
    if dataset=="forwardsimulated"
        q0 = [PointF(2.0cos(t), sin(t)) for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        p0 = [5*Point(1.0, -3.0) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        x0 = State(q0, p0)
        Wf, Xf = landmarksforward(t, x0, P)
        xobs0 = x0.q + σobs * randn(PointF,n)
        xobsT = [Xf.yy[end].q[i] for i in 1:P.n ] + σobs * randn(PointF,n)
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5)
        obs_atzero = true
    end
    if dataset in ["shifted","shiftedextreme"] # first stretch, then rotate, then shift; finally add noise
        q0 = [PointF(2.0cos(t), sin(t))  for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        p0 = [PointF(1.0, -3.0) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        x0 = State(q0, p0)
        @time Wf, Xf = landmarksforward(t, x0, P)
        xobs0 = x0.q + σobs * randn(PointF,n)
        if dataset == "shifted"
            θ, η =  π/10, 0.2
            pb = Lmplotbounds(-3.0,3.0,-2.0,2.0) # verified
        end
        if dataset == "shiftedextreme"
            θ, η =  π/5, 0.4
            pb = Lmplotbounds(-3.0,3.0,-3.0,3.0)
        end
        rot =  SMatrix{2,2}(cos(θ), sin(θ), -sin(θ), cos(θ))
        stretch = SMatrix{2,2}(1.0 + η, 0.0, 0.0, 1.0 - η)
        shift =  0.0*PointF(0.1,-0.1)
        xobsT = [rot * stretch * xobs0[i] + shift  for i in 1:P.n ] + σobs * randn(PointF,n)
        obs_atzero = true
    end
    if dataset=="bear"
        bear0 = readdlm(joinpath(@__DIR__, "..", "data-stefan", "bear1.csv"), ',')
        bearT = readdlm(joinpath(@__DIR__, "..", "data-stefan", "bear2.csv"), ',')
        nb = size(bear0)[1]
        avePoint = Point(414.0, 290.0)  # average of (x,y)-coords for bear0 to center figure at origin
        xobs0 = [Point(bear0[i,1], bear0[i,2]) - avePoint for i in 1:nb]/200.
        xobsT = [Point(bearT[i,1], bearT[i,2]) - avePoint for i in 1:nb]/200.
        # need to redefine P, because of n
        if model == :ms
            P = MarslandShardlow(P.a, P.c, P.γ, P.λ, nb)
        else
            P = Landmarks(P.a, P.c, nb, P.db, P.nfstd, P.nfs)
        end
        x0 = State(xobs0, rand(PointF,P.n))
        Wf, Xf = landmarksforward(t, x0, P)
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5)
        obs_atzero = true
    end
    if dataset=="heart"
        q0 = [PointF(2.0cos(t), 2.0sin(t))  for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        p0 = [PointF(1.0, -3.0) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        x0 = State(q0, p0)
        @time Wf, Xf = landmarksforward(t,  x0, P)
        xobs0 = x0.q + σobs * randn(PointF,n)
        heart_xcoord(s) = 0.2*(13cos(s)-5cos(2s)-2cos(3s)-cos(4s))
        heart_ycoord(s) = 0.2*16(sin(s)^3)
        qT = [PointF(heart_xcoord(t), heart_ycoord(t))  for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        xobsT = qT + σobs * randn(PointF,n)
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5)
        obs_atzero = true
    end
    if dataset=="peach"
        q0 = [PointF(2.0cos(t), 2.0sin(t))  for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        p0 = [PointF(1.0, -3.0) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        x0 = State(q0, p0)
        @time Wf, Xf = landmarksforward(t, x0, P)
        xobs0 = x0.q + σobs * randn(PointF,n)
        peach_xcoord(s) = (2.0 + sin(s)^3) * cos(s)
        peach_ycoord(s) = (2.0 + sin(s)^3) * sin(s)
        qT = [PointF(peach_xcoord(t), peach_ycoord(t))  for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        xobsT = qT + σobs * randn(PointF,n)
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5)
        obs_atzero = true
    end
    if dataset=="generatedstefan"
        testshapes = npzread(joinpath(@__DIR__, "..", "data-stefan", "match.npy.npz"))
        xobs0vec =  get(testshapes,"q0",0)
        xobsTvec =  get(testshapes,"v",0)
        p0vec = get(testshapes,"p",0)
        nb = div(length(xobs0vec),2)

        subs = 1:6:nb#1:5:nb
        xobs0 = [PointF(xobs0vec[2i-1],xobs0vec[2i]) for i in subs]
        xobsT = [PointF(xobsTvec[2i-1],xobsTvec[2i]) for i in subs]
        p0 = [PointF(p0vec[2i-1],p0vec[2i]) for i in subs]
        nb = length(subs)

        # need to redefine P, because of n
        if model == :ms
            P = MarslandShardlow(P.a,P.c, P.γ, P.λ, nb)
        elseif model== :ahs
            P = Landmarks(P.a,P.c, nb, P.db, P.nfstd, P.nfs)
        end
        x0 = State(xobs0, p0)
        Wf, Xf = landmarksforward(t, x0, P)
#        plotlandmarkpositions(Xf,P,xobs0,xobsT;db=4)
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5) # verified
        obs_atzero = true
    end

    if dataset=="forwardsimulated_multiple"
        nshapes = 3
        q0 = [PointF(2.0cos(t), sin(t)) for t in (0:(2pi/n):2pi)[1:n]]  #q0 = circshift(q0, (1,))
        p0 = [Point(0.1, -0.4) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        #p0 = [Point(4.1, -0.4) for i in 1:n]/n  # #p0 = [randn(Point) for i in 1:n]
        x0 = State(q0, p0)
        xobsT = Vector{PointF}[]
        for k in 1:nshapes
            #a = P.a * exp(0.15*randn())
            a = 5*P.a * exp(0.15*randn())
            c = P.c * exp(0.15*randn())
            γ = 0.6*getγ(P) * exp(0.01*randn())
            if model == :ms
                P = MarslandShardlow(a, c, γ, P.λ, P.n)
            elseif model == :ahs
                nfs = construct_nfs(P.db, P.nfstd, γ)
                P = Landmarks(a, c, P.n, P.db, P.nfstd, nfs)
            end
            Wf, Xf = landmarksforward(t, x0, P)

            push!(xobsT, [Xf.yy[end].q[i] for i in 1:P.n ] + σobs * randn(PointF,n))
        end
        xobs0 = []
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5)
        obs_atzero = false
    end
    if dataset=="cardiac"
        # see https://arxiv.org/pdf/1805.06038.pdf
        # 14 cardiac images, 66 landmarks per image
        # The epicardial and endocardial contours where annotated with 33 landmarks along each outline resulting in 66 landmarks per image
        # Each of the 14 rows is a shape with 66 landmarks, x coordinates in
        # cardiac[:,:,0], y coordinates in cardiac[:,:,1], i.e. in python, all
        # shapes are plotted with
        # for i in range(N_samples):
        #      plt.plot(qs[i,:,0],qs[i,:,1])

        cardiac = npzread(joinpath(@__DIR__, "..", "data-stefan","cardiac.npy"))  # heart data (left ventricles, the one we used in https://arxiv.org/abs/1705.10943
        cardiacx = cardiac[:,:,1]  # x-coordinates of landmarks
        cardiacy = cardiac[:,:,2]  # y-coordinates of landmarks
        nshapes = 14
        landmarksset = 1:5:66
        n = length(landmarksset)
        xobsT = fill(zeros(PointF,66),nshapes)
        for i in 1:nshapes # for each image
            xobsT[i] = [PointF(cardiacx[i,j], cardiacy[i,j]) for j in landmarksset ]
        end
        x0 = State(zeros(PointF,n), zeros(PointF,n))
        pb = Lmplotbounds(-2.0,2.0,-1.5,1.5) # need to check
        obs_atzero = false
        xobs0 = []
         Xf = 0
        if model == :ms
            P = MarslandShardlow(P.a,P.c, P.γ, P.λ, n)
        elseif model== :ahs
            P = Landmarks(P.a,P.c, n, P.db, P.nfstd, P.nfs)
        end

        xobsTdf = DataFrame(x=extractcomp(xobsT[1],1), y =extractcomp(xobsT[1],2))
        @rput xobsTdf
        R"""
            library(tidyverse)
            library(ggplot2)
            xobsTdf %>% ggplot(aes(x=x,y=y)) + geom_point() + geom_path()
        """
        pb = Lmplotbounds(-0.25,0.25,-0.25,0.25)
    end
    x0, xobs0, xobsT, Xf, P, pb, obs_atzero
end

if false
    cc = npzread(joinpath(@__DIR__, "..", "data-stefan","cc.npy")) # corpus callosum data

                    # there are 14 cardiac images, in https://arxiv.org/pdf/1705.10943.pdf 17 landmarks are chosen
end


text:
#### Gab's fncs for exploration
using DataFrames
using SimpleSDMLayers

# Prepare data
function prepare_csvdata(csvdata::DataFrame)
    # Subset with specific columns
    df = csvdata[:, [:new_sp, :year, :decimalLatitude, :decimalLongitude]]
    # Rename coordinate names
    rename!(df, :decimalLatitude => :latitude)
    rename!(df, :decimalLongitude => :longitude)
    rename!(df, :new_sp => :species)
    # Replace spaces by underscores in species names
    df.species .= replace.(df.species, " " .=> "_")
    # Remove entries with missing year, latitude and lontitude
    dropmissing!(df, [:year, :latitude, :longitude])
    return df
end

max_stars_repo_name: kiristern/SDM

max_issues_repo_name: kiristern/SDM

max_forks_repo_name: kiristern/SDM


text:
# -----------------------------------------------------------------------------
#
#
#
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
using DataFrames, CSV, Random
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# --- load the data and clean it up to adapt it for julia
function gen_df(ϵ; seed::Int=107, N_rows=10)
  Random.seed!(seed)
  N_id   = 2;
  i = 1
  df_example = DataFrame()
  for i in 1:N_id
    obs = 1:N_rows
    id = i .* Int.(ones(N_rows))
    Z = rand(N_rows)
    X = Z + 0.5 .* rand(N_rows)
    Y = 3 .* Z + 0.3 .* rand(N_rows)
    df_tmp = DataFrame(obs=obs, id = id, Z = Z, X = X, Y = Y)
    df_example = vcat(df_example, df_tmp)
  end

  df_example1 = unstack(select(df_example, :obs, :id, :X), [:obs, :id, :X], :id, :X, renamecols=x->Symbol(:X, Int(x)))
  df_example2 = unstack(select(df_example, :obs, :id, :Z), [:obs, :id, :Z], :id, :Z, renamecols=x->Symbol(:Z, Int(x)))

  df_example = innerjoin(df_example, select(df_example1, :obs, :id, :X1, :X2), on = [:obs, :id])
  df_example = innerjoin(df_example, select(df_example2, :obs, :id, :Z1, :Z2), on = [:obs, :id])

  df_example[ ismissing.(df_example.X1), :X1] .= 0.0;
  df_example[ ismissing.(df_example.X2), :X2] .= 0.0;
  df_example[ ismissing.(df_example.Z1), :Z1] .= 0.0;
  df_example[ ismissing.(df_example.Z2), :Z2] .= 0.0;

  transform!(df_example, :id => categorical => :id)
  transform!(df_example, :Z1 => (x-> x .+ ϵ .* rand(N_id*N_rows)) => :Z1eps)
  transform!(df_example, :Z2 => (x-> x .+ ϵ .* rand(N_id*N_rows)) => :Z2eps)

  return(df_example)

end;

df_example = gen_df(0.01, seed=107, N_rows=10)
CSV.write("./data/reg_sls_fe_issue.csv", df_example)
# -----------------------------------------------------------------------------

max_stars_repo_name: eloualiche/snippets

max_issues_repo_name: eloualiche/snippets

max_forks_repo_name: eloualiche/snippets


text:
# This file is a part of Julia. License is MIT: https://julialang.org/license

# This file tests the Julia 1.0-1.5 extension interface of TerminalMenus

# scroll must only accept symbols
@test_throws TypeError TerminalMenus.config(scroll=true)
# :foo is not a valid scroll option
@test_throws ArgumentError TerminalMenus.config(scroll=:foo)
# Test scroll wrap
TerminalMenus.config(scroll=:wrap)
@test TerminalMenus.CONFIG[:scroll_wrap] == true
# Updating some params shouldn't change other ones
TerminalMenus.config(charset=:ascii)
@test TerminalMenus.CONFIG[:scroll_wrap] == true
TerminalMenus.config(scroll=:nowrap)
@test TerminalMenus.CONFIG[:scroll_wrap] == false

max_stars_repo_name: vanillajonathan/julia

max_issues_repo_name: vanillajonathan/julia

max_forks_repo_name: vanillajonathan/julia