26#if defined (HAVE_CONFIG_H)
44#define INLINE_ASCENDING_SORT 1
45#define INLINE_DESCENDING_SORT 1
52 return octave::math::isnan (
x);
56nan_ascending_compare (
double x,
double y)
58 return octave::math::isnan (y) ? ! octave::math::isnan (
x) :
x < y;
62nan_descending_compare (
double x,
double y)
64 return octave::math::isnan (
x) ? ! octave::math::isnan (y) :
x > y;
75 for (; k < a.
numel () && ! octave::math::isnan (a(k)); k++) ;
88 result = nan_ascending_compare;
90 result = nan_descending_compare;
105 const double *el = data ();
113 if (el[n-1] < el[0] || octave::math::isnan (el[0]))
126 while (octave::math::isnan (r) && j < n);
144 while (n > 0 && octave::math::isnan (el[n-1]))
#define INSTANTIATE_ARRAY(T, API)
template std::ostream & operator<<(std::ostream &, const Array< double > &)
Array< double >::compare_fcn_type safe_comparator(sortmode mode, const Array< double > &a, bool allow_chk)
bool sort_isnan< double >(double x)
N Dimensional Array with copy-on-write semantics.
sortmode issorted(sortmode mode=UNSORTED) const
Ordering is auto-detected or can be specified.
octave_idx_type numel() const
Number of elements in the array.
F77_RET_T const F77_DBLE * x
T::size_type numel(const T &str)