aGrUM  0.13.2
gum::learning::Cache43ptInfo Class Reference

#include <cache43ptInfo.h>

+ Collaboration diagram for gum::learning::Cache43ptInfo:

Public Member Functions

Constructors / Destructors
 Cache43ptInfo ()
 default constructor More...
 
 Cache43ptInfo (const Cache43ptInfo &from)
 copy constructor More...
 
 Cache43ptInfo (Cache43ptInfo &&from)
 move constructor More...
 
 ~Cache43ptInfo ()
 destructor More...
 
Operators
Cache43ptInfooperator= (const Cache43ptInfo &from)
 copy operator More...
 
Cache43ptInfooperator= (Cache43ptInfo &&from)
 move operator More...
 
Accessors / Modifiers
void insert (Idx var1, Idx var2, Idx var3, const std::vector< Idx > &conditioning_set, double score)
 insert a new score into the cache More...
 
template<typename Alloc >
void insert (Idx var1, Idx var2, Idx var3, IdSet< Alloc > &conditioning_set, double score)
 insert a new score into the cache More...
 
void erase (Idx var1, Idx var2, Idx var3, const std::vector< Idx > &conditioning_set)
 removes a score (if it exists) More...
 
template<typename Alloc >
void erase (Idx var1, Idx var2, Idx var3, const IdSet< Alloc > &conditioning_set)
 removes a score (if it exists) More...
 
bool exists (Idx var1, Idx var2, Idx var3, const std::vector< Idx > &conditioning_set)
 indicates whether a given score exists More...
 
double score (Idx var1, Idx var2, Idx var3, const std::vector< Idx > &conditioning_set)
 returns a given score More...
 
void clear ()
 removes all the stored scores More...
 

Detailed Description

Definition at line 60 of file cache43ptInfo.h.

Constructor & Destructor Documentation

gum::learning::Cache43ptInfo::Cache43ptInfo ( )

default constructor

gum::learning::Cache43ptInfo::Cache43ptInfo ( const Cache43ptInfo from)

copy constructor

gum::learning::Cache43ptInfo::Cache43ptInfo ( Cache43ptInfo &&  from)

move constructor

gum::learning::Cache43ptInfo::~Cache43ptInfo ( )

destructor

Member Function Documentation

void gum::learning::Cache43ptInfo::clear ( )

removes all the stored scores

void gum::learning::Cache43ptInfo::erase ( Idx  var1,
Idx  var2,
Idx  var3,
const std::vector< Idx > &  conditioning_set 
)

removes a score (if it exists)

If the score does not exist, nothing is done. In particular, no exception is raised

template<typename Alloc >
void gum::learning::Cache43ptInfo::erase ( Idx  var1,
Idx  var2,
Idx  var3,
const IdSet< Alloc > &  conditioning_set 
)

removes a score (if it exists)

If the score does not exist, nothing is done. In particular, no exception is raised

bool gum::learning::Cache43ptInfo::exists ( Idx  var1,
Idx  var2,
Idx  var3,
const std::vector< Idx > &  conditioning_set 
)

indicates whether a given score exists

void gum::learning::Cache43ptInfo::insert ( Idx  var1,
Idx  var2,
Idx  var3,
const std::vector< Idx > &  conditioning_set,
double  score 
)

insert a new score into the cache

Exceptions
DuplicateElementexception is raised if a score for the same variables already exists
template<typename Alloc >
void gum::learning::Cache43ptInfo::insert ( Idx  var1,
Idx  var2,
Idx  var3,
IdSet< Alloc > &  conditioning_set,
double  score 
)

insert a new score into the cache

Exceptions
DuplicateElementexception is raised if a score for the same variables already exists
Cache43ptInfo& gum::learning::Cache43ptInfo::operator= ( const Cache43ptInfo from)

copy operator

Cache43ptInfo& gum::learning::Cache43ptInfo::operator= ( Cache43ptInfo &&  from)

move operator

double gum::learning::Cache43ptInfo::score ( Idx  var1,
Idx  var2,
Idx  var3,
const std::vector< Idx > &  conditioning_set 
)

returns a given score

Exceptions
NotFoundis raised if the score is not cached

Member Data Documentation

HashTable< std::tuple< IdSet<>, Idx, Idx, Idx >, double > gum::learning::Cache43ptInfo::__scores
private

the scores stored into the cache

Definition at line 155 of file cache43ptInfo.h.


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