Isis 3.0
Back | Home
ControlGraph.h
Go to the documentation of this file.
1 #ifndef ControlGraph_h
2 #define ControlGraph_h
3 
25 template< class A, class B > class QHash;
26 template< class A, class B > class QMap;
27 template< class A, class B > struct QPair;
28 template< class A> class QVector;
29 class QString;
30 
31 namespace Isis {
32  class ControlNet;
33  class GroupedStatistics;
34 
57  class ControlGraph {
58  public:
59  ControlGraph(ControlNet *someControlNet);
60  ControlGraph(const ControlGraph &other);
61  ~ControlGraph();
62 
63  bool IsConnected() const;
64  int GetIslandCount() const;
65  const QVector< QString > GetCubesOnIsland(const int &island) const;
66  const QVector< QString > GetCubeList() const;
67  const GroupedStatistics &GetMeasureStats(const QString &
68  CubeSerialNumber) const;
69 
70  ControlGraph &operator=(const ControlGraph &other);
71 
72  private:
73  // nested class forward declaration
74  class AdjacentCubeList;
75 
76  void HashCubesAndPopulateGraph();
77  void CalculateIslands();
78 
80  ControlNet *cnet;
81 
83  QHash< QString, int > * cubeIdToIndexHash;
84 
86  QHash< int, QString > * cubeIndexToIdHash;
87 
96 
101  bool connected;
102 
104  QVector< QVector< int > > * islands;
105 
120  class AdjacentCubeList {
121  public:
122  AdjacentCubeList(const int &cubeIndex, const int &cpIndex, const int
123  & cmIndex);
124  AdjacentCubeList(const AdjacentCubeList &other);
125  ~AdjacentCubeList();
126 
127  const QVector< int > GetAdjacentCubes() const;
128  void AddConnection(const int &cubeIndex, const int &cpIndex, const
129  int &cmIndex);
130  AdjacentCubeList &operator=(const AdjacentCubeList &other);
131 
132  private:
134  QMap< int, QVector< QPair< int, int > > > * connections;
135  };
136  };
137 };
138 
139 #endif
~ControlGraph()
Destruct a ControlGraph.
Definition: ControlGraph.cpp:82
const GroupedStatistics & GetMeasureStats(const QString &CubeSerialNumber) const
Definition: ControlGraph.cpp:176
Grouped Statistics.
Definition: GroupedStatistics.h:54
ControlGraph(ControlNet *someControlNet)
construct a ControlGraph given a ControlNet
Definition: ControlGraph.cpp:30
a control network
Definition: ControlNet.h:207
const QVector< QString > GetCubesOnIsland(const int &island) const
Definition: ControlGraph.cpp:127
const QVector< QString > GetCubeList() const
Definition: ControlGraph.cpp:157
bool IsConnected() const
Returns true if this ControlGraph is connected or false otherwise.
Definition: ControlGraph.cpp:108
int GetIslandCount() const
There can be 0 islands or 2 or more islands.
Definition: ControlGraph.cpp:117
ControlGraph & operator=(const ControlGraph &other)
Definition: ControlGraph.cpp:186
Definition: Calculator.h:33
Control Network statistics and connectivity.
Definition: ControlGraph.h:57
Definition: CubeIoHandler.h:39
Definition: CubeIoHandler.h:38
Definition: ControlCubeGraphNode.h:28

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:16:19