home | login | register | DMCA | contacts | help | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


my bookshelf | genres | recommend | rating of books | rating of authors | reviews | new | форум | collections | читалки | авторам | add
fantasy
space fantasy
fantasy is horrors
heroic
prose
  military
  child
  russian
detective
  action
  child
  ironical
  historical
  political
western
adventure
adventure (child)
child's stories
love
religion
antique
Scientific literature
biography
business
home pets
animals
art
history
computers
linguistics
mathematics
religion
home_garden
sport
technique
publicism
philosophy
chemistry
close

Loading...


Description

Adjacent_difference calculates the differences of adjacent elements in the range [first, last). This is, *first is assigned to *result[1], and, for each iterator i in the range [first + 1, last), the difference of *i and *(i – 1) is assigned to *(result + (i – first)). [2]

The first version of adjacent_difference uses operator- to calculate differences, and the second version uses a user-supplied binary function. In the first version, for each iterator i in the range [first + 1, last), *i – *(i – 1) is assigned to *(result + (i – first)). In the second version, the value that is assigned to *(result + 1) is instead binary_op(*i, *(i – 1)).


Prototype | Standard Template Library Programmer`s Guide | Definition







Loading...