STK++ 0.9.13
STK::hidden::MultImpl< Type > Struct Template Reference

this structure regroup all the methods using only pointers on the Type More...

#include <STK_ArrayByVectorProduct.h>

Static Public Member Functions

static Type vectorByVector (Type const *p_lhs, Type const *p_rhs)
 multiplication of two vectors
 
static Type PanelByVector (Type const *p_lhs, Type const *p_rhs)
 multiplication of two vectors
 

Detailed Description

template<typename Type>
struct STK::hidden::MultImpl< Type >

this structure regroup all the methods using only pointers on the Type

Definition at line 57 of file STK_ArrayByVectorProduct.h.

Member Function Documentation

◆ PanelByVector()

template<typename Type >
static Type STK::hidden::MultImpl< Type >::PanelByVector ( Type const p_lhs,
Type const p_rhs 
)
inlinestatic

multiplication of two vectors

Definition at line 67 of file STK_ArrayByVectorProduct.h.

68 {
69 Type sum = Type(0);
70 for (int k=0; k< vectorSize; ++k) sum += p_lhs[k] * p_rhs[k];
71 return(sum);
72 }
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
const int vectorSize

References STK::sum(), and STK::vectorSize.

◆ vectorByVector()

template<typename Type >
static Type STK::hidden::MultImpl< Type >::vectorByVector ( Type const p_lhs,
Type const p_rhs 
)
inlinestatic

multiplication of two vectors

Definition at line 60 of file STK_ArrayByVectorProduct.h.

61 {
62 Type sum = Type(0);
63 for (int k=0; k< vectorSize; ++k) sum += p_lhs[k] * p_rhs[k];
64 return(sum);
65 }

References STK::sum(), and STK::vectorSize.


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