您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ star函数代码示例

51自学网 2021-06-03 08:21:29
  C++
这篇教程C++ star函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ElliInfty

ElliPoint *sum(ElliPoint *p,ElliPoint *q,int a,int base) {	ElliPoint *o,*r;	o = ElliInfty();	r = star(o,star(p,q,a,base),a,base);	free(o);	return r;}
开发者ID:ncanceill,项目名称:libelliptic,代码行数:7,


示例2: star

 void star(int i) {if (i > 1) {star(i/2);star(i/2);}printf( "hello/n");     }
开发者ID:gautamkmr,项目名称:Code,代码行数:7,


示例3: main

 void main() {  int i,j;  for (i=1;i<=4;i++)    { for(j=1;j<=2*i-1;j++) printf (" ");      star();     }  for (i=3;i>=1;i--)    { for(j=1;j<=2*i-1;j++) printf (" ");      star();     }  }
开发者ID:DongLING,项目名称:bYBX_c_language,代码行数:12,


示例4: print

void print(int n, bool upper){    if (n == 1) {        printf("*/n");    }else{        if (upper){            print(n-1, upper);            star(n);        }else{            star(n);            print(n-1, upper);        }    }}
开发者ID:jhnaldo,项目名称:toy,代码行数:13,


示例5: main

int main(){    int n, i;    scanf("%d", &n);    for (i = 1; i <= n; i++){        star(i);        printf("/n");    }    for (i = n-1; i >= 1; i--){        star(i);        printf("/n");    }    return 0;}
开发者ID:jhnaldo,项目名称:toy,代码行数:13,


示例6: crossHatch

//static int crossHatch ( int *masks )static int crossHatch ( short **pmasks ){   int	progress = 0;   //int	solutions [9];   short	solutions [9];   short	*psolutions [9];   int	k;   for ( k = 0; k < 9; k++ ) {   	psolutions [k] = &solutions[k];   }   int	i;#if	defined(DEBUG)   //fprintf ( logFile, "crossHatch ( %04X ) {/n", (unsigned int)masks );   fprintf ( logFile, "crossHatch ( %p ) {/n", pmasks );   fflush ( logFile );#endif   for ( i = 0; i < 9; ++i ) {	int	j;	//solutions [i] = masks [i];	solutions [i] = star(pmasks [i]);	IFT(psolutions [i], pmasks [i]);	//for ( j = 0; j < 9; ++j ) if ( j != i ) solutions [i] &= ~masks [j];	for ( j = 0; j < 9; ++j ) {		if ( j != i ) {			solutions [i] &= ~(star(pmasks [j]));			IFT(psolutions [i], pmasks [j]);		}	}		   }   for ( i = 0; i < 9; ++i ) {	//if ( masks [i] = bit2digit ( solutions [i] ) ) ++progress;	if ( STAR(pmasks [i]) = bit2digit ( solutions [i] ) ) ++progress;	IFT(pmasks [i], psolutions [i]);   }#if	defined(DEBUG)   fprintf ( logFile, "} = %d /* crossHatch () *//n", progress );   fflush ( logFile );#endif   return ( progress );}
开发者ID:woodbunny,项目名称:IFT-Sudoku,代码行数:52,


示例7: star

void MyModel_Pixels::initialise(){    for(size_t i=0; i<ni; ++i)        y[i] = y_max - (i + 0.5)*dy;    for(size_t j=0; j<nj; ++j)        x[j] = x_min + (j + 0.5)*dx;    double rsq;    double limb_darkening_coefficient = 1.0;    // Argh column-major order    // Star image    double tot = 0.0;    for(size_t j=0; j<nj; ++j)    {        for(size_t i=0; i<ni; ++i)        {            rsq = x[j]*x[j] + y[i]*y[i];            if(rsq < 1.0)            {                star(i, j) = 1.0 -                    limb_darkening_coefficient*(1.0 - sqrt(1.0 - rsq));            }            else                star(i, j) = 0.0;            tot += star(i, j);        }    }    for(size_t j=0; j<nj; ++j)        for(size_t i=0; i<ni; ++i)            star(i, j) /= tot;    arma::mat star2 = star;    int m, n;    for(int i=0; i<(int)ni; i++)    {        m = DNest4::mod(i - (int)ni/2, (int)ni);        for(int j=0; j<(int)nj; j++)        {            n = DNest4::mod(j - (int)nj/2, (int)nj);            star2(m, n) = star(i, j);        }    }    fft_of_star = arma::fft2(star2);}
开发者ID:eggplantbren,项目名称:Obscurity,代码行数:48,


示例8: main

int main( int argc, char *argv[] ){    int center = -1, minsize = -1, maxsize = -1, repeats = -1;    int c;    MPI_Init( &argc, &argv );    while( ( c = getopt( argc, argv, "c:i:a:r:" ) ) != -1 ) {	switch( c ) {	case 'c':	    if( sscanf( optarg, "%d", &center ) != 1 )		exit( EXIT_FAILURE );	    break;	case 'i':	    if( sscanf( optarg, "%d", &minsize ) != 1 )		exit( EXIT_FAILURE );	    break;	case 'a':	    if( sscanf( optarg, "%d", &maxsize ) != 1 )		exit( EXIT_FAILURE );	    break;	case 'r':	    if( sscanf( optarg, "%d", &repeats ) != 1 )		exit( EXIT_FAILURE );	    break;	}    }    star( center, minsize, maxsize, repeats );    MPI_Finalize();        exit( EXIT_SUCCESS );}
开发者ID:RWTH-OS,项目名称:MP-MPICH,代码行数:34,


示例9: throw

StringPimpl Gender::getString() constthrow(InternalProgrammerErrorException &){    LOG_BOT_METHOD("StringPimpl Gender::getString() const");    try    {        if(m_pimpl->m_atomic)        {            logging("This is an atomic element shortcut");            Star star(m_pimpl->m_builder);            StringPimpl returnString = star.getString();            return m_pimpl->m_builder.genderSubstitute(returnString);        }        else        {            return m_pimpl->m_builder.genderSubstitute(InnerTemplateListImpl::getString());        }    }    catch(Exception &e)    {        logging(String("Fatal exception occured:") + e.what());        return StringPimpl();    }}
开发者ID:sleimanf,项目名称:aibot,代码行数:25,


示例10: star

void QStarFrame::drawstars(){    QString starpath = KStandardDirs::locate("data", "knewstuff/pics/ghns_star.png");    QString graystarpath = KStandardDirs::locate("data", "knewstuff/pics/ghns_star_gray.png");    QPixmap star(starpath);    QPixmap graystar(graystarpath);    int wpixels = (int)(width() * (float)m_rating / 100.0);    QPainter p;    p.begin(this);    int w = star.width();    for (int i = 0; i < wpixels; i += star.width()) {        w = wpixels - i;        if (w > star.width()) w = star.width();        p.drawPixmap(i, 0, star, 0, 0, w, -1);    }    p.drawPixmap(wpixels, 0, graystar, w, 0, graystar.width() - w, -1);    wpixels += graystar.width() - w;    for (int i = wpixels; i < width(); i += graystar.width()) {        w = width() - i;        if (w > graystar.width()) w = graystar.width();        p.drawPixmap(i, 0, graystar, 0, 0, w, -1);    }    p.end();}
开发者ID:vasi,项目名称:kdelibs,代码行数:27,


示例11: match

int			match(char *tested, char *word){	if (*word == '/0' && *tested == '/0')		return (1);	if (*word == 0x5c)	{		if (*(word + 1) != *tested)			return (0);		else			return (match(tested + 1, word + 2));	}	if (*word == '*' || *word == '?' || *word == '[')	{		if (*word == '*')			return (star(tested, word));		else if (*word == '?')			return (question_mark(tested, word));		else if (*word == '[')			return (test_bracket(tested, word));	}	else if (*word == *tested)		return (match(tested + 1, word + 1));	else		return (0);	return (1);}
开发者ID:dbaldy,项目名称:globing,代码行数:26,


示例12: main

// -----------------------------------------------------------------// Main program prints out coefficients and other pertinent informationint main(int argc, char* argv[]) {  int i, order;  double alpha, epsilon, delta, err, c[NMAX + 1];  if (argc != 3) {    printf("Usage: %s epsilon delta/n", argv[0]);    return -1;  }  epsilon = atof(argv[1]);  delta = atof(argv[2]);  squareroot(delta, epsilon, c, &order, &err);//  for(i = 0; i < 5001;i++) {//    double x = 2. * i / 5000. - 1.;//    printf("%e %e SIGN/n", x, h(x));//  }  printf("order = %d;/n", order);  printf("epsilon = %.8g;/n", epsilon);  printf("err = %.8g;/n/n", err);  for (alpha = 0; alpha <= 3.0; alpha += 0.5) {    printf("star(%.2g) = %.8g;/n", alpha,           star(delta, epsilon, order, c, alpha));  }  printf("/n");  for (i = 0; i <= order; i++)    printf("coeffs[%d] = %.16g;/n", i, c[i]);  return 0;}
开发者ID:daschaich,项目名称:KS_nHYP_FA,代码行数:33,


示例13: updateBlockMasks

//static void updateBlockMasks ( PUZZLE *puzzle, int row, int column, int entry )static void updateBlockMasks ( PUZZLE *puzzle, int row, int column, short *pentry ){   int	rowMax = row + 3 - ( row % 3 );   int	columnMax = column + 3 - ( column % 3 );   //int	mask = ~digit2bit ( entry );   short	mask = ~digit2bit ( star(pentry) );   short	*pmask = &mask;   IFT(pmask, pentry);#if	defined(DEBUG)   //fprintf ( logFile, "updateBlockMasks ( %p, %d, %d, %d ) {/n", puzzle, row,   fprintf ( logFile, "updateBlockMasks ( %p, %d, %d, %p ) {/n", puzzle, row,								column, pentry );   fflush ( logFile );#endif   for ( row = rowMax - 3; row < rowMax; ++row ) {	for ( column = columnMax - 3; column < columnMax; ++column ) {		puzzle->masks [row][column] &= mask;		IFT(puzzle->pmasks [row][column], pmask);	}   }#if	defined(DEBUG)   fprintf ( logFile, "} /* updateBlockMasks () *//n" );   fflush ( logFile );#endif}
开发者ID:woodbunny,项目名称:IFT-Sudoku,代码行数:32,


示例14: updateColumnMasks

//static void updateColumnMasks ( PUZZLE *puzzle, int column, int entry )static void updateColumnMasks ( PUZZLE *puzzle, int column, short *pentry ){   int	row;   //int	mask = ~digit2bit ( entry );   short	mask = ~digit2bit ( star(pentry) );   short	*pmask = &mask;   IFT(pmask, pentry);#if	defined(DEBUG)   //fprintf ( logFile, "updateColumnMasks ( %p, %d, %d ) {/n", puzzle, column,   fprintf ( logFile, "updateColumnMasks ( %p, %d, %p ) {/n", puzzle, column,									pentry );   fflush ( logFile );#endif   for ( row = 0; row < 9; ++row ) {	puzzle->masks [row][column] &= mask;	IFT(puzzle->pmasks [row][column], pmask);   }#if	defined(DEBUG)   fprintf ( logFile, "} /* updateColumnMasks () *//n" );   fflush ( logFile );#endif}
开发者ID:woodbunny,项目名称:IFT-Sudoku,代码行数:28,


示例15: main

int main(int num){  star(num);    return 0;}
开发者ID:waribashi624,项目名称:J2program,代码行数:7,


示例16: star

//**************************//Description : Draw the menu//Parameters : None//Return Value : None//Note : None//**************************void CMenu::DrawMenu(){    // We first fill the entire screen with black    m_RenderWindow->SetBackgroundColor(sf::Color(0,0,0));    //we draw the background    m_SpriteBackground->Draw();    //we draw the title at the top of the screen an to the center    m_RenderWindow->Draw(m_Title);    //we draw the options    for (int i = 0; i < NUMBER_OPTION_MENU; i++)    {        if ( i == m_iOptionSelected )        {            sf::String star("*");            star.SetFont(*(m_SFMLManager->GetFont()));            star.SetColor(sf::Color(255,0,0));            star.Move(10, 300 + i * 40);            m_RenderWindow->Draw(star);        }        m_RenderWindow->Draw(m_Menu[i]);    }    //We display the screen    m_RenderWindow->Display();}
开发者ID:flamester43,项目名称:creaconnect4,代码行数:36,


示例17: sizeof

            pilo::core::net::ipv4_mask ipv4_mask::build(const char* ipAddress)            {                char buf[32];                pilo::core::string::string_util::copy(buf, sizeof(buf), ipAddress, MC_INVALID_SIZE);                ipv4_mask ipMask = { 0xffffffff, 0xffffffff };                char* abcd[4];                size_t n = pilo::core::string::string_util::split(buf, '.', abcd, 4);                if (n != 4)                {                    return ipMask;                }                pilo::core::string::fixed_astring<16> star("*");                pilo::core::string::fixed_astring<16> sa = abcd[0];                pilo::core::string::fixed_astring<16> sb = abcd[1];                pilo::core::string::fixed_astring<16> sc = abcd[2];                pilo::core::string::fixed_astring<16> sd = abcd[3];                pilo::u32_t a = sa == star ? 0 : pilo::core::string::string_util::cstr_to_int32(sa.c_str());                pilo::u32_t b = sb == star ? 0 : pilo::core::string::string_util::cstr_to_int32(sb.c_str());                pilo::u32_t c = sc == star ? 0 : pilo::core::string::string_util::cstr_to_int32(sc.c_str());                pilo::u32_t d = sd == star ? 0 : pilo::core::string::string_util::cstr_to_int32(sd.c_str());                unsigned int ma = sa == star ? 0 : 255;                unsigned int mb = sb == star ? 0 : 255;                unsigned int mc = sc == star ? 0 : 255;                unsigned int md = sd == star ? 0 : 255;                ipMask.m_mask = MF_MAKE_IPV4_ADDRESS(ma, mb, mc, md);                ipMask.m_target = MF_MAKE_IPV4_ADDRESS(a, b, c, d);                return ipMask;            }
开发者ID:picofox,项目名称:pilo,代码行数:35,


示例18: display

void display(){  glClear(GL_COLOR_BUFFER_BIT);  glLoadIdentity();  star();  glutSwapBuffers();}
开发者ID:ShalbafZadeh,项目名称:Magnificent-University-Projects,代码行数:7,


示例19: SemilinSetExp

SemilinSetExp SemilinSetExp::star() const {  SemilinSetExp result = SemilinSetExp::one();  for (auto &ls : val) {    result *= SemilinSetExp(star(ls));  }  return result;}
开发者ID:michalt,项目名称:newton,代码行数:7,


示例20: main

main(){    printf("See function below:/n/n");    /*Call function star*/    star();    printf("/n/nSee function above:");    getchar();}
开发者ID:kieranhogan13,项目名称:C,代码行数:8,


示例21: star

void star(int n){    if (n == 1) {        printf("*/n");    }else{        printf("*");        star(n-1);    }}
开发者ID:jhnaldo,项目名称:toy,代码行数:8,


示例22: main

int main(void) {  grid g("grid1.sph");  cloud star("star1.sph");  star.transfer_mass2grid(g);  g.set_densities_and_pressures();  star.evolve(g);  return 1;}
开发者ID:gravmath,项目名称:Projects,代码行数:8,


示例23: star

void StarField::initialise(){	if (starField.empty())	{		for (int i = 0; i < smallCount; i++)		{			if (i < mediumCount)			{				Star star(RandomGen().getRand(playerRef->getPlayerX() + 30,					playerRef->getPlayerX() - 30),					RandomGen().getRand(playerRef->getPlayerY() + 18,					playerRef->getPlayerY() - 18),					MED_STAR_PARALLAX_SPEED,					MED_STAR_PARALLAX_SPEED,					MED_STAR_BRIGHTNESS);				starField.push_back(star);			}			if (i < largeCount)			{				Star star(RandomGen().getRand(playerRef->getPlayerX() + 30,					playerRef->getPlayerX() - 30),					RandomGen().getRand(playerRef->getPlayerY() + 18,					playerRef->getPlayerY() - 18),					LARGE_STAR_PARALLAX_SPEED,					LARGE_STAR_PARALLAX_SPEED,					HIGH_STAR_BRIGHTNESS);				starField.push_back(star);			}			Star star(RandomGen().getRand(playerRef->getPlayerX() + 30,				playerRef->getPlayerX() - 30),				RandomGen().getRand(playerRef->getPlayerY() + 18,				playerRef->getPlayerY() - 18),				SMALL_STAR_PARALLAX_SPEED,				SMALL_STAR_PARALLAX_SPEED,				LOW_STAR_BRIGHTNESS);			starField.push_back(star);		}	}	else	{		starField.clear();		initialise();	}}
开发者ID:twiztedcyph,项目名称:GraphicsCW,代码行数:44,


示例24: makeEntry

//static int makeEntry ( PUZZLE *puzzle, int i, int j, int entry )static int makeEntry ( PUZZLE *puzzle, int i, int j, short *pentry ){   int	status = 0;   //int	bit = digit2bit ( entry );   short	bit = digit2bit ( star(pentry) );   short	*pbit = &bit;   IFT(pbit, pentry);#if	defined(DEBUG)   //fprintf ( logFile, "makeEntry ( %p, %d, %d, %d ) {/n", puzzle, i, j, entry );   fprintf ( logFile, "makeEntry ( %p, %d, %d, %p ) {/n", puzzle, i, j, pentry );   fflush ( logFile );#endif   /* Is this a legal entry? */   if ( puzzle->rowMasks [i] & puzzle->columnMasks [j]				& puzzle->blockMasks [i/3][j/3] & bit ) {	status = 1;	puzzle->rowMasks [i] ^= bit;	puzzle->columnMasks [j] ^= bit;	puzzle->blockMasks [i/3][j/3] ^= bit;	//puzzle->grid [i][j] = entry;	puzzle->grid [i][j] = star(pentry);	puzzle->masks [i][j] = 0;	IFT(puzzle->prowMasks [i], pbit);	IFT(puzzle->pcolumnMasks [j], pbit);	IFT(puzzle->pblockMasks [i/3][j/3], pbit);	IFT(puzzle->pgrid [i][j], pentry);	if ( puzzle->history ) pushHistory ( puzzle->history, i, j );   }#if	defined(DEBUG)   fprintf ( logFile, "} = %d /* makeEntry () *//n", status );   fflush ( logFile );#endif   return ( status );}
开发者ID:woodbunny,项目名称:IFT-Sudoku,代码行数:42,


示例25: generate_fractal

//Called from interface.cvoid generate_fractal(Draw *fractal, SDL_Win *window, int i) {    if(strcmp(fractal->type[i], "sierpinski") == 0){        sierpinski(fractal, window, i);    }    else if(strcmp(fractal->type[i], "tree") == 0){        tree(fractal, window, i);    }    else if(strcmp(fractal->type[i], "star") == 0){        star(fractal, window, i);    }}
开发者ID:ahaggan,项目名称:ArtC,代码行数:13,


示例26: starFile

void StarsPlugin::loadStars(){    //mDebug() << Q_FUNC_INFO;    // Load star data    m_stars.clear();    QFile starFile( MarbleDirs::path( "stars/stars.dat" ) );    starFile.open( QIODevice::ReadOnly );    QDataStream in( &starFile );    // Read and check the header    quint32 magic;    in >> magic;    if ( magic != 0x73746172 ) {        return;    }    // Read the version    qint32 version;    in >> version;    if ( version > 002 ) {        mDebug() << "stars.dat: file too new.";        return;    }    int maxid = 0;    int id = 0;    int starIndex = 0;    double ra;    double de;    double mag;    mDebug() << "Star Catalog Version " << version;    while ( !in.atEnd() ) {        if ( version >= 2 ) {            in >> id;        }        if ( id > maxid ) {            maxid = id;        }        in >> ra;        in >> de;        in >> mag;        StarPoint star( id, ( qreal )( ra ), ( qreal )( de ), ( qreal )( mag ) );        // Create entry in stars database        m_stars << star;        // Create key,value pair in idHash table to map from star id to        // index in star database vector        m_idHash[id] = starIndex;        // Increment Index for use in hash        ++starIndex;        //mDebug() << "id" << id << "RA:" << ra << "DE:" << de << "MAG:" << mag;    }
开发者ID:ashish173,项目名称:marble,代码行数:53,


示例27: save_real

/* * Process REGISTER request and save it's contacts */static inline int save_real(struct sip_msg* _m, udomain_t* _t, char* _s, int doreply){	contact_t* c;	int st;	str aor, ua;	rerrno = R_FINE;	if (parse_message(_m) < 0) {		goto error;	}	if (check_contacts(_m, &st) > 0) {		goto error;	}		get_act_time();	c = get_first_contact(_m);	if (extract_aor(&get_to(_m)->uri, &aor) < 0) {		LOG(L_ERR, "save(): Error while extracting Address Of Record/n");		goto error;	}	ua.len = 0;	if (parse_headers(_m, HDR_USERAGENT, 0) != -1 && _m->user_agent &&	    _m->user_agent->body.len > 0) {		ua.len = _m->user_agent->body.len;		ua.s = _m->user_agent->body.s;	}	if (ua.len == 0) {		ua.len = UA_DUMMY_LEN;		ua.s = UA_DUMMY_STR;	}	if (c == 0) {		if (st) {			if (star(_t, &aor) < 0) goto error;		} else {			if (no_contacts(_t, &aor) < 0) goto error;		}	} else {		if (contacts(_m, c, _t, &aor, &ua) < 0) goto error;	}	if (doreply && (send_reply(_m) < 0)) return -1;	else return 1;	 error:	if (doreply) send_reply(_m);	return 0;}
开发者ID:OPSF,项目名称:uClinux,代码行数:55,


示例28: getBlockMasks

//static int getBlockMasks ( PUZZLE *puzzle, int row, int column, int *masks )static int getBlockMasks ( PUZZLE *puzzle, int row, int column, short **pmasks ){   int	status = 0;#if	defined(DEBUG)   //fprintf ( logFile, "getBlockMasks ( %p, %d, %d, %p ) {/n", puzzle, row,								//column, masks );   fprintf ( logFile, "getBlockMasks ( %p, %d, %d, %p ) {/n", puzzle, row,								column, pmasks );   fflush ( logFile );#endif   /* Make sure the 3x3 block is not already full. */   if ( puzzle->blockMasks [row][column] ) {	int	rowMax = ( row + 1 ) * 3;	int	columnMax = ( column + 1 ) * 3;	int	k = 0;	//int	mask = 0;	short	mask = 0;	int	i;	status = 1;	/* Make masks for the 3x3 block. */	for ( i = rowMax - 3; i < rowMax; ++i ) {		int	j;		for ( j = columnMax - 3; j < columnMax; ++j ) {			//masks [k] = puzzle->masks [i][j];			STAR(pmasks [k]) = puzzle->masks [i][j];			IFT(pmasks [k], puzzle->pmasks [i][j]);			//mask |= masks [k];			mask |= star(pmasks [k]);			++k;		}	}	if ( mask != puzzle->blockMasks [row][column] ) status = -1;   }#if	defined(DEBUG)   fprintf ( logFile, "} = %d /* getBlockMasks () *//n", status );   fflush ( logFile );#endif   return ( status );}
开发者ID:woodbunny,项目名称:IFT-Sudoku,代码行数:53,



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


C++ start函数代码示例
C++ standout函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。