Skip to content

Add note in Graph doc string for clarifying adding nodes and edges #423

Closed
@czgdp1807

Description

@czgdp1807

Description of the problem

The correct way to create a graph is to first create nodes of the right type (AdjacencyListGraphNode or AdjacencyListMatrixNode) and then add these nodes to the graph. Once done, add edges between these nodes.

  1. A note should be added in the class doc string for the above process.
  2. In the doc string of add_edge it should be clarified that this function will assume that the nodes are already present in the graph. If they are not present, then this function will not add the new nodes on it's own. In case someone attempts to do that then a nice error message should be raised describing the same.

Example of the problem

References/Other comments

cc: @pratikgl

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgraphs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions