Created
November 22, 2012 11:29
-
-
Save pgrm/4130686 to your computer and use it in GitHub Desktop.
AMPP - weired max
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max=MAX3(diag,down,right); | |
if (max <= 0) { | |
h[i][j]=0; | |
xTraceback[i][j]=-1; | |
yTraceback[i][j]=-1; | |
// these values already -1 | |
} | |
else if (max == diag) { | |
h[i][j]=diag; | |
xTraceback[i][j]=i-1; | |
yTraceback[i][j]=j-1; | |
} | |
else if (max == down) { | |
h[i][j]=down;0 | |
xTraceback[i][j]=i-1; | |
yTraceback[i][j]=j; | |
} | |
else { | |
h[i][j]=right; | |
xTraceback[i][j]=i; | |
yTraceback[i][j]=j-1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment