[lab5] Minor fixes
This commit is contained in:
parent
dab2d16e38
commit
e4b75957a7
@ -39,10 +39,10 @@ fn draw_ants(ui: &mut Ui, vertex_locations: &mut [(f32, f32)], data: &GeneticSim
|
||||
chromosome.iter().reduce(|a, b| {
|
||||
match data.graph.vertices[*a]
|
||||
.iter()
|
||||
.position(|e| data.graph.edges[*e].another(*a) == *b)
|
||||
.find(|e| data.graph.edges[**e].another(*a) == *b)
|
||||
{
|
||||
None => unreachable!(),
|
||||
Some(e) => usage[e] += 1,
|
||||
Some(e) => usage[*e] += 1,
|
||||
};
|
||||
return b;
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user