25 template<
typename T,
bool DIRECTED>
34 T p0()
const {
return myP0; }
35 T &
p0() {
return myP0; }
36 T p1()
const {
return myP1; }
37 T &
p1() {
return myP1; }
52 return (myP0 == e.myP0 && myP1 == e.myP1);
56 return (myP0 == e.myP0 && myP1 == e.myP1)
57 || (myP0 == e.myP1 && myP1 == e.myP0);
69 if (DIRECTED || myP0 < myP1)
72 GA_EdgeT::hashCombine(hash_val,
GA_Size(myP1));
77 GA_EdgeT::hashCombine(hash_val,
GA_Size(myP0));
88 static void hashCombine(
size_t &seed,
GA_Size const &
value)
90 auto hash_value = GA_EdgeT::hashValueSigned(value);
93 const size_t m = UINT64_C(0xc6a4a7935bd1e995);
110 const unsigned int size_t_bits =
111 std::numeric_limits<size_t>::digits;
113 const int length = (std::numeric_limits<T>::digits - 1)
114 / static_cast<int>(size_t_bits);
120 for(
unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
122 seed ^= (size_t) (positive >> i) + (seed<<6) + (seed>>2);
124 seed ^= (size_t) val + (seed<<6) + (seed>>2);
133 template<
typename T,
bool DIRECTED>
147 template<
typename T,
bool DIRECTED>
bool operator==(const ThisType &e) const
Return whether this edge is the same undirected edge as the given edge.
GLuint GLsizei GLsizei * length
size_t operator()(const GA_EdgeT< T, DIRECTED > &edge) const
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_EdgeT< T, DIRECTED > ThisType
GA_EdgeT< T, DIRECTED > argument_type
SYS_FORCE_INLINE size_t hash_value(const GA_EdgeT< T, DIRECTED > &edge)
size_t hash() const
Hash function.
int64 getMemoryUsage() const
bool operator!=(const ThisType &e) const