def linear_annuity_mapping_func(underlying, alpha0, alpha1):
    """linear_annuity_mapping_func
    calculate linear annuity mapping function.
    Annuity mapping function is model of $P(t, T) / A(t)$
    so that it's value is positive.
    linear annuity mapping function calculates following formula:

    .. math::
        \\alpha(S) := S \\alpha_{0} + \\alpha_{1}.

    where
    :math:`S` is underlying,
    :math:`\\alpha_{0}` is alpha0,
    :math:`\\alpha_{1}` is alpha1.

    :param float underlying:
    :param float alpha0:
    :param float alpha1:
    :return: value of linear annuity mapping function.
    :rtype: float.
    """
    assert(underlying * alpha0 + alpha1 > 0)
    return underlying * alpha0 + alpha1