Breymann. C++ Einführung und professionelle Programmierung

Breymann. C++ Einführung und professionelle Programmierung Breymann. C++ Einführung und professionelle Programmierung

vred.bioinf.uni.sb.de
von vred.bioinf.uni.sb.de Mehr von diesem Publisher
17.11.2014 Aufrufe

Vorhandene Algorithmen: for_each find find_if find_end find_first_of adjacent_find count mismatch equal search search_n copy copy_backward copy_if swap iter_swap swap_ranges transform replace fill fill_n generate generate_n remove unique reverse rotate random_shuffle partition sort partial_sort nth_element binary_search lower_bound upper_bound equal_range includes set_union set_intersecti set_difference set_symmetric_difference pop_heap push_heap make_heap sort_heap min max min_element max_element lexicographical_compare next_permutati prev_permutation accumulate inner_product partial_sum adjacent_difference Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 430 zurück Ende

11.1.3 Beispiel Variante 1: noch ohne Benutzung der STL #include typedef int* Iterator;// neuer Typname using std::cout; using std::endl; // Prototyp des Algorithmus Iterator find(Iterator Anfang, Iterator Ende, const int& Wert); int main() { const int Anzahl = 100; int einContainer[Anzahl]; // Container definieren Iterator begin = einContainer; // Anfang Iterator end = einContainer + Anzahl; // Ende+1 for(int i = 0; i < Anzahl; ++i) // Container füllen einContainer[i] = 2*i; Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 431 zurück Ende

Vorhandene Algorithmen:<br />

for_each find find_if<br />

find_end find_first_of adjacent_find<br />

count mismatch equal<br />

search search_n copy<br />

copy_backward copy_if swap<br />

iter_swap swap_ranges transform<br />

replace fill fill_n<br />

generate generate_n remove<br />

unique reverse rotate<br />

random_shuffle partition sort<br />

partial_sort nth_element binary_search<br />

lower_bo<strong>und</strong> upper_bo<strong>und</strong> equal_range<br />

includes set_union set_intersecti<br />

set_difference set_symmetric_difference pop_heap<br />

push_heap make_heap sort_heap<br />

min max min_element<br />

max_element lexicographical_compare next_permutati<br />

prev_permutation accumulate inner_product<br />

partial_sum adjacent_difference<br />

<strong>Breymann</strong> <strong>C++</strong>, c○ Hanser Verlag München<br />

Inhalt ◭◭ ◭ ◮ ◮◮ 430 zurück Ende

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!