Overview   Project   Class   Tree   Deprecated   Index 
CbrVideoDoc
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

CbrVideo
Class Cbr

   in cbr.h
   in cbr.cpp

class Cbr


Inner Classes, Typedefs, and Enums
struct Cbr::a_case
          
 
Method Summary
 void AddNewCase( struct Cbr::a_case thenewcase )
          Method to add a new case to the case array.
 void CompareCasesRetrieve( struct Cbr::a_case thenewcase, int* best, int* second, int* third )
          Method that compares the resemblence between the new case and all cases in the case database, taking weights into account.
 double CompareCasesReuse( struct Cbr::a_case firstcase, struct Cbr::a_case secondcase )
          Method that compares the resemblence between the new case and the retrieved case, without taking weights into account.
 void RaiseAlarm( int alarm )
          Methods that decides what to do when an alarm is raised, or when an alarm is not raised.
 void ReadCasesFromDB()
          Method that reads all cases from Database file and puts them in an array.
 void Retain( int args, struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third )
          Method that controls the retain stage of cbr.
 void Retrieve( struct Cbr::a_case thenewcase )
          Method that supervises the retrieve stage of cbr.
 void Reuse( struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third )
          Method that controls the reuse stage of cbr.
 int Revise( struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third, int args, int* found )
          Method that controls the revise stage of cbr.
 void UpdateDataBase()
          Method that updates the database file, i.
 void UpdateWeight( int args, struct Cbr::a_case thenewcase, int oldcaseindex )
          Method that update the weights for the retrieved case according to some parameters.
 

Method Detail

AddNewCase

public void AddNewCase( struct Cbr::a_case thenewcase );
Method to add a new case to the case array.
Parameters:
thenewcase - The new case which is to be added to the database.

CompareCasesRetrieve

public void CompareCasesRetrieve( struct Cbr::a_case thenewcase, int* best, int* second, int* third );
Method that compares the resemblence between the new case and all cases in the case database, taking weights into account. This method finds the three best cases that resembles the new case best.
Parameters:
thenewcase - The case that is to be compared with the cases in the case base.
best - The best matching case.
second - The second best matching case.
third - The third best matching case.

CompareCasesReuse

public double CompareCasesReuse( struct Cbr::a_case firstcase, struct Cbr::a_case secondcase );
Method that compares the resemblence between the new case and the retrieved case, without taking weights into account.
Parameters:
firstcase - The first case that is to be compared.
secondcase - The second case that is to be compared.

RaiseAlarm

public void RaiseAlarm( int alarm );
Methods that decides what to do when an alarm is raised, or when an alarm is not raised.
Parameters:
alarm - A value to specify if an alarm is to be raised or not.

ReadCasesFromDB

public void ReadCasesFromDB();
Method that reads all cases from Database file and puts them in an array.

Retain

public void Retain( int args, struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third );
Method that controls the retain stage of cbr.
Parameters:
args - A variable which tells the method if cbr was succesfull or not.
thenewcase - The new case presented to the system.
oldcaseindex - The position of the best matching case in the case array.
second - The position of the second best matching case in the case array.
third - The position of the third best matching case in the case array.

Retrieve

public void Retrieve( struct Cbr::a_case thenewcase );
Method that supervises the retrieve stage of cbr.
Parameters:
thenewcase - The new case presented to the system.

Reuse

public void Reuse( struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third );
Method that controls the reuse stage of cbr.
Parameters:
thenewcase - The new case presented to the system.
oldcaseindex - The position of the best matching case in the case array.
second - The position of the second best matching case in the case array.
third - The position of the third best matching case in the case array.

Revise

public int Revise( struct Cbr::a_case thenewcase, int oldcaseindex, int second, int third, int args, int* found );
Method that controls the revise stage of cbr.
Parameters:
thenewcase - The new case presented to the system.
oldcaseindex - The position of the best matching case in the case array.
second - The position of the second best matching case in the case array.
third - The position of the third best matching case in the case array.
args - A veriable that is used to determine when revise is sucessfull.
args - A veriable that is used to determine if revise is sucessfull.'

UpdateDataBase

public void UpdateDataBase();
Method that updates the database file, i.e. writes the database file with the new data.

UpdateWeight

public void UpdateWeight( int args, struct Cbr::a_case thenewcase, int oldcaseindex );
Method that update the weights for the retrieved case according to some parameters.
Parameters:
args - A variable which tells the method if cbr was succesfull or not.
thenewcase - The new case presented to the system.
oldcaseindex - The position of the retrieved case in the case array.

 Overview   Project   Class   Tree   Deprecated   Index 
CbrVideoDoc
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD