OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | List of all members
mslang::Mask Struct Reference

#include <Mask.h>

Inheritance diagram for mslang::Mask:
Inheritance graph
[legend]
Collaboration diagram for mslang::Mask:
Collaboration graph
[legend]

Classes

struct  IntPoint
 

Public Member Functions

virtual void print (int ident)
 
virtual void apply (std::vector< std::shared_ptr< Base > > &bfuncs)
 
- Public Member Functions inherited from mslang::Function
virtual ~Function ()
 
virtual void apply (std::vector< std::shared_ptr< Base >> &bfuncs)=0
 

Static Public Member Functions

static bool parse_detail (iterator &it, const iterator &end, Function *&fun)
 
- Static Public Member Functions inherited from mslang::Function
static bool parse (iterator &it, const iterator &end, Function *&fun)
 

Public Attributes

std::vector< Rectanglepixels_m
 

Private Types

typedef std::pair< IntPoint,
IntPoint
IntPixel_t
 

Private Member Functions

std::vector< IntPixel_tminimizeNumberOfRectangles (std::vector< bool > pixels, unsigned int height, unsigned int width)
 
std::pair< IntPoint, IntPointfindMaximalRectangle (const std::vector< bool > &pixels, unsigned int height, unsigned int width) const
 
unsigned int computeArea (const IntPoint &ll, const IntPoint &ur) const
 
void updateCache (const std::vector< bool > &pixels, std::vector< unsigned int > &cache, unsigned int y) const
 

Additional Inherited Members

- Static Public Attributes inherited from mslang::Function
static const std::string UDouble = "([0-9]+\\.?[0-9]*([Ee][+-]?[0-9]+)?)"
 
static const std::string Double = "(-?[0-9]+\\.?[0-9]*([Ee][+-]?[0-9]+)?)"
 
static const std::string UInt = "([0-9]+)"
 
static const std::string FCall = "([a-z_]*)\\((.*)"
 

Detailed Description

Definition at line 8 of file Mask.h.

Member Typedef Documentation

typedef std::pair<IntPoint, IntPoint> mslang::Mask::IntPixel_t
private

Definition at line 27 of file Mask.h.

Member Function Documentation

void mslang::Mask::apply ( std::vector< std::shared_ptr< Base > > &  bfuncs)
virtual

Definition at line 190 of file Mask.cpp.

References pixels_m.

unsigned int mslang::Mask::computeArea ( const IntPoint ll,
const IntPoint ur 
) const
private

Definition at line 22 of file Mask.cpp.

References mslang::Mask::IntPoint::x_m, and mslang::Mask::IntPoint::y_m.

Referenced by minimizeNumberOfRectangles().

std::pair< Mask::IntPoint, Mask::IntPoint > mslang::Mask::findMaximalRectangle ( const std::vector< bool > &  pixels,
unsigned int  height,
unsigned int  width 
) const
private

Definition at line 29 of file Mask.cpp.

References updateCache(), mslang::Mask::IntPoint::x_m, and mslang::Mask::IntPoint::y_m.

Referenced by minimizeNumberOfRectangles().

Here is the call graph for this function:

std::vector< Mask::IntPixel_t > mslang::Mask::minimizeNumberOfRectangles ( std::vector< bool >  pixels,
unsigned int  height,
unsigned int  width 
)
private

Definition at line 81 of file Mask.cpp.

References computeArea(), and findMaximalRectangle().

Referenced by parse_detail().

Here is the call graph for this function:

bool mslang::Mask::parse_detail ( iterator it,
const iterator end,
Function *&  fun 
)
static
void mslang::Mask::print ( int  ident)
virtual

Implements mslang::Function.

Definition at line 186 of file Mask.cpp.

References pixels_m.

void mslang::Mask::updateCache ( const std::vector< bool > &  pixels,
std::vector< unsigned int > &  cache,
unsigned int  y 
) const
private

Definition at line 10 of file Mask.cpp.

Referenced by findMaximalRectangle().

Member Data Documentation

std::vector<Rectangle> mslang::Mask::pixels_m

Definition at line 13 of file Mask.h.

Referenced by apply(), parse_detail(), and print().


The documentation for this struct was generated from the following files: