Constructive almost periodic factorization of some triangular matrix functions