Learn R Programming

CVXR (version 1.9.1)

prod_entries: Product of entries along an axis

Description

Used in DGP (geometric programming) context. Solve with psolve(problem, gp = TRUE).

Usage

prod_entries(x, axis = NULL, keepdims = FALSE)

Value

A Prod atom

Arguments

x

An Expression

axis

NULL (all), 1 (row-wise), or 2 (column-wise)

keepdims

Whether to keep reduced dimensions

Examples

Run this code
x <- Variable(3, pos = TRUE)
prob <- Problem(Minimize(prod_entries(x)), list(x >= 2))
if (FALSE) psolve(prob, gp = TRUE)

Run the code above in your browser using DataLab