Skip to content

ssbunny/d3-array

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d3源码学习笔记之 d3-array

记录学习 d3.v4.js 过程中,在源码中的注释。列出已经看过的源码:

  • array.js - 内部使用,提供 slice 、map 等 Array 常用方法
  • ascending.js - 数字的升序排序算法
  • bisect.js - 二分函数,左、右两种
  • bisector.js - 自定义二分函数,重置比较器
  • constant.js - 通过闭包函数构造常数
  • cross.js - 笛卡尔积
  • descending.js - 数字的降序排序算法
  • deviation.js - 均方差
  • extent.js - 同时取最小值、最大值
  • histogram.js - 直方图
  • identity.js - 内部使用,恒等函数
  • max.js - 最大值
  • mean.js - 平均数
  • median.js - 中位数
  • merge.js - 合并数组元素
  • min.js - 最小值
  • number.js - 强制转换成数字格式
  • pairs.js - 毗邻的两个元素组合成一对
  • permute.js - 重排数组
  • quantile.js - p分位数
  • range.js - 等差级数
  • scan.js - 通过 comparator 函数,线性遍历得到最小值的索引
  • shuffle.js - 使用洗牌算法将数组随机排序
  • sum.js - 求合
  • ticks.js - 计算滴答数(TODO: 算法没看懂)
  • transpose.js - 转置矩阵
  • variance.js - 样本方差
  • zip.js - 转置矩阵(参数为矩阵行,参见 transpose.js)
  • threshold/freedmanDiaconis.js - 给 histogram.thresholds 使用,Freedman–Diaconis rule
  • threshold/scott.js - 给 histogram.thresholds 使用,Scott's normal reference rule
  • threshold/sturges.js - 给 histogram.thresholds 使用,Sturges' formula

About

Array manipulation, ordering, searching, summarizing, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%