Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/benchmarks/programs/b-hut/README
ViewVC logotype

View of /sml/trunk/benchmarks/programs/b-hut/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (download) (annotate)
Fri Nov 20 17:43:59 1998 UTC (21 years, 7 months ago) by monnier
File size: 1210 byte(s)
Initial revision
This is an ML version of the "Barnes-Hut" N-Body code.  It is based on
the third release of the C version written by Joshua E. Barnes (see
c-version/Readme for details).  It produces answers that are essentially
identical to the C version (there is occasionally an off-by-one error
in the least significant digit when printing the particle data, but this
is probably a difference in the rounding in the output libraries).  You
will need the SML/NJ library to compile this code, and you may need to
patch the library path in the load file.

This implementation is functorized over the dimension of space (specified
by the Vector structure).  To compile the code, type

  use "load-all";

then apply the Main functor to either the 2 or 3-dimensional vector
structure (Vector2 or Vector3).  For example:

  structure M3 = Main (Vector3);

produces the 3-dimensional version.  To run, type

  M3.doit();

this will prompt you for parameters.

ACKNOWLEDGEMENTS:
a lot of the control structure was stolen from an ML version of Barnes-Hut
written by Lorenz Huelsbergen at the University of Wisconsin.

BUGS:
None known at this time.


	John Reppy
	AT&T Bell Laboratories
	Murray Hill, NJ 07974
	jhr@research.att.com


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0