Graph accumulators

accumulate_graph_edges(graph, edge_weights, …)

Accumulates edge weights of the out edges of each vertex \(i\): ie \(output(i) = accumulator(edge\_weights(out\_edges(i)))\).

accumulate_graph_vertices(graph, …)

Accumulates vertex weights of the adjacent vertices of each vertex \(i\): ie \(output(i) = accumulator(vertex\_weights(adjacent\_vertices(i)))\).

accumulate_graph_edges(graph, edge_weights, accumulator)[source]

Accumulates edge weights of the out edges of each vertex \(i\): ie \(output(i) = accumulator(edge\_weights(out\_edges(i)))\).

Parameters
  • graph – input graph

  • edge_weights – Weights on the edges of the graph

  • accumulator – see Accumulators

Returns

returns new graph vertex weights

accumulate_graph_vertices(graph, vertex_weights, accumulator)[source]

Accumulates vertex weights of the adjacent vertices of each vertex \(i\): ie \(output(i) = accumulator(vertex\_weights(adjacent\_vertices(i)))\).

Parameters
  • graph – input graph

  • vertex_weights – Weights on the vertices of the graph

  • accumulator – see Accumulators

Returns

returns new graph vertex weights