{"url":"https://blog.amedama.jp/entry/2015/10/20/202245","categories":["Golang"],"provider_url":"https://hatena.blog","author_name":"momijiame","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.amedama.jp%2Fentry%2F2015%2F10%2F20%2F202245\" title=\"Golang \u3067\u30c0\u30a4\u30af\u30b9\u30c8\u30e9\u6cd5\u3092\u66f8\u3044\u3066\u307f\u308b - CUBE SUGAR CONTAINER\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Golang \u3067\u30c0\u30a4\u30af\u30b9\u30c8\u30e9\u6cd5\u3092\u66f8\u3044\u3066\u307f\u308b","type":"rich","published":"2015-10-20 20:22:45","version":"1.0","blog_title":"CUBE SUGAR CONTAINER","blog_url":"https://blog.amedama.jp/","height":"190","description":"\u4eca\u56de\u306f Golang \u306e\u52c9\u5f37\u304c\u3066\u3089\u30c0\u30a4\u30af\u30b9\u30c8\u30e9\u6cd5\u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b\u3002 \u30c0\u30a4\u30af\u30b9\u30c8\u30e9\u6cd5\u306f\u30b0\u30e9\u30d5\u7406\u8ad6\u306e\u6700\u77ed\u7d4c\u8def\u554f\u984c\u3092\u89e3\u304f\u305f\u3081\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u3072\u3068\u3064\u3002 DirectedGraph#Add() \u306e\u3068\u3053\u308d\u3092\u7de8\u96c6\u3059\u308b\u3068\u30b0\u30e9\u30d5\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 package main import ( \"errors\" \"fmt\" ) // \u30ce\u30fc\u30c9 type Node struct { name string // \u30ce\u30fc\u30c9\u540d edges []*Edge // \u6b21\u306b\u79fb\u52d5\u3067\u304d\u308b\u30a8\u30c3\u30b8 done bool // \u51e6\u7406\u6e08\u307f\u304b\u3092\u8868\u3059\u30d5\u30e9\u30b0 cost int // \u3053\u306e\u30ce\u30fc\u30c9\u306b\u305f\u3069\u308a\u7740\u304f\u306e\u306b\u5fc5\u8981\u3060\u3063\u305f\u30b3\u30b9\u30c8 prev *Node\u2026","width":"100%","author_url":"https://blog.hatena.ne.jp/momijiame/","image_url":null,"provider_name":"Hatena Blog"}