On Tue, Jan 03, 2012 at 03:32:00PM +0100, Josef Leydold wrote: > Dear list members, > > I am working on so called automatic random variate generators, that is, > routines that allow to sample from larger classes of distributions, > e.g., distributions with log-concave densities. > I have implemented all my algorithms in a library called UNU.RAN > (universal non-uniform random variate generators) which is available > at > http://statmath.wu.ac.at/unuran/ > > It is also packed in ROOT (http://root.cern.ch/) and I have written > a wrapper for R (package "Runuran"). > The advantage of this approach is, that it allows to sample from quite > arbitrary distributions. Distributions can be used with a couple > of different methods depending on one's particular generation problem. > A possible disadvantage is the two-step approach: > in Step 1 a generator object is created, which can be used in > Step 2 to draw one or many random samples, see below. > > I have been asked to make the library available for Matlab similarly > to my "Runuran" package. Since Octave is open-source I have written > such a package for octave instead using oct-files (which seems to > be superior to mex-files; I never have used matlab before). > (For me OOS means that I can look how others solved problems which > significantly flattens the learning curve for me.) > > I have added the help pages of the octave functions as well as a short > example of its application below. > > I have a few question / remarks: > > - Do you think that octave-forge is a proper place for hosting this > package?
It should be exactly the right place. (The usual way to proceed would be to post at least some of your code for Octave to the list and ask either for inclusion into the existing statistics package or for allowance to create a separate package.) > - The package requires the UNU.RAN libray to be installed on the > system. However, this makes it for Windows users almost impossible > to use (since I have no time to learn how to prepare a binary > package for the different windows OSes). > Thus I have package the UNU.RAN sources in the "Runuran" package and > let CRAN to this work for me. > Is this a good approach for Octave packages, too? I'd say it isn't. Octaves package manager (see 'help pkg', it builds and installs packages from source) installs Octave oct- and m-files but does not, of corse, install libraries. So the library does not belong into the package ('package' in the specific sense, as described in the Octave manual) hosted by Octave Forge. But the library might be used by the people who make binary packages (possibly for windows) from the original Octave packages. For this purpose, it should not even be useful to include the library source into the Octave package, a short notice where it can be found should suffice. > - I usually implement my algorithms using C. Thus my C++ code may look > like a C file. I hope this is not a problem. At least no one will finally reject a unique and useful code because of style. But you might get some hints for improvements, if someone feels concerned ... Olaf ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev