MRS  1.0
A C++ Class Library for Statistical Set Processing
subpavings::CompVolMassMinusAdj Class Reference
+ Inheritance diagram for subpavings::CompVolMassMinusAdj:
+ Collaboration diagram for subpavings::CompVolMassMinusAdj:

List of all members.

Public Member Functions

 CompVolMassMinusAdj (size_t bigN)
bool operator() (const SPSnode *const lhs, const SPSnode *const rhs) const

Member Function Documentation

bool subpavings::CompVolMassMinusAdj::operator() ( const SPSnode *const  lhs,
const SPSnode *const  rhs 
) const [inline, virtual]

return true if lhs is 'smaller' (lower in priority) than rhs.

Implements subpavings::NodeCompObj.

      {   
        size_t lCount = lhs->getCounter();
        size_t rCount = rhs->getCounter();
        
        if ((lCount == rCount) && 
          (lhs->getNodeDepth() == rhs->getNodeDepth())) {
            return (lhs->getNodeName() < rhs->getNodeName()) ;
        }
                
        cxsc::real lEmpMass(1.0 - (lCount/(n*1.0)));
        cxsc::real rEmpMass (1.0 - (rCount/(n*1.0)));
        
        cxsc::real lMassVol = lEmpMass * lhs->nodeRealVolume();
        cxsc::real rMassVol = rEmpMass * rhs->nodeRealVolume();

        return ( lMassVol <rMassVol );
      }

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends