Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

AxisAtom-class

The AxisAtom class.


Description

This virtual class represents atomic expressions that can be applied along an axis in CVXR.

Usage

## S4 method for signature 'AxisAtom'
dim_from_args(object)

## S4 method for signature 'AxisAtom'
get_data(object)

## S4 method for signature 'AxisAtom'
validate_args(object)

## S4 method for signature 'AxisAtom'
.axis_grad(object, values)

## S4 method for signature 'AxisAtom'
.column_grad(object, value)

Arguments

object

An Atom object.

values

A list of numeric values for the arguments

value

A numeric value

Methods (by generic)

  • dim_from_args: The dimensions of the atom determined from its arguments.

  • get_data: A list containing axis and keepdims.

  • validate_args: Check that the new dimensions have the same number of entries as the old.

  • .axis_grad: Gives the (sub/super)gradient of the atom w.r.t. each variable

  • .column_grad: Gives the (sub/super)gradient of the atom w.r.t. each column variable

Slots

expr

A numeric element, data.frame, matrix, vector, or Expression.

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

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.