- 틀:ProgrammingLanguage
||<-10><align="center" style="border-width: 2px; background: #dddddd">'''언어의 종류'''||
||<-3><style="background: #eeeeee;">'''머신 친화적'''||<-7><style="background: #eeeeee">'''C가족'''||
||<-4><style="background: #eeeeee">'''[객체지향]'''||<-6><style="background: #eeeeee">'''함수형 언어'''||
||[SmallTalk]||[JAVA]||<-2>[wiki:"CSharp" C#]||<-2>[wiki:LispLanguage|Lisp]족||<-2>[wiki:"HaskellLanguage" Haskell]||<-2>[wiki:"Scala" Scala]||
||<-10><style="background: #eeeeee">'''스크립트언어'''||
||[JavaScript]||[CoffeeScript]||[Perl]||[Lua]||[PHP]||[Python]||[PyPy]||[Ruby]||[ShellScript]||[MATLAB]||
||<-10><style="background: #eeeeee">'''미분류'''||
||[Erlang]||[Go]||[J]||[OCaml]||[Scala]||[R]||[CSS]||[ML]||[Ada]||[Prolog]||
||[Scratch]||[Rust]||[less]||<-7> ||
[http://ko.wikipedia.org/wiki/프로그래밍_언어_목록 프로그래밍 언어 목록]
- TAOCP/InformationStructures
= 2.2. Linear Lists =
한 노드에 들어있는 WORD의 수가 c개라면 다음과 같이 쓸 수 있다.
상수 L0를 base address라고 한다면 다음과 같이도 쓸 수 있다.
''새 원소 넣기(inserting an element at the rear of the queue)
R ← R + 1; X[R] ← Y;
맨 앞 원소 빼기(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이라면 오버플로우가 생기지 않기 때문이다.
AnswerMe 그렇다면 새 원소를 넣으면 X[2]부터 들어간다는 건가? --[Leonardong]
하지만 리스트가 더 많으면 bottom이 움직일 수 있어야 한다.(we must allow the "bottom" elements of the lists to change therir positions.) MIX에서 I번째 한 WORD를 rA에 가져오는 코드는 다음과 같다.
''LD1 I ;I를 rI2에 넣는다.
LDA BASE(0:2) ;BASE에 저장된 L0주소를 rA에 넣는다.
LDA *,1 ;여기에 I를 더한 주소로 가서 그 값을 rA에 넣는다.''
여기서 i번째 스택에서 오버플로우가 생기면 메모리 재배치(repack memory)를 할 수 있다. 몇가지 방법이 있는데 지금부터 자세히 알아보자.
한 번 메모리 재배치를 할 때마다 공간을 적당히 마련하는 방법도 가능하다.( 그러나 이해하지 못했다.p.250에 중간에 보면 위 알고리즘(Algorithm G나 R)과 비슷한 동적 메모리 할당 알고리즘의 수학적 분석은 매우 어렵다고 나와있다. )
Found 2 matching pages out of 7540 total pages
You can also click here to search title.