Coords, e.g. from VectorEntry or OperatorEntry
Dimensions sizes
Error when not [0 <= c1 < s1, 0 <= c2 < s2, ...]
Turns an index into a multi-index, according to dimension sizes.
An integer
Sizes of each dimension
Index in each dimension
Turns a multi-index into an index, inverse of coordsFromIndex
Index in each dimension
Sizes of each dimension
Index
Stolen from https://stackoverflow.com/questions/36721830/convert-hsl-to-rgb-and-hex Alternatively: d3.hsl
Creates complement indices, sorted.
E.g. [3, 1]
E.g. 5
E.g. [0, 2, 4]
Checks if a given array is a permuation, i.e. consist of [0, 1, 2, ..., n - 1] in any order.
Array to be tested
Number of elements
A function to merge coordinates.
E.g. [3, 1]
E.g. [0, 2, 4]
A function that for [2, 3, 5], [7, 11] -> [2, 11, 3, 7, 5]
Output an enum describing laser starting polarization
a string enum
Output an enum describing laser starting polarization
a string enum
Pick a random index of an array according to weights.
An array of weights. By default they should sum up to 1.
If to normalize array.
A number [0, ..., weights.length -1].
Generated using TypeDoc
Ensures that coords and dimensions sizes are compatible