Changeset 1071 for cpp/frams


Ignore:
Timestamp:
02/08/21 17:07:11 (3 years ago)
Author:
oriona
Message:

Weighted MDS and switching off the alignment fixed.

Location:
cpp/frams/model/similarity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/similarity/measure-greedy.cpp

    r1066 r1071  
    147147                        m_iDN += abs(temp);
    148148                        // 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                        }
    153155                }
    154156        }
     
    318320                                                        // now compute the geometrical distance of these Parts (use coordinates
    319321                                                        // 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                                                        }
    323329
    324330                                                        // tutaj prawdopodobnie należy jeszcze dodać sprawdzanie
     
    14851491                m_adFactors[i] = params.at(i);
    14861492        fixedZaxis = params.at(i);
     1493        if (m_adFactors[3] == 0)
     1494            with_alignment = false;
    14871495        return 0;
    14881496}
  • cpp/frams/model/similarity/measure-hungarian.cpp

    r1054 r1071  
    225225                m_adFactors[i] = params.at(i);
    226226        fixedZaxis = params.at(i);
     227        if (m_adFactors[3] == 0)
     228            with_alignment = false;
    227229        return 0;
    228230}
  • cpp/frams/model/similarity/measure-mds-based.cpp

    r1048 r1071  
    156156                for (int i = 0; i < nSize; i++)
    157157                {
    158                         if (wMDS == 1)
     158                        if (wMDS == 1 && models[iMod]->getPartCount()>1)
    159159                                weights[i] = 0;
    160160                        else
Note: See TracChangeset for help on using the changeset viewer.