Changeset 1071 for cpp/frams/model
- Timestamp:
- 02/08/21 17:07:11 (4 years ago)
- Location:
- cpp/frams/model/similarity
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/similarity/measure-greedy.cpp
r1066 r1071 147 147 m_iDN += abs(temp); 148 148 // pobierz polozenie dopasowanego Part 149 Pt3D MatchedPartPos(coordinates[m_iSmaller][iOrgMatchedPart]); 150 // dodaj euklidesowa odleglosc Parts do sumy odleglosci 151 //no need to compute distane when m_dDG weight is 0 152 m_dDG += m_adFactors[3] == 0 ? 0 : coordinates[1 - m_iSmaller][iOrgPart].distanceTo(MatchedPartPos); 149 if (m_adFactors[3] > 0) 150 { 151 Pt3D MatchedPartPos(coordinates[m_iSmaller][iOrgMatchedPart]); 152 // dodaj euklidesowa odleglosc Parts do sumy odleglosci 153 m_dDG += coordinates[1 - m_iSmaller][iOrgPart].distanceTo(MatchedPartPos); 154 } 153 155 } 154 156 } … … 318 320 // now compute the geometrical distance of these Parts (use coordinates 319 321 // which should be computed by SVD) 320 Pt3D Part0Pos(coordinates[0][iPartIndex[0]]); 321 Pt3D Part1Pos(coordinates[1][iPartIndex[1]]); 322 dGeo = m_adFactors[3] == 0 ? 0 : Part0Pos.distanceTo(Part1Pos); //no need to compute distane when m_dDG weight is 0 322 dGeo = 0; 323 if (m_adFactors[3] > 0) 324 { 325 Pt3D Part0Pos(coordinates[0][iPartIndex[0]]); 326 Pt3D Part1Pos(coordinates[1][iPartIndex[1]]); 327 dGeo = Part0Pos.distanceTo(Part1Pos); 328 } 323 329 324 330 // tutaj prawdopodobnie należy jeszcze dodać sprawdzanie … … 1485 1491 m_adFactors[i] = params.at(i); 1486 1492 fixedZaxis = params.at(i); 1493 if (m_adFactors[3] == 0) 1494 with_alignment = false; 1487 1495 return 0; 1488 1496 } -
cpp/frams/model/similarity/measure-hungarian.cpp
r1054 r1071 225 225 m_adFactors[i] = params.at(i); 226 226 fixedZaxis = params.at(i); 227 if (m_adFactors[3] == 0) 228 with_alignment = false; 227 229 return 0; 228 230 } -
cpp/frams/model/similarity/measure-mds-based.cpp
r1048 r1071 156 156 for (int i = 0; i < nSize; i++) 157 157 { 158 if (wMDS == 1 )158 if (wMDS == 1 && models[iMod]->getPartCount()>1) 159 159 weights[i] = 0; 160 160 else
Note: See TracChangeset
for help on using the changeset viewer.