VariableSlots.cpp
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 
19 
20 #include <iostream>
21 #include <limits>
22 
23 using namespace std;
24 
25 namespace gtsam {
26 
28 
30 void VariableSlots::print(const std::string& str) const {
31  if(this->empty())
32  cout << "empty" << endl;
33  else {
34  cout << str << "\n";
35  cout << "Var:\t";
36  for(const value_type& slot: *this) { cout << slot.first << "\t"; }
37  cout << "\n";
38 
39  for(size_t i=0; i<this->begin()->second.size(); ++i) {
40  cout << " \t";
41  for(const value_type& slot: *this) {
42  if(slot.second[i] == Empty)
43  cout << "x" << "\t";
44  else
45  cout << slot.second[i] << "\t";
46  }
47  cout << "\n";
48  }
49  }
50 }
51 
53 bool VariableSlots::equals(const VariableSlots& rhs, double tol) const {
54  return *this == rhs;
55 }
56 
57 }
#define max(a, b)
Definition: datatypes.h:20
Definition: BFloat16.h:88
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
VariableSlots describes the structure of a combined factor in terms of where each block comes from in...
Definition: pytypes.h:1403
traits
Definition: chartTesting.h:28
const G double tol
Definition: Group.h:86


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:43