Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Requirements for Sorted Matrix Search Traits Classes

Definition

A class Sms_traits that satisfies the requirements of a traits class for the sorted matrix search algorithm has to provide the following types and operations.

Types

Sms_traits::Matrix
The class used for representing matrices. It has to fulfill the requirements listed in section reference.

typedef Matrix::Value
Value; The class used for representing the matrix elements.

Sms_traits::Compare_strictly
An adaptable binary function class: Value × Value bool defining a non-reflexive total order on Value. This determines the direction of the search.


Sms_traits::Compare_non_strictly
An adaptable binary function class: Value × Value bool defining the reflexive total order on Value corresponding to Compare_strictly.

Operations

Compare_strictly t.compare_strictly () const
returns the Compare_strictly object to be used for the search.

Compare_non_strictly
t.compare_non_strictly () const
returns the Compare_non_strictly object to be used for the search.

bool t.is_feasible ( const Value& a)
The predicate to determine whether an element a is feasible. It has to be monotone in the sense that compare( a, b) and is_feasible( a) imply is_feasible( b).

See Also

In section reference we define an adaptor Sorted_matrix_search_traits_adaptor to create sorted matrix search traits classes for arbitrary feasibility test and matrix classes.


Next: Class declaration of Sorted_matrix_search_traits_adaptor<F,M>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.