vec:get( $vector1 as vec:vector, $k as xs:unsignedInt ) as xs:float
Returns the element at the k-th index of the vector.
Parameters | |
---|---|
vector1 | The vector to grab the k-th element of. |
k |
The zero-based index of vector1 to return. If k is greater than the number of elements in the vector,
throw VEC-OUTOFBOUNDS .
|
xquery version "1.0-ml"; let $vec1 := vec:vector((3.14,1.59,2.65)) return vec:get($vec1, 1) => 1.59