Skip to content

Commit bcd42ba

Browse files
committed
added badge and edited README.md
1 parent d32246e commit bcd42ba

File tree

3 files changed

+56
-18
lines changed

3 files changed

+56
-18
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ indent_size = 4
1919
[Makefile]
2020
indent_style = tab
2121

22+
[README.md]
23+
trim_trailing_whitespace = false

ChangeLog

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2020-03-29 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* README.md: Added commit badge, edited
4+
15
2020-01-22 Dirk Eddelbuettel <edd@debian.org>
26

37
* README.md: README.md: Add a Debian badge
@@ -11,7 +15,7 @@
1115
* patches/eigen-3.3.7.diff: Carried local CRAN patches forward
1216

1317
2019-11-01 Dirk Eddelbuettel <edd@debian.org>
14-
18+
1519
* R/unit.test.R (compile_unit_tests): Removed as no longer needed
1620

1721
2019-10-31 Dirk Eddelbuettel <edd@debian.org>
@@ -45,7 +49,7 @@
4549

4650
* cpp/rcppeigen.cpp: Added using Rcpp Attributes
4751
* cpp/solution.cpp: Idem
48-
52+
4953
2019-10-28 Dirk Eddelbuettel <edd@debian.org>
5054

5155
* tests/tinytest.R: Renamed from tests/doRUnit.R

README.md

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,60 @@
1-
## RcppEigen
1+
## RcppEigen: Rcpp Integration for the Eigen Templated Linear Algebra Library
22

3-
[![Build Status](https://travis-ci.org/RcppCore/RcppEigen.svg)](https://travis-ci.org/RcppCore/RcppEigen)
4-
[![License](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
5-
[![License](http://img.shields.io/badge/license-MPL2-brightgreen.svg?style=flat)](http://www.mozilla.org/MPL/2.0/)
6-
[![CRAN](http://www.r-pkg.org/badges/version/RcppEigen)](https://cran.r-project.org/package=RcppEigen)
3+
[![Build Status](https://travis-ci.org/RcppCore/RcppEigen.svg)](https://travis-ci.org/RcppCore/RcppEigen)
4+
[![License](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
5+
[![License](http://img.shields.io/badge/license-MPL2-brightgreen.svg?style=flat)](http://www.mozilla.org/MPL/2.0/)
6+
[![CRAN](http://www.r-pkg.org/badges/version/RcppEigen)](https://cran.r-project.org/package=RcppEigen)
77
[![Dependencies](https://tinyverse.netlify.com/badge/RcppEigen)](https://cran.r-project.org/package=RcppEigen)
8-
[![Debian package](https://img.shields.io/debian/v/r-cran-rcppeigen/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-rcppeigen)
8+
[![Debian package](https://img.shields.io/debian/v/r-cran-rcppeigen/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-rcppeigen)
9+
[![Last Commit](https://img.shields.io/github/last-commit/RcppCore/RcppEigen)](https://github.com/RcppCore/RcppEigen)
910
[![Downloads](http://cranlogs.r-pkg.org/badges/RcppEigen?color=brightgreen)](http://www.r-pkg.org/pkg/RcppEigen)
1011
[![CRAN use](https://jangorecki.gitlab.io/rdeps/RcppEigen/CRAN_usage.svg?sanitize=true)](https://cran.r-project.org/package=RcppEigen)
1112
[![BioConductor use](https://jangorecki.gitlab.io/rdeps/RcppEigen/BioC_usage.svg?sanitize=true)](https://cran.r-project.org/package=RcppEigen)
1213
[![StackOverflow](https://img.shields.io/badge/stackoverflow-rcpp-orange.svg)](https://stackoverflow.com/questions/tagged/rcpp)
1314

14-
### Overview
15+
### Synopsis
1516

16-
[Eigen](http://eigen.tuxfamily.org) is a C++ template library for linear
17-
algebra: matrices, vectors, numerical solvers and related algorithms. It
18-
supports dense and sparse matrices on integer, floating point and complex
19-
numbers, decompositions of such matrices, and solutions of linear
20-
systems. Its performance on many algorithms is comparable with some of the
21-
best implementations based on `Lapack` and level-3 `BLAS`.
17+
[Eigen](http://eigen.tuxfamily.org) is a C++ template library for linear algebra:
18+
matrices, vectors, numerical solvers and related algorithms. It supports dense and sparse
19+
matrices on integer, floating point and complex numbers, decompositions of such matrices,
20+
and solutions of linear systems. Its performance on many algorithms is comparable with
21+
some of the best implementations based on `Lapack` and level-3 `BLAS`.
22+
23+
RcppEigen provides an interface from R to and from [Eigen](http://eigen.tuxfamily.org) by
24+
using the facilities offered by the [Rcpp](http://dirk.eddelbuettel.com/code/rcpp.html)
25+
package for seamless R and C++ integration.
26+
27+
### Examples
28+
29+
A few examples are over at the [Rcpp Gallery](http://gallery.rcpp.org/tags/eigen/). A simple one is
30+
31+
```c++
32+
#include <RcppEigen.h>
33+
34+
// [[Rcpp::depends(RcppEigen)]]
35+
36+
using Eigen::Map; // 'maps' rather than copies
37+
using Eigen::MatrixXd; // variable size matrix, double precision
38+
using Eigen::VectorXd; // variable size vector, double precision
39+
using Eigen::SelfAdjointEigenSolver; // one of the eigenvalue solvers
40+
41+
// [[Rcpp::export]]
42+
VectorXd getEigenValues(Map<MatrixXd> M) {
43+
SelfAdjointEigenSolver<MatrixXd> es(M);
44+
return es.eigenvalues();
45+
}
46+
```
47+
48+
which can be turned into a function callable from R via a simple
49+
50+
```
51+
sourceCpp("eigenExample.cpp")
52+
```
53+
54+
due to the two Rcpp directives to use headers from the RcppEigen package, and to export
55+
the `getEigenValues()` function -- but read [the full
56+
post](http://gallery.rcpp.org/articles/eigen-eigenvalues/) for details.
2257
23-
The RcppEigen package includes the header files from the Eigen C++
24-
template library (currently version 3.3.5). Thus users do not need to
25-
install Eigen itself in order to use RcppEigen.
2658
2759
### Status
2860

0 commit comments

Comments
 (0)