Project

General

Profile

Actions

Feature #10455

closed

[PATCH 0/n] Combine interface for creating new matrix

Added by gogotanaka (Kazuki Tanaka) over 9 years ago. Updated over 1 year ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
[ruby-core:66004]

Description

I believe we'd better reduce the number of interface for creating new matrix as much as possible.

Right now, we have 7 methods for creating new matrix,

* Matrix.[](*rows)
* Matrix.rows(rows, copy = true)
* Matrix.columns(columns)
* Matrix.build(row_count, column_count, &block)
* Matrix.row_vector(row)
* Matrix.column_vector(column)
* Matrix#new_matrix (for internal)

I know each methods has meaning for each specific way.
But I wanna combine Matrix.rows with Matrix.row_vector and
Matrix.columns with Matrix.column_vector.

I suppose only Matrix.rows and Matrix.columns is totally enough.

Matrix.row_vector(row) is equivalent Matrix.rows([row]) and
Matrix.column_vector(column) is equivalent Matrix.columns([column])

If it looks fine for you, I'll make patches.

Thanks.

Updated by gogotanaka (Kazuki Tanaka) over 9 years ago

For now, I'm gonna make Matrix.row_vector(row) and Matrix.column_vector(column) deprecated.

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

  • Status changed from Open to Third Party's Issue

matrix has been extracted to https://github.com/ruby/matrix.

Actions

Also available in: Atom PDF

Like0
Like0Like0