Skip to content

Commit ed0bbaa

Browse files
committed
fix broken doc links
1 parent 2a46317 commit ed0bbaa

File tree

6 files changed

+29
-3
lines changed

6 files changed

+29
-3
lines changed

src/bit_vec/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,8 @@ impl BitVec {
820820
/// assert_eq!(bv.get(1), Some(0));
821821
/// assert_eq!(bv.get(2), Some(1));
822822
/// ```
823+
///
824+
/// [`get_unchecked`]: Self::get_unchecked
823825
#[must_use]
824826
pub fn get(&self, pos: usize) -> Option<u64> {
825827
if pos >= self.len {
@@ -1226,6 +1228,8 @@ impl BitVec {
12261228
/// containing the original vector.
12271229
///
12281230
/// See also: [`split_at_unchecked`]
1231+
///
1232+
/// [`split_at_unchecked`]: Self::split_at_unchecked
12291233
pub fn split_at(self, at: usize) -> Result<(Self, Self), Self> {
12301234
if at > self.len {
12311235
Err(self)
@@ -1241,6 +1245,8 @@ impl BitVec {
12411245
/// If the index is larger than the length of the vector the function will panic or run
12421246
/// out of memory.
12431247
/// Use [`split_at`] to properly handle this case.
1248+
///
1249+
/// [`split_at`]: Self::split_at
12441250
#[must_use]
12451251
pub fn split_at_unchecked(mut self, at: usize) -> (Self, Self) {
12461252
let other_len = self.len - at;

src/bit_vec/sparse.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! The vector requires `O(n log u/n) + 2n + o(n)` bits of space, where `n` is the number of bits in the vector
33
//! and `u` is the number of 1-bits.
44
//! The vector is constructed from a sorted list of indices of 1-bits, or from an existing
5-
//! [`BitVec`](crate::BitVec).
5+
//! [`BitVec`].
66
77
use crate::{BitVec, EliasFanoVec};
88

@@ -170,6 +170,8 @@ impl SparseRSVec {
170170
/// # Panics
171171
/// If `i` is out of bounds the function might panic or produce incorrect results.
172172
/// Use [`get`] for a checked version.
173+
///
174+
/// [`get`]: Self::get
173175
#[must_use]
174176
pub fn get_unchecked(&self, i: u64) -> u64 {
175177
self.is_set_unchecked(i).into()

src/elias_fano/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ impl EliasFanoVec {
164164
///
165165
/// Note, that select in bit-vectors returns an index, while select in Elias-Fano returns the
166166
/// element at the given rank.
167+
///
168+
/// [`get`]: Self::get
167169
#[must_use]
168170
pub fn select(&self, rank: usize) -> Option<u64> {
169171
self.get(rank)

src/trees/bp/builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use crate::BitVec;
55
/// A builder for [`BpTrees`] using depth-first traversal of the tree. See the documentation of
66
/// [`TreeBuilder`].
77
///
8-
/// [`BpTree`]: BpTree
8+
/// [`BpTrees`]: BpTree
9+
/// [`TreeBuilder`]: TreeBuilder
910
pub struct BpBuilder<const BLOCK_SIZE: usize = DEFAULT_BLOCK_SIZE> {
1011
excess: i64,
1112
bit_vec: BitVec,

src/trees/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ pub trait LevelTree: Tree {
122122
///
123123
/// Once the full tree has been visited, the caller must call [`build`] to create an instance of the
124124
/// implementing tree type.
125+
///
126+
/// [`enter_node`]: TreeBuilder::enter_node
127+
/// [`leave_node`]: TreeBuilder::leave_node
128+
/// [`build`]: TreeBuilder::build
125129
pub trait TreeBuilder {
126130
/// The tree type constructed with this interface
127131
type Tree;
@@ -139,5 +143,8 @@ pub trait TreeBuilder {
139143
/// (i.e. there are nodes for which [`leave_node`] has not been called,
140144
/// or there are more calls to `leave_node` than to [`enter_node`];
141145
/// the number of extraneous calls to `enter_node` is returned in the error).
146+
///
147+
/// [`leave_node`]: Self::leave_node
148+
/// [`enter_node`]: Self::enter_node
142149
fn build(self) -> Result<Self::Tree, i64>;
143150
}

src/wavelet/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ use std::ops::Range;
6262
/// ```
6363
///
6464
/// [`RsVec`]: RsVec
65+
/// [`from_bit_vec`]: WaveletMatrix::from_bit_vec
66+
/// [`from_slice`]: WaveletMatrix::from_slice
67+
/// [`from_bit_vec_pc`]: WaveletMatrix::from_bit_vec_pc
68+
/// [`from_slice_pc`]: WaveletMatrix::from_slice_pc
6569
#[derive(Clone, Debug)]
6670
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6771
pub struct WaveletMatrix {
@@ -1080,7 +1084,7 @@ impl WaveletMatrix {
10801084
/// Get the `k`-th smallest element in the encoded sequence in the specified `range`,
10811085
/// where `k = 0` returns the smallest element.
10821086
/// The `range` is a half-open interval, meaning that the `end` index is exclusive.
1083-
/// The `k`-th smallest element is returned as a `BitVec`,
1087+
/// The `k`-th smallest element is returned as a [`BitVec`],
10841088
/// where the least significant bit is the first element.
10851089
///
10861090
/// Returns `None` if the `range` is out of bounds, or if `k` is greater than the size of the range.
@@ -1114,6 +1118,8 @@ impl WaveletMatrix {
11141118
///
11151119
/// # Panics
11161120
/// May panic if the `i` is out of bounds, or returns an empty bit vector.
1121+
///
1122+
/// [`get_sorted`]: Self::get_sorted
11171123
#[must_use]
11181124
pub fn get_sorted_unchecked(&self, i: usize) -> BitVec {
11191125
self.quantile_unchecked(0..self.len(), i)
@@ -1966,6 +1972,8 @@ impl WaveletMatrix {
19661972
/// The iterator yields `BitVec` elements.
19671973
///
19681974
/// See also [`iter_sorted_u64`] for an iterator that yields `u64` elements.
1975+
///
1976+
/// [`iter_sorted_u64`]: Self::iter_sorted_u64
19691977
#[must_use]
19701978
pub fn iter_sorted(&self) -> WaveletSortedRefIter<'_> {
19711979
WaveletSortedRefIter::new(self)

0 commit comments

Comments
 (0)