Softanza
StartFrançais
Softanza
The library documents itself · Numeric & optimization

stzVectorIndex

13 own methods · 0 forms written with extensions, listed under their method

the source: base/number/stzVectorIndex.ring(opens in a new tab) · All classes · The area reference: Numeric & optimization

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 4 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzVectorIndex([ [1,2], [3,4] ]). 9 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
paVectors is a list of equal-length lists of numbers -- one row per vector.no extension
SetTrees
More trees means better recall at the same budget, and a bigger index.no extension
:Euclidean compares positions, :Cosine compares directions. Text embeddings almost always want :Cosine. 1 examples runno extension
SetSeed
The forest is random; the seed makes it reproducible, so a recall figure is a property of the code and not of the run that produced it.no extension
Trees
(no comment in the source: the name reads as a sentence) trees
composed example
o1 = new stzVectorIndex([ [1,2], [3,4] ])
? o1.Trees()
#--> 10
composed from the signature, run for this page
no extension
Metric
(no comment in the source: the name reads as a sentence) metric
composed example
o1 = new stzVectorIndex([ [1,2], [3,4] ])
? o1.Metric()
#--> euclidean
composed from the signature, run for this page
no extension
Count
(no comment in the source: the name reads as a sentence) count
composed example
o1 = new stzVectorIndex([ [1,2], [3,4] ])
? o1.Count()
#--> 2
composed from the signature, run for this page
no extension
Dimensions
(no comment in the source: the name reads as a sentence) dimensions
composed example
o1 = new stzVectorIndex([ [1,2], [3,4] ])
? o1.Dimensions()
#--> 2
composed from the signature, run for this page
no extension
SearchWithBudget
The same, with the candidate budget stated. Bigger budget, better recall, more work. 0 asks for the default.no extension
SearchExact
The exact answer by full scan -- O(n) and the ground truth. Use it on a small corpus, or to measure what the approximate path is missing.also written: NearestExactno extension
RecallAgainstExact
THIS IS THE METHOD THAT MAKES THE INDEX HONEST. Measure it on your own vectors before trusting a budget -- recall depends on the data, not just on the settings, and no default can promise a number.no extension
Cosine similarity of a stored vector to a query, recovered from the stored distance. Only meaningful in :Cosine mode, where both are unit vectors and d^2 = 2 - 2*cos. 1 examples runno extension