dlvhex  2.5.0
BaseTopology Class Reference
Inheritance diagram for BaseTopology:
Collaboration diagram for BaseTopology:

Public Member Functions

void setAll (int NumConstant, int NumPredicate, int SizeOfHead, int SizeOfBody, int NotProbability, int NumRule, int NumModules, std::string &OutputFilePrefix)
void generate ()

Protected Member Functions

int * createAtom (int idxModule, int idxPredicate, std::string content, int maxToRand, std::ostream &oss)
void createGroundAtom (int idxModule, int idxPredicate, std::ostream &oss)
int * createNonGroundAtom (int idxModule, int idxPredicate, std::ostream &oss)
void createModuleHeader (int idxModule, std::ostream &oss)
void generateFacts (int idxModule, std::ostream &oss)
void generateRule (int idxModule, std::ostream &ossResult)
void generateRules (int idxModule, std::ostream &oss)
void generateModuleCall (int idxModuleSrc, int idxModuleDest, std::ostream &oss)
virtual void createMainModule (std::ostream &oss)
virtual void createLibraryModule (int idxModule, std::ostream &oss)

Protected Attributes

std::string outputFilePrefix
int numConstantMax
int numPredicateMax
int sizeOfHeadMax
int sizeOfBodyMax
int notProbability
int numRuleMax
int numModules
int maxPredArity
std::vector< int > numInputPredVector
std::vector< std::vector< int > > listInputPreds
std::vector< std::vector< int > > numPredArity

Detailed Description

Definition at line 47 of file Module.cpp.


Member Function Documentation

int * BaseTopology::createAtom ( int  idxModule,
int  idxPredicate,
std::string  content,
int  maxToRand,
std::ostream &  oss 
) [protected]

Definition at line 195 of file Module.cpp.

References maxPredArity, and numPredArity.

Referenced by createGroundAtom(), and createNonGroundAtom().

void BaseTopology::createGroundAtom ( int  idxModule,
int  idxPredicate,
std::ostream &  oss 
) [protected]

Definition at line 213 of file Module.cpp.

References createAtom(), and numConstantMax.

Referenced by generateFacts().

virtual void BaseTopology::createLibraryModule ( int  idxModule,
std::ostream &  oss 
) [inline, protected, virtual]

Reimplemented in TreeTopology, RandomTopology, DiamondTopology, RingTopology, LineTopology, and StarTopology.

Definition at line 73 of file Module.cpp.

Referenced by generate().

virtual void BaseTopology::createMainModule ( std::ostream &  oss) [inline, protected, virtual]

Reimplemented in TreeTopology, RandomTopology, DiamondTopology, RingTopology, LineTopology, and StarTopology.

Definition at line 72 of file Module.cpp.

Referenced by generate().

int * BaseTopology::createNonGroundAtom ( int  idxModule,
int  idxPredicate,
std::ostream &  oss 
) [protected]

Definition at line 221 of file Module.cpp.

References createAtom(), and maxPredArity.

Referenced by generateRule().

Definition at line 367 of file Module.cpp.

References createLibraryModule(), createMainModule(), numModules, and outputFilePrefix.

Referenced by main().

void BaseTopology::generateRule ( int  idxModule,
std::ostream &  ossResult 
) [protected]
void BaseTopology::setAll ( int  NumConstant,
int  NumPredicate,
int  SizeOfHead,
int  SizeOfBody,
int  NotProbability,
int  NumRule,
int  NumModules,
std::string &  OutputFilePrefix 
)

Field Documentation

std::vector< std::vector<int> > BaseTopology::listInputPreds [protected]

Definition at line 60 of file Module.cpp.

Referenced by createModuleHeader(), generateModuleCall(), and setAll().

int BaseTopology::maxPredArity [protected]

Definition at line 58 of file Module.cpp.

Referenced by createAtom(), createNonGroundAtom(), generateRule(), and setAll().

Definition at line 55 of file Module.cpp.

Referenced by generateRule(), and setAll().

Definition at line 51 of file Module.cpp.

Referenced by createGroundAtom(), generateFacts(), and setAll().

std::vector<int> BaseTopology::numInputPredVector [protected]

Definition at line 59 of file Module.cpp.

Referenced by createModuleHeader(), generateModuleCall(), and setAll().

std::vector< std::vector<int> > BaseTopology::numPredArity [protected]

Definition at line 61 of file Module.cpp.

Referenced by createAtom(), createModuleHeader(), generateModuleCall(), and setAll().

Definition at line 52 of file Module.cpp.

Referenced by generateFacts(), generateModuleCall(), generateRule(), and setAll().

int BaseTopology::numRuleMax [protected]

Definition at line 56 of file Module.cpp.

Referenced by generateRules(), and setAll().

std::string BaseTopology::outputFilePrefix [protected]

Definition at line 50 of file Module.cpp.

Referenced by generate(), and setAll().

int BaseTopology::sizeOfBodyMax [protected]

Definition at line 54 of file Module.cpp.

Referenced by generateRule(), and setAll().

int BaseTopology::sizeOfHeadMax [protected]

Definition at line 53 of file Module.cpp.

Referenced by generateRule(), and setAll().


The documentation for this class was generated from the following file: