@@ -113,10 +113,10 @@ The ``\mathbf{P_u}`` and ``\mathbf{T_u}`` matrices are defined in the Extended H
113
113
114
114
# Extended Help
115
115
!!! 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)`:
118
118
```math
119
- \m athbf{Q}(j ) = \b egin{bmatrix}
119
+ \m athbf{Q}(i ) = \b egin{bmatrix}
120
120
\m athbf{I} \\
121
121
\m athbf{I} \\
122
122
\v dots \\
@@ -152,11 +152,11 @@ function init_ZtoU(
152
152
# Pu and Tu are `Matrix{NT}`, conversion is faster than `Matrix{Bool}` or `BitMatrix`
153
153
I_nu = Matrix {NT} (I, nu, nu)
154
154
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 ))]
160
160
end
161
161
Pu = init_PUmat (estim, transcription, Hp, Hc, PuDagger)
162
162
Tu = repeat (I_nu, Hp)
0 commit comments