Conditional-inst.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 // \callgraph
19 #pragma once
20 
21 #include <iostream>
22 
24 
25 namespace gtsam {
26 
27  /* ************************************************************************* */
28  template<class FACTOR, class DERIVEDFACTOR>
29  void Conditional<FACTOR,DERIVEDFACTOR>::print(const std::string& s, const KeyFormatter& formatter) const {
30  std::cout << s << " P(";
31  for(Key key: frontals())
32  std::cout << " " << formatter(key);
33  if (nrParents() > 0)
34  std::cout << " |";
35  for(Key parent: parents())
36  std::cout << " " << formatter(parent);
37  std::cout << ")" << std::endl;
38  }
39 
40  /* ************************************************************************* */
41  template<class FACTOR, class DERIVEDFACTOR>
43  {
44  return nrFrontals_ == c.nrFrontals_;
45  }
46 
47 }
Base class for conditional densities.
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
const KeyFormatter & formatter
void print(const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
RealScalar s
traits
Definition: chartTesting.h:28
const G double tol
Definition: Group.h:83
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:61
bool equals(const This &c, double tol=1e-9) const


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:50