boolean diagonalSet = false;
// Check if we have the capacity in the arrays for this column - in an ugly way,
// but resizing for each element as per Ax.add seems ridiculous.
int expectedMaxSize = pos+colEntriesNumber+1;
if (Ax.elements().length < expectedMaxSize)
{
if (linearWarningsEnabled && config.getDebugMode())
System.out.println("buildMatrix: warning - resizing arrays Ax[thread "+threadNo+"] and Ai[thread "+threadNo+"] from "+Ax.elements().length+" to "+expectedMaxSize);
Ax.ensureCapacity(expectedMaxSize);
Ai.ensureCapacity(expectedMaxSize);