-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathShufleObjects.h
More file actions
57 lines (52 loc) · 2.32 KB
/
ShufleObjects.h
File metadata and controls
57 lines (52 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
///////////////////////////////////////////////////////////
// ShufleObjects.h
// Implementation of the Class ShufleObjects
// Created on: 07-Lie-2013 20:07:32
// Original author: Povilas
///////////////////////////////////////////////////////////
/*! \file ShufleObjects class
\brief A class of static methods for shuffling the DataObjects in ObjectMatrix.
*/
#if !defined(SHUFLEOBJECTS_H)
#define SHUFLEOBJECTS_H
#include "ObjectMatrix.h"
#include "ShufleEnum.h"
class ShufleObjects
{
public:
/*! \fn ShufleObjects();
* \brief Standard constructor
*/
ShufleObjects();
/*! \fn virtual ~ShufleObjects();
* \brief Standard destructor
*/
virtual ~ShufleObjects();
/*! \fn static vector<int> shufleObjectMatrix(ShufleEnum shufleEnum, ObjectMatrix objectMatrix);
* \brief Returns the list of shuffled indexes of the matrix \a objectMatrix DataObjects.
* \param shufleEnum - The shuffle strategy.
* \param objectMatrix - The matrix that DataObjects needs to be shuffled.
* \return shuffledIndexes - The list of shuffled indexes.
*/
static std::vector<unsigned int> shufleObjectMatrix(ShufleEnum shufleEnum, ObjectMatrix matrix);
private:
/*! \fn static vector<int> byBubleSort(ObjectMatrix objectMatrix);
* \brief Returns the list of indexes shuffled by ascending bubble sort.
* \param objectMatrix - The matrix that DataObjects needs to be shuffled.
* \return shuffledIndexes - The list of shuffled indexes.
*/
static std::vector<unsigned int> byBubleSort(ObjectMatrix objectMatrix);
/*! \fn static vector<int> byBubleSortDsc(ObjectMatrix objectMatrix);
* \brief Returns the list of indexes shuffled by descending bubble sort.
* \param objectMatrix - The matrix that DataObjects needs to be shuffled.
* \return shuffledIndexes - The list of shuffled indexes.
*/
static std::vector<unsigned int> byBubleSortDsc(ObjectMatrix objectMatrix);
/*! \fn static vector<int> byRand(ObjectMatrix objectMatrix);
* \brief Returns the list of indexes shuffled randomly.
* \param objectMatrix - The matrix that DataObjects needs to be shuffled.
* \return shuffledIndexes - The list of shuffled indexes.
*/
static std::vector<unsigned int> byRand(ObjectMatrix objectMatrix);
};
#endif // !defined(SHUFLEOBJECTS_H)