shards Version of the Day
Loading...
Searching...
No Matches
shards::Compare< n, i > Struct Template Reference

Lexicographical comparison of two arrays. More...

#include <Shards_SimpleArrayOps.hpp>

Public Types

enum  {
  N = n ,
  I = i
}
 

Static Public Member Functions

template<typename T >
static bool equal (const T *const x, const T *const y)
 All members are equal.
 
template<typename T >
static bool not_equal (const T *const x, const T *const y)
 All members are not equal.
 
template<typename T >
static bool less (const T *const x, const T *const y)
 First non-equal members satisfy x[k] < y[k].
 
template<typename T >
static bool less_equal (const T *const x, const T *const y)
 First non-equal members satisfies x[k] <= y[k].
 
template<typename T >
static bool greater (const T *const x, const T *const y)
 First non-equal members satisfies x[k] > y[k].
 
template<typename T >
static bool greater_equal (const T *const x, const T *const y)
 First non-equal members satisfies x[k] >= y[k].
 

Detailed Description

template<unsigned n, unsigned i = 0>
struct shards::Compare< n, i >

Lexicographical comparison of two arrays.

Template Parameters
nNumber of members to iterate.

Definition at line 194 of file Shards_SimpleArrayOps.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned n, unsigned i = 0>
anonymous enum

Definition at line 195 of file Shards_SimpleArrayOps.hpp.

Constructor & Destructor Documentation

◆ Compare()

template<unsigned n, unsigned i = 0>
shards::Compare< n, i >::Compare ( )
inline

Definition at line 235 of file Shards_SimpleArrayOps.hpp.

Member Function Documentation

◆ equal()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::equal ( const T *const x,
const T *const y )
inlinestatic

All members are equal.

Definition at line 199 of file Shards_SimpleArrayOps.hpp.

◆ not_equal()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::not_equal ( const T *const x,
const T *const y )
inlinestatic

All members are not equal.

Definition at line 204 of file Shards_SimpleArrayOps.hpp.

◆ less()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::less ( const T *const x,
const T *const y )
inlinestatic

First non-equal members satisfy x[k] < y[k].

Definition at line 209 of file Shards_SimpleArrayOps.hpp.

◆ less_equal()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::less_equal ( const T *const x,
const T *const y )
inlinestatic

First non-equal members satisfies x[k] <= y[k].

Definition at line 216 of file Shards_SimpleArrayOps.hpp.

◆ greater()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::greater ( const T *const x,
const T *const y )
inlinestatic

First non-equal members satisfies x[k] > y[k].

Definition at line 223 of file Shards_SimpleArrayOps.hpp.

◆ greater_equal()

template<unsigned n, unsigned i = 0>
template<typename T >
static bool shards::Compare< n, i >::greater_equal ( const T *const x,
const T *const y )
inlinestatic

First non-equal members satisfies x[k] >= y[k].

Definition at line 230 of file Shards_SimpleArrayOps.hpp.


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