Fast C++ Primitives for the 'NeuroAnatomy Toolbox'.
natcpp
The goal of natcpp is to provide accelerated routines through compiled C++ code for basic functions to support the natverse computational neuroanatomy ecosystem. natcpp is not designed to be used by end users but instead the nat package will use it when available to enable large speed-ups for some primitive operations. End users should therefore not count on the natcpp functions/interface being stable, especially during its initial development.
Our plan is to get this onto CRAN quite quickly so that binary packages will be available to Mac/Windows users who do not have a full C compiler toolchain installed. Once on CRAN, we will try to keep the package simple and stable, with infrequent updates. A development version will be available via the relevant github repository (see below). We do not intend to specify a GitHub remote so these updates will not be installed by default i.e. we will prefer CRAN binaries unless the user intervenes.
Installation
You will be able to install the released version of natcpp from CRAN with:
install.packages("natcpp")
For now please do:
install.packages("natmanager")
natmanager::install(pkgs = 'natverse/natcpp')
Example
As already noted, the intention is that end users will only use the nat package (and that will automagically use natcpp when available). However to prove that everything is set up properly, you could do:
library(nat)
library(natcpp)
topntail(as.seglist(Cell07PNs[[1]]))