if (A == null)
{
throw new IllegalArgumentException("Matrix argument must be non-null.");
}
int dimension = A.getDimension();
MemoryCoOccurrenceFrequencyMatrix matrix = new MemoryCoOccurrenceFrequencyMatrix(dimension);
initCoOccurrenceFrequencyMatrix(A, matrix);
return matrix;
}