[Kst] Questions about KstMatrix
George Staikos
staikos at kde.org
Wed Jul 27 23:55:05 CEST 2005
I started to write the bindings for KstMatrix and I've found somethings that I
think are a bit unusual. KstMatrix still doesn't really look like a
"matrix". It seems to be vector with different accessors, but conceptually
we think of it as a matrix. For instance:
// for resizing the internal array _z only
virtual bool resize(int sz, bool reinit = true);
This is a public method that talks about internals. I think this should
go, and we should have something more like:
virtual bool resize(int xsz, int ysz, bool reinit = true);
An internal method could resize the array directly if there is a reason
for it.
Also the talk of "Z" everywhere is a bit confusing. Maybe we can come up
with some better terminology? I think even minValue() and maxValue() are
fine.
The value functions work differently than the KstVector ones:
bool value(double x, double y, double& z);
vs: double value(int i);
I think value() should look more like:
double value(double x, double y, bool *ok = 0L);
Are there any particular reasons why these were implemented the way they
are?
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list