chiark / gitweb /
wip settlings
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Oct 2022 19:59:30 +0000 (20:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Oct 2022 19:59:30 +0000 (20:59 +0100)
src/bin/settlings.rs

index 67ec0d4a2def50c7d9f6725b45324e8ee1c3149b..27dca194b50e39d1d8b68f481840cd3df16e46b1 100644 (file)
@@ -2,11 +2,29 @@
 use z3_treefoil::*;
 
 fn main() -> io::Result<()> {
-  for shape in read_vertices() {
+  for shape1 in read_vertices() {
 
-    for shape2 in shape_all_flippings(&shape) {
-      print_shape(&shape2)?;
+    for shape in shape_all_flippings(&shape1) {
+
+      let mut fromcnrs =
+        (0..DIM)
+        .map(|i| {
+          let minc = shape.iter().map(|p| p[i]).min().unwrap();
+          dbg!(i, minc);
+          minc
+        })
+        .collect_vec();
+      fromcnrs.sort();
+
+      for d in fromcnrs {
+        print!("{}", d);
+      }
+      print!(" ");
+
+      print_shape(&shape)?;
     }
+
+    println!("");
   }
 
   Ok(())