Research Article

Visual Analytic Method for Metro Anomaly Detection and Diffusion

Algorithm 1

Spatiotemporal anomaly diffusion algorithm for our system.
Input: the abnormal points for all stations.
Output: the diffusion relationship for all stations.
(1) for do
(2)  for do
(3)   if .flag = = 1 then?
(4)     is inserted into
(5)    .flag = 1
(6)   while ! = null do
(7)    delete first element in the
(8)    insert into
(9)    for do
(10)     if ! = 0 then
(11)       is inserted into
(12)      .flag = 1
(13)    end
(14)    for set () do
(15)     if ! = 0 then
(16)       is inserted into
(17)      .flag = 1
(18)    end
(19)   end
(20)   if () ≥ 2 then
(21)    return
(22)  end
(23) end