- // Unique flipper counter for partitioning into minors
- std::vector<unsigned> Pkey;
- Pkey.reserve(n);
- // key for minor determinant (a subpartition of Pkey)
- std::vector<unsigned> Mkey;
+ // we store the minors in maps, keyed by the rows they arise from
+ typedef std::vector<unsigned> keyseq;
+ typedef std::map<keyseq, ex> Rmap;
+
+ Rmap M, N; // minors used in current and next column, respectively
+ // populate M with dummy unit, to be used as factor in rightmost column
+ M[keyseq{}] = _ex1;
+
+ // keys to identify minor of M and N (Mkey is a subsequence of Nkey)
+ keyseq Mkey, Nkey;