Compares two unordered integer sequences to test if they contain the same elements. This can be used to implement various algorithms for unoriented simplicial complexes.
For more information, see the following blog post:
var compareCells =var bsearch =//Create a list of triangles defined by indexed facesvar triangles =1 0 22 1 33 4 55 6 7//Sort trianglestriangles//Now we can test if various cells are contained in the list in O(log n)consoleconsole
Tests if two unordered lists contain the same elements.
a, bare arrays of integers
Returns An order function which tests if
a comes before or after
b. The value is
0 if they are equal.
(c) 2015 Mikola Lysenko. MIT License