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

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

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

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

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

示例1: frontSector

/* MapLine::needsTexture * Returns a flag set of any parts of the line that require a texture *******************************************************************/int MapLine::needsTexture(){	// Check line is valid	if (!frontSector())		return 0;	// If line is 1-sided, it only needs front middle	if (!backSector())		return TEX_FRONT_MIDDLE;	// Get sector planes	plane_t floor_front = frontSector()->getFloorPlane();	plane_t ceiling_front = frontSector()->getCeilingPlane();	plane_t floor_back = backSector()->getFloorPlane();	plane_t ceiling_back = backSector()->getCeilingPlane();	double front_height, back_height;	int tex = 0;	// Check the floor	front_height = floor_front.height_at(x1(), y1());	back_height = floor_back.height_at(x1(), y1());	if (front_height - back_height > EPSILON)		tex |= TEX_BACK_LOWER;	if (back_height - front_height > EPSILON)		tex |= TEX_FRONT_LOWER;	front_height = floor_front.height_at(x2(), y2());	back_height = floor_back.height_at(x2(), y2());	if (front_height - back_height > EPSILON)		tex |= TEX_BACK_LOWER;	if (back_height - front_height > EPSILON)		tex |= TEX_FRONT_LOWER;	// Check the ceiling	front_height = ceiling_front.height_at(x1(), y1());	back_height = ceiling_back.height_at(x1(), y1());	if (back_height - front_height > EPSILON)		tex |= TEX_BACK_UPPER;	if (front_height - back_height > EPSILON)		tex |= TEX_FRONT_UPPER;	front_height = ceiling_front.height_at(x2(), y2());	back_height = ceiling_back.height_at(x2(), y2());	if (back_height - front_height > EPSILON)		tex |= TEX_BACK_UPPER;	if (front_height - back_height > EPSILON)		tex |= TEX_FRONT_UPPER;	return tex;}
开发者ID:Manuel-K,项目名称:SLADE,代码行数:59,


示例2: set_range

void Quad::set_range(double nx1, double nx2, double ny1, double ny2){	*x1() = nx1;	*x2() = nx2;	*y1() = ny1;	*y2() = ny2;	*x_mid() = ( *x1() + *x2() )*0.5f;	*y_mid() = ( *y1() + *y2() )*0.5f;}
开发者ID:StephenThomasUWTSD,项目名称:codesamples,代码行数:10,


示例3: getBorder

inline cv::Rect getBorder(const cv::Rect_<t > &original, cv::Rect_<t > & limited){    cv::Rect_<t > res;    res.x = limited.x - original.x;    res.y = limited.y - original.y;    res.width = x2(original) - x2(limited);    res.height = y2(original) - y2(limited);    assert(res.x >= 0 && res.y >= 0 && res.width >= 0 && res.height >= 0);    return res;}
开发者ID:39M,项目名称:Matrice100,代码行数:10,


示例4: return

bool SimpleRegion::intersects(SimpleRegion obstacle) {  return (    (      (x1() <= obstacle.x1() && obstacle.x1() <= x2())      ||      (x1() <= obstacle.x2() && obstacle.x2() <= x2())    )    &&    (      (y1() <= obstacle.y1() && obstacle.y1() <= y2())      ||      (y1() <= obstacle.y2() && obstacle.y2() <= y2())    )  );}
开发者ID:neiderm,项目名称:pandorapanic,代码行数:15,


示例5: Quad

void Quad::split(){	if(is_split())		return;	quads[0][0] = new Quad(V);	quads[0][1] = new Quad(V);	quads[1][0] = new Quad(V);	quads[1][1] = new Quad(V);		quads[0][0]->set_range( *x1(), *x_mid(), *y1(), *y_mid() );	quads[0][1]->set_range( *x_mid(), *x2(), *y1(), *y_mid() );	quads[1][0]->set_range( *x1(), *x_mid(), *y_mid(), *y2() );	quads[1][1]->set_range( *x_mid(), *x2(), *y_mid(), *y2() );}
开发者ID:StephenThomasUWTSD,项目名称:codesamples,代码行数:15,


示例6: Terrain

void Terrain::split(){	if(is_split())		return;	quads[0][0] = new Terrain(V);	quads[0][1] = new Terrain(V);	quads[1][0] = new Terrain(V);	quads[1][1] = new Terrain(V);	quads[0][0]->set_range(*x1(), *x_mid(), *y1(), *y_mid());	quads[0][1]->set_range(*x_mid(), *x2(), *y1(), *y_mid());	quads[1][0]->set_range(*x1(), *x_mid(), *y_mid(), *y2());	quads[1][1]->set_range(*x_mid(), *x2(), *y_mid(), *y2());}
开发者ID:StephenThomasUWTSD,项目名称:codesamples,代码行数:15,


示例7: function

/** * returns the spherical Bessel function of the second kind * needed for continuum states /param l = order of the function (orbital angular momentum) /param rho = independent variable (rho = k * r) */double sphericalB::y(int l, double rho){  switch (l)    {    case 0:      return y0(rho);    case 1:      return y1(rho);    case 2:       return y2(rho);    case 3:       return y3(rho);    case 4:      return y4(rho);    case 5:      return y5(rho);    case 6:      return y6(rho);    case 7:      return y7(rho);    default:      cout << "no l>6 programed in sphericalB" << endl;      return 0.;    }}
开发者ID:BAS215,项目名称:dom_clean,代码行数:31,


示例8: InterpolateCubicSplineFromCurvePoints

	// Interpolation of natural splines	static CubicSpline InterpolateCubicSplineFromCurvePoints(const CurvePoints& curve)	{		std::vector<float> y2(curve.size()); // second derivatives		std::vector<float> u(curve.size());		y2[0] = 0;		for (size_t i = 1; i < curve.size() - 1; ++i)		{			float sig = (curve[i].first - curve[i - 1].first) / (curve[i + 1].first - curve[i - 1].first);			float p = sig * y2[i - 1] + 2.0f;			y2[i] = (sig - 1.0f) / p;			u[i] = (curve[i+1].second - curve[i].second)/(curve[i+1].first - curve[i].first) - (curve[i].second - curve[i-1].second)/(curve[i].first - curve[i-1].first);			u[i] = (6.0f * u[i] / (curve[i+1].first - curve[i-1].first) - sig*u[i-1]) / p;		}		y2[curve.size() - 1] = 0;		for (int i = (int)curve.size() - 2; i >= 0; --i)		{			y2[i] = y2[i] * y2[i + 1] + u[i];		}		CubicSpline spline(curve, std::move(y2));		return spline;	}
开发者ID:UIKit0,项目名称:ACV-to-LUT-convertor,代码行数:27,


示例9: J

std::vector< std::vector<Real> > ElectroIonicModel::getJac (const std::vector<Real>& v, Real h){    std::vector< std::vector<Real> > J ( M_numberOfEquations, std::vector<Real> (M_numberOfEquations, 0.0) );    std::vector<Real> f1 (M_numberOfEquations, 0.0);    std::vector<Real> f2 (M_numberOfEquations, 0.0);    std::vector<Real> y1 (M_numberOfEquations, 0.0);    std::vector<Real> y2 (M_numberOfEquations, 0.0);    for (int i = 0; i < M_numberOfEquations; i++)    {        for (int j = 0; j < M_numberOfEquations; j++)        {            y1[j] = v[j] + ( (double) (i == j) ) * h;            y2[j] = v[j] - ( (double) (i == j) ) * h;        }        this->computeRhs (y1, f1);        f1[0] += M_appliedCurrent;        this->computeRhs (y2, f2);        f2[0] += M_appliedCurrent;        for (int j = 0; j < M_numberOfEquations; j++)        {            J[j][i] = (f1[j] - f2[j]) / (2.0 * h);        }    }    return J;}
开发者ID:Danniel-UCAS,项目名称:lifev,代码行数:28,


示例10: s

void StringTest::testCompareShort(){    cxxtools::String s(L"abcd");    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abcd")            , 0);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abc")             , 1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abcxyz")          , -1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abd")             , -1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abb")             , 1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("ab")              , 1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abcd", 4)         , 0);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abcxyz", 3)       , 1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abcxyz", 4)       , -1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abd", 3)          , -1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("abb", 3)          , 1);    CXXTOOLS_UNIT_ASSERT_EQUALS(s.compare("ab", 2)           , 1);    cxxtools::String x1(L"abc");    CXXTOOLS_UNIT_ASSERT(x1 == "abc");    cxxtools::String y1(L"");    cxxtools::String y2("");    CXXTOOLS_UNIT_ASSERT(y1 == y2);    CXXTOOLS_UNIT_ASSERT(y1 == "");    CXXTOOLS_UNIT_ASSERT(y2 == "");}
开发者ID:acklinr,项目名称:cxxtools,代码行数:27,


示例11:

voidCompOutput::setWorkArea (const CompRect &workarea){    mWorkArea = workarea;    if (workarea.x ()  < static_cast <int> (x1 ()))	mWorkArea.setX (x1 ());    if (workarea.y ()  < static_cast <int> (y1 ()))	mWorkArea.setY (y1 ());    if (workarea.x2 () > static_cast <int> (x2 ()))	mWorkArea.setWidth (x2 ()  - mWorkArea.x ());    if (workarea.y2 () > static_cast <int> (y2 ()))	mWorkArea.setHeight (y2 () - mWorkArea.y ());}
开发者ID:Jubei-Mitsuyoshi,项目名称:aaa-compiz,代码行数:17,


示例12: foo

  void foo(const pair &x, const pair2 &x2) {    pair y(x);    pair2 y2(x2);    pair2 y2m(static_cast<pair2&&>(y2));    y2 = x2;    y2m = static_cast<pair2&&>(y2);  }
开发者ID:FrOSt-Foundation,项目名称:clang,代码行数:8,


示例13:

voidCompOutput::setWorkArea (const CompRect& workarea){    mWorkArea = workarea;    if (workarea.x () < (int) x1 ())	mWorkArea.setX (x1 ());    if (workarea.y () < (int) y1 ())	mWorkArea.setY (y1 ());    if (workarea.x2 () > (int) x2 ())	mWorkArea.setWidth (x2 () - mWorkArea.x ());    if (workarea.y2 () > (int) y2 ())	mWorkArea.setHeight (y2 () - mWorkArea.y ());}
开发者ID:squarehimself,项目名称:XMoniz,代码行数:17,


示例14: test_rat2

void test_rat2( void ){    NUPrecRational x1(10.0), y1(10.0), x2(20.0), y2(20.0), y(15.0), c;    double n,d;    c = x1 + (y-y1)*(x2-x1)/(y2-y1);    c.Dump(&n,&d);    printf( "%f/%f/n", n, d );}
开发者ID:deepmatrix,项目名称:blaxxun-cc3d,代码行数:9,


示例15: line2

line2 line2::interpolate(line2 const& l, double fraction) const{	return line2(		denormalize(fraction, x1(), l.x1()),		denormalize(fraction, y1(), l.y1()),		denormalize(fraction, x2(), l.x2()),		denormalize(fraction, y2(), l.y2())	);}
开发者ID:arciem,项目名称:LibArciem,代码行数:9,


示例16: GECODE_ES_CHECK

 ExecStatus MultPlusDom<VA,VB,VC>::propagate(Space& home, const ModEventDelta& med) {   if (VA::me(med) != ME_INT_DOM) {     GECODE_ES_CHECK((prop_mult_plus_bnd<VA,VB,VC>(home,*this,x0,x1,x2)));     return home.ES_FIX_PARTIAL(*this,VA::med(ME_INT_DOM));   }   IntView y0(x0.varimp()), y1(x1.varimp()), y2(x2.varimp());   return prop_mult_dom<IntView>(home,*this,y0,y1,y2); }
开发者ID:Wushaowei001,项目名称:gecode-clone,代码行数:9,


示例17: write

variant rect::write() const{	std::vector<variant> v;	v.reserve(4);	v.push_back(variant(x()));	v.push_back(variant(y()));	v.push_back(variant(x2()-1));	v.push_back(variant(y2()-1));	return variant(&v);}
开发者ID:AsKorysti,项目名称:anura,代码行数:10,


示例18: spline

dvector spline(const dvector &_x,const dvector&_y,double yp1,double ypn){  dvector& x=(dvector&) _x;  dvector& y=(dvector&) _y;  int orig_min=x.indexmin();  x.shift(1);  y.shift(1);  // need to check that x is monotone increasing;  if  ( x.indexmax() != y.indexmax() )  {    cerr << " Incompatible bounds in input to spline" << endl;  }  int n=x.indexmax();  dvector y2(1,n);  int i,k;  double  p,qn,sig,un;  dvector u(1,n-1);  if (yp1 > 0.99e30)  {    y2[1]=u[1]=0.0;  }  else  {    y2[1] = -0.5;    u[1]=(3.0/(x[2]-x[1]))*((y[2]-y[1])/(x[2]-x[1])-yp1);  }  for (i=2;i<=n-1;i++)  {    sig=(x[i]-x[i-1])/(x[i+1]-x[i-1]);    p=sig*y2[i-1]+2.0;    y2[i]=(sig-1.0)/p;    u[i]=(y[i+1]-y[i])/(x[i+1]-x[i]) - (y[i]-y[i-1])/(x[i]-x[i-1]);    u[i]=(6.0*u[i]/(x[i+1]-x[i-1])-sig*u[i-1])/p;  }  if (ypn > 0.99e30)  {    qn=un=0.0;  }  else  {    qn=0.5;    un=(3.0/(x[n]-x[n-1]))*(ypn-(y[n]-y[n-1])/(x[n]-x[n-1]));  }  y2[n]=(un-qn*u[n-1])/(qn*y2[n-1]+1.0);  for (k=n-1;k>=1;k--)  {    y2[k]=y2[k]*y2[k+1]+u[k];  }  x.shift(orig_min);  y.shift(orig_min);  y2.shift(orig_min);  return y2;}
开发者ID:colemonnahan,项目名称:admb,代码行数:54,


示例19: y2

void TestMatrixExtras::test_mult_Hv() {    size_t n = 10;    Matrix x = MatrixFactory::MakeRandomMatrix(n, 1, 0.0, 1.0);    Matrix A = MatrixFactory::MakeRandomMatrix(n, n, 0.0, 1.0, Matrix::MATRIX_SYMMETRIC);    Matrix y = A*x;    Matrix y2(n, 1);    Matrix::mult(y2, 1.0, A, x, 0.0);    _ASSERT_EQ(y2, y);}
开发者ID:kul-forbes,项目名称:libForBES,代码行数:11,


示例20: abs_round

voidscrollable_widget_rep::scroll_event_hor (SI& x, SI& bef, SI& af) {  abs_round (x);  if ((x + x1() - ox) < ex1) x = ex1 - x1() + ox;  if ((x + x2() - ox) > ex2) x = ex2 - x2() + ox;  if (attached ()) {    int dx= max (-w, min (w, x- scx));    if ((dx>-w) && (dx<w) && (dx!=0)) {      win->translate (x1(), y1(), x2(), y2(), -dx, 0);    }    if (dx>0) this << emit_invalidate (x2()-ox-dx, y1()-oy, x2()-ox, y2()-oy);    if (dx<0) this << emit_invalidate (x1()-ox, y1()-oy, x1()-ox-dx, y2()-oy);  }  scx      = x;  bef      = ox- x1();  af       = x2()- ox;  a[0]->ox = ox- scx;}
开发者ID:svn2github,项目名称:texmacs,代码行数:20,


示例21: generate_tape

 CppAD::ADFun<Base>* generate_tape(Func f, vector<double> x_){   std::cout << "Generating tape/n";   int n=x_.size();   vector<AD<Base> > x(n);   for(int i=0;i<n;i++)x[i]=AD<Base>(x_[i]);   CppAD::Independent(x);   vector<AD<Base> > y=f(x);   vector<AD<Base> > y2(y.size());   for(int i=0;i<y.size();i++)y2[i]=y[i];   CppAD::ADFun<Base>* padf=new CppAD::ADFun<Base>(x,y2);   return padf; }
开发者ID:John-R-Wallace,项目名称:adcomp,代码行数:12,


示例22: main

int main()   {  // Note that if class X does not define a constructor then ther is no constructor initializer   // (SgConstructorInitializer) built in the AST.     X<int> x1;     Y<int> functionPrototype();     Y<int> y1;     Y<int> y2(1);     return 0;   }
开发者ID:Federico2014,项目名称:edg4x-rose,代码行数:12,


示例23: DrawPolrec

/*! /file /brief To display non Fary drawings */void DrawPolrec(QPainter *p,pigalePaint *paint)  {TopologicalGraph G(paint->GCP);  Prop1<tstring> title(G.Set(),PROP_TITRE);  Prop1<Tpoint> pmin(G.Set(),PROP_POINT_MIN);  Prop<Tpoint> p1(G.Set(tvertex()),PROP_DRAW_POINT_1);  Prop<Tpoint> p2(G.Set(tvertex()),PROP_DRAW_POINT_2);  Prop<double> x1(G.Set(tedge()),PROP_DRAW_DBLE_1 );  Prop<double> x2(G.Set(tedge()),PROP_DRAW_DBLE_2 );  Prop<double> y1(G.Set(tedge()),PROP_DRAW_DBLE_3 );  Prop<double> y2(G.Set(tedge()),PROP_DRAW_DBLE_4);  Prop<double> y(G.Set(tedge()),PROP_DRAW_DBLE_5);  Prop<short> ecolor(G.Set(tedge()),PROP_COLOR);  Prop<short> vcolor(G.Set(tvertex()),PROP_COLOR);  Prop<bool> isTree(G.Set(tedge()),PROP_ISTREE);   Prop<int> elabel(G.Set(tedge()),PROP_LABEL);   Prop<int> ewidth(G.Set(tedge()),PROP_WIDTH);  bool drawTextEdges = (G.ne() < 100);  QString stitle(~title());  if(drawTextEdges)paint->DrawText(p,pmin().x(),pmin().y(),stitle);    // draw vertices  for(tvertex v = 1;v <= G.nv();v++)      {double dx = (p2[v].x() - p1[v].x()) ;         double x = p1[v].x() ;           double y = p1[v].y();       paint->DrawText(p,x,y, dx,1.,v,vcolor[v]);      }  // draw edges  Tpoint e1,e2,e3,e4;   for(tedge e = 1;e <= G.ne();e++)       {if(isTree[e])           {e1 = Tpoint(x1[e],y1[e]);           e2 = Tpoint(x1[e],y2[e]);           paint->DrawSeg(p,e1,e2,ecolor[e],ewidth[e]);           }       else // cotree edges   (x1,y1) -> (x1,y) -> (x2,y) -> (x2,y2)           {e1 = Tpoint(x1[e],y1[e]);           e2 = Tpoint(x1[e],y[e]);           e3 = Tpoint(x2[e],y[e]);           e4 = Tpoint(x2[e],y2[e]);           paint->DrawSeg(p,e1,e2,ecolor[e],ewidth[e]);           paint->DrawSeg(p,e2,e3,ecolor[e],ewidth[e]);           paint->DrawSeg(p,e3,e4,ecolor[e],ewidth[e]);           if(drawTextEdges)               {QString label=QString("%1").arg(elabel[e]);               // text is drawn at  position of lower edge occu               paint->DrawText(p,x1[e],y[e],label);               }           }       }  }
开发者ID:beauby,项目名称:pigale,代码行数:55,


示例24: Redistribute

// ======================================================================MultiVector Redistribute(const MultiVector& y, const int NumEquations){  StackPush();  if (y.GetMyLength() % NumEquations)    ML_THROW("NumEquations does not divide MyLength()", -1);  if (y.GetNumVectors() != 1)    ML_THROW("Redistribute() works with single vectors only", -1);  Space NewSpace(y.GetMyLength() / NumEquations);  MultiVector y2(NewSpace, NumEquations);  for (int i = 0 ; i < y2.GetMyLength() ; ++i)    for (int j = 0 ; j < NumEquations ; ++j)      y2(i, j) = y(j + NumEquations * i);  StackPop();  return(y2);}
开发者ID:00liujj,项目名称:trilinos,代码行数:23,


示例25: f

void TestExprDiff::apply_mul01() {	Variable x,y;	Function f(x,y,x,"f");	Variable x3,y3;	Function g(x3,y3,y3,"g");	Variable x2("x"),y2("y");	Function h(x2,y2,f(x2,y2)*g(x2,y2));	Function dh(h,Function::DIFF);	CPPUNIT_ASSERT(sameExpr(dh.expr(),"(y,x)"));//	CPPUNIT_ASSERT(sameExpr(dh.expr(),"(((df(x,y)[0]*g(x,y))+(dg(x,y)[0]*f(x,y))),((df(x,y)[1]*g(x,y))+(dg(x,y)[1]*f(x,y))))"));}
开发者ID:SimonRohou,项目名称:ibex-lib,代码行数:14,


示例26: runOperatorTests

int runOperatorTests(Epetra_Operator & A, bool verbose) {  int ierr = 0;  double residual;  EPETRA_CHK_ERR(EpetraExt::OperatorToMatrixMarketFile("Test_A1.mm", A, "Official EpetraExt test operator", 							"This is the official EpetraExt test operator generated by the EpetraExt regression tests"));  EPETRA_CHK_ERR(EpetraExt::OperatorToMatlabFile("Test_A1.dat", A));  A.OperatorRangeMap().Comm().Barrier();  A.OperatorRangeMap().Comm().Barrier();  Epetra_CrsMatrix * A1;   Epetra_CrsMatrix * A2;   EPETRA_CHK_ERR(EpetraExt::MatrixMarketFileToCrsMatrix("Test_A1.mm", A.OperatorRangeMap(), A1));  EPETRA_CHK_ERR(EpetraExt::MatlabFileToCrsMatrix("Test_A1.dat", A.OperatorRangeMap().Comm(), A2));  residual = A.NormInf(); double rAInf = residual;  if (verbose) std::cout << "Inf Norm of Operator A                                            = " << residual << std::endl;  residual = A1->NormInf(); double rA1Inf = residual;  if (verbose) std::cout << "Inf Norm of Matrix A1                                             = " << residual << std::endl;  ierr += checkValues(rA1Inf,rAInf,"Inf Norm of A", verbose);  Epetra_Vector x(A.OperatorDomainMap()); x.Random();  Epetra_Vector y1(A.OperatorRangeMap());  Epetra_Vector y2(A.OperatorRangeMap());  Epetra_Vector y3(A.OperatorRangeMap());  A.Apply(x,y1);  A1->Multiply(false, x, y2);  A2->Multiply(false, x, y3);  y1.Norm2(&residual); double rAx1 = residual;  if (verbose) std::cout << "Norm of A*x                                                       = " << residual << std::endl;  y2.Norm2(&residual); double rAx2 = residual;  if (verbose) std::cout << "Norm of A1*x                                                      = " << residual << std::endl;  ierr += checkValues(rAx1,rAx2,"Norm of A1*x", verbose);  y3.Norm2(&residual); double rAx3 = residual;  if (verbose) std::cout << "Norm of A2*x                                                      = " << residual << std::endl;  ierr += checkValues(rAx1,rAx3,"Norm of A2*x", verbose);  delete A1;  delete A2;  return(ierr);}
开发者ID:00liujj,项目名称:trilinos,代码行数:49,


示例27: mypnorm

extern "C" SEXP mypnorm(SEXP xx) {  Rcpp::NumericVector x(xx);  int n = x.size();  Rcpp::NumericVector y1(n), y2(n), y3(n);    for (int i=0; i<n; i++) {    y1[i] = ::Rf_pnorm5(x[i], 0.0, 1.0, 1, 0);    y2[i] = R::pnorm(x[i], 0.0, 1.0, 1, 0);  }  y3 = Rcpp::pnorm(x);    return Rcpp::DataFrame::create(Rcpp::Named("Rf_") = y1,                                 Rcpp::Named("R") = y2,                                 Rcpp::Named("sugar") = y3);}
开发者ID:wenyupurdue,项目名称:RcppBook,代码行数:15,


示例28: QMainWindow

MainWindow::MainWindow(QWidget *parent) :    QMainWindow(parent),    ui(new Ui::MainWindow){    ui->setupUi(this);    ui->graphicsView->setScene(&scene);    QPoint x1(0,100);    QPoint x2(0,-100);    QLine x(x1,x2);    scene.addLine(x);    QPoint y1(100,0);    QPoint y2(-100,0);    QLine y(y1,y2);    scene.addLine(y);}
开发者ID:Kenny11CZ,项目名称:Cpp_Skola,代码行数:15,


示例29: mid

/* MapLine::dirTabPoint * Calculates and returns the end point of the 'direction tab' for * the line (used as a front side indicator for 2d map display) *******************************************************************/fpoint2_t MapLine::dirTabPoint(double tablen){	// Calculate midpoint	fpoint2_t mid(x1() + ((x2() - x1()) * 0.5), y1() + ((y2() - y1()) * 0.5));	// Calculate tab length	if (tablen == 0)	{		tablen = getLength() * 0.1;		if (tablen > 16) tablen = 16;		if (tablen < 2) tablen = 2;	}	// Calculate tab endpoint	if (front_vec.x == 0 && front_vec.y == 0) frontVector();	return fpoint2_t(mid.x - front_vec.x*tablen, mid.y - front_vec.y*tablen);}
开发者ID:Manuel-K,项目名称:SLADE,代码行数:21,



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


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