CMS 3D CMS Logo

Public Member Functions | Public Attributes

DDCompareEPV Struct Reference

#include <DDCompareTools.h>

Inheritance diagram for DDCompareEPV:
binary_function

List of all members.

Public Member Functions

 DDCompareEPV ()
 DDCompareEPV (const DDCompOptions &ddco)
bool operator() (DDExpandedView &lhs, DDExpandedView &rhs) const

Public Attributes

DDCompOptions ddco_

Detailed Description

Definition at line 27 of file DDCompareTools.h.


Constructor & Destructor Documentation

DDCompareEPV::DDCompareEPV ( )

Definition at line 4 of file DDCompareTools.cc.

: ddco_() { }
DDCompareEPV::DDCompareEPV ( const DDCompOptions ddco)

Definition at line 6 of file DDCompareTools.cc.

: ddco_(ddco) { }

Member Function Documentation

bool DDCompareEPV::operator() ( DDExpandedView lhs,
DDExpandedView rhs 
) const

Definition at line 8 of file DDCompareTools.cc.

References DDExpandedView::copyno(), gather_cfg::cout, DDExpandedView::depth(), DDExpandedView::firstChild(), DDExpandedView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDExpandedView::next(), DDExpandedView::nextSibling(), DDExpandedView::parent(), and run_regression::ret.

                                                                            {
  bool ret(true);
  /* struct DDCompareCPVGraph : public std::binary_function<DDCompactView::graph_type, DDCompactView::graph_type, bool> { */
  /*   bool operator()(const DDCompactView::graph_type& lhs, const DDCompactView::graph_type& rhs) const { */
  /*     bool ret; */
  //    const graph<DDLogicalPart, DDPosData*>& g1= lhs;
  //    graph<DDLogicalPart, DDPosData*>::const_iterator beg1 = g1.begin();
  //DDCompactView::graph_type::const_iterator beg1 = lhs.begin();
  /*     std::cout << "size of lhs = " << lhs.edge_size() << std::endl;     */
  /*     std::cout << "size of rhs = " << rhs.edge_size() << std::endl;     */
  /*     std::cout << "iterating over lhs edges?" << std::endl; */
  /*     graph<DDLogicalPart, DDPosData*>::const_iterator beg1(lhs), end1(lhs); */
  /*     beg1 = lhs.begin_iter(); */
  /*     end1 = lhs.end_iter(); */
  /*     size_t countem(0); */
  /*     for ( ; beg1 != end1 ; ++beg1 ) { */
  /*       ++countem; */
  /*     } */
  /*     std::cout << "between lhs.begin_iter() and lhs.end_iter() there are " << countem << std::endl; */
  /*     graph<DDLogicalPart,DDPosData*>::const_edge_range cer = lhs.graph().edges(lhs.root()); */
  /*     graph<DDLogicalPart,DDPosData*>::adj_iterator i = const_edge_range.first */
  //    DDExpandedView v1(lhs), v2(rhs);
  //    if (v1.next()) std::cout << "v1 is true" << std::endl;
  //    if (v2.next()) std::cout << "v2 is true" << std::endl;
  //    DDNodeComparator ddnc;
  //if ( ddnc (v1, v2) ) { 
  //  ret = true;
  //}
  /*     while (v1.next()) { */
  /*       if (v2.next()) { */
  /*    std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
  /*              << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
  /*              << std::endl; */
        
  /*    if ( v1.logicalPart().name().name() != v2.logicalPart().name().name() ) { */
  /*      std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
  /*                << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
  /*                << std::endl; */
  /*    //        std::cout << v1.logicalPart().name().name() << " !=? " << v2.logicalPart().name().name() << std::endl; */
  /*      ret=false; */
  /*      break; */
  /*    } */
  /*       } */
  /*     } */
  std::cout <<"*********FIRST BY firstChild, firstChild, nextSibling, nextSibling*********" << std::endl;
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.firstChild();
  rhs.firstChild();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.firstChild();
  rhs.firstChild();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.nextSibling();
  rhs.nextSibling();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.nextSibling();
  rhs.nextSibling();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.parent();
  rhs.parent();
  std::cout <<"*********THEN BY next, next, next, next*********" << std::endl;
  lhs.parent();
  rhs.parent();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.next();
  rhs.next();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  lhs.next();
  rhs.next();
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
  lhs.next();
  rhs.next();
  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
            << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
            << std::endl;
  return ret;
}

Member Data Documentation

Definition at line 31 of file DDCompareTools.h.