Public Types | Public Member Functions

graphlab::discrete_domain< MAX_DIM > Class Template Reference

#include <discrete_domain.hpp>

List of all members.

Public Types

typedef discrete_assignment
< MAX_DIM > 
assignment_type

Public Member Functions

 discrete_domain ()
 Make an empy domain.
 discrete_domain (const discrete_variable &v1)
 Make a single variable discrete_domain.
 discrete_domain (const discrete_variable &v1, const discrete_variable &v2)
 Make a two variable discrete_domain.
 discrete_domain (const discrete_variable &v1, const discrete_variable &v2, const discrete_variable &v3)
 Make a three variable discrete_domain.
 discrete_domain (const std::vector< discrete_variable > &variables)
 Make a discrete_domain from a vector of variables.
 discrete_domain (const std::set< discrete_variable > &variables)
 Make a discrete_domain from a set of variables.
discrete_domainoperator+= (const discrete_variable &var)
discrete_domain operator+ (const discrete_variable &var) const
 add the other discrete_domain to this discrete_domain
discrete_domainoperator+= (const discrete_domain &other)
 add the discrete_domain to this discrete_domain
discrete_domain operator+ (const discrete_domain &other) const
 add the other discrete_domain to this discrete_domain
discrete_domainoperator-= (const discrete_domain &other)
 subtract the other discrete_domain from this discrete_domain
discrete_domain operator- (const discrete_domain &other) const
 subtract the other discrete_domain from this discrete_domain
discrete_domain intersect (const discrete_domain &other) const
size_t num_vars () const
 Get the number of variables.
const discrete_variablevar (size_t index) const
 Get the ith variable.
size_t var_location (size_t var_id) const
size_t size () const
 determine the number of assignments
bool operator== (const discrete_domain &other) const
 test whether two discrete_domains are equal
bool operator!= (const discrete_domain &other) const
 test whether two discrete_domains are not equal
assignment_type begin () const
 Get the first assignment in the discrete_domain.
assignment_type end () const
 Get the second assignment in the discrete_domain.
void load (iarchive &arc)
void save (oarchive &arc) const

Detailed Description

template<size_t MAX_DIM>
class graphlab::discrete_domain< MAX_DIM >

This class respresents a discrete discrete_domain over a set of variables.

Definition at line 35 of file discrete_domain.hpp.


Member Function Documentation

template<size_t MAX_DIM>
size_t graphlab::discrete_domain< MAX_DIM >::var_location ( size_t  var_id  )  const [inline]

get the index of the variable or returns number of variables if the index is not found

Definition at line 223 of file discrete_domain.hpp.


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