use graph_api_simplegraph::{SimpleGraph, VertexId};
use graph_api_test::populate_graph;
fn main() {
let mut graph = SimpleGraph::new();
let refs = populate_graph(&mut graph);
example(graph, refs.bryn, refs.julia);
}
fn example<Graph>(graph: Graph, bryn_id: Graph::VertexId, julia_id: Graph::VertexId)
where
Graph: graph_api_lib::Graph<VertexId = VertexId>,
{
let result = graph
.walk()
.vertices_by_id(vec![bryn_id, julia_id])
.collect::<Vec<_>>();
assert_eq!(result.len(), 2);
let made_up_id = VertexId::new(3, 4);
let filtered_result = graph
.walk()
.vertices_by_id(vec![bryn_id, made_up_id])
.collect::<Vec<_>>();
assert_eq!(filtered_result.len(), 1); }