Skip to content
/ cortez2 Public

A node module providing some basic data structures with pure js implementation

Notifications You must be signed in to change notification settings

lud77/cortez2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

A node module providing some basic data structures with pure js implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published