matrix - Understanding an algorithm that searches for a maximum-sum subsequence -


I am struggling with an algorithm that resolves. This algorithm, already fully programmed, can be found.

Within this particular algorithm, I do not understand why the programmer wrote code for a diagonal 2 direction and why the anti diagonal 2 direction Is it necessary to see from a programming point of view? I can not think of any mathematical reason!

(1) horizontal, (2) vertical, (3) diagonal and (2), why not only to see why 4) anti diagonal directions ?? We are finally working with a nxn matrix (class) ...

Tell me your thoughts on this in the meantime I am awaiting a reply from the author.

Yes, this is just an implementation description. It still appears in only 4 directions, it is necessary because a diagonal may end in either the last line and in some columns or last columns and in some lines.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -