Skip to main content
. 2017 Jun 16;17(6):1410. doi: 10.3390/s17061410
Algorithm 2 Series strings comparison.
1: function (SSC(T,RefSet,a,p))
2:   valid_sections = list()
3:   valid_strings = list()
4:   for V in RefSet do ▹ Creates reference set’s strings
5:    Standardize(V)
6:    string_V = SAX_string(V, a, p)
7:    valid_strings.append(string_V)
8:   end for
9:   for section in T do
10:    if basic_rules(section) then
11:     counter =0
12:     Standardize(section)
13:     string_section = SAX_string(section, alfa = a, paa_size = p)
14:     for string_V in valid_strings do
15:      if equal_mindist(string_V, string_section) then
16:       counter++
17:      end if
18:     end for
19:     if counter 0.75×length(RefSet) then ▹ 75% of the reference set matches
20:      valid_sections.append(section)
21:     end if
22:    end if
23:   end for
   return (valid_sections)
24: end function