Intersection[list1,list2,…]
给出所有 listi 中共同元素的有序列表.
Intersection 
Intersection[list1,list2,…]
给出所有 listi 中共同元素的有序列表.
更多信息和选项
- 如果把 listi 作为集合考虑,则 Intersection 给出它们的交集.
- Intersection[list1,list2,…] 在 StandardForm 和 InputForm 中可被输入为 list1⋂list2⋂…. 字符 ⋂ 可被输入为
inter
或 \[Intersection]. - listi 必须有相同的头部,但它不必是 List.
- Intersection[list1,…,SameTest->test] 将 test 应用到 listi 中的每对元素,以判定它们是否应该被当作是相同的元素.
- Intersection[a,b] 在 StandardForm 和 InputForm 中可被输入为 a⋂b 或 a \[Intersection]b .
范例
打开所有单元 关闭所有单元基本范例 (2)
推广和延伸 (1)
Intersection 适用于任意头部,不仅仅是 List:
Intersection[f[a, b], f[c, a], f[b, b, a]]选项 (3)
SameTest (3)
Intersection[{2, -2, 1, 3, 1}, {2, 1, -2, -1}, SameTest -> (Abs[#1] == Abs[#2]&)]基于 Floor 使用等价类:
Intersection[{1.1, 3.4, .5, 7.6, 7.1, 1.9}, {1.2, 3.3, 7.7, 1.3}, SameTest -> (Floor[#1] == Floor[#2]&)]使用列表元素的 Total:
Intersection[{{1, 2}, {3}, {4, 5, 6}, {9, 6}}, {{2, 1}, {8, 4, 3}}, SameTest -> (Total[#1] == Total[#2]&)]技术笔记
-
▪
- 作为集合的列表
历史
1988年引入 (1.0) | 在以下年份被更新:1996 (3.0)
文本
Wolfram Research (1988),Intersection,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Intersection.html (更新于 1996 年).
CMS
Wolfram 语言. 1988. "Intersection." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 1996. https://reference.wolfram.com/language/ref/Intersection.html.
APA
Wolfram 语言. (1988). Intersection. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Intersection.html 年
BibTeX
@misc{reference.wolfram_2026_intersection, author="Wolfram Research", title="{Intersection}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Intersection.html}", note=[Accessed: 12-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_intersection, organization={Wolfram Research}, title={Intersection}, year={1996}, url={https://reference.wolfram.com/language/ref/Intersection.html}, note=[Accessed: 12-September-2026]}