checkSquare for primitive matrices
tidying
checkRange for vectors
more length/range checking
more range checking
yet more range checking
more range checks
better subvector for UnmodifiableVector
better subVector for SingleElementVector
tidy range checking
more range checking
refactoring