{% set version = "0.2.6" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-paralleldist
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/parallelDist_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/parallelDist/parallelDist_{{ version }}.tar.gz
  sha256: 30c6b3b85cf78c04a7dcd17ea7ed64356971f6ce48d15794078a18c53b249e06

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.6
    - r-rcpparmadillo
    - r-rcppparallel >=4.3.20
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.6
    - r-rcpparmadillo
    - r-rcppparallel >=4.3.20
    - libopenblas

test:
  commands:
    - $R -e "library('parallelDist')"           # [not win]
    - "\"%R%\" -e \"library('parallelDist')\""  # [win]

about:
  home: https://github.com/alexeckert/parallelDist, https://www.alexandereckert.com/R
  license: GPL-2.0-or-later
  summary: A fast parallelized alternative to R's native 'dist' function to calculate distance matrices for continuous, binary, and multi-dimensional input matrices, which supports a broad variety of 41 predefined distance functions from the 'stats', 'proxy' and 'dtw' R packages, as well as user- defined functions written
    in C++. For ease of use, the 'parDist' function extends the signature of the 'dist' function and uses the same parameter naming conventions as distance methods of existing R packages. The package is mainly implemented in C++ and leverages the 'RcppParallel' package to parallelize the distance computations with the help
    of the 'TinyThread' library. Furthermore, the 'Armadillo' linear algebra library is used for optimized matrix operations during distance calculations. The curiously recurring template pattern (CRTP) technique is applied to avoid virtual functions, which improves the Dynamic Time Warping calculations while the implementation
    stays flexible enough to support different DTW step patterns and normalization methods.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - alexeckert
    - zdk123

# Package: parallelDist
# Type: Package
# Title: Parallel Distance Matrix Computation using Multiple Threads
# Version: 0.2.4
# Author: Alexander Eckert [aut, cre], Lucas Godoy [ctb], Srikanth KS [ctb]
# Authors@R: c( person("Alexander", "Eckert", role = c("aut", "cre"), email = "info@alexandereckert.com"), person("Lucas", "Godoy", role = "ctb", email = "lucasdac.godoy@gmail.com"), person("Srikanth", "KS", role = "ctb", email = "sri.teach@gmail.com") )
# Maintainer: Alexander Eckert <info@alexandereckert.com>
# Description: A fast parallelized alternative to R's native 'dist' function to calculate distance matrices for continuous, binary, and multi-dimensional input matrices, which supports a broad variety of 41 predefined distance functions from the 'stats', 'proxy' and 'dtw' R packages, as well as user- defined functions written in C++. For ease of use, the 'parDist' function extends the signature of the 'dist' function and uses the same parameter naming conventions as distance methods of existing R packages. The package is mainly implemented in C++ and leverages the 'RcppParallel' package to parallelize the distance computations with the help of the 'TinyThread' library. Furthermore, the 'Armadillo' linear algebra library is used for optimized matrix operations during distance calculations. The curiously recurring template pattern (CRTP) technique is applied to avoid virtual functions, which improves the Dynamic Time Warping calculations while the implementation stays flexible enough to support different DTW step patterns and normalization methods.
# License: GPL (>= 2)
# LazyData: TRUE
# URL: https://github.com/alexeckert/parallelDist, https://www.alexandereckert.com/R
# BugReports: https://github.com/alexeckert/parallelDist/issues
# NeedsCompilation: yes
# Depends: R (>= 3.0.2)
# Imports: Rcpp (>= 0.12.6), RcppParallel (>= 4.3.20)
# LinkingTo: Rcpp, RcppParallel, RcppArmadillo
# SystemRequirements: C++11
# Suggests: dtw, ggplot2, proxy, testthat, RcppArmadillo, RcppXPtrUtils
# Packaged: 2018-12-12 21:13:09 UTC; alex
# Repository: CRAN
# Date/Publication: 2018-12-12 22:50:02 UTC
