iw.diaconis_fill

cal_beta_gamma

iw.diaconis_fill.cal_beta_gamma.cal_beta_gamma()

cal_beta_gamma function Computation of the estimation of gamma and beta

  • Inputs:

Parameters
  • L (1d double array) – L is the laplacien matrix L nxn matrix; Markov generator

  • row (1d int_ array) – row array of sparse matrix L

  • col (1d int_ array) – column array of sparse matrix L

  • shape (int) – shape of Laplacien matrix

  • GXbarrebr – matrix (-L_Xbreve,Xbreve)^{-1}

  • row2 (1d int_ array) – row array of sparse matrix GXbarrebr

  • col2 (1d int_ array) – column array of sparse matrix GXbarrebr

  • shape2 (int) – shape of L matrix

  • Xbarre (1d int_ array) – vector of nR indices corresponding to the part of matrix L

  • Xbreve (1d int_ array) – vector of nR-n indices corresponding to complement of Xbarre the root indices

  • a (double) – maximum rate (maximum of the absolute value of the diagonal coefficients of L)

  • Output:

Returns

tuple of (gam, beta) where gamma: numeric. 1/gamma= maximum Hitting time and beta: the mean of the return time after the first step.

Return type

tuple of 2 double values

complementschur

iw.diaconis_fill.complementschur.complementschur()

Schur complement is the computation function M of D based on the formula: with

L =  \begin{bmatrix}
       A & B \\
       C & D
    \end{bmatrix}

the Schur complement of D is SM(D) = A - B D^{-1} C

  • Input:

Parameters
  • L (1d double array) – L is the laplacien matrix

  • row (1d int_ array) – row array of sparse matrix L

  • col (1d int_ array) – column array of sparse matrix L

  • shape (int) – shape of L matrix

  • R (1d int_ array) – vector of nR indices corresponding to the roots indices

  • Rc (1d int_ array) – vector of nR-n indices corresponding to complement of the root indices

  • Output:

Returns

tuple of (Lbarre1d, row1, col1, shape1, abarre, GXbarrebr1d, row2, col2, shape2) where Lbarre1d is Schur complement of [L]_Rc in L , row1, col1, shape1, corresponding rox, col and shape abarre value of abarre, GXbarrebr1d ([L]_Rc)^{-1} 1d sparse matrix , row2, col2, shape2, corresponding rox, col and shape

Return type

tuple of arrays and double values