GraphSignals
GraphSignals.EdgeIndex
GraphSignals.FeaturedGraph
GraphSignals.NullGraph
GraphSignals.adjacency_list
GraphSignals.adjacency_list
GraphSignals.adjacency_list
GraphSignals.aggregate_index
GraphSignals.edge_feature
GraphSignals.edge_feature
GraphSignals.edge_scatter
GraphSignals.fetch_graph
GraphSignals.fetch_graph
GraphSignals.global_feature
GraphSignals.global_feature
GraphSignals.graph
GraphSignals.graph
GraphSignals.graph
GraphSignals.has_edge_feature
GraphSignals.has_edge_feature
GraphSignals.has_global_feature
GraphSignals.has_global_feature
GraphSignals.has_graph
GraphSignals.has_graph
GraphSignals.has_node_feature
GraphSignals.has_node_feature
GraphSignals.mask
GraphSignals.neighbor_scatter
GraphSignals.node_feature
GraphSignals.node_feature
GraphSignals.order_edges
LightGraphs.ne
LightGraphs.ne
LightGraphs.nv
LightGraphs.nv
GraphSignals.EdgeIndex
— TypeA indexing structure for accessing neighbors of a vertex.
GraphSignals.FeaturedGraph
— TypeFeaturedGraph(graph, node_feature, edge_feature, global_feature, mt, directed)
A feature-equipped graph structure for passing graph to layer in order to provide graph dynamically. References to graph or features are hold in this type.
Arguments
graph
: should be a adjacency matrix,SimpleGraph
,SimpleDiGraph
(from LightGraphs) orSimpleWeightedGraph
,
SimpleWeightedDiGraph
(from SimpleWeightedGraphs).
node_feature
: node features attached to graph.edge_feature
: edge features attached to graph.gloabl_feature
: gloabl graph features attached to graph.mask
: mask forgraph
.mt
: matrix type forgraph
in matrix form. ifgraph
is in matrix form,mt
is recorded as one of:adjm
,
:laplacian
, :normalized
or :scaled
. Otherwise, :nonmatrix
is recorded.
directed
: the direction ofgraph
. it istrue
for directed graph; it isfalse
for undirected graph.
GraphSignals.NullGraph
— TypeNullGraph()
Null object for FeaturedGraph
.
GraphSignals.adjacency_list
— Methodadjacency_list(::AbstractFeaturedGraph)
Get adjacency list of graph.
GraphSignals.adjacency_list
— Methodadjacency_list(adj)
Transform a adjacency matrix into a adjacency list.
GraphSignals.aggregate_index
— Functionaggregate_index(ei; direction=:undirected, kind=:edge)
Generate index structure for scatter operation.
Arguments
ei::EdgeIndex
: The reference graph.direction::Symbol
: The direction of an edge to be choose to aggregate. It must be one of:undirected
,:inward
and:outward
.kind::Symbol
: To aggregate feature upon edge or vertex. It must be one of:edge
and:vertex
.
GraphSignals.edge_feature
— Methodedge_feature(::AbstractFeaturedGraph)
Get edge feature attached to graph.
GraphSignals.edge_scatter
— Methodedge_scatter(aggr, E, ei, direction=:undirected)
Scatter operation for aggregating edge feature into vertex feature.
Arguments
aggr
: aggregating operators, e.g.+
.E
: Edge features with size of (#feature, #edge).ei::EdgeIndex
: The reference graph.direction::Symbol
: The direction of an edge to be choose to aggregate. It must be one of:undirected
,:inward
and:outward
.
GraphSignals.fetch_graph
— Methodfetch_graph(g1, g2)
Fetch graph from g1
or g2
. If there is only one graph available, fetch that one. Otherwise, fetch the first one.
GraphSignals.global_feature
— Methodglobal_feature(::AbstractFeaturedGraph)
Get global feature attached to graph.
GraphSignals.graph
— MethodSupport adjacency matrix
GraphSignals.graph
— Methodgraph(::AbstractFeaturedGraph)
Get referenced graph.
GraphSignals.has_edge_feature
— Methodhas_edge_feature(::AbstractFeaturedGraph)
Check if edge feature is available or not.
GraphSignals.has_global_feature
— Methodhas_global_feature(::AbstractFeaturedGraph)
Check if global feature is available or not.
GraphSignals.has_graph
— Methodhas_graph(::AbstractFeaturedGraph)
Check if graph is available or not.
GraphSignals.has_node_feature
— Methodhas_node_feature(::AbstractFeaturedGraph)
Check if node feature is available or not.
GraphSignals.mask
— Methodmask(fg, m)
A syntax sugar for masking graph.
Returns a GraphMask
.
GraphSignals.neighbor_scatter
— Methodneighbor_scatter(aggr, X, ei, direction=:undirected)
Scatter operation for aggregating neighbor vertex feature together.
Arguments
aggr
: aggregating operators, e.g.+
.X
: Vertex features with size of (#feature, #vertex).ei::EdgeIndex
: The reference graph.direction::Symbol
: The direction of an edge to be choose to aggregate. It must be one of:undirected
,:inward
and:outward
.
GraphSignals.node_feature
— Methodnode_feature(::AbstractFeaturedGraph)
Get node feature attached to graph.
GraphSignals.order_edges
— MethodOrder the edges in a graph by giving a unique integer to each edge.
LightGraphs.ne
— Methodne(::AbstractFeaturedGraph)
Get edge number of graph.
LightGraphs.nv
— Methodnv(::AbstractFeaturedGraph)
Get node number of graph.