PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | Public Attributes | List of all members
PIVector2D< T >::Index Struct Reference

Index structure for 2D array elements (row, column). More...

#include <pivector2d.h>

Public Member Functions

 Index ()=default
 Default constructor. Initializes row and col to -1 (invalid index).
 
 Index (ssize_t r, ssize_t c)
 Constructs an Index with the given row and column values.
 
bool isValid () const
 Checks if the index is valid (both row and column are non-negative). More...
 
bool isNotValid () const
 Checks if the index is invalid (either row or column is negative). More...
 

Public Attributes

ssize_t row = -1
 Row index in the 2D array.
 
ssize_t col = -1
 Column index in the 2D array.
 

Detailed Description

template<typename T>
struct PIVector2D< T >::Index

Index structure for 2D array elements (row, column).

Member Function Documentation

◆ isValid()

template<typename T >
bool PIVector2D< T >::Index::isValid ( ) const
inline

Checks if the index is valid (both row and column are non-negative).

See also
isNotValid()

◆ isNotValid()

template<typename T >
bool PIVector2D< T >::Index::isNotValid ( ) const
inline

Checks if the index is invalid (either row or column is negative).

See also
isValid()