Re: zero length attrributes...

I believe there is a confusion between the types of the selections and
types of dataspaces.

It makes a perfect sense to define an algebra on selections since they
belong to the same dataspace. Currently our APIs do not allow to do
algebra on different types of selections (pont selections vs. hyperslab
selections). And I am also not sure if we have "official" empty selection
for each type. 

If we need algebra on dataspaces, first we have to define to which "space"
dataspaces belong.

We can rethink the notion of the dataspace. Currently we think about
it as a vector/scalar space. Empty dataspace doesn't fit well into this.
We probably should have empty/scalar, empty/simple spaces. But bottom line
- it is empty.

We can expand the notion of the dataspace and think about it as an
ordered set and define set operations on the dataspaces. I don't know who
will need it, but for example mapping from HDF5 to STEP model would be
much easier.

Elena


------------------------------------------------------------
Elena Pourmal, HDF QA, Maintenance and Support Team Leader
NCSA University of Illinois at Urbana-Champaign
605 E. Springfield Ave.
Champaign, IL 61820

epourmal@xxxxxxxxxxxxx
(217)333-0238 (office)
(217)244-1987 (fax)
------------------------------------------------------------

On 12 Nov 2003, Ed Hartnett wrote:

> Quincey Koziol <koziol@xxxxxxxxxxxxx> writes:
> 
> >     What I was planning to do was to create empty dataspaces the same way we
> > create scalar dataspaces:
> >     scalar_space_id=H5Screate(H5S_SCALAR);  /* Create a scalar dataspace */
> > 
> > only use a new constant:
> >     empty_space_id=H5Screate(H5S_EMPTY);    /* Create an empty dataspace */
> > 
> >     Additionally, I think it would be a good idea to have two dataspaces 
> > that
> > are created by the library: H5S_SPACE_SCALAR and H5S_SPACE_EMPTY, which 
> > would
> > avoid the need for users to create these dataspaces (as outlined above) and
> > could be used directly in creating datasets or attributes:
> > 
> >     
> > dataset_id=H5Dcreate(fid,"/Dataset",H5T_NATIVE_INT,H5S_SPACE_EMPTY,H5P_DEFAULT);
> > 
> >     This would need support in the tools, the FORTRAN & C++ APIs, etc...
> > 
> >     Quincey
> > 
> > > Make sure that selections work sensibly:
> > > 
> > >     EMPTY AND SPACE = ??
> > >     EMPTY OR SPACE = ??
> > >     SPACE - EMPTY = SPACE
> > >     EMPTY - SPACE = ??
> > > 
> > > etc. 
> >     Hmm, you can't operate between two dataspaces, so these don't make any
> > sense.  Also, since there are no elements in the dataspace, there is no way
> > to perform I/O on an empty dataspace.
> > 
> >     Quincey
> 
> Quincey,
> 
> It sounds terrific to me, but don't forget that we also need to use
> this space for creating attributes, which currently are more
> restrictive than dataspaces.
> 
> Ed
>