merged vector.hpp changes back from SparseVOctree branch