From 1c140076c68ed31fbd9c4ed245c2e8acee1b5f77 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 28 Oct 2025 16:29:18 +0100 Subject: [PATCH] fix: iterate city positions by rows --- codes/tsp_hw01/src/tsp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/tsp_hw01/src/tsp.rs b/codes/tsp_hw01/src/tsp.rs index 69809af67368eb5c697bbb02aafd333734286831..b543dc439834dcdd69b817f3b5ea10d1c1d50ee1 100644 --- a/codes/tsp_hw01/src/tsp.rs +++ b/codes/tsp_hw01/src/tsp.rs @@ -62,7 +62,7 @@ where pub fn new(cities: OMatrix>) -> Self { let dim = cities.shape_generic().0; - let cities = cities.column_iter() + let cities = cities.row_iter() .map(|position| TSPCity { point: Point::::new(position[0], position[1]) } )