Line 24: |
Line 24: |
| | | |
| ==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). | + | *I made a program that will generate some tests files for you. |
| + | *I also put up some examples with my output. I'm passing the release tests for part 3 so hypothetically these outputs are all correct. |
| | | |
− | '''May 13, 2007, 9:40 PM - I have updated the test program to now also do delete cities and fix a bug or two. I have also added some PM2 and PM1 tests below. I'll be fixing the PM3 test output (see below about the problem) a little later. -Mike'''<br><br> | + | **[http://www.doc-ent.com/meeshquest/PMTestFileMaker.java] - Program '''(Updated 5/16 at 2:20 PM, Version 1.2)''' |
| + | **[http://www.doc-ent.com/meeshquest/revisedtests] - New Tests |
| | | |
− | -[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,
| + | *Regards, Mike Bentley |
− | (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 RoadComparator()) before listing the roads should do the trick.
| |
− | ~colin
| |
− | PS. Anyone else verify this?
| |
− | | |
− | '''Yes, this turned out to be the problem. Thanks for the help. -Mike'''<br><br>
| |
− | | |
− | **[http://www.doc-ent.com/meeshquest/PMTestFileMaker.java] - Program '''(Updated, Version 1.1)'''
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests.input.xml] - Input 1
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests.input.xml.output.xml] - Output 1
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests1.input.xml] - Input 2
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests1.input.xml.output.xml] - Output 2
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests2.input.xml] - Input 3
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests2.input.xml.output.xml] - Output 3
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests3.input.xml] - Input 4
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests3.input.xml.output.xml] - Output 4
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests4.input.xml] - Input 5
| |
− | **[http://www.doc-ent.com/meeshquest/PMJavaTests4.input.xml.output.xml] - Output 5
| |
− | | |
− | '''New PM2 Tests'''
| |
− | **[http://www.doc-ent.com/meeshquest/PM2]
| |
− | | |
− | '''New PM1 Tests'''
| |
− | **[http://www.doc-ent.com/meeshquest/PM1]
| |