Operations across rows of a matrix, comparing overlap -


imagine symmetric matrix follows:

   b  c  d    50 0  25 b 50    0  50 c 0  0     50 d 25 50 50  

what i'm trying accomplish dyadic, comparing across 2 nodes see how overlap have other nodes in matrix.

for example, following matrix product need obtain.

   b  c  d    25 25 50 b 25    50 25 c 25 50    0 d 50 25 0  

the value of 25 in [a,b] cell of latter matrix obtained comparing how , b respectfully related c , d. instance:

  1. first across top row of top matrix.
  2. ignore a's relationship b.
  3. a has 0 relationship c. ignore because of 0.
  4. a has 25 relationship d. b's relationship d equal or greater number, give 25 credit a. becomes [a,b] cell.

for [b,a] cell, it's similar process:

  1. similarly, across second row of matrix.
  2. ignore b's relationship a.
  3. b has 0 relationship c. ignore because of 0.
  4. b has 50 relationship d. node a's relationship d 25, give b credit of 25 in terms of overlap.

conceptually, these relatively straightforward, functions permit these operations? actual matrix has hundreds of nodes, calculating hand not option.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -