blockwise-direct-search / bds

Blockwise Direct Search
GNU General Public License v3.0
1 stars 1 forks source link

The implementation of DSPD is wrong #58

Closed zaikunzhang closed 10 months ago

zaikunzhang commented 1 year ago

https://github.com/blockwise-direct-search/bds/blob/893667e4590d91c068225a98dfabc862c01705d9/src/bds.m#L279-L290

This part is (still) wrong.

@OptHuang You should know this algorithm well enough to implement it correctly.

OptHuang commented 1 year ago

Dear Prof. Zhang,

Thanks for your reminder. First, now I know what is wrong after reading Haitian's comments and I will tell Haitian how to modify it. Second, today we two only checked and corrected comments in "src" for 3.5 hrs. Thank you again.

Best regards, Cunxin

zaikunzhang commented 1 year ago

First things first: MATLAB does not support loops (just imagine it in that way). Any loop is wrong. A MATLAB programmer should always keep this in mind. This applies to any scripting language (check what this means), including Python. Understand?

However, this is not the major mistake of the current implementation.

OptHuang commented 1 year ago

Yes, you are right. Noted with thanks.

First things first: MATLAB does not support loops (just imagine it in that way). Any loop is wrong. A MATLAB programmer should always keep this in mind. This applies to any scripting language (check what this means), including Python. Understand?

However, this is not the major mistake of the current implementation.

Lht97 commented 11 months ago

Thanks to Dr. Zhang and Cunxin, I have corrected the way of obtaining the searching set in DSPD correctly by https://github.com/blockwise-direct-search/bds/blob/e7bf674ecda6790e7051808840688cb03f8306c9/tests/competitors/dspd.m#L224

Lht97 commented 10 months ago

I have implemented DSPD separately and correctly under the discussion of Cunxin and Dr. Zhang.