stan-dev/stan

deprecate int_step

開放

#2,433 建立於 2017年11月9日

 (5 則留言) (0 個反應) (0 位負責人)C++ (387 個分叉)batch import
bugdocumentationgood first issue

倉庫指標

星標
 (2,761 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Summary:

int_step(x) and step(x) return different values for 0.

The version of step(x) matches the BUGS definition and the standard definition of the Heaviside step function. Therefore, it should not be changed.

Changing int_step()'s behavior would be confusing, so instead it should be deprecated and replaced with a suggestion to replace existing uses of int_step(n) with the boolean expression (n >= 0), which evaluates to 1 if n >= 0 and 0 otherwise.

Current Version:

v2.17.0

貢獻者指南