Learn R Programming

CVXR (version 0.99-7)

SumLargest-class: The SumLargest class.

Description

The sum of the largest k values of a matrix.

Usage

SumLargest(x, k)

# S4 method for SumLargest validate_args(object)

# S4 method for SumLargest to_numeric(object, values)

# S4 method for SumLargest size_from_args(object)

# S4 method for SumLargest sign_from_args(object)

# S4 method for SumLargest is_atom_convex(object)

# S4 method for SumLargest is_atom_concave(object)

# S4 method for SumLargest is_incr(object, idx)

# S4 method for SumLargest is_decr(object, idx)

# S4 method for SumLargest get_data(object)

# S4 method for SumLargest graph_implementation(object, arg_objs, size, data = NA_real_)

Arguments

x

An '>Expression or numeric matrix.

k

The number of largest values to sum over.

object

A '>SumLargest object.

values

A list of arguments to the atom.

idx

An index into the atom.

arg_objs

A list of linear expressions for each argument.

size

A vector with two elements representing the size of the resulting expression.

data

A list of additional data required by the atom.

Methods (by generic)

  • validate_args: Check that k is a positive integer.

  • to_numeric: The sum of the k largest entries of the vector or matrix.

  • size_from_args: The atom is a scalar.

  • sign_from_args: The sign of the atom.

  • is_atom_convex: The atom is convex.

  • is_atom_concave: The atom is not concave.

  • is_incr: The atom is weakly increasing in every argument.

  • is_decr: The atom is not weakly decreasing in any argument.

  • get_data: A list containing k.

  • graph_implementation: The graph implementation of the atom.

Slots

x

An '>Expression or numeric matrix.

k

The number of largest values to sum over.