ATLAS Offline Software
Public Member Functions | List of all members
Amg::Vector3DComparer Struct Reference

comparison of two Vector3D, needed for the definition of a std::set<Amg::Vector3D> More...

#include <GeoPrimitivesCompare.h>

Collaboration diagram for Amg::Vector3DComparer:

Public Member Functions

bool operator() (Amg::Vector3D const &v1, Amg::Vector3D const &v2) const
 

Detailed Description

comparison of two Vector3D, needed for the definition of a std::set<Amg::Vector3D>

originals for CLHEP::HepVector3D was in CLHEP/Vector/src/SpaceVector.cc: int Hep3Vector::compare (const Hep3Vector & v) const; bool Hep3Vector::operator > (const Hep3Vector & v) const; bool Hep3Vector::operator < (const Hep3Vector & v) const;

Definition at line 34 of file GeoPrimitivesCompare.h.

Member Function Documentation

◆ operator()()

bool Amg::Vector3DComparer::operator() ( Amg::Vector3D const v1,
Amg::Vector3D const v2 
) const
inline

Definition at line 36 of file GeoPrimitivesCompare.h.

37  {
38  if ( v1.z() > v2.z() ) {
39  return false;
40  } else if ( v1.z() < v2.z() ) {
41  return true;
42  } else if ( v1.y() > v2.y() ) {
43  return false;
44  } else if ( v1.y() < v2.y() ) {
45  return true;
46  } else if ( v1.x() > v2.x() ) {
47  return false;
48  } else if ( v1.x() < v2.x() ) {
49  return true;
50  } else {
51  return false;
52  }
53  }

The documentation for this struct was generated from the following file:
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364