実体クラスについての集合演算のオプションで,与えられた2つの実体が等しいかどうかを決定するために使われる特性の設定を与える.
SameTestProperties
実体クラスについての集合演算のオプションで,与えられた2つの実体が等しいかどうかを決定するために使われる特性の設定を与える.
詳細
- SameTestPropertiesのデフォルト設定はAutomaticである.これは,実体間の等価性が,1引数のEntityListによって返されるようなEntity式間の等価性として定義されていることを意味する.
- SameTestProperties{{prop11,prop12,…},{prop21,prop22,…},…}は,classi の propiαが classj内のすべての propjαと等しくなければならないことを意味する.
- UnionedEntityClass[…,SameTestPropertiesFalse]では,2つの実体が等しいとみなされることはない.これらのクラスは,事実上,互いに結合されている.
例題
すべて開く すべて閉じる例 (4)
デフォルト設定のAutomaticではEntity式が比較される:
EntityList[ComplementedEntityClass[EntityClass["Country", "G7"], EntityClass["Country", "EuropeanUnion"], SameTestProperties -> Automatic]]デフォルト設定では,異なる実体タイプは常に違うものであるとみなされる:
EntityList[IntersectedEntityClass["Element", "Country"]]映画と書籍は,"Name"特性が同じであれば同じものとみなすことができる:
IntersectedEntityClass[EntityClass["Movie", "Producers" -> Entity["Person", "WaltDisney::mhtn8"]], EntityClass["Book", "Author" -> Entity["Person", "RudyardKipling::48d9q"]],
SameTestProperties -> "Name"
]["Name"]UnionedEntityClassでは,SameTestPropertiesをFalseに設定して重複した項目をそのままにすることができる:
EntityList[UnionedEntityClass[EntityClass["Country", "GroupOf8"], EntityClass["Country", "GroupOf7"], SameTestProperties -> False]]スコープ (1)
SameTestPropertiesはSQLに裏付けられた実体ストアでサポートされている:
EntityRegister[EntityStore[RelationalDatabase[FindFile["ExampleData/ecommerce-database.sqlite"]]]]UnionedEntityClass["orders", "payments", SameTestProperties -> {{"orderDate"}, {"paymentDate"}}][{"orderNumber", "checkNumber"}]//Short特性と関係 (1)
SameTestPropertiesのシミュレーションは,あまり効率的ではないが,SameTestを使って行うこともできる:
EntityList[ComplementedEntityClass[EntityClass["Chemical", "HomonuclearDiatomics"], EntityClass["Element", "Gas"], SameTestProperties -> "Name"]]しかし,結果の実体は最初のクラスと同じタイプになり,そのために最初のタイプの特性だけになる:
Complement[EntityList[EntityClass["Chemical", "HomonuclearDiatomics"]], EntityList[EntityClass["Element", "Gas"]], SameTest -> Function[#1["Name"] === #2["Name"]]]テキスト
Wolfram Research (2020), SameTestProperties, Wolfram言語関数, https://reference.wolfram.com/language/ref/SameTestProperties.html.
CMS
Wolfram Language. 2020. "SameTestProperties." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SameTestProperties.html.
APA
Wolfram Language. (2020). SameTestProperties. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SameTestProperties.html
BibTeX
@misc{reference.wolfram_2026_sametestproperties, author="Wolfram Research", title="{SameTestProperties}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SameTestProperties.html}", note=[Accessed: 06-July-2026]}
BibLaTeX
@online{reference.wolfram_2026_sametestproperties, organization={Wolfram Research}, title={SameTestProperties}, year={2020}, url={https://reference.wolfram.com/language/ref/SameTestProperties.html}, note=[Accessed: 06-July-2026]}