Skip to main content

write_segment

Function write_segment 

Source
pub fn write_segment(
    path: &Path,
    dim: usize,
    vectors: &[&[f32]],
    surrogate_ids: &[u64],
) -> Result<()>
Expand description

Write a v2 NDVS segment file to path.

surrogate_ids[i] is the u64 surrogate for vectors[i]. The slice may be empty, in which case all surrogate IDs are written as 0.

ยงErrors

Returns std::io::Error on any I/O failure or arithmetic overflow.