PetitjeanShapeIndexDescriptor and no 3d

View: New views
5 Messages — Rating Filter:   Alert me  

PetitjeanShapeIndexDescriptor and no 3d

by Stefan Kuhn-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I just had a look at descriptors and saw that those which need 3d throw an
excpetion if no 3d exists. Only PetitjeanShapeIndexDescriptor return NaN in
that case. Is that intended? I would think it should be uniform.
Stefan
--
Stefan Kuhn B. Sc. M. A.
Software Engineer in the Chemoinformatics and Metabolism Team
European Bioinformatics Institute (EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD UK
Phone +44 1223 49 2657
Fax +44 (0)1223 494 468

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel

Re: PetitjeanShapeIndexDescriptor and no 3d

by Rajarshi Guha-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Wed, Oct 28, 2009 at 11:41 AM, Stefan Kuhn <stefan.kuhn@...> wrote:
Hi all,
I just had a look at descriptors and saw that those which need 3d throw an
excpetion if no 3d exists. Only PetitjeanShapeIndexDescriptor return NaN in
that case. Is that intended? I would think it should be uniform.

I agreeĀ  - rather than throwing an exception, NaN should be returned



--
Rajarshi Guha
NIH Chemical Genomics Center

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel

Re: PetitjeanShapeIndexDescriptor and no 3d

by Nina Jeliazkova :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rajarshi Guha wrote:


On Wed, Oct 28, 2009 at 11:41 AM, Stefan Kuhn <stefan.kuhn@...> wrote:
Hi all,
I just had a look at descriptors and saw that those which need 3d throw an
excpetion if no 3d exists. Only PetitjeanShapeIndexDescriptor return NaN in
that case. Is that intended? I would think it should be uniform.

I agree  - rather than throwing an exception, NaN should be returned


IMHO exceptions are more explanatory , but the behaviour should be uniform anyway.

Best regards,
Nina

--
Rajarshi Guha
NIH Chemical Genomics Center

------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference

_______________________________________________ Cdk-devel mailing list Cdk-devel@... https://lists.sourceforge.net/lists/listinfo/cdk-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel

Re: PetitjeanShapeIndexDescriptor and no 3d

by Stefan Kuhn-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would also think exceptions are better - NaNs can pass unnoticed and then
users get nonsense values.
Stefan

On Wednesday 28 October 2009 16:03:27 Nina Jeliazkova wrote:

> Rajarshi Guha wrote:
> > On Wed, Oct 28, 2009 at 11:41 AM, Stefan Kuhn <stefan.kuhn@...
> > <mailto:stefan.kuhn@...>> wrote:
> >
> >     Hi all,
> >     I just had a look at descriptors and saw that those which need 3d
> >     throw an
> >     excpetion if no 3d exists. Only PetitjeanShapeIndexDescriptor
> >     return NaN in
> >     that case. Is that intended? I would think it should be uniform.
> >
> >
> > I agree  - rather than throwing an exception, NaN should be returned
>
> IMHO exceptions are more explanatory , but the behaviour should be
> uniform anyway.
>
> Best regards,
> Nina
>
> > --
> > Rajarshi Guha
> > NIH Chemical Genomics Center
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> >----- Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Cdk-devel mailing list
> > Cdk-devel@...
> > https://lists.sourceforge.net/lists/listinfo/cdk-devel



--
Stefan Kuhn B. Sc. M. A.
Software Engineer in the Chemoinformatics and Metabolism Team
European Bioinformatics Institute (EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD UK
Phone +44 1223 49 2657
Fax +44 (0)1223 494 468

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel

Re: PetitjeanShapeIndexDescriptor and no 3d

by Egon Willighagen-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 28, 2009 at 5:55 PM, Rajarshi Guha <rajarshi.guha@...> wrote:

>
>
> On Wed, Oct 28, 2009 at 11:41 AM, Stefan Kuhn <stefan.kuhn@...> wrote:
>>
>> Hi all,
>> I just had a look at descriptors and saw that those which need 3d throw an
>> excpetion if no 3d exists. Only PetitjeanShapeIndexDescriptor return NaN
>> in
>> that case. Is that intended? I would think it should be uniform.
>
> I agreeĀ  - rather than throwing an exception, NaN should be returned

NaN was agreed upon in the past. The NaN is there to always get a
matrix returned and relieving the user from manually correcting for
NaNs in creating the matrix... there are various reasons why the NaN
occurs, and the Exception may have to be extended to multiple NaNs in
the matrix... the user would have to manually do that...

Did we not add a mechanism for passing the reason of the NaN? If not,
perhaps we should do that...

Egon


--
Post-doc @ Uppsala University
Homepage: http://egonw.github.com/
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel