This one also. 

    val weightMatrix = new Array[Array[Double]](C)