set.seed(10)
x = rbridge(1, 1000)
# the p-variation
pv = pvar(x, 2); pv
# the same value the used the the p-varation partitnio.
Sum_p(x[pv$Partition], 2)
# any other partition must give not greater result
Sum_p(x, 2)
Run the code above in your browser using DataLab