diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2017-02-22 16:35:08 +0100 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2017-02-22 16:35:08 +0100 |
commit | 2487d8ae49f4d5bd101e4800d342254b13137bad (patch) | |
tree | 69c4f9b94e51baec83dadaf38ccc39634a5e2367 /geom_bottleneck/example/bottleneck_dist.cpp | |
parent | 1bfe54d664d929884a579973b00960b4348c4258 (diff) |
temporary fix for exact version from files
Diffstat (limited to 'geom_bottleneck/example/bottleneck_dist.cpp')
-rw-r--r-- | geom_bottleneck/example/bottleneck_dist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/geom_bottleneck/example/bottleneck_dist.cpp b/geom_bottleneck/example/bottleneck_dist.cpp index 9a50ce2..655de44 100644 --- a/geom_bottleneck/example/bottleneck_dist.cpp +++ b/geom_bottleneck/example/bottleneck_dist.cpp @@ -14,11 +14,12 @@ int main(int argc, char* argv[]) } PairVector diagramA, diagramB; - if (!geom_bt::readDiagramPointSet(argv[1], diagramA)) { + int decPrecision { 0 }; + if (!geom_bt::readDiagramPointSet(argv[1], diagramA, decPrecision)) { std::exit(1); } - if (!geom_bt::readDiagramPointSet(argv[2], diagramB)) { + if (!geom_bt::readDiagramPointSet(argv[2], diagramB, decPrecision)) { std::exit(1); } @@ -30,14 +31,14 @@ int main(int argc, char* argv[]) if (approxEpsilon > 0.0) { res = geom_bt::bottleneckDistApprox(diagramA, diagramB, approxEpsilon); } else if (approxEpsilon == 0.0) { - res = geom_bt::bottleneckDistExact(diagramA, diagramB); + res = geom_bt::bottleneckDistExact(diagramA, diagramB, decPrecision); } else { std::cerr << "The third parameter (relative error) must be positive!" << std::endl; std::exit(1); } } else { // only filenames have been supplied, return exact distance - res = geom_bt::bottleneckDistExact(diagramA, diagramB); + res = geom_bt::bottleneckDistExact(diagramA, diagramB, decPrecision); } std::cout << std::setprecision(15) << res << std::endl; |