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

C++ COMP函数代码示例

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

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



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

示例1: C1DTOEDGELIST

Word C1DTOEDGELIST(Word cl, Word cm, Word cr)
{
  Word E,L,i,Ll,Lr,l,a,b,t;

Step1: /* Initialize. */
  E = NIL;

Step2: /* Get adjacencies for (cl,cm) and (cr,cm). */
  L = FIRST(ADJ_2D_PART(cm,cl,cr,P,J));
  i = LAST(LELTI(cm,INDX));
  Ll = NIL; Lr = NIL;
  while(L != NIL) {
    ADV(L,&l,&L);
    FIRST2(l,&a,&b);
    if (FIRST(a) == i) {
      t = a; a = b; b = t; }
    if (FIRST(a) < i)
      Ll = COMP(LIST2(a,b),Ll); 
    else
      Lr = COMP(LIST2(a,b),Lr); }

Step3: /* Get edges from adjacency info. */
  E = CONC(ADJ2DITOEL(Ll,cl,cm),E);
  E = CONC(ADJ2DITOEL(Lr,cr,cm),E);
    
Return: /* Prepare to return. */
  return E;
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:28,代码来源:temp.c


示例2: ESPCADCTPILSNC

/* ESPCAD cell triple and polynomial index list of strong necessary conditions. */
Word ESPCADCTPILSNC(Word c1,Word c2, Word c3, Word i, Word j,Word k, Word P)
{
  Word Lt,Lf,C,c,A,tt,tf,L,Lp,Ls;

Step1: /* Classify cells as true or false. */
  C = LIST3(c1,c2,c3);
  for(Lt = NIL, Lf = NIL; C != NIL; C = RED(C)) {
    c = FIRST(C);
    switch(LELTI(c,SC_TMPM)) {
    case TRUE:  Lt = COMP(c,Lt); break;
    case FALSE: Lf = COMP(c,Lf); break;
    default: break; } }

Step2: /* Need a true cell and a false cell to continue. */
  if (Lt == NIL || Lf == NIL) {
    L = NIL;
    goto Return; }

Step3: /* Weed out conditions that are not strong & necessary. */
  Ls = FMAAFPIRN(i,j,k);
  for(L = NIL; Ls != NIL; Ls = RED(Ls)) {
    A = FIRST(Ls);
    for(tt = 1, Lp = Lt; tt && Lp != NIL; Lp = RED(Lp))
      tt = FMACELLEVAL(A,FIRST(Lp),P);
    for(tf = 1, Lp = Lf; tf && Lp != NIL; Lp = RED(Lp))
      tf = FMACELLEVAL(A,FIRST(Lp),P);
    if (tt && !tf)
      L = COMP(A,L); }

Return: /* */
  return L;
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:33,代码来源:ESPCADLSNC.c


示例3: memset

void Socket::connect(const std::string& h, const std::string& s) {
	host = h; serv = s;

	int status;
	addrinfo hint, *info;
	memset(&hint, 0, sizeof(hint));
	hint.ai_family = AF_INET;
	hint.ai_socktype = SOCK_STREAM;

	LOG(COMP("Connecting to %1", hostserv()), LOG_MSG)

	ERR(status = getaddrinfo(host.c_str(), serv.c_str(), &hint, &info),
		COMP("getaddrinfo():%1", gai_strerror(status)))

	ERR((fd = socket(info->ai_family, info->ai_socktype,
		info->ai_protocol)) == -1, COMP("socket():%1", strerror(errno)))

	ERR(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &(status=1),
		sizeof(status)) == -1, COMP("setsockopt():%1", strerror(errno)))

	ERR(::connect(fd, info->ai_addr, info->ai_addrlen) == -1,
		COMP("connect():%1", strerror(errno)))

	freeaddrinfo(info);
	disconnected = false;
}
开发者ID:Edgeworth,项目名称:chat23,代码行数:26,代码来源:socket.cpp


示例4: MINHITSET

Word MINHITSET(Word A, Word B)
{
      Word L,As,C,Cp,p,Ap,T,s;

Step1: /* Quick decisions. */
      if (A == NIL) return (NIL);
      if ((B == 0) || (FIRST(A) == NIL)) return (MC_FAIL);

Step2: /* Initialize loop. */
      L = FIRST(A);
      As = RED(A);
      C = MC_FAIL; 

Step3: /* Loop over the elements of L, looking for a min. hit set of A. */
      while ( (L != NIL) && (B != 0) ) {
	ADV(L,&p,&L);

Step4: /* Eliminate from A all sets hit by p, call this Ap. */
	Ap = NIL; T = As;
	while ( T != NIL) {
	  ADV(T,&s,&T);
	  if (! MEMBER(p,s)) {
	    Ap = COMP(s,Ap); } }
	Ap = INV(Ap);

Step5: /* Recurse: Look for a cover of Ap of at most B-1 columns. */
         Cp = MINHITSET(Ap,B-1);
         if ( Cp != MC_FAIL ) {
           C = COMP(p,Cp);
           B = LENGTH(Cp); } }

Return: /* Loop complete.  Return. */
      return (C);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:34,代码来源:MINHITSET.c


示例5: ADJ_2D1

Word ADJ_2D1(Word c, Word c_l, Word P, Word J)
{
  Word U,V,v_l,Sol,S,A,Ap,a,b;
  /*
init();
sa_send("[");
  */
Step1: /* Initialization. */
  v_l = LDCOEFMASK(c,P,J);
  U = AD2DS_CONS(c_l,P);
  V = AD2DS_CONS(c,P);

Step2: /* Get Adjacencies. */
  /* Sol = ADJ_2D1_SIMPLE(U,V,v_l,FIRST(LELTI(c,INDX))); */
  Sol = ADJ_2D1P1(U,V,v_l,FIRST(LELTI(c,INDX)));

Step3: /* If c_l is to the right of c, reverse order of pairs. */
  if (FIRST(LELTI(c,INDX)) < FIRST(LELTI(c_l,INDX))) {
    for(S = NIL; Sol != NIL; Sol = RED(Sol)) {
      for(A = NIL, Ap = FIRST(Sol); Ap != NIL; Ap = RED(Ap)) {
	FIRST2(FIRST(Ap),&a,&b);
	A = COMP(LIST2(b,a),A); }
      S = COMP(A,S); }
    Sol = S; }

Return: /* Prepare to return. */
  /*
  sa_send("]\n");
  uninit();
  */
  return Sol;
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:32,代码来源:ADJ_2D1.c


示例6: insert

struct Interval* insert(struct Interval* intervals, int intervalsSize, struct Interval newInterval, int* returnSize) {
    struct Interval* ns = malloc(sizeof(struct Interval) * (intervalsSize + 1));
    (* returnSize) = 0;
    int i;
    if (intervalsSize == 0 || intervals[0].start > newInterval.start) {
        i = 0;
        ns[(* returnSize)].start = newInterval.start;
        ns[(* returnSize)].end = newInterval.end;
        newInterval.start = newInterval.end = INT_MAX;
    } else if (intervalsSize > 0) {
        i = 1;
        ns[(* returnSize)].start = intervals[0].start;
        ns[(* returnSize)].end = intervals[0].end;
    }
    if (intervalsSize == 0) {
        (* returnSize)++;
        return ns;
    }
    for ( ; i < intervalsSize ; i++) {
        if (newInterval.start < intervals[i].start) {
            COMP(newInterval);
            newInterval.start = newInterval.end = INT_MAX;
            i--;
        } else {
            COMP(intervals[i]);
        }
    }
    if (newInterval.start != INT_MAX) {
        COMP(newInterval);
    }
    (* returnSize)++;
    return ns;
}
开发者ID:komea,项目名称:leetcode,代码行数:33,代码来源:057-Insert+Interval.c


示例7: MBPROD

Word MBPROD(Word A, Word B)
{
       Word A1,A11,Ap,Ap1,B1,B11,Bp,Bs,C,C1,C11,i,j,k,p,q,qp,r;
       /* hide C11,i,j,k,p,q,qp,r; */

Step1: /* Get the sizes of $A$ and $B$. */
        p = LENGTH(A); if (p == 0) q = 0; else q = LENGTH(FIRST(A));
        qp = LENGTH(B); if (qp == 0) r = 0; else r = LENGTH(FIRST(B));

Step2: /* Multiply. */
        C = NIL; Ap = A;
        for (i = 1; i <= p; i++)
           {
           C1 = NIL; ADV(Ap,&A1,&Ap); Bp = B;
           for (j = 1; j <= r; j++)
              {
              C11 = 0; Bs = NIL; Ap1 = A1;
              for (k = 1; k <= q; k++)
                 {
                 ADV(Ap1,&A11,&Ap1);
                 ADV(Bp,&B1,&Bp); ADV(B1,&B11,&B1);
                 C11 = C11 + A11 * B11;
                 Bs = COMP(B1,Bs);
                 }
              Bp = INV(Bs); C1 = COMP(C11,C1);
              }
           C1 = INV(C1); C = COMP(C1,C);
           }
        C = INV(C);
        goto Return;

Return: /* Prepare for return. */
       return(C);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:34,代码来源:MBPROD.c


示例8: for

Word QepcadCls::IPFZT(Word r, Word A)
{
       Word A1,Ap,As,P,Ths,i,s,t;
       /* hide Ap,Ths,i,s,t; */

Step1: /* Initialize. */
                                /*Int*/ if (PCIPFZT == 'n') return(0);
                                /*Int*/ Ths = ACLOCK();
        t = 1; P = NIL; for (i = r; i >= 1; i--)
        P = COMP(i,P); i = 1;

Step2: /* Test for finitely many distinct x sub i - coordinates among
     the common zeros. */ Ap = A; As = NIL; do
        { ADV(Ap,&A1,&Ap);
        if (i > 1) A1 = PPERMV(r,A1,P); s = PUNT(r,A1);
        if (s == 2) goto Step4; else if (s == 1) goto Step3;
        As = COMP(A1,As); } while (!(Ap == NIL)); As = INV(As);
        if (!IPFZT1(r,As)) { t = 0; goto Step4; }

Step3: /* Check for completion. */ i = i + 1; if (i > r) goto Step4;
        P = PERMCY(P); goto Step2;

Step4: /* Return. */
                               /*Int*/ Ths = ACLOCK() - Ths;
                               /*Int*/ TMIPFZT[r] = TMIPFZT[r] + Ths;
        goto Return;

Return: /* Prepare for return. */
       return(t);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:30,代码来源:IPFZT.c


示例9: PCADCSV

Word PCADCSV(Word cs, Word Ps)
{
      Word c,l,S,s,I,V,Vs;

Step1: /* */
      c = LELTI(cs,SC_REP);
      l = LELTI(c,LEVEL);
      if (l == 0) {
	Vs = NIL; goto Return; }
      S = LELTI(Ps,l);

      for(I = NIL; S != NIL; S = RED(S)) {
	s = FIRST(S);
	I = COMP(THIRD(LELTI(s,PO_LABEL)),I); }

      LBIBMS(I);
      I = CINV(I);

      V = FIRST(LELTI(c,SIGNPF));
      for(Vs = NIL;I != NIL; I = RED(I))
	Vs = COMP(LELTI(V,FIRST(I)),Vs);      

Return: /* Prepare to return. */
      return (Vs);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:25,代码来源:PCADCSV.c


示例10: testSIimplOI

void testSIimplOI(BDigit r, Word P, Word ZL, Word NZ, Word A)
{
  /* Compute generators A and all its 1st order partials */
  Word L = LIST1(A);
  for(int i = 1; i <= r; ++i)
  {
    Word D = IPDER(r,A,i);
    if (D != 0)
      L = COMP(D,L);
  } 
  L = CCONC(L,ZL);

  /* Compute a variable list for output purposes. */
  Word V = NIL;
  for(int i = r; i > 0; i--)
  {
    char s[2];
      s[0] = 'a' - 1 + i;
      s[1] = '\0';
      V = COMP(LFS(s),V);
  }

  /* Go through assumptions and find non-vanishing conditions. */
  Word M = NZ;
  SWRITE("Test si ==> oi: ");
  IPDWRITE(r,A,V);
  SWRITE("\n");
  GBTest(r,L,V);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:29,代码来源:SIIOIQ.c


示例11: process_request_line

static ret_t
process_request_line (cherokee_handler_admin_t *hdl, cherokee_buffer_t *line)
{
#define COMP(str,sub) (strncmp(str, sub, sizeof(sub)-1) == 0)

    if (COMP (line->buf, "get server.ports")) {
        return cherokee_admin_server_reply_get_ports (HANDLER(hdl), &hdl->dwriter);
    } else if (COMP (line->buf, "get server.traffic")) {
        return cherokee_admin_server_reply_get_traffic (HANDLER(hdl), &hdl->dwriter);
    } else if (COMP (line->buf, "get server.thread_num")) {
        return cherokee_admin_server_reply_get_thread_num (HANDLER(hdl), &hdl->dwriter);

    } else if (COMP (line->buf, "get server.trace")) {
        return cherokee_admin_server_reply_get_trace (HANDLER(hdl), &hdl->dwriter);
    } else if (COMP (line->buf, "set server.trace")) {
        return cherokee_admin_server_reply_set_trace (HANDLER(hdl), &hdl->dwriter, line);

    } else if (COMP (line->buf, "get server.sources")) {
        return cherokee_admin_server_reply_get_sources (HANDLER(hdl), &hdl->dwriter);
    } else if (COMP (line->buf, "kill server.source")) {
        return cherokee_admin_server_reply_kill_source (HANDLER(hdl), &hdl->dwriter, line);

    } else if (COMP (line->buf, "set server.backup_mode")) {
        return cherokee_admin_server_reply_set_backup_mode (HANDLER(hdl), &hdl->dwriter, line);

    } else if (COMP (line->buf, "get server.connections")) {
        return cherokee_admin_server_reply_get_conns (HANDLER(hdl), &hdl->dwriter);
    } else if (COMP (line->buf, "close server.connection")) {
        return cherokee_admin_server_reply_close_conn (HANDLER(hdl), &hdl->dwriter, line);

    }

    SHOULDNT_HAPPEN;
    return ret_error;
}
开发者ID:chetan,项目名称:cherokee,代码行数:35,代码来源:handler_admin.c


示例12: CADFPCAD

Word CADFPCAD(Word D, Word P, Word S, Word I, Word Pb)
{
      Word Db,Is,N,Sb,Pb_N,Ts,L,p,i,is,Q,Ms,C,Cs,Ds,Ss;
      Word Mb,mb;

Step1: /* Is D the root cell? */
      Db = LELTI(D,SC_REP);
      if (LELTI(D,SC_PAR) == NIL) {
	Is = NIL;
	Ss = NIL;
	Ms = NIL; }

      else {
Step2: /* D is not the root cell. */
	Is = CINV(COMP(LELTI(D,SC_INX),CINV(I)));
	N = LENGTH(Is);

Step3: /* Signiture & multiplicity information. */
	Sb = FIRST(LELTI(Db,SIGNPF));
	Pb_N = LELTI(Pb,N);
	Ts = NIL; Ms = NIL; is = 0;

 /* Loop over each level N polynomial in P. */
	for(L = CINV(LELTI(P,N)); L != NIL; L = RED(L)) {
	  p = FIRST(L); i = 1; is++;

 /* Set i so that p is the ith level N pol in Pb. */
	  i = PFPIPFL(p,Pb_N);
	  if (i == 0) { SWRITE("CAPFPCAD: Can't find the polynomial!\n"); }
	  Ts = COMP(LELTI(Sb,i),Ts);

 /* Set the multiplicity list if necessary */
	  for (Mb = LELTI(Db,MULSUB); Mb != NIL; Mb = RED(Mb)) {
	    mb = FIRST(Mb);
	    if (FIRST(mb) == THIRD(LELTI(p,PO_LABEL))) {
	      Ms = COMP(mb,Ms); } } }
	/*	Ms = CINV(Ms); */
	Ss = COMP(Ts,S); }

Step4: /* Children. */
	C = LELTI(D,SC_CDTV);
	if ( ISATOM(C) ) {
	  Cs = NIL; }
	else {
	  for(Cs = NIL; C != NIL; C = RED(C)) {
	    Cs = COMP(CADFPCAD(FIRST(C),P,Ss,Is,Pb),Cs); }
	  Cs = CINV(Cs); }

Step5: /*  */
	Ds = LCOPY(Db);
	SLELTI(Ds,CHILD,Cs);
	SLELTI(Ds,INDX,Is);
	SLELTI(Ds,SIGNPF,Ss);
	SLELTI(Ds,HOWTV,NOTDET); /* Might want to change. */
	SLELTI(Ds,MULSUB,Ms);

Return: /* Prepare to return. */
	return (Ds);
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:59,代码来源:CADFPCAD.c


示例13: COMP

bool TrailID::operator<( const TrailID &rhs ) const
{
#define COMP(a) if(a<rhs.a) return true; if(a>rhs.a) return false;
	COMP(st);
	COMP(cd);
#undef COMP
	return false;
}
开发者ID:Highlogic,项目名称:stepmania-event,代码行数:8,代码来源:TrailUtil.cpp


示例14: bstree_copy_sort

static void bstree_copy_sort( bstree bst, unsigned int node,
			      bstree_node *array, unsigned int *index){
static int bstree_shrink( bstree bst);


static int bstree_node_find( const bstree bst, const unsigned int *node,
			     KEYTYPE key, VALUETYPE *value){
  if( key == bst->array[*node].key ){
    *value = bst->array[*node].value;
    return BSTREE_SUCCESS;
  }
  if( COMP(key, bst->array[*node].key) < 0 ){
    if( bst->array[*node].left != NODE_NULL ){
      return bstree_node_find( bst, &(bst->array[node].left), key, value);
    }
  }else{
    if( bst->array[node].right != NODE_NULL ){
      return bstree_node_find( bst, &(bst->array[node].right), key, value);
    }
  }
  return BSTREE_FAILURE;
}

static int bstree_node_insert( bstree bst, unsigned int *node,
			       KEYTYPE key, VALUETYPE value){
  int status;

  if( *node == NODE_NULL){
    if( bst->max_pos == bst->array_size ){
      if( bstree_grow( bst) == BSTREE_MEM_ERROR ){
	return BSTREE_MEM_ERROR;
      }
    }
    *node = bstree->max_pos;
    bst->array[*node].left = NODE_NULL;
    bst->array[*node].right = NODE_NULL;
    bst->array[*node].key = key;
    bst->array[*node].value = value;
    bst->array[*node].level = 1;
    (bst->max_pos)++;
    (bst->size)++;
    return BSTREE_SUCCESS;
  }
  if( key == bst->array[*node].key ){
    bst->array[*node].value += value;
    return BSTREE_SUCCESS;
  }
  if( COMP( key, bst->array[*node].key) < 0 ){
    status = bstree_node_insert( bst, &(bst->array[node].left), key, value);
  }else{
    status = bstree_node_insert( bst, &(bst->array[node].right), key, value);
  }
  
  skew( bst, node);
  split( bst, node);
  return status;
}
开发者ID:jefwagner,项目名称:c_containers,代码行数:57,代码来源:bstree2.c


示例15: ERR

void Socket::send(const std::string& msg) {
	int sent = 0;
	for (int i = 0; i < msg.size(); i += sent) {
		ERR((sent = ::send(fd, &msg[i], msg.size()-i, 0)) == -1,
			COMP("send():%1", strerror(errno)))
	}
	LOG(COMP("Sent %1B to %2:\n'%3'",
		msg.size(), hostserv(), Glib::strescape(msg)), LOG_DEBUG)
}
开发者ID:Edgeworth,项目名称:chat23,代码行数:9,代码来源:socket.cpp


示例16: FMAAFPIRN

Word FMAAFPIRN(Word i, Word j, Word k)
{
  Word L,op;
  L = NIL;
  for(op = 1; op <= 6; op++) {
    L = COMP(LIST2(LIST2(i,j),op),L);
    L = COMP(LIST2(LIST2(i,j),LIST2(op,k)),L); }
  return L;
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:9,代码来源:ESPCADLSNC.c


示例17: CYLIMPFORM

Word CYLIMPFORM(Word C, Word P, Word k, Word A)
{
       Word SF,L,Lp,c,S,t,Q,As,Ap,Fp,F,Lt,Lf,s,Si,Fi,Qp,SF2;

Step1: /* Set L to a list of all (k-1)-level cells over which there are
k-level cells with SC_TMPM of TRUE. */
       if (k == 0) {
	 if (LELTI(C,SC_TMPM) == TRUE)
	   SF = LIST1(TRUE);
	 else 
	   SF = LIST1(FALSE);
         goto Return; }
       SF = NIL;
       L = NIL;
       for(Lp = PCADCL(C,k-1); Lp != NIL; Lp = RED(Lp)) {
         c = FIRST(Lp); 
	 S = LELTI(c,SC_CDTV); if (!ISLIST(S)) continue;
         for(t = 0; S != NIL && !t; S = RED(S))
           t = (LELTI(FIRST(S),SC_TMPM) == TRUE);
         if (t)
           L = COMP(c,L); }

Step2: /* Construct formula for the k-level cells. */
       Lt = NIL;
       Lf = NIL;
       S = NIL;
       for(Lp = L; Lp != NIL; Lp = RED(Lp))
	 S = CCONC(LELTI(FIRST(Lp),SC_CDTV),S);
       for(S = PCADCL(C,k); S != NIL; S = RED(S)) {
	 s = FIRST(S);
	 if (LELTI(s,SC_TMPM) == TRUE)
	   Lt = COMP(s,Lt);
	 else
	   Lf = COMP(s,Lf); }
       F = NAIVESF(SPCADCBDD(Lt,k),Lf,A,P);

Step3: /* */
       S = GEOPARTII(FMASORT(FMA2DNF(F)),L,P,NIL);
       /* Construct definiting formula from each (Si,Fi) in S. */
       for(; S != NIL; S = RED(S)) {
	 FIRST2(FIRST(S),&Si,&Fi);
	 ESCSLKMF(C,k-1);
	 for(Qp = Si; Qp != NIL; Qp = RED(Qp))
	   SLELTI(FIRST(Qp),SC_TMPM,TRUE);
	 SF2 = CYLIMPFORM(C,P,k-1,A);
	 SF = COMP(LIST3(ANDOP,SF2,CLEANUPFORM(Si,Fi,P)),SF); }

 Step4: /* Convert SF from a list of formulas to a formula. */
       if (LENGTH(SF) > 1)
	 SF = COMP(OROP,SF);
       else
	 SF = FIRST(SF);
       
Return: /* Prepare to return. */
       return SF;      
}
开发者ID:fchapoton,项目名称:qepcad-1,代码行数:56,代码来源:CYLIMPFORM.c


示例18: ERR

SSL_CTX *initCTX() {
	SSL_CTX *m_ctx;
	ERR((m_ctx = SSL_CTX_new(SSLv23_method())) == NULL,
		COMP("SSL_CTX_new():%1", SSLErrors()))

	SSL_CTX_set_options(m_ctx, SSL_OP_ALL|SSL_OP_NO_SSLv2);
	ERR(SSL_CTX_set_default_verify_paths(m_ctx) == 0,
		COMP("SSL_CTX_set_default_verify_paths():%1", SSLErrors()))
	return m_ctx;
}
开发者ID:Edgeworth,项目名称:chat23,代码行数:10,代码来源:sslsocket.cpp


示例19: COMP

bool StepsID::operator<( const StepsID &rhs ) const
{
#define COMP(a) if(a<rhs.a) return true; if(a>rhs.a) return false;
	COMP(st);
	COMP(dc);
	COMP(sDescription);
	COMP(uHash);
#undef COMP
	return false;
}
开发者ID:Ancaro,项目名称:stepmania,代码行数:10,代码来源:StepsUtil.cpp


示例20: BlendColor

	inline DWORD BlendColor(DWORD c1, DWORD c2, int alpha)
	{
		int	r = (COMP(c1,16)*256 + (COMP(c2,16)-COMP(c1,16))*alpha) >> 8;
		int	g = (COMP(c1,8)*256 + (COMP(c2,8)-COMP(c1,8))*alpha) >> 8;
		int	b = (COMP(c1,0)*256 + (COMP(c2,0)-COMP(c1,0))*alpha) >> 8;
		return MAKECOLOR(r,g,b);
	}
开发者ID:CyberShadow,项目名称:graphstudio,代码行数:7,代码来源:title_bar.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ COMPARE函数代码示例发布时间:2022-05-30
下一篇:
C++ COMMENT函数代码示例发布时间: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