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

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

Definition at line 500 of file STK_AssignSelector.h.

501 {
502 lhs.setValue(Type(0));
503 const int end = std::min(lhs.endRows(), lhs.endCols());
504 for (int i = rhs.beginRows(); i < end; ++i)
505 { lhs.setValue(i, i, rhs.elt(i));}
506 }

◆ runByRow()

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

Definition at line 507 of file STK_AssignSelector.h.

508 {
509 lhs.setValue(Type(0));
510 const int end = std::min(lhs.endRows(), lhs.endCols());
511 for (int i = rhs.beginRows(); i < end; ++i)
512 { lhs.setValue(i, i, rhs.elt(i));}
513 }

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