[Biojava-l] Circular Location

Schreiber, Mark mark.schreiber at agresearch.co.nz
Mon Jan 27 13:14:34 EST 2003


Oops, this looks like a bug. Thanks for spotting it!!

I'll try to fix it in the next day or so.

- Mark


> -----Original Message-----
> From: Yasumasa Shigemoto [mailto:yshigemo at genes.nig.ac.jp] 
> Sent: Friday, 24 January 2003 6:13 p.m.
> To: biojava-l at biojava.org
> Subject: [Biojava-l] Circular Location
> 
> 
> Hi
> 
> I use the CircularLocation and LocationTools as follows,
> but it seems to return the wrong response.
> 
> import org.biojava.bio.symbol.*;
> 
> public class CircularTest {
>         public static void main(String[] args) {
>                 try {
>                         Location[] locs = new Location[10];
>                         locs[0] = 
> LocationTools.makeCircularLocation(18,24,20);
>                         locs[1] = 
> LocationTools.makeCircularLocation(18,24,20);
>                         locs[2] = 
> LocationTools.makeCircularLocation(2,8,20);
>                         locs[3] = 
> LocationTools.makeCircularLocation(4,10,20);
>                         locs[4] = 
> LocationTools.makeCircularLocation(18,23,20);
>                         
> System.out.println(LocationTools.areEqual(locs[0], locs[1]));
>                         
> System.out.println(LocationTools.contains(locs[0], locs[1]));
>                         
> System.out.println(LocationTools.overlaps(locs[0], locs[2]));
>                         
> System.out.println(LocationTools.overlaps(locs[2], locs[3]));
>                         
> System.out.println(LocationTools.overlaps(locs[0], locs[4]));
>                 } catch (Exception ex) {
>                         ex.printStackTrace();
>                 }
>         }
> }
> 
> > java CircularTest
> true
> true
> false
> true
> false
> 
> I think the whole of result is 'true'.
> 
> Environment
> biojava-1.3pre1.jar, j2sdk1.4.0
> 
> Any help would be most appreciated.
> 
> Yasumasa Shigemoto
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org 
> http://biojava.org/mailman/listinfo/biojava-l
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the Biojava-l mailing list