Skip to content

Commit

Permalink
change name again
Browse files Browse the repository at this point in the history
  • Loading branch information
BertvanderVeen committed Jun 20, 2024
1 parent 9f9961a commit 7c066c5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 328 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: optic
Package: minic
Type: Package
Title: Optimization for ill-conditioned problems
Title: Minimization Methods for Ill-Conditioned Problems
Version: 1.0
Date: 2024-05-27
Author: Bert van der Veen
Maintainer: Bert van der Veen <[email protected]>
Description: A package for the optimization of ill-condition problems. Currently only implements regularized newton optimization.
Description: A package for the minimization of ill-condition problems. Currently only implements regularized newton optimization.
License: GPL (>= 2)
Encoding: UTF-8
RoxygenNote: 7.3.1
Imports: Rcpp (>= 1.0.12)
LinkingTo: Rcpp, RcppEigen
URL: https://github.com/BertvanderVeen/rnewt
BugReports: https://github.com/BertvanderVeen/rnewt/issues
URL: https://github.com/BertvanderVeen/minic
BugReports: https://github.com/BertvanderVeen/minic/issues
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
S3method(print,rnewton)
export(rnewton)
importFrom(Rcpp,evalCpp)
useDynLib(optic)
useDynLib(minic)
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

rnewt <- function(x0, fn, gr, he, gr0, d0, quasi, method, maxit, m, mu0, sigma1, sigma2, c1, c2, pmin, tolg, tolgamma, tolobj, tolmu, tolmu2, tolc, maxreject, grdre, verbose, riter, returnhess) {
.Call('_optic_rnewt', PACKAGE = 'optic', x0, fn, gr, he, gr0, d0, quasi, method, maxit, m, mu0, sigma1, sigma2, c1, c2, pmin, tolg, tolgamma, tolobj, tolmu, tolmu2, tolc, maxreject, grdre, verbose, riter, returnhess)
.Call('_minic_rnewt', PACKAGE = 'minic', x0, fn, gr, he, gr0, d0, quasi, method, maxit, m, mu0, sigma1, sigma2, c1, c2, pmin, tolg, tolgamma, tolobj, tolmu, tolmu2, tolc, maxreject, grdre, verbose, riter, returnhess)
}

2 changes: 0 additions & 2 deletions R/rnewton.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#'@aliases rnewt rnewton
#' @useDynLib optic
#' @export
#' @importFrom Rcpp evalCpp
#' @exportPattern "^[[:alpha:]]+"
#'
rnewton <-function(x0, fn, gr, he = NULL,
quasi = TRUE, method = "LBFGS", verbose = FALSE, return.hess = FALSE, control = list(maxit = 1e3, m = 5, sigma1 = 0.5, sigma2 = 4, c1 = 1e-3, c2 = 0.9, pmin = 1e-3, tol.g = 1e-8, tol.gamma = 1e-5, tol.obj = 1e-8, tol.mu = 1e-4, tol.mu2 = 1e15, tol.c = 1e-8, report.iter = 10, grad.reject = FALSE, max.reject = 50, mu0 = 5), ...){
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Minimization of ill-conditioned problems
# Minimization for ill-conditioned problems
## Regularized quasi-Newton optimisation
Currently the only function, `rnewt` implements general-purpose regularized quasi-Newton optimisation routines as presented in [Kanzow and Steck (2023)](https://link.springer.com/article/10.1007/s12532-023-00238-4). The C++ code is written from scratch, and the More-Thuente linesearch script is an R-port specifically written for this implementation, but translated from [the python implementation associated to the article](https://github.com/dmsteck/paper-regularized-qn-benchmark/blob/d6777fa872bebcc38ebe2d7aa9dc21862d3b7ffd/utility/morethuente.py#L4).

Expand Down
6 changes: 3 additions & 3 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();

// rnewt
Rcpp::List rnewt(const Eigen::VectorXd& x0, Rcpp::Function fn, Rcpp::Function gr, Rcpp::Function he, const Eigen::MatrixXd& gr0, const Eigen::MatrixXd& d0, const bool& quasi, const int& method, const int& maxit, const int& m, double& mu0, const double& sigma1, const double& sigma2, const double& c1, const double& c2, const double& pmin, const double& tolg, const double& tolgamma, const double& tolobj, const double& tolmu, const double& tolmu2, const double& tolc, const int& maxreject, const bool& grdre, const bool& verbose, const int& riter, const bool& returnhess);
RcppExport SEXP _optic_rnewt(SEXP x0SEXP, SEXP fnSEXP, SEXP grSEXP, SEXP heSEXP, SEXP gr0SEXP, SEXP d0SEXP, SEXP quasiSEXP, SEXP methodSEXP, SEXP maxitSEXP, SEXP mSEXP, SEXP mu0SEXP, SEXP sigma1SEXP, SEXP sigma2SEXP, SEXP c1SEXP, SEXP c2SEXP, SEXP pminSEXP, SEXP tolgSEXP, SEXP tolgammaSEXP, SEXP tolobjSEXP, SEXP tolmuSEXP, SEXP tolmu2SEXP, SEXP tolcSEXP, SEXP maxrejectSEXP, SEXP grdreSEXP, SEXP verboseSEXP, SEXP riterSEXP, SEXP returnhessSEXP) {
RcppExport SEXP _minic_rnewt(SEXP x0SEXP, SEXP fnSEXP, SEXP grSEXP, SEXP heSEXP, SEXP gr0SEXP, SEXP d0SEXP, SEXP quasiSEXP, SEXP methodSEXP, SEXP maxitSEXP, SEXP mSEXP, SEXP mu0SEXP, SEXP sigma1SEXP, SEXP sigma2SEXP, SEXP c1SEXP, SEXP c2SEXP, SEXP pminSEXP, SEXP tolgSEXP, SEXP tolgammaSEXP, SEXP tolobjSEXP, SEXP tolmuSEXP, SEXP tolmu2SEXP, SEXP tolcSEXP, SEXP maxrejectSEXP, SEXP grdreSEXP, SEXP verboseSEXP, SEXP riterSEXP, SEXP returnhessSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand Down Expand Up @@ -50,11 +50,11 @@ END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"_optic_rnewt", (DL_FUNC) &_optic_rnewt, 27},
{"_minic_rnewt", (DL_FUNC) &_minic_rnewt, 27},
{NULL, NULL, 0}
};

RcppExport void R_init_optic(DllInfo *dll) {
RcppExport void R_init_minic(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
Binary file removed src/RcppExports.o
Binary file not shown.
315 changes: 0 additions & 315 deletions src/optic.cpp

This file was deleted.

0 comments on commit 7c066c5

Please sign in to comment.