R/zzz.R

Defines functions .onUnload .onLoad

# datastructures: Implementation of core datastructures for R.
#
# Copyright (C) Simon Dirmeier
#
# This file is part of datastructures.
#
# datastructures is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# datastructures is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with datastructures. If not, see <http://www.gnu.org/licenses/>.

#' @import Rcpp
.onLoad <- function(libname, pkgname) {
  Rcpp::loadModule("bimap_module", TRUE)
  Rcpp::loadModule("hashmap_module", TRUE)
  Rcpp::loadModule("multimap_module", TRUE)

  Rcpp::loadModule("binomial_heap_module", TRUE)
  Rcpp::loadModule("fibonacci_heap_module", TRUE)

  Rcpp::loadModule("queue_module", TRUE)
  Rcpp::loadModule("stack_module", TRUE)
}


.onUnload <- function(libpath) {
  library.dynam.unload("datastructures", libpath)
}
dirmeier/datastructures documentation built on Aug. 9, 2020, 2:55 a.m.