Graph

WORK IN PROGRESS

Manager/QuerySet Methods

For future consideration:

  • clone()

Methods used for building/manipulating

For future consideration:

  • add_node() add node to graph, optionally providing a list of parent nodes

  • remove_nodes(nodes) removes nodes from the graph

  • add_edge() adds connections or paths between nodes in graphs

  • remove_edges(edges) removes connection or paths between nodes in graphs

Methods returning a QuerySet of Nodes

None

Methods returning a QuerySet of Edges

None

Methods returning a Boolean

None

Methods returning other values

node_count()
Returns

Number of Nodes in the Graph

Return type

int

edge_count()
Returns

Number of Edges in the Graph

Return type

int

graph_hash()
Returns

Hash value for the Graph

Return type

TBD

Model Methods

Methods used for building/manipulating an instance

None

Methods returning a QuerySet of Nodes

None

Methods returning a QuerySet of Edges

None

Methods returning a Boolean

has_connection(node_from, node_to)

Checks if a connection or path exists between two Node instances, within the current Graph.

Parameters
  • node_from (Node) – The starting Node

  • node_to (Node) – The ending Node

Returns

True if path exists from node_from to node_to

Return type

bool

For future consideration:

  • contains_value() check if a graph instance contains a certain value

Methods returning other values

None