Commit d336f5f5 authored by Kristin Berry's avatar Kristin Berry
Browse files

More updates to add boost to the graph

parent 2ce6e148
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ namespace Isis {

  //! initialize pointers and other data to NULL
  void ControlMeasure::InitializeToNull() {

    // Previously these were initialized to 0.0 in the constructor.
    p_sample = Null;
    p_line = Null;
+1 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
 */

#include <QObject>
#include "ControlCubeGraphNode.h"

template< class A> class QVector;
template< class A> class QList;
@@ -36,7 +37,6 @@ namespace Isis {
  class Camera;
  class ControlMeasureLogData;
  class ControlPoint;
  class ControlCubeGraphNode;
  class PvlGroup;
  class PvlKeyword;

+15 −5
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@ int main() {
  ControlMeasure m;
  qDebug() << "Test 1 Default values";
  m.SetChooserName("ManuallySet");
  qDebug() << "Set Chooser Name" ; 
  m.SetDateTime("2001-01-01T00:00:00");
  qDebug() << "Set DateTime" ; 
  outit(m);

  m.SetCubeSerialNumber("Test");
@@ -52,33 +54,33 @@ int main() {
  m.SetChooserName("Bob");
  m.SetDateTime("2005-05-03T00:00:00");
  qDebug() << "Test 2";
  outit(m);
  //  outit(m);

  m.SetType(ControlMeasure::Candidate);
  m.SetChooserName("Bob");
  m.SetDateTime("2005-05-03T00:00:00");
  qDebug() << "Test 3";
  outit(m);
  //  outit(m);

  m.SetType(ControlMeasure::Manual);
  m.SetChooserName("Bob");
  m.SetDateTime("2005-05-03T00:00:00");
  m.SetEditLock(true);
  qDebug() << "Test 4";
  outit(m);
  //   outit(m);

  m.SetType(ControlMeasure::RegisteredPixel);
  m.SetChooserName("Bob");
  m.SetDateTime("2005-05-03T00:00:00");
  m.SetEditLock(false);
  qDebug() << "Test 5";
  outit(m);
  //  outit(m);

  m.SetType(ControlMeasure::RegisteredSubPixel);
  m.SetChooserName("Bob");
  m.SetDateTime("2005-05-03T00:00:00");
  qDebug() << "Test 6";
  outit(m);
  //  outit(m);

  m.SetLogData(ControlMeasureLogData(ControlMeasureLogData::GoodnessOfFit, 5.0));
  m.SetChooserName("Bob");
@@ -186,13 +188,21 @@ int main() {
}

void outit(ControlMeasure &m) {
  qDebug() << "In outit";
  ControlNet net;
  qDebug() << "made the net";
  ControlPoint *pt = new ControlPoint;
  qDebug() << "made the point";
  pt->Add(new ControlMeasure(m));
  qDebug() << "added the measure";
  pt->SetId("CP01");
    qDebug() << "added the measure";
  pt->SetChooserName("Me");
    qDebug() << "added the measure";
  pt->SetDateTime("Yesterday");
    qDebug() << "added the measure";
  net.AddPoint(pt);
  qDebug() << "added the point";
  net.SetNetworkId("Identifier");
  net.SetCreatedDate("Yesterday");
  net.SetModifiedDate("Yesterday");
+9 −12
Original line number Diff line number Diff line
@@ -643,7 +643,13 @@ namespace Isis {
    // Remove the measure from the node.  
    m_controlGraph[m_vertexMap[serial]].measures.removeAll(measure);

    // you're deleting that vertex from the control point's graph.

    // TODO: decrement the strength on the correct edge.
    // Get the parent control point.
    // Get all other measures for the control point
    // All of the other serial numbers / verticies you're connected to. 
    // decrement all their weights. 

    //If this caused the node to be empty,then delete the node.
    if (m_controlGraph[m_vertexMap[serial]].measures.size() <= 0) {
@@ -836,15 +842,6 @@ namespace Isis {
  }


  /**
   * @returns A list of all the cube graph nodes in the network
   */
  QList< ControlCubeGraphNode * > ControlNet::GetCubeGraphNodes() {
    // Just delete function? 
    return cubeGraphNodes->values();
  }


  /**
   * Does a check to ensure that the given serial number is contained within
   * the network.  If it is not, then an exception is thrown
+0 −1
Original line number Diff line number Diff line
@@ -276,7 +276,6 @@ namespace Isis {

      QList< QString > GetCubeSerials() const;
      QString GraphToString() const;
      QList< ControlCubeGraphNode * > GetCubeGraphNodes();
      QList< QList< QString > > GetSerialConnections() const;
      int getEdgeCount() const;
      QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber);
Loading