Sorting Network Search
Backtracking for Small Sorting Networks
Static Public Member Functions | Static Protected Attributes | List of all members
CSettings Class Reference

The common variables class. More...

#include <Settings.h>

Inheritance diagram for CSettings:
CBinaryGrayCode CComparatorNetwork CLevel2Search CMatching CTernaryGrayCode CSortingNetwork C1NF CSearchable C2NF CAutocomplete CNearsort CNearsort2

Static Public Member Functions

static void SetWidth (const size_t)
 Set width. More...
 
static void SetDepth (const size_t)
 Set depth. More...
 

Static Protected Attributes

static size_t m_nWidth = 9
 Comparator network width. More...
 
static size_t m_nDepth = 6
 Comparator network depth. More...
 

Detailed Description

A singleton class that encapsulates things that are common to different components. Making it a singleton class means that we can avoid passing its member variables around as parameters, which makes the code minisculely faster, and more importantly, makes the code more readable by reducing function clutter.

Definition at line 37 of file Settings.h.

Member Function Documentation

◆ SetDepth()

void CSettings::SetDepth ( const size_t  d)
static

Set the depth.

Parameters
dDepth.

Definition at line 41 of file Settings.cpp.

◆ SetWidth()

void CSettings::SetWidth ( const size_t  w)
static

Set the width.

Parameters
wWidth.

Definition at line 34 of file Settings.cpp.

Member Data Documentation

◆ m_nDepth

size_t CSettings::m_nDepth = 6
staticprotected

Definition at line 40 of file Settings.h.

◆ m_nWidth

size_t CSettings::m_nWidth = 9
staticprotected

Definition at line 39 of file Settings.h.