aGrUM  0.13.2
gum::learning::Cache4IndepTest Class Reference

#include <cache4IndepTest.h>

+ Collaboration diagram for gum::learning::Cache4IndepTest:

Public Member Functions

Constructors / Destructors
 Cache4IndepTest ()
 default constructor More...
 
 Cache4IndepTest (const Cache4IndepTest &from)
 copy constructor More...
 
 Cache4IndepTest (Cache4IndepTest &&from)
 move constructor More...
 
 ~Cache4IndepTest ()
 destructor More...
 
Operators
Cache4IndepTestoperator= (const Cache4IndepTest &from)
 copy operator More...
 
Cache4IndepTestoperator= (Cache4IndepTest &&from)
 move operator More...
 
Accessors / Modifiers
void insert (Idx var1, Idx var2, 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, IdSet< Alloc > &conditioning_set, double score)
 insert a new score into the cache More...
 
void erase (Idx var1, Idx var2, const std::vector< Idx > &conditioning_set)
 removes a score (if it exists) More...
 
template<typename Alloc >
void erase (Idx var1, Idx var2, const IdSet< Alloc > &conditioning_set)
 removes a score (if it exists) More...
 
bool exists (Idx var1, Idx var2, const std::vector< Idx > &conditioning_set)
 indicates whether a given score exists More...
 
double score (Idx var1, Idx var2, 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 cache4IndepTest.h.

Constructor & Destructor Documentation

gum::learning::Cache4IndepTest::Cache4IndepTest ( )

default constructor

gum::learning::Cache4IndepTest::Cache4IndepTest ( const Cache4IndepTest from)

copy constructor

gum::learning::Cache4IndepTest::Cache4IndepTest ( Cache4IndepTest &&  from)

move constructor

gum::learning::Cache4IndepTest::~Cache4IndepTest ( )

destructor

Member Function Documentation

void gum::learning::Cache4IndepTest::clear ( )

removes all the stored scores

void gum::learning::Cache4IndepTest::erase ( Idx  var1,
Idx  var2,
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::Cache4IndepTest::erase ( Idx  var1,
Idx  var2,
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::Cache4IndepTest::exists ( Idx  var1,
Idx  var2,
const std::vector< Idx > &  conditioning_set 
)

indicates whether a given score exists

void gum::learning::Cache4IndepTest::insert ( Idx  var1,
Idx  var2,
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::Cache4IndepTest::insert ( Idx  var1,
Idx  var2,
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
Cache4IndepTest& gum::learning::Cache4IndepTest::operator= ( const Cache4IndepTest from)

copy operator

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

move operator

double gum::learning::Cache4IndepTest::score ( Idx  var1,
Idx  var2,
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 >, double > gum::learning::Cache4IndepTest::__scores
private

the scores stored into the cache

Definition at line 139 of file cache4IndepTest.h.


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