Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CountPairData_1_2.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/trie/trie_vs_trie.hh
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 #ifndef INCLUDED_core_scoring_etable_etrie_CountPairData_1_2_hh
15 #define INCLUDED_core_scoring_etable_etrie_CountPairData_1_2_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  inline
39  bool operator < ( CountPairData_1_2 const & other ) const
40  {
41  if ( connection_distances_[ 0 ] < other.connection_distances_[ 0 ] ) return true;
42  else if ( other.connection_distances_[ 0 ] < connection_distances_[ 0 ] ) return false;
43  else if ( connection_distances_[ 1 ] < other.connection_distances_[ 1 ] ) return true;
44  else if ( other.connection_distances_[ 1 ] < connection_distances_[ 1 ] ) return false;
45  return false;
46  }
47 
48  inline
49  bool operator == ( CountPairData_1_2 const & other ) const
50  {
51  if ( connection_distances_[ 0 ] == other.connection_distances_[ 0 ] &&
52  other.connection_distances_[ 1 ] == connection_distances_[ 1 ] ) {
53  return true;
54  } else {
55  return false;
56  }
57  }
58 
59 
60  void print( std::ostream & os ) const;
61 
62  //void
63  //set_count_pair_data_to_use( Size entry ) const;
64 
65  inline
66  Size
67  conn_dist( Size which_connection ) const
68  {
69  assert( which_connection == 0 || which_connection == 1 );
70  return connection_distances_[ which_connection ];
71  }
72 
73 private:
74  //mutable Size connection_distance_at_hand_;
76 
77 
78 };
79 
80 std::ostream & operator << ( std::ostream & os, CountPairData_1_2 const & cpdat );
81 
82 } // namespace etrie
83 } // namespace etable
84 } // namespace scoring
85 } // namespace core
86 
87 #endif