24 #include <boost/shared_ptr.hpp> 49 GTSAM_EXPORT
static double safe_div(
const double& a,
const double& b);
64 template<
class SOURCE>
66 ADT(keys, table), cardinalities_(keys.cardinalities()) {
70 GTSAM_EXPORT
bool equals(
const Potentials& other,
double tol = 1e-9)
const;
71 GTSAM_EXPORT
void print(
const std::string& s =
"Potentials: ",
72 const KeyFormatter& formatter = DefaultKeyFormatter)
const;
74 size_t cardinality(
Key j)
const {
return cardinalities_.at(j);}
94 template<>
struct traits<Potentials::ADT> :
public Testable<Potentials::ADT> {};
specialized key for discrete variables
Potentials(const DiscreteKeys &keys, SOURCE table)
Constructor from Indices and (string or doubles)
Definition: Potentials.h:65
Potentials(const ADT &potentials)
Constructor from ColumnIndex, and ADT.
Definition: Potentials.h:44
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
Algebraic Decision Trees fix the range to double Just has some nice constructors and some syntactic s...
Definition: AlgebraicDecisionTree.h:31
Template to create a binary predicate.
Definition: Testable.h:110
GTSAM_EXPORT Potentials()
Default constructor for I/O.
Definition: Potentials.cpp:39
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Algebraic Decision Trees.
A base class for both DiscreteFactor and DiscreteConditional.
Definition: Potentials.h:32
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:36
std::map< Key, size_t > cardinalities_
Cardinality for each key, used in combine.
Definition: Potentials.h:41
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33