Standard Template Library Programmer's Guide

Здесь есть возможность читать онлайн «Standard Template Library Programmer's Guide» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: Программирование, Справочники, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Standard Template Library Programmer's Guide: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Standard Template Library Programmer's Guide»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

This document contains reference on SGI STL implementation

Standard Template Library Programmer's Guide — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Standard Template Library Programmer's Guide», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать
See also

Adaptable Predicate, Binary Predicate, Adaptable Binary Predicate

Binary Predicate

Category: functors

Component type: concept

Description

A Binary Predicate is a Binary Function whose result represents the truth or falsehood of some condition. A Binary Predicate might, for example, be a function that takes two arguments and tests whether they are equal.

Refinement of

Binary Function

Associated types
Result type The type returned when the Binary Predicate is called. The result type must be convertible to bool .
Notation

FA type that is a model of Binary Predicate

XThe first argument type of F

YThe second argument type of F

fObject of type F

xObject of type X

yObject of type Y

Valid expressions
Name Expression Return type
Function call f(x,y) Convertible to bool
Expression semantics
Name Expression Precondition Semantics Postcondition
Function call f(x,y) The ordered pair (x,y) is in the domain of f . Returns true if the condition is satisfied, false if it is not. The result is either true or false .
Models

• bool (*)(int,int)

• equal_to

See also

Predicate, Adaptable Predicate, Adaptable Binary Predicate

Adaptable Predicate

Category: functors

Component type: concept

Description

An Adaptable Predicate is a Predicate that is also an Adaptable Unary Function. That is, it is a Unary Function whose return type is bool , and that includes nested typedef s that define its argument type and return type.

Refinement of

Predicate, Adaptable Unary Function

Associated types

None, except for those associated with Predicate and Adaptable Unary Function.

Valid expressions

None, except for those defined by the Predicate and Adaptable Unary Function requirements.

Models

• logical_not

• unary_negate

See also

Predicate, Binary Predicate, Adaptable Binary Predicate

Adaptable Binary Predicate

Category: functors

Component type: concept

Description

An Adaptable Binary Predicate is a Binary Predicate that is also an Adaptable Binary Function. That is, it is a Binary Function whose return type is bool , and that includes nested typedef s that define its argument types and return type.

Refinement of

Predicate, Adaptable Binary Function

Associated types

None, except for those associated with Predicate and Adaptable Binary Function.

Valid expressions

None, except for those defined by the Predicate and Adaptable Binary Function requirements.

Models

• less

• equal_to

• logical_and

• logical_or

• binary_negate

See also

Binary Predicate, Predicate, Adaptable Predicate

Strict Weak Ordering

Category: functors

Component type: concept

Description

A Strict Weak Ordering is a Binary Predicate that compares two objects, returning true if the first precedes the second. This predicate must satisfy the standard mathematical definition of a strict weak ordering . The precise requirements are stated below, but what they roughly mean is that a Strict Weak Ordering has to behave the way that "less than" behaves: if a is less than b then b is not less than a , if a is less than b and b is less than c then a is less than c , and so on.

Refinement of

Binary Predicate

Associated types
First argument type The type of the Strict Weak Ordering's first argument.
Second argument type The type of the Strict Weak Ordering's second argument. The first argument type and second argument type must be the same.
Result type The type returned when the Strict Weak Ordering is called. The result type must be convertible to bool .
Notation

FA type that is a model of Strict Weak Ordering

XThe type of Strict Weak Ordering's arguments.

fObject of type F

x, y, zObject of type X

Definitions

• Two objects x and y are equivalent if both f(x, y) and f(y, x) are false. Note that an object is always (by the irreflexivity invariant) equivalent to itself.

Valid expressions

None, except for those defined in the Binary Predicate requirements.

Expression semantics
Name Expression Precondition Semantics Postcondition
Function call f(x, y) The ordered pair (x,y) is in the domain of f Returns true if x precedes y , and false otherwise The result is either true or false
Invariants
Irreflexivity f(x, x) must be false .
Antisymmetry f(x, y) implies !f(y, x)
Transitivity f(x, y) and f(y, z) imply f(x, z) .
Transitivity of equivalence Equivalence (as defined above) is transitive: if x is equivalent to y and y is equivalent to z , then x is equivalent to z . (This implies that equivalence does in fact satisfy the mathematical definition of an equivalence relation.) [1]
Models

• less

• less

• greater

• greater

Notes

[1] The first three axioms, irreflexivity, antisymmetry, and transitivity, are the definition of a partial ordering ; transitivity of equivalence is required by the definition of a strict weak ordering . A total ordering is one that satisfies an even stronger condition: equivalence must be the same as equality.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Standard Template Library Programmer's Guide»

Представляем Вашему вниманию похожие книги на «Standard Template Library Programmer's Guide» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Standard Template Library Programmer's Guide»

Обсуждение, отзывы о книге «Standard Template Library Programmer's Guide» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x