Closed chrismwendt closed 10 years ago
Finding minimum error of piece A compared to piece B:
if (A.length < B.length)
switch A,B
remember to return the right things
for (shift = 0; shift < A.length; shift++)
for (i = 0; i < B.length; i++)
add B[i] + A[i+shift] into new list
find max sub array to find section with smallest error
this returns the indexB, length, error
indexA = shift+indexB
keep track of index's, length, and error for smallest error
return:
indexA
indexB
switch if the lists were switched
length
error
return as a class defined inside of utilities
Sections of the perimeters of pieces are able to be matched. See 42ca3066100aec387a2b448e2d46a45e17705ded. Still need to iteratively attach pieces to the island.
I added the iteratively adding pieces to the island. My best matching so far:
omg, this is so intense!