SenK
SenK is a C++ library for high-performance linear solvers.
senk::helper Namespace Reference

Contains supplemental functions. More...

Functions

template<typename T >
void Swap (T *a, T *b)
 Swap two variables. More...
 
template<typename T >
void QuickSort (T *key, int left, int right)
 Sort an array by the quick sort. More...
 
template<typename T , typename T2 >
void QuickSort (T *key, T2 *sub, int left, int right)
 Sort arrays by the quick sort. More...
 
template<typename T , typename T2 , typename T3 >
void QuickSort (T *key, T2 *sub, T3 *sub2, int left, int right)
 Sort arrays by the quick sort. More...
 
template<typename T >
void QuickSortDesc (T *key, int left, int right)
 Sort an array in descending order by the quick sort. More...
 
template<typename T , typename T2 >
void QuickSortDesc (T *key, T2 *sub, int left, int right)
 Sort arrays in descending order by the quick sort. More...
 
template<typename T , typename T2 , typename T3 >
void QuickSortDesc (T *key, T2 *sub, T3 *sub2, int left, int right)
 Sort arrays in descending order by the quick sort. More...
 

Detailed Description

Contains supplemental functions.

Function Documentation

◆ QuickSort() [1/3]

template<typename T >
void senk::helper::QuickSort ( T *  key,
int  left,
int  right 
)

Sort an array by the quick sort.

Template Parameters
TType of the array.
Parameters
keyThe variable.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 36 of file senk_helper.hpp.

◆ QuickSort() [2/3]

template<typename T , typename T2 >
void senk::helper::QuickSort ( T *  key,
T2 *  sub,
int  left,
int  right 
)

Sort arrays by the quick sort.

Template Parameters
TType of the key array.
TType of the dependent array.
Parameters
keyA key array.
subA subordinate array.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 62 of file senk_helper.hpp.

◆ QuickSort() [3/3]

template<typename T , typename T2 , typename T3 >
void senk::helper::QuickSort ( T *  key,
T2 *  sub,
T3 *  sub2,
int  left,
int  right 
)

Sort arrays by the quick sort.

Template Parameters
TType of the key array.
T2Type of the 1st dependent array.
T3Type of the 2nd dependent array.
Parameters
keyA key array.
subA dependent array.
sub2A dependent array.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 91 of file senk_helper.hpp.

◆ QuickSortDesc() [1/3]

template<typename T >
void senk::helper::QuickSortDesc ( T *  key,
int  left,
int  right 
)

Sort an array in descending order by the quick sort.

Template Parameters
TType of the array.
Parameters
keyThe variable.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 117 of file senk_helper.hpp.

◆ QuickSortDesc() [2/3]

template<typename T , typename T2 >
void senk::helper::QuickSortDesc ( T *  key,
T2 *  sub,
int  left,
int  right 
)

Sort arrays in descending order by the quick sort.

Template Parameters
TType of the key array.
TType of the dependent array.
Parameters
keyA key array.
subA subordinate array.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 143 of file senk_helper.hpp.

◆ QuickSortDesc() [3/3]

template<typename T , typename T2 , typename T3 >
void senk::helper::QuickSortDesc ( T *  key,
T2 *  sub,
T3 *  sub2,
int  left,
int  right 
)

Sort arrays in descending order by the quick sort.

Template Parameters
TType of the key array.
T2Type of the 1st dependent array.
T3Type of the 2nd dependent array.
Parameters
keyA key array.
subA dependent array.
sub2A dependent array.
leftStarting position of the range to be sorted.
rightEnd position of the range to be sorted.

Definition at line 172 of file senk_helper.hpp.

◆ Swap()

template<typename T >
void senk::helper::Swap ( T *  a,
T *  b 
)

Swap two variables.

Template Parameters
TType of the variables.
Parameters
aThe variable.
bThe variable.

Definition at line 22 of file senk_helper.hpp.