GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions
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 "gripes.h"
#include "oct-obj.h"
#include "ov.h"
Include dependency graph for lookup.cc:

Go to the source code of this file.

Classes

struct  icmp_char_gt
struct  icmp_char_lt

Macros

#define INT_ARRAY_LOOKUP(TYPE)

Functions

static bool contains_char (const std::string &str, char c)
template<class 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<class 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

#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);

Definition at line 103 of file lookup.cc.

Referenced by Flookup().

Function Documentation

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

Definition at line 45 of file lookup.cc.

Referenced by Flookup().

template<class 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 111 of file lookup.cc.

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

Referenced by Flookup().

OCTAVE_EXPORT octave_value_list Flookup ( const octave_value_list args,
int   
)
template<class 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 88 of file lookup.cc.

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