在数学中,以Kenneth E. Iverson命名的“艾佛森括号”,是一种用方括号记号,如果方括号内的条件满足则为1,不满足则为0. 更确切地讲,
此处 P 是一个可真可假的命题。该记号由Kenneth E. Iverson在他的编程语言APL中引进,而特别使用方括号则是由高德纳倡导的,目的是避免含括号的表达式中的歧义。
英语百科
Iverson bracket 艾佛森括号
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that denotes a number that is 1 if the condition in square brackets is satisfied, and 0 otherwise. More exactly,
where P is a statement that can be true or false. This notation was introduced by Kenneth E. Iverson in his programming language APL, while the specific restriction to square brackets was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.