62 std::string filename =
66 "n" + std::to_string(
m_nCount) +
".txt";
Interface for the searchable second normal form sorting network C2NF.
#define odd(n)
Oddness test.
void Save()
Save comparator network.
C2NF(CMatching &, const size_t)
Constructor.
void Backtrack()
Backtracking search.
size_t m_nLevel2Index
Index of current level 2 candidate.
void Save(const std::string &)
Save to file.
Searchable sorting network.
size_t m_nCount
Number of comparator networks found that sort.
void InitMatchingRepresentations(size_t)
Initialize the two different matching representations.
int m_nStack[MAXDEPTH]
Stack to remove recursion from search.
CMatching m_cMatching[MAXDEPTH]
Matchings that make up comparator network in a form that makes searching faster.
void SynchMatchingRepresentations(size_t)
Synchronize the two different matching representations.
void FirstComparatorNetwork(size_t)
Set to first comparator network.
void Search()
Do the actual search.
static size_t m_nWidth
Comparator network width.
static size_t m_nDepth
Comparator network depth.