hybrid engine: consistently use delete[] when destroying solution vectors
Technically, using 'plain' delete for deleting objects allocated with
new[] is undefined behaviour. In practice, this didn't appear to be a
problem.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11787 bbc10eb1-c90d-0410-af57-cb519fbb1720
PH_PrintToMainLog(env,"\n%s: %d iterations in %.2f seconds (average %.6f, setup %.2f)\n",(omega==1.0)?"Jacobi":"JOR",iters,time_taken,time_for_iters/iters,time_for_setup);
PH_PrintToMainLog(env,"\n%s: %d iterations in %.2f seconds (average %.6f, setup %.2f)\n",(omega==1.0)?"Jacobi":"JOR",iters,time_taken,time_for_iters/iters,time_for_setup);
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
// catch exceptions: register error, free memory
// catch exceptions: register error, free memory
}catch(std::bad_alloce){
}catch(std::bad_alloce){
@ -337,8 +337,8 @@ jboolean min // min or max probabilities (true = min, false = max)
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
// catch exceptions: register error, free memory
// catch exceptions: register error, free memory
}catch(std::bad_alloce){
}catch(std::bad_alloce){
@ -285,8 +285,8 @@ jboolean min // min or max probabilities (true = min, false = max)
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
// if the iterative method didn't terminate, this is an error
// if the iterative method didn't terminate, this is an error
if(!done){deletesoln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}
if(!done){delete[]soln;soln=NULL;PH_SetErrorMessage("Iterative method did not converge within %d iterations.\nConsider using a different numerical method or increasing the maximum number of iterations",iters);}