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
duckdb::SubtractOperator Struct Reference

Public Member Functions

template<>
float Operation (float left, float right)
template<>
double Operation (double left, double right)
template<>
interval_t Operation (interval_t left, interval_t right)
template<>
int64_t Operation (date_t left, date_t right)
template<>
date_t Operation (date_t left, int32_t right)
template<>
timestamp_t Operation (date_t left, interval_t right)
template<>
timestamp_t Operation (timestamp_t left, interval_t right)
template<>
interval_t Operation (timestamp_t left, timestamp_t right)
template<>
float Operation (float left, float right)
template<>
double Operation (double left, double right)
template<>
int64_t Operation (date_t left, date_t right)
template<>
date_t Operation (date_t left, int32_t right)
template<>
interval_t Operation (interval_t left, interval_t right)
template<>
timestamp_t Operation (date_t left, interval_t right)
template<>
timestamp_t Operation (timestamp_t left, interval_t right)
template<>
interval_t Operation (timestamp_t left, timestamp_t right)

Static Public Member Functions

template<class TA, class TB, class TR>
static TR Operation (TA left, TB right)

Member Function Documentation

◆ Operation() [1/9]

template<class TA, class TB, class TR>
TR duckdb::SubtractOperator::Operation ( TA left,
TB right )
inlinestatic
54054 {
54055 return left - right;
54056 }

◆ Operation() [2/9]

template<>
float duckdb::SubtractOperator::Operation ( float left,
float right )
229744 {
229745 auto result = left - right;
229746 return result;
229747}

◆ Operation() [3/9]

template<>
double duckdb::SubtractOperator::Operation ( double left,
double right )
229750 {
229751 auto result = left - right;
229752 return result;
229753}

◆ Operation() [4/9]

template<>
int64_t duckdb::SubtractOperator::Operation ( date_t left,
date_t right )
229756 {
229757 return int64_t(left.days) - int64_t(right.days);
229758}
::int64_t int64_t

◆ Operation() [5/9]

template<>
date_t duckdb::SubtractOperator::Operation ( date_t left,
int32_t right )
229761 {
229762 if (!Date::IsFinite(left)) {
229763 return left;
229764 }
229765 int32_t days;
229766 if (!TrySubtractOperator::Operation(left.days, right, days)) {
229767 throw OutOfRangeException("Date out of range");
229768 }
229769
229770 date_t result(days);
229771 if (!Date::IsFinite(result)) {
229772 throw OutOfRangeException("Date out of range");
229773 }
229774 return result;
229775}
static bool IsFinite(date_t date)
Returns true if the specified date is finite.
Definition duckdb.hpp:5078
::int32_t int32_t

◆ Operation() [6/9]

template<>
interval_t duckdb::SubtractOperator::Operation ( interval_t left,
interval_t right )
229778 {
229779 interval_t result;
229780 if (!TrySubtractOperator::Operation(left.months, right.months, result.months)) {
229781 throw OutOfRangeException("Interval months subtraction out of range");
229782 }
229783 if (!TrySubtractOperator::Operation(left.days, right.days, result.days)) {
229784 throw OutOfRangeException("Interval days subtraction out of range");
229785 }
229786 if (!TrySubtractOperator::Operation(left.micros, right.micros, result.micros)) {
229787 throw OutOfRangeException("Interval micros subtraction out of range");
229788 }
229789 return result;
229790}

◆ Operation() [7/9]

template<>
timestamp_t duckdb::SubtractOperator::Operation ( date_t left,
interval_t right )
229793 {
229794 return AddOperator::Operation<date_t, interval_t, timestamp_t>(left, Interval::Invert(right));
229795}
static interval_t Invert(interval_t interval)
Returns the inverted interval.
Definition duckdb.cpp:123564

◆ Operation() [8/9]

template<>
timestamp_t duckdb::SubtractOperator::Operation ( timestamp_t left,
interval_t right )
229798 {
229799 return AddOperator::Operation<timestamp_t, interval_t, timestamp_t>(left, Interval::Invert(right));
229800}

◆ Operation() [9/9]

template<>
interval_t duckdb::SubtractOperator::Operation ( timestamp_t left,
timestamp_t right )
229803 {
229804 return Interval::GetDifference(left, right);
229805}
static interval_t GetDifference(timestamp_t timestamp_1, timestamp_t timestamp_2)
Returns the exact difference between two timestamps (days and seconds).
Definition duckdb.cpp:123542

The documentation for this struct was generated from the following file: