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

stzSimilarity

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

the source: base/number/stzSimilarity.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; 6 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzSimilarity(). 5 methods have none yet. Examples run on 2026-10-04 07:31 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
initno extension
Cosine3
3d vector operationsalso written: CosineSimilarityno extension
Euclidean3
3d vector operationsalso written: EuclideanDistance
composed example
o1 = new stzSimilarity()
? o1.Euclidean3(1, 0, 0, 1, 1, 0)
#--> 1
composed from the signature, run for this page
no extension
Manhattan3
3d vector operationsalso written: ManhattanDistance
composed example
o1 = new stzSimilarity()
? o1.Manhattan3(1, 0, 0, 1, 1, 0)
#--> 1
composed from the signature, run for this page
no extension
DotProduct3
3d vector operations
composed example
o1 = new stzSimilarity()
? o1.DotProduct3(1, 0, 0, 1, 1, 0)
#--> 1
composed from the signature, run for this page
no extension
CosineFromLists
(no comment in the source: the name reads as a sentence) cosine from listsalso written: Cosinein the section list-based operationsno extension
(no comment in the source: the name reads as a sentence) euclidean from lists 1 examples runalso written: Euclideanin the section list-based operationsno extension
(no comment in the source: the name reads as a sentence) manhattan from lists 1 examples runalso written: Manhattanin the section list-based operations
composed example
o1 = new stzSimilarity()
? o1.ManhattanFromLists([ 3, 4 ], [ 2, 3 ])
#--> 2
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) dot product from lists 1 examples runalso written: Dotin the section list-based operations
composed example
o1 = new stzSimilarity()
? o1.DotProductFromLists([ 3, 4 ], [ 2, 3 ])
#--> 18
composed from the signature, run for this page
no extension
The length of a vector, which is what normalising divides by. 1 examples run
composed example
o1 = new stzSimilarity()
? o1.MagnitudeOf([ 3, 4 ])
#--> 5
composed from the signature, run for this page
no extension
The unit vector in the same direction. A zero vector has no direction, so it is returned unchanged rather than filled with NaN. 1 examples runno extension