Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. )
  6.  
  7. /*
  8. I'm triyng to get this:
  9. g (graph)
  10. Node A:
  11. Node B - CostB
  12. Node C - CostC
  13. ...
  14. **/
  15.  
  16. //Graph object
  17. type graph struct {
  18. Nodes []node
  19. }
  20.  
  21. //Node object
  22. type node struct {
  23. label string
  24. path []map[string]int
  25. }
  26.  
  27. func main() {
  28. fmt.Println("### Creating scenario ###")
  29. g := &graph{
  30. Nodes.nodeA: node{
  31. label: "A",
  32. path["B"]: {66},
  33. },
  34. Nodes.nodeB: node{
  35. label: "B",
  36. path[Nodes.nodeB]: {77},
  37. },
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement