Skip to content

Commit

Permalink
getting ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
BertvanderVeen committed Jun 20, 2024
1 parent 3d69b46 commit abca6df
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ 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.
License: GPL (>= 2)
Encoding: UTF-8
RoxygenNote: 7.3.1
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Generated by roxygen2: do not edit by hand

S3method(print,rnewton)
export(rnewton)
exportPattern("^[[:alpha:]]+")
importFrom(Rcpp,evalCpp)
useDynLib(optic)
1 change: 0 additions & 1 deletion R/rnewton.print.R → R/print.rnewton.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#'@export
print.rnewton <- function(x, ...){
x$info <- switch(as.character(x$info), "1" = "1: gradient tolerance reached." , "2"= "2: maximum number of unsuccesful iterations reached.", "3"="3: insufficient improved in objective function (ran into tol.obj).", "4"="4: reached regularisation limit (ran into tol.mu2).", "5"="5: reached maximum interations.")
cat(" Code", x$info, "\n")
Expand Down
9 changes: 6 additions & 3 deletions man/rnewton.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/optic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Rcpp::List rnewt(const Eigen::VectorXd &x0,
Rcpp::Named("info")=Rcpp::wrap(info),
Rcpp::Named("maxgr")=Rcpp::wrap(grmax)
);
}else if(returnhess){
}else{
if(quasi && (method == 1 | method == 2 | method == 3)){
if(verbose)Rcpp::Rcout << "Calculating hessian..." << std::endl;
hess = gamma*MatrixXd::Identity(x.rows(),x.rows()) + A*Q.lu().solve(A.transpose());
Expand Down

0 comments on commit abca6df

Please sign in to comment.