pele-python / mcpele

Monte Carlo and parallel tempering routines built on the pele foundation
Other
20 stars 5 forks source link

reorganize one iteration #11

Closed js850 closed 10 years ago

js850 commented 10 years ago

move all the loops to separate functions

add a whole bunch of tests

use c++ range based for loops

kjs73 commented 10 years ago

Looks good to me (and makes the code much clearer and safer)!

Maybe valgrind or something could complain about the deletes in class TestMCMock: public ::testing::Test ?

Should this maybe delete the rest as well, such as ct = new TrivialConfTest(true); lct = new TrivialConfTest(true); at = new TrivialAcceptTest(true); ts = new TrivialTakestep(); a = new TrivialAction(); ?

smcantab commented 10 years ago

They are casted to shared pointers when passed to mc, so mc should take ownership of the memory and take care to delete.

js850 commented 10 years ago

Exactly, the shared ptrs take ownership of the memory On 5 Jul 2014 09:16, "smcantab" notifications@github.com wrote:

They are casted to shared pointers when passed to mc, so mc should take ownership of the memory and take care to delete.

Reply to this email directly or view it on GitHub https://github.com/pele-python/mcpele/pull/11#issuecomment-48081007.

js850 commented 10 years ago

thanks for the feedback!