Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhauru committed Oct 4, 2024
1 parent 65c94ca commit 47428c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
19 changes: 10 additions & 9 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,19 @@ resetlogp!!
```@docs
keys
getindex
reset!
update!
push!!
empty!!
isempty
getindex_internal
setindex_internal!
update_internal!
insert_internal!
length_internal
loosen_types!!
tighten_types
DynamicPPL.getindex_internal
DynamicPPL.setindex_internal!
DynamicPPL.update_internal!
DynamicPPL.insert_internal!
DynamicPPL.length_internal
DynamicPPL.reset!
DynamicPPL.update!
DynamicPPL.insert!
DynamicPPL.loosen_types!!
DynamicPPL.tighten_types
```

```@docs
Expand Down
8 changes: 4 additions & 4 deletions docs/src/internals/varinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ Hence we obtain a "type-stable when possible"-representation by wrapping it in a

## Efficient storage and iteration

Efficient storage and iteration we achieve through implementation of the `metadata`. In particular, we do so with [`VarNamedVector`](@ref):
Efficient storage and iteration we achieve through implementation of the `metadata`. In particular, we do so with [`DynamicPPL.VarNamedVector`](@ref):

```@docs
DynamicPPL.VarNamedVector
```

In a [`VarNamedVector{<:VarName,T}`](@ref), we achieve the desiderata by storing the values for different `VarName`s contiguously in a `Vector{T}` and keeping track of which ranges correspond to which `VarName`s.
In a [`DynamicPPL.VarNamedVector{<:VarName,T}`](@ref), we achieve the desiderata by storing the values for different `VarName`s contiguously in a `Vector{T}` and keeping track of which ranges correspond to which `VarName`s.

This does require a bit of book-keeping, in particular when it comes to insertions and deletions. Internally, this is handled by assigning each `VarName` a unique `Int` index in the `varname_to_index` field, which is then used to index into the following fields:

Expand Down Expand Up @@ -294,9 +294,9 @@ In the end, we have the following "rough" performance characteristics for `VarNa
## Other methods

```@docs
DynamicPPL.replace_raw_storage(::VarNamedVector, vals::AbstractVector)
DynamicPPL.replace_raw_storage(::DynamicPPL.VarNamedVector, vals::AbstractVector)
```

```@docs; canonical=false
DynamicPPL.values_as(::VarNamedVector)
DynamicPPL.values_as(::DynamicPPL.VarNamedVector)
```

0 comments on commit 47428c7

Please sign in to comment.