티스토리 뷰
https://en.cppreference.com/w/cpp/algorithm/transform
std::transform - cppreference.com
(1) template< class InputIt, class OutputIt, class UnaryOperation > OutputIt transform( InputIt first1, InputIt last1, OutputIt d_first, UnaryOperation unary_op ); (until C++20) template< class InputIt, class OutputIt, class U
en.cppreference.com
#include <algorithm>
벡터와 같은 컨테이너의 특정 범위에 특정 함수를 적용할때 유용.

범위 first1 부터 last1 까지 unary_op를 적용하고, d_first에서 부터 저장.
벡터의 모든 범위에 값을 두배로 하는 함수를 적용:

'노트' 카테고리의 다른 글
| 언어별 2차원 배열 입력 (0) | 2021.12.05 |
|---|---|
| c++) bitset 클래스 (0) | 2021.11.16 |
| c++) stoi 함수, string에 숫자 이외의 문자가 포함시 (0) | 2021.10.21 |
| c++) sort와 stable_sort (0) | 2021.10.20 |
| Visual Studio 솔루션에 새로운 폴더 추가 (0) | 2021.10.17 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- floyd warshall
- 재귀
- back tracking
- Python
- MVC
- greedy
- C
- Brute Force
- binary search
- 이분탐색
- recursion
- Tree
- Unity
- C++
- dfs
- DP
- 자료구조
- permutation
- Spring
- CSS
- Stack
- Dijkstra
- priority queue
- 조합
- db
- Implementation
- Kruskal
- two pointer
- BFS
- graph
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
