Added vector version of Fortran implementation.