Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Example: Equidistant Frequency Permutation Arrays More...

Public Member Functions

 EFPA (const EFPAOptions &opt)
 Actual model.
 
virtual void print (std::ostream &os) const
 Print instance and solution.
 
 EFPA (EFPA &s)
 Constructor for cloning s.
 
virtual Spacecopy (void)
 Copy during cloning.
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (const Options &opt)
 Constructor.
 
 ScriptBase (ScriptBase &e)
 Constructor used for cloning.
 
virtual void compare (const Space &home, std::ostream &os) const
 Compare with s.
 

Protected Attributes

int v
 Number of sequences.
 
int q
 Number of symbols.
 
int l
 Number of sets of symbols for a sequence ( $\lambda$)
 
int d
 Hamming distance between any pair of sequences.
 
int n
 Length of sequence ( $q\cdot\lambda$)
 
int nseqpair
 Number of sequence pairs ( $\frac{v(v-1)}{2}$)
 
IntVarArray c
 Variables for sequences.
 
BoolVarArray diff
 Differences between sequences.
 

Related Symbols

(Note that these are not member symbols.)

int main (int argc, char *argv[])
 Main-function.
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *sn, std::ofstream &ofs)
 Choose output stream according to sn.
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Detailed Description

Example: Equidistant Frequency Permutation Arrays

This example solves instances of the equidistant frequency permutation arrays problem.

The model of the problem is mostly taken from "Modelling Equidistant Frequency Permutation Arrays in Constraints", by Ian P. Gent, Paul McKay, Peter Nightingale, and Sophie Huczynska. It implements the non-Boolean model without SAC.

Definition at line 114 of file efpa.cpp.

Constructor & Destructor Documentation

◆ EFPA() [1/2]

EFPA::EFPA ( const EFPAOptions & opt)
inline

Actual model.

Definition at line 127 of file efpa.cpp.

◆ EFPA() [2/2]

EFPA::EFPA ( EFPA & s)
inline

Constructor for cloning s.

Definition at line 288 of file efpa.cpp.

Member Function Documentation

◆ print()

virtual void EFPA::print ( std::ostream & os) const
inlinevirtual

Print instance and solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 278 of file efpa.cpp.

◆ copy()

virtual Space * EFPA::copy ( void )
inlinevirtual

Copy during cloning.

Definition at line 302 of file efpa.cpp.

Friends And Related Symbol Documentation

◆ main()

int main ( int argc,
char * argv[] )
related

Main-function.

Definition at line 311 of file efpa.cpp.

Member Data Documentation

◆ v

int EFPA::v
protected

Number of sequences.

Definition at line 116 of file efpa.cpp.

◆ q

int EFPA::q
protected

Number of symbols.

Definition at line 117 of file efpa.cpp.

◆ l

int EFPA::l
protected

Number of sets of symbols for a sequence ( $\lambda$)

Definition at line 118 of file efpa.cpp.

◆ d

int EFPA::d
protected

Hamming distance between any pair of sequences.

Definition at line 119 of file efpa.cpp.

◆ n

int EFPA::n
protected

Length of sequence ( $q\cdot\lambda$)

Definition at line 120 of file efpa.cpp.

◆ nseqpair

int EFPA::nseqpair
protected

Number of sequence pairs ( $\frac{v(v-1)}{2}$)

Definition at line 121 of file efpa.cpp.

◆ c

IntVarArray EFPA::c
protected

Variables for sequences.

Definition at line 122 of file efpa.cpp.

◆ diff

BoolVarArray EFPA::diff
protected

Differences between sequences.

Definition at line 123 of file efpa.cpp.


The documentation for this class was generated from the following file: