Compare commits
13 Commits
master
...
v5.7.0-rc.
Author | SHA1 | Date | |
---|---|---|---|
|
a5eeca9b51 | ||
|
1a09ff6005 | ||
|
2794a52902 | ||
|
cb796e4cfc | ||
|
522ec4fc2e | ||
|
15dc5899b0 | ||
|
7e932ffbc3 | ||
|
810596bb83 | ||
|
acabf0075c | ||
|
1ed72db210 | ||
|
6bdf95dfb4 | ||
|
785ae89cd8 | ||
|
16680191de |
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,6 +7,8 @@
|
||||
#############################
|
||||
osrm-deps
|
||||
|
||||
.ycm_extra_conf.py
|
||||
|
||||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
|
10
.npmignore
10
.npmignore
@ -1,10 +0,0 @@
|
||||
*
|
||||
!README.md
|
||||
!CHANGELOG.md
|
||||
!CONTRIBUTING.MD
|
||||
!LICENCE.TXT
|
||||
!package.json
|
||||
!example
|
||||
!lib/*.js
|
||||
!profiles/*
|
||||
!profiles/lib/*
|
41
.travis.yml
41
.travis.yml
@ -7,8 +7,9 @@ git:
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
nodejs:
|
||||
node_js:
|
||||
- "4"
|
||||
- "6"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
@ -16,6 +17,7 @@ notifications:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- "5.7"
|
||||
# enable building tags
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
@ -36,6 +38,8 @@ env:
|
||||
- CCACHE_VERSION=3.3.1
|
||||
- CMAKE_VERSION=3.7.2
|
||||
- MASON="$(pwd)/scripts/mason.sh"
|
||||
- ENABLE_NODE_BINDINGS=On
|
||||
- NODE="4"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@ -45,12 +49,14 @@ matrix:
|
||||
|
||||
# Debug Builds
|
||||
- os: linux
|
||||
compiler: "gcc-6-debug"
|
||||
compiler: "gcc-6-debug-cov-asan"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- os: linux
|
||||
compiler: "clang-4.0-debug"
|
||||
@ -61,12 +67,12 @@ matrix:
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
||||
|
||||
- os: linux
|
||||
compiler: "mason-linux-debug-santize"
|
||||
compiler: "mason-linux-debug-asan"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON ENABLE_NODE_BINDINGS=ON
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
@ -75,7 +81,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release"
|
||||
@ -104,6 +110,8 @@ matrix:
|
||||
compiler: "mason-osx-release"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
# Disabled because of CI slowness
|
||||
#- os: linux
|
||||
@ -140,8 +148,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
|
||||
nodejs: "4"
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON PUBLISH_NODE_BINDINGS=On JOBS=3
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
@ -164,8 +171,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
|
||||
nodejs: "4"
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON PUBLISH_NODE_BINDINGS=On JOBS=3
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
@ -188,8 +194,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
|
||||
nodejs: "6"
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON PUBLISH_NODE_BINDINGS=On JOBS=3 NODE="6"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
@ -212,8 +217,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
|
||||
nodejs: "6"
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON PUBLISH_NODE_BINDINGS=On JOBS=3 NODE="6"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
@ -230,6 +234,10 @@ matrix:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
before_install:
|
||||
- source $NVM_DIR/nvm.sh
|
||||
- nvm install $NODE
|
||||
- nvm use $NODE
|
||||
- node --version
|
||||
- if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi
|
||||
- |
|
||||
if [[ -z $JOBS ]]; then
|
||||
@ -331,14 +339,9 @@ script:
|
||||
- ./unit_tests/server-tests
|
||||
- ./unit_tests/partition-tests
|
||||
- |
|
||||
if [ -n "${ENABLE_NODE_BINDINGS}" ] && [ -z "${ENABLE_SANITIZER}" ]; then
|
||||
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
|
||||
npm run nodejs-tests
|
||||
fi
|
||||
- popd
|
||||
- yarn test
|
||||
|
||||
after_success:
|
||||
- |
|
||||
if [ -n "${ENABLE_COVERAGE}" ]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
fi
|
||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,17 +1,28 @@
|
||||
- Track preprocessing flag in the map matching plugin.
|
||||
|
||||
# 5.7.0
|
||||
- Changes from 5.6
|
||||
- Algorithm:
|
||||
- OSRM object has new option `algorithm` that allows the selection of a routing algorithm.
|
||||
- New experimental algorithm: Multi-Level Dijkstra with new toolchain:
|
||||
- Allows for fast metric updates in below a minute on continental sized networks (osrm-customize)
|
||||
- Plugins supported: `match` and `route`
|
||||
- Quickstart: `osrm-extract data.osm.pbf`, `osrm-partition data.osrm`, `osrm-customize data.osrm`, `osrm-routed --algorithm=MLD data.osrm`
|
||||
- NodeJs Bindings
|
||||
- Merged https://github.com/Project-OSRM/node-osrm into repository. Build via `cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On`.
|
||||
- `OSRM` object has new option `algorihtm="CH","CoreCH","MLD"`
|
||||
- Internals
|
||||
- Shared memory notification via conditional variables on Linux or semaphore queue on OS X and Windows with a limit of 128 OSRM Engine instances
|
||||
- Files
|
||||
- .osrm.datasource_index file was removed. Data is now part of .osrm.geometries.
|
||||
- .osrm.edge_lookup was removed. The option `--generate-edge-lookup` does nothing now.
|
||||
- `osrm-contract` does not depend on the `.osrm.fileIndex` file anymore
|
||||
- `osrm-extract` creates new file `.osrm.cnbg` and `.cnbg_to_ebg`
|
||||
- `osrm-partition` creates new file `.osrm.partition` and `.osrm.cells`
|
||||
- `osrm-customize` creates new file `.osrm.mldgr`
|
||||
- Profiles
|
||||
- Added `force_split_edges` flag to global properties. True value guarantees that segment_function will be called for all segments, but also could double memory consumption
|
||||
- Map Matching:
|
||||
- new option `gaps=split|ignore` to enable/disbale track splitting
|
||||
- new option `tidy=true|false` to simplify traces automatically
|
||||
|
||||
# 5.6.3
|
||||
- Changes from 5.6.0
|
||||
|
@ -1019,3 +1019,39 @@ Feature: Collapse
|
||||
| a,g | road,cross,cross | depart,fork left,arrive | a,b,g |
|
||||
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
||||
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
||||
|
||||
|
||||
# http://www.openstreetmap.org/way/92415447 #3933
|
||||
Scenario: Use total angle for turn instruction if entry step has large distance
|
||||
# """
|
||||
# kf-_ a
|
||||
# | - b
|
||||
# | c
|
||||
# |d
|
||||
# e
|
||||
# |
|
||||
# i
|
||||
# """
|
||||
|
||||
And the node locations
|
||||
| node | lat | lon | #id |
|
||||
| a | -33.9644254 | 151.1378673 | 33226063 |
|
||||
| b | -33.9644373 | 151.1377172 | 1072787030 |
|
||||
| c | -33.9644791 | 151.1374452 | 4222903609 |
|
||||
| d | -33.9645661 | 151.1372654 | 4222903610 |
|
||||
| e | -33.9646986 | 151.1371539 | 4222903611 |
|
||||
| f | -33.964386 | 151.1372133 | 1072786875 |
|
||||
| i | -33.9661796 | 151.1368491 | 2781176918 |
|
||||
| k | -33.9643781 | 151.1371422 | 1684173853 |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | #id |
|
||||
| ab | trunk | President Avenue | yes | 92415447 |
|
||||
| bcde | trunk | President Avenue | yes | 422534457 |
|
||||
| bf | trunk | President Avenue | yes | 447779786 |
|
||||
| fk | trunk | President Avenue | yes | 179293012 |
|
||||
| fei | trunk | Princes Highway | yes | 130099670 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,i | President Avenue,Princes Highway,Princes Highway | depart,turn left,arrive | a,b,i |
|
||||
|
@ -80,6 +80,8 @@ inline Result keep_all(const MatchParameters ¶ms)
|
||||
|
||||
inline Result tidy(const MatchParameters ¶ms, Thresholds cfg = {15., 5})
|
||||
{
|
||||
BOOST_ASSERT(!params.coordinates.empty());
|
||||
|
||||
Result result;
|
||||
|
||||
result.can_be_removed.resize(params.coordinates.size(), false);
|
||||
@ -91,10 +93,8 @@ inline Result tidy(const MatchParameters ¶ms, Thresholds cfg = {15., 5})
|
||||
Thresholds running{0., 0};
|
||||
|
||||
// Walk over adjacent (coord, ts)-pairs, with rhs being the candidate to discard or keep
|
||||
for (std::size_t current = 0; current < params.coordinates.size() - 1; ++current)
|
||||
for (std::size_t current = 0, next = 1; next < params.coordinates.size() - 1; ++current, ++next)
|
||||
{
|
||||
const auto next = current + 1;
|
||||
|
||||
auto distance_delta = util::coordinate_calculation::haversineDistance(
|
||||
params.coordinates[current], params.coordinates[next]);
|
||||
running.distance_in_meters += distance_delta;
|
||||
@ -130,7 +130,11 @@ inline Result tidy(const MatchParameters ¶ms, Thresholds cfg = {15., 5})
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_ASSERT(result.can_be_removed.size() == params.coordinates.size());
|
||||
// Always use the last coordinate if more than two original coordinates
|
||||
if (params.coordinates.size() > 1)
|
||||
{
|
||||
result.tidied_to_original.push_back(params.coordinates.size() - 1);
|
||||
}
|
||||
|
||||
// We have to filter parallel arrays that may be empty or the exact same size.
|
||||
// result.parameters contains an empty MatchParameters at this point: conditionally fill.
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "osrm/trip_parameters.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/make_unique.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
@ -81,7 +80,7 @@ inline void ParseResult(const osrm::Status &result_status, const std::string & /
|
||||
inline engine_config_ptr argumentsToEngineConfig(const Nan::FunctionCallbackInfo<v8::Value> &args)
|
||||
{
|
||||
Nan::HandleScope scope;
|
||||
auto engine_config = boost::make_unique<osrm::EngineConfig>();
|
||||
auto engine_config = std::make_unique<osrm::EngineConfig>();
|
||||
|
||||
if (args.Length() == 0)
|
||||
{
|
||||
@ -631,7 +630,7 @@ inline route_parameters_ptr
|
||||
argumentsToRouteParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
bool requires_multiple_coordinates)
|
||||
{
|
||||
route_parameters_ptr params = boost::make_unique<osrm::RouteParameters>();
|
||||
route_parameters_ptr params = std::make_unique<osrm::RouteParameters>();
|
||||
bool has_base_params = argumentsToParameter(args, params, requires_multiple_coordinates);
|
||||
if (!has_base_params)
|
||||
return route_parameters_ptr();
|
||||
@ -681,7 +680,7 @@ argumentsToRouteParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
inline tile_parameters_ptr
|
||||
argumentsToTileParameters(const Nan::FunctionCallbackInfo<v8::Value> &args, bool /*unused*/)
|
||||
{
|
||||
tile_parameters_ptr params = boost::make_unique<osrm::TileParameters>();
|
||||
tile_parameters_ptr params = std::make_unique<osrm::TileParameters>();
|
||||
|
||||
if (args.Length() < 2)
|
||||
{
|
||||
@ -742,7 +741,7 @@ inline nearest_parameters_ptr
|
||||
argumentsToNearestParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
bool requires_multiple_coordinates)
|
||||
{
|
||||
nearest_parameters_ptr params = boost::make_unique<osrm::NearestParameters>();
|
||||
nearest_parameters_ptr params = std::make_unique<osrm::NearestParameters>();
|
||||
bool has_base_params = argumentsToParameter(args, params, requires_multiple_coordinates);
|
||||
if (!has_base_params)
|
||||
return nearest_parameters_ptr();
|
||||
@ -781,7 +780,7 @@ inline table_parameters_ptr
|
||||
argumentsToTableParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
bool requires_multiple_coordinates)
|
||||
{
|
||||
table_parameters_ptr params = boost::make_unique<osrm::TableParameters>();
|
||||
table_parameters_ptr params = std::make_unique<osrm::TableParameters>();
|
||||
bool has_base_params = argumentsToParameter(args, params, requires_multiple_coordinates);
|
||||
if (!has_base_params)
|
||||
return table_parameters_ptr();
|
||||
@ -875,7 +874,7 @@ inline trip_parameters_ptr
|
||||
argumentsToTripParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
bool requires_multiple_coordinates)
|
||||
{
|
||||
trip_parameters_ptr params = boost::make_unique<osrm::TripParameters>();
|
||||
trip_parameters_ptr params = std::make_unique<osrm::TripParameters>();
|
||||
bool has_base_params = argumentsToParameter(args, params, requires_multiple_coordinates);
|
||||
if (!has_base_params)
|
||||
return trip_parameters_ptr();
|
||||
@ -970,7 +969,7 @@ inline match_parameters_ptr
|
||||
argumentsToMatchParameter(const Nan::FunctionCallbackInfo<v8::Value> &args,
|
||||
bool requires_multiple_coordinates)
|
||||
{
|
||||
match_parameters_ptr params = boost::make_unique<osrm::MatchParameters>();
|
||||
match_parameters_ptr params = std::make_unique<osrm::MatchParameters>();
|
||||
bool has_base_params = argumentsToParameter(args, params, requires_multiple_coordinates);
|
||||
if (!has_base_params)
|
||||
return match_parameters_ptr();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "osrm",
|
||||
"version": "5.7.0-latest.6",
|
||||
"version": "5.7.0-rc.3",
|
||||
"private": false,
|
||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
||||
"dependencies": {
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NODE_HOME=$HOME/node
|
||||
export NODE_HOME
|
||||
mkdir ${NODE_HOME}
|
||||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
|
||||
curl https://s3.amazonaws.com/mapbox/apps/install-node/v2.0.0/run | NV=4.4.2 NP=darwin-x64 OD=${NODE_HOME} sh
|
||||
else
|
||||
curl https://s3.amazonaws.com/mapbox/apps/install-node/v2.0.0/run | NV=4.4.2 NP=linux-x64 OD=${NODE_HOME} sh
|
||||
fi
|
||||
|
||||
PATH="${NODE_HOME}/bin:$PATH"
|
||||
export PATH
|
||||
node --version
|
||||
npm --version
|
||||
which node
|
||||
|
||||
|
@ -74,9 +74,6 @@ double findTotalTurnAngle(const RouteStep &entry_step, const RouteStep &exit_ste
|
||||
if (entry_step.distance < MAX_COLLAPSE_DISTANCE)
|
||||
return true;
|
||||
|
||||
if (entry_step.distance > 2 * MAX_COLLAPSE_DISTANCE)
|
||||
return false;
|
||||
|
||||
// both go roughly in the same direction
|
||||
if ((entry_angle <= 185 && exit_angle <= 185) || (entry_angle >= 175 && exit_angle >= 175))
|
||||
return true;
|
||||
|
@ -53,10 +53,10 @@ BOOST_AUTO_TEST_CASE(two_item_trace_needs_tidiying_test)
|
||||
auto result = tidy::tidy(params, thresholds);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed.size(), 2);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 1);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 2);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[0], false);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[1], true);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[1], false);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[0], 0);
|
||||
}
|
||||
|
||||
@ -87,16 +87,18 @@ BOOST_AUTO_TEST_CASE(two_blobs_in_traces_needs_tidiying_test)
|
||||
auto result = tidy::tidy(params, thresholds);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed.size(), params.coordinates.size());
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 2);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 3);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[0], 0);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[1], 3);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[2], 5);
|
||||
|
||||
const auto redundant = result.can_be_removed.count();
|
||||
BOOST_CHECK_EQUAL(redundant, params.coordinates.size() - 2);
|
||||
BOOST_CHECK_EQUAL(redundant, params.coordinates.size() - 3);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[0], false);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[3], false);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[5], false);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(two_blobs_in_traces_needs_tidiying_no_timestamps_test)
|
||||
@ -118,15 +120,17 @@ BOOST_AUTO_TEST_CASE(two_blobs_in_traces_needs_tidiying_no_timestamps_test)
|
||||
auto result = tidy::tidy(params, thresholds);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed.size(), params.coordinates.size());
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 2);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 3);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[0], 0);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[1], 3);
|
||||
BOOST_CHECK_EQUAL(result.tidied_to_original[2], 5);
|
||||
|
||||
const auto redundant = result.can_be_removed.count();
|
||||
BOOST_CHECK_EQUAL(redundant, params.coordinates.size() - 2);
|
||||
BOOST_CHECK_EQUAL(redundant, params.coordinates.size() - 3);
|
||||
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[0], false);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[3], false);
|
||||
BOOST_CHECK_EQUAL(result.can_be_removed[5], false);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user