| CppNode-class | R Documentation |
CppNode: C++ quadtree nodeThe 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.
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.
asVectorDescription: 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
getChildrenDescription: Returns a list of the child nodes
Parameters: none
Returns: a list of CppNode objects
getNeighborIdsDescription: Returns the IDs of the neighboring cells
Parameters: none
Returns: a numeric vector containing the neighbor IDs
getNeighborInfoDescription: Returns a matrix with info on each of the neighboring cells
Parameters: none
Returns: a matrix. The getNeighborList() member
function of CppQuadtree makes use of this function - see
documentation of that function for details on the return matrix.
getNeighborValsDescription: Returns the values of all neighboring cells
Parameters: none
Returns: a numeric vector
getNeighborsDescription: Returns a list of the neighboring nodes
Parameters: none
Returns: a list of CppNode objects
hasChildrenDescription: Returns a boolean representing whether the node has children
Parameters: none
Returns: a boolean value - TRUE if it has children,
FALSE otherwise
idDescription: Returns the ID of this node
Parameters: none
Returns: an integer
levelDescription: Returns the 'level' (i.e. depth in the tree) of this node
Parameters: none
Returns: an integer
smallestChildSideLengthDescription: Returns the side length of the smallest descendant node
Parameters: none
Returns: a double
valueDescription: Returns the value of the node
Parameters: none
Returns: a double
xLimsDescription: Returns the x boundaries of the node
Parameters: none
Returns: two-element numeric vector (xmin, xmax)
yLimsDescription: Returns the y boundaries of the node
Parameters: none
Returns: two-element numeric vector (ymin, ymax)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.