Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SplineFunc.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 // (C) 199x-2009 University of Washington
10 // (C) 199x-2009 University of California Santa Cruz
11 // (C) 199x-2009 University of California San Francisco
12 // (C) 199x-2009 Johns Hopkins University
13 // (C) 199x-2009 University of North Carolina, Chapel Hill
14 // (C) 199x-2009 Vanderbilt University
15 
16 /// @file core/scoring/constraints/SplineFunc.hh
17 /// @brief Constraint function for looking up data in a histogram over which a spline is created
18 /// @author Stephanie Hirst (stephanie.j.hirst@vanderbilt.edu)
19 
20 #ifndef INCLUDED_core_scoring_constraints_SplineFunc_hh
21 #define INCLUDED_core_scoring_constraints_SplineFunc_hh
22 
23 // Unit Headers
25 
26 // Package Headers
29 
30 // Project Headers
31 
32 // Utility and Numeric Headers
33 #include <utility/vector1.hh>
34 #include <numeric/interpolation/spline/Interpolator.hh>
35 
36 // C++ Headers
37 #include <iostream>
38 
39 
40 namespace core {
41  namespace scoring {
42  namespace constraints {
43 
44 class SplineFunc : public Func {
45 
46 public:
47 
48  // @brief SplineFunc construction and destruction
49  SplineFunc();
50  ~SplineFunc();
51 
52  /// @brief returns a clone of this SplineFunc
53  virtual
54  FuncOP clone() const { return new SplineFunc( *this ); }
55 
56  /// @brief return SplineFunc member variables
58 
60 
62 
64 
66 
68 
70 
72 
74 
76 
78 
79  /// @brief initialize this SplineFunc from the given izstream.
80  virtual
81  void read_data ( std::istream &in );
82 
83  /// @brief Returns the value of this SplineFunc evaluated at distance x.
84  virtual
85  core::Real func( core::Real const x ) const;
86 
87  /// @brief Returns the value of the first derivative of this SplineFunc at distance x.
88  virtual
89  core::Real dfunc( core::Real const x ) const;
90 
91  /// @brief show the definition of this SplineFunc to the specified output stream.
92  virtual
93  void show_definition( std::ostream &out ) const;
94 
95  /// @brief show some sort of stringified representation of the violations for this constraint.
96  virtual
97  core::Size show_violations( std::ostream &out, core::Real x, core::Size verbose_level, core::Real threshold = 1 ) const;
98 
99 private:
100 
116  numeric::interpolation::spline::InterpolatorOP interpolator_;
117 
118 }; // SplineFunc class
119 
120  } // constraints
121  } // scoring
122 } // core
123 
124 #endif
125