blockwise-direct-search / bds_matlab

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

Correct the English and logic here #22

Closed zaikunzhang closed 1 year ago

zaikunzhang commented 1 year ago

https://github.com/blockwise-direct-search/bds/blob/ced8cea6d68226f5d0ee1c997a15537e7c1269bf/src/private/inner_direct_search.m#LL125C1-L135C1

  1. "Permutation" Should be "Permute".
  2. "INDEX is a nonnegative number from -1, 1, ..., length(array)." How could a nonnegative number be -1?
  3. "is boolean value" should be "is a boolean value".

Here is a revised version I suggest.

%CYCLING Permute an array according to different options
%   ARRAY = CYCLING(ARRAY, INDEX, STRATEGY, MEMORY) returns an array 
%   that is a permutation of ARRAY according to INDEX, STRATEGY, and MEMORY. 
%   
%   ARRAY is the array to permute. It must be a vector. 
%
%   INDEX is a number from -1, 1, ..., length(array). If INDEX = -1, then there is 
%   no permutation (Zaikun: What does this mean???).
%
%   MEMORY is a boolean value. If MEMORY is true, then the output ARRAY will
%   be obtained by permitting the ARRAY; otherwise, the input ARRAY will be 
%   discarded and the output ARRAY will be obtained by permuting sort(ARRAY). 
%
%   STRATEGY is a nonnegative integer from 0 to 4, indicating the strategy of the
%   permutation as follows ...

THIS IS ONLY AN EXAMPLE. Similar English/logic problems exist almost everywhere.

Please, ask (pay) Cunxin @OptHuang and / or Tom @ragonneau to check the English and logic of each line in your code! I mean it. TELL ME WHEN YOU FINISH THE CHECKING.

Lht97 commented 1 year ago

I have corrected the above problem. With the help of Grammarly and check-spelling of GitHub actions, I have solved the problems that mentioned by them.