Skip to content

Nodes and a Graph/Tree for learning search algorithms

Notifications You must be signed in to change notification settings

IAmBullsaw/Graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Graph

This is a simple C++ implementation to easily build trees or graphs from connected nodes.

node/

This node has zero or more connections to other nodes. It can only have one connection/arc to any one node, however possible to have different costs:

Cost:   1        3
Arcs: a -> b   a <- b

Example of use

 Node n{"name"};
 Node o{"Cool node"};
 n.connect(&o,2); // One way connection of cost 2
 o.connects_to(&n); // Will therefore return false

graph/

This graph implementation can load up a graph from file using this simple DSL:

# This is a comment.
# It must be on the form "# "
# Otherwise it'll fail.
NODES
these
are
all
names
of
nodes
STOP
# Here be connections/arcs between nodes.
# a line that is preceded with an "m"
# means that these nodes are going to
# be mutually connected, so a->b, a<-b
# and will have the same cost.
these are 1 all 2 names 1
m names of 2 nodes 2
STOP
# Now that's a complete file

search_algorithms/

This is a folder that contains different search algorithms implemented using these nodes. Cool.

graphs/

A folder containing graphs in the format loadable by the Graph.

About

Nodes and a Graph/Tree for learning search algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published