Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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},
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement