Research Article
Estimating Network Flow Length Distributions via Bayesian Nonnegative Tensor Factorization
Algorithm 1
Uniform packet sampling algorithm.
(1) | function Sample Uniformly Random π, flow_table, packet | (2) | if > rand_double (0, 1) then | (3) | flow = flow_table·look-up (packet) | (4) | if flow is null then | (5) | flow new Flow (packet) | (6) | else | (7) | flow·length+ = 1 | (8) | flow_table·insert_or_update (flow) |
|