Recursive call is that this method call oneself.
Specially, Function uses this method.
Below C Source is example for recursive call function.
As you see, Function RF called the RF that is name of oneself.
Now I give you one question.
Please make Fibonacci sequence function using recursive call method.
You can see Fibonacci condition <here>
The LINUX that is name of OS is also recursive call type.
Some people said " LINUX is abbreviation of LINUX is not UNIX. "
Here, LINUX is call LINUX is not UNIX. In this sentence, LINUX is call LINUX is not UNIX again..
so..like that
(((((LINUX is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX
This case sink into the infinity roof because there is not escape condition. so we have to be careful when we use recursive call.
<English is very difficult.. Plz someone correct my poor sentence.>
์ฌ๊ทํธ์ถ์ด๋ ์๊ธฐ๊ฐ ์๊ธฐ์์ ์ ํธ์ถํ๋ ๋ฐฉ์์ ๋งํ๋ค.
ํนํ ํจ์์์ ์ด๋ฐ ์ผ์ ํ๋ค.
์ด๋ฐ ์ฌ๊ทํธ์ถ ํจ์๊ฐ ํ์ํ ๊ฒฝ์ฐ๋
์ด๋ค ์ผ์ ํ๋ ํจ์๊ฐ ์ฌ๋ฌ๊ฐ์ง ์กฐ๊ฑด์ ๋ํ์ฌ ๋๊ฐ์ ์ผ์ ํ ํ์๊ฐ ์์ ๋์ด๋ค.
๊ทธ๋ฐ๋ฐ ๋ค์ ์ฌ๋ฌ๊ฐ์ง ์กฐ๊ฑด์ด ์ฃผ์ด์ง๊ณ ๋๋ค์ ๊ฐ์ ์ผ์ ํด์ผํ ๋ ์ฌ๊ท ํธ์ถ ํจ์๋ฅผ ์ด๋ค.
์ด๊ฑด ๋ง๋ก ํํํ๊ธฐ ๋ฌด์ฒ ์ด๋ ต๋ค.. ใ
ใ
ํ๊ฐ์ง ์์ ๋ฅผ ๋ณด์
----------------------------------------------
int RF(int A);
void main()
{
printf("%d\n", RF(5) );
}
int RF(int A)
{
int B=0;
if(A>1)
{
B = RF(A-1);
}
return A+B;
}
------------------------------------------------
RFํจ์๋ 1์์ ์
๋ ฅ๋ ์ซ์๊น์ง ๋ํ๋ ํจ์์ด๋ค.
RFํจ์๋ฅผ ๋ณด๋ฉด ๋ณธ๋ฌธ์์ ๋ค์ ์๊ธฐ ์์ ์ ํธ์ถํ๋ ๊ฒ์ ๋ณผ ์ ์๋ค.
์ด๋ฐ ๋ฐฉ๋ฒ์ ์ฌ๊ทํธ์ถ์ด๋ผ๊ณ ํ๋ค.
์ฌ๊ธฐ์ ๋ฌธ์ ๊ฐ ๋๊ฐ๋๋ค.
์ด๋ฐ ์ฌ๊ทํธ์ถ ๋ฐฉ์์ ์ด์ฉํ์ฌ ํผ๋ณด๋์น ์์ด์ ๊ฐ์ ๊ตฌํ๋ ํจ์๋ฅผ ๊ตฌํํด ๋ณด์์ค.
์ด๋ฒ์๋ ์ข ์ด๋ ค์ธ ๊ฑธ.. ใ
ใ
์ด๋ฐ ๊ฒ๋ ์ฌ๊ท ํธ์ถ์ผ๊น?
LINUX ๋ผ๋ ์ด์์ฒด์ ๊ฐ ์๋ค.
๊ทธ๋ฐ๋ฐ ์ด๊ฒ์ LINUX is not UNIX์ ์ฝ์๋ผ๊ณ ํ๋ค. ๊ทธ๋ฐ๋ฐ ์ฌ๊ธฐ์ LINUX๋ ๋ค์ LINUX is no UNIX๋ฅผ ๋ง๋ ๋ค.
๋ฐ๋ผ์ ..
(((((LINUX is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX
LINUX is not UNIX์์ LINUX๊ฐ ๊ณ์ LINUX is not UNIX๋ฅผ ์์ฑํด ๋ธ๋ค..
์ด๋ ๋ฏ ์ฌ๊ทํธ์ถ์ ์กฐ๊ฑด ๋ฌธ์ผ๋ก break๋ฅผ ์ ํด์ฃผ์ง ์์ผ๋ฉด ๋ฌดํ ๋ฃจํ์ ๋น ์ง๊ธฐ ์ฝ๋ค..
9/05/2011
What is a Recursive Call? and Make Fibonacci sequence function using Function of the Recursive Call type.
-
put a explicit parameter name like: from sklearn.utils import class_weight class_weights = class_weight.compute_class_weight( class_weight...
-
make well divided linear coordinate And make pair coordinate Please see code for detail explanation. import numpy as np import cv2 ...
-
CUDA_ARCH_BIN Table for gpu type Jetson Products GPU Compute Capability Jetson AGX Xavier 7.2 Jetson Nano 5.3 Jetson TX2 6.2 Jetson TX1 5.3 ...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
code : import cv2 import base64 import json import numpy as np ###################################################### #read image img...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv <-> rgb converting example code. refer to this page -> ht...
-
This is dithering example, it make image like a stippling effect. I referenced to blew website. wiki page: https://en.wikipedia.org/wik...
-
I can know all coordinate from A point to B point using "LineIterator" function in OpenCV. So this source code is applied by this...