Permalink
Browse files

when loading pre-computed data, viewer should not display persistence…

… diagram window if only Betti numbers, and no barcodes, have been computed
  • Loading branch information...
mlwright84 committed Jul 28, 2017
1 parent ce9b8e4 commit 4cb59af6271ae036423503d287515096005033a5
Showing with 11 additions and 0 deletions.
  1. +5 −0 dcel/arrangement_message.cpp
  2. +2 −0 dcel/arrangement_message.h
  3. +4 −0 visualizationwindow.cpp
@@ -530,3 +530,8 @@ Arrangement ArrangementMessage::to_arrangement() const
// std::clog << "All anchors identical in to_arrangement" << std::endl;
return arrangement;
}
bool ArrangementMessage::is_empty() const
{
return ( x_exact.empty() && y_exact.empty() );
}
@@ -51,6 +51,8 @@ class ArrangementMessage {
Arrangement to_arrangement() const;
bool is_empty() const;
private:
friend class boost::serialization::access;
View
@@ -166,6 +166,10 @@ void VisualizationWindow::augmented_arrangement_ready(std::shared_ptr<Arrangemen
//receive the arrangement
this->arrangement = arrangement;
if(arrangement->is_empty()) { //e.g. the arrangement contains only Betti numbers and no barcode templates
return;
}
//TESTING: print arrangement info and verify consistency
// arrangement->print_stats();
// arrangement->test_consistency();

0 comments on commit 4cb59af

Please sign in to comment.