BinPoint.cxx

Go to the documentation of this file.
00001 // @(#)root/mathcore:$Id: BinPoint.cxx 22868 2008-03-27 16:38:59Z rdm $
00002 // Author: L. Moneta Wed Aug 30 11:10:03 2006
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2006  LCG ROOT Math Team, CERN/PH-SFT                *
00007  *                                                                    *
00008  *                                                                    *
00009  **********************************************************************/
00010 
00011 // Implementation file for class BinPoint
00012 
00013 #include "Fit/BinPoint.h"
00014 #include "Fit/DataRange.h"
00015 
00016 #include <cassert> 
00017 
00018 namespace ROOT { 
00019 
00020    namespace Fit { 
00021 
00022 
00023 bool BinPoint::IsInRange(const DataRange & range) const 
00024 {
00025    // check if given point is inside the given range
00026   
00027    unsigned int ndim = NDim(); 
00028    // need to check that datarange size is same as point size 
00029    if (range.NDim() == 0) return true; // (range is empty is equivalent to (-inf, + inf) 
00030    // in case not zero dimension must be equal to the coordinates
00031    assert( ndim == range.NDim() );  
00032    for (unsigned int i = 0; i < ndim; ++i) { 
00033       if ( ! range.IsInside( fCoords[i] ) ) return false; 
00034    }
00035    return true; 
00036 }
00037 
00038    } // end namespace Fit
00039 
00040 } // end namespace ROOT
00041 

Generated on Tue Jul 5 14:33:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1