Matrix implementation as wrapped vector. Wrapping is so even rows are read  from left to right and odd rows the other way around