}
$fp[$delta] = $this->snake($delta, $fp[$delta - 1], $fp[$delta + 1]);
if ($fp[$delta] >= $this->n) {
- $this->pos = $this->path[$delta]; // ·ÐÏ©¤ò·èÄê
+ $this->pos = $this->path[$delta]; // 経路を決定
return;
}
}
$_k = $k + 1;
$y = $y2;
}
- $this->path[$k] = $this->path[$_k];// ¤³¤³¤Þ¤Ç¤Î·ÐÏ©¤ò¥³¥Ô¡¼
+ $this->path[$k] = $this->path[$_k];// ã\81\93ã\81\93ã\81¾ã\81§ã\81®çµ\8cè·¯ã\82\92ã\82³ã\83\94ã\83¼
$x = $y - $k;
while ((($x + 1) < $this->m) && (($y + 1) < $this->n)
and $this->arr1[$x + 1]->compare($this->arr2[$y + 1]))
{
++$x; ++$y;
- $this->path[$k][] = array('x'=>$x, 'y'=>$y); // ·ÐÏ©¤òÄɲÃ
+ $this->path[$k][] = array('x'=>$x, 'y'=>$y); // 経路を追加
}
return $y;
}
function toArray()
{
$arr = array();
- if ($this->reverse) { // ¸È©¤Ê¡Ä
+ if ($this->reverse) { // 姑息な…
$_x = 'y'; $_y = 'x'; $_m = $this->n; $arr1 =& $this->arr2; $arr2 =& $this->arr1;
} else {
$_x = 'x'; $_y = 'y'; $_m = $this->m; $arr1 =& $this->arr1; $arr2 =& $this->arr2;