From: Tara L Andrews Date: Fri, 30 Sep 2011 00:26:50 +0000 (+0200) Subject: Allow either row or column orientation for alignment table X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f3ba6f7ed6ec1cc9929f707445bc90deed5e662;p=scpubgit%2Fstemmatology.git Allow either row or column orientation for alignment table --- diff --git a/lib/Text/Tradition/Collation.pm b/lib/Text/Tradition/Collation.pm index ea55378..bc88107 100644 --- a/lib/Text/Tradition/Collation.pm +++ b/lib/Text/Tradition/Collation.pm @@ -519,8 +519,13 @@ sub as_csv { return $self->csv; } +# TODO Make an alignment table at the end of initialization to check for +# duplicate nodes from mis-collation. + + + sub make_alignment_table { - my $self = shift; + my( $self, $in_rows ) = shift; unless( $self->linear ) { warn "Need a linear graph in order to make an alignment table"; return; @@ -538,6 +543,8 @@ sub make_alignment_table { push( @$table, \@ac_row ); } } + return $table if $in_rows; + # Return a table where the witnesses read in columns rather than rows. my $turned = _turn_table( $table ); return $turned;