~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to include/OpenMS/DATASTRUCTURES/GridFeature.h

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2012-11-12 15:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20121112155812-vr15wtg9b50cuesg
Tags: upstream-1.9.0
ImportĀ upstreamĀ versionĀ 1.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: C++; tab-width: 2; -*-
 
2
// vi: set ts=2:
 
3
//
 
4
// --------------------------------------------------------------------------
 
5
//                   OpenMS Mass Spectrometry Framework
 
6
// --------------------------------------------------------------------------
 
7
//  Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
 
8
//
 
9
//  This library is free software; you can redistribute it and/or
 
10
//  modify it under the terms of the GNU Lesser General Public
 
11
//  License as published by the Free Software Foundation; either
 
12
//  version 2.1 of the License, or (at your option) any later version.
 
13
//
 
14
//  This library is distributed in the hope that it will be useful,
 
15
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
//  Lesser General Public License for more details.
 
18
//
 
19
//  You should have received a copy of the GNU Lesser General Public
 
20
//  License along with this library; if not, write to the Free Software
 
21
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
//
 
23
// --------------------------------------------------------------------------
 
24
// $Maintainer: Hendrik Weisser $
 
25
// $Authors: Steffen Sass, Hendrik Weisser $
 
26
// --------------------------------------------------------------------------
 
27
 
 
28
#ifndef OPENMS_DATASTRUCTURES_GRIDFEATURE_H
 
29
#define OPENMS_DATASTRUCTURES_GRIDFEATURE_H
 
30
 
 
31
#include <OpenMS/KERNEL/StandardTypes.h>
 
32
#include <OpenMS/KERNEL/BaseFeature.h>
 
33
 
 
34
namespace OpenMS
 
35
{
 
36
 
 
37
/**
 
38
 * @brief Representation of a feature in a hash grid.
 
39
 * 
 
40
 * A GridFeature can be stored in a HashGrid and points to a BaseFeature (Feature or ConsensusFeature). Used for QT feature grouping (see QTClusterFinder).
 
41
 */
 
42
 
 
43
        class OPENMS_DLLAPI GridFeature 
 
44
        {
 
45
                private:
 
46
                /// Reference to the contained feature
 
47
                const BaseFeature& feature_;
 
48
 
 
49
                /// Index of the feature map or consensus map
 
50
                Size map_index_;
 
51
 
 
52
                /// Index of the feature in the map
 
53
                Size feature_index_;
 
54
 
 
55
                /// Set of peptide sequences annotated to the feature
 
56
                std::set<AASequence> annotations_;
 
57
 
 
58
        public:
 
59
                /**
 
60
                 * @brief Detailed constructor
 
61
                 * @param feature Reference to the contained feature
 
62
                 * @param map_index Index of the feature map or consensus map
 
63
                 * @param feature_index Index of the feature in the map
 
64
                 */
 
65
                GridFeature(const BaseFeature& feature, Size map_index, Size feature_index);
 
66
 
 
67
                /// Returns the feature
 
68
                const BaseFeature& getFeature() const;
 
69
 
 
70
                /// Destructor
 
71
                virtual ~GridFeature();
 
72
 
 
73
                /// Returns the map index
 
74
                Size getMapIndex() const;
 
75
                
 
76
                /// Returns the feature index
 
77
                Size getFeatureIndex() const;
 
78
 
 
79
                /// Returns the ID of the GridFeature (same as the feature index)
 
80
                Int getID() const;
 
81
 
 
82
                /// Returns the set of peptide sequences annotated to the cluster center
 
83
                const std::set<AASequence>& getAnnotations() const;
 
84
 
 
85
                /// Returns the feature RT
 
86
    DoubleReal getRT() const;
 
87
 
 
88
                /// Returns the feature m/z
 
89
    DoubleReal getMZ() const;
 
90
        };
 
91
}
 
92
 
 
93
#endif // OPENMS_DATASTRUCTURES_GRIDFEATURE_H