From 5e294f1e4fb8d2e33f1c862ff34798bc9fef4b27 Mon Sep 17 00:00:00 2001 From: William Ball Date: Fri, 6 Aug 2021 16:23:16 -0400 Subject: [PATCH] figured it out, working on a solution --- .../circle_counting_new/data/cube.txt | 51 ++++++++++--------- .../data/pentagonal_pyramid.txt | 28 ++-------- .../circle_counting_new/src/main.rs | 1 + 3 files changed, 31 insertions(+), 49 deletions(-) diff --git a/fractal_dimension/circle_counting_new/data/cube.txt b/fractal_dimension/circle_counting_new/data/cube.txt index d8092c9..3c12bc3 100644 --- a/fractal_dimension/circle_counting_new/data/cube.txt +++ b/fractal_dimension/circle_counting_new/data/cube.txt @@ -1,27 +1,30 @@ -{{{1, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0}, {2, 1, 0, 0, 0, - 3, -1, 0}, {3, 0, 0, 0, 0, 3, -1, 0}, {1, -1, 0, 0, 0, 1, 0, - 0}, {0, 0, 0, 0, 0, 1, 0, 0}, {2, 0, 0, 0, 0, 4, -1, 0}, {3, -1, 0, - 0, 0, 4, -1, 0}}, {{1, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, - 0}, {0, 0, 1, 0, 0, 0, 0, 0}, {1, -1, 1, 0, 0, 0, 0, 0}, {3, 1, 2, - 0, 0, -1, 0, 0}, {2, 2, 2, 0, 0, -1, 0, 0}, {2, 1, 3, 0, 0, -1, 0, - 0}, {3, 0, 3, 0, 0, -1, 0, 0}}, {{1, 0, 0, 0, 0, 0, 0, 0}, {3, 0, - 0, 0, 0, 0, -1, 3}, {2, 0, 0, 1, 0, 0, -1, 3}, {0, 0, 0, 1, 0, 0, - 0, 0}, {1, 0, 0, -1, 0, 0, 0, 1}, {3, 0, 0, -1, 0, 0, -1, 4}, {2, - 0, 0, 0, 0, 0, -1, 4}, {0, 0, 0, 0, 0, 0, 0, 1}}, {{-1, 4, 0, 0, 0, - 0, 2, 0}, {0, 1, 0, 0, 0, 0, 0, 0}, {0, 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 0, 0, 1, 0, 0, -1, 3}, {0, 0, 0, 1, 0, 0, 0, 0}, {1, 0, 0, +-1, 0, 0, 0, 1}, {3, 0, 0, -1, 0, 0, -1, 4}, {2, 0, 0, 0, 0, 0, -1, 4}, {0, 0, +0, 0, 0, 0, 0, 1}}, {{-1, 4, 0, 0, 0, 0, 2, 0}, {0, 1, 0, 0, 0, 0, 0, 0}, {0, +1, 0, 0, 0, -1, 1, 0}, {-1, 4, 0, 0, 0, -1, 3, 0}, {-1, 3, 0, 0, 0, 1, 2, 0}, +{0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0}, {-1, 3, 0, 0, 0, 0, 3, 0}}, +{{0, 0, 0, 3, 0, -1, 3, 0}, {0, 0, 0, 3, 0, -1, 4, -1}, {0, 0, 0, 1, 0, 0, 1, +-1}, {0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 2, 0, -1, 3, 1}, {0, 0, 0, 2, 0, -1, +4, 0}, {0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 1}}, {{0, 0, 0, -1, 0, +3, -1, 4}, {0, 0, 0, -1, 0, 3, 0, 3}, {0, 0, 0, -1, 0, 2, 1, 3}, {0, 0, 0, -1, +0, 2, 0, 4}, {0, 0, 0, 0, 0, 1, -1, 1}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, +0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 1}}} -{{22., 80., -28.2843, 31.}, {12., 48., -16.9706, 17.}, {4., - 20., -5.65685, 7.}, {14., 52., -16.9706, 21.}, {16., 52., -19.799, - 21.}, {6., 20., -8.48528, 7.}, {-2., -8., 2.82843, -3.}, {8., - 24., -8.48528, 11.}} +{{0., 8.485281374238571, -1., 0.}, {0., -2.8284271247461903, + 1., 0.}, {1.4142135623730951, 18.38477631085024, -5., + 1.4142135623730951}, {1.4142135623730951, + 7.0710678118654755, -3., + 1.4142135623730951}, {1.4142135623730951, + 18.38477631085024, -5., -1.4142135623730951}, +{1.4142135623730951, + 7.0710678118654755, -3., -1.4142135623730951}, +{2.8284271247461903, 16.970562748477143, -7., + 0.}, {2.8284271247461903, 28.284271247461902, -9., 0.}} {{0, 1, 5, 4}, {0, 3, 2, 1}, {0, 4, 7, 3}, {1, 2, 6, 5}, {2, 3, 7, 6}, {4, 5, 6, 7}} diff --git a/fractal_dimension/circle_counting_new/data/pentagonal_pyramid.txt b/fractal_dimension/circle_counting_new/data/pentagonal_pyramid.txt index c6b42dd..2a04642 100644 --- a/fractal_dimension/circle_counting_new/data/pentagonal_pyramid.txt +++ b/fractal_dimension/circle_counting_new/data/pentagonal_pyramid.txt @@ -1,25 +1,3 @@ -{{{1., 0, 0, 0, 0, 0}, {0, 1., 0, 0, 0, 0}, {5.23607, 3.61803, 0, - 0, -1., 3.61803}, {8.47214, 4.23607, 0, 0, -1.61803, - 6.8541}, {5.23607, 2., 0, 0, -1., 5.23607}, {0, 0, 0, 0, 0, - 1.}}, {{1., 0, 0, 0, 0, 0}, {0, 1., 0, 0, 0, 0}, {0, 0, 1., 0, 0, - 0}, {5.23607, 3.61803, 3.61803, 0, 0, -1.}, {8.47214, 6.8541, - 4.23607, 0, 0, -1.61803}, {5.23607, 5.23607, 2., 0, 0, -1.}}, {{1., - 0, 0, 0, 0, 0}, {5.23607, 0, 3.61803, 3.61803, -1., 0}, {0, 0, 1., - 0, 0, 0}, {0, 0, 0, 1., 0, 0}, {5.23607, 0, 2., 5.23607, -1., - 0}, {8.47214, 0, 4.23607, 6.8541, -1.61803, 0}}, {{1., 0, 0, 0, 0, - 0}, {8.47214, 0, 0, 4.23607, 6.8541, -1.61803}, {5.23607, 0, 0, - 3.61803, 3.61803, -1.}, {0, 0, 0, 1., 0, 0}, {0, 0, 0, 0, 1., - 0}, {5.23607, 0, 0, 2., 5.23607, -1.}}, {{1., 0, 0, 0, 0, - 0}, {5.23607, 0, -0.618034, 0, 2.61803, 4.23607}, {8.47214, 0, -1., - 0, 5.23607, 5.23607}, {5.23607, 0, -0.618034, 0, 4.23607, - 2.61803}, {0, 0, 0, 0, 1., 0}, {0, 0, 0, 0, 0, - 1.}}, {{-1., -0.472136, 0.763932, 0, 0, 0.763932}, {0, 1., 0, 0, 0, - 0}, {0, 0, 1., 0, 0, 0}, {0, -1.61803, 1.61803, 0, 0, - 1.}, {0, -1.61803, 1., 0, 0, 1.61803}, {0, 0, 0, 0, 0, 1.}}} - -{{12.4721, 10.4721, -6.47214, 9.47214}, {44.3607, 44.3607, -27.4164, - 34.8885}, {10.4721, 12.4721, -6.47214, - 9.47214}, {-5.23607, -5.23607, 3.23607, -4.23607}, {18.9443, - 15.7082, -11.7082, 12.7082}, {49.5967, 46.3607, -30.6525, 36.8885}} - -{{0, 1, 5}, {0, 2, 1}, {0, 3, 2}, {0, 4, 3}, {0, 5, 4}, {1, 2, 3, 4, 5}} +{Table[If[j == k, 1, 0], {j, 1}, {k, DeleteDuplicates[Join[allVertices, {1}]]}] . Transpose[RowReduce[Transpose[Transpose[Join[{{1}}[[RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]]], {{1}}]]] . pyramidG[5.] . Transpose[Join[{{1}}[[RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]]], {{1}}]]][[1 ;; MatrixRank[Transpose[Transpose[Join[{{1}}[[RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]]], {{1}}]]] . pyramidG[5.] . Transpose[Join[{{1}}[[RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]]], {{1}}]]]]]] . {{1, 0, 0}, {0, 1, 0}, {0 /. Table[Subscript[b, i] -> If[i == curr, 1, 0], {i, RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]}], {curr, RandomSample[3, PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5.], VertexLabels -> "Name"]], 1]}, 0}} . Transpose[Table[If[j == k, 1, 0], {j, 1}, {k, allVertices}]]} +pyramidTuple[5.] +-1 + FindFace[PlanarGraph[AdjacencyGraph[Automatic, pyramidG[5], VertexLabels -> "Name"]]] \ No newline at end of file diff --git a/fractal_dimension/circle_counting_new/src/main.rs b/fractal_dimension/circle_counting_new/src/main.rs index 42f2249..a06f781 100644 --- a/fractal_dimension/circle_counting_new/src/main.rs +++ b/fractal_dimension/circle_counting_new/src/main.rs @@ -87,6 +87,7 @@ fn main() { .clone() .pseudo_inverse(1e-5) .expect(format!("Invalid root matrix {}", c).as_str()); + println!("{}", c); println!("{}", ct); generators = generators