<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fetburner</author_name>
  <author_url>https://blog.hatena.ne.jp/fetburner/</author_url>
  <blog_title>fetburner.core</blog_title>
  <blog_url>https://fetburner.hatenablog.com/</blog_url>
  <categories>
    <anon>OCaml</anon>
  </categories>
  <description>遥か昔にもOCamlでダイクストラ法を実装したことはあったんですが， 最も近い頂点を線形探索で求めている手抜き実装なので，O(V2)の計算時間を要する（a.k.a. 疎なグラフに対しては遅い）ものでした． 競プロだと入力が疎なグラフに限定されている場面が多々あって[^1]， それを前提に制限時間が決まっているので結構つらいです． 破壊的代入を濫用しているのも気になってましたし，純粋関数型かつ疎なグラフに対して高速な実装を与えます．</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffetburner.hatenablog.com%2Fentry%2F2018%2F05%2F14%2F022234&quot; title=&quot;OCamlでまともなダイクストラ法を実装する - fetburner.core&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-05-14 02:22:34</published>
  <title>OCamlでまともなダイクストラ法を実装する</title>
  <type>rich</type>
  <url>https://fetburner.hatenablog.com/entry/2018/05/14/022234</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
