View Template Library


set_intersection_view<Cont_A,Cont_B,Equal_A, Equal_b, Compare,Const_tag,Iter_tag,Base_A,Base_B>

Category: adaptors

Component type: type

Description

The set_intersection_view template represents all the elements that are in container_a and in in container_b. set_intersection_view is a concatenation_view of a transform_view which selects only elements which are in container_a and container_b from a pair_merge_view of two equal_range_views of container_a and container_b.

set_intersection_views are mutable if and only if the const_tag template parameter is mutable_view_tag. Note that changing elements of the container may result in invalidated iterators and may change the size of the view. Thus, use mutable views only if you really know what you are doing.

A set_intersection_view owns its referenced container, if its base template parameter is aggregated_ownership, it merely references its container, if the base template parameter is referenced_ownership.

Template parameters

Parameter

Description

Default

container_a

The view's container type: the type of container referenced by this view


container_b

The view's container type: the type of container referenced by this view


equal_fn_a

The view's comparison function. Compares the contents of two iterators for equality.

std::equal_to<container_a::value_type>

equal_fn_b

The view's comparison function. Compares the contents of two iterators for equality.

std::equal_to<container_b::value_type>

comparator

The view's comparison function. Compares the contents of two iterators for sorting order.

std::less<container_a::value_type>

const_tag

The view's const tag: either const_view_tag or mutable_view_tag

const_view_tag

iterator_tag

The view's directional iterator category

The minium of container_a::iterator::iterator_cateory and container_b::iterator::iterator_category or bidirectional_iterator_tag whichever is the lesser.

base_a

The view's ownership type: the base_a class that determines if the view references or owns the container_a

referenced_ownership

base_b

The view's ownership type: the base_b class that determines if the view references or owns the container_b

referenced_ownership

Definition

Defined in the header set_intersection_view.hpp.

Model of

View

Type requirements



Container satisfies

View satisfies

Container

Container [1]

Forward Container

Forward Container [1]

Members

Member

Where defined

Description

value_type

Container

The type T of the elements accessed through the container.

domain_type

view

The type of the referenced container.

pointer

Container

Pointer to T.

reference

Container

Reference to T.

const_reference

Container

Const reference to T.

size_type

Container

An unsigned integral type.

difference_type

Container

A signed integral type.

iterator

Container

Iterator used to iterate through the view.

const_iterator

Container

Const iterator used to iterate through the view.

reverse_iterator

Reversible Container

Iterator used to iterate backwards through a container.

const_reverse_iterator

Reversible Container

Const iterator used to iterate backwards through a container.

iterator begin()

Container

Returns an iterator pointing to the begin of the view.

iterator end()

Container

Returns an iterator pointing to the end of the view.

const_iterator begin() const

Container

Returns a const_iterator pointing to the begin of the view.

const_iterator end() const

Container

Returns a const_iterator pointing to the end of the view.

reverse_iterator rbegin()

Reversible Container

Valid for reversible container's only. Returns a reverse_iterator pointing to the beginning of the reversed container.

reverse_iterator rend()

Reversible Container

Valid for reversible container's only. Returns a reverse_iterator pointing to the end of the reversed container.

const_reverse_iterator rbegin() const

Reversible Container

Valid for reversible container's only. Returns a const_reverse_iterator pointing to the beginning of the reversed container.

const_reverse_iterator rend() const

Reversible Container

Valid for reversible container's only. Returns a const_reverse_iterator pointing to the end of the reversed container.

size_type size() const

Container

Returns the size of the view. [1]

size_type max_size() const

Container

Returns the largest possible size of the view.

bool empty() const

Container

true if the view's size is 0.

set_intersection_view()

view

Creates an empty view.

set_intersection_view(container_a&, container_b&, eq_fn_a = equal_fn_a(), eq_fn_b = equal_fn_b(), comp = compare_fn())

view

Creates a view of given container.

void swap(set_intersection_view&)

Container

Swaps the two views. Iterators are invalidated by this operation. For referencing views, the containers themselves are not swapped.

bool operator==(const set_intersection_view&, const set_intersection_view&)

Forward Container

Tests two views for equality. This is a global function, not a member function. Views may be equal even if their referenced containers are not.

bool operator<(const set_intersection_view&, const downcast_view&)

Forward Container

Lexicographical comparison. This is a global function, not a member function.

Notes

[1]



VTL Home
Copyright © 1999 Konrad-Zuse-Zentrum für Informationstechnik Berlin & Gary Powell All Rights Reserved.