deepCopy

public static Array<Array<double>> deepCopy(Array<Array<double>> copyMatrix)

This creates a copy of a 2D Array of doubles that references entirely new memory locations from the original 2D Array of doubles, so no issues with mutability.

Return

returns a deep copy of the input Array

Parameters

copyMatrix

the 2D Array of doubles to copy