Navigation

Operators and Keywords

Function List:

C++ API

op-str-str.cc File Reference

#include "gripes.h"
#include "oct-obj.h"
#include "ov.h"
#include "ov-str-mat.h"
#include "ov-typeinfo.h"
#include "ov-null-mat.h"
#include "ops.h"
Include dependency graph for op-str-str.cc:

Defines

#define DEFCHARNDBINOP_FN(name, op, t1, t2, e1, e2, f)

Functions

 DEFUNOP (transpose, char_matrix_str)
 DEFASSIGNOP (assign, char_matrix_str, char_matrix_str)
void install_str_str_ops (void)

Define Documentation

#define DEFCHARNDBINOP_FN (   name,
  op,
  t1,
  t2,
  e1,
  e2,
  f 
)
Value:
BINOPDECL (name, a1, a2) \
  { \
    dim_vector a1_dims = a1.dims (); \
    dim_vector a2_dims = a2.dims (); \
 \
    bool a1_is_scalar = a1_dims.all_ones (); \
    bool a2_is_scalar = a2_dims.all_ones (); \
 \
    CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
 \
    if (a1_is_scalar) \
      { \
        if (a2_is_scalar) \
          return octave_value ((v1.e1 ## _value ())(0) op (v2.e2 ## _value ())(0)); \
        else \
          return octave_value (f ((v1.e1 ## _value ())(0), v2.e2 ## _value ())); \
      } \
    else \
      { \
        if (a2_is_scalar) \
          return octave_value (f (v1.e1 ## _value (), (v2.e2 ## _value ())(0))); \
        else \
          return octave_value (f (v1.e1 ## _value (), v2.e2 ## _value ())); \
      } \
  }

Function Documentation

DEFASSIGNOP ( assign  ,
char_matrix_str  ,
char_matrix_str   
)
DEFUNOP ( transpose  ,
char_matrix_str   
)
void install_str_str_ops ( void   ) 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines