Codensity monads are ubiquitous, as are various different notions of compactness and finiteness.
Two such examples of "compact" spaces are compact Hausdorff Spaces and Linearly Compact
Vector Spaces. Compact Hausdorff Spaces are the algebras of the codensity monad induced
by the inclusion of finite sets in the category of sets. Similarly linearly compact vector spaces
are the algebras of the codensity monad induced by the inclusion of finite dimensional vector
spaces in the category of vector spaces. So in these two examples the notions of finiteness,
compactness and codensity are intertwined. In this thesis we generalise these results. To do
this we generalise the notion of ultrafilter, and follow the intuition of the compact Hausdorff
case. We give definitions of general notions of "finiteness" and "compactness" and show that
the algebras for the codensity monad induced by the "finite" objects are exactly the "compact"