这篇教程C++ rr函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中rr函数的典型用法代码示例。如果您正苦于以下问题:C++ rr函数的具体用法?C++ rr怎么用?C++ rr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了rr函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: miirdstatic intmiird(Dev *d, int idx){ while(rr(d, MIIaddr) & MIIbusy) ; wr(d, MIIaddr, PHYinternal<<11 | idx<<6 | MIIread); while(rr(d, MIIaddr) & MIIbusy) ; return rr(d, MIIdata);}
开发者ID:grobe0ba,项目名称:plan9front,代码行数:10,
示例2: miiwrstatic voidmiiwr(Dev *d, int idx, int val){ while(rr(d, MIIaddr) & MIIbusy) ; wr(d, MIIdata, val); wr(d, MIIaddr, PHYinternal<<11 | idx<<6 | MIIwrite); while(rr(d, MIIaddr) & MIIbusy) ;}
开发者ID:grobe0ba,项目名称:plan9front,代码行数:10,
示例3: MathMultU8x8// OKvoid MathMultU8x8(void) { counter = 8; nilrval = 0; W = nilgarg1.low8; do { nilgarg2.low8 = rr( nilgarg2.low8); if (Carry) nilrval.high8 += W; nilrval = rr( nilrval); counter = decsz(counter); } while (1); return;}
开发者ID:gke,项目名称:UAVP,代码行数:15,
示例4: stoiunordered_map<std::string, int> LoadParticles::read_xyzHeader(std::fstream &data) { string line; // Reading the number of particles std::getline(data, line); m_nParticles = stoi(line); // Reading the comments // This program follows a convention that the comments // in a xyz-file must name the variables. std::getline(data, line); boost::regex rr("([A-Za-z_]+)"); boost::sregex_iterator next(line.begin(), line.end(), rr); boost::sregex_iterator end; unordered_map<std::string, int> parameters; int position = 0; while (next != end) { boost::smatch match = *next; parameters[match.str()] = position; position++; next++; } return parameters;}
开发者ID:sigvebs,项目名称:PDtools,代码行数:28,
示例5: extract_region cv::Mat extract_region(const cv::Mat& m, const cv::RotatedRect& ir, bool flipped, int interpolation, int bordertype, int value){ cv::Mat M, enlarged, rotated, cropped; cv::Rect margins; cv::RotatedRect pos_in_enlarged; boost::tie(margins,pos_in_enlarged) = required_padding(m, ir); cv::copyMakeBorder(m, enlarged, margins.y, margins.height, margins.x, margins.width, bordertype, value); cv::Size rect_size = pos_in_enlarged.size; float angle = pos_in_enlarged.angle; if(angle == 0.){ cv::Rect rr( pos_in_enlarged.center.x - pos_in_enlarged.size.width/2, pos_in_enlarged.center.y - pos_in_enlarged.size.height/2, pos_in_enlarged.size.width, pos_in_enlarged.size.height); cropped = enlarged(rr); } else{ if (pos_in_enlarged.angle < -45.) { angle += 90.0; std::swap(rect_size.width, rect_size.height); } M = cv::getRotationMatrix2D(pos_in_enlarged.center, angle, 1.0); cv::warpAffine(enlarged, rotated, M, enlarged.size(), interpolation); cv::getRectSubPix(rotated, rect_size, pos_in_enlarged.center, cropped); assert(cropped.rows == cropped.cols); } if(flipped) cv::flip(cropped, cropped, 1); if(!cropped.isContinuous()) cropped = cropped.clone(); return cropped; }
开发者ID:deeplearningais,项目名称:cuvnet,代码行数:34,
示例6: mainint main(int argc, const char** argv) { Options options; if (!options.parse(argc, argv)) return 1; radical::RadiometricResponse rr(options.r_response); auto min_radiance = rr.inverseMap(cv::Vec3b(0, 0, 0)); auto max_radiance = rr.inverseMap(cv::Vec3b(255, 255, 255)); std::cout << "Loaded radiometric response from file /"" << options.r_response << "/"" << std::endl; std::cout << "Irradiance range: " << min_radiance << " - " << max_radiance << std::endl; auto plot = utils::plotRadiometricResponse(rr); if (options.save) { auto output = options.r_response + ".png"; cv::imwrite(output, plot); std::cout << "Saved radiometric response visualization to file /"" << output << "/"" << std::endl; } else { cv::imshow("Radiometric response", plot); cv::waitKey(-1); } return 0;}
开发者ID:taketwo,项目名称:radical,代码行数:25,
示例7: riRationalNumber RationalNumber::operator/(const int i) const { RationalNumber ri(i); RationalNumber rr(*this); rr /= ri; rr.normalize(); return rr;}
开发者ID:fgrimme,项目名称:rational_number_c,代码行数:7,
示例8: SetControlTextLRESULT CHexFileDialog::OnPostInit(WPARAM wp, LPARAM lp){ // Set text of "OK" button if (!strOKName.IsEmpty()) SetControlText(IDOK, strOKName); // Restore the window position and size CRect rr(theApp.GetProfileInt("Window-Settings", strName+"X1", -30000), theApp.GetProfileInt("Window-Settings", strName+"Y1", -30000), theApp.GetProfileInt("Window-Settings", strName+"X2", -30000), theApp.GetProfileInt("Window-Settings", strName+"Y2", -30000)); if (rr.top != -30000) GetParent()->MoveWindow(&rr); // Note: there was a crash here until we set 8th // param of CFileDialog (bVistaStyle) c'tor to FALSE. // Restore the list view display mode (details, report, icons, etc) ASSERT(GetParent() != NULL); CWnd *psdv = FindWindowEx(GetParent()->m_hWnd, NULL, "SHELLDLL_DefView", NULL); if (psdv != NULL) { int mode = theApp.GetProfileInt("Window-Settings", strName+"Mode", REPORT); psdv->SendMessage(WM_COMMAND, mode, 0); } return 0;}
开发者ID:KB3NZQ,项目名称:hexedit4,代码行数:26,
示例9: rrtestervoid rrtester(int& rrcntr){ extern const int globalWindow; extern double k; double u[globalWindow], v[globalWindow]; double rrmean = 0.0, testdiff = 0.0, tempdiff = 0.0; const int iters = 200, num = 20; cout << "Testing calibration of rr()..." << endl; cout << setw(10) << "Expected" << setw(12) << " Actual " << setw(10) << "Difference" << endl; cout << setw(10) << "--------" << setw(12) << " ------ " << setw(10) << "----------" << endl; for (int i = 1; i < num; i++) { u[0] = 0.0; v[0] = 1.0 / static_cast<double> (i);// stdmpInit(0.0,u,v,w); // These need to be created from scratch, and follow the older definitions of the functions because they are calling a k = 0 option. rrmean = rrInit(u,v,rrcntr); for (int j = 0; j < iters; j++) {// stdmp(0.0,u,v,w,n); rrmean += rr(u,v,rrcntr); } tempdiff = fabs(1.0/static_cast<double> (i) - rrmean/(static_cast<double> (iters + 1))); testdiff += tempdiff; cout << std::fixed << std::setprecision(5) << setw(10) << 1.0/i << setw(10) << rrmean/(iters+1) << setw(12) << std::scientific << std::setprecision(3) << tempdiff << endl; rrmean = 0.0; rrcntr = 0.0; } testdiff /= static_cast<double> (num); cout << endl; cout << "---> rr() is accurate to within " << std::fixed << testdiff*100 << "% on average." << endl;}
开发者ID:ohasselblad,项目名称:rrstdmp,代码行数:35,
示例10: fvoid TestCtcExist::test01() { Variable x,y; Function f(x,y,1.5*sqr(x)+1.5*sqr(y)-x*y-0.2); double prec=1e-05; NumConstraint c(f,LEQ); CtcExist exist_y(c,y,IntervalVector(1,Interval(-10,10)),prec); CtcExist exist_x(c,x,IntervalVector(1,Interval(-10,10)),prec); IntervalVector box(1,Interval(-10,10)); RoundRobin rr(1e-03); CellStack stack; vector<IntervalVector> sols; double right_bound=+0.3872983346072957; Solver sx(exist_y,rr,stack); sx.start(box); sx.next(sols); // note: we use the fact that the solver always explores the right // branch first TEST_ASSERT(sols.back()[0].contains(right_bound)); sols.clear(); Solver sy(exist_x,rr,stack); sy.start(box); sy.next(sols); // note: we use the fact that the constraint is symmetric in x/y TEST_ASSERT(sols.back()[0].contains(right_bound));}
开发者ID:ClementAubry,项目名称:ibex-lib,代码行数:34,
示例11: directwormvoid directworm(struct wormy *worms, float addx, float addy, float param){ // test directionworm// change angle randomly within param as max deviationstatic float angle=1.0;xy acc;angle+=rr(param);acc.x= cosf(angle*(PI/180.0));acc.y= sinf(angle*(PI/180.0)); acc.x=acc.x*worms->speed; acc.y=acc.y*worms->speed; xy vel=worms->vel; vel.x+=acc.x; vel.y+=acc.y; limit(&vel,worms->maxspeed); worms->wloc.x+=vel.x; worms->wloc.y+=vel.y;// when hit boundary slowly change angle back or just reverse with larger deviationif (worms->wloc.x>worms->boundx || worms->wloc.x<addx ) angle=180.0-angle;//-180.0;if (worms->wloc.y>worms->boundy || worms->wloc.y<addy ) angle=360.0-angle;//-180.0;a // checkbound(&worms->wloc,worms->boundx,worms->boundy,addx,addy); // worms->acc=acc;// worms->vel=vel;}
开发者ID:microresearch,项目名称:WORM,代码行数:28,
示例12: mapScalevoid PathView::drawBackground(QPainter *painter, const QRectF &rect){ if ((_tracks.isEmpty() && _routes.isEmpty() && _waypoints.isEmpty()) || !_map) { painter->fillRect(rect, Qt::white); return; } qreal scale = mapScale(_zoom); QRectF rr(rect.topLeft() * scale, rect.size()); QPoint tile = mercator2tile(QPointF(rr.topLeft().x(), -rr.topLeft().y()), _zoom); QPointF tm = tile2mercator(tile, _zoom); QPoint tl = mapToScene(mapFromScene(QPointF(tm.x() / scale, -tm.y() / scale))).toPoint(); QList<Tile> tiles; for (int i = 0; i <= rr.size().width() / Tile::size() + 1; i++) { for (int j = 0; j <= rr.size().height() / Tile::size() + 1; j++) { tiles.append(Tile(QPoint(tile.x() + i, tile.y() + j), _zoom)); } } _map->loadTiles(tiles, _plot); for (int i = 0; i < tiles.count(); i++) { Tile &t = tiles[i]; QPoint tp(tl.x() + (t.xy().x() - tile.x()) * Tile::size(), tl.y() + (t.xy().y() - tile.y()) * Tile::size()); painter->drawPixmap(tp, t.pixmap()); }}
开发者ID:tumic0,项目名称:GPXSee,代码行数:32,
示例13: send_datavoid send_data( char dout ){ char i;#asm comf dout, F // invert the bits for sending#endasm RS232_out = LOW; // start bit delay1bit(); for ( i = 8; i > 0; i-- ) { dout = rr( dout ); RS232_out = Carry; delay1bit(); } RS232_out = HIGH; // stop bit delay1bit(); /*-----------------10/19/2001 12:51PM--------------- * ## WARNING ## without the nop() after the above * function call the code generated for the function * call was a GOTO and not a CALL. The return from * this function was also not generated. * --------------------------------------------------*/ nop();}
开发者ID:Team4550,项目名称:PIC_Code,代码行数:27,
示例14: childrenvoid QWidget::updateOverlappingChildren() const{ if ( overlapping_children != -1 || isSettingGeometry ) return; QRegion r; const QObjectList *c = children(); if ( c ) { QObjectListIt it(*c); QObject* ch; while ((ch=it.current())) { ++it; if ( ch->isWidgetType() && !((QWidget*)ch)->isTopLevel() ) { QWidget *w = (QWidget *)ch; if ( w->isVisible() ) { QRegion rr( w->req_region ); QRegion ir = r & rr; if ( !ir.isEmpty() ) { overlapping_children = 1; return; } r |= rr; } } } } overlapping_children = 0;}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:28,
示例15: caret_size// InvalidateRange is an overrideable function that is used to invalidate the view// between two caret positions. This is used to invalidate bits of the window// when the selection is changed (using mouse selection or with SetSel()).// The default behaviour invalidates the lines (whole width of document) from// the top of start to the bottom of end (using the current character height).void CScrView::InvalidateRange(CPointAp start, CPointAp end, bool f /*=false*/){ if (start.y > scrollpos_.y + win_height_ || start.x > scrollpos_.x + win_width_ || end.y < scrollpos_.y || end.x < scrollpos_.x) { // All outside display area so do nothing. Note that this may appear to not be nec. // as Windows does this too but due to overflow problems is safer to do it here. return; } CSizeAp ss = caret_size(); // Also invalidate a row above and up to 3 rows below (this is necessary for stacked mode) start.y -= ss.cy; end.y += 3*ss.cy; if (start.x < scrollpos_.x) start.x = scrollpos_.x; if (start.y < scrollpos_.y) start.y = scrollpos_.y; if (end.y > scrollpos_.y + win_height_) end.y = scrollpos_.y + win_height_; // Invalidate the full width of display from top of start to bottom of end CRectAp rr(0, start.y, total_.cx, end.y); // Convert to device coords CRect norm_rect = ConvertToDP(rr); CRect cli; GetDisplayRect(&cli); // Invalidate the previous selection so that it is drawn unselected CRect rct; if (rct.IntersectRect(&cli, &norm_rect)) DoInvalidateRect(&norm_rect);}
开发者ID:KB3NZQ,项目名称:hexedit4,代码行数:40,
示例16: RealToRatioTInt RealToRatio(SRatio& aRatio, const TRealX& aReal) { aRatio.iSpare1 = 0; aRatio.iSpare2 = 0; if (aReal.iSign || aReal.IsZero() || aReal.IsNaN()) { aRatio.iM = 0; aRatio.iX = 0; return (aReal.IsZero()) ? KErrNone : KErrNotSupported; } TRealX rx(aReal); TRealX rr(rx); rr.iExp -= 32; rr.iMantLo = 0; rr.iMantHi = 0x80000000u; rx += rr; // rounding TInt exp = rx.iExp - 32767 - 31; if (exp < -32768) { aRatio.iM = 0; aRatio.iX = 0; return KErrUnderflow; } if (exp > 32767) { aRatio.iM = 0xffffffffu; aRatio.iX = 32767; return KErrOverflow; } aRatio.iM = rx.iMantHi; aRatio.iX = (TInt16)exp; return KErrNone; }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:33,
示例17: rrColor<real> BlinnPhongShader<real>::GetReflection(){ //////////////////////////////////////////// //////////////////IFT 3355////////////////// //////////////////////////////////////////// //Ici, vous calculerez le rayon réfléchi //par la surface. //Vous calculerez ensuite la nouvelle //contribution en le pondérant par la couleur //de réflexion du matériau //hint : //CastShadingRay() //////////////////////////////////////////// //////////////////IFT 3355////////////////// //////////////////////////////////////////// // No contribution => black if (mRecursionDepth != 0) { Vector3<real> r = (mIntersection.GetNormal() * -1 * mRay.GetDirection()) * 2.0 * mIntersection.GetNormal() + mRay.GetDirection(); Ray<real> rr(mIntersection.GetPosition() + EPS*mIntersection.GetNormal(), r); Color<real> reflectedColor = mRayTracer.CastShadingRay(rr, mRecursionDepth - 1); return reflectedColor * mMaterial.GetReflection(); } else { return Color<real>( 0, 0, 0, 1 ); }}
开发者ID:gnuvince,项目名称:ift3355-tp2,代码行数:28,
示例18: posvoid positions::step(double distance, int axis, int Particle){ pos(axis,Particle)+=distance; // update r r[Particle]=norm(pos.col(Particle),2); // update rr for (int j=0;j<Particle;j++) { rr(Particle-1,j)=norm(pos.col(Particle)-pos.col(j),2); } for (int i=Particle+1; i<nParticles;i++) { rr(i-1,Particle) = norm(pos.col(Particle)-pos.col(i),2); }}
开发者ID:AndreasLeonhardt,项目名称:Proj1,代码行数:16,
示例19: b1void TrillSegment::layout() { QRectF b1(symbols[score()->symIdx()][trillSym].bbox(magS())); QRectF rr(b1.translated(-b1.x(), 0.0)); rr |= QRectF(0.0, rr.y(), pos2().x(), rr.height()); setbbox(rr); }
开发者ID:Archer90,项目名称:MuseScore,代码行数:7,
示例20: svoid NR::mpdiv(Vec_O_UCHR &q, Vec_O_UCHR &r, Vec_I_UCHR &u, Vec_I_UCHR &v){ const int MACC=1; int i,is,mm; int n=u.size(); int m=v.size(); int p=r.size(); int n_min=MIN(m,p); if (m > n) nrerror("Divisor longer than dividend in mpdiv"); mm=m+MACC; Vec_UCHR s(mm),rr(mm),ss(mm+1),qq(n-m+1),t(n); mpinv(s,v); mpmul(rr,s,u); mpsad(ss,rr,1); mplsh(ss); mplsh(ss); mpmov(qq,ss); mpmov(q,qq); mpmul(t,qq,v); mplsh(t); mpsub(is,t,u,t); if (is != 0) nrerror("MACC too small in mpdiv"); for (i=0;i<n_min;i++) r[i]=t[i+n-m]; if (p>m) for (i=m;i<p;i++) r[i]=0;}
开发者ID:1040003585,项目名称:LearnedCandCPP,代码行数:27,
示例21: lib_hackbool lib_hack(Conjunct *c, DNF * d, Rel_Body * rb) { bool result=0; if (WANT_SEGM_FAULT) {// relation constructors Relation r(0,0); Relation rc(r,c); Relation rbi(*rb,1); Relation r0; Relation rr(r);// input/output variable functions r.n_inp(); r.n_out(); r.n_set(); r.input_var(1); r.output_var(1); r.set_var(1);//other functions rr=r; result = r.is_upper_bound_satisfiable(); d->prefix_print(NULL); } return result;}
开发者ID:ksluckow,项目名称:the-omega-project,代码行数:25,
示例22: mainvoid main(){ clrscr(); cout << "Enter the Number of Process : "; cin >> n; cout << "/n/n1) FCFS 2) SJF 3) SRTF 4) RR/n/n"; cout << "Enter Your Choice : "; cin >> choice; cout << "/n"; int i; for(i=0;i<n;i++) { cout << "Arrival Time & Service Time for Process " << i+1 << " : "; tab[i][0]=i+1; cin >> tab[i][1]; cin >> tab[i][2]; } ttt=totaltime(); switch(choice) { case '1': fcfs();break; case '2': sjf();break; case '3': srtf();break; case '4': rr();break; default : exit(0); }}
开发者ID:shreyas29,项目名称:CPlusPlus,代码行数:30,
示例23: bindSimulatorstatic auto bindSimulator(EAlgorithms algorithm){ switch (algorithm) { case EAlgorithms::FCFS: { AlgorithmSimulator fcfs(std::bind(&Algorithms::FCFS, std::placeholders::_1, std::placeholders::_2)); return fcfs; } case EAlgorithms::RR: { AlgorithmSimulator rr(std::bind(&Algorithms::RR, std::placeholders::_1, std::placeholders::_2)); return rr; } case EAlgorithms::PQ: { AlgorithmSimulator pq(std::bind(&Algorithms::PriorityQueue, std::placeholders::_1, std::placeholders::_2)); return pq; } case EAlgorithms::SJK: { AlgorithmSimulator sjk(std::bind(&Algorithms::SJK, std::placeholders::_1, std::placeholders::_2)); return sjk; } default: throw std::logic_error("Invalid algorithm..."); }}
开发者ID:paraka,项目名称:process_scheduler,代码行数:28,
示例24: WWindowWEXPORT WControl::WControl( WWindow* parent, char* classname, const WRect& r, char* text, WStyle wstyle ) : WWindow( parent, classname, r, text, wstyle|WS_CHILD ){ WRect rr( r ); if( rr.w() == 0 ) rr.w( 150 ); if( rr.h() == 0 ) rr.h( 24 ); move( rr );}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:8,
示例25: oldRouteReplyRouteRequest* ParserRouteHandler::redoRoute(const RouteID& oldRouteID, const RouteRequestParams& rrParams, const RequestUserData& user, const TopRegionRequest* topReq, const DisturbanceList* disturbances){ //find the origin and destination of the old route //the old route reply auto_ptr<RouteReplyPacket> oldRouteReply( m_thread->getStoredRoute( oldRouteID ) ); if ( oldRouteReply.get() == NULL ) { return NULL; } //we need a DriverPref to decode the routereplypacket contents DriverPref driverPref; //the vector of subroutes is extracted auto_ptr<SubRouteVector> oldRouteVector( oldRouteReply->createSubRouteVector(&driverPref) ); //we need the first... SubRoute* firstSub = oldRouteVector->getSubRouteAt(0); //...and last subroute. SubRoute* lastSub = oldRouteVector->getSubRouteAt( oldRouteVector->getSize() - 1); //the origin parameters uint32 originMap = firstSub->getThisMapID(); uint32 originNode = firstSub->getOrigNodeID(); uint16 originOffset = oldRouteVector->getStartOffsetUint16(); //unfortunately not possible to use right now. //bool startDirFromZero = oldRouteVector->getStartDirFromZero(); //the destination parameters uint32 destMap = lastSub->getThisMapID(); uint32 destNode = lastSub->getDestNodeID(); uint16 destOffset = oldRouteVector->getEndOffsetUint16(); //create the routerequest auto_ptr<RouteRequest> rr( rrParams.createRouteRequest( user, m_thread->getNextRequestID(), topReq, disturbances ) ); rr->addOriginID( originMap, originNode, originOffset ); rr->addDestinationID( destMap, destNode, destOffset ); m_thread->putRequest( rr.get() ); if ( rr->getStatus() != StringTable::OK ) { delete rr->getAnswer(); rr.reset(NULL); //delete the object the auto_ptr holds. } return rr.release(); //release the object and return the held pointer}
开发者ID:FlavioFalcao,项目名称:Wayfinder-Server,代码行数:58,
示例26: rectTLFRect* TLFAverageNNPredictor::Predict(ILFDetectEngine* engine){ if (this->m_list.GetCount() == 0) return NULL; if (engine == NULL) return NULL; if (m_pPredicted != NULL) { delete m_pPredicted; m_pPredicted = NULL; } ILFObjectDetector* detector = NULL; detector = engine->GetDetector(0); if (detector == NULL) return NULL; ILFScanner* scanner = detector->GetScanner(); if (scanner == NULL) return NULL; TLFRect rect(m_rect); double min_err = FLT_MAX; awpRect result; for (int i = 0; i < scanner->GetFragmentsCount(); i++) { TLFBounds* b = scanner->GetFragment(i); TLFRect rr(b->Rect); if (rect.RectOverlap(rr) > 0.3) { TLFDblVector* d = this->Features(engine, &rr, 0); if (d != NULL) { double e; if (this->Classify(d, &e)) { if (e < min_err) { min_err = e; result = b->Rect; } } delete d; } } } if (min_err < 1) { TLFRect* r_result = new TLFRect(result); m_pPredicted = r_result; return r_result; } else return NULL;}
开发者ID:telnykha,项目名称:VideoA,代码行数:57,
示例27: rvoid positions::set_singlePos(vec NewPosition, int particleNumber){ // write new particle position pos.col(particleNumber)=NewPosition; // update r r(particleNumber)=norm(pos.col(particleNumber),2); // update rr for (int j=0;j<particleNumber;j++) { rr(particleNumber-1,j)=norm(pos.col(particleNumber)-pos.col(j),2); } for (int i=particleNumber+1; i<nParticles;i++) { rr(i-1,particleNumber) = norm(pos.col(particleNumber)-pos.col(i),2); }}
开发者ID:AndreasLeonhardt,项目名称:Proj1,代码行数:18,
示例28: b1void TrillSegment::layout() { QRectF b1(symbols[score()->symIdx()][trillSym].bbox(magS())); QRectF rr(b1.translated(-b1.x(), 0.0)); rr |= QRectF(0.0, rr.y(), pos2().x(), rr.height()); setbbox(rr); rypos() += score()->styleS(ST_trillY).val() * spatium(); adjustReadPos(); }
开发者ID:aiena,项目名称:MuseScore,代码行数:9,
示例29: recstring rec(shared_ptr < Node > v, map < string, string > q) { //cerr << genAns(v) << endl; if (v->isVar()) { //int id; //db(q.size()); //for (auto x: q) //db2(x.fr, x.sc); //db(v->type); assert(q.count(v->type) == 1); return q[v->type]; } //db(v->type); if (v->isAbstr()) { string s = v->l->type; string vv = "t" + myToString(cur++); q[s] = vv; } string l = rec(v->l, q); string r = rec(v->r, q); string myId = "t" + myToString(cur++); varId[myId] = genAns(v); //cerr << "l r myId: " << l << " " << r << " " << myId << endl; if (v->type == "APPLY") { shared_ptr < TNode > ll(new TNode(l)); shared_ptr < TNode > rr(new TNode(r)); shared_ptr < TNode > me(new TNode(myId)); shared_ptr < TNode > res(new TNode("a", {rr, me})); G.pb(mp(ll, res)); return myId; } if (v->type == "ABSTR") { shared_ptr < TNode > ll(new TNode(l)); shared_ptr < TNode > rr(new TNode(r)); shared_ptr < TNode > res(new TNode("a", {ll, rr})); shared_ptr < TNode > me(new TNode(myId)); G.pb(mp(me, res)); return myId; } assert(false);}
开发者ID:Belonogov95,项目名称:TypeTheoryHW,代码行数:44,
注:本文中的rr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ rr3_ftr函数代码示例 C++ rq_set_fifo_time函数代码示例 |