DynVector: An Amortized Vector

Description Usage Arguments Format Details Examples

Description

This object stores a preallocated list. You can add objects to the list with add and add lists to the list with add_list. When the objects to be added exceed the dimensions of the list, the list is re- allocated with double the size. This amortizes the runtime if you keep growing the dynamic vector.

Usage

1

Arguments

add

some method

Format

An object of class R6ClassGenerator of length 24.

Details

Use this object if you need an object with a mutable states that you keep growing. An example with be a list of RDF triples.

Examples

1
2
v = DynVector$new(3)
v$add("test")

pdatascience/rdf4r documentation built on May 25, 2019, 11:34 p.m.