Created
February 20, 2017 19:24
-
-
Save dbarranco/f2b5671525592e7b17798370750af560 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
/* | |
I'm triyng to get this: | |
g (graph) | |
Node A: | |
Node B - CostB | |
Node C - CostC | |
... | |
**/ | |
//Graph object | |
type graph struct { | |
Nodes []node | |
} | |
//Node object | |
type node struct { | |
label string | |
path []map[string]int | |
} | |
func main() { | |
fmt.Println("### Creating scenario ###") | |
g := &graph{ | |
Nodes.nodeA: node{ | |
label: "A", | |
path["B"]: {66}, | |
}, | |
Nodes.nodeB: node{ | |
label: "B", | |
path[Nodes.nodeB]: {77}, | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment