Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Petgraph 可以很容易地更改边权重,可以通过直接访问图 ( graph[edge_id]) 或通过update_edge。
graph[edge_id]
update_edge
但有时您想更改边连接的节点。有没有办法就地编辑边缘的源或目标?我还没有找到一个,所以我只是删除并重新创建边缘,但有时有点令人费解。