Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
scoring
constraints
ConstantFunc.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 src/core/scoring/constraints/ConstantFunc.hh
11
/// @brief Definition for functions used in definition of constraints.
12
/// @author John Karanicolas
13
14
#ifndef INCLUDED_core_scoring_constraints_ConstantFunc_hh
15
#define INCLUDED_core_scoring_constraints_ConstantFunc_hh
16
17
#include <
core/scoring/constraints/Func.hh
>
18
19
#include <
core/types.hh
>
20
21
// C++ Headers
22
23
24
namespace
core {
25
namespace
scoring {
26
namespace
constraints {
27
28
/// @brief Derived class of class Func representing a Constant distribution with a user-specified
29
/// mean and standard deviation.
30
class
ConstantFunc
:
public
Func
{
31
public
:
32
33
// Constuctor for ConstantFunc. Arguments to the constructor are:
34
// return_val: (constant) return value
35
ConstantFunc
(
Real
const
return_val ) :
36
return_val_
( return_val )
37
{}
38
39
/// @brief returns a clone of this ConstantFunc
40
FuncOP
clone
()
const
{
return
new
ConstantFunc
( *
this
); }
41
42
/// @brief Returns the value of this ConstantFunc evaluated at distance x.
43
Real
func
(
Real
const
)
const
;
44
45
/// @brief Returns the value of the first derivative of this ConstantFunc at distance x.
46
Real
dfunc
(
Real
const
)
const
;
47
48
/// @brief show the definition of this ConstantFunc to the specified output stream.
49
virtual
void
show_definition
( std::ostream & out )
const
;
50
51
/// @brief Calls show( out ) on this ConstantFunc.
52
friend
std::ostream &
operator<<
(std::ostream & out,
const
ConstantFunc
& f ) {
53
f.
show
( out );
54
return
out;
55
}
// operator<<
56
57
void
read_data
( std::istream & in );
58
59
private
:
60
61
Real
return_val_
;
62
};
63
64
}
// constraints
65
}
// scoring
66
}
// core
67
68
#endif
Generated on Sat Jun 1 2013 11:35:11 for Rosetta 3.5 by
1.8.4