![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Class used to manipulate context during Function Graph Operations. More...
#include <agrum/base/multidim/FunctionGraphUtilities/o4DGContext.h>
Public Member Functions | |
Constructors, Destructors. | |
| O4DGContext (Idx *, Idx) | |
| Default constructor. | |
| ~O4DGContext () | |
| Default destructor. | |
| void * | operator new (size_t s) |
| Operator new overload to use the SmallObjectAllocator. | |
| void | operator delete (void *p) |
| Operator delete overload to use the SmallObjectAllocator. | |
Diagrams current nodes setters & getters. | |
| void | setDG1Node (const NodeId &) |
| Set DG1 diagram current explored Node. | |
| const NodeId & | DG1Node () const |
| Get DG1 diagram current explored Node. | |
| void | setDG2Node (const NodeId &) |
| Set DG2 diagram current explored Node. | |
| const NodeId & | DG2Node () const |
| Get DG2 diagram current explored Node. | |
Variables modalities handlers | |
| void | chgVarModality (Idx, Idx) |
| Changes given variable modality. | |
| Idx | varModality (Idx) |
| Changes given variable modality. | |
O4DG Handling methods | |
| const double & | key (short int *instNeeded) |
| Returns o4DGContext key. | |
Private Attributes | |
| NodeId | _DG1ExploredNode_ |
| DG1 Diagram current explored node. | |
| NodeId | _DG2ExploredNode_ |
| DG2 Diagram current explored node. | |
| Idx * | _varInstantiation_ |
| Vector containing for each retrograde variable its current modality 0 meaning no instantiation done => there's an offset. | |
| Idx | _nbVar_ |
| double | _key_ |
| The key use to store the context as a key in the hashtable. | |
Static Private Attributes | |
| static const double | _logPrime_ [] |
| Table containing the log2 of prime numbers. | |
| static const Idx | _nbLogPrime_ = 140 |
| static const Idx | _offsetv_ = O4DGContext::_nbLogPrime_ - 3 |
| static const Idx | _offset1_ = O4DGContext::_nbLogPrime_ - 1 |
| static const Idx | _offset2_ = O4DGContext::_nbLogPrime_ - 2 |
Class used to manipulate context during Function Graph Operations.
Definition at line 70 of file o4DGContext.h.
Default constructor.
Definition at line 98 of file o4DGContext.cpp.
References O4DGContext(), _DG1ExploredNode_, _DG2ExploredNode_, _key_, _nbVar_, and _varInstantiation_.
Referenced by O4DGContext(), ~O4DGContext(), and operator delete().
| gum::O4DGContext::~O4DGContext | ( | ) |
Default destructor.
Definition at line 106 of file o4DGContext.cpp.
References O4DGContext().
Changes given variable modality.
Definition at line 67 of file o4DGContext_inl.h.
References _varInstantiation_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_().
|
inline |
Get DG1 diagram current explored Node.
Definition at line 107 of file o4DGContext.h.
References _DG1ExploredNode_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_().
|
inline |
Get DG2 diagram current explored Node.
Definition at line 113 of file o4DGContext.h.
References _DG2ExploredNode_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_().
| INLINE const double & gum::O4DGContext::key | ( | short int * | instNeeded | ) |
Returns o4DGContext key.
Definition at line 75 of file o4DGContext_inl.h.
References _DG1ExploredNode_, _DG2ExploredNode_, _key_, _logPrime_, _nbVar_, _offset1_, _offset2_, _offsetv_, and _varInstantiation_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_().
| INLINE void gum::O4DGContext::operator delete | ( | void * | p | ) |
Operator delete overload to use the SmallObjectAllocator.
Definition at line 88 of file o4DGContext_inl.h.
References O4DGContext(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
| INLINE void * gum::O4DGContext::operator new | ( | size_t | s | ) |
Operator new overload to use the SmallObjectAllocator.
Definition at line 84 of file o4DGContext_inl.h.
References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
| INLINE void gum::O4DGContext::setDG1Node | ( | const NodeId & | exploredNode | ) |
Set DG1 diagram current explored Node.
Definition at line 57 of file o4DGContext_inl.h.
References _DG1ExploredNode_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_(), gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::compute(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::compute().
| INLINE void gum::O4DGContext::setDG2Node | ( | const NodeId & | exploredNode | ) |
Set DG2 diagram current explored Node.
Definition at line 62 of file o4DGContext_inl.h.
References _DG2ExploredNode_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_(), gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::compute(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::compute().
Changes given variable modality.
Definition at line 72 of file o4DGContext_inl.h.
References _varInstantiation_.
Referenced by gum::MultiDimFunctionGraphOperator< GUM_SCALAR, FUNCTOR, TerminalNodePolicy >::_compute_(), and gum::Regress< GUM_SCALAR, COMBINEOPERATOR, PROJECTOPERATOR, TerminalNodePolicy >::_compute_().
|
private |
DG1 Diagram current explored node.
Definition at line 141 of file o4DGContext.h.
Referenced by O4DGContext(), DG1Node(), key(), and setDG1Node().
|
private |
DG2 Diagram current explored node.
Definition at line 144 of file o4DGContext.h.
Referenced by O4DGContext(), DG2Node(), key(), and setDG2Node().
|
private |
The key use to store the context as a key in the hashtable.
Definition at line 152 of file o4DGContext.h.
Referenced by O4DGContext(), and key().
|
staticprivate |
Table containing the log2 of prime numbers.
Definition at line 155 of file o4DGContext.h.
Referenced by key().
|
staticprivate |
Definition at line 156 of file o4DGContext.h.
|
private |
Definition at line 149 of file o4DGContext.h.
Referenced by O4DGContext(), and key().
|
staticprivate |
Definition at line 156 of file o4DGContext.h.
Referenced by key().
|
staticprivate |
Definition at line 156 of file o4DGContext.h.
Referenced by key().
|
staticprivate |
Definition at line 156 of file o4DGContext.h.
Referenced by key().
|
private |
Vector containing for each retrograde variable its current modality 0 meaning no instantiation done => there's an offset.
Definition at line 148 of file o4DGContext.h.
Referenced by O4DGContext(), chgVarModality(), key(), and varModality().