|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLAILOGIC::CFirstOrderOperator Class Reference#include <fo_operator.h>
Inheritance diagram for NLAILOGIC::CFirstOrderOperator:
List of all members.
Public Methods |
| CFirstOrderOperator () |
| CFirstOrderOperator (const CFirstOrderOperator &) |
| ~CFirstOrderOperator () |
std::list< CFactPattern * > * | forward (CFactPattern *) |
| Gives the postcondition for a CFact in the preconditions. More...
|
std::list< CFactPattern * > * | backward (CFactPattern *) |
| Gives the precondition for a CFact in the postconditions. More...
|
void | addPrecondition (CFactPattern *) |
| Adds a first order logic precondition to the operator. More...
|
void | addPostcondition (CFactPattern *) |
| Adds a first order logic postcondition to the operator. More...
|
std::list< CFact * > * | backward (std::list< CFact * > &) |
| Returns the result of backarding a list of facts through the operator. More...
|
std::list< CFact * > * | forward (std::list< CFact * > &) |
| Returns the conclusions of the operator for given preconditions facts. More...
|
std::list< CFact * > * | propagate (std::list< CFact * > &) |
| Propagates facts through the operator and network of asserts/ operators. More...
|
virtual const NLAIC::IBasicType * | clone () const |
| This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. More...
|
virtual const NLAIC::IBasicType * | newInstance () const |
| This function allow a new instance, that mean that the class is a class factory. More...
|
virtual void | save (NLMISC::IStream &os) |
| Save the class in a stream. More...
|
virtual void | load (NLMISC::IStream &is) |
| Load the class from a stream. More...
|
virtual void | getDebugString (std::string &) const |
| This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user. More...
|
virtual bool | isEqual (const CFirstOrderOperator &a) const |
virtual const NLAIAGENT::IObjectIA::CProcessResult & | run () |
| Some where Run method define the process of the agen. More...
|
bool | isEqual (const NLAIAGENT::IBasicObjectIA &a) const |
const NLAIC::CIdentType & | getType () const |
| getType return a unique string how represente the class, it can be the name of the class. More...
|
virtual bool | operator== (CFirstOrderOperator *) |
std::list< CFact * > * | test (std::list< CFact * > &) |
virtual bool | isTrue () const |
| Returns true if the preconditions are validated. More...
|
virtual float | truthValue () const |
| Returns a value in [0,1]. More...
|
virtual bool | isValid (CFactBase *) |
| Asks wether the operator's preconditions are validated,. More...
|
virtual float | priority () const |
| Priority of the operator. More...
|
virtual void | success () |
| Own success and failure functions These function telle other operators and goals that might be waiting for the execution of this one. More...
|
virtual void | failure () |
virtual void | success (IBaseOperator *) |
| Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded. More...
|
virtual void | failure (IBaseOperator *) |
Static Public Attributes |
const NLAIC::CIdentType | IdCFirstOrderOperator |
Protected Methods |
void | compileFactPattern (CFactPattern *, std::vector< IBaseAssert * > &, std::vector< sint32 > &) |
| Pos of a postcondition pattern's vars in the operator's vars tableTransforms a CFactPattern in an assert and a list of variable positions in the operator. More...
|
sint32 | CFirstOrderOperator::getVarPos (IBaseVar *var) |
| Returns the pos of a vraiables in the operator's vars table, -1 if not found. More...
|
void | getPosListForward (sint32, sint32, std::vector< sint32 > &) |
void | getPosListBackward (sint32, sint32, std::vector< sint32 > &) |
void | getAssertPos (IBaseAssert *, std::vector< IBaseAssert * > &, std::vector< sint32 > &) |
CValueSet * | unifyBackward (std::list< CFact * > &) |
CValueSet * | unifyForward (std::list< CFact * > &) |
CFact * | buildFromVars (IBaseAssert *, std::vector< sint32 > &, CValueSet *) |
std::list< CValueSet * > * | propagate (std::list< CValueSet * > &, CValueSet *, std::vector< sint32 > &) |
| Forward chaining. More...
|
CValueSet * | unifyLiaison (const CValueSet *, CValueSet *, std::vector< sint32 > &) |
| Tries to unify an instaciation of the operator's variables with a new CFact. More...
|
Protected Attributes |
std::vector< IBaseVar * > | _Vars |
std::vector< std::vector<
sint32 > > | _PosVarsCond |
| Variables of the operator. More...
|
std::vector< std::vector<
sint32 > > | _PosVarsConc |
| Pos of a precondition pattern's vars in the operator's vars table. More...
|
Constructor & Destructor Documentation
NLAILOGIC::CFirstOrderOperator::CFirstOrderOperator |
( |
|
) |
|
|
NLAILOGIC::CFirstOrderOperator::CFirstOrderOperator |
( |
const CFirstOrderOperator & |
|
) |
|
|
NLAILOGIC::CFirstOrderOperator::~CFirstOrderOperator |
( |
|
) |
|
|
Member Function Documentation
void NLAILOGIC::CFirstOrderOperator::addPostcondition |
( |
CFactPattern * |
|
) |
|
|
void NLAILOGIC::CFirstOrderOperator::addPrecondition |
( |
CFactPattern * |
|
) |
|
|
|
Gives the precondition for a CFact in the postconditions.
Referenced by test. |
sint32 NLAILOGIC::CFirstOrderOperator::CFirstOrderOperator::getVarPos |
( |
IBaseVar * |
var |
) |
[protected] |
|
|
Returns the pos of a vraiables in the operator's vars table, -1 if not found.
|
void NLAILOGIC::CFirstOrderOperator::compileFactPattern |
( |
CFactPattern * |
, |
|
|
std::vector< IBaseAssert * > & |
, |
|
|
std::vector< sint32 > & |
|
|
) |
[protected] |
|
void NLAILOGIC::CFirstOrderOperator::failure |
( |
IBaseOperator * |
|
) |
[virtual] |
|
void NLAILOGIC::CFirstOrderOperator::failure |
( |
|
) |
[virtual] |
|
void NLAILOGIC::CFirstOrderOperator::getDebugString |
( |
std::string & |
|
) |
const [virtual] |
|
void NLAILOGIC::CFirstOrderOperator::getPosListBackward |
( |
sint32 |
, |
|
|
sint32 |
, |
|
|
std::vector< sint32 > & |
|
|
) |
[protected] |
|
void NLAILOGIC::CFirstOrderOperator::getPosListForward |
( |
sint32 |
, |
|
|
sint32 |
, |
|
|
std::vector< sint32 > & |
|
|
) |
[protected] |
|
const NLAIC::CIdentType & NLAILOGIC::CFirstOrderOperator::getType |
( |
|
) |
const [virtual] |
|
|
getType return a unique string how represente the class, it can be the name of the class.
This function is used for the sytem regstry class (see the definition of the template class Gen::CRegistry).
Implements NLAIC::IBasicType.
Definition at line 575 of file fo_operator.cpp.
References IdCFirstOrderOperator. |
bool NLAILOGIC::CFirstOrderOperator::isEqual |
( |
const CFirstOrderOperator & |
a |
) |
const [virtual] |
|
bool NLAILOGIC::CFirstOrderOperator::isTrue |
( |
|
) |
const [virtual] |
|
bool NLAILOGIC::CFirstOrderOperator::isValid |
( |
CFactBase * |
|
) |
[virtual] |
|
void NLAILOGIC::CFirstOrderOperator::load |
( |
NLMISC::IStream & |
is |
) |
[virtual] |
|
const NLAIC::IBasicType * NLAILOGIC::CFirstOrderOperator::newInstance |
( |
|
) |
const [virtual] |
|
bool NLAILOGIC::CFirstOrderOperator::operator== |
( |
CFirstOrderOperator * |
|
) |
[virtual] |
|
float NLAILOGIC::CFirstOrderOperator::priority |
( |
|
) |
const [virtual] |
|
const IObjectIA::CProcessResult & NLAILOGIC::CFirstOrderOperator::run |
( |
|
) |
[virtual] |
|
void NLAILOGIC::CFirstOrderOperator::save |
( |
NLMISC::IStream & |
os |
) |
[virtual] |
|
void NLAILOGIC::CFirstOrderOperator::success |
( |
IBaseOperator * |
|
) |
[virtual] |
|
|
Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded.
Implements NLAILOGIC::IBaseOperator.
Definition at line 640 of file fo_operator.cpp. |
void NLAILOGIC::CFirstOrderOperator::success |
( |
|
) |
[virtual] |
|
|
Own success and failure functions These function telle other operators and goals that might be waiting for the execution of this one.
Implements NLAILOGIC::IBaseOperator.
Definition at line 632 of file fo_operator.cpp. |
float NLAILOGIC::CFirstOrderOperator::truthValue |
( |
|
) |
const [virtual] |
|
Member Data Documentation
std::vector< std::vector<sint32> > NLAILOGIC::CFirstOrderOperator::_PosVarsConc [protected]
|
|
std::vector< std::vector<sint32> > NLAILOGIC::CFirstOrderOperator::_PosVarsCond [protected]
|
|
std::vector<IBaseVar *> NLAILOGIC::CFirstOrderOperator::_Vars [protected]
|
|
The documentation for this class was generated from the following files:
|
|