番石榴:图形的复制构造函数

Guava: Copy-Constructor for graphs

我正在寻找 guava 中图形的复制构造函数。到目前为止,我已经试过了:

copy = GraphBuilder.from(g).build();

"from(..)" 只复制图的属性 (directed/undirected),而不是 edges/vertices。

我正在搜索 vertices/edges 的实际副本。番石榴支持这个吗?

听起来您正在寻找 Graphs.copyOf