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
core
id
DOF_ID_Range.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/id/DOF_ID_Range.hh
11
/// @author Colin A. Smith
12
13
14
#ifndef INCLUDED_core_id_DOF_ID_Range_hh
15
#define INCLUDED_core_id_DOF_ID_Range_hh
16
17
18
// Unit headers
19
#include <
core/id/DOF_ID_Range.fwd.hh
>
20
21
// Package headers
22
#include <
core/id/types.hh
>
23
#include <
core/id/DOF_ID.hh
>
24
25
// Numeric headers
26
//#include <numeric/constants.hh>
27
//#include <numeric/numeric.functions.hh>
28
29
// Utility headers
30
//#include <utility/exit.hh>
31
32
// C++ header
33
#include <cassert>
34
35
namespace
core {
36
namespace
id {
37
38
39
/// @brief Kinematics DOF identifier (with range) class
40
class
DOF_ID_Range
41
{
42
43
public
:
// Creation
44
45
DOF_ID_Range
(){};
46
47
DOF_ID_Range
(
48
DOF_ID
const
&
dof_id
,
49
Real
const
&
min
,
50
Real
const
&
max
51
):
52
dof_id_
( dof_id ),
53
min_
( min ),
54
max_
( max )
55
{};
56
57
public
:
// Properties
58
59
inline
60
DOF_ID
const
&
61
dof_id
()
const
{
return
dof_id_
; }
62
63
inline
64
Real
65
min
()
const
{
return
min_
; }
66
67
inline
68
Real
69
max
()
const
{
return
max_
; }
70
71
public
:
// Friends
72
73
friend
74
std::ostream &
75
operator <<
(
76
std::ostream & os,
77
DOF_ID_Range
const
& a
78
);
79
80
friend
81
inline
82
bool
83
operator ==
(
84
DOF_ID_Range
const
& a,
85
DOF_ID_Range
const
&
b
86
) {
return
a.
dof_id_
== b.
dof_id_
&& a.
min_
== b.
min_
&& a.
max_
== b.
max_
; }
87
88
friend
89
inline
90
bool
91
operator !=
(
92
DOF_ID_Range
const
& a,
93
DOF_ID_Range
const
&
b
94
) {
return
a.
dof_id_
!= b.
dof_id_
|| a.
min_
!= b.
min_
|| a.
max_
!= b.
max_
; }
95
96
friend
97
inline
98
bool
99
operator <
(
100
DOF_ID_Range
const
& a,
101
DOF_ID_Range
const
&
b
102
)
103
{
104
return
( a.
dof_id_
< b.
dof_id_
||
105
( ( a.
dof_id_
== b.
dof_id_
&& a.
min_
< b.
min_
) ||
106
( a.
min_
== b.
min_
&& a.
max_
< b.
max_
) ) );
107
}
108
109
private
:
// Fields
110
111
/// @brief DOF identifier
112
DOF_ID
dof_id_
;
113
114
/// @brief minimum value
115
core::Real
min_
;
116
117
/// @brief maximum value
118
core::Real
max_
;
119
120
};
// DOF_ID_Range
121
122
123
}
// namespace id
124
}
// namespace core
125
126
127
#endif // INCLUDED_core_id_DOF_ID_Range_HH
Generated on Sat Jun 1 2013 11:32:49 for Rosetta 3.5 by
1.8.4