all these changes

This commit is contained in:
Jake Kasper
2026-04-09 13:19:47 -05:00
parent e83a51a051
commit 65315f36d1
39102 changed files with 7932979 additions and 567 deletions

View File

@@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<title>Clustering</title>
<meta charset="utf-8"/>
</head>
<body>
<script src="../dist/clustering.js"></script>
<script>
var dbscan = new DBSCAN();
var dataset = [
[1, 1], [0, 1], [1, 0],
[10, 10], [10, 13], [13, 13],
[30, 30], [30, 33], [49, 49], [33, 33], [36, 36]
];
console.log(dbscan.run(dataset, 5, 2));
</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
var DBSCAN = require('../lib/index.js').DBSCAN;
var dataset = [
[1,1],[0,1],[1,0],
[10,10],[13,13],[10,13],
[54,54],[55,55],[89,89],[57,55]
];
var dbscan = new DBSCAN();
var clusters = dbscan.run(dataset, 5, 2);
console.log(clusters);

View File

@@ -0,0 +1,11 @@
var KMEANS = require('../lib/index.js').KMEANS;
var dataset = [
[1,1],[0,1],[1,0],
[10,10],[10,13],[13,13],
[54,54],[55,55],[89,89],[57,55]
];
var kmeans = new KMEANS();
var clusters = kmeans.run(dataset, 3);
console.log(clusters);

View File

@@ -0,0 +1,12 @@
var OPTICS = require('../lib/index.js').OPTICS;
var dataset = [
[1,1],[0,1],[1,0],
[10,10],[13,13],[10,13],
[54,54],[55,55],[89,89],[57,55],
[20.01, 20.05],[20.09, 20.07],[20.20, 20.15],[20.09, 20.12]
];
var optics = new OPTICS();
var clusters = optics.run(dataset, 5, 2);
console.log(clusters);

View File

@@ -0,0 +1,12 @@
var PriorityQueue = require('../lib/index.js').PriorityQueue;
var p = new PriorityQueue();
p.insert(1, 4);
p.insert(2, 1);
p.insert(3, 2);
p.insert(4, 3);
p.insert(4, 5);
console.log(p.getElements());
var p = new PriorityQueue([1,2,3,4,4], [4,1,2,3,5]);
console.log(p.getElements());