Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I notice that the similarity operator you have on your matrices defines a <strong><a href="http://en.wikipedia.org/wiki/Metric_space" rel="nofollow">metric space</a></strong>. That is:</p> <ul> <li>D(M1, M2) = 0 if and only if M1 = M2</li> <li>D(M1, M2) &ge; 0 for any M1, M2.</li> <li>D(M1, M2) = D(M2, M1), and</li> <li>D(M1, M3) &le; D(M1, M2) + D(M2, M3) (the <strong><a href="http://en.wikipedia.org/wiki/Triangle_inequality" rel="nofollow">triangle inequality</a></strong>)</li> </ul> <p>As a result, one way that you could conceivably store all of your data would be in a <em>metric space tree</em>, a type of data structure for storing objects in a metric space that makes it easy to look up all elements "close" to some initial element.</p> <p>Your data has the added advantage that it is a <em>discrete metric space</em>, meaning that the distance function you've provided always outputs an integral answer. That is, you won't have two matrices at distance 1.5 from one another, nor could you get two matrices at distance &pi;</p> <p>Consequently, you might want to store your matrices in a <strong><a href="http://en.wikipedia.org/wiki/BK-tree" rel="nofollow">BK-tree</a></strong>. The BK-tree is often used to store strings, but more generally can store elements in any discrete metric space. This makes it possible to do nearest-neighbor searches on individual matrices reasonably efficiently (usually without having to look at all the matrices in your collection), though admittedly it won't thread a doubly-linked list through all of your elements.</p> <p>Intuitively, the BK-tree is structured as follows. Pick a matrix of your choice as the "root node." Then, compare every matrix in the collection against the root matrix and distribute them into subtrees based on their distance from the root matrix. You then recursively subdivide each of those subtrees in the same way. Due to the triangle inequality, you can search the BK-tree for nearby matrices using a straightforward recursive algorithm.</p> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload