STK++ 0.9.13
STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_row_ > Struct Template Reference

specialization for the general case with row oriented arrays 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>
struct STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_row_ >

specialization for the general case with row oriented arrays

Definition at line 483 of file STK_VisitorsImpl.h.

Member Function Documentation

◆ apply()

template<typename Visitor , typename Derived >
static void STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_row_ >::apply ( Derived &  tab,
Visitor applier 
)
inlinestatic

Definition at line 491 of file STK_VisitorsImpl.h.

492 {
493 for(int i = tab.beginRows(); i < tab.endRows(); ++i)
494 for(int j = std::max(i, tab.beginCols()); j < tab.endCols(); ++j)
495 tab.setValue(i, j, applier());
496 }

◆ run()

template<typename Visitor , typename Derived >
static void STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_row_ >::run ( Derived const tab,
Visitor visitor 
)
inlinestatic

Definition at line 485 of file STK_VisitorsImpl.h.

486 {
487 for(int i = tab.beginRows(); i < tab.endRows(); ++i)
488 for(int j = std::max(i, tab.beginCols()); j < tab.endCols(); ++j)
489 visitor(tab.elt(i, j), i, j);
490 }

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