mirror of https://codeberg.org/topola/topola.git
geometry: fix getting grouping members
The assumed grouping edge direction was wrong.
This commit is contained in:
parent
36e029012f
commit
9bf18db4d1
|
|
@ -468,11 +468,11 @@ impl<
|
||||||
|
|
||||||
pub fn grouping_members(&self, grouping: GenericIndex<GW>) -> impl Iterator<Item = PI> + '_ {
|
pub fn grouping_members(&self, grouping: GenericIndex<GW>) -> impl Iterator<Item = PI> + '_ {
|
||||||
self.graph
|
self.graph
|
||||||
.neighbors(grouping.node_index())
|
.neighbors_directed(grouping.node_index(), Incoming)
|
||||||
.filter(move |ni| {
|
.filter(move |ni| {
|
||||||
matches!(
|
matches!(
|
||||||
self.graph
|
self.graph
|
||||||
.edge_weight(self.graph.find_edge(grouping.node_index(), *ni).unwrap())
|
.edge_weight(self.graph.find_edge(*ni, grouping.node_index()).unwrap())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
GeometryLabel::Grouping
|
GeometryLabel::Grouping
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue