From 362b11a3837ee5562804cf26c540fb583ca7b3a4 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 17 Nov 2019 11:12:06 +0100 Subject: [PATCH] more elegant fpattern::solve() --- fieldpattern.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/fieldpattern.cpp b/fieldpattern.cpp index 437cb508..98431e4f 100644 --- a/fieldpattern.cpp +++ b/fieldpattern.cpp @@ -277,9 +277,20 @@ struct fpattern { } void findsubpath(); + + bool check_order(matrix M, int req); }; #endif +bool fpattern::check_order(matrix M, int req) { + matrix P = M; + for(int i=1; i