TrenchInverseUpdate[GI_, r_, rnew_] := 
    Module[{v = First[r], g = Most[Reverse[Flatten[{r, rnew}]]], e, f, A}, 
     GIg = FastGIg[GI, g]; e = Fast22[GIg, g, v]; f = Fast12[GIg, e]; 
      A = Fast11[GI, e, GIg]; Partition[
       Flatten[{Transpose[Partition[Flatten[{A, f}], Length[f]]], f, e}], 
       Length[f] + 1]]
 
TrenchInverseUpdate /: TrenchInverseUpdate::usage = "TrenchInverseUpdate[GI,r\
,rnew] uses partitioned matrix result to obtain the order n+1 inverse given \
the order n inverse of G, GI; the first row of G, r; and the next element of \
the first row rnew."
 
FastGIg = CompiledFunction[{{_Real, 2}, {_Real, 1}}, 
     {{3, 2, 0}, {3, 1, 1}, {3, 1, 2}}, {0, 0, 0, 0, 3}, 
     {{1, 5}, {86, 1, 0, 2}, {2}}, Function[{GI, g}, g . GI], Evaluate]
 
Fast22 = CompiledFunction[{{_Real, 1}, {_Real, 1}, _Real}, 
     {{3, 1, 0}, {3, 1, 1}, {3, 0, 0}, {3, 0, 2}}, {0, 1, 3, 0, 2}, 
     {{1, 5}, {4, 1, 0}, {86, 1, 0, 1}, {33, 1, 2}, {25, 0, 2, 1}, 
      {89, 260, 2, 0, 0, 3, 0, 1, 3, 0, 2}, {2}}, Function[{GIg, g, v}, 
      1/(v - g . GIg)], Evaluate]
 
Fast12 = CompiledFunction[{{_Real, 1}, _Real}, {{3, 1, 0}, {3, 0, 0}, 
      {3, 1, 2}}, {0, 0, 1, 0, 3}, {{1, 5}, {88, 41, 3, 1, 0, 3, 1, 1}, 
      {89, 273, 3, 0, 0, 3, 1, 1, 3, 1, 2}, {2}}, Function[{GIg, e}, 
      (-GIg)*e], Evaluate]
 
Fast11 = CompiledFunction[{{_Real, 2}, _Real, {_Real, 1}}, 
     {{3, 2, 0}, {3, 0, 0}, {3, 1, 1}, {3, 2, 2}}, {0, 8, 4, 0, 4}, 
     {{1, 5}, {57, 1, 2}, {57, 1, 3}, {4, 0, 6}, {58, 2, 3, 3, 2}, {4, 0, 7}, 
      {9, 7, 4}, {79, 4, 2, 9}, {4, 0, 7}, {9, 7, 5}, {79, 5, 3, -3}, 
      {64, 1, 0, 4, 0, 2}, {64, 1, 0, 5, 0, 3}, {29, 2, 3, 2}, {59, 6, 2, 2}, 
      {42, -5}, {89, 273, 3, 0, 0, 3, 2, 2, 3, 2, 3}, {27, 0, 3, 2}, {2}}, 
     Function[{GI, e, GIg}, GI + Table[GIg[[i]]*GIg[[j]], {i, Length[GIg]}, 
         {j, Length[GIg]}]*e], Evaluate]
