<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ousttrue</author_name>
  <author_url>https://blog.hatena.ne.jp/ousttrue/</author_url>
  <blog_title>三次元日誌</blog_title>
  <blog_url>https://ousttrue.hatenadiary.org/</blog_url>
  <categories>
    <anon>Erlang</anon>
  </categories>
  <description>レイトレースベンチの移植の続きをしていたのだけど、 ベクトルの和にすらパターンマッチで[X, Y, Z]=LISTという感じで展開してから 個々に計算するという状況に強いストレスを感じたので一旦作業を中断して他の方法を調べた。 lists:zipとリスト内包表記の組み合わせを使うのがよさげか。 % 和 34&gt; V=[1, 2, 3]. [1,2,3] 35&gt; Q=[2, 3, 4]. [2,3,4] 37&gt; [X+Y || {X, Y}&lt;-lists:zip(V, Q)]. [3,5,7] % 定数倍 38&gt; [X*3 || X&lt;-V]. [3,6,9] % 内積 39&gt; [X*Y || {X…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fousttrue.hatenadiary.org%2Fentry%2F20081023%2F1224727858&quot; title=&quot;ベクトル計算 - 三次元日誌&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>https://cdn-ak.f.st-hatena.com/images/fotolife/o/ousttrue/20081023/20081023233827.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-10-23 11:10:58</published>
  <title>ベクトル計算</title>
  <type>rich</type>
  <url>https://ousttrue.hatenadiary.org/entry/20081023/1224727858</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
