MCPcopy Create free account
hub / github.com/cosdata/cosdata / new

Method new

src/models/usv_index.rs:190–211  ·  view source on GitHub ↗
(
        dim_index: u32,
        // 4, 5, 6
        quantization_bits: u8,
        file_offset: FileOffset,
    )

Source from the content-addressed store, hash-verified

188
189impl USVIndexNode {
190 pub fn new(
191 dim_index: u32,
192 // 4, 5, 6
193 quantization_bits: u8,
194 file_offset: FileOffset,
195 ) -> Self {
196 let data = LazyItem::new(
197 USVIndexNodeData::default(),
198 (),
199 FileOffset(file_offset.0 + 4),
200 );
201
202 Self {
203 is_serialized: AtomicBool::new(false),
204 is_dirty: AtomicBool::new(true),
205 file_offset,
206 dim_index,
207 data,
208 children: AtomicArray::new(),
209 quantization_bits,
210 }
211 }
212
213 /// Finds or creates the node where the data should be inserted.
214 /// Traverses the tree iteratively and returns a reference to the node.

Callers

nothing calls this directly

Calls 2

FileOffsetClass · 0.85
readMethod · 0.45

Tested by

no test coverage detected