UNPKG

metagraph

Version:

A framework for building higher-order graph data structures

82 lines (77 loc) 3.28 kB
/*! * metagraph.js <%= conf.pkg.version %> * http://gordonwoodhull.github.io/metagraph.js/ * Copyright 2019 AT&T Intellectual Property * * Licensed under the MIT License * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ export { version } from './core.js'; export { graph, graph as graph_adjacency, graph_detect, graph_incidence } from './graph.js'; export { dataflow } from './dataflow.js'; export { pattern } from './pattern.js'; export { compose } from './compose.js'; export { topological_sort } from './topological_sort.js'; import { call } from './interface.js'; export { createable, fetch, lookupArg, lookupFVal, lookupKVal, reference, subgraph } from './interface.js'; export { input, list, map, map_of_lists, output, singleton, subset } from './dataflow_calcs.js'; export { graph_pattern } from './graph_pattern.js'; export { subgraph_pattern } from './subgraph_pattern.js'; /** * # Metagraph.js * * A TypeScript library for building higher-order graph data structures with composable patterns, * lazy evaluation, and dataflow computation capabilities. * * ## Core Features * * - **Graph Data Structures**: Adjacency and incidence list representations * - **Lazy Evaluation**: On-demand computation of graph properties * - **Dataflow Graphs**: Computation graphs with dependency resolution * - **Graph Patterns**: Reusable templates for creating graph instances * - **Pattern Composition**: Combine multiple patterns into complex structures * - **Topological Sorting**: DAG ordering algorithms * * ## Basic Usage * * ```typescript * import { graph, pattern, graph_pattern } from 'metagraph'; * * // Create a simple graph * const g = graph( * [{key: 'a'}, {key: 'b'}], * [{key: 'edge', value: {source: 'a', target: 'b'}}] * ); * * // Create a graph using patterns * const graphPat = pattern(graph_pattern()); * const instance = graphPat.node('Graph').value().create({ * nodes: [{key: 'x'}, {key: 'y'}], * edges: [{key: 'connection', value: {source: 'x', target: 'y'}}] * }); * ``` * * @packageDocumentation */ // Re-export everything from individual modules const key = call('key'); const value = call('value'); export { call, key, value }; //# sourceMappingURL=index.js.map