Iterating over indexed groups

Hi,

  I recently discovered the H5Literate() function of HDF5 1.8 being able to
iterate over the entries of a group via indices specified on them:

  http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate

but I could not find out yet how to specify such indices on the entries
of a group? I would assume such an index might be a property of the
group creation call H5Gcreate2(), but could not find information via
the HDF5 reference manual how to specify indices there.

Where can I find information on indexed group entries? And, could such
information be referenced from the respective functions in the reference
documentation? That would be very helpful.

The H5Literate() only talks about indexed "links", but is it correct to
assume that it would actually apply to any object within a group,
i.e. datasets and groups, since they are formally links?

Thanks,
  Werner

···

--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362

Hi Werner,

Hi,

I recently discovered the H5Literate() function of HDF5 1.8 being able to
iterate over the entries of a group via indices specified on them:

  http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate

but I could not find out yet how to specify such indices on the entries
of a group? I would assume such an index might be a property of the
group creation call H5Gcreate2(), but could not find information via
the HDF5 reference manual how to specify indices there.

Where can I find information on indexed group entries? And, could such
information be referenced from the respective functions in the reference
documentation? That would be very helpful.

  All groups provide alpha-numeric indices, and if the H5Pset_link_creation_order() routine (http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLinkCreationOrder) is used, a group may also track and index the creation order of links within the group. So, H5_INDEX_NAME can always be passed to H5Literate and H5_INDEX_CRT_ORDER could also be used on groups with links that have their creation order tracked.

  We discussed other types of indices or even some user-defined index order, but haven't had time/funding to implement anything in that direction yet.

The H5Literate() only talks about indexed "links", but is it correct to
assume that it would actually apply to any object within a group,
i.e. datasets and groups, since they are formally links?

  Groups contain links, not objects. So, iterating over those links will allow you to reach the object that the link references.

  Quincey

···

On May 21, 2010, at 2:26 PM, Werner Benger wrote:

Hi Quincey,

Hi Werner,

Hi,

I recently discovered the H5Literate() function of HDF5 1.8 being able to
iterate over the entries of a group via indices specified on them:

  http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate

but I could not find out yet how to specify such indices on the entries
of a group? I would assume such an index might be a property of the
group creation call H5Gcreate2(), but could not find information via
the HDF5 reference manual how to specify indices there.

Where can I find information on indexed group entries? And, could such
information be referenced from the respective functions in the reference
documentation? That would be very helpful.

  All groups provide alpha-numeric indices, and if the H5Pset_link_creation_order() routine (http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLinkCreationOrder) is used, a group may also track and index the creation order of links within the group. So, H5_INDEX_NAME can always be passed to H5Literate and H5_INDEX_CRT_ORDER could also be used on groups with links that have their creation order tracked.

  We discussed other types of indices or even some user-defined index order, but haven't had time/funding to implement anything in that direction yet.

So only internally-created indices that are build from the group's name are supported right now.

What I'd actually were looking for is to associate an integer or double (like an attribute) with a group, and then iterate over the group's members based on the order given by these numbers.

Would that be hard to add/implement? (Which line in the source code needs to be modified to enable this feature? :wink: )

The H5Literate() only talks about indexed "links", but is it correct to
assume that it would actually apply to any object within a group,
i.e. datasets and groups, since they are formally links?

  Groups contain links, not objects. So, iterating over those links will allow you to reach the object that the link references.

  Quincey

Are attributes and named datatypes linked as well? Does the same iteration functionality as for groups and datasets also apply to them? Can I link to an attribute (linking to a named datatype is possible)? Can an attribute be of type "link", i.e. refer to a group?

  Werner

···

On Fri, 21 May 2010 14:40:30 -0500, Quincey Koziol <koziol@hdfgroup.org> wrote:

On May 21, 2010, at 2:26 PM, Werner Benger wrote:

--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362

Hi Werner,

Hi Quincey,

Hi Werner,

Hi,

I recently discovered the H5Literate() function of HDF5 1.8 being able to
iterate over the entries of a group via indices specified on them:

  http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate

but I could not find out yet how to specify such indices on the entries
of a group? I would assume such an index might be a property of the
group creation call H5Gcreate2(), but could not find information via
the HDF5 reference manual how to specify indices there.

Where can I find information on indexed group entries? And, could such
information be referenced from the respective functions in the reference
documentation? That would be very helpful.

  All groups provide alpha-numeric indices, and if the H5Pset_link_creation_order() routine (http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLinkCreationOrder) is used, a group may also track and index the creation order of links within the group. So, H5_INDEX_NAME can always be passed to H5Literate and H5_INDEX_CRT_ORDER could also be used on groups with links that have their creation order tracked.

  We discussed other types of indices or even some user-defined index order, but haven't had time/funding to implement anything in that direction yet.

So only internally-created indices that are build from the group's name are supported right now.

  Yes.

What I'd actually were looking for is to associate an integer or double (like an attribute) with a group, and then iterate over the group's members based on the order given by these numbers.

  Well, you obviously could put the integer/double as a prefix of the link name, or somehow use the creation order feature to arrange things to your goals, but those are both somewhat kludgy...

Would that be hard to add/implement? (Which line in the source code needs to be modified to enable this feature? :wink: )

  Hmm, this is already included as part of a pending proposal, so let's see if that gets funded. :slight_smile:

The H5Literate() only talks about indexed "links", but is it correct to
assume that it would actually apply to any object within a group,
i.e. datasets and groups, since they are formally links?

  Groups contain links, not objects. So, iterating over those links will allow you to reach the object that the link references.

  Quincey

Are attributes and named datatypes linked as well? Does the same iteration functionality as for groups and datasets also apply to them? Can I link to an attribute (linking to a named datatype is possible)? Can an attribute be of type "link", i.e. refer to a group?

  Attributes are not "real" objects, but named datatypes are. So, you can't link to an attribute. You could emulate links with attributes, in some ways, by making the datatype for the attribute be an object reference.

  Quincey

···

On May 21, 2010, at 2:50 PM, Werner Benger wrote:

On Fri, 21 May 2010 14:40:30 -0500, Quincey Koziol <koziol@hdfgroup.org> wrote:

On May 21, 2010, at 2:26 PM, Werner Benger wrote: