STK++ 0.9.13
STK::hidden::VisitorDiagonalImpl< Visitor, Derived, Size_ > Struct Template Reference

A VisitorDiagonalImpl allow to unroll the visit of a Diagonal tab if possible. More...

#include <STK_VisitorsImpl.h>

Static Public Member Functions

static void run (Derived const &tab, Visitor &visitor)
 
static void apply (Derived &tab, Visitor &applier)
 

Detailed Description

template<typename Visitor, typename Derived, int Size_>
struct STK::hidden::VisitorDiagonalImpl< Visitor, Derived, Size_ >

A VisitorDiagonalImpl allow to unroll the visit of a Diagonal tab if possible.

Definition at line 436 of file STK_VisitorsImpl.h.

Member Function Documentation

◆ apply()

template<typename Visitor , typename Derived , int Size_>
static void STK::hidden::VisitorDiagonalImpl< Visitor, Derived, Size_ >::apply ( Derived &  tab,
Visitor applier 
)
inlinestatic

Definition at line 443 of file STK_VisitorsImpl.h.

444 {
446 tab.setValue(tab.begin()+ Size_-1, applier());
447 }
static void apply(Derived &tab, Visitor &applier)

References STK::hidden::VisitorPointImpl< Visitor, Derived, Size_ >::apply().

◆ run()

template<typename Visitor , typename Derived , int Size_>
static void STK::hidden::VisitorDiagonalImpl< Visitor, Derived, Size_ >::run ( Derived const tab,
Visitor visitor 
)
inlinestatic

Definition at line 438 of file STK_VisitorsImpl.h.

439 {
441 visitor(tab.elt(tab.begin()+ Size_-1), tab.begin()+ Size_-1, tab.begin()+ Size_-1);
442 }
static void run(Derived const &tab, Visitor &visitor)

References STK::hidden::VisitorPointImpl< Visitor, Derived, Size_ >::run().


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