GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lookup.cc File Reference
#include <cctype>
#include <functional>
#include <algorithm>
#include "dNDArray.h"
#include "CNDArray.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "ovl.h"
#include "ov.h"
Include dependency graph for lookup.cc:

Go to the source code of this file.

Macros

#define INT_ARRAY_LOOKUP(TYPE)
 

Functions

static bool contains_char (const std::string &str, char c)
 
template<typename ArrayT >
static octave_value do_numeric_lookup (const ArrayT &array, const ArrayT &values, bool left_inf, bool right_inf, bool match_idx, bool match_bool)
 
OCTAVE_EXPORT octave_value_list Flookup (const octave_value_list &args, int)
 
template<typename T >
sortmode get_sort_mode (const Array< T > &array, typename octave_sort< T >::compare_fcn_type desc_comp=octave_sort< T >::descending_compare)
 

Macro Definition Documentation

◆ INT_ARRAY_LOOKUP

#define INT_ARRAY_LOOKUP (   TYPE)
Value:
(table.is_ ## TYPE ## _type () && y.is_ ## TYPE ## _type ()) \
retval = do_numeric_lookup (table.TYPE ## _array_value (), \
y.TYPE ## _array_value (), \
left_inf, right_inf, \
match_idx, match_bool);
static octave_value do_numeric_lookup(const ArrayT &array, const ArrayT &values, bool left_inf, bool right_inf, bool match_idx, bool match_bool)
Definition: lookup.cc:77
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition: ov.cc:811

Definition at line 69 of file lookup.cc.

Function Documentation

◆ contains_char()

static bool contains_char ( const std::string &  str,
char  c 
)
static

Definition at line 46 of file lookup.cc.

Referenced by Flookup().

◆ do_numeric_lookup()

template<typename ArrayT >
static octave_value do_numeric_lookup ( const ArrayT &  array,
const ArrayT &  values,
bool  left_inf,
bool  right_inf,
bool  match_idx,
bool  match_bool 
)
static

Definition at line 77 of file lookup.cc.

References Array< T >::dims(), Array< T >::lookup(), max(), min(), n, retval, and Array< T >::xelem().

Referenced by Flookup().

◆ Flookup()

◆ get_sort_mode()

template<typename T >
sortmode get_sort_mode ( const Array< T > &  array,
typename octave_sort< T >::compare_fcn_type  desc_comp = octave_sort<T>::descending_compare 
)
inline

Definition at line 54 of file lookup.cc.

References ASCENDING, DESCENDING, n, and Array< T >::numel().