Ejemplo n.º 1
0
    /// Initialize options for example with name \a s
    EFPAOptions(const char* s,
                int v0 = 5, int q0 = 3, int lambda0 = 2, int d0 = 4)
        : Options(s),
          _v("-v", "number of sequences",                        v0     ),
          _q("-q", "number of symbols",                          q0     ),
          _l("-l", "sets of symbols per sequence (lambda)",      lambda0),
          _d("-d", "Hamming distance between sequences",         d0     ),
          _permutation("-permutation", "use permutation constraints if d=4",
                       false)
    {
        // Add options
        add(_d);
        add(_l);
        add(_q);
        add(_v);
        add(_permutation);
        add(_symmetry);

        // Add permutation options
        _permutation.add(true,  "full" );
        _permutation.add(false, "none");
        // Add symmetry options
        _symmetry.add(true,  "true" );
        _symmetry.add(false, "false");
    }
Ejemplo n.º 2
0
 /// Return how to implement distinct except 0
 int distinct_except_0(void) const { return _distinct_except_0.value(); }
Ejemplo n.º 3
0
 /// Return how to implement same or 0
 int same_or_0(void) const { return _same_or_0.value(); }
Ejemplo n.º 4
0
 /// Return how to implement not all equals
 int not_all_equal(void) const { return _not_all_equal.value(); }
Ejemplo n.º 5
0
 /// Return how to implement distinct except 0
 int no_monochrome_rectangle(void) const { 
   return _no_monochrome_rectangle.value(); 
 }
Ejemplo n.º 6
0
 /// Whether to use permutation constraints. Only active if d=4
 bool permutation(void) const {
     return d() == 4 && _permutation.value();
 }