Skip to main content
. 2017 Feb 28;17(3):478. doi: 10.3390/s17030478
Algorithm 1. Grid Based Greedy Gait Segmentation Algorithm *
1 Input: ε, C, N// ε is the termination criteria for the iteration
2 Initialize: c0=g^, b0=0, i=0, h0(k)=b0+(k1)c0 for k=0:Nc1
3 Do:// equally spaced grid optimization by iteration
4 i=i+1, Nc=int(N/ci1),
5 For k=0:Nc1 Do:
6   hi1(k)=int(bi1+(k1)ci1),
7   ς^(k) = GreedySearch1(hi1(k), C),
8 End For
9 ci=k=1Nc1(ς^(k)ς^(k1))/(Nc1),
10 bi=bi1+k=0Nc1(ς^(k)hi1(k))/Nc,
11 While: max(bibi1,cici1)>ε
12   Nc=int(N/ci),
13 For k=0:Nc1 Do: //locally optimized without the equally spaced constraint
14 hi(k)=int(bi+(k1)ci),
15 h(k) = GreedySearch2(hi(k), C),
16 End For
17 Output: h={h(k)|h=0:Nc1}
* Symbols in Algorithm 1 are described in the context of Section 3.1.