summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capset.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/capset.go b/capset.go
index c0b9bbe..2b182cb 100644
--- a/capset.go
+++ b/capset.go
@@ -190,6 +190,9 @@ type Capset struct {
maxim int
// hasSet is true if the current tableau contains at least one set.
hasSet bool
+ // fixedMaxim is false when maxim should be increased as larger capsets are
+ // found.
+ fixedMaxim bool
}
// NewCapset makes an initialized Capset for the provided deck. If maxim is -1,
@@ -301,7 +304,9 @@ func (cs *Capset) FindNextCapset() bool {
if len(cs.tableau) < cs.maxim {
continue
}
- cs.maxim = len(cs.tableau)
+ if !cs.fixedMaxim {
+ cs.maxim = len(cs.tableau)
+ }
return true
}
return false
@@ -339,6 +344,8 @@ func main() {
flag.PrintDefaults()
}
initialMaxim := flag.Int("maxim", -1, "initial maxim to use; -1 for auto")
+ fixedMaxim := flag.Bool("fixed-maxim", false,
+ "maxim does not change when larger capset is found")
saveFile := flag.String("save-file", "", "file to save progress to")
flag.Parse()
@@ -371,6 +378,7 @@ func main() {
if cs == nil {
cs = NewCapset(d, *initialMaxim)
}
+ cs.fixedMaxim = *fixedMaxim
fmt.Println("Starting processing with", cs.tableau)
for cs.FindNextCapset() {