@@ -113,10 +113,10 @@ The ``\mathbf{P_u}`` and ``\mathbf{T_u}`` matrices are defined in the Extended H
113113
114114# Extended Help
115115!!! details "Extended Help"
116- With ``n_j ``, the ``j ``th element of the ``\m athbf{n_b}`` vector defined in [`move_blocking`](@ref)
117- documentation, we introduce the ``\m athbf{Q}(j )`` matrix of size `(nu*nj , nu)`:
116+ With ``n_i ``, the ``i ``th element of the ``\m athbf{n_b}`` vector defined in [`move_blocking`](@ref)
117+ documentation, we introduce the ``\m athbf{Q}(i )`` matrix of size `(nu*ni , nu)`:
118118 ```math
119- \m athbf{Q}(j ) = \b egin{bmatrix}
119+ \m athbf{Q}(i ) = \b egin{bmatrix}
120120 \m athbf{I} \\
121121 \m athbf{I} \\
122122 \v dots \\
@@ -152,11 +152,11 @@ function init_ZtoU(
152152 # Pu and Tu are `Matrix{NT}`, conversion is faster than `Matrix{Bool}` or `BitMatrix`
153153 I_nu = Matrix {NT} (I, nu, nu)
154154 PuDagger = Matrix {NT} (undef, nu* Hp, nu* Hc)
155- for j = 1 : Hc
156- nj = nb[j ]
157- Qj = repeat (I_nu, nj , 1 )
158- iRows = (1 : nu* nj ) .+ @views nu* sum (nb[1 : j - 1 ])
159- PuDagger[iRows, :] = [repeat (Qj , 1 , j ) zeros (nu* nj , nu* (Hc- j ))]
155+ for i = 1 : Hc
156+ ni = nb[i ]
157+ Qi = repeat (I_nu, ni , 1 )
158+ iRows = (1 : nu* ni ) .+ @views nu* sum (nb[1 : i - 1 ])
159+ PuDagger[iRows, :] = [repeat (Qi , 1 , i ) zeros (nu* ni , nu* (Hc- i ))]
160160 end
161161 Pu = init_PUmat (estim, transcription, Hp, Hc, PuDagger)
162162 Tu = repeat (I_nu, Hp)
0 commit comments