Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CountPairData_1_3.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 core/scoring/etable/etrie/CountPairData_1_3.hh
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 #ifndef INCLUDED_core_scoring_etable_etrie_CountPairData_1_3_hh
15 #define INCLUDED_core_scoring_etable_etrie_CountPairData_1_3_hh
16 
17 // Unit Headers
19 
20 // Project Headers
21 #include <core/types.hh>
22 
23 // STL Headers
24 #include <iosfwd>
25 #include <cassert>
26 
27 namespace core {
28 namespace scoring {
29 namespace etable {
30 namespace etrie {
31 
33 {
34 public:
35 
36  void set_dist_to_connect_point( Size entry, Size connpoint, Size connection_dist );
37 
38  void print( std::ostream & os ) const;
39 
40  inline
41  bool operator < ( CountPairData_1_3 const & other ) const
42  {
43  if ( connection_distances_[ 0 ] < other.connection_distances_[ 0 ] ) return true;
44  else if ( other.connection_distances_[ 0 ] < connection_distances_[ 0 ] ) return false;
45  else if ( connection_distances_[ 1 ] < other.connection_distances_[ 1 ] ) return true;
46  else if ( other.connection_distances_[ 1 ] < connection_distances_[ 1 ] ) return false;
47  else if ( connection_distances_[ 2 ] < other.connection_distances_[ 2 ] ) return true;
48  else if ( other.connection_distances_[ 2 ] < connection_distances_[ 2 ] ) return false;
49 
50  return false;
51  }
52 
53  inline
54  bool operator == ( CountPairData_1_3 const & other ) const
55  {
56  if ( connection_distances_[ 0 ] == other.connection_distances_[ 0 ] &&
57  connection_distances_[ 1 ] == other.connection_distances_[ 1 ] &&
58  connection_distances_[ 2 ] == other.connection_distances_[ 2 ] ) {
59  return true;
60  } else {
61  return false;
62  }
63  }
64 
65  //void
66  //set_count_pair_data_to_use( Size entry ) const;
67 
68  inline
69  Size
70  conn_dist( Size which_connection ) const
71  {
72  assert( which_connection == 0 || which_connection == 1 || which_connection == 2 );
73  return connection_distances_[ which_connection ];
74  }
75 
76 private:
77  //mutable Size connection_distance_at_hand_;
79 
80 };
81 
82 std::ostream & operator << ( std::ostream & os, CountPairData_1_3 const & cpdat );
83 
84 
85 } // namespace etrie
86 } // namespace etable
87 } // namespace scoring
88 } // namespace core
89 
90 #endif