Skip to content

Commit

Permalink
Merge pull request #5 from nlmixr2/4-cran-format
Browse files Browse the repository at this point in the history
4 cran format
  • Loading branch information
mattfidler authored Nov 28, 2023
2 parents 83dd432 + e144ff5 commit ca2b8e3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ Package: lbfgsb3c
Type: Package
Title: Limited Memory BFGS Minimizer with Bounds on Parameters with
optim() 'C' Interface
Version: 2020-3.2
Version: 2020-3.3
Authors@R: c(person(given = c("Matthew", "L"), family = "Fidler", role =
c("aut", "cre"), email = "matthew.fidler@gmail.com"),
person(given = c("John", "C"), family = "Nash", role =
c("aut"), email = "nashjc@uottawa.ca"),
person(given = "Ciyou", family = "Zhu", role = "aut"),
person(given = "Richard", family = "Byrd", role = "aut"),
person(given = "Ciyou", family = "Zhu", role = "aut"),
person(given = "Richard", family = "Byrd", role = "aut"),
person(given = "Jorge", family = "Nocedal", role = "aut"),
person(given = c("Jose", "Luis"), family = "Morales", role = "aut"))
Maintainer: Matthew L Fidler <matthew.fidler@gmail.com>
Description: Interfacing to Nocedal et al. L-BFGS-B.3.0
Description: Interfacing to Nocedal et al. L-BFGS-B.3.0
(See <http://users.iems.northwestern.edu/~nocedal/lbfgsb.html>)
limited memory BFGS minimizer with bounds on parameters.
This is a fork of 'lbfgsb3'.
This registers a 'R' compatible 'C' interface to L-BFGS-B.3.0 that uses the same
limited memory BFGS minimizer with bounds on parameters.
This is a fork of 'lbfgsb3'.
This registers a 'R' compatible 'C' interface to L-BFGS-B.3.0 that uses the same
function types and optimization as the optim() function (see writing 'R' extensions
and source for details). This package also adds more stopping criteria as well
and source for details). This package also adds more stopping criteria as well
as allowing the adjustment of more tolerances.
License: GPL-2
Depends: R (>= 3.6)
Expand Down
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# lbfgsb3c development changes
# lbfgsb3c 2020-3.3 changes

* Now allow `rho=NULL` to work the same as if `rho` was not supplied

* Be More careful about `$convergence` by adding a default value of `NA_INTEGER`

* `$convergence` is now an integer instead of a real number

* Fix too many arguments for format as requested by CRAN

* Added a `NEWS.md` file to track changes to the package.

# News before lbfgsb3c
# lbfgsb3c 2020-3.2 prior changes and information

To do

Expand Down
6 changes: 3 additions & 3 deletions src/lbfgsb3x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern "C" void lbfgsb3C_(int n, int lmm, double *x, double *lower,
itask2=27;
itask=3; // Stop -- gives the right results and restores gradients
if (trace > 2){
Rprintf("CONVERGENCE: Parameters differences below xtol.\n", maxit);
Rprintf("CONVERGENCE: Parameters differences below xtol.\n");
}
doExit=1;
}
Expand Down Expand Up @@ -263,7 +263,7 @@ Rcpp::List lbfgsb3cpp(NumericVector par, Function fn, Function gr, NumericVector
1 if x(i) has only a lower bound,
2 if x(i) has both lower and upper bounds,
3 if x(i) has only an upper bound.
*/
*/
nbd[i] = 0;
if (R_FINITE(low[i])) nbd[i] = 1;
if (R_FINITE(up[i])) nbd[i] = 3 - nbd[i];
Expand Down Expand Up @@ -346,7 +346,7 @@ Rcpp::List lbfgsb3cpp(NumericVector par, Function fn, Function gr, NumericVector
taskList[24]="WARNING: STP .eq. STPMIN"; // 25
taskList[25]="WARNING: XTOL TEST SATISFIED"; //
taskList[26] = "CONVERGENCE: Parameters differences below xtol";
taskList[27] = "Maximum number of iterations reached";
taskList[27] = "Maximum number of iterations reached";

ret["message"]= CharacterVector::create(taskList[fail-1]);
if (addInfo) ret["info"] = lbfgsb3Cinfo;
Expand Down

0 comments on commit ca2b8e3

Please sign in to comment.