<commit_before>(ns uxbox.util.geom.matrix
  (:require [uxbox.util.math :as mth]
            [uxbox.util.geom.point :as gpt]))

(defrecord Matrix [a b c d tx ty])

(defprotocol ICoerce
  "Matrix coersion protocol."
  (-matrix [v] "Return a matrix instance."))

(extend-type Matrix
  cljs.core/IDeref
  (-deref [v]
    (mapv #(get v %) [:a :b :c :d :tx :ty])))<commit_msg>Fix deref impl on matrix.<commit_after>(ns uxbox.util.geom.matrix
  (:require [cuerdas.core :as str]
            [uxbox.util.math :as mth]
            [uxbox.util.geom.point :as gpt]))

(defrecord Matrix [a b c d tx ty])

(defprotocol ICoerce
  "Matrix coersion protocol."
  (-matrix [v] "Return a matrix instance."))

(extend-type Matrix
  cljs.core/IDeref
  (-deref [v]
    (mapv #(get v %) [:a :c :b :d :tx :ty]))

  Object
  (toString [v]
    (->> (str/join "," @v)
         (str/format "matrix(%s)"))))
{'fraction_non_alphanumeric': 0.17673888255416192, 'fraction_numerical': 0.0, 'mean_word_length': 2.919642857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1984744', 'n_tokens_mistral': 354, 'n_tokens_neox': 343, 'n_words': 97}