  In this paper we describe an algorithm that quickly computes a maximal
a-valued lattice in an F-vector space equipped with a non-degenerate bilinear
form, where a is a fractional ideal in a number field F. We then apply this
construction to give an algorithm to compute an a-maximal lattice in a
quadratic space over any number field F where the prime 2 is unramified. We
also develop the theory of p-neighbors for a-valued quadratic lattices at an
arbitrary prime p of O_F (including when p | 2) and prove its close connection
to the residual geometry of certain quadrics mod p. Finally we give a
well-known application of p-neighboring lattices and exact mass formulas to
compute a complete set of representatives for the classes in a given genus of
(totally definite) quadratic O_F-lattices.
