Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MinimizationData.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 core/scoring/MinimizationData.cc
11 /// @brief A container class for use by certain EnergyMethods during derivative and
12 // score function evaluation during minimization routines.
13 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
14 
15 
16 // Unit headers
18 
19 // Project headers
20 #include <basic/datacache/CacheableData.hh>
21 
22 #include <utility/vector1.hh>
23 
24 
25 
26 namespace core {
27 namespace scoring {
28 
32  utility::pointer::ReferenceCount(),
33  data_cache_( n_min_single_data )
34 {
35  for ( Size ii = 1; ii <= n_min_single_data; ++ii ) {
36  data_cache_[ ii ] = other.data_cache_[ ii ] ? other.data_cache_[ ii ]->clone() : CacheableDataOP( 0 );
37  }
38 }
39 
42  if ( this != & rhs ) {
43  for ( Size ii = 1; ii <= n_min_single_data; ++ii ) {
44  data_cache_[ ii ] = rhs.data_cache_[ ii ] ? rhs.data_cache_[ ii ]->clone() : CacheableDataOP( 0 );
45  }
46  }
47  return *this;
48 }
49 
51  data_cache_[ index ] = data;
52 }
53 
56 {
57  return data_cache_[ index ];
58 }
59 
62 {
63  return data_cache_[ index ];
64 }
65 
66 
70  utility::pointer::ReferenceCount(),
71  data_cache_( n_min_pair_data )
72 {
73  for ( Size ii = 1; ii <= n_min_pair_data; ++ii ) {
74  data_cache_[ ii ] = other.data_cache_[ ii ] ? other.data_cache_[ ii ]->clone() : CacheableDataOP( 0 );
75  }
76 }
77 
80 {
81  if ( this != & rhs ) {
82  for ( Size ii = 1; ii <= n_min_pair_data; ++ii ) {
83  data_cache_[ ii ] = rhs.data_cache_[ ii ] ? rhs.data_cache_[ ii ]->clone() : CacheableDataOP( 0 );
84  }
85  }
86  return *this;
87 }
88 
90 {
91  data_cache_[ index ] = data;
92 }
93 
96 {
97  return data_cache_[ index ];
98 }
99 
102 {
103  return data_cache_[ index ];
104 }
105 
106 
107 }
108 }
109