@crstrskp/graph
Version:
High-performance TypeScript graph algorithms library optimized for trading bots and arbitrage detection
45 lines • 2.43 kB
JavaScript
;
/**
* @fileoverview High-performance TypeScript graph algorithms library optimized for trading bots and arbitrage detection.
*
* This library provides production-ready graph data structures and algorithms with:
* - O(V log V) Dijkstra's shortest path algorithm using priority queues
* - Bellman-Ford algorithm with negative cycle detection for arbitrage
* - Thread-safe implementations for concurrent trading strategies
* - Real-time market data processing with batched updates
* - Comprehensive test coverage for financial precision
*
* @example
* ```typescript
* import { GraphImpl } from '@crstrskp/graph';
*
* const graph = new GraphImpl();
* const usd = graph.insertVertex("USD");
* const eur = graph.insertVertex("EUR");
* graph.insertEdge(usd, eur, 0.85);
*
* const path = graph.dijkstra_shortestPath(usd, eur);
* console.log(`Exchange rate: ${path.getTotalCost()}`);
* ```
*
* @author Jesper Tjørnelund
* @version 1.0.0
* @license MIT
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.PriorityQueue = exports.Edge = exports.Path = exports.Vertex = exports.RealTimeGraphImpl = exports.ThreadSafeGraphImpl = exports.GraphImpl = void 0;
const GraphImpl_1 = require("./GraphImpl");
Object.defineProperty(exports, "GraphImpl", { enumerable: true, get: function () { return GraphImpl_1.GraphImpl; } });
const ThreadSafeGraphImpl_1 = require("./ThreadSafeGraphImpl");
Object.defineProperty(exports, "ThreadSafeGraphImpl", { enumerable: true, get: function () { return ThreadSafeGraphImpl_1.ThreadSafeGraphImpl; } });
const RealTimeGraphImpl_1 = require("./RealTimeGraphImpl");
Object.defineProperty(exports, "RealTimeGraphImpl", { enumerable: true, get: function () { return RealTimeGraphImpl_1.RealTimeGraphImpl; } });
const Vertex_1 = require("./Vertex");
Object.defineProperty(exports, "Vertex", { enumerable: true, get: function () { return Vertex_1.Vertex; } });
const Path_1 = require("./Path");
Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return Path_1.Path; } });
const Edge_1 = require("./Edge");
Object.defineProperty(exports, "Edge", { enumerable: true, get: function () { return Edge_1.Edge; } });
const PriorityQueue_1 = require("./PriorityQueue");
Object.defineProperty(exports, "PriorityQueue", { enumerable: true, get: function () { return PriorityQueue_1.PriorityQueue; } });
//# sourceMappingURL=Graph.js.map