[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a HDF5 interface for extending datasets
From: |
Marcus G. Daniels |
Subject: |
a HDF5 interface for extending datasets |
Date: |
18 Mar 2001 17:23:53 -0800 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
In today's snapshot there is low-level support for extending simple
vector HDF5 datasets. This feature is useful if you have several data
streams coming out of a simulation and you want to record them and
load them later into R. Note I haven't merged it with the analysis module --
maybe someone would find that useful and do the work...
ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2001-03-18.tar.gz
ftp://ftp.swarm.org/pub/swarm/binaries/w32/latest
Here's an example of use of the `extensible double vector' methods in
the HDF5 interface. (Note this isn't object serialization.)
import swarm.Globals;
import swarm.defobj.HDF5;
import swarm.defobj.HDF5C;
import swarm.defobj.HDF5Impl;
import swarm.defobj.HDF5CImpl;
public class TestHDF5Vectors {
static void main (String args[]) {
Globals.env.initSwarm ("TestHDF5Vectors", "0.0", "address@hidden",
args);
TestHDF5Vectors test = new TestHDF5Vectors ();
test.createFile ();
}
TestHDF5Vectors () {
}
public void createFile () {
HDF5CImpl hdf5C = new HDF5CImpl (new HDF5Impl ());
hdf5C.createBegin (Globals.env.globalZone);
hdf5C.setWriteFlag (true);
hdf5C.setName ("test.hdf");
HDF5 hdf5file = (HDF5) hdf5C.createEnd ();
hdf5C = new HDF5CImpl (new HDF5Impl ());
hdf5C.createBegin (Globals.env.globalZone);
hdf5C.setParent (hdf5file);
hdf5C.setName ("foo");
hdf5C.setWriteFlag (true);
hdf5C.setDatasetFlag (true);
hdf5C.setExtensibleDoubleVector ();
HDF5 hdf5dataset = (HDF5) hdf5C.createEnd ();
for (int i = 0; i < 1024; i++)
hdf5dataset.addDoubleToVector ((double) i);
hdf5dataset.drop ();
hdf5file.drop ();
}
}
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- a HDF5 interface for extending datasets,
Marcus G. Daniels <=