├── .clang-format
├── .gitignore
├── CMakeLists.txt
├── COPYRIGHT
├── LICENSE
├── README.md
├── RIVET.pro
├── api.cpp
├── api.h
├── computation.cpp
├── computation.h
├── computationthread.cpp
├── computationthread.h
├── console.cpp
├── customspinbox.h
├── data
├── Avian_Influenza_Data
│ ├── Avian_Recomb_500_Codensity_20th_Percentile.txt
│ ├── Avian_Recomb_500_no_fun.txt
│ └── avian_citations.txt
├── FIReps
│ ├── firep_ex.txt
│ ├── firep_ex2.txt
│ ├── firep_ex3.txt
│ ├── firep_ex4.txt
│ └── firep_ex5.txt
├── Roadmap_Benchmark_Data
│ ├── house104_RIVET_Codensity20thPercentile.txt_RIVET_Codensity20thPercentile
│ ├── house104_RIVET_no_function.txt
│ ├── network379_RIVET_Coeccentricity
│ ├── roadmap_citations.txt
│ ├── senate104_RIVET_Codensity20thPercentile.txt
│ └── senate_RIVET_no_function.txt
├── Test_Bifiltrations
│ ├── Simple_Bifiltration_Tests
│ │ ├── bifiltration_empty.txt
│ │ ├── bifiltration_single_vertex.txt
│ │ ├── bifiltration_two_vertices_one_edge.txt
│ │ ├── bifiltration_two_vertices_one_edge_multicritical.txt
│ │ ├── bifiltration_two_vertices_one_edge_x_axis.txt
│ │ ├── bifiltration_two_vertices_one_edge_y_axis.txt
│ │ ├── bifiltration_two_vertices_x_axis.txt
│ │ └── bifiltration_two_vertices_y_axis.txt
│ ├── bifiltration1.txt
│ ├── bifiltration2.txt
│ ├── bifiltration3.txt
│ ├── bifiltration4.txt
│ └── bifiltration5.txt
├── Test_Point_Clouds
│ ├── circle_300pts_density.csv
│ ├── circle_300pts_density.txt
│ ├── circle_300pts_nofunction.csv
│ ├── circle_data_240pts.png
│ ├── circle_data_240pts_codensity.txt
│ ├── circle_data_600pts_codensity.txt
│ ├── circle_data_60pts.png
│ ├── circle_data_60pts_codensity.txt
│ ├── points1.txt
│ ├── points2.txt
│ ├── points3.txt
│ ├── points4.txt
│ ├── points5.txt
│ ├── points6.txt
│ ├── ring_data_300pts_codensity.txt
│ ├── square_data_210pts_codensity.txt
│ ├── square_data_325pts_codensity.txt
│ └── square_data_450pts_codensity.txt
├── convert.py
└── metric_ex.txt
├── dataselectdialog.cpp
├── dataselectdialog.h
├── dataselectdialog.ui
├── dcel
├── anchor.cpp
├── anchor.h
├── arrangement.cpp
├── arrangement.h
├── arrangement_builder.cpp
├── arrangement_builder.h
├── arrangement_message.cpp
├── arrangement_message.h
├── barcode.cpp
├── barcode.h
├── barcode_template.cpp
├── barcode_template.h
├── dcel.cpp
├── dcel.h
├── grades.cpp
├── grades.h
└── msgpack_adapters.h
├── debug.cpp
├── debug.h
├── docs
├── _static
│ └── custom.js
├── about.rst
├── conf.py
├── gettingstarted.rst
├── images
│ ├── RIVET_progress_box.png
│ ├── RIVET_screenshot_circle300.png
│ ├── RIVET_screenshot_circle300_balldensity.png
│ ├── RIVET_screenshot_circle300v.png
│ ├── circle300_point_plot.png
│ ├── file_input_dialog.png
│ ├── file_input_selections.png
│ ├── flowchart.pdf
│ ├── flowchart.svg
│ ├── flowchart.tex
│ └── line_diagram.png
├── index.rst
├── inputdata.rst
├── installing.rst
├── old_inputdata.rst
├── pipeline.rst
├── preliminaries.rst
├── rivetconsole.rst
└── visualization.rst
├── interface
├── aboutmessagebox.cpp
├── aboutmessagebox.h
├── aboutmessagebox.ui
├── c_api.cpp
├── c_api.h
├── config_parameters.cpp
├── config_parameters.h
├── configuredialog.cpp
├── configuredialog.h
├── configuredialog.ui
├── console_interaction.cpp
├── console_interaction.h
├── control_dot.cpp
├── control_dot.h
├── data_reader.cpp
├── data_reader.h
├── file_input_reader.cpp
├── file_input_reader.h
├── file_writer.cpp
├── file_writer.h
├── input_manager.cpp
├── input_manager.h
├── input_parameters.h
├── persistence_bar.cpp
├── persistence_bar.h
├── persistence_diagram.cpp
├── persistence_diagram.h
├── persistence_dot.cpp
├── persistence_dot.h
├── progress.cpp
├── progress.h
├── progressdialog.cpp
├── progressdialog.h
├── progressdialog.ui
├── slice_diagram.cpp
├── slice_diagram.h
├── slice_line.cpp
└── slice_line.h
├── main.cpp
├── math
├── bifiltration_data.cpp
├── bifiltration_data.h
├── bigraded_matrix.cpp
├── bigraded_matrix.h
├── bool_array.cpp
├── bool_array.h
├── distance_matrix.cpp
├── distance_matrix.h
├── firep.cpp
├── firep.h
├── grade.h
├── index_matrix.cpp
├── index_matrix.h
├── map_matrix.cpp
├── map_matrix.h
├── multi_betti.cpp
├── multi_betti.h
├── persistence_updater.cpp
├── persistence_updater.h
├── phat_mod
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── README.md
│ └── include
│ │ └── phat
│ │ ├── helpers
│ │ ├── misc.h
│ │ └── thread_local_storage.h
│ │ └── representations
│ │ └── vector_heap_mod.h
├── presentation.cpp
├── presentation.h
├── sparse_matrix.h
├── template_point.cpp
├── template_point.h
├── template_points_matrix.cpp
└── template_points_matrix.h
├── numerics.cpp
├── numerics.h
├── pointer_comparator.h
├── run-tests.sh
├── test
├── .gitignore
├── CMakeLists.txt
├── catch.hpp
├── data_reader_tests.h
├── exact_ops.h
├── map_matrix_tests.h
├── output_test
│ ├── correct
│ ├── latest
│ ├── readme.txt
│ ├── run_tests.sh
│ └── test_data
│ │ ├── ring_data_300pts_codensity.txt
│ │ ├── square_data_210pts_codensity.txt
│ │ ├── square_data_325pts_codensity.txt
│ │ ├── square_data_450pts_codensity.txt
│ │ ├── test-bifiltration1.txt
│ │ ├── test-firep_ex.txt
│ │ ├── test-metric_ex.txt
│ │ ├── test-metric_ex_2.txt
│ │ ├── test-metric_ex_3.txt
│ │ ├── test-points2.txt
│ │ └── test-points2_1.txt
├── serialization_tests.h
└── unit_tests.cpp
├── timer.cpp
├── timer.h
├── type_tag.h
├── visualizationwindow.cpp
├── visualizationwindow.h
└── visualizationwindow.ui
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | # BasedOnStyle: WebKit
4 | AccessModifierOffset: -4
5 | AlignAfterOpenBracket: DontAlign
6 | AlignConsecutiveAssignments: false
7 | AlignConsecutiveDeclarations: false
8 | AlignEscapedNewlinesLeft: false
9 | AlignOperands: false
10 | AlignTrailingComments: false
11 | AllowAllParametersOfDeclarationOnNextLine: true
12 | AllowShortBlocksOnASingleLine: false
13 | AllowShortCaseLabelsOnASingleLine: false
14 | AllowShortFunctionsOnASingleLine: All
15 | AllowShortIfStatementsOnASingleLine: false
16 | AllowShortLoopsOnASingleLine: false
17 | AlwaysBreakAfterDefinitionReturnType: None
18 | AlwaysBreakAfterReturnType: None
19 | AlwaysBreakBeforeMultilineStrings: false
20 | AlwaysBreakTemplateDeclarations: false
21 | BinPackArguments: true
22 | BinPackParameters: true
23 | BraceWrapping:
24 | AfterClass: false
25 | AfterControlStatement: false
26 | AfterEnum: false
27 | AfterFunction: true
28 | AfterNamespace: false
29 | AfterObjCDeclaration: false
30 | AfterStruct: false
31 | AfterUnion: false
32 | BeforeCatch: false
33 | BeforeElse: false
34 | IndentBraces: false
35 | BreakBeforeBinaryOperators: All
36 | BreakBeforeBraces: WebKit
37 | BreakBeforeTernaryOperators: true
38 | BreakConstructorInitializersBeforeComma: true
39 | BreakAfterJavaFieldAnnotations: false
40 | BreakStringLiterals: true
41 | ColumnLimit: 0
42 | CommentPragmas: '^ IWYU pragma:'
43 | ConstructorInitializerAllOnOneLineOrOnePerLine: false
44 | ConstructorInitializerIndentWidth: 4
45 | ContinuationIndentWidth: 4
46 | Cpp11BracedListStyle: false
47 | DerivePointerAlignment: false
48 | DisableFormat: false
49 | ExperimentalAutoDetectBinPacking: false
50 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
51 | IncludeCategories:
52 | - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
53 | Priority: 2
54 | - Regex: '^(<|"(gtest|isl|json)/)'
55 | Priority: 3
56 | - Regex: '.*'
57 | Priority: 1
58 | IncludeIsMainRegex: '$'
59 | IndentCaseLabels: false
60 | IndentWidth: 4
61 | IndentWrappedFunctionNames: false
62 | JavaScriptQuotes: Leave
63 | JavaScriptWrapImports: true
64 | KeepEmptyLinesAtTheStartOfBlocks: true
65 | MacroBlockBegin: ''
66 | MacroBlockEnd: ''
67 | MaxEmptyLinesToKeep: 1
68 | NamespaceIndentation: Inner
69 | ObjCBlockIndentWidth: 4
70 | ObjCSpaceAfterProperty: true
71 | ObjCSpaceBeforeProtocolList: true
72 | PenaltyBreakBeforeFirstCallParameter: 19
73 | PenaltyBreakComment: 300
74 | PenaltyBreakFirstLessLess: 120
75 | PenaltyBreakString: 1000
76 | PenaltyExcessCharacter: 1000000
77 | PenaltyReturnTypeOnItsOwnLine: 60
78 | PointerAlignment: Left
79 | ReflowComments: true
80 | SortIncludes: true
81 | SpaceAfterCStyleCast: false
82 | SpaceBeforeAssignmentOperators: true
83 | SpaceBeforeParens: ControlStatements
84 | SpaceInEmptyParentheses: false
85 | SpacesBeforeTrailingComments: 1
86 | SpacesInAngles: false
87 | SpacesInContainerLiterals: true
88 | SpacesInCStyleCastParentheses: false
89 | SpacesInParentheses: false
90 | SpacesInSquareBrackets: false
91 | Standard: Cpp11
92 | TabWidth: 8
93 | UseTab: Never
94 | ...
95 |
96 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .qmake.stash
3 | GPATH
4 | GRTAGS
5 | GTAGS
6 | Makefile
7 | RIVET.app/
8 | *.o
9 | .idea
10 | cmake_install.cmake
11 | *.txt
12 | moc_aboutmessagebox.cpp
13 | moc_computationthread.cpp
14 | moc_configuredialog.cpp
15 | moc_dataselectdialog.cpp
16 | moc_driver.cpp
17 | moc_persistence_diagram.cpp
18 | moc_progressdialog.cpp
19 | moc_slice_diagram.cpp
20 | moc_visualizationwindow.cpp
21 | ui_aboutmessagebox.h
22 | ui_configuredialog.h
23 | ui_dataselectdialog.h
24 | ui_progressdialog.h
25 | ui_visualizationwindow.h
26 | build
27 | cmake-build-*
28 | msgpack
29 | RIVET.pro.user
30 | moc_predefs.h
31 | docs/_build
32 | data/*
33 | *.png
34 | *.rivet
35 | python
36 |
--------------------------------------------------------------------------------
/COPYRIGHT:
--------------------------------------------------------------------------------
1 | RIVET Copyright 2014-2018 The RIVET Developers
2 |
3 | Principal contributors to RIVET:
4 |
5 | Bryn Keller
6 | Michael Lesnick
7 | Matthew L. Wright
8 |
9 | Other contributors to RIVET:
10 |
11 | Philip Nadolny
12 | Abdel-Rahman Madkour
13 | Simon Segert
14 | Dave Turner
15 | Alexander Yu
16 | Roy Zhao
17 |
18 | This version of RIVET uses some modified code from the PHAT
19 | repository for persistence computation by Ulrich Bauer,
20 | Michael Kerber, and Jan Reininghaus, Copyright 2013 IST Austria.
21 |
22 |
23 | RIVET is free software: you can redistribute it and/or modify
24 | it under the terms of the GNU General Public License as published by
25 | the Free Software Foundation, either version 3 of the License, or
26 | (at your option) any later version.
27 |
28 | This program is distributed in the hope that it will be useful,
29 | but WITHOUT ANY WARRANTY; without even the implied warranty of
30 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 | GNU General Public License for more details.
32 |
33 | You should have received a copy of the GNU General Public License
34 | along with this program. If not, see .
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RIVET
2 |
3 | Program for the visualization and analysis of two-parameter persistent homology.
4 |
5 | The RIVET documentation lives here.
6 |
7 | RIVET is made available under the under the terms of the GNU General Public License, available here. The software is provided "as is," without warranty of any kind, even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for details.
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/RIVET.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2014-06-24T12:13:18
4 | #
5 | #-------------------------------------------------
6 |
7 | macx {
8 | QMAKE_CXXFLAGS+="-g -gdwarf-2 -ftemplate-depth=1024 "
9 | QMAKE_POST_LINK='/usr/bin/dsymutil rivet_GUI.app/Contents/MacOS/rivet_GUI -o rivet_GUI.app/Contents/MacOS/rivet_GUI.dsym'
10 | }
11 |
12 | CONFIG += c++11 debug
13 |
14 | QT += core gui \
15 | widgets
16 |
17 | TARGET = rivet_GUI
18 | TEMPLATE = app
19 |
20 | QMAKE_LIBDIR += /usr/local/lib #TODO: figure out how to generalize
21 | INCLUDEPATH += $$PWD/build/msgpack/src/msgpack_project/include
22 |
23 | SOURCES += main.cpp \
24 | visualizationwindow.cpp \
25 | dataselectdialog.cpp \
26 | dcel/dcel.cpp \
27 | dcel/arrangement.cpp \
28 | interface/control_dot.cpp \
29 | interface/input_manager.cpp \
30 | interface/persistence_bar.cpp \
31 | interface/persistence_diagram.cpp \
32 | interface/persistence_dot.cpp \
33 | interface/slice_diagram.cpp \
34 | interface/slice_line.cpp \
35 | math/bool_array.cpp \
36 | math/index_matrix.cpp \
37 | math/map_matrix.cpp \
38 | #math/multi_betti.cpp \
39 | dcel/barcode.cpp \
40 | dcel/barcode_template.cpp \
41 | dcel/anchor.cpp \
42 | dcel/arrangement_message.cpp \
43 | dcel/grades.cpp \
44 | #math/persistence_updater.cpp \
45 | math/template_points_matrix.cpp \
46 | math/template_point.cpp \
47 | interface/progressdialog.cpp \
48 | computationthread.cpp \
49 | interface/aboutmessagebox.cpp \
50 | interface/configuredialog.cpp \
51 | interface/config_parameters.cpp \
52 | interface/file_input_reader.cpp \
53 | interface/file_writer.cpp \
54 | debug.cpp \
55 | timer.cpp \
56 | interface/console_interaction.cpp \
57 | numerics.cpp \
58 |
59 |
60 | HEADERS += visualizationwindow.h \
61 | dataselectdialog.h \
62 | debug.h \
63 | dcel/dcel.h \
64 | dcel/arrangement.h \
65 | interface/control_dot.h \
66 | interface/input_manager.h \
67 | interface/persistence_bar.h \
68 | interface/persistence_diagram.h \
69 | interface/persistence_dot.h \
70 | interface/slice_diagram.h \
71 | interface/slice_line.h \
72 | math/bool_array.h \
73 | math/index_matrix.h \
74 | math/map_matrix.h \
75 | math/multi_betti.h \
76 | dcel/barcode.h \
77 | dcel/barcode_template.h \
78 | dcel/anchor.h \
79 | dcel/grades.h \
80 | math/persistence_updater.h \
81 | math/template_points_matrix.h \
82 | math/template_point.h \
83 | interface/progressdialog.h \
84 | computationthread.h \
85 | interface/input_parameters.h \
86 | interface/aboutmessagebox.h \
87 | interface/configuredialog.h \
88 | interface/config_parameters.h \
89 | interface/file_input_reader.h \
90 | #driver.h \
91 | interface/file_writer.h \
92 | interface/console_interaction.h \
93 | numerics.h \
94 | customspinbox.h
95 |
96 | FORMS += visualizationwindow.ui \
97 | dataselectdialog.ui \
98 | interface/progressdialog.ui \
99 | interface/aboutmessagebox.ui \
100 | interface/configuredialog.ui
101 |
102 |
--------------------------------------------------------------------------------
/api.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Bryn Keller on 11/16/17.
3 | //
4 | #include "api.h"
5 |
6 | std::unique_ptr from_istream(std::istream &file) {
7 | std::string type;
8 | std::getline(file, type);
9 | InputParameters params;
10 | TemplatePointsMessage templatePointsMessage;
11 | ArrangementMessage arrangementMessage;
12 | if (type == "RIVET_msgpack") {
13 | std::string buffer((std::istreambuf_iterator(file)),
14 | std::istreambuf_iterator());
15 |
16 | msgpack::unpacker pac;
17 | pac.reserve_buffer( buffer.size() );
18 | std::copy( buffer.begin(), buffer.end(), pac.buffer() );
19 | pac.buffer_consumed( buffer.size() );
20 |
21 | msgpack::object_handle oh;
22 | pac.next(oh);
23 | auto m1 = oh.get();
24 | // std::cout << "params" << std::endl;
25 | m1.convert(params);
26 | pac.next(oh);
27 | auto m2 = oh.get();
28 | // std::cout << "points" << std::endl;
29 | // break_stream stream;
30 | // std::cout.rdbuf(&stream);
31 | // std::cerr.rdbuf(&stream);
32 | m2.convert(templatePointsMessage);
33 | pac.next(oh);
34 | auto m3 = oh.get();
35 | // std::cout << "arrangement message" << std::endl;
36 | m3.convert(arrangementMessage);
37 |
38 | } else {
39 | throw std::runtime_error("Expected a RIVET module invariants file");
40 | }
41 | return from_messages(templatePointsMessage, arrangementMessage);
42 | }
43 |
44 | std::unique_ptr from_messages(
45 | const TemplatePointsMessage &templatePointsMessage,
46 | const ArrangementMessage &arrangementMessage) {
47 | // std::cout << "from_messages" << std::endl;
48 | std::unique_ptr result(new ComputationResult);
49 | result->arrangement.reset(arrangementMessage.to_arrangement());
50 | //result->arrangement->test_consistency();
51 | std::vector ex;
52 | const size_t* shape = templatePointsMessage.homology_dimensions.shape();
53 | ex.assign(shape, shape + templatePointsMessage.homology_dimensions.num_dimensions());
54 | result->homology_dimensions.resize(ex);
55 | result->homology_dimensions = templatePointsMessage.homology_dimensions;
56 | result->template_points = templatePointsMessage.template_points;
57 | return result;
58 | }
59 |
60 | std::vector> query_barcodes(const ComputationResult &computation,
61 | const std::vector> &offset_slopes) {
62 |
63 | Grades grades(computation.arrangement->x_exact, computation.arrangement->y_exact);
64 | std::vector> result;
65 |
66 | for (auto query : offset_slopes) {
67 | auto angle = query.first;
68 | auto offset = query.second;
69 | auto templ = computation.arrangement->get_barcode_template(angle, offset);
70 | result.push_back(templ.rescale(angle, offset, computation.template_points, grades));
71 | }
72 | return result;
73 | }
74 |
75 | Bounds compute_bounds(const ComputationResult &computation_result) {
76 | const auto grades = Grades(computation_result.arrangement->x_exact, computation_result.arrangement->y_exact);
77 | const auto x_low = grades.x.front();
78 | const auto y_low = grades.y.front();
79 | const auto x_high = grades.x.back();
80 | const auto y_high = grades.y.back();
81 | return Bounds {
82 | x_low,
83 | y_low,
84 | x_high,
85 | y_high
86 | };
87 | }
88 |
--------------------------------------------------------------------------------
/api.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Bryn Keller on 11/16/17.
3 | //
4 |
5 | #ifndef RIVET_CONSOLE_API_H
6 | #define RIVET_CONSOLE_API_H
7 |
8 | #include "dcel/anchor.h"
9 | #include "dcel/arrangement.h"
10 | #include "dcel/barcode_template.h"
11 | #include "dcel/dcel.h"
12 | #include "type_tag.h"
13 | #include
14 | #include
15 | #include
16 | #include "dcel/msgpack_adapters.h"
17 | #include "computation.h"
18 | #include "dcel/dcel.h"
19 | #include "dcel/arrangement_message.h"
20 | #include
21 |
22 | std::unique_ptr from_messages(
23 | const TemplatePointsMessage &templatePointsMessage,
24 | const ArrangementMessage &arrangementMessage);
25 |
26 | std::vector> query_barcodes(const ComputationResult &computation,
27 | const std::vector> &offset_slopes);
28 |
29 | std::unique_ptr from_istream(std::istream &file);
30 |
31 |
32 | struct Bounds {
33 | double x_low;
34 | double y_low;
35 | double x_high;
36 | double y_high;
37 | };
38 |
39 | Bounds compute_bounds(const ComputationResult &computation_result);
40 |
41 | #endif //RIVET_CONSOLE_API_H
42 |
--------------------------------------------------------------------------------
/computation.h:
--------------------------------------------------------------------------------
1 | /**********************************************************************
2 | Copyright 2014-2016 The RIVET Developers. See the COPYRIGHT file at
3 | the top-level directory of this distribution.
4 |
5 | This file is part of RIVET.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program. If not, see .
19 | **********************************************************************/
20 |
21 | #pragma once
22 |
23 | #include "dcel/barcode_template.h"
24 | #include "dcel/dcel.h"
25 | #include "interface/input_manager.h"
26 | #include "interface/data_reader.h"
27 | #include "interface/input_parameters.h"
28 | #include "math/bifiltration_data.h"
29 | #include "math/firep.h"
30 | #include "math/template_point.h"
31 | #include "numerics.h"
32 |
33 | #include "boost/multi_array.hpp"
34 | #include
35 | #include
36 | #include
37 | #include
38 |
39 | class Presentation;
40 | class MultiBetti;
41 |
42 | //TODO: Remove either this or InputData, since there's no need for both anymore now that RIVET_0 files aren't supported.
43 | class ComputationInput {
44 | protected:
45 | InputData data;
46 |
47 | public:
48 | std::vector x_exact;
49 | std::vector y_exact;
50 | std::string x_label;
51 | std::string y_label;
52 |
53 | bool x_reverse;
54 | bool y_reverse;
55 | BifiltrationData& bifiltration()
56 | {
57 | return *(data.bifiltration_data);
58 | }
59 |
60 | FIRep& rep()
61 | {
62 | return *(data.free_implicit_rep);
63 | }
64 |
65 | ComputationInput(InputData data)
66 | : data(data)
67 | , x_exact(data.x_exact)
68 | , y_exact(data.y_exact)
69 | , x_label(data.x_label)
70 | , y_label(data.y_label)
71 | , x_reverse(data.x_reverse)
72 | , y_reverse(data.y_reverse)
73 | {
74 | }
75 | };
76 |
77 | struct ComputationResult {
78 | unsigned_matrix homology_dimensions;
79 | std::vector template_points;
80 | std::shared_ptr arrangement;
81 | //std::shared_ptr bifiltration;
82 | };
83 |
84 | class Computation {
85 | public:
86 | //TODO: these signals are a little strange. It would be better to do away
87 | //with these, and to factor Computation::compute_raw into several functions
88 | //that can be called separately depending on the arguments to rivet_console.
89 | boost::signals2::signal)> arrangement_ready;
90 | boost::signals2::signal template_points_ready;
91 | boost::signals2::signal minpres_ready;
92 | Computation(int vrbsty, Progress& progress);
93 | ~Computation();
94 |
95 | std::unique_ptr compute(InputData data, bool koszul);
96 |
97 | private:
98 | Progress& progress;
99 |
100 | const int verbosity;
101 |
102 | std::unique_ptr compute_raw(ComputationInput& input, bool koszul);
103 |
104 | void compute_min_pres_and_betti_nums(ComputationInput& input, MultiBetti& mb, Presentation& pres, std::unique_ptr& result);
105 | };
106 |
--------------------------------------------------------------------------------
/computationthread.h:
--------------------------------------------------------------------------------
1 | /**********************************************************************
2 | Copyright 2014-2016 The RIVET Developers. See the COPYRIGHT file at
3 | the top-level directory of this distribution.
4 |
5 | This file is part of RIVET.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program. If not, see .
19 | **********************************************************************/
20 |
21 | #ifndef COMPUTATIONTHREAD_H
22 | #define COMPUTATIONTHREAD_H
23 |
24 | //forward declarations
25 | class InputManager;
26 | struct InputParameters;
27 | class Arrangement;
28 |
29 | #include "dcel/barcode_template.h"
30 | #include "math/template_point.h"
31 |
32 | #include
33 | #include
34 |
35 | #include
36 | typedef boost::multiprecision::cpp_rational exact;
37 | #include "boost/multi_array.hpp"
38 | typedef boost::multi_array unsigned_matrix;
39 |
40 | #include "dcel/arrangement_message.h"
41 | #include
42 |
43 | class ComputationThread : public QThread {
44 | Q_OBJECT
45 |
46 | friend class InputManager; //so that we don't have to pass all of the data structures from ComputationThread to InputManager
47 |
48 | public:
49 | ComputationThread(InputParameters& params,
50 | QObject* parent = 0);
51 | ~ComputationThread();
52 |
53 | void compute();
54 |
55 | std::shared_ptr message;
56 |
57 | signals:
58 | void advanceProgressStage();
59 | void setProgressMaximum(unsigned max);
60 | void setCurrentProgress(unsigned current);
61 | void templatePointsReady(std::shared_ptr template_points);
62 | void arrangementReady(std::shared_ptr arrangement);
63 |
64 | protected:
65 | void run() Q_DECL_OVERRIDE;
66 |
67 | private:
68 | InputParameters& params;
69 |
70 | std::shared_ptr arrangement;
71 |
72 | void compute_from_file();
73 | void unpack_message_fields();
74 | bool is_precomputed(const std::string &file_name);
75 | void load_template_points_from_file(const std::string &file_name);
76 | void load_from_file(const std::string &file_name);
77 | };
78 |
79 | //TODO: Move this somewhere. See comments on implementation for details.
80 | void write_msgpack_file(QString file_name, InputParameters const& params, TemplatePointsMessage const& message, ArrangementMessage const& arrangement);
81 | #endif // COMPUTATIONTHREAD_H
82 |
--------------------------------------------------------------------------------
/customspinbox.h:
--------------------------------------------------------------------------------
1 | #ifndef CUSTOMSPINBOX_H
2 | #define CUSTOMSPINBOX_H
3 | #include
4 |
5 | //class for spin boxes used in visualization window
6 | class CustomSpinBox : public QDoubleSpinBox
7 | {
8 | public:
9 | explicit CustomSpinBox(QWidget *parent = 0) : QDoubleSpinBox(parent) {
10 |
11 | }
12 |
13 | bool from_button=false; //whether the value change came from the up/down buttons (as opposed to typing the value)
14 |
15 | //called whenever the up or down button is pushed
16 | void stepBy(int steps){
17 | from_button=true;
18 | QDoubleSpinBox::stepBy(steps); //this will change the value and thereby call CustomSpinBox::textFromValue
19 | from_button=false;
20 | }
21 |
22 | //this function controls the appearance of the text
23 | QString textFromValue(double val) const {
24 |
25 |
26 | QString str = QString::number(fabs(val), 'f', decimals() );
27 | //take absolute value so that "-0" is not immediately corrected to "0"
28 |
29 | //make sure there is not a zero before the decimal point for numbers in (-1,1)
30 | if((val>-1&& val<0) ||(val>0&& val<1)){
31 | str.replace("0.",".");
32 | }
33 |
34 | //add in the minus sign if the value is negative, or if the user was in the middle of typing
35 | //a negative value >-1 (e.g. -0.5)
36 | if(val<0 ||(!from_button && (lineEdit()->text().size()>0&& lineEdit()->text().at(0)=='-'))){
37 | str="-"+str;
38 | }
39 |
40 | str.remove( QRegExp("0+$") ); // Remove any number of trailing 0's
41 | str.remove( QRegExp("\\.$") ); // If the last character is just a '.' then remove it
42 |
43 | return str;
44 | }
45 | };
46 |
47 |
48 | #endif // CUSTOMSPINBOX_H
49 |
--------------------------------------------------------------------------------
/data/Avian_Influenza_Data/avian_citations.txt:
--------------------------------------------------------------------------------
1 | The data files in this folder are adapted from a data file
2 | “pnas2013/avian_all_nt_concat_jukes_cantor.csv” available at
3 |
4 | https://github.com/RabadanLab/ph_datasets
5 |
6 | The associated paper is:
7 |
8 | “Topology of viral evolution,” Chan, J., Carlsson, G., and Rabadan, R.
9 | Proceedings of the National Academy of Sciences 110.46 (2013) 18566-18571.
10 | http://www.pnas.org/content/110/46/18566
--------------------------------------------------------------------------------
/data/FIReps/firep_ex.txt:
--------------------------------------------------------------------------------
1 | --datatype firep
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 2 2 0
7 | 3 2 ; 0
8 | 2 3 ; 0 1
9 | 1 1 ;
10 | 2 2 ;
11 |
12 |
--------------------------------------------------------------------------------
/data/FIReps/firep_ex2.txt:
--------------------------------------------------------------------------------
1 | --datatype firep
2 | --xlabel parameter 1
3 | --ylabel parameter 2
4 |
5 | # data starts here
6 | 2 3 3
7 | 1 0 ; 0 1 2
8 | 0 1 ; 0 1 2
9 | 0 0 ; 1 2
10 | 0 0 ; 0 2
11 | 0 0 ; 0 1
--------------------------------------------------------------------------------
/data/FIReps/firep_ex3.txt:
--------------------------------------------------------------------------------
1 | --datatype firep
2 | --xlabel parameter 1
3 | --ylabel parameter 2
4 |
5 | # data starts here
6 | 2 5 4
7 | 1 0 ; 1 3 4
8 | 0 1 ; 0 1 2
9 | 0 0 ; 0 2
10 | 0 0 ; 1 2
11 | 0 0 ; 0 1
12 | 0 0 ; 1 3
13 | 0 0 ; 2 3
--------------------------------------------------------------------------------
/data/FIReps/firep_ex4.txt:
--------------------------------------------------------------------------------
1 | --datatype firep
2 | --xlabel parameter 1
3 | --ylabel parameter 2
4 |
5 | # data starts here
6 | 2 5 4
7 | 5 .2 ; 0 1 2
8 | .25 5 ; 2 3 4
9 |
10 | 0 0.1 ; 1 2
11 | 0.1 0 ; 0 2
12 | 0 0.2 ; 0 1
13 | 0.2 0 ; 0 3
14 | 0.25 0 ; 1 3
--------------------------------------------------------------------------------
/data/FIReps/firep_ex5.txt:
--------------------------------------------------------------------------------
1 | --datatype firep
2 | --xlabel parameter 1
3 | --ylabel parameter 2
4 |
5 | # data starts here
6 | 2 5 4
7 | .75 2 ; 0 1 2
8 | 2 .75 ; 2 3 4
9 | 0 0.1 ; 1 2
10 | 0.1 0 ; 0 2
11 | 0 0.2 ; 0 1
12 | 0.2 0 ; 0 3
13 | 0.25 0 ; 1 3
--------------------------------------------------------------------------------
/data/Roadmap_Benchmark_Data/roadmap_citations.txt:
--------------------------------------------------------------------------------
1 | The data files in this folder are adapted from Nina Otter’s repository of metric spaces, originally assembled for benchmarking persistent homology computations. Nina’s repository is available at:
2 | https://github.com/n-otter/PH-roadmap
3 |
4 | The corresponding paper, with references to the original sources of the data, is:
5 |
6 | “A roadmap for the computation of persistent homology,” Nina Otter, Mason A Porter, Ulrike Tillmann, Peter Grindrod, and Heather A Harrington, EPJ Data Science, 2017.
7 | https://link.springer.com/article/10.1140/epjds/s13688-017-0109-5
8 |
9 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_empty.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | #empty bifiltration
7 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_single_vertex.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | #single vertex bifiltration
7 | 0 ; 0 0
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_one_edge.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | #two incomparable vertices, one edge
7 | 1 ; 1 0
8 | 2 ; 0 1
9 | 1 2 ; 1 1
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_one_edge_multicritical.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | #two incomparable vertices, one edge
7 | 1 ; 1 0
8 | 2 ; 0 1
9 | 1 2 ; 2 1 1 2
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_one_edge_x_axis.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 1 0
8 | 1 2 ; 2 0
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_one_edge_y_axis.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 0 1
8 | 1 2 ; 0 2
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_x_axis.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 1 0
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/Simple_Bifiltration_Tests/bifiltration_two_vertices_y_axis.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 0 1
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/bifiltration1.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 0 ; 0 0
7 | 1 ; 0 0
8 | 2 ; 0 0
9 | 3 ; 0 0
10 | 0 1 ; 0 0
11 | 0 2 ; 0 0
12 | 1 2 ; 0 0
13 | 0 1 2 ; 1 0
14 | 1 3 ; 0 1
15 | 2 3 ; 0 1
16 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/bifiltration2.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 0 ; 0 0
7 | 3 ; 1 0
8 | 4 ; 1 0
9 | 1 ; 0 1
10 | 2 ; 0 1
11 | 0 3 ; 1 0
12 | 0 4 ; 1 0
13 | 3 4 ; 1 0
14 | 0 1 ; 0 1
15 | 0 2 ; 0 1
16 | 1 2 ; 0 1
17 | 0 1 2 ; 1 2
18 | 0 3 4 ; 2 1
19 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/bifiltration3.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 0 0
8 | 3 ; 0 0
9 | 4 ; 0 0
10 | 1 2 ; 1 0
11 | 2 3 ; 0 0
12 | 3 4 ; 0 1
13 |
14 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/bifiltration4.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 2 0
7 | 2 ; 1 1
8 | 3 ; 0 2
9 | 1 2 ; 2 1
10 | 2 3 ; 1 2
11 | 1 3 ; 2 2
12 | 1 2 3 ; 3 3
13 | 4 ; 3 3
14 | 1 4 ; 3 3
15 | 2 4 ; 3 3
16 | 3 4 ; 3 3
17 | 1 2 4 ; 3 3
18 | 1 3 4 ; 3 3
19 | 2 3 4 ; 3 3
20 | 1 2 3 4 ; 3 3
21 | 5 ; 4 4
22 | 5 1 ; 5 5
23 | 5 2 ; 5 5
24 | 1 2 5 ; 6 6
25 |
26 |
--------------------------------------------------------------------------------
/data/Test_Bifiltrations/bifiltration5.txt:
--------------------------------------------------------------------------------
1 | --datatype bifiltration
2 | --xlabel x-label
3 | --ylabel y-label
4 |
5 | # data starts here
6 | 1 ; 0 0
7 | 2 ; 0 0
8 | 3 ; 0 0
9 | 4 ; 0 0
10 | 1 2 ; 1 1
11 | 2 3 ; 1 1
12 | 3 4 ; 1 1
13 | 4 1 ; 1 1
14 | 1 3 ; 2 2
15 | 2 4 ; 2 2
16 | 1 2 3 ; 3 2
17 | 1 2 4 ; 2 3
18 | 1 3 4 ; 2 2
19 | 2 3 4 ; 3 3
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/circle_300pts_nofunction.csv:
--------------------------------------------------------------------------------
1 | 1.57,2.40
2 | 1.21,2.70
3 | 0.79,-2.44
4 | -2.44,-2.24
5 | -2.54,-1.25
6 | 1.25,-2.74
7 | 0.24,3.04
8 | -0.77,3.25
9 | -1.30,2.42
10 | -2.09,1.74
11 | -1.16,-2.57
12 | -2.92,-0.20
13 | -2.57,-0.29
14 | -1.05,-3.38
15 | -1.24,2.80
16 | -0.35,-2.86
17 | -2.29,-1.31
18 | 2.84,0.35
19 | 0.73,-2.68
20 | 1.70,2.45
21 | 1.92,2.83
22 | 1.50,-2.66
23 | 2.45,0.30
24 | -0.48,-3.04
25 | 0.96,2.75
26 | 1.10,-2.35
27 | 2.94,1.36
28 | -1.21,2.77
29 | -2.45,-1.88
30 | -2.28,-2.19
31 | -2.32,2.03
32 | 2.27,1.75
33 | -2.53,-1.52
34 | 2.60,1.66
35 | -3.54,0.24
36 | -2.58,1.45
37 | 0.37,-3.41
38 | -2.31,-0.98
39 | -1.29,-2.49
40 | 3.03,-0.95
41 | 2.09,-2.35
42 | -1.42,-2.57
43 | -2.03,3.23
44 | 1.33,-2.51
45 | -2.05,2.57
46 | 1.15,2.39
47 | 2.09,1.85
48 | 0.95,-3.15
49 | 2.63,0.62
50 | 2.11,-2.54
51 | 2.71,-2.35
52 | 2.59,1.33
53 | -2.79,-1.46
54 | -2.71,0.20
55 | 1.41,-3.21
56 | -3.29,-0.81
57 | -1.49,-2.52
58 | -2.36,-1.68
59 | 2.34,-0.61
60 | 1.22,-2.35
61 | -2.48,-1.92
62 | -2.85,1.00
63 | -1.65,-1.45
64 | -1.89,-2.30
65 | -2.20,-1.84
66 | 0.40,-2.71
67 | 2.02,-1.65
68 | 0.84,2.82
69 | -2.95,1.65
70 | -2.38,-1.98
71 | 1.26,2.72
72 | 3.22,-1.27
73 | 2.38,1.16
74 | 3.20,-0.43
75 | 2.10,2.38
76 | 0.54,3.07
77 | -3.19,-0.68
78 | -1.39,3.15
79 | -2.83,0.90
80 | -1.39,-2.69
81 | 1.50,-2.26
82 | 1.99,2.46
83 | 2.03,-2.12
84 | -2.43,-2.02
85 | -2.18,2.23
86 | 1.12,-2.45
87 | -1.22,3.01
88 | 1.19,-2.96
89 | 0.44,2.74
90 | 1.26,-2.91
91 | 2.61,-1.59
92 | -2.41,-0.46
93 | -1.76,2.10
94 | -0.07,3.17
95 | -1.54,-2.65
96 | 1.25,3.19
97 | -2.10,-2.05
98 | -1.70,-2.23
99 | 1.39,-2.14
100 | -1.29,-2.24
101 | -0.67,2.98
102 | 1.97,2.45
103 | -2.93,-0.94
104 | -0.69,2.72
105 | -2.60,-0.87
106 | 1.43,-2.96
107 | -1.52,2.11
108 | -2.33,1.02
109 | 2.61,-0.82
110 | -2.13,1.89
111 | -0.54,3.20
112 | -0.19,-2.87
113 | -2.96,0.98
114 | -2.11,-2.18
115 | -2.85,0.95
116 | -2.42,-1.92
117 | -1.41,-2.17
118 | -3.07,0.57
119 | 2.04,2.22
120 | -1.61,2.39
121 | 0.65,2.53
122 | -2.86,-1.15
123 | 2.83,-1.17
124 | -0.65,2.63
125 | -0.16,-2.89
126 | 2.99,-0.39
127 | 1.97,-1.49
128 | 3.01,-1.10
129 | 1.61,2.38
130 | -0.26,-3.35
131 | 2.39,0.83
132 | -2.26,1.96
133 | -2.36,-2.16
134 | -2.17,1.85
135 | 0.48,2.68
136 | -2.20,1.92
137 | 0.79,-3.01
138 | 2.76,0.80
139 | 2.79,0.97
140 | -0.28,-2.49
141 | 1.55,-3.23
142 | -1.39,-2.09
143 | -3.50,-0.21
144 | -0.59,-2.56
145 | -1.18,2.32
146 | -1.26,-2.60
147 | 0.53,-2.69
148 | 1.35,-2.17
149 | -1.56,3.07
150 | -0.05,2.91
151 | -1.41,2.64
152 | 3.02,1.08
153 | -2.72,-0.59
154 | 2.55,0.62
155 | -2.70,0.55
156 | 2.60,1.49
157 | -1.86,-0.88
158 | -0.93,2.61
159 | 2.79,-0.90
160 | -0.52,2.75
161 | -2.19,1.35
162 | -3.06,-0.92
163 | -2.29,-1.93
164 | 2.24,2.41
165 | -1.53,1.96
166 | 2.72,0.62
167 | -2.61,-1.65
168 | 0.87,-2.45
169 | -1.20,3.10
170 | -2.86,1.02
171 | -3.52,1.20
172 | -2.18,1.82
173 | 1.24,-2.60
174 | 0.66,-2.55
175 | 0.69,3.46
176 | 0.71,-2.24
177 | 0.03,-2.89
178 | 0.35,-3.27
179 | -0.70,-2.81
180 | 1.50,-2.48
181 | -2.33,1.12
182 | -3.09,-0.20
183 | 1.02,-2.73
184 | 0.88,3.12
185 | 0.84,-3.08
186 | -3.24,-0.48
187 | 3.17,-0.70
188 | 0.10,3.65
189 | -2.23,2.22
190 | -2.56,1.11
191 | -2.68,-0.49
192 | 1.53,2.31
193 | -1.59,3.08
194 | -3.16,1.47
195 | 0.95,-2.45
196 | -1.36,-2.11
197 | -2.60,1.65
198 | -1.60,2.55
199 | 2.28,-2.20
200 | -1.52,2.64
201 | 2.24,-5.09
202 | -2.55,3.86
203 | -4.29,-2.14
204 | 3.54,0.05
205 | -3.70,5.18
206 | 3.29,-1.68
207 | -4.74,5.98
208 | 1.55,-3.42
209 | 2.61,5.73
210 | 3.34,5.11
211 | 2.72,-5.77
212 | 4.34,3.71
213 | 5.09,3.07
214 | 4.95,-1.23
215 | -1.56,0.74
216 | 4.31,4.98
217 | 0.62,-3.56
218 | -4.44,-2.36
219 | -2.26,4.37
220 | -3.09,-1.30
221 | -3.19,2.87
222 | 0.66,4.31
223 | 4.53,3.62
224 | 4.56,1.09
225 | -1.05,3.86
226 | -5.97,3.37
227 | 3.25,-5.26
228 | -5.99,-3.34
229 | -2.71,-5.91
230 | 5.86,0.38
231 | 0.31,-5.95
232 | -2.17,2.67
233 | -0.71,5.74
234 | 1.70,-5.84
235 | -4.71,2.83
236 | -3.69,-0.29
237 | 3.65,-0.83
238 | -0.08,-5.94
239 | 3.91,4.74
240 | -4.21,4.85
241 | 0.57,0.01
242 | 5.50,4.49
243 | 2.32,5.66
244 | -3.48,0.83
245 | 1.19,1.09
246 | -5.01,3.18
247 | 2.60,3.56
248 | -4.64,-0.52
249 | 2.80,5.89
250 | 4.22,4.57
251 | 2.46,-5.02
252 | -4.53,-4.19
253 | 1.03,5.13
254 | -2.47,4.48
255 | 1.69,-3.38
256 | 3.79,-2.29
257 | -4.83,-0.16
258 | -0.66,0.74
259 | -1.78,0.06
260 | 4.03,-0.83
261 | 3.89,-1.22
262 | -2.45,-4.01
263 | 5.95,2.46
264 | 4.61,2.34
265 | 3.00,-4.28
266 | 2.67,-0.12
267 | 5.58,-5.32
268 | -0.75,4.89
269 | -0.93,-0.01
270 | -0.79,4.18
271 | -4.01,-0.83
272 | -2.48,-5.19
273 | 3.08,5.69
274 | -1.40,-3.59
275 | -0.07,-1.94
276 | -5.89,-2.05
277 | -0.10,-2.87
278 | 1.11,-0.97
279 | 0.43,-3.78
280 | -2.27,-2.26
281 | -4.78,4.57
282 | 0.77,-0.13
283 | 5.94,-2.80
284 | -2.28,-1.75
285 | -4.96,-3.32
286 | 3.97,0.85
287 | 1.49,-5.88
288 | 5.03,4.94
289 | -1.62,-1.25
290 | -0.88,5.46
291 | -4.96,2.61
292 | 0.33,-3.22
293 | -3.73,5.32
294 | 0.26,2.60
295 | -2.84,-3.65
296 | -2.14,-1.37
297 | 5.65,-0.45
298 | 1.67,0.59
299 | -5.31,3.26
300 | -1.52,-4.94
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/circle_data_240pts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivetTDA/rivet/32ce9e80b06353ed24f1e4e24469bdc6968cc52f/data/Test_Point_Clouds/circle_data_240pts.png
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/circle_data_60pts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivetTDA/rivet/32ce9e80b06353ed24f1e4e24469bdc6968cc52f/data/Test_Point_Clouds/circle_data_60pts.png
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/circle_data_60pts_codensity.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 1000
3 | --xlabel [+] codensity
4 |
5 | # function values
6 | 6.0000 2.0000 7.0000 6.0000 8.0000 8.0000 8.0000 6.0000 7.0000 7.0000 8.0000 6.0000 9.0000 7.0000 7.0000 9.0000 6.0000 1.0000 9.0000 4.0000 7.0000 9.0000 12.0000 6.0000 10.0000 2.0000 7.0000 4.0000 4.0000 9.0000 7.0000 9.0000 7.0000 5.0000 9.0000 9.0000 9.0000 6.0000 5.0000 4.0000 9.0000 9.0000 9.0000 5.0000 5.0000 8.0000 6.0000 4.0000 4.0000 1.0000 11.0000 6.0000 7.0000 11.0000 9.0000 8.0000 4.0000 6.0000 9.0000 6.0000
7 |
8 | # data starts here
9 | -3.8439 -0.6973
10 | 1.1527 0.3861
11 | 0.1530 -3.5394
12 | -2.6580 -1.9822
13 | 1.6725 -2.0966
14 | 3.5813 -0.2643
15 | 3.3843 -1.6059
16 | -3.2684 2.0882
17 | 3.3568 0.0072
18 | -3.3957 -0.8919
19 | 0.6370 2.3420
20 | 0.3969 2.0307
21 | -1.2712 2.4639
22 | 2.6018 1.7909
23 | -0.0590 -3.8078
24 | -0.0218 -2.3280
25 | -2.4889 -0.6943
26 | -2.9072 4.7021
27 | 1.2219 -2.1475
28 | -4.3818 -1.5025
29 | 3.6820 -1.0062
30 | 1.9746 -1.5751
31 | -1.8048 2.2819
32 | -2.6982 -0.8097
33 | -1.9421 2.7937
34 | -2.9825 -2.9012
35 | 0.4643 -1.5394
36 | -0.1223 -4.7186
37 | 2.5801 2.5975
38 | 1.1130 -2.2758
39 | 2.8568 0.4552
40 | -2.7954 1.6668
41 | -0.3790 -3.2296
42 | 0.7875 -3.9428
43 | -2.6388 2.9078
44 | -0.0869 -2.6937
45 | 2.2525 -1.8100
46 | 0.1683 3.6198
47 | 2.1294 2.2561
48 | 0.6187 3.9173
49 | -1.4204 1.9547
50 | -0.7853 3.3090
51 | 2.9141 -1.4279
52 | 3.9675 1.3254
53 | -1.5505 -1.0208
54 | 1.5614 2.5624
55 | 1.6060 -2.5876
56 | 0.4998 0.8770
57 | -4.0605 -0.0561
58 | 5.3878 -0.0227
59 | -1.7234 2.2101
60 | 3.1031 0.9456
61 | 0.5897 2.5375
62 | -2.6645 1.9917
63 | -1.3434 2.3157
64 | 0.3724 2.8896
65 | 4.0277 -1.7094
66 | -0.9292 -2.0819
67 | 2.4397 -0.5920
68 | -2.7154 1.1153
69 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points1.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 4.1
3 | --xlabel birth
4 |
5 | # function values
6 | 0 0 0 0 0
7 |
8 | # data starts here
9 | 0.3 1.5
10 | 4.2 3.8
11 | 5.6 2.3
12 | 2.9 5.1
13 | 3.3 2.0
14 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points2.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 3.1
3 | --xlabel time
4 |
5 | # function values
6 | 1 3.2 2 4 2.5 2.4 2
7 |
8 | # data starts here
9 | 0.3 1.5 2.1
10 | 4.2 3.8 4.9
11 | 5.6 2.3 6
12 | 2.9 5.1 3.3
13 | 3.3 2.0 2.5
14 | 4.1 1.1 2.3
15 | 1.1 1.3 1.7
16 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points3.txt:
--------------------------------------------------------------------------------
1 | #testing comments
2 |
3 | --datatype points_fn
4 |
5 | --maxdist 4.5
6 | --xlabel birth time
7 |
8 | # function values
9 | 1 3 4 2 2 2
10 |
11 | # data starts here
12 |
13 | #now the data
14 | 1 2
15 | 1 5
16 | 2 4
17 | 2 7
18 | 1 8
19 | 5 4
20 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points4.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 4.5
3 | --xlabel birth time
4 |
5 | # function values
6 | 1 3 4 2 2 2 4 1
7 |
8 | # data starts here
9 | 1 2
10 | 1 5
11 | 2 4
12 | 2 7
13 | 1 8
14 | 5 4
15 | 5 7
16 | 4 2
17 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points5.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 4.5
3 | --xlabel birth time
4 |
5 | # function values
6 | 1 1 1 1 2
7 |
8 | # data starts here
9 | 1 5
10 | 2 7
11 | 1 8
12 | 5 4
13 | 2 4
14 |
--------------------------------------------------------------------------------
/data/Test_Point_Clouds/points6.txt:
--------------------------------------------------------------------------------
1 | --datatype points_fn
2 | --maxdist 100
3 | --xlabel time
4 |
5 | # function values: examples of RIVET's scientific notation input
6 | 1.23e+006 2.34e-006 3.2 2e4 -5.1e-1 7e+02 -4.02e2 3
7 |
8 | # data starts here
9 | 0 0
10 | 0 1
11 | 0 10
12 | 10 0
13 | 10 10
14 | 0 0
15 | 1 0
16 | 1 1
17 |
--------------------------------------------------------------------------------
/data/metric_ex.txt:
--------------------------------------------------------------------------------
1 | --datatype metric_fn
2 | #x-axis label
3 | --xlabel function values
4 |
5 | #y-axis label
6 | --ylabel distance
7 |
8 | #max distance to be a 1-simplex
9 | --maxdist 3
10 |
11 | #function values for five points
12 | 0 1 0.5 1 0.7
13 |
14 | # data starts here
15 |
16 | #distances
17 | 0.2 2.5 3.4 0.5
18 | 0.4 2 2.8
19 | 0.6 4
20 | 1
21 |
22 |
--------------------------------------------------------------------------------
/dataselectdialog.h:
--------------------------------------------------------------------------------
1 | /**********************************************************************
2 | Copyright 2014-2016 The RIVET Developers. See the COPYRIGHT file at
3 | the top-level directory of this distribution.
4 |
5 | This file is part of RIVET.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program. If not, see .
19 | **********************************************************************/
20 |
21 | #ifndef DATASELECTDIALOG_H
22 | #define DATASELECTDIALOG_H
23 |
24 | //forward declarations
25 | struct InputParameters;
26 |
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | #include