added copy for DenseVec and DenseMat and DenseMat transpose