Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
nonlocal
Region.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 protocols/nonlocal/Region.cc
11
/// @author Christopher Miles (cmiles@uw.edu)
12
13
// Unit header
14
#include <
protocols/nonlocal/Region.hh
>
15
16
// Project headers
17
#include <
core/types.hh
>
18
19
namespace
protocols {
20
namespace
nonlocal {
21
22
/// @details Auto-generated virtual destructor
23
Region::~Region
() {}
24
25
Region::Region
(
core::Size
start_pos,
core::Size
stop_pos)
26
: start_(start_pos), stop_(stop_pos) {}
27
28
core::Size
Region::start
()
const
{
29
return
start_
;
30
}
31
32
core::Size
Region::stop
()
const
{
33
return
stop_
;
34
}
35
36
core::Size
Region::length
()
const
{
37
return
increasing
() ?
stop
() -
start
() + 1 :
start
() -
stop
() + 1;
38
}
39
40
bool
Region::increasing
()
const
{
41
return
start
() <=
stop
();
42
}
43
44
bool
Region::decreasing
()
const
{
45
return
stop
() <=
start
();
46
}
47
48
}
// namespace nonlocal
49
}
// namespace protocols
Generated on Sat Jun 1 2013 12:01:43 for Rosetta 3.5 by
1.8.4