blockwise-direct-search / bds_matlab

Blockwise Direct Search (MATLAB version)
GNU General Public License v3.0
1 stars 1 forks source link

Remember to come back to the original directory before finishing the test #25

Closed zaikunzhang closed 1 year ago

zaikunzhang commented 1 year ago

Whenever you use cd to change the path, you should remember to go back to the original directory before finishing the test.

Mathematically speaking, cd should always be invoked for an even number of times.

See the following for an example.

https://github.com/libprima/prima/blob/main/matlab/tests/profile.m

Similarly, if you change the warning state, you should restore it to the original state when appropriate. If you change the rng, you should restore it to the original state when appropriate. See the following for another example

https://github.com/libprima/prima/blob/main/matlab/tests/private/isequiv.m

Search for "restore" and you will see what I mean.

Discuss with Cunxin @OptHuang if this is not clear to you.

Lht97 commented 1 year ago

I have implemented the above effect for cd and restore in https://github.com/blockwise-direct-search/bds/blob/main/tests/profile.m