Skip to content

Commit 3de5488

Browse files
committed
Fixed C++ syntax warning.
Former-commit-id: f275d0d
1 parent 561cf11 commit 3de5488

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Encoding: UTF-8
22
Type: Package
33
Package: mixsqp
4-
Version: 0.2-0
4+
Version: 0.2-1
55
Date: 2019-10-15
66
Title: Sequential Quadratic Programming for Fast Maximum-Likelihood
77
Estimation of Mixture Proportions

R/mixsqp.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ mixsqp <- function (L, w = rep(1,nrow(L)), x0 = rep(1,ncol(L)),
382382

383383
# Print a brief summary of the analysis, if requested.
384384
if (verbose) {
385-
cat(sprintf("Running mix-SQP algorithm 0.2-0 on %d x %d matrix\n",n,m))
385+
cat(sprintf("Running mix-SQP algorithm 0.2-1 on %d x %d matrix\n",n,m))
386386
cat(sprintf("convergence tol. (SQP): %0.1e\n",convtol.sqp))
387387
cat(sprintf("conv. tol. (active-set): %0.1e\n",convtol.activeset))
388388
cat(sprintf("zero threshold (solution): %0.1e\n",zero.threshold.solution))

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ in the shell:
140140

141141
```bash
142142
R CMD build mixsqp
143-
R CMD INSTALL mixsqp_0.2-0.tar.gz
144-
R CMD check --as-cran mixsqp_0.2-0.tar.gz
143+
R CMD INSTALL mixsqp_0.2-1.tar.gz
144+
R CMD check --as-cran mixsqp_0.2-1.tar.gz
145145
```
146146

147147
Note that these commands require that the dependencies have already

src/mixsqp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ void backtrackinglinesearch (double f, const mat& L, const vec& w,
374374
// Check whether the new candidate solution (y) satisfies the
375375
// sufficient decrease condition, and remains feasible. If so,
376376
// accept this candidate solution.
377-
if (y.min() >= 0 &
378-
fnew + sum(y) <= f + sum(x) + suffdecr*stepsize*dot(p,g + 1))
377+
if ((y.min() >= 0) &
378+
(fnew + sum(y) <= f + sum(x) + suffdecr*stepsize*dot(p,g + 1)))
379379
break;
380380
newstepsize = stepsizereduce * stepsize;
381381
if (newstepsize < minstepsize) {

0 commit comments

Comments
 (0)