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 }
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition: NEON/PacketMath.h:3115
gtsam::VariableSlots
Definition: VariableSlots.h:51
internal::Colamd::Empty
const int Empty
Definition: Eigen_Colamd.h:116
str
Definition: pytypes.h:1558
VariableSlots.h
VariableSlots describes the structure of a combined factor in terms of where each block comes from in...
empty
Definition: test_copy_move.cpp:19
gtsam
traits
Definition: SFMdata.h:40
std
Definition: BFloat16.h:88
gtsam::tol
const G double tol
Definition: Group.h:79
max
#define max(a, b)
Definition: datatypes.h:20
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:41