<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2098894</guid>
        <pubDate>Fri, 24 Oct 2008 14:02:17 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2098894</link>
        <description><![CDATA[Pavia: <strong class='tag-b'>OpenGL</strong><br>
Hypot из модйля math. Нет не вызывает. И еще она там с повышенной точностью, нежели прямой вариант.]]></description>
        <author>Pavia</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2098238</guid>
        <pubDate>Thu, 23 Oct 2008 20:47:22 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2098238</link>
        <description><![CDATA[OpenGL: а дельфийская переполнение вызывает?]]></description>
        <author>OpenGL</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097917</guid>
        <pubDate>Thu, 23 Oct 2008 13:43:28 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097917</link>
        <description><![CDATA[amk: В C есть такая функция - hypot(x, y) считает длину гипотенузы треугольника с катетами x и y.<br>Проще говоря - sqrt(x^2 + y^2). Не вызывает переполнений.]]></description>
        <author>amk</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097689</guid>
        <pubDate>Thu, 23 Oct 2008 10:22:20 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097689</link>
        <description><![CDATA[tomsksmile: OpenGL, спасибо. смотрю.]]></description>
        <author>tomsksmile</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097666</guid>
        <pubDate>Thu, 23 Oct 2008 09:59:55 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097666</link>
        <description><![CDATA[OpenGL: Вообще если рассматривать эти координаты как точки на плоскости, то наиболее удаленные точки находятся на выпуклой оболочке. А про поиск наиболее близких точек можно почитать <a class='tag-url' href='http://algolist.manual.ru/maths/geom/prsh/' target='_blank'>здесь</a>, глава 3-5.]]></description>
        <author>OpenGL</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097538</guid>
        <pubDate>Thu, 23 Oct 2008 08:32:01 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097538</link>
        <description><![CDATA[tomsksmile: Akina, спасибо за идею. Еще и булевой матрицы нет. Пока координаты (x,y) генерируются в натуральных величинах (в метрах), между ними-то и нужно вычислять расстояние.]]></description>
        <author>tomsksmile</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097493</guid>
        <pubDate>Thu, 23 Oct 2008 07:43:51 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097493</link>
        <description><![CDATA[Akina: Заранее составить матрицу расстояний<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">distance(i, j) = sqrt(i*i + j*j)</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
и считать расстояния<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">k = distance(abs(x1-x2), abs(y1-y2))</div></ol></div></div></div></div>]]></description>
        <author>Akina</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097463</guid>
        <pubDate>Thu, 23 Oct 2008 07:13:17 +0000</pubDate>
        <title>расстояние между элементами матрицы</title>
        <link>https://forum.sources.ru/index.php?showtopic=253991&amp;view=findpost&amp;p=2097463</link>
        <description><![CDATA[tomsksmile: Нужен простой алгоритм для решения задачи:<br>В булевой матрице A(n,m) найти минимальное и максимальное расстояние между элементами, равными 1.<br><br>расстояние это (поправьте если это не так):<br><br>Если элементы располагаются в одной строке (столбце), то расстояние это <br>A(i,j)-A(i,j+k) = k ( A(i+k,j)-A(i,j) = k ), если элементы располагаются в разных строках (и/или столбцах), то расстояние определяется по правилу треугольника Пифагора: <br>k = sqrt((A(i+p,j)-A(i,j))^2+(A(i,j+p)-A(i+p,j))^2)]]></description>
        <author>tomsksmile</author>
        <category>Алгоритмы</category>
      </item>
	
      </channel>
      </rss>
	