Skip to content

Instantly share code, notes, and snippets.

@liebke liebke/print-method-example.clj Secret
Created Dec 20, 2009

Embed
What would you like to do?
;; PRINT METHOD FOR COLT MATRICES
(defmethod print-method Matrix [o, #^java.io.Writer w]
(let [formatter (DoubleFormatter. "%1.4f")]
(do
(.setPrintShape formatter false)
(.write w "[")
(.write w (.toString formatter o))
(.write w "]\n"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.