Represent inference methods as classes