Re: Incanter/vector-clj use error

2013-10-31 Thread P Martin
again, Patrick On Wednesday, October 30, 2013 1:28:00 PM UTC-4, Jim foo.bar wrote: > > On 30/10/13 16:56, P Martin wrote: > > Thanks - I'm still a little confused on the different between use and > require. > > > 'use' is sort of deprecated after it was notic

Re: Incanter/vector-clj use error

2013-10-30 Thread P Martin
in your code whenever you want use a function from core.matrix you use > the alias => (mat/esum .. ... ... ..) > the same for incanter. Use the alias and the function name. > > hope that helps, > Jim > > > > On 29/10/13 20:23, P Martin wrote: > > Hello, >

Incanter/vector-clj use error

2013-10-29 Thread P Martin
Hello, I am trying to use incanter to plot the results from my ode solving routines. I use vectorz-clj to maintain the matrices and then want to use incanter to display. When I go to use incanter, I get the following error: (use '(incanter core charts pdf)) IllegalStateException tan already re

Re: Getting lengths/dimensions in vectorz-clj

2013-10-22 Thread P Martin
h is sometimes useful: > > (dimension-count M 0) ;; returns 4 as the count of the first dimension > (dimension-count M 1) ;; returns 6 as the count of the second dimension > > More generally, check out the clojure.core.matrix namespace for all the > public API functions. > >

Getting lengths/dimensions in vectorz-clj

2013-10-22 Thread P Martin
Hi there, I am using vectors-clj to do some optimization work, but I am having trouble getting the dimensions of the matrices I build. I come from Matlab, so I am used to commands such as "size(M)" which returns the (n,m) dimensions of the matrix M. I am including clojure.core.matrix in my code

Re: Lamina receive-all functionality

2013-07-11 Thread P Martin
there: > https://groups.google.com/forum/#!topic/aleph-lib/SIO9Z8d3tdo. For > future reference, you're more likely to get my attention, or the attention > of someone else who can answer your question, if you post it there. > > Zach > > On Thursday, July 11, 2013 12:21:20

Lamina receive-all functionality

2013-07-11 Thread P Martin
Hi there, I am working on an application using Lamina where I register several callbacks on a channel with receive-all. At some point in the application, I want to cancel all current callbacks. When this occurs the channel appears to close. Why does this happen? Is this a safety feature? For e

Re: vectorz doesn't handle scalars?

2013-07-11 Thread P Martin
version could do everything, however currently > Clojure doesn't allow overloading functions on type, so we need to have the > different namespaces. > > On Thursday, 11 July 2013 14:37:06 UTC+1, P Martin wrote: >> >> I am having a similar error, but it is happening for

Re: vectorz doesn't handle scalars?

2013-07-11 Thread P Martin
Woops - my error is really different from my prior post. I forgot to put vz/vec in my function call: (vz/+ 5 (vz/vec [1 2 3])) ClassCastException java.lang.Long cannot be cast to mikera.vectorz.AVector mikera.vectorz.core/clone (core.clj:38) On Thursday, July 11, 2013 9:37:06 AM UTC-4, P

Re: vectorz doesn't handle scalars?

2013-07-11 Thread P Martin
I am having a similar error, but it is happening for the vectors. I just updated to the 0.11.0 version of vectorz. I have the following project file: [org.clojure/clojure "1.5.1"] [incanter/incanter-core "1.5.1"] [incanter/incanter-charts "1.5.1"] [net.mikera/vectorz-clj "0.11.0"] And I get

Re: Best practice for looping

2013-06-24 Thread P Martin
n't, you can (use 'clojure.repl) to get to it. > http://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl/pst > > Yes, switching to mapv (map into a vector) instead of map (lazy-seqs) > prevents laziness from building up while keeping the same semantics. > > > On M

Re: Best practice for looping

2013-06-24 Thread P Martin
ojure environment. Patrick On Friday, June 21, 2013 4:06:28 PM UTC-4, P Martin wrote: > > Hi, > > I am new to clojure and I am trying to reimplement some optimization code > that uses gradient descent. I have attached the source to this post. My > experience with gradient descent

Re: Best practice for looping

2013-06-22 Thread P Martin
function calls itself, try to see if you can get that call into tail > position and change it to "recur". > > > On Fri, Jun 21, 2013 at 4:06 PM, P Martin > > wrote: > >> Hi, >> >> I am new to clojure and I am trying to reimplement some optimization

Best practice for looping

2013-06-21 Thread P Martin
Hi, I am new to clojure and I am trying to reimplement some optimization code that uses gradient descent. I have attached the source to this post. My experience with gradient descent is in Matlab, which is procedural. When I run my function gradient-descent I supply step sizes and error value

Re: Newbie dependency loading issue

2013-06-18 Thread P Martin
:44 AM UTC-4, Sean Corfield wrote: > > What did you put in your project.clj file? > > > On Mon, Jun 17, 2013 at 6:30 PM, P Martin > > wrote: > > Hi, > > > > I want to get the clojure.math.numeric-tower namespace into my code > using: > >

Newbie dependency loading issue

2013-06-17 Thread P Martin
Hi, I want to get the clojure.math.numeric-tower namespace into my code using: (require '[clojure.math.numeric-tower :as math]) I also follow the directions on the github for the library to add a lein dependency in Eclipse. Unfortunately, the code does not find the library, even though the l

Re: Let over Lambda

2012-05-18 Thread P Martin
gt; > Hope that helps, I'm still in my metamorphosis from imperative programming. > > On Thu, May 17, 2012 at 10:23 PM, P Martin wrote: > >> Hi everyone, >> I was perusing Amazon for some books on Clojure and Lisp and came across >> Let Over Lambda. From its

Let over Lambda

2012-05-17 Thread P Martin
Hi everyone, I was perusing Amazon for some books on Clojure and Lisp and came across Let Over Lambda. From its reviews, it seems that this book may be useful for macro development in Clojure. Has anyone else read this book? Do you think it would be a good book for Clojure work? Thanks! -- Y