minustehbare / CSE4705_final

Game of the Amazons AI for final project.
2 stars 0 forks source link

Edge List #2

Closed Dr-Steve closed 13 years ago

Dr-Steve commented 13 years ago

TODO: Partitions need to have a getEdgeList() function or something of the sort. I would say return a LinkedList. I have an Edge class in the Graph folder if you want to use that.

searing commented 13 years ago

I will write my own Edge class in the State package.

What do you need in an Edge? Will an index suffice? Should I include full Nodes? I can include one version of the Edge class for each of these two cases (named Edge and NodeEdge, probably).

Dr-Steve commented 13 years ago

Take a look at the one in the Graph folder. I need all the things it has. Some of them the articulation point uses and some of them I use elsewhere.

Dr-Steve commented 13 years ago

I just pushed to be sure we're talking about the same version of Edge. Should be about the same but just making sure.

searing commented 13 years ago

I have pushed the two versions of Edge, under the State package. I have not yet implemented getEdgeList() - I will probably do this during class.

The Edges I made are immutable and are thus thread-safe. There were no mutators in the Edge implementation you showed me, so I assume this is okay.

Furthermore, I have implemented the standard equals() and hashCode() methods, so it should be safe to throw any Edge or NodeEdge objects into any of the standard collections (like HashMaps).