Re: Need help with A* search question
- Note that the class is of no specific use , its more like the
structure in C but u can add some important functions like
calcHeuristic to this class which calculates heuristic distances (in
your case the euclidean distance between the cities).
the class matrix Edge is nothing more than a weighted matrix like
the one we use in graphs.(Note that the tree is also a graph without
loops thats all. So u can represent a tree even in a weighted matrix
form .... )
what i did was instead of having just simple weighted matrix ... i
have many information stored along with the weight. For applying the
A* to this matrix .. u will be travelling the matrix from (left to
right) or (top to bottom) whichever way u prefer.
P.S -> And no i don't have a working code neither am i planning to
write one in the immediate future.
--- In firstname.lastname@example.org, Nizam A Haja <wizniz@r...> wrote:
> Hi jimmy.. thanks a lot for ur reply..
> but i dont quite understand what the class edge is
> for.. and how i can use the matrix to find out the
> best solution i want..
> would u have the code for that part? im confused on
> how to use the class and yet show the overrall total
> distance travelled so far.. and the A* search works on
> a stucture that seems like a tree after the distances
> are all worked out right?
> Would u be able to write the code to solve this
> question? If its not too much trouble.. thnx.
> I could take a look and learn from it then..