bigo: bigo: Analysis of Algorithmic Complexity

Description Usage Arguments Details Value Examples

View source: R/complexity.R

Description

Simple tools for analyzing algorithmic complexity.

Analyze the algorithmic complexity of a function with respect to arguments.

Usage

1
bigo(f, ..., num_runs = 1)

Arguments

f

The function to be investigated.

...

One or more numeric or integer vectors, passed as named arguments, where the names are arguments of f.

num_runs

The number of experiments over which to average results. Currently only 1 is supported.

Details

This function returns an object of class bigo, which contains a tibble of runtime results, the name of the function being measured, and the number of runs over which the results are averaged.

Value

An object of class bigo containing the results of the runtime experiments: a tibble of runtimes, the function name, and the number of runs that the results are averaged over.

Examples

1
2
bigo(f = function(n) if (n < 3) 1 else { Recall(n - 1) + Recall(n - 2) },
     n = 1:15)

bfgray3/bigo documentation built on May 29, 2019, 2:27 p.m.