final int [] incompatiblePairs = new int[ndGraph.getStateNumber()*(ndGraph.getStateNumber()+1)/2];for(int i=0;i<incompatiblePairs.length;++i) incompatiblePairs[i]=GDLearnerGraph.PAIR_OK;
final int pairsNumber = ndGraph.findIncompatiblePairs(incompatiblePairs,ThreadNumber);
LSolver solver = ndGraph.buildMatrix_internal(incompatiblePairs, pairsNumber, ThreadNumber,ddrh);
solver.solve(ThreadNumber);
solver.freeAllButResult();// deallocate memory before creating a large array.
coregraph.pairsAndScores.clear();
// now fill in the scores in the array.
for(int i=0;i<incompatiblePairs.length;++i)
{
int index = incompatiblePairs[i];