Changes in DataSet - once again!
- From: "Asger K. Alstrup Nielsen" <alstrup diku dk>
- To: guppi-list gnome org
- Subject: Changes in DataSet - once again!
- Date: Tue, 16 Feb 1999 17:05:03 +0100 (MET)
Hi!
I've just commited some changes to goose.
I've removed the DataConverter from the DataSet, because
it is not essential. The problem with having it is that
it turned out that we needed two different interfaces:
One for the canonical representation, which is lossless,
and another for the printable representation, which is
lossy.
Originally, I had imagined that we only needed to have the
printable representation interface, but since you can loose
precision with this format, this was no good.
So, the interface suddenly doubled, and then it was hard
to justify to put the interface there in the first place.
Now, only the canonical string interface exists.
Ascii import, and other users that exploit the printable
presentation, have to do so by hand.
Furthermore, I've added a "void resize(size_t N)" method
that will enlarge, or truncate, a given DataSet to the
given size. In the case of RealSets, the additional values
that are added are 0.0. This is arbitrary, and I consider
to move the method to HoleSet, but this would imply that
StringSet would not get it.
So I judged that it was ok to have this arbitrary convention.
After all, if you don't want the set to grow in this fashion,
you can just avoid the method. (And it's the same convention
that is implictly followed if you insert a string real that
does not parse.)
Now that I write this, I realize that the better option would
probably be to throw an exception. Hmm, I'll have to think a
bit more about this.
Lastly, I've added a new regression test for the HoleSets.
So, far, it's very minimal, but I ran into problems with my
Visual C++ compiler that I have to check out on egcs before
I proceed too far.
Just wanted to keep you posted. I hope the DataSet is finally
finalizating. At least I can tell that I use it in a real
project now, and it seems to hold up so far.
(If the Random stuff is moved out of it, I'd even go as far
as say that it is nice. ;-)
Greets,
Asger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]