Unique: Difference between revisions

Jump to navigation Jump to search
18 bytes removed ,  16:52, 18 November 2019
m
no edit summary
Miraheze>Marshall
Miraheze>Adám Brudzewsky
mNo edit summary
Line 41: Line 41:
To construct the Unique of an array, the major cells are considered in order of increasing [[index]]. Each cell is included if it does not [[match]] any cell which was already included.
To construct the Unique of an array, the major cells are considered in order of increasing [[index]]. Each cell is included if it does not [[match]] any cell which was already included.


The array matching is subject to [[tolerant comparison]]. In the intolerant case, that is, when equality is [https://en.wikipedia.org/wiki/Transitive_relation transitive], a cell is included if and only if it does not match any other cell which appears earlier in the array. That's because all the discarded duplicate cells must have matched an earlier included cell; if equality is transitive then a cell which matches the duplicate would also match the earlier cell.
The array matching is subject to [[tolerant comparison]]. In the intolerant case, that is, when equality is [[wikipedia:Transitive_relation|transitive]], a cell is included if and only if it does not match any other cell which appears earlier in the array. That's because all the discarded duplicate cells must have matched an earlier included cell; if equality is transitive then a cell which matches the duplicate would also match the earlier cell.


=== Tolerant comparison ===
=== Tolerant comparison ===

Navigation menu