-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
following CRAN team suggestions - adjust description here and there
- Loading branch information
1 parent
8acf49d
commit 5c6be11
Showing
7 changed files
with
101 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ src/*.o | |
src/*.so | ||
src/*.dll | ||
*.DS_Store | ||
inst/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
Package: sparsepp | ||
Type: Package | ||
Title: Rcpp Interface to Sparsepp | ||
Title: 'Rcpp' Interface to 'sparsepp' | ||
Version: 0.1.0 | ||
Date: 2016-12-29 | ||
Authors@R: c( | ||
person("Gregory", "Popovitch", role = c("aut", "cph"), email = "[email protected]"), | ||
person("Google Inc", role = c("aut", "cph")), | ||
person("Dmitriy", "Selivanov", role = "cre", email = "[email protected]") | ||
) | ||
Description: Provides interface to sparsepp - fast, memory efficient hash map. | ||
It is derived from Google's excellent sparsehash implementation. | ||
We believe Sparsepp provides an unparalleled combination of performance and memory usage, | ||
Description: Provides interface to 'sparsepp' - fast, memory efficient hash map. | ||
It is derived from Google's excellent 'sparsehash' implementation. | ||
We believe 'sparsepp' provides an unparalleled combination of performance and memory usage, | ||
and will outperform your compiler's unordered_map on both counts. | ||
Only Google's dense_hash_map is consistently faster, at the cost of much greater | ||
Only Google's 'dense_hash_map' is consistently faster, at the cost of much greater | ||
memory usage (especially when the final size of the map is not known in advance). | ||
License: BSD_3_clause + file LICENSE | ||
Encoding: UTF-8 | ||
URL: https://github.com/dselivanov/sparsepp, https://github.com/greg7mdp/ | ||
sparsepp | ||
URL: https://github.com/greg7mdp/sparsepp, https://github.com/dselivanov/sparsepp | ||
BugReports: https://github.com/dselivanov/sparsepp/issues | ||
RoxygenNote: 5.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,3 @@ | ||
// ---------------------------------------------------------------------- | ||
// Copyright (c) 2016, Gregory Popovitch - [email protected] | ||
// All rights reserved. | ||
// | ||
// This work is derived from Google's sparsehash library | ||
// | ||
// Copyright (c) 2005, Google Inc. | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are | ||
// met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// * Redistributions in binary form must reproduce the above | ||
// copyright notice, this list of conditions and the following disclaimer | ||
// in the documentation and/or other materials provided with the | ||
// distribution. | ||
// * Neither the name of Google Inc. nor the names of its | ||
// contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
// ---------------------------------------------------------------------- | ||
|
||
YEAR: 2005, 2016 | ||
COPYRIGHT HOLDER: Google Inc., Gregory Popovitch <[email protected]> | ||
ORGANIZATION: Google Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,49 @@ | ||
#' sparsepp | ||
#' | ||
#' \code{sparsepp} provides bindings to the | ||
#' \href{https://github.com/greg7mdp/sparsepp}{sparsepp} - fast, memory efficient hash map for C++ | ||
#' \href{https://github.com/greg7mdp/sparsepp}{sparsepp} - fast, memory efficient hash map for C++. | ||
#' \code{sparsepp} is an open source C++ library derived from Google's | ||
#' excellent sparsehash implementation. It aims to achieve the following objectives: | ||
#' excellent sparsehash implementation, but considerably outperform it - \url{https://github.com/greg7mdp/sparsepp/blob/master/bench.md}. | ||
#' It aims to achieve the following objectives: | ||
#' \itemize{ | ||
#' \item A drop-in alternative for unordered_map and unordered_set. | ||
#' \item Extremely low memory usage (typically about one byte overhead per entry). | ||
#' \item Very efficient, typically faster than your compiler's unordered map/set or Boost's. | ||
#' \item C++11 support (if supported by compiler). | ||
#' \item Single header implementation - just copy sparsepp.h to your project and include it. | ||
#' \item Tested on Windows (vs2010-2015, g++), linux (g++, clang++) and MacOS (clang++). | ||
#' } | ||
#' @examples | ||
#' \dontrun{ | ||
#' library(Rcpp) | ||
#' code = " | ||
#' #include <Rcpp.h> | ||
#' using namespace std; | ||
#' using namespace Rcpp; | ||
#' // drop-in replacement for unordered_map | ||
#' //#include <unordered_map> | ||
#' #include <sparsepp.h> | ||
#' using spp::sparse_hash_map; | ||
#' // @export | ||
#' // [[Rcpp::export]] | ||
#' IntegerVector word_count(CharacterVector v) { | ||
#' //unordered_map<string, int> smap; | ||
#' sparse_hash_map<string, int> smap; | ||
#' for(auto x: v) { | ||
#' smap[as<string>(x)] ++; | ||
#' } | ||
#' IntegerVector res(smap.size()); | ||
#' int i = 0; | ||
#' for(auto s:smap) { | ||
#' res[i]=s.second; | ||
#' i++; | ||
#' } | ||
#' return(res); | ||
#' }" | ||
#' f = tempfile(, fileext = ".cpp") | ||
#' writeLines(code, f) | ||
#' sourceCpp(f) | ||
#' unlink(f) | ||
#' word_count(sample(letters, 100, T)) | ||
#'} | ||
"_PACKAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.