Jafar
|
00001 /* $Id$ */ 00002 00003 #ifndef _SPAFDB_PROXIMITY_STRATEGY_HPP_ 00004 #define _SPAFDB_PROXIMITY_STRATEGY_HPP_ 00005 00006 #include <vector> 00007 #include <list> 00008 00009 namespace jafar { 00010 namespace spafgraph { 00011 class Node; 00012 class EdgeProximity; 00013 } 00014 namespace spafdb { 00015 class SpafDB; 00016 class SelectQueryProximity; 00023 class ProximityStrategy { 00024 public: 00025 ProximityStrategy(); 00026 virtual ~ProximityStrategy(); 00031 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const SpafDB* _db, spafgraph::Node* _node ) const = 0; 00032 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const std::list<spafgraph::Node*>& _nodes, spafgraph::Node* _node ) const = 0; 00033 }; 00039 class GroupProximityStrategy : public ProximityStrategy { 00040 public: 00041 virtual ~GroupProximityStrategy(); 00042 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const SpafDB* _db, spafgraph::Node* node ) const; 00043 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const std::list<spafgraph::Node*>& _nodes, spafgraph::Node* _node ) const; 00044 }; 00050 class DistanceProximityStrategy : public ProximityStrategy { 00051 public: 00052 DistanceProximityStrategy(double distance, int max); 00053 virtual ~DistanceProximityStrategy(); 00054 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const SpafDB* _db, spafgraph::Node* node ) const; 00055 virtual std::vector<const spafgraph::EdgeProximity*> createProximitiesEdges( const std::list<spafgraph::Node*>& _nodes, spafgraph::Node* _node ) const; 00056 private: 00057 double m_distance; 00058 int m_max; 00059 SelectQueryProximity* m_query; 00060 }; 00061 } 00062 } 00063 00064 #endif
Generated on Wed Oct 15 2014 00:37:28 for Jafar by doxygen 1.7.6.1 |