Wildmeshing Toolkit
Tuple.hxx
Go to the documentation of this file.
1
2
#include <cstddef>
3
#include <iostream>
4
#include <optional>
5
#include <string>
6
#include <tuple>
7
#include "
Tuple.hpp
"
8
9
namespace
wmtk
{
10
11
// v2
12
// / \ .
13
// e1 / \ e0
14
// v0 - - - v1
15
// e2
16
17
18
inline
bool
Tuple::operator!=
(
const
wmtk::Tuple
& t)
const
19
{
20
return
!(*
this
== t);
21
}
22
inline
bool
Tuple::operator==
(
const
wmtk::Tuple
& t)
const
23
{
24
return
std::tie(
m_local_vid
,
m_local_eid
,
m_local_fid
,
m_global_cid
) ==
25
std::tie(t.
m_local_vid
, t.
m_local_eid
, t.
m_local_fid
, t.
m_global_cid
);
26
27
}
28
29
inline
bool
Tuple::operator<
(
const
wmtk::Tuple
& t)
const
30
{
31
return
std::tie(
m_local_vid
,
m_local_eid
,
m_local_fid
,
m_global_cid
) <
32
std::tie(t.
m_local_vid
, t.
m_local_eid
, t.
m_local_fid
, t.
m_global_cid
);
33
}
34
inline
bool
Tuple::same_ids
(
const
wmtk::Tuple
& t)
const
35
{
36
return
std::tie(
m_local_vid
,
m_local_eid
,
m_local_fid
,
m_global_cid
) ==
37
std::tie(t.
m_local_vid
, t.
m_local_eid
, t.
m_local_fid
, t.
m_global_cid
);
38
}
39
40
inline
bool
Tuple::is_null
()
const
41
{
42
return
m_global_cid
== -1;
43
}
44
45
46
inline
int8_t
Tuple::local_vid
()
const
47
{
48
return
m_local_vid
;
49
}
50
51
inline
int8_t
Tuple::local_eid
()
const
52
{
53
return
m_local_eid
;
54
}
55
56
inline
int8_t
Tuple::local_fid
()
const
57
{
58
return
m_local_fid
;
59
}
60
61
}
// namespace wmtk
Tuple.hpp
wmtk::Tuple
Definition:
Tuple.hpp:42
wmtk::Tuple::is_null
bool is_null() const
Checks if a tuple is "null". This merely implies the global index is -1.
Definition:
Tuple.hxx:40
wmtk::Tuple::operator==
bool operator==(const Tuple &t) const
Definition:
Tuple.hxx:22
wmtk::Tuple::m_local_vid
int8_t m_local_vid
Definition:
Tuple.hpp:47
wmtk::Tuple::same_ids
bool same_ids(const Tuple &t) const
Checks whether two tuples are equal, but ignores the hash.
Definition:
Tuple.hxx:34
wmtk::Tuple::local_vid
int8_t local_vid() const
Definition:
Tuple.hxx:46
wmtk::Tuple::operator<
bool operator<(const Tuple &t) const
Definition:
Tuple.hxx:29
wmtk::Tuple::m_local_eid
int8_t m_local_eid
Definition:
Tuple.hpp:48
wmtk::Tuple::m_global_cid
int64_t m_global_cid
Definition:
Tuple.hpp:46
wmtk::Tuple::m_local_fid
int8_t m_local_fid
Definition:
Tuple.hpp:49
wmtk::Tuple::local_fid
int8_t local_fid() const
Definition:
Tuple.hxx:56
wmtk::Tuple::operator!=
bool operator!=(const Tuple &t) const
Definition:
Tuple.hxx:18
wmtk::Tuple::local_eid
int8_t local_eid() const
Definition:
Tuple.hxx:51
wmtk
Definition:
Accessor.hpp:6
src
wmtk
Tuple.hxx
Generated by
1.9.1