반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
 
using namespace std;
 
int main(void){
    int a;
    int &b=a;
    int *c=&a;
    a=7;
    cout<<"a="<<a<<" b="<<b<<" *c="<<*c<<endl;
    cout<<"&a="<<&a<<" &b="<<&b<<" c="<<c<<endl;
 
    return 0;
}
cs






a는 int형 변수
b는 a의 별명(레퍼런스, 참조)
c는 a를 가리키는 포인터 변수
즉 a와 b와 *c는 같을 것이고
&a 와 &b와 c는 같을 것이다.
헷갈리지 말자~!


반응형
반응형

연금보험, 연금저축보험 :

http://cidermics.com/contents/detail/1656

즉 내가하고잇는건 연금저축보험


신용카드, 체크카드 공제 :

https://banksalad.com/contents/%EC%B9%B4%EB%93%9C-%EC%86%8C%EB%93%9D%EA%B3%B5%EC%A0%9C-%EC%96%BC%EB%A7%88%EB%82%98-%EC%95%8C%EA%B3%A0-%EA%B3%84%EC%8B%A0%EA%B0%80%EC%9A%94-2765


연말정산, 소득공제, 세액공제 :

https://www.mk.co.kr/news/economy/view/2015/12/1186072/

https://www.lifeplus.co.kr/now/detail/?seq=132

https://post.naver.com/viewer/postView.nhn?volumeNo=12006975&memberNo=29281708

https://blog.toss.im/2018/04/22/money/life/year-end-tax-adjustment/

https://eknowhow.kr/archives/11123

http://likeaturtle.kr/%EC%84%B8%EC%95%A1%EA%B3%B5%EC%A0%9C%ED%95%AD%EB%AA%A9%EC%A0%95%EB%A6%AC-%EC%97%B0%EB%A7%90%EC%A0%95%EC%82%B0-%EC%84%B8%EA%B8%88/   << 베리굿

https://m.post.naver.com/viewer/postView.nhn?volumeNo=17371129&memberNo=31236733

https://banksalad.com/contents/%EB%8B%A4%EB%93%A4-%EC%95%84%EB%8A%94%EC%B2%99-%ED%95%98%EC%A7%80%EB%A7%8C-%EC%9E%98-%EB%AA%A8%EB%A5%B4%EB%8A%94-%EC%97%B0%EB%A7%90%EC%A0%95%EC%82%B0-%EA%B8%B0%EB%B3%B8%EA%B0%9C%EB%85%90-5%EA%B0%80%EC%A7%80-2a6d

https://meaningone.tistory.com/643

https://1boon.kakao.com/nts/180119


body effect : 

https://amanan1004.tistory.com/35

https://kkhipp.tistory.com/125

https://it-learning.tistory.com/26

https://blog.skhynix.com/2248


vba sheet : 

http://www.iexceller.com/MyXls/VBA_Beginner/VBA_Beginner4.asp


vba 반복문 :

https://mainia.tistory.com/1261 

https://simon-k.tistory.com/8

http://www.officetutor.co.kr/board/faq_lib/frm_vba_content.asp?page=7&idx=650

https://m.blog.naver.com/PostView.nhn?blogId=todoskr&logNo=220537804632&proxyReferer=https%3A%2F%2Fwww.google.com%2F


vba if :

http://www.officetutor.co.kr/board/faq_lib/frm_vba_content.asp?page=9&idx=628

https://mainia.tistory.com/4688


vba range :

https://itlove.tistory.com/81?category=662117


vba 연산자 :

https://wikidocs.net/2064


vba 변수 접근 정도(지역, 전역, private public 이런거) :

https://guslabview.tistory.com/135

https://wikidocs.net/2041

https://mainia.tistory.com/4647

https://mapagilove.tistory.com/entry/%EC%97%91%EC%85%80VBA-%EB%B3%80%EC%88%98-%EC%84%A0%EC%96%B8%EC%9D%98-%EC%82%AC%EC%9A%A9-Public-Private-Dim

https://m.blog.naver.com/PostView.nhn?blogId=todoskr&logNo=220533839152&proxyReferer=https%3A%2F%2Fwww.google.com%2F


vba 변수 타입 : 

https://guslabview.tistory.com/129


vba set let :

https://cafe.naver.com/ex4mo/562

https://code.i-harness.com/ko-kr/q/3b1653


vba procedure 종류 :

https://blog.naver.com/PostView.nhn?blogId=todoskr&logNo=220524259249&categoryNo=65&parentCategoryNo=&from=thumbnailList

http://mwultong.blogspot.com/2006/11/excel-vba-function.html

https://ttend.tistory.com/673


vba excel 강좌 : 

https://krksap.tistory.com/31?category=486516

https://ttend.tistory.com/598

https://jaykim361.tistory.com/628

https://m.post.naver.com/viewer/postView.nhn?volumeNo=15965375&memberNo=25014136&vType=VERTICAL


verilog 반복문 : 

https://rebas.kr/214


verilog 모듈 내외부 포트 규칙 : 

http://hizino.tistory.com/entry/verilog-%EB%AA%A8%EB%93%88%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0

https://m.blog.naver.com/PostView.nhn?blogId=rbfwmqwntm&logNo=30137430508&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://stackoverflow.com/questions/11836416/signal-is-not-a-constant-error-in-if-statement

https://forums.xilinx.com/t5/Spartan-Family-FPGAs/error/td-p/550582


TSV(through silicon via) : 

http://www.samsungsemiconstory.com/817

http://blog.skhynix.com/1649

https://blog.naver.com/kore2758_/221031345529


parallel short circuit으로 전류 다흐르는 이유 :

http://pui.chorwong.com/devry/?p=108

KCL로하믄댐


msb, lsb : 

http://www.hackerschool.org/Sub_Html/HS_University/HardwareHacking/24.html


verilog 배열, 벡터 차이 : 

https://electronics.stackexchange.com/questions/354128/what-is-the-difference-between-scalar-array-and-vector-array

http://vlsibuzz.blogspot.com/2009/11/what-is-difference-between-vector-array.html

http://hizino.tistory.com/entry/Verilog%EC%9D%98-%EA%B8%B0%EB%B3%B8-%EC%88%AB%EC%9E%90%ED%91%9C%ED%98%84-%EC%9E%90%EB%A3%8C%ED%98%95-%EB%B2%A1%ED%84%B0-%EB%B0%B0%EC%97%B4-%EB%AC%B8%EC%9E%90%EC%97%B4

https://rebas.tistory.com/213

https://verificationacademy.com/forums/ovm/difference-between-packed-and-unpacked-arrays


결론적으로 

reg [5:0] arr_test [0:9];// 10개의 arr_test 변수의 배열, 각 변수는 6비트 폭을 가짐

출처: https://rebas.tistory.com/213 [PROJECT REBAS]

이렇게 나타낼 수 있는데 앞쪽이 벡터(변수타입 뒤), 뒷쪽이 배열(이름뒤)임

즉 10개의 줄이 있고 그 한줄당 변수가 6개씩 들어있따는 뜻임

즉 c언어로 치면 

벡터 : 배열 

배열 : 2차원배열중 앞단 


verilog always@ :

https://stackoverflow.com/questions/15450149/always-block-means


verilog wire reg :

http://blog.naver.com/PostView.nhn?blogId=jooh55&logNo=110031426601&widgetTypeCall=true

http://scieng.net/tech/16452


verilog time scale : 

http://blog.naver.com/PostView.nhn?blogId=j0hnch01&logNo=70030000024&redirect=Dlog&widgetTypeCall=true&directAccess=false


bjt, mosfet :

http://kkhipp.tistory.com/12

http://electronicsdo.tistory.com/entry/%EC%A0%84%EC%9E%90%ED%9A%8C%EB%A1%9CPEARSON-Electronic-Devices-4%EB%B0%94%EC%9D%B4%ED%8F%B4%EB%9D%BC-%EC%A0%91%ED%95%A9-%ED%8A%B8%EB%9E%9C%EC%A7%80%EC%8A%A4%ED%84%B0


cascade :

http://blog.naver.com/PostView.nhn?blogId=dbrqudgh&logNo=220636858866


전류 미러 current mirror :

https://blog.naver.com/beahey/90163425302



허수 imaginary number :

https://wikidocs.net/4030


전압원, 전류원 voltage source current source :

https://tip.daum.net/question/89958421

https://www.google.co.kr/url?sa=t&source=web&rct=j&url=http://m.cafe.daum.net/firetechnicist/Ncz3/62%3Fq%3DD_zVRtx.iHXDw0%26&ved=2ahUKEwjilczl8ZHdAhXHMd4KHSllBTMQFjAAegQIAxAB&usg=AOvVaw2a7mQ0n43tb3ChxAlHLnxi

https://m.blog.naver.com/khc6619/220529135115







차동 증폭기 diffrential amplifier mos 차동쌍 :

https://www.allaboutcircuits.com/technical-articles/the-mosfet-differential-pair-with-active-load/

https://blog.naver.com/dbrqudgh/220638180339


bjt 동작 영역 : 

http://electronicsdo.tistory.com/entry/%EC%A0%84%EC%9E%90%ED%9A%8C%EB%A1%9CPEARSON-Electronic-Devices-4%EB%B0%94%EC%9D%B4%ED%8F%B4%EB%9D%BC-%EC%A0%91%ED%95%A9-%ED%8A%B8%EB%9E%9C%EC%A7%80%EC%8A%A4%ED%84%B0

http://kkhipp.tistory.com/12

http://egloos.zum.com/slgi97/v/10831353


arduino 외부 전원 : 

http://deneb21.tistory.com/545

https://m.blog.naver.com/PostView.nhn?blogId=roboholic84&logNo=220833291317&targetKeyword=&targetRecommendationCode=1

https://blog.naver.com/roboholic84/220939806195


응력, 변형력, stress :

https://m.blog.naver.com/PostView.nhn?blogId=junilov2&logNo=220272926492&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


zener , avalanche breakdown :

https://circuitglobe.com/difference-between-avalanche-and-zener-breakdown.html

https://m.blog.naver.com/PostView.nhn?blogId=rrt016&logNo=220653696280&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://www.youtube.com/results?search_query=avalanche+breakdown

https://www.youtube.com/watch?v=5iD4-nsp14Y


형광(fluorescence), 인광(phosphorescence) : 

http://blog.naver.com/PostView.nhn?blogId=jgw1030&logNo=221172832375&redirect=Dlog&widgetTypeCall=true&directAccess=false

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220903187398&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://blog.naver.com/PostView.nhn?blogId=ynnkee&logNo=20056279345&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


EIL, ETL, HIL, HTL :

https://m.blog.naver.com/PostView.nhn?blogId=ckbc6101&logNo=220460468110&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


diode :

https://m.blog.naver.com/PostView.nhn?blogId=tnalsdl326&logNo=220322844708&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


led (light emitting diode) :

http://www.samsungsemiconstory.com/248

결국 다이오드인데 캐리어가 흐르다가 중간에서 결합해서 빛이나와버린다

그 에너지갭(차이) 가 어떤 파장의 빛을 내보낼지 결정함


lcd 전압구동 oled 전류구동 :

oled 트랜지스터 전류 linear region 에 의해 계조 표현

https://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1114&docId=51945124&qb=b2xlZCDsoITrpZgg6rWs64+Z&enc=utf8&section=kin&rank=1&search_sort=0&spq=0

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60200929839&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=61560207&qb=7KCE66WY6rWs64+ZIOyghOyVleq1rOuPmSDssKjsnbTsoJA=&enc=utf8&section=kin&rank=5&search_sort=0&spq=0&sp=1&pid=RCBnF35Y7twssZI1LfCssssssu4-185490&sid=UkjPn3JvLBwAAE61Grw


oled 구동 drive : 

https://blog.naver.com/youngdisplay/220595961156

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220941829168&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://allled.tistory.com/29?category=773506


애노드, 캐소드 (anode, cathode) :

https://ko.wikipedia.org/wiki/%EC%95%A0%EB%85%B8%EB%93%9C

https://ko.wikipedia.org/wiki/%EC%BA%90%EC%86%8C%EB%93%9C

http://blog.daum.net/natures/15719362?tp_nil_a=1

애노드 - 산화전극 - 전류가 흘러 들어감

캐소드 - 환원전극 - 전류가 흘러 나옴

애노드 캐소드에 대한 이미지 검색결과


복굴절 (birefringent) : 

https://ko.wikipedia.org/wiki/%EB%B3%B5%EA%B5%B4%EC%A0%88

http://m.blog.daum.net/byeoldl/7

http://physica.gsnu.ac.kr/phtml/optics/polarization/birefringence/birefringence.html

http://physica.gsnu.ac.kr/physedu/wavelight/Polari2/Polar2.html


푸엥카레 구 (Poincare sphere) : 

http://physica.gsnu.ac.kr/phtml/optics/polarization/polrepresent/polrepresent4.html


glitch (글리치) :

매우짧게튀는신호.. (unwanted)

https://namu.wiki/w/%EA%B8%80%EB%A6%AC%EC%B9%98

http://blog.naver.com/PostView.nhn?blogId=elrlemrm&logNo=220039465381


setup time, hold time :

http://www.internex.co.kr/insiter.php?design_file=notice_v.php&article_num=13

http://www.ktword.co.kr/abbr_view.php?m_temp1=5542


finite state machine :

https://terms.naver.com/entry.nhn?docId=4396966&cid=60010&categoryId=60010


pipeline(파이프라인) :

http://kodb.or.kr/info/info_04_view.html?field=title&keyword=%BA%B4%B7%C4%BC%BA&type=techreport&page=1&dbnum=165254&mode=detail&type=techreport

https://kin.naver.com/qna/detail.nhn?d1id=1&dirId=10601&docId=67626676&qb=7YyM7J207ZSE65287J24&enc=utf8&section=kin&rank=2&search_sort=0&spq=1

https://kin.naver.com/qna/detail.nhn?d1id=1&dirId=101&docId=66289266&qb=7YyM7J207ZSE65287J24&enc=utf8&section=kin&rank=9&search_sort=0&spq=1

https://kin.naver.com/qna/detail.nhn?d1id=1&dirId=101&docId=278745248&qb=7YyM7J207ZSE65287J24&enc=utf8&section=kin&rank=5&search_sort=0&spq=1

http://kodb.or.kr/info/info_04_view.html?field=title&keyword=%BA%B4%B7%C4%BC%BA&type=techreport&page=1&dbnum=165254&mode=detail&type=techreport


sram :

https://kldp.org/node/110670


텐서(tensor) :

https://ghebook.blogspot.com/2011/06/tensor.html

http://www.ktword.co.kr/abbr_view.php?m_temp1=4588&m_search=%ED%85%90%EC%84%9C

https://terms.naver.com/entry.nhn?docId=1152933&cid=40942&categoryId=32227

https://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1113&docId=60279576&qb=7YWQ7ISc&enc=utf8&section=kin&rank=3&search_sort=0&spq=0

http://youngsubyoon.com/tensorKorean.pdf


gauss quadrature rule(가우스 구적법) :

https://blog.naver.com/PostView.nhn?blogId=mykepzzang&logNo=220598009564&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://blog.naver.com/PostView.nhn?blogId=mykepzzang&logNo=220598022457

https://helloworldpark.github.io/jekyll/update/2017/02/04/Gaussian-Quadrature.html


newton-rapson method :

http://darkpgmr.tistory.com/58

https://namu.wiki/w/%EB%89%B4%ED%84%B4-%EB%9E%A9%EC%8A%A8%20%EB%B0%A9%EB%B2%95



변분법(calculus of variations) : 

https://ko.wikipedia.org/wiki/%EB%B3%80%EB%B6%84%EB%B2%95


범함수(functional) :

 https://namu.wiki/w/%EB%B2%94%ED%95%A8%EC%88%98


mcu, dsp :

http://www.e4ds.com/sub_view.asp?best=1&ch=3178&t=1&idx=3178


matlab 매틀랩 행렬 matrix :

https://ko.wikiversity.org/wiki/Matlab_%ED%96%89%EB%A0%AC


원편광 :

http://ktword.co.kr/abbr_view.php?nav=&m_temp1=4516&id=40

https://m.blog.naver.com/PostView.nhn?blogId=panoptics&logNo=220931217141&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://m.blog.naver.com/PostView.nhn?blogId=ckbc6101&logNo=220475954380&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://blog.naver.com/PostView.nhn?blogId=panoptics&logNo=220931217141&parentCategoryNo=&categoryNo=1&viewDate=&isShowPopularPosts=true&from=search

http://physica.gsnu.ac.kr/phtml/optics/polarization/birefringence/birefringence5.html

http://blog.envision.co.kr/62


존스행렬, 존스벡터 :

http://physica.gsnu.ac.kr/phtml/optics/polarization/polrepresent/polrepresent2.html

https://ko.wikipedia.org/wiki/%EC%A1%B4%EC%8A%A4_%ED%96%89%EB%A0%AC

http://physica.gsnu.ac.kr/phtml/optics/polarization/polrepresent/polrepresent3.html


ltps, oxide tft(IGZO) :

http://news.samsungdisplay.com/6571

https://m.blog.naver.com/PostView.nhn?blogId=gowns721&logNo=221178061256&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://blog.naver.com/youngdisplay/60188122460

http://blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220968319816

https://m.blog.naver.com/PostView.nhn?blogId=fellowkjh&logNo=40158986318&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


백플레인 = TFT + substrate


eidophor :

http://www.televisionexperimenters.com/eidophor.html

https://terms.naver.com/entry.nhn?docId=1121488&cid=40942&categoryId=31759


dlp projector :

http://www.mdpi.com/2072-666X/3/2/509/htm (fab)

http://www.mdpi.com/2072-666X/6/12/1460/htm

https://www.researchgate.net/figure/Fabrication-process-flow-of-the-MEMS-cascaded-chevron-beam-microactuator-a-80-m-m_fig2_221896188

https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-18-12-12065&id=199707

https://m.blog.naver.com/PostView.nhn?blogId=jbw535&logNo=60155855724&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://ko.wikipedia.org/wiki/%EB%94%94%EC%A7%80%ED%84%B8_%EA%B4%91%EC%9B%90_%EC%B2%98%EB%A6%AC

https://m.blog.naver.com/PostView.nhn?blogId=rilia&logNo=10140828793&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


ohp(overhead projector) :

https://kaushalgrade10optics.wikispaces.com/Overhead+Projector?responseToken=1e8842abca93880b17e8fc48ce5b4ed2


프레넬 렌즈 Fresnel :

http://www.beam-matsumoto.co.jp/korea/product/fresnel-tokucho.html


hold time, setup time :

http://princess.kongju.ac.kr/digitalmain/dvlec/textbook/chap07/digital07_8.htm


에지 트리거 -> 아주짧은 CLK 상승, 하강 에지

레벨 트리거 -> CLK 1일때..

마스터 슬레이브 레벨 트리거 -> 인풋과 아웃풋의 시간적분리

래치 -> 클락없음 FF ->클락 있음 그런데 래치, FF 구분안하는 책도 많음.. 공학은 왜이렇게 단어가 표준화가 안되어있을까 ㅡㅡ;


선형 되먹임 시프트 레지스터(Linear feedback shift register, LFSR) : 

https://ko.wikipedia.org/wiki/%EC%84%A0%ED%98%95_%EB%90%98%EB%A8%B9%EC%9E%84_%EC%8B%9C%ED%94%84%ED%8A%B8_%EB%A0%88%EC%A7%80%EC%8A%A4%ED%84%B0


rc delay :

http://kkhipp.tistory.com/62


slew rate(슬루율) :

https://www.rohm.co.kr/electronics-basics/opamps/op_what5

https://ko.wikipedia.org/wiki/%EC%8A%AC%EB%A3%A8%EC%9C%A8

https://blog.naver.com/jimin_p/220690020630


comparator(비교기) :

https://blog.naver.com/jhkim6363/220306180280

http://cherryopatra.tistory.com/139


OP-AMP :

https://m.blog.naver.com/PostView.nhn?blogId=heojeahyun&logNo=110026220416&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


전류 종류 :

http://www.ktword.co.kr/abbr_view.php?m_temp1=5521

http://appleii.tistory.com/121


pspice mosfet  ad as pd ps :

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=265436000&qb=cHNwaWNlIGFkIGFz&enc=utf8&section=kin&rank=3&search_sort=0&spq=0&pid=Tq9B5lpVuEGssbKQnhdssssst5h-043781&sid=lS4T8N81Oo8jCLjqoH5cmw%3D%3D


cmos latch up :

IC칩이나 MCU에서 마니 발생할 수 있다고,,

https://m.blog.naver.com/PostView.nhn?blogId=10joanne23&logNo=220015903235&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://www.webcastlink.com/ms_pdf/667_20160106174436_201504_sr_st.pdf



cmos tap :

http://blog.daum.net/21th_vision/7083659


process corner :

http://blog.naver.com/PostView.nhn?blogId=narabaljeon&logNo=220951378006


화질보상 :

https://blog.naver.com/hominlim/221115955530

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60200929839&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://kin.naver.com/qna/detail.nhn?d1id=5&dirId=50103&docId=248605303&qb=b2xlZCDsmbjrtoDrs7Tsg4E=&enc=utf8&section=kin&rank=1&search_sort=0&spq=0


tft(thin film transistor) :

https://blog.naver.com/youngdisplay/220214508595

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1114&docId=51945124&qb=b2xlZCDsoITrpZgg6rWs64+ZIDPqsJw=&enc=utf8&section=kin&rank=1&search_sort=0&spq=0

http://kin.naver.com/qna/detail.nhn?d1id=1&dirId=10301&docId=217040277&qb=65SU7Iqk7ZSM66CI7J20IOycoOumrCDsgqzsmqkg7J207Jyg&enc=utf8&section=kin&rank=2&search_sort=0&spq=0

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=62450374&qb=7IK87ISxIHRmdCDsoITrpZgg6rWs64+Z&enc=utf8&section=kin&rank=1&search_sort=0&spq=0


유리 기판(glass substrate) :

http://www.sgh.kr/?module=file&act=procFileDownload&file_srl=1060&sid=1f80f632984c7c4b478034faca29252d

https://blog.naver.com/satinlak/220545904932


해시(hash) :

https://namu.wiki/w/%ED%95%B4%EC%8B%9C


SHA :

https://ko.wikipedia.org/wiki/SHA


암호화 해시 함수 :

https://ko.wikipedia.org/wiki/%EC%95%94%ED%98%B8%ED%99%94_%ED%95%B4%EC%8B%9C_%ED%95%A8%EC%88%98


공진(resonance) :

http://www.rfdh.com/bas_rf/begin/reso.htm


RLC circuit :

http://www.a24s.com/data/jeongbotongsinhakseub/jungi/jungi_3/jungi3-3.html

http://www.a24s.com/data/jeongbotongsinhakseub/jungi/jungi_3/jungi3-3.html

http://blog.naver.com/PostView.nhn?blogId=jsrhim516&logNo=221030654879&categoryNo=0&parentCategoryNo=0&viewDate=&currentPage=1&postListTopCurrentPage=1&from=postView



RC circuit :

https://blog.naver.com/PostView.nhn?blogId=lagrange0115&logNo=220659006305&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


수동소자, 능동소자 :

https://ko.wikipedia.org/wiki/%EC%88%98%EB%8F%99%EC%86%8C%EC%9E%90

http://www.ktword.co.kr/abbr_view.php?m_temp1=2588

https://ko.wikipedia.org/wiki/%EB%8A%A5%EB%8F%99%EC%86%8C%EC%9E%90


페트릭 메소드(petrick's method) : 

http://blastic.tistory.com/m/204


주항(prime implicant) :

http://thrillfighter.tistory.com/246

https://m.blog.naver.com/PostView.nhn?blogId=sealclear&logNo=20189491889&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


필수주항(essential prime implicant) : 

http://blog.naver.com/PostView.nhn?blogId=sealclear&logNo=20189494924&parentCategoryNo=&categoryNo=11&viewDate=&isShowPopularPosts=true&from=search


플립플롭(flip flop) :

https://namu.wiki/w/%ED%94%8C%EB%A6%BD%ED%94%8C%EB%A1%AD

http://air802.tistory.com/40

https://ko.wikipedia.org/wiki/%ED%94%8C%EB%A6%BD%ED%94%8C%EB%A1%AD


동차, 비동차 (homogenous, non homogenous) :

https://wikidocs.net/4062


퀸 맥클러스키 메소드 (Quine-McCluskey algorithm):

http://blastic.tistory.com/m/202

http://blog.naver.com/PostView.nhn?blogId=leeyunghuk1&logNo=220959424842

https://ko.wikipedia.org/wiki/%EC%BD%B0%EC%9D%B8-%EB%A7%A4%ED%81%B4%EB%9F%AC%EC%8A%A4%ED%82%A4_%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98


hard mask :

https://blog.naver.com/jgw1030/221198879492


double patterning :

https://blog.naver.com/dreamnewfuture/220832800440

https://blog.naver.com/tjdowl123/221206290398

https://m.blog.naver.com/PostView.nhn?blogId=klp0712&logNo=221080490955&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


면저항(sheet resistence), 비저항(resistivity) :

http://www.ktword.co.kr/abbr_view.php?m_temp1=4416http://kin.naver.com/qna/detail.nhn?

https://en.wikipedia.org/wiki/Sheet_resistanced1id=11&dirId=1115&docId=55334741&qb=66m07KCA7ZWt&enc=utf8&section=kin&rank=5&search_sort=0&spq=1

https://blog.naver.com/hjcfm/40163142217

https://blog.naver.com/PostView.nhn?blogId=clafte&logNo=120110720847&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=55675340&qb=66m07KCA7ZWt&enc=utf8&section=kin&rank=1&search_sort=0&spq=1


depostion (pvd, sputtering, evaporation) :

https://m.blog.naver.com/PostView.nhn?blogId=ckbc6101&logNo=220966477075&proxyReferer=https%3A%2F%2Fwww.google.gm%2F

https://m.blog.naver.com/PostView.nhn?blogId=kgp82&logNo=80047201193&proxyReferer=https%3A%2F%2Fwww.google.gm%2F


step coverage :

https://m.blog.naver.com/PostView.nhn?blogId=ckbc6101&logNo=220966477075&proxyReferer=https%3A%2F%2Fwww.google.gm%2F


파장과 분해능 (wavelength and resolution) :

분해능이 작을수록 분해능이 좋다.

노을을 생각하자.. 빨간빛의 파장이기니까 반사안되고 멀리까지오는것처럼..

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=11&docId=59983918&qb=7YyM7J6l7J20IOynp+ycvOuptCDrtoTtlbTriqU=&enc=utf8&section=kin&rank=9&search_sort=0&spq=0

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1116&docId=263252518&qb=7YyM7J6l7J20IOynp+ycvOuptCDrtoTtlbTriqU=&enc=utf8&section=kin&rank=4&search_sort=0&spq=0

https://m.blog.naver.com/PostView.nhn?blogId=klp0712&logNo=221080490955&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F



라디칼과 이온(radical, ion) :

http://ywpop.tistory.com/m/3290


7-segment(ic 7447 74ls47) :

https://m.blog.naver.com/PostView.nhn?blogId=lagrange0115&logNo=220720164704&categoryNo=0&proxyReferer=&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


감광제(양성, 음성)  :

http://blog.naver.com/PostView.nhn?blogId=soomin916&logNo=220366734740

https://www.yumpu.com/fr/document/view/37945438/611/37

(양성이 해상도 좋다)

https://m.blog.naver.com/PostView.nhn?blogId=gdpresent&logNo=220662464960&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://ocw.sogang.ac.kr/include/html/file_download.jsp?filepath=c%3A%2Fapp%2Focw%2Frfile%2F2011%2Fcourse10-spt&filename=TmJ2bndmaTl4TENpWHpJd01URXhNakk1TVRVeE56STNMbkJrWmc9PQ%3D%3D


카르노 맵 (Karnaugh's Map) :

https://www.slideserve.com/haley-dorsey/5895014


최소항의 합 (최소항식)(최소항은 ABC 이런거고 최대항은 A+B+C 이런거 단 존재하는 모든 입력이 다 나타나야 함) 로 나타낼 때는

예를들어 AB'C + A'B' + ABC'D 면 그 항에  없는 거는 (D+D') 이런식으로 곱해줌 그래야 D가 어떤 값이든 같은 결과값을 내줄테니까(언제나 1이 곱해지고 0이곱해져 결과가 바뀔 일 없음) 

AB'C(D+D') + A'B'(C+C')(D+D') + ABC'D 이런식으로 (C나 D가 어떤 값이든 간에 결과는 바뀌지 않는다 왜냐하면 D+D' 는 언제나 1이니까)

그리고 전개해주면 된다. 

최대항의 합(최대항식) 을 만들 때에는 예를 들어 (A+B'+C)(B'+C+D')(A+B'+C'+D) 가있고 입력이 A,B,C,D 가 있다 그러면 

입력이 부족한 항에는 DD' 같이 곱을 만들어서 붙여준다. 이렇게하면 어떻게 하든 0이 되기 때문에 결과를 바꾸지 않는다. (언제나 0이 더해지기 때문에 값을 바꿀일 없음) 따라서  (A+B'+C+DD')(AA'+B'+C+D')(A+B'+C'+D) 가 된다.  그다음 A+BC=(A+B)(A+C) 를 적용하면 된다. AA+AC+AB+BC=A+AC+AB+BC=A(1+C+B)+BC=A+BC

A+A=A


최소항에서는 프라임이 0 그냥이 1 (ABC는 111 A'BC 는 011)

최대항에서는 그냥이 0 프라임이 1 (A+B+C 는 0 0 0  A+B'+C' 는 011)


novec(불소용제 브랜드) :

http://solutions.3m.com/wps/portal/3M/ko_KR/3MNovec_APAC/Home/ProductCatalog/?PC_Z7_RJH9U5230GEC40I9P3RBAI2AC1000000_nid=VJK791MG8Cbe28QWC1BS6Fgl


Does any solvent that can reslove TEFLON exist ??  :

https://www.quora.com/Are-there-any-solvents-to-dissolve-teflon-or-PTFE


sping coating(스핀 코팅) :

https://www.youtube.com/watch?v=uv1A7qAqgRk


PSM(phase shift mask) :

http://blog.naver.com/PostView.nhn?blogId=titler5&logNo=20106457144&parentCategoryNo=1&categoryNo=&viewDate=&isShowPopularPosts=true&from=search


산화물tft(oxide tft) :

goo.gl/zoH4T6

https://namu.wiki/w/Oxide%20TFT

http://fish123.tistory.com/15

file55587-AMOLED용 산화물 TFT 기술.pdf

http://ddaily.co.kr/news/article.html?no=124959

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60188122460&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220968319816&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


tft 구동 방식 oled :

http://magazine.hellot.net/magz/article/articleDetail.do?flag=all&showType=showType1&articleId=ARTI_000000000039721&articleAllListSortType=sort_1&page=1&selectYearMonth=200710&subCtgId=


아몰레드(amoled) :

https://namu.wiki/w/AMOLED

https://blog.naver.com/hominlim/221115955530

http://www.edaily.co.kr/news/news_detail.asp?newsId=01626886609597208&mediaCodeNo=257&OutLnkChk=Y

https://m.blog.naver.com/PostView.nhn?blogId=bkpark777&logNo=80198918095&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


부울대수 분배법칙(boolean algebra distributive law)  :

http://greatjoy.tistory.com/entry/%EB%B6%80%EC%9A%B8-%EB%8C%80%EC%88%98Boolean-algebra-%EC%A0%9C2-%EB%B6%84%EB%B0%B0%EB%B2%95%EC%B9%99-%EC%A6%9D%EB%AA%85


sink current source current (싱크전류 소스전류) : 

https://m.blog.naver.com/PostView.nhn?blogId=yousk16&logNo=40050812052&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


the reason why we have to heavily dope :

왜냐하면  R컨택 + R소스 + Rext 의 합이 R채널의 10퍼센트보다 작아야함

R= 비저항(L/A) 인데 비저항(레지스티비티) 는 컨덕터비티의 역수임 따라서 비저항이 작아지면 저항은 작아진다. 이는 컨덕터비티가 커지면 r이 작아진다. 컨덕터 비티는 q*도펀트농도*캐리어모빌리티 니까 도펀트농도가 커지면 컨덕터비티 상승 즉 헤빌리 도핑 이즈 니디드 포 숏채널모스펫!


shallow junction :

https://web.stanford.edu/class/ee311/NOTES/ShallowJunctions.pdf


숏채널 이펙트를 prevent 하기위해서는 쉘로우 정션 필요 왜? 수식 확인할것

영어 읽기 싫어도 읽어야함


dibl:

https://mac0519.wordpress.com/2016/09/11/drain-induced-barrier-lowering-dibl/

(이게 최고 나머지 다 븅신임)

https://blog.naver.com/jgw1030/221323198606

http://btechguides.blogspot.kr/2013/03/drain-induced-barrier-lowering-dibl.html

https://blog.naver.com/dia830/220236664351

https://blog.naver.com/pbimh/221123368225


short channel effect:

https://it-learning.tistory.com/99

https://m.blog.naver.com/PostView.nhn?blogId=dia830&logNo=220236664351&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

https://blog.naver.com/rjsdud13/220961223648

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=114829987&qb=c2hvcnQgY2hhbm5lbCBlZmZlY3Q=&enc=utf8&section=kin&rank=2&search_sort=0&spq=1&pid=TFx5OlpySpZssvSflrKssssstp4-115231&sid=zh9sxuuWCM3dR4HKNORJ8g%3D%3D


펀치 스루(punch through) :

https://www.youtube.com/watch?v=1rvqVnbmbHI

(유튜브 영어강의가 젤낫다)

https://blog.naver.com/10joanne23/207828834

http://terms.naver.com/entry.nhn?docId=757285&cid=50324&categoryId=50324

http://blog.naver.com/PostView.nhn?blogId=dookie09&logNo=50086589338

https://m.blog.naver.com/PostView.nhn?blogId=10joanne23&logNo=207828834&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


존 비트(zone bit) :

http://kin.naver.com/qna/detail.nhn?d1id=1&dirId=11002&docId=64118439&qb=em9uZSBiaXQ=&enc=utf8&section=kin&rank=1&search_sort=0&spq=1


논리게이트(gate) : 

한 개 이상의 입력 단자와 하나의 출력 단자로 구성되는 전자회로

logic gate is an electronic circuit that has more than one input node and only one output node


2's compliment(2의 보수) :

http://backgom.tistory.com/entry/2%EC%9D%98-%EB%B3%B4%EC%88%98%EB%A5%BC-%EC%93%B0%EB%8A%94%EC%9D%B4%EC%9C%A0-%EB%B3%B4%EC%88%98-%ED%91%9C%ED%98%84%EB%B2%95

http://sk3010.tistory.com/entry/%EB%94%94%EC%A7%80%ED%84%B8-%EC%97%B0%EC%82%B0


분해능(resolution) in digital circuit theory:

http://www.nctechnology.co.kr/product-sogae/analogio-basic.htm


nyquist 나이퀴스트 theorem 이론 :

http://www.alanjshan.com/sampling-01/

http://blog.naver.com/PostView.nhn?blogId=ojiyo&logNo=40102620361

http://www.ktword.co.kr/abbr_view.php?m_temp1=1312

https://merefox.synology.me/wordpress/2017/07/31/%EB%82%98%EC%9D%B4%ED%80%B4%EC%8A%A4%ED%8A%B8-%EC%9D%B4%EB%A1%A0%EC%9D%98-%ED%97%88%EC%83%81-192khz-%EB%A5%BC-%EC%8D%A8%EC%95%BC%EB%A7%8C-%ED%95%98%EB%8A%94%EC%9D%B4%EC%9C%A0-1/

http://linecard.tistory.com/20

http://csesoo.tistory.com/22



불소수지:

http://www.daikin-korea.co.kr/products/resin/neoflon-fep.asp

http://www.daikin-korea.co.kr/feature/nonadherent.asp


선폭 :

리소그라피로 구현할 수 있는 선 자체의 폭

혹은 게이트의 폭

혹은 소스 드레인 사이 거리의 폭

혹은 게이트와 게이트 사이의 폭

다양한 의미로 쓰이는듯 함.. 표준화되어있지 않아서 굉장히 혼란스러운 어휘임..

http://blog.skhynix.com/1198

http://www.ddaily.co.kr/news/article.html?no=127685

http://smsinfo.tistory.com/869

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1118&docId=61714407&qb=67CY64+E7LK0IOyEoO2PrQ==&enc=utf8&section=kin&rank=1&search_sort=0&spq=0&pid=TE9qZlpySoGssc2OfJosssssszC-049948&sid=KXte1/cHoecbZm%2BwOvL0Kg%3D%3D


https://www.technonet.co.kr/skin_build61/bbs_list.php?boardT=v&board_data=aWR4PTIyNDgwJnN0YXJ0UGFnZT02MDAmbGlzdE5vPTQxNzYmdGFibGU9cmVkX2Jic19kYXRhJmNvZGU9ZXRjJnNlYXJjaF9pdGVtPSZzZWFyY2hfb3JkZXI9%7C%7C&search_items=Y29kZT1ldGMmc2VhcmNoX2l0ZW09JnNlYXJjaF9vcmRlcj0mdW5zaW5nY29kZTE9MTI1NTkyMjMzMSZ1bnNpbmdjb2RlMj0xMjU1OTIyNjE0JnVuc2luZ2NvZGUzPSZjYXRlPSZwd2Q9%7C%7C


http://www.ddaily.co.kr/news/article.html?no=77706


모바일OLED 해상도 :

https://m.blog.naver.com/PostView.nhn?blogId=alstjrgod&logNo=140189563007&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://3dfia.org/solar/?mode=read&cid=17&board=recent&cp=4&uid=224

http://www.ubiresearch.co.kr/%EA%B3%A0%ED%95%B4%EC%83%81%EB%8F%84%EC%9D%98-%EC%B5%9C%EC%A0%81-amoled%EB%8A%94-white-oled%EC%9D%B4%EB%8B%A4/


논리회로 관련:

https://m.blog.naver.com/PostView.nhn?blogId=interlaken89&logNo=20206659610&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


oled 화소(pixel) : 

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220151466452&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


euv lithography:

http://www.gigaphoton.com/kr/technology/euv-topics/what-is-euv-lithopgraphy

http://www.gigaphoton.com/kr/technology/euv-topics/what-is-euv-lithopgraphy


포토리소그래피 동향:

http://www.zdnet.co.kr/news/news_view.asp?artice_id=20140423153323


oled제작시 주의점 :

https://m.blog.naver.com/PostView.nhn?blogId=jkhan012&logNo=150087225483&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


블록체인(block chain) : 

http://simsimjae.tistory.com/189

http://book.naver.com/bookdb/book_detail.nhn?bid=9685493

https://jeunkim.blog.me/221184324907

https://homoefficio.github.io/2017/11/19/%EB%B8%94%EB%A1%9D%EC%B2%B4%EC%9D%B8-%ED%95%9C-%EB%B2%88%EC%97%90-%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0/

http://homoefficio.github.io/2016/01/23/BlockChain-%EA%B8%B0%EC%B4%88-%EA%B0%9C%EB%85%90/


인터프리팅과 컴파일(interpreting, compile) :

http://hieroglyph.tistory.com/4

http://www.emh.co.kr/content.pl?compiled_interpreted

http://seodh007.tistory.com/entry/%EC%9D%B8%ED%84%B0%ED%94%84%EB%A6%AC%ED%84%B0%EC%96%B8%EC%96%B4-%EC%99%80-%EC%BB%B4%ED%8C%8C%EC%9D%BC%EC%96%B8%EC%96%B4%EC%9D%98-%EB%9C%BB


컴파일은 소스코드->(컴파일)오브젝트파일 ->링커가 라이브러리와 연결해서 실행파일 생성

인터프리팅언어는 그냥 소스코드(?) 만있고 따로 실행파일 생기는게아니라 실시간으로 번역 실행 번역 실행 (라인바이라인) 으로..



ltps:

http://blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60184497348&parentCategoryNo=&categoryNo=11&viewDate=&isShowPopularPosts=true&from=search

http://blog.lgdisplay.com/2016/04/tft/

http://www.dt.co.kr/contents.htm?article_no=2007101902011832673002

http://www.dt.co.kr/contents.htm?article_no=2007101902011832673002


외부 화질 개선:

https://blog.naver.com/hominlim/221115955530


맥스웰방정식:

https://namu.wiki/w/%EB%A7%A5%EC%8A%A4%EC%9B%B0%20%EB%B0%A9%EC%A0%95%EC%8B%9D


사이니지:

http://blog.lgdisplay.com/2015/03/digital-signage/


마케팅 프로세스:

http://zekesnote.tistory.com/116


divergence, gradient, curl:

http://38402160.tistory.com/14

http://38402160.tistory.com/15?category=617404

https://www.youtube.com/watch?v=vvzTEbp9lrc

http://mathnmath.tistory.com/66


annealing : 

http://www.sugawara-labs.co.jp/kr/application_xenonflash/semiconductor_annealing_heat_treatment

http://terms.naver.com/entry.nhn?docId=337771&cid=44616&categoryId=44616

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1115&docId=133574324&qb=YW5uZWFsaW5n&enc=utf8&section=kin&rank=2&search_sort=0&spq=0


LCD structure :

https://pid.samsungdisplay.com/ko/learning-center/blog/lcd-structure


FMM, OpenMask  :

https://m.blog.naver.com/PostView.nhn?blogId=ckbc6101&logNo=220925268341&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


Tandem:

http://blog.naver.com/youngdisplay/220839351887


마이크로LED:

http://blog.lgdisplay.com/2017/08/%EA%B8%B0%EA%B3%A0-%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C-led-micro-led%EC%9D%98-%EB%AF%B8%EB%9E%98%EB%8A%94/


woled:

http://blog.naver.com/ehdrbs0102/221036748836

http://www.gasengi.com/main/board.php?bo_table=commu07&wr_id=489310

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60161032358&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


LCD 패널 :

https://m.blog.naver.com/PostView.nhn?blogId=sct13a&logNo=10114840926&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


페르미에너지:

http://blog.naver.com/PostView.nhn?blogId=namgoocha&logNo=220542357591


옴닉컨택, 쇼트키컨택:


http://blog.naver.com/PostView.nhn?blogId=richard2828&logNo=220765259650&parentCategoryNo=&categoryNo=11&viewDate=&isShowPopularPosts=false&from=postList

http://blog.naver.com/PostView.nhn?blogId=74la0602t&logNo=66990153&redirect=Dlog&widgetTypeCall=true(그래프잘못됨)

http://blog.naver.com/PostView.nhn?blogId=richard2828&logNo=220776348036&parentCategoryNo=&categoryNo=11&viewDate=&isShowPopularPosts=false&from=postList

https://m.blog.naver.com/PostView.nhn?blogId=ang0095&logNo=220701220650&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


일함수 :

http://www.ktword.co.kr/abbr_view.php?m_temp1=4457


etching 관련 용어:

http://blog.naver.com/yc654/221016367601


VA:

https://pid.samsungdisplay.com/ko/learning-center/white-papers/va-vs-ips

http://egloos.zum.com/solette/v/5061147


포토리소그래피:

http://gijun.tistory.com/175

http://hjeon.namoweb.net/lecture/chapter-4

http://blog.naver.com/PostView.nhn?blogId=soomin916&logNo=220366734740

http://www.samsungsemiconstory.com/136

http://news.samsungdisplay.com/9566

http://kang.dk/156

http://blog.skhynix.com/1950

http://blog.naver.com/PostView.nhn?blogId=soomin916&logNo=220366734740

http://www.ktword.co.kr/abbr_view.php?m_temp1=5104

https://m.blog.naver.com/PostView.nhn?blogId=vkqkqkt&logNo=120142874468&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://hjeon.namoweb.net/lecture/chapter-4


킥백 볼티지:

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=221006151962&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


디스플레이 영상신호처리 :

http://blog.naver.com/youngdisplay/220879353162



cin,get,getline,개행,'\n':

http://rainflys.tistory.com/75

http://luyin.tistory.com/334

http://mantdu.tistory.com/688


인덕턴스, 커패시턴스, 임피던스 :

https://blog.naver.com/PostView.nhn?blogId=anniy7&logNo=220661104373&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://www.rfdh.com/bas_rf/begin/lc.htm

http://jayjaeun.tistory.com/10

http://microwave.tistory.com/entry/%EC%9D%B8%EB%8D%95%ED%84%B4%EC%8A%A4%EB%9E%80

https://ghebook.blogspot.kr/2011/06/definition-of-impedance-using-phasor.html

http://javalab.org/inductor_and_capacitor_3/

http://javalab.org/inductor_and_capacitor_2/

http://javalab.org/inductor_and_capacitor/

https://www.rohm.co.kr/electronics-basics/capacitors/tc_what2

https://blog.naver.com/dukuby/221331311095


TFT LCD : 

http://smd2010.tistory.com/1201

http://ko.blazedisplay.com/info/tft-lcd-displays-tft-device-96975.html


조도, 휘도 :

http://lifeisforu.tistory.com/367


편광 :

http://blog.envision.co.kr/62


OLED와 LCD의 편광판 :

http://blog.lgdisplay.com/2015/03/lcd_oled5/

http://blog.lgdisplay.com/2015/03/lcd-oled-4/



PDLC:

http://terms.naver.com/entry.nhn?docId=845413&cid=42346&categoryId=42346

http://www.q-sys.co.kr/bbs/content.php?co_id=tech1


시리얼 통신 :

http://blog.naver.com/hansj290/221102946544


아트메가128(ATMEGA) :

http://www.icbank.com/icbank_data/community/funfun/%BB%B7%BB%B7%C7%D1_AVR_%BE%DF%B0%A3%B1%B3%C0%B0_%C1%A66%C0%CF%C2%F7_20080611.pdf


UART, USART 유아트 통신 :

http://radionalog.tistory.com/entry/ATmega128-USART-%EC%96%91%EB%B0%A9%ED%96%A5-%ED%86%B5%EC%8B%A0-%EC%8B%A4%EC%8A%B5-%EC%98%88%EC%A0%9C

http://gaiserne.tistory.com/195


디스플레이 공학  :

http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=1114&docId=131736724&qb=ZGFuZ2xpbmcgYm9uZA==&enc=utf8&section=kin&rank=3&search_sort=0&spq=1


Oxidation :

https://m.blog.naver.com/PostView.nhn?blogId=gusam2&logNo=220723114481&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


Dangling Bond  댕글링 본드 :

http://gskpjone.tistory.com/5


AVR 비트 bit operator 비트 연산자 :

http://blog.daum.net/openmind31/7958535


아트메가 포트 제어 port :

http://binworld.kr/6


LCD 공정:

http://blog.lgdisplay.com/2014/09/%EA%B7%B8%EB%A6%BC%EC%9C%BC%EB%A1%9C-%EC%95%8C%EC%95%84%EB%B3%B4%EB%8A%94-tft-lcd-%EA%B3%B5%EC%A0%95-cell-module-%EA%B3%B5%EC%A0%95/

http://blog.lgdisplay.com/2016/06/tftlcd_1/

http://blog.lgdisplay.com/2016/06/tftlcd_2/

http://blog.lgdisplay.com/2016/08/tftlcd_3/

http://blog.lgdisplay.com/2016/09/tftlcd_4/

http://blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=60164370326


PECVD:

https://www.google.co.kr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwiMz8-QsIfXAhUBxrwKHW6RBQ0QFggxMAE&url=http%3A%2F%2Fwww.ceramicsbank.com%2FlectureFileDown.do%3Ffile_idx%3D797&usg=AOvVaw0yK-K4CrBf3wM_dPv9lX8m

http://blog.naver.com/PostView.nhn?blogId=dae106&logNo=80128940936

http://m.post.naver.com/viewer/postView.nhn?volumeNo=5583264&memberNo=10728965&vType=VERTICAL


스퍼터링(sputtering):

https://m.blog.naver.com/PostView.nhn?blogId=youngdisplay&logNo=220490827926&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

http://blog.naver.com/youngdisplay?Redirect=Log&logNo=60204629611

https://ko.wikipedia.org/wiki/%EC%8A%A4%ED%8D%BC%ED%84%B0%EB%A7%81

http://marriott.tistory.com/77


metal halide lamp:

http://terms.naver.com/entry.nhn?docId=1092807&cid=40942&categoryId=32374


dichroic mirror:

http://terms.naver.com/entry.nhn?docId=750591&cid=42341&categoryId=42341


기판용 유리 :

http://blog.naver.com/go9901273/150015211554


LUMO HOMO :

http://clafte.blog.me/120063619114


빛의 산란 :

http://www.cyberschool.co.kr/gh/gh14.htm


normally black, normally white NB NW :

http://www.dzsc.com/data/html/2009-6-16/76898.html


OLED 발광 일함수:

http://depts.washington.edu/cmditr/modules/oled/organicorganic_heterojunctions_in_oleds.html


인터럽트(interrupt):

http://rusy.tistory.com/entry/%EC%9D%B8%ED%84%B0%EB%9F%BD%ED%8A%B8interrupt

http://www.harucat.com/entry/%EC%9D%B8%ED%84%B0%EB%9F%BD%ED%8A%B8-%EC%82%AC%EC%9D%B4%ED%81%B4

http://raisonde.tistory.com/entry/%EC%9D%B8%ED%84%B0%EB%9F%BD%ED%8A%B8Interrupt%EC%9D%98-%EA%B0%9C%EB%85%90%EA%B3%BC-%EC%A2%85%EB%A5%98

https://ko.wikipedia.org/wiki/%EC%9D%B8%ED%84%B0%EB%9F%BD%ED%8A%B8


마찰력(속도에 비례할 때):

http://blog.naver.com/smboy86/70099829767


퀀텀닷 :

http://noisyit.tistory.com/334

http://iwritenews.tistory.com/499

http://blog.naver.com/PostView.nhn?blogId=starhope61&logNo=220291789655&parentCategoryNo=6&categoryNo=&viewDate=&isShowPopularPosts=true&from=search

https://www.inirnc.com:40126/prop/bbs/board.php?bo_table=new_report&wr_id=34

http://iwritenews.tistory.com/499

https://pid.samsungdisplay.com/ko/learning-center/white-papers/quantum-dot-technology

https://ko.wikipedia.org/wiki/%ED%80%80%ED%85%80%EB%8B%B7_%EB%94%94%EC%8A%A4%ED%94%8C%EB%A0%88%EC%9D%B4


damping ratio:

https://figshare.com/articles/_Step_response_of_a_second_order_system_with_respect_to_the_damping_ratio_950_the_poles_are_shown_as_X_/500243


인자로 배열 이름 :

http://code.i-harness.com/ko/q/2d04bc

http://grandpajo.tistory.com/20


레퍼런스(참조) 와 배열 :

http://itguru.tistory.com/141


상속시 디폴트 접근 지정자 :

https://stackoverflow.com/questions/4796789/default-inheritance-access-specifier?answertab=votes#tab-top


c++ virtual ;

http://blog.eairship.kr/175

http://itguru.tistory.com/210


bypass ,coupling capacitor : 

http://blog.daum.net/trts1004/12109438

http://blog.daum.net/xisapang/5173324


푸리에, 라플라스 차이 :


http://snowall.tistory.com/182


https://www.hibrain.net/braincafe/cafes/40/posts/111/categories/AMJR/categories/E/categories/E09/articles/286363/replies/287889?pagekey=286363&listType=TOTAL&pagesize=10&sortType=RDT&cntType=AMJR&limit=25&displayType=QNA&siteid=1&page=1


http://electronicsdo.tistory.com/entry/%EC%8B%A0%ED%98%B8-%EB%B0%8F-%EC%8B%9C%EC%8A%A4%ED%85%9C-%EC%A0%84%EC%B2%B4%EC%A0%81%EC%9D%B8-%EA%B0%9C%EB%85%90%EC%A0%95%EB%A6%AC


http://blog.naver.com/PostView.nhn?blogId=you8420&logNo=220988397639&categoryNo=0&parentCategoryNo=0&viewDate=&currentPage=1&postListTopCurrentPage=1&from=postView


https://www.youtube.com/watch?v=6LKCyaPRTr8


http://blog.naver.com/sglee84/110046519870


FT 는 LT의 특별한 경우(시그마 0)

FT- > 인간이 만든 신호에 용이 LT-> 댐핑 존재 자연계 (시스템)

라플라스 s도메임 제로 폴 알수 있음 안정도.. ->시스템 분석에 용이


fourier coefficient :

https://m.blog.naver.com/PostView.nhn?blogId=sagala_soske&logNo=220983389992&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

반응형
반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
 
using namespace std;
 
namespace yh{
    class test{
    public:
        int test_print();
    };
}
 
int yh::test::test_print(){
    return 3;
}
 
int main(void){
    
    yh::test c;
    cout<<c.test_print()<<endl;
    
    return 0;
}
cs


리턴타입 네임스페이스명::클래스명::함수명(arguments){}


과 같이 해주면 된다.  자바의 솔루션과 비슷한 개념 같은데 디렉토리가 따로 생성되지는 않는 것을 보아


좀 더 저급한 개념인 것 같다. 이것이 발전해서 자바의 패키지가 된 것 같다. (나의 생각)

반응형

'컴퓨터 & 프로그래밍 & 전자공학 > C++' 카테고리의 다른 글

문자열 문자 랜덤 수정  (0) 2017.11.03
변수와 포인터와 레퍼런스  (0) 2017.10.27
다수의 클래스 연산자  (0) 2017.10.12
Integer 클래스  (0) 2017.10.12
SelectableRandom 클래스  (0) 2017.10.12
반응형

오늘의 요리는 신라면 투움바 파스타입니다. 자칫하면 느끼할 수 있는 치즈의 느끼함을 매콤한 신라면 스프로 잡아주는 아주 한국인에게 딱맞는 파스타입니다. 만들기도 정말 쉽습니다.


<재료>


재료는 파스타 면, 양파 반 개, 우유 한 컵, 마늘 2쪽 다진 것, 슬라이스 치즈 3장, 올리브유(식용유)가 기본입니다. (치즈는 사진 찍는 걸 깜빡했네요..)

햄이라든가, 소세지라든가, 홍합이라든가 여러 고명을 넣는 것은 여러분의 자유입니다. 저는 스팸을 넣었습니다.





먼저 스파게티 면을 삶습니다. 삶는 시간은 면 종류마다, 좋아하는 식감마다 다른데요. 보통 여러분이 산 스파게티 면

포장지에 삶는 시간이 나와있으니 참고하시길 바랍니다. 면을 삶으면서 동시에 재료를 올리브유에 볶아줍니다. 

햄은 비린내가 날 수 있으니 먼저 마늘과 양파를 조금 볶고 그다음에 넣어서 바싹 볶아주시는 것이 좋습니다. 마늘 다진것이

타지않게 주의하세요!



적당히 볶아지면 우유와 신라면 스프를 넣고 끓여줍니다.

신라면 스프는 기호에 따라서 넣는양을 조절합니다. 간간하게 드시면 하나 다 넣으시고 

간간한 것을 싫어하면 절반이나 2/3만 넣으시면 됩니다.

저는 매운 것을 싫어해서 2/3만 넣었네요. 그러다가 우유의 온도가 적당히 올랐다 싶으면 슬라이스 치즈를 3장 전부 다 넣고

익혀줍니다. 그렇게 하면 중탕이 되서 치즈가 사르르 녹아 우유에 섞입니다. 이 때 고소한 냄새는 정말 말로 형용할 수가 없네요.

이때 농도가 좀 묽을 수 있는데요 그럴 때에는 센 불로 졸여주시면 됩니다.





그리고 면이 다 익었으면 넣고 약 1분간 볶아줍니다. 역시 소스의 농도가 묽으면 센불로 졸여주며 볶아주면 됩니다.




완성본입니다! 느끼해보이지만 실상 먹으면 신라면 스프가 느끼함을 다 잡아줘서 천상의 하모니를 자아냅니다.

그리고 처음에 볶아주었던 마늘과 양파향 역시 느끼함을 잡아주는 데 한 몫을 하고, 특유의 향긋함을 풍깁니다.

그리고 치즈와 우유의 고소한 풍미는 온 집안을 휘감네요.



만드는데 시간도 얼마 안걸리고 재료도 별로 필요없는 신라면 투움바 파스타!

오늘 점심으로 어떠신가요?? 왕 추천합니다!!





반응형

'My Life > DIY' 카테고리의 다른 글

백종원의 마늘볶음밥  (0) 2020.09.28
스팸 돈부리  (2) 2018.01.19
로보타임 DIY 오르골 등대 섬의 갈매기  (2) 2017.11.05
식빵 피자  (0) 2017.07.12
반응형

인하대학교 전자공학과 데이터 구조 포인터, 어레이 과제 (pointer, array)


인하대학교 전자공학과 데이터 구조 하노이의 탑, 이진 탐색(binary search, tir, recursive)


인하대학교 전자공학과 데이터 구조 시스템 스택, 선형 리스트 (system stack, linear list)


인하대학교 전자공학과 데이터 구조 preorder, postorder, max heap


인하대학교 전자공학과 데이터 구조 dfs, bfs, 프림, 크루스칼 (prim, kruskal)


소스코드, 수도코드, 플로우차트(순서도), 분석 및 고찰, 결과창 등이 들어있는 보고서입니다.


전부 만점받은 보고서입니다. 

반응형
반응형
소감 : 벌써 2018년 헤라 서울 패션위크가 진행되네요!! 다양한 디자이너 님들의 개성있고 특색있는 작품들을
볼 생각하니 정말 설렙니다. 그리고 그곳에서 자신의 기량을 한껏 뽐낼 모델 분들도 기대가 되네요! 서울패션위크 화이팅!

----------------------------------------------------------------------------------------------------
패션계는 언제나 한 시즌 빠르게 움직인다. 이제 좀 서늘한 가을 날씨가 시작되었다고 생각했는데, 벌써 내년 봄/여름 시즌 패션쇼 소식이 들려온다. 2017년 10월 16일부터 10월 21일까지 <2018 S/S 헤라서울패션위크>가 진행된다. 무신사 스토어에서는 이를 기념하여 어제부터 <2018 S/S 서울패션위크 브랜드 특별전>을 오픈했다. 서울패션위크에 참여하는 다양한 디자이너 브랜드 중 무신사 스토어에 입점한 20개를 다시 한 번 조명하고, 회원들에게 특가와 할인 쿠폰 등의 프로모션을 선보인다.

그래서 이번 무신사 투표는 내년 봄과 여름 시즌의 트렌드를 미리 만나볼 수 있는 서울패션위크에서 가장 기대되는 디자이너 브랜드를 골라보기로 했다. 물론 2,000 포인트를 건 댓글 이벤트도 함께한다. 회원 개인의 SNS 계정에 이벤트 관련 소감을 포함하여 이 뉴스를 공유하고, 아래 댓글로 그 URL과 코멘트를 남기면 무신사 2,000 포인트를 지급한다. 

기간 : 2017년 10월 11일(수)부터 10월 18일(수)까지.   

포인트 지급대상 적용 기준
1. 페이스북, 트위터, 카카오스토리, 인스타그램, 블로그 등 ‘실제 운영 중’인 개인의 SNS 계정에 뉴스를 공유했을 경우에만 포인트 지급 
2. SNS를 공유하고 URL과 이벤트에 관한 소감을 댓글로 남겼을 경우에만 포인트 지급 
3. SNS 공유 시, 자신의 계정에 ‘이벤트와 관련된 소감’을 남겨야만 포인트 지급 
4. 게시물이 ‘전체공개’일 경우에만 포인트 지급

에디터 : 조세희


관련링크 : 무신사 <2018 S/S 서울패션위크 브랜드 특별전> (store.musinsa.com/app/plan/views/3793)






















































설문영역
기대 만발! 2018 S/S 서울패션위크
출처 - 무신사 투표 : 기대만발! 2018 S/S 서울패션위크 / 패션웹진 무신사


반응형

'etc' 카테고리의 다른 글

한국형 암호화폐 스타크로!  (0) 2018.02.01
공부 관련 스크랩  (0) 2017.10.24
EBSlang 일본어 강의!  (0) 2017.08.03
토목달을 소개합니다. 토익은 토목달과 함께!  (0) 2017.07.30
#토익 #토목달 토익 목표 달성!!!  (0) 2017.07.19
반응형

인하대학교 전자공학과 전자회로실험1 결과보고서 아두이노 개발환경 및 GPIO


인하대학교 전자공학과 전자회로실험1 결과보고서 라이브러리 추가 및 서보 모터 제어


인하대학교 전자공학과 전자회로실험1 결과보고서 아날로그 입력 및 라이브러리 작성


인하대학교 전자공학과 전자회로실험1 결과보고서 USART 통신


인하대학교 전자공학과 전자회로실험1 결과보고서 LCD

반응형
반응형

인하대학교 전자공학과 기초실험2 예비보고서 능동필터회로


인하대학교 전자공학과 기초실험2 예비보고서 능동필터회로2


인하대학교 전자공학과 기초실험2 예비보고서 동상신호제거비


인하대학교 전자공학과 기초실험2 예비보고서 바이어스 전류 측정


인하대학교 전자공학과 기초실험2 예비보고서 비반전증폭기


인하대학교 전자공학과 기초실험2 예비보고서 선형증폭기


인하대학교 전자공학과 기초실험2 결과보고서 능동필터회로


인하대학교 전자공학과 기초실험2 결과보고서 능동필터회로2


인하대학교 전자공학과 기초실험2 결과보고서 동상신호제거비


인하대학교 전자공학과 기초실험2 결과보고서 바이어스 전류 측정


인하대학교 전자공학과 기초실험2 결과보고서 비반전증폭기


인하대학교 전자공학과 기초실험2 결과보고서 선형증폭기


인하대학교 전자공학과 기초실험2 결과보고서 오피앰프의 특성



반응형
반응형



인하대학교 전자공학과 기초실험1 예비보고서 트랜지스터


인하대학교 전자공학과 기초실험1 예비보고서 파형발생기


인하대학교 전자공학과 기초실험1 예비보고서 OP-AMP를 이용한 복합 증폭


인하대학교 전자공학과 기초실험1 예비보고서 RLC 회로


인하대학교 전자공학과 기초실험1 예비보고서 다이오드


인하대학교 전자공학과 기초실험1 예비보고서 OP-AMP를 이용한 기본 증폭


인하대학교 전자공학과 기초실험1 예비보고서 미분기 적분기


인하대학교 전자공학과 기초실험1 결과보고서 OP-AMP를 이용한 복합 증폭


반응형
반응형

다수의 클래스를 선언하고 활용하는 간단한 문제이다. 더하기(+), 빼기(-), 곱하기(*), 나누기(/)를 수행하는 4개의 클래스 Add, Sub, Mul, Div 를 만들고자 한다. 이들은 모두 공통으로 다음 멤버를 가진다. Int 타입 변수 a,b : 피연산자 void setValue(int x, int y)함수 : 매개 변수 x,y를 멤버 a,b에 복사 int calculate() 함수 : 연산을 실행하고 결과 리턴 main()함수는 Add, Sub, Mul, Div 클래스 타입의 객체 a, s, m, d를 생성하고 ,아래와 같이 키보드로부터 두 개의 정수와 연산자를 입력받고 a, s, m, d 객체 중에서 연산을 처리할 객체의 setValue() 함수를 호출한 후 calculate()를 호출하여 결과를 화면에 출력한다. 프로그램은 무한 루프를 돈다




< cpp 파일에 전부 넣은 것>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#include <iostream>
using namespace std;
/*각 클래스의 함수들을 직접 구현하는 구현부 cpp파일*/
class Add{
private:
    int a,b;  //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y); // 인자 대입
    int calculate(); //계산
};
class Sub{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
class Mul{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
class Div{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
void Add::setValue(int x,int y){ //값 지정 x를 a에, y를 b에 대입한다.
    a=x;
    b=y;
}
int Add::calculate(){ //더하기 연산
    return a+b;
}
void Sub::setValue(int x,int y){
    a=x;
    b=y;
}
int Sub::calculate(){ //빼기 연산
    return a-b;
}
void Mul::setValue(int x,int y){
    a=x;
    b=y;
}
int Mul::calculate(){ //곱하기 연산
    return a*b;
}
void Div::setValue(int x,int y){ 
    a=x;
    b=y;
}
int Div::calculate(){//나누기 연산
    return a/b;
}
int main(void){
    while(1){
        int x;
        int y;
        char opr; //operator를 구별하기 위한 대입용 캐릭터형 변수
        Add a; Sub s; Mul m; Div d; //각 클래스 객체 생성
        cout<<"두 정수와 연산자를 입력하세요>>";
        cin>>x>>y>>opr;
        if(opr=='+'){ //opr이 +면
            a.setValue(x,y); //operand 값 set 해주고
            cout<<a.calculate()<<endl//계산값 출력
        }
        else if(opr=='-'){ //opr이 -면
            s.setValue(x,y);
            cout<<s.calculate()<<endl;
        }
        else if(opr=='*'){ //opr이 *면
            m.setValue(x,y);
            cout<<m.calculate()<<endl;
        }
        else if(opr=='/'){ //opr이 /면
            d.setValue(x,y);
            cout<<d.calculate()<<endl;
        }
    }
    return 0;
}
 
cs

<코드-헤더파일 Calcuator.h>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CALC_H //헤더 파일 중복 include 방지용
#define CALC_H
 
class Add{
private:
    int a,b;  //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y); // 인자 대입
    int calculate(); //계산
};
class Sub{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
class Mul{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
class Div{
private:
    int a,b; //operand로 쓸 int형 변수 a,b
public:
    void setValue(int x,int y);
    int calculate();
};
#endif
 
cs

<코드-클래스cpp파일 Calculatop.cpp>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "Calculator.h" //선언부 include
#include <iostream>
using namespace std;
/*각 클래스의 함수들을 직접 구현하는 구현부 cpp파일*/
 
void Add::setValue(int x,int y){ //값 지정 x를 a에, y를 b에 대입한다.
    a=x;
    b=y;
}
int Add::calculate(){ //더하기 연산
    return a+b;
}
void Sub::setValue(int x,int y){
    a=x;
    b=y;
}
int Sub::calculate(){ //빼기 연산
    return a-b;
}
void Mul::setValue(int x,int y){
    a=x;
    b=y;
}
int Mul::calculate(){ //곱하기 연산
    return a*b;
}
void Div::setValue(int x,int y){ 
    a=x;
    b=y;
}
int Div::calculate(){//나누기 연산
    return a/b;
}
 
cs



<코드-메인cpp파일 main.cpp>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include "Calculator.h" //calculator 내에 클래스 사용 위한 include
using namespace std;
 
int main(void){
    while(1){
        int x;
        int y;
        char opr; //operator를 구별하기 위한 대입용 캐릭터형 변수
        Add a; Sub s; Mul m; Div d; //각 클래스 객체 생성
        cout<<"두 정수와 연산자를 입력하세요>>";
        cin>>x>>y>>opr;
        if(opr=='+'){ //opr이 +면
            a.setValue(x,y); //operand 값 set 해주고
            cout<<a.calculate()<<endl//계산값 출력
        }
        else if(opr=='-'){ //opr이 -면
            s.setValue(x,y);
            cout<<s.calculate()<<endl;
        }
        else if(opr=='*'){ //opr이 *면
            m.setValue(x,y);
            cout<<m.calculate()<<endl;
        }
        else if(opr=='/'){ //opr이 /면
            d.setValue(x,y);
            cout<<d.calculate()<<endl;
        }
    }
    return 0;
}
 
cs




반응형
반응형

int 타입의 정수를 객체화한 Integer 클래스를 작성하라. Integer의 모든 멤버 함수를 자동 인라인으로 작성하라. Integer 클래스를 활용하는 코드는 다음과 같다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <string>
using namespace std;
class Integer{
private:
    int num; //int 형 변수 num
public:
    Integer(int i){
        num=i;  //생성자 i를 nu에 대입
    }
    Integer(string si){
        num=stoi(si); //스트링 si를 정수형으로 바꿔 num에 대입
    }
    void set(int i){
        num=i; //num을 set하는 함수 i를 대입
    }
    int get(){
        return num; //num을 반환하는 함수
    }
    bool isEven(){ //짝수인지 아닌지 판별하는 함수 맞으면 true, 아니면 false
    if(num%2==0)
        return true;
    else
        return false;
    }};
int main(void){
    Integer n(30);
    cout << n.get() <<' '//30 출력
    n.set(50);
    cout << n.get() <<' '//50 출력
    Integer m("300");
    cout << m.get() << ' ';
    cout << m.isEven();
    return 0;
}
 
cs




반응형
반응형

짝수 홀수를 선택할 수 있도록 생성자를 가진 SelectableRandom 클래스를 작성하고 각각 짝수 10, 홀수 10개를 랜덤하게 발생시키는 프로그램을 작성하라.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <cstdlib> //atoi,rand,malloc 등의 메소드가 포함된 라이브러리
#include <ctime> //시간과 관련된 메소드, 상수가 포함된 라이브러리
using namespace std;
 
/*rand()함수만 사용하면 무작위 수가 나오기는 하지만 실행할 때마다 같은 무작위 수가 나온다.
왜냐하면 같은 seed값을 이용하기 때문이다.
따라서 srand를 이용해 프로그램을 시작할 때마다 다른 seed값을 넣어주면 매번 다른 무작위 수가 나올것이다.
time 함수는 매 초 다른 값을 반환하기 때문에 seed로 사용하기가 매우 좋다.*/
 
class SelectableRandom {
public:
    SelectableRandom() {
        srand((unsigned)time(0)); //다른 랜덤수를 발생시키기 위한 seed 설정
    }
    int nexteven() { 
        return ((rand()/2)*2);  //2로나눠서 2를 곱하면 범위 그대로 짝수만 나온다.
    }
    int nextodd() { 
        return ((rand()/2)*2)+1;  //2로나눠서 2를 곱하고 1더하면 범위 그대로 홀수만 나온다.
    }
    int nextevenInRange(int a,int b) {
        return (((rand() % (b - a + 1)) + a)/2)*2//범위 짝수
        
    }
    int nextoddInRange(int a,int b) {
        return ((((rand() % (b - a + 1)) + a)/2)*2)+1;    //범위 홀수
    }
};
 
int main(void) {
    SelectableRandom r; //SelectableRandom 클래스의 객체 r
    int i;
    cout << "-- 0에서 " << RAND_MAX << "까지의 짝수 랜덤 정수 10개--" << endl//RAND_MAX=32767 상수
    for (i = 0; i < 10; i++) {
        cout << r.nexteven() << " ";  //10개 랜덤 짝수 정수 출력
    }
    cout << "\n\n";
    cout << "-- 2에서 " <<  "10까지의 홀수 랜덤 정수 10개--" << endl;
    for (i = 0; i < 10; i++) {
        cout << r.nextoddInRange(2,9<< " ";  //범위 내 10개 랜덤 홀수 정수 출력
    }
    cout << endl;
    return 0;
}
 
cs




반응형

'컴퓨터 & 프로그래밍 & 전자공학 > C++' 카테고리의 다른 글

다수의 클래스 연산자  (0) 2017.10.12
Integer 클래스  (0) 2017.10.12
EvenRandom 클래스  (0) 2017.10.12
Oval (사각형에 내접하는 타원) 클래스  (0) 2017.09.21
랜덤 수 출력  (0) 2017.09.16
반응형

문제 3번을 참고하여 짝수 정수만 랜덤하게 발생시키는 EvenRandom 클래스를 작성하고 EvenRandom 클래스를 이용하여 10개의 짝수를 랜덤하게 출력하는 프로그램을 완성하라. 0도 짝수로 처리한다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <cstdlib> //atoi,rand,malloc 등의 메소드가 포함된 라이브러리
#include <ctime> //시간과 관련된 메소드, 상수가 포함된 라이브러리
using namespace std;
 
/*rand()함수만 사용하면 무작위 수가 나오기는 하지만 실행할 때마다 같은 무작위 수가 나온다.
왜냐하면 같은 seed값을 이용하기 때문이다.
따라서 srand를 이용해 프로그램을 시작할 때마다 다른 seed값을 넣어주면 매번 다른 무작위 수가 나올것이다.
time 함수는 매 초 다른 값을 반환하기 때문에 seed로 사용하기가 매우 좋다.*/
 
class EvenRandom {
public:
    EvenRandom() {
        srand((unsigned)time(0)); //다른 랜덤수를 발생시키기 위한 seed 설정
    }
    int next() { //rand()함수는 0~32767 사이 무작위 정수 리턴
        return (rand()/2)*2// rand()의 리턴 밸류는 integer 형이다. 따라서 2로 나눴을 때 무조건정수가 나온다.
    //어떤 정수든 (홀수든 짝수든) 2를 곱하면 짝수가 된다. 그리고 반토막 난 범위도 복원된다.
    }
    int nextInRange(int a,int b) {
        return (((rand() % (b - a + 1)) + a)/2)*2//a이상 b미만 랜덤 정수를 뽑는 알고리즘에 짝수 sifting 알고리즘을 더한다.
        
    }
};
 
int main(void) {
    EvenRandom r; //EvenRandom 클래스의 객체 r
    int i;
    cout << "-- 0에서 " << RAND_MAX << "까지의 랜덤 정수 10개--" << endl//RAND_MAX=32767 상수
    for (i = 0; i < 10; i++) {
        cout << r.next() << " ";  //10개 랜덤 정수 출력
    }
    cout << "\n\n";
    cout << "-- 2에서 " <<  "10까지의 랜덤 정수 10개--" << endl;
    for (i = 0; i < 10; i++) {
        cout << r.nextInRange(2,10<< " ";  //범위 내 10개 랜덤 정수 출력
    }
    cout << endl;
    return 0;
}
 
cs



반응형

'컴퓨터 & 프로그래밍 & 전자공학 > C++' 카테고리의 다른 글

Integer 클래스  (0) 2017.10.12
SelectableRandom 클래스  (0) 2017.10.12
Oval (사각형에 내접하는 타원) 클래스  (0) 2017.09.21
랜덤 수 출력  (0) 2017.09.16
별 출력  (0) 2017.09.09
반응형

1. Implement the dfs and bfs algorithms using the given graph and adjacency lists (Figure 1).


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include <stdio.h>
#include <stdlib.h>
#define SIZE 8
#define FALSE 0  //boolean 연산을 위한 상수 설정
#define TRUE 1   //boolean 연산을 위한 상수 설정
typedef struct node *pn; //node형 포인터 자료형 pn
typedef struct node{
    int vertice;
    pn link;
}node; //node 자료형 안에는 node의 주소를 나타내는 link와 정수형 변수 vertice 포함
void add(pn a);
void dfs(int v);
void bfs(int v);
void addq(int *rear,int value);
int deleteq(int *front);
 
pn graph[SIZE]; //pn형 크기 8짜리 배열 graph
int visited[SIZE]; //int형 크기 8짜리 배열 visited, 방문한 노드 삽입
int queue[SIZE]; // 사이즈 8짜리 큐
 
int main(void)
{
pn cup; //pn형 변수 cup (포인터) 임시 저장소
int i;
for(i=0;i<SIZE;i++//graph 배열의 원소 초기화
{
    graph[i]=0;
}
add(&graph[0],1);    add(&graph[0],2);
add(&graph[1],0);    add(&graph[1],3);    add(&graph[1],4);
add(&graph[2],0);    add(&graph[2],5);    add(&graph[2],6);
add(&graph[3],1);    add(&graph[3],7);
add(&graph[4],1);    add(&graph[4],7);
add(&graph[5],2);    add(&graph[5],7);
add(&graph[6],2);    add(&graph[6],7);
add(&graph[7],3);    add(&graph[7],4);    add(&graph[7],5);    add(&graph[7],6); 
//주어진 그림대로 그래프 초기화 하는 과정
for(i=0;i<SIZE;i++){
cup=graph[i]; //graph[i]를 cup에 대입
printf("graph[%d]    ",i);
while(cup){ //cup이 0이 아니면(각 노드는 링크드 리스트로 구성되어 있어 마지막 노드는 0을 가리킴)
printf("%d ",cup->vertice); //cup->vertice 출력
cup=cup->link; //cup에 cup->link 대입
}
printf("\n"); //개행문자 출력
}
printf("DFS : ");dfs(0); printf("\n"); //dfs 실행
for(i=0;i<SIZE;i++)
{visited[i]=FALSE;} //visited된 노드들 초기화 (bfs 를 하려면 초기화 시켜줘야함)
printf("BFS : ");bfs(0); printf("\n"); //bfs 실행
return 0;
}
 
void add(pn *a,int value){  //그래프의 노드를 연결해주는 함수
    /*a에 해당하는 것이 노드를 가리키는 포인터, value는 추가할 값이다.
    a에 이미 연결되어 있는 메모리가 존재하면 계속 링크를 타고 가다가 링크가 0인
    메모리에 동적메모리할당 한것을 링크시켜 그곳에 value를 넣어준다
    add(&graph[0],1);    add(&graph[0],2); 예를들어 main함수에서 나온 것인데
    맨처음 graph[0]이 1을 갖는 메모리를 가리키고 1를 갖는 메모리가 2를 갖는 메모리를 가리키고
    2를 갖는 메모리의 링크는 0이다. 이런식으로 진행이 된다. 링크가 0인지 아닌지는 함수가 스스로 판단한다.*/
    pn *check=0//check를 NUL로 초기화,check는 이중포인터
    pn tmp = (pn)malloc(sizeof(node)); //tmp가 가리키는 곳에 node size 동적 메모리 할당
    check=a; //check가 가리키는 주소 = a가 가리키는 주소
    while(1){
        if((*check)==0){break;} // check가 가리키는 주소가 0이면 루프 탈출
    else if(((*check)->link)!=0){ //(*check)->link)!=0)이면 
        check=&((*check)->link); //check에 &((*check)->link) 대입
    }
    else//이외의경우
        check=&((*check)->link);  //check에 &((*check)->link) 대입하고 break
        break;}}
    *check=tmp; //check가 가리키는 주소에 tmp 대입
    (*check)->vertice=value; //value를 마지막 노드의 vertice 에 삽입
    (*check)->link=0//마지막 노드의 링크는 0
}
void dfs(int v){
    pn w; //pn형 변수 w (포인터)
    visited[v]=TRUE; //visited[v]에 1 대입
    printf("%5d",v); //5자리수로 해서 출력
    for(w=graph[v];w;w=w->link) //초기식 : w=graph[v], 조건식 : w가 존재하면(not 0) 증가식 : w에 w->link 대입
    {
        if(!visited[w->vertice]) //w가 가리키는 주소의 vertice가 방문하지 않은 노드라면
            dfs(w->vertice); //dfs 순환 호출
    }
}
void bfs(int v){
    pn w; //pn형 변수 w(포인터)
    int front=-1//front와 rear 를 -1로 설정(원형 큐)
    int rear=-1;
    printf("%5d", v); // 5의 전체 크기로 출력
    visited[v]=TRUE; //visited[v]에 true 대입(1)
    addq(&rear,v); //v를 원형 큐에 삽입
    while(front!=rear){ //front가 not rear 이면
    v=deleteq(&front); // 맨 앞 원소 delete
    for(w=graph[v];w;w=w->link){ //초기식 : w=graph[v], 조건식 : w가 존재하면(not 0) 증가식 : w에 w->link 대입
        if(!visited[w->vertice]) //w가 가리키는 주소의 vertice가 방문하지 않은 노드라면
        {
        printf("%5d", w->vertice); //w->vertice 출력
        addq(&rear,w->vertice); //w->vertice 큐에 삽입
        visited[w->vertice]=TRUE;  //visited[w->vertice]에 true 대입(1)
        }}}}
void addq(int *rear,int value){ //원형 큐에서 삽입
    *rear=(*rear)%SIZE;
    queue[++(*rear)]=value;
}
int deleteq(int *front){ //원형 큐에서 원소 삭제
    return queue[++(*front)%SIZE];
}
 
cs



2. Refine Prim’s algorithm, Kruskal’s algorithm into a C function that finds a minimum cost spanning tree.



Prim’s algorithm


Kruskal’s algorithm


graph


<Prim's Algorithm>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include <stdio.h>
#include <stdlib.h>
 
typedef struct edge{ //edge 형 변수
    int left;  //int형변수 left,right,weight,u를 포함한다.
    int right;
    int weight;    
    int u;  // 어떤 집합에 속할지 정해준다. (여기서는 사용하지 않음)
}edge; 
 
void Prim(edge E[],edge T[]);
 
int Ecount=0;    //몇번째 E의 원소를 참조하고 있는가
int TVlength=1;  //노드가 들어갈 집합
int Tlength=0;   //dege T의 길이
int TV[7]={0,-1,-1,-1,-1,-1,-1}; //노드가 들어갈 집합, 몇번부터 시작하는지는 상관 없으나 0번부터 시작하라고 해서 0번만 넣고 나머지는 나올 수 없는 -1로 초기화
edge T[6];     //우리가 prim algorithm 에 의해 선택한 간선을 넣을 집합
edge E[9];    //기존에 주어진 set
 
int main(void)
{
    int i;    
    for(i=0;i<20;i++){
    T[i].left=-1;    T[i].right=-1;    T[i].u=-1;    T[i].weight=-1;}
    E[0].left=5;    E[0].right=0;    E[0].weight=10;    E[0].u=-1;
    E[1].left=0;    E[1].right=1;    E[1].weight=28;    E[1].u=-1;
    E[2].left=1;    E[2].right=2;    E[2].weight=16;    E[2].u=-1;
    E[3].left=2;    E[3].right=3;    E[3].weight=12;    E[3].u=-1;
    E[4].left=6;    E[4].right=3;    E[4].weight=18;    E[4].u=-1;
    E[5].left=4;    E[5].right=3;    E[5].weight=22;    E[5].u=-1;
    E[6].left=4;    E[6].right=6;    E[6].weight=24;    E[6].u=-1;
    E[7].left=5;    E[7].right=4;    E[7].weight=25;    E[7].u=-1;
    E[8].left=6;    E[8].right=1;    E[8].weight=14;    E[8].u=-1//책에 나와있는대로 초기화
    Prim(E,TV); //Prim 알고리즘 실행
    for(i=0;i<6;i++)
    {printf("%d %d %d %d\n",T[i].left,T[i].right,T[i].u,T[i].weight);} //확인을 위해 출력
    return 0;
}
void Prim(edge E[],int TV[]){
    int i=0int j; int k;int count=0int flag=0
    int tmpisl=-1; edge tmpedge;
    while(Tlength<6){
        /*for(u=0;u<TVlength;u++)
        {printf("%d",TV[u]);}
        printf("\n");*/
        tmpisl=-1;  tmpedge.left=-1; tmpedge.right=-1; tmpedge.u=-1; tmpedge.weight=100//tmp 각 원소 초기화 weight는 무조건 모든 간선 weight보다 크게
            for(j=0;j<9;j++){ //j는 0부터 9보다 작을 때까지
                count=0;  //count=0으로 초기화
                for(k=0;k<TVlength;k++)  //k=0부터 TVlength 보다 작을 때까지
                {if((TV[k]==E[j].left)) //TV[k]가  E[j].left와 같으면
                count++;} //count ++;
                for(k=0;k<TVlength;k++){ //k=0부터 TVlength 보다 작을 때까지
                if((TV[k]==E[j].right)) //TV[k]가  E[j].right와 같으면
                count++;} //count ++;
                printf("i=%d j=%d k=%d count=%d TLength=%d TVLength=%d\n",i,j,k,count,Tlength,TVlength);
                if(count==1){ //즉 E[j](간선)에 노드 TV[k]가 들어있으면 만약 count==2면 cycle 이라서 안됨
                    if(E[j].weight<tmpedge.weight) //E[j].weight<tmpedge.weight 면(작은걸 택해야 하니까)
                    {
                    tmpedge.left=E[j].left;
                    tmpedge.right=E[j].right;
                    tmpedge.u=E[j].u;
                    tmpedge.weight=E[j].weight; //tmp에 E[j]의 요소 대입
                    flag=0//flag에 0 대입
                    for(k=0;k<TVlength;k++){ //k=0부터 TVlength 아래까지
                        if(E[j].left==TV[k]) //E[j].left==TV[k]면 루프탈출
                            break;
                        else flag++//아니면 flag++
                    }
                    if(flag==TVlength) //flag가 TVlength면
                        tmpisl=E[j].left; //tmpisl 에 E[j].left대입
                    flag=0//flag 0으로 초기화
                    for(k=0;k<TVlength;k++){ //k=0부터 k<TVlength 까지
                        if(E[j].right==TV[k])  //E[j].right==TV[k]면 루프탈출
                            break;
                        else flag++;  //아니면 flag++
                    }
                    if(flag==TVlength) //flag==TVlength면
                        tmpisl=E[j].right; // tmpisl에 E[j].right대입;
                    /*TV에 없는걸 tempisl에넣어야함*/}
                }
            }
        TV[TVlength]=tmpisl; //TV에 tmpisl 대입
        TVlength++;  //TVlength 증가
        T[Tlength].left=tmpedge.left;
        T[Tlength].right=tmpedge.right;
        T[Tlength].u=tmpedge.u;
        T[Tlength].weight=tmpedge.weight; //tmp에있는 요소 T[Tlength]에 대입
        Tlength++//Tlength 증가
        i++//i증가
    }
        
}
cs




<Kruskal's Algorithm>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#include <stdio.h>
#include <stdlib.h>
 
typedef struct edge{ //edge 형 변수
    int left;  //int형변수 left,right,weight,u를 포함한다.
    int right;
    int weight;    
    int u; // 어떤 집합에 속할지 정해준다.
}edge;
 
void Kruskal(edge E[],edge T[]);
void select_sort(edge vector[],int size);
int notcycle(edge *e,edge T[]);
int makeuni(edge *e,edge T[]);
void jointuni(edge T[]);
 
int uni=0;   //전역변수, 집합의 이름(번호)를 정함
int Ecount=0//E의 인덱스
int Tlength=0//T의 길이(T에 원소 몇개인지)
edge T[6];    //edge형 배열 T 크기 6
edge E[9];    //edge형 배열 E 크기 9
int k;
 
int main(void)
{
    int i;    
    for(i=0;i<20;i++){
    T[i].left=-1;    T[i].right=-1;    T[i].u=-1;    T[i].weight=-1;} //T 초기화 (안나올 값으로)
    E[0].left=5;    E[0].right=0;    E[0].weight=10;    E[0].u=-1;
    E[1].left=0;    E[1].right=1;    E[1].weight=28;    E[1].u=-1;
    E[2].left=1;    E[2].right=2;    E[2].weight=16;    E[2].u=-1;
    E[3].left=2;    E[3].right=3;    E[3].weight=12;    E[3].u=-1;
    E[4].left=6;    E[4].right=3;    E[4].weight=18;    E[4].u=-1;
    E[5].left=4;    E[5].right=3;    E[5].weight=22;    E[5].u=-1;
    E[6].left=4;    E[6].right=6;    E[6].weight=24;    E[6].u=-1;
    E[7].left=5;    E[7].right=4;    E[7].weight=25;    E[7].u=-1;
    E[8].left=6;    E[8].right=1;    E[8].weight=14;    E[8].u=-1;  //교과서에 나온 것처럼 초기화
    Kruskal(E,T); //Kruscal 알고리즘 실행
    for(i=0;i<6;i++)
    {printf("%d %d %d %d\n",T[i].left,T[i].right,T[i].u,T[i].weight);} //출력으로 제대로 나왔나 확인
    return 0;
}
void Kruskal(edge E[],edge T[]){
edge temp;
select_sort(E,9); //E를 가중치의 크기대로 오름차순 정렬한다.
while((Tlength<6)&&(Ecount<9)){ //Tlength가 6보다 작고 Ecount가 9보다 작으면 루프 반복
temp.left=E[Ecount].left;temp.right=E[Ecount].right;temp.weight=E[Ecount].weight;    temp.u=E[Ecount].u; //temp의 각 요소에 E[Ecount]의 요소 대입
E[Ecount].left=-1;E[Ecount].right=-1;E[Ecount].weight=-1//E의 Ecount 원소는 삭제 (-1대입)
makeuni(&temp,T); //temp의 집합을 만들어준다.
jointuni(T); //같은 집합인데 번호가 다른 집합이 있으면 합해준다. temp를 제외한 T만 해준다. (cycle 검사때문에)
for(k=0;k<Tlength;k++){
    printf("T[%d].u=%d ",k,T[k].u);
}
printf("tmp.u : %d\n",temp.u); //T의 원소의 집합 번호와 temp의 집합 번호 확인
if(notcycle(&temp,T)) //싸이클이 생기지 않으면
{
T[Tlength].left=temp.left;T[Tlength].right=temp.right;T[Tlength].weight=temp.weight;    T[Tlength].u=temp.u; //T[Tlength]의 요소에 temp의 요소 대입
Tlength++;Ecount++//Tlength와 Ecount 하나씩 증가
}
else{Ecount++;} //싸이클이 생겼으면 Ecount만 증가
}}
 
void select_sort(edge vector[],int size){ //선택정렬 알고리즘 
    int i; int j; int temp; int index;
    for(i=0;i<size;i++)
    {
        index=i;
        for(j=i+1;j<size;j++)
        {
            if((vector[j].weight)<vector[index].weight){
            index=j;}
        }
        temp=vector[index].weight;
        vector[index].weight=vector[i].weight;
        vector[i].weight=temp;
        temp=vector[index].left;
        vector[index].left=vector[i].left;
        vector[i].left=temp;
        temp=vector[index].right;
        vector[index].right=vector[i].right;
        vector[i].right=temp;
    }
}
int notcycle(edge *e,edge T[]){ //간선이 cycle 형성 하는지 리턴값이 판별 1이면 notcycle, 0이면 cycle
    int check=0;
    int i;
    if(Tlength==0)  //Tlength가 0이면 1반환 
        return 1;
    for(i=0;i<Tlength;i++){ //i=0부터 Tlength 이전까지 반복
        if(e->u==T[i].u){ //e->u 와 T[i].u 가같으면 (집합이 같으면)
            if((e->left==T[i].left)||(e->left==T[i].right)||(e->right==T[i].left)||(e->right==T[i].right)){ //e의 left가 t의 left나 right와 같거나, e의 right가 t의 left나 right와 같거나
            check++;
            printf("Tlength=%d i=%d check=%d\n\n",Tlength,i,check);} //check 증가식
            if(check==2//즉 같은 집합 내에서 
            {return 0;}
        }}
    return 1;
}
int makeuni(edge *e,edge T[]){ //집합을 만드는 함수
    int i; int check=0;
    if(Tlength==0//Tlength가 0이면
    {e->u=uni++return e->u;} //e->u에 uni 대입하고 증가, e->u 리턴
    else{
        for(i=0;i<Tlength;i++)
        {
        if((e->left==T[i].left)||(e->left==T[i].right)||(e->right==T[i].left)||(e->right==T[i].right)) //e의 left가 t의 left나 right와 같거나, e의 right가 t의 left나 right와 같거나
        {check=1;    //check에 1 대입
        e->u=T[i].u; return e->u; //e->u 에 T[i].u 대입 (즉 둘은 같은 집합이됨) e->u 리턴
        break;}
        }
        if(check==0){ //check가 0이면
        e->u=uni++return e->u; //e->u에 uni대입하고 uni 증가시킴, e->u 리턴 (새로운집합)
        }}}
void jointuni(edge T[]){ //집합을 합치는 함수
    int i;
    for(i=0;i<Tlength;i++){ //i=0부터 Tlength 보다 작을때까지 반복
        if((T[i+1].left==T[i].left)||(T[i+1].left==T[i].right)||(T[i+1].right==T[i].left)||(T[i+1].right==T[i].right)){ //T[i+1]의 left가 T[i]의 left나 right와 같거나, T[i+1]의 right가 T[i]의 left나 right와 같거나,
            if(T[i+1].u<T[i].u)   //T[i+1].u가 T[i].u보다 작으면
                T[i].u=T[i+1].u; //T[i+1].u를 T[i].u에 대입
            else
                T[i+1].u=T[i].u; //작은 쪽으로 집합 번호를 매긴다.
        }}}
cs





반응형
반응형

1. Figure 1 and 2 show the recursive traversal algorithms(or programs) of preorder and postorder, respectively. Write the respectively corresponding iterative traversal algorithms(or programs) of preorder and postorder.

<Figure 2. Postorder traversal algorithm>


<Figure 1. Preorder traversal algorithm>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include <stdio.h>
#include <stdlib.h> //exit 함수 사용때문에 넣음
 
#define MAX_STACK_SIZE 10 //스택 최대 크기
 
typedef struct node* treepointer;  //node 자료형 포인터의 새로운 이름 treepointer
typedef struct node{
    char data;
    treepointer leftchild, rightchild;
}node; //node 구조체 자료형의 새로운 이름 node, 안에는 char형 data와 treepointer형 leftchild, rightchild가 들어있다.
 
void push(treepointer stack[],treepointer item,int *top);
treepointer pop(treepointer stack[],int *top);
void iterpreorder(treepointer node);
void iterpostorder(treepointer node);
 
 
int main(void)
{
    int i; // int형 변수 i
    treepointer root; //treepointer 형 포인터 변수 root
    node tree[MAX_STACK_SIZE]; // node 배열 tree 크기는 10
    for(i=0;i<MAX_STACK_SIZE;i++//i=0부터 10보다 작을때까지 반복
    {tree[i].leftchild=0; tree[i].rightchild=0;tree[i].data=0;} //배열의 원소 초기화
    tree[0].data='+'; tree[0].leftchild=&tree[1]; tree[0].rightchild=&tree[2]; 
    tree[1].data='*'; tree[1].leftchild=&tree[3]; tree[1].rightchild=&tree[4]; 
    tree[2].data='E'
    tree[3].data='*'; tree[3].leftchild=&tree[5]; tree[3].rightchild=&tree[6]; 
    tree[4].data='D';
    tree[5].data='/'; tree[5].leftchild=&tree[7]; tree[5].rightchild=&tree[8]; 
    tree[6].data='C';
    tree[7].data='A';
    tree[8].data='B'//문제에서와 같이 바이너리 트리 형성
    root=&tree[0];  //root에 tree[0]의 주소 대입 (첫번째 노드)
    printf("preorder : ");iterpreorder(root); //preorder를 itr로 구현한 함수 호출
    printf("postorder : ");iterpostorder(root);//postorder를 itr로 구현한 함수 호출
    return 0;
}
 
void push(treepointer stack[],treepointer item,int *top)
{
    if(*top>=MAX_STACK_SIZE-1//만약에 top이가리키는주소의 값이 9이상이라면 
        {fprintf(stderr,"스택 과부하 원소 추가 불가능\n"); // 문장 출력하고
    exit(EXIT_FAILURE);} //프로그램 종료
    stack[++(*top)]=item; //stack의 맨 위에 item 삽입
}
treepointer pop(treepointer stack[],int *top)
{
    if((*top)==-1//top이 가리키는 주소의 값이 -1 이라면
    {fprintf(stderr,"스택 비어있음\n"); //문장 출력하고
    exit(EXIT_FAILURE);} //프로그램 종료
    return stack[(*top)--]; //제일 위에 있는 원소 return
}
 
void iterpreorder(treepointer node)
{
    int top=-1//int 형 변수 top을 -1로 초기화
    treepointer stack[MAX_STACK_SIZE]; //treepointer 형 포인터배열 stack 크기는 10
    push(stack,node,&top); //node를 stack에 쌓는다.
    while(1){
        if(top==-1break//top이 -1이면 루프 탈출 어차피 마지막이 아니면 top이 -1이 될 일이 없다.
        node=stack[top]; //node에 stack의 top 원소 삽입
        printf("%c", node->data); //node의 data 출력
        pop(stack,&top); //stack의 top원소 pop
        if(node->rightchild) //node가 가리키는 구조체node에 rightchild가 있으면
            push(stack,node->rightchild,&top); //stack에 쌓는다.
        if(node->leftchild) //node가 가리키는 구조체node에 leftchild가 있으면
            push(stack,node->leftchild,&top); //stack에 쌓는다.
        }
    printf("\n"); //개행문자 출력
    }
void iterpostorder(treepointer node)
{
    int top1=-1//int 형 변수 top1을 -1로 초기화
    int top2=-1//int 형 변수 top2을 -1로 초기화
    treepointer stack1[MAX_STACK_SIZE]; //treepointer 형 포인터배열 stack1 크기는 10
    treepointer stack2[MAX_STACK_SIZE]; //treepointer 형 포인터배열 stack2 크기는 10
    push(stack1,node,&top1); //node를 stack1에 쌓는다.
    while(1)
    {
        if(top1==-1)break//top1이 -1이면 루프 탈출  어차피 마지막이 아니면 top1이 -1이 될 일이 없다.
        node=pop(stack1,&top1); //node에 stack에서 pop한 원소를 대입
        push(stack2,node,&top2); // stack2에 node를 삽입
        if(node->leftchild) //node가 가리키는 구조체node에 leftchild가 있으면
            push(stack1,node->leftchild,&top1); //stack1에 쌓는다.
        if(node->rightchild) //node가 가리키는 구조체node에 rightchild가 있으면
            push(stack1,node->rightchild,&top1); //stack1에 쌓는다.
    }
    while(1)
    {
        if(top2==-1)break;  //top2가 -1이면 루프 탈출  어차피 마지막이 아니면 top2가 -1이 될 일이 없다.
        node=pop(stack2,&top2); //node에 stack2에서 pop한 원소 대입
        printf("%c", node->data); //character type으로 출력 
    }
    printf("\n"); //개행문자 출력
    }
 
cs



2. Write a C function that searches for an arbitrary element in a max heap. What is the computing time of your function?

<Figure 3. Max heap>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <stdio.h>
 
#define MAX_SIZE 8 //스택 최대 크기
 
typedef struct node* treepointer;  //node 자료형 포인터의 새로운 이름 treepointer
typedef struct node{
    int data;
    treepointer leftchild, rightchild;
}node; //node 구조체 자료형의 새로운 이름 node, 안에는 char형 data와 treepointer형 leftchild, rightchild가 들어있다.
 
void search_max_heap(treepointer ptr,treepointer *res,int value);
 
int main(void)
{
    int i; // int형 변수 i
    treepointer root; //treepointer 형 포인터 변수 root
    treepointer res=0//결과 값을 저장할 treepointer res
    node tree[MAX_SIZE]; // node 배열 tree 크기는 10
    for(i=0;i<MAX_SIZE;i++//i=0부터 10보다 작을때까지 반복
    {tree[i].leftchild=0; tree[i].rightchild=0;tree[i].data=0;} //배열의 원소 초기화
    tree[0].data=14; tree[0].leftchild=&tree[1]; tree[0].rightchild=&tree[2]; 
    tree[1].data=12; tree[1].leftchild=&tree[3]; tree[1].rightchild=&tree[4]; 
    tree[2].data=7;  tree[2].leftchild=&tree[5];
    tree[3].data=10
    tree[4].data=8;
    tree[5].data=6;  //교과서와 같이 트리 생성
    root=&tree[0];  //root에 tree[0]의 주소 대입 (첫번째 노드)
    printf("번호    값    주소\n");
    for(i=0;i<MAX_SIZE;i++)
    {printf("[%d]번 노드 : %d    %d\n",i,tree[i].data,&tree[i]);} //트리의 각 노드 값과 주소 출력
    search_max_heap(root,&res,10); //서치 펑션 호출, 10을 찾음
    printf("찾은값    해당주소\n"); 
    printf("%d    %d\n",res->data,res); //찾고싶은 값의 주소와 값을 가리키는 res 출력
    
    return 0;
}
 
void search_max_heap(treepointer ptr,treepointer *res,int value)
{
    if(ptr){ //ptr이 NULL이 아니면
    if(ptr->data==value)  //ptr이 가리키는 data가 value와 같으면
        *res=ptr; //res가 가리키는 포인터에 ptr의 주소 대입
    else if(((ptr->data)>value)){ //ptr->data가 value보다 크면
        search_max_heap(ptr->leftchild,res,value); //ptr->leftchild로 서치 펑션 재귀적 호출
        search_max_heap(ptr->rightchild,res,value);} //ptr->rightchild로 서치 펑션 재귀적 호출
    else if((ptr->data)<value){ //ptr->data가 value보다 작으면
        printf("%d는 %d보다 작다.\n",ptr->data,value); //아무것도 안해도 되지만 디버깅 위해 문장 출력
    }}
    
}
cs



3. Write the swapTree function of C that swap left child and right child of all nodes.

<Figure 4. swapTree>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <stdio.h>
#define MAX_SIZE 10 //스택 최대 크기
 
typedef struct node* treepointer;  //node 자료형 포인터의 새로운 이름 treepointer
typedef struct node{
    char data;
    treepointer leftchild, rightchild;
}node; //node 구조체 자료형의 새로운 이름 node, 안에는 char형 data와 treepointer형 leftchild, rightchild가 들어있다.
 
 
void swap_bin_tree(treepointer ptr);
void print(treepointer ptr);
 
int main(void)
{
    int i; // int형 변수 i
    treepointer root; //treepointer 형 포인터 변수 root
    node tree[MAX_SIZE]; // node 배열 tree 크기는 10
    for(i=0;i<MAX_SIZE;i++//i=0부터 10보다 작을때까지 반복
    {tree[i].leftchild=0; tree[i].rightchild=0;tree[i].data=0;} //배열의 원소 초기화
    tree[0].data='A'; tree[0].leftchild=&tree[1]; tree[0].rightchild=&tree[2]; 
    tree[1].data='B'; tree[1].leftchild=&tree[3]; tree[1].rightchild=&tree[4]; 
    tree[2].data='C'; tree[2].leftchild=&tree[5];
    tree[3].data='D';                              tree[3].rightchild=&tree[6]; 
    tree[4].data='E';
    tree[5].data='F';                              tree[5].rightchild=&tree[7]; 
    tree[6].data='G';
    tree[7].data='H'//교과서와 같이 이진 트리 구현
    root=&tree[0];  //root에 tree[0]의 주소 대입 (첫번째 노드)
    printf("번호    값    주소\n");
    for(i=0;i<MAX_SIZE;i++)
    {printf("[%d]번 노드 : %c    %d\n",i,tree[i].data,&tree[i]);} //각 노드의 값과 주소 출력
    swap_bin_tree(root); //트리 스왑
    print(root); //스왑된 트리 확인
    return 0;
}
 
void swap_bin_tree(treepointer ptr)
{
    treepointer temp; //treepointer 즉 node의 포인터 temp
    if(ptr){ //ptr이 NULL이아니면 
        temp=ptr->leftchild;  
        ptr->leftchild=ptr->rightchild;
        ptr->rightchild=temp; //temp라는 빈 물 컵을 이용해 left와 right의 스왑
        
        if(ptr->leftchild) //leftchild가 null이 아니면 (불필요한 반복 줄이기 위해 한번 더 검사)
    swap_bin_tree(ptr->leftchild); //스왑
        if(ptr->rightchild) //rightchild가 null이 아니면 (불필요한 반복 줄이기 위해 한번 더 검사)
    swap_bin_tree(ptr->rightchild); //스왑
    }}
void print(treepointer ptr)
{
    if(ptr){
    printf("노드             : %c    %d\n",ptr->data,ptr); //노드 값, 주소 출력
    if(ptr->leftchild) //ptr->leftchild가 NULL이 아니면 (불필요한 반복 줄이기 위해 한번 더 검사)
    printf("노드 왼쪽 자식   : %c    %d\n",(ptr->leftchild)->data,ptr->leftchild); //노드 왼쪽 자식 값, 주소 출력
    if(ptr->rightchild) //ptr->rightchild가 NULL이 아니면 (불필요한 반복 줄이기 위해 한번 더 검사)
    printf("노드 오른쪽 자식 : %c    %d\n",(ptr->rightchild)->data,ptr->rightchild); //노드 오른쪽 자식 값, 주소 출력
    if(ptr->leftchild) //ptr->leftchild가 NULL이 아니면
    print(ptr->leftchild); // 재귀호출 프린트
        if(ptr->rightchild) //ptr->rightchild가 NULL이 아니면
    print(ptr->rightchild); //재귀호출 프린트
    }
}
cs







반응형
반응형

1. Using the binary search function, show the status of the system stack diagram such as below the example after each function call for the iterative and recursive function.




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define COMPARE(mid,searchnum)  (((mid)<(searchnum)) ? (1) : (((mid)>(searchnum)) ? (-1) : (0)))  //미들값과 찾는값의 크기를 비교하여 해당 값 반환
/* mid<searchnum 이면 -1 반환, mid>searchnum이면 1 반환, mid=searchnum이면 1 반환*/
#define MAX_SIZE 1001 //상수 MAX_SIZE는 1001
#define ITERATIONS 16 //상수 ITERATIONS는 16
int count=0;
int binsearch_rec(int list[], int searchnum, int left, int right);
int binsearch_itr(int list[], int searchnum, int left, int right);
int main(void)
{
    int i;
    int list[MAX_SIZE]; //int형 배열 list 선언, 배열의 크기는 MAX_SIZE=1001
    for(i=0;i<MAX_SIZE;i++)
    {
        list[i]=i; //각 배열의 원소의 값을 번호로 초기화
    }
        printf("binsearch_rec 이용 0~32에서 6찾기 : %d\n",binsearch_rec(list,6,0,32));
        printf("binsearch_itr 이용 0~32에서 6찾기 : %d\n",binsearch_itr(list,6,0,32));
    return 0;
}
int binsearch_itr(int list[], int searchnum, int left, int right)  //반복적으로 짠 이진탐색
{
    int middle; //int형 변수 middle 선언
    printf("*******binsearch_itr 호출*******\n");
    while(left<=right) //left가 right 이하일때 반복
    {middle=(left+right)/2;  //미들은 left와 right의 산술평균
    switch(COMPARE(list[middle],searchnum))  //COMPARE 의 값을 받아와 그에 따라 switch-case로 판단
    {
    case -1 : left=middle+1;  
                break;    //-1경우 left에 middle+1로 대입 후 break
    case 0 :    return middle;
                break//0경우 middle값 리턴 후 break
    case 1 : right=middle-1;
                break//1경우 right에 middle-1로 대입 후 break
    }
    }
    return -1//while 루프가 깨졌을 경우 반환값 -1
}
int binsearch_rec(int list[], int searchnum, int left, int right) //recursive function으로 짠 이진탐색
{
    int middle;//int형 변수 middle 선언
    printf("*******binsearch_rec %d 호출*******\n",i);
    while(left<=right)//left가 right 이하일때 반복 recursive function이라서 if 를 써도 무방하다.
    {middle=(left+right)/2;//미들은 left와 right의 산술평균
    switch(COMPARE(list[middle],searchnum)) //COMPARE 의 값을 받아와 그에 따라 switch-case로 판단
    {
    case -1 :
                return binsearch_rec(list,searchnum,middle+1,right);
                break//-1경우 binsearch_rec함수의 left자리에 middle+1, right 인자에 right 넣어 호출 후 break
    case 0 :
                return middle; 
                break//0의 경우 middle값 리턴 후 break
    case 1 : 
                return binsearch_rec(list,searchnum,left,middle-1);
                break//1경우 binsearch_rec함수의 left자리에 left, right 인자에 middle-1 넣어 호출 후 break
    }
    }
    return -1//while 루프가 깨졌을 경우 반환값 -1
}
cs




*아래쪽 binserach_rec 이용 0~32에서 6찾기 오타입니다. rec를 itr로 바꿔주세요.




2. We can maintain a linear list circularly in an array, circle[MAX_SIZE]. We set up front and rear indices similar to those used for a circular queue.

(a) Obtain a formula in terms of front, rear, and MAX_SIZE for the number of elements in the list.

(b) Write a function that deletes the k-th element in the list.

(c) Write a function that inserts an element, item, immediately after the k-th element.

(d) What is the time complexity of your functions for (b) and (c)?




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <stdio.h>
#include <stdlib.h>
#define MAX_SIZE 8 // 배열의 기본 최대 크기 상수 8
int multi=1//배열의 크기를 동적 메모리 할당할 때 사용할 전역 변수 multi
int front = 0//원형 선형 리스트의 front 전역 변수
int rear = 0//원형 선형 리스트의 rear 전역 변수
void del_list(int *list); //k번째 원소 삭제 함수
void insert_list(int *list); //k번째 다음 공간에 원소 삽입 함수
void init(int *arr); //배열을 0으로 초기화 하는 함수, 0을 빈 공간으로 사용하였다.
void print(int *arr); // 배열 프린트 함수
void full(int *list); // 배열이 꽉찼을 때 동적 메모리로 배열의 크기를 늘려주는 함수
int menu(); //메뉴 호출 함수
int main(void)
{
    int *arr; //포인터변수 arr, 배열의 크기를 정확히 알 수 없기 때문에 포인터를 배열처럼 사용한다.
    int m; //메뉴 번호로 사용할 변수 m
    arr=(int*)malloc(sizeof(int)*MAX_SIZE); //sizeof(int)*MAX_SIZE 만큼의 크기의 메모리를 지정
    init(arr); // arr을 0으로 이니셜라이징
    while(1//무한루프
    {m=menu(); //m이 -1이면 루프 탈출
    if(m==-1)
        break;
    else if(m==1)  //m이 1이면 배열 출력
        print(arr);
    else if(m==2//m이 2면 원소 삽입 함수 호출
        insert_list(arr);
    else if(m==3//m이 3이면 원소 삭제 함수 호출
        del_list(arr);
    }
    free(arr); //arr의 동적 메모리 free
    return 0;
}
void del_list(int *list)
{
    int i,k;
    printf("인덱스를 입력하세요: ");
    scanf("%d"&k);
    if(front==rear)  //front는 맨 앞 원소의 인덱스 바로 앞을 말한다. rear를 증가하지않고 둘을 검사하면 empty 검사이다.
        printf("리스트가 비어있습니다.\n");
    else if(list[k]==0// 0값을 empty로 사용하였다.
        printf("이미 비어있는 공간입니다.\n");
    else
    {
        for(i=k;i<MAX_SIZE*multi;i++)  //k번째 원소를 삭제할 것이기 때문에  k부터 전체 배열크기 이전까지 반복해준다.
            list[i]=list[i+1]; // 하나 다음 원소를 이전의 공간에 대입해준다. 즉 왼쪽으로 한칸씩 당긴다.
        rear=(rear-1)%(MAX_SIZE*multi); // rear를 하나 감소해준다. 나머지로 하는 이유는 circular이기 때문이다.
    }
    list[MAX_SIZE*multi-1]=0//꽉찼을 때 이함수를 호출하면 마지막에 쓰레기 값이 들어가므로 마지막 원소에 0을 대입해준다.
    print(list); //배열 프린트
}
void insert_list(int *list)
{
    int i,k,item;
    printf("k번째 원소 뒤에 item을 넣습니다. 차례로 입력하세요: ");
    scanf("%d %d",&k,&item);
        rear=((rear)+1) % (MAX_SIZE*multi);  //insert 함수는 rear를 증가시키고 시작한다.
        if(front==rear)   //front와 rear가 같으면 full 함수를 호출한다.
        {    
            full(list);
    for(i=(MAX_SIZE*multi/2);i<MAX_SIZE*multi;i++//full함수때문에 전역변수 multi가 2배가 된 후이기때문에 나머지 2를 해준다.
        list[i]=0;} // 즉 처음에 인덱스가 0~7 이었으나 full이후 0~15가 되었으므로 8~15를 0으로 초기화 시켜준다. 그 이후 역시 같다.
        if(k+1==MAX_SIZE*multi) 
            /*이것은 마지막 배열공간을 k로택한 경우이다. 이경우 원래대로라면 맨 처음의 경우front를 7로 바꾸고 인덱스 0에 원소를 삽입해야한다.
            하지만 이 경우 함수가 너무 복잡해지기 때문에 나는 차라리 이전의 배열 공간에 있었던 원소들을 한칸씩 오른쪽으로 밀고 index 1에 
            원하는 값을 대입하기로 하였다. 이 방법은 k값이 마지막 배열공간일 때만 신경쓰면 되고, front값을 처음에 0으로 설정해 놓았을 경우
            절대로 프로그램이 종료할 때까지 다른 값으로 바뀌지 않기 때문에 매우 직관적이다. 배열이 꽉찰 경우는 이미 앞에서 검사했기 때문에
            문제가 없다.*/
    {
        for(i=multi*(MAX_SIZE)-1;i>0;i--)
        {list[i]=list[i-1];} // 오른쪽으로 한칸씩 원소를 밀었다.
            list[1]=item; //1번 index에 원하는 값 대입
    }
        else if(k>=rear)  //위의 방법으로 원형 선형 리스트를 구현하였기 때문에 k가 rear 이상인 경우는 전부 걸러낼 수 있다.
            {printf("잘못된 입력입니다.\n");
        rear--;} // 그리고 처음에 rear를 증가시키고 시작했기 때문에 다시 빼준다.
        else{
        for(i=multi*(MAX_SIZE)-1;i>k;i--//이것은 일반적인 경우로 k번째 다음에 공간을 만들기 위해 제일 마지막 원소부터 그 이전원소를 하나씩 오른쪽으로 밀어주는 것을
        {list[i]=list[i-1];}              // 반복문으로 나타낸 것이다. 
            list[k+1]=item;                // k+1 index를 기점으로 원소를 하나씩 오른쪽으로 민 후 원하는 자리에 item을 대입해준다.
    }
        print(list);  //배열 프린트
}
void init(int *arr)
{
    int i;
    for(i=0;i<MAX_SIZE*multi;i++)
        arr[i]=0;
}
void print(int *arr)
{
    int i;
    for(i=0;i<MAX_SIZE*multi;i++)
        printf("%3d ",arr[i]);  //예쁘게 하려고 3d로 자리수를 맞춰주었다.
    printf("\n");
    printf("front   :   %d    rear   :   %d\n",front,rear);
}
int menu()
{
    int m;
    printf("=====================\n");
    printf("1. 리스트 출력\n2. 원소 입력(입력한 인덱스 바로 뒤에 삽입)\n3. 원소 삭제(입력한 인덱스의 원소)\n(-1은종료)\n");
    printf("=====================");
    scanf("%d"&m);
    return m;
}
void full(int *list)
{
    multi*=2//전역변수의 크기를 2배씩 늘려준다.
    realloc(list,sizeof(int)*MAX_SIZE*multi); // 따라서 배열이 꽉 찰때마다 크기가 2배씩 계속 증가한다.
    front=0//front를 0으로 만들어준다. 위에서 말했듯이 바뀔 일이 없다.
    rear=((MAX_SIZE*multi)/2); // rear는 하나가 더 채워졌으므로 8,16,32 .. 등이 된다.
}
cs





반응형
반응형

이 게시판은 fundamentals of data structures in C라는 교재를 이용한 자료구조 수업을 들을 때 공부 했던 것들을 올리는 게시판 입니다. 하지만 별다른 설명은 올리지 않고 작성한 코드와 결과만 올려놓았습니다. 상세한 설명이 필요한 경우 댓글로 이메일 적어주시면 보내드리겠습니다. 

반응형
반응형

1. There are three towers and 64 disks of different diameters placed on the first tower. The disks are in order of decreasing diameter as one scans up the tower. Monks were reputedly supposed to move the disk from tower 1 to tower 3 obeying the rules :




(a) Only one disk can be moved at any time.

(b) No disk can be placed on top of a disk with a smaller diameter.

Write a recursive function that prints out the sequence of moves needed to accomplish this task.




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*****************************************************************
num : 원판의 갯수 from : 옮기는 판이 원래 있던 기둥
to : 옮기는 판이 옮겨질 기둥  disk : 사용자가 입력한 원판의 개수
pass_stop : from에 있던 (n-1)개의 원판이 to로 가기 위해 경유하는 기둥 
count : 움직인 횟수
기둥은 총 3개가 있는데 각 기둥을 정수 1,2,3으로 표현하였다.
****************************************************************/
 
#include <stdio.h>
void Hanoi(int num, int from, int to);
int count = 0;
int main(void)
{
    int disk = 0
    printf("원판 수를 입력하세요: ");
    scanf("%d"&disk); // 옮길 원판 개수 입력
    Hanoi(disk, 13); // 시작 위치 : 기둥1 도착 위치 : 기둥3
    printf("총 움직인 횟수는 %d회 입니다.\n", count);
    return 0;
}
void Hanoi(int num, int from, int to) 
{
    int pass_stop = 2// 각 기둥을 1,2,3 이라고 정함, 1+2+3=6
    if (num <= 1)
    {
        printf("%d번째 원판을 %d에서 %d로 옮겼습니다.\n", num, from, to);
        count++;
    }
    else {
        pass_stop = 6 - from - to;
        Hanoi(num - 1, from, pass_stop); // (n-1)개를 from에서 pass_stop으로 옮긴다.
        printf("%d번째 원판을 %d에서 %d로 옮겼습니다.\n", num, from, to);
        count++;
        Hanoi(num - 1, pass_stop, to); // (n-1)개를 pass_stop에서 to 로 옮긴다.
    }
}
cs






2. Write the iterative(반복의) (Program 2-1) and recursive(회귀의) (Program 2-2) binary search function and measure the worst case performance of both functions (using Program 1.25), and analyze average case time complexity of binary search algorithm.


*프로그램 1.25에 써있는 numtime 대로 하면 cpu 성능이 너무 좋아 시간이 제대로 나오지 않으므로 곱하기 100씩 한 수를 넣어주었다.





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define COMPARE(mid,searchnum)  (((mid)<(searchnum)) ? (-1) : (((mid)>(searchnum)) ? (1) : (0)))  //미들값과 찾는값의 크기를 비교하여 해당 값 반환
/* mid<searchnum 이면 -1 반환, mid>searchnum이면 1 반환, mid=searchnum이면 1 반환*/
#define MAX_SIZE 1001 //상수 MAX_SIZE는 1001
#define ITERATIONS 16 //상수 ITERATIONS는 16
int binsearch_rec(int list[], int searchnum, int left, int right);
int binsearch_itr(int list[], int searchnum, int left, int right);
int main(void)
{
    int i,j,position;  //int형 변수 i,j,positon 선언
    int list[MAX_SIZE]; //int형 배열 list 선언, 배열의 크기는 MAX_SIZE=1001
    int sizelist[]={0,10,20,30,40,50,60,70,80,90,100,200,400,600,800,1000}; //이진탐색을 시행할 크기
    int numtimes[]={3000000,1200000,600000,500000,400000,400000,400000,300000,300000,200000,200000,100000,50000,50000,50000,20000}; // 이진탐색을 돌릴 횟수
    clock_t start, stop; //clock_t는 time.h에서 정의되어있는데 long 형과 같다. start, stop 변수 선언
    double duration, total; //double 형 변수 duration, total 선언
    for(i=0;i<MAX_SIZE;i++)
    {
        list[i]=i; //각 배열의 원소의 값을 번호로 초기화
    }
        printf("=====================ITERATIVE=====================\n");
        printf("sizelist[i]  numtimes[i]  stop-start     total     duration     positon\n");
    for(i=0;i<ITERATIONS;i++
    {
        start=clock(); //start에 프로그램이 시작될 때부터 지난 틱수 저장
        for(j=0;j<numtimes[i];j++// j=0부터 numtimes[i] 미만까지 반복
        {
            position=binsearch_itr(list,sizelist[i]+1,0,sizelist[i]); //positon에 binseasrch_itr함수의 반환값 저장 최악의 경우로 없는 숫자를 찾는다.
                                                                    //예를들어 sizelist[2]면 searchnum은 0에서 10사이에서 11을 찾는 것이다. 리턴은 -1일 것이다.
        }
        stop=clock(); //stop에 프로그램이 시작될 때부터 지난 틱수 저장
        total=((double)(stop-start))/CLOCKS_PER_SEC; //CLOCKS_PER_SEC는 초당 클락수이다.1000으로 정의되어 있다. stop-start=사이의 클락수이므로 연산을 하면 시간(초)가 반환된다.
        duration=(total/numtimes[i]); //total을 numtimes[i]로 나눈 값
        printf("%11d %11d %11d %11f %11f %11d\n",sizelist[i],numtimes[i],(int)(stop-start),total,duration,position); //화면에 각각의 값을 11자리씩 출력
        list[sizelist[i]]=sizelist[i]; //reset value 라고 써있는데 왜 있는지 잘 모르겠다.
    }
    printf("=====================RECURSIVE=====================\n");
    printf("sizelist[i]  numtimes[i]  stop-start     total     duration     positon\n");
    for(i=0;i<ITERATIONS;i++)
    {
        start=clock();    //start에 프로그램이 시작될 때부터 지난 틱수 저장
        for(j=0;j<numtimes[i];j++)// j=0부터 numtimes[i] 미만까지 반복
        {
            position=binsearch_rec(list,sizelist[i]+1,0,sizelist[i]); //positon에 binseasrch_rec함수의 반환값 저장 최악의 경우로 없는 숫자를 찾는다.
                                                                    //예를들어 sizelist[2]면 searchnum은 0에서 10사이에서 11을 찾는 것이다. 리턴은 -1일 것이다.
        }
        stop=clock(); //stop에 프로그램이 시작될 때부터 지난 틱수 저장
        total=((double)(stop-start))/CLOCKS_PER_SEC; //CLOCKS_PER_SEC는 초당 클락수이다.1000으로 정의되어 있다. stop-start=사이의 클락수이므로 연산을 하면 시간(초)가 반환된다.
        duration=(total/numtimes[i]); //total을 numtimes[i]로 나눈 값
        printf("%11d %11d %11d %11f %11f %11d\n",sizelist[i],numtimes[i],(int)(stop-start),total,duration,position); //화면에 각각의 값을 11자리씩 출력
        list[sizelist[i]]=sizelist[i]; //reset value 라고 써있는데 왜 있는지 잘 모르겠다.
    }
    return 0;
}
int binsearch_itr(int list[], int searchnum, int left, int right)  //반복적으로 짠 이진탐색
{
    int middle; //int형 변수 middle 선언
    while(left<=right) //left가 right 이하일때 반복
    {middle=(left+right)/2;  //미들은 left와 right의 산술평균
    switch(COMPARE(list[middle],searchnum))  //COMPARE 의 값을 받아와 그에 따라 switch-case로 판단
    {
    case -1 : left=middle+1;  
                break;    //-1경우 left에 middle+1로 대입 후 break
    case 0 :    return middle;
                break//0경우 middle값 리턴 후 break
    case 1 : right=middle-1;
                break//1경우 right에 middle-1로 대입 후 break
    }
    }
    return -1//while 루프가 깨졌을 경우 반환값 -1
}
int binsearch_rec(int list[], int searchnum, int left, int right) //recursive function으로 짠 이진탐색
{
    int middle;//int형 변수 middle 선언
    while(left<=right)//left가 right 이하일때 반복 recursive function이라서 if 를 써도 무방하다.
    {middle=(left+right)/2;//미들은 left와 right의 산술평균
    switch(COMPARE(list[middle],searchnum)) //COMPARE 의 값을 받아와 그에 따라 switch-case로 판단
    {
    case -1 : return binsearch_rec(list,searchnum,middle+1,right);
                break//-1경우 binsearch_rec함수의 left자리에 middle+1, right 인자에 right 넣어 호출 후 break
    case 0 :    return middle; 
                break//0의 경우 middle값 리턴 후 break
    case 1 : return binsearch_rec(list,searchnum,left,middle-1);
                break//1경우 binsearch_rec함수의 left자리에 left, right 인자에 middle-1 넣어 호출 후 break
    }
    }
    return -1//while 루프가 깨졌을 경우 반환값 -1
}
 
 
cs


반응형

'컴퓨터 & 프로그래밍 & 전자공학 > Data Sturcture' 카테고리의 다른 글

dfs, bfs, prim, kruskal  (0) 2017.10.01
preorder, postorder, inorder, heap, tree  (0) 2017.10.01
stack, queue  (0) 2017.10.01
참고 사항  (0) 2017.10.01
Array, Pointer  (0) 2017.10.01
반응형

1. Array : Let’s assume that we have the following declaration:

1.1. Please store the above data using scanf() function in two 2-dimension array, respectively. You can show the result.

 

1.2. Please create a new array ‘element[2][3]’ to obtain the sum of the value of First array and Second array. For example,

element[1][2] = First[1][2]+Second[1][2].

element[2][1] = First[2][1]+Second[2][1].




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
    {{16,18,23},{54,91,11}}          {{24,52,77},{16,19,59}}
    1-1)Please store the above data using  function in two  2-dimension array, respectively. You can show the result.
    1-2)Please create a new array ‘Element[2][3]’ to obtain the sum of the value of First array and Second array. For example,
        Element[1][2] = First[1][2]+Second[1][2]. 
        Element[2][1] = First[2][1]+Second[2][1].
    ROW : 행 수 COL : 열 수
    array_input : 배열에 원소 값을 사용자가 입력할 수 있게 하는 함수
    array_print : 배열을 원소별로 출력해주는 함수
    array_sum   : 배열의 합을 구해주는 함수
    First[ROW][COL] : 2*3 사이즈의 2차원 배열1
    Second[ROW][COL] : 2*3 사이즈의 2차원 배열2
    Element[ROW][COL] : 2*3 사이즈의 2차원 배열, 동일한 위치의 First와 Second 의 원소의 합이 들어갈 배열
*/
#include <stdio.h>
#define ROW 2
#define COL 3
void array_input(int num,int array[][COL]);
void array_print(int num,int array[][COL]);
void array_sum(int array1[][COL],int array2[][COL],int array3[][COL]);
int main(void)
{
    int First[ROW][COL];
    int Second[ROW][COL];
    int Element[ROW][COL];
    array_input(1,First);
    array_input(2,Second);
    array_sum(First,Second,Element);
    printf("\n");
    array_print(1,First);
    printf("\n");
    array_print(2,Second);
    printf("\n");
    array_print(3,Element);
    return 0;
}
void array_input(int num,int array[][COL])
{
    int i;int j;
    printf("<%d번째 배열 입력>\n",num);
    for(i=0;i<ROW;i++)
    {
        for(j=0;j<COL;j++)
        {
        printf("%d번배열[%d][%d] 값 입력 : ",num,i,j);
        scanf("%d",&array[i][j]);
        }
    }
}
void array_print(int num,int array[][COL])
{
    int i;int j;
    for(i=0;i<ROW;i++)
    {
        for(j=0;j<COL;j++)
        {
        printf("%d번배열[%d][%d] : %d\n",num,i,j,array[i][j]);
        }
    }
}
void array_sum(int array1[][COL],int array2[][COL],int array3[][COL])
{
    int i;int j;
    for(i=0;i<ROW;i++)
    {
        for(j=0;j<COL;j++)
        {
        array3[i][j]=array1[i][j]+array2[i][j];
        }
    }
}
cs

 

 


2. Pointer : Let’s assume the next arrangement was declared. Calculate the final value of the following expression:

2.1. *(**p+3), *(**p+1), p[0], **(p[1]+1), *(p[1] +1)

2.2. *text, *(text+3), *(text+7)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
int main(void)
{
    char *p[3][2]={"abcd","efgh","ijklm","nop","qrstuv","wxyz"};
    char *text;
    char more[]="Happy Holidays";
    text=&more[4]; //'y'의 주소
    printf("*(**p+3)=%c\n",*(**p+3));
    printf("*(**p+1)=%c\n",*(**p+1));
    printf("p[0]=%x\n",p[0]);
    printf("**(p[1]+1)=%c\n",**(p[1]+1));
    printf("*(p[1]+1)=%x\n",*(p[1]+1));
    printf("\n");
    printf("*text=%c\n",*text);
    printf("*(text+3)=%c\n",*(text+3));
    printf("*(text+7)=%c\n",*(text+7));
}
cs







반응형
반응형




F             Em        Dm    C

오늘 많이 힘들었던 하루였죠


F            Em         Dm     C

그댈 보는 내 가슴이 아리네요


F                  G            E                Am

지친 그대를 위해 해줄 수 있는 건 오로지


F                     Em           Dm    C

곁에 있어주는 것 밖에 못해 미안해요


F     Em Dm C       Em Am          Dm         Gm

그댄 웃는 게 정말 예쁜 사람이라서 그 미소를 잃었을


F  Em   Dm C       Em           Am      Dm                  Gm

때 마다 내 전부를 다 줘서라도 다시 또 되돌려주고 싶어요


    F              Em                     Dm             C

대신 울어주고 싶고 내가 대신 아파해주고 싶어요


     F              Em                  Dm            C

다신 그대의 마음에 상처가 나지 않았으면 해요



             F     G          E    Am

누군가를 넘치게 좋아한다는 건 


    F          Em   Dm       C

참 신기하게도 그렇더라고요


F        Em            Dm                 C

내가 조금이나마 도움이 되길 원해요


    F    Em           Dm                C

그대에게 있어 난 안식처 이길 바라요


     F         G         E         Am

바쁜 하루 중에도 날 떠올리면


   F             Em         Dm      C

편안해질 수 있게 노력 해볼게요


    F Em Dm C         Em  Am       Dm        Gm

그댄 사실은 너무 여린 사람이라서 소리 없이 아파할 


F Em     Dm C         Em        Am         Dm        Gm

때마다 내 전부를 다 줘서라도 다시 또 웃게 해주고 싶어요


     F            Em                      Dm             C

대신 울어주고 싶고 내가 대신 아파해주고 싶어요


     F              Em                  Dm            C

다신 그대의 마음에 상처가 나지 않았으면 해요


             F    G           E    Am

누군가를 넘치게 좋아한다는 건


    F         Em    Dm        C

참 신기하게도 그렇더라고요

     F         Em              Dm      C                  Em  Am    Dm    Gm

          This is a song for you Oh I’m singing for you 


     F         Em              Dm      C                  Em Am         Dm    Gm

          This is a song for you Oh I’m singing for you 내 모든걸 다 줄게


     F            Em                      Dm             C

대신 울어주고 싶고 내가 대신 아파해주고 싶어요


     F              Em                  Dm            C

다신 그대의 마음에 상처가 나지 않았으면 해요


             F    G           E    Am

누군가를 넘치게 좋아한다는 건


    F         Em    Dm        C

참 신기하게도 그렇더라고요


코드 검색 : http://www.logue.net/chords/F.htm




반응형

'My Life > Chords' 카테고리의 다른 글

day6 - 좋아합니다 기타 코드  (1) 2017.12.25
Sia - Underneath The Mistletoe  (0) 2017.12.20

+ Recent posts