isce3 0.25.0
Loading...
Searching...
No Matches
isce3::core::Linspace< T > 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.
 
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.
 
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.
 
CUDA_HOSTDEV constexpr Linspace< T > subinterval (int start, int stop) const
 Return a sub-Linspace over the half-open interval [start, stop).
 
CUDA_HOSTDEV constexpr bool empty () const
 Check if the sequence contains no samples.
 
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].
 

Detailed Description

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

A uniformly-spaced sequence of values over some interval.

Constructor & Destructor Documentation

◆ Linspace()

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

Constructor.

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

Member Function Documentation

◆ from_interval()

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

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

◆ operator[]()

template<typename T>
CUDA_HOSTDEV constexpr T isce3::core::Linspace< T >::operator[] ( int pos) const
inlineconstexpr

Return sample at the specified position.

The behavior is undefined if pos is out of range.

◆ resize()

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

Change the number of samples in the sequence.

Parameters
[in]sizenew size

◆ subinterval()

template<typename T>
CUDA_HOSTDEV constexpr Linspace< T > isce3::core::Linspace< T >::subinterval ( int start,
int stop ) const
constexpr

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