Carna  Version 3.3.2
Public Member Functions | Public Attributes | List of all members
Carna::base::math::Span< T > Class Template Reference

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

#include <Span.h>

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. More...
 

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 Carna::base::math::Span< T >

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

Author
Leonid Kostrykin
Date
12.3.13

Definition at line 43 of file Span.h.

Constructor & Destructor Documentation

◆ Span()

template<typename T>
Carna::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 96 of file Span.h.

Member Function Documentation

◆ operator<()

template<typename T>
bool Carna::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 118 of file Span.h.


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