rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
rexlib::extent_domain Class Reference

Set of extents an axis may take. More...

#include <rexlib/core/operation/shape_rule/extent_domain.hpp>

Public Types

using contains_function_type = bool(*)(std::size_t)
 Membership test of a domain.
 

Public Member Functions

 extent_domain (contains_function_type contains, const char *description) noexcept
 Construct a domain.
 
bool contains (std::size_t extent) const noexcept
 Check whether the domain admits an extent.
 
const char * get_description () const noexcept
 Get what the domain admits.
 

Detailed Description

Set of extents an axis may take.

Type erased form of an extent domain tag, such as positive_extent_domain, so that a rule lowered to tables refers to its domains without their types.

Constructor & Destructor Documentation

◆ extent_domain()

rexlib::extent_domain::extent_domain ( contains_function_type  contains,
const char *  description 
)
noexcept

Construct a domain.

Parameters
containsThe membership test. Must not be null.
descriptionWhat the domain admits, for diagnostics, such as "at least one". Must not be null and must have static storage duration.

Member Function Documentation

◆ contains()

bool rexlib::extent_domain::contains ( std::size_t  extent) const
noexcept

Check whether the domain admits an extent.

Parameters
extentThe extent.
Returns
true The extent belongs to the domain.
false The extent does not belong to the domain.

◆ get_description()

const char * rexlib::extent_domain::get_description ( ) const
noexcept

Get what the domain admits.

Returns
const char* The description.

The documentation for this class was generated from the following file: