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
frag_picker
CompositeFragmentSelector.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/frag_picker/CompositeFragmentSelector.cc
11
/// @brief provides a selector that picks best fragments based on their total score
12
/// @author Dominik Gront (dgront@chem.uw.edu.pl)
13
14
#include <
protocols/frag_picker/CompositeFragmentSelector.hh
>
15
16
// package headers
17
#include <
protocols/frag_picker/FragmentCandidate.hh
>
18
#include <
protocols/frag_picker/scores/FragmentScoreMap.fwd.hh
>
19
20
#include <utility/vector1.hh>
21
22
namespace
protocols {
23
namespace
frag_picker {
24
25
/// @brief Selects desired number of fragments from a given set of candidates
26
void
CompositeFragmentSelector::select_fragments
(
27
ScoredCandidatesVector1
const
& in,
28
ScoredCandidatesVector1
& out )
29
{
30
if
(
selectors_
.size()==0 )
return
;
31
if
(
selectors_
.size()==1 ) {
32
selectors_
[1]->select_fragments(in,out);
33
return
;
34
}
35
Size
n =
selectors_
.size();
36
ScoredCandidatesVector1
tmp, tmp_tmp;
37
selectors_
[1]->select_fragments(in,tmp);
38
for
(
Size
i=2;i<=n-1;i++) {
39
selectors_
[i]->select_fragments(tmp,tmp_tmp);
40
tmp.clear();
41
for
(
Size
j=1;j<=tmp_tmp.size();j++)
42
tmp.push_back(tmp_tmp[j]);
43
}
44
selectors_
[n]->select_fragments(tmp,out);
45
}
46
47
}
// frag_picker
48
}
// protocols
Generated on Sat Jun 1 2013 11:52:25 for Rosetta 3.5 by
1.8.4