Home
C++
Bitset
Class
Console
Data Structure
Data Type
Deque
Development
File
Function
Generic
Language
List
Map Multimap
Overload
Pointer
Qt
Queue Stack
Set Multiset
STL Algorithms Binary search
STL Algorithms Heap
STL Algorithms Helper
STL Algorithms Iterator
STL Algorithms Merge
STL Algorithms Min Max
STL Algorithms Modifying sequence operations
STL Algorithms Non modifying sequence operations
STL Algorithms Sorting
STL Basics
String
Valarray
Vector
adjacent_difference « STL Algorithms Helper « C++
C++
STL Algorithms Helper
adjacent_difference
1.
adjacent_difference: print all differences between elements
2.
adjacent_difference: print all sums with the predecessors
3.
adjacent_difference: print all products between elements
4.
Use adjacent_difference to convert elements in a container into relative values
5.
adjacent_difference( ) returns a new sequence in which each element is the difference between adjacent elements in the original sequence.