Fix formating

This commit is contained in:
Patrick Niklaus
2017-03-02 21:16:48 +00:00
committed by Patrick Niklaus
parent e737700c7b
commit c2a5cc034a
7 changed files with 37 additions and 29 deletions
+3 -3
View File
@@ -19,9 +19,9 @@ struct CoreCH final
{
};
template<typename AlgorithmT> const char* name();
template<> inline const char* name<CH>() { return "CH"; }
template<> inline const char* name<CoreCH>() { return "CoreCH"; }
template <typename AlgorithmT> const char *name();
template <> inline const char *name<CH>() { return "CH"; }
template <> inline const char *name<CoreCH>() { return "CoreCH"; }
}
namespace algorithm_trais
+8 -4
View File
@@ -63,12 +63,14 @@ template <typename AlgorithmT> class Engine final : public EngineInterface
{
if (config.use_shared_memory)
{
util::Log(logDEBUG) << "Using shared memory with algorithm " << algorithm::name<AlgorithmT>();
util::Log(logDEBUG) << "Using shared memory with algorithm "
<< algorithm::name<AlgorithmT>();
facade_provider = std::make_unique<WatchingProvider<AlgorithmT>>();
}
else
{
util::Log(logDEBUG) << "Using internal memory with algorithm " << algorithm::name<AlgorithmT>();
util::Log(logDEBUG) << "Using internal memory with algorithm "
<< algorithm::name<AlgorithmT>();
facade_provider =
std::make_unique<ImmutableProvider<AlgorithmT>>(config.storage_config);
}
@@ -157,7 +159,8 @@ template <> bool Engine<algorithm::CH>::CheckCompability(const EngineConfig &con
else
{
std::ifstream in(config.storage_config.hsgr_data_path.string().c_str());
if (!in) return false;
if (!in)
return false;
in.seekg(0, std::ios::end);
auto size = in.tellg();
@@ -185,7 +188,8 @@ template <> bool Engine<algorithm::CoreCH>::CheckCompability(const EngineConfig
else
{
std::ifstream in(config.storage_config.core_data_path.string().c_str());
if (!in) return false;
if (!in)
return false;
in.seekg(0, std::ios::end);
std::size_t size = in.tellg();
+4 -3
View File
@@ -57,7 +57,8 @@ namespace engine
*
* You can chose between three algorithms:
* - Algorithm::CH
* Contraction Hierarchies, extremely fast queries but slow pre-processing. The default right now.
* Contraction Hierarchies, extremely fast queries but slow pre-processing. The default right
* now.
* - Algorithm::CoreCH
* Contractoin Hierachies with partial contraction for faster pre-processing but slower queries.
*
@@ -72,8 +73,8 @@ struct EngineConfig final
enum class Algorithm
{
CH, // will upgrade to CoreCH if it finds core data
CoreCH // will fail hard if there is no core data
CH, // will upgrade to CoreCH if it finds core data
CoreCH // will fail hard if there is no core data
};
storage::StorageConfig storage_config;
@@ -15,7 +15,6 @@ namespace engine
namespace routing_algorithms
{
using CandidateList = std::vector<PhantomNodeWithDistance>;
using CandidateLists = std::vector<CandidateList>;
using SubMatchingList = std::vector<map_matching::SubMatching>;