๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€48

๋ฆฌ๋ˆ…์Šค ์‰˜ ๋‹จ์ถ•ํ‚ค Keyboard shortcuts for bash Ctrl + A Go to the beginning of the line you are currently typing on Ctrl + E Go to the end of the line you are currently typing on Ctrl + L Clears the Screen, similar to the clear command Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line. Ctrl + H Same as backspace Ctrl + R Let’s you search through previously used commands Ctrl + C Ki.. 2015. 4. 9.
C++ ํŒŒ์ผ ์ž…์ถœ๋ ฅ ofstream / ifstream C++ programming์—์„œ๋Š” fstream์˜ ofstream / ifstream ํด๋ž˜์Šค๋ฅผ ์ด์šฉํ•˜์—ฌ ํŒŒ์ผ์„ ์ž…์ถœ๋ ฅํ•œ๋‹ค. getline( fin, line ) extracts characters from fin and stores them into line variable getline()์€ '/n'(defalut)์„ ์ž…๋ ฅ์˜ ๋์œผ๋กœ ์ธ์‹ํ•˜์—ฌ ์ •ํ•ด์ง„ ๊ธธ์ด๋งŒํผ ํ•œ์ค„ ์ „์ฒด๋ฅผ ์ฝ์–ด๋“ค์ธ๋‹ค. #include using namespace std; #define MAX_SIZE 1000 char inputString[MAX_SIZE]; int main() { // write a file ofstream outFile( "output.txt" ); for( int i=0; i 2015. 4. 9.
Eigen3 Library Constructors #include #include using namespace Eigen; Matrix3f A; MatrixXf B; MatrixXf C( 10, 15 ); VectorXf d( 30 ); Matrix3F E; E 2015. 3. 27.
STL vector class vector๋Š” STL์—์„œ ๊ฐ€์žฅ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ด๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•  ๋•Œ ๊ฐ€์žฅ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ์ž๋ฃŒ๊ตฌ์กฐ๋Š” ๋ฐฐ์—ด(array)์ธ๋ฐ, vector๋Š” ๋ฐฐ์—ด์„ ๋Œ€์ฒดํ•˜์—ฌ ์“ธ ์ˆ˜ ์žˆ๋‹ค. ๋ฐฐ์—ด์˜ ๊ฒฝ์šฐ ๊ฐ™์€ ์ข…๋ฅ˜์˜ ๋ฐ์ดํ„ฐ๊ฐ€ ์ˆœ์ฐจ์ ์œผ๋กœ ์ €์žฅ๋œ๋‹ค. ๋ฐฐ์—ด์˜ ํฌ๊ธฐ๋Š” ๊ณ ์ •๋˜์–ด ์žˆ์ง€๋งŒ vector๋Š” ๋™์ ์œผ๋กœ ๋ณ€ํ•œ๋‹ค๋Š” ์ ์ด vector์™€ array์˜ ๊ฐ€์žฅ ํฐ ์ฐจ์ด์ ์ด๋‹ค. 1. ๋ฐฐ์—ด์˜ ํŠน์ง• - ํฌ๊ธฐ ๊ณ ์ •: ์ฒ˜์Œ์— ํฌ๊ธฐ๋ฅผ ์„ค์ •ํ•˜๋ฉด ์ดํ›„์— ํฌ๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์ง€ ๋ชปํ•œ๋‹ค. - ์ค‘๊ฐ„์— ๋ฐ์ดํ„ฐ ์‚ฝ์ž…, ์‚ญ์ œ๊ฐ€ ์šฉ์ดํ•˜์ง€ ์•Š๋‹ค. - ๊ตฌํ˜„์ด ์‰ฝ๋‹ค. - ๋ฐ์ดํ„ฐ๋ฅผ ์ˆœ์ฐจ์ ์œผ๋กœ ์ €์žฅํ•˜๋ฏ€๋กœ ๋žœ๋ค ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. 2. vector๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ - ์ €์žฅํ•  ๋ฐ์ดํ„ฐ์˜ ๊ฐœ์ˆ˜๊ฐ€ ๊ฐ€๋ณ€์ ์ด๋‹ค. - ์ค‘๊ฐ„์— ๋ฐ์ดํ„ฐ ์‚ฝ์ž…, ์‚ญ์ œ๊ฐ€ ์—†๋‹ค. ๊ฐ€์žฅ ๋’ค์—์„œ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ญ์ œํ•˜.. 2015. 3. 25.