From: David MacMahon Date: 2014-09-12T11:10:42-07:00 Subject: [ruby-core:65002] Re: [ruby-trunk - Feature #10077] [PATCH] Implement Matrix#row_merge and Matrix#column_merge FWIW, Matlab calls these operations "horzcat" (for "horizontal concatenation") and "vertcat" (for "vertical concatenation"). I personally find these names less ambiguous than "row_merge" and "column_merge". IMHO, the name "row_merge" seems to have an ambiguity as to whether it will merge along the rows of the Matrix (creating more columns) or whether it will merge additional rows onto the Matrix, but maybe that's just my lack of familiarity with these new names. On Sep 12, 2014, at 10:11 AM, mail@tanakakazuki.com wrote: > Issue #10077 has been updated by gogo tanaka. > > > @Hiroshi SHIBATA san > > Thank you so much! > > ���������������������������������������. ���������������������. > > ---------------------------------------- > Feature #10077: [PATCH] Implement Matrix#row_merge and Matrix#column_merge > https://bugs.ruby-lang.org/issues/10077#change-48878 > > * Author: gogo tanaka > * Status: Assigned > * Priority: Normal > * Assignee: Marc-Andre Lafortune > * Category: > * Target version: > ---------------------------------------- > Merge matrices horizontally and vertically. > > It is useful and important when we handle linear equations, statistics and so on. > > > ``` > Matrix[[1, 2], [3, 4]].row_merge(Matrix[[5], [6]]) > > => 1 2 5 > 3 4 6 > > Matrix[[1, 2], [3, 4]].column_merge(Matrix[[5, 6]]) > > => 1 2 > 3 4 > 5 6 > > # accept more than two matrices as an argument. > > Matrix[[1, 2], [3, 4]].column_merge(Matrix[[5, 6]], Matrix[[7, 8]]) > > => 1 2 > 3 4 > 5 6 > 7 8 > ``` > > * Matrix#row_merge needs Matrix#column > > ---Files-------------------------------- > Implement_Matrix#column_merge.patch (863 Bytes) > Add_test_for_Matrix#column_merge.patch (1.36 KB) > Add_Matrix#column_merge_to_NEWS.patch (452 Bytes) > Implement_Matrix#row_merge.patch (899 Bytes) > Add_test_for_Matrix#row_merge.patch (1.4 KB) > Add_Matrix#row_merge_to_NEWS.patch (523 Bytes) > > > -- > https://bugs.ruby-lang.org/