本文整理汇总了C++中Fonc_Num类的典型用法代码示例。如果您正苦于以下问题:C++ Fonc_Num类的具体用法?C++ Fonc_Num怎么用?C++ Fonc_Num使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Fonc_Num类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PSz
Fonc_Num RectKth_Pondere
(
Fonc_Num f1,
Fonc_Num f2,
REAL kth,
INT side,
INT max_vals
)
{
cout << "!!!!!!!!!!!!!!!!!!!!! Non benche !!!!!!!!!!!!\n";
ELISE_ASSERT
(
(f1.dimf_out()==1) && (f2.dimf_out() ==1),
"Bad Dim in Rect_Pondere"
);
Pt2di PSz(side,side);
return new Kieme_Opb_Not_Comp
(
Virgule(f1,f2),
kth,
Box2di(-PSz,PSz),
max_vals,
Histo_Kieme::KTH,
Histo_Kieme::undef,
false,
true
);
}
示例2: AddF
void cDico_SymbFN::AddF(Fonc_Num aF)
{
Fonc_Num::tKindOfExpr aK = aF.KindOfExpr();
if (
(aK == Fonc_Num::eIsICste)
|| (aK == Fonc_Num::eIsRCste)
|| (aK == Fonc_Num::eIsVarSpec)
)
return;
cCelDico_SFN & aCel = mDic[aF];
// Lorsque l'expression est marquee comme interessante,
// on force l'emission de symbole pour clarifier
if (aF.HasNameCpp())
aCel.mNbRef++;
aCel.mNbRef++;
if ((!aF.IsVarSpec()) && (aCel.mNbRef == 2))
{
aCel.mNum = mNumSymb++;
tPair * aPair = &(*mDic.find(aF));
mVSymb.push_back(aPair);
}
}
示例3: compute
Fonc_Num_Computed * compute (const Arg_Fonc_Num_Comp & arg)
{
Box2di b(0);
Tjs_El_User.ElAssert
(
arg.flux()->is_rect_2d(b),
EEM0 << "Must use operator created by `create_op_buf_simple_tpl'"
<< " with 2D rectangle flux"
);
INT nbpcky = mOptimizeNbPackY ?
adjust_nb_pack_y(_nb_pack_y,b._p1.y-b._p0.y) :
_nb_pack_y ;
Simple_OPBuf_Gen * calc = 0;
if (_f.integral_fonc(true))
calc = _calc_I;
else
calc = _calc_R;
Fonc_Num f = calc->adapt_box(_f,b);
if (f.integral_fonc(true))
return new Simple_Buffered_Op_Comp<INT,Itin>
(arg,_dim_out,f,_side,_calc_I,nbpcky,mCatFoncInit);
else
return new Simple_Buffered_Op_Comp<REAL,Rtin>
(arg,_dim_out,f,_side,_calc_R,nbpcky,mCatFoncInit);
}
示例4: ValFonc
REAL SurfIER_Fonc_Num_Not_Comp::ValFonc(const PtsKD & pts) const
{
return mFctr
(
Pt2dr(fCEl.x.ValFonc(pts),fCEl.y.ValFonc(pts)),
fA.ValFonc(pts),fB.ValFonc(pts),fC.ValFonc(pts),
Pt2dr(fP0.x.ValFonc(pts),fP0.y.ValFonc(pts)),
Pt2dr(fP1.x.ValFonc(pts),fP1.y.ValFonc(pts))
);
}
示例5: ELISE_ASSERT
Fonc_Num SurfIER_Fonc_Num_Not_Comp::deriv(INT k) const
{
ELISE_ASSERT(mFctr==SurfIER,"SurfIER_Fonc_Num_Not_Comp::deriv");
return
fCEl.x.deriv(k) * FNF("DerCElXSurfIER",DerCElXSurfIER)
+ fCEl.y.deriv(k) * FNF("DerCElYSurfIER",DerCElYSurfIER)
+ fA.deriv(k) * FNF("DerASurfIER",DerASurfIER)
+ fB.deriv(k) * FNF("DerBSurfIER",DerBSurfIER)
+ fC.deriv(k) * FNF("DerCSurfIER",DerCSurfIER)
+ fP0.x.deriv(k) * FNF("DerP0XSurfIER",DerP0XSurfIER)
+ fP0.y.deriv(k) * FNF("DerP0YSurfIER",DerP0YSurfIER)
+ fP1.x.deriv(k) * FNF("DerP1XSurfIER",DerP1XSurfIER)
+ fP1.y.deriv(k) * FNF("DerP1YSurfIER",DerP1YSurfIER);
}
示例6: OP_un_Ndim_Comp_RI
Fonc_Num_Computed * OP_Naire_Not_Comp::compute
(const Arg_Fonc_Num_Comp & arg)
{
Fonc_Num_Computed * fc = _f.compute(arg);
Tjs_El_User.ElAssert
(
_accept_dim_in(fc->idim_out()),
EEM0
<< " Unexpected dimension for operator " << _name << "\n"
<< "| dim = " << fc->idim_out()
);
INT dout = _dim_out(fc->idim_out());
if (fc->integral())
{
if( _real)
return new OP_un_Ndim_Comp_RI(arg,fc,arg.flux(),dout,_fri);
else
return new OP_un_Ndim_Comp_II(arg,fc,arg.flux(),dout,_fii);
}
else
{
if ( _real)
return new OP_un_Ndim_Comp_RR(arg,fc,arg.flux(),dout,_frr);
else
return new OP_un_Ndim_Comp_IR(arg,fc,arg.flux(),dout,_fir);
}
}
示例7: skeleton_gen
Fonc_Num skeleton_gen(Fonc_Num f,INT max_d,L_ArgSkeleton larg,bool AvecDist)
{
Data_ArgSkeleton askel(10,10,larg);
INT d = (max_d + 1)/2 + 2; // euclid dist
if (askel._ang >0)
{
REAL da = (d * 1.2) / cos(atan(askel._ang+1)) +2;
d = std::max (d,round_up(da));
}
d = std::max(d,askel._surf+2);
INT per_reaf = (INT) (3 * d) + 5;
per_reaf = std::max(per_reaf,500);
return create_op_buf_simple_tpl
(
new Skel_OPB_Comp(larg,AvecDist),
f,
AvecDist ? 2 : f.dimf_out(),
Box2di(d),
per_reaf
);
}
示例8: PutFonc
void cDico_SymbFN::PutFonc(Fonc_Num aF,cElCompileFN & aComp)
{
tIter anIt = mDic.find(aF);
if (anIt==mDic.end())
{
aF.compile(aComp);
return;
}
cCelDico_SFN & aCel = anIt->second;
if ( aCel.mSymbPut)
aComp << aCel.NameSymb();
else
aF.compile(aComp);
}
示例9: PutSymbs
void cDico_SymbFN::PutSymbs(cElCompileFN & anEnv)
{
for (INT aK=0 ; aK<INT(mVSymb.size()) ; aK++)
{
tPair * aPair = mVSymb[aK];
Fonc_Num aPF = aPair->first;
anEnv << " double "
<< aPair->second.NameSymb()
<< " = "
<< aPF << ";" ;
if (aPF.HasNameCpp())
anEnv << " // " << aPF.NameCpp();
anEnv << "\n";
aPair->second.mSymbPut = true;
}
anEnv << "\n";
}
示例10: SetNbEquation
void SystLinSurResolu::PushDifferentialEquation
(
Fonc_Num aFonc,
const PtsKD & aPts,
REAL aPds
)
{
INT anIndEq = mNbEqCur;
SetNbEquation(mNbEqCur+1);
mDataB[anIndEq] = - aFonc.ValFonc(aPts);
for (INT iVar=0; iVar<mNbVarCur ; iVar++)
{
mDataA[anIndEq][iVar] = aFonc.ValDeriv(aPts,iVar);
mDataB[anIndEq] += mDataA[anIndEq][iVar] * aPts(iVar);
}
mDataPds[anIndEq] = aPds;
}
示例11: skeleton_and_dist
Fonc_Num skeleton_and_dist(Fonc_Num f,INT max_d,L_ArgSkeleton larg)
{
Tjs_El_User.ElAssert
(
f.dimf_out()==1,
EEM0 << "dim should equal 1 in skeleton_and_dist"
);
return skeleton_gen(f,max_d,larg,true);
}
示例12: rectangle
template <class Type> void bench_op_buf_cat
(
Type *,
Fonc_Num aOpFonc,
Fonc_Num aFoncInit,
Fonc_Num aFoncCat,
Pt2di p0,
Pt2di p1
)
{
INT dOp = aOpFonc.dimf_out();
INT dInit = aFoncInit.dimf_out();
INT dTot = aFoncCat.dimf_out();
BENCH_ASSERT(dTot== (dInit+dOp));
Type * dif = new Type [dTot];
ELISE_COPY
(
rectangle(p0,p1),
Abs(aFoncCat-Virgule(aOpFonc,aFoncInit)),
sigma(dif,dTot)
);
for (INT d=0; d<dTot ; d++)
{
BENCH_ASSERT(dif[d]==0);
}
delete [] dif;
}
示例13: CmpFormelIfSameKind
INT SurfIER_Fonc_Num_Not_Comp::CmpFormelIfSameKind(Fonc_Num_Not_Comp * aF2)
{
SurfIER_Fonc_Num_Not_Comp * pSFNC = (SurfIER_Fonc_Num_Not_Comp *) aF2;
INT res = CmpTertiare(mName,pSFNC->mName);
if (res) return res;
res = fCEl.x.CmpFormel(pSFNC->fCEl.x);
if (res) return res;
res = fCEl.y.CmpFormel(pSFNC->fCEl.y);
if (res) return res;
res = fA.CmpFormel(pSFNC->fA);
if (res) return res;
res = fB.CmpFormel(pSFNC->fB);
if (res) return res;
res = fC.CmpFormel(pSFNC->fC);
if (res) return res;
res = fP0.x.CmpFormel(pSFNC->fP0.x);
if (res) return res;
res = fP0.y.CmpFormel(pSFNC->fP0.y);
if (res) return res;
res = fP1.x.CmpFormel(pSFNC->fP1.x);
if (res) return res;
res = fP1.y.CmpFormel(pSFNC->fP1.y);
if (res) return res;
return 0;
}
示例14: Tfonc_a_trou
template <class Type> Fonc_Num Tfonc_a_trou(Fonc_Num f,Liste_Pts<Type,INT> l)
{
Tjs_El_User.ElAssert
(
f.dimf_out() <= l.dim()-2,
EEM0 << "fonc_a_trou : Fonc_Num.dimf_out() > Liste_Pts.dim()-2"
);
return create_op_buf_simple_tpl
(
new FoncATrou_OPB_Comp<Type> (l),
0,
f,
l.dim()-2,
Box2di(0)
);
}
示例15:
Fonc_Num_Computed * Kieme_Opb_Not_Comp::compute(const Arg_Fonc_Num_Comp & arg)
{
return new Kieme_Opb_Comp
(
arg,
(mModePond ? 1 : _f.dimf_out()),
_f,
_side,
_kth,
_mode,
_max_vals,
_mode_res,
mCatInit,
mModePond
);
}