Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstantFunc.cc
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 src/core/scoring/constraints/ConstantFunc.cc
11 /// @brief Definition for functions used in definition of constraints.
12 /// @author John Karanicolas
13 
15 #include <core/types.hh>
16 
17 // C++ Headers
18 #include <iostream>
19 
20 namespace core {
21 namespace scoring {
22 namespace constraints {
23 
24  void
25  ConstantFunc::read_data( std::istream & in ) {
26  in >> return_val_;
27  }
28 
29  Real
30  ConstantFunc::func( Real const ) const {
31  return return_val_;
32  } // func
33 
34  Real
35  ConstantFunc::dfunc( Real const ) const {
36  return 0;
37  } // dfunc
38 
39  void ConstantFunc::show_definition( std::ostream & out ) const {
40  out << "CONSTANTFUNC " << return_val_ << "\n";
41  }
42 
43 } // namespace constraints
44 } // namespace scoring
45 } // namespace core
46