AssociationMap

AssociationMap[f,{key1,key2,}]

创建关联 key1f[key1],key2f[key2],.

AssociationMap[f,key1val1,key2val2,]

创建关联 f[key1val1],f[key2val2],.

AssociationMap[f]

表示 AssociationMap 可用于表达式的运算符形式.

更多信息

范例

打开所有单元关闭所有单元

基本范例  (2)

通过将函数在一个键列表上映射,创建关联:

通过交换键和值,创建一个反向索引

使用 AssociationMap 的运算符形式.

属性和关系  (1)

并行计算 AssociationMap

可能存在的问题  (1)

如果 f 不返回规则,AssociationMap[f,assoc] 可以返回无效关联:

Wolfram Research (2014),AssociationMap,Wolfram 语言函数,https://reference.wolfram.com/language/ref/AssociationMap.html.

文本

Wolfram Research (2014),AssociationMap,Wolfram 语言函数,https://reference.wolfram.com/language/ref/AssociationMap.html.

CMS

Wolfram 语言. 2014. "AssociationMap." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/AssociationMap.html.

APA

Wolfram 语言. (2014). AssociationMap. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/AssociationMap.html 年

BibTeX

@misc{reference.wolfram_2024_associationmap, author="Wolfram Research", title="{AssociationMap}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/AssociationMap.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_associationmap, organization={Wolfram Research}, title={AssociationMap}, year={2014}, url={https://reference.wolfram.com/language/ref/AssociationMap.html}, note=[Accessed: 21-November-2024 ]}