35 C2NF(L2Matching, index){
57 if(cj == k && ck == j)
60 else if(cj == j && ck == k){
Interface for the fast searchable sorting network CAutocomplete.
#define odd(n)
Oddness test.
bool EvenSorts()
Does it sort if there are an odd number of inputs and we fix the value on the last channel?
Second normal form searchable sorting network.
bool StillSorts(const size_t)
Does it still sort when a bit is changed?
void Initialize()
Initialize the sorting test.
void SetToS()
Set top of stack.
bool Sorts()
Does it sort?
void initLastLevel()
Initialize the last level of the comparator network.
CAutocomplete(CMatching &, const size_t)
Constructor.
virtual void Initialize()
Get first code word.
size_t m_nComparator[MAXDEPTH][MAXINPUTS]
Comparator array.
static size_t m_nWidth
Comparator network width.
static size_t m_nDepth
Comparator network depth.
size_t FlipInput(size_t, const size_t, const size_t)
Recompute network values when a bit is changed.
size_t m_nZeros
Number of zeros in the input.
void InitValues(const size_t, const size_t)
Initialize the network values to the all zero input.
size_t m_nValue[MAXDEPTH][MAXINPUTS]
Values at each level when sorting.
CBinaryGrayCode * m_pGrayCode
Gray code generator.