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

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

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

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

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

示例1: GetDomain

bool ON_ArcCurve::Extend(  const ON_Interval& domain  ){  if (IsClosed()) return false;  double s0, s1;  bool changed = false;  GetDomain(&s0, &s1);  if (domain[0] < s0){    s0 = domain[0];    changed = true;  }  if (domain[1] > s1){    s1 = domain[1];    changed = true;  }  if (!changed) return false;  double a0 = m_arc.Domain().ParameterAt(Domain().NormalizedParameterAt(s0));  double a1 = m_arc.Domain().ParameterAt(Domain().NormalizedParameterAt(s1));  if (a1 > a0+2.0*ON_PI) {    a1 = a0+2.0*ON_PI;    s1 = Domain().ParameterAt(m_arc.Domain().NormalizedParameterAt(a1));  }  m_arc.Trim(ON_Interval(a0, a1));  SetDomain(s0, s1);  return true;}
开发者ID:Bardo91,项目名称:pcl,代码行数:30,


示例2: ClearEvalCacheHelper

ON_BOOL32 ON_PolyEdgeSegment::Trim( const ON_Interval& domain ){  ClearEvalCacheHelper();  ON_Interval old_domain = Domain();  ON_BOOL32 rc = ON_CurveProxy::Trim(domain);  if ( rc && m_edge )  {    ON_Interval new_domain = Domain();    if ( old_domain != new_domain )    {      ON_Interval old_edge_domain = m_edge_domain;      if ( old_domain == m_edge_domain && !ReversedEdgeDir() )      {        m_edge_domain = new_domain;      }      else      {        double s0 = old_domain.NormalizedParameterAt(new_domain[0]);        double s1 = old_domain.NormalizedParameterAt(new_domain[1]);        if ( ReversedEdgeDir() )        {          double x = 1.0-s0;          s0 = 1.0-s1;          s1 = x;        }        double r0 = m_edge_domain.ParameterAt(s0);        double r1 = m_edge_domain.ParameterAt(s1);        m_edge_domain.Set(r0,r1);      }      if ( old_edge_domain != m_edge_domain )        SetTrimDomainFromEdgeDomain();    }  }  return rc;}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:35,


示例3: Domain

ON_BOOL32 ON_PlaneSurface::Trim(       int dir,       const ON_Interval& domain       ){  if ( dir < 0 || dir > 1 )    return false;  ON_Interval current_domain = Domain(dir);  if ( current_domain[0] == ON_UNSET_VALUE && current_domain[1] == ON_UNSET_VALUE )    current_domain = domain;  ON_Interval trim_domain, trim_extents = m_extents[dir];  trim_domain.Intersection(domain, Domain(dir) );  if ( !trim_domain.IsIncreasing() )    return false;  if ( m_domain[dir] == m_extents[dir] )    trim_extents = trim_domain;  else  {    double x0 = m_extents[dir].ParameterAt( m_domain[dir].NormalizedParameterAt( trim_domain[0] ) );    double x1 = m_extents[dir].ParameterAt( m_domain[dir].NormalizedParameterAt( trim_domain[1] ) );    trim_extents.Set(x0,x1);  }  if ( !trim_extents.IsIncreasing() )    return false;  m_extents[dir] = trim_extents;  m_domain[dir] = trim_domain;  return true;}
开发者ID:2php,项目名称:pcl,代码行数:28,


示例4: Domain

ON_BOOL32 ON_ArcCurve::SetEndPoint(ON_3dPoint end_point){  if (IsCircle())    return false;  ON_BOOL32 rc = false;  if ( m_dim == 3 || end_point.z == 0.0 )  {    ON_3dPoint P;    ON_3dVector T;    double t = Domain()[0];    Ev1Der( t, P, T );    ON_Arc a;    rc = a.Create( P, T, end_point );    if ( rc )    {      m_arc = a;    }    else {      ON_3dPoint start_point = PointAt(Domain()[0]);      if (end_point.DistanceTo(start_point) < ON_ZERO_TOLERANCE*m_arc.Radius()){        //make arc into circle        m_arc.plane.xaxis = start_point - m_arc.Center();        m_arc.plane.xaxis.Unitize();        m_arc.plane.yaxis = ON_CrossProduct(m_arc.Normal(), m_arc.plane.xaxis);        m_arc.plane.yaxis.Unitize();        m_arc.SetAngleRadians(2.0*ON_PI);        rc = true;      }    }  }  return rc;  }
开发者ID:Bardo91,项目名称:pcl,代码行数:32,


示例5: EntityPath

boolcIpmiResource::Populate(){  if ( m_populate == false )     {       // create rpt entry       stdlog << "populate resource: " << EntityPath() << "./n";       struct oh_event *e = (struct oh_event *)g_malloc0( sizeof( struct oh_event ) );       if ( !e )          {            stdlog << "out of space !/n";            return false;          }       memset( e, 0, sizeof( struct oh_event ) );       e->type = OH_ET_RESOURCE;       if ( Create( e->u.res_event.entry ) == false )          {            g_free( e );            return false;          }       // assign the hpi resource id to ent, so we can find       // the resource for a given entity       m_resource_id = e->u.res_event.entry.ResourceId;       // add the resource to the resource cache       int rv = oh_add_resource( Domain()->GetHandler()->rptcache,                                 &(e->u.res_event.entry), this, 1 );       if ( rv != 0 )       {            stdlog << "Can't add resource to plugin cache !/n";            g_free( e );            return false;       }       stdlog << "cIpmiResource::Populate OH_ET_RESOURCE Event resource " << m_resource_id << "/n";       Domain()->AddHpiEvent( e );         if ( m_sel )            PopulateSel();       m_populate = true;     }  for( int i = 0; i < NumRdr(); i++ )     {       cIpmiRdr *rdr = GetRdr( i );       if ( rdr->Populate() == false )	    return false;     }  return true;}
开发者ID:openhpi1,项目名称:testrepo,代码行数:59,


示例6: Extents

ON_BOOL32 ON_PlaneSurface::Split(       int dir,       double c,       ON_Surface*& west_or_south_side,       ON_Surface*& east_or_north_side       ) const{  ON_PlaneSurface* ws_side = 0;  ON_PlaneSurface* en_side = 0;  if ( dir < 0 || dir > 1 )    return false;  if ( !Domain(dir).Includes(c,true) )    return false;  double t;  if ( Domain(dir) == Extents(dir) )    t = c;  else  {    t = Extents(dir).ParameterAt( Domain(dir).NormalizedParameterAt(c) );    if ( !Extents(dir).Includes(t,true) )      return false;  }  if ( west_or_south_side )  {    if ( west_or_south_side == east_or_north_side )      return false;    ws_side = ON_PlaneSurface::Cast(west_or_south_side);    if ( !ws_side )      return false;  }  if ( east_or_north_side )  {    en_side = ON_PlaneSurface::Cast(east_or_north_side);    if ( !en_side )      return false;  }  if ( !ws_side )    ws_side = new ON_PlaneSurface();  if ( !en_side )    en_side = new ON_PlaneSurface();  *ws_side = *this;  *en_side = *this;  ws_side->m_domain[dir].m_t[1] = c;  en_side->m_domain[dir].m_t[0] = c;  ws_side->m_extents[dir].m_t[1] = t;  en_side->m_extents[dir].m_t[0] = t;  west_or_south_side = ws_side;  east_or_north_side = en_side;  return true;}
开发者ID:2php,项目名称:pcl,代码行数:58,


示例7: from_int

Domain from_int(int64_t v) {  if (v == 0) {    return Domain(Interval::EQZ);  } else if (v > 0) {    return Domain(Interval::GTZ);  } else /* v < 0 */ {    return Domain(Interval::LTZ);  }}
开发者ID:JoelMarcey,项目名称:redex,代码行数:9,


示例8: while

boolcIpmiResource::Destroy(){  SaHpiRptEntryT *rptentry;  stdlog << "removing resource: " << m_entity_path << ")./n";  // remove sensors  while( Num() )     {       cIpmiRdr *rdr = GetRdr( 0 );       RemRdr( rdr );       delete rdr;     }  // create remove event  oh_event *e = (oh_event *)g_malloc0( sizeof( oh_event ) );  if ( !e )     {       stdlog << "out of space !/n";       return false;     }  memset( e, 0, sizeof( struct oh_event ) );  e->type = OH_ET_RESOURCE_DEL;  rptentry = oh_get_resource_by_id( Domain()->GetHandler()->rptcache, m_resource_id );  if ( !rptentry )  {      stdlog << "Can't find resource in plugin cache !/n";      g_free( e );      return false;  }  e->u.res_event.entry = *rptentry;  stdlog << "cIpmiResource::Destroy OH_ET_RESOURCE_DEL Event resource " << m_resource_id << "/n";  Domain()->AddHpiEvent( e );  // remove resource from local cache  int rv = oh_remove_resource( Domain()->GetHandler()->rptcache, m_resource_id );  if ( rv != 0 )  {      stdlog << "Can't remove resource from plugin cache !/n";      return false;  }  m_mc->RemResource( this );  delete this;  return true;}
开发者ID:openhpi1,项目名称:testrepo,代码行数:52,


示例9: IsAtSeam

int ON_Surface::IsAtSeam(double s, double t) const{  int rc = 0;  int i;  for (i=0; i<2; i++){    if (!IsClosed(i))      continue;    double p = (i) ? t : s;    if (p == Domain(i)[0] || p == Domain(i)[1])      rc += (i+1);  }  return rc;}
开发者ID:Bastl34,项目名称:PCL,代码行数:15,


示例10: GetUserGroups

    virtual void GetUserGroups(const std::wstring& sDomainName, const std::wstring& name, OBJ_LIST& groups)	{		CNetDomain Domain(sDomainName.c_str());		CNetUsers Users(Domain);		Users.GetUserGroups(name.c_str(), groups);	}
开发者ID:hackshields,项目名称:antivirus,代码行数:7,


示例11: Domain

Vector ADFun<Base>::Jacobian(const Vector &x){	size_t i;	size_t n = Domain();	size_t m = Range();	CPPAD_ASSERT_KNOWN(		size_t(x.size()) == n,		"Jacobian: length of x not equal domain dimension for F"	);	// point at which we are evaluating the Jacobian	Forward(0, x);	// work factor for forward mode	size_t workForward = n;	// work factor for reverse mode	size_t workReverse = 0;	for(i = 0; i < m; i++)	{	if( ! Parameter(i) )			++workReverse;	}	// choose the method with the least work	Vector jac( n * m );	if( workForward <= workReverse )		JacobianFor(*this, x, jac);	else	JacobianRev(*this, x, jac);	return jac;}
开发者ID:iagomosqueira,项目名称:FLasher,代码行数:31,


示例12: Domain

void ADFun<Base>::RevSparseHesCase(	const std::set<size_t>&   set_type         ,	bool                      transpose        ,  	size_t                    q                ,  	const VectorSet&          s                ,	VectorSet&                h                ){	size_t n = Domain();	if( transpose )		h.resize(n);	else	h.resize(q);	CPPAD_ASSERT_KNOWN( 		for_jac_sparse_set_.n_set() > 0,		"RevSparseHes: previous stored call to ForSparseJac did not "		"use std::set<size_t> for the elements of r."	);	CPPAD_ASSERT_UNKNOWN( for_jac_sparse_pack_.n_set() == 0 );	CPPAD_ASSERT_UNKNOWN( for_jac_sparse_set_.n_set() == num_var_tape_  );		// use sparse_pack for the calculation	CppAD::RevSparseHesSet( 		transpose                ,		q                        ,		s                        ,		h                        ,		num_var_tape_            ,		dep_taddr_               ,		ind_taddr_               ,		play_                    ,		for_jac_sparse_set_ 	);}
开发者ID:GodinA,项目名称:adcomp,代码行数:32,


示例13: main

int main(){      int MeshX = 200, MeshY = 80;                                      // Set Initial Mesh Size  clock_t ti, tf, RunTime;			                   // Set clock variables    setprecision(15);  setw(15);       while(MeshX <= 200){    ti = clock();			                                   // Start clock       Grid Domain(MeshX, MeshY, 1);          	                   // Define Grid of required size          cout<<"/nEvaluating solution for Mesh Size: "<<MeshX<<" by "<<MeshY;         //EvaluateGridParameters(Domain);				   // Set Grid Values for problem 1, 2    SolveEnergyEquation(Domain);         			   // Solve energy equation for problem 5                    MeshX *= 2;							   // Double mesh size    MeshY *= 2;        tf = clock();    RunTime = (double)(tf - ti)/CLOCKS_PER_SEC*1000;                      // Calculate Run Time in Seconds         cout<<"/nSolver Run-Time: "<<RunTime<<" ms/n";           }    //CalculateErrorBound();  //CalculateOrder();    return 0;}
开发者ID:nivarti,项目名称:cmtp,代码行数:33,


示例14: Domain

void ADFun<Base>::RevSparseJacCase(	const std::set<size_t>&      set_type          ,	bool                         transpose         ,	bool                         dependency        ,	size_t                       q                 ,	const VectorSet&             r                 ,	VectorSet&                   s                 ){	// dimension of the result vector	if( transpose )		s.resize( Domain() );	else	s.resize( q );	// store results in r	RevSparseJacSet(		transpose      ,		dependency     ,		q              ,		r              ,		s              ,		num_var_tape_  ,		dep_taddr_     ,		ind_taddr_     ,		play_	);}
开发者ID:CSCsw,项目名称:CppAD,代码行数:25,


示例15: Domain

Vector ADFun<Base>::RevOne(const Vector  &x, size_t i){	size_t i1;	size_t n = Domain();	size_t m = Range();	// check Vector is Simple Vector class with Base type elements	CheckSimpleVector<Base, Vector>();	CppADUsageError(		x.size() == n,		"RevOne: Length of x not equal domain dimension for f"	); 	CppADUsageError(		i < m,		"RevOne: the index i is not less than range dimension for f"	);	// point at which we are evaluating the derivative	Forward(0, x);	// component which are are taking the derivative of	Vector w(m);	for(i1 = 0; i1 < m; i1++)		w[i1] = 0.;	w[i] = Base(1);	// dimension the return value	Vector dw(n);	// compute the return value	dw = Reverse(1, w);	return dw;}
开发者ID:cran,项目名称:RMC,代码行数:35,


示例16: operator

    void operator()(ThreadParams& params,                const std::string& name, T_Scalar* value,                const std::string& attrName = "", T_Attribute* attribute = nullptr)    {        log<picLog::INPUT_OUTPUT>("HDF5: read %1%D scalars: %2%") % simDim % name;        Dimensions domain_offset(0, 0, 0);        for (uint32_t d = 0; d < simDim; ++d)            domain_offset[d] = Environment<simDim>::get().GridController().getPosition()[d];        // avoid deadlock between not finished pmacc tasks and mpi calls in adios        __getTransactionEvent().waitForFinished();        DomainCollector::DomDataClass data_class;        DataContainer *dataContainer =            params.dataCollector->readDomain(params.currentStep,                                               name.c_str(),                                               Domain(domain_offset, Dimensions(1, 1, 1)),                                               &data_class);        typename traits::PICToSplash<T_Scalar>::type splashType;        *value = *static_cast<T_Scalar*>(dataContainer->getIndex(0)->getData());        __delete(dataContainer);        if(!attrName.empty())        {            log<picLog::INPUT_OUTPUT>("HDF5: read attribute %1% for scalars: %2%") % attrName % name;            params.dataCollector->readAttributeInfo(params.currentStep, name.c_str(), attrName.c_str()).read(attribute, sizeof(T_Attribute));            log<picLog::INPUT_OUTPUT>("HDF5: attribute %1% = %2%") % attrName % *attribute;        }    }
开发者ID:ALaDyn,项目名称:picongpu,代码行数:31,


示例17: Domain

void ADFun<Base>::RevSparseHesCase(	bool              set_type         ,	bool              transpose        ,  	size_t            q                ,  	const VectorSet&  s                ,	VectorSet&        h                ){	size_t n = Domain(); 		h.resize(q * n );	CPPAD_ASSERT_KNOWN( 		for_jac_sparse_pack_.n_set() > 0,		"RevSparseHes: previous stored call to ForSparseJac did not "		"use bool for the elements of r."	);	CPPAD_ASSERT_UNKNOWN( for_jac_sparse_set_.n_set() == 0 );	CPPAD_ASSERT_UNKNOWN( for_jac_sparse_pack_.n_set() == total_num_var_ );		// use sparse_pack for the calculation	CppAD::RevSparseHesBool( 		transpose                ,		q                        ,		s                        ,		h                        ,		total_num_var_           ,		dep_taddr_               ,		ind_taddr_               ,		play_                    ,		for_jac_sparse_pack_ 	);}
开发者ID:tkelman,项目名称:CppAD-oldmirror,代码行数:30,


示例18: Domain

void FXmppPresenceJingle::OnSignalPresenceUpdate(const buzz::PresenceStatus& InStatus){		// ignore muc presence	FString Domain(UTF8_TO_TCHAR(InStatus.jid().domain().c_str()));	if (!Domain.Equals(Connection.GetMucDomain(), ESearchCase::IgnoreCase))	{		FXmppUserJid UserJid;		FXmppJingle::ConvertToJid(UserJid, InStatus.jid());		// Don't keep presence entries missing a resource, this comes in when a new friend is added but will never get updated when user logs off		if (UserJid.IsValid() && !UserJid.Resource.IsEmpty())		{			FScopeLock Lock(&RosterLock);					FXmppUserPresenceJingle& RosterEntry = RosterPresence.FindOrAdd(UserJid.GetFullPath());			ConvertToPresence(*RosterEntry.Presence, InStatus, UserJid);			FXmppJingle::ConvertToJid(RosterEntry.UserJid, InStatus.jid());			UE_LOG(LogXmpp, Verbose, TEXT("Received presence for user [%s]"), *UserJid.GetFullPath());			DebugPrintPresence(*RosterEntry.Presence);			RosterUpdates.Enqueue(UserJid.GetFullPath());		}		else if (UserJid.IsValid() && UserJid.Resource.IsEmpty())		{			UE_LOG(LogXmpp, Warning, TEXT("Ignoring presence update with empty resource. StatusJid = %s, JidFullPath = %s"), UTF8_TO_TCHAR(InStatus.jid().Str().c_str()), *UserJid.GetFullPath());		}	}}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:28,


示例19: now

/**  * HPI function saHpiWatchdogTimerReset *  * See also the description of the function inside the specification or header file. * Starting or resetting a watchdog timer if it is allowed *  * @return HPI return code **/SaErrorT NewSimulatorWatchdog::ResetWatchdog() {   if ( m_start.IsSet() ) {      cTime now( cTime::Now() );      now -= m_start;            if ( now.GetMsec() > m_wdt_data.InitialCount - m_wdt_data.PreTimeoutInterval ) {                  stdlog << "DBG: ResetWatchdog not allowed: num " << m_wdt_rec.WatchdogNum << ":/n";         stdlog << "DBG: Time expire in ms: " << now.GetMsec() << " > "                 << (m_wdt_data.InitialCount - m_wdt_data.PreTimeoutInterval) << "/n";         return SA_ERR_HPI_INVALID_REQUEST;      }            // Reset the Timer      Reset( m_wdt_data.InitialCount - m_wdt_data.PreTimeoutInterval );      m_start = cTime::Now();   } else {   	      m_start = cTime::Now();      // Reset the Timer      Reset( m_wdt_data.InitialCount - m_wdt_data.PreTimeoutInterval );      if (!m_running)         Start();   }   m_wdt_data.Running = SAHPI_TRUE;     Domain()->SetRunningWdt( true );   stdlog << "DBG: ResetWatchdog successfully: num " << m_wdt_rec.WatchdogNum << "/n";      return SA_OK;}
开发者ID:openhpi1,项目名称:openhpitest,代码行数:43,


示例20: Domain

double ON_PolyEdgeSegment::EdgeParameter(double t) const{  double edge_t = ON_UNSET_VALUE;  if ( m_edge )  {    if ( m_t == t && m_edge_t != ON_UNSET_VALUE )      edge_t = m_edge_t;    else    {      ON_PolyEdgeSegment* p = const_cast<ON_PolyEdgeSegment*>(this);      if ( t != m_t )      {        p->m_t = t;        p->m_trim_t = ON_UNSET_VALUE;        p->m_srf_uv[0] = ON_UNSET_VALUE;        p->m_srf_uv[1] = ON_UNSET_VALUE;      }      ON_Interval d = Domain();      bool bReversedEdgeDir = ReversedEdgeDir();      if ( bReversedEdgeDir || m_edge_domain != d )      {        double s = d.NormalizedParameterAt(t);        if ( bReversedEdgeDir )          s = 1.0 - s;        edge_t = m_edge_domain.ParameterAt(s);      }      else        edge_t = t;      p->m_edge_t = edge_t;    }  }  return edge_t;}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:33,


示例21: GetUserInfo

    virtual void GetUserInfo(const std::wstring& sDomainName, const std::wstring& name, UserInfo& info)	{		CNetDomain Domain(sDomainName.c_str());		CNetUsers Users(Domain);		CNetUserInfo ui;		Users.GetUserInfo(name.c_str(), &ui);		info.domain = sDomainName;		info.name = name;				switch(ui.priv) {			case USER_PRIV_GUEST:				info.pLevel = PL_GUEST;			break;			case USER_PRIV_ADMIN:				info.pLevel = PL_ADMINISTRATOR;			break;			case USER_PRIV_USER:				info.pLevel = PL_USER;			break;			default:				info.pLevel = PL_GUEST;		}		info.lastLogon = ui.last_logon;		info.lastLogoff = ui.last_logoff;	}
开发者ID:hackshields,项目名称:antivirus,代码行数:28,


示例22: consensusDomains

DomainSet consensusDomains(WeightedDomainEnsemble& dEnsemble) {    using PersistenceMap = map<Domain, double>;    PersistenceMap pmap;    for (auto dSetIdx : boost::irange(size_t{0}, dEnsemble.domainSets.size())) {        auto& dSet = dEnsemble.domainSets[dSetIdx];        auto weight = dEnsemble.weights[dSetIdx];        for (auto& domain : dSet) {            if ( pmap.find(domain) == pmap.end() ) pmap[domain] = 0;            pmap[domain] += weight;        }    }    Intervals ivals;    for (auto domainPersistence : pmap) {        auto domain = domainPersistence.first;        auto persistence = domainPersistence.second;        ivals.push_back(WeightedInterval(domain.start, domain.end, persistence));          }    IntervalScheduler scheduler(ivals);    scheduler.computeSchedule();    DomainSet dSet;    for (auto ival : scheduler.extractIntervals()) {        dSet.push_back(Domain(ival.start, ival.end));    }    sort(dSet.begin(), dSet.end());    return dSet;}
开发者ID:kingsfordgroup,项目名称:armatus,代码行数:33,


示例23: Domain

ON_BOOL32 ON_Surface::GetDomain( int dir, double* t0, double* t1 ) const{  ON_Interval d = Domain(dir);  if ( t0 ) *t0 = d[0];  if ( t1 ) *t1 = d[1];  return d.IsIncreasing();}
开发者ID:Bastl34,项目名称:PCL,代码行数:7,


示例24: InFilterNew

bool ParallelPlane::InFilter(const int& row){    return InFilterNew(row);    if(filter_radius_ < 0)return true;  //hacky way to avoid having another flag    osg::Vec3f tmp = Domain(row) - filter_position_;    return tmp.length() <= filter_radius_;}
开发者ID:Jerdak,项目名称:MassHeatMap,代码行数:7,


示例25: Domain

Vector ADFun<Base>::ForOne(const Vector &x, size_t j){	size_t j1;	size_t n = Domain();	size_t m = Range();	// check Vector is Simple Vector class with Base type elements	CheckSimpleVector<Base, Vector>();	CPPAD_ASSERT_KNOWN(		x.size() == n,		"ForOne: Length of x not equal domain dimension for f"	);	CPPAD_ASSERT_KNOWN(		j < n,		"ForOne: the index j is not less than domain dimension for f"	);	// point at which we are evaluating the second partials	Forward(0, x);	// direction in which are are taking the derivative	Vector dx(n);	for(j1 = 0; j1 < n; j1++)		dx[j1] = Base(0);	dx[j] = Base(1);	// dimension the return value	Vector dy(m);	// compute the return value	dy = Forward(1, dx);	return dy;}
开发者ID:iagomosqueira,项目名称:FLasher,代码行数:35,



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


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