sqrt
Thesqrt
filter is a numeric filter whose value is the integer square root of its argument:
sqrt 4 ≡ 2 sqrt 26 ≡ 5If the argument to the
sqrt
filter does not match the currentposition, neither does the sqrt
filter. If the argument to sqrt
is negative, the sqrt
filter does not match the position.
The sqrt
filter is mainly used in computing the Euclidean distance between two squares s and t, but the distance
has to be scaled because CQL only has integers. See the cql file averagedistance.cql for an example of this usage.