Skip to content

Instantly share code, notes, and snippets.

@garrison
Created January 20, 2018 15:00
Show Gist options
  • Save garrison/32054a385d5e909ed44b0871dde59a2d to your computer and use it in GitHub Desktop.
Save garrison/32054a385d5e909ed44b0871dde59a2d to your computer and use it in GitHub Desktop.
Uses of `indexin` in julia package ecosystem
./BayesNets/src/Factors/factors_dims.jl: index_common1 = indexin(common, ϕ1.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_common2 = indexin(common, ϕ2.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_unique1 = indexin(unique1, ϕ1.dimensions)
./BayesNets/src/Factors/factors_dims.jl: index_unique2 = indexin(unique2, ϕ2.dimensions)
./BayesNets/src/Factors/factors_dims.jl: inds = (indexin(dims, ϕ)...)
./BayesNets/src/Factors/factors_dims.jl: inds = (indexin(dims, ϕ)...)
./BayesNets/src/Factors/factors_dims.jl: inds = indexin(dims, ϕ)
./BayesNets/src/Factors/factors_dims.jl: inds = indexin(dims, ϕ)
./BayesNets/src/Factors/factors_main.jl:Base.indexin(dim::NodeName, ϕ::Factor) = findnext(ϕ.dimensions, dim, 1)
./BayesNets/src/Factors/factors_main.jl:Base.indexin(dims::NodeNames, ϕ::Factor) = indexin(dims, names(ϕ))
./BayesNets/src/Factors/factors_main.jl:Base.size(ϕ::Factor, dim::NodeName) = size(ϕ.potential, indexin(dim, ϕ))
./BayesNets/src/Factors/factors_main.jl: indexin(dims, ϕ)
./BayesNets/src/Factors/factors_main.jl: inds = indexin(dims, ϕ)
./BayesNets/src/Inference/gibbs.jl: q_loc = indexin(non_evidence, query)
./BayesNets/src/Inference/gibbs.jl: q_loc = indexin(non_evidence, query)
./BayesNets/src/Inference/loopy_belief.jl: evidence_index = indexin(nodes, evidence_nodes)
./CategoricalArrays/src/array.jl: ii = indexin(index(a.pool), newlevels)
./CategoricalArrays/src/array.jl: indexmap = indexin(index(spool), index(dpool))
./CategoricalArrays/src/array.jl: levelsmap = indexin(l, res)
./CategoricalArrays/src/array.jl: levelsmap = indexin(oldindex, index(A.pool))
./CategoricalArrays/src/array.jl: levelsmaps = [indexin(res, l) for l in levels]
./CompScienceMeshes/src/utils.jl: #p = indexin(face, face2)
./Cpp/src/Cpp.jl: idx = indexin([thisargm], msub)[1]
./DataArrays/src/pooleddataarray.jl: idx = [indexin(p.pool, pool)[p.refs] for p in pa]
./DataArrays/src/pooleddataarray.jl: tidx1 = convert(Vector{REFTYPE}, indexin(v1.pool, pool))
./DataArrays/src/pooleddataarray.jl: tidx2 = convert(Vector{REFTYPE}, indexin(v2.pool, pool))
./DataArrays/src/pooleddataarray.jl: tidx::Array{R} = indexin(newpool, pool)
./DataArrays/src/pooleddataarray.jl: tidx::Array{R} = indexin(newpool, x.pool)
./DataArrays/src/pooleddataarray.jl: tidx::Array{R} = indexin(x.pool, newpool)
./DiscreteFactor/src/dfactor.jl: Aarr0 = indexin(Cvar, A.var)
./DiscreteFactor/src/dfactor.jl: A_common_idx = indexin(common_var, A.var)
./DiscreteFactor/src/dfactor.jl: Barr0 = indexin(Cvar, B.var)
./DiscreteFactor/src/dfactor.jl: B_common_idx = indexin(common_var, B.var)
./DiscreteFactor/src/dfactor.jl: mapA = indexin(A.var, Cvar)
./DiscreteFactor/src/dfactor.jl: mapB = indexin(B.var, Cvar)
./DiscreteFactor/src/dfactor.jl: Reduce_dims = indexin(Reduce_var, A.var)
./DiscreteFactor/src/dfactor.jl: Remain_dims = indexin(Remain_var, A.var)
./DiscreteFactor/src/dfactor.jl: Remain_dims = indexin(Remain_var, A.var)
./DiscreteFactor/src/dfactor.jl: Remove_dims = indexin(Remove_var, A.var)
./DiscreteFactor/src/dfactor.jl: Remove_dims = indexin(Remove_var, A.var)
./ElasticFDA/src/ElasticFDA.jl: idx = indexin([thisargm], msub)[1]
./ElasticFDA/src/regression.jl: FN = sum(indexin(y[y_labels.==ii], cls_sub).>0);
./ElasticFDA/src/regression.jl: FP = sum(y[indexin(y_labels, cls_sub).>0] .== ii)
./ElasticFDA/src/regression.jl: TN = sum(y[indexin(y_labels,cls_sub).>0] .==
./ElasticFDA/src/regression.jl: y_labels[indexin(y_labels,cls_sub).>0]);
./GenomicVectors/docs/build/api.md:indexin(x::AbstractGenomicVector, y::AbstractGenomicVector, exact::Bool=true)
./GenomicVectors/docs/build/index.md:indexin(x,y)
./GenomicVectors/docs/src/index.md:indexin(x,y)
./GenomicVectors/src/AbstractGenomicVector_type.jl:Base.in(x::AbstractGenomicVector, y::AbstractGenomicVector, exact::Bool=true) = indexin(x,y,exact) .!= 0
./GenomicVectors/src/AbstractGenomicVector_type.jl:function Base.indexin(x::AbstractGenomicVector, y::AbstractGenomicVector, exact::Bool=true)
./GenomicVectors/src/AbstractGenomicVector_type.jl: indexin(x::AbstractGenomicVector, y::AbstractGenomicVector, exact::Bool=true)
./GenomicVectors/test/test_GenomicDataFrame.jl: @test indexin(gr,gr2,false) == [2,0,3]
./GenomicVectors/test/test_GenomicDataFrame.jl: @test indexin(gr,gr2,true) == [2,0,0]
./GenomicVectors/test/test_GenomicDataFrame.jl: @test indexin(gr,gr3,false) == [2,0,3]
./GenomicVectors/test/test_GenomicPositions.jl:@test indexin(x,y) == [2,0,1,0]
./GenomicVectors/test/test_GenomicRanges.jl:@test indexin(gr1,gr2) == [2,0,0]
./GenomicVectors/test/test_GenomicRanges.jl:@test indexin(gr1,gr2,false) == [2,0,3]
./Git/src/Git.jl: indexin(sha1s,split(readchomp(`log --all --format=%H`, dir=dir),"\n")).!=0
./ImageView/src/slicing.jl: dims = indexin([axes...], [names...])
./IndexedArrays/src/UniqueVectors.jl:indexin(a::AbstractArray, b::UniqueVector) =
./IndexedArrays/test/runtests.jl:@test indexin([1,2,34,0,5,56], UniqueVector([34,56,35,1,5,0])) == [4,0,1,6,5,2]
./Interpolations/perf/plot_shootout.jl:i = indexin([Float64], [eltypes...])[1]
./IntervalConstraintProgramming/src/separator.jl: indices1 = indexin(vars1, variables)
./IntervalConstraintProgramming/src/separator.jl: indices2 = indexin(vars2, variables)
./JuliaFEM/docs/tutorials/2015-12-13-3d-tie-contact.ipynb: " i = indexin([nid], get_connectivity(element))[1]\n",
./JuliaFEM/docs/tutorials/2015-12-13-3d-tie-contact.ipynb: " i = indexin([nid], get_connectivity(element))[1]\n",
./JuliaFEM/docs/tutorials/2015-12-13-3d-tie-contact.ipynb: " i = indexin([nid], get_connectivity(element))[1]\n",
./JuliaFEM/docs/tutorials/2015-12-13-3d-tie-contact.ipynb: " i = indexin([nid], get_connectivity(element))[1]\n",
./Kpax3/src/data_processing/read.jl: missobs = indexin(obsref, miss) .> 0
./Kpax3/src/misc/partition_functions.jl: idx = indexin(id, [x::String for x in d[:, 1]])
./Kpax3/src/misc/partition_functions.jl: indexin(d[:, 1], sort(unique(d[:, 1])))
./Kpax3/src/misc/partition_functions.jl: indexin(partition, sort(unique(partition)))
./Kpax3/src/misc/partition_functions.jl: indexin(partition, sort(unique(partition)))
./Kpax3/src/misc/partition_functions.jl: indexin(partition, sort(unique(partition)))[idx]
./Lexicon/src/filtering.jl: :category => (k,v) -> indexin([category(v)], CATEGORY_ORDER)[1])
./LinkedLists/README.md:indexin(a, l) # Highest index in list for each value of a that is member.
./LinkedLists/README.md:indexin(a, l) # Highest index in list for each value of a that is member.
./LinkedLists/src/list.jl:function indexin(a, l::AbstractList)
./LinkedLists/test/testlist.jl: @assert(indexin([2,3,12], l)==indexin([2,3,12], vals))
./LinkedLists/test/testslist.jl: @assert(indexin([2,3,12], l)==indexin([2,3,12], vals))
./Mads/examples/learn_julia/julia_express.jl:indexin(collect("abc"), collect("abrakadabra")) # [11, 9, 0] ('c' not found), needs arrays
./Mads/src/MadsAnasol.jl: extraparams = sourceparams[indexin(sourceparams, anasolsourcerequired).==0]
./Mads/src/MadsAnasol.jl: # indexall = indexin(anasolallparametersall, paramkeys)
./Mads/src/MadsAnasol.jl: Mads.madswarn("Missing: $(anasolsourcerequired[indexin(anasolsourcerequired, sourceparams).==0]))")
./Mads/src/MadsAnasol.jl: Mads.madswarn("Missing source parameters: $(anasolallparametersrequired[indexin(anasolallparametersrequired, paramkeys).==0])")
./Mads/src/MadsAnasol.jl: missingparameters = anasolallparametersrequired[indexin(anasolallparametersrequired, paramkeys).==0]
./Mads/src/MadsIO.jl: obsia = indexin(["Observations:"], strip.(lines[keyln]))
./Mamba/src/output/chains.jl: indexin(names, c.names)
./Mamba/src/output/modelchains.jl: keyinds = indexin(names(mc.model, key), mc.names)
./Microeconometrics/src/inference/hausman.jl: i₁ = indexin(names, coefnames(obj₁))
./Microeconometrics/src/inference/hausman.jl: i₂ = indexin(names, coefnames(obj₂))
./Microeconometrics/src/inference/hausman.jl: i₁ = indexin(names, coefnames(obj₁))
./Microeconometrics/src/inference/hausman.jl: i₂ = indexin(names, coefnames(obj₂))
./Microeconometrics/src/inference/hausman.jl: i₁ = indexin(names, coefnames(obj₁))
./Microeconometrics/src/inference/hausman.jl: i₂ = indexin(names, coefnames(obj₂))
./Neovim/test/runtests.jl: @assert all(indexin([[i,j] for j in range(1,5)], res) .> 0)
./NetworkLearning/src/utils.jl: cited_idx = indexin(citing, useidx)
./NetworkLearning/src/utils.jl: cited_papers = indexin(Int.(cites[:,1]), paper_ids)
./NetworkLearning/src/utils.jl: citing_idx = indexin(cited, useidx)
./NetworkLearning/src/utils.jl: citing_papers = indexin(Int.(cites[:,2]), paper_ids)
./ParallelAccelerator/src/callgraph.jl:function indexin(a, b::Array{Any,1})
./ParallelAccelerator/src/callgraph.jl: push!(state.array_params_set_or_aliased, indexin(rhsname, state.params))
./ParallelAccelerator/src/callgraph.jl:# push!(state.array_params_set_or_aliased, indexin(toLHSVar(array_name), state.params))
./ParallelAccelerator/src/callgraph.jl: push!(this_fi.array_params_set_or_aliased, indexin(arg_array_name, this_fi.params))
./PhyloNetworks/src/traits.jl: deleteat!(nNodes, indexin(nleaf, nNodes))
./PhyloNetworks/src/traits.jl: deleteat!(nNodes, indexin(nleaf, nNodes))
./PhyloNetworks/src/traits.jl:# iii = indexin(1:length(obj.msng), obj.ind[obj.msng])
./PhyloNetworks/src/traits.jl: indexMissing = indexin(missingTipNumbers, expe[:nodeNumber])
./PhyloNetworks/src/traits.jl: ind = indexin(fr[:tipNames], tipLabels(net))
./PhyloNetworks/src/traits.jl: # ind = indexin(V.tipNames, fr[:tipNames])
./PhyloNetworks/src/traits.jl:# jjj = [1:length(obj.V.internalNodeNumbers); indexin(1:length(obj.msng), obj.ind[!obj.msng])]
./PhyloNetworks/src/traits.jl:julia> nodes_hybrids = indexin([5], [n.number for n in net.node]) # Put a shift on edges below hybrids
./PhyloNetworks/src/traits.jl:julia> nodes_shifts = indexin([1,-5], [n.number for n in net.node]) # Put a shift on edges ending at nodes 1 and -5
./PhyloNetworks/src/traits.jl:# mask = indexin(obj.internalNodeNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl:# mask = indexin(obj.tipNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskNodes = indexin(obj.internalNodeNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskNodes = indexin(obj.internalNodeNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl:# maskNodes = indexin(obj.internalNodeNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskNodes = indexin(V.internalNodeNumbers, V.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskTips = indexin(obj.tipNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskTips = indexin(obj.tipNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskTips = indexin(obj.tipNumbers, obj.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl:# maskTips = indexin(obj.tipNumbers, obj.nodeNumbersTopOrder,)
./PhyloNetworks/src/traits.jl: maskTips = indexin(V.tipNumbers, V.nodeNumbersTopOrder)
./PhyloNetworks/src/traits.jl: maskTips = indexin(V.tipNumbers, V.nodeNumbersTopOrder)
./PhyloNetworks/test/test_lm.jl:predMiss = ee[indexin([n.number for n in net.leaf][[2,4]], ee[:nodeNumber]),:PredInt]
./PhyloNetworks/test/test_traits.jl:a = indexin([a_n.number], nodeNumbersTopOrder)
./PhyloNetworks/test/test_traits.jl:b = indexin([b_n.number], nodeNumbersTopOrder)
./PhyloNetworks/test/test_traits.jl:ind = indexin(V1.nodeNumbersTopOrder, nodesV2)
./PhyloNetworks/test/test_traits.jl:mask = indexin(des, V_t_1.nodeNumbersTopOrder)
./PhyloNetworks/test/test_traits.jl:p = indexin([child.number], nodeNumbersTopOrder)
./Phylo/src/rcall.jl: edges[index, :] = indexin([src(branch), dst(branch)], nodes)
./Plots/src/series.jl: maxind = maximum(indexin(rets, vec)) # get the last attempt that succeeded (most likely to fit all)
./ReverseDiffSource/src/graph.jl: tn[i,5] = join( map( x -> "$x", indexin(n.parents, Any[g.nodes...])), ", ")
./ReverseDiffSource/src/graph.jl: tn[i,6] = join( map( x -> "$x", indexin(n.precedence, Any[g.nodes...])), ", ")
./ReverseDiffSource/test/parsing.jl: lastnode = g.nodes[ maximum(indexin(nvars, g.nodes)) ]
./RLEVectors/src/group_generics.jl:indexin(x::AbstractVector,y::RLEVector) = Int[ i == 0 ? 0 : y.runends[i] for i in indexin(x,y.runvalues) ]
./RLEVectors/src/group_generics.jl:indexin(x::RLEVector,y::AbstractVector) = RLEVector( indexin(x.runvalues,y), x.runends )
./RLEVectors/src/group_generics.jl:indexin(x::RLEVector,y::RLEVector) = RLEVector( indexin(x.runvalues,y), x.runends)
./RLEVectors/test/test_group_generics.jl:@test indexin([200,200,1,1,5,5],foo) == [1000,1000,5,5,25,25]
./RLEVectors/test/test_group_generics.jl:@test indexin(x,collect(3:11)) == RLEVector([0,2,1],[2,4,6])
./RLEVectors/test/test_group_generics.jl:@test indexin(x,y) == RLEVector([0,8,6],[2,4,6])
./SALSA/src/salsa_main.jl: for y in zip(1:size(X,1),indexin(Y,Y_))
./Shannon/src/binning.jl:relabel(v::Vector{Int64}) = indexin(v, sort(unique(v)))
./SimJulia/src/base.jl: i = indexin(ev.bev.callbacks, [cb])[1]
./Sims/lib/kinetic.jl: xi = find(indexin(X, Any[x]))[1]
./Sims/lib/kinetic.jl: xi = find(indexin(X, Any[x]))[1]
./Sims/lib/kinetic.jl: yi = find(indexin(X, Any[y]))[1]
./Sims/lib/kinetic.jl: yi = find(indexin(X, Any[y]))[1]
./Sims/src/utils.jl:getcols(z::SimResult, s::AbstractString) = indexin([s], z.colnames)[1]
./SpatialEcology/src/Constructors.jl: is = indexin(occ[3], species)
./SpatialEcology/src/Constructors.jl: js = indexin(occ[1], sites)
./SpatialEcology/src/GetandSetdata.jl: @inbounds for (i, j) in enumerate(indexin(df2[on_right], df1[on_left]))
./SPTK/src/f0.jl: otype_int = indexin([otype], supported_otypes)[1] - 1
./SPTK/src/f0.jl: otype_int = indexin([otype], supported_otypes)[1] - 1
./UniqueVectors/src/UniqueVectors.jl:indexin(a::AbstractArray, b::UniqueVector) =
./UniqueVectors/test/runtests.jl:@test indexin([1,2,34,0,5,56], UniqueVector([34,56,35,1,5,0])) == [4,0,1,6,5,2]
./ValueOrientedRiskManagementInsurance/src/S2Life/S2Life_Constructors.jl: j = indexin([invs.igs[:IGCash].investments[i].cqs],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment