R/methods_size.R
, R/ds_deque.R
, R/ds_heap.R
, and 1 more
size-methods.Rd
Computes the size of an object, i.e. the number of keys or <key, value> pairs depending on the object.
size(obj) # S4 method for deque size(obj) # S4 method for heap size(obj) # S4 method for map size(obj)
obj | the object to get the size from |
---|
returns the size of obj
#> [1] 26# get the size of a fibonacci heap f_heap <- fibonacci_heap() f_heap <- insert(f_heap, letters[seq(3)], list(1, diag(3), rnorm(2))) size(f_heap)#> [1] 3#> [1] 1