home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / thesis / zhongy / prob / prob_based.h < prev    next >
C/C++ Source or Header  |  1994-12-14  |  1KB  |  57 lines

  1. #ifndef PROB_H
  2. #define PROB_H
  3.  
  4.  
  5.  
  6.  
  7. #define NMaxCharactersProblem 40
  8. #define NMaxCharactersSymptom 100
  9. #define NMaxProblems 92
  10. #define NMaxSymptoms 144
  11. #define NProblemsInitiallList 5
  12. #define NLines 18
  13.  
  14.  
  15.  
  16.  
  17. typedef struct ProblemSymptomType {
  18.           int Number;
  19.           int times;
  20.           float Likehood;
  21.           struct ProblemSymptomType *Next;
  22.           };
  23.  
  24. struct ProblemSymptomType  *SymptomsProblem[NMaxProblems];
  25.  
  26. int Problem_Times[NMaxProblems];
  27. int NumberofProblems,NumberofSymptoms;
  28. char ProblemName[NMaxProblems][NMaxCharactersProblem];  /*starrt from 1*/
  29. char SymptomName[NMaxSymptoms][NMaxCharactersSymptom];
  30.  
  31.  
  32. void PDB();
  33.  
  34. void ReadFromFile(void);
  35.  
  36. void NormalizePriorProbability(void);
  37.  
  38. void CalculateProbabilitySymptoms(void);
  39.  
  40. void CalculateProbabilitiesProblems(void);
  41.  
  42. void OrderProblemsByProbability(void);
  43.  
  44. void ListProblemsByProbability(void);
  45.  
  46. void Diagnosis_START(void);
  47.  
  48. int SearchProblem(char Name2[NMaxCharactersProblem]);
  49.  
  50. int SearchSymptom(char Name1[NMaxCharactersSymptom]);
  51.  
  52. void SaveInFile(void);
  53.  
  54.  
  55. #endif
  56.  
  57.