Interface

MolecularGraph.Graph.addnode!Method
addnode!(graph) -> Int
addnode!(graph, attr) -> Int

Add new node and return the node index. If the node attribute type is required, specify the node attribute object by node keyword.

source
MolecularGraph.Graph.clearcache!Method
clearcache!(graph::AbstractGraph) -> nothing

Clear calculated property caches.

Calling clearcache! is recommended when the graph nodes/edges are added, removed or reindexed. You can Graph.clone the graph before destructive operation instead.

source
MolecularGraph.Graph.edgeattrMethod
edgeattr(graph::AbstractGraph, u::Int, v::Int
    ) -> Union{AbstractEdge,Nothing}

Return the attribute object of an edge that connects u and v. If not found, return nothing.

source
MolecularGraph.Graph.hasedgeMethod
hasedge(graph::UndirectedGraph, u::Int, v::Int) -> Bool
hasedge(graph::DirectedGraph, source::Int, target::Int) -> Bool

Return whether the given two nodes are connected by at least one edge.

source
MolecularGraph.Graph.inneighborsMethod
inneighbors(graph::DirectedGraph, i::Int) -> Dict{Int,Int}

Return the mapping of predecessor node keys and in edge keys connected to the given node.

source
MolecularGraph.Graph.neighborsMethod
neighbors(graph, i) -> Dict{Int,Int}

Return the mapping of incident edges and adjacent nodes of node i. If the graph is directed graph, both outneighbors and inneighbors are mapped.

source
MolecularGraph.Graph.outneighborsMethod
outneighbors(graph::DirectedGraph, i::Int) -> Dict{Int,Int}

Return the mapping of successor node keys and out edge keys connected to the given node.

source