SparseArrayQ

SparseArrayQ[s]

如果 s 是有效的 SparseArray 对象,生成 True,否则生成 False.

范例

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

基本范例  (1)

测试一个对象是否是一个有效的 SparseArray 对象:

范围  (4)

SparseArrayQ 适用于稀疏向量:

SparseArrayQ 适用于任何深度的稀疏数组:

SparseArrayQ 适用于大型稀疏数组:

SparseArrayQ 对于任何不是 SparseArray 的对象给出 False

属性和关系  (2)

SparseArrayQTrue 时,ArrayQ 也将为 True,但反之则不然:

SparseArrayQ 等价于 (ArrayQ[#] && MatchQ[#,_SparseArray])&

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_sparsearrayq, organization={Wolfram Research}, title={SparseArrayQ}, year={2021}, url={https://reference.wolfram.com/language/ref/SparseArrayQ.html}, note=[Accessed: 25-November-2024 ]}