lpm3-package: A Fast K-D Tree Implementation of the Local Pivotal Method

Description Details Author(s) Examples

Description

This program performs the local pivotal method for balanced sampling using k-d trees obtaining O( log(n) n ) computatinal complexity.

Details

Package: lpm3
Type: Package
Version: 0.5
Date: 2015-07-10
License: BSD 2-clause License

lpm3: currently does not do correct handling of ties on searches.

Author(s)

Jonathan Lisic

Maintainer: <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# balanced sample with sampling rate at 0.10

N <- 1000
n <- 100
x <- cbind( runif(N), runif(N)) 

Cprog <- proc.time()
sampled3 <- lpm3( rep(n/N,N),x  )
print("lpm3 running time")
print(proc.time() - Cprog) 

print(length(sampled3))

jlisic/lpm3 documentation built on May 19, 2019, 12:46 p.m.