Hoa central
Search.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Ustring\Test\Unit;
38 
39 use Hoa\Ustring as LUT;
40 use Hoa\Test;
41 
50 class Search extends Test\Unit\Suite
51 {
52  public function case_approximated()
53  {
54  $this
55  ->given(
56  $x = 'GATAA',
57  $y = 'CAGATAAGAGAA',
58  $k = 1
59  )
60  ->when($result = LUT\Search::approximated($y, $x, $k))
61  ->then
62  ->array($result)
63  ->isEqualTo([
64  0 => [
65  'i' => 1,
66  'j' => 6,
67  'l' => 5
68  ],
69  1 => [
70  'i' => 2,
71  'j' => 7,
72  'l' => 5
73  ],
74  2 => [
75  'i' => 3,
76  'j' => 8,
77  'l' => 5
78  ],
79  3 => [
80  'i' => 7,
81  'j' => 12,
82  'l' => 5
83  ]
84  ]);
85  }
86 }
static approximated($y, $x, $k)
Definition: Search.php:58