MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / new

Method new

nodedb-vector/src/matryoshka.rs:37–41  ·  view source on GitHub ↗

Create a new spec. Sorts the provided dims ascending.

(mut truncation_dims: Vec<u32>)

Source from the content-addressed store, hash-verified

35impl MatryoshkaSpec {
36 /// Create a new spec. Sorts the provided dims ascending.
37 pub fn new(mut truncation_dims: Vec<u32>) -> Self {
38 truncation_dims.sort_unstable();
39 truncation_dims.dedup();
40 Self { truncation_dims }
41 }
42
43 /// Pick the largest supported dim ≤ `requested`.
44 ///

Callers

nothing calls this directly

Calls 1

dedupMethod · 0.80

Tested by

no test coverage detected