UPDATED: Metric functions now take state vectors as inputs