hr.fer.zemris.tsp
Class TSPSolution

java.lang.Object
  extended by hr.fer.zemris.tsp.TSPSolution

public class TSPSolution
extends java.lang.Object

Razred koji predstavlja jedno rješenje problema TSP. Razred automatski nudi mogućnosti pool-anja pomoću razreda TSPSolutionPool.
Važno: Varijable cityIndexes, tourLength i next su javne kako bi se omogućio minimalni "overhead" prilikom izvođenja evolucijskih algoritama. Ovo ima kao ružnu posljedicu da se neopreznim programiranjem vrijednosti mogu mijenjati od bilo kuda, što može dovesti do pogrešnog rada programa!

Author:
marcupic

Field Summary
 int[] cityIndexes
           
 TSPSolution next
           
 double tourLength
           
 
Constructor Summary
TSPSolution()
          Konstruktor.
TSPSolution(TSPSolution next)
          Konstruktor.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cityIndexes

public int[] cityIndexes

tourLength

public double tourLength

next

public TSPSolution next
Constructor Detail

TSPSolution

public TSPSolution()
Konstruktor.


TSPSolution

public TSPSolution(TSPSolution next)
Konstruktor.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object