OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
mslang::Mask Struct Reference

#include <Mask.h>

Inheritance diagram for mslang::Mask:
Collaboration diagram for mslang::Mask:

Classes

struct  IntPoint

Public Member Functions

virtual void print (int ident)
virtual void apply (std::vector< std::shared_ptr< Base > > &bfuncs)

Static Public Member Functions

static bool parse_detail (iterator &it, const iterator &end, Function *&fun)
static bool parse (iterator &it, const iterator &end, Function *&fun)

Public Attributes

std::vector< Rectanglepixels_m

Static Public Attributes

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_]*)\\‍((.*)"

Private Types

typedef std::pair< IntPoint, IntPointIntPixel_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

Detailed Description

Definition at line 8 of file Mask.h.

Member Typedef Documentation

◆ IntPixel_t

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

Definition at line 27 of file Mask.h.

Member Function Documentation

◆ apply()

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

Implements mslang::Function.

Definition at line 190 of file Mask.cpp.

References pixels_m.

◆ computeArea()

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().

Here is the caller graph for this function:

◆ findMaximalRectangle()

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:
Here is the caller graph for this function:

◆ minimizeNumberOfRectangles()

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:
Here is the caller graph for this function:

◆ parse()

◆ parse_detail()

bool mslang::Mask::parse_detail ( iterator & it,
const iterator & end,
Function *& fun )
static

Definition at line 120 of file Mask.cpp.

References end(), mslang::ArgumentExtractor::get(), PortableBitmapReader::getHeight(), mslang::ArgumentExtractor::getLengthConsumed(), PortableBitmapReader::getPixels(), PortableBitmapReader::getWidth(), mslang::Rectangle::height_m, minimizeNumberOfRectangles(), mslang::parseMathExpression(), pixels_m, mslang::Base::trafo_m, mslang::Rectangle::width_m, mslang::Mask::IntPoint::x_m, and mslang::Mask::IntPoint::y_m.

Referenced by mslang::Function::parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print()

void mslang::Mask::print ( int ident)
virtual

Implements mslang::Function.

Definition at line 186 of file Mask.cpp.

References pixels_m.

◆ updateCache()

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().

Here is the caller graph for this function:

Member Data Documentation

◆ Double

const std::string mslang::Function::Double = "(-?[0-9]+\\.?[0-9]*([Ee][+-]?[0-9]+)?)"
staticinherited

Definition at line 34 of file MSLang.h.

◆ FCall

const std::string mslang::Function::FCall = "([a-z_]*)\\‍((.*)"
staticinherited

Definition at line 36 of file MSLang.h.

Referenced by parse().

◆ pixels_m

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

Definition at line 13 of file Mask.h.

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

◆ UDouble

const std::string mslang::Function::UDouble = "([0-9]+\\.?[0-9]*([Ee][+-]?[0-9]+)?)"
staticinherited

Definition at line 33 of file MSLang.h.

Referenced by mslang::Rectangle::parse_detail().

◆ UInt

const std::string mslang::Function::UInt = "([0-9]+)"
staticinherited

Definition at line 35 of file MSLang.h.


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