- TAOCP/InformationStructures
''새 원소 넣기(inserting an element at the rear of the queue)
맨 앞 원소 빼기(removing the front node)
F ← F + 1; Y ← X[F]; if F = R, then set F ← R ← 0''
하지만 공간낭비가 무한할 수 있다.( F, R이 계속증가하기 때문이다.) 따라서 이런 문제(the problem of the queue overrunning memory)를 해결하려면, M개의 노드(X[1]...X[M])가 순환하도록 한다.
''if R = M then R ← 1, otherwise R ← R + 1; X[R] ← Y.
if F = M then F ← 1, otherwise F ← F + 1; Y ← X[F].''
(6a),(7a)에서는 초기 조건이 F = R = 1이다. 만약 F = 0이라면 오버플로우가 생기지 않기 때문이다.
하지만 리스트가 더 많으면 bottom이 움직일 수 있어야 한다.(we must allow the "bottom" elements of the lists to change therir positions.) MIX에서 I번째 한 WORD를 rA에 가져오는 코드는 다음과 같다.
Found 1 matching page out of 7540 total pages
You can also click here to search title.