Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SumFunc.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/SumFunc.hh
11 /// @brief Sum of several individual constraints.
12 /// @author James Thompson, Greg Taylor
13 
14 
15 #ifndef INCLUDED_core_scoring_constraints_SumFunc_hh
16 #define INCLUDED_core_scoring_constraints_SumFunc_hh
17 
19 
20 #include <core/types.hh>
21 
22 #include <utility/pointer/ReferenceCount.hh>
23 
24 // AUTO-REMOVED #include <basic/Tracer.hh>
25 
26 #include <utility/vector1_bool.hh>
27 
28 
29 // C++ Headers
30 
31 namespace core {
32 namespace scoring {
33 namespace constraints {
34 
35  class SumFunc : public Func {
36  public:
37  // general func
38  SumFunc() {}
39 
40  //SumFunc operator =( SumFunc const & other ):
41  // Func()
42  //{
43  // funcs_ = other.funcs();
44  // return *this;
45  //}
46 
47  //SumFunc( SumFunc const & src )
48  //{
49  // *this = src;
50  //}
51 
52  FuncOP
53  clone() const { return new SumFunc( *this ); }
54 
55  Real func( Real const x ) const;
56  Real dfunc( Real const x ) const;
57 
58  void read_data( std::istream& );
59 
60  // class-specific accessors
62  return funcs_;
63  }
64 
66  funcs_ = funcs;
67  }
68 
69  void add_func( FuncOP f ) {
70  funcs_.push_back( f );
71  }
72 
73  private:
75  };
76 } // constraints
77 } // scoring
78 } // core
79 
80 #endif