Isis 3.0 Programmer Reference
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 
77  void CalculateIslands();
78 
81 
84 
87 
96 
101  bool connected;
102 
105 
121  public:
122  AdjacentCubeList(const int &cubeIndex, const int &cpIndex, const int
123  & cmIndex);
124  AdjacentCubeList(const AdjacentCubeList &other);
126 
127  const QVector< int > GetAdjacentCubes() const;
128  void AddConnection(const int &cubeIndex, const int &cpIndex, const
129  int &cmIndex);
131 
132  private:
135  };
136  };
137 };
138 
139 #endif
~ControlGraph()
Destruct a ControlGraph.
const GroupedStatistics & GetMeasureStats(const QString &CubeSerialNumber) const
AdjacentCubeList(const int &cubeIndex, const int &cpIndex, const int &cmIndex)
Construct a new AdjacentCubeList given one initial adjacent connection.
Grouped Statistics.
void HashCubesAndPopulateGraph()
ControlGraph(ControlNet *someControlNet)
construct a ControlGraph given a ControlNet
ControlNet * cnet
ControlNet to make a graph from.
Definition: ControlGraph.h:80
~AdjacentCubeList()
destruct an AdjacentCubeList
bool connected
Stores the state of the graphs connectivity so that connectivity must only be calculated once...
Definition: ControlGraph.h:101
a control network
Definition: ControlNet.h:207
QHash< int, QString > * cubeIndexToIdHash
Used to get a cube serial number from an index.
Definition: ControlGraph.h:86
const QVector< QString > GetCubesOnIsland(const int &island) const
const QVector< QString > GetCubeList() const
bool IsConnected() const
Returns true if this ControlGraph is connected or false otherwise.
QMap< int, QVector< QPair< int, int > > > * connections
stores all edges or connections for an adjacent cube
Definition: ControlGraph.h:134
int GetIslandCount() const
There can be 0 islands or 2 or more islands.
const QVector< int > GetAdjacentCubes() const
ControlGraph & operator=(const ControlGraph &other)
AdjacentCubeList & operator=(const AdjacentCubeList &other)
QHash< QString, int > * cubeIdToIndexHash
Used to get an index from a cube serial number.
Definition: ControlGraph.h:83
void CalculateIslands()
Determines whether or not islands exist and calculates what they are if present.
QVector< QVector< int > > * islands
Stores a list of islands which are themselves a list of cube indices.
Definition: ControlGraph.h:104
QMap< int, QPair< AdjacentCubeList, GroupedStatistics > > * graph
THE GRAPH!! It is a map of cube indices to a pair.
Definition: ControlGraph.h:95
Control Graph nested class.
Definition: ControlGraph.h:120
Control Network statistics and connectivity.
Definition: ControlGraph.h:57
void AddConnection(const int &cubeIndex, const int &cpIndex, const int &cmIndex)
Adds a connection to an AdjacentCubeList.

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