Project

General

Profile

« Previous | Next » 

Revision f9aa2b72

Added by Leszek Koltunski 10 months ago

bugfixes

View differences:

src/main/java/org/distorted/objectlib/algsolvers/PhaseSolutionFinder.java
15 15

  
16 16
class PhaseSolutionFinder
17 17
{
18
  private final static int MAX_MEMORY    = 100;//6*1024*1024; // 6MB max for the MitM table
19
  private final static double MAX_SEARCH = 100;//3000000.0;   // max 3mln positions back-searched
18
  private final static int MAX_MEMORY    = 1024;//6*1024*1024; // 6MB max for the MitM table
19
  private final static double MAX_SEARCH = 300;//3000000.0;   // max 3mln positions back-searched
20 20

  
21 21
  private final MitmTable mTable;
22 22
  private final SolvedObject mObject;
src/main/java/org/distorted/objectlib/algsolvers/SolvedObject.java
53 53
    mCubits = new SolvedObjectCubit(mOrigPos,mAxis,cuts,mQuats,mQuatMult,mMoveTable,quatF,quatB);
54 54
    }
55 55

  
56
///////////////////////////////////////////////////////////////////////////////////////////////////
57

  
58
  public int[][] getMoveTable()
59
    {
60
    return mMoveTable;
61
    }
62

  
56 63
///////////////////////////////////////////////////////////////////////////////////////////////////
57 64

  
58 65
  Static4D[] getQuats()           { return mQuats; }
......
207 214
        if( mRotateable[a][l] )
208 215
          {
209 216
          int basicAngle = mBasicAngles[a][l];
210
          int rowBitmap = (1<<l);
211

  
212
          for(int b=1; b<basicAngle; b++)
213
            {
214
            ret[index] = new int[] { a,rowBitmap,b };
215
            index++;
216
            }
217
          for(int b=1; b<basicAngle; b++) ret[index++] = new int[] { a,l,b };
217 218
          }
218 219
      }
219 220

  
src/main/java/org/distorted/objectlib/algsolvers/SolvedObjectCubit.java
71 71

  
72 72
///////////////////////////////////////////////////////////////////////////////////////////////////
73 73

  
74
  void rotateAllCubits(int axisIndex, int rowBitmap, int quatIndex)
74
  void rotateAllCubits(int axisIndex, int row, int quatIndex)
75 75
    {
76
    int rowBitmap = (1<<row);
77

  
76 78
    for(int c=0; c<mNumCubits; c++)
77 79
      {
78 80
      int q = mRotQuats[c];
......
89 91
    int quatIndex = mQuatForwardTable[moveIndex];
90 92
    int[] move    = mMoveTable[moveIndex];
91 93
    int axisIndex = move[0];
92
    int rowBitmap = move[1];
94
    int row       = move[1];
93 95

  
94
    rotateAllCubits(axisIndex,rowBitmap,quatIndex);
96
    rotateAllCubits(axisIndex,row,quatIndex);
95 97
    }
96 98

  
97 99
///////////////////////////////////////////////////////////////////////////////////////////////////
......
101 103
    int quatIndex = mQuatBackwardTable[moveIndex];
102 104
    int[] move    = mMoveTable[moveIndex];
103 105
    int axisIndex = move[0];
104
    int rowBitmap = move[1];
106
    int row       = move[1];
105 107

  
106
    rotateAllCubits(axisIndex,rowBitmap,quatIndex);
108
    rotateAllCubits(axisIndex,row,quatIndex);
107 109
    }
108 110

  
109 111
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff