- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我假设“i”是递增的,而“a”是分配的,但我无法弄清楚或找到答案。此外,它看起来与我认为令人困惑的非标准 itoa
非常相似。
最佳答案
C++ iota
不是首字母缩写词或首字母缩写词。就是“iota”这个词,是the ninth letter of the Greek alphabet这个名字的英文拼写。 : ι。字母的小写版本通常像英文字母 i 一样绘制,但没有点。根据您的字体,衬线可能会略有不同。
The original SGI STL documentation给出了这样的解释:
The name
iota
is taken from the programming language APL.
Ken Iverson已创建 APL (代表“一种编程语言”)。在他 1962 年著作 A Programming Language 的第 1.7 节“特殊 vector ”中,他在第 15 页介绍了 ⍳ (iota) 作为“区间 vector ”:
The interval vector ⍳j(n) is defined as the vector of integers beginning with j.
在他的1979 Turing Award讲座, “Notation as a Tool of Thought” ,他对APL的⍳函数给出了这样的描述:
For example, the integer function denoted by
⍳
produces a vector of the firstn
integers when applied to the argumentn
, …
所以最可能的答案是艾弗森博士想要一个符号来提醒用户“整数”这个词,“间隔”这个词,以及使用字母“i”作为一个典型的整数变量,尤其是对于数组下标。遗憾的是,艾弗森博士于 2004 年去世,比这个问题还早几年,所以我们无法要求他提供更准确的解释。
顺便说一句,Unicode 有两个用于小写 iota 的代码点:一个用于编写希腊语,另一个用于编写 APL。写希腊语的那个是ι
,U+03B9, “GREEK SMALL LETTER IOTA” .写APL的就是⍳
,U+2373, “APL FUNCTIONAL SYMBOL IOTA” .
应评论者的要求,我将在此上下文中进一步解决“iota”的词源。
但让我们假设有更深层次的含义。
根据牛津英语词典,“iota”是“希腊字母Ι,ι的名称,对应罗马字母I,i;希腊字母表中最小的字母”(我想是物理上最小的,不是按字母顺序排列的),也意味着“最小或非常小的粒子或数量”。 OED 最早使用此含义的已知用法来自 Clavis mystica丹尼尔·费特利 (Daniel Featley) 于 1636 年:
Shall we lose, or sleightly pass by, any iota or tittle of the Booke of God?
Clavis mystica 将自己描述为“打开圣经中困难和神秘文本的 key ”,这句话特别指的是马太福音 5:18。 The 1611 edition of the King James Version has this text for Matthew 5:18 :
转录:
For verily I say vnto you, Till heauen and earth passe, one iote or one title, shall in no wise passe from the law, till all be fulfilled.
在马太福音 5:18 的原始希腊语中,“iote”是“ἰῶτα”,“title”(或更现代的“tittle”)是“κεραία”。 “κεραία”这个词的意思大致是“衬线”或“撇号”。因此,这节圣经经文指的是最小的细节,并使用“ἰῶτα”来指代作为希腊字母表中物理上最小的字母的字母 iota。
Featley 作为一名圣经学者(他获得了神学博士学位),无疑可以阅读希腊语。我猜他只是将字母的希腊名称“ιώτα”音译成英文“iota”。他为什么不按照国王詹姆士翻译的拼写“iote”?我不知道。
因此,我们可以推断出 STL 函数 iota
及其 APL 前身 ⍳
在圣经中以希腊语物理上最小的字母命名字母“ι”,因为这些函数产生的整数以最小的整数分隔。
According to Wikipedia , 希腊字母 iota 来自腓尼基字母 yōdh。
这是我目前希望解决这个问题的编程领域。
关于c++ - std::iota 的 iota 代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9244879/
我假设“i”是递增的,而“a”是分配的,但我无法弄清楚或找到答案。此外,它看起来与我认为令人困惑的非标准 itoa 非常相似。 最佳答案 C++ iota 不是首字母缩写词或首字母缩写词。就是“iot
在下面的代码中: const ( signature uint32 = 0xae3179fb dhkxGroup = 2 ReplySuccessful byte = iota
这三种填充 vector 的方式之间是否存在性能差异? #include #include #include #include int main() { std::vector v(1
iota 模板函数已添加到标准库中,以用递增的值序列填充迭代器范围。 template void iota(ForwardIterator first, ForwardIterat
iota函数以前在 中 header 。已改为 . 我需要保留旧方法以实现向后兼容性,因此我想使用预处理器选项来选择要包含的正确 header 。 这什么时候改变了,我应该使用哪个预处理器选项?
以下示例使用 iota 定义了一系列从 3333 开始的端口号。 package main import ( "fmt" ) const ( FirstPort = iota+3333 Sec
来自 Python 世界,我找到了函数 std::iota非常有限。为什么接口(interface)被限制为不带任何 UnaryFunction ? 例如我可以转换 >>> x = range(0,
作为标题,golang中iota的全称是什么(不是用法): const ( // iota is reset to 0 c0 = iota // c0 == 0 c1 = iota
Iota 是一种非常小的“编程语言”,只使用一个组合器。我有兴趣了解它的工作原理,但是以我熟悉的语言查看实现会很有帮助。 我找到了一个用 Scheme 编写的 Iota 编程语言的实现。不过,我在将其
ranges-v3库中的closed_iota和iota有什么区别? 最佳答案 第二种遵循标准的C++表达范围的方法-默认为右侧打开范围。第一个是包容性的。iota接受两个参数:start和end。它
由于没有基于索引的parallel for algorithm在 c++17 , 我想知道 ranges::view::iota可以与std::for_each结合使用模仿那个。即: using na
再次提出这个问题,我深表歉意。我之前就 Haskell 实现问过这个问题 here ,但我仍然难以理解这是如何工作的。此外,我发现极简编程语言的概念绝对令人着迷并且无法摆脱它......无论如何,这不
我最近一直在利用 iota递增 int 类型 vector 的语句.但现在我正在尝试使用该语句来递增具有 2 个成员的显式类。 下面是整数 vector 的用法: vector n(6); iota
为了了解 C++11 的复杂性,我正在研究 unique_ptr有一点。 我想知道,有什么办法可以使用iota吗?初始化 unique_ptr 的容器? 我从 unique-ptr-less 解决方案
我试图编译这段代码:- #include using namespace std; int main() { vector v(5); iota(v.begin(), v.end()
以下程序打印出一副洗好的纸牌(作为整数): #include #include #include #include typedef unsigned int card; typedef std
请原谅我对 Go 的了解非常有限。我有这样的定义 type ErrorVal int const ( LEV_ERROR ErrorVal = iota LEV_WARNING
我有这个 Go 代码: package main import "fmt" type baseGroup int const ( fooGroup baseGroup = iota + 1
假设我们有一个 map[int]string我们想这样定义它: var a map[int]string = { 1: "some" 3: "value" 4: "maintained" 7
假设我有下一个 c 程序: #include int main(int args, char* argv[]) { enum RC { APPLE=0, OR
我是一名优秀的程序员,十分优秀!