On 19 November 2011 14:34, Jonathan Alvarsson
<[email protected]>wrote:
> > Sounds like two different semantics of compare method; obviously both
> have
> > reasons to exist. The authors know better, but the current
> implementation
> > seems to have in mind e.g. graph algorithms, where atoms are distinct
> graph
> > nodes. The other interpretation, comparing atoms themselves is useful,
> but a
> > bit trickier - should it include equality of atom symbols only, or atom
> > types, aromaticity flags, bond flags, 3D coordinates of atoms, etc? IMHO
> > matcher classes are better suited for this purpose.
>
> So perhaps rename the method to clearly state that it is comparing
> identity?
>
Renaming is a good option, also for the reason compare() is a method
usually expected from Comparable interface (which is not implemented by
IChemObjects)
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Comparable.html
I actually thought this is the case, and was going to suggest to be more
strict and compare bond objects the same style as for atoms.
Regards,
Nina
>
> --
> // Jonathan
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user