prod_entries: Product of entries along an axis

View source: R/109_atoms_prod.R

prod_entriesR Documentation

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)

Arguments

x

An Expression

axis

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

keepdims

Whether to keep reduced dimensions

Value

A Prod atom

Examples

x <- Variable(3, pos = TRUE)
prob <- Problem(Minimize(prod_entries(x)), list(x >= 2))
## Not run: psolve(prob, gp = TRUE)

CVXR documentation built on March 6, 2026, 9:10 a.m.