|
Last change
on this file was
16766,
checked in by westram, 8 years ago
|
|
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
914 bytes
|
| Line | |
|---|
| 1 | #ifndef SPREADIN_H |
|---|
| 2 | #define SPREADIN_H |
|---|
| 3 | |
|---|
| 4 | #ifndef DEFINES_H |
|---|
| 5 | #include "defines.h" |
|---|
| 6 | #endif |
|---|
| 7 | |
|---|
| 8 | // Ein Spreading ist eine Tabelle von Integerwerten, welche den Bereich |
|---|
| 9 | // 0 bis RAND_MAX-1 abdeckt. |
|---|
| 10 | /* */ |
|---|
| 11 | // Aus einer Wahrscheinlichkeitstabelle (z.B. loopProb oder helixProb) |
|---|
| 12 | // wird hier eine Integertabelle mit Grenzwerten erzeugt um Flieskommarechnung |
|---|
| 13 | // zu umgehen. |
|---|
| 14 | /* */ |
|---|
| 15 | // Die Funktion spreadRand() liefert analog zu den Wahrscheinlichkeiten in |
|---|
| 16 | // der Wahrscheinlichkeitstabelle verteilte Werte zwischen 0 und der |
|---|
| 17 | // Anzahl der EIntraege in der Wahrscheinlichkeitstabelle. |
|---|
| 18 | |
|---|
| 19 | typedef struct S_Spreading { |
|---|
| 20 | int values, // Anzahl Werte |
|---|
| 21 | *border; // Die Grenzwerte |
|---|
| 22 | |
|---|
| 23 | } *Spreading; |
|---|
| 24 | |
|---|
| 25 | #ifdef __cplusplus |
|---|
| 26 | extern "C" { |
|---|
| 27 | #endif |
|---|
| 28 | |
|---|
| 29 | Spreading newSpreading (double *value, int values); |
|---|
| 30 | void freeSpreading (Spreading s); |
|---|
| 31 | |
|---|
| 32 | int spreadRand (Spreading s); |
|---|
| 33 | |
|---|
| 34 | #ifdef __cplusplus |
|---|
| 35 | } |
|---|
| 36 | #endif |
|---|
| 37 | |
|---|
| 38 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.