Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MinValueEvaluator.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 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file relax_initialization_protocols
11 /// @brief initialization protocols for relax
12 /// @detailed
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 
18 
19 
20 #ifndef INCLUDED_protocols_simple_filters_MinValueEvaluator_hh
21 #define INCLUDED_protocols_simple_filters_MinValueEvaluator_hh
22 
23 
24 // Unit Headers
26 
27 // Package Headers
28 
29 // Project Headers
31 #include <core/pose/Pose.fwd.hh>
32 
33 // ObjexxFCL Headers
34 
35 // Utility headers
36 #include <utility/pointer/ReferenceCount.hh>
37 #include <utility/vector1.hh>
38 
39 //// C++ headers
40 #include <list>
41 
42 namespace protocols {
43 namespace simple_filters {
44 
45 template< class T >
47 public:
49  evaluation::SingleValuePoseEvaluator< T > ( "min_"+eval_in->name() ),
50  evaluator_( eval_in ),
51  min_value_( 1000000 )
52  {};
53 
54  virtual
55  T apply( core::pose::Pose& pose ) const {
56  T val = evaluator_->apply( pose );
57  if ( min_value_ > val ) min_value_ = val;
58  return min_value_;
59  }
60 
61 private:
63  mutable T min_value_;
64 };
65 
66 }
67 }
68 
69 #endif