PeriDyno 1.0.0
Loading...
Searching...
No Matches
Pair.h
Go to the documentation of this file.
1#ifndef PAIR_H
2#define PAIR_H
3
4#include "Platform.h"
5
6namespace dyno
7{
8 template <typename Key, typename T>
9 class Pair
10 {
11 public:
12 DYN_FUNC Pair() {};
13 DYN_FUNC Pair(Key key, T val) { first = key; second = val; }
14
15 DYN_FUNC inline bool operator>= (const Pair& other) const {
16 return first >= other.first;
17 }
18
19 DYN_FUNC inline bool operator> (const Pair& other) const {
20 return first > other.first;
21 }
22
23 DYN_FUNC inline bool operator<= (const Pair& other) const {
24 return first <= other.first;
25 }
26
27 DYN_FUNC inline bool operator< (const Pair& other) const {
28 return first < other.first;
29 }
30
31 DYN_FUNC inline bool operator== (const Pair& other) const {
32 return first == other.first;
33 }
34
35 DYN_FUNC inline bool operator!= (const Pair& other) const {
36 return first != other.first;
37 }
38
39 public:
40 Key first;
42 };
43}
44
45#endif // PAIR_H
DYN_FUNC bool operator!=(const Pair &other) const
Definition Pair.h:35
DYN_FUNC bool operator==(const Pair &other) const
Definition Pair.h:31
DYN_FUNC bool operator>(const Pair &other) const
Definition Pair.h:19
DYN_FUNC bool operator<=(const Pair &other) const
Definition Pair.h:23
DYN_FUNC Pair()
Definition Pair.h:12
DYN_FUNC bool operator<(const Pair &other) const
Definition Pair.h:27
DYN_FUNC Pair(Key key, T val)
Definition Pair.h:13
DYN_FUNC bool operator>=(const Pair &other) const
Definition Pair.h:15
#define T(t)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25