User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Logic - Condition - MinTermBodyC
 

  PUBLIC
MinTermBodyC::MinTermBodyC(void)
MinTermBodyC::MinTermBodyC(const SArray1dC &,const SArray1dC &,bool)
MinTermBodyC::MinTermBodyC(const AndC &,const OrC &)
MinTermBodyC::MinTermBodyC(const LiteralC &,bool)
MinTermBodyC::Pos(void) const
MinTermBodyC::Neg(void) const
MinTermBodyC::Copy(void) const
MinTermBodyC::AndAdd(const LiteralC &)
MinTermBodyC::AndNotAdd(const LiteralC &)
MinTermBodyC::Covers(const MinTermC &,BindSetC &) const
MinTermBodyC::PosTerm(void) const
MinTermBodyC::NegTerm(void) const
MinTermBodyC::PosTerm(void)
MinTermBodyC::NegTerm(void)
MinTermBodyC::Substitute(const BindSetC &,LiteralC &) const
AndBodyC::Terms(void)
AndBodyC::Terms(void) const
AndBodyC::Unify(const LiteralC &,BindSetC &) const
AndBodyC::Size(void) const
AndBodyC::Solutions(const StateC &,BindSetC &) const
AndBodyC::Substitute(const BindSetC &,LiteralC &) const
AndBodyC::AndAdd(const LiteralC &)
AndBodyC::AndAdd(const SArray1dC &)
ConditionBodyC::Test(const StateC &,BindSetC &) const
ConditionBodyC::IsEqual(const LiteralC &) const
ConditionBodyC::Hash(void) const
ConditionBodyC::Substitute(const BindSetC &,LiteralC &) const
TupleBodyC::Unify(const LiteralC &,BindSetC &) const
TupleBodyC::IsEqual(const LiteralC &) const
TupleBodyC::Arity(void) const
TupleBodyC::Args(void)
TupleBodyC::Args(void) const
TupleBodyC::IsGrounded(void) const
TupleBodyC::SetArg(UIntT,const LiteralC &)
TupleBodyC::Dump(ostream &)
TupleBodyC::Name(void) const
TupleBodyC::SubLiterals(HSetC &) const
TupleBodyC::Solutions(const StateC &,BindSetC &) const
TupleBodyC::Substitute(const BindSetC &,LiteralC &) const
TupleBodyC::Hash(void) const
LiteralBodyC::IsVariable(void) const
LiteralBodyC::IsGrounded(void) const
LiteralBodyC::Unify(const LiteralC &,BindSetC &) const
LiteralBodyC::Dump(ostream &)
LiteralBodyC::Name(void) const
LiteralBodyC::Hash(void) const
LiteralBodyC::IsEqual(const LiteralC &) const
LiteralBodyC::Test(const StateC &,BindSetC &) const
LiteralBodyC::Solutions(const StateC &,BindSetC &) const
LiteralBodyC::SubLiterals(HSetC &) const
LiteralBodyC::Substitute(const BindSetC &,LiteralC &) const
LiteralBodyC::ReplaceVars(HashC &,LiteralC &) const
RCBodyVC::Save(ostream &) const
RCBodyVC::Save(BinOStreamC &) const
RCBodyVC::Copy(void) const
RCBodyVC::DeepCopy(UIntT) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   MinTermBodyC   
 
Logical Minterm.
 
include "Ravl/Logic/MinTerm.hh"
User Level:Develop
Library:RavlLogic
In Scope:RavlLogicN

Comments:
This is a set of negative and positive conditions which are anded together.

Parent Classes: Variables:
Methods:
MinTermBodyC()
Default constructor.

MinTermBodyC(const SArray1dC<LiteralC> & ts,const SArray1dC<LiteralC> & ns,bool useArrayDirectly = false)
Constructor

MinTermBodyC(const AndC & at,const OrC & ot)
Constructor.

MinTermBodyC(const LiteralC & lit,bool negate)
Construct from a single literal.
Effectively add NotC(lit) if negate is true.

const SArray1dC<LiteralC> & Pos() const
Positive terms.

const SArray1dC<LiteralC> & Neg() const
Negated terms.

RCBodyVC & Copy() const
Copy minterm.

bool AndAdd(const LiteralC & lit)
Add another term to the minterm.

bool AndNotAdd(const LiteralC & lit)
Add a negated term to the minterm.

bool Covers(const MinTermC & mt,BindSetC & bs) const
Does this minterm cover all terms of mt ?

const AndC & PosTerm() const
Positive terms.

const OrC & NegTerm() const
Negated terms.

AndC & PosTerm()
Positive terms.

OrC & NegTerm()
Negated terms.

bool Substitute(const BindSetC & binds,LiteralC & result) const
Substitute variables in 'binds' for their bound values.
This builds a new literal with the substute values (if there are any). The new value is assigned to 'result'

Returns true if at least one substitution has been made, false if none.


#include "Ravl/Logic/And.hh"
SArray1dC<LiteralC> & Terms()
Access set of terms.

const SArray1dC<LiteralC> & Terms() const
Access set of terms.

bool Unify(const LiteralC & oth,BindSetC & bs) const
Unify with another variable.

SizeT Size() const
Get the number of terms to be anded together.

LiteralIterC Solutions(const StateC & state,BindSetC & binds) const
Return iterator through possibile matches to this literal in 'state', if any.

bool Substitute(const BindSetC & binds,LiteralC & result) const
Substitute variables in 'binds' for their bound values.
This builds a new literal with the substute values (if there are any). The new value is assigned to 'result'

Returns true if at least one substitution has been made, false if none.


void AndAdd(const LiteralC & lit)
Add literal.

void AndAdd(const SArray1dC<LiteralC> & lits)
Add literals.

#include "Ravl/Logic/Condition.hh"
bool Test(const StateC & state,BindSetC & binds) const
Test if condition is true in 'state'.

bool IsEqual(const LiteralC & oth) const
Is this equal to another condition ?

UIntT Hash() const
Generate has value for condition.

bool Substitute(const BindSetC & binds,LiteralC & result) const
Get hash value for symbol.

#include "Ravl/Logic/Tuple.hh"
bool Unify(const LiteralC & oth,BindSetC & bs) const
Unify with another variable.

bool IsEqual(const LiteralC & oth) const
Is this equial to another LiteralC ?

UIntT Arity() const
Get the arity of the expression.

SArray1dC<LiteralC> & Args()
Access array of args.

const SArray1dC<LiteralC> & Args() const
Access array of args.

bool IsGrounded() const
Is this a simple expression with no variables ?

void SetArg(UIntT n,const LiteralC & s)
Set the value of an arg.

void Dump(ostream & out)
Dump info in human readable format to stream 'out'.

StringC Name() const
Get the name of symbol.

void SubLiterals(HSetC<LiteralC> & lits) const
Get a set of all sub literals.

LiteralIterC Solutions(const StateC & state,BindSetC & binds) const
Return iterator through possibile matches to this literal in 'state', if any.

bool Substitute(const BindSetC & binds,LiteralC & result) const
Substitute variables in 'binds' for their bound values.
This builds a new literal with the substute values (if there are any). The new value is assigned to 'result'

Returns true if at least one substitution has been made, false if none.


UIntT Hash() const
Get hash value for symbol.

#include "Ravl/Logic/Literal.hh"
bool IsVariable() const
Is this a variable ?

bool IsGrounded() const
Is this a simple expression with no variables ?

bool Unify(const LiteralC & oth,BindSetC & bs) const
Unify with another variable.

void Dump(ostream & out)
Dump info in human readable format to stream 'out'.

StringC Name() const
Get the name of symbol.

UIntT Hash() const
Get hash value for symbol.

bool IsEqual(const LiteralC & oth) const
Is this equial to another LiteralC ?

bool Test(const StateC & state,BindSetC & binds) const
Test if condition is true in 'state'.

LiteralIterC Solutions(const StateC & state,BindSetC & binds) const
Return an iterator through possibile matches to this literal in 'state', if any.

void SubLiterals(HSetC<LiteralC> & lits) const
Get a set of all sub literals.

bool Substitute(const BindSetC & binds,LiteralC & result) const
Substitute variables in 'binds' for their bound values.
This builds a new literal with the substute values (if there are any). The new value is assigned to 'result'

Returns true if at least one substitution has been made, false if none.


bool ReplaceVars(HashC<LiteralC,LiteralC> & subs,LiteralC & result) const
Replace all vars in this literal with new ones.
The mapping between the replacements and the new values is returned in 'subs' If no new replacements where found, false is returned.

#include "Ravl/RCHandleV.hh"
bool Save(ostream & out) const
Save to stream 'out'.

bool Save(BinOStreamC & out) const
Save to binary stream 'out'.

RCBodyVC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002