MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / Find

Method Find

src/fflib/AFunction2.cpp:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85double VersionNumber();
86
87OneOperator::pair_find OneOperator::Find(const ArrayOfaType & at)const
88 {
89 const OneOperator *w=0,*oo;
90 int nn=0,p=-10000;
91 for (int ncast=0;ncast<=n;ncast++) // loop on the number of cast
92 {
93 p=-10000;
94 for (oo=this;oo;oo=oo->next)
95 if (oo->pref>=p && oo->WithCast(at,ncast))
96 {
97 if(p<oo->pref) {nn=0;p=oo->pref;}
98 nn++;
99 w=oo;}
100 if (nn) return make_pair(w,nn);
101 }
102 for (oo=this;oo;oo=oo->next)
103 if (oo->WithCast(at))
104 {nn++;
105 w=oo;}
106 return make_pair(w,nn);
107}
108
109OneOperator::pair_find OneOperator::FindWithOutCast(const ArrayOfaType & at)const
110 {

Callers 3

C_F0Method · 0.45
FindTypeFunction · 0.45
FindFunction · 0.45

Calls 5

WithCastMethod · 0.80
ShowFunction · 0.70
maxFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected