Changes

945 bytes added ,  19:16, 13 May 2007
Line 25: Line 25:  
==Mike's Java PMQuadtree Input Generator==
 
==Mike's Java PMQuadtree Input Generator==
 
*In my efforts to debug my PM Quadtree, I have developed a java program that creates xml input files for making random PM Quadtrees (with random cities and roads).  If someone could verify that my tests are congruent with their tests (as I am currently not passing the pm3 tests), that would be very helpful.
 
*In my efforts to debug my PM Quadtree, I have developed a java program that creates xml input files for making random PM Quadtrees (with random cities and roads).  If someone could verify that my tests are congruent with their tests (as I am currently not passing the pm3 tests), that would be very helpful.
 +
 +
-[May 13, 2007]  Mike, I think that one of the problem with from your output file is that you do not list the roads in asciibetical order.  For example, 
 +
(this is correct)
 +
                <black cardinality="3">
 +
                  <city color="black" name="city29" radius="0" x="244" y="407"/>
 +
                  <road end="city78" start="city29"/>
 +
                  <road end="city99" start="city36"/>
 +
(this is NOT correct)
 +
                <black cardinality="3">
 +
                  <city color="black" name="city29" radius="0" x="244" y="407"/>
 +
                  <road end="city99" start="city36"/>
 +
                  <road end="city78" start="city29"/>
 +
 +
You correctly have the start as the asciibetically lower city name, but when you list them, you don't have them listed asciibetically.  A simple Collections.sort(<ArrayList> list, new CityNameComparator()) before listing the roads should do the trick.
 +
~colin
 +
PS.  Anyone else verify this?
 +
 
**[http://www.doc-ent.com/meeshquest/PMTestFileMaker.java] - Program
 
**[http://www.doc-ent.com/meeshquest/PMTestFileMaker.java] - Program
 
**[http://www.doc-ent.com/meeshquest/PMJavaTests.input.xml] - Input 1
 
**[http://www.doc-ent.com/meeshquest/PMJavaTests.input.xml] - Input 1
31

edits