关联地图

关联地图[(f),{钥匙1,钥匙2,}]

创建关联钥匙1(f)[钥匙1],钥匙2(f)[钥匙2],.

关联地图[(f),钥匙1val值1,钥匙2val值2,]

创建关联(f)[钥匙1val值1],(f)[钥匙2val值2],.

关联地图[(f)]

表示的运算符形式关联地图可以应用于表达式的。

细节

  • 在以下情况下关联地图[(f),协会会员],后面的重复键实例将替换前面的。
  • 关联地图[(f)][快递]等于关联映射[(f),快递].
  • 并联[关联地图[(f),{钥匙1,钥匙2,}]]计算关联地图[(f),{钥匙1,钥匙2,}]在所有子内核上并行。 »

示例

全部打开全部关闭

基本示例  (2)

通过在键列表上映射函数来创建关联:

通过交换键和值创建“反向索引”:

使用运算符形式关联映射:

属性和关系  (1)

计算关联地图并行:

可能的问题  (1)

关联地图[(f),协会会员]可以返回无效关联,如果(f)不返回规则:

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公司

沃尔夫拉姆语言。2014年,“AssociationMap”,Wolfram语言与系统文档中心。Wolfram研究。https://reference.wolfram.com/language/ref/AssociationMap.html。

亚太地区

沃尔夫拉姆语言。(2014). AssociationMap(关联地图)。Wolfram语言与系统文档中心。检索自https://reference.wolfram.com/language/ref/AssociationMap.html

BibTeX公司

@misc{reference.wolfram_2024_associationmap,author=“wolfram Research”,title=“{associationmap}”,年份=“2014”,howpublished=“\url{https://reference.jolfram.com/language/ref/Association Map.html}”]}

BibLaTeX公司

@在线{reference.wolfram_2024_associationmap,organization={wolfram Research},title={associationmap},year={2014},url={https://reference.jolfram.com/language/ref/Association Map.html},note=[访问时间:2024年9月21日]}