log_domain.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:hmm-reps 作者: rug-compling 项目源码 文件源码
def logsum_pair_table_interp(self, diff):
        """
        Return the log1p term from precomputed table by interpolation.
        Cf. Treba

        Minimax log sum approximation might be even faster and more precise, TODO

        :param diff: x-y or y-x
        """

        index = -int(diff)
        w = -diff - index
        val1 = self.logsum_table[index]
        val2 = self.logsum_table[index + 1]

        return val1 + (w * (val2 - val1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号