37 lines
789 B
Markdown
37 lines
789 B
Markdown
# Graph Reflexivity Project
|
||
|
||
This project demonstrates a simple graph implementation in JavaScript that supports reflexivity (adding self-loops to all nodes). It uses the `graphlib` library for graph data structures and `lodash` for utility functions.
|
||
|
||
## Installation
|
||
|
||
```bash
|
||
npm install
|
||
```
|
||
|
||
## Running the Example
|
||
|
||
```bash
|
||
node src/index.js
|
||
```
|
||
|
||
You will see the adjacency list before and after applying reflexivity.
|
||
|
||
## Testing
|
||
|
||
Run the test suite with:
|
||
|
||
```bash
|
||
npm test
|
||
```
|
||
|
||
The tests cover basic graph operations, reflexivity, and adjacency list generation.
|
||
|
||
## Dependencies
|
||
|
||
- **graphlib** – Provides the underlying graph data structure.
|
||
- **lodash** – Utility library (used for potential future extensions).
|
||
- **jest** – Testing framework (dev dependency).
|
||
|
||
## License
|
||
|
||
MIT |