HOG2
envutil
TSInstances.h
Go to the documentation of this file.
1
//
2
// TSInstances.h
3
// hog2 glut
4
//
5
6
#ifndef TSInstances_h
7
#define TSInstances_h
8
9
#include "
TopSpin.h
"
10
#include <random>
11
#include <algorithm>
12
13
namespace
TS
{
14
15
template
<
int
N>
16
void
GetTSInstance
(
TopSpinState<N>
&s,
int
which)
17
{
18
std::vector<int> elts;
19
std::mt19937 mt(which);
20
for
(
int
x = 0; x < N; x++)
21
elts.push_back(x);
22
std::shuffle(elts.begin(), elts.end(), mt);
23
for
(
int
x = 0; x < N; x++)
24
s.
puzzle
[x] = elts[x];
25
}
26
}
27
#endif
/* TSInstances_h */
TS::GetTSInstance
void GetTSInstance(TopSpinState< N > &s, int which)
Definition:
TSInstances.h:16
TS
Definition:
TSInstances.h:13
TopSpinState
Definition:
TopSpin.h:24
TopSpinState::puzzle
int puzzle[N]
Definition:
TopSpin.h:41
TopSpin.h
Generated by
1.8.17