Open Planeshifter opened 1 year ago
For compute.io, we named as manhattan
; SciPy names as cityblock
. Is there a reason to prefer one over the other? Atm, the OP uses cityblock
.
Both SciPy and Julia use cityblock
, so I was leaning towards that name. Either choice would be appropriate, I think.
Fine with me. cityblock
it is.
Hi @Planeshifter. Is this RFC available to work on?
@AhmedKhaled590 This one is probably not ideal at the moment, as we need to do some R&D in terms of the interface. @Planeshifter and I will be putting up some new good first issues within the next day or so, some of which will be oriented toward C and native add-ons.
This RFC proposes adding a function to calculate the City Block (Manhattan) distance between two strided arrays.
Package:
@stdlib/math/strided/distances/cityblock
The function should have the following signature
cityblock( N, x, strideX, y, strideY )
.The function should return the City Block distance between the two arrays. It is calculated by summing the absolute differences between corresponding elements for each array.
The City Block (Manhattan) distance is a useful measure of distance between two points or vectors in a multidimensional space. It is commonly used in machine learning and data science applications. The ability to calculate the City Block distance between two strided arrays would make it easier to implement these algorithms in JavaScript.
See:
Related Issues
None.
Questions
No.
Other
No.
Checklist
RFC:
.