isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
isce3::core::Linspace< typename > Class Template Reference

A uniformly-spaced sequence of values over some interval. More...

#include <Linspace.h>

Public Member Functions

CUDA_HOSTDEV constexpr Linspace (T first, T spacing, int size)
 Constructor. More...
 
template<typename U >
CUDA_HOSTDEV constexpr Linspace (const Linspace< U > &)
 
template<typename U >
CUDA_HOSTDEV constexpr
Linspace< T > & 
operator= (const Linspace< U > &)
 
CUDA_HOSTDEV constexpr T operator[] (int pos) const
 Return sample at the specified position. More...
 
CUDA_HOSTDEV constexpr T first () const
 First sample.
 
CUDA_HOSTDEV constexpr void first (T first)
 Set first sample.
 
CUDA_HOSTDEV constexpr T last () const
 Last sample.
 
CUDA_HOSTDEV constexpr T spacing () const
 Sample spacing.
 
CUDA_HOSTDEV constexpr void spacing (T spacing)
 Set Sample Spacing.
 
CUDA_HOSTDEV constexpr int size () const
 Number of samples.
 
CUDA_HOSTDEV constexpr void resize (int size)
 Change the number of samples in the sequence. More...
 
CUDA_HOSTDEV constexpr
Linspace< T > 
subinterval (int start, int stop) const
 Return a sub-Linspace over the half-open interval [start, stop). More...
 
CUDA_HOSTDEV constexpr bool empty () const
 Check if the sequence contains no samples. More...
 
template<typename U >
CUDA_HOSTDEV constexpr int search (U) const
 Return the position where the specified value would be inserted in the sequence in order to maintain sorted order.
 

Static Public Member Functions

CUDA_HOSTDEV static constexpr
Linspace< T > 
from_interval (T first, T last, int size)
 Construct a Linspace over the closed interval [first, last]. More...
 

Detailed Description

template<typename>
class isce3::core::Linspace< typename >

A uniformly-spaced sequence of values over some interval.

Constructor & Destructor Documentation

template<typename T >
CUDA_HOSTDEV constexpr isce3::core::Linspace< T >::Linspace ( first,
spacing,
int  size 
)

Constructor.

Parameters
[in]firstfirst sample
[in]spacingsample spacing
[in]sizenumber of samples

Member Function Documentation

template<typename >
CUDA_HOSTDEV constexpr bool isce3::core::Linspace< typename >::empty ( ) const
inline

Check if the sequence contains no samples.

template<typename T >
CUDA_HOSTDEV constexpr Linspace< T > isce3::core::Linspace< T >::from_interval ( first,
last,
int  size 
)
static

Construct a Linspace over the closed interval [first, last].

The behavior is undefined if size <= 1.

Parameters
[in]firstfirst sample in interval
[in]lastlast sample in interval
[in]sizenumber of samples
template<typename >
CUDA_HOSTDEV constexpr T isce3::core::Linspace< typename >::operator[] ( int  pos) const
inline

Return sample at the specified position.

The behavior is undefined if pos is out of range.

template<typename T >
CUDA_HOSTDEV constexpr void isce3::core::Linspace< T >::resize ( int  size)

Change the number of samples in the sequence.

Parameters
[in]sizenew size
template<typename T >
CUDA_HOSTDEV constexpr Linspace< T > isce3::core::Linspace< T >::subinterval ( int  start,
int  stop 
) const

Return a sub-Linspace over the half-open interval [start, stop).

The behavior is undefined if start or stop are out-of-range

Parameters
[in]startstart position
[in]stopend position

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

Generated for ISCE3.0 by doxygen 1.8.5.