From: Cameron McBride Date: 2009-05-09T05:25:33+09:00 Subject: Re: using the GSL library On Fri, May 8, 2009 at 09:39, Jason Lillywhite wrote: >> be careful here.  What you just did was load the std library 'matrix' >> library, which also defined a Vector constructor - but no method >> called 'mean' This is very different than GSL. > It seems a little odd that we have two kinds of vectors but they are > both a 'vector' not really. "vector" in this case is just a name corresponding to a variable (objects of a class in two independent and non-compatible libraries). Both libraries provide an object meant to represent a mathematical "vector", so their names make sense in both cases. Both are "add ons" to the language itself, which is why I cautioned you on their use. Be careful when one loads external libraries, there is no guarantee that different libraries will co-exist peacefully. The latter point is why I mentioned GSL::Vector being "a good thing" than "include GSL; Vector". GSL is now wrapped in a "namespace" (module in rubyspeak) so it doesn't cause confusion with the default namespace. It's a subtle point when getting started, but a critical piece to keep in mind. Cameron