oxirane has asked for the wisdom of the Perl Monks concerning the following question:
I was exploring some of the dynamic alignment programs for protein and DNA used by biologists and came across a data construct that I didn't understand...could someone explain the square bracket/square bracket/curly bracket reference construct and comment on it being a good/bad way to go about dynamic matrix declaration
@matrix; $matrix[0][0]{score} = 0; $matrix[0][0]{pointer} = "none"; for($j = 1; $j <= length($seq1); $j++) { $matrix[0][$j]{score} = 0; $matrix[0][$j]{pointer} = "none"; } for ($i = 1; $i <= length($seq2); $i++) { $matrix[$i][0]{score} = 0; $matrix[$i][0]{pointer} = "none";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matrix Declaration / Data Structure Syntax Question
by kcott (Archbishop) on Mar 10, 2013 at 00:49 UTC | |
|
Re: Matrix Declaration / Data Structure Syntax Question
by bioinformatics (Friar) on Mar 09, 2013 at 17:32 UTC | |
|
Re: Matrix Declaration / Data Structure Syntax Question
by AnomalousMonk (Archbishop) on Mar 09, 2013 at 18:51 UTC | |
|
Re: Matrix Declaration / Data Structure Syntax Question
by CountZero (Bishop) on Mar 10, 2013 at 12:11 UTC | |
|
Re: Matrix Declaration / Data Structure Syntax Question
by Anonymous Monk on Mar 09, 2013 at 15:54 UTC |