abIndex-class {Matrix} | R Documentation

## Class "abIndex" of Abstract Index Vectors

### Description

The `"abIndex"` `class`, short for “Abstract Index Vector”, is used for dealing with large index vectors more efficiently, than using integer (or `numeric`) vectors of the kind `2:1000000` or `c(0:1e5, 1000:1e6)`.

### Objects from the Class

Objects can be created by calls of the form `new("abIndex", ...)`, or more easily by `as(x, "abIndex")` where `x` is an integer (valued) vector.

### Slots

`kind`:
  Object of class `"character"` ~~
`x`:
  Object of class `"numIndex"` ~~
`rleD`:
  Object of class `"rleDiff"` ~~

### Methods

as.numeric
  `signature(x = "abIndex")`: ...
[
  `signature(x = "abIndex", i = "index", j = "ANY", drop = "ANY")`: ...
coerce
  `signature(from = "numeric", to = "abIndex")`: ...
coerce
  `signature(from = "abIndex", to = "numeric")`: ...
coerce
  `signature(from = "abIndex", to = "integer")`: ...
length
  `signature(x = "abIndex")`: ...
Ops
  `signature(e1 = "numeric", e2 = "abIndex")`: These and the following arithmetic and logic operations are not yet implemented; see `Ops` for a list of these (S4) group methods.
Ops
  `signature(e1 = "abIndex", e2 = "abIndex")`: ...
Ops
  `signature(e1 = "abIndex", e2 = "numeric")`: ...
Summary
  `signature(x = "abIndex")`: ...

### Note

This is currently experimental and not yet used for our own code. Please contact us (`packageDescription("Matrix")$Maintainer`), if you plan to make use of this class.

Partly builds on ideas and code from Jens Oehlschlaegel, as implemented (around 2008, in the GPL'ed part of) package ff.

### See Also

`rle` (base) which is used here. `numeric`

### Examples

    showClass("abIndex")
    ii <- c(-3:40, 20:70)
    str(ai <- as(ii, "abIndex"))# note

[Package Matrix version 0.999375-33 Index]