Carna Version 3.3.3
Loading...
Searching...
No Matches
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.
 

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() [1/3]

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

Instantiates.

Definition at line 89 of file Span.h.

◆ Span() [2/3]

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.

◆ Span() [3/3]

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

Copies other.

Definition at line 103 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.

◆ operator==()

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

Returns whether this span equals other.

Definition at line 111 of file Span.h.

Member Data Documentation

◆ first

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

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

Definition at line 78 of file Span.h.

◆ last

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

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

Definition at line 83 of file Span.h.


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