Josiah,

There doesn't seem to be a Java example, but there is a C example:

http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/hdf5-examples/1_8/C/H5T/h5ex_t_vlen.c

Also, is there a maximum size for the array of doubles? If so, you may be better off using a fixed length array and a separate field to store the actual length, then using compression to mostly eliminate the wasted space.

Thanks,
-Neil


On 01/11/2011 09:57 AM, Josiah Slack wrote:
I'll have a look, thanks.

-Josiah

On 1/11/2011 10:55 AM, Quincey Koziol wrote:
Hi Josiah,

On Jan 11, 2011, at 9:22 AM, Josiah Slack wrote:

Thanks. Can you point me to any examples using H5Tvlen_create() in context (preferably Java, but I'll take what I can get)?

Hmm, I don't see any code that uses H5Tvlen_create() in our examples files, but you can look at test/tvltypes.c for examples of how it's used in the context of our regression tests. Perhaps Peter has a pointer to a Java example...

    Quincey

-Josiah

On 1/11/2011 7:44 AM, Quincey Koziol wrote:
Hi Josiah,

On Jan 10, 2011, at 3:00 PM, Josiah Slack wrote:

Hi folks -
I've got another naive question about building Datatypes. I've got a Datatype that I'm forming from arrays of doubles. Ultimately, I'll be writing an array of this Datatype. The complicating factor is that the arrays of doubles won't necessarily have the same dimensions from one instance of the Datatype to the next.

Sounds like you might want a variable-length sequence of doubles as your datatype. Look at the documentation for H5Tvlen_create()...

    Quincey

Here's a little pseudo-code to more concretely illustrate what I mean:

Datatype {
   double[] a;
   double[][] b;
   double[] c;
};

Datatype[] allData = {
    { a = {1., 2., 3.} } b = {{1.,2.},{3.,4.}}, c = {1.} },
    { a = {1.,} b = {{1.}}, c = {1., 2.} },
    { a = {}, b = {{1.}, {2.}}, c = {1., 2., 3.} }
};

I'm trying to use the Java H5 class to achieve this.

Thanks in advance for your time.

-Josiah

--
Josiah Slack
MIT Lincoln Laboratory
Group 36
[email protected]
Ph: (781) 981-1754

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org


--
Josiah Slack
MIT Lincoln Laboratory
Group 36
[email protected]
Ph: (781) 981-1754

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to