SheafSystem  0.0.0.0
stp.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 #ifndef STP_H
22 #define STP_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef TP_H
29 #include "SheafSystem/tp.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34  class stp_space;
35 
36 //==============================================================================
37 // CLASS STP_LITE
38 //==============================================================================
39 
44 class SHEAF_DLL_SPEC stp_lite : public tp_lite
45 {
46  //============================================================================
48  //============================================================================
50 
51 public:
52 
56  stp_lite();
57 
61  stp_lite(const stp_lite& xother);
62 
66  stp_lite& operator=(const stp_lite& xother);
67 
71  virtual ~stp_lite();
72 
76  stp_lite(const row_dofs_type& xrow_dofs);
77 
81  stp_lite& operator=(const row_dofs_type& xrow_dofs);
82 
83 protected:
84 private:
85 
87 
88 
89  //============================================================================
91  //============================================================================
93 
94 public:
95 protected:
96 private:
97 
99 
100 
101  //============================================================================
103  //============================================================================
105 
106 public:
107 
111  virtual int d() const;
112 
113 protected:
114 private:
115 
117 
118 
119  //============================================================================
121  //============================================================================
123 
124 public:
125 protected:
126 private:
127 
129 
130 
131  //============================================================================
133  //============================================================================
135 
136 public:
137 
141  virtual const std::string& class_name() const;
142 
146  static const std::string& static_class_name();
147 
151  virtual stp_lite* clone() const;
152 
153 protected:
154 private:
155 
157 
158 
159  //============================================================================
161  //============================================================================
163 
164 public:
165 
169  virtual bool is_ancestor_of(const any_lite& xother) const;
170 
174  bool invariant() const;
175 
176 protected:
177 private:
178 
180 };
181 
182 //==============================================================================
183 // CLASS STP
184 //==============================================================================
185 
186 
190 class SHEAF_DLL_SPEC stp : public tp
191 {
192  // ===========================================================
194  // ===========================================================
196 
197 public:
198 
203 
207  static const poset_path& standard_schema_path();
208 
212  static void make_standard_schema(namespace_poset& xns);
213 
219  static host_type& new_host(namespace_type& xns,
220  const poset_path& xhost_path,
221  const poset_path& xschema_path,
222  int xp,
223  const poset_path& xvector_space_path,
224  bool xauto_access);
225 
226 protected:
227 
228 private:
229 
231 
232 
233  //============================================================================
235  //============================================================================
237 
238 public:
239 
244 
248  stp();
249 
254  stp(const poset_state_handle* xhost, pod_index_type xhub_id);
255 
260  stp(const poset_state_handle* xhost, const scoped_index& xid);
261 
266  stp(const poset_state_handle* xhost, const std::string& xname);
267 
271  explicit stp(abstract_poset_member* xother);
272 
276  stp(poset_state_handle* xhost, bool xauto_access = true);
277 
281  virtual stp& operator=(const abstract_poset_member& xother);
282 
286  stp& operator=(const stp& xother);
287 
291  ~stp();
292 
296  virtual const volatile_type& lite_prototype() const;
297 
301  virtual volatile_type* lite_type() const;
302 
303 protected:
304 private:
305 
306 
308 
309 
310  //============================================================================
312  //============================================================================
314 
315 public:
316 
317 protected:
318 
319 private:
320 
322 
323 
324  //============================================================================
326  //============================================================================
328 
329 public:
330 protected:
331 private:
332 
334 
335  //============================================================================
337  //============================================================================
339 
340 public:
341 
345  virtual const std::string& class_name() const;
346 
350  static const std::string& static_class_name();
351 
357  inline stp* clone(bool xnew_state, bool xauto_access = true) const
358  {
359  return static_cast<stp*>(tp::clone(xnew_state, xauto_access));
360  }
361 
362 protected:
363 private:
364 
366 
367 
368  // ===========================================================
370  // ===========================================================
372 
373 public:
374 
378  host_type* host() const;
379 
383  virtual bool host_is_ancestor_of(const poset_state_handle* other) const;
384 
385 protected:
386 
387 private:
388 
390 
391  //============================================================================
393  //============================================================================
395 
396 public:
397 
401  bool is_ancestor_of(const any* xother) const;
402 
406  virtual stp* clone() const;
407 
411  bool invariant() const;
412 
413 protected:
414 private:
415 
417 };
418 
419 //==============================================================================
420 // NON-MEMBER FUNCTIONS
421 //==============================================================================
422 
423 //$$SCRIBBLE: Currently all symmetric_product functions are
424 // "not_implemented()" because the only meaningful
425 // results would be like Sym(st2 (X) st2) = st4.
426 // But we have not yet implemented any st4 classes.
427 
432 namespace stp_algebra
433 {
434 
440 SHEAF_DLL_SPEC void symmetric_product(const stp_lite& x0, const stp_lite& x1,
441  stp_lite& xresult);
442 
448 SHEAF_DLL_SPEC void symmetric_product(const stp& x0, const stp& x1, stp& xresult,
449  bool xauto_access);
450 
455 template <typename T0, typename T1>
457 symmetric_product(const T0& x0, const T1& x1);
458 
463 template <typename T0, typename T1>
465 symmetric_product(const T0& x0, const T1& x1, bool xauto_access);
466 
467 } // namespace stp_algebra
468 
469 } // namespace fiber_bundle
470 
471 #endif // ifndef STP_H
stp_lite volatile_type
The associated volatile type.
Definition: stp.h:243
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A client handle for a general, abstract partially order set.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
SHEAF_DLL_SPEC void symmetric_product(const stp_lite &x0, const stp_lite &x1, stp_lite &xresult)
Symmetric product (pre-allocated version for volatile types).
Definition: stp.cc:898
A general tensor of "degree" p and given "variance" over an abstract vector space.
Definition: tp.h:253
Abstract base class with useful features for all volatile objects.
Definition: any_lite.h:48
Abstract base class with useful features for all objects.
Definition: any.h:39
Tensor types of degree P over VECTOR_TYPE. No generic implementation defined, must be specialized for...
Definition: vd.h:714
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
stp_space host_type
The type of host poset.
Definition: stp.h:202
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
virtual tp * clone() const
Make a new handle, no state instance of current.
Definition: tp.cc:1363
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
An abstract client handle for a member of a poset.
stp * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
Definition: stp.h:357
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
An abstract symmetric tensor space of degree p.
Definition: stp_space.h:42
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61