Added Matrix.generateDDMatrix and its tests