manhattan-distance:计算两个数组之间的曼哈顿(城市街区)距离

时间:2021-06-06 16:53:37
【文件属性】:
文件名称:manhattan-distance:计算两个数组之间的曼哈顿(城市街区)距离
文件大小:14KB
文件格式:ZIP
更新时间:2021-06-06 16:53:37
JavaScript 曼哈顿距离 计算两个数组之间的曼哈顿(城市街区)距离。 在具有固定笛卡尔坐标系的n维实向量空间中,两点可以通过一条直线连接。 直线在坐标轴上的投影总和是(也称为直线距离、 L1距离、出租车距离或城市街区距离)。 安装 $ npm install compute-manhattan-distance 要在浏览器中使用,请使用 。 用法 var manhattan = require ( 'compute-manhattan-distance' ) ; 曼哈顿( x, y[, accessor] ) 计算两个数组之间的。 var x = [ 2 , 4 , 5 , 3 , 8 , 2 ] , y = [ 3 , 1 , 5 , - 3 , 7 , 2 ] ; var d = manhattan ( x , y ) ; // returns 11 对于对象arrays ,提供访
【文件预览】:
manhattan-distance-master
----.travis.yml(156B)
----.jshintignore(118B)
----docs()
--------img()
----package.json(2KB)
----test()
--------test.js(3KB)
----LICENSE(1KB)
----TODO.md(12B)
----.npmignore(498B)
----examples()
--------index.js(265B)
----.gitignore(711B)
----lib()
--------index.js(1KB)
----Makefile(2KB)
----README.md(4KB)
----.jshintrc(1KB)
----.editorconfig(169B)
----.gitattributes(12B)

网友评论