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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/einsum_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/einsum/einsum_{{ version }}.tar.gz
  sha256: fcbc2c4dc7ac3f35cb5d738297cf01b1e50a3274f2bcd29085784d8806032305

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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-rcpp
    - r-glue
    - r-mathjaxr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-glue
    - r-mathjaxr

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

about:
  home: https://CRAN.R-project.org/package=einsum
  license: MIT
  summary: The summation notation suggested by Einstein (1916) <doi:10.1002/andp.19163540702>
    is a concise mathematical notation that implicitly sums over repeated indices of
    n-dimensional arrays. Many ordinary matrix operations (e.g. transpose, matrix multiplication,
    scalar product, 'diag()', trace etc.) can be written using Einstein notation. The
    notation is particularly convenient for expressing operations on arrays with more
    than two dimensions because the respective operators ('tensor products') might not
    have a standardized name.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: einsum
# Type: Package
# Title: Einstein Summation
# Version: 0.1.0
# Authors@R: person("Constantin", "Ahlmann-Eltze", email = "artjom31415@googlemail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3762-068X"))
# Description: The summation notation suggested by Einstein (1916) <doi:10.1002/andp.19163540702> is a concise mathematical notation that implicitly sums over repeated indices of n-dimensional arrays. Many ordinary matrix operations (e.g. transpose, matrix multiplication, scalar product, 'diag()', trace etc.) can be written using Einstein notation. The notation is particularly convenient for expressing operations on arrays with more than two dimensions because the respective operators ('tensor products') might not have a standardized name.
# License: MIT + file LICENSE
# Encoding: UTF-8
# SystemRequirements: C++11
# Suggests: testthat, covr
# RdMacros: mathjaxr
# RoxygenNote: 7.1.1
# LinkingTo: Rcpp
# Imports: Rcpp, glue, mathjaxr
# NeedsCompilation: yes
# Packaged: 2021-05-15 21:32:03 UTC; ahlmanne
# Author: Constantin Ahlmann-Eltze [aut, cre] (<https://orcid.org/0000-0002-3762-068X>)
# Maintainer: Constantin Ahlmann-Eltze <artjom31415@googlemail.com>
# Repository: CRAN
# Date/Publication: 2021-05-18 07:00:08 UTC
