Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScoringScheme.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 ScoringScheme.cc
11 /// @brief abstract base class for representing scoring schemes for alignments.
12 
13 // Unit headers
15 
16 #include <core/types.hh>
19 
20 #include <utility/exit.hh>
21 #include <utility/io/izstream.fwd.hh>
22 #include <utility/file/FileName.fwd.hh>
23 #include <utility/pointer/ReferenceCount.hh>
24 
25 // AUTO-REMOVED #include <iostream>
26 #include <string>
27 #include <complex>
28 
29 namespace core {
30 namespace sequence {
31 
32 /// @brief ctor
34 
35 /// @brief dtor
37 
38 /// @brief Initialize from a file.
40  utility::file::FileName const & /*fn*/
41 ) {
42  unimplemented_method_error( "read_from_file" );
43 }
44 
45 void ScoringScheme::read_data( utility::io::izstream & /*input*/ ) {
46  unimplemented_method_error( "read_data" );
47 }
48 
49 /// @brief Gets the gap opening penalty.
51  return gap_open_;
52 }
53 
54 /// @brief Gets the gap extension penalty.
56  return gap_extend_;
57 }
58 
59 /// @brief Sets the gap opening penalty.
60 void ScoringScheme::gap_open( Real const gap_open ) {
62 }
63 
64 /// @brief Sets the gap extension penalty.
65 void ScoringScheme::gap_extend( Real const gap_extend ) {
67 }
68 
69 /// @brief getters for type, which is a unique string name for this object.
71  return type_;
72 }
73 
74 /// @brief getters for type, which is a unique string name for this object.
75 void ScoringScheme::type( std::string new_type ) {
76  type_ = new_type;
77 }
78 
79 /// @brief Utility method for producing useful error messages and exiting
80 /// from program. Declared const which is funny, because exiting the program
81 /// certainly changes the state of this object! This might be replaced with
82 /// exception handling if we ever start using those.
84  std::string const & method_name
85 ) const {
86  utility_exit_with_message(
87  "Called ScoringScheme::" + method_name + " method from derived class " +
88  type() + "," + "ended up in ScoringScheme::" + method_name + "\n"
89  );
90 }
91 
93  Real const & num
94 ) {
95  static Real const TOL(1e-5);
96  using std::abs;
97  return (
98  abs( num - 9999.000 ) > TOL && abs( num - 0 ) > TOL
99  );
100 }
101 
102 } // sequence
103 } // core