title: std::map with cv::Point as key
body: <p>I need to create <code>std::map&lt;cv::Point, double&gt;</code>. <code>cv::Point</code> is a type of a point from OpenCV library. It has fields like: <code>x</code> and <code>y</code>. </p>
  
  <p><code>cv::Point</code> does not have <code>&lt;</code> operator of course. Do you have any idea how to define it to have optimal access to element in <code>std::map</code>?</p>
  
  <p>In other words. I have for example 20000 points. I need quite fast access to every point.</p>
  
  <p>For example:</p>
  
  <pre><code>std::map&lt;cv::Point, double&gt; myMap;
  
  Point p(10, 234);
  int value = 777;
  myMap[p] = value; // I need this operation quite fast so I decided to use std::map
  </code></pre>
  
  <p>But cv::Point does not have <code>&lt;</code> operator. I can prepare <code>&lt;</code> operator like (it comparing for example only x coordinate):</p>
  
  <pre><code>bool operator&lt;(const cv::Point a, const cv::Point b)
  {
      return a.x &lt; a.x;
  }
  </code></pre>
  
  <p>But I guess it is not good operator. Many points has the same value of x. </p>
  
  <p>How to prepare efficient operator in this case?</p>