|
Last change
on this file was
7811,
checked in by westram, 14 years ago
|
|
merge from dev [7748] [7749] [7750]
- comments (C→C++ style)
- fixed umlauts in TREEGEN
|
-
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 | { |
|---|
| 21 | int values, // Anzahl Werte |
|---|
| 22 | *border; // Die Grenzwerte |
|---|
| 23 | |
|---|
| 24 | } *Spreading; |
|---|
| 25 | |
|---|
| 26 | #ifdef __cplusplus |
|---|
| 27 | extern "C" { |
|---|
| 28 | #endif |
|---|
| 29 | |
|---|
| 30 | Spreading newSpreading (double *value, int values); |
|---|
| 31 | void freeSpreading (Spreading s); |
|---|
| 32 | |
|---|
| 33 | int spreadRand (Spreading s); |
|---|
| 34 | |
|---|
| 35 | #ifdef __cplusplus |
|---|
| 36 | } |
|---|
| 37 | #endif |
|---|
| 38 | |
|---|
| 39 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.