Representative Periods duration function

Let \(f = \left\{\begin{array}{ccc} [0,T] & \longrightarrow & \mathbb{R}_+ \\ t & \mapsto & f(t) \end{array}\right.\)
Let \(RP = \{(d_i,\omega_i), i \in \{1,\cdots , n\}\}\) a set of representative periods where \(d_i\) are a part of \([0,T]\) and \(\omega_i\) are weights (\(\sum \omega_i = 1\)).

The duration function of \(RP\) is defined as :

\[\begin{split}C(f) : = \left\{\begin{array}{ccc} \mathbb{R}_+ & \longrightarrow & [0,T] \\ x & \mapsto & \sum_{i=1}^n \omega_i \cdot C(f_{|d_i})(x) \end{array}\right.\end{split}\]