2.0.2 • Published 4 years ago

cortez2 v2.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Cortez v2

A simplified and improved version of the graph library Cortez.

This module contains a few data structures and algorithms to work with graphs.

Graph

Directed graph data structure with support for self-edges and multigraphs. Both nodes and edges can store a payload, so it's easy to implement weighted graphs, labelled edges, tagging and much more.

It also allows to output a graph in the DOT graph description language.

Generalised Graph Search

A generalised graph search algorithm that abstracts many different approaches. Allows you to inject a frontierManager factory that will specify the behaviour of the algorithm when adding and expanding new nodes.

Breadth first search

A frontierManager implementing BFS on GGS.

Depth first search

A frontierManager implementing DFS on GGS.

Queue

A queue implementation based on two stacks. Approximatively 10 times faster than pushing and shifting over an Array.

Sequence

Generate auto-incrementing values (particularly useful for IDs).

2.0.2

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago