1 |
68b59ec3
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2 |
|
|
// Copyright 2023 Leszek Koltunski //
|
3 |
|
|
// //
|
4 |
|
|
// This file is part of Magic Cube. //
|
5 |
|
|
// //
|
6 |
|
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7 |
|
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9 |
|
|
|
10 |
|
|
package org.distorted.objectlib.tablebases;
|
11 |
|
|
|
12 |
|
|
import org.distorted.library.type.Static3D;
|
13 |
feceac2f
|
Leszek Koltunski
|
import org.distorted.objectlib.R;
|
14 |
68b59ec3
|
Leszek Koltunski
|
import org.distorted.objectlib.helpers.OperatingSystemInterface;
|
15 |
|
|
|
16 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
17 |
|
|
|
18 |
45dc5cd7
|
Leszek Koltunski
|
public class TBCuboid323 extends TablebasesPruning
|
19 |
68b59ec3
|
Leszek Koltunski
|
{
|
20 |
6ab0bce9
|
Leszek Koltunski
|
private static final int[][] CORNER_MAP = new int[][]
|
21 |
|
|
{
|
22 |
|
|
{0,4,7,1,2,3,5,6},
|
23 |
|
|
{2,0,1,6,3,4,7,5},
|
24 |
|
|
{7,1,0,4,5,6,2,3},
|
25 |
|
|
{1,6,2,0,7,5,3,4},
|
26 |
|
|
{4,3,5,7,0,2,6,1},
|
27 |
|
|
{3,2,6,5,4,0,1,7},
|
28 |
|
|
{5,7,4,3,6,1,0,2},
|
29 |
|
|
{6,5,3,2,1,7,4,0}
|
30 |
|
|
};
|
31 |
|
|
private static final int[][] EDGE_MAP = new int[][]
|
32 |
|
|
{
|
33 |
|
|
{0,3,5,1,4,7,2,6},
|
34 |
|
|
{3,0,1,5,2,6,4,7},
|
35 |
|
|
{5,1,0,3,7,4,6,2},
|
36 |
|
|
{1,5,3,0,6,2,7,4},
|
37 |
|
|
{2,4,7,6,0,1,3,5},
|
38 |
|
|
{7,6,2,4,1,0,5,3},
|
39 |
|
|
{4,2,6,7,3,5,0,1},
|
40 |
|
|
{6,7,4,2,5,3,1,0}
|
41 |
|
|
};
|
42 |
|
|
|
43 |
5f8356d7
|
Leszek Koltunski
|
private static final int[][] CORNER_MAP_INVERTED = new int[8][8];
|
44 |
|
|
private static final int[][] EDGE_MAP_INVERTED = new int[8][8];
|
45 |
|
|
|
46 |
|
|
static
|
47 |
|
|
{
|
48 |
|
|
for(int i=0; i<8; i++)
|
49 |
|
|
for(int j=0; j<8; j++)
|
50 |
|
|
{
|
51 |
|
|
CORNER_MAP_INVERTED[i][j] = findIndex(CORNER_MAP[i],j);
|
52 |
|
|
EDGE_MAP_INVERTED[i][j] = findIndex(EDGE_MAP[i],j);
|
53 |
|
|
}
|
54 |
6777e712
|
leszek
|
}
|
55 |
5f8356d7
|
Leszek Koltunski
|
|
56 |
d3fa1eed
|
Leszek Koltunski
|
private int[][] mAngles;
|
57 |
|
|
private boolean mUpsideDown;
|
58 |
efc71331
|
Leszek Koltunski
|
private int[] mCornerPerm, mEdgePerm;
|
59 |
d3fa1eed
|
Leszek Koltunski
|
|
60 |
6beb2998
|
Leszek Koltunski
|
private static final int[] mCPerm = new int[8];
|
61 |
|
|
private static final int[] mE7Perm = new int[7];
|
62 |
|
|
private static final int[] mE8Perm = new int[8];
|
63 |
|
|
|
64 |
6ab0bce9
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
65 |
5b9e0ba4
|
Leszek Koltunski
|
// remove perm[1] which is always equal to 1.
|
66 |
6ab0bce9
|
Leszek Koltunski
|
|
67 |
08451d7f
|
Leszek Koltunski
|
public static int[] edgePermTo7(int[] perm)
|
68 |
6ab0bce9
|
Leszek Koltunski
|
{
|
69 |
|
|
int[] ret = new int[7];
|
70 |
|
|
|
71 |
5b9e0ba4
|
Leszek Koltunski
|
ret[0] = perm[0]; if( ret[0]>1 ) ret[0]--;
|
72 |
|
|
ret[1] = perm[2]; if( ret[1]>1 ) ret[1]--;
|
73 |
|
|
ret[2] = perm[3]; if( ret[2]>1 ) ret[2]--;
|
74 |
|
|
ret[3] = perm[4]; if( ret[3]>1 ) ret[3]--;
|
75 |
|
|
ret[4] = perm[5]; if( ret[4]>1 ) ret[4]--;
|
76 |
|
|
ret[5] = perm[6]; if( ret[5]>1 ) ret[5]--;
|
77 |
|
|
ret[6] = perm[7]; if( ret[6]>1 ) ret[6]--;
|
78 |
6ab0bce9
|
Leszek Koltunski
|
|
79 |
|
|
return ret;
|
80 |
|
|
}
|
81 |
|
|
|
82 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
83 |
c64217f7
|
Leszek Koltunski
|
// reverse the above
|
84 |
6ab0bce9
|
Leszek Koltunski
|
|
85 |
6beb2998
|
Leszek Koltunski
|
private static void edgePermTo8()
|
86 |
6ab0bce9
|
Leszek Koltunski
|
{
|
87 |
6beb2998
|
Leszek Koltunski
|
mE8Perm[0] = mE7Perm[0]; if( mE8Perm[0]>=1 ) mE8Perm[0]++;
|
88 |
|
|
mE8Perm[1] = 1;
|
89 |
|
|
mE8Perm[2] = mE7Perm[1]; if( mE8Perm[2]>=1 ) mE8Perm[2]++;
|
90 |
|
|
mE8Perm[3] = mE7Perm[2]; if( mE8Perm[3]>=1 ) mE8Perm[3]++;
|
91 |
|
|
mE8Perm[4] = mE7Perm[3]; if( mE8Perm[4]>=1 ) mE8Perm[4]++;
|
92 |
|
|
mE8Perm[5] = mE7Perm[4]; if( mE8Perm[5]>=1 ) mE8Perm[5]++;
|
93 |
|
|
mE8Perm[6] = mE7Perm[5]; if( mE8Perm[6]>=1 ) mE8Perm[6]++;
|
94 |
|
|
mE8Perm[7] = mE7Perm[6]; if( mE8Perm[7]>=1 ) mE8Perm[7]++;
|
95 |
6ab0bce9
|
Leszek Koltunski
|
}
|
96 |
|
|
|
97 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
98 |
|
|
|
99 |
68b59ec3
|
Leszek Koltunski
|
public TBCuboid323()
|
100 |
|
|
{
|
101 |
|
|
super();
|
102 |
efc71331
|
Leszek Koltunski
|
|
103 |
|
|
allocate();
|
104 |
68b59ec3
|
Leszek Koltunski
|
}
|
105 |
|
|
|
106 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
107 |
|
|
|
108 |
|
|
public TBCuboid323(OperatingSystemInterface os)
|
109 |
|
|
{
|
110 |
e1e92738
|
Leszek Koltunski
|
super(os,new int[] {R.raw.cu_323_pruning7 ,R.raw.cu_323_pruning8 },
|
111 |
|
|
new int[] {R.raw.cu_323_pruning17,R.raw.cu_323_pruning18} );
|
112 |
efc71331
|
Leszek Koltunski
|
|
113 |
|
|
allocate();
|
114 |
|
|
}
|
115 |
|
|
|
116 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
117 |
|
|
|
118 |
|
|
private void allocate()
|
119 |
|
|
{
|
120 |
|
|
mCornerPerm = new int[8];
|
121 |
|
|
mEdgePerm = new int[7];
|
122 |
68b59ec3
|
Leszek Koltunski
|
}
|
123 |
|
|
|
124 |
d3fa1eed
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
125 |
|
|
|
126 |
|
|
public void initialize()
|
127 |
|
|
{
|
128 |
|
|
mUpsideDown = false;
|
129 |
|
|
}
|
130 |
|
|
|
131 |
68b59ec3
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
132 |
|
|
|
133 |
|
|
int[][] getBasicAngles()
|
134 |
|
|
{
|
135 |
d3fa1eed
|
Leszek Koltunski
|
if( mAngles==null )
|
136 |
|
|
{
|
137 |
|
|
int[] tmp2 = {2,2,2};
|
138 |
|
|
int[] tmp4 = {4,4};
|
139 |
|
|
mAngles = new int[][] { tmp2,tmp4,tmp2 };
|
140 |
|
|
}
|
141 |
|
|
|
142 |
|
|
return mAngles;
|
143 |
68b59ec3
|
Leszek Koltunski
|
}
|
144 |
|
|
|
145 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
146 |
|
|
|
147 |
|
|
Static3D[] getRotationAxis()
|
148 |
|
|
{
|
149 |
|
|
return new Static3D[]
|
150 |
|
|
{
|
151 |
|
|
new Static3D(1,0,0),
|
152 |
|
|
new Static3D(0,1,0),
|
153 |
|
|
new Static3D(0,0,1)
|
154 |
|
|
};
|
155 |
|
|
}
|
156 |
|
|
|
157 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
158 |
|
|
|
159 |
|
|
float[][] getPosition()
|
160 |
|
|
{
|
161 |
|
|
return new float[][]
|
162 |
|
|
{
|
163 |
|
|
{ -1.0f, -0.5f, -1.0f },
|
164 |
|
|
{ -1.0f, -0.5f, 1.0f },
|
165 |
|
|
{ -1.0f, 0.5f, -1.0f },
|
166 |
|
|
{ -1.0f, 0.5f, 1.0f },
|
167 |
|
|
{ 1.0f, -0.5f, -1.0f },
|
168 |
|
|
{ 1.0f, -0.5f, 1.0f },
|
169 |
|
|
{ 1.0f, 0.5f, -1.0f },
|
170 |
|
|
{ 1.0f, 0.5f, 1.0f },
|
171 |
|
|
|
172 |
|
|
{ 0.0f, -0.5f, -1.0f },
|
173 |
|
|
{ 0.0f, -0.5f, 1.0f },
|
174 |
|
|
{ 0.0f, 0.5f, -1.0f },
|
175 |
|
|
{ 0.0f, 0.5f, 1.0f },
|
176 |
|
|
{ -1.0f, -0.5f, 0.0f },
|
177 |
|
|
{ -1.0f, 0.5f, 0.0f },
|
178 |
|
|
{ 1.0f, -0.5f, 0.0f },
|
179 |
|
|
{ 1.0f, 0.5f, 0.0f },
|
180 |
|
|
|
181 |
|
|
{ 0.0f, 0.5f, 0.0f },
|
182 |
|
|
{ 0.0f, -0.5f, 0.0f },
|
183 |
|
|
};
|
184 |
|
|
}
|
185 |
|
|
|
186 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
187 |
|
|
|
188 |
|
|
float[][] getCuts()
|
189 |
|
|
{
|
190 |
|
|
return new float[][] { {-0.5f,0.5f}, {0.0f}, {-0.5f,0.5f} };
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
194 |
|
|
|
195 |
|
|
boolean[][] getRotatable()
|
196 |
|
|
{
|
197 |
5b9e0ba4
|
Leszek Koltunski
|
return new boolean[][] { {true,false,true},{false,true},{true,true,false} };
|
198 |
68b59ec3
|
Leszek Koltunski
|
}
|
199 |
|
|
|
200 |
3feba94e
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
201 |
|
|
// we map the move (axis=2, middle layer) to move (axis=2,both middle and back layers).
|
202 |
|
|
// this way we can imitate move of the front layer (which we do not want to move because
|
203 |
|
|
// the edge1 piece has to always stay in its place)
|
204 |
|
|
|
205 |
|
|
@Override
|
206 |
|
|
int computeBitLayer(int ax, int layer)
|
207 |
|
|
{
|
208 |
|
|
if( ax!=2 ) return (1<<layer);
|
209 |
|
|
|
210 |
|
|
switch(layer)
|
211 |
|
|
{
|
212 |
|
|
case 0 : return 1;
|
213 |
|
|
case 1 : return 3;
|
214 |
|
|
default: return 4;
|
215 |
|
|
}
|
216 |
|
|
}
|
217 |
|
|
|
218 |
31d0a3fc
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
219 |
|
|
// this is too slow to be used for scrambling - scramble the 3x3x2 the old way.
|
220 |
|
|
|
221 |
|
|
@Override
|
222 |
|
|
public boolean useForScrambling()
|
223 |
|
|
{
|
224 |
|
|
return false;
|
225 |
|
|
}
|
226 |
|
|
|
227 |
68b59ec3
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
228 |
|
|
// specifically for the tablebase
|
229 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
230 |
d3fa1eed
|
Leszek Koltunski
|
// now turn the (ax=2, middle and back layer) artificial moves [ introduced by computeBitLayer)
|
231 |
|
|
// back to the natural (ax=2, front layer). Turn the whole thing upside down each time we do it.
|
232 |
|
|
|
233 |
|
|
@Override
|
234 |
|
|
int[] newMove(int axis, int layer, int angle)
|
235 |
|
|
{
|
236 |
|
|
if( axis==2 )
|
237 |
|
|
{
|
238 |
|
|
if( layer==1 )
|
239 |
|
|
{
|
240 |
|
|
mUpsideDown = !mUpsideDown;
|
241 |
|
|
return new int[] { axis, 4, angle };
|
242 |
|
|
}
|
243 |
|
|
}
|
244 |
|
|
else if( mUpsideDown )
|
245 |
|
|
{
|
246 |
|
|
if( axis==0 ) layer=2-layer;
|
247 |
|
|
if( axis==1 ) { layer=1-layer; angle = 4-angle; }
|
248 |
|
|
}
|
249 |
|
|
|
250 |
|
|
int maxAngle = mAngles[axis][layer];
|
251 |
|
|
angle = maxAngle-angle;
|
252 |
|
|
if( angle> 0.5f*maxAngle ) angle -= maxAngle;
|
253 |
|
|
return new int[] { axis, (1<<layer), angle };
|
254 |
|
|
}
|
255 |
|
|
|
256 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
257 |
68b59ec3
|
Leszek Koltunski
|
// 8!*8!/4 --> https://www.jaapsch.net/puzzles/domino.htm
|
258 |
|
|
|
259 |
|
|
int getSize()
|
260 |
|
|
{
|
261 |
|
|
return 406425600;
|
262 |
|
|
}
|
263 |
|
|
|
264 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
265 |
|
|
|
266 |
|
|
int getMinScramble()
|
267 |
|
|
{
|
268 |
|
|
return 13;
|
269 |
|
|
}
|
270 |
|
|
|
271 |
45dc5cd7
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
272 |
|
|
|
273 |
|
|
int[] getMidPruningLevels()
|
274 |
|
|
{
|
275 |
5b9e0ba4
|
Leszek Koltunski
|
return new int[] {7,8};
|
276 |
45dc5cd7
|
Leszek Koltunski
|
}
|
277 |
|
|
|
278 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
279 |
|
|
|
280 |
|
|
int[] getHighPruningLevels()
|
281 |
|
|
{
|
282 |
3feba94e
|
Leszek Koltunski
|
return new int[] {17,18};
|
283 |
45dc5cd7
|
Leszek Koltunski
|
}
|
284 |
|
|
|
285 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
286 |
|
|
|
287 |
|
|
int getGodsNumber()
|
288 |
|
|
{
|
289 |
|
|
return 18;
|
290 |
|
|
}
|
291 |
|
|
|
292 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
293 |
|
|
|
294 |
|
|
boolean moveCanProceed(int lastA, int lastR, int currA, int currR)
|
295 |
|
|
{
|
296 |
|
|
return (lastA!=currA) || (lastR!=currR);
|
297 |
|
|
}
|
298 |
|
|
|
299 |
6ab0bce9
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
300 |
|
|
|
301 |
398f2870
|
Leszek Koltunski
|
private static int findIndex(int[] table, int value)
|
302 |
6ab0bce9
|
Leszek Koltunski
|
{
|
303 |
|
|
for(int i=0; i<8; i++)
|
304 |
|
|
if( table[i]==value ) return i;
|
305 |
|
|
|
306 |
|
|
return -1;
|
307 |
|
|
}
|
308 |
|
|
|
309 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
310 |
|
|
|
311 |
5b9e0ba4
|
Leszek Koltunski
|
private int centersInverted(int[] quats)
|
312 |
6ab0bce9
|
Leszek Koltunski
|
{
|
313 |
5b9e0ba4
|
Leszek Koltunski
|
int q = quats[16];
|
314 |
|
|
return (q==0 || q==2 || q==3 || q==4) ? 0 : 1;
|
315 |
6ab0bce9
|
Leszek Koltunski
|
}
|
316 |
|
|
|
317 |
398f2870
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
318 |
|
|
|
319 |
5b9e0ba4
|
Leszek Koltunski
|
public static int[] quatsFromPermutations(int[] corner, int[] edge8, int centers)
|
320 |
398f2870
|
Leszek Koltunski
|
{
|
321 |
|
|
int[] quats = new int[18];
|
322 |
|
|
|
323 |
|
|
for(int i=0; i<8; i++)
|
324 |
|
|
{
|
325 |
6beb2998
|
Leszek Koltunski
|
quats[i] = CORNER_MAP[i][corner[i]];
|
326 |
|
|
quats[i+8] = EDGE_MAP[i][edge8[i]];
|
327 |
398f2870
|
Leszek Koltunski
|
}
|
328 |
|
|
|
329 |
6beb2998
|
Leszek Koltunski
|
int c = centers==0 ? 0:5;
|
330 |
|
|
quats[16]=c;
|
331 |
|
|
quats[17]=c;
|
332 |
5b9e0ba4
|
Leszek Koltunski
|
|
333 |
398f2870
|
Leszek Koltunski
|
return quats;
|
334 |
|
|
}
|
335 |
|
|
|
336 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
337 |
|
|
|
338 |
cf45025f
|
Leszek Koltunski
|
private static void cornerFromQuats(int[] corner_perm, int[] quats)
|
339 |
398f2870
|
Leszek Koltunski
|
{
|
340 |
5f8356d7
|
Leszek Koltunski
|
for(int i=0; i<8; i++) corner_perm[i] = CORNER_MAP_INVERTED[i][quats[i]];
|
341 |
398f2870
|
Leszek Koltunski
|
}
|
342 |
|
|
|
343 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
344 |
|
|
|
345 |
cf45025f
|
Leszek Koltunski
|
private static void edgeFromQuats(int[] edge_perm, int[] quats)
|
346 |
398f2870
|
Leszek Koltunski
|
{
|
347 |
cf45025f
|
Leszek Koltunski
|
edge_perm[0] = EDGE_MAP_INVERTED[0][quats[ 8]]; if(edge_perm[0]>1) edge_perm[0]--;
|
348 |
|
|
edge_perm[1] = EDGE_MAP_INVERTED[2][quats[10]]; if(edge_perm[1]>1) edge_perm[1]--;
|
349 |
|
|
edge_perm[2] = EDGE_MAP_INVERTED[3][quats[11]]; if(edge_perm[2]>1) edge_perm[2]--;
|
350 |
|
|
edge_perm[3] = EDGE_MAP_INVERTED[4][quats[12]]; if(edge_perm[3]>1) edge_perm[3]--;
|
351 |
|
|
edge_perm[4] = EDGE_MAP_INVERTED[5][quats[13]]; if(edge_perm[4]>1) edge_perm[4]--;
|
352 |
|
|
edge_perm[5] = EDGE_MAP_INVERTED[6][quats[14]]; if(edge_perm[5]>1) edge_perm[5]--;
|
353 |
|
|
edge_perm[6] = EDGE_MAP_INVERTED[7][quats[15]]; if(edge_perm[6]>1) edge_perm[6]--;
|
354 |
398f2870
|
Leszek Koltunski
|
}
|
355 |
|
|
|
356 |
68b59ec3
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
357 |
|
|
|
358 |
|
|
public int[] getQuats(int index)
|
359 |
|
|
{
|
360 |
5b9e0ba4
|
Leszek Koltunski
|
int cornerPermNum = (index%40320);
|
361 |
45dc5cd7
|
Leszek Koltunski
|
index /= 40320;
|
362 |
5b9e0ba4
|
Leszek Koltunski
|
int centers = (index%2);
|
363 |
6ab0bce9
|
Leszek Koltunski
|
int edgePermNum = index/2;
|
364 |
|
|
|
365 |
6beb2998
|
Leszek Koltunski
|
TablebaseHelpers.getPermutationFromNum(mCPerm,8,cornerPermNum);
|
366 |
|
|
TablebaseHelpers.getPermutationFromNum(mE7Perm,7,edgePermNum);
|
367 |
|
|
edgePermTo8();
|
368 |
6ab0bce9
|
Leszek Koltunski
|
|
369 |
6beb2998
|
Leszek Koltunski
|
return quatsFromPermutations(mCPerm,mE8Perm,centers);
|
370 |
68b59ec3
|
Leszek Koltunski
|
}
|
371 |
|
|
|
372 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
373 |
|
|
|
374 |
|
|
public int getIndex(int[] quats)
|
375 |
|
|
{
|
376 |
cf45025f
|
Leszek Koltunski
|
int centers = centersInverted(quats);
|
377 |
|
|
|
378 |
efc71331
|
Leszek Koltunski
|
cornerFromQuats(mCornerPerm,quats);
|
379 |
|
|
int corner_perm_num = TablebaseHelpers.computePermutationNum(mCornerPerm);
|
380 |
cf45025f
|
Leszek Koltunski
|
|
381 |
efc71331
|
Leszek Koltunski
|
edgeFromQuats(mEdgePerm,quats);
|
382 |
|
|
int edge_perm_num = TablebaseHelpers.computePermutationNum(mEdgePerm);
|
383 |
6ab0bce9
|
Leszek Koltunski
|
|
384 |
5b9e0ba4
|
Leszek Koltunski
|
return corner_perm_num + 40320*( centers + 2*edge_perm_num);
|
385 |
68b59ec3
|
Leszek Koltunski
|
}
|
386 |
|
|
}
|