Information Technology Reference
In-Depth Information
Algorithm 1.
Extraction of main segments
Input:
S
m
: the set of all segments in the given trajectory
ε
: the maximum acceptable differences between adjacent segments' angular values
Δ
: the maximum acceptable differences between adjacent segments' acceleration val-
ues
Output:
S
n
: the set of extracted main segments in the given trajectory
Processing:
S
a
=
S
1
;
for
S
b
∈ S
m
do
if
|
(
S
a
)
θ
−
(
S
b
)
θ
| >ε
or
|
(
S
a
)
a
−
(
S
b
)
a
| >Δ
then
S
b
is another main segment;
S
a
=
S
b
;
S
b
=
S
b
+1
;
else
S
b
is not one of main segments;
S
b
=
S
b
+1
;
end if
end for
Algorithm 2.
Raw classification
Input:
H
: the TDH set of all trajectories
D
: the TDH distance set between all trajectories
d
min
:Themin
d
value between TDH for trajectories be allowed in one class
Output:
C
L
: the List of classes
Processing:
Sort set
D
and choose the trajectories whose
d
( distance between TDH ) are the
most small ones to be K centroid.
for
H
a
∈ H
do
TempDis
=0;
for
i
=1;
i ≤ K
;
i
++
do
if
TempDis<d
(
H
a
,Cid
i
)
then
TempDis
=
d
(
H
a
,Cid
i
);
C
a
=
i
;
end if
end for
if
TempDis<d
min
then
K
=
K
+1;
H
a
belongs to the new
K
th class;
else
Then
H
a
belongs to the
C
a
th class,
m
C
a
is the number of trajectories belongs
to
Class
;
Cid
C
a
=
m
C
a
m
C
a
+1
1
m
C
a
+1
Cid
C
a
+
H
a
m
C
a
=
m
C
a
+1;
end if
end for
Search WWH ::
Custom Search