Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
7
node_modules/d3-array/src/threshold/freedmanDiaconis.js
generated
vendored
Normal file
7
node_modules/d3-array/src/threshold/freedmanDiaconis.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import count from "../count.js";
|
||||
import quantile from "../quantile.js";
|
||||
|
||||
export default function thresholdFreedmanDiaconis(values, min, max) {
|
||||
const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);
|
||||
return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;
|
||||
}
|
||||
7
node_modules/d3-array/src/threshold/scott.js
generated
vendored
Normal file
7
node_modules/d3-array/src/threshold/scott.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import count from "../count.js";
|
||||
import deviation from "../deviation.js";
|
||||
|
||||
export default function thresholdScott(values, min, max) {
|
||||
const c = count(values), d = deviation(values);
|
||||
return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;
|
||||
}
|
||||
5
node_modules/d3-array/src/threshold/sturges.js
generated
vendored
Normal file
5
node_modules/d3-array/src/threshold/sturges.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import count from "../count.js";
|
||||
|
||||
export default function thresholdSturges(values) {
|
||||
return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue