Rdict-class {CVXR}R Documentation

The Rdict class.

Description

A simple, internal dictionary composed of a list of keys and a list of values. These keys/values can be any type, including nested lists, S4 objects, etc. Incredibly inefficient hack, but necessary for the geometric mean atom, since it requires mixed numeric/gmp objects.

Usage

Rdict(keys = list(), values = list())

## S4 method for signature 'Rdict'
x$name

## S4 method for signature 'Rdict'
length(x)

## S4 method for signature 'ANY,Rdict'
is.element(el, set)

## S4 method for signature 'Rdict,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]

## S4 replacement method for signature 'Rdict,ANY,ANY,ANY'
x[i, j, ...] <- value

Arguments

keys

A list of keys.

values

A list of values corresponding to the keys.

x, set

A Rdict object.

name

Either "keys" for a list of keys, "values" for a list of values, or "items" for a list of lists where each nested list is a (key, value) pair.

el

The element to search the dictionary of values for.

i

A key into the dictionary.

j, drop, ...

Unused arguments.

value

The value to assign to key i.

Slots

keys

A list of keys.

values

A list of values corresponding to the keys.


[Package CVXR version 1.0-14 Index]