LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
mtrace_split.h File Reference

Splits a marked trace into its per-class traces: for each class, the inter-arrival times BETWEEN CONSECUTIVE EVENTS OF THAT CLASS, with the first interval measured from the origin. More...

#include <cstddef>
#include <vector>
#include "line/api/trace/trace_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for mtrace_split.h:

Go to the source code of this file.

Classes

struct  line::trace::MtraceSplitResult< T >
 Return value of mtrace_split. More...

Namespaces

namespace  line
namespace  line::trace

Functions

template<class T>
MtraceSplitResult< T > line::trace::mtrace_split (const std::vector< T > &Tv, const std::vector< int > &L)
 Splits a marked trace into its per-class traces: for each class, the inter-arrival times BETWEEN CONSECUTIVE EVENTS OF THAT CLASS, with the first interval measured from the origin.

Detailed Description

Splits a marked trace into its per-class traces: for each class, the inter-arrival times BETWEEN CONSECUTIVE EVENTS OF THAT CLASS, with the first interval measured from the origin.

Templated port of matlab/lib/m3a/m3a/mtrace/mtrace_split.m, cross-checked against jar/src/main/java/jline/api/trace/Mtrace_split.java (identical: both prepend a zero epoch before differencing).

The per-class traces partition the arrivals, and the sum of every class trace equals the epoch of that class's last event, so the sum over classes of the class sums is generally NOT the trace length.

ARITHMETIC: cumulative sums and differences, exact in Rational.

Definition in file mtrace_split.h.