ExactDGPMethod.h
Go to the documentation of this file.
1 // ExactMethodForDGP.h: interface for the CExactDGPMethod class.
2 //
4 
5 #pragma once
6 #include "EdgePoint.h"
7 #include "RichModel.h"
8 #include <list>
9 #include <float.h>
10 #include "DistanceApproach.h"
11 using namespace std;
12 
13 
15 {
16 protected:
17  struct InfoAtVertex
18  {
25  double disUptodate;
26  double entryProp;
27 
29  {
30  fParentIsPseudoSource = true;
31  levelOnSequenceTree = -1;
32  birthTimeForCheckingValidity = -1;
33  indexOfDirectParent = -1;
34  indexOfAncestor = -1;
35  disUptodate = DBL_MAX;
36  }
38  {
39  EdgePoint ep;
40  ep.isVertex = fParentIsPseudoSource;
41  ep.index = indexOfDirectParent;
42  ep.proportion = entryProp;
43  return ep;
44  }
45  };
47  {
48  char birthTime;
50  double disUptodate;
51  bool operator<(const QuoteInfoAtVertex& another) const
52  {
53  return disUptodate > another.disUptodate;
54  }
56  QuoteInfoAtVertex(char birthTime, int indexOfVert, double disUptodate)
57  {
58  this->birthTime = birthTime;
59  this->indexOfVert = indexOfVert;
60  this->disUptodate = disUptodate;
61  }
62  };
63 
64 
65 protected:
66  virtual void Initialize();
67  virtual void Dispose();
68  virtual void Propagate() = 0;
69  virtual void CollectExperimentalResults();
70 public:
71  vector<InfoAtVertex> m_InfoAtVertices;
72  CExactDGPMethod(const CRichModel& inputModel, int source);
73  CExactDGPMethod(const CRichModel& inputModel, int source, int destination);
74  CExactDGPMethod(const CRichModel& inputModel, int source, double R);
75  CExactDGPMethod(const CRichModel& inputModel, const map<int, double> &indexOfSourceVerts);
76  CExactDGPMethod(const CRichModel& inputModel, const map<int, double> &indexOfSourceVerts, const set<int> &destinations);
77  CExactDGPMethod(const CRichModel& inputModel, const set<int> &indexOfSourceVerts);
78  CExactDGPMethod(const CRichModel& inputModel, const set<int> &indexOfSourceVerts, double R);
79  CExactDGPMethod(const CRichModel& inputModel, const set<int> &indexOfSourceVerts, const set<int> &destinations);
80  virtual vector<EdgePoint> BacktraceShortestPath(int end) const;
81  virtual int GetAncestor(int vIndex) const;
82 };
83 
84 
85 
86 
87 
88 
double proportion
Definition: EdgePoint.h:9
bool operator<(const QuoteInfoAtVertex &another) const
QuoteInfoAtVertex(char birthTime, int indexOfVert, double disUptodate)
int index
Definition: EdgePoint.h:8
vector< InfoAtVertex > m_InfoAtVertices
bool isVertex
Definition: EdgePoint.h:7


co_scan
Author(s):
autogenerated on Mon Feb 28 2022 23:00:41