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

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

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

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

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

示例1: yn

doubleyn (int n, double x) {  int i, sign;  double a, b, tmp;    if (x <= 0)    return (dzero/dzero);	/* IEEE machines: invalid operation */  sign = 1;  if (n < 0)    {      n = -n;      if (n%2 == 1) 	sign = -1;    }  if (n == 0)     return y0(x);  if (n == 1)     return sign*y1(x);  a = y0(x);  b = y1(x);  for (i = 1; i<n; i++)    {      tmp = b;      b = (2.0*i / x) * b - a;      a = tmp;    }  return sign*b;}
开发者ID:fedser,项目名称:Plotutils,代码行数:31,


示例2: 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,


示例3: 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,


示例4: yn

doubleyn(int n, double x){	int i, sign;	double a, b, temp;    /* Y(n,NaN), Y(n, x < 0) is NaN */	if (x <= 0 || isnan(x))		if (_IEEE && x < 0) return zero/zero;		else if (x < 0)     return (infnan(EDOM));		else if (_IEEE)     return -one/zero;		else		    return(infnan(-ERANGE));	else if (!finite(x)) return(0);	sign = 1;	if (n<0){		n = -n;		sign = 1 - ((n&1)<<2);	}	if (n == 0) return(y0(x));	if (n == 1) return(sign*y1(x));	if(_IEEE && x >= 8.148143905337944345e+090) { /* x > 2**302 */    /* (x >> n**2)     *	    Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)     *	    Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)     *	    Let s=sin(x), c=cos(x),     *		xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then     *     *		   n	sin(xn)*sqt2	cos(xn)*sqt2     *		----------------------------------     *		   0	 s-c		 c+s     *		   1	-s-c 		-c+s     *		   2	-s+c		-c-s     *		   3	 s+c		 c-s     */		switch (n&3) {		    case 0: temp =  sin(x)-cos(x); break;		    case 1: temp = -sin(x)-cos(x); break;		    case 2: temp = -sin(x)+cos(x); break;		    case 3: temp =  sin(x)+cos(x); break;		}		b = invsqrtpi*temp/sqrt(x);	} else {	    a = y0(x);	    b = y1(x);	/* quit if b is -inf */	    for (i = 1; i < n && !finite(b); i++){		temp = b;		b = ((double)(i+i)/x)*b - a;		a = temp;	    }	}	if (!_IEEE && !finite(b))		return (infnan(-sign * ERANGE));	return ((sign > 0) ? b : -b);}
开发者ID:mikekmv,项目名称:aeriebsd-src,代码行数:55,


示例5: 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,


示例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: 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,


示例8: 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,


示例9: usageExample

//..// Our verification program simply instantiate several 'MyGenericContainer'// templates with the two test types above, and checks that the allocator// slot is as expected://..    int usageExample()    {        bslma::TestAllocator ta0;        bslma::TestAllocator ta1;//..// With 'MyTestTypeWithNoBslmaAllocatorTraits', the slot should never be set.//..        MyTestTypeWithNoBslmaAllocatorTraits x;        allocSlot = &ta0;        MyGenericContainer<MyTestTypeWithNoBslmaAllocatorTraits> x0(x);        ASSERT(&ta0 == allocSlot);        allocSlot = &ta0;        MyGenericContainer<MyTestTypeWithNoBslmaAllocatorTraits> x1(x, &ta1);        ASSERT(&ta0 == allocSlot);//..// With 'MyTestTypeWithBslmaAllocatorTraits', the slot should be set to the// allocator argument, or to 0 if not specified://..        MyTestTypeWithBslmaAllocatorTraits y;        allocSlot = &ta0;        MyGenericContainer<MyTestTypeWithBslmaAllocatorTraits> y0(y);        ASSERT(0 == allocSlot);        allocSlot = &ta0;        MyGenericContainer<MyTestTypeWithBslmaAllocatorTraits> y1(y, &ta1);        ASSERT(&ta1 == allocSlot);        return 0;    }
开发者ID:StefPac,项目名称:bde,代码行数:37,


示例10: WarningIn

void Foam::equationReader::evalDimsY1DimCheck(    const equationReader * eqnReader,    const label index,    const label i,    const label storageOffset,    label& storeIndex,    dimensionSet& xDims,    dimensionSet sourceDims) const{    if    (        !xDims.dimensionless() && dimensionSet::debug    )    {        WarningIn("equationReader::evalDimsY1DimCheck")            << "Dimension error thrown for operation ["            << equationOperation::opName            (                operator[](index)[i].operation()            )            << "] in equation " << operator[](index).name()            << ", given by:" << token::NL << token::TAB            << operator[](index).rawText();    }    dimensionedScalar ds("temp", xDims, 1.0);    xDims.reset(y1(ds).dimensions());    operator[](index)[i].assignOpDimsFunction    (        &Foam::equationReader::evalDimsY1    );}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-libraries-equationReaderExtension,代码行数:33,


示例11: test_one

test_one(){    X1 x1(1);    Y1 y1(1);    f1( x1, y1 ); // in fact, it should find ambiguity, not pass this}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:7,


示例12: main

int main(void){	#pragma STDC FENV_ACCESS ON	double y;	float d;	int e, i, err = 0;	struct d_d *p;	for (i = 0; i < sizeof t/sizeof *t; i++) {		p = t + i;		if (p->r < 0)			continue;		fesetround(p->r);		feclearexcept(FE_ALL_EXCEPT);		y = y1(p->x);		e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);		if (!checkexcept(e, p->e, p->r)) {			printf("%s:%d: bad fp exception: %s y1(%a)=%a, want %s",				p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));			printf(" got %s/n", estr(e));			err++;		}		d = ulperr(y, p->y, p->dy);		if ((!(p->x < 0) && !checkulp(d, p->r)) || (p->x < 0 && !isnan(y) && y != -inf)) {			printf("%s:%d: %s y1(%a) want %a got %a ulperr %.3f = %a + %a/n",				p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy);			err++;		}	}	return !!err;}
开发者ID:crxz0193,项目名称:musl-libctest,代码行数:33,


示例13: angle

 double angle(CBundle* const &b) const {     double ax=x1()-x0;     double ay=y1()-y0;     double bx=b->x1()-b->x0;     double by=b->y1()-b->y0;     return vangle(ax,ay,bx,by); }
开发者ID:amolenaar,项目名称:adaptagrams,代码行数:7,


示例14: 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,


示例15: 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,


示例16: main

int main() {    double x = 1.0;    double y = 1.0;    int i = 1;    acosh(x);    asinh(x);    atanh(x);    cbrt(x);    expm1(x);    erf(x);    erfc(x);    isnan(x);    j0(x);    j1(x);    jn(i,x);    ilogb(x);    logb(x);    log1p(x);    rint(x);    y0(x);    y1(x);    yn(i,x);#   ifdef _THREAD_SAFE    gamma_r(x,&i);    lgamma_r(x,&i);#   else    gamma(x);    lgamma(x);#   endif    hypot(x,y);    nextafter(x,y);    remainder(x,y);    scalb(x,y);    return 0;}
开发者ID:DanielMiklody,项目名称:openmeeg,代码行数:35,


示例17:

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,


示例18: Q_UNUSED

void PointPort::drawItem(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget){	Q_UNUSED(option);	Q_UNUSED(widget);	painter->setPen(pen());	painter->setBrush(brush());	mPointImpl.drawItem(painter, x1() + mUnrealRadius, y1() + mUnrealRadius, mRadius);}
开发者ID:Antropovi,项目名称:qreal,代码行数:8,


示例19: 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,


示例20:

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,


示例21: if

Type Foam::interpolation2DTable<Type>::operator()(    const scalar valueX,    const scalar valueY) const{    // Considers all of the list in Y being equal    label nX = this->size();    const table& t = *this;    if (nX == 0)    {        WarningIn        (            "Type Foam::interpolation2DTable<Type>::operator()"            "("                "const scalar, "                "const scalar"            ") const"        )            << "cannot interpolate a zero-sized table - returning zero" << endl;        return pTraits<Type>::zero;    }    else if (nX == 1)    {        // only 1 column (in X) - interpolate to find Y value        return interpolateValue(t.first().second(), valueY);    }    else    {        // have 2-D data, interpolate        // find low and high indices in the X range that bound valueX        label x0i = Xi(lessOp<scalar>(), valueX, false);        label x1i = Xi(greaterOp<scalar>(), valueX, true);        if (x0i == x1i)        {            return interpolateValue(t[x0i].second(), valueY);        }        else        {            Type y0(interpolateValue(t[x0i].second(), valueY));            Type y1(interpolateValue(t[x1i].second(), valueY));            // gradient in X            scalar x0 = t[x0i].first();            scalar x1 = t[x1i].first();            Type mX = (y1 - y0)/(x1 - x0);            // interpolate            return y0 + mX*(valueX - x0);        }    }}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder2.0-libraries-swak4Foam,代码行数:57,


示例22: 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,


示例23: 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,


示例24: 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,


示例25: G77_besy1_0

floatG77_besy1_0 (const real * x){#if defined(BUILD_OS_DARWIN)  return (float) y1 ((double) *x);#else /* defined(BUILD_OS_DARWIN) */  return y1f (*x);#endif /* defined(BUILD_OS_DARWIN) */}
开发者ID:sharugupta,项目名称:OpenUH,代码行数:9,


示例26: x

void MainWindow::showMes(QList<Measure> * measures){   // Item * item=(Item *)params;    ui->lcd_pulse_0->display(measures->at(0).angle);    ui->lcd_pulse_4->display(measures->at(0).angle);    ui->lcd_pulse_8->display(measures->at(0).angle);    ui->lcd_pulse_12->display(measures->at(0).angle);    ui->lcd_pulse_16->display(measures->at(0).angle);    ui->lcd_pulse_20->display(measures->at(0).angle);    ui->lcd_pulse_24->display(measures->at(0).angle);    ui->lcd_pulse_28->display(measures->at(0).angle);    customPlot=ui->widget;      QVector<double> x(101), y(101); // initialize with entries 0..100      QVector<double> x1(101), y1(101);      for(int i=0; i<8; i++)      {          x1[i] = 0;          y1[i] = 0;          x[i] = 0;          y[i] = 0;          customPlot->graph(1)->setData(x1, y1);          customPlot->graph(0)->setData(x, y);      }      int pulse=0;      int i=0;      while(measures->at(i).angle!=0)      {          x[i]=pulse;          y[i]=measures->at(i).angle;          i++; pulse+=4;      }      customPlot->graph(0)->setData(x, y);      /*      if(item->approx[0].angle!=0)      {          for (int i=0; i<8; ++i)          {              x1[i] = i*4;              y1[i] = item->approx[i].angle;          }           customPlot->graph(1)->setData(x1, y1);      }*/      /*      customPlot->yAxis->setRange(item->measures[0].angle, item->measures[0].angle+550);      ui->widget->replot();      */}
开发者ID:TXZXT,项目名称:FAI,代码行数:57,


示例27: x1

void CustomPlotRegression::setupQuadraticDemo(double * kernely,                                              int size_kernely,                                              double * kernelx,                                              int size_kernelx  ){    QCustomPlot* customPlot=m_CustomPlot;    // make top right axes clones of bottom left axes:    // generate some data:    QVector<double> x1( 0 ), y1( 0 );   // initialize with entries 0..100    customPlot->addGraph();    customPlot->graph( 0 )->setPen( QPen( Qt::red ) );    //customPlot->graph( 0 )->setSelectedPen( QPen( Qt::blue, 2 ) );    //    customPlot->graph( 0 )->setData( x1, y1 );    QVector<double> x;    QVector<double> y;    //std::cout << "****************************************************************+++" <<endl;    double maxx= DBL_MIN;    double maxy= DBL_MIN;    for (int i = 0; i < size_kernelx; i++) {        //        std::cout << kernel[i] << endl;        x.push_back(kernelx[i]);        y.push_back(kernely[i]);        if(kernelx[i] > maxx){            maxx=kernelx[i];        }        if(kernely[i] > maxy){            maxy=kernely[i];        }    }    m_CustomPlot->graph( 0 )->setData( x, y);    //    std::cout << "ok" << endl;    customPlot->graph(0)->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 10));    customPlot->addGraph();    customPlot->graph( 1 )->setPen( QPen( Qt::green ) );    //customPlot->graph( 1 )->setSelectedPen( QPen( Qt::blue, 2 ) );    //    customPlot->graph( 1 )->setData( x1, y1 );    customPlot->graph(1)->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 10));    // give the axes some labels:    customPlot->xAxis->setLabel( "Generation" );    customPlot->yAxis->setLabel( "Fitness" );    // set axes ranges, so we see all data:    customPlot->xAxis->setRange( 0, maxx );    customPlot->yAxis->setRange( 0, maxy);    customPlot ->setInteractions( QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables );    connect( customPlot, SIGNAL( plottableClick( QCPAbstractPlottable*, QMouseEvent* ) ), this, SLOT( graphClicked( QCPAbstractPlottable* ) ) );    for (int i = 0; i < number_of_function; ++i) {            customPlot->addGraph();    }}
开发者ID:alessioderango,项目名称:SAKe,代码行数:56,


示例28: main

void main()  {     double x, y, z;     x = j0( 2.4 );     y = y1( 1.58 );     z = jn( 3, 2.4 );     printf( "j0(2.4) = %f, y1(1.58) = %f/n", x, y );     printf( "jn(3,2.4) = %f/n", z );  }
开发者ID:aquashift,项目名称:86Duino_DuinOS,代码行数:10,


示例29: pow

inline complex<typename boost::tr1_detail::largest_real<T, U>::type>   pow(const complex<T>& x, const complex<U>& y){   typedef complex<typename boost::tr1_detail::largest_real<T, U>::type> result_type;   typedef typename boost::mpl::if_<boost::is_same<result_type, complex<T> >, result_type const&, result_type>::type cast1_type;   typedef typename boost::mpl::if_<boost::is_same<result_type, complex<U> >, result_type const&, result_type>::type cast2_type;   cast1_type x1(x);   cast2_type y1(y);   return std::pow(x1, y1);}
开发者ID:00liujj,项目名称:dealii,代码行数:10,



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


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