当前位置: 首页>>代码示例>>C++>>正文


C++ ElSquare函数代码示例

本文整理汇总了C++中ElSquare函数的典型用法代码示例。如果您正苦于以下问题:C++ ElSquare函数的具体用法?C++ ElSquare怎么用?C++ ElSquare使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ElSquare函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ElAbs

double cPonderateur::PdsOfError(double anEr) const
{
   anEr = ElAbs(anEr);
   if (anEr>mEcMax)
   {
      // std::cout << "ERR = " << anEr << "\n";
      return 0;
   }

   switch (mMode)
   {
       case ePondL2 :
            return mPdsStd;

       case ePondL1 :
            return mPdsStd / anEr;

       case ePondLK :
            return mPdsStd / pow(anEr,2-mExpoLK);

       case ePondGauss :
            return mPdsStd * exp(-ElSquare(anEr/mSigmaP));

       case eL1Secured :
       {
            double aPds =  mPdsStd * sqrt(1/(1+ElSquare(anEr/mSigmaP)));
	    //std::cout << anEr/mSigmaP << " " << mPdsStd << " " << aPds << "\n";
            return aPds;
       }
   }

   ELISE_ASSERT(false,"cPonderateur::PdsOfError");
   return 0;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:34,代码来源:cPonderateur.cpp

示例2: stepDir2

void BenchcDbleGrid
     (
         Pt2dr aP0In,Pt2dr aP1In,
         REAL               aStepDir,
         ElDistortion22_Gen & aDist
     )
{
     //cDbleGrid aDGr(aP0In,aP1In,aStepDir,aDist);
     Pt2dr stepDir2(aStepDir,aStepDir);                // __NEW
     cDbleGrid aDGr(false,aP0In,aP1In,stepDir2,aDist); // __NEW

     for (REAL aX = aP0In.x ; aX<aP1In.x ; aX += aStepDir)
         for (REAL aY = aP0In.y ; aY<aP1In.y ; aY += aStepDir)
         {
             REAL x = aX + NRrandom3() * aStepDir;
             SetInRange(aP0In.x,x,aP1In.x);
             REAL y = aY + NRrandom3() * aStepDir;
             SetInRange(aP0In.y,y,aP1In.y);

	     Pt2dr aP(x,y);
	     Pt2dr aQ0 = aDist.Direct(aP);
	     Pt2dr aQ1 = aDGr.Direct(aP);
	     Pt2dr aR0 = aDist.Inverse(aQ0);
	     Pt2dr aR1 = aDist.Inverse(aQ1);

	     REAL aDQ = euclid(aQ0,aQ1);
	     REAL aDR = euclid(aR0,aP) +  euclid(aR1,aP);
	     aDQ /= ElSquare(aStepDir);
	     aDR /= ElSquare(aStepDir);
	     BENCH_ASSERT(aDQ<0.1);
	     BENCH_ASSERT(aDR<0.1);
         }
}
开发者ID:jakexie,项目名称:micmac,代码行数:33,代码来源:b_0_38.cpp

示例3: ElRotation3D

ElRotation3D  cOneRotPowelOptimize::Param2Rot(const double * aP)
{
if (DEBUG_POWEL)
{
for (int aK=0 ; aK<5 ; aK++)
    std::cout << aP[aK] << " ";
std::cout <<  "\n";
}
   if (mContr==ePoseFigee)
      return ElRotation3D(mU,mMatr,true);

   aP+= mI0;
   double aF = 0.05;

   Pt3dr aTr =    mU*cos(sqrt(ElSquare(aP[0]*aF)+ElSquare(aP[1]*aF)))
                 + mV*sin(aP[0]*aF)
                 + mW*sin(aP[1]*aF);

    aTr =  vunit(aTr) ;

   double aN = mNorm;
   if (mContr==ePoseLibre)
      aN *= 1+aF*aP[5];

   return ElRotation3D
          (
              vunit(aTr) * aN,
              mMatr * ElMatrix<double>::Rotation(aP[2]*aF,aP[3]*aF,aP[4]*aF),
              true
          );
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:31,代码来源:PowelOptimize.cpp

示例4: cos

void cEqAppui_X_C2MDPol7::ComputeVal()
{
   double tmp0_ = mCompCoord[72];
   double tmp1_ = mCompCoord[73];
   double tmp2_ = cos(tmp1_);
   double tmp3_ = sin(tmp0_);
   double tmp4_ = cos(tmp0_);
   double tmp5_ = sin(tmp1_);
   double tmp6_ = mCompCoord[74];
   double tmp7_ = mCompCoord[75];
   double tmp8_ = mLocXTer-tmp7_;
   double tmp9_ = sin(tmp6_);
   double tmp10_ = -(tmp9_);
   double tmp11_ = -(tmp5_);
   double tmp12_ = cos(tmp6_);
   double tmp13_ = mCompCoord[76];
   double tmp14_ = mLocYTer-tmp13_;
   double tmp15_ = mCompCoord[77];
   double tmp16_ = mLocZTer-tmp15_;
   double tmp17_ = ElSquare(mLocYIm);
   double tmp18_ = ElSquare(mLocXIm);
   double tmp19_ = VCube(mLocYIm);
   double tmp20_ = VCube(mLocXIm);
   double tmp21_ = VPow4(mLocYIm);
   double tmp22_ = VPow4(mLocXIm);
   double tmp23_ = VPow5(mLocYIm);
   double tmp24_ = VPow5(mLocXIm);
   double tmp25_ = VPow6(mLocYIm);
   double tmp26_ = VPow6(mLocXIm);

  mVal[0] = (tmp4_*tmp2_*(tmp8_)+tmp3_*tmp2_*(tmp14_)+tmp5_*(tmp16_))/((-(tmp3_)*tmp10_+tmp4_*tmp11_*tmp12_)*(tmp8_)+(tmp4_*tmp10_+tmp3_*tmp11_*tmp12_)*(tmp14_)+tmp2_*tmp12_*(tmp16_))-(mCompCoord[0]+mCompCoord[1]*mLocYIm+mCompCoord[2]*mLocXIm+mCompCoord[3]*tmp17_+mCompCoord[4]*mLocXIm*mLocYIm+mCompCoord[5]*tmp18_+mCompCoord[6]*tmp19_+mCompCoord[7]*mLocXIm*tmp17_+mCompCoord[8]*tmp18_*mLocYIm+mCompCoord[9]*tmp20_+mCompCoord[10]*tmp21_+mCompCoord[11]*mLocXIm*tmp19_+mCompCoord[12]*tmp18_*tmp17_+mCompCoord[13]*tmp20_*mLocYIm+mCompCoord[14]*tmp22_+mCompCoord[15]*tmp23_+mCompCoord[16]*mLocXIm*tmp21_+mCompCoord[17]*tmp18_*tmp19_+mCompCoord[18]*tmp20_*tmp17_+mCompCoord[19]*tmp22_*mLocYIm+mCompCoord[20]*tmp24_+mCompCoord[21]*tmp25_+mCompCoord[22]*mLocXIm*tmp23_+mCompCoord[23]*tmp18_*tmp21_+mCompCoord[24]*tmp20_*tmp19_+mCompCoord[25]*tmp22_*tmp17_+mCompCoord[26]*tmp24_*mLocYIm+mCompCoord[27]*tmp26_+mCompCoord[28]*VPow7(mLocYIm)+mCompCoord[29]*mLocXIm*tmp25_+mCompCoord[30]*tmp18_*tmp23_+mCompCoord[31]*tmp20_*tmp21_+mCompCoord[32]*tmp22_*tmp19_+mCompCoord[33]*tmp24_*tmp17_+mCompCoord[34]*tmp26_*mLocYIm+mCompCoord[35]*VPow7(mLocXIm));

}
开发者ID:GEO-IASS,项目名称:micmac-archeos,代码行数:33,代码来源:cEqAppui_X_C2MDPol7.cpp

示例5: ELISE_ASSERT

void  cAppliApero::AddOneObservationsRelGPS(const cObsRelGPS & aXMLObs)
{
    cCompiledObsRelGPS * aCObs = mMCORelGps[aXMLObs.Id()];
    const cGpsRelativeWeighting & aPond = aXMLObs.Pond();
    ELISE_ASSERT(aCObs!=0,"cAppliApero::AddObservationsRelGPS cannot find id");
    const std::vector<cPoseCam *> &  aVP = aCObs->VOrderedPose();
    const std::vector<cEqRelativeGPS *> & aVR = aCObs->VObs();

    for (int aKR = 0 ; aKR < int(aVR.size()) ; aKR++)
    {
        cPoseCam * aPC1 = aVP[aKR];
        cPoseCam * aPC2 = aVP[aKR+1];
        cEqRelativeGPS * anObs =  aVR[aKR];

        Pt3dr aC1 = aPC1->ObsCentre();
        Pt3dr aC2 = aPC2->ObsCentre();
        Pt3dr aDif21 = aC2-aC1;

        Pt3dr aResidu = anObs->Residu(aDif21);
        if ((! aPond.MaxResidu().IsInit()) || (euclid(aResidu) < aPond.MaxResidu().Val()))
        {
            double aT1 = aPC1->Time();
            double aT2 = aPC2->Time();
            double aSigma = aPond.SigmaMin() + aPond.SigmaPerSec() * ElAbs(aT1-aT2);
            Pt3dr aPds(1/ElSquare(aSigma),1/ElSquare(aSigma),1/ElSquare(aSigma));
            anObs->AddObs(aDif21,aPds);

            std::cout << "RELGPS " << aPC1->Name() << " " << aResidu
                      << " D=" << euclid(aResidu)
                      << " Sig0 " << aSigma<< "\n";
        }
    }
}
开发者ID:zhanshenman,项目名称:micmac-archeos,代码行数:33,代码来源:cImplemBlockCam.cpp

示例6: GSSR_AddEquationFitOneVar

void   L2SysSurResol::GSSR_AddEquationPoint3D(const Pt3dr & aP,const Pt3dr &  anInc)
{
    if (anInc.x > 0)
       GSSR_AddEquationFitOneVar(0,aP.x,ElSquare(1/anInc.x));
    if (anInc.y > 0)
       GSSR_AddEquationFitOneVar(1,aP.y,ElSquare(1/anInc.y));
    if (anInc.z > 0)
       GSSR_AddEquationFitOneVar(2,aP.z,ElSquare(1/anInc.z));
}
开发者ID:rpankka,项目名称:micmac,代码行数:9,代码来源:opt_sysl2.cpp

示例7: Pow

REAL Pow(REAL x,INT i)
{
    if (i>0)
       return   (i&1) ? (x * ElSquare(Pow(x,i/2))) :  ElSquare(Pow(x,i/2));

     if (i<0)
        return 1.0 / Pow(x,-i);

     return   1.0;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:10,代码来源:num.cpp

示例8: abscisse

REAL SegComp::square_dist_demi_droite(Pt2dr pt) const
{
    REAL a = abscisse(pt);
    REAL o2 =  ElSquare(ordonnee(pt));
 
    if (a < 0)
       return o2 + ElSquare(a);
    else
       return o2;
}
开发者ID:rpankka,项目名称:micmac,代码行数:10,代码来源:dist.cpp

示例9: ElHoughFiltSeg

EHFS_ScoreGrad::EHFS_ScoreGrad 
(
    REAL         Step,
    REAL         Width,
    REAL         LentghMax,
    Im2D_INT1    ImGlobGX,
    Im2D_INT1    ImGlobGY,
    REAL         CostChg ,
    REAL         EcarTeta,
    REAL         EcarMaxLoc,
    REAL         SeuilGrad
) :
  ElHoughFiltSeg (Step,Width,LentghMax,Inf(ImGlobGX.sz(),ImGlobGY.sz())),
  mImLocGX       (SzMax().x,SzMax().y), 
  mImLocGY       (SzMax().x,SzMax().y), 
  mImLocGRho     (SzMax().x,SzMax().y), 
  mDataLocRho    (mImLocGRho.data()),
  mImLocGTeta    (SzMax().x,SzMax().y), 
  mDataLocTeta   (mImLocGTeta.data()), 
  mImYMaxLoc     (SzMax().x),
  mDataYMaxLoc   (mImYMaxLoc.data()),
  mImGlobGX      (ImGlobGX),
  mImGlobGY      (ImGlobGY),
  mCostChgt      (CostChg),  
  //mEcarTeta      (EcarTeta),
  mPdsTeta       (256),
  mDataPdsTeta   (mPdsTeta.data()),
  //mEcarMaxLoc    (EcarMaxLoc),
  mPdsMaxLoc     (SzMax().y),
  mDataPdsMaxLoc (mPdsMaxLoc.data()),
  //mSeuilGrad     (SeuilGrad),
  mPdsRho        (256),
  mDataPdsRho    (mPdsRho.data()),
  mGainIfSeg     (SzMax().x),
  mDataGainIfSeg (mGainIfSeg.data())
{
     for (INT iTeta=0; iTeta<256 ; iTeta++)
     {
         REAL DeltaTeta = (iTeta%128) *PI /128.0 - PI/2;
         DeltaTeta /= EcarTeta;
         mDataPdsTeta[iTeta] =  pow(0.5,ElSquare(DeltaTeta));
     }

     for (INT y=0 ; y<SzMax().y ; y++)
     {
         REAL dY = (y-mNbYMax) * mStep;
         dY /= EcarMaxLoc;
         mDataPdsMaxLoc[y] = pow(0.5,ElSquare(dY));
     }

     for (INT iRho=0 ; iRho<256 ; iRho++)
     {
         mDataPdsRho[iRho] = ElMin(1.0,iRho/SeuilGrad);
     }
}
开发者ID:archeos,项目名称:micmac-archeos,代码行数:55,代码来源:hough_inst_fseg.cpp

示例10: SetOpt

REAL cIncEnsembleCamera::ScoreCurGen(bool WithFaux,bool CumulDeriv)
{
    SetOpt();
    REAL mMoyResidu = 0.0;
    REAL  mNbPts = 0.0;

    for 
    (
             std::list<cIncSetLiaison *>::iterator anIt = mListSl->begin(); 
             anIt != mListSl->end();
             anIt ++
    )
    {
         cIncCpleCamera * aCple = (*anIt)->Cple();
         ElPackHomologue & aPack = (*anIt)->Pack();
         for
         (
                ElPackHomologue::iterator itHoms = aPack.begin();
                itHoms != aPack.end();
                itHoms++
         )
         {
            Pt2dr aP1 = itHoms->P1();
            Pt2dr aP2 = itHoms->P2();
            REAL aPds =  itHoms->Pds();

            REAL Residu = CumulDeriv ?
                          aCple->DevL1AddEqCoPlan(aP1,aP2,aPds,*mSys):
                          aCple->ValEqCoPlan(aP1,aP2);

            mMoyResidu += ElSquare(Residu )* aPds;
            mNbPts += aPds;
         }
    }

    if (WithFaux)
    {
       for (INT aK = 0 ; aK<INT(mFoncsAux.size()) ; aK++)
       {
            cFonctrPond aFP = mFoncsAux[aK];
            
            if (CumulDeriv)
               StdAddEq(aFP.mFctr,aFP.mPds);
            else
               aFP.mFctr->ComputeValAndSetIVC();
            mMoyResidu += ElSquare(aFP.mFctr->Val(0)) * aFP.mPds;
            mNbPts +=  aFP.mPds;
       }
    }


    return mMoyResidu / mNbPts;
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:53,代码来源:phgr_or_opt.cpp

示例11: cos

void cEqAppui_PTInc_C2MDPol5::ComputeVal()
{
   double tmp0_ = mCompCoord[42];
   double tmp1_ = mCompCoord[43];
   double tmp2_ = cos(tmp1_);
   double tmp3_ = sin(tmp0_);
   double tmp4_ = cos(tmp0_);
   double tmp5_ = sin(tmp1_);
   double tmp6_ = mCompCoord[44];
   double tmp7_ = mCompCoord[48];
   double tmp8_ = mCompCoord[45];
   double tmp9_ = tmp7_-tmp8_;
   double tmp10_ = sin(tmp6_);
   double tmp11_ = -(tmp10_);
   double tmp12_ = -(tmp5_);
   double tmp13_ = cos(tmp6_);
   double tmp14_ = mCompCoord[49];
   double tmp15_ = mCompCoord[46];
   double tmp16_ = tmp14_-tmp15_;
   double tmp17_ = mCompCoord[50];
   double tmp18_ = mCompCoord[47];
   double tmp19_ = tmp17_-tmp18_;
   double tmp20_ = ElSquare(mLocYIm);
   double tmp21_ = ElSquare(mLocXIm);
   double tmp22_ = VCube(mLocYIm);
   double tmp23_ = VCube(mLocXIm);
   double tmp24_ = VPow4(mLocYIm);
   double tmp25_ = VPow4(mLocXIm);
   double tmp26_ = -(tmp3_);
   double tmp27_ = tmp4_*tmp12_;
   double tmp28_ = tmp3_*tmp12_;
   double tmp29_ = tmp26_*tmp11_;
   double tmp30_ = tmp27_*tmp13_;
   double tmp31_ = tmp29_+tmp30_;
   double tmp32_ = (tmp31_)*(tmp9_);
   double tmp33_ = tmp4_*tmp11_;
   double tmp34_ = tmp28_*tmp13_;
   double tmp35_ = tmp33_+tmp34_;
   double tmp36_ = (tmp35_)*(tmp16_);
   double tmp37_ = tmp32_+tmp36_;
   double tmp38_ = tmp2_*tmp13_;
   double tmp39_ = tmp38_*(tmp19_);
   double tmp40_ = tmp37_+tmp39_;
   double tmp41_ = VPow5(mLocYIm);
   double tmp42_ = VPow5(mLocXIm);

  mVal[0] = (tmp4_*tmp2_*(tmp9_)+tmp3_*tmp2_*(tmp16_)+tmp5_*(tmp19_))/(tmp40_)-(mCompCoord[0]+mCompCoord[1]*mLocYIm+mCompCoord[2]*mLocXIm+mCompCoord[3]*tmp20_+mCompCoord[4]*mLocXIm*mLocYIm+mCompCoord[5]*tmp21_+mCompCoord[6]*tmp22_+mCompCoord[7]*mLocXIm*tmp20_+mCompCoord[8]*tmp21_*mLocYIm+mCompCoord[9]*tmp23_+mCompCoord[10]*tmp24_+mCompCoord[11]*mLocXIm*tmp22_+mCompCoord[12]*tmp21_*tmp20_+mCompCoord[13]*tmp23_*mLocYIm+mCompCoord[14]*tmp25_+mCompCoord[15]*tmp41_+mCompCoord[16]*mLocXIm*tmp24_+mCompCoord[17]*tmp21_*tmp22_+mCompCoord[18]*tmp23_*tmp20_+mCompCoord[19]*tmp25_*mLocYIm+mCompCoord[20]*tmp42_);

  mVal[1] = ((tmp26_*tmp13_+tmp27_*tmp10_)*(tmp9_)+(tmp4_*tmp13_+tmp28_*tmp10_)*(tmp16_)+tmp2_*tmp10_*(tmp19_))/(tmp40_)-(mCompCoord[21]+mCompCoord[22]*mLocYIm+mCompCoord[23]*mLocXIm+mCompCoord[24]*tmp20_+mCompCoord[25]*mLocXIm*mLocYIm+mCompCoord[26]*tmp21_+mCompCoord[27]*tmp22_+mCompCoord[28]*mLocXIm*tmp20_+mCompCoord[29]*tmp21_*mLocYIm+mCompCoord[30]*tmp23_+mCompCoord[31]*tmp24_+mCompCoord[32]*mLocXIm*tmp22_+mCompCoord[33]*tmp21_*tmp20_+mCompCoord[34]*tmp23_*mLocYIm+mCompCoord[35]*tmp25_+mCompCoord[36]*tmp41_+mCompCoord[37]*mLocXIm*tmp24_+mCompCoord[38]*tmp21_*tmp22_+mCompCoord[39]*tmp23_*tmp20_+mCompCoord[40]*tmp25_*mLocYIm+mCompCoord[41]*tmp42_);

}
开发者ID:GEO-IASS,项目名称:micmac-archeos,代码行数:51,代码来源:cEqAppui_PTInc_C2MDPol5.cpp

示例12: ElSquare

void cEqHomogrX::ComputeValDeriv()
{
   double tmp0_ = mCompCoord[6];
   double tmp1_ = tmp0_*mLocXL1;
   double tmp2_ = mCompCoord[7];
   double tmp3_ = tmp2_*mLocYL1;
   double tmp4_ = tmp1_+tmp3_;
   double tmp5_ = tmp4_+1;
   double tmp6_ = ElSquare(tmp5_);
   double tmp7_ = mCompCoord[0];
   double tmp8_ = tmp7_*mLocXL1;
   double tmp9_ = mCompCoord[1];
   double tmp10_ = tmp9_*mLocYL1;
   double tmp11_ = tmp8_+tmp10_;
   double tmp12_ = mCompCoord[2];
   double tmp13_ = tmp11_+tmp12_;
   double tmp14_ = mCompCoord[14];
   double tmp15_ = tmp14_*mLocXL2;
   double tmp16_ = mCompCoord[15];
   double tmp17_ = tmp16_*mLocYL2;
   double tmp18_ = tmp15_+tmp17_;
   double tmp19_ = tmp18_+1;
   double tmp20_ = ElSquare(tmp19_);
   double tmp21_ = mCompCoord[8];
   double tmp22_ = tmp21_*mLocXL2;
   double tmp23_ = mCompCoord[9];
   double tmp24_ = tmp23_*mLocYL2;
   double tmp25_ = tmp22_+tmp24_;
   double tmp26_ = mCompCoord[10];
   double tmp27_ = tmp25_+tmp26_;

  mVal[0] = (tmp13_)/(tmp5_)-(tmp27_)/(tmp19_);

  mCompDer[0][0] = (mLocXL1*(tmp5_))/tmp6_;
  mCompDer[0][1] = (mLocYL1*(tmp5_))/tmp6_;
  mCompDer[0][2] = (tmp5_)/tmp6_;
  mCompDer[0][3] = 0;
  mCompDer[0][4] = 0;
  mCompDer[0][5] = 0;
  mCompDer[0][6] = -((tmp13_)*mLocXL1)/tmp6_;
  mCompDer[0][7] = -((tmp13_)*mLocYL1)/tmp6_;
  mCompDer[0][8] = -((mLocXL2*(tmp19_))/tmp20_);
  mCompDer[0][9] = -((mLocYL2*(tmp19_))/tmp20_);
  mCompDer[0][10] = -((tmp19_)/tmp20_);
  mCompDer[0][11] = 0;
  mCompDer[0][12] = 0;
  mCompDer[0][13] = 0;
  mCompDer[0][14] = -(-((tmp27_)*mLocXL2)/tmp20_);
  mCompDer[0][15] = -(-((tmp27_)*mLocYL2)/tmp20_);
}
开发者ID:simmito,项目名称:micmac-archeos,代码行数:50,代码来源:cEqHomogrX.cpp

示例13: ElSquare

Pt2d< Fonc_Num>  cDistRadialeFormelle::operator ()(Pt2d< Fonc_Num> aP)
{
    Pt2d<Fonc_Num> fEc = aP - mFCentre;
    Fonc_Num fRho2 = ElSquare(fEc.x) +ElSquare(fEc.y);
    Fonc_Num fSom = 1;
    Fonc_Num fRho2N  = 1;

    for (int aK=0 ; aK<(INT) mFCoeffs.size() ; aK++)
    {
        fRho2N = fRho2N * fRho2;
        fSom  = fSom + fRho2N * mFCoeffs[aK];
    }
    return  mFCentre +  Pt2d<Fonc_Num>(fEc.x*fSom,fEc.y*fSom);
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:14,代码来源:phgr_intrinseque.cpp

示例14: SimilariteEllipse

REAL  SimilariteEllipse(REAL A1,REAL B1,REAL C1,REAL A2,REAL B2,REAL C2)
{
	return sqrt
	       (	
		    (ElSquare(A1-A2) +2 *ElSquare(B1-B2)+ElSquare(C1-C2))
		 /  (
		            ElSquare(A1)/2 +ElSquare(B1)+ElSquare(C1)/2
		          + ElSquare(A2)/2 +ElSquare(B2)+ElSquare(C2)/2
		     ) 
	       );
}
开发者ID:archeos,项目名称:micmac-archeos,代码行数:11,代码来源:inter_cerle_losange.cpp

示例15: HF1

void cEqHomogFormelle::StdRepondere(ElPackHomologue & aPack,REAL aCoeff)
{
    cElHomographie H1 = HF1().HomCur();
    cElHomographie H2 = HF2().HomCur();
    ElDistRadiale_PolynImpair Dist(1e5,Pt2dr(0,0));
    if (DRF()) 
       Dist = DRF()->DistCur();

    for
    (
         ElPackHomologue::iterator it=aPack.begin();
         it!=aPack.end();
         it++
    )
    {
          Pt2dr aP1 = it->P1();
          Pt2dr aP2 = it->P2();
          if (mDRF)
          {
              aP1 = Dist.Direct(aP1);
              aP2 = Dist.Direct(aP2);
          }
          Pt2dr Ec = H1.Direct(Dist.Direct(it->P1())) - H2.Direct(Dist.Direct(it->P2()));

          REAL D = euclid(Ec);
         
          REAL Pds = 1 / (1 + ElSquare(D/aCoeff));
          it->Pds() = Pds;
    }
}
开发者ID:rpankka,项目名称:micmac,代码行数:30,代码来源:phgr_eqhomog.cpp


注:本文中的ElSquare函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。