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
fragment
FragSetCollection.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file core/fragments/FragSet.cc
12
/// @brief set of fragments for a certain alignment frame
13
/// @author Oliver Lange (olange@u.washington.edu)
14
/// @author James Thompson (tex@u.washington.edu)
15
/// @date Wed Oct 20 12:08:31 2007
16
///
17
18
// Unit Headers
19
#include <
core/fragment/FragSetCollection.hh
>
20
#ifdef WIN32
21
#include <
core/fragment/Frame.hh
>
22
#endif
23
24
// Package Headers
25
#include <
core/fragment/FragSet.hh
>
26
#include <
core/fragment/FrameIteratorWorker_.hh
>
27
28
// Project Headers
29
#include <
core/types.hh
>
30
31
// Utility headers
32
#include <utility/vector1.fwd.hh>
33
#include <utility/exit.hh>
34
35
//#include <basic/Tracer.hh>
36
37
// AUTO-REMOVED #include <ostream>
38
// AUTO-REMOVED #include <set>
39
40
#include <
core/fragment/FrameIterator.hh
>
41
#include <utility/vector1.hh>
42
43
44
namespace
core {
45
namespace
fragment {
46
47
//static basic::Tracer tr("core.fragment");
48
using namespace
kinematics;
49
50
FragSetCollection::FragSetCollection
() {}
51
FragSetCollection::~FragSetCollection
() {}
52
FragSetCollection::FragSetCollection
(
FragSetCollection
const
& src ) :
53
Parent
( src ),
54
fragset_list_( src.fragset_list_ )
55
{}
56
57
FragSetOP
FragSetCollection::clone
()
const
{
58
return
new
FragSetCollection
( *
this
);
59
}
60
FragSetOP
FragSetCollection::empty_clone
()
const
{
61
return
new
FragSetCollection
();
62
}
63
64
65
Size
66
FragSetCollection::region
(
67
MoveMap
const
& move_map,
68
Size
start
,
69
Size
end
,
70
Size
min_overlap,
71
Size
min_length,
72
FrameList
&frames
73
)
const
{
74
Size
count ( 0 );
75
for
( FragSetList::const_iterator it =
fragset_list_
.begin(), eit =
fragset_list_
.end();
76
it != eit; ++it ) {
77
count += (*it)->region( move_map, start, end, min_overlap, min_length, frames );
78
}
79
return
count;
80
}
81
82
void
FragSetCollection::add_fragset
(
FragSetOP
fragset ) {
83
if
( fragset->max_frag_length() >
max_frag_length
() )
set_max_frag_length
( fragset->max_frag_length() );
84
if
( fragset->min_pos() <
min_pos
() )
set_min_pos
( fragset->min_pos() );
85
if
( fragset->max_pos() >
max_pos
() )
set_max_pos
( fragset->max_pos() );
86
fragset_list_
.push_back( fragset );
87
}
88
89
FrameIterator
FragSetCollection::begin
()
const
{
90
std::cout <<
"iterator of FragSetCollection has stubbed out "
<< std::endl;
91
assert( 0 );
92
utility_exit_with_message(
"iterator of FragSetCollection has stubbed out "
);
93
return
FrameIterator
();
//too make compiler happy
94
}
95
96
FrameIterator
FragSetCollection::end
()
const
{
97
std::cout <<
"iterator of FragSetCollection has stubbed out "
<< std::endl;
98
assert( 0 );
99
utility_exit_with_message(
"iterator of FragSetCollection has stubbed out "
);
100
return
FrameIterator
();
//too make compiler happy
101
}
102
103
bool
FragSetCollection::empty
()
const
{
104
for
( FragSetList::const_iterator it =
fragset_list_
.begin(); it !=
fragset_list_
.end(); ++it ) {
105
if
( !(*it)->empty() )
return
false
;
106
}
107
return
true
;
108
}
109
110
void
FragSetCollection::add_
(
FrameOP
) {
111
//tricky which FragSet should it add the frame to? needs a way to determine this
112
std::cout <<
"add Frame to FragSetCollection has stubbed out "
<< std::endl;
113
assert( 0 );
114
utility_exit_with_message(
"add Frame to FragSetCollection has stubbed out "
);
115
}
116
117
118
}
//fragment
119
}
//core
Generated on Sat Jun 1 2013 11:32:34 for Rosetta 3.5 by
1.8.4