uncomplicate

2018-07-02T17:45:19.000116Z

I'm probably misunderstanding what the values of the :order keyword mean.

(def A (dge 3 2 [1 2 3 4 5 6] {:order :column}))
(def B (dge 3 2 [1 2 3 4 5 6] {:order :row}))
(= A B) => true 
despite the :order option being differently specified, A and B are the same? The doc string for ge says that the "internal structure can be specified with a map of options: :layout (:column or :row)." How can they be equivalent if the internal structure is different?

2018-07-02T19:58:29.000208Z

@aaelony:order was renamed to :layout several versions ago. Is there any place in the documentation or tutorials that I forgot to update?

2018-07-02T19:59:45.000286Z

I was rereading your blogs and saw it there

2018-07-02T20:00:00.000128Z

BTW even when you specify that with :layout, neanderthal checks for equality of all elements, taking layout into account. Matrices with same elements should be equal.

2018-07-02T20:00:40.000265Z

That link says :layout if I see well

2018-07-02T20:00:45.000257Z

which is correct

2018-07-02T20:01:19.000214Z

you're correct. I think it was only the blog posts

2018-07-02T20:01:28.000385Z

Whenever you are unsure, tests are very detailed, so you can try there.

2018-07-02T20:01:58.000152Z

Please open issue if you see :order in the wild, so I can update the blog posts too.

2018-07-02T20:02:02.000043Z

understood. e.g. https://dragan.rocks/articles/17/Clojure-Numerics-1-Use-Matrices-Efficiently

This created a dense 3×2 column-oriented matrix. Notice how the 1-d Clojure sequence that we used as data source has been read column-by-column.

The other option is row orientation:

(dge 3 2 [1 2 3 4 5 6] {:order :row})
#RealGEMatrix[double, mxn:3x2, layout:column, offset:0]
   ▥       ↓       ↓       ┓
   →       1.00    4.00
   →       2.00    5.00
   →       3.00    6.00
   ┗                       ┛

2018-07-02T20:02:29.000185Z

just the invocation

2018-07-02T20:04:06.000316Z

in any case, I'll use :layout going forward. Thanks 🙂

2018-07-02T20:06:09.000206Z

Thank you. I updated the blog posts.

2018-07-02T20:06:35.000005Z

@aaelony Thank you. Please report any issues or improvement ideas that you might have.

2018-07-02T20:35:46.000343Z

@blueberry Will do. Thank-you for such an excellent library!