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.edgeattr — Method
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.hasedge — Method
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.inneighbors — Method
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.neighbors — Method
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.outneighbors — Method
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