tropproj.poly | R Documentation |
Project a point onto a given tropical polytope.
tropproj.poly(x, tconv)
x |
a data vector, of length e. |
tconv |
a data matrix, of size e x s, with each column a vertex of the tropical polytope. e is the dimension of the tropical space and s is the number of vertices of the polytope |
A projected vector on the given tropical polytope.
# Generate a tropical polytope consisting of three trees each with 5 leaves library(ape) pltp <- sapply(1:3, function(i) { as.vector(rcoal(5)) }) # Generate an observation and vectorize it tree <- rcoal(5) tree_vec <- as.vector(tree) tropproj.poly(tree_vec, pltp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.