pub fn graph_from_strings_with_attributes<'a, T>(
nodes: &'a [String],
node_types: &'a [String],
from: &'a [String],
to: &'a [String],
edge_types: &'a [String],
edge_weights: &'a [T],
) -> AttributedGraph<'a, T>where
T: BixverseFloat,Expand description
Generate a weighted, typed graph from node and edge lists
§Params
nodes- Slice of node names.node_types- Slice of the node types.from- Slice of the names of the from nodes.to- Slice of the names of the to nodes.edge_types- Slice of the edge types.edge_weights- Slice of the edge weights.
§Returns
An AttributedGraph for subsequent usage in constrained personalised
page-rank iteration.
§Panics
Function will panic if nodes and nodes_types do not have the same
length, when from, to, edge_types and edge_weights do not have the
same length, or when an edge names a node that is not in nodes.