Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
xyz.serialization.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 numeric/xyz.serialization.cc
11 /// @brief functions for serializing xyzVector and xyzMatrix
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 
15 #ifdef SERIALIZATION
16 
17 // Package Headers
19 
20 // Utility headers
22 
23 namespace numeric {
24 
25 template < class Archive >
26 void
27 save(
28  Archive & arch,
30 )
31 {
32  arch( xyz.x(), xyz.y(), xyz.z() );
33 }
34 
35 template < class Archive >
36 void
37 save(
38  Archive & arch,
40 )
41 {
42  arch( xyz.x(), xyz.y(), xyz.z() );
43 }
44 
45 template < class Archive >
46 void
47 load(
48  Archive & arch,
50 )
51 {
52  arch( xyz.x(), xyz.y(), xyz.z() );
53 }
54 
55 template < class Archive >
56 void
57 load(
58  Archive & arch,
60 )
61 {
62  arch( xyz.x(), xyz.y(), xyz.z() );
63 }
64 
65 template < class Archive >
66 void
67 save(
68  Archive & arch,
69  numeric::xyzMatrix< float > const & xyz
70 )
71 {
72  arch( xyz.xx(), xyz.xy(), xyz.xz() );
73  arch( xyz.yx(), xyz.yy(), xyz.yz() );
74  arch( xyz.zx(), xyz.zy(), xyz.zz() );
75 }
76 
77 
78 template < class Archive >
79 void
80 save(
81  Archive & arch,
83 )
84 {
85  arch( xyz.xx(), xyz.xy(), xyz.xz() );
86  arch( xyz.yx(), xyz.yy(), xyz.yz() );
87  arch( xyz.zx(), xyz.zy(), xyz.zz() );
88 }
89 
90 template < class Archive >
91 void
92 load(
93  Archive & arch,
95 )
96 {
97  arch( xyz.xx(), xyz.xy(), xyz.xz() );
98  arch( xyz.yx(), xyz.yy(), xyz.yz() );
99  arch( xyz.zx(), xyz.zy(), xyz.zz() );
100 }
101 
102 template < class Archive >
103 void
104 load(
105  Archive & arch,
107 )
108 {
109  arch( xyz.xx(), xyz.xy(), xyz.xz() );
110  arch( xyz.yx(), xyz.yy(), xyz.yz() );
111  arch( xyz.zx(), xyz.zy(), xyz.zz() );
112 }
113 
114 EXTERNAL_SAVE_AND_LOAD_SERIALIZABLE( numeric::xyzVector< float > );
115 EXTERNAL_SAVE_AND_LOAD_SERIALIZABLE( numeric::xyzVector< double > );
116 EXTERNAL_SAVE_AND_LOAD_SERIALIZABLE( numeric::xyzMatrix< float > );
117 EXTERNAL_SAVE_AND_LOAD_SERIALIZABLE( numeric::xyzMatrix< double > );
118 
119 }
120 
121 #endif
Value const & zz() const
Value zz const.
Definition: xyzMatrix.hh:1623
Value const & z() const
Value z const.
Definition: xyzVector.hh:1620
xyzVector< Real > xyz(Real const &r1, Real const &omega1, Real const &t, Real const &dz1, Real const &delta_omega1, Real const &delta_z1)
Returns the x-, y-, and z-coordinates of a point on a helix given r1, omega1, and t...
Definition: HelixParams.cc:67
Value const & yx() const
Value yx const.
Definition: xyzMatrix.hh:1533
Value const & xx() const
Value xx const.
Definition: xyzMatrix.hh:1479
Value const & yz() const
Value yz const.
Definition: xyzMatrix.hh:1569
Value const & yy() const
Value yy const.
Definition: xyzMatrix.hh:1551
Value const & y() const
Value y const.
Definition: xyzVector.hh:1602
Commons serlialization routines.
Value const & zx() const
Value zx const.
Definition: xyzMatrix.hh:1587
Value const & x() const
Value x const.
Definition: xyzVector.hh:1584
functions for serializing BoundingBox and xyzMatrix
Value const & zy() const
Value zy const.
Definition: xyzMatrix.hh:1605
xyzMatrix: Fast 3x3 xyz matrix template
Value const & xz() const
Value xz const.
Definition: xyzMatrix.hh:1515
Value const & xy() const
Value xy const.
Definition: xyzMatrix.hh:1497
def load
Definition: IO.py:5