GraphSignals

GraphSignals.FeaturedGraphType
FeaturedGraph(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) or SimpleWeightedGraph,

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 for graph.
  • mt: matrix type for graph in matrix form. if graph is in matrix form, mt is recorded as one of :adjm,

:laplacian, :normalized or :scaled. Otherwise, :nonmatrix is recorded.

  • directed: the direction of graph. it is true for directed graph; it is false for undirected graph.
GraphSignals.edge_scatterMethod
edge_scatter(aggr, E, ei, direction=:undirected)

Scatter operation for aggregating edge feature into vertex feature.

GraphSignals.fetch_graphMethod
fetch_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.maskMethod
mask(fg, m)

A syntax sugar for masking graph.

Returns a GraphMask.

LightGraphs.neMethod
ne(::AbstractFeaturedGraph)

Get edge number of graph.

LightGraphs.nvMethod
nv(::AbstractFeaturedGraph)

Get node number of graph.