From 7d6a394156aa26372ad0d98697fcb0e97a441ea4 Mon Sep 17 00:00:00 2001
From: Aaron Fenyes <aaron.fenyes@fareycircles.ooo>
Date: Thu, 14 Nov 2024 01:18:20 -0800
Subject: [PATCH] Name element column index more descriptively

---
 app-proto/src/assembly.rs | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/app-proto/src/assembly.rs b/app-proto/src/assembly.rs
index 9a4dd94..35b4417 100644
--- a/app-proto/src/assembly.rs
+++ b/app-proto/src/assembly.rs
@@ -23,7 +23,7 @@ pub struct Element {
     
     // the configuration matrix column index that was assigned to this element
     // last time the assembly was realized
-    index: usize
+    column_index: usize
 }
 
 impl Element {
@@ -39,7 +39,7 @@ impl Element {
             color: color,
             representation: create_signal(representation),
             constraints: create_signal(BTreeSet::default()),
-            index: 0
+            column_index: 0
         }
     }
 }
@@ -133,7 +133,7 @@ impl Assembly {
         // index the elements
         self.elements.update_silent(|elts| {
             for (index, (_, elt)) in elts.into_iter().enumerate() {
-                elt.index = index;
+                elt.column_index = index;
             }
         });
         
@@ -145,8 +145,8 @@ impl Assembly {
                 for (_, cst) in csts {
                     if cst.active.get_untracked() && cst.lorentz_prod_valid.get_untracked() {
                         let subjects = cst.subjects;
-                        let row = elts[subjects.0].index;
-                        let col = elts[subjects.1].index;
+                        let row = elts[subjects.0].column_index;
+                        let col = elts[subjects.1].column_index;
                         gram_to_be.push_sym(row, col, cst.lorentz_prod.get_untracked());
                     }
                 }
@@ -156,7 +156,7 @@ impl Assembly {
             // Gram matrix
             let mut guess_to_be = DMatrix::<f64>::zeros(5, elts.len());
             for (_, elt) in elts {
-                let index = elt.index;
+                let index = elt.column_index;
                 gram_to_be.push_sym(index, index, 1.0);
                 guess_to_be.set_column(index, &elt.representation.get_clone_untracked());
             }
@@ -202,7 +202,7 @@ impl Assembly {
             // read out the solution
             for (_, elt) in self.elements.get_clone_untracked() {
                 elt.representation.update(
-                    |rep| rep.set_column(0, &config.column(elt.index))
+                    |rep| rep.set_column(0, &config.column(elt.column_index))
                 );
             }
         }