Skip to content

Commit

Permalink
Dedup edges to ensure smooth animation
Browse files Browse the repository at this point in the history
  • Loading branch information
leo848 committed Apr 5, 2024
1 parent 0958f3a commit aa86fed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/path/create/ilp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ pub fn solve<C: CreateContext>(ctx: C) -> C::Path {
},
)
})
.map(|(&i, &j)| (i, j)),
.map(|(&i, &j)| (i, j))
.filter(|(i, j)| i != j)
.sorted()
.dedup(),
None,
);
add_cycle_constraints(&mut model, &paths, &x);
Expand Down

0 comments on commit aa86fed

Please sign in to comment.