Skip to content

Commit

Permalink
BUG: Move convergence monitoring outside verbose loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntustison committed May 10, 2023
1 parent 14996a7 commit 6121db6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/landmarkTransforms.R
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ fitTransformToPairedPoints <- function(
updatedFixedPoints <- applyAntsrTransformToPoint( totalFieldXfrm, fixedPoints )
}

error <- mean( sqrt( rowSums( ( updatedFixedPoints - updatedMovingPoints )^2 ) ) )
errorValues <- append( errorValues, error )
convergenceValue <- convergenceMonitoring( errorValues )
if( verbose )
{
error <- mean( sqrt( rowSums( ( updatedFixedPoints - updatedMovingPoints )^2 ) ) )
errorValues <- append( errorValues, error )
convergenceValue <- convergenceMonitoring( errorValues )
endTime <- Sys.time()
diffTime <- endTime - startTime
cat( "Composition ", i, ": error = ", error, " (convergence = ", convergenceValue, ", elapsed time = ", diffTime, ")\n", sep = "" )
Expand Down

0 comments on commit 6121db6

Please sign in to comment.