E D R , A S I H C RSS

Full text search for "vector"

vector


Search BackLinks only
Display context of search results
Case-sensitive searching
  • VonNeumannAirport/1002 . . . . 58 matches
         언어는 C++ 로 할 것이고 중간에 STL 중 vector 를 간단하게 이용할겁니다. (자세한 이용법은 나도 모르는 관계로 -_-;) 일단 저는 이 문제를 한번 풀어본 적이 있습니다. 연습삼아서 새로 풀어봅니다.
         에러가 난다. C++ 에서는 터플이 없으므로.. -_- 배열을 넘기는 방법이 있고, vector 를 이용하는 방법이 있습니다. 저번에는 배열로 했기 때문에 이번엔 vector 로 해본다는. ^^;
          vector <int> arrivalCitys;
          vector <int> departureCitys;
         C:\User\reset\AirportSec\main.cpp(57) : error C2664: '__thiscall Configuration::Configuration(int,int)' : cannot convert parameter 1 from 'class std::vector<int,class std::allocator<int> >' to 'int'
          Configuration (vector<int> startCity, vector<int> endCity) {
          vector<int> arrivalCitys;
          vector<int> depatureCitys;
          vector <int> arrivalCitys;
          vector <int> departureCitys;
          vector <int> arrivalCitys;
          vector <int> departureCitys;
          int find (vector<int>& cities, int city) {
          vector<int> arrivalCitys;
          vector<int> departureCitys;
          vector<int> arrivalCitys;
          vector<int> departureCitys;
         #include <vector>
          vector<int> startCity;
          vector<int> endCity;
  • RandomWalk2/Insu . . . . 49 matches
         = Array는 모두 Vector로, char* 은 String으로 바꾼 버전 version 1.5 =
         #include <vector>
          vector< vector<int> > _arVisitFrequency;
          vector<int> _arDirectionX;
          vector<int> _arDirectionY;
         #include <vector>
          vector< vector<int> > _arVisitFrequency;
          vector<int> _arDirectionX;
          vector<int> _arDirectionY;
         #include <vector>
          void CheckDirectionAndMove(const vector<int>& X, const vector<int>& Y, int nRow, int nCol, int direction);
         void Roach::CheckDirectionAndMove(const vector<int>& X, const vector<int>& Y, int nRow, int nCol, int direction)
         #include <vector>
          vector< vector<int> > _arVisitFrequency;
         #include <vector>
          static vector<int> _arDirectionX;
          static vector<int> _arDirectionY;
         vector<int> Roach::_arDirectionX;
         vector<int> Roach::_arDirectionY;
         #include <vector>
  • MatrixAndQuaternionsFaq . . . . 47 matches
         Q13. How do I multiply one or more vectors by a matrix?
         Q38. How do I generate a rotation matrix to map one vector onto another?
          coefficients for that axis, rather than perform a full vector-matrix
          The first three columns of the matrix define the direction vector of the
          Then the direction vector for each axis is as follows:
         === Q13. How do I multiply one or more vectors by a matrix? ===
          The best way to perform this task is to treat the list of vectors as
          a single matrix, with each vector represented as a column vector.
          If N vectors are to be multiplied by a 4x4 matrix, then they can be
          and the list of vectors is defined as:
          Note that an additional row of constant terms is added to the vector
          vector list V match.
          For each vector in the list there will be a total of 12 multiplication
          These are specfied in vector format eg. |x y z| and can be stored
          as a VECTOR data structure.
          Euler angles can be represented using a single vector data structure.
          m3_fromeuler( MATRIX *mat_final, VECTOR3 *euler )
         === Q38. How do I generate a rotation matrix to map one vector onto another? ===
          a rotation matrix that will map one direction vector onto another.
          vectors to be attached at their starting points. Then the entire
  • MedusaCppStudy/석우 . . . . 47 matches
         #include <vector>
         using std::cout; using std::vector;
          vector<int> numbers;
         #include <vector>
         using std::endl; using std::vector;
          vector<int> length;
         #include <vector>
         void Printnumber(vector< vector<int> >& board);
         void Showboard(const vector< vector<int> >& board);
          vector< vector<int> > board(size);
         void Printnumber(vector< vector<int> >& board)
         void Showboard(const vector< vector<int> >& board)
         #include <vector>
         void move(vector< vector<int> >& board, Roachs& roach);
         void print(const vector< vector<int> >& board, const Roachs& roach);
          vector< vector<int> > board(rows);
         void move(vector< vector<int> >& board, Roachs& roach)
         void print(const vector< vector<int> >& board, const Roachs& roach)
         #include <VECTOR>
         void calculation(vector<Words>& sentence, Words& word);
  • AcceleratedC++/Chapter7 . . . . 43 matches
         기존에 이용한 vector, list는 모두 push_back, insert를 이용해서 요소를 넣어주었을 때,
         || '''Key''' || 요소의 검색을 위해서 사용되는 검색어. 한개의 요소를 다른 요소와 구분하는 역할을 한다. 키는 요소의 변경시에 변경되지 않는 값이다. 이에 반하여 vector의 인덱스는 요소의 제거와 추가시 인덱스가 변화한다. 참조)DB의 WikiPedia:Primary_key 를 알아보자. ||
         #include <vector>
         using std::vector; using std::map;
         map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split)
          map<string, vector<int> > ret;
          vector<string> words = find_words(line);
          for (vector<string>::const_iterator it = words.begin();
          ret[*it].push_back(line_number); // ret[*it] == (it->second) = vector<int> 같은 표현이다.
          map<string, vector<int> > ret = xref(cin);
          for (map<string, vector<int> >::const_iterator it = ret.begin();
          vector<int>::const_iterator line_it = it->second.begin(); // it->second == vector<int> 동일 표현
          // second 값인 vector<int> 를 이용하여서 string이 나타난 각 줄의 번호를 출력한다.
          * '''map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split)'''
          || map<string, vector<int> >::const_iterator || K || V ||
          || pair || first = string || second = vector<int> ||
          상기에서는 map<string, vector<string> >의 형태로 구현해야한다. 그러나 <adjective>, <location>, <noun>과 같이 동일한 키 값에 대해서 규칙이 여러개가 존재하는 경우를 다루기 위해서 '''map <string, vector< vector<string> > >''' 의 타입을 이용한다.
         typedef vector<string> Rule;
         typedef vector<Rule> Rule_collection;
          vector<string> entry = split(line); // split 함수를 이용해서 입력된 문자열을 ' '를 기존으로 tokenize 한다.
  • AcceleratedC++/Chapter5 . . . . 32 matches
          * 여태까지 vector랑 string 갖고 잘 놀았다. 이제 이것들을 넘어서는 것을 살펴볼 것이다. 그러면서 라이브러리 사용법에 대해 더 깊게 이해하게 될것이다. 라이브러리는 자료구조?함수만을 제공해주는 것이 아니다. 튼튼한 아키텍쳐도 반영해준다. 마치 vector의 사용법을 알게 되면, 다른것도 쉽게 배울수 있는것처럼...
         vector<Student_info> extract_fails(vector<Student_info>& students)
          vector<Student_info> pass, fail;
          for(vector<Student_info>::size_type i = 0; i != students.size() ; ++i)
          * 참조로 넘어간 students의 점수를 모두 읽어들여서, 60 이하면 fail 벡터에, 아니면 pass 벡터에 넣은 다음, students 벡터를 pass벡터로 바꿔준다. 그리고 fail을 리턴해준다. 즉 students에는 f 아닌 학생만, 리턴된 vector에는 f 뜬 학생만 남아있게 되는 것이다. 뭔가 좀 삐리리하다. 더 쉬운 방법이 있을 듯하다.
         vector<Student_info> extract_fails(vector<Student_info>& students)
          vector<Student_info> fail;
          vector<Student_info>::size_type i = 0
         vector<Student_info> extract_fails(vector<Student_info>& students)
          vector<Student_info> fail;
          vector<Student_info>::size_type i = 0;
          vector<Student_info>::size_type size = students.size();
         for(vector<Student_info>::size_type i = 0 ; i != students.size() ; ++i)
         for(vector<Student_info>::const_iterator i = students.begin() ; i != students.end() ; ++i)
         vector<Students_Info> extract_fails(vector<Student_info>& students)
          vector<Student_info> fail;
          vector<Student_info>::iterator iter = students.begin();
         vector<Student_info>::iterator iter = students.begin(). end_iter = students.end();
          * 바로 list다. 중간 삽입과 삭제를 상수시간 내에 수행할수 있다. 이제 vector로 짠 코드를 list로 짠 코드로 바꿔보자. 바뀐게 별로 없다. vector가 list로 바뀐거 말고는... 다시 한번 말하지만 list는 임의 접근을 지원하지 않는다. 따라서 vector에서 쓰던것처럼 [] 쓰면 안된다.
          * 표를 보면 알겠지만, 파일 크기가 커질수록 vector의 요소 삽입, 삭제 시간은 비약적으로 증가한다. list는 별로 안 증가한다.
  • AcceleratedC++/Chapter4 . . . . 31 matches
          * 앞에서 우리는 vector에 들어가 있는 값에서 중간값 찾는 걸 했었다. Chapter8에서는 vector에 들어가 있는 type에 관계없이 작동하게 하는 법을 배울 것이다. 지금은 vector<double>로만 한정짓자. median 구하는 루틴을 함수로 빼보자.
         double median(vector<double> vec)
          typedef vector<double>::size_type vec_sz;
          throw domain_error("median of an empty vector.");
          * 여기서 살펴볼 게 몇가지 있다. 지난번에는 vector의 크기가 0이면 그냥 프로그램을 종료시켜버렸지만, 여기서는 예외처리라는 신기술을 사용했다. 이 방법은 여기서 끝내지 않고 다음 부분으로 넘어간다. <stdexcept>를 포함시켜 주면 된다.
          * 또한, 아까 함수 호출하면서 parameter로 넘겨줄때에는 그 값을 복사를 한다고 했다. 저렇게 함수를 호출함으로써, 원래 vector를 손상시키지 않고, 복사본 vector에서 sort를 해서 작업을 처리해 줄수가 있다. 비록 시간이 좀 더 걸리긴 하지만..
         double grade(double midterm, double final, const vector<double>& hw)
          * const vector<double>& hw : 이것을 우리는 double형 const vector로의 참조라고 부른다. reference라는 것은 어떠한 객체의 또다른 이름을 말한다. 또한 const를 씀으로써, 저 객체를 변경하지 않는다는 것을 보장해준다. 또한 우리는 reference를 씀으로써, 그 parameter를 복사하지 않는다. 즉 parameter가 커다란 객체일때, 그것을 복사함으로써 생기는 overhead를 없앨수 있는 것이다.
         vector<double> homework;
         vector<double>& hw = homework;
          * 이제 우리가 풀어야 할 문제는, 숙제의 등급을 vector로 읽어들이는 것이다. 여기에는 두가지의 문제점이 있다. 바로 리턴값이 두개여야 한다는 점이다. 하나는 읽어들인 등급들이고, 또 다른 하나는 그것이 성공했나 하는가이다. 하나의 대안이 있다. 바로 리턴하고자 하는 값을 리턴하지 말고, 그것을 reference로 넘겨서 변경해주는 법이다. const를 붙이지 않은 reference는 흔히 그 값을 변경할때 쓰인다. reference로 넘어가는 값을 변경해야 하므로 어떤 식(expression)이 reference로 넘어가면 안된다.(lvalue가 아니라고도 한다. lvalue란 임시적인 객체가 아닌 객체를 말한다.)
         istream& read_hw(istream& in, vector<double>& hw)
         istream& read_hw(istream& in, vector<double>& hw)
          * median 함수를 보면, vector<double> 파라메터가 참조로 넘어가지 않는다. 학생수가 많아질수록 매우 큰 객체가 될텐데 낭비가 아닌가? 하고 생각할수도 있지만, 어쩔수 없다. 함수 내부에서 소팅을 해버리기 때문에 참조로 넘기면, 컨테이너의 상태가 변해버린다.
          * grade 함수를 보면, vector는 const 참조로 넘기고, double은 그렇지 않다. int나 double같은 기본형은 크기가 작기 때문에, 그냥 복사로 넘겨도 충분히 빠르다. 뭐 값을 변경해야 할때라면 참조로 넘겨야겠지만... const 참조는 가장 일반적인 전달방식이다.
         #include <vector>
         double grade(double midterm, double final, const vector<double>& hw);
         double median(vector<double> vec);
         istream& read_hw(istream& in, vector<double>& hw);
          vector<double> homework;
  • AcceleratedC++/Chapter6 . . . . 30 matches
          * 5장에서 공부한 것 중에 주어진 string을 공백을 기준으로 잘라서, vector에다 넣은 다음 리턴해주는 함수가 있었다.(split) 이것을 좀 더 간단히 만들어보자. 앞의 것은 굉장히 알아보기 힘들게 되어있다.
         vector<string> split(const string& str)
          vector<string> ret;
         #include <vector>
         std::vector<std::string> find_urls(const std::string& s);
         #include <vector>
         using std::vector;
         vector<string> find_urls(const string& s)
          vector<string> ret;
          vector<Student_info> did, didnt;
         double median_anlysis(const vector<Strudent_info>& students)
          vector<double> grades;
         double median_anlysis(const vector<Strudent_info>& students)
          vector<double> grades;
          double analysis(const vector<Student_info>&),
          const vector<Student_infor>& did,
          const vector<Student_infor>& didnt)
          vector<Student_info> did, didnt;
         double average(const vector<double>& v)
         double average_analysis(const vector<Student_info>& students)
  • MedusaCppStudy/재동 . . . . 29 matches
         #include <vector>
         void showBoard(const vector< vector<int> >& board);
         bool isAllBoard(const vector< vector<int> >& board);
         void moveRoach(vector< vector<int> >& board, sRoach& roach);
         void inputRoachPosition(sRoach& roach, const vector< vector<int> >& board);
          vector< vector<int> > board(rows);
         void showBoard(const vector< vector<int> >& board)
         bool isAllBoard(const vector< vector<int> >& board)
         void moveRoach(vector< vector<int> >& board, sRoach& roach)
         void inputRoachPosition(sRoach& roach, const vector< vector<int> >& board)
         #include <vector>
         void showResult(const vector<sWord>& words);
         void checkInWords(vector<sWord>& words, const string& x);
         void addInWords(vector<sWord>& words, const string& x);
          vector<sWord> words;
         void showResult(const vector<sWord>& words)
          for(vector<sWord>::size_type i = 0; i < words.size(); i++)
         void checkInWords(vector<sWord>& words, const string& x)
          for(vector<sWord>::size_type i = 0; i < words.size(); i++)
         void addInWords(vector<sWord>& words, const string& x)
  • STL/vector/CookBook . . . . 29 matches
         #include <vector>
          * 몇 번 써본결과 vector를 가장 자주 쓰게 된다. vector만 배워 놓으면 list나 deque같은것은 똑같이 쓸수 있다. vector를 쓰기 위한 vector 헤더를 포함시켜줘야한다. STL을 쓸라면 #include <iostream.h> 이렇게 쓰면 귀찮다. 나중에 std::cout, std:vector 이런 삽질을 해줘야 한다. 이렇게 하기 싫으면 걍 쓰던대로 using namespace std 이거 써주자.
         #include <vector>
         typedef vector<int>::iterator VIIT; // Object형이라면 typedef vector<Object>::iterator VOIT;
          vector<int> v(&ar[0], &ar[10]);
          // Object형이라면 vector<Object> v(...);
          * typedef으로 시작하는 부분부터 보자. 일단 반복자라는 개념을 알아야 되는데, 사실은 나도 잘 모른다.--; 처음 배울땐 그냥 일종의 포인터라는 개념으로 보면 된다. vector<int>::iterator 하면 int형 vector에 저장되어 있는 값을 순회하기 위한 반복자이다. 비슷하게 vector<Object>>::iterator 하면 Object형 vector에 저장되어 있는 값을 순회하기 위한 반복자겠지 뭐--; 간단하게 줄여쓸라고 typedef해주는 것이다. 하기 싫으면 안해줘도 된다.--;
          * 다음엔 vector<int> v~~ 이부분을 보자. vector<T> 에는 생성자가 여럿 있다. 그 중의 하나로, 배열을 복사하는 생성자를 써보자. 그냥 쓰는법만 보자. 단순히 배열 복사하는 거다. C++ 공부했다면 성안당 10장인가 11장에 복사 생성자라고 나올것이다. 그거다.--; 그냥 2번 원소에서 5번원소까지 복사하고 싶다. 하면 vector<int> v(&ar[2], &ar[6]) 이렇게 하면 되겠지?(어째 좀 거만해 보인다.--;) 마지막은 개구간이라는걸 명심하기 바란다.
          * for 부분을 보면 앞에서 typedef 해준 VIIT 형으로 순회하고 있는것을 볼수 있다. vector<T>의 멤버에는 열라 많은 멤버함수가 있다. 그중에 begin() 은 맨 처음 위치를 가르키는 반복자를 리턴해준다. 당연히 end()는 맨 끝 위치를 가르키는 반복자를 리턴해주는 거라고 생각하겠지만 아니다.--; 정확하게는 '맨 끝위치를 가르키는 부분에서 한 칸 더간 반복자를 리턴'해주는 거다. 왜 그렇게 만들었는지는 나한테 묻지 말라. 아까 반복자는 포인터라고 생각하라 했다. 역시 그 포인터가 가르키는 값을 보려면 당연히 앞에 * 을 붙여야겠지.
          * 우리가 여태까지 배운 거만 써보면 이렇게 고칠수 있다. 그 유명-_-한 동적배열이다.--; 아.. delete [] 저거 보기 싫지 않은가? c와 c++의 고질적인 문제점이 바로 저거다. 메모리 관리를 프로그래머가 해줘야 한다는거.. 자바 같은건 지가 알아서 delete 해주지만.. c나 c++에서 delete 안해주면.. X되는 꼴을 볼수 있다. (본인이 한번 경험해 봤다.) 그래서 잘 디자인된 클래스는 클래스 내에서 알아서 없애줘야 한다. 바로 vector를 쓰면 저 짓을 안해줘도 된다. 또 고쳐보자.
         #include <vector>
          vector<int> ar(num);
          * vector<int>... 부분을 보면 또 다른 생성자가 보인다. 인자로 숫자 하나를 받는다. 그 만큼 동적 할당 해준다는 뜻이다. delete? 그딴거 안해줘도 된다. 프로그램 끝나면서 int형 벡터 ar이 소멸되면서 알아서 없애준다.
          * vector로 간단히 해결이 가능하다. See also ["RandomWalk2/Vector로2차원동적배열만들기"]
         #include <vector>
         typedef vector<Obj*>::iterator VOIT;
          vector<Obj*> v; // 포인터를 저장하는 vector
         ["STL/vector"]
  • AcceleratedC++/Chapter13 . . . . 23 matches
          std::vector<double> homework;
          std::vector<double>homework;
         #include <vector>
          std::vector<double> homework;
          vector<Core> students;
          for (vector<Core>::size_type i = 0; i != students.size(); ++i) {
          vector<Grad> students;
          for (vector<Grad>::size_type i = 0; i != students.size(); ++i) {
         || * 읽어들일 요소들을 저장하는 vector의 정의 [[HTML(<BR/>)]] * 레코드를 읽어들일 임시 지역 변수의 정의 [[HTML(<BR/>)]] * read 함수 [[HTML(<BR/>)]] * grade 함수 ||
          앞의 예에서처럼 vector<Core>의 컨테이너를 설정하게 되면 컨테이너 안에 저장되는 객체가 Core의 객체가 되므로 정적으로 바인딩된다. 이를 해결하기 위해서는 vector<Core*>를 통해서 객체를 동적으로 할당하고 관리하도록 하면, 서로 다른 타입의 객체를 저장하는 것도 가능하고 프로그램의 다른 부분에서 다형성의 이점을 이용하는 것도 가능하다.
          vector<Core*> students;
         #include <vector>
         using std::vector;
          vector<Core*> students; // store pointers, not objects
          for (vector<Core*>::size_type i = 0;
         #include <vector>
         #include <vector>
         using std::vector;
          vector<Student_info> students;
          for (vector<Student_info>::size_type i = 0;
  • EffectiveSTL/Container . . . . 21 matches
          * STL을 구성하는 핵심 요소에는 여러 가지가 있다.(Iterator, Generic Algorithm, Container 등등). 역시 가장 핵심적이고, 조금만 알아도 쓸수 있고, 편하게 쓸수 있는 것은 Container다. Container는 Vector, List, Deque 과 같이 데이터를 담는 그릇과 같은 Object라고 보면 된다.
          * Sequence Containers - vector, deque, list, string( vector<char> ) 등등
          * vector가 좋다고 써있다. 잘 쓰자. 가끔가다 시간,저장공간 등등에 있어서 Associative Containers를 압도할때도 있다고 한다.
          * vector 는 Sequence Container 니까 보통 Associative Container 들(주로 Map)보다 메모리낭비가 덜함. 그대신 하나 단위 검색을 할때에는 Associative Container 들이 더 빠른 경우가 있음. (예를 들어 전화번호들을 저장한 container 에서 024878113 을 찾는다면.? map 의 경우는 바로 해쉬함수를 이용, 한큐에 찾지만, Sequence Container 들의 경우 처음부터 순차적으로 좌악 검색하겠지.) --[1002]
         == vector, deque, list 고르는 팁 ==
          * vector는 무난하게 쓰고 싶을때
          * 전자에는 vector, string, deque 등이 있다. 뭔가 또 복잡한 말이 있긴 한데 그냥 넘어가자. 대충 insert, delete가 일어나면 기존의 원소가 이동한다는 말 같다.
          * Random Access Iterator(임의 접근 반복자)가 필요하다면, vector, deque, string 써야 한다. (rope란것도 있네), Bidirectional Iterator(양방향 반복자)가 필요하다면, slist는 쓰면 안된다.(당연하겠지) Hashed Containers 또 쓰지 말랜다.
          * Search 속도가 중요하다면 Hashed Containers, Sorted Vector, Associative Containers를 쓴다. (바로 인덱스로 접근, 상수 검색속도)
          ''STL Tutorial and Refereince 를 보면, 일부러 해당 Container 에게 최적화된 메소드들만 지원한다고 써있었던 기억. 예를 든다면, Vector 의 경우 push_front 같은 것이 없다. (만일 vector에 push_front 를 한다면? push_front 될때마다 매번 기존의 원소들 위치가 바뀐다.) --[1002]''
         vector<Type>::itarator // typedef vector<Type>::iterator VTIT 이런식으로 바꿀수 있다. 앞으로는 저렇게 길게 쓰지 않고도 VIIT 이렇게 쓸수 있다.
         vector<Widget> vw;
         vector<Widget*> vw;
         vector<Object> a,b;
         for(vector<Object>::const_itarator VWCI = a.begin() + a.size()/2 ; VWCI != a.end() ; ++VWCI)
         vector<Object> a,b;
         vector<Object> a,b;
         vector<Object*> v;
         for(vector<Object*>::iterator i = v.begin() ; i != v.end() ; ++i)
         vector<SPO> v;
  • STL/VectorCapacityAndReserve . . . . 21 matches
         ["STL/vector"] 의 capacity 와 reserve 함수의 예
         vector1에 100000 번의 입력 을 합니다.
         이제 vector2에 같은 입력을 합니다.
         #include <vector>
          int N = 100000; // vector에 입력될 자료의 size
          vector<U> vector1, vector2;
          cout << "vector1에 " << N << " 번의 입력 을 합니다. \n"
          vector<U>::size_type cap = vector1.capacity();
          vector1.push_back(U(k));
          if( vector1.capacity() != cap )
          << vector1.capacity() << "\n";
          vector2.reserve(N);
          cout << "\n이제 vector2에 같은 입력을 합니다.\n"
          vector<U>::size_type cap = vector2.capacity();
          vector2.push_back(U(k));
          if ( vector2.capacity() != cap )
          << vector2.capacity() << "\n";
  • AcceleratedC++/Chapter9 . . . . 19 matches
         || 클래스 타입 || string, vector, istream 등 기본언어를 가지고 구현된 타입 ||
          std::vector<double> homework;
         string, vector 와 같은 것들은 Student_info의 내부 구현시에 필요한 사항이기 때문에 Student_info를 사용하는 프로그램의 또다른 프로그래머에게까지 vector, string을 std::에 존재하는 것으로 쓰기를 강요하는 것은 옳지않다.
          std::vector<double> homework;
          std::vector<double> homework;
          std::vector<double> homework;
          std::vector<double> homework;
          std::vector<double> homework;
         #include <vector>
          std::vector<double> homework;
         #include <vector>
         using std::vector;
         // read homework grades from an input stream into a `vector<double>'
         istream& read_hw(istream& in, vector<double>& hw)
         #include <vector>
         using std::string; using std::vector;
          vector<Student_info> students;
          for (vector<Student_info>::size_type i = 0;
  • AcceleratedC++/Chapter3 . . . . 18 matches
         === 3.2.1. Storing a collection of data in a vector ===
          * vector란? - 주어진 타입의 값들의 모음을 가지고 있는 컨테이너이다. 확장요청이 있을때 커진다.
          * vector 사용하기
          vector<double> homework; // double값들을 저장할 vector
          * push_back : vector의 멤버 함수. vector의 끝에다 집어넣는 역할을 한다. 그러면서 벡터의 크기를 하나 증가시킨다.
          * size() 멤버 함수 : vector가 소지하고 있는 값들의 갯수를 리턴해준다.
         typedef vector<double>::size_type vec_sz;
          * typedef : vector<double>::size_type이라고 일일히 쳐주기엔 너무 길기 ㅤㄸㅒㅤ문에 vec_sz로 줄여쓴 것이다.
          * 또한 vector의 크기가 0이면 아무것도 안들어있다는 것이므로 중간값의 의미가 없다. 0일때 처리
          * etc : vector의 맨 처음 인덱스는 [0]이다. 마지막은 [size-1]
         #include <vector>
          vector<double> homework;
          // 원래 책에는 "typedef vector<double>::size_type vec_sz;" 이렇게 되어있지만
          * vector와 sort의 수행성능에 관해
          * vector에다 값을 새로 추가하는 데에는 Θ(n)의 시간이 걸린다.
         SeeAlso [STL/vector]
  • CPPStudy_2005_1/STL성적처리_1 . . . . 18 matches
         #include <vector>
          vector<int> subjects;
         void totalSum(vector<Student_info> &students);
         void totalAverage(vector<Student_info> &students);
         void sortBySum(vector<Student_info> &students);
         ostream& displayScores(ostream &out, const vector<Student_info> &students);
         istream& readScores(istream &in, ifstream &fin, vector<Student_info> &students);
          vector<Student_info> students;
         void totalSum(vector<Student_info> &students)
          vector<int> sum;
         void totalAverage(vector<Student_info> &students)
          vector<double> averageScore;
         void sortBySum(vector<Student_info> &students)
         ostream& displayScores(ostream &out, const vector<Student_info> &students)
          for(vector<Student_info>::const_iterator it = students.begin() ; it!=students.end();++it)
         istream& readScores(istream &in, ifstream &fin, vector<Student_info> &students)
          vector<string> subject;
          for(vector<string>::const_iterator it = subject.begin() ;
  • CPPStudy_2005_1/STL성적처리_2 . . . . 18 matches
         #include <vector>
         vector<string> tokenize(const string& line);
         bool save_map(vector<string>&, map< string, vector<int> >&);
         double total(const vector<int>&);
          const map< string, vector<int> >,
          double accu(const vector<int>&) = total);
          vector<string> token;
          map< string, vector<int> > grades;
         vector<string> tokenize(const string& line) {
          vector<string> ret;
         bool save_map(vector<string>& input, map< string, vector<int> >& grades) {
         double total(const vector<int>& grades) {
          const map< string, vector<int> > record,
          double accu(const vector<int>&)) {
          for(map< string, vector<int> >::const_iterator iter = record.begin();
          for(vector<int>::const_iterator grades = (iter->second).begin();
  • CollectionParameter . . . . 17 matches
         vector<People> marriedMenAndUnmarriedWomen()
          vector<People> result;
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
         vector<People> marriedMen()
          vector<People> result;
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
         vector<People> unmarriedMen()
          vector<People> result;
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
         vector<People> marriedMenAndUnmarriedWomen()
         vector<People> marriedMenAndUnmarriedWomen()
          vector<People> result;
         void addMarriedMen(vector<People>& aCollection)
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
         void addUnmarriedMen(vector<People>& aCollection)
          for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
  • AcceleratedC++/Chapter11 . . . . 16 matches
         이장에서는 STL vector클래스의 약식 버전을 만들어 보면서 일반적인 형태의 자료형을 만드는 방식을 익힌다.
         //vector 생성
         vector<Student_info> vs;
         vector<double> v(100);
         //vector가 사용하는 타입의 이르을 얻는다.
         vector<Student_info>::const_iterator b, e;
         vector<Student_info>::size_type i = 0;
         //vector의 각요소를 살펴보기 위해, size 및 index 연산자를 사용
         이상의 것들이 이장에서 구현할 vector 의 clone 버전인 Vec 클래스를 구현할 메소드들이다.
          // 표준 vector 클래스는 크기와 함께 초기화 요소를 인자로 받는 생성자도 제공한다.
         vector<int> vi;
         vector<string> words = split(words); // copy constructor work
         vector<Student_info> vs;
         vector<Student_info> v2 = vs; // copy constructor work (from vs to v2)
         vector<string> split(const string&);
         vector<string> v;
  • STL/vector . . . . 16 matches
         == vector ==
          * include : vector
         #include <vector>
         vector<int> ar; // int형 데이터를 넣을 vector 컨테이너 ar을 생성.
         vector<int>::iterator iter; // 내부의 데이터들을 순회하기 위해 필요한 반복자.
         vector<int>::const_iterator i; // 벡터의 내용을 변경하지 않을 것임을 보장하는 반복자.
         vector<int> ar(&data[0], &data[3]); // data내의 정보가 세팅된다.
          질문 : 상식에 의거해서 실습 해볼 때 저 부분을 {{{~cpp vector<int> ar( &data[0], &data[2] ); }}} 로 했더니 계속 문제가 생겨서.. 오랜 삽질끝에 &data[3] 으로 해야한다는 걸 발견 했습니다. 좀 이상한 것 같네요. {{{~cpp data[3]}}} 이라는 것은 배열의 범위를 벗어나는 연산일텐데요.. 그곳의 리퍼런스를 얻어서 생성자로 넘겨주는게.. 상식에서 거부했나 봅니다. 두번째 인자로 배열 범위를 벗어나는 값을 받는 이유를 혹시 아시는 분 계십니까? --zennith
         vector<int>::const_iterator i;
         vector<int>::iterator start, end;
          * ["STL/vector/CookBook"]
         #include <vector>
         typedef vector<int> vecCont;
          m_inputMessage.~vector<CString>();
          new ( &m_inputMessage ) vector<CString>();
         See Also ["STL/VectorCapacityAndReserve"]
  • CPPStudy_2005_1/STL성적처리_1_class . . . . 15 matches
         #include <vector>
          vector<int> m_subjects;
          vector<int> getSubjectScore() {return m_subjects;};
         #include <vector>
          vector<Student> &m_students;
         ScoreProcess(ifstream &fin,vector<Student> &students);
         #include <vector>
         ScoreProcess::ScoreProcess(ifstream &fin,vector<Student> &students) : m_fin(fin),m_students(students)
          vector<string> subject;
          for(vector<string>::const_iterator it = subject.begin() ;
          for(vector<Student>::iterator it = m_students.begin() ; it!=m_students.end();++it)
          vector<int>scores = it->getSubjectScore();
          for(vector<int>::const_iterator it2 = scores.begin();it2!=scores.end();++it2)
         #include <vector>
          vector<Student> students;
  • ScheduledWalk/석천 . . . . 15 matches
          GetMoveVector();
         void GetMoveVector() {
          void GetMoveVector();
         GetMoveVector 에 대해 구현합니다.
          testGetMoveVector();
          GetMoveVector(journey, currnetPosition);
         IntPair GetMoveVector(char* journey, int currentPosition) {
          IntPair moveVector;
          // vector - row move vector, col move vector.
          int MOVE_VECTOR_PAIR_ROW[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
          int MOVE_VECTOR_PAIR_COL[8] = { 0, 1, 1, 1, 0, -1, -1, -1};
          int moveVectorPairIndex = journey[currentPosition] - '0';
          moveVector.n1 = MOVE_VECTOR_PAIR_ROW[moveVectorPairIndex];
          moveVector.n2 = MOVE_VECTOR_PAIR_COL[moveVectorPairIndex];
          return moveVector;
         void testGetMoveVector() {
          IntPair nextMoveVector;
          nextMoveVector = GetMoveVector(journey, 0);
          assert (nextMoveVector.n1 == 0);
          assert (nextMoveVector.n2 == 1);
  • 데블스캠프2013/셋째날/머신러닝 . . . . 15 matches
         #include <vector>
         std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
         std::vector<std::string> split(const std::string &s, char delim) {
          std::vector<std::string> elems;
          vector<string> firstDataList = split(firstData, ',');
          vector<string> secondDataList = split(secondData, ',');
          vector<string> trainDataList = vector<string>();
          vector<string> trainClassList = vector<string>();
          vector<string> testDataList = vector<string>();
          vector<string> testClass = vector<string>();
  • AcceleratedC++/Chapter10 . . . . 14 matches
         지금까지는 vector, string등 STL이 기본적으로 제공하는 자료구조를 통해서 프로그래밍을 하였다.
         배열(array) vector와 유사하지만 vector만큼 편리하지는 않다.
          double analysis(const std::vector<Student_info>&),
          const std::vector<Student_info>& did,
          const std::vector<Student_info>& didnt);
          {{{~cpp double analysis(const std::vector<Student_info>&)
          {{{~cpp double (*analysis)(const std::vector<Student_info>&)
         typedef double (*analysis_fp)(const vector<Student_info>&);
         double (*get_analysis_ptr()) (const vector<Student_info>&);
          상기의 코드에서 프로그래머가 원한 기능은 get_analysis_ptr()을 호출하면 그 결과를 역참조하여서 const vector<Student_info>&를 인자로 갖고 double 형을 리턴하는 함수를 얻는 것입니다.
         vector<int>::iterator i = find_if(v.begin(), v.end(), is_negative); // &is_negative 를 사용하지 않는 이유는 자동형변환으로 포인터형으로 변환되기 때문임.
         vector<double> v;
          포인터는 임의 접근 반복자이다. 따라서 vector와 같이 임의 접근이 된다.
  • BigBang . . . . 14 matches
          * stl vector를 이용한 class vector 만들기
          * vector(메모리가 연속적인 (동적) 배열), string, deque(double ended queue, 덱이라고도 한다. [http://www.cplusplus.com/reference/deque/deque/ 참고]), list(linked-list)
          * vector<bool>은 일반적인 vector 연산이 불가능한데, 이걸 해결하기 위해 bitset을 이용한다.
          * string과 vector<char> -> 참조 카운팅을 안 하기 때문에, vector로 쓸 경우 더 빠를 수 있다.
          * list는 보장됨. vector는 보장되지 않음
          * vector의 삽입, 삭제가 일어날 때, 전체 배열 크기가 제한 크기(1024)를 넘어갈 경우, 2배 크기의 배열을 만들게 되는데, 이 때 각각에 해당하는 포인터가 전부 바뀌게 되므로 '무효화' 되는 것이다.
          vector <widget *> ar;
          vector v;
          * vector의 swap
          * vector의 reserve
          * vector의 resize
  • EightQueenProblem/강인수 . . . . 14 matches
         #include <vector>
         bool isCorrectChecker(vector<int>& ar)
         vector< vector<int> > getCorrectChecker(vector<int>& ar)
          vector< vector<int> > ret;
         void showResult(vector< vector<int> >& result)
         vector<int> getDatas()
          vector<int> ret(N);
          vector<int> ar = getDatas();
          vector< vector<int> > result = getCorrectChecker(ar);
  • [Lovely]boy^_^/[Lovely]boy^_^/USACO/Barn . . . . 14 matches
         #include <vector>
         vector<int> getDistance(const vector<int>& ar)
          vector<int> ret( ar.size() - 1 );
         vector<int> getPivot(int numPivot, const vector<int>& distance)
          vector<int> ret(distance);
         vector<int> getDatas(int& numPivot)
          vector<int> ar(iter);
         int getTotal(int numPivot, const vector<int>& ar, const vector<int>& pivots)
          vector<int> data = getDatas(numPivot);
          vector<int> distance = getDistance(data);
          vector<int> pivots = getPivot(numPivot, distance);
  • 2002년도ACM문제샘플풀이/문제E . . . . 13 matches
         #include <vector>
         int doJob(vector<int>& weights);
         int getMin(vector<int>& weights, vector<int>& sortedWeights);
         bool isSamePos(vector<int>& weights, vector<int>& sortedWeights, int nth);
          vector<int> weights;
         int doJob(vector<int>& weights)
          vector<int> sortedWeights(weights);
         int getMin(vector<int>& weights, vector<int>& sortedWeights)
         bool isSamePos(vector<int>& weights, vector<int>& sortedWeights, int nth)
  • Boost/SmartPointer . . . . 13 matches
         typedef vector<Vertex3DSPtr> Vertexs; // 단어 틀렸다는거 알지만 그냥 씀 -_-
         #include <vector>
         // accessed both by occurrence (std::vector)
          std::vector<FooPtr> foo_vector;
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          std::cout << "foo_vector:\n";
          std::for_each( foo_vector.begin(), foo_vector.end(), FooPtrOps() );
         // foo_vector:
  • BoostLibrary/SmartPointer . . . . 13 matches
         typedef vector<Vertex3DSPtr> Vertexs; // 단어 틀렸다는거 알지만 그냥 씀 -_-
         #include <vector>
         // accessed both by occurrence (std::vector)
          std::vector<FooPtr> foo_vector;
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          foo_vector.push_back( foo_ptr );
          std::cout << "foo_vector:\n";
          std::for_each( foo_vector.begin(), foo_vector.end(), FooPtrOps() );
         // foo_vector:
  • MineSweeper/신재동 . . . . 13 matches
         #include <vector>
         void initializeBoard(int maxRow, int maxCol, vector< vector<int> >& board)
         bool isInBoard(int row, int col, int moveRow, int moveCol, const vector< vector<int> >& board)
         void checkMine(int row, int col, vector< vector<int> >& board)
         void setMinesOnBoard(vector< vector<int> >& board)
         void showBoard(const vector< vector<int> >& board)
          vector< vector<int> > board;
  • 보드카페 관리 프로그램/강석우 . . . . 13 matches
         #include <VECTOR>
         void input(board& bg, vector<board>& vec);
         void in(board& bg, vector<board>& vec);
         void play(board& bg, vector<board>& vec);
         void buy(board& bg, vector<board>& vec);
         void out(board& bg, vector<board>& vec);
         int price(vector<board>& vec, int hour, int minute, const int& i);
          vector<board> vec;
         void input(board& bg, vector<board>& vec)
         void in(board& bg, vector<board>& vec)
         void play(board& bg, vector<board>& vec)
         void buy(board&bg, vector<board>& vec)
         void out(board& bg, vector<board>& vec)
         int price(vector<board>& vec, int hour, int minute, const int& i)
  • C 스터디_2005여름/학점계산프로그램/김태훈김상섭 . . . . 12 matches
         #include <vector>
          Score(string n, vector<double> s)
          void setscore(vector<double> s)
          for(vector<double>::iterator i=score.begin();i !=score.end();++i)
          vector<double> getscore() { return score;}
          vector<double> score;
         #include <vector>
         void getdata(vector<Score>& ban,const char* filename);
          vector<Score> ban;
          for(vector<Score>::iterator i=ban.begin();i!=ban.begin()+ban.size()/10;++i)
         void getdata(vector<Score>& ban,const char* filename){
          vector<double> scoretmp;
  • CPPStudy_2005_1/STL성적처리_4 . . . . 12 matches
         #include <vector>
          vector<int> score;
         void input_score(vector<Student_info> & students);
         void calculate_total_score(vector<Student_info> & students);
         void print_students(vector<Student_info> & students);
          vector<Student_info> students;
         void input_score(vector<Student_info> & students)
         void calculate_total_score(vector<Student_info> & students)
          typedef vector<Student_info>::iterator iter;
         void print_students(vector<Student_info> & students)
          typedef vector<Student_info>::iterator si_iter;
          typedef vector<int>::iterator int_iter;
  • FromDuskTillDawn/조현태 . . . . 12 matches
          참고 : 나름대로 약간의 최적화가 되어있다. 그러나~ vector가 아닌 list를 사용한다면 좀더 효과적일듯하다.ㅎ 이런 귀차니즘~
         #include <vector>
          vector<STown*> nextTown;
          vector<int> startTime;
          vector<int> timeDelay;
         vector<STown*> g_myTowns;
          vector< vector<STown*> > allSuchList;
          vector<int> allDelay;
          vector<STown*> newTown;
          vector<STown*> suchTownList = allSuchList[0];
          vector<STown*> bufferSTown = allSuchList[minimumDelayPoint];
  • 벡터/임민수 . . . . 12 matches
         #include <vector>
          vector<student> vector1;
          vector1.push_back(students[i]);
          sort(vector1.begin(), vector1.end(), comp_score);
          cout << vector1[i].score << endl ;
          sort(vector1.begin(), vector1.end(), comp_name);
          for(vector<student>::iterator j=vector1.begin(); j<vector1.end(); j++)
  • CPPStudy_2005_1/STL성적처리_3 . . . . 11 matches
         #include <vector>
          vector<int> score;
         void readdata(vector<student_type>& ztable); //파일로부터 데이터를 읽어온다
         void printdata(vector<student_type>& ztable); //출력
         void operation(vector<student_type>& ztable); //총합과 평균
          vector<student_type> ztable;
         void readdata(vector<student_type>& ztable){
         void printdata(vector<student_type>& ztable)
          for(vector<student_type>::iterator i=ztable.begin();i<ztable.end();++i)
         void operation(vector<student_type>& ztable)
          for(vector<student_type>::iterator i=ztable.begin() ;i<ztable.end();++i)
  • Robbery/조현태 . . . . 11 matches
         #include <vector>
         vector< vector< vector<int> > > g_cityMap;
         vector< vector<POINT> > g_canMovePoints;
         vector<int> g_saveMessageTime;
         vector< vector<POINT> > g_maxPoints;
         void MoveNextPoint(POINT nowPoint, POINT targetPoint, int nowTime, int targetTime, vector<POINT>& movedPoint)
          vector<POINT> movedPoint;
  • TowerOfCubes/조현태 . . . . 11 matches
         #include <vector>
         const char* AddBox(const char* readData, vector<SMyBox*>& myBoxs)
         void SuchNextBox(vector<SMyBox*>& myBoxs, int boxNumber, int lastColor, vector<SBoxBlock>& myBoxStack, vector<SBoxBlock>& bestHeight)
          vector<int> suchFaceList;
         void ShowBoxStack(vector<SBoxBlock>& showStack)
         void FreeMemory(vector<SMyBox*>& myBoxs)
          vector<SMyBox*> myBoxs;
          vector<SBoxBlock> myBoxStack;
          vector<SBoxBlock> bestStack;
  • 3DGraphicsFoundation/MathLibraryTemplateExample . . . . 10 matches
         void matrixMultiplyVector (matrix_t m, vec3_t v);
         void matrixMultiplyVector2 (matrix_t m, vec3_t v);
         void matrixMultiplyVector3 (matrix_t m, vec3_t v);
         // vector prototypes
         void vectorClear (vec3_t a);
         void vectorCopy (vec3_t a, vec3_t b);
         void vectorCrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
         vec_t vectorDot (vec3_t v1, vec3_t v2);
         void vectorSubtract (vec3_t va, vec3_t vb, vec3_t out);
         void vectorAdd (vec3_t va, vec3_t vb, vec3_t out);
         vec_t vectorNormalize (vec3_t in, vec3_t out);
         void vectorScaleV (vec3_t a, vec3_t s);
         void vectorScale (vec3_t v, vec_t scale);
  • AcceleratedC++/Chapter8 . . . . 10 matches
         #include <vector>
         using std::vector;
         T median(vector<T> v)
          typedef typename vector<T>::size_type vec_sz; // typename에 대해서 알자
          throw domain_error("median of an empty vector");
          typename 은 아직 인스턴스화 되지 않은 함수를 컴파일러가 읽어들일때 타입 매개변수와 관계된 타입의 형을 생성할때 앞에 붙여야 하는 키워드 임. ex) vector<T> or vector<T>::size_type
          예를 들자면 find(B, E, D)같은 함수의 경우 ''아주 단순한 제한적 연산만을 이용''하기 때문에 대부분의 컨테이너에 대해서 사용이 가능하다. 그러나 sort(B, E)같은 경우에는 ''기본적인 사칙연산들을 반복자에 대해서 사용''하기 때문에 이런 연산을 지원하는 string, vector 만이 완벽하게 지원된다.
          임의 접근 반복자르 이용하는 알고리즘은 sort. vector, string 만이 임의 접근 반복자를 지원한다. list는 빠른 데이터의 삽입, 삭제에 최적화 되었기 때문에 순차적인 접근만 가능함.
         vector<int> v;
  • CodeRace/20060105/도현승한 . . . . 10 matches
         #include <vector>
         void showStrVec(vector<string>& aVec)
          for(vector<string>::iterator iter = aVec.begin(); iter!=aVec.end(); iter++)
         void showLeoVec(vector<leonardong>& aVec)
          for(vector<string>::iterator iter = aVec.begin(); iter!=aVec.end(); iter++)
         int findWord(vector<leonardong>& findVec, string str)
         void inputVec(vector<string>& aVec1, vector<leonardong>& aVec2){
          vector<string> totalInput;
          vector<leonardong> noDupInput;
  • MedusaCppStudy/세람 . . . . 10 matches
         #include <vector>
         using std::vector;
          vector<int> number;
         #include <vector>
         using std::vector;
          vector<int> nums;
         #include <vector>
         using std::vector;
          vector< vector<int> > board(size);
  • MedusaCppStudy/신애 . . . . 10 matches
         #include <vector>
         using std::vector;
          vector<int> number;
         #include <vector>
         using std::vector;
          vector<int> english;
         #include <vector>
         using std::vector;
          vector< vector <int> > board(num);
  • RandomWalk/임인택 . . . . 10 matches
         #include <vector>
         vector<vector<int> > board;
          // initizlize the vector
          vector<vector<int> >::iterator iter;
         #include <vector>
         typedef vector<vector<int> > Board;
          vector<int>::iterator iterY;
  • 화성남자금성여자 . . . . 10 matches
         void matrixMultiplyVector (matrix_t m, vec3_t v);
         void matrixMultiplyVector2 (matrix_t m, vec3_t v);
         void matrixMultiplyVector3 (matrix_t m, vec3_t v);
         // vector prototypes
         void vectorClear (vec3_t a);
         void vectorCopy (vec3_t a, vec3_t b);
         void vectorCrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
         vec_t vectorDot (vec3_t v1, vec3_t v2);
         void vectorSubtract (vec3_t va, vec3_t vb, vec3_t out);
         void vectorAdd (vec3_t va, vec3_t vb, vec3_t out);
         vec_t vectorNormalize (vec3_t in, vec3_t out);
         void vectorScaleV (vec3_t a, vec3_t s);
         void vectorScale (vec3_t v, vec_t scale);
  • Map연습문제/임민수 . . . . 9 matches
         #include <vector>
          vector< map<char, char> > vector_map;
          vector_map.push_back(rule1);
          vector_map.push_back(rule2);
          vector_map.push_back(rule3);
          for(vector< map<char, char> >::iterator j = vector_map.begin(); j<vector_map.end(); j++)
  • TheGrandDinner/조현태 . . . . 9 matches
         #include <vector>
         char* InputBaseData(char* readData, vector<SNumberAndPosition>& tableSize, vector<SNumberAndPosition>& teamSize)
         void CalculateAndPrintResult(vector<SNumberAndPosition>& tableSize, vector<SNumberAndPosition>& teamSize)
          vector< vector<int> > teamTableNumber;
          vector<SNumberAndPosition> teamSize;
          vector<SNumberAndPosition> tableSize;
  • VendingMachine/세연/1002 . . . . 9 matches
         #include <vector>
          vector <Drink*> drinks;
          vector <int> validMoney;
          vector<int> getValidMoneyTypes(void) {
          vector<Drink*> getRegisteredDrinks () {
          vector<int> validMoney = vendingMachine.getValidMoneyTypes();
          vector <Drink*> drinks = vendingMachine.getRegisteredDrinks();
          vector<Drink*> drinks = vendingMachine.getRegisteredDrinks();
          vector<int> validMoney = vendingMachine.getValidMoneyTypes();
  • 2002년도ACM문제샘플풀이/문제D . . . . 8 matches
         #include <vector>
         bool IsDividable(vector<int>& weights, int diff);
         int GetMax(vector<int>& weights, int diff);
         int GetMin(vector<int>& weights, int diff);
          vector<int> weights;
         bool IsDividable(vector<int>& weights, int diff)
         int GetMax(vector<int>& weights, int diff)
         int GetMin(vector<int>& weights, int diff)
  • TheGrandDinner/김상섭 . . . . 8 matches
         #include <vector>
          vector<int> tableNum;
         vector<table> test_table;
         vector<team> test_team;
         #include <vector>
          vector<int> tableNum;
         vector<table> test_table;
         vector<team> test_team;
  • CPPStudy_2005_1/STL성적처리_3_class . . . . 7 matches
         #include <vector>
          vector<student_table>::iterator zbegin() { return ztable.begin(); }
          vector<student_table>::iterator zend() { return ztable.end(); }
          vector<int> score;
          vector<student_table> ztable;
          for(vector<student_table>::iterator i=ztable.begin();i<ztable.end();++i)
          for(vector<student_table>::iterator i=ztable.begin() ;i<ztable.end();++i)
  • EffectiveSTL/Iterator . . . . 7 matches
         Iter i( const_cast<Iter>(ci) ) // 역시 안된다. vector와 string에서는 될지도 모르지만... 별루 추천하지는 않는것 같다.
          * string, vector가 될수도 있는 이유
          * vector<T>::iterator는 T*의 typedef, vector<T>::const_iterator는 const T*의 typedef이다. (클래스가 아니다.)
         vector<int> v;
         typedef vector<int>::reverse_iterator VIRI;
         typedef vector<int>::iterator VIIT;
  • EffectiveSTL/VectorAndString . . . . 7 matches
          * 가장 많이 쓰는 vector, string에 관련된 팁 모음이다. 큰1장 후반부에는 모르는 내용(할당기 같은..)이 좀 많아서 일단 건너 뛰었다.
         = Item13. Prefer vector and string to dynamically allocated arrays. =
         == vector/string 을 쓰면 좋은 이유 ==
         == vector/string의 메모리가 필요할때 더 커가는 과정 ==
          * vector에서 만약 현재 capacity보다 n이 작다면? - 쌩깐다.
         = Item16. Know how to pass vector and string data to legacy APIS =
         = Item18. Avoid using vector<bool>. =
  • MineSweeper/문보창 . . . . 7 matches
         #include <vector>
         bool inMine(vector<int> & mine, int & nField, int * size);
         void mineSweep(vector<int> & mine, int & nField, int * size);
          vector<int> mine; // 입력을 저장할 벡터
         bool inMine(vector<int> & mine, int & nField, int * size)
         void mineSweep(vector<int> & mine, int & nField, int * size)
          vector<int>::iterator pr = mine.begin();
  • RandomWalk2/Vector로2차원동적배열만들기 . . . . 7 matches
         ["STL/vector/CookBook"] 의 내용과 통합해야 합니다.
         vector 좀 들여다 보다가 대충 만들어봤습니다. 고칠거 있으면 마음-_-껏 고쳐 주세요. 행이랑 열 입력 받아서 모두 0으로 초기화하는겁니다
         #include <vector>
         vector< vector<int> > ar; // 반드시 공백 줘야 한다! 안주면 에러난다.
          * Bjarne Stroustrup on Multidimensional Array [http://www.research.att.com/~bs/array34.c 1], [http://www.research.att.com/~bs/vector35.c 2]
          * array보다 vector를 먼저 가르치는 대표적인 책으로 "진정한 C++"을 가르친다는 평가를 받고 있는Seminar:AcceleratedCPlusPlus
  • [Lovely]boy^_^/USACO/MixingMilk . . . . 7 matches
         #include <vector>
         void InputInitData(int& suf, int& numf, map<int,int>& data, vector<int>& numlist);
         int Process(int& suf, int& numf, map<int,int>& data, vector<int>& numlist);
         void OutputData(int& numf, map<int,int>& data, vector<int>& numlist);
          vector<int> numlist;
         void InputInitData(int& suf, int& numf, map<int,int>& data, vector<int>& numlist)
         int Process(int& suf, int& numf, map<int,int>& data, vector<int>& numlist)
  • AcceleratedC++/Chapter14 . . . . 6 matches
         #include <vector>
         using std::vector;
          vector< Handle<Core> > students; // changed type
          for (vector< Handle<Core> >::size_type i = 0;
          // store a `Ptr' to a `vector'
          이 구현을 위해서는 Vec::clone()가 정의되어 있어야하지만, 이 함수를 정의하게 될 경우 원래 Vec의 구현이 표준 함수 vector의 구현의 부분이라는 가정에서 위배되기 때문에 추가할 수는 없다.
  • CPP_Study_2005_1/BasicBusSimulation/남상협 . . . . 6 matches
         #include <vector>
         #include <vector>
          vector<Bus> m_buses;
         #include <vector>
          for(vector<Bus>::iterator it=m_buses.begin(); it!=m_buses.end(); ++it)
          for(vector<Bus>::iterator it=m_buses.begin(); it!=m_buses.end(); ++it)
  • CuttingSticks/김상섭 . . . . 6 matches
         #include <vector>
          vector< vector<int> > Data;
          vector<int> temp;
          for(vector< vector<int> >::iterator k = Data.begin(); k != Data.end(); k++)
  • Java/문서/참조 . . . . 6 matches
         참조형은 백터(vector) 형.
         안되는 이유는 아까 언급한 바와 같이 클래스는 vector값이기 때문이다.
         에서 _a는 vector 값이다. 이 값은 한국말로 쉽게 표현하자면 방향값,화살표 이다.
         Java에서는 vector를 초기화 시켜 주기때문에, 객체가 없이 그냥 저렇게만 입력하면 null을 가리킨다.
         A _a = new A(); //vector값 _a에게 가리킬 객체를 부여
          그래서 mutable한 String처리를 위해서 Java 1.2에서 등장한것이 StringBuffer 이고 이것은 vector값으로
  • subsequence/권영기 . . . . 6 matches
         #include<vector>
         vector <int> e, sum;
         #include<vector>
         vector <int> laundry;
         #include<vector>
         vector <int> barn;
  • whiteblue/파일읽어오기 . . . . 6 matches
         #include <vector>
          vector <UserInfo *> userinfo;
          vector <BookInfo *> bookinfo;
          vector <int> nT;
          vector <int> nT2;
          그거 대신 STL을 썼죠.. vector 도 linked list 로 되어있잖아요^^;; -- 상욱(["whiteblue"])
  • 2002년도ACM문제샘플풀이/문제A . . . . 5 matches
         #include <vector>
          vector<Point> intersections;
         #include <vector>
         vector< DataSet > datas;
          vector<DataSet>::iterator iter;
  • ChocolateChipCookies/조현태 . . . . 5 matches
         #include <vector>
         vector<SMyPoint> g_points;
         vector< vector<SMyPoint> > g_hitPoints;
          vector<SMyPoint> temp;
  • D3D . . . . 5 matches
         vector(3D 공간상의 점이 있는 일정한 거리)의 크기 (magnitude)를 구하는 공식은 [[BR]]
         // vector
         float이나 double이 나타낼수 있는 부동소수점의 한계로 인해 vector끼리 동등한지 아닌지를 잘 처리하지 못한다.[[BR]]
          // creature에서 obstacle까지의 vector
          // this is the vector pointing away from the obstacle ??
  • IsBiggerSmarter?/문보창 . . . . 5 matches
         #include <vector>
          vector<int> v_temp;
          vector<int> result;
         #include <vector>
         vector <int> result;
  • [Lovely]boy^_^/3DLibrary . . . . 5 matches
         #include <vector>
         class Vector;
          vector< vector<float> > _mat;
          Vector operator * (const Vector& v) const;
         class Vector
          vector<float> _vec;
          Vector(float n1, float n2, float n3);
          Vector(const Vector& v);
          Vector();
          float operator * (const Vector& v) const;
          Vector operator * (float n) const;
          Vector operator ^ (const Vector& v) const;
          Vector operator - () const;
          Vector operator + (const Vector& v) const;
          Vector operator - (const Vector& v) const;
          Vector Normalize() const;
          friend ostream& operator << (ostream& os, const Vector& v);
          friend Vector operator * (float n, const Vector& v);
          vector<float> GetMem() const { return _vec; }
         Vector Matrix::operator * (const Vector& v) const
  • erunc0/PhysicsForGameDevelopment . . . . 5 matches
         === About Vector ===
          * vector 가 물리와 연관이 있을까? 당근 있다..
          * 왜냐 하면. 거의 모든.. 물리의 개념을 도입하여 vector 를 샤브샤브 하여.. 구현하기 때문이다.
          * 가속도, 힘, 지랄맞은 공식을 거의다가 vector 연산을 통해 엄청 느리게 느리게 돌아 간다. (pda 에서.. -_-;;)
          * vector 로 거리를 잰후 한점을 따라 다니게 하는 아주 간단 하고도 엄청나게 많이 써먹을 수 있는 걸.. 짯다..
          * 엇차.. 하고싶은 말은.. vector 를 잘 써먹자.. -_-;
  • AustralianVoting/Leonardong . . . . 4 matches
         #include <vector>
         #define IntVector vector<int>
         #define CandidatorVector vector<Candidator>
         #define VoteSheetVector vector<VoteSheet>
          IntVector candidateNum;
         void collectVoting( CandidatorVector & candidators, const VoteSheetVector & sheets )
         void markFall( CandidatorVector & candidators, const int limit )
         int minVotedNum( const CandidatorVector & candidators )
         bool isUnionWin( const CandidatorVector & candidators )
         int countRemainCandidators( const CandidatorVector & candidators )
         bool isSomeoneWin( const CandidatorVector & candidators )
          CandidatorVector candidators;
          VoteSheetVector sheets;
  • CPPStudy_2005_1/질문 . . . . 4 matches
         #include <vector>
         using std::setprecision; using std::vector;
          vector<double> homework;
          typedef vector<double>::size_type vec_sz; // 요기 에러1
  • Code/RPGMaker . . . . 4 matches
         import javax.vecmath.Vector2f;
          public RMFillBox(Vector2f vStart, Vector2f vEnd, Color color)
         import javax.vecmath.Vector2f;
         import javax.vecmath.Vector3f;
          private static final Vector3f vectorZ = new Vector3f(0, 0, -1);
          public RMLine(Vector2f vStart, Vector2f vEnd, float width, Color color)
          Vector3f v3Start = new Vector3f(vStart.x, vStart.y, z);
          Vector3f v3End = new Vector3f(vEnd.x, vEnd.y, z);
          // line vector
          Vector3f lineVector = new Vector3f();
          lineVector.sub(v3End, v3Start);
          // calc normal vector of line
          Vector3f normal = new Vector3f();
          normal.cross(lineVector, vectorZ);
          SimpleVector curPosition = m_polygon.getTransformedCenter();
          SimpleVector toCam = MainRenderer.getCamera().getPosition().calcSub(curPosition);
  • MedusaCppStudy . . . . 4 matches
         #include <vector>
         using std::vector;
          vector< vector<int> > board(size);
  • STL/sort . . . . 4 matches
         #include <vector>
         typedef vector<int>::iterator VIIT;
          vector<int> v(&ar[0], &ar[10]);
          * 한가지 주의할점. 이 sort알고리즘은 컨테이너가 임의 접근(Random Access)을 허용한다는 가정하에 만든것이다. vector나 deque처럼 임의 접근을 허용하는 컨테이너는 이걸 쓸수 있지만. list는 임의 접근이 불가능해서 사용할수 없다. -l[5] 이런 접근이 안된다는 의미 - 따라서 list에서는 컨테이너 내부에서 sort메소드를 제공해 준다.
  • Steps/조현태 . . . . 4 matches
         #include <vector>
         int GetNumbersSize(vector<int>& initNumbers)
          vector<int> makedNumbers;
          vector<int> initNumbers;
  • SuperMarket/인수 . . . . 4 matches
         #include <vector>
          vector<Goods> _havingGoods;
          const vector<Goods>& getGoods() const
          vector<Packages> _buyedGoods;
  • VonNeumannAirport/인수 . . . . 4 matches
         #include <vector>
          vector<Traffic> _traffics;
          vector<int> _arrivalGateNums;
          vector<int> _departureGateNums;
  • 벡터/김태훈 . . . . 4 matches
         #include <vector>
          vector <student> stre;
          for(vector<student>::iterator i = stre.begin(); i!=stre.end() ;i++)
          for(vector<student>::iterator i = stre.begin();!(i=stre.end());i++)
  • CPP_Study_2005_1/Basic Bus Simulation/김태훈 . . . . 3 matches
         #include <vector>
          vector<cbus> vbus;
          for(vector<cbus>::iterator j=vbus.begin();j<vbus.end();++j)
  • ClassifyByAnagram/인수 . . . . 3 matches
         #include <vector>
          typedef vector<string> LS;
          * list를 vector로 바꾸고 컴퓨터 켜자 마자 측정하니 6.2초 걸린다.
  • Counting/김상섭 . . . . 3 matches
         #include <vector>
          vector<int> test;
          for(vector<int>::iterator j = test.begin(); j != test.end(); j++)
  • CppStudy_2002_2/STL과제/성적처리 . . . . 3 matches
         #include <vector>
          vector<int> _Scores;
          void addScoreToVector(int aScore)
          vector<ScoresTable*> _StudentList;
          aTable->addScoreToVector(aScore);
  • Java/CapacityIsChangedByDataIO . . . . 3 matches
         capacity 정보를 제공하는 것이 {{{~cpp StringBuffer }}}, Vector 밖에 없다. 다른 것들을 볼려면 상속받아서 내부 인자를 봐야 겠다.
         Show Vector capactity by Data I/O in increment
         import java.util.Vector;
          capacity.testVector();
          public void testVector() {
          Vector vector = new Vector();
          showVectorIncrease(vector);
          showVectorDecrease(vector);
          public void showVectorIncrease(Vector aVector) {
          printTitle("Vector", "increment");
          printContainerState(aVector.size(), aVector.capacity());
          int oldCapacity = aVector.capacity();
          aVector.add("This is Gabage Data");
          if (oldCapacity != aVector.capacity())
          printContainerState(aVector.size(), aVector.capacity());
          printContainerState(aVector.size(), aVector.capacity());
          public void showVectorDecrease(Vector aVector) {
          printContainerState(aVector.size(), aVector.capacity());
          for (int counter = aVector.size(); counter > 0; counter--) {
          int oldCapacity = aVector.capacity();
  • LoveCalculator/zyint . . . . 3 matches
         #include <vector>
          vector<string> instr;
          for(vector<string>::iterator i=instr.begin();i<instr.end();++i)
  • Map/임영동 . . . . 3 matches
         #include<vector>
          vector< map<char, char> > decoder;
          vector< map<char, char> >::iterator it;
  • Map연습문제/노수민 . . . . 3 matches
         #include <vector>
         #include <vector>
          vector<map> vec;
  • Map연습문제/임영동 . . . . 3 matches
         #include<vector>
          vector< map<char, char> > decoder;
          vector< map<char, char> >::iterator it;
  • Monocycle/조현태 . . . . 3 matches
         #include <vector>
         vector< vector<int> > g_cityMap;
  • STL . . . . 3 matches
         || ["STL/vector"] ||배열을 대체할수 있는 자료구조||
          * ["STL/VectorCapacityAndReserve"] : Vector 의 Capacity 변화 추이
          * ["STL/vector/CookBook"] : vector 요리책(Tutorial)
  • SpiralArray/세연&재니 . . . . 3 matches
         #include <vector>
         vector< vector<int> > xbox;
  • Star/조현태 . . . . 3 matches
         #include <vector>
         vector<SavePoint> lines[12];
         vector<SavePoint> calculatePoint[10];
  • ThePriestMathematician/김상섭 . . . . 3 matches
         #include <vector>
          vector<int> test;
          for(vector<int>::iterator j = test.begin(); j != test.end(); j++)
  • UDK/2012년스터디 . . . . 3 matches
         event HitWall(Vector HitNormal, Actor Wall, PrimitiveComponent WallComp)
         event bool NotifyHitWall(vector HitNormal, actor Wall)
         event NotifyFallingHitWall(vector HitNormal, actor Wall);
         event Landed(vector HitNormal, Actor FloorActor);
  • canvas . . . . 3 matches
         #include <vector>
          vector<Shape*> canvas;
          for(vector<Shape*>::iterator it=canvas.begin(); it!=canvas.end();++it)
  • koi_cha/곽병학 . . . . 3 matches
         #include<vector>
          vector<pair<int,int>> vc;
          vector<int> vd;
  • sort/권영기 . . . . 3 matches
         #include<vector>
         vector < vector <int> > number;
  • 데블스캠프2004/세미나주제 . . . . 3 matches
         || 목 || [STL] || 영동 || 2h || [STL/string]이나 [STL/vector] 등의 1학년도 쓰기 편리한 자료구조 위주로 ||
          * 지금 Accelerated C++을 보고 있는데 STL에 대해 흥미가 생기네요... 그래서 이거 세미나 계획하고 있습니다. 세미나 방향은 char배열을 대신해서 쓸 수 있는 string이나, 배열 대신 쓸 수 있는 vector식으로 기존의 자료구조보다 편히 쓸 수 있는 자료구조를 설명하려 합니다.-영동
         [STL]을 할때 단순히 자료구조를 사용하는 방법을 같이 보는것도 중요하겠지만 내부구조 (예를 들어, vector는 동적 배열, list은 (doubly?) linked list..)와 같이 쓰이는 함수(sort나 또 뭐가있드라..그 섞는것..; ), 반복자(Iterator)에 대한 개념 등등도 같이 보고 더불어 VC++6에 내장된 STL이 ''표준 STL이 아니라는 것''도 같이 말씀해 주셨으면;; (SeeAlso [http://www.stlport.org/ STLPort]) - [임인택]
  • 마방진/민강근 . . . . 3 matches
         #include<vector>
          vector <vector <int> > ma;
  • 마방진/변준원 . . . . 3 matches
         #include<vector>
          vector <vector <int> > mabang;
  • 마방진/장창재 . . . . 3 matches
         #include <vector>
          vector <vector <int> > array;
  • 벡터/곽세환,조재화 . . . . 3 matches
         #include <vector>
          vector<student> vec;
          vector<student>::iterator i;
  • 벡터/권정욱 . . . . 3 matches
         #include <vector>
          vector<student> vec;
          vector<student>::iterator i=vec.begin();
  • 벡터/김수진 . . . . 3 matches
         #include<vector>
          vector< student > vec;
          vector<student>::iterator i=vec.begin();
  • 벡터/김홍선,노수민 . . . . 3 matches
         #include <vector>
          vector <student> vec;
          vector <student> ::iterator i=0;
  • 벡터/박능규 . . . . 3 matches
         #include <vector>
          vector<student> sp;
          for(vector<student>::iterator i= sp.begin();i!=sp.end(); i++)
  • 벡터/유주영 . . . . 3 matches
         #include <vector>
          vector < student > vec;
          vector < student > vec;
  • 벡터/임영동 . . . . 3 matches
         #include<vector>
          vector< student > vec;
          for(vector<student>::iterator i=vec.begin();i!=vec.end();i++)
  • 벡터/조동영 . . . . 3 matches
         #include <vector>
          vector <student> vec;
          vector<student>::iterator i=vec.begin();
  • 벡터/황재선 . . . . 3 matches
         #include <vector>
          vector<student> ss;
          for (vector<student>::iterator i = ss.begin(); i < ss.end(); i++) // 오름차순
  • 식인종과선교사문제/조현태 . . . . 3 matches
         #include <vector>
         bool MoveNext(vector<party>& moveData, map<int, bool>& isChecked, int where, party left, party right)
          vector<party> moveData;
  • 1002/Journal . . . . 2 matches
         그리고 이에 대해서 구현하고 (가장 간단한건 바로 vector 에 ab,ba 를 넣는것) 테스트를 늘렸다. 한단계만 늘리고 바로 알고리즘이 나올 것 같았다.
          vector<string> result
  • 3N 1/김상섭 . . . . 2 matches
         #include <vector>
          vector<Data> data;
  • 3N+1/김상섭 . . . . 2 matches
         #include <vector>
          vector<Data> data;
  • AcceleratedC++/Chapter6/Code . . . . 2 matches
         double optimistic_median_analysis(const vector<Student_info> &students)
          vector<double> medianOfStudents;
  • AproximateBinaryTree/김상섭 . . . . 2 matches
         #include <vector>
          vector<data> nodes;
  • AseParserByJhs . . . . 2 matches
          vectorCopy (PickedPoint[0], PickedPoint[1]);
          matrixMultiplyVector3 (inv_mat_mv, PickedPoint[0]);
          matrixMultiplyVector3 (inv_mat_mv, PickedPoint[1]);
          vectorScale (v, -1.0);
  • BirthdayCake/허준수 . . . . 2 matches
         #include <vector>
         vector<Cherry> Gradient;
  • ChocolateChipCookies/허준수 . . . . 2 matches
         #include <vector>
         vector<Cookies> cookies;
  • CodeRace/20060105/아영보창 . . . . 2 matches
         #include <vector>
         vector<Word*> container;
         void deleteVector()
          deleteVector();
  • CppStudy_2002_2 . . . . 2 matches
         || 8.9 ||STL(["STL/vector/CookBook"])과 리펙토링 몇가지||STL(["STL/vector/CookBook"], ["STL"])과 12.클래스 상속||
  • HanoiTowerTroublesAgain!/조현태 . . . . 2 matches
         #include <vector>
          vector<int> lastBallNumbers;
  • JollyJumpers/Celfin . . . . 2 matches
         #include <vector>
         vector<int> numList;
  • LCD-Display/김상섭 . . . . 2 matches
         #include <vector>
         vector<int> test;
  • Map연습문제/나휘동 . . . . 2 matches
         #include <vector>
          vector< map<char,char> > rules;
  • MineSweeper/김상섭 . . . . 2 matches
         #include <vector>
         vector<point> test;
  • NumericalAnalysisClass/Exam2002_1 . . . . 2 matches
         3. For given pair of vectors a=[3,0,-2], b=[0,-1,3]
         (b) Compute the angle between the vectors.
  • ProjectSemiPhotoshop/Journey . . . . 2 matches
          * ["STL"] 관련 서적은 네가 가진게 없을꺼라고 생각한다. 학교에서도 가르쳐주지 않는 부분이라. 스스로 익혀야 한다. 너무나 단 과실이라, 꼭 보기를 권한다. 관련 내용은 ["STL"] 에서 ["STL/vector"],["STL/vector/CookBook"]를 참고하면 될꺼다. --["neocoin"]
  • STL/search . . . . 2 matches
         #include <vector>
          vector<int> v(&ar[0], &ar[10]);
  • Steps/김상섭 . . . . 2 matches
         #include <vector>
          vector<unsigned int> totallength;
  • TheTrip/김상섭 . . . . 2 matches
         #include <vector>
         vector<double> test;
  • TheWarOfGenesis2R/Temp . . . . 2 matches
         #include <vector>
          vector<TestPtr> con;
  • UDK/2012년스터디/소스 . . . . 2 matches
         simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
          local vector CamStart, HitLocation, HitNormal, CamDirX, CamDirY, CamDirZ, CurrentCamOffset;
  • WeightsAndMeasures/김상섭 . . . . 2 matches
         #include <vector>
          vector<turtle> test;
  • [Lovely]boy^_^/USACO/GreedyGiftGivers . . . . 2 matches
         #include <vector>
         vector<string> ManList;
  • i++VS++i . . . . 2 matches
         vector<int> intArray(&array[0], &array[MAX]);
         for(vector<int>::iterator i = intArray.begin(); i != intArray.end(); ++i){
  • neocoin/CodeScrap . . . . 2 matches
         copy(vector1.begin(), vector1.end(), out); cout << endl;
  • whiteblue/자료구조다항식구하기 . . . . 2 matches
         #include <vector>
          vector <poly_node> v;
  • 금고/조현태 . . . . 2 matches
         #include <vector>
          vector<int> nodes;
  • 알고리즘8주숙제/문보창 . . . . 2 matches
         #include <vector>
         vector <Data*> indata;
  • 임인택/삽질 . . . . 2 matches
         위와 같은 4중 루프의 작업을 하는데. {{{~cpp int [][] }}} 형이 vector<vector<int > > 형보다 훨씬 빨랐다. 벡터도 내부적으로 동적 배열을 쓰지만 무언가 다른것 같다. 아니면 그 전에 아래와 같은 벡터 크기 고정 코드를 실행시켜서인가..?
  • 1thPCinCAUCSE/null전략 . . . . 1 match
         적절히 중복코드를 삭제하고 난 뒤, 한 5분정도 Input-Output 코드를 iostream 과 ["STL/vector"] 를 사용하여 작성한 뒤 이를 제출, 통과했습니다.
  • 3rdPCinCAUCSE/FastHand전략 . . . . 1 match
         구현은 C++로 하였으며 iostream 과 vector 를 이용했습니다.
  • AcceleratedC++/Chapter12 . . . . 1 match
         vector<Student_info> vs;
  • BusSimulation/영창 . . . . 1 match
         구현특이사항 : vector, map, algorithm 등 stl 클래스 사용
  • BusSimulation/태훈zyint . . . . 1 match
         #include <vector>
  • CPPStudy_2005_1/STL성적처리_2_class . . . . 1 match
         구현특이사항 : vector이용
  • ComputerGraphicsClass/Exam2004_2 . . . . 1 match
         폴리곤 ABC의 법선벡터(Normal Vector)를 구하시오. (단, 폴리곤이 보이는 면은 시계 반대 방향으로 ABC 순서로 보이는 면이며 단위벡터를 구하는 것이 아님)
         스플라인 함수의 특징을 결정하는 세 가지 knot vector에 대해서 설명하시오
  • ComputerNetworkClass/Exam2006_1 . . . . 1 match
         3. distance vector, link state 차이점
  • CppStudy_2002_1 . . . . 1 match
         || 다섯번째 주 || ["LinkedList/StackQueue/영동"][[BR]] ["STL/vector/CookBook"] 참고로 끝에 과제 해오기 ||영동 ||
  • DebuggingSeminar_2005/AutoExp.dat . . . . 1 match
         std::vector<*>= first=<_First> last=<_Last>
  • HowManyFibs?/문보창 . . . . 1 match
         #include <vector>
  • Java/숫자와문자사이변환 . . . . 1 match
          Integer.parseInt ( vector.elementAt ( 0 ).toString () );
  • LogicCircuitClass/Exam2006_2 . . . . 1 match
         2. 다음과 같이 딜레이를 갖는 회로에서 초기에는 x 가 1이다. 0초일 때 x 가 0으로, 2초일 때 x 가 1로 변한다고 할 경우 x,y 의 vector waveform 을 그리시오.
  • Map/노수민 . . . . 1 match
         #include <vector>
  • MoreEffectiveC++/Miscellany . . . . 1 match
         STL에서 container는 bitset, vector, list, deque, queue, priority_queue, stack, set, map 포함한다. 그리고 당신은 이러한 어떤 container 형을 find에 적용할수 있다.
  • ProjectPrometheus/Journey . . . . 1 match
          * STL 을 쓰면 편리하긴 한데, 확실히 학교컴퓨터에선 컴파일이 느리긴 한것 같다는; (하긴, 우리가 map 에 vector 겹친 형태로 작성을 했으니 -_-..) 그래도 STL Container 만 어느정도 이용해도 기존의 순수 C++ 을 이용할 때보다 훨씬 편하다는 점이 즐겁다. 만일 mock object 를 STL 이나 MFC Collection 없이 구현한다고 생각한다면? 그리 상상하고 싶지 않을 정도이다. (특히 DB에선) 그러면서 느끼는점이라면,
  • STL/Miscellaneous . . . . 1 match
          * vector<Object*> 이런식으로 동적 생성하는 객체의 레퍼런스를 위한 포인터를 컨테이너에 넣을때는 추후 포인터가 가리키는 객체를 직접 delete 해줘야 한다.
  • SmithNumbers/신재동 . . . . 1 match
         #include <vector>
  • VonNeumannAirport . . . . 1 match
          * 중간에 창준이형이 "너희는 C++ 로 프로그래밍을 하면서 STL를 안사용하네?" 라고 했을때, 그냥 막연하게 Java 에서의 Collection Class 정도로만 STL을 생각하고, 사용을 잘 안했다. 그러다가 중반부로 들어서면서 Vector를 이용하게 되었는데, 처음 한두번 이용한 Vector 가 후반으로 가면서 전체의 디자인을 뒤집었다; (물론 거기에는 디미터 법칙을 지키지 않은 소스도 한몫했지만 -_-;) 그걸 떠나서라도 Vector를 써 나가면서 백터 비교 assert 문 등도 만들어 놓고 하는 식으로 점차 이용하다보니 상당히 편리했다. 그러다가 ["Refactoring"] Time 때 서로 다른 자료형 (앞에서 array 로 썼던 것들) 에 대해 vector 로 통일을 하다 보니 시간이 비교적 꽤 지연이 되었다.
  • WeightsAndMeasures/신재동 . . . . 1 match
         sort()에 비교 함수('''turtlesCompare''') 넣는데 은근히 힘들었음. 처음에는 C++의 STL에서 vector에 비교 함수 넣는 것과 같으리라고 생각하고 비교 함수를 만들었는데 안되서 확인해보니 파이썬의 리스트에서는 결과를 '''{-1, 0, 1}'''로 해야지 제대로 돌아간다는 것을 알았음. --재동
  • Yggdrasil/가속된씨플플/4장 . . . . 1 match
          compare 함수 포인터를 넘겨주면 students vector(또는 list)내에서 값을 꺼낸다. Student_info 형이 나오겠지 그 것들을 compare 함수에 넘겨주는 거다. --[인수]
  • crossedladder/곽병학 . . . . 1 match
         #include<vector>
  • 논문번역/2012년스터디/서민관 . . . . 1 match
         따라서 allograph 분류는 고유하게 결정되는 것이 아니라 단지 이 과정이 soft vector 양자화와 유사한지에 따라 확률적으로 결정된다.
  • 논문번역/2012년스터디/이민석 . . . . 1 match
         전처리에서 벌충할 수 없는 서로 다른 글씨체 사이의 변동을 고려하기 위해 우리는 [13]에 서술된 접근법과 비슷한, 다저자/저자 독립식 인식을 위한 글자 이서체 모형을 적용한다. 이서체는 글자 하위 분류, 즉 특정 글자의 서로 다른 실현이다. 이는 베이스라인 시스템과달리HMM이이제서로다른글자 하위 분류를 모델링하는 데 쓰임을 뜻한다. 글자별 하위 분류 개수와 이서체 HMM 개수는 휴리스틱으로 결정하는데, 가령 다저자식에 적용된 시스템에서 우리는 이서체 개수가 저자 수만큼 있다고 가정한다. 초기화에서 훈련 자료는 이서체 HMM들을 임의로 선택하여 이름표를 붙인다. 훈련 도중 모든 글자 표본에 대해 해당하는 모든 이서체에 매개변수 재추정을 병렬 적용한다. 정합 가능성은 특정 모형의 매개변수가 현재 표본에 얼마나 강하게 영향받는 지를 결정한다. 이서체 이름표가 유일하게 결정되지는 않기에 이 절차는 soft vector quantization과 비슷하다.
  • 데블스캠프2003/다루어볼문제와관련세미나 . . . . 1 match
          * 네. 현철이형 그래서 제가 생각한게 일단 동적 배열의 확실한 이해와, 링크드 리스트를 구현해보게 한다음에, 이들 지식의 선행으로 STL을 가르치려 하려구 그랬거든요. 위 두가지만 확실히 이해할 수 있다면 STL의 기본적인 (vector나 list같은) 것은 가르쳐도 무방하다고 생각합니다. --[인수]
  • 데블스캠프2004/목요일후기 . . . . 1 match
         사실 : 암호화방법, 암호화와 복호화 방법, STL 의 정의(?)와 그 예들을 배웠습니다.(string,vector,map)
  • 레밍즈프로젝트/연락 . . . . 1 match
         1. 맵의 자료구조 : 이 부분이 Map과 Pixel 다이어그램인데... 흠... Map은 2차원 배열로서 모든 픽셀에 대한 데이터를 관리하게 되겠지?? 그리고 그 접근 방식은 순차접근(List)가 아니라 인덱싱을 이용한 임의접근(Vector) 일거고. 맵은 Pixel 이라는 인터페이스에 대한 배열을 2차원 Vector로 관리하게 되는겨-_-ㅋ(조금 복잡해지지 이럴땐 [http://www.redwiki.net/wiki/wiki.php/boost boost]의 [http://www.redwiki.net/wiki/wiki.php/boost/MultiArray 다차원배열]에 대한 STL비슷한 녀석을 사용해도 괜찮을겨-_- boost에 대해서 좀 조사를 해야겠지만... vector를 다차원으로 쓰기엔 까다로운 부분이 많거든...)
         3. 맵 부분과 레밍에 대해서. CVector(없는 라이브러리)가 아니라 CArray라는 MS 제공 라이브러리를 사용해야 직렬화가 가능하대;;
  • 레밍즈프로젝트/프로토타입/에니메이션 . . . . 1 match
          vector<UINT> m_frameList;
  • 삼총사CppStudy/20030806 . . . . 1 match
         == vector 소스 ==
         class CVector
          CVector();
          CVector(int a, int b);
          CVector operator+(CVector a);
         ostream & operator<<(ostream &os, CVector &a);
         CVector::CVector()
         CVector::CVector(int a, int b)
         CVector CVector::operator+(CVector a)
          CVector temp;
         void CVector::SetValue(int a, int b)
         int CVector::GetX()
         int CVector::GetY()
         ostream & operator<<(ostream & os, CVector &a)
          CVector v1(50, 100);
          CVector v2(22, 33);
          CVector v3 = v1.operator +(v2);
  • 정모/2013.1.29 . . . . 1 match
          * BigBang - 선형대수학에서 쓰이는 vector를 구현하기위한 가변인자 + stl개요 등을 함.
  • 타도코코아CppStudy/0731 . . . . 1 match
         마우스 이벤트 처리 with vector
Found 171 matching pages out of 7555 total pages (5000 pages are searched)

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
Processing time 0.0350 sec