27template<
class Key,
class Compare = std::less<Key> >
30 INLINE
bool is_equal(
const Key &a,
const Key &b)
const {
31 return !operator()(a, b) && !operator()(b, a);
40template<
class Key,
class Compare = std::less<Key> >
43 INLINE
size_t operator () (
const Key &key)
const {
46 INLINE
bool operator () (
const Key &a,
const Key &b)
const {
47 return Compare::operator ()(a, b);
49 INLINE
bool is_equal(
const Key &a,
const Key &b)
const {
50 return !operator()(a, b) && !operator()(b, a);
63 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
75 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
76 INLINE
bool is_equal(
const Key &a,
const Key &b)
const;
87 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
98 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
99 INLINE
bool is_equal(
const Key &a,
const Key &b)
const;
111 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
112 INLINE
bool is_equal(
const Key &a,
const Key &b)
const;
121template<
class Key,
class Compare = std::less<Key> >
124 INLINE
static size_t add_hash(
size_t start,
const Key &key);
133 INLINE
static size_t add_hash(
size_t start,
const void *key);
144 INLINE
bool operator () (
const Key &a,
const Key &b)
const;
145 INLINE
size_t add_hash(
size_t start,
const Key &key)
const;
146 const Key _threshold;
153template<
class Key,
class Compare = std::less<Key> >
157 INLINE
bool operator () (
const Key &a,
const Key &b)
const {
160 INLINE
static size_t add_hash(
size_t start,
const Key &key);
167template<
class Key,
class Compare = std::less<Key> >
171 INLINE
bool operator () (
const Key &a,
const Key &b)
const {
181template<
class Key,
class Compare>
185 INLINE
bool operator () (
const Key &a,
const Key &b)
const {
202 INLINE
bool is_equal(
const Key &a,
const Key &b)
const;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
bool is_equal(const Key &a, const Key &b) const
Returns true if a is equivalent to b, false otherwise.
bool operator()(const Key &a, const Key &b) const
Returns true if a sorts before b, false otherwise.
This hash_compare class hashes a float or a double.
size_t operator()(const Key &key) const
Computes a size_t hash from the float.
size_t add_hash(size_t start, const Key &key) const
Adds the indicated key into a running hash.
Compares two floating point numbers, within threshold of equivalence.
bool operator()(const Key &a, const Key &b) const
Returns true if a sorts before b, false otherwise.
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...
bool operator()(const Key &a, const Key &b) const
Returns true if a sorts before b, false otherwise.
bool is_equal(const Key &a, const Key &b) const
Returns true if a is equivalent to b, false otherwise.
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...
bool operator()(const Key &a, const Key &b) const
Returns true if a sorts before b, false otherwise.
bool is_equal(const Key &a, const Key &b) const
Returns true if a is equivalent to b, false otherwise.
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...
bool is_equal(const Key &a, const Key &b) const
Returns true if a is equal to b, false otherwise.
size_t operator()(const Key &key) const
Calls the Key's get_hash() method.
An STL function object class, this is intended to be used on any ordered collection of pointers to cl...
bool operator()(const Key &a, const Key &b) const
Returns true if a sorts before b, false otherwise.
This hash_compare class hashes a pointer to a class object.
size_t operator()(const Key &key) const
Calls the Key's get_hash() method.
This is the default hash_compare class, which assumes the Key is a size_t value or can be implicitly ...
static size_t add_hash(size_t start, const Key &key)
Adds the indicated key into a running hash.
This hash_compare class hashes a class object.
size_t operator()(const Key &key) const
Calls the Key's get_hash() method.
This is the default hash_compare class, which assumes the Key is a pointer value.
static size_t add_hash(size_t start, const void *key)
Adds the indicated key into a running hash.
This hash_compare class hashes a string.
size_t operator()(const Key &key) const
Trivially computes a size_t hash from the components of the string.
static size_t add_hash(size_t start, const Key &key)
Adds the elements of the indicated key into a running hash.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.