STK++ 0.9.13
STK::hidden::Copycat< Lhs, Rhs, Arrays::lower_triangular_, Arrays::lower_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::lower_triangular_, Arrays::lower_triangular_ >

Definition at line 636 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::lower_triangular_, Arrays::lower_triangular_ >::runByCol ( Lhs lhs,
Rhs const rhs 
)
inlinestatic

Definition at line 639 of file STK_AssignSelector.h.

640 {
641 const int end = std::min(rhs.endRows(), rhs.endCols());
642 for (int j = rhs.beginCols(); j < end; ++j)
643 for (int i=j; i < rhs.endRows(); ++i)
644 { lhs.setValue(i, j, rhs.elt(i, j));}
645 }

◆ runByRow()

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

Definition at line 646 of file STK_AssignSelector.h.

647 {
648 const int end = std::min(rhs.endRows(), rhs.endCols());
649 for (int i = rhs.beginRows(); i < end; ++i)
650 for (int j = rhs.beginCols(); j <=i; ++j)
651 { lhs.setValue(i, j, rhs.elt(i, j));}
652 for (int i= end; i < rhs.endRows(); ++i)
653 for (int j=rhs.beginCols(); j < rhs.endCols(); ++j)
654 { lhs.setValue(i, j, rhs.elt(i, j));}
655 }

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