Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatchConsolidator.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/match/output/MatchConsolidator.hh
12 /// @brief
13 /// @author Alex Zanghellini (zanghell@u.washington.edu)
14 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15 
16 #ifndef INCLUDED_protocols_match_output_MatchConsolidator_hh
17 #define INCLUDED_protocols_match_output_MatchConsolidator_hh
18 
19 // Unit headers
21 
22 // Package headers
23 #ifdef WIN32
24 #include <protocols/match/Hit.hh>
25 #endif
29 
30 // Project headers
31 #include <core/types.hh>
32 
33 // Utility headers
34 #include <utility/pointer/ReferenceCount.hh>
35 #include <utility/heap.hh>
36 
37 // C++ headers
38 #include <list>
39 
40 #include <utility/vector0.hh>
41 #include <utility/vector1_bool.hh>
42 
43 
44 namespace protocols {
45 namespace match {
46 namespace output {
47 
49 public:
50  typedef core::Real Real;
51  typedef core::Size Size;
52 public:
54 
55  virtual
57 
58  virtual
59  void
61 
62  virtual
63  void
65  match const & m
66  );
67 
68  virtual
69  void
71  match_dspos1 const & m
72  );
73 
74  virtual
75  void
77 
78  void
80 
81  void
82  set_grouper( MatchGrouperOP grouper );
83 
84  void
85  set_evaluator( MatchEvaluatorOP evaluator );
86 
87  //void
88  //set_output_writer( OutputWriterOP writer );
89 
90  void
91  reset_grouper();
92 
93 private:
96 
97 private:
98 
101 
103 
104  //OutputWriterOP writer_;
105 
106  //utility::vector1< std::list< match > > match_groups_;
107  //utility::vector1< std::list< match_dspos1 > > match_dspos1_groups_;
108 
110 
111 };
112 
113 
115 {
116 public:
117  typedef core::Size Size;
118  typedef core::Real Real;
119 
120 public:
121  BestMatchesCollection( Size n_to_keep, bool dspos1_mode = false );
122  virtual ~BestMatchesCollection();
123 
124  void
125  add_match( match const & m, Real score );
126 
127  void
128  add_match_dspos1( match_dspos1 const & m, Real score );
129 
130  bool dspos1_mode() const { return dspos1_mode_; }
131 
132  Size
133  n_kept_matches() const;
134 
135  match const &
136  kept_match( Size which_match ) const;
137 
138  match_dspos1 const &
139  kept_match_dspos1( Size which_match ) const;
140 
141 private:
142 
143  Size
144  index_for_new_match( Real score );
145 
146 private:
148  bool const dspos1_mode_; // store matches or match_dspos1s?
149 
150 
151  utility::heap scores_heap_;
152 
155 
156 };
157 
158 
159 }
160 }
161 }
162 
163 #endif