LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LibCarna::base::math::Span< T > Class Template Reference

Defines an interval \(\left[a, b\right]\) with \(a,b \in\) T. More...

#include <Span.hpp>

Public Member Functions

 Span ()
 Instantiates.
 
 Span (const T &first, const T &last)
 
 Span (const Span< T > &other)
 Copies other.
 
bool operator== (const Span< T > &other) const
 Returns whether this span equals other.
 
bool operator< (const Span< T > &other) const
 Compares this span to other.
 

Public Attributes

first
 Holds the \(a\) of \(\left[a, b\right]\).
 
last
 Holds the \(b\) of \(\left[a, b\right]\).
 

Detailed Description

template<typename T>
class LibCarna::base::math::Span< T >

Defines an interval \(\left[a, b\right]\) with \(a,b \in\) T.

Author
Leonid Kostrykin

Definition at line 46 of file Span.hpp.

Constructor & Destructor Documentation

◆ Span() [1/3]

template<typename T >
LibCarna::base::math::Span< T >::Span ( )

Instantiates.

Definition at line 92 of file Span.hpp.

◆ Span() [2/3]

template<typename T >
LibCarna::base::math::Span< T >::Span ( const T &  first,
const T &  last 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 99 of file Span.hpp.

◆ Span() [3/3]

template<typename T >
LibCarna::base::math::Span< T >::Span ( const Span< T > &  other)

Copies other.

Definition at line 106 of file Span.hpp.

Member Function Documentation

◆ operator<()

template<typename T >
bool LibCarna::base::math::Span< T >::operator< ( const Span< T > &  other) const

Compares this span to other.

The ordering is determined by the spans' first attribute. If they are equal in first, the ordering is done through comparison of the last attributes.

Definition at line 121 of file Span.hpp.

◆ operator==()

template<typename T >
bool LibCarna::base::math::Span< T >::operator== ( const Span< T > &  other) const

Returns whether this span equals other.

Definition at line 114 of file Span.hpp.

Member Data Documentation

◆ first

template<typename T >
T LibCarna::base::math::Span< T >::first

Holds the \(a\) of \(\left[a, b\right]\).

Definition at line 81 of file Span.hpp.

◆ last

template<typename T >
T LibCarna::base::math::Span< T >::last

Holds the \(b\) of \(\left[a, b\right]\).

Definition at line 86 of file Span.hpp.


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