-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEXISTBAN.C
46 lines (46 loc) · 1020 Bytes
/
EXISTBAN.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
int exist_band0(f,a,n) float f;/* odleglosc prazka*/
band *a;/* array of band */
unsigned int n;/* size of array */
{
int i;
for(i=0;i<n;i++)
{
if(a[i].met<0) continue;// skip killed bands
if((a[i].kbz-epsilon<f)&&(f<a[i].kbz+epsilon))
return 1;
}
return 0;
}*/
/*
int exist_band1(f,a,n) float f;/* odleglosc prazka*/
band *a;/* array of band */
unsigned int n;/* size of array */
{
int i;
float test;
for(i=0;i<n;i++)
{
if(a[i].met<0) continue;// skip killed bands
/* UWZGLEDNIENIE KROCZACEGO EPSILONA */
if(AppType)
{
if(
( (test=aproxymation(a[i].met-epsilon))>f )&&
( f>aproxymation(a[i].met+epsilon) )
) return 1;/* Aproksymacje powinny spelniac warunek
y=f(x) jest funkcja malejaca */
test=0;
}
else
{
if(
(a[i].kbz-epsilon<f)&&(f<a[i].kbz+epsilon)
) return 1;/* Przy braku aproksymacji pola kbz
i met sa rowne i y=f(x) jest
rosnace */
}
}
return 0;
}
*/