Skip to content

Class Grid

template <typename U>

ClassList > Grid

Inherits the following classes: GridData

Public Types

Type Name
typedef T value_type

Public Functions

Type Name
Grid (size_t width, size_t height, int repeats=1)
void copy_from (const Grid & other)
void fill (const T & value)
void fill_from (const Grid & other, const Coordinate2D< size_t > & top_left={0, 0})
void fill_from (const FlexGrid & other, const Coordinate2D< long long > & top_left={0, 0})
std::pair< T, T > get_values (const LineCoord2D< size_t > & coord) const
T max_value () const
T min_value () const
T & operator[] (Coordinate2D< size_t > coord)
const T & operator[] (Coordinate2D< size_t > coord) const

Public Functions inherited from GridData

See GridData

Type Name
GridData (size_t width, size_t height)
size_t height () const
bool in_bounds (const Coordinate2D< size_t > & coord) const
size_t width () const

Protected Types

Type Name
typedef std::conditional_t< std::is_same_v< U, bool >, BlazeBool, U > T

Protected Attributes

Type Name
std::vector< T > m_data
int m_repeats

Protected Attributes inherited from GridData

See GridData

Type Name
size_t m_height
size_t m_width

Public Types Documentation

typedef value_type

typedef T Grid< U >::value_type;

Public Functions Documentation

function Grid

inline Grid::Grid (
    size_t width,
    size_t height,
    int repeats=1
) 

function copy_from

inline void Grid::copy_from (
    const  Grid & other
) 

function fill

inline void Grid::fill (
    const T & value
) 

function fill_from [1/2]

inline void Grid::fill_from (
    const  Grid & other,
    const  Coordinate2D < size_t > & top_left={0, 0}
) 

function fill_from [2/2]

void Grid::fill_from (
    const  FlexGrid & other,
    const  Coordinate2D < long  long > & top_left={0, 0}
) 

function get_values

inline std::pair< T, T > Grid::get_values (
    const  LineCoord2D < size_t > & coord
) const

function max_value

inline T Grid::max_value () const

function min_value

inline T Grid::min_value () const

function operator[]

inline T & Grid::operator[] (
    Coordinate2D < size_t > coord
) 

function operator[]

inline const T & Grid::operator[] (
    Coordinate2D < size_t > coord
) const

Protected Types Documentation

typedef T

using Grid< U >::T =  std::conditional_t<std::is_same_v<U, bool>, BlazeBool, U>;

Protected Attributes Documentation

variable m_data

std::vector<T> Grid< U >::m_data;

variable m_repeats

int Grid< U >::m_repeats;

Friends Documentation

friend operator<<

inline std::ostream & Grid::operator<< (
    std::ostream & os,
    const  Grid & grid
) 


The documentation for this class was generated from the following file /home/runner/work/Blaze/Blaze/src/lib/grid/grid.hpp