Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TrieCollection.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 core/scoring/trie/TrieCollection.cc
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // STL Headers
21 
22 namespace core {
23 namespace scoring {
24 namespace trie {
25 
27 TrieCollection::trie( Size index ) const
28 {
29  return tries_[ index ];
30 }
31 
32 void
34 {
35  tries_.resize( total_residue_in );
36  std::fill( tries_.begin(), tries_.end(), RotamerTrieBaseOP( 0 ) );
37 }
38 
39 Size
41 {
42  return tries_.size();
43 }
44 
45 void
47 {
48  tries_[ index ] = new_trie;
49 }
50 
51 basic::datacache::CacheableDataOP
53 {
54  return new TrieCollection( *this );
55 }
56 
57 
58 } // namespace trie
59 } // namespace scoring
60 } // namespace core
61