Skip to content

Commit

Permalink
Improve docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
simsurace committed Feb 21, 2022
1 parent 8b29947 commit e775138
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
20 changes: 18 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
## Models
```@docs
AbstractBinomialModel
BinomialModel
BinomialGridModel
BinomialGridModel(
Nind, pind, qind, σind, τind,
Nrng, prng, qrng, σrng, τrng
)
BinomialGridModel(m_out, my_Nrng, my_prng, my_qrng, my_σrng, my_τrng)
BinomialModel
BinomialModel(Nmax, m_out, device = :gpu)
BinomialModel(m_out, my_Nrng, my_prng, my_qrng, my_σrng, my_τrng)
BinomialModel(model::BinomialGridModel)
ScalarBinomialModel
BinomialState
BinomialState(Nmax, m_out, m_in, device = :gpu)
ScalarBinomialState(Nmax, device = :cpu)
ScalarBinomialState
BinomialObservation
propagate!(state::BinomialState, model, dt)
Expand All @@ -25,7 +35,12 @@ get_step
```@docs
NestedParticleFilter
NestedParticleState
update!
NestedParticleState(m_out, m_in, my_Nrng, my_prng, my_qrng, my_σrng, my_τrng)
update!(
filterstate::NestedParticleState,
observation::BinomialObservation,
filter::NestedParticleFilter
)
jitter!
likelihood
likelihood_resample!
Expand All @@ -50,6 +65,7 @@ MyopicFast_tau
```@docs
NestedFilterSimulation
initialize!
propagate!(sim::NestedFilterSimulation)
run!
Recording
update!(rec::Recording, sim, time)
Expand Down
28 changes: 16 additions & 12 deletions src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
AbstractBinomialModel
An abstract type for binomial synaptic models.
A binomial model always has parameters
`N`: number of release sites
`p`: probability of release
`q`: quantum of release
`σ`: observation noise
`τ`: refilling time constant
A binomial model always has the following parameters:
- `N`: number of release sites
- `p`: probability of release
- `q`: quantum of release
- `σ`: observation noise
- `τ`: refilling time constant
"""
abstract type AbstractBinomialModel end

"""
AbstractBinomialState
An abstract type for binomial model states.
A binomial model state has to have at least variable
`n`: number of readily releasable vesicles
`k`: number of released vesicles
A binomial model state has to have the following variables:
- `n`: number of readily releasable vesicles
- `k`: number of released vesicles
"""
abstract type AbstractBinomialState end

"""
BinomialModel{T1,T2}
BinomialModel(N, p, q, σ, τ)
The standard structure for a binomial model or model ensemble.
"""
Expand All @@ -35,7 +35,11 @@ struct BinomialModel{T1,T2} <: AbstractBinomialModel
end

"""
BinomialGridModel{T1, T2, T3, T4, T5}
BinomialGridModel(
Nind, pind, qind, σind, τind,
Nrng, prng, qrng, σrng, τrng,
N, p, q, σ, τ
)
A binomial model ensemble whose parameters are constrained to live on a grid
defined by `Nrng`, `prng`, etc.
Expand Down Expand Up @@ -200,7 +204,7 @@ function ScalarBinomialModel(N::Integer, p, q, σ, τ, device = :cpu)
end

"""
BinomialState{T}
BinomialState(n, k)
An ensemble of states of the binomial model.
"""
Expand Down

2 comments on commit e775138

@simsurace
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/55139

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.1 -m "<description of version>" e775138d93d820a89eed4c65e29d5e60b4a309a5
git push origin v0.4.1

Please sign in to comment.