GNU Octave  4.2.1
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 | Typedefs | Functions | Variables
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.

Classes

struct  icmp_char_gt
 
struct  icmp_char_lt
 

Macros

#define INT_ARRAY_LOOKUP(TYPE)
 

Typedefs

using i = 1:columns (ar{r}) y = [y, ar{x}(ar{r}(1,i)*ones(1, ar{r}(2,i)))]
 

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) then ode
 
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)
 
for all then the tests are
reversed For non strictly
monotonic empty intervals are
always skipped The result is
undefined if or if the
complexity is 
O (min(M *log(N), M+N)).ar
 

Variables

for all then the tests are
reversed For non strictly
monotonic empty intervals are
always skipped The result is
undefined if 
ar {table} is not monotonic
 
for all ode {y(i)} within the table. If ode{y(i) < table(1)} then ode{idx(i)} is 0. If ode{y(i) >= table(end)} or ode{isnan (y(i))} then ode{idx(i)} is ode{n}. If the table is decreasing
 
 otherwise
 
for all then the tests are
reversed For non strictly
monotonic 
tables
 

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);
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:111
octave_value retval
Definition: data.cc:6294
the element is set to zero In other the statement xample y
Definition: data.cc:5342

Definition at line 103 of file lookup.cc.

Typedef Documentation

int i = 1:columns (ar{r}) y = [y, ar{x}(ar{r}(1,i)*ones(1, ar{r}(2,i)))]

Definition at line 239 of file lookup.cc.

Function Documentation

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

Definition at line 45 of file lookup.cc.

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
OCTAVE_EXPORT octave_value_list Flookup ( const octave_value_list args,
int   
)

Definition at line 239 of file lookup.cc.

Referenced by install_lookup_fcns().

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 88 of file lookup.cc.

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

for all then the tests are reversed For non strictly monotonic empty intervals are always skipped The result is undefined if or if the complexity is O ( min(M *log(N), M+N )

Definition at line 239 of file lookup.cc.

Variable Documentation

and ar {table} is not monotonic

Definition at line 239 of file lookup.cc.

ode {y(i)} within the table. If ode{y(i) < table(1)} then ode{idx(i)} is 0. If ode{y(i) >= table(end)} or ode{isnan (y(i))} then ode{idx(i)} is ode{n}. If the table is decreasing

Definition at line 239 of file lookup.cc.

otherwise

Definition at line 239 of file lookup.cc.

for all then the tests are reversed For non strictly monotonic tables

Definition at line 239 of file lookup.cc.