CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

DTCombinatorialPatternReco::TriedPattern Class Reference

#include <DTCombinatorialPatternReco.h>

List of all members.

Public Types

typedef values::const_iterator const_iterator
typedef std::vector< short
unsigned int > 
values

Public Member Functions

const_iterator begin () const
const_iterator end () const
size_t hash () const
bool operator== (const TriedPattern &other) const
void push_back (short unsigned int i)
 push back value, and update the hash
values::size_type size () const
 TriedPattern ()

Private Attributes

size_t hash_
values values_

Detailed Description

Definition at line 114 of file DTCombinatorialPatternReco.h.


Member Typedef Documentation

Definition at line 137 of file DTCombinatorialPatternReco.h.

typedef std::vector<short unsigned int> DTCombinatorialPatternReco::TriedPattern::values

Definition at line 116 of file DTCombinatorialPatternReco.h.


Constructor & Destructor Documentation

DTCombinatorialPatternReco::TriedPattern::TriedPattern ( ) [inline]

Definition at line 119 of file DTCombinatorialPatternReco.h.

References values_.

: hash_(1) { values_.reserve(8); }

Member Function Documentation

const_iterator DTCombinatorialPatternReco::TriedPattern::begin ( void  ) const [inline]

Definition at line 138 of file DTCombinatorialPatternReco.h.

References values_.

{ return values_.begin(); }
const_iterator DTCombinatorialPatternReco::TriedPattern::end ( void  ) const [inline]

Definition at line 139 of file DTCombinatorialPatternReco.h.

References values_.

{ return values_.end(); }
size_t DTCombinatorialPatternReco::TriedPattern::hash ( ) const [inline]

return the hash: equal objects MUST have the same hash, different ones should have different ones

Definition at line 134 of file DTCombinatorialPatternReco.h.

References hash_.

Referenced by hash_value().

{ return hash_; }
bool DTCombinatorialPatternReco::TriedPattern::operator== ( const TriedPattern other) const [inline]

Definition at line 122 of file DTCombinatorialPatternReco.h.

References hash_, and values_.

                                                              { 
                return (hash_ == other.hash_) &&   // cheap
                       (values_ == other.values_); // expensive last resort
            }
void DTCombinatorialPatternReco::TriedPattern::push_back ( short unsigned int  i) [inline]

push back value, and update the hash

Definition at line 128 of file DTCombinatorialPatternReco.h.

References hash_, and values_.

                                                 { 
                boost::hash_combine(hash_,i);
                values_.push_back(i);
            }
values::size_type DTCombinatorialPatternReco::TriedPattern::size ( void  ) const [inline]

Definition at line 140 of file DTCombinatorialPatternReco.h.

References values_.

{ return values_.size(); }

Member Data Documentation

Definition at line 143 of file DTCombinatorialPatternReco.h.

Referenced by hash(), operator==(), and push_back().

Definition at line 142 of file DTCombinatorialPatternReco.h.

Referenced by begin(), end(), operator==(), push_back(), size(), and TriedPattern().