Diploma Thesis Percolation Simulation
C++ Sourcecode Documentation

www.AndreasKrueger.de/thesis/code

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sphere Class Reference

#include <sphere.h>

Collaboration diagram for sphere:

Collaboration graph
[legend]
List of all members.

Public Methods

 sphere ()
 sphere (int dimension)
 sphere (const sphere &)
 sphere (myVector &, REAL, NUMBER, NUMBER)
void unitpointsphere ()
sphere & operator= (const sphere &)
bool operator!= (const sphere &s2)
REAL distance (sphere &, sphere &)

Public Attributes

myVector c
REAL r
NUMBER clno
NUMBER clsz

Friends

int getdim (const sphere &u)
bool overlap (sphere &, sphere &)
bool overlap (sphere &, sphere &, sphere &temp)
bool overlap2 (sphere &, sphere &, sphere &temp)
ostream & operator<< (ostream &, sphere &)

Constructor & Destructor Documentation

sphere::sphere  
 

Definition at line 36 of file sphere.h.

00036               {
00037 //      cout <<"defaultconstruct "<<flush;
00038 }

sphere::sphere int    dimension
 

Definition at line 40 of file sphere.h.

References c, and myVector::set_dim().

00040                             {
00041         c.set_dim(dimension);                           // center-vector; origin-vector!
00042 }

sphere::sphere const sphere &   
 

Definition at line 44 of file sphere.h.

References c, clno, clsz, getdim, r, and myVector::set_dim().

00044                                {
00045 //      cout <<"copyconstruct "<<flush;
00046         c.set_dim(getdim(s2.c));
00047         c=s2.c;
00048         r=s2.r;
00049         clno=s2.clno;
00050         clsz=s2.clsz;
00051 }

sphere::sphere myVector  ,
REAL   ,
NUMBER   ,
NUMBER   
 

Definition at line 53 of file sphere.h.

References c, clno, clsz, getdim, NUMBER, r, REAL, and myVector::set_dim().

00053                                                                                   {
00054 //      cout <<"parameterconstruct "<<flush;
00055         c.set_dim(getdim(coordinate));
00056         c = coordinate;                                 
00057         r = radius;                                                             
00058         clno =clusno;                                   // clusternumber, by default=0
00059         clsz =clussz;                                   // clustersize, by default=0
00060 }


Member Function Documentation

REAL sphere::distance sphere &   ,
sphere &   
 

bool sphere::operator!= const sphere &    s2
 

Definition at line 81 of file sphere.h.

References c, clno, clsz, and r.

00081                                         {       
00082         bool temp=0;
00083         if (c!=s2.c) temp=1;
00084         if (r!=s2.r) temp=1;
00085         if (clno!=s2.clno) temp=1;
00086         if (clsz!=s2.clsz) temp=1;
00087         return temp;
00088 }

sphere & sphere::operator= const sphere &   
 

Definition at line 71 of file sphere.h.

References c, clno, clsz, getdim, r, and myVector::set_dim().

00071                                           {     
00072 //      cout <<"operator= "<<flush;
00073         c.set_dim(getdim(s2.c));
00074         c=s2.c;
00075         r=s2.r;
00076         clno=s2.clno;
00077         clsz=s2.clsz;
00078         return *this;
00079 }

void sphere::unitpointsphere  
 

Definition at line 64 of file sphere.h.

References c, clno, clsz, myVector::nullvect(), and r.

00064                                  {
00065         c.nullvect();                           // resides in the origin
00066         r = 0;                                          // no volume
00067         clno =0;                                        // clusternumber=0 means uncounted
00068         clsz =0;                                        // clustersize
00069 }


Friends And Related Function Documentation

int getdim const sphere &    u [friend]
 

Definition at line 62 of file sphere.h.

Referenced by operator=(), and sphere().

00062 {return getdim(u.c);}

ostream& operator<< ostream &   ,
sphere &   
[friend]
 

Definition at line 110 of file sphere.h.

00110                                             {
00111   return os<<"["<<z.c<<" radius="<<z.r<<" clno="<<z.clno<<" clsize=" << z.clsz<<"]";
00112 }

bool overlap sphere &   ,
sphere &   ,
sphere &    temp
[friend]
 

Definition at line 98 of file sphere.h.

00098                                                         {               // reference instead of copy --> faster
00099         temp.c  = sph1.c;
00100         temp.c -= sph2.c;               // using -= instead of - is much faster
00101         return ( length (temp.c) < (sph1.r + sph2.r) );
00102 }

bool overlap sphere &   ,
sphere &   
[friend]
 

Definition at line 94 of file sphere.h.

00094                                           {             // reference instead of copy --> faster
00095         return ( length((sph1.c - sph2.c)) < (sph1.r + sph2.r) );
00096 }

bool overlap2 sphere &   ,
sphere &   ,
sphere &    temp
[friend]
 

Definition at line 104 of file sphere.h.

00104                                                          {              // no SQRT but radii * radii
00105         temp.c  = sph1.c;
00106         temp.c -= sph2.c;               // using -= instead of - is much faster
00107         return ( squarelength (temp.c) < (sph1.r + sph2.r) * (sph1.r + sph2.r) );
00108 }


Member Data Documentation

myVector sphere::c
 

Definition at line 14 of file sphere.h.

Referenced by counters::combine(), compare_clustersizes(), counters::count_analyze_and_return_clusters(), distance(), counters::divide_count_and_analyze(), counters::divide_d_times_count_and_analyze(), analyze::edgespheres(), getdim(), greatercoord(), counters::neighbour_l(), counters::neighbour_naive(), operator!=(), operator<<(), operator=(), overlap(), overlap2(), set_dim(), sphere(), throw_spheres(), and unitpointsphere().

NUMBER sphere::clno
 

Definition at line 16 of file sphere.h.

Referenced by counters::combine(), counters::count_clusters_iteratively(), counters::count_clusters_iteratively2(), counters::count_clusters_iteratively_only_selected_spherenumbers(), counters::count_clusters_recursively(), counters::countclusters_naive(), make_clusterlist_array(), counters::neighbour_l(), counters::neighbour_naive(), counters::neighbour_recursion(), operator!=(), operator<<(), operator=(), grid::relabel_clusternumbers_in_spheres(), set_clusternumber(), set_clusternumber_l(), set_clustersize_to_each_sphere(), set_clustersize_to_each_sphere_l(), set_clustersizes(), sphere(), and unitpointsphere().

NUMBER sphere::clsz
 

Definition at line 17 of file sphere.h.

Referenced by compare_clustersizes(), operator!=(), operator<<(), operator=(), set_clustersize(), set_clustersize_to_each_sphere(), set_clustersize_to_each_sphere_l(), set_clustersizes(), sphere(), and unitpointsphere().

REAL sphere::r
 

Definition at line 15 of file sphere.h.

Referenced by find_biggestradius(), counters::neighbour_l(), counters::neighbour_naive(), operator!=(), operator<<(), operator=(), overlap(), overlap2(), set_radius(), sphere(), and unitpointsphere().


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




Diploma Thesis Sourcecode Documentation
check out the text and the executable binaries

www.AndreasKrueger.de/thesis/code