英文字典中文字典


英文字典中文字典51ZiDian.com



中文字典辞典   英文字典 a   b   c   d   e   f   g   h   i   j   k   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z       







请输入英文单字,中文词皆可:

tuple    
元组

元组

tuple
有序n 元; n 重序元


tuple
n 倍; n 元组; n 元数; n 元向量


tuple
重元组

tuple


In {functional languages}, a data object containing two or
more components. Also known as a product type or pair,
triple, quad, etc. Tuples of different sizes have different
types, in contrast to lists where the type is independent of
the length. The components of a tuple may be of different
types whereas all elements of a list have the same type.
Examples of tuples in {Haskell} notation are (1,2),
("Tuple",True), (w,(x,y),z). The degenerate tuple with zero
components, written (), is known as the unit type since it has
only one possible value which is also written ().

The implementation of tuples in a language may be either
"{lifted}" or not. If tuples are lifted then (bottom,bottom)
/= bottom and the evaluation of a tuple may fail to terminate.
E.g. in Haskell:

f (x,y) = 1 --> f bottom = bottom
f (bottom,bottom) = 1

With lifted tuples, a tuple pattern is refutable. Thus in
Haskell, {pattern matching} on tuples is the same as pattern
matching on types with multiple constructors ({algebraic data
types}) - the expression being matched is evaluated as far as
the top level constructor, even though, in the case of tuples,
there is only one possible constructor for a given type.

If tuples are unlifted then (bottom, bottom) = bottom and
evaluation of a tuple will never fail to terminate though any
of the components may. E.g. in {Miranda}:

f (x,y) = 1 --> f bottom = 1
f (bottom,bottom) = 1

Thus in Miranda, any object whose type is compatible with a
tuple pattern is assumed to match at the top level without
evaluation - it is an {irrefutable} pattern. This also
applies to user defined data types with only one constructor.
In Haskell, patterns can be made irrefutable by adding a "~"
as in

f ~(x,y) = 1.

If tuple constructor functions were {strict} in all their
arguments then (bottom,x) = (x,bottom) = bottom for any x so
matching a refutable pattern would fail to terminate if any
component was bottom.


请选择你想看的字典辞典:
单词字典翻译
Tuple查看 Tuple 在百度字典中的解释百度英翻中〔查看〕
Tuple查看 Tuple 在Google字典中的解释Google英翻中〔查看〕
Tuple查看 Tuple 在Yahoo字典中的解释Yahoo英翻中〔查看〕





安装中文字典英文字典查询工具!


中文字典英文字典工具:
选择颜色:
输入中英文单字

































































英文字典中文字典相关资料:


  • Convert list to tuple in Python - Stack Overflow
    Have you assigned the name 'tuple' as a variable name? it should work fine L is a list and we want to convert it to a tuple L = [1, 2, 3] tuple (L) By invoking tuple, you convert the list (L) into a tuple As done above >> (1, 2, 3) you can go ahead and access any item in the tuple using the square brackets L [0] 1
  • 十分钟读懂旋转编码(RoPE)
    旋转位置编码(Rotary Position Embedding,RoPE)是论文 Roformer: Enhanced Transformer With Rotray Position Embedding 提出的一种能够将相对位置信息依赖集成到 self-attention 中并提升 transformer 架构性能的位置编码方式。而目前很火的 LLaMA、GLM 模型也是采用该位置编码方式。 和相对位置编码相比,RoPE 具有更好的 外推性
  • std::tuple能否代替struct? - 知乎
    std::tuple能否代替struct? 不考虑继承,不考虑定义成员函数,只考虑不同的数据类型集合在一起。 显示全部 关注者 137
  • c# - Return multiple values to a method caller - Stack Overflow
    The tuple probably is the best option for readability Personally, I'm not keen on having anonymous types or property names like Item1 - although I guess destructuring does mitigate that The last example, in terms of source code, definitely looks the most like multiple return in languages with that as a native feature
  • 如何遍历 std::tuple? - 知乎
    为什么这个七年前的问题会出现在我的首页= =,简单答一下吧,原题要求的是C++11,远古写法别的地方写得其实都已经比较好了,那么看一下since C++14的现代写法吧: 首先比较容易想到的是利用C++14的 std::make_index_sequence 与 std::get 结合取值,然后配合 std::initializer_list 进行包展开:
  • c# - How to name tuple properties? - Stack Overflow
    How and "could be" organized return from the method which returns tuple type with the name of parameters, as an example private static Tuple lt;string, string gt; methodTuple() { return new {N
  • C++如何将一个tuple的内容作为一个可变参数函数 . . . - 知乎
    下面是讲解如何将一个tuple对象作为一个可变参数传递给函数 给定任何函数,有时我们需要从函数指针中将参数类型列表、返回类型抽取出来并且塞入tuple容器中。这样做的目的是,我们可以通过判断装有参数类型列表的tuple对象的类型来实现策略式回调对应的函数指针。这在C++的运行时后期绑定
  • loops - How to reverse tuples in Python? - Stack Overflow
    Is this possible? Doesn't have to be in place, just looking for a way to reverse a tuple so I can iterate on it backwards
  • c++tuple为什么递归实现? - 知乎
    因为c++11对可变参数模板(Variadic Templates)的支持还比较弱,所以只能用递归。 可变参数模板(Variadic Templates)在后续的C++版本中有得到陆续的增强,C++17以后应该就可以不用递归来实现tuple了。但是最大的增强应该是C++26引入的《Structured Bindings can introduce a Pack》,目前clang21已经实现:





中文字典-英文字典  2005-2009