Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Sketch.cc File Reference

#include "Sketch.h"
Include dependency graph for Sketch.cc:

Go to the source code of this file.

Namespaces

namespace  DualCoding
 

Dual coding vision representations (Sketches and Shapes).


Defines

#define DEF_MATHOPS_CC(_T1, _T2, _Result)
#define DEF_MATHOP_CC(_Op, _T1, _T2, _Result)
#define DEF_MATHOPS_INT_CC(_T1)
#define DEF_MATHOP_INT_CC(_Op, _T1)
#define DEF_MATHBOOL_INT_CC(_Op)

Functions

 DEF_MATHOPS_CC (bool, uchar, uchar) DEF_MATHOPS_CC(bool
uint DEF_MATHOPS_CC (bool, float, float) DEF_MATHOPS_CC(uchar
uint uchar DEF_MATHOPS_CC (uchar, uchar, uchar) DEF_MATHOPS_CC(uchar
uint uchar uint DEF_MATHOPS_CC (uchar, float, float) DEF_MATHOPS_CC(usint
uint uchar uint usint DEF_MATHOPS_CC (usint, uchar, usint) DEF_MATHOPS_CC(usint
uint uchar uint usint usint DEF_MATHOPS_CC (usint, float, float) DEF_MATHOPS_CC(uint
uint uchar uint usint usint uint DEF_MATHOPS_CC (uint, uchar, uint) DEF_MATHOPS_CC(uint
uint uchar uint usint usint
uint uint 
DEF_MATHOPS_CC (uint, float, float) DEF_MATHOPS_CC(float
uint uchar uint usint usint
uint uint float 
DEF_MATHOPS_CC (float, uchar, float) DEF_MATHOPS_CC(float
uint uchar uint usint usint
uint uint float float 
DEF_MATHOPS_CC (float, float, float) DEF_MATHOPS_INT_CC(uchar) DEF_MATHOPS_INT_CC(usint) DEF_MATHOPS_INT_CC(uint) DEF_MATHOPS_INT_CC(float) DEF_MATHBOOL_INT_CC(+) DEF_MATHBOOL_INT_CC(-) DEF_MATHBOOL_INT_CC(*) DEF_MATHBOOL_INT_CC(/) template<> Sketch< bool >
Sketch< bool > & operator&= (Sketch< bool > &arg1, Sketch< bool > const &arg2)
Sketch< bool > & operator|= (Sketch< bool > &arg1, Sketch< bool > const &arg2)
Sketch< bool > & operator^= (Sketch< bool > &arg1, Sketch< bool > const &arg2)

Variables

uint bool
 non-member math operators

Define Documentation

#define DEF_MATHBOOL_INT_CC ( _Op   ) 
Value:
Sketch<uchar> operator _Op (const Sketch<bool>& lhs, const int value) { \
  Sketch<uchar> result(lhs->getName() + #_Op + "scalar", lhs); \
  uchar* dest = &(*result.pixels)[0]; \
  const bool* src1 = &(*lhs.pixels)[0]; \
  const bool* end1 = &(*lhs.pixels)[lhs->getNumPixels()]; \
  while ( src1 != end1 ) \
    *dest++ = *src1++ _Op (uchar)value; \
  return result; \
}

Referenced by DualCoding::DEF_MATHOPS_CC().

#define DEF_MATHOP_CC ( _Op,
_T1,
_T2,
_Result   ) 
Value:
Sketch<_Result> operator _Op (const Sketch<_T1> &lhs, const Sketch<_T2> &rhs) { \
  Sketch<_Result> result(lhs->getName() + #_Op + rhs->getName(), lhs); \
  _Result* dest = &(*result.pixels)[0]; \
  const _T1* src1 = &(*lhs.pixels)[0]; \
  const _T1* end1 = &(*lhs.pixels)[lhs->getNumPixels()]; \
  const _T2* src2 = &(*rhs.pixels)[0]; \
  while ( src1 != end1 ) \
    *dest++ = *src1++ _Op *src2++; \
  return result; \
} \
/* continued... */ \
Sketch<_Result> operator _Op (const Sketch<_T1> &lhs, const _T2 value) { \
  Sketch<_Result> result(lhs->getName() + #_Op + "scalar", lhs); \
  _Result* dest = &(*result.pixels)[0]; \
  const _T1* src1 = &(*lhs.pixels)[0]; \
  const _T1* end1 = &(*lhs.pixels)[lhs->getNumPixels()]; \
  while ( src1 != end1 ) \
    *dest++ = *src1++ _Op (_Result)value; \
  return result; \
}

Definition at line 16 of file Sketch.cc.

#define DEF_MATHOP_INT_CC ( _Op,
_T1   ) 
Value:
Sketch<_T1> operator _Op (const Sketch<_T1>& lhs, const int value) { \
  Sketch<_T1> result(lhs->getName() + #_Op + "scalar", lhs); \
  *result.pixels = *lhs.pixels _Op (_T1)(value); \
  return result; \
}
#define DEF_MATHOPS_CC ( _T1,
_T2,
_Result   ) 
Value:
DEF_MATHOP_CC( +, _T1, _T2, _Result ) \
  DEF_MATHOP_CC( -, _T1, _T2, _Result ) \
  DEF_MATHOP_CC( *, _T1, _T2, _Result ) \
  DEF_MATHOP_CC( /, _T1, _T2, _Result )

Definition at line 10 of file Sketch.cc.

#define DEF_MATHOPS_INT_CC ( _T1   ) 
Value:
DEF_MATHOP_INT_CC( +, _T1) \
  DEF_MATHOP_INT_CC( -, _T1) \
  DEF_MATHOP_INT_CC( *, _T1) \
  DEF_MATHOP_INT_CC( /, _T1)

Referenced by DualCoding::DEF_MATHOPS_CC().


DualCoding 5.1CVS
Generated Mon May 9 04:56:29 2016 by Doxygen 1.6.3