This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-23
Channels
- # beginners (27)
- # boot (8)
- # cider (17)
- # cljs-dev (8)
- # cljsrn (5)
- # clojure (56)
- # clojure-dev (34)
- # clojure-gamedev (4)
- # clojure-italy (32)
- # clojure-nl (22)
- # clojure-poland (3)
- # clojure-russia (17)
- # clojure-spec (31)
- # clojure-uk (48)
- # clojurescript (47)
- # core-async (41)
- # cursive (13)
- # datomic (22)
- # emacs (9)
- # figwheel (7)
- # fulcro (18)
- # graphql (3)
- # hoplon (15)
- # jobs-discuss (38)
- # keechma (1)
- # luminus (10)
- # off-topic (42)
- # onyx (8)
- # overtone (3)
- # protorepl (5)
- # re-frame (42)
- # reagent (6)
- # reitit (3)
- # schema (4)
- # shadow-cljs (39)
- # slack-help (5)
- # spacemacs (8)
- # specter (1)
- # tools-deps (36)
- # uncomplicate (9)
- # vim (34)
might be native-float, but also cublas-float, or clblast-float, or whatever else you implement
row gets the raw access to the memory of the row elements of the matrix. then you can use copy! or entry! to set those elements. alter! is when you change those elements by applying a function to the old values.
in a general, I think that multiplication with a sparse matrix for the setup of its elements would be extremely ineficient.
I usually set up elements using entry!, or If my data is in another structure (seqs, clojure vectors, etc.) by providing them as constructor argument(s). Most of the time I am not setting elements explicitly, but by applying linear algebra operations, or calling functions that work with the whole structure in bulk.
if you just want to initialize all elements to one constant value, use something like (entry! m 1.0)
.