ProteoWizard
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
pwiz::proteome::ModificationMap Class Reference

maps peptide/protein sequence indexes (0-based) to a modification list More...

#include <Modification.hpp>

Inheritance diagram for pwiz::proteome::ModificationMap:
pwiz::util::virtual_map< int, ModificationList >

List of all members.

Public Member Functions

 ~ModificationMap ()
double monoisotopicDeltaMass () const
 returns the sum of the monoisotopic delta masses of all modifications in the map
double averageDeltaMass () const
 returns the sum of the average delta masses of all modifications in the map
virtual iterator begin ()
 Returns an iterator pointing to the first element stored in the map. First is defined by the map's comparison operator, Compare.
virtual iterator end ()
 Returns an iterator pointing to the last element stored in the map; in other words, to the off-the-end value.
virtual reverse_iterator rbegin ()
 Returns a reverse_iterator pointing to the first element stored in the map. First is defined by the map's comparison operator, Compare.
virtual reverse_iterator rend ()
 Returns a reverse_iterator pointing to the last element stored in the map; in other words, to the off-the-end value).
virtual mapped_typeoperator[] (const key_type &x)
 If an element with the key x exists in the map, then a reference to its associated value is returned. Otherwise the pair x,T() is inserted into the map and a reference to the default object T() is returned.
virtual std::pair< iterator,
iterator
equal_range (const key_type &x)
 Returns the pair (lower_bound(x), upper_bound(x)).
virtual iterator find (const key_type &x)
 Searches the map for a pair with the key value x and returns an iterator to that pair if it is found. If such a pair is not found the value end() is returned.
virtual iterator lower_bound (const key_type &x)
 Returns a reference to the first entry with a key greater than or equal to x.
virtual iterator upper_bound (const key_type &x)
 Returns an iterator for the first entry with a key greater than x.
virtual void clear ()
 Erases all elements from the self.
virtual void erase (iterator position)
 Deletes the map element pointed to by the iterator position.
virtual void erase (iterator start, iterator finish)
 If the iterators start and finish point to the same map and last is reachable from first, all elements in the range [start, finish) are deleted from the map.
virtual size_type erase (const key_type &x)
 Deletes the element with the key value x from the map, if one exists. Returns 1 if x existed in the map, 0 otherwise.
virtual std::pair< iterator, bool > insert (const value_type &x)
 If a value_type with the same key as x is not present in the map, then x is inserted into the map. Otherwise, the pair is not inserted.
virtual iterator insert (iterator position, const value_type &x)
 If a value_type with the same key as x is not present in the map, then x is inserted into the map. Otherwise, the pair is not inserted. A position may be supplied as a hint regarding where to do the insertion. If the insertion is done right after position, then it takes amortized constant time. Otherwise it takes O(log N) time.
virtual bool operator== (const ModificationMap &rhs) const
 returns true iff the map has the same modifications
virtual bool operator< (const ModificationMap &rhs) const
 returns true iff the map has fewer modified positions or one of the positions is less than in the rhs map
- Public Member Functions inherited from pwiz::util::virtual_map< int, ModificationList >
 virtual_map (const key_compare &predicate=key_compare(), const allocator_type &allocator=allocator_type())
 Constructs an empty map that uses the predicate _Pred to order keys, if it is supplied. The map uses the allocator _Alloc for all storage management, if it is supplied.
 virtual_map (_Iter _First, _Iter _Last)
 Constructs a map containing values in the range [_First, _Last). Creation of the new map is only guaranteed to succeed if the iterators start and finish return values of type pair<class Key, class Value> and all values of Key in the range [_First, _Last) are unique. The map uses the predicate _Pred to order keys, and the allocator _Alloc for all storage management.
 virtual_map (_Iter _First, _Iter _Last, const key_compare &_Pred)
 Constructs a map containing values in the range [_First, _Last). Creation of the new map is only guaranteed to succeed if the iterators start and finish return values of type pair<class Key, class Value> and all values of Key in the range [_First, _Last) are unique. The map uses the predicate _Pred to order keys, and the allocator _Alloc for all storage management.
 virtual_map (_Iter _First, _Iter _Last, const key_compare &_Pred, const allocator_type &_Al)
 Constructs a map containing values in the range [_First, _Last). Creation of the new map is only guaranteed to succeed if the iterators start and finish return values of type pair<class Key, class Value> and all values of Key in the range [_First, _Last) are unique. The map uses the predicate _Pred to order keys, and the allocator _Alloc for all storage management.
virtual ~virtual_map ()
virtual allocator_type get_allocator () const
 Returns a copy of the allocator used by self for storage management.
virtual const_iterator begin () const
 Returns a const_iterator pointing to the first element stored in the map.
virtual const_iterator end () const
 Returns a const_iterator pointing to the last element stored in the map.
virtual const_reverse_iterator rbegin () const
 Returns a const_reverse_iterator pointing to the first element stored in the map.
virtual const_reverse_iterator rend () const
 Returns a const_reverse_iterator pointing to the last element stored in the map.
virtual virtual_map< int,
ModificationList, key_compare,
allocator_type > & 
operator= (const virtual_map< int, ModificationList, key_compare, allocator_type > &x)
 Replaces the contents of *this with a copy of the map x.
virtual size_type count (const key_type &x) const
 Returns a 1 if a value with the key x exists in the map. Otherwise returns a 0.
virtual bool empty () const
 Returns true if the map is empty, false otherwise.
virtual std::pair
< const_iterator,
const_iterator
equal_range (const key_type &x) const
 Returns the pair (lower_bound(x), upper_bound(x)).
virtual const_iterator find (const key_type &x) const
 Same as find above but returns a const_iterator.
void insert (InputIterator start, InputIterator finish)
 Copies of each element in the range [start, finish) that possess a unique key (one not already in the map) are inserted into the map. The iterators start and finish must return values of type pair<T1,T2>. This operation takes approximately O(N*log(size()+N)) time.
virtual key_compare key_comp () const
 Returns a function object capable of comparing key values using the comparison operation, Compare, of the current map.
virtual const_iterator lower_bound (const key_type &x) const
 Same as lower_bound above but returns a const_iterator.
virtual size_type max_size () const
 Returns the maximum possible size of the map. This size is only constrained by the number of unique keys that can be represented by the type Key.
virtual size_type size () const
 Returns the number of elements in the map.
virtual void swap (virtual_map< int, ModificationList, key_compare, allocator_type > &x)
 Swaps the contents of the map x with the current map, *this.
virtual const_iterator upper_bound (const key_type &x) const
 Same as upper_bound above, but returns a const_iterator.
virtual value_compare value_comp () const
 Returns a function object capable of comparing pair<const Key, T> values using the comparison operation, Compare, of the current map. This function is identical to key_comp for sets.

Static Public Member Functions

static int NTerminus ()
static int CTerminus ()

Private Member Functions

 ModificationMap ()
 ModificationMap (const ModificationMap &other)
ModificationMapoperator= (const ModificationMap &)
virtual void swap (ModificationMap &)

Private Attributes

boost::shared_ptr< Impl > impl_

Friends

class Peptide::Impl

Additional Inherited Members

- Public Types inherited from pwiz::util::virtual_map< int, ModificationList >
typedef std::map< int,
ModificationList, std::less
< int >, std::allocator
< std::pair< const int,
ModificationList > > > 
BaseType
typedef BaseType::allocator_type allocator_type
typedef BaseType::key_type key_type
typedef BaseType::value_type value_type
typedef BaseType::key_compare key_compare
typedef BaseType::value_compare value_compare
typedef BaseType::size_type size_type
typedef BaseType::mapped_type mapped_type
typedef BaseType::difference_type difference_type
typedef BaseType::pointer pointer
typedef BaseType::const_pointer const_pointer
typedef BaseType::reference reference
typedef BaseType::const_reference const_reference
typedef BaseType::iterator iterator
typedef BaseType::const_iterator const_iterator
typedef BaseType::reverse_iterator reverse_iterator
typedef
BaseType::const_reverse_iterator 
const_reverse_iterator

Detailed Description

maps peptide/protein sequence indexes (0-based) to a modification list

Definition at line 104 of file Modification.hpp.


Constructor & Destructor Documentation

pwiz::proteome::ModificationMap::~ModificationMap ( )
pwiz::proteome::ModificationMap::ModificationMap ( )
private
pwiz::proteome::ModificationMap::ModificationMap ( const ModificationMap other)
private

Member Function Documentation

static int pwiz::proteome::ModificationMap::NTerminus ( )
static
static int pwiz::proteome::ModificationMap::CTerminus ( )
static

Referenced by testConversion().

double pwiz::proteome::ModificationMap::monoisotopicDeltaMass ( ) const

returns the sum of the monoisotopic delta masses of all modifications in the map

double pwiz::proteome::ModificationMap::averageDeltaMass ( ) const

returns the sum of the average delta masses of all modifications in the map

virtual iterator pwiz::proteome::ModificationMap::begin ( )
virtual

Returns an iterator pointing to the first element stored in the map. First is defined by the map's comparison operator, Compare.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual iterator pwiz::proteome::ModificationMap::end ( )
virtual

Returns an iterator pointing to the last element stored in the map; in other words, to the off-the-end value.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

Referenced by modificationTest().

virtual reverse_iterator pwiz::proteome::ModificationMap::rbegin ( )
virtual

Returns a reverse_iterator pointing to the first element stored in the map. First is defined by the map's comparison operator, Compare.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual reverse_iterator pwiz::proteome::ModificationMap::rend ( )
virtual

Returns a reverse_iterator pointing to the last element stored in the map; in other words, to the off-the-end value).

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual mapped_type& pwiz::proteome::ModificationMap::operator[] ( const key_type x)
virtual

If an element with the key x exists in the map, then a reference to its associated value is returned. Otherwise the pair x,T() is inserted into the map and a reference to the default object T() is returned.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual std::pair<iterator, iterator> pwiz::proteome::ModificationMap::equal_range ( const key_type x)
virtual

Returns the pair (lower_bound(x), upper_bound(x)).

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual iterator pwiz::proteome::ModificationMap::find ( const key_type x)
virtual

Searches the map for a pair with the key value x and returns an iterator to that pair if it is found. If such a pair is not found the value end() is returned.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

Referenced by modificationTest(), and testConversion().

virtual iterator pwiz::proteome::ModificationMap::lower_bound ( const key_type x)
virtual

Returns a reference to the first entry with a key greater than or equal to x.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual iterator pwiz::proteome::ModificationMap::upper_bound ( const key_type x)
virtual

Returns an iterator for the first entry with a key greater than x.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual void pwiz::proteome::ModificationMap::clear ( )
virtual

Erases all elements from the self.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual void pwiz::proteome::ModificationMap::erase ( iterator  position)
virtual

Deletes the map element pointed to by the iterator position.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual void pwiz::proteome::ModificationMap::erase ( iterator  start,
iterator  finish 
)
virtual

If the iterators start and finish point to the same map and last is reachable from first, all elements in the range [start, finish) are deleted from the map.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual size_type pwiz::proteome::ModificationMap::erase ( const key_type x)
virtual

Deletes the element with the key value x from the map, if one exists. Returns 1 if x existed in the map, 0 otherwise.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual std::pair<iterator, bool> pwiz::proteome::ModificationMap::insert ( const value_type x)
virtual

If a value_type with the same key as x is not present in the map, then x is inserted into the map. Otherwise, the pair is not inserted.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual iterator pwiz::proteome::ModificationMap::insert ( iterator  position,
const value_type x 
)
virtual

If a value_type with the same key as x is not present in the map, then x is inserted into the map. Otherwise, the pair is not inserted. A position may be supplied as a hint regarding where to do the insertion. If the insertion is done right after position, then it takes amortized constant time. Otherwise it takes O(log N) time.

Reimplemented from pwiz::util::virtual_map< int, ModificationList >.

virtual bool pwiz::proteome::ModificationMap::operator== ( const ModificationMap rhs) const
virtual

returns true iff the map has the same modifications

virtual bool pwiz::proteome::ModificationMap::operator< ( const ModificationMap rhs) const
virtual

returns true iff the map has fewer modified positions or one of the positions is less than in the rhs map

ModificationMap& pwiz::proteome::ModificationMap::operator= ( const ModificationMap )
private
virtual void pwiz::proteome::ModificationMap::swap ( ModificationMap )
privatevirtual

Friends And Related Function Documentation

friend class Peptide::Impl
friend

Definition at line 190 of file Modification.hpp.


Member Data Documentation

boost::shared_ptr<Impl> pwiz::proteome::ModificationMap::impl_
private

Definition at line 187 of file Modification.hpp.


The documentation for this class was generated from the following file: