gtsam
inference
EdgeKey.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
12
#pragma once
13
21
#include <
gtsam/base/Testable.h
>
22
#include <
gtsam/inference/Key.h
>
23
24
namespace
gtsam
{
25
class
GTSAM_EXPORT
EdgeKey
{
26
protected
:
27
std::uint32_t
i_
;
28
std::uint32_t
j_
;
29
30
public
:
33
35
EdgeKey
() : i_(0), j_(0) {}
36
38
EdgeKey
(
std::uint32_t
i
,
std::uint32_t
j
) : i_(
i
), j_(
j
) {}
39
40
EdgeKey
(
Key
key
)
41
: i_(static_cast<
std
::
uint32_t
>(
key
>> 32)),
42
j_(static_cast<
std
::
uint32_t
>(
key
)) {}
43
47
49
operator
Key
()
const
{
return
((
std::uint64_t
)i_ << 32) | j_; }
50
52
inline
std::uint32_t
i
()
const
{
return
i_; }
53
55
inline
std::uint32_t
j
()
const
{
return
j_; }
56
58
operator
std::string()
const
;
59
61
friend
GTSAM_EXPORT std::ostream&
operator<<
(std::ostream&,
const
EdgeKey
&);
62
66
68
void
print
(
const
std::string&
s
=
""
)
const
;
69
71
bool
equals
(
const
EdgeKey
&
expected
,
double
tol
= 0.0)
const
{
72
return
(*
this
) ==
expected
;
73
}
75
};
76
78
template
<>
79
struct
traits
<
EdgeKey
> :
public
Testable
<EdgeKey> {};
80
81
}
// namespace gtsam
gtsam::EdgeKey::i_
std::uint32_t i_
Upper 32 bits.
Definition:
EdgeKey.h:27
s
RealScalar s
Definition:
level1_cplx_impl.h:126
gtsam::operator<<
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Definition:
testGroup.cpp:109
Testable.h
Concept check for values that can be used in unit tests.
uint32_t
unsigned int uint32_t
Definition:
ms_stdint.h:85
Key.h
gtsam::EdgeKey::j_
std::uint32_t j_
Lower 32 bits.
Definition:
EdgeKey.h:28
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition:
Matrix.cpp:155
j
std::ptrdiff_t j
Definition:
tut_arithmetic_redux_minmax.cpp:2
gtsam::EdgeKey::i
std::uint32_t i() const
Retrieve high 32 bits.
Definition:
EdgeKey.h:52
cholesky::expected
Matrix expected
Definition:
testMatrix.cpp:971
gtsam::EdgeKey::equals
bool equals(const EdgeKey &expected, double tol=0.0) const
Checks if this EdgeKey is equal to another, tolerance is ignored.
Definition:
EdgeKey.h:71
gtsam::EdgeKey::EdgeKey
EdgeKey(std::uint32_t i, std::uint32_t j)
Constructor.
Definition:
EdgeKey.h:38
key
const gtsam::Symbol key('X', 0)
gtsam::EdgeKey
Definition:
EdgeKey.h:25
gtsam
traits
Definition:
SFMdata.h:40
gtsam::Testable
Definition:
Testable.h:152
gtsam::traits
Definition:
Group.h:36
std
Definition:
BFloat16.h:88
gtsam::EdgeKey::EdgeKey
EdgeKey()
Default constructor.
Definition:
EdgeKey.h:35
gtsam::EdgeKey::j
std::uint32_t j() const
Retrieve low 32 bits.
Definition:
EdgeKey.h:55
gtsam::tol
const G double tol
Definition:
Group.h:79
uint64_t
unsigned __int64 uint64_t
Definition:
ms_stdint.h:95
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition:
types.h:97
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
gtsam::EdgeKey::EdgeKey
EdgeKey(Key key)
Definition:
EdgeKey.h:40
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:27