94 return static_cast<int>(p);
97 using ClockType = std::chrono::high_resolution_clock;
112 return ClockType::now();
Core header for the Aleph-w library.
Class Now is a practical class for timing based in a high resolution clock.
ClockType::time_point TimePointType
static double compute_time_diff(const TimePointType &rtp, const TimePointType <p, const Precision &precision)
Calculates the time that has elapsed between two time points.
TimePointType start()
Sets internally the current time point.
std::chrono::high_resolution_clock ClockType
static const double precision_values[]
const Precision & get_precision() const
Gets the type of precision.
double delta()
Like elapsed().
static int to_int(Precision p)
Precision
Precision for timing.
void set_precision(const Precision &_precision)
Sets the type of precision.
Now(bool start_now=false)
Builds a new object with default values.
ClockType::duration DurationType
static TimePointType current_time_point()
Gets the current time point.
Now(const Precision &_precision, bool start_now=false)
Builds a new object with parametric precision time.
static double delta(const TimePointType &tp, const Precision &precision=Precision::Milliseconds)
Like elapsed(const TimePointType & tp, const Precision & precision = MILLISECONDS).
double elapsed()
Calculates the time that has elapsed since the last time start(), elapsed() or delta() was called.
static double elapsed(const TimePointType &tp, const Precision &precision=Precision::Milliseconds)
Calculates the time that has elapsed since a given time point.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.