OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
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, int height, int width)
std::pair< IntPoint, IntPointfindMaximalRectangle (const std::vector< bool > &pixels, int height, int width) const
long computeArea (const IntPoint &ll, const IntPoint &ur) 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()

long mslang::Mask::computeArea ( const IntPoint & ll,
const IntPoint & ur ) const
private

Definition at line 23 of file Mask.cpp.

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

Referenced by minimizeNumberOfRectangles().

◆ findMaximalRectangle()

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

Definition at line 30 of file Mask.cpp.

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

Referenced by minimizeNumberOfRectangles().

◆ minimizeNumberOfRectangles()

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

Definition at line 83 of file Mask.cpp.

References computeArea(), and findMaximalRectangle().

Referenced by parse_detail().

Here is the call graph for this function:

◆ parse()

◆ parse_detail()

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

◆ print()

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

Implements mslang::Function.

Definition at line 186 of file Mask.cpp.

References pixels_m.

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: