You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following compiler error when trying to use fdg::init_force_graph_uniform with a graph defined as StableGraph<(), (), Undirected>:
18 |let mut force_graph: fdg::ForceGraph<f32, 3,(), ()> = fdg::init_force_graph_uniform(graph, 10.0);
| ----------------------------- ^^^^^ the trait `From<StableGraph<(), (), Undirected>>` is not implemented for`StableGraph<_, _>`, which is required by `StableGraph<(), (), Undirected>: Into<StableGraph<_, _>>`||| required by a bound introduced by this call
Here's example code that reproduces the issue:
use fdg::{petgraph::{prelude::{StableGraph,StableUnGraph},Undirected},Force};fnmain(){letmut graph:StableGraph<(),(),Undirected> = StableGraph::default();// let mut graph: StableUnGraph<(), ()> = StableGraph::default();// Add nodes to the graphletmut nodes = Vec::new();
nodes.push(graph.add_node(()));
nodes.push(graph.add_node(()));
nodes.push(graph.add_node(()));
nodes.push(graph.add_node(()));// Add edges
graph.add_edge(nodes[0], nodes[1],());
graph.add_edge(nodes[1], nodes[2],());
graph.add_edge(nodes[2], nodes[3],());println!("{:?}", graph);letmut force_graph: fdg::ForceGraph<f32,3,(),()> = fdg::init_force_graph_uniform(graph,10.0);
fdg::simple::Center::default().apply(&mut force_graph);}
I'm currently using v1.0.0, i.e. my Cargo.toml contains this:
I get the following compiler error when trying to use
fdg::init_force_graph_uniform
with a graph defined asStableGraph<(), (), Undirected>
:Here's example code that reproduces the issue:
I'm currently using v1.0.0, i.e. my
Cargo.toml
contains this:Are undirected graphs supposed to be supported, or is the algo somehow limited to directed graphs?
BTW, thanks for the awesome library.
The text was updated successfully, but these errors were encountered: