Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
Common

Classes

struct  duckdb_jaro_winkler::common::is_iterator< T >
struct  duckdb_jaro_winkler::common::BitvectorHashmap
struct  duckdb_jaro_winkler::common::PatternMatchVector
struct  duckdb_jaro_winkler::common::BlockPatternMatchVector

Functions

constexpr double duckdb_jaro_winkler::common::result_cutoff (double result, double score_cutoff)
template<typename T, typename U>
T duckdb_jaro_winkler::common::ceildiv (T a, U divisor)
template<typename InputIt1, typename InputIt2>
int64_t duckdb_jaro_winkler::common::remove_common_prefix (InputIt1 &first1, InputIt1 last1, InputIt2 &first2, InputIt2 last2)

Detailed Description

Common utilities shared among multiple functions

Function Documentation

◆ result_cutoff()

double duckdb_jaro_winkler::common::result_cutoff ( double result,
double score_cutoff )
constexpr
108219{
108220 return (result >= score_cutoff) ? result : 0;
108221}

◆ ceildiv()

template<typename T, typename U>
T duckdb_jaro_winkler::common::ceildiv ( T a,
U divisor )
108225{
108226 return static_cast<T>(a / divisor) + static_cast<T>((a % divisor) != 0);
108227}

◆ remove_common_prefix()

template<typename InputIt1, typename InputIt2>
int64_t duckdb_jaro_winkler::common::remove_common_prefix ( InputIt1 & first1,
InputIt1 last1,
InputIt2 & first2,
InputIt2 last2 )

Removes common prefix of two string views // todo

108234{
108235 // DuckDB passes a raw pointer, but this gives compile errors for std::
108236 int64_t len1 = std::distance(first1, last1);
108237 int64_t len2 = std::distance(first2, last2);
108238 const int64_t max_comparisons = std::min<int64_t>(len1, len2);
108239 int64_t prefix;
108240 for (prefix = 0; prefix < max_comparisons; prefix++) {
108241 if (first1[prefix] != first2[prefix]) {
108242 break;
108243 }
108244 }
108245
108246// int64_t prefix = static_cast<int64_t>(
108247// std::distance(first1, std::mismatch(first1, last1, first2, last2).first));
108248 first1 += prefix;
108249 first2 += prefix;
108250 return prefix;
108251}
::int64_t int64_t