[ruby-core:63881] [ruby-trunk - Feature #10072] [PATCH] Implement Vector.basis

From: qlli.illb@...
Date: 2014-07-19 16:01:34 UTC
List: ruby-core #63881
Issue #10072 has been updated by gogo tanaka.


```
We can build standard euclidean space easily with this method.

[Vector.basis(3, 0), Vector.basis(3, 1), Vector.basis(3, 2)]
=> [Vector[1, 0, 0],  Vector[0, 1, 0],  Vector[1, 0, 1]]
```


This patch is needed in https://bugs.ruby-lang.org/issues/10074

gogo.

----------------------------------------
Feature #10072: [PATCH] Implement Vector.basis
https://bugs.ruby-lang.org/issues/10072#change-47906

* Author: gogo tanaka
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Standard basis vectors are really important in linear algebra.

And we usually need this when we use matrix or vector. (base conversion, principal component analysis...

This is why I implemented.

But I recognize Ruby should be not for mathematician but rubyist.

Ruby doesn't need too academic method.

So If you think it is too academic you can ignore my patches.


gogo.

---Files--------------------------------
implement_Vector.basis.patch (1.59 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next