INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
costcalculator.h00001 #ifndef COSTCALCULATOR_H 00002 #define COSTCALCULATOR_H 00003 00004 #include <hydroogmap/ogmap.h> 00005 #include <hydroogmap/mapraytracer.h> 00006 #include <hydropathplan/util.h> 00007 00008 namespace hydropathplan { 00009 00010 #if 0 00011 // 00012 // @author Alex Brooks 00013 // 00014 class CostAccumulator { 00015 public: 00016 CostAccumulator( const FloatMap &costMap ) 00017 : costMap_(costMap), 00018 costSoFar_(0) 00019 {} 00020 00021 inline bool traceCell( int x, int y ) 00022 { 00023 costSoFar_ += element( costMap_, x, y ); 00024 00025 // keep tracing. 00026 return true; 00027 } 00028 00029 inline void traceSucceeded( int x, int y ) {} 00030 inline void traceLeftMap( int x, int y ) {} 00031 00032 double totalCost() const { return costSoFar_; } 00033 00034 private: 00035 const FloatMap &costMap_; 00036 double costSoFar_; 00037 }; 00038 00039 typedef hydroogmap::MapRayTracer<const hydroogmap::OgMap,CostAccumulator> CostCalculator; 00040 #endif 00041 00042 } 00043 00044 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)