QMCPACK
OTDot< SymTensor< T1, D >, SymTensor< T2, D > > Struct Template Reference
+ Collaboration diagram for OTDot< SymTensor< T1, D >, SymTensor< T2, D > >:

Public Types

using Type_t = typename BinaryReturn< T1, T2, OpMultiply >::Type_t
 

Static Public Member Functions

static Tensor< Type_t, D > apply (const SymTensor< T1, D > &lhs, const SymTensor< T2, D > &rhs)
 

Detailed Description

template<class T1, class T2, unsigned D>
struct qmcplusplus::OTDot< SymTensor< T1, D >, SymTensor< T2, D > >

Definition at line 1038 of file TensorOps.h.

Member Typedef Documentation

◆ Type_t

using Type_t = typename BinaryReturn<T1, T2, OpMultiply>::Type_t

Definition at line 1040 of file TensorOps.h.

Member Function Documentation

◆ apply()

static Tensor<Type_t, D> apply ( const SymTensor< T1, D > &  lhs,
const SymTensor< T2, D > &  rhs 
)
inlinestatic

Definition at line 1041 of file TensorOps.h.

References SymTensor< T, D >::HL().

1042  {
1043  Tensor<Type_t, D> res = Tensor<Type_t, D>::DontInitialize();
1044  for (unsigned int i = 0; i < D; ++i)
1045  for (unsigned int j = i; j < D; ++j)
1046  {
1047  Type_t sum = lhs.HL(i, 0) * rhs.HL(j, 0);
1048  int k = 1;
1049  for (; k < i; ++k)
1050  sum += lhs.HL(i, k) * rhs.HL(j, k);
1051  for (; k < j; ++k)
1052  sum += lhs.HL(k, i) * rhs.HL(j, k);
1053  for (; k < D; ++k)
1054  sum += lhs.HL(k, i) * rhs.HL(k, j);
1055  res(i, j) = sum;
1056  }
1057  return res;
1058  }
typename BinaryReturn< T1, T2, OpMultiply >::Type_t Type_t
Definition: TensorOps.h:1040

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