Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colony ¶
type Colony struct { Alpha float64 Beta float64 Pho float64 Q float64 BasePheromone float64 Problem tsp.TSP Population Ants IsQuick bool IsMakeImage bool // contains filtered or unexported fields }
func (*Colony) CalculateWalkLength ¶
func (*Colony) GetBestLength ¶
func (*Colony) GetPheromon ¶
func (*Colony) SetPheromon ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (as Ants) Len() int{ return len(as) }
func (as Ants) Less(i, j int) bool{ return as[i].walkLength()<as[j].walkLength }
func (as Ants) Swap(i, j int){ as[i],as[j]=as[j],as[i] as[i].idx,as[j].idx=as[j].idx,as[i].idx }
Click to show internal directories.
Click to hide internal directories.