Skip to main content

class region

Declaration

template <int Dims>
class region { /* full declaration omitted */ };

Description

An arbitrary-dimensional set of points described by a normalized tiling of boxes.

Template Parameters

int Dims

Member Variables

static const int dimensions = Dims
box_vector m_boxes

Member Aliases

  • using box = detail::box<Dims>;
  • using box_vector = detail::box_vector<Dims>;

Member Function Overview

Friend Function Overview

  • operator!=(const region<Dims> & lhs, const region<Dims> & rhs) → friend bool
  • operator==(const region<Dims> & lhs, const region<Dims> & rhs) → friend bool

Member Functions

bool empty() const


size_t get_area() const

Description

Counts the number of points covered by the region.


const box_vector& get_boxes() const&


int get_effective_dims() const

Description

Returns the smallest dimensionality that *this can be region_cast to.


box_vector into_boxes() &&


region()


region(const box& single_box)

Parameters

const box& single_box

region(const subrange<Dims>& single_sr)

Parameters

const subrange<Dims>& single_sr

explicit region(box_vector&& boxes)

Description

Constructs a region by normalizing an arbitrary, potentially-overlapping tiling of boxes.

Parameters

box_vector&& boxes

region(grid_detail::normalized_t,
       box_vector&& boxes)

Parameters

grid_detail::normalized_t
box_vector&& boxes

Friend Functions

friend bool operator!=(const region<Dims>& lhs,
                       const region<Dims>& rhs)

Parameters

const region<Dims>& lhs
const region<Dims>& rhs

friend bool operator==(const region<Dims>& lhs,
                       const region<Dims>& rhs)

Parameters

const region<Dims>& lhs
const region<Dims>& rhs