|
[yoda-svn] r262 - trunk/include/YODAblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Aug 17 13:27:32 BST 2011
Author: mkawalec Date: Wed Aug 17 13:27:32 2011 New Revision: 262 Log: Refactored Scatter3D to use std::vector instead of Utils::sortedvector, as the additional computation burden arising from using sortedvector seems to be unneeded. Modified: trunk/include/YODA/Scatter3D.h Modified: trunk/include/YODA/Scatter3D.h ============================================================================== --- trunk/include/YODA/Scatter3D.h Wed Aug 17 13:13:48 2011 (r261) +++ trunk/include/YODA/Scatter3D.h Wed Aug 17 13:27:32 2011 (r262) @@ -21,7 +21,7 @@ public: /// Type of the native Point3D collection - typedef Utils::sortedvector<Point3D> Points; + typedef std::vector<Point3D> Points; /// @name Constructors @@ -149,25 +149,25 @@ //@{ Scatter3D& addPoint(const Point3D& pt) { - _points.insert(pt); + _points.push_back(pt); return *this; } Scatter3D& addPoint(double x, double y, double z) { - _points.insert(Point3D(x, y, z)); + _points.push_back(Point3D(x, y, z)); return *this; } Scatter3D& addPoint(double x, double y, double z, std::pair<double,double> ex, std::pair<double,double> ey, std::pair<double,double> ez) { - _points.insert(Point3D(x, y, z, ex, ey, ez)); + _points.push_back(Point3D(x, y, z, ex, ey, ez)); return *this; } Scatter3D& addPoint(double x, double exminus, double explus, double y, double eyminus, double eyplus, double z, double ezminus, double ezplus) { - _points.insert(Point3D(x, exminus, explus, y, eyminus, eyplus, z, ezminus, ezplus)); + _points.push_back(Point3D(x, exminus, explus, y, eyminus, eyplus, z, ezminus, ezplus)); return *this; }
More information about the yoda-svn mailing list |