Regina Calculation Engine
Public Member Functions | List of all members
regina::LightweightSequence< T >::Less Struct Reference

A binary function object that compares sequences lexicographically, for use in containers that hold pointers to sequences. More...

#include <utilities/sequence.h>

Public Member Functions

bool operator() (const LightweightSequence *a, const LightweightSequence *b) const
 Compares two sequences lexicographically. More...
 

Detailed Description

template<typename T>
struct regina::LightweightSequence< T >::Less

A binary function object that compares sequences lexicographically, for use in containers that hold pointers to sequences.

Precondition
The type T supports the less-than operator.

Member Function Documentation

◆ operator()()

template<typename T >
bool regina::LightweightSequence< T >::Less::operator() ( const LightweightSequence a,
const LightweightSequence b 
) const
inline

Compares two sequences lexicographically.

The sequences need not be the same size.

This routine is identical to testing (*a) < (*b).

Parameters
aa pointer to the first of the two sequences to compare.
ba pointer to the second of the two sequences to compare.
Returns
true if sequence a is strictly lexicographically smaller than sequence b, or false if a is either lexicographically greater than or equal to b.

The documentation for this struct was generated from the following file:

Copyright © 1999-2016, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).