absorbing_centrality.update_fundamental_matrix — absorbing-centrality documentation

# absorbing_centrality.update_fundamental_matrix

`update_fundamental_matrix`(P, F, next, previous, previous_index=0, node_order=None)

  Applies Woodbury’s formula to update the fundamental matrix in order to avoid doing an inversion.

  Parameters: | P (matrix) – The transition matrix of the graph, where previous is non absorbing. F (matrix) – The fundamental matrix of the graph after setting the node previous as an absorbing node. next (int) – The node that will be set as absorbing next. The result of this call will result in a fundamental matrix where next is an absorbing node. previous (int) – The node that was set as absorbing when computing F. previous_index (int, optional) – The row/col index of node previous in P (default is 0). node_order (list, optional) – The nodes that corresponds to the rows/cols of P, in order. If not supplied, the order is considered to be [0, .. , n_P - 1], where n_P is the the number of rows/cols in P.
  Returns: | P_updated (matrix) – The new transition matrix, where previous is absorbing. F_updated (matrix) – The fundamental matrix after adding previous and next in the set of absorbing nodes. node_order_updated (list) – The new order of the non absorbing nodes in the F_new. next_index (int) – The row/col index of the node next, that we just set as absorbing, in P_new.