Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Jan 14, 2024
1 parent c03912b commit 7f4aa6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

using BitBasis
using Documenter
using DocThemeIndigo
Expand All @@ -16,6 +15,7 @@ makedocs(
sitename = "BitBasis.jl",
linkcheck = !("skiplinks" in ARGS),
pages = ["Home" => "index.md", "Tutorial" => "tutorial.md", "Manual" => "man.md"],
doctest=false, # already tested in runtests.jl
)

deploydocs(repo = "github.com/QuantumBFS/BitBasis.jl.git")
2 changes: 1 addition & 1 deletion docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bit"1101"[2]
to define a bit string with length. `bit"10101"` is equivalent to `0b10101` on both performance and functionality but it store the length of given bits statically.
The bit string literal offers a more readable syntax for these kind of objects.

Besides bit literal, you can convert a string or an integer to bit literal by [`bit`](@ref), e.g
Besides bit literal, you can convert a string or an integer to bit literal by [`BitStr`](@ref), e.g

```@repl tutorial
BitStr{5}(0b00101)
Expand Down
4 changes: 2 additions & 2 deletions src/iterate_control.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ struct IterControl{S}
end
end

# NOTE: positions should be vector (MVector is the best), since it need to be sorted
# do not use Tuple, or other immutables, it increases the sorting time.
"""
itercontrol([T=Int], nbits, positions, bit_configs)
Expand All @@ -48,8 +50,6 @@ julia> for each in itercontrol(7, [1, 3, 4, 7], (1, 0, 1, 0))
```
"""
# NOTE: positions should be vector (MVector is the best), since it need to be sorted
# do not use Tuple, or other immutables, it increases the sorting time.
function itercontrol(nbits::Int, positions::AbstractVector, bit_configs)
@assert all(x->iszero(x) || isone(x), bit_configs) "Bit configurations should be 0 or 1"
base = bmask(Int, positions[i] for (i, u) in enumerate(bit_configs) if u != 0)
Expand Down

0 comments on commit 7f4aa6a

Please sign in to comment.