Isis 3.0 Object Programmers' Reference |
Home |
Control Network statistics and connectivity. More...
#include <ControlGraph.h>
Classes | |
class | AdjacentCubeList |
Control Graph nested class. More... | |
Public Member Functions | |
ControlGraph (ControlNet *someControlNet) | |
construct a ControlGraph given a ControlNet | |
ControlGraph (const ControlGraph &other) | |
copy construct a ControlGraph object | |
~ControlGraph () | |
Destruct a ControlGraph. | |
const bool | IsConnected () const |
Returns true if this ControlGraph is connected or false otherwise. | |
const int | GetIslandCount () const |
There can be 0 islands or 2 or more islands. | |
const QVector< QString > | GetCubesOnIsland (const int &island) const |
const QVector< QString > | GetCubeList () const |
const GroupedStatistics & | GetMeasureStats (const QString &CubeSerialNumber) const |
ControlGraph & | operator= (const ControlGraph &other) |
Private Member Functions | |
void | HashCubesAndPopulateGraph () |
void | CalculateIslands () |
Determines whether or not islands exist and calculates what they are if present. | |
Private Attributes | |
ControlNet * | cnet |
ControlNet to make a graph from. | |
QHash< QString, int > * | cubeIdToIndexHash |
Used to get an index from a cube serial number. | |
QHash< int, QString > * | cubeIndexToIdHash |
Used to get a cube serial number from an index. | |
QMap< int, QPair < AdjacentCubeList, GroupedStatistics > > * | graph |
THE GRAPH!! It is a map of cube indices to a pair. | |
bool | connected |
Stores the state of the graphs connectivity so that connectivity must only be calculated once. | |
QVector< QVector< int > > * | islands |
Stores a list of islands which are themselves a list of cube indices. | |
Control Network statistics and connectivity.
This class is used to store statistics on a Control Network
This class is include safe meaning that includers of this class will only get this class.
2009-09-23 Eric Hyer Original version
2009-10-15 Eric Hyer Added GetCubeList Method
2010-10-26 Tracie Sucharski Added missing includes to cpp after removing includes from ControlNet.h.
Definition at line 55 of file ControlGraph.h.
Isis::ControlGraph::ControlGraph | ( | ControlNet * | someControlNet | ) |
construct a ControlGraph given a ControlNet
someControlNet | ControlNet to construct a ControlGraph from |
Definition at line 30 of file ControlGraph.cpp.
References CalculateIslands(), cnet, connected, cubeIdToIndexHash, cubeIndexToIdHash, Isis::ControlNet::GetNumPoints(), graph, HashCubesAndPopulateGraph(), and islands.
Isis::ControlGraph::ControlGraph | ( | const ControlGraph & | other | ) |
copy construct a ControlGraph object
other | The ControlGraph to construct a copy of |
Definition at line 61 of file ControlGraph.cpp.
References cnet, connected, cubeIdToIndexHash, cubeIndexToIdHash, graph, and islands.
Isis::ControlGraph::~ControlGraph | ( | ) |
Destruct a ControlGraph.
Definition at line 82 of file ControlGraph.cpp.
References cnet, cubeIdToIndexHash, cubeIndexToIdHash, graph, and islands.
|
private |
Determines whether or not islands exist and calculates what they are if present.
Definition at line 297 of file ControlGraph.cpp.
References graph, and islands.
Referenced by ControlGraph().
const QVector< QString > Isis::ControlGraph::GetCubeList | ( | ) | const |
Definition at line 157 of file ControlGraph.cpp.
References cubeIdToIndexHash.
const QVector< QString > Isis::ControlGraph::GetCubesOnIsland | ( | const int & | island | ) | const |
island | A list of all cubes that are on this island are desired |
Definition at line 127 of file ControlGraph.cpp.
References _FILEINFO_, connected, cubeIndexToIdHash, islands, and Isis::IException::Programmer.
const int Isis::ControlGraph::GetIslandCount | ( | ) | const |
There can be 0 islands or 2 or more islands.
GetIslandCount will never return 1 since 1 island is really just a connected graph (with 0 islands).
Definition at line 117 of file ControlGraph.cpp.
References islands.
const GroupedStatistics & Isis::ControlGraph::GetMeasureStats | ( | const QString & | CubeSerialNumber | ) | const |
CubeSerialNumber | The Serial number of the cube to get Statistics on |
Definition at line 176 of file ControlGraph.cpp.
References cubeIdToIndexHash, and graph.
|
private |
someControlNet | The ControlNet to create a ControlGraph from |
Definition at line 223 of file ControlGraph.cpp.
References cnet, cubeIdToIndexHash, cubeIndexToIdHash, Isis::ControlPoint::GetMeasure(), Isis::ControlNet::GetNumPoints(), and graph.
Referenced by ControlGraph().
const bool Isis::ControlGraph::IsConnected | ( | ) | const |
Returns true if this ControlGraph is connected or false otherwise.
Definition at line 108 of file ControlGraph.cpp.
References connected.
ControlGraph & Isis::ControlGraph::operator= | ( | const ControlGraph & | other | ) |
other | The ControlGraph on the right side of the = |
Definition at line 186 of file ControlGraph.cpp.
References cnet, connected, cubeIdToIndexHash, cubeIndexToIdHash, graph, and islands.
|
private |
ControlNet to make a graph from.
Definition at line 78 of file ControlGraph.h.
Referenced by ControlGraph(), HashCubesAndPopulateGraph(), operator=(), and ~ControlGraph().
|
private |
Stores the state of the graphs connectivity so that connectivity must only be calculated once.
Definition at line 99 of file ControlGraph.h.
Referenced by ControlGraph(), GetCubesOnIsland(), IsConnected(), and operator=().
|
private |
Used to get an index from a cube serial number.
Definition at line 81 of file ControlGraph.h.
Referenced by ControlGraph(), GetCubeList(), GetMeasureStats(), HashCubesAndPopulateGraph(), operator=(), and ~ControlGraph().
|
private |
Used to get a cube serial number from an index.
Definition at line 84 of file ControlGraph.h.
Referenced by ControlGraph(), GetCubesOnIsland(), HashCubesAndPopulateGraph(), operator=(), and ~ControlGraph().
|
private |
THE GRAPH!! It is a map of cube indices to a pair.
The first pair element is a list that contains not only all the cubes which are adjacent to it (as indices also), but also the edges that make these these connections. The second pair element contains statistics on this cube.
Definition at line 93 of file ControlGraph.h.
Referenced by CalculateIslands(), ControlGraph(), GetMeasureStats(), HashCubesAndPopulateGraph(), operator=(), and ~ControlGraph().
Stores a list of islands which are themselves a list of cube indices.
Definition at line 102 of file ControlGraph.h.
Referenced by CalculateIslands(), ControlGraph(), GetCubesOnIsland(), GetIslandCount(), operator=(), and ~ControlGraph().