Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Chapter 11.  Functional programming

Boost , Meta State Machine (MSM) , Part II. Reference

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Chapter 11.  Functional programming

Чтобы использовать эти функции, вам нужно включить:

<#include <msm/front/euml/stl.hpp>>

или указанный заголовок в следующих таблицах.

В следующих таблицах перечислены поддерживаемые алгоритмы STL:

Table 11.1. STL algorithms

STL algorithms in querying.hppFunctor
find_(первый, последний, значение)Найти
find_if_(первое, последнее, значение)Найти If
low_bound_ (первое, последнее значение [,opᵃ])Нижняя граница
top_bound_ (первое, последнее значение [,opᵃ])Верхняя граница
equal_range_ (первое, последнее значение [,opᵃ])Равновесие
binary_search_ (первое, последнее, значение [,opᵃ])BinarySarch_
min_element_ (первый, последний [, opᵃ])Мине-элемент
max_element_ (первый, последний [, opᵃ])МаксЭлемент
next_find_ (первый, последний [,opᵃ])СоседнийFind_
find_end_(first1, last1, first2, last2 [,op ᵃ])FindEnd_
find_first_of_(first1, last1, first2, last2 [,op ᵃ])FindFirstOf_
equal_(first1, last1, first2 [,op ᵃ])Равный
search_(first1, last1, first2, last2 [,op ᵃ])Поиск
включает в себя_(first1, last1, first2, last2 [,op ᵃ])Включает_
lexicographical_compare_ (first1, last1, first2, last2 [,op ᵃ])LexicographicalCompare_
Count_ (первый, последний, значение [, размер])Граф!
count_if_(первый, последний, opᵃ [,размер])CountIf
Дистанция_(первый, последний)Расстояние_
несоответствие _(first1, last1, first2 [,op ᵃ])Несоответствие_


Table 11.2. STL algorithms

STL algorithms in iteration.hppFunctor
for_each_(первый, последний, унарный opᵃ)Для каждого
Накопить_first, last, init [,opᵃ]Накопить_


Table 11.3. STL algorithms

STL algorithms in transformation.hppFunctor
copy_(первый, последний, результат)Copy_
copy_backward_ (первый, последний, результат)CopyBackward_
reverse_(первый, последний)Обратный_
reverse_copy_ (первый, последний, результат)Обратная копия_
Удалить_(первое, последнее, значение)Удалить_
удалите_if_(первый, последний, opᵃ);Удалить_
remove_copy_(первый, последний, выходной, значение)Удалить_
удалите_copy_if_(первый, последний, выход, opᵃ)УдалитьCopyIf_
fill_(первый, последний, значение)Заполнить_
fill_n_(первый, размер, значение)ᵇЗаполнить_
Generate_(первый, последний, генераторᵃ);Генерировать_
генерировать_(первый, размер, генераторᵃᵇ);Генерировать_
Уникальный_(первый, последний [,opᵃ])Уникальный_
unique_copy_ (первый, последний, выход [,opᵃ])Уникальная копия_
random_shuffle_ (первый, последний [,opᵃ])RandomShuffle_
rotate_copy_(первый, средний, последний, выходной)RotateCopy_
Уникальный_(первый, последний [,opᵃ])Раздел_
stable_partition_ (первый, последний [, opᵃ])Стабильный раздел_
stable_sort_ (первый, последний [, opᵃ])StableSort_
sort_ (первый, последний [,opᵃ])Сорт_
partial_sort_ (первый, средний, последний [, opᵃ])PartialSort_
partial_sort_copy_ (первый, последний, res_first, res_last [,opᵃ])Разработчик:SortCopy_
nth_element_(первый, nth, последний [,opᵃ])NthElement
merge_(first1, last1, first2, last2, output [,op ᵃ])Слияние_
inplace_merge_ (первый, средний, последний [, opᵃ])InplaceMerge_
set_union_(first1, last1, first2, last2, output [,op ᵃ])SetUnion
push_heap_ (первый, последний [,op ᵃ])PushHeap_
pop_heap_ (первый, последний [,op & #7491;])PopHeap
make_heap_ (первый, последний [,op ᵃ])MakeHeap
sort_heap_ (первый, последний [,op ᵃ])Сортовая куча
next_permutation_ (первый, последний [,op ᵃ])Следующая статьяПермутация_
prev_permutation_ (первый, последний [,op ᵃ])Превмутация_
inner_product_(first1, last1, first2, init [,op1ᵃ] [,op2ᵃ])Внутренний продукт_
part_sum_ (первый, последний, выход [,opᵃ])PartialSum_
next_difference_(первый, последний, выход [,opᵃ])Соседняя разница_
Заменить_(первый, последний, старый_значение, новый_значение)Заменить_
Заменить_if_(первый, последний, opᵃ, новое_значение)Заменить If_
Заменить_copy_(первый, последний, результат, старое_значение, новое_значение)Заменить_
Заменить_copy_if_(первый, последний, результат, opᵃ, new_value)Заменить CopyIf_
rotate_(первый, средний, последний)ᵇПоворот.


Table 11.4. STL container methods

STL container methods(common) in container.hppFunctor
контейнер:: эталонный фронт_(контейнер)Фронт
контейнер::reference back_(контейнер)Назад
контейнер::iterator start_(контейнер)Начать_
контейнер::iterator end_(контейнер)Конец.
контейнер::reverse_iterator rbegin_(контейнер)RBegin__
контейнер::reverse_iterator rend_(контейнер)Ренд
void push_back_(контейнер, значение)Push_Back_
void pop_back_(контейнер, значение)Pop_Back_
void push_front_(контейнер, значение)Push_Front_
void pop_front_(контейнер, значение)Pop_Front_
void clear_(контейнер)Чисто.
размер_тип емкости_(контейнер)Вместимость_
size_type size_(контейнер)размер_
max_size_(контейнер)Max_Size
void reserve_(контейнер, значение)Резерв _
void resize_(контейнер, значение)Размер _
итератор insert_(контейнер, позы, значение)Включить_
void insert_(контейнер, пос, первый, последний)Включить_
void insert_(контейнер, пос, число, значение)Включить_
void swap_(контейнер, другой_контейнер)Swap_
void erase_(контейнер, пос)Стирать
void erase_(контейнер, первый, последний)Стирать
Bool empty_(контейнер)Пустой_


Table 11.5. STL list methods

std::list methods in container.hppFunctor
void list_remove_(контейнер, значение)ListRemove_
void list_remove_if_(контейнер, opᵃ)Удалить_If_
void list_merge_(контейнер, другой_список)ListMerge
void list_merge_(контейнер, other_list, opᵃ)ListMerge
void splice_(контейнер, итератор, другой_список)Сплайс_
void splice_(контейнер, итератор, другой_список, итератор)Сплайс_
void splice_(контейнер, итератор, другой_list, первый, последний)Сплайс_
void list_reverse_(контейнер)ListReverse_
void list_unique_(контейнер)ListUnique
void list_unique_(контейнер, opᵃ)ListUnique
void list_sort_(контейнер)ListSort_
void list_sort_(контейнер, opᵃ)ListSort_


Table 11.6. STL associative container methods

Associative container methods in container.hppFunctor
итератор insert_(контейнер, позы, значение)Включить_
void insert_(контейнер, первый, последний)Включить_
pairinsert_(контейнер, значение)Включить_
void associative_erase_(контейнер, пос)Ассоциативный_ Стирать
void associative_erase_(контейнер, первый, последний)Ассоциативный_ Стирать
size_type associative_erase_(контейнер, ключ)Ассоциативный_ Стирать
iterator associative_find_(контейнер, ключ)Ассоциативный_ Найти
size_type associative_count_(контейнер, ключ)Ассоциативный счет_
iterator associative_lower_bound_(контейнер, ключ)Исполнитель: Lower_Bound_
iterator associative_upper_bound_(контейнер, ключ)Ассоциативный_Upper_Bound_
pairassociative_equal_range_(контейнер, ключ)Associative_Equal_Range_


Table 11.7. STL pair

std::pair in container.hppFunctor
first_type first_(pair)Первый.
second_type second_(pair)Второй


Table 11.8. STL string

STL string methodstd::string method in container.hppFunctor
substr (size_type pos, size_type size)строка substr_(контейнер, позы, длина)субстрат_
Int Compare (альбом)int string_compare_(контейнер, другая_струна)StringCompare_
Сравнение (char*)int string_compare_(контейнер, другая_струна)StringCompare_
int compare(size_type pos, size_type size, string)int string_compare_(контейнер, pos, размер, another_string)StringCompare_
int compare (size_type pos, size_type size, string, size_type length)int string_compare_(контейнер, позы, размер, другая_струна, длина)StringCompare_
string& append(const string&);string& append_(контейнер, другая_струна)Добавить_
string& append (charT*)string& append_(контейнер, другая_струна)Добавить_
string& append (струна, size_type pos, size_type size)string& append_(контейнер, прочее_string, pos, size)Добавить_
string& append (charT*, size_type size)string& append_(контейнер, другая_струна, длина)Добавить_
string& append (размер_тип, charT)string& append_(контейнер, размер, char)Добавить_
string& append (начало итератора, конец итератора)string& append_(контейнер, начало, конец)Добавить_
string& insert (size_type pos, charT*)string& string_insert_(контейнер, pos, other_string)StringInsert_
string& insert(size_type pos, charT*,size_type n)string& string_insert_(контейнер, pos, other_string, n)StringInsert_
string& insert(size_type pos,size_type n, charT c)string& string_insert_(контейнер, pos, n, c)StringInsert_
string& insert (size_type pos, const string&);string& string_insert_(контейнер, pos, other_string)StringInsert_
string& insert (size_type pos, const string&, size_type pos1, size_type n)string& string_insert_(контейнер, pos, other_string, pos1, n)StringInsert_
string& erase(size_type pos=0, size_type n=npos)string& string_erase_(контейнер, pos, n)Струнная эра_
string& assign(const string&);string& string_assign_(контейнер, другая_струна)Струнная подпись_
string& assign(const charT*)string& string_assign_(контейнер, другая_струна)Струнная подпись_
string& assign(const string&, size_type pos, size_type n)string& string_assign_(контейнер, другая_string, pos, n)Струнная подпись_
струна&амп; присвоить (const char) T*, size_type nstring& string_assign_(контейнер, another_string, n)Струнная подпись_
string& assign(size_type n, charT c)string& string_assign_(контейнер, n, c)Струнная подпись_
string& assign (первый итератор, последний)string& string_assign_(контейнер, первый, последний)Струнная подпись_
string& replace(size_type pos, size_type n, const string&)string& string_replace_(контейнер, pos, n, another_string)StringReplace_
string& replace(size_type pos, size_type n, const char) T*, размер_тип n1)string& string_replace_(контейнер, pos, n, another_string, n1)StringReplace_
string& replace(size_type pos, size_type n, const charT*)string& string_replace_(контейнер, pos, n, another_string)StringReplace_
string& replace(size_type pos, size_type n, size_type n1, charT c)string& string_replace_(контейнер, pos, n, n1, c)StringReplace_
string& replace(первый итератор, последний итератор, const string&)string& string_replace_(контейнер, первая, последняя, другая_струна)StringReplace_
string& replace(первый итератор, последний итератор, const charT*, size_type n)string& string_replace_(контейнер, первый, последний, другой_string, n)StringReplace_
string& replace(первый итератор, последний итератор, const charT*)string& string_replace_(контейнер, первая, последняя, другая_струна)StringReplace_
string& replace(первый итератор, последний итератор, размер_тип n, charT c)string& string_replace_(контейнер, первый, последний, n, c)StringReplace_
string& replace(первый итератор, последний итератор f, итератор l)string& string_replace_(контейнер, первый, последний, f, l)StringReplace_
const charT* c_str()const charT* c_str_(контейнер)CStr_
const charT* data()const charT* string_data_(контейнер)StringData_
size_type copy(charT*buf, size_type n, size_type pos = 0)size_type string_copy_(container, buf, n, pos); size_type string_copy_(container, buf, n)StringCopy_
size_type find(charT*s, size_type pos, size_type n)size_type string_find_(контейнер, s, pos, n)StringFind_
size_type find(charT*s, size_type pos=0)size_type string_find_(контейнер, s, pos); size_type string_find_(контейнер, s)StringFind_
size_type find (const string&s, size_type pos=0)size_type string_find_(container, s, pos) size_type string_find_(container, s)StringFind_
size_type find(charT c, size_type pos=0)size_type string_find_(container, c, pos) size_type string_find_(container, c)StringFind_
size_type rfind(charT*s, size_type pos, size_type n)size_type string_rfind_(контейнер, s, pos, n)StringRFind_
size_type rfind(charT*s, size_type pos=npos)size_type string_rfind_(контейнер, s, pos); size_type string_rfind_(контейнер, s)StringRFind_
size_type rfind (const string&s, size_type pos=npos)size_type string_rfind_(контейнер, s, pos); size_type string_rfind_(контейнер, s)StringRFind_
size_type rfind(charT c, size_type pos=npos)size_type string_rfind_(container, c, pos) size_type string_rfind_(container, c)StringRFind_
size_type find_first_of(charT*s, size_type pos, size_type n)size_type find_first_of_(контейнер, s, pos, n)Разработчик:FindFirstOf_
size_type find_first_of (charT*s, size_type pos=0)size_type find_first_of_(контейнер, s, pos); size_type find_first_of_(контейнер, s)Разработчик:FindFirstOf_
size_type find_first_of (const string&s, size_type pos=0)size_type find_first_of_(контейнер, s, pos); size_type find_first_of_(контейнер, s)Разработчик:FindFirstOf_
size_type find_first_of (charT c, size_type pos=0)size_type find_first_of_(контейнер, c, pos) size_type find_first_of_(контейнер, c)Разработчик:FindFirstOf_
size_type find_first_not_of(charT*s, size_type pos, size_type n)size_type find_first_not_of_(контейнер, s, pos, n)Обсуждение:FindFirstNotOf_
size_type find_first_not_of (charT*s, size_type pos=0)size_type find_first_not_of_(контейнер, s, pos); size_type find_first_not_of_(контейнер, s)Обсуждение:FindFirstNotOf_
size_type find_first_not_of (const string&s, size_type pos=0)size_type find_first_not_of_(контейнер, s, pos); size_type find_first_not_of_(контейнер, s)Обсуждение:FindFirstNotOf_
size_type find_first_not_of (charT c, size_type pos=0)size_type find_first_not_of_(контейнер, c, pos); size_type find_first_not_of_(контейнер, c)Обсуждение:FindFirstNotOf_
size_type find_last_of(charT*s, size_type pos, size_type n)size_type find_last_of_(контейнер, s, pos, n)Обсуждение FindLastOf_
size_type find_last_of (charT*s, size_type pos=npos)size_type find_last_of_(контейнер, s, pos); size_type find_last_of_(контейнер, s)Обсуждение FindLastOf_
size_type find_last_of (const string&s, size_type pos=npos)size_type find_last_of_(контейнер, s, pos); size_type find_last_of_(контейнер, s)Обсуждение FindLastOf_
size_type find_last_of (charT c, size_type pos=npos)size_type find_last_of_(контейнер, c, pos); size_type find_last_of_(контейнер, c)Обсуждение FindLastOf_
size_type find_last_not_of(charT*s, size_type pos, size_type n)size_type find_last_not_of_(контейнер, s, pos, n)Обсуждение:FindLastNotOf_
size_type find_last_not_of (charT*s, size_type pos=npos)size_type find_last_not_of_(контейнер, s, pos); size_type find_last_of_(контейнер, s)Обсуждение:FindLastNotOf_
size_type find_last_not_of (const string&s, size_type pos=npos)size_type find_last_not_of_(контейнер, s, pos); size_type find_last_not_of_(контейнер, s)Обсуждение:FindLastNotOf_
size_type find_last_not_of (charT c, size_type pos=npos)size_type find_last_not_of_(контейнер, c, pos); size_type find_last_not_of_(контейнер, c)Обсуждение:FindLastNotOf_


Примечания:

  • ᵃ: алгоритмы, требующие предиката, должны сделать их совместимыми с eUML, обернув их внутри функтора Predicate_. Например, std::less=>Predicate_>()

  • & #7495;: При использовании реализации SGI STL эти функторы используют значение возврата SGI

Статья Chapter 11.  Functional programming раздела Meta State Machine (MSM) Part II. Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Part II. Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 18:32:53/0.0087618827819824/0