Skip to content

Instantly share code, notes, and snippets.

View fabulousduck's full-sized avatar
💭
building compilers and assemblers

Ryan Vlaming fabulousduck

💭
building compilers and assemblers
View GitHub Profile
func (algorithm *algorithm) putRandomCandidateSolutions(dataPoints []point, amount int){
for i := 0; i < amount; i++ {
algorithm.candidateSolutions = append(algorithm.candidateSolutions,randomSolution(dataPoints))
}
}
func randomSolution(dataPoints []point) []point {
dpC := dataPoints
//solution with start point
func (algorithm *algorithm) putRandomCandidateSolutions(dataPoints []point, amount int){
for i := 0; i < amount; i++ {
algorithm.candidateSolutions = append(algorithm.candidateSolutions,randomSolution(dataPoints))
}
}
func randomSolution(dataPoints []point) []point {
candidateSolution := []point{dataPoints[0]}