Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Static Public Member Functions | List of all members
CDPL::ForceField::GradientVectorTraits< GV > Struct Template Reference

Generic primary traits template providing zero-initialization for a 3D gradient vector container of type GV. More...

#include <GradientVectorTraits.hpp>

Public Types

typedef GV VectorType
 The gradient vector container type. More...
 
typedef std::size_t SizeType
 The type used to specify gradient vector container element counts. More...
 

Static Public Member Functions

static void clear (VectorType &g, std::size_t num_elem)
 Zeroes the first num_elem elements of the container g. More...
 

Detailed Description

template<typename GV>
struct CDPL::ForceField::GradientVectorTraits< GV >

Generic primary traits template providing zero-initialization for a 3D gradient vector container of type GV.

The primary template assumes GV is indexable via operator[] with each element exposing 3 components ([0], [1], [2]) and clears them by direct assignment.

Template Parameters
GVThe gradient vector container type.

Member Typedef Documentation

◆ VectorType

template<typename GV >
typedef GV CDPL::ForceField::GradientVectorTraits< GV >::VectorType

The gradient vector container type.

◆ SizeType

template<typename GV >
typedef std::size_t CDPL::ForceField::GradientVectorTraits< GV >::SizeType

The type used to specify gradient vector container element counts.

Member Function Documentation

◆ clear()

template<typename GV >
static void CDPL::ForceField::GradientVectorTraits< GV >::clear ( VectorType g,
std::size_t  num_elem 
)
inlinestatic

Zeroes the first num_elem elements of the container g.

Parameters
gThe gradient vector container to clear.
num_elemThe number of leading elements to clear.

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