Added getDensity method

Signed-off-by: Dan Weinand <daniel.weinand@pomona.edu>