9 template <
class T> T valAbs(T number) {
23 template <
class T>
void mixTab(T* tab,
const int sizeOfTab,
const int numberOfMix = 1) {
25 for(
int k = numberOfMix-1; k >= 0; k--) {
27 for(
int i = sizeOfTab-1; i >= 0; i--) {
29 swap(&tab[randN(sizeOfTab)], &tab[i],
sizeof(T));
42 template <
class T> T withDelta(
const T value,
const T delta) {
43 return value + randN((
int)delta*2) - delta;
53 template<
class T> T getItemOf(std::queue<T> &queue) {
54 T returnValue = queue.front();
66 template <
class T> T** cpyMatrix(
const T**
const matrix,
const unsigned int sizeOfMatrix) {
67 T** newMatrix =
new T*[sizeOfMatrix];
68 for(
unsigned int i = 0; i < sizeOfMatrix; i++) {
69 newMatrix[i] =
new T[sizeOfMatrix];
70 for(
unsigned int j = 0; j < sizeOfMatrix; j++) {
71 newMatrix[i][j] = matrix[i][j];
83 template <
class T> T max(
const T a,
const T b) {
94 template <
class T> T min(
const T a,
const T b) {