Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix row/column addition #64

Closed
mateogianolio opened this issue Mar 2, 2016 · 2 comments
Closed

Matrix row/column addition #64

mateogianolio opened this issue Mar 2, 2016 · 2 comments
Projects
Milestone

Comments

@mateogianolio
Copy link
Owner

Proposal:

Adds a multiple of one row to another inside a matrix.

// (Matrix, Number, Number, Number) => (Matrix)
Matrix.rowAdd = function (matrix, i, j, scalar)

// (this, Number, Number, Number) => (this)
Matrix.prototype.rowAdd = function (i, j, scalar)

Example:

var m = new Matrix([[1, 2], [3, 4]]);
m.rowAdd(0, 1, 10);
// [[31, 42], [3, 4]]

Same for columns.

@mateogianolio mateogianolio changed the title Matrix row addition Matrix row/column addition Mar 3, 2016
@mateogianolio mateogianolio added this to the 5.0.0 milestone Feb 27, 2017
@mateogianolio mateogianolio added this to To do in 5 Jun 14, 2017
@christianbender
Copy link
Contributor

christianbender commented Feb 27, 2019

@mateogianolio I will work on this. For example a method for the class Matrix

rowAdd(dest : number, source : number, scalar : number) : Matrix
  • dest (destination) is the row for adding the other row that was multiplied with the scalar.
  • source : is the row that would be multiplied with the scalar (for adding)

For you example:
dest := 0
source := 1

@mateogianolio
Copy link
Owner Author

Closed by #138.

@mateogianolio mateogianolio moved this from To do to Done in 5 Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
5
Done
Development

No branches or pull requests

2 participants