Skip to content

Commit 0ede002

Browse files
authored
Merge pull request #486 from stkaplan/index-compare
Don't check tensor when comparing IndexSets
2 parents ef99f8d + 4e01734 commit 0ede002

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/index_notation/index_notation.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,20 @@ struct Isomorphic : public IndexNotationVisitorStrict {
189189
}
190190
}
191191
if (anode->isAccessingStructure != bnode->isAccessingStructure ||
192-
anode->windowedModes != bnode->windowedModes ||
193-
anode->indexSetModes != bnode->indexSetModes) {
192+
anode->windowedModes != bnode->windowedModes) {
193+
eq = false;
194+
return;
195+
}
196+
if (anode->indexSetModes.size() != bnode->indexSetModes.size()) {
194197
eq = false;
195198
return;
196199
}
200+
for (auto aset = anode->indexSetModes.begin(), bset = bnode->indexSetModes.begin(); aset != anode->indexSetModes.end(); ++aset, ++bset) {
201+
if (aset->first != bset->first || *aset->second.set != *bset->second.set) {
202+
eq = false;
203+
return;
204+
}
205+
}
197206
eq = true;
198207
}
199208

0 commit comments

Comments
 (0)