• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ II函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnRead

void CPSRawDlg::OnSet() 
{
	CString str;
    int usedLen;
    uint16 data[MAX_HEX_DATA];
	uint16 key_num = m_spin_key.GetPos();
	m_ed_str.GetWindowText(str);
    if (GetHexData<uint16>(str, data, MAX_HEX_DATA, &usedLen, 4))
    {
	    if ((m_raw_len != -1) && (usedLen != m_raw_len))
	    {
		    if (MessageBox(II("The length of the data you have entered does not match the length previously read.  Proceed with write?"), II("Mismatch in entry length"), MB_YESNO | MB_ICONWARNING) == IDNO)
			    return;
	    }
	    if (m_helper->psbc_set_pres_or_raw_if_different(key_num, data, usedLen))
        {
            OnRead();
        }
        else
        {
            MessageBox(II("Set failed"));
        }
    }
    else
    {
        MessageBox(II("The value is not valid. Enter a hexadecimal string"));
    }
	m_changed = false;

}
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:30,代码来源:PSRawDlg.cpp


示例2: ASSERT

void CPSRawDlg::OnRead() 
{
	uint16 data[256];
	uint16 len;
	uint16 key_num;
	key_num = m_spin_key.GetPos();
	if (m_helper->psbc_get_pres_or_raw(key_num, data, 256, &len))
	{
		ichar str[1024];
		int i;
		str[0] =II('\0');
		ASSERT(len < 100);
		for (i = 0; i < len; i++)
		{
			isprintf(str + istrlen(str), 1024 - istrlen(str), II("%04x") , data[i]);
			if (i < len - 1)
	  		    isprintf(str + istrlen(str), 1024 - istrlen(str), II(" "));

		}
		m_ed_str.SetWindowText(str);
		m_changed = false;
		m_raw_len = len;
		m_present = true;
	}
	else
	{
		m_present = false;
		m_ed_str.SetWindowText(II("0000"));

	}
	m_caption_present.ShowWindow(!m_present);
		
}		
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:33,代码来源:PSRawDlg.cpp


示例3: iisdigit

int iisdigit(iint c)
{
#if !defined(_WINCE) && !defined(_WIN32_WCE)
    return ICHAR_SELECT(isdigit, iswdigit)(c);
#else
    return ((c >= II('0')) && (c <= II('9')));
#endif
}
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:8,代码来源:ichar.c


示例4: MessageBox

void CPSRawDlg::OnDelete() 
{
	if (MessageBox(II("Are you sure you want to clear this key?"), II("Confirm delete key"), MB_ICONWARNING | MB_YESNO) == IDYES)
	{
		uint16 key_num = m_spin_key.GetPos();
		if (!m_helper->psbc_clr(key_num))
        {
            MessageBox(II("Delete failed"));
        }
	}
}
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:11,代码来源:PSRawDlg.cpp


示例5: res_iono

/* ionosphere residuals ------------------------------------------------------*/
static int res_iono(const obsd_t *obs, int n, const nav_t *nav,
                    const double *rs, const double *rr, const double *pos,
                    const double *azel, const pcv_t *pcv, const ekf_t *ekf,
                    double *phw, double *v, double *H, double *R)
{
    double *sig,P1,P2,L1,L2,c_iono=1.0-SQR(lam[1]/lam[0]);
    double LG,PG,antdel[3]={0},dant[NFREQ]={0};
    int i,j,nv=0,sat;
    
    sig=mat(1,2*n);
    
    for (i=0;i<n;i++) {
        if (!raw_obs(obs+i,nav,&P1,&P2,&L1,&L2)||azel[i*2+1]<MIN_EL) continue;
        
        sat=obs[i].sat;
        
        /* ionosphere-LC model */
        LG=-c_iono*ekf->x[II(sat)]+ekf->x[IB(sat)];
        PG= c_iono*ekf->x[II(sat)]+nav->cbias[sat-1][0];
        
        /* receiver antenna phase center offset and variation */
        if (pcv) {
            antmodel(pcv,antdel,azel+i*2,dant);
            LG+=dant[0]-dant[1];
            PG+=dant[0]-dant[1];
        }
        /* phase windup correction */
        windupcorr(obs[i].time,rs+i*6,rr,phw+obs[i].sat-1);
        LG+=(lam[0]-lam[1])*phw[obs[i].sat-1];
        
        /* residuals of ionosphere (geometriy-free) LC */
        v[nv  ]=(L1-L2)-LG;
#if 0
        v[nv+1]=(P1-P2)-PG;
#else
        v[nv+1]=0.0;
#endif
        for (j=0;j<ekf->nx*2;j++) H[ekf->nx*nv+j]=0.0;
        H[ekf->nx*nv    +II(sat)]=-c_iono;
        H[ekf->nx*nv    +IB(sat)]=1.0;
        H[ekf->nx*(nv+1)+II(sat)]=c_iono;
        
        sig[nv  ]=sig_err(azel+i*2);
        sig[nv+1]=RATIO_ERR*sig[nv];
        nv+=2;
    }
    for (i=0;i<nv;i++) for (j=0;j<nv;j++) {
        R[i+j*nv]=i==j?SQR(sig[i]):0.0;
    }
    free(sig);
    return nv;
}
开发者ID:Andreas-Krimbacher,项目名称:rtklib,代码行数:53,代码来源:genstec.c


示例6: ud_state

/* temporal update of states --------------------------------------------------*/
static void ud_state(const obsd_t *obs, int n, const nav_t *nav,
                     const double *pos, const double *azel, ekf_t *ekf,
                     sstat_t *sstat)
{
    double P1,P2,L1,L2,PG,LG,tt,F[4]={0},Q[2]={0};
    double x[2]={0},P[2],c_iono=1.0-SQR(lam[1]/lam[0]);
    int i,sat,slip;
    
    for (i=0;i<n;i++) {
        
        /* raw pseudorange and phase range */
        if (!raw_obs(obs+i,nav,&P1,&P2,&L1,&L2)||azel[i*2+1]<MIN_EL) continue;
        
        sat=obs[i].sat;
        tt=timediff(obs[i].time,sstat[sat-1].time);
        LG=L1-L2;
        PG=P1-P2;
        slip=(obs[i].LLI[0]&3)||(obs[i].LLI[1]&3);
        slip|=fabs(LG-sstat[sat-1].LG)>THRES_LG;
        
        if (fabs(tt)>MAXGAP_IONO) {
#if 1
            x[0]=PG/c_iono;
#else
            x[0]=ionmodel(obs[i].time,nav->ion_gps,pos,azel+i*2);
#endif
            x[1]=1E-6;
            P[0]=VAR_IONO;
            P[1]=VAR_IONR;
            ekf_init(ekf,x,P,II(sat),2);
        }
        else {
            F[0]=F[3]=1.0;
            F[2]=tt;
            Q[0]=PRN_IONO*fabs(tt);
            Q[1]=PRN_IONR*fabs(tt);
            ekf_pred(ekf,F,Q,II(sat),2);
        }
        if (tt>MAXGAP_BIAS||slip) {
            x[0]=LG+PG;
            P[0]=VAR_BIAS;
            ekf_init(ekf,x,P,IB(sat),1);
        }
        sstat[sat-1].time=obs[i].time;
        sstat[sat-1].azel[0]=azel[i*2];
        sstat[sat-1].azel[1]=azel[i*2+1];
        sstat[sat-1].slip=slip;
        sstat[sat-1].LG=LG;
        sstat[sat-1].PG=PG;
    }
}
开发者ID:Andreas-Krimbacher,项目名称:rtklib,代码行数:52,代码来源:genstec.c


示例7: f14h_mc0_mce

static bool f14h_mc0_mce(u16 ec, u8 xec)
{
	u8 r4	 = R4(ec);
	bool ret = true;

	if (MEM_ERROR(ec)) {

		if (TT(ec) != TT_DATA || LL(ec) != LL_L1)
			return false;

		switch (r4) {
		case R4_DRD:
		case R4_DWR:
			pr_cont("Data/Tag parity error due to %s.\n",
				(r4 == R4_DRD ? "load/hw prf" : "store"));
			break;
		case R4_EVICT:
			pr_cont("Copyback parity error on a tag miss.\n");
			break;
		case R4_SNOOP:
			pr_cont("Tag parity error during snoop.\n");
			break;
		default:
			ret = false;
		}
	} else if (BUS_ERROR(ec)) {

		if ((II(ec) != II_MEM && II(ec) != II_IO) || LL(ec) != LL_LG)
			return false;

		pr_cont("System read data error on a ");

		switch (r4) {
		case R4_RD:
			pr_cont("TLB reload.\n");
			break;
		case R4_DWR:
			pr_cont("store.\n");
			break;
		case R4_DRD:
			pr_cont("load.\n");
			break;
		default:
			ret = false;
		}
	} else {
		ret = false;
	}

	return ret;
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:51,代码来源:mce_amd.c


示例8: udstate

/* temporal update of states --------------------------------------------------*/
static void udstate(const obsd_t *obs, int n, const nav_t *nav, double *x,
                    double *P, int nx, ssat_t *ssat)
{
    gtime_t time;
    double tt;
    int i,sat;
    
    for (i=0;i<n;i++) {
        sat=obs[i].sat
        time=ssat[sat-1].time;
        
        if (!time.time) {
            init_iono(obs+i,nav,x,P,nx);
            init_bias(obs+i,nav,x,P,nx);
        }
        else {
            tt=timediff(obs[i].time,time);
            
            P[II(sat)*(nx+1)]+=PRN_IONO*fabs(tt);
            
            if (det_slip(obs+i,nav,ssat)||fabs(tt)>MAXGAP_BIAS) {
                init_bias(obs+i,nav,x,P,nx);
            }
        }
        ssat[sat-1].time=time;
    }
}
开发者ID:thesamprice,项目名称:RTKLIB,代码行数:28,代码来源:estiono.c


示例9: SetIcon

BOOL CSmallPolygonsVisDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon


	IISet s;
	for (int i = 0; i < 100; ++i) {
		int x = (rand() * MAX_COORDINATE) / (RAND_MAX + 1);
		int y = (rand() * MAX_COORDINATE) / (RAND_MAX + 1);
		s.insert(II(x, y));
	}

	int N = 10;
	int Np = s.size();
	std::vector<int> points;
	for (auto p : s) {
		points.push_back(p.first);
		points.push_back(p.second);
	}

	m_sp.init(points, N);
	m_sp.findTriangles();
	m_sp.chooseFirstPolygon();

	for (int i = 0; i < 100; ++i) {
		m_sp.chooseNextVertex();
	}

	return TRUE;  // return TRUE  unless you set the focus to a control
}
开发者ID:firewood,项目名称:topcoder,代码行数:35,代码来源:SmallPolygonsVisDlg.cpp


示例10: process

void process(int vtx){
	taken[vtx] = 1;
	for(int j=0; j<(int)adjList[vtx].size(); j++){
		II v = adjList[vtx][j];
		if(!taken[v.first]) pq.push(II(-v.second,-v.first));
	}
}
开发者ID:keyvhinng,项目名称:ICPC-Notebook,代码行数:7,代码来源:mst_prim.cpp


示例11: recorreIzqDerAVL

void recorreIzqDerAVL( AVL *a, AVL *aux, int *band )
{
  if( !(*a) -> der )
  {
    *aux = *a;
    *a = (*a) -> izq;
  }else
      {
        recorreIzqDerAVL( &(*a) -> der, aux, band );
        
        if( *band )
        {
          if( (*a) -> fe == 0 )
          {
            (*a) -> fe == -1;
            *band = 0;
          
          }else
              {
                if( (*a) -> fe == 1 )
                     (*a) -> fe = 0;
                else
                     if( (*a) -> izq -> fe <= 0 )
                     {
                        if( (*a) -> izq -> fe == 0 )
                           *band = 0;
                        
                           II( a );
                     }else
                           ID( a ); 
              }
          }
        }
}
开发者ID:miguellgt,项目名称:C-Dynamic-Data-Structures,代码行数:34,代码来源:Arboles+AVL.cpp


示例12: buscarDerechaAVL

int buscarDerechaAVL( AVL *a, int dato, int *band )
{
   int retAux;
   
   retAux = eliminaAVL( &(*a)->der, dato, band );
   
   if( *band )
   {
      if( (*a) -> fe == 0 )
      {
         (*a) -> fe = -1;
         *band = 0;
      }else
          if( (*a) -> fe == 1 )
               (*a) -> fe = 0;
          else
             {
               if( (*a) -> der -> fe <= 0 )
               {
                  if( (*a) -> der -> fe == 0 )
                      *band = 0;
                  
                   II( a );
               }else
                   ID( a );   
             }
   }
   
   return( retAux );
}
开发者ID:miguellgt,项目名称:C-Dynamic-Data-Structures,代码行数:30,代码来源:Arboles+AVL.cpp


示例13: A

bool mrpt::vision::pnp::ppnp::compute_pose(
	Eigen::Matrix3d& R, Eigen::Vector3d& t, int n)
{
	double tol = 0.00001;

	Eigen::MatrixXd I = Eigen::MatrixXd::Identity(n, n), A(n, n), Y(n, 3),
					E(n, 3), E_old(n, 3), U, V,
					I3 = Eigen::MatrixXd::Identity(3, 3), PR,
					Z = Eigen::MatrixXd::Zero(n, n);
	Eigen::VectorXd e(n), II(n), c(3), Zmindiag(n);

	e.fill(1);
	II.fill(1.0 / ((double)n));

	A = I - e * e.transpose() / n;

	double err = std::numeric_limits<double>::infinity();

	E_old.fill(1000);

	int cnt = 0;

	while (err > tol)
	{
		Eigen::JacobiSVD<Eigen::MatrixXd> svd(
			P.transpose() * Z * A * S,
			Eigen::ComputeThinU | Eigen::ComputeThinV);
		U = svd.matrixU();
		V = svd.matrixV();

		I3(2, 2) = (U * V.transpose()).determinant();
		R = U * I3 * V.transpose();
		PR = P * R;

		c = (S - Z * PR).transpose() * II;

		Y = S - e * c.transpose();

		Zmindiag = ((PR * Y.transpose()).diagonal()).array() /
				   ((P.array() * P.array()).rowwise().sum()).array();

		for (int i = 0; i < n; i++)
			if (Zmindiag(i) < 0) Zmindiag(i) = 0;

		Z = Zmindiag.asDiagonal();

		E = Y - Z * PR;

		err = (E - E_old).norm();

		E_old = E;

		cnt++;
	}

	t = -R * c;

	return true;
}
开发者ID:jiapei100,项目名称:mrpt,代码行数:59,代码来源:ppnp.cpp


示例14: istrtol

long istrtol(const ichar *nptr, ichar **endptr, int base)
{
#if !defined _WINCE && !defined _WIN32_WCE
    return ICHAR_SELECT(strtol, wcstol)(nptr, endptr, base);
#else
//  ASSERT(base == 10);
  const ichar *p = nptr;
  if (*p == II('-'))
  {
      p++;
      return 0L - (long)istrtoul(p, endptr, base);
  }
  if (*p == II('+'))
      p++;
  return (long) istrtoul(p, endptr, base);
#endif
}
开发者ID:philiplin4sp,项目名称:production-test-tool,代码行数:17,代码来源:ichar.c


示例15: BMatSetZero

void BMatSetZero(BMat& C, BMat& mat) {

  for(int I = 0; I < (int)C.size(); I++) {
    pair<Irrep, Irrep> II(I, I);
    MatrixXcd& CII = C[II];
    mat[II] = MatrixXcd::Zero(CII.rows(), CII.cols());
  }
  
}
开发者ID:ReiMatsuzaki,项目名称:l2func,代码行数:9,代码来源:symmolint_bind.cpp


示例16: init_iono

/* initizlize ionosphere parameter --------------------------------------------*/
static void init_iono(const obsd_t *obs, const double *azel, double *x,
                      double *P, int nx)
{
    double map,iono;
    if (obs->P[0]==0||obs->P[1]==0) return;
    map=ionmapf(pos,azel);
    iono=(obs->P[0]-obs->P[1])/map;
    initx(x,P,nx,II(obs->sat),iono,VAR_IONO);
}
开发者ID:thesamprice,项目名称:RTKLIB,代码行数:10,代码来源:estiono.c


示例17: dijkstra

 void dijkstra(int src, IV &dis) {
     set<II> q;
     dis = IV(n, INF);
     BV vis(n);
     q.insert(II(0, src));
     dis[src] = 0;
     while (! q.empty()) {
         II p = *(q.begin()); q.erase(q.begin());
         int d = p.first, v = p.second;
         if (vis[v]) continue;
         vis[v] = true;
         For (EL, e, adj[v]) {
             int d2 = d + e->w;
             if (d2 < dis[e->v]) {
                 dis[e->v] = d2;
                 q.insert(II(d2, e->v));
             }
         }
     }
开发者ID:boxysean,项目名称:pc-code,代码行数:19,代码来源:graph.cpp


示例18: out_iono

/* output ionosphere parameters ----------------------------------------------*/
static void out_iono(gtime_t time, const ekf_t *ekf, const sstat_t *sstat,
                     FILE *fp)
{
    double tow;
    char id[64];
    int sat,week;
    
    tow=time2gpst(time,&week);
    
    for (sat=1;sat<=MAXSAT;sat++) {
        if (sstat[sat-1].time.time==0||
            timediff(time,sstat[sat-1].time)>MAXGAP_IONO) continue;
        satno2id(sat,id);
        fprintf(fp,"%s %4d %6.0f %-3s %d %8.4f %9.6f %7.4f %6.1f %5.1f %7.3f %11.3f\n",
                STEC_RID,week,tow,id,sstat[sat-1].slip,
                ekf->x[II(sat)],ekf->x[II(sat)+1],
                sqrt(ekf->P[II(sat)*(ekf->nx+1)]),sstat[sat-1].azel[0]*R2D,
                sstat[sat-1].azel[1]*R2D, sstat[sat-1].PG,sstat[sat-1].LG);
    }
}
开发者ID:Andreas-Krimbacher,项目名称:rtklib,代码行数:21,代码来源:genstec.c


示例19: insAVL

int insAVL( AVL *a, int dato, int *band )
{
  int ret;
  
  if( !*a )
    ret = *band = creaNodoAVL( a , dato );
  else
    {
       if( dato < (*a) -> info )
       {
         ret = insAVL( &(*a) -> izq, dato, band );
         
         if( *band )
           if( (*a) -> fe == 0 )
              (*a) -> fe = -1;
           else
               if( (*a ) -> fe == 1 )
                  *band = (*a) -> fe = 0;
               else
                  {
                    if( (*a) -> izq -> fe > 0 )
                         ID( a );
                    else
                         II( a );
                    
                    *band = 0;
                  }
         }else
             if( dato > (*a) -> info )
             {
               ret = insAVL( &(*a) -> der, dato, band );
               
               if( *band )
                  if( (*a) -> fe == 0 )
                      (*a) -> fe = 1;
               else
                  if( (*a ) -> fe == -1 )
                      *band = (*a) -> fe = 0;
                  else
                     {
                       if( (*a) -> der -> fe >= 0 )
                            DD( a );
                       else
                            DI( a );
                       
                       *band = 0;
             }
         }else
               ret = *band = 0;
    }
    
    return( ret );
  
}
开发者ID:miguellgt,项目名称:C-Dynamic-Data-Structures,代码行数:54,代码来源:Arboles+AVL.cpp


示例20: II

void dgDynamicBodyAsymetric::SetMassMatrix(dgFloat32 mass, const dgMatrix& inertia)
{
	//dgVector II;
	m_principalAxis = inertia;
	dgVector II (m_principalAxis.EigenVectors());
	dgMatrix massMatrix(dgGetIdentityMatrix());
	massMatrix[0][0] = II[0];
	massMatrix[1][1] = II[1];
	massMatrix[2][2] = II[2];
	dgBody::SetMassMatrix(mass, massMatrix);
}
开发者ID:MADEAPPS,项目名称:newton-dynamics,代码行数:11,代码来源:dgDynamicBody.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IIC_Start函数代码示例发布时间:2022-05-30
下一篇:
C++ IHTMLDOMNode_Release函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap