Hi Werner, On May 21, 2010, at 2:50 PM, Werner Benger wrote:
> Hi Quincey, > > On Fri, 21 May 2010 14:40:30 -0500, Quincey Koziol <[email protected]> > wrote: > >> Hi Werner, >> >> On May 21, 2010, at 2:26 PM, Werner Benger wrote: >> >>> 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? ;) ) Hmm, this is already included as part of a pending proposal, so let's see if that gets funded. :-) >>> 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 _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
