Changeset 49234af in git for external/fastjet/internal/DynamicNearestNeighbours.hh
- Timestamp:
- Dec 9, 2014, 1:27:13 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 37deb3b, 9e991f8
- Parents:
- f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/internal/DynamicNearestNeighbours.hh
rf6b6ee7 r49234af 1 // STARTHEADER2 // $Id: DynamicNearestNeighbours.hh 2687 2011-11-14 11:17:51Z soyez$1 //FJSTARTHEADER 2 // $Id: DynamicNearestNeighbours.hh 3619 2014-08-13 14:17:19Z salam $ 3 3 // 4 // Copyright (c) 2005-201 1, Matteo Cacciari, Gavin P. Salam and Gregory Soyez4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 5 5 // 6 6 //---------------------------------------------------------------------- … … 13 13 // 14 14 // The algorithms that underlie FastJet have required considerable 15 // development and are described in hep-ph/0512210. If you use 15 // development. They are described in the original FastJet paper, 16 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use 16 17 // FastJet as part of work towards a scientific publication, please 17 // include a citation to the FastJet paper. 18 // quote the version you use and include a citation to the manual and 19 // optionally also to hep-ph/0512210. 18 20 // 19 21 // FastJet is distributed in the hope that it will be useful, … … 25 27 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 26 28 //---------------------------------------------------------------------- 27 // ENDHEADER29 //FJENDHEADER 28 30 29 31 … … 37 39 #include<cassert> 38 40 #include "fastjet/internal/numconsts.hh" 41 #include "fastjet/Error.hh" 39 42 40 43 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh … … 68 71 /// Nearest Neighbours code 69 72 /// \endif 70 class DnnError {73 class DnnError : public Error { 71 74 public: 72 75 // constructors 73 DnnError() {;}; 74 DnnError(const std::string & message_in) { 75 _message = message_in; std::cerr << message_in << std::endl;}; 76 77 std::string message() const {return _message;}; 78 79 private: 80 std::string _message; 76 //DnnError() {} 77 DnnError(const std::string & message_in) : Error(message_in) {} 81 78 }; 82 79 … … 112 109 /// Returns the index of the nearest neighbour of point labelled 113 110 /// by ii (assumes ii is valid) 114 virtual int NearestNeighbourIndex(const int &ii) const = 0;111 virtual int NearestNeighbourIndex(const int ii) const = 0; 115 112 116 113 /// Returns the distance to the nearest neighbour of point labelled 117 114 /// by index ii (assumes ii is valid) 118 virtual double NearestNeighbourDistance(const int &ii) const = 0;115 virtual double NearestNeighbourDistance(const int ii) const = 0; 119 116 120 117 /// Returns true iff the given index corresponds to a point that 121 118 /// exists in the DNN structure (meaning that it has been added, and 122 119 /// not removed in the meantime) 123 virtual bool Valid(const int &index) const = 0;120 virtual bool Valid(const int index) const = 0; 124 121 125 122 /// remove the points labelled by the std::vector indices_to_remove, and … … 141 138 /// Remove the point labelled by index and return the list of 142 139 /// points whose nearest neighbours have changed in the process 143 inline void RemovePoint (const int &index,140 inline void RemovePoint (const int index, 144 141 std::vector<int> & indices_of_updated_neighbours) { 145 142 std::vector<int> indices_added; … … 158 155 /// point). 159 156 inline void RemoveCombinedAddCombination( 160 const int & index1, const int &index2,157 const int index1, const int index2, 161 158 const EtaPhi & newpoint, 162 159 int & index3,
Note:
See TracChangeset
for help on using the changeset viewer.