votca 2024-dev
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
votca::csg::PairList< element_type, pair_type > Class Template Reference

#include <pairlist.h>

Collaboration diagram for votca::csg::PairList< element_type, pair_type >:
Collaboration graph
[legend]

Public Types

using iterator = typename std::vector< pair_type * >::iterator
 
using const_iterator = typename std::vector< pair_type * >::const_iterator
 
typedef std::map< element_type, pair_type * > partners
 
using element_t = element_type
 
using pair_t = pair_type
 

Public Member Functions

 PairList ()=default
 
virtual ~PairList ()
 
void AddPair (pair_type *p)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
pair_type * front ()
 
pair_type * back ()
 
bool empty () const
 
Index size () const
 
void Cleanup ()
 
pair_type * FindPair (element_type e1, element_type e2)
 
const pair_type * FindPair (element_type e1, element_type e2) const
 
partnersFindPartners (element_type e1)
 

Protected Attributes

std::vector< pair_type * > pairs_
 
std::map< element_type, std::map< element_type, pair_type * > > pair_map_
 

Detailed Description

template<typename element_type, typename pair_type>
class votca::csg::PairList< element_type, pair_type >

Definition at line 32 of file pairlist.h.

Member Typedef Documentation

◆ const_iterator

template<typename element_type , typename pair_type >
using votca::csg::PairList< element_type, pair_type >::const_iterator = typename std::vector<pair_type *>::const_iterator

Definition at line 41 of file pairlist.h.

◆ element_t

template<typename element_type , typename pair_type >
using votca::csg::PairList< element_type, pair_type >::element_t = element_type

Definition at line 63 of file pairlist.h.

◆ iterator

template<typename element_type , typename pair_type >
using votca::csg::PairList< element_type, pair_type >::iterator = typename std::vector<pair_type *>::iterator

Definition at line 40 of file pairlist.h.

◆ pair_t

template<typename element_type , typename pair_type >
using votca::csg::PairList< element_type, pair_type >::pair_t = pair_type

Definition at line 64 of file pairlist.h.

◆ partners

template<typename element_type , typename pair_type >
typedef std::map<element_type, pair_type *> votca::csg::PairList< element_type, pair_type >::partners

Definition at line 42 of file pairlist.h.

Constructor & Destructor Documentation

◆ PairList()

template<typename element_type , typename pair_type >
votca::csg::PairList< element_type, pair_type >::PairList ( )
default

◆ ~PairList()

template<typename element_type , typename pair_type >
virtual votca::csg::PairList< element_type, pair_type >::~PairList ( )
inlinevirtual

Definition at line 35 of file pairlist.h.

Member Function Documentation

◆ AddPair()

template<typename element_type , typename pair_type >
void votca::csg::PairList< element_type, pair_type >::AddPair ( pair_type *  p)
inline
Todo:
be careful, same pair object is used, some values might change (e.g. sign of distance vector)
Todo:
check if unique

Definition at line 74 of file pairlist.h.

◆ back()

template<typename element_type , typename pair_type >
pair_type * votca::csg::PairList< element_type, pair_type >::back ( )
inline

Definition at line 50 of file pairlist.h.

◆ begin() [1/2]

template<typename element_type , typename pair_type >
iterator votca::csg::PairList< element_type, pair_type >::begin ( )
inline

Definition at line 44 of file pairlist.h.

◆ begin() [2/2]

template<typename element_type , typename pair_type >
const_iterator votca::csg::PairList< element_type, pair_type >::begin ( ) const
inline

Definition at line 47 of file pairlist.h.

◆ Cleanup()

template<typename element_type , typename pair_type >
void votca::csg::PairList< element_type, pair_type >::Cleanup
inline

Definition at line 84 of file pairlist.h.

◆ empty()

template<typename element_type , typename pair_type >
bool votca::csg::PairList< element_type, pair_type >::empty ( ) const
inline

Definition at line 51 of file pairlist.h.

◆ end() [1/2]

template<typename element_type , typename pair_type >
iterator votca::csg::PairList< element_type, pair_type >::end ( )
inline

Definition at line 45 of file pairlist.h.

◆ end() [2/2]

template<typename element_type , typename pair_type >
const_iterator votca::csg::PairList< element_type, pair_type >::end ( ) const
inline

Definition at line 48 of file pairlist.h.

◆ FindPair() [1/2]

template<typename element_type , typename pair_type >
pair_type * votca::csg::PairList< element_type, pair_type >::FindPair ( element_type  e1,
element_type  e2 
)
inline

Definition at line 93 of file pairlist.h.

◆ FindPair() [2/2]

template<typename element_type , typename pair_type >
const pair_type * votca::csg::PairList< element_type, pair_type >::FindPair ( element_type  e1,
element_type  e2 
) const
inline

Definition at line 112 of file pairlist.h.

◆ FindPartners()

template<typename element_type , typename pair_type >
PairList< element_type, pair_type >::partners * votca::csg::PairList< element_type, pair_type >::FindPartners ( element_type  e1)

Definition at line 132 of file pairlist.h.

◆ front()

template<typename element_type , typename pair_type >
pair_type * votca::csg::PairList< element_type, pair_type >::front ( )
inline

Definition at line 49 of file pairlist.h.

◆ size()

template<typename element_type , typename pair_type >
Index votca::csg::PairList< element_type, pair_type >::size ( ) const
inline

Definition at line 53 of file pairlist.h.

Member Data Documentation

◆ pair_map_

template<typename element_type , typename pair_type >
std::map<element_type, std::map<element_type, pair_type *> > votca::csg::PairList< element_type, pair_type >::pair_map_
protected

Definition at line 69 of file pairlist.h.

◆ pairs_

template<typename element_type , typename pair_type >
std::vector<pair_type *> votca::csg::PairList< element_type, pair_type >::pairs_
protected

Definition at line 67 of file pairlist.h.


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