w-cluster 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +2 -2
  2. package/dist/w-cluster.umd.js +1 -1
  3. package/dist/w-cluster.umd.js.map +1 -1
  4. package/docs/DenseMatrix.html +1 -1
  5. package/docs/DistancePair.html +1 -1
  6. package/docs/LowerTriangle.html +1 -1
  7. package/docs/Rec.html +1 -1
  8. package/docs/Reco.html +1 -1
  9. package/docs/WCluster.mjs.html +19 -1
  10. package/docs/examples/ex-PCA.html +1 -1
  11. package/docs/examples/ex-cluster-webworker.html +1 -1
  12. package/docs/examples/ex-cluster.html +1 -1
  13. package/docs/global.html +172 -15
  14. package/docs/index.html +1 -1
  15. package/docs/k-medoids_alternating.mjs.html +1 -1
  16. package/docs/k-medoids_arrayadapter.mjs.html +1 -1
  17. package/docs/k-medoids_dynmsc.mjs.html +1 -1
  18. package/docs/k-medoids_fastermsc.mjs.html +1 -1
  19. package/docs/k-medoids_fasterpam.mjs.html +3 -3
  20. package/docs/k-medoids_fastmsc.mjs.html +1 -1
  21. package/docs/k-medoids_fastpam1.mjs.html +1 -1
  22. package/docs/k-medoids_initialization.mjs.html +1 -1
  23. package/docs/k-medoids_pam.mjs.html +4 -4
  24. package/docs/k-medoids_pammedsil.mjs.html +1 -1
  25. package/docs/k-medoids_pamsil.mjs.html +2 -2
  26. package/docs/k-medoids_par_fasterpam.mjs.html +2 -2
  27. package/docs/k-medoids_par_silhouette.mjs.html +1 -1
  28. package/docs/k-medoids_silhouette.mjs.html +3 -3
  29. package/docs/k-medoids_util.mjs.html +1 -1
  30. package/package.json +1 -1
  31. package/src/WCluster.mjs +18 -0
  32. package/src/k-medoids/fasterpam.mjs +2 -2
  33. package/src/k-medoids/pam.mjs +3 -3
  34. package/src/k-medoids/pamsil.mjs +1 -1
  35. package/src/k-medoids/par_fasterpam.mjs +1 -1
  36. package/src/k-medoids/silhouette.mjs +2 -2
@@ -12,7 +12,7 @@
12
12
 
13
13
  <script src="https://code.highcharts.com/highcharts.js"></script>
14
14
 
15
- <script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.42/dist/w-cluster.wk.umd.js"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.43/dist/w-cluster.wk.umd.js"></script>
16
16
 
17
17
  <script>
18
18
  let dataIris=[{"class":"setosa","x1":5.1,"x2":3.5,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.7,"x2":3.2,"x3":1.3,"x4":0.2},{"class":"setosa","x1":4.6,"x2":3.1,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.6,"x3":1.4,"x4":0.2},{"class":"setosa","x1":5.4,"x2":3.9,"x3":1.7,"x4":0.4},{"class":"setosa","x1":4.6,"x2":3.4,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5,"x2":3.4,"x3":1.5,"x4":0.2},{"class":"setosa","x1":4.4,"x2":2.9,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.1,"x3":1.5,"x4":0.1},{"class":"setosa","x1":5.4,"x2":3.7,"x3":1.5,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3.4,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3,"x3":1.4,"x4":0.1},{"class":"setosa","x1":4.3,"x2":3,"x3":1.1,"x4":0.1},{"class":"setosa","x1":5.8,"x2":4,"x3":1.2,"x4":0.2},{"class":"setosa","x1":5.7,"x2":4.4,"x3":1.5,"x4":0.4},{"class":"setosa","x1":5.4,"x2":3.9,"x3":1.3,"x4":0.4},{"class":"setosa","x1":5.1,"x2":3.5,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5.7,"x2":3.8,"x3":1.7,"x4":0.3},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.5,"x4":0.3},{"class":"setosa","x1":5.4,"x2":3.4,"x3":1.7,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.7,"x3":1.5,"x4":0.4},{"class":"setosa","x1":4.6,"x2":3.6,"x3":1,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.3,"x3":1.7,"x4":0.5},{"class":"setosa","x1":4.8,"x2":3.4,"x3":1.9,"x4":0.2},{"class":"setosa","x1":5,"x2":3,"x3":1.6,"x4":0.2},{"class":"setosa","x1":5,"x2":3.4,"x3":1.6,"x4":0.4},{"class":"setosa","x1":5.2,"x2":3.5,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5.2,"x2":3.4,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.7,"x2":3.2,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3.1,"x3":1.6,"x4":0.2},{"class":"setosa","x1":5.4,"x2":3.4,"x3":1.5,"x4":0.4},{"class":"setosa","x1":5.2,"x2":4.1,"x3":1.5,"x4":0.1},{"class":"setosa","x1":5.5,"x2":4.2,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.1,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.2,"x3":1.2,"x4":0.2},{"class":"setosa","x1":5.5,"x2":3.5,"x3":1.3,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.6,"x3":1.4,"x4":0.1},{"class":"setosa","x1":4.4,"x2":3,"x3":1.3,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.4,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.5,"x3":1.3,"x4":0.3},{"class":"setosa","x1":4.5,"x2":2.3,"x3":1.3,"x4":0.3},{"class":"setosa","x1":4.4,"x2":3.2,"x3":1.3,"x4":0.2},{"class":"setosa","x1":5,"x2":3.5,"x3":1.6,"x4":0.6},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.9,"x4":0.4},{"class":"setosa","x1":4.8,"x2":3,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.6,"x2":3.2,"x3":1.4,"x4":0.2},{"class":"setosa","x1":5.3,"x2":3.7,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.3,"x3":1.4,"x4":0.2},{"class":"versicolor","x1":7,"x2":3.2,"x3":4.7,"x4":1.4},{"class":"versicolor","x1":6.4,"x2":3.2,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":6.9,"x2":3.1,"x3":4.9,"x4":1.5},{"class":"versicolor","x1":5.5,"x2":2.3,"x3":4,"x4":1.3},{"class":"versicolor","x1":6.5,"x2":2.8,"x3":4.6,"x4":1.5},{"class":"versicolor","x1":5.7,"x2":2.8,"x3":4.5,"x4":1.3},{"class":"versicolor","x1":6.3,"x2":3.3,"x3":4.7,"x4":1.6},{"class":"versicolor","x1":4.9,"x2":2.4,"x3":3.3,"x4":1},{"class":"versicolor","x1":6.6,"x2":2.9,"x3":4.6,"x4":1.3},{"class":"versicolor","x1":5.2,"x2":2.7,"x3":3.9,"x4":1.4},{"class":"versicolor","x1":5,"x2":2,"x3":3.5,"x4":1},{"class":"versicolor","x1":5.9,"x2":3,"x3":4.2,"x4":1.5},{"class":"versicolor","x1":6,"x2":2.2,"x3":4,"x4":1},{"class":"versicolor","x1":6.1,"x2":2.9,"x3":4.7,"x4":1.4},{"class":"versicolor","x1":5.6,"x2":2.9,"x3":3.6,"x4":1.3},{"class":"versicolor","x1":6.7,"x2":3.1,"x3":4.4,"x4":1.4},{"class":"versicolor","x1":5.6,"x2":3,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.8,"x2":2.7,"x3":4.1,"x4":1},{"class":"versicolor","x1":6.2,"x2":2.2,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.6,"x2":2.5,"x3":3.9,"x4":1.1},{"class":"versicolor","x1":5.9,"x2":3.2,"x3":4.8,"x4":1.8},{"class":"versicolor","x1":6.1,"x2":2.8,"x3":4,"x4":1.3},{"class":"versicolor","x1":6.3,"x2":2.5,"x3":4.9,"x4":1.5},{"class":"versicolor","x1":6.1,"x2":2.8,"x3":4.7,"x4":1.2},{"class":"versicolor","x1":6.4,"x2":2.9,"x3":4.3,"x4":1.3},{"class":"versicolor","x1":6.6,"x2":3,"x3":4.4,"x4":1.4},{"class":"versicolor","x1":6.8,"x2":2.8,"x3":4.8,"x4":1.4},{"class":"versicolor","x1":6.7,"x2":3,"x3":5,"x4":1.7},{"class":"versicolor","x1":6,"x2":2.9,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.7,"x2":2.6,"x3":3.5,"x4":1},{"class":"versicolor","x1":5.5,"x2":2.4,"x3":3.8,"x4":1.1},{"class":"versicolor","x1":5.5,"x2":2.4,"x3":3.7,"x4":1},{"class":"versicolor","x1":5.8,"x2":2.7,"x3":3.9,"x4":1.2},{"class":"versicolor","x1":6,"x2":2.7,"x3":5.1,"x4":1.6},{"class":"versicolor","x1":5.4,"x2":3,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":6,"x2":3.4,"x3":4.5,"x4":1.6},{"class":"versicolor","x1":6.7,"x2":3.1,"x3":4.7,"x4":1.5},{"class":"versicolor","x1":6.3,"x2":2.3,"x3":4.4,"x4":1.3},{"class":"versicolor","x1":5.6,"x2":3,"x3":4.1,"x4":1.3},{"class":"versicolor","x1":5.5,"x2":2.5,"x3":4,"x4":1.3},{"class":"versicolor","x1":5.5,"x2":2.6,"x3":4.4,"x4":1.2},{"class":"versicolor","x1":6.1,"x2":3,"x3":4.6,"x4":1.4},{"class":"versicolor","x1":5.8,"x2":2.6,"x3":4,"x4":1.2},{"class":"versicolor","x1":5,"x2":2.3,"x3":3.3,"x4":1},{"class":"versicolor","x1":5.6,"x2":2.7,"x3":4.2,"x4":1.3},{"class":"versicolor","x1":5.7,"x2":3,"x3":4.2,"x4":1.2},{"class":"versicolor","x1":5.7,"x2":2.9,"x3":4.2,"x4":1.3},{"class":"versicolor","x1":6.2,"x2":2.9,"x3":4.3,"x4":1.3},{"class":"versicolor","x1":5.1,"x2":2.5,"x3":3,"x4":1.1},{"class":"versicolor","x1":5.7,"x2":2.8,"x3":4.1,"x4":1.3},{"class":"virginica","x1":6.3,"x2":3.3,"x3":6,"x4":2.5},{"class":"virginica","x1":5.8,"x2":2.7,"x3":5.1,"x4":1.9},{"class":"virginica","x1":7.1,"x2":3,"x3":5.9,"x4":2.1},{"class":"virginica","x1":6.3,"x2":2.9,"x3":5.6,"x4":1.8},{"class":"virginica","x1":6.5,"x2":3,"x3":5.8,"x4":2.2},{"class":"virginica","x1":7.6,"x2":3,"x3":6.6,"x4":2.1},{"class":"virginica","x1":4.9,"x2":2.5,"x3":4.5,"x4":1.7},{"class":"virginica","x1":7.3,"x2":2.9,"x3":6.3,"x4":1.8},{"class":"virginica","x1":6.7,"x2":2.5,"x3":5.8,"x4":1.8},{"class":"virginica","x1":7.2,"x2":3.6,"x3":6.1,"x4":2.5},{"class":"virginica","x1":6.5,"x2":3.2,"x3":5.1,"x4":2},{"class":"virginica","x1":6.4,"x2":2.7,"x3":5.3,"x4":1.9},{"class":"virginica","x1":6.8,"x2":3,"x3":5.5,"x4":2.1},{"class":"virginica","x1":5.7,"x2":2.5,"x3":5,"x4":2},{"class":"virginica","x1":5.8,"x2":2.8,"x3":5.1,"x4":2.4},{"class":"virginica","x1":6.4,"x2":3.2,"x3":5.3,"x4":2.3},{"class":"virginica","x1":6.5,"x2":3,"x3":5.5,"x4":1.8},{"class":"virginica","x1":7.7,"x2":3.8,"x3":6.7,"x4":2.2},{"class":"virginica","x1":7.7,"x2":2.6,"x3":6.9,"x4":2.3},{"class":"virginica","x1":6,"x2":2.2,"x3":5,"x4":1.5},{"class":"virginica","x1":6.9,"x2":3.2,"x3":5.7,"x4":2.3},{"class":"virginica","x1":5.6,"x2":2.8,"x3":4.9,"x4":2},{"class":"virginica","x1":7.7,"x2":2.8,"x3":6.7,"x4":2},{"class":"virginica","x1":6.3,"x2":2.7,"x3":4.9,"x4":1.8},{"class":"virginica","x1":6.7,"x2":3.3,"x3":5.7,"x4":2.1},{"class":"virginica","x1":7.2,"x2":3.2,"x3":6,"x4":1.8},{"class":"virginica","x1":6.2,"x2":2.8,"x3":4.8,"x4":1.8},{"class":"virginica","x1":6.1,"x2":3,"x3":4.9,"x4":1.8},{"class":"virginica","x1":6.4,"x2":2.8,"x3":5.6,"x4":2.1},{"class":"virginica","x1":7.2,"x2":3,"x3":5.8,"x4":1.6},{"class":"virginica","x1":7.4,"x2":2.8,"x3":6.1,"x4":1.9},{"class":"virginica","x1":7.9,"x2":3.8,"x3":6.4,"x4":2},{"class":"virginica","x1":6.4,"x2":2.8,"x3":5.6,"x4":2.2},{"class":"virginica","x1":6.3,"x2":2.8,"x3":5.1,"x4":1.5},{"class":"virginica","x1":6.1,"x2":2.6,"x3":5.6,"x4":1.4},{"class":"virginica","x1":7.7,"x2":3,"x3":6.1,"x4":2.3},{"class":"virginica","x1":6.3,"x2":3.4,"x3":5.6,"x4":2.4},{"class":"virginica","x1":6.4,"x2":3.1,"x3":5.5,"x4":1.8},{"class":"virginica","x1":6,"x2":3,"x3":4.8,"x4":1.8},{"class":"virginica","x1":6.9,"x2":3.1,"x3":5.4,"x4":2.1},{"class":"virginica","x1":6.7,"x2":3.1,"x3":5.6,"x4":2.4},{"class":"virginica","x1":6.9,"x2":3.1,"x3":5.1,"x4":2.3},{"class":"virginica","x1":5.8,"x2":2.7,"x3":5.1,"x4":1.9},{"class":"virginica","x1":6.8,"x2":3.2,"x3":5.9,"x4":2.3},{"class":"virginica","x1":6.7,"x2":3.3,"x3":5.7,"x4":2.5},{"class":"virginica","x1":6.7,"x2":3,"x3":5.2,"x4":2.3},{"class":"virginica","x1":6.3,"x2":2.5,"x3":5,"x4":1.9},{"class":"virginica","x1":6.5,"x2":3,"x3":5.2,"x4":2},{"class":"virginica","x1":6.2,"x2":3.4,"x3":5.4,"x4":2.3},{"class":"virginica","x1":5.9,"x2":3,"x3":5.1,"x4":1.8}]
@@ -12,7 +12,7 @@
12
12
 
13
13
  <script src="https://code.highcharts.com/highcharts.js"></script>
14
14
 
15
- <script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.42/dist/w-cluster.umd.js"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.43/dist/w-cluster.umd.js"></script>
16
16
 
17
17
  <script>
18
18
  let dataIris=[{"class":"setosa","x1":5.1,"x2":3.5,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.7,"x2":3.2,"x3":1.3,"x4":0.2},{"class":"setosa","x1":4.6,"x2":3.1,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.6,"x3":1.4,"x4":0.2},{"class":"setosa","x1":5.4,"x2":3.9,"x3":1.7,"x4":0.4},{"class":"setosa","x1":4.6,"x2":3.4,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5,"x2":3.4,"x3":1.5,"x4":0.2},{"class":"setosa","x1":4.4,"x2":2.9,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.1,"x3":1.5,"x4":0.1},{"class":"setosa","x1":5.4,"x2":3.7,"x3":1.5,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3.4,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3,"x3":1.4,"x4":0.1},{"class":"setosa","x1":4.3,"x2":3,"x3":1.1,"x4":0.1},{"class":"setosa","x1":5.8,"x2":4,"x3":1.2,"x4":0.2},{"class":"setosa","x1":5.7,"x2":4.4,"x3":1.5,"x4":0.4},{"class":"setosa","x1":5.4,"x2":3.9,"x3":1.3,"x4":0.4},{"class":"setosa","x1":5.1,"x2":3.5,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5.7,"x2":3.8,"x3":1.7,"x4":0.3},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.5,"x4":0.3},{"class":"setosa","x1":5.4,"x2":3.4,"x3":1.7,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.7,"x3":1.5,"x4":0.4},{"class":"setosa","x1":4.6,"x2":3.6,"x3":1,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.3,"x3":1.7,"x4":0.5},{"class":"setosa","x1":4.8,"x2":3.4,"x3":1.9,"x4":0.2},{"class":"setosa","x1":5,"x2":3,"x3":1.6,"x4":0.2},{"class":"setosa","x1":5,"x2":3.4,"x3":1.6,"x4":0.4},{"class":"setosa","x1":5.2,"x2":3.5,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5.2,"x2":3.4,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.7,"x2":3.2,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.8,"x2":3.1,"x3":1.6,"x4":0.2},{"class":"setosa","x1":5.4,"x2":3.4,"x3":1.5,"x4":0.4},{"class":"setosa","x1":5.2,"x2":4.1,"x3":1.5,"x4":0.1},{"class":"setosa","x1":5.5,"x2":4.2,"x3":1.4,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.1,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.2,"x3":1.2,"x4":0.2},{"class":"setosa","x1":5.5,"x2":3.5,"x3":1.3,"x4":0.2},{"class":"setosa","x1":4.9,"x2":3.6,"x3":1.4,"x4":0.1},{"class":"setosa","x1":4.4,"x2":3,"x3":1.3,"x4":0.2},{"class":"setosa","x1":5.1,"x2":3.4,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.5,"x3":1.3,"x4":0.3},{"class":"setosa","x1":4.5,"x2":2.3,"x3":1.3,"x4":0.3},{"class":"setosa","x1":4.4,"x2":3.2,"x3":1.3,"x4":0.2},{"class":"setosa","x1":5,"x2":3.5,"x3":1.6,"x4":0.6},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.9,"x4":0.4},{"class":"setosa","x1":4.8,"x2":3,"x3":1.4,"x4":0.3},{"class":"setosa","x1":5.1,"x2":3.8,"x3":1.6,"x4":0.2},{"class":"setosa","x1":4.6,"x2":3.2,"x3":1.4,"x4":0.2},{"class":"setosa","x1":5.3,"x2":3.7,"x3":1.5,"x4":0.2},{"class":"setosa","x1":5,"x2":3.3,"x3":1.4,"x4":0.2},{"class":"versicolor","x1":7,"x2":3.2,"x3":4.7,"x4":1.4},{"class":"versicolor","x1":6.4,"x2":3.2,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":6.9,"x2":3.1,"x3":4.9,"x4":1.5},{"class":"versicolor","x1":5.5,"x2":2.3,"x3":4,"x4":1.3},{"class":"versicolor","x1":6.5,"x2":2.8,"x3":4.6,"x4":1.5},{"class":"versicolor","x1":5.7,"x2":2.8,"x3":4.5,"x4":1.3},{"class":"versicolor","x1":6.3,"x2":3.3,"x3":4.7,"x4":1.6},{"class":"versicolor","x1":4.9,"x2":2.4,"x3":3.3,"x4":1},{"class":"versicolor","x1":6.6,"x2":2.9,"x3":4.6,"x4":1.3},{"class":"versicolor","x1":5.2,"x2":2.7,"x3":3.9,"x4":1.4},{"class":"versicolor","x1":5,"x2":2,"x3":3.5,"x4":1},{"class":"versicolor","x1":5.9,"x2":3,"x3":4.2,"x4":1.5},{"class":"versicolor","x1":6,"x2":2.2,"x3":4,"x4":1},{"class":"versicolor","x1":6.1,"x2":2.9,"x3":4.7,"x4":1.4},{"class":"versicolor","x1":5.6,"x2":2.9,"x3":3.6,"x4":1.3},{"class":"versicolor","x1":6.7,"x2":3.1,"x3":4.4,"x4":1.4},{"class":"versicolor","x1":5.6,"x2":3,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.8,"x2":2.7,"x3":4.1,"x4":1},{"class":"versicolor","x1":6.2,"x2":2.2,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.6,"x2":2.5,"x3":3.9,"x4":1.1},{"class":"versicolor","x1":5.9,"x2":3.2,"x3":4.8,"x4":1.8},{"class":"versicolor","x1":6.1,"x2":2.8,"x3":4,"x4":1.3},{"class":"versicolor","x1":6.3,"x2":2.5,"x3":4.9,"x4":1.5},{"class":"versicolor","x1":6.1,"x2":2.8,"x3":4.7,"x4":1.2},{"class":"versicolor","x1":6.4,"x2":2.9,"x3":4.3,"x4":1.3},{"class":"versicolor","x1":6.6,"x2":3,"x3":4.4,"x4":1.4},{"class":"versicolor","x1":6.8,"x2":2.8,"x3":4.8,"x4":1.4},{"class":"versicolor","x1":6.7,"x2":3,"x3":5,"x4":1.7},{"class":"versicolor","x1":6,"x2":2.9,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":5.7,"x2":2.6,"x3":3.5,"x4":1},{"class":"versicolor","x1":5.5,"x2":2.4,"x3":3.8,"x4":1.1},{"class":"versicolor","x1":5.5,"x2":2.4,"x3":3.7,"x4":1},{"class":"versicolor","x1":5.8,"x2":2.7,"x3":3.9,"x4":1.2},{"class":"versicolor","x1":6,"x2":2.7,"x3":5.1,"x4":1.6},{"class":"versicolor","x1":5.4,"x2":3,"x3":4.5,"x4":1.5},{"class":"versicolor","x1":6,"x2":3.4,"x3":4.5,"x4":1.6},{"class":"versicolor","x1":6.7,"x2":3.1,"x3":4.7,"x4":1.5},{"class":"versicolor","x1":6.3,"x2":2.3,"x3":4.4,"x4":1.3},{"class":"versicolor","x1":5.6,"x2":3,"x3":4.1,"x4":1.3},{"class":"versicolor","x1":5.5,"x2":2.5,"x3":4,"x4":1.3},{"class":"versicolor","x1":5.5,"x2":2.6,"x3":4.4,"x4":1.2},{"class":"versicolor","x1":6.1,"x2":3,"x3":4.6,"x4":1.4},{"class":"versicolor","x1":5.8,"x2":2.6,"x3":4,"x4":1.2},{"class":"versicolor","x1":5,"x2":2.3,"x3":3.3,"x4":1},{"class":"versicolor","x1":5.6,"x2":2.7,"x3":4.2,"x4":1.3},{"class":"versicolor","x1":5.7,"x2":3,"x3":4.2,"x4":1.2},{"class":"versicolor","x1":5.7,"x2":2.9,"x3":4.2,"x4":1.3},{"class":"versicolor","x1":6.2,"x2":2.9,"x3":4.3,"x4":1.3},{"class":"versicolor","x1":5.1,"x2":2.5,"x3":3,"x4":1.1},{"class":"versicolor","x1":5.7,"x2":2.8,"x3":4.1,"x4":1.3},{"class":"virginica","x1":6.3,"x2":3.3,"x3":6,"x4":2.5},{"class":"virginica","x1":5.8,"x2":2.7,"x3":5.1,"x4":1.9},{"class":"virginica","x1":7.1,"x2":3,"x3":5.9,"x4":2.1},{"class":"virginica","x1":6.3,"x2":2.9,"x3":5.6,"x4":1.8},{"class":"virginica","x1":6.5,"x2":3,"x3":5.8,"x4":2.2},{"class":"virginica","x1":7.6,"x2":3,"x3":6.6,"x4":2.1},{"class":"virginica","x1":4.9,"x2":2.5,"x3":4.5,"x4":1.7},{"class":"virginica","x1":7.3,"x2":2.9,"x3":6.3,"x4":1.8},{"class":"virginica","x1":6.7,"x2":2.5,"x3":5.8,"x4":1.8},{"class":"virginica","x1":7.2,"x2":3.6,"x3":6.1,"x4":2.5},{"class":"virginica","x1":6.5,"x2":3.2,"x3":5.1,"x4":2},{"class":"virginica","x1":6.4,"x2":2.7,"x3":5.3,"x4":1.9},{"class":"virginica","x1":6.8,"x2":3,"x3":5.5,"x4":2.1},{"class":"virginica","x1":5.7,"x2":2.5,"x3":5,"x4":2},{"class":"virginica","x1":5.8,"x2":2.8,"x3":5.1,"x4":2.4},{"class":"virginica","x1":6.4,"x2":3.2,"x3":5.3,"x4":2.3},{"class":"virginica","x1":6.5,"x2":3,"x3":5.5,"x4":1.8},{"class":"virginica","x1":7.7,"x2":3.8,"x3":6.7,"x4":2.2},{"class":"virginica","x1":7.7,"x2":2.6,"x3":6.9,"x4":2.3},{"class":"virginica","x1":6,"x2":2.2,"x3":5,"x4":1.5},{"class":"virginica","x1":6.9,"x2":3.2,"x3":5.7,"x4":2.3},{"class":"virginica","x1":5.6,"x2":2.8,"x3":4.9,"x4":2},{"class":"virginica","x1":7.7,"x2":2.8,"x3":6.7,"x4":2},{"class":"virginica","x1":6.3,"x2":2.7,"x3":4.9,"x4":1.8},{"class":"virginica","x1":6.7,"x2":3.3,"x3":5.7,"x4":2.1},{"class":"virginica","x1":7.2,"x2":3.2,"x3":6,"x4":1.8},{"class":"virginica","x1":6.2,"x2":2.8,"x3":4.8,"x4":1.8},{"class":"virginica","x1":6.1,"x2":3,"x3":4.9,"x4":1.8},{"class":"virginica","x1":6.4,"x2":2.8,"x3":5.6,"x4":2.1},{"class":"virginica","x1":7.2,"x2":3,"x3":5.8,"x4":1.6},{"class":"virginica","x1":7.4,"x2":2.8,"x3":6.1,"x4":1.9},{"class":"virginica","x1":7.9,"x2":3.8,"x3":6.4,"x4":2},{"class":"virginica","x1":6.4,"x2":2.8,"x3":5.6,"x4":2.2},{"class":"virginica","x1":6.3,"x2":2.8,"x3":5.1,"x4":1.5},{"class":"virginica","x1":6.1,"x2":2.6,"x3":5.6,"x4":1.4},{"class":"virginica","x1":7.7,"x2":3,"x3":6.1,"x4":2.3},{"class":"virginica","x1":6.3,"x2":3.4,"x3":5.6,"x4":2.4},{"class":"virginica","x1":6.4,"x2":3.1,"x3":5.5,"x4":1.8},{"class":"virginica","x1":6,"x2":3,"x3":4.8,"x4":1.8},{"class":"virginica","x1":6.9,"x2":3.1,"x3":5.4,"x4":2.1},{"class":"virginica","x1":6.7,"x2":3.1,"x3":5.6,"x4":2.4},{"class":"virginica","x1":6.9,"x2":3.1,"x3":5.1,"x4":2.3},{"class":"virginica","x1":5.8,"x2":2.7,"x3":5.1,"x4":1.9},{"class":"virginica","x1":6.8,"x2":3.2,"x3":5.9,"x4":2.3},{"class":"virginica","x1":6.7,"x2":3.3,"x3":5.7,"x4":2.5},{"class":"virginica","x1":6.7,"x2":3,"x3":5.2,"x4":2.3},{"class":"virginica","x1":6.3,"x2":2.5,"x3":5,"x4":1.9},{"class":"virginica","x1":6.5,"x2":3,"x3":5.2,"x4":2},{"class":"virginica","x1":6.2,"x2":3.4,"x3":5.4,"x4":2.3},{"class":"virginica","x1":5.9,"x2":3,"x3":5.1,"x4":1.8}]
package/docs/global.html CHANGED
@@ -140,7 +140,7 @@
140
140
 
141
141
  <dt class="tag-source">Source:</dt>
142
142
  <dd class="tag-source"><ul class="dummy"><li>
143
- <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line284">line 284</a>
143
+ <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line302">line 302</a>
144
144
  </li></ul></dd>
145
145
 
146
146
 
@@ -222,7 +222,7 @@
222
222
 
223
223
  <dt class="tag-source">Source:</dt>
224
224
  <dd class="tag-source"><ul class="dummy"><li>
225
- <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line15">line 15</a>
225
+ <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line24">line 24</a>
226
226
  </li></ul></dd>
227
227
 
228
228
 
@@ -269,7 +269,7 @@
269
269
 
270
270
  <h5 class="h5-examples">Example</h5>
271
271
 
272
- <pre class="prettyprint"><code></code></pre>
272
+ <pre class="prettyprint"><code>let mat = [
273
273
  [40, 50, 60],
274
274
  [50, 70, 60],
275
275
  [80, 70, 90],
276
276
  [50, 60, 80]
277
277
 
278
278
 
279
279
 
@@ -1135,7 +1135,7 @@ Mutates dataArr[i] = index into med of nearest medoid.</p></li></ul></dd>
1135
1135
 
1136
1136
  <dt class="tag-source">Source:</dt>
1137
1137
  <dd class="tag-source"><ul class="dummy"><li>
1138
- <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line35">line 35</a>
1138
+ <a href="WCluster.mjs.html">WCluster.mjs</a>, <a href="WCluster.mjs.html#line53">line 53</a>
1139
1139
  </li></ul></dd>
1140
1140
 
1141
1141
 
@@ -1182,7 +1182,7 @@ Mutates dataArr[i] = index into med of nearest medoid.</p></li></ul></dd>
1182
1182
 
1183
1183
  <h5 class="h5-examples">Example</h5>
1184
1184
 
1185
- <pre class="prettyprint"><code></code></pre>
1185
+ <pre class="prettyprint"><code>let mat = [
1186
1186
  [40, 50, 60],
1187
1187
  [50, 70, 60],
1188
1188
  [80, 70, 90],
1189
1189
  [50, 60, 80]
1190
1190
 
1191
1191
 
1192
1192
 
@@ -2380,7 +2380,7 @@ returns { loss, assi, nIter, nSwaps }</p></td>
2380
2380
 
2381
2381
 
2382
2382
 
2383
- <h4 class="name" id="fasterpam"><span class="type-signature"></span>fasterpam<span class="signature">(mat, med, maxiter)</span><span class="type-signature"></span></h4>
2383
+ <h4 class="name" id="fasterpam"><span class="type-signature"></span>fasterpam<span class="signature">(mat, med, maxiter)</span><span class="type-signature"> &rarr; {Object}</span></h4>
2384
2384
 
2385
2385
 
2386
2386
 
@@ -2543,8 +2543,26 @@ of finding a better solution.</p></li></ul></dd>
2543
2543
  <h5 class="h5-returns">Returns:</h5>
2544
2544
 
2545
2545
 
2546
+ <div class="param-desc">
2547
+ <p>{ loss, assi, nIter, nSwaps }</p>
2548
+ <p>Panics (throws) when the dissimilarity matrix is not square, or k is 0 or larger than N.</p>
2549
+ </div>
2550
+
2551
+
2552
+
2553
+ <dl class="param-type">
2554
+ <dt>
2555
+ Type
2556
+ </dt>
2557
+ <dd>
2558
+
2559
+ <span class="param-type">Object</span>
2546
2560
 
2547
2561
 
2562
+
2563
+ </dd>
2564
+ </dl>
2565
+
2548
2566
 
2549
2567
 
2550
2568
 
@@ -4051,7 +4069,7 @@ which costs O(n²) per iteration to find the best swap.</p></li></ul></dd>
4051
4069
 
4052
4070
 
4053
4071
 
4054
- <h4 class="name" id="medoid_silhouette"><span class="type-signature"></span>medoid_silhouette<span class="signature">(mat, meds, samples)</span><span class="type-signature"></span></h4>
4072
+ <h4 class="name" id="medoid_silhouette"><span class="type-signature"></span>medoid_silhouette<span class="signature">(mat, meds, samples)</span><span class="type-signature"> &rarr; {Object}</span></h4>
4055
4073
 
4056
4074
 
4057
4075
 
@@ -4213,7 +4231,25 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4213
4231
  <h5 class="h5-returns">Returns:</h5>
4214
4232
 
4215
4233
 
4234
+ <div class="param-desc">
4235
+ <p>{ sil, samples } where sil is the average medoid silhouette and
4236
+ samples are the individual values (empty [] if samples = false)</p>
4237
+ </div>
4238
+
4239
+
4240
+
4241
+ <dl class="param-type">
4242
+ <dt>
4243
+ Type
4244
+ </dt>
4245
+ <dd>
4246
+
4247
+ <span class="param-type">Object</span>
4248
+
4249
+
4216
4250
 
4251
+ </dd>
4252
+ </dl>
4217
4253
 
4218
4254
 
4219
4255
 
@@ -4224,7 +4260,7 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4224
4260
 
4225
4261
 
4226
4262
 
4227
- <h4 class="name" id="pam"><span class="type-signature"></span>pam<span class="signature">(mat, k, maxiter)</span><span class="type-signature"></span></h4>
4263
+ <h4 class="name" id="pam"><span class="type-signature"></span>pam<span class="signature">(mat, k, maxiter)</span><span class="type-signature"> &rarr; {Object}</span></h4>
4228
4264
 
4229
4265
 
4230
4266
 
@@ -4385,8 +4421,25 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4385
4421
  <h5 class="h5-returns">Returns:</h5>
4386
4422
 
4387
4423
 
4424
+ <div class="param-desc">
4425
+ <p>{ loss, assi, meds, nIter, nSwaps }</p>
4426
+ </div>
4427
+
4428
+
4429
+
4430
+ <dl class="param-type">
4431
+ <dt>
4432
+ Type
4433
+ </dt>
4434
+ <dd>
4435
+
4436
+ <span class="param-type">Object</span>
4437
+
4388
4438
 
4389
4439
 
4440
+ </dd>
4441
+ </dl>
4442
+
4390
4443
 
4391
4444
 
4392
4445
 
@@ -4396,7 +4449,7 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4396
4449
 
4397
4450
 
4398
4451
 
4399
- <h4 class="name" id="pam_build"><span class="type-signature"></span>pam_build<span class="signature">(mat, k)</span><span class="type-signature"></span></h4>
4452
+ <h4 class="name" id="pam_build"><span class="type-signature"></span>pam_build<span class="signature">(mat, k)</span><span class="type-signature"> &rarr; {Object}</span></h4>
4400
4453
 
4401
4454
 
4402
4455
 
@@ -4539,8 +4592,25 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4539
4592
  <h5 class="h5-returns">Returns:</h5>
4540
4593
 
4541
4594
 
4595
+ <div class="param-desc">
4596
+ <p>{ loss, assi, meds }</p>
4597
+ </div>
4598
+
4599
+
4600
+
4601
+ <dl class="param-type">
4602
+ <dt>
4603
+ Type
4604
+ </dt>
4605
+ <dd>
4606
+
4607
+ <span class="param-type">Object</span>
4608
+
4542
4609
 
4543
4610
 
4611
+ </dd>
4612
+ </dl>
4613
+
4544
4614
 
4545
4615
 
4546
4616
 
@@ -4720,7 +4790,7 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4720
4790
 
4721
4791
 
4722
4792
 
4723
- <h4 class="name" id="pam_swap"><span class="type-signature"></span>pam_swap<span class="signature">(mat, med, maxiter)</span><span class="type-signature"></span></h4>
4793
+ <h4 class="name" id="pam_swap"><span class="type-signature"></span>pam_swap<span class="signature">(mat, med, maxiter)</span><span class="type-signature"> &rarr; {Object}</span></h4>
4724
4794
 
4725
4795
 
4726
4796
 
@@ -4881,8 +4951,25 @@ distance to the cluster medoid is used instead of the average distance.</p></li>
4881
4951
  <h5 class="h5-returns">Returns:</h5>
4882
4952
 
4883
4953
 
4954
+ <div class="param-desc">
4955
+ <p>{ loss, assi, nIter, nSwaps }</p>
4956
+ </div>
4957
+
4958
+
4959
+
4960
+ <dl class="param-type">
4961
+ <dt>
4962
+ Type
4963
+ </dt>
4964
+ <dd>
4965
+
4966
+ <span class="param-type">Object</span>
4967
+
4884
4968
 
4885
4969
 
4970
+ </dd>
4971
+ </dl>
4972
+
4886
4973
 
4887
4974
 
4888
4975
 
@@ -5741,7 +5828,7 @@ Standard PAM BUILD storing nearest distance per point in a plain number array <c
5741
5828
 
5742
5829
 
5743
5830
 
5744
- <h4 class="name" id="pamsil_optimize"><span class="type-signature"></span>pamsil_optimize<span class="signature">()</span><span class="type-signature"></span></h4>
5831
+ <h4 class="name" id="pamsil_optimize"><span class="type-signature"></span>pamsil_optimize<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
5745
5832
 
5746
5833
 
5747
5834
 
@@ -5821,8 +5908,25 @@ Standard PAM BUILD storing nearest distance per point in a plain number array <c
5821
5908
  <h5 class="h5-returns">Returns:</h5>
5822
5909
 
5823
5910
 
5911
+ <div class="param-desc">
5912
+ <p>[loss, n_iter, n_swaps]</p>
5913
+ </div>
5914
+
5915
+
5916
+
5917
+ <dl class="param-type">
5918
+ <dt>
5919
+ Type
5920
+ </dt>
5921
+ <dd>
5922
+
5923
+ <span class="param-type">Array.&lt;number></span>
5924
+
5824
5925
 
5825
5926
 
5927
+ </dd>
5928
+ </dl>
5929
+
5826
5930
 
5827
5931
 
5828
5932
 
@@ -6034,7 +6138,7 @@ Standard PAM BUILD storing nearest distance per point in a plain number array <c
6034
6138
 
6035
6139
 
6036
6140
 
6037
- <h4 class="name" id="par_fasterpam"><span class="type-signature"></span>par_fasterpam<span class="signature">(mat, med, maxiter, rng)</span><span class="type-signature"></span></h4>
6141
+ <h4 class="name" id="par_fasterpam"><span class="type-signature"></span>par_fasterpam<span class="signature">(mat, med, maxiter, rng)</span><span class="type-signature"> &rarr; {Object}</span></h4>
6038
6142
 
6039
6143
 
6040
6144
 
@@ -6213,8 +6317,26 @@ Standard PAM BUILD storing nearest distance per point in a plain number array <c
6213
6317
  <h5 class="h5-returns">Returns:</h5>
6214
6318
 
6215
6319
 
6320
+ <div class="param-desc">
6321
+ <p>{ loss, assi, nIter, nSwaps }</p>
6322
+ <p>Panics (throws) when the dissimilarity matrix is not square, or k is 0 or larger than N.</p>
6323
+ </div>
6324
+
6325
+
6326
+
6327
+ <dl class="param-type">
6328
+ <dt>
6329
+ Type
6330
+ </dt>
6331
+ <dd>
6332
+
6333
+ <span class="param-type">Object</span>
6216
6334
 
6217
6335
 
6336
+
6337
+ </dd>
6338
+ </dl>
6339
+
6218
6340
 
6219
6341
 
6220
6342
 
@@ -6409,7 +6531,7 @@ Standard PAM BUILD storing nearest distance per point in a plain number array <c
6409
6531
 
6410
6532
 
6411
6533
 
6412
- <h4 class="name" id="rand_fasterpam"><span class="type-signature"></span>rand_fasterpam<span class="signature">(mat, med, maxiter, rng)</span><span class="type-signature"></span></h4>
6534
+ <h4 class="name" id="rand_fasterpam"><span class="type-signature"></span>rand_fasterpam<span class="signature">(mat, med, maxiter, rng)</span><span class="type-signature"> &rarr; {Object}</span></h4>
6413
6535
 
6414
6536
 
6415
6537
 
@@ -6589,7 +6711,24 @@ as it decreases the dependency on the input data order.</p></li></ul></dd>
6589
6711
  <h5 class="h5-returns">Returns:</h5>
6590
6712
 
6591
6713
 
6714
+ <div class="param-desc">
6715
+ <p>{ loss, assi, nIter, nSwaps }</p>
6716
+ </div>
6717
+
6718
+
6719
+
6720
+ <dl class="param-type">
6721
+ <dt>
6722
+ Type
6723
+ </dt>
6724
+ <dd>
6725
+
6726
+ <span class="param-type">Object</span>
6727
+
6728
+
6592
6729
 
6730
+ </dd>
6731
+ </dl>
6593
6732
 
6594
6733
 
6595
6734
 
@@ -6940,7 +7079,7 @@ as it decreases the dependency on the input data order.</p></li></ul></dd>
6940
7079
 
6941
7080
 
6942
7081
 
6943
- <h4 class="name" id="silhouette"><span class="type-signature"></span>silhouette<span class="signature">(mat, assi, samples)</span><span class="type-signature"></span></h4>
7082
+ <h4 class="name" id="silhouette"><span class="type-signature"></span>silhouette<span class="signature">(mat, assi, samples)</span><span class="type-signature"> &rarr; {Object}</span></h4>
6944
7083
 
6945
7084
 
6946
7085
 
@@ -7102,8 +7241,26 @@ evaluation measure for clusterings.</p></li></ul></dd>
7102
7241
  <h5 class="h5-returns">Returns:</h5>
7103
7242
 
7104
7243
 
7244
+ <div class="param-desc">
7245
+ <p>{ sil, samples } where sil is the average silhouette and samples are
7246
+ the individual silhouette values (empty [] if samples = false)</p>
7247
+ </div>
7248
+
7249
+
7250
+
7251
+ <dl class="param-type">
7252
+ <dt>
7253
+ Type
7254
+ </dt>
7255
+ <dd>
7256
+
7257
+ <span class="param-type">Object</span>
7105
7258
 
7106
7259
 
7260
+
7261
+ </dd>
7262
+ </dl>
7263
+
7107
7264
 
7108
7265
 
7109
7266
 
@@ -7554,7 +7711,7 @@ Returns a fresh DistancePair.</p></li></ul></dd>
7554
7711
  <br class="clear">
7555
7712
 
7556
7713
  <footer>
7557
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
7714
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
7558
7715
  </footer>
7559
7716
 
7560
7717
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
@@ -131,7 +131,7 @@ export function assign_nearest(mat, med, dataArr) {
131
131
  <br class="clear">
132
132
 
133
133
  <footer>
134
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
134
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
135
135
  </footer>
136
136
 
137
137
  <script>prettyPrint();</script>
@@ -94,7 +94,7 @@ export function arrayAdapter(input) {
94
94
  <br class="clear">
95
95
 
96
96
  <footer>
97
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
97
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
98
98
  </footer>
99
99
 
100
100
  <script>prettyPrint();</script>
@@ -242,7 +242,7 @@ export function remove_med(mat, med, data, b) {
242
242
  <br class="clear">
243
243
 
244
244
  <footer>
245
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
245
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
246
246
  </footer>
247
247
 
248
248
  <script>prettyPrint();</script>
@@ -398,7 +398,7 @@ export function do_swap_k2(mat, med, assi, data, b, j) {
398
398
  <br class="clear">
399
399
 
400
400
  <footer>
401
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
401
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
402
402
  </footer>
403
403
 
404
404
  <script>prettyPrint();</script>
@@ -60,7 +60,7 @@ import { shuffle } from './initialization.mjs';
60
60
  * @param mat - a pairwise distance matrix
61
61
  * @param med - the list of medoids (mutated in place)
62
62
  * @param maxiter - the maximum number of iterations allowed
63
- * @returns { loss, assi, nIter, nSwaps }
63
+ * @returns {Object} { loss, assi, nIter, nSwaps }
64
64
  *
65
65
  * Panics (throws) when the dissimilarity matrix is not square, or k is 0 or larger than N.
66
66
  */
@@ -114,7 +114,7 @@ export function fasterpam(mat, med, maxiter) {
114
114
  * @param med - the list of medoids (mutated in place)
115
115
  * @param maxiter - the maximum number of iterations allowed
116
116
  * @param rng - random number generator for shuffling the input data
117
- * @returns { loss, assi, nIter, nSwaps }
117
+ * @returns {Object} { loss, assi, nIter, nSwaps }
118
118
  */
119
119
  export function rand_fasterpam(mat, med, maxiter, rng = Math.random) {
120
120
  mat = arrayAdapter(mat);
@@ -292,7 +292,7 @@ export function do_swap(mat, med, data, b, j) {
292
292
  <br class="clear">
293
293
 
294
294
  <footer>
295
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
295
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
296
296
  </footer>
297
297
 
298
298
  <script>prettyPrint();</script>
@@ -153,7 +153,7 @@ function fastmsc_k2(mat, med, maxiter) {
153
153
  <br class="clear">
154
154
 
155
155
  <footer>
156
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
156
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
157
157
  </footer>
158
158
 
159
159
  <script>prettyPrint();</script>
@@ -119,7 +119,7 @@ export function fastpam1(mat, med, maxiter) {
119
119
  <br class="clear">
120
120
 
121
121
  <footer>
122
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
122
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
123
123
  </footer>
124
124
 
125
125
  <script>prettyPrint();</script>
@@ -94,7 +94,7 @@ export function shuffle(rng, n) {
94
94
  <br class="clear">
95
95
 
96
96
  <footer>
97
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
97
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
98
98
  </footer>
99
99
 
100
100
  <script>prettyPrint();</script>
@@ -58,7 +58,7 @@ import { initial_assignment, do_swap } from './fasterpam.mjs';
58
58
  * @param mat - a pairwise distance matrix
59
59
  * @param med - the list of medoids (mutated in place)
60
60
  * @param maxiter - the maximum number of iterations allowed
61
- * @returns { loss, assi, nIter, nSwaps }
61
+ * @returns {Object} { loss, assi, nIter, nSwaps }
62
62
  */
63
63
  export function pam_swap(mat, med, maxiter) {
64
64
  mat = arrayAdapter(mat);
@@ -74,7 +74,7 @@ export function pam_swap(mat, med, maxiter) {
74
74
  *
75
75
  * @param mat - a pairwise distance matrix
76
76
  * @param k - the number of medoids to pick
77
- * @returns { loss, assi, meds }
77
+ * @returns {Object} { loss, assi, meds }
78
78
  */
79
79
  export function pam_build(mat, k) {
80
80
  mat = arrayAdapter(mat);
@@ -98,7 +98,7 @@ export function pam_build(mat, k) {
98
98
  * @param mat - a pairwise distance matrix
99
99
  * @param k - the number of medoids to pick
100
100
  * @param maxiter - the maximum number of iterations allowed
101
- * @returns { loss, assi, meds, nIter, nSwaps }
101
+ * @returns {Object} { loss, assi, meds, nIter, nSwaps }
102
102
  */
103
103
  export function pam(mat, k, maxiter) {
104
104
  mat = arrayAdapter(mat);
@@ -262,7 +262,7 @@ export function pam_build_initialize(mat, meds, data, k) {
262
262
  <br class="clear">
263
263
 
264
264
  <footer>
265
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
265
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
266
266
  </footer>
267
267
 
268
268
  <script>prettyPrint();</script>
@@ -294,7 +294,7 @@ function pammedsil_build_initialize(mat, meds, data, k) {
294
294
  <br class="clear">
295
295
 
296
296
  <footer>
297
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
297
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
298
298
  </footer>
299
299
 
300
300
  <script>prettyPrint();</script>
@@ -94,7 +94,7 @@ export function pamsil_swap(mat, med, maxiter) {
94
94
 
95
95
  /**
96
96
  * Main optimization function of PAMSIL, not exposed (use pamsil_swap or pamsil).
97
- * @returns {[number, number, number]} [loss, n_iter, n_swaps]
97
+ * @returns {Array&lt;number>} [loss, n_iter, n_swaps]
98
98
  */
99
99
  function pamsil_optimize(mat, med, assi, maxiter) {
100
100
  const n = mat.len(), k = med.length;
@@ -212,7 +212,7 @@ function pamsil_build_initialize(mat, meds, assi, k) {
212
212
  <br class="clear">
213
213
 
214
214
  <footer>
215
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Oct 11 2026 13:26:02 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
215
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 11:52:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
216
216
  </footer>
217
217
 
218
218
  <script>prettyPrint();</script>