Skip to content

Commit

Permalink
avoid ambiguity in ParticleIndexerArray constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
knstmrd committed Dec 19, 2024
1 parent b7f3f03 commit f0964cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/particles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ mutable struct ParticleIndexerArray
"""
Create a ParticleIndexerArray from a 2-D array of ParticleIndexers
"""
function ParticleIndexerArray(indexer_arr, n_total)
function ParticleIndexerArray(indexer_arr::Array{ParticleIndexer,2}, n_total)
return new(indexer_arr, n_total)
end

"""
Create a ParticleIndexerArray given the number of cells and species
"""
function ParticleIndexerArray(n_cells::Int, n_species::Int) # most generic version
function ParticleIndexerArray(n_cells::Integer, n_species::Integer) # most generic version
pia_indexer = Array{ParticleIndexer, 2}(undef, (n_cells, n_species))

for j in 1:n_species
Expand All @@ -77,7 +77,7 @@ end
"""
Create a single-species/single-cell ParticleIndexerArray
"""
ParticleIndexerArray(n_particles::Int) = ParticleIndexerArray(hcat(ParticleIndexer(n_particles)), [n_particles])
ParticleIndexerArray(n_particles::Integer) = ParticleIndexerArray(hcat(ParticleIndexer(n_particles)), [n_particles])

"""
Create a multi-species/single-cell ParticleIndexerArray
Expand Down

0 comments on commit f0964cc

Please sign in to comment.