Bug fix adjacent pairs routine.
Use doubles for vector length but int for vector contents.