cummax_axis | R Documentation |
The cumulative maximum, \max_{i=1,\ldots,k} x_i
for k=1,\ldots,n
.
When calling cummax
, matrices are automatically flattened into column-major order before the max is taken.
cummax_axis(expr, axis = 2)
## S4 method for signature 'Expression'
cummax(x)
axis |
(Optional) The dimension across which to apply the function: |
x , expr |
An Expression, vector, or matrix. |
val <- cbind(c(1,2), c(3,4))
value(cummax(Constant(val)))
value(cummax_axis(Constant(val)))
x <- Variable(2,2)
prob <- Problem(Minimize(cummax(x)[4]), list(x == val))
result <- solve(prob)
result$value
result$getValue(cummax(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.