if you're wondering what's the difference between this and transposeArray2D from the "array2d" submodule,
then be my guest, because I am just as puzzled as you.
perhaps I forgot that I made one or the other, resulting in duplication.
however, there are a few implementation differences between the these two functions:
transpose2D works by calling the array map method.
transposeArray2D works by assigning values to the new array's transposed indexes.
similarities between the two functions:
both transpose sparse 2d arrays to full 2d arrays with the sparse entries replaced with undefined.
both use the first element (the first row) to determine the number of columns your 2d array has.
this can mean disastrous cropped results if a sparse 2d array is provided where the first row's
number of elements (i.e. number of columns) is not the greatest out of all the other rows.
transpose a 2d array (matrix).
if you're wondering what's the difference between this and transposeArray2D from the "array2d" submodule, then be my guest, because I am just as puzzled as you. perhaps I forgot that I made one or the other, resulting in duplication.
however, there are a few implementation differences between the these two functions:
map
method.similarities between the two functions:
undefined
.Example