#include <ggalileiprg.h>
Public Member Functions | |
GGALILEIPrg (R::RPrgOutput *o) | |
virtual | ~GGALILEIPrg (void) |
Public Member Functions inherited from RInterpreter | |
void | Exec (const RString &insts) |
RCursor< RPrgClass > | GetClasses (void) const |
RInterpreter (RPrgOutput *o) | |
void | Run (const RURI &uri) |
virtual | ~RInterpreter (void) |
Additional Inherited Members | |
Protected Member Functions inherited from RInterpreter | |
void | AddClass (RPrgClass *c) |
void | AddInst (RPrgInst *inst) |
void | AddVar (RPrgVar *var) |
void | AnalyzeParams (void) |
void | CleanupParams (void) |
void | DelVar (RPrgVar *var) |
void | Eol (bool dbl) |
void | Exec (void) |
RPrgVar * | Find (const RString &name) const |
size_t | GetLine (void) const |
RString | GetToken (const RString chars) |
virtual RString | GetValue (const RString &var) |
RString | GetWord (void) |
RString | ReadLiteral (void) |
void | SkipSpaces (void) |
void | TreatInst (const RString &inst, size_t depth, RChar param) |
void | TreatLine (size_t depth, RString line) |
RString | WhatTreated (void) const |
Protected Attributes inherited from RInterpreter | |
const RChar * | Char |
RContainer< RPrgClass, true, false > | Classes |
RPrgOutput * | Cout |
RURI | File |
size_t | Line |
RContainer< RPrgVar, false, false > | Parameters |
RStack< RPrgScope, true, true, true > | Scopes |
RContainer< RPrgInstSub, false, true > | Subroutines |
RStack< RPrgInstBlock, false, true, true > | tmpBlocks |
Detailed Description
GALILEI Program.
The GGALILEIPrg provides a class for executing a GALILEI Program. In practice, it provides two classes 'GSession' and 'GGALILEIApp', and defines a global variable GALILEIApp of the type 'GGALILEIApp'.
The class 'GSession' can be used to manipulate the current GALILEI session from a script. Only one instance of this class may be created. If the session is not created, it will be created and destroyed by the instance. If the session is already created (for example if KGALILEICenter is already connected), the session is not destroyed. The class defines several methods:
- 'GSession(Name,YesDoc,YesProfiles,YesCommunities,YesTopics)': Constructor for a given session which may load the documents ('YesDocs'=="1"), the profiles ('YesProfiles'=="1"), the communities ('YesCommunities'=="1") and/or the topics ('YesTopics'=="1").
- 'SetRand(Value)': Set the random generator to 'Value'.
- 'ExecSql(SQL)': Execute the 'SQL' command.
- 'ComputeProfiles()': Compute the profiles.
- 'GroupProfiles()': Group the profiles.
- 'GroupDocs()': Group the documents.
- 'StartSimulation()': Create a new ideal clustering and new profiles.
- 'FdbksCycle()': Simulate that documents are shared inside the communities and that the best are assessed.
- 'CompareIdeal(Type)': Compare the computed 'Type' groups ("Community", "Topic") with the ideal one.
- 'AddIdeal()': Add a new subject to the ideal clustering and create new profiles associated to it.
- 'AddProfiles()': Add new profiles to a randomly chosen subject.
- 'RealLife(MaxStep,MinFBStep,MaxFBStep,Proba)': Perform the simulation of a complete system running 'MaxStep' times. The number of feedback processes to simulate before new profiles are created is [MinFBStep,MaxFBStep]. Each time new profiles must be created, there is a probability of 'Proba' that they will be issued from a new subject.
- 'AddAssessments()': Simulate that the profiles assess a given number of randomly chosen documents.
- 'TrackNewProfiles(Yes)': Specify if the new profiles must be tracked ('Yes'=="1") or not ('Yes'=="0").
- 'ClearNewProfiles()': Clear the list of profiles considered as new.
- 'RunStat(): Run all enabled statistics.
- 'ForceReCompute(Type)': All objects of a given type ("User","Doc", "Community" or "Topic") should be recomputed.
- 'SetSaveResults(Yes)': Specify if the results must be stored in the current storage ('Yes'=="1") or not ('Yes'=="0").
- 'PerformDegradation(What,Nb)': Perform a degradation. If 'What'=="0", the degradation process is launched. If 'What'=="1", the ideal clustering is used as the current one (eventually 'Nb' groups are split (Nb>0) or merged (Nb<0)). If 'What'=="2", a given percantage of documents are changed to another topic.
The class 'GGALILEIApp' is used to manipulate the GALILEI application from a script. Several methods are defined to manage configuration parameters of the plug-ins:
- 'SetOutput(FileName)': The global results should be stored in 'FileName'.
- 'SetGraphOutput(FileName)': The results for graphics should be stored in 'FileName'.
- 'SetStatsOutput(FileName)': The detailed results should be stored in 'FileName'.
- 'SetTest(Label)': Set the current test label to 'Label'.
- 'ComputeTime()': Compute the interval from the last called to ResetTime().
- 'ResetTime()': Reset the internal time counter.
- 'SetSimulationParam(Name,Value)': Assign a value 'Value' to the parameter 'Name' used for simulation purposes.
- 'SetPlugInParam(Type,PlugIn,Name,Value)': Assign a value 'Value' to the parameter 'Name' of the plug-in 'PlugIn' of the type 'Type'.
- 'SetCurrentPlugIn(Type,PlugIn)': Set the current plug-in 'PlugIn' for the type 'Type'.
- 'SetMeasureParam(Type,PlugIn,Name,Value)': Assign a value 'Value' to the parameter 'Name' of the measure 'PlugIn' of the type 'Type'.
- 'SetCurrentMeasure(Type,PlugIn)': Set the current measure 'PlugIn' for the type 'Type'.
Is here an example of a program file used to set some parameters:
Constructor & Destructor Documentation
GGALILEIPrg | ( | R::RPrgOutput * | o | ) |
Constructor.
- Parameters
-
o Generic output class.
|
virtual |
Destruct.