UNPKG
patristic
Version:
latest (0.6.0)
0.6.0
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.10
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
Patristic Inference library for Node and Browser
cdcgov.github.io/patristic/
CDCgov/patristic
patristic
/
demo
/
fornode.js
13 lines
(10 loc)
•
281 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
patristic = require(
'../dist/patristic'
);
const
matrix = [ [
0, 5, 9, 9, 8
], [
5, 0, 10, 10, 9
], [
9, 10, 0, 8, 7
], [
9, 10, 8, 0, 3
], [
8, 9, 7, 3, 0
] ];
const
labels = [
'A'
,
'B'
,
'C'
,
'D'
,
'E'
];
let
tree = patristic.parseMatrix(matrix, labels);