equals function for comparing two vecs.