You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {'in' | 'out'} direct Count only directed edges.
1004
+
* @returns {number} Degree of the node
1005
+
*/
1006
+
/**
991
1007
* @param {number} k Index of target node
992
1008
* @param {boolean | 'in' | 'out'} [undirect] Count undirected edges. If `in` or `out` is specified, only direct edges are counted and `direct` parameter is ignored.
* @param {'in' | 'out'} direct Check only directed edges
1045
+
* @returns {number[]} Indexes of adjacency nodes
1046
+
*/
1047
+
/**
1018
1048
* @param {number} k Index of target node
1019
1049
* @param {boolean | 'in' | 'out'} [undirect] Check undirected edges. If `in` or `out` is specified, only direct edges are checked and `direct` parameter is ignored.
@@ -1246,8 +1276,18 @@ export default class Graph {
1246
1276
returnmin_loop
1247
1277
}
1248
1278
1279
+
/**
1280
+
* Returns index of all cliques.
1281
+
* @overload
1282
+
* @returns {number[][][]} Index of cliques
1283
+
*/
1249
1284
/**
1250
1285
* Returns index of cliques.
1286
+
* @overload
1287
+
* @param {number} k Size of clique
1288
+
* @returns {number[][]} Index of cliques
1289
+
*/
1290
+
/**
1251
1291
* @param {number} [k] Size of clique
1252
1292
* @returns {number[][] | number[][][]} Index of cliques
1253
1293
*/
@@ -1524,6 +1564,17 @@ export default class Graph {
1524
1564
1525
1565
/**
1526
1566
* Returns the node value.
1567
+
* @overload
1568
+
* @param {number} k Index of the node
1569
+
* @returns {unknown} Node value
1570
+
*/
1571
+
/**
1572
+
* Returns the node value.
1573
+
* @overload
1574
+
* @param {number[]} [k] Index of the node
1575
+
* @returns {unknown[]} Node value
1576
+
*/
1577
+
/**
1527
1578
* @param {number | number[]} [k] Index of the node
1528
1579
* @returns {unknown | unknown[]} Node value
1529
1580
*/
@@ -1591,6 +1642,22 @@ export default class Graph {
1591
1642
1592
1643
/**
1593
1644
* Returns the edges.
1645
+
* @overload
1646
+
* @param {number} from Index of the starting node of the edge
1647
+
* @param {number} to Index of the end node of the edge
1648
+
* @param {boolean} [undirect] Get undirected edges or not
1649
+
* @param {boolean | 'forward' | 'backward'} [direct] Get directed edges or not
1650
+
* @returns {Edge[]} Edges between `from` and `to`
1651
+
*/
1652
+
/**
1653
+
* Returns the edges.
1654
+
* @overload
1655
+
* @param {number} from Index of the starting node of the edge
1656
+
* @param {number} to Index of the end node of the edge
1657
+
* @param {'forward' | 'backward'} direct Get only directed edges
1658
+
* @returns {Edge[]} Edges between `from` and `to`
1659
+
*/
1660
+
/**
1594
1661
* @param {number} from Index of the starting node of the edge
1595
1662
* @param {number} to Index of the end node of the edge
1596
1663
* @param {boolean | 'forward' | 'backward'} [undirect] Get undirected edges or not. If `forward` or `backward` is specified, only direct edges are get and `direct` parameter is ignored.
@@ -3215,6 +3282,17 @@ export default class Graph {
3215
3282
3216
3283
/**
3217
3284
* Returns shortest path.
3285
+
* @overload
3286
+
* @param {null} [from] Index of start nodes
3287
+
* @returns {{length: number, path: number[]}[][]} Shortest length and path for all nodes
3288
+
*/
3289
+
/**
3290
+
* Returns shortest path.
3291
+
* @overload
3292
+
* @param {number} from Index of start nodes
3293
+
* @returns {{length: number, prev: number, path: number[]}[]} Shortest length and path for all nodes
3294
+
*/
3295
+
/**
3218
3296
* @param {number} [from] Index of start nodes
3219
3297
* @returns {{length: number, prev: number, path: number[]}[] | {length: number, path: number[]}[][]} Shortest length and path for all nodes
0 commit comments