-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
52 lines (37 loc) · 1018 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package main
import (
"flag"
"fmt"
"knapsack/helper"
)
func main() {
algorithmArg := flag.String("algorithm", "bf", "name of the algorithm")
flag.Parse()
algorithmName := helper.AlgorithmName(*algorithmArg)
switch algorithmName {
case helper.Bruteforce:
//fmt.Println("Performing Bruteforce...")
helper.MesureBruteForce()
case helper.BranchAndBound:
//fmt.Println("Performing Branch&Bound...")
helper.MesureBranchBound()
case helper.Heuristic:
//fmt.Println("Performing Heuristic...")
helper.MesureHeuristic()
case helper.DynamicPrice:
//fmt.Println("Performing Dynamic Price...")
helper.MesureDynamicPrice()
case helper.DynamicWeight:
//fmt.Println("Performing Dynamic Weight...")
helper.MesureDynamicWeight()
case helper.FPTAS:
//fmt.Println("Performing FPTAS...")
helper.MesureFPTAS(0.5)
case helper.EVOLUTION:
fmt.Println("Performing Evolution...")
helper.MesureGenetic(1000, 200, 10)
default:
fmt.Println("Not supported algorithm name...")
}
return
}