This recurrence allows us to compute every score si,j in a single sweep of
the grid. The algorithm MANHATTAN TOURIST implements this procedure.
Here ,#wis a two-dimensional array representing the weights of the grid’s
edges that run north to south, and
w is a two-dimensional array representing
theweights of the grid’s edges that runwest to east. That is,
#w
i,j is theweight
of the edge between (i, j − 1) and (i, j); and
!w
i,j is the weight of the edge
between (i, j − 1) and (i, j).
เกิดขึ้นนี้ช่วยให้เราคำนวณทุกคะแนนซี เจในกวาดเดียวของตาราง อัลกอริทึมท่องเที่ยวแมนฮัตตันใช้ขั้นตอนนี้ที่นี่ #wis อาร์เรย์สองมิติแสดงน้ำหนักของของตารางขอบที่เหนือใต้ และw เป็นอาร์เรย์สองมิติแทนtheweights ของตาราง edges ที่ runwest ไปตะวันออก นั่นก็คือ#w, j เป็น theweightของขอบระหว่าง (i, j − 1) และ (i, j); และ! w, j คือ น้ำหนักของขอบระหว่าง (i, j − 1) และ (i, j)
การแปล กรุณารอสักครู่..

ซ้ำ นี้ช่วยให้เราคำนวณคะแนนทุกจังหวัด , J ในการกวาดเดียว
ตาราง แมนฮัตตันท่องเที่ยวใช้ขั้นตอนวิธีการขั้นตอนนี้ .
ที่นี่# WIS แทนน้ำหนักของอาร์เรย์สองมิติของ
ตารางขอบที่วิ่งเหนือใต้ และเป็นอาร์เรย์สองมิติ
w
theweights เป็นตัวแทนของเส้นขอบที่ runwest ตะวันออก นั่นคือ #
w
, J theweight
ของขอบระหว่าง ( I , J − 1 ) ( i , j ) ;
! w
I , J คือน้ำหนักของขอบ
ระหว่าง ( I , J − 1 ) ( i , j )
การแปล กรุณารอสักครู่..
