5 namespace isce3 {
namespace core {
42 Linspace(
const Linspace<U> &);
47 Linspace<T> & operator=(
const Linspace<U> &);
56 T
operator[](
int pos)
const {
return _first + pos * _spacing; }
61 T
first()
const {
return _first; }
86 int size()
const {
return _size; }
112 bool empty()
const {
return _size == 0; }
129 template<
typename T,
typename U>
132 bool operator==(
const Linspace<T> &,
const Linspace<U> &);
134 template<
typename T,
typename U>
137 bool operator!=(
const Linspace<T> &,
const Linspace<U> &);
141 #define ISCE_CORE_LINSPACE_ICC
142 #include "Linspace.icc"
143 #undef ISCE_CORE_LINSPACE_ICC
CUDA_HOSTDEV constexpr int size() const
Number of samples.
Definition: Linspace.h:86
CUDA_HOSTDEV constexpr void resize(int size)
Change the number of samples in the sequence.
Definition: Linspace.icc:58
A uniformly-spaced sequence of values over some interval.
Definition: forward.h:28
CUDA_HOSTDEV constexpr T operator[](int pos) const
Return sample at the specified position.
Definition: Linspace.h:56
CUDA_HOSTDEV static constexpr Linspace< T > from_interval(T first, T last, int size)
Construct a Linspace over the closed interval [first, last].
Definition: Linspace.icc:13
CUDA_HOSTDEV constexpr T last() const
Last sample.
Definition: Linspace.h:71
CUDA_HOSTDEV constexpr T spacing() const
Sample spacing.
Definition: Linspace.h:76
CUDA_HOSTDEV constexpr void spacing(T spacing)
Set Sample Spacing.
Definition: Linspace.h:81
CUDA_HOSTDEV constexpr void first(T first)
Set first sample.
Definition: Linspace.h:66
CUDA_HOSTDEV constexpr T first() const
First sample.
Definition: Linspace.h:61
CUDA_HOSTDEV constexpr Linspace< T > subinterval(int start, int stop) const
Return a sub-Linspace over the half-open interval [start, stop).
Definition: Linspace.icc:68
CUDA_HOSTDEV constexpr int search(U) const
Return the position where the specified value would be inserted in the sequence in order to maintain ...
Definition: Linspace.icc:77
CUDA_HOSTDEV constexpr bool empty() const
Check if the sequence contains no samples.
Definition: Linspace.h:112