本文整理汇总了C++中Fonc_Num::dimf_out方法的典型用法代码示例。如果您正苦于以下问题:C++ Fonc_Num::dimf_out方法的具体用法?C++ Fonc_Num::dimf_out怎么用?C++ Fonc_Num::dimf_out使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fonc_Num
的用法示例。
在下文中一共展示了Fonc_Num::dimf_out方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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
);
}
示例3: 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);
}
示例4: 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;
}
示例5:
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)
);
}
示例6:
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
);
}
示例7: FillStat
void FillStat(cXml_StatVino & aStat,Flux_Pts aFlux,Fonc_Num aFonc)
{
aFonc = Rconv(aFonc);
int aNbCh = aFonc.dimf_out();
aStat.Soms().resize(aNbCh,0.0);
aStat.Soms2().resize(aNbCh,0.0);
aStat.ECT().resize(aNbCh,0.0);
aStat.VMax().resize(aNbCh,0.0);
aStat.VMin().resize(aNbCh,0.0);
Symb_FNum aSF(aFonc);
ELISE_COPY
(
aFlux,
Virgule(1.0,aSF,Square(aSF)),
Virgule
(
sigma(aStat.Nb()),
sigma(VData(aStat.Soms()),aNbCh) | VMin(VData(aStat.VMin()),aNbCh) | VMax(VData(aStat.VMax()),aNbCh),
sigma(VData(aStat.Soms2()),aNbCh)
)
);
double aNb = aStat.Nb();
aStat.IntervDyn() = Pt2dr(0,0);
for (int aK=0 ; aK<aNbCh ; aK++)
{
aStat.Soms()[aK] /= aNb;
aStat.Soms2()[aK] /= aNb;
aStat.ECT()[aK] = sqrt(ElMax(0.0,aStat.Soms2()[aK]-ElSquare(aStat.Soms()[aK])));
aStat.IntervDyn().x += aStat.VMin()[aK];
aStat.IntervDyn().y += aStat.VMax()[aK];
}
aStat.IntervDyn() = aStat.IntervDyn() / aNbCh;
}
示例8: dimf_out
virtual INT dimf_out() const
{
return _f.dimf_out();
}
示例9: dimf_out
virtual INT dimf_out() const
{
return _dim_out + (mCatFoncInit?_f.dimf_out() : 0);
}
示例10:
Simple_Buffered_Op_Comp<Tout,Tin>::Simple_Buffered_Op_Comp
(
const Arg_Fonc_Num_Comp & arg,
INT dim_out,
Fonc_Num f0,
Box2di side_0,
Simple_OPBuf1<Tout,Tin> * calc,
INT nb_pack_y,
bool aCatFoncInit
) :
Fonc_Num_OPB_TPL<Tout>
(
arg,
dim_out,
Arg_FNOPB
(
f0,
Box2di
(
side_0._p0,
side_0._p1+Pt2di(0,nb_pack_y-1)
),
type_of_ptr((const Tin *)0)
),
Arg_FNOPB::def,
Arg_FNOPB::def,
aCatFoncInit
),
_calc (0),
_pcalc (0)
{
calc->_first_line = true;
calc->_ycur = this->_y0;
calc->_nb_pack_y = nb_pack_y;
calc->_y_in_pack = 0;
calc->_x0 = this->_x0;
calc->_x1 = this->_x1;
calc->_y0 = this->_y0;
calc->_y1 = this->_y1;
calc->_dx0 = side_0._p0.x;
calc->_dy0 = side_0._p0.y;
calc->_dx1 = side_0._p1.x;
calc->_dy1 = side_0._p1.y;
calc->_x0Buf = calc->_x0 + calc->_dx0;
calc->_x1Buf = calc->_x1 + calc->_dx1;
calc->_y0Buf = calc->_dy0;
calc->_y1Buf = calc->_dy1 + nb_pack_y;
calc->_dim_in = f0.dimf_out();
calc->_dim_out = this->idim_out();
calc->_integral = this->integral();
_calc = calc->dup_comp();
_calc->_first_line =calc->_first_line;
_calc->_ycur = calc->_ycur;
_calc->_x0 = calc->_x0;
_calc->_x1 = calc->_x1;
_calc->_y0 = calc->_y0;
_calc->_y1 = calc->_y1;
_calc->_dx0 = calc->_dx0;
_calc->_dx1 = calc->_dx1;
_calc->_dy0 = calc->_dy0;
_calc->_dy1 = calc->_dy1;
_calc->_x0Buf = calc->_x0Buf;
_calc->_x1Buf = calc->_x1Buf;
_calc->_y0Buf = calc->_y0Buf;
_calc->_y1Buf = calc->_y1Buf;
_calc->_nb_pack_y = calc->_nb_pack_y;
_calc->_y_in_pack = calc->_y_in_pack;
_calc->_dim_in = calc->_dim_in ;
_calc->_dim_out = calc->_dim_out ;
_calc->_integral = calc->_integral;
_pcalc = PRC_Simple_OPBuf1<Tout,Tin>(_calc);
}
示例11: GrShade_main
//.........这里部分代码省略.........
Symb_FNum aNx (aGx/aNG);
Symb_FNum aNy (aGy/aNG);
Symb_FNum aNz (1/aNG);
Pt2dr aDirS = Pt2dr::FromPolar(1.0,anAzimut) * Pt2dr(1,0);
double aSx = aDirS.x * sin(aTetaH);
double aSy = aDirS.y * sin(aTetaH);
double aSz = cos(aTetaH);
Symb_FNum aScal(aNx*aSx+aNy*aSy+aNz*aSz);
std::cout << "AAAAAAAaa" << endl;
double aMul = (aModeOmbre=="Mixte") ? aVPdsFiltre[2] : 1.0;
ELISE_COPY
(
rectangle(Pt2di(0,0),aSzIn),
Max(0,aShade.in() + 255*aScal * aMul),
aShade.out()
);
SPds += aMul;
std::cout << "BBBBbbb" << endl;
}
}
if (! Done)
{
ELISE_ASSERT(false,"Unknown ModeOmbre");
}
Fonc_Num aFoncRes = Max(0,Min(255,aShade.in()/SPds));
if (WithHypso)
{
Fonc_Num aFIntens = aFoncRes;
Fonc_Num aFTeinte = trans(aFIn,aP0In)*aHypsoDyn;
Fonc_Num aFSat = 255*aHypsoSat;
if (aNameCol!="")
{
Tiff_Im aFileCol = Tiff_Im::StdConvGen(aDir+aNameCol,-1,true,false);
Symb_FNum aFNC(trans(rgb_to_its(aFileCol.in()),aP0In));
if (aModeColor == "IntensShade")
{
aFIntens = aFoncRes;
aFTeinte = aFNC.v1();
aFSat = aFNC.v2();
}
else if (aModeColor == "BackRGB")
{
aFIntens = aIMasq.in()*aFoncRes + (1- aIMasq.in()) * aFNC.v0();
aFTeinte = aFNC.v1();
aFSat = aFNC.v2() * (1- aIMasq.in());
}
else if (aModeColor == "GrayBackRGB")
{
aFIntens = aIMasq.in()*aFoncRes + (1- aIMasq.in()) * aFNC.v0();
aFTeinte = aFNC.v1();
aFSat = aFNC.v2()*(1-aIMasq.in());
}
else
{
ELISE_ASSERT(false,"Unknown mode color");
}
}
aFoncRes = its_to_rgb(Virgule(aFIntens,aFTeinte,aFSat));
//aFoncRes = its_to_rgb(Virgule(aFoncRes,trans(aFIn,aP0In)*aHypsoDyn,255*aHypsoSat));
}
/*
if (WithCol)
{
Tiff_Im aFileCol(aNameCol.c_str());
Symb_FNum aFNC(trans(rgb_to_its(aFileCol.in()),aP0In));
aFoncRes = its_to_rgb(Virgule(aFoncRes,aFNC.v1(),aFNC.v2()*aHypsoSat));
// aFoncRes = aFileCol.in();
}
*/
// Tiff_Im::Create8BFromFonc(aNameOut,aShade.sz(),aShade.in()/SPds);
cout << "WithHypso " << WithHypso << " DIM " << aFoncRes.dimf_out() << endl;
Box2di aBoxOut = aDecoup.KthIntervOut(aKDec);
ELISE_COPY
(
rectangle(aBoxOut.P0()-aP0Glob,aBoxOut.P1()-aP0Glob),
trans(aFoncRes,aP0Glob-aP0In),
aTifOut.out()
);
}
return EXIT_SUCCESS;
}
else return EXIT_SUCCESS;
}