Debian Codegraph @

src/MNTCell3D.h

raw
1 /////////////////////////////////////////////////////////////
2 // //
3 // Copyright (c) 2007-2017 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.apache.org/licenses/LICENSE-2.0 //
10 // //
11 /////////////////////////////////////////////////////////////
12
13 #ifndef __MNTCELL3D_H
14 #define __MNTCELL3D_H
15
16 // --- STL includes ---
17 #include <vector>
18 #include <map>
19
20 using std::vector;
21 using std::map;
22
23 // --- IO includes ---
24 #include <iostream>
25
26 using std::ostream;
27
28 // --- Project includes ---
29 #include <Sphere3d.h>
30
31 /*!
32 \class MNTCell3D
33 \brief class for a cell in a 3D neighbor table (MNTable3D)
34 */
35 class MNTCell3D
36 {
37 private:
38 vector<vector<Sphere3D> > m_data;
39 static int s_output_style;
40
41 public:
42 MNTCell3D(unsigned int ngroups=1);
43
44 void SetNGroups(unsigned int);
45
46 void insert(const Sphere3D&,int);
47 int NParts() const;
48 vector<Sphere2D> getSpheresNear(const Vector3&,double);
49 vector<Sphere2D> getSpheresFromGroupNear(const Vector3&,double,int);
50 map<double,Sphere2D> getSpheresClosestTo(const Vector3&,unsigned int);
51
52 // output
53 double getSumVolume(unsigned int);
54 static void SetOutputStyle(int);
55 friend ostream& operator << (ostream&,const MNTCell2D&);
56 void writePositions(ostream&);
57 void writeRadii(ostream&);
58 };
59
60 #endif // MNTCELL_H