SumEntries-class: The SumEntries class.

SumEntries-classR Documentation

The SumEntries class.

Description

This class represents the sum of all entries in a vector or matrix.

Usage

SumEntries(expr, axis = NA_real_, keepdims = FALSE)

## S4 method for signature 'SumEntries'
to_numeric(object, values)

## S4 method for signature 'SumEntries'
is_atom_log_log_convex(object)

## S4 method for signature 'SumEntries'
is_atom_log_log_concave(object)

## S4 method for signature 'SumEntries'
graph_implementation(object, arg_objs, dim, data = NA_real_)

Arguments

expr

An Expression representing a vector or matrix.

axis

(Optional) The dimension across which to apply the function: 1 indicates rows, 2 indicates columns, and NA indicates rows and columns. The default is NA.

keepdims

(Optional) Should dimensions be maintained when applying the atom along an axis? If FALSE, result will be collapsed into an n x 1 column vector. The default is FALSE.

object

A SumEntries object.

values

A list of arguments to the atom.

arg_objs

A list of linear expressions for each argument.

dim

A vector representing the dimensions of the resulting expression.

data

A list of additional data required by the atom.

Methods (by generic)

  • to_numeric(SumEntries): Sum the entries along the specified axis.

  • is_atom_log_log_convex(SumEntries): Is the atom log-log convex?

  • is_atom_log_log_concave(SumEntries): Is the atom log-log concave?

  • graph_implementation(SumEntries): The graph implementation of the atom.

Slots

expr

An Expression representing a vector or matrix.

axis

(Optional) The dimension across which to apply the function: 1 indicates rows, 2 indicates columns, and NA indicates rows and columns. The default is NA.

keepdims

(Optional) Should dimensions be maintained when applying the atom along an axis? If FALSE, result will be collapsed into an n x 1 column vector. The default is FALSE.


CVXR documentation built on June 27, 2024, 5:11 p.m.