当前位置: 首页>>代码示例>>C++>>正文


C++ Ord函数代码示例

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


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

示例1: Ord

 Ord Hermes1DFunction<Scalar>::value(Ord x) const
 {
   if (this->is_const)
     return Ord(0);
   else
   {
     throw Hermes::Exceptions::MethodNotOverridenException("Hermes1DFunction<Scalar>::value");
     return Ord(99);
   }
 };
开发者ID:LeiDai,项目名称:hermes,代码行数:10,代码来源:hermes_function.cpp

示例2: Ord

int CTranscription::TengHash(unsigned char c)
{
   size_t n;

   for(unsigned int i=0;i<equivs.count();i++)
   {
     n=equivs[i].find(c);
     if(n != std::string::npos)
       return Ord(equivs[i][0]);
   }
   return Ord(c);
}
开发者ID:thomasdeniau,项目名称:Hesperides,代码行数:12,代码来源:transcription.cpp

示例3: ReadInteger

bool TIniFile::ReadBool(const wxString &Section, const wxString &Ident,
  bool Default)
{
	bool result;
	result = ReadInteger(Section, Ident, Ord(Default)) != 0;
	return result;
}
开发者ID:gkathire,项目名称:wxVCL,代码行数:7,代码来源:inifiles.cpp

示例4: Ord

Ord CustomWeakForm::CustomVectorFormSurface::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v, Geom<Ord> *e, Func<Ord> **ext) const
{
  Ord result = Ord(0);
  for (int i = 0; i < n; i++)
    result += -wt[i] * v->val[i];
  return result;
}
开发者ID:fauzisd,项目名称:hermes,代码行数:7,代码来源:definitions.cpp

示例5: return

Ord CustomWeakFormHeatRK::CustomFormResidualVol::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v, 
                                                     Geom<Ord> *e, ExtData<Ord> *ext) const 
{
  Func<Ord>* u_prev_newton = u_ext[0];
  // Return the polynomial order of the gradient increased by five to account for lambda(x, y).
  return (u_prev_newton->dx[0] * v->dx[0] + u_prev_newton->dy[0] * v->dy[0]) * Ord(5);
}
开发者ID:JordanBlocher,项目名称:hermes-examples,代码行数:7,代码来源:definitions.cpp

示例6: Ord

Ord CustomWeakForm::JacobianFormSurf_0_0::ord(int n, double *wt, Func<Ord> *u_ext[], 
                                     Func<Ord> *vj, Func<Ord> *vi, Geom<Ord> *e, ExtData<Ord> *ext) const
{
  Ord result = Ord(0);
  for (int i = 0; i < n; i++)
    result += wt[i] * (kappa * vj->val[i] * vi->val[i]);
  return result;
}
开发者ID:Zhonghua,项目名称:hermes-tutorial,代码行数:8,代码来源:definitions.cpp

示例7: Ord

Ord CustomWeakForm::JacobianFormVol_1_0::ord(int n, double *wt, Func<Ord> *u_ext[], 
                                Func<Ord> *vj, Func<Ord> *vi, Geom<Ord> *e, Func<Ord> **ext) const
{
  Ord result = Ord(0);
  Func<Ord>* domegadt = ext[0];
  for (int i = 0; i < n; i++)
    result += wt[i] * ( domegadt->val[i] * vj->val[i] * vi->val[i] );
  return result;
}
开发者ID:HPeX,项目名称:hermes-tutorial,代码行数:9,代码来源:definitions.cpp

示例8: Ord

Ord WeakFormNSSimpleLinearization::VectorFormVolVel::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v, Geom<Ord> *e, ExtData<Ord> *ext) const
{
    Ord result = Ord(0);
    if(!Stokes) {
        Func<Ord>* vel_prev_time = ext->fn[0]; // this form is used with both velocity components
        result = int_u_v<Ord, Ord>(n, wt, vel_prev_time, v) / time_step;
    }
    return result;
}
开发者ID:JordanBlocher,项目名称:hermes-examples,代码行数:9,代码来源:definitions.cpp

示例9: sqrt

Ord DefaultResidualMagnetostatics::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v,
                                       Geom<Ord> *e, ExtData<Ord> *ext) const {
    Ord planar_part = 0;
    for (int i = 0; i < n; i++) {
        Ord B_i = sqrt(sqr(u_ext[0]->dx[i]) + sqr(u_ext[0]->dy[i]));
        planar_part += wt[i] * const_coeff*spline_coeff->get_value(B_i) *
                       (u_ext[0]->dx[i] * v->dx[i] + u_ext[0]->dy[i] * v->dy[i]);
    }
    return planar_part * Ord(order_increase);
}
开发者ID:Amuthan,项目名称:hermes,代码行数:10,代码来源:weakforms_maxwell.cpp

示例10: Ord

Ord CustomWeakFormPicard::CustomResidual::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v, 
                                              Geom<Ord> *e, Func<Ord> **ext) const 
{
  Ord result = Ord(0);
  for (int i = 0; i < n; i++) 
  {
    result += wt[i] * f->value(e->x[i], e->y[i]) * v->val[i];
  }
  return result;
}
开发者ID:HPeX,项目名称:hermes-tutorial,代码行数:10,代码来源:definitions.cpp

示例11: Ord

Ord WeakFormNSNewton::VectorFormNS_2::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *v, Geom<Ord> *e, Func<Ord>* *ext) const 
{
  Ord result = Ord(0);
  Func<Ord>* xvel_prev_newton = u_ext[0];  
  Func<Ord>* yvel_prev_newton = u_ext[1];  

  for (int i = 0; i < n; i++)
    result += wt[i] * (xvel_prev_newton->dx[i] * v->val[i] + yvel_prev_newton->dy[i] * v->val[i]);
  return result;
}
开发者ID:tsvaton,项目名称:hermes-examples,代码行数:10,代码来源:definitions.cpp

示例12: OpDec

static int
OpDec(int p, const char *type, Atom a, Term m)
{
  int             i;
  AtomEntry      *ae = RepAtom(a);
  OpEntry        *info;

  if (m == TermProlog)
    m = PROLOG_MODULE;
  else if (m == USER_MODULE)
    m = PROLOG_MODULE;
  for (i = 1; i <= 7; ++i)
    if (strcmp(type, optypes[i]) == 0)
      break;
  if (i > 7) {
    Yap_Error(DOMAIN_ERROR_OPERATOR_SPECIFIER,MkAtomTerm(Yap_LookupAtom(type)),"op/3");
    return(FALSE);
  }
  if (p) {
    if (i == 1 || i == 2 || i == 4)
      p |= DcrlpFlag;
    if (i == 1 || i == 3 || i == 6)
      p |= DcrrpFlag;
  }
  WRITE_LOCK(ae->ARWLock);
  info = Yap_GetOpPropForAModuleHavingALock(ae, m);
  if (EndOfPAEntr(info)) {
    info = (OpEntry *) Yap_AllocAtomSpace(sizeof(OpEntry));
    info->KindOfPE = Ord(OpProperty);
    info->OpModule = m;
    info->OpName = a;
    //LOCK(OpListLock);
    info->OpNext = OpList;
    OpList = info;
    //UNLOCK(OpListLock);
    AddPropToAtom(ae, (PropEntry *)info);
    INIT_RWLOCK(info->OpRWLock);
    WRITE_LOCK(info->OpRWLock);
    WRITE_UNLOCK(ae->ARWLock);
    info->Prefix = info->Infix = info->Posfix = 0;
  } else {
    WRITE_LOCK(info->OpRWLock);
    WRITE_UNLOCK(ae->ARWLock);
  }
  if (i <= 3) {
    GET_LD
    if (truePrologFlag(PLFLAG_ISO) &&
	info->Posfix != 0) /* there is a posfix operator */ {
      /* ISO dictates */
      WRITE_UNLOCK(info->OpRWLock);
      Yap_Error(PERMISSION_ERROR_CREATE_OPERATOR,MkAtomTerm(a),"op/3");
      return FALSE;
    }
    info->Infix = p;
  } else if (i <= 5) {
开发者ID:jfmc,项目名称:yap-6.3,代码行数:55,代码来源:init.c

示例13: Ord

Ord WeakFormNSNewton::BilinearFormNonsymVel_0_1::ord(int n, double *wt, Func<Ord> *u_ext[], Func<Ord> *u, Func<Ord> *v, GeomVol<Ord> *e,
  Func<Ord>* *ext) const
{
  Ord result = Ord(0);
  if (!Stokes)
  {
    Func<Ord>* xvel_prev_newton = u_ext[0];
    for (int i = 0; i < n; i++)
      result += wt[i] * u->val[i] * xvel_prev_newton->dy[i] * v->val[i];
  }
  return result;
}
开发者ID:hpfem,项目名称:hermes-examples,代码行数:12,代码来源:definitions.cpp

示例14: Distribute

void Distribute(SLList *L,int i,ArrType f,ArrType e)    /*Distribute() function */
{  int j,p;
   for(j=0;j<RD;j++)
      f[j]=0;
   for(p=L->r[0].next;p;p=L->r[p].next)
   {  j=Ord(L->r[p].keys[i]);                              /*call Ord() */
      if(!f[j])
         f[j]=p;
      else
         L->r[e[j]].next=p;
      e[j]=p;
   }/*end of for */
}/*end of Distrubute() function */
开发者ID:zyxstar,项目名称:md_note,代码行数:13,代码来源:81.c

示例15: ChkZero

END

/*---------------------------------------------------------------------------*/

static void ChkZero(char *Asc, Byte *erg)
{
  if ((strlen(Asc) > 1) && ((*Asc == '<') || (*Asc == '>')))
  {
    *erg = Ord(*Asc == '<') + 1;
    strmov(Asc, Asc + 1);
  }
  else
    *erg = 0;
}
开发者ID:begoon,项目名称:asl,代码行数:14,代码来源:code65.c


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