Insert data with offset and multiplier (key = offset + i * multiplier)
(
tree: &mut BPlusTreeMap<i32, String>,
count: usize,
offset: i32,
multiplier: i32,
)
| 81 | |
| 82 | /// Insert data with offset and multiplier (key = offset + i * multiplier) |
| 83 | pub fn insert_with_offset_multiplier( |
| 84 | tree: &mut BPlusTreeMap<i32, String>, |
| 85 | count: usize, |
| 86 | offset: i32, |
| 87 | multiplier: i32, |
| 88 | ) { |
| 89 | for i in 0..count { |
| 90 | let key = offset + (i as i32) * multiplier; |
| 91 | tree.insert(key, format!("value_{}", i)); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /// Insert data with custom key and value functions |
| 96 | pub fn insert_with_custom_fn<F, G>( |
no test coverage detected