Skip to content

Class gl::binary_color

ClassList > gl > binary_color

A specialized color property for algorithms requiring binary states (e.g., bipartition).

  • #include <gl/types/properties.hpp>

Public Types

Type Name
enum std::uint8_t value
The discrete states available for binary coloring.

Public Functions

Type Name
binary_color () = default
binary_color (value value)
binary_color (const binary_color &) = default
binary_color (binary_color &&) noexcept
binary_color & operator= (const binary_color &) = default
binary_color & operator= (binary_color &&) noexcept
~binary_color () = default
binary_color & operator= (value value)
auto operator<=> (const binary_color &) const
bool operator== (const binary_color &) const
operator bool () const
Returns true if the color is either Black or White (i.e., not Unset).
bool is_set () const
Explicit check to see if the color state is not unset .
std::underlying_type_t< value > to_underlying () const
Returns the integer representation of the current color state.
binary_color next () const
Returns a new binary_color representing the opposite state (Black <-> White).

Public Types Documentation

enum value

The discrete states available for binary coloring.

enum gl::binary_color::value {
    black = static_cast<std::uint8_t>(0),
    white = static_cast<std::uint8_t>(1),
    unset = static_cast<std::uint8_t>(2)
};


Public Functions Documentation

function binary_color [1/4]

gl::binary_color::binary_color () = default

function binary_color [2/4]

inline gl::binary_color::binary_color (
    value value
) 

function binary_color [3/4]

gl::binary_color::binary_color (
    const  binary_color &
) = default

function binary_color [4/4]

gl::binary_color::binary_color (
    binary_color &&
) noexcept

function operator=

binary_color & gl::binary_color::operator= (
    const  binary_color &
) = default

function operator=

binary_color & gl::binary_color::operator= (
    binary_color &&
) noexcept

function ~binary_color

gl::binary_color::~binary_color () = default

function operator=

inline binary_color & gl::binary_color::operator= (
    value value
) 

function operator<=>

auto gl::binary_color::operator<=> (
    const  binary_color &
) const

function operator==

bool gl::binary_color::operator== (
    const  binary_color &
) const

function operator bool

Returns true if the color is either Black or White (i.e., not Unset).

inline gl::binary_color::operator bool () const


function is_set

Explicit check to see if the color state is not unset .

inline bool gl::binary_color::is_set () const


function to_underlying

Returns the integer representation of the current color state.

inline std::underlying_type_t< value > gl::binary_color::to_underlying () const


function next

Returns a new binary_color representing the opposite state (Black <-> White).

inline binary_color gl::binary_color::next () const



The documentation for this class was generated from the following file include/gl/types/properties.hpp