Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* jednorozmerna nezaporna funkce: R -> R+ */ | ||
struct funkce_1d { | ||
double (*f)(double); /* fce vracejici hodnotu */ | ||
double a, b; /* interval, na kterem chceme pocitat funkci (integral) */ | ||
double If; /* skutecna (presna) hodnota integralu z f predpocitana analyticky */ | ||
|
||
double c; /* funkce je na [a; b] omezena touto konstantou */ | ||
|
||
double (*g)(double); /* na [a; b] plati: f(x) >= g(x) */ | ||
double Ig; /* integral z funkce g na intervalu [a; b] */ | ||
|
||
char *jmeno; /* symbolicky zapis funkce f */ | ||
char *jmeno_g; /* symbolicky zapis funkce g */ | ||
}; | ||
|
||
/* n-rozmerna nezaporna funkce: R^dim -> R+ */ | ||
struct funkce_nd { | ||
unsigned int dim; /* dimenze definicniho oboru */ | ||
double (*f)(double *); /* fce vracejici hodnotu, rozmer pole musi byt presne dim */ | ||
double *a, *b; /* vicerozmerny intergal, na kterem pocitame (integral) */ | ||
double c; /* konstanta omezujici f na [a; b] */ | ||
char *jmeno; /* pro hezci vypisy */ | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* Jednorozmerna nahodna hodnota mezi a a b */ | ||
double rovnom_1d(double a, double b); | ||
|
||
/* 2-rozmerna nahodna hodnota, hodnotu zapise na adresu out */ | ||
/* n-rozmerna nahodna hodnota, hodnotu zapise na adresu out */ | ||
void rvonom_nd(double *a, double *b, unsigned int dim, double *out); |