Download the PHP package nexus-scholar/graph-core without Composer
On this page you can find all versions of the php package nexus-scholar/graph-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nexus-scholar/graph-core
More information about nexus-scholar/graph-core
Files in nexus-scholar/graph-core
Package graph-core
Short Description A lightweight, performant, and dependency-free graph data structure library for PHP.
License MIT
Homepage https://github.com/nexus-scholar/graph-core
Informations about the package graph-core
nexus-scholar/graph-core
graph-core is a lightweight PHP graph data-structure package for directed and undirected graphs. It provides node and edge attributes, efficient adjacency lookups, subgraph views, and exporters for common graph-visualization formats.
Role In Nexus Scholar
This package is the graph foundation for Nexus Scholar citation-network work. It intentionally stays generic: scholarly concepts such as papers, citations, co-citation, bibliographic coupling, screening, and exports live in nexus-scholar/core, while graph storage, traversal primitives, attributes, and serialization live here.
Use it directly for PHP graph modeling, or pair it with nexus-scholar/graph-algorithms when you need centrality, pathfinding, traversal, components, ordering, or minimum-spanning-tree algorithms.
Features
- Directed and undirected graph support.
- Node and edge attributes.
- Integer indexing internally for fast adjacency lookups.
- Read-only subgraph views without copying the full graph.
- Cytoscape.js JSON, GraphML, and GEXF exporters.
- PHP 8.2+ types and interfaces.
- No runtime dependencies except
ext-domfor XML export formats. - Pest-backed test suite.
Requirements
- PHP 8.2+
ext-domfor GraphML and GEXF exports
Installation
Quick Start
Undirected Graphs
Edge Lists
Subgraph Views
Export Formats
Export for browser visualization with Cytoscape.js:
Export GraphML for tools such as Gephi, yEd, or NetworkX:
Export GEXF for Gephi and compatible network-analysis tools:
Architecture
Core interfaces and classes include:
GraphInterface: read-only graph operations.MutableGraphInterface: graph operations with mutation methods.ExporterInterface: common export contract.Graph: mutable graph implementation.SubgraphView: efficient filtered graph view.NodeandEdge: value objects for graph elements.IndexMap: bidirectional mapping between external node IDs and internal integer indexes.
Testing
Use Cases
- Citation and bibliographic networks.
- Knowledge graphs and concept maps.
- Dependency graphs.
- Workflow and state-machine modeling.
- Data visualization exports.
- Route, logistics, and infrastructure graphs.
See Also
- nexus-scholar/graph-algorithms - algorithms for centrality, pathfinding, traversal, components, ordering, and minimum spanning trees.
- nexus-scholar/core - Nexus Scholar workflow engine that uses graph packages for citation-network features.
- nexus-scholar/scholar-graph - legacy scholarly graph prototype that preceded the current graph packages.
License
This library is open-sourced software licensed under the MIT license.
All versions of graph-core with dependencies
ext-dom Version *