cluster::Cluster< F > Class Template Reference

Node of a cluster tree. More...

#include <tree.hh>

Classes

union  CE
 Data structure to hold a pointer to an element or a child cluster. More...
 

Public Types

typedef F CF
 Typedef used for interface (trait) of the cluster tree. More...
 

Public Member Functions

const concepts::Real3dcenter () const
 Center of the cluster. More...
 
Cluster< F > * child () const
 First child of the cluster if the cluster is not a leaf. More...
 
Cluster< F > * child (uint j) const
 j-th child of the cluster if the cluster is not a leaf More...
 
 Cluster (const concepts::Element< F > &elm, const BBall< F > &ball, Cluster< F > *lnk)
 Constructor if Cluster is a leaf in the tree. More...
 
 Cluster (uint idx, Cluster< F > &chld, const concepts::Real3d &c, concepts::Real r, uint nlf=0)
 Constructor if Cluster is not a leaf in the tree. More...
 
const concepts::Element< F > * element () const
 Returns element if the cluster is a leaf. More...
 
uint index () const
 Index (number) of the cluster. More...
 
std::ostream & info (std::ostream &os) const
 
Cluster< F > *& link ()
 
Cluster< F > * link () const
 Neighbouring cluster. More...
 
uint nleaf () const
 Number of leafs of the cluster. More...
 
concepts::Real radius () const
 Radius of the cluster. More...
 

Private Attributes

concepts::Real3d c_
 Cluster center. More...
 
CE ce_
 Child cluster or element. More...
 
uint idx_
 Index (number) More...
 
Cluster< F > * lnk_
 Neighbouring cluster. More...
 
uint nlf_
 Number of leafs. More...
 
concepts::Real r_
 Cluster radius. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Cluster< F > &clst)
 

Detailed Description

template<class F>
class cluster::Cluster< F >

Node of a cluster tree.

Parameters
FField (Real or Cmplx)

Definition at line 120 of file tree.hh.

Member Typedef Documentation

◆ CF

template<class F >
typedef F cluster::Cluster< F >::CF

Typedef used for interface (trait) of the cluster tree.

Definition at line 132 of file tree.hh.

Constructor & Destructor Documentation

◆ Cluster() [1/2]

template<class F >
cluster::Cluster< F >::Cluster ( const concepts::Element< F > &  elm,
const BBall< F > &  ball,
Cluster< F > *  lnk 
)

Constructor if Cluster is a leaf in the tree.

Parameters
elmElement
ballBounding ball for the element
lnkNeighbouring cluster

Definition at line 230 of file tree.hh.

◆ Cluster() [2/2]

template<class F >
cluster::Cluster< F >::Cluster ( uint  idx,
Cluster< F > &  chld,
const concepts::Real3d c,
concepts::Real  r,
uint  nlf = 0 
)

Constructor if Cluster is not a leaf in the tree.

Parameters
idxCluster number
chldPointer to the linked list of children
cCluster center
rCluster radius
nlfNumber of leafs contained in the cluster

Definition at line 218 of file tree.hh.

Member Function Documentation

◆ center()

template<class F >
const concepts::Real3d& cluster::Cluster< F >::center ( ) const
inline

Center of the cluster.

Definition at line 161 of file tree.hh.

◆ child() [1/2]

template<class F >
Cluster< F > * cluster::Cluster< F >::child
inline

First child of the cluster if the cluster is not a leaf.

Definition at line 203 of file tree.hh.

◆ child() [2/2]

template<class F >
Cluster< F > * cluster::Cluster< F >::child ( uint  j) const
inline

j-th child of the cluster if the cluster is not a leaf

Definition at line 196 of file tree.hh.

◆ element()

template<class F >
const concepts::Element< F > * cluster::Cluster< F >::element
inline

Returns element if the cluster is a leaf.

Definition at line 208 of file tree.hh.

◆ index()

template<class F >
uint cluster::Cluster< F >::index ( ) const
inline

Index (number) of the cluster.

Definition at line 167 of file tree.hh.

◆ info()

template<class F >
std::ostream & cluster::Cluster< F >::info ( std::ostream &  os) const

Definition at line 239 of file tree.hh.

◆ link() [1/2]

template<class F >
Cluster<F>*& cluster::Cluster< F >::link ( )
inline

Definition at line 157 of file tree.hh.

◆ link() [2/2]

template<class F >
Cluster<F>* cluster::Cluster< F >::link ( ) const
inline

Neighbouring cluster.

Definition at line 156 of file tree.hh.

◆ nleaf()

template<class F >
uint cluster::Cluster< F >::nleaf ( ) const
inline

Number of leafs of the cluster.

Definition at line 165 of file tree.hh.

◆ radius()

template<class F >
concepts::Real cluster::Cluster< F >::radius ( ) const
inline

Radius of the cluster.

Definition at line 163 of file tree.hh.

Friends And Related Function Documentation

◆ operator<<

template<class F >
std::ostream& operator<< ( std::ostream &  os,
const Cluster< F > &  clst 
)
friend

Definition at line 213 of file tree.hh.

Member Data Documentation

◆ c_

template<class F >
concepts::Real3d cluster::Cluster< F >::c_
private

Cluster center.

Definition at line 190 of file tree.hh.

◆ ce_

template<class F >
CE cluster::Cluster< F >::ce_
private

Child cluster or element.

Definition at line 182 of file tree.hh.

◆ idx_

template<class F >
uint cluster::Cluster< F >::idx_
private

Index (number)

Definition at line 185 of file tree.hh.

◆ lnk_

template<class F >
Cluster<F>* cluster::Cluster< F >::lnk_
private

Neighbouring cluster.

Definition at line 180 of file tree.hh.

◆ nlf_

template<class F >
uint cluster::Cluster< F >::nlf_
private

Number of leafs.

Definition at line 187 of file tree.hh.

◆ r_

template<class F >
concepts::Real cluster::Cluster< F >::r_
private

Cluster radius.

Definition at line 192 of file tree.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich