Coder Social home page Coder Social logo

tnagler / rcppeigen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rcppcore/rcppeigen

0.0 0.0 0.0 6.93 MB

Rcpp integration for the Eigen templated linear algebra library

License: Other

Shell 0.01% C++ 96.77% C 0.97% R 0.75% TeX 1.49% Makefile 0.01%

rcppeigen's Introduction

RcppEigen: R and Eigen via Rcpp

CI License License CRAN r-universe Dependencies Coverage Status Debian package Last Commit Downloads (monthly) Downloads (total) CRAN use BioConductor use StackOverflow JSS

Synopsis

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers and related algorithms. It supports dense and sparse matrices on integer, floating point and complex numbers, decompositions of such matrices, and solutions of linear systems. Its performance on many algorithms is comparable with some of the best implementations based on Lapack and level-3 BLAS.

RcppEigen provides an interface from R to and from Eigen by using the facilities offered by the Rcpp package for seamless R and C++ integration.

Examples

A few examples are over at the Rcpp Gallery. A simple one is

#include <RcppEigen.h>

// [[Rcpp::depends(RcppEigen)]]

using Eigen::Map;                       // 'maps' rather than copies
using Eigen::MatrixXd;                  // variable size matrix, double precision
using Eigen::VectorXd;                  // variable size vector, double precision
using Eigen::SelfAdjointEigenSolver;    // one of the eigenvalue solvers

// [[Rcpp::export]]
VectorXd getEigenValues(Map<MatrixXd> M) {
    SelfAdjointEigenSolver<MatrixXd> es(M);
    return es.eigenvalues();
}

which can be turned into a function callable from R via a simple

sourceCpp("eigenExample.cpp")

due to the two Rcpp directives to use headers from the RcppEigen package, and to export the getEigenValues() function -- but read the full post for details.

Status

The package is mature and under active development, following the Eigen release cycle.

Documentation

The package contains a pdf vignette which is a pre-print of the paper by Bates and Eddelbuettel in JSS (2013, v52i05).

Authors

Douglas Bates, Dirk Eddelbuettel, Romain Francois, and Yixuan Qiu

License

GPL (>= 2)

rcppeigen's People

Contributors

eddelbuettel avatar dmbates avatar yixuan avatar romainfrancois avatar jaganmn avatar coatless avatar rstub avatar michaelweylandt avatar chingchuan-chen avatar alyst avatar jgabry avatar mmaechler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.