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;
33 class GroupedStatistics;
68 CubeSerialNumber)
const;
128 void AddConnection(
const int &cubeIndex,
const int &cpIndex,
const
~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.
void HashCubesAndPopulateGraph()
ControlGraph(ControlNet *someControlNet)
construct a ControlGraph given a ControlNet
ControlNet * cnet
ControlNet to make a graph from.
~AdjacentCubeList()
destruct an AdjacentCubeList
bool connected
Stores the state of the graphs connectivity so that connectivity must only be calculated once...
QHash< int, QString > * cubeIndexToIdHash
Used to get a cube serial number from an index.
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
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.
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.
QMap< int, QPair< AdjacentCubeList, GroupedStatistics > > * graph
THE GRAPH!! It is a map of cube indices to a pair.
Control Graph nested class.
Control Network statistics and connectivity.
void AddConnection(const int &cubeIndex, const int &cpIndex, const int &cmIndex)
Adds a connection to an AdjacentCubeList.