4#ifndef _a4690364_ec62_4b06_aebc_5b4dc3f92f29
5#define _a4690364_ec62_4b06_aebc_5b4dc3f92f29
9#include <boost/dynamic_bitset.hpp>
75 boost::dynamic_bitset<> _mask;
78 std::size_t _index(
Point const & p)
const;
A two dimensional mask.
Definition Mask.h:18
std::vector< Point > Points
Container of Point.
Definition Mask.h:26
std::size_t size() const
Return the total number of points in the mask.
Mask & operator|=(Mask const &right)
In-place union of two masks.
Shape const & shape() const
Return the shape of the mask.
static bool lessX(Point const &p, Point const &q)
Compare points according to their x coordinate.
Definition Mask.h:29
Mask & enable(Point const &p)
Enable a point.
Mask(Shape const &shape={}, bool value=true)
Create a constant mask.
Mask & disable(Point const &p)
Disable a point.
Mask & operator&=(Mask const &right)
In-place intersection of two masks.
Mask & flip()
Switch the status of all points (enabled ↔ disabled)
Points enabledPoints() const
Return a vector of enabled points.
std::size_t count() const
Return the number of enabled points.
static bool lessKz(Point const &p, Point const &q)
Compare points according to their kz coordinate.
Definition Mask.h:38
static bool lessKy(Point const &p, Point const &q)
Compare points according to their ky coordinate.
Definition Mask.h:32
static bool lessY(Point const &p, Point const &q)
Compare points according to their y coordinate.
Definition Mask.h:35
bool enabled(Point const &p) const
Check whether the point is enabled.
Top-level namespace of the msl library.
Definition acceleration.h:17
Mask operator&(Mask left, Mask const &right)
Intersection of two masks.
Mask operator!(Mask mask)
Retrun a switched mask (enabled ↔ disabled)
Vector< 2, long > Vector2l
2D vector of longs
Definition Vector.h:117
std::ostream & operator<<(std::ostream &stream, Mask const &mask)
Visual representation of the mask.
Mask operator|(Mask left, Mask const &right)
Union of two masks.