SISCone  2.0.6
quadtree.h
1 // -*- C++ -*-
3 // File: quadtree.h //
4 // Description: header file for quadtree management (Cquadtree class) //
5 // This file is part of the SISCone project. //
6 // For more details, see http://projects.hepforge.org/siscone //
7 // //
8 // Copyright (c) 2006 Gavin Salam and Gregory Soyez //
9 // //
10 // This program is free software; you can redistribute it and/or modify //
11 // it under the terms of the GNU General Public License as published by //
12 // the Free Software Foundation; either version 2 of the License, or //
13 // (at your option) any later version. //
14 // //
15 // This program is distributed in the hope that it will be useful, //
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
18 // GNU General Public License for more details. //
19 // //
20 // You should have received a copy of the GNU General Public License //
21 // along with this program; if not, write to the Free Software //
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
23 // //
24 // $Revision:: 123 $//
25 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) $//
27 
28 #ifndef __QUADTREE_H__
29 #define __QUADTREE_H__
30 
31 #include "momentum.h"
32 #include <stdio.h>
33 
34 namespace siscone{
35 
43 class Cquadtree{
44  public:
46  Cquadtree();
47 
49  Cquadtree(double _x, double _y, double _half_size_x, double _half_size_y);
50 
54  ~Cquadtree();
55 
67  int init(double _x, double _y, double _half_size_x, double _half_size_y);
68 
76  int add(Cmomentum *v_add);
77 
88  Creference circle_intersect(double cx, double cy, double cR2);
89 
99  int save(FILE *flux);
100 
110  int save_leaves(FILE *flux);
111 
112  double centre_x;
113  double centre_y;
114  double half_size_x;
115  double half_size_y;
116 
118 
120  bool has_child;
121 };
122 
123 }
124 #endif
The SISCone project has been developed by Gavin Salam and Gregory Soyez
Documentation generated on Mon May 6 2013 04:18:17 for SISCone by  Doxygen 1.8.1.2