ATLAS Offline Software
Loading...
Searching...
No Matches
Amg::VectorVector3DComparer Struct Reference

#include <GeoPrimitivesCompare.h>

Collaboration diagram for Amg::VectorVector3DComparer:

Public Member Functions

bool operator() (std::vector< Amg::Vector3D > const &vv1, std::vector< Amg::Vector3D > const &vv2) const

Detailed Description

Definition at line 57 of file GeoPrimitivesCompare.h.

Member Function Documentation

◆ operator()()

bool Amg::VectorVector3DComparer::operator() ( std::vector< Amg::Vector3D > const & vv1,
std::vector< Amg::Vector3D > const & vv2 ) const
inline

Definition at line 59 of file GeoPrimitivesCompare.h.

60 {
61 std::vector<Amg::Vector3D>::const_iterator v1 = vv1.begin();
62 std::vector<Amg::Vector3D>::const_iterator v2 = vv2.begin();
63
64 while (v1 != vv1.end()) {
65 if (v2 == vv2.end()) return false;
66 if ( (*v1).z() > (*v2).z() ) {
67 return false;
68 } else if ( (*v1).z() < (*v2).z() ) {
69 return true;
70 } else if ( (*v1).y() > (*v2).y() ) {
71 return false;
72 } else if ( (*v1).y() < (*v2).y() ) {
73 return true;
74 } else if ( (*v1).x() > (*v2).x() ) {
75 return false;
76 } else if ( (*v1).x() < (*v2).x() ) {
77 return true;
78 }
79 ++v1;
80 ++v2;
81 }
82 if (v2 != vv2.end()) return true;
83 return false;
84}

The documentation for this struct was generated from the following file: