|
Last change
on this file was
5128,
checked in by westram, 18 years ago
|
- removed my own strange defines
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
957 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 EIntrge 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.