Drop unused resource strings
[TortoiseGit.git] / ext / OGDF / src / energybased / LinearQuadtreeExpansion.h
blobc1a9c92ec9fa1227d9ef89c6a817a322ba54762f
1 /*
2 * $Revision: 2559 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-06 15:04:28 +0200 (Fr, 06. Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Declaration of class LinearQuadtreeExpansion.
12 * \author Martin Gronemann
14 * \par License:
15 * This file is part of the Open Graph Drawing Framework (OGDF).
17 * \par
18 * Copyright (C)<br>
19 * See README.txt in the root directory of the OGDF installation for details.
21 * \par
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * Version 2 or 3 as published by the Free Software Foundation;
25 * see the file LICENSE.txt included in the packaging of this file
26 * for details.
28 * \par
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
34 * \par
35 * You should have received a copy of the GNU General Public
36 * License along with this program; if not, write to the Free
37 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
38 * Boston, MA 02110-1301, USA.
40 * \see http://www.gnu.org/copyleft/gpl.html
41 ***************************************************************/
43 #ifndef OGDF_LINEAR_QUADTREE_EXPANSION_H
44 #define OGDF_LINEAR_QUADTREE_EXPANSION_H
46 #include "LinearQuadtree.h"
48 namespace ogdf {
50 class LinearQuadtreeExpansion
52 public:
53 //! constructor
54 LinearQuadtreeExpansion(__uint32 precision, const LinearQuadtree& tree);
56 //! destructor
57 ~LinearQuadtreeExpansion(void);
59 //! adds a point with the given charge to the receiver expansion
60 void P2M(__uint32 point, __uint32 receiver);
62 //! shifts the source multipole coefficient to the center of the receiver and adds them
63 void M2M(__uint32 source, __uint32 receiver);
65 //! converts the source multipole coefficient in to a local coefficients at the center of the receiver and adds them
66 void M2L(__uint32 source, __uint32 receiver);
68 //! shifts the source local coefficient to the center of the receiver and adds them
69 void L2L(__uint32 source, __uint32 receiver);
71 //! evaluates the derivate of the local expansion at the point and adds the forces to fx fy
72 void L2P(__uint32 source, __uint32 point, float& fx, float& fy);
74 //! returns the size in bytes
75 __uint32 sizeInBytes() const { return m_numExp*m_numCoeff*sizeof(double)*4; }
77 //! returns the array with multipole coefficients
78 inline double* multiExp() const { return m_multiExp; }
80 //! returns the array with local coefficients
81 inline double* localExp() const { return m_localExp; }
83 //! number of coefficients per expansions
84 inline __uint32 numCoeff() const { return m_numCoeff; }
86 //! the quadtree
87 const LinearQuadtree& tree() { return m_tree; }
88 private:
90 //! allocates the space for the coeffs
91 void allocate();
93 //! releases the memory for the coeffs
94 void deallocate();
96 //! the Quadtree reference
97 const LinearQuadtree& m_tree;
98 public:
99 //! the big multipole expansione coeff array
100 double* m_multiExp;
102 //! the big local expansion coeff array
103 double* m_localExp;
105 public:
106 //! the number of multipole (locale) expansions
107 __uint32 m_numExp;
109 //! the number of coeff per expansions
110 __uint32 m_numCoeff;
112 BinCoeff<double> binCoef;
116 } // end of namespace ogdf
118 #endif