STK++ 0.9.13
STK::hidden::Copycat< Lhs, Rhs, Arrays::upper_triangular_, Arrays::upper_triangular_ > Struct Template Reference

#include <STK_AssignSelector.h>

Public Types

typedef hidden::Traits< Lhs >::Type Type
 

Static Public Member Functions

static void runByCol (Lhs &lhs, Rhs const &rhs)
 
static void runByRow (Lhs &lhs, Rhs const &rhs)
 

Detailed Description

template<typename Lhs, typename Rhs>
struct STK::hidden::Copycat< Lhs, Rhs, Arrays::upper_triangular_, Arrays::upper_triangular_ >

Definition at line 661 of file STK_AssignSelector.h.

Member Typedef Documentation

◆ Type

Member Function Documentation

◆ runByCol()

template<typename Lhs , typename Rhs >
static void STK::hidden::Copycat< Lhs, Rhs, Arrays::upper_triangular_, Arrays::upper_triangular_ >::runByCol ( Lhs lhs,
Rhs const rhs 
)
inlinestatic

Definition at line 664 of file STK_AssignSelector.h.

665 {
666 const int end = std::min(rhs.endRows(), rhs.endCols());
667 for (int j = rhs.beginCols(); j < end; ++j)
668 for (int i = rhs.beginRows(); i <= j; ++i)
669 { lhs.setValue(i, j, rhs.elt(i, j));}
670 for (int j= end; j < rhs.endCols(); ++j)
671 for (int i = rhs.beginRows(); i < rhs.endRows(); ++i)
672 { lhs.setValue(i, j, rhs.elt(i, j));}
673 }

◆ runByRow()

template<typename Lhs , typename Rhs >
static void STK::hidden::Copycat< Lhs, Rhs, Arrays::upper_triangular_, Arrays::upper_triangular_ >::runByRow ( Lhs lhs,
Rhs const rhs 
)
inlinestatic

Definition at line 674 of file STK_AssignSelector.h.

675 {
676 const int last = std::min(lhs.lastIdxRows(), lhs.lastIdxCols());
677 for (int i = rhs.beginRows(); i <= last; ++i)
678 for (int j=i; j < rhs.endCols(); ++j)
679 { lhs.setValue(i, j, rhs.elt(i, j));}
680 }

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