SheafSystem  0.0.0.0
met.impl.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 
22 #ifndef MET_IMPL_H
23 #define MET_IMPL_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef MET_H
30 #include "SheafSystem/met.h"
31 #endif
32 
33 namespace fiber_bundle
34 {
35 
36 //==============================================================================
37 // NON-MEMBER FUNCTIONS
38 //==============================================================================
39 
40 // template <typename T, typename MT>
41 // T* raise(const MT& xmetric, const T& xcovector)
42 // {
43 // // Preconditions:
44 
45 // require(xmetric.state_is_auto_read_accessible(true));
46 // require(xcovector.state_is_auto_read_accessible(true));
47 // require(xcovector.d(true) == xmetric.dd(true));
48 // require(xmetric.is_contravariant(0, true));
49 // require(xcovector.is_covariant(0, true)); // is_dual;
50 
51 // // Body:
52 
53 // /// @hack vd heirarchy isn't const correct.
54 
55 // T& lxcovector = const_cast<T&>(xcovector);
56 // T* result = lxcovector.clone(true, true);
57 
58 // // For the raise operation, the result must be contravariant.
59 
60 // // Not for volatile type!!!
61 // result->put_is_p_vector(true);
62 
63 // raise(xmetric, lxcovector, *result);
64 
65 // // Postconditions:
66 
67 // ensure(result != 0);
68 // ensure(postcondition_of(xcovector.clone(true, true)));
69 // ensure(postcondition_of(raise(xmetric, xcovector, *result)));
70 
71 // // Exit:
72 
73 // return result;
74 // }
75 
76 // template <typename T, typename MT>
77 // T* lower(const MT& xmetric, const T& xvector)
78 // {
79 // // Preconditions:
80 
81 // //require(precondition_of(xvector.clone(true, true)));
82 // //require(precondition_of(lower(xmetric, xvector, *result)));
83 
84 // require(xmetric.state_is_auto_read_accessible(true));
85 // require(xvector.state_is_auto_read_accessible(true));
86 // require(xvector.d(true) == xmetric.dd(true));
87 // require(xmetric.is_covariant(0, true));
88 // require(xvector.is_contravariant(0, true)); // !is_dual;
89 
90 
91 // // Body:
92 
93 // /// @hack vd heirarchy isn't const correct.
94 
95 // T& lxvector = const_cast<T&>(xvector);
96 // T* result = lxvector.clone(true, true);;
97 
98 // // For the lower operation, the result must be covariant.
99 
100 // // Not for volatile type!!!
101 // result->put_is_p_form(true);
102 
103 // lower(xmetric, xvector, *result);
104 
105 // // Postconditions:
106 
107 // ensure(result != 0);
108 // ensure(postcondition_of(xvector.clone(true, true)));
109 // ensure(postcondition_of(lower(xmetric, xvector, *result)));
110 
111 // // Exit:
112 
113 // return result;
114 // }
115 
116 } // namespace fiber_bundle
117 
118 #endif // ifndef MET_IMPL_H
Namespace for the fiber_bundles component of the sheaf system.