RcppLbfgsBlaze-package | R Documentation |
RcppLbfgsBlaze constructs a simple interface to the L-BFGS algorithm based on Blaze for R and Rcpp.
This package provides an implementation of the L-BFGS algorithm based on Blaze for R and Rcpp. The L-BFGS algorithm is a popular optimization algorithm for unconstrained optimization problems. Blaze is a high-performance C++ math library for dense and sparse arithmetic. The package provides a simple interface to the L-BFGS algorithm and allows users to optimize their objective functions with Blaze vectors and matrices in R and Rcpp.
The simplest way to get started is to create a skeleton of a package using RcppLbfgsBlaze.
The important steps are
Include the ‘RcppBlaze.h’ and ‘lbfgs.h’ header files.
Import Rcpp
. LinkingTo Rcpp
, RcppBlaze
and RcppLbfgsBlaze
by adding these lines to the ‘DESCRIPTION’ file:
Imports: Rcpp (>= 1.0.0) LinkingTo: Rcpp, RcppBlaze (>= 1.0.0), RcppLbfgsBlaze
Link against the BLAS
and LAPACK
libraries, by adding following two lines in the ‘Makevars’ and ‘Makevars.win’ files:
PKG_CXXFLAGS=$(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)
For RcppLbfgsBlaze: Ching-Chuan Chen Maintainer: Ching-Chuan Chen <zw12356@gmail.com>
Blaze project: https://bitbucket.org/blaze-lib/blaze.
LBFGS-blaze: https://github.com/ChingChuan-Chen/LBFGS-blaze
LBFGS-Lite: https://github.com/ZJU-FAST-Lab/LBFGS-Lite
liblbfgs: https://github.com/chokkan/liblbfgs
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.