@graphty/algorithms 1.4.2 → 1.5.0

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.
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # @graphty/algorithms
2
2
 
3
- [![Build Status](https://github.com/graphty-org/algorithms/actions/workflows/test.yml/badge.svg)](https://github.com/graphty-org/algorithms/actions/workflows/test.yml)
4
- [![Coverage Status](https://coveralls.io/repos/github/graphty-org/algorithms/badge.svg)](https://coveralls.io/github/graphty-org/algorithms)
3
+ [![CI](https://github.com/graphty-org/graphty-monorepo/actions/workflows/ci.yml/badge.svg)](https://github.com/graphty-org/graphty-monorepo/actions/workflows/ci.yml)
4
+ [![Coverage Status](https://coveralls.io/repos/github/graphty-org/graphty-monorepo/badge.svg?branch=master)](https://coveralls.io/github/graphty-org/graphty-monorepo?branch=master)
5
5
  [![npm version](https://img.shields.io/npm/v/@graphty/algorithms.svg)](https://www.npmjs.com/package/@graphty/algorithms)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
- [![Examples](https://img.shields.io/badge/demo-github%20pages-blue)](https://graphty-org.github.io/algorithms/)
7
+ [![Documentation](https://img.shields.io/badge/docs-vitepress-blue)](https://graphty.app/docs/algorithms/)
8
+ [![Examples](https://img.shields.io/badge/demo-github%20pages-blue)](https://graphty.app/algorithms/)
8
9
 
9
10
  A comprehensive TypeScript graph algorithms library with 98 algorithms optimized for browser environments and visualization applications.
10
11
 
@@ -14,8 +15,8 @@ A comprehensive TypeScript graph algorithms library with 98 algorithms optimized
14
15
  - **Browser-optimized**: Designed to run efficiently in web browsers
15
16
  - **Modular**: Import only the algorithms you need
16
17
  - **Comprehensive**: 98 graph algorithms including traversal, shortest paths, centrality, clustering, flow, matching, link prediction, and more
17
- - **Interactive Examples**: [Live demos](https://graphty-org.github.io/algorithms/) with visualizations for all algorithms
18
- - **Performance Analysis**: [Detailed benchmarks](https://graphty-org.github.io/algorithms/benchmarks/) comparing algorithm performance
18
+ - **Interactive Examples**: [Live demos](https://graphty.app/algorithms/) with visualizations for all algorithms
19
+ - **Performance Analysis**: [Detailed benchmarks](https://graphty.app/algorithms/benchmarks/) comparing algorithm performance
19
20
  - **Well-tested**: Extensive test suite with high coverage
20
21
  - **Standards-compliant**: Follows conventional commits and semantic versioning
21
22
 
@@ -1027,12 +1028,12 @@ const result = grsbm(graph, {
1027
1028
 
1028
1029
  ## Interactive Examples
1029
1030
 
1030
- Try out all algorithms with interactive visualizations: **[Live Demo →](https://graphty-org.github.io/algorithms/)**
1031
+ Try out all algorithms with interactive visualizations: **[Live Demo →](https://graphty.app/algorithms/)**
1031
1032
 
1032
1033
  The library includes comprehensive examples demonstrating each algorithm. You can:
1033
1034
 
1034
- - **[Browse Interactive HTML Examples](https://graphty-org.github.io/algorithms/examples/)** - Visual demonstrations with step-by-step execution
1035
- - **[View Performance Benchmarks](https://graphty-org.github.io/algorithms/benchmarks/)** - Comparative analysis of algorithm performance
1035
+ - **[Browse Interactive HTML Examples](https://graphty.app/algorithms/examples/)** - Visual demonstrations with step-by-step execution
1036
+ - **[View Performance Benchmarks](https://graphty.app/algorithms/benchmarks/)** - Comparative analysis of algorithm performance
1036
1037
  - **[Explore Code Examples](https://github.com/graphty-org/algorithms/tree/main/examples)** - Implementation examples for each algorithm
1037
1038
 
1038
1039
  ### Basic Algorithms
@@ -1344,7 +1345,7 @@ interface GRSBMResult {
1344
1345
  - GRSBM: O(m log n) where m is edges
1345
1346
  - **Memory Usage**: O(V + E) for graph storage
1346
1347
  - **Browser Optimization**: Algorithms use iterative approaches where possible to avoid stack overflow
1347
- - **Performance Benchmarks**: View detailed performance comparisons at [https://graphty-org.github.io/algorithms/benchmarks/](https://graphty-org.github.io/algorithms/benchmarks/)
1348
+ - **Performance Benchmarks**: View detailed performance comparisons at [https://graphty.app/algorithms/benchmarks/](https://graphty.app/algorithms/benchmarks/)
1348
1349
 
1349
1350
  ## Development
1350
1351
 
@@ -3999,7 +3999,7 @@ class BidirectionalDijkstra {
3999
3999
  }
4000
4000
  return false;
4001
4001
  }
4002
- getMinDistance(frontier) {
4002
+ _getMinDistance(frontier) {
4003
4003
  if (frontier.isEmpty()) {
4004
4004
  return Infinity;
4005
4005
  }
@@ -10504,7 +10504,7 @@ function initializeClusterCenters(embeddings, numClusters) {
10504
10504
  }
10505
10505
  return centers;
10506
10506
  }
10507
- function updateEmbeddings(graph, embeddings, clusters, learningRate, lambda) {
10507
+ function updateEmbeddings(graph, embeddings, _clusters, learningRate, lambda) {
10508
10508
  const gradients = /* @__PURE__ */ new Map();
10509
10509
  for (const [nodeId, embedding] of embeddings) {
10510
10510
  gradients.set(nodeId, new Array(embedding.length).fill(0));
@@ -11062,7 +11062,7 @@ function grsbm(graph, config = {}) {
11062
11062
  explanation: explanations
11063
11063
  };
11064
11064
  }
11065
- function spectralBisection(graph, cluster, numEigenvectors, tolerance, maxIterations) {
11065
+ function spectralBisection(graph, cluster, _numEigenvectors, tolerance, maxIterations) {
11066
11066
  const members = Array.from(cluster.members);
11067
11067
  const n = members.length;
11068
11068
  if (n < 4) {