Description Usage Arguments Details Examples
Convert a matrix to a vector of arrays
1 2 3 |
x |
object to be converted |
The algorithms in kdtools can accept either matrices or an arrayvec object. When a matrix is passed, it is converted to an arrayvec object internally and the results are converted back to a matrix. For optimal performance, pre-convert matrices.
1 2 3 4 5 6 7 | if (has_cxx17()) {
x = matrix(1:10, 5)
y = matrix_to_tuples(x)
str(x)
str(y)
y[1:2, ]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.