Quadtree-class {quadtree}R Documentation

Quadtree class

Description

This S4 class is essentially a wrapper around a CppQuadtree C++ object. Quadtree has one slot, which is named ptr and contains a CppQuadtree object. Instances of this class can be created through the quadtree() function.

An important note to make is that functions that modify a Quadtree modify the existing object. For example, running transform_values(qt, function(x) x+1) modifies qt. This differs from the way R objects usually function - most functions that modify R objects return a modified copy of the object, thus preserving the original object. Note that the copy() function, which makes a deep copy of a Quadtree, can be used to preserve a copy of a Quadtree before modifying it.

The methods of the C++ object (CppQuadtree) stored in the ptr slot can be accessed from R, but the typical end-user should have no need of these methods - they are meant for internal use. That being said, descriptions of the available methods can be found on the CppQuadtree documentation page.

Details

Functions for creating a Quadtree object:

Methods:

Slots

ptr

a C++ object of class CppQuadtree


[Package quadtree version 0.1.14 Index]