cortexlib  v0.2.0
Namespaces | Classes | Functions
cxl Namespace Reference

Namespaces

 utils
 

Classes

class  matrix
 matrix - Two Dimensional Array More...
 
class  normal_iterator
 Normal Iterator. More...
 

Functions

template<typename ElemL , typename ElemR >
requires requires (ElemL lhsE, ElemR rhsE)
 Compares two Matrices for equality. More...
 
constexpr auto operator== (const matrix< ElemL > &lhs, const matrix< ElemR > &rhs) noexcept(noexcept(std::declval< ElemL >()==std::declval< ElemR >()) &&noexcept(std::ranges::equal(lhs, rhs))) -> bool
 
template<typename ElemL , typename ElemR >
constexpr auto operator<=> (const matrix< ElemL > &lhs, const matrix< ElemR > &rhs)
 Spaceship Operator for matrix. More...
 
template<typename E , std::copy_constructible F>
constexpr auto operator|| (const matrix< E > &bx, F f) noexcept -> matrix< std::invoke_result_t< F, E >>
 Map Operator. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator== (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base()==rhs.base())) -> bool
 Equality Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator== (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base()==rhs.base())) -> bool
 Equality Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator!= (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base() !=rhs.base())) -> bool
 Inequality Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator!= (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base() !=rhs.base())) -> bool
 Inequality Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator< (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base()< rhs.base())) -> bool
 Less-than Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator< (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base()< rhs.base())) -> bool
 Less-than Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator> (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base() > rhs.base())) -> bool
 Greater-than Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator> (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base() > rhs.base())) -> bool
 Greater-than Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator<= (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base()<=rhs.base())) -> bool
 Less-than-or-Equal Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator<= (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base()<=rhs.base())) -> bool
 Less-than-or-Equal Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
constexpr auto operator>= (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs) noexcept(noexcept(lhs.base() >=rhs.base())) -> bool
 Greater-than-or-Equal Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr bool operator>= (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs) noexcept(noexcept(lhs.base() >=rhs.base())) -> bool
 Greater-than-or-Equal Operator Overload. More...
 
template<typename IterL , typename IterR , typename Container >
normal_iterator< IterL, Container >::difference_type operator- (const normal_iterator< IterL, Container > &lhs, const normal_iterator< IterR, Container > &rhs)
 Difference Operator Overload. More...
 
template<typename Iterator , typename Container >
normal_iterator< Iterator, Container >::difference_type operator- (const normal_iterator< Iterator, Container > &lhs, const normal_iterator< Iterator, Container > &rhs)
 Difference Operator Overload. More...
 
template<typename Iterator , typename Container >
constexpr auto operator+ (typename normal_iterator< Iterator, Container >::difference_type n, const normal_iterator< Iterator, Container > &i) noexcept -> normal_iterator< Iterator, Container >
 Addition Operator Overload. More...
 
template<typename Container >
constexpr auto make_normal_iterator (typename Container::iterator i) noexcept -> normal_iterator< typename Container::iterator, Container >
 Makes a new normal_iterator. More...
 
template<typename Iterator , typename Container >
constexpr auto make_normal_iterator (Iterator i) noexcept -> normal_iterator< Iterator, Container >
 Makes a new normal_iterators. More...
 

Function Documentation

◆ make_normal_iterator() [1/2]

template<typename Iterator , typename Container >
constexpr auto cxl::make_normal_iterator ( Iterator  i) -> normal_iterator<Iterator, Container>
constexprnoexcept

Makes a new normal_iterators.

An adaptor for making slice pointers into normal_iterators.

Template Parameters
Iterator
Container
Parameters
itype: Iterator
Returns
normal_iterator<Iterator, Container>

◆ make_normal_iterator() [2/2]

template<typename Container >
constexpr auto cxl::make_normal_iterator ( typename Container::iterator  i) -> normal_iterator<typename Container::iterator, Container>
constexprnoexcept

Makes a new normal_iterator.

An adaptor for turning STL container iterators into normal_iterators.

Template Parameters
Container
Parameters
itype: Container::iterator
Returns
normal_iterator<typename Container::iterator, Container>

◆ operator!=() [1/2]

template<typename Iterator , typename Container >
constexpr auto cxl::operator!= ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Inequality Operator Overload.

Performs an inequality comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator!=() [2/2]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator!= ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Inequality Operator Overload.

Performs an equality comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator+()

template<typename Iterator , typename Container >
constexpr auto cxl::operator+ ( typename normal_iterator< Iterator, Container >::difference_type  n,
const normal_iterator< Iterator, Container > &  i 
) -> normal_iterator<Iterator, Container>
inlineconstexprnoexcept

Addition Operator Overload.

Takes an offset n and a normal_iterators i. Constructs a new normal_iterators by adding n to i.base().

Template Parameters
Iterator
Container
Parameters
ntype: normal_iterator<Iterator, Container>::difference_type
itype: const normal_iterator<Iterator, Container>&
Returns
constexpr inline normal_iterator<Iterator, Container>

◆ operator-() [1/2]

template<typename Iterator , typename Container >
normal_iterator<Iterator, Container>::difference_type cxl::operator- ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
)
inline

Difference Operator Overload.

Performs a difference operation between two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
constexpr inline typename normal_iterator<Iterator, Container>::difference_type C++11

◆ operator-() [2/2]

template<typename IterL , typename IterR , typename Container >
normal_iterator<IterL, Container>::difference_type cxl::operator- ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
)
inline

Difference Operator Overload.

Performs a difference operation between two normal_iterator whose iterator_type can be different but share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>& C++11 ! C++11

◆ operator<() [1/2]

template<typename Iterator , typename Container >
constexpr auto cxl::operator< ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Less-than Operator Overload.

Performs an less-than comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator<() [2/2]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator< ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Less-than Operator Overload.

Performs an less-than comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator<=() [1/2]

template<typename Iterator , typename Container >
constexpr auto cxl::operator<= ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Less-than-or-Equal Operator Overload.

Performs an less-than-or-equal comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator<=() [2/2]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator<= ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Less-than-or-Equal Operator Overload.

Performs an less-than-or-equal comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator<=>()

template<typename ElemL , typename ElemR >
constexpr auto cxl::operator<=> ( const matrix< ElemL > &  lhs,
const matrix< ElemR > &  rhs 
)
inlineconstexpr

Spaceship Operator for matrix.

Uses std::lexicographical_compare_three_way to compare the Matrices and generates the !=, <, >, <=, >= operators.

Template Parameters
ElemL
ElemR
Parameters
lhstype: const matrix<ElemL>&
rhstype: const matrix<ElemR>&
Returns
constexpr inline auto

◆ operator==() [1/3]

constexpr auto cxl::operator== ( const matrix< ElemL > &  lhs,
const matrix< ElemR > &  rhs 
) -> bool
inlineconstexprnoexcept

◆ operator==() [2/3]

template<typename Iterator , typename Container >
constexpr auto cxl::operator== ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Equality Operator Overload.

Performs an equality comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator==() [3/3]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator== ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Equality Operator Overload.

Performs an equality comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator>() [1/2]

template<typename Iterator , typename Container >
constexpr auto cxl::operator> ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Greater-than Operator Overload.

Performs an greater-than comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator>() [2/2]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator> ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Greater-than Operator Overload.

Performs an greater-than comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator>=() [1/2]

template<typename Iterator , typename Container >
constexpr bool cxl::operator>= ( const normal_iterator< Iterator, Container > &  lhs,
const normal_iterator< Iterator, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Greater-than-or-Equal Operator Overload.

Performs an greater-than-or-equal comparison of two normal_iterator whose iterator_type and Container type are the same.

Template Parameters
Iterator
Container
Parameters
lhstype: const normal_iterator<Iterator, Container>&
rhstype: const normal_iterator<Iterator, Container>&
Returns
bool

◆ operator>=() [2/2]

template<typename IterL , typename IterR , typename Container >
constexpr auto cxl::operator>= ( const normal_iterator< IterL, Container > &  lhs,
const normal_iterator< IterR, Container > &  rhs 
) -> bool
inlineconstexprnoexcept

Greater-than-or-Equal Operator Overload.

Performs an greater-than-or-equal comparison of two normal_iterator whose iterator_type can be different but of they share the same Container type.

Template Parameters
IterL
IterR
Container
Parameters
lhstype: const normal_iterator<IterL, Container>&
rhstype: const normal_iterator<IterR, Container>&
Returns
bool

◆ operator||()

template<typename E , std::copy_constructible F>
constexpr auto cxl::operator|| ( const matrix< E > &  bx,
f 
) -> matrix<std::invoke_result_t<F, E>>
constexprnoexcept

Map Operator.

Maps a function over the elements of a matrix and returns a new matrix with the mapped values.

Template Parameters
E
Fconcept: std::copy_constructible
Parameters
bxtype: const matrix<E>&
ftype: F
Returns
constexpr auto

◆ requires()

template<typename ElemL , typename ElemR >
requires cxl::requires ( ElemL  lhsE,
ElemR  rhsE 
)

Compares two Matrices for equality.

Uses std::equal to compare the Matrices.

Template Parameters
ElemL
ElemR
Parameters
lhsEtype: ElemL - requires parameter
rhsEtype: ElemR - requires parameter
lhstype: const matrix<ElemL>&
rhstype: const matrix<ElemR>&
Returns
constexpr inline bool