Better handling of generics

Made the generics for the numerical analysis package much easier to work
with. Also made Vector2f and Vector3f subclasses of NumState.