ad_map_access
MapMatchedPositionConfidenceListValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
24 #include "spdlog/fmt/ostr.h"
25 #include "spdlog/spdlog.h"
26 
40  bool const logErrors = true)
41 {
42  bool inValidInputRange = true;
43 
44  if (inValidInputRange)
45  {
46  for (auto const &member : input)
47  {
48  bool memberInValidInputRange = withinValidInputRange(member, logErrors);
49  inValidInputRange = inValidInputRange && memberInValidInputRange;
50  if (!memberInValidInputRange && logErrors)
51  {
52  spdlog::error(
53  "withinValidInputRange(::ad::map::match::MapMatchedPositionConfidenceList)>> {}, invalid member {}",
54  input,
55  member); // LCOV_EXCL_BR_LINE
56  }
57  }
58  }
59  return inValidInputRange;
60 }
MapMatchedPositionValidInputRange.hpp
MapMatchedPositionConfidenceList.hpp
ad::map::match::MapMatchedPositionConfidenceList
std::vector<::ad::map::match::MapMatchedPosition > MapMatchedPositionConfidenceList
DataType MapMatchedPositionConfidenceList.
Definition: MapMatchedPositionConfidenceList.hpp:44
withinValidInputRange
bool withinValidInputRange(::ad::map::match::MapMatchedPositionConfidenceList const &input, bool const logErrors=true)
check if the given MapMatchedPositionConfidenceList is within valid input range
Definition: MapMatchedPositionConfidenceListValidInputRange.hpp:39