USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ControlGraph Class Reference

Control Network statistics and connectivity. More...

#include <ControlGraph.h>

Collaboration diagram for Isis::ControlGraph:
Collaboration graph

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 GroupedStatisticsGetMeasureStats (const QString &CubeSerialNumber) const
 
ControlGraphoperator= (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

ControlNetcnet
 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.
 

Detailed Description

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.

Author
2009-09-23 Eric Hyer
See Also
ControlNet ControlPoint ControlMeasure GroupedStatistics
History:

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.

Constructor & Destructor Documentation

Isis::ControlGraph::ControlGraph ( ControlNet someControlNet)

construct a ControlGraph given a ControlNet

Parameters
someControlNetControlNet 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

Parameters
otherThe 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.

Member Function Documentation

void Isis::ControlGraph::CalculateIslands ( )
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
Returns
A list of all CubeSerialNumbers in the given ControlNet

Definition at line 157 of file ControlGraph.cpp.

References cubeIdToIndexHash.

const QVector< QString > Isis::ControlGraph::GetCubesOnIsland ( const int &  island) const
Parameters
islandA list of all cubes that are on this island are desired
Returns
A list of CubeSerialNumbers which are located on the given island

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
Parameters
CubeSerialNumberThe Serial number of the cube to get Statistics on
Returns
Statistics for all measures associated with the given cube

Definition at line 176 of file ControlGraph.cpp.

References cubeIdToIndexHash, and graph.

void Isis::ControlGraph::HashCubesAndPopulateGraph ( )
private
Parameters
someControlNetThe 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)
Parameters
otherThe ControlGraph on the right side of the =

Definition at line 186 of file ControlGraph.cpp.

References cnet, connected, cubeIdToIndexHash, cubeIndexToIdHash, graph, and islands.

Member Data Documentation

ControlNet* Isis::ControlGraph::cnet
private

ControlNet to make a graph from.

Definition at line 78 of file ControlGraph.h.

Referenced by ControlGraph(), HashCubesAndPopulateGraph(), operator=(), and ~ControlGraph().

bool Isis::ControlGraph::connected
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=().

QHash< QString, int >* Isis::ControlGraph::cubeIdToIndexHash
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().

QHash< int, QString >* Isis::ControlGraph::cubeIndexToIdHash
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().

QMap< int, QPair< AdjacentCubeList, GroupedStatistics > >* Isis::ControlGraph::graph
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().

QVector< QVector< int > >* Isis::ControlGraph::islands
private

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().


The documentation for this class was generated from the following files: