-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 22, 2008, at 1:34 AM, Nina Jeliazkova wrote:
>>
>>
>> So if you're going to do an instanceof check, why not do 3 more :)
> Main reason - code doesn't look good :) ( joking). Also AFAIK,
> "instance of" is not considered an efficient piece of code from
> performance point of view, aside from aesthetic reasons. Finally,
> imagine somebody introduce a derived DescriptorResult type for a
> descriptor he is inventing. This will need adding "instance of"
> check in every piece of code that works with descriptors, while in
> case of exploiting inheritance, it will be handled by the derived
> type and the integration is completely transparent.
>
> Some possible solutions:
> - The top class in the hierarchy can be array, with size 1 for scalars
> - The results can be accessed via iterator, which will (naturally)
> return only a single value for the scalar.
> - Some other technique, based on generics (let me get my morning
> coffee first ...)
Hmm, making the top class an array type would be a good idea. But at
one point you'd need to know the type of the result (numeric, string,
boolean) to do something with it. Since the top class would probably
be an array of Object
> There are other issues of interest to me in QSAR library, for
> example having descriptors short names somewhere in
> DescriptorSpecification, rather than only in DescriptorValue.
I agree with this - I'd like to be able to get the expected number of
descriptors and the escriptor names before calculating the
descriptors themselves (i.e., maybe as a static method of individual
descriptor classes etc). I think the first one is possible now and
the last one is certainly doable - just needs to move some code
around in each of the descriptor classes
- -------------------------------------------------------------------
Rajarshi Guha <[EMAIL PROTECTED]>
GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84
- -------------------------------------------------------------------
Q: What do you get when you put a spinning flywheel in a casket and
turn a corner?
A: A funeral precession.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkg1CckACgkQZqGSLFHnnoQEbwCeMA7MVvYQXWmA8mxg4ok0gCFO
fM8AoPJ9C1EVTE6yDbL/6/24AORaYugA
=VwSa
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user