CppNode-class {quadtree} | R Documentation |
CppNode
: C++ quadtree node
Description
The CppNode
C++ class defines objects that represent a
single node of a quadtree. This is used internally - end users should have
no need to use any of the methods listed here.
Details
This class is defined in 'src/NodeWrapper.h' and
'src/NodeWrapper.cpp'. When made available to R, it is exposed as
CppNode
instead of NodeWrapper
. NodeWrapper
contains a
pointer to a Node
object (defined in 'src/Node.h' and
'src/Node.cpp'). All of the core functionality is in the Node
class
- NodeWrapper
is a wrapper class that adds the 'Rcpp' code required
for it to be accessible from R.
Fields
asVector
-
-
Description: Returns a vector giving info about the node
-
Parameters: none
-
Returns: a numeric vector with the following named elements:
id
hasChidren
level
xmin
xmax
ymin
ymax
smallestChildLength
as_data_frame
makes use of this function to output info on each node - see the documentation of that function for details on what each column represents
-
getChildren
-
-
Description: Returns a list of the child nodes
-
Parameters: none
-
Returns: a list of
CppNode
objects
-
getNeighborIds
-
-
Description: Returns the IDs of the neighboring cells
-
Parameters: none
-
Returns: a numeric vector containing the neighbor IDs
-
getNeighborInfo
-
-
Description: Returns a matrix with info on each of the neighboring cells
-
Parameters: none
-
Returns: a matrix. The
getNeighborList()
member function ofCppQuadtree
makes use of this function - see documentation of that function for details on the return matrix.
-
getNeighborVals
-
-
Description: Returns the values of all neighboring cells
-
Parameters: none
-
Returns: a numeric vector
-
getNeighbors
-
-
Description: Returns a list of the neighboring nodes
-
Parameters: none
-
Returns: a list of
CppNode
objects
-
hasChildren
-
-
Description: Returns a boolean representing whether the node has children
-
Parameters: none
-
Returns: a boolean value -
TRUE
if it has children,FALSE
otherwise
-
id
-
-
Description: Returns the ID of this node
-
Parameters: none
-
Returns: an integer
-
level
-
-
Description: Returns the 'level' (i.e. depth in the tree) of this node
-
Parameters: none
-
Returns: an integer
-
smallestChildSideLength
-
-
Description: Returns the side length of the smallest descendant node
-
Parameters: none
-
Returns: a double
-
value
-
-
Description: Returns the value of the node
-
Parameters: none
-
Returns: a double
-
xLims
-
-
Description: Returns the x boundaries of the node
-
Parameters: none
-
Returns: two-element numeric vector (xmin, xmax)
-
yLims
-
-
Description: Returns the y boundaries of the node
-
Parameters: none
-
Returns: two-element numeric vector (ymin, ymax)
-