Installing HYDRA

Note: These instructions are too brief. Feel free to email questions, suggestions--or better yet, an improved version.
 

Step 1: Download the Hydra package from http://www.warnes.net/Hydra

The Hydra package is provided in three forms The only difference between these packages is the archival program used to create them.
 

Step 2: Unpack


Move the package file you downloaded to the directory where you wish installation to occur.  The un-archiving program will create a directory named "Hydra" that contains all off the Hydra files.
 

On Unix-like systems

On Microsoft Windows Systems

Use your favorite unarchiving program (WinZip, or whatever).  Make sure to specify that directories should be created (this should be the default).  Otherwise you will end up with a million files in one directory and things won't work.

Step 3: Download and install the Java Numerics Library (JNL) from VisualNumerics.

The JNL package and installation instructions are available from http://www.vni.com/products/wpd/jnl/.

Step 4: Add the Hydra package to your classpath

For Hydra to work, four items must be listed in the CLASSPATH environment variable.
  1. The directory where you installed Hydra
  2. the Jama jar file (included with Hydra),
  3. the DataReader jar file (included with Hydra), and
  4. the location of the VisualNumerics classes (installed in Step 3).

On Unix-like Systems

I unpacked Hydra in my home directory, so that the Hydra directory is $HOME/Hydra.
I installed the JNL package in $HOME/Java/jnl, so that the JNL classes are located under $HOME/Java/jnl/JNL/Classes.

Thus my CLASSPATH variable needs to contain:

$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar:$HOME/Java/jnl/JNL/Classes
With a sh-compatible shell (sh,bash) this can be added to the CLASSPATH variable using the command:
export CLASSPATH=$CLASSPATH:$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar:$HOME/Java/jnl/JNL/Classes
With a csh-compatible shell (csh,tcsh,ksh) this can be added to the CLASSPATH variable using the command:
setenv CLASSPATH $CLASSPATH:$HOME/Hydra:$HOME/Hydra//Jama-1.0.1.jar:$HYDRA_DIR/DataReader.jar$HOME/Java/jnl/JNL/Classes
 
You will probably want to add the command that sets your classpath to your shell inialization file (usually one or more of $HOME/.cshrc, $HOME/.tcshrc, $HOME/.bashrc, $HOME/.profile, etc.)

On Microsft Windows Systems

I installed Hydra in C:\Pfizer\My Stuff\Hydra.
I installed the VisualNumerics classes in C:\Pfizer\My Stuff\jnl,  so the path to the class files is C:\Pfizer\My Stuff\jnl\Jnl\Classes

Thus, my CLASSPATH variable needs to contain:

C:\Pfizer\My Stuff\Hydra;C:\Pfizer\My Stuff\Hydra\Jama-1.0.1.jar;C:\Pfizer\My Stuff\Hydra\DataReader.jar;C:\Pfizer\My Stuff\jnl\Jnl\Classes
At the MSDOS prompt, or in a batch file, this can be accomplished using the command
SET CLASSPATH=C:\Pfizer\My Stuff\Hydra;C:\Pfizer\My Stuff\Hydra\Jama-1.0.1.jar;C:\Pfizer\My Stuff\Hydra\DataReader.jar;C:\Pfizer\My Stuff\jnl\Jnl\Classes
For information on other methods for setting your class path permenantly see http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html.

Step 5: Run the example programs

I've include several example programs in the directory org/omegahat/Simulation/MCMC/Examples. These are (There are other examples sprinkled around, go spelunking.)

I've created batch/script files for both Unix-like systems and Windows systems that will set the CLASSPATH variable and then run each of these examples.
Before using either script, you will need to edit it to use the correct paths.

For Unix-like systems the shell script is RunExamples.sh. For Microsoft Windows Systems, the shell script is RUN.BAT.
 

Step 6: Read the documentation

  1. A technical report showing describing the features of Hydra and giving a breif tutorial using an example problem is provided in the file UsingHydra.pdf.
  2. Javadoc documentation is HTML format stored in the doc directory.
  3. There is additional documentation on the individual classes stored in the source *.jweb files.

Step 7: Start Experimenting

Once you have the examples working, you can start modifying them (they live under Hydra/org.omegahat/Simulation/MCMC/Examples) to change how they work.

To do this, first copy one of the files, say Binomial_BetaBinomial_Example.java to a new name, say, BBE.java, edit the file so that the class name matches the file name.  Now you should be able to compile it by typing

javac BBE.java
at the shell or MSDOS prompt (in the Hydra/org/omegahat/Simulation/MCMC/Examples directory).

You should be able to run this new class by typing

 java Hydra/org.omegahat/Simulation/MCMC/Examples/BBE

Step 8: Give Feedback

I hope that you find Hydra useful, if so please send examples of how you are using it, what features you would like to see, and any problems or bugs you run into.  Example data and programs will be particulary helpful.

-Greg Warnes greg@warnes.net