mpqc::Cluster Class Reference

Documentation

is the unit that holds a collection of clusterables that go together.

Cluster will hold a vector of clusterables that all belong together. To update the center of the cluster compute_com must be called, this is to avoid computing a new center of mass (COM) every time a clusterable is added.

Public Member Functions

 Cluster ()=default
 
 Cluster (const Cluster &c)=default
 
Clusteroperator= (const Cluster &c)=default
 
 Cluster (Cluster &&c)=default
 
Clusteroperator= (Cluster &&c)=default
 
 Cluster (std::vector< Clusterable > const &elems)
 
 Cluster (std::vector< Clusterable > &&elems)
 
template<typename... Cs>
 Cluster (Cs... cs)
 
template<typename T >
void add_clusterable (T t)
 
int64_t size () const
 
void clear ()
 
void set_center (Vector3d point)
 sets the center equal to a point. More...
 
void update_center ()
 will update the center based on the current elements. More...
 
double sum_distances_from_center () const
 sum_distances_from_center calculates the sum of the disances of each clusterable to the center of the cluster. More...
 
Vector3d const & center () const
 
std::vector< Clusterable >::const_iterator begin () const
 begin returns the begin iterator to the vector of clusterables. More...
 
std::vector< Clusterable >::const_iterator end () const
 end returns the end iterator to the vector of clusterables More...
 

Constructor & Destructor Documentation

◆ Cluster() [1/6]

mpqc::Cluster::Cluster ( )
default

◆ Cluster() [2/6]

mpqc::Cluster::Cluster ( const Cluster c)
default

◆ Cluster() [3/6]

mpqc::Cluster::Cluster ( Cluster &&  c)
default

◆ Cluster() [4/6]

mpqc::Cluster::Cluster ( std::vector< Clusterable > const &  elems)
inline

◆ Cluster() [5/6]

mpqc::Cluster::Cluster ( std::vector< Clusterable > &&  elems)
inline

◆ Cluster() [6/6]

template<typename... Cs>
mpqc::Cluster::Cluster ( Cs...  cs)
inline

Member Function Documentation

◆ add_clusterable()

template<typename T >
void mpqc::Cluster::add_clusterable ( t)
inline

◆ begin()

std::vector<Clusterable>::const_iterator mpqc::Cluster::begin ( ) const
inline

begin returns the begin iterator to the vector of clusterables.

◆ center()

Vector3d const& mpqc::Cluster::center ( ) const
inline

◆ clear()

void mpqc::Cluster::clear ( )
inline

◆ end()

std::vector<Clusterable>::const_iterator mpqc::Cluster::end ( ) const
inline

end returns the end iterator to the vector of clusterables

◆ operator=() [1/2]

Cluster& mpqc::Cluster::operator= ( Cluster &&  c)
default

◆ operator=() [2/2]

Cluster& mpqc::Cluster::operator= ( const Cluster c)
default

◆ set_center()

void mpqc::Cluster::set_center ( Vector3d  point)
inline

sets the center equal to a point.

◆ size()

int64_t mpqc::Cluster::size ( ) const
inline

◆ sum_distances_from_center()

double mpqc::Cluster::sum_distances_from_center ( ) const

sum_distances_from_center calculates the sum of the disances of each clusterable to the center of the cluster.

Returns
reduction over the distances to the cluster center of the clusterables.

◆ update_center()

void mpqc::Cluster::update_center ( )

will update the center based on the current elements.


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