aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
gum::prm::o3prm::O3RuleCPT Class Reference

The O3RuleCPT is part of the AST of the O3PRM language. More...

#include <agrum/PRM/o3prm/O3prm.h>

Inheritance diagram for gum::prm::o3prm::O3RuleCPT:
[legend]
Collaboration diagram for gum::prm::o3prm::O3RuleCPT:
[legend]

Public Types

using O3LabelList = std::vector< O3Label >
using O3FormulaList = std::vector< O3Formula >
using O3Rule = std::pair< O3LabelList, O3FormulaList >
using O3RuleList = std::vector< O3Rule >

Public Member Functions

 O3RuleCPT ()
 O3RuleCPT (const O3Label &type, const O3Label &name, const O3Attribute::O3LabelList &parents, O3RuleList &&rules)
 O3RuleCPT (const O3RuleCPT &src)
 O3RuleCPT (O3RuleCPT &&src)
 ~O3RuleCPT () override
virtual O3RuleCPT & operator= (const O3RuleCPT &src)
virtual O3RuleCPT & operator= (O3RuleCPT &&src)
virtual O3RuleList & rules ()
virtual const O3RuleList & rules () const
std::unique_ptr< O3Attribute > copy () const override
virtual O3Label & type ()
virtual const O3Label & type () const
virtual O3Label & name ()
virtual const O3Label & name () const
virtual O3LabelList & parents ()
virtual const O3LabelList & parents () const

Private Member Functions

virtual O3Attribute & operator= (const O3Attribute &src)
virtual O3Attribute & operator= (O3Attribute &&src)

Private Attributes

std::unique_ptr< O3RuleList > _rules_
O3Label _type_
O3Label _name_
O3LabelList _parents_

Detailed Description

The O3RuleCPT is part of the AST of the O3PRM language.

Definition at line 561 of file O3prm.h.

Member Typedef Documentation

◆ O3FormulaList

Definition at line 564 of file O3prm.h.

◆ O3LabelList

Definition at line 563 of file O3prm.h.

◆ O3Rule

Definition at line 565 of file O3prm.h.

◆ O3RuleList

Definition at line 566 of file O3prm.h.

Constructor & Destructor Documentation

◆ O3RuleCPT() [1/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( )

Definition at line 807 of file O3prm.cpp.

807 : O3Attribute(), _rules_{new O3RuleList{}} {
808 GUM_CONSTRUCTOR(O3RuleCPT);
809 }
std::vector< O3Rule > O3RuleList
Definition O3prm.h:566
std::unique_ptr< O3RuleList > _rules_
Definition O3prm.h:590

References gum::prm::o3prm::O3Attribute::O3Attribute(), O3RuleCPT(), and _rules_.

Referenced by O3RuleCPT(), O3RuleCPT(), O3RuleCPT(), O3RuleCPT(), ~O3RuleCPT(), copy(), operator=(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ O3RuleCPT() [2/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( const O3Label & type,
const O3Label & name,
const O3Attribute::O3LabelList & parents,
O3RuleList && rules )

Definition at line 811 of file O3prm.cpp.

814 :
816 _rules_(std::unique_ptr< O3RuleList >(new O3RuleList(rules))) {
817 GUM_CONSTRUCTOR(O3RuleCPT);
818 }
virtual O3Label & type()
Definition O3prm.cpp:743
virtual O3Label & name()
Definition O3prm.cpp:747
virtual O3LabelList & parents()
Definition O3prm.cpp:751
virtual O3RuleList & rules()
Definition O3prm.cpp:850

References gum::prm::o3prm::O3Attribute::O3Attribute(), O3RuleCPT(), _rules_, gum::prm::o3prm::O3Attribute::name(), gum::prm::o3prm::O3Attribute::parents(), rules(), and gum::prm::o3prm::O3Attribute::type().

Here is the call graph for this function:

◆ O3RuleCPT() [3/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( const O3RuleCPT & src)

Definition at line 820 of file O3prm.cpp.

820 :
821 O3Attribute(src), _rules_(std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()))) {
822 GUM_CONS_CPY(O3RuleCPT);
823 }

References gum::prm::o3prm::O3Attribute::O3Attribute(), O3RuleCPT(), _rules_, and rules().

Here is the call graph for this function:

◆ O3RuleCPT() [4/4]

gum::prm::o3prm::O3RuleCPT::O3RuleCPT ( O3RuleCPT && src)

Definition at line 825 of file O3prm.cpp.

825 : O3Attribute(src), _rules_(std::move(src._rules_)) {
826 GUM_CONS_MOV(O3RuleCPT);
827 }

References gum::prm::o3prm::O3Attribute::O3Attribute(), O3RuleCPT(), and _rules_.

Here is the call graph for this function:

◆ ~O3RuleCPT()

gum::prm::o3prm::O3RuleCPT::~O3RuleCPT ( )
override

Definition at line 829 of file O3prm.cpp.

829 {
830 GUM_DESTRUCTOR(O3RuleCPT);
831 ;
832 }

References O3RuleCPT().

Here is the call graph for this function:

Member Function Documentation

◆ copy()

std::unique_ptr< O3Attribute > gum::prm::o3prm::O3RuleCPT::copy ( ) const
overridevirtual

Implements gum::prm::o3prm::O3Attribute.

Definition at line 854 of file O3prm.cpp.

854 {
855 auto copy = new O3RuleCPT(*this);
856 return std::unique_ptr< O3Attribute >(copy);
857 }
std::unique_ptr< O3Attribute > copy() const override
Definition O3prm.cpp:854

References O3RuleCPT(), and copy().

Referenced by copy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name() [1/2]

O3Label & gum::prm::o3prm::O3Attribute::name ( )
virtualinherited

Definition at line 747 of file O3prm.cpp.

747{ return _name_; }

References _name_.

Referenced by O3Attribute(), gum::prm::o3prm::O3RawCPT::O3RawCPT(), gum::prm::o3prm::O3RuleCPT::O3RuleCPT(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkAttributeForDeclaration_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRawCPT_(), and gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRuleCPTSumsTo1_().

Here is the caller graph for this function:

◆ name() [2/2]

const O3Label & gum::prm::o3prm::O3Attribute::name ( ) const
virtualinherited

Definition at line 749 of file O3prm.cpp.

749{ return _name_; }

References _name_.

◆ operator=() [1/4]

O3Attribute & gum::prm::o3prm::O3Attribute::operator= ( const O3Attribute & src)
privatevirtual

Reimplemented from gum::prm::o3prm::O3Attribute.

Definition at line 498 of file O3prm.cpp.

727 {
728 if (this == &src) { return *this; }
729 _type_ = src._type_;
730 _name_ = src._name_;
731 _parents_ = src._parents_;
732 return *this;
733 }

◆ operator=() [2/4]

O3RuleCPT & gum::prm::o3prm::O3RuleCPT::operator= ( const O3RuleCPT & src)
virtual

Definition at line 834 of file O3prm.cpp.

834 {
835 if (this == &src) { return *this; }
836
838 _rules_ = std::unique_ptr< O3RuleList >(new O3RuleList(src.rules()));
839 return *this;
840 }
virtual O3Attribute & operator=(const O3Attribute &src)
Definition O3prm.cpp:727

References O3RuleCPT(), _rules_, gum::prm::o3prm::O3Attribute::operator=(), and rules().

Here is the call graph for this function:

◆ operator=() [3/4]

O3Attribute & gum::prm::o3prm::O3Attribute::operator= ( O3Attribute && src)
privatevirtual

Reimplemented from gum::prm::o3prm::O3Attribute.

Definition at line 499 of file O3prm.cpp.

735 {
736 if (this == &src) { return *this; }
737 _type_ = std::move(src._type_);
738 _name_ = std::move(src._name_);
739 _parents_ = std::move(src._parents_);
740 return *this;
741 }

◆ operator=() [4/4]

O3RuleCPT & gum::prm::o3prm::O3RuleCPT::operator= ( O3RuleCPT && src)
virtual

Definition at line 842 of file O3prm.cpp.

842 {
843 if (this == &src) { return *this; }
844
846 _rules_ = std::move(src._rules_);
847 return *this;
848 }

References O3RuleCPT(), _rules_, and gum::prm::o3prm::O3Attribute::operator=().

Here is the call graph for this function:

◆ parents() [1/2]

O3Attribute::O3LabelList & gum::prm::o3prm::O3Attribute::parents ( )
virtualinherited

◆ parents() [2/2]

const O3Attribute::O3LabelList & gum::prm::o3prm::O3Attribute::parents ( ) const
virtualinherited

Definition at line 753 of file O3prm.cpp.

753{ return _parents_; }

References _parents_.

◆ rules() [1/2]

O3RuleCPT::O3RuleList & gum::prm::o3prm::O3RuleCPT::rules ( )
virtual

Definition at line 850 of file O3prm.cpp.

850{ return *_rules_; }

References _rules_.

Referenced by O3RuleCPT(), O3RuleCPT(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRuleCPT_(), and operator=().

Here is the caller graph for this function:

◆ rules() [2/2]

const O3RuleCPT::O3RuleList & gum::prm::o3prm::O3RuleCPT::rules ( ) const
virtual

Definition at line 852 of file O3prm.cpp.

852{ return *_rules_; }

References _rules_.

◆ type() [1/2]

O3Label & gum::prm::o3prm::O3Attribute::type ( )
virtualinherited

Definition at line 743 of file O3prm.cpp.

743{ return _type_; }

References _type_.

Referenced by O3Attribute(), gum::prm::o3prm::O3RawCPT::O3RawCPT(), gum::prm::o3prm::O3RuleCPT::O3RuleCPT(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkAttributeForDeclaration_(), and gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRawCPT_().

Here is the caller graph for this function:

◆ type() [2/2]

const O3Label & gum::prm::o3prm::O3Attribute::type ( ) const
virtualinherited

Definition at line 745 of file O3prm.cpp.

745{ return _type_; }

References _type_.

Member Data Documentation

◆ _name_

O3Label gum::prm::o3prm::O3Attribute::_name_
privateinherited

Definition at line 514 of file O3prm.h.

Referenced by O3Attribute(), O3Attribute(), O3Attribute(), name(), name(), operator=(), and operator=().

◆ _parents_

O3LabelList gum::prm::o3prm::O3Attribute::_parents_
privateinherited

Definition at line 515 of file O3prm.h.

Referenced by O3Attribute(), O3Attribute(), O3Attribute(), operator=(), operator=(), parents(), and parents().

◆ _rules_

std::unique_ptr< O3RuleList > gum::prm::o3prm::O3RuleCPT::_rules_
private

Definition at line 590 of file O3prm.h.

Referenced by O3RuleCPT(), O3RuleCPT(), O3RuleCPT(), O3RuleCPT(), operator=(), operator=(), rules(), and rules().

◆ _type_

O3Label gum::prm::o3prm::O3Attribute::_type_
privateinherited

Definition at line 513 of file O3prm.h.

Referenced by O3Attribute(), O3Attribute(), O3Attribute(), operator=(), operator=(), type(), and type().


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