SheafSystem  0.0.0.0
st3.cc
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 #include "SheafSystem/st3.h"
22 
23 #include "SheafSystem/abstract_poset_member.impl.h"
24 #include "SheafSystem/assert_contract.h"
25 #include "SheafSystem/at0.h"
26 #include "SheafSystem/stp_space.h"
27 #include "SheafSystem/fiber_bundles_namespace.h"
28 #include "SheafSystem/schema_poset_member.h"
29 #include "SheafSystem/wsv_block.h"
30 
31 
32 using namespace std;
33 using namespace fiber_bundle; // Workaround for MS C++ bug.
34 
35 
36 //==============================================================================
37 // CLASS ST3_LITE
38 //==============================================================================
39 
40 //==============================================================================
41 // ST3 FACET OF CLASS ST3_LITE
42 //==============================================================================
43 
44 // PUBLIC MEMBER FUNCTIONS
45 
48 {
49 
50  // Preconditions:
51 
52  // Body:
53 
54  // Postconditions:
55 
56  ensure(invariant());
57 
58  // Exit:
59 }
60 
62 st3_lite(const st3_lite& xother)
63 {
64  // Preconditions:
65 
66  // Body:
67 
68  *this = xother;
69 
70  // Postconditions:
71 
72  ensure(invariant());
73 
74  // Exit:
75 }
76 
79 operator=(const st3_lite& xother)
80 {
81 
82  // Preconditions:
83 
84 
85  // Body:
86 
87 
88  // Postconditions:
89 
90  ensure(invariant());
91 
92  // Exit:
93 
94  return *this;
95 }
96 
99 {
100  // Preconditions:
101 
102  // Body:
103 
104  // Postconditions:
105 
106  // Exit:
107 
108 }
109 
111 st3_lite(const row_dofs_type& xrow_dofs)
112 {
113  // Preconditions:
114 
115  // Body:
116 
117  *this = xrow_dofs;
118 
119  // Postconditions:
120 
121  ensure(invariant());
122 
123  // Exit:
124 }
125 
128 operator=(const row_dofs_type& xrow_dofs)
129 {
130  // Preconditions:
131 
132  // Body:
133 
134  vd_lite::operator=(xrow_dofs);
135 
136  // Postconditions:
137 
138  postcondition_of(vd_lite::operator=(xrow_dofs));
139 
140  // Exit:
141 
142  return *this;
143 
144 }
145 
146 // PROTECTED MEMBER FUNCTIONS
147 
148 // PRIVATE MEMBER FUNCTIONS
149 
150 
151 //==============================================================================
152 // STP FACET OF CLASS ST3_LITE
153 //==============================================================================
154 
155 // PUBLIC MEMBER FUNCTIONS
156 
157 int
159 p() const
160 {
161  // Preconditions:
162 
163  // Body:
164 
165  int result = 3;
166 
167  // Postconditions:
168 
169  ensure(invariant());
170  ensure(result == 3);
171 
172  // Exit:
173 
174  return result;
175 }
176 
177 // PROTECTED MEMBER FUNCTIONS
178 
179 // PRIVATE MEMBER FUNCTIONS
180 
181 
182 //==============================================================================
183 // VD FACET OF CLASS ST3_LITE
184 //==============================================================================
185 
186 // PUBLIC MEMBER FUNCTIONS
187 
190 component(int xi, int xj, int xk) const
191 {
192  // Preconditions:
193 
194  require((0 <= xi) && (xi < dd()));
195  require((0 <= xj) && (xj < dd()));
196  require((0 <= xk) && (xk < dd()));
197 
198  // Body:
199 
200  value_type result = component(index_for_ijk(xi, xj, xk));
201 
202  // Postconditions:
203 
204  ensure(invariant());
205 
206  // Exit:
207 
208  return result;
209 }
210 
211 void
213 put_component(int xi, int xj, int xk, value_type xvalue)
214 {
215  // Preconditions:
216 
217  require((0 <= xi) && (xi < dd()));
218  require((0 <= xj) && (xj < dd()));
219  require((0 <= xk) && (xk < dd()));
220 
221  // Body:
222 
223  put_component(index_for_ijk(xi, xj, xk), xvalue);
224 
225  // Postconditions:
226 
227  ensure(isunordered_or_equals(component(xi, xj, xk), xvalue));
228 
229  // Exit:
230 
231  return;
232 }
233 
234 
235 int
237 index_for_ijk(int xi, int xj, int xk) const
238 {
239  // Preconditions:
240 
241  require((0 <= xi) && (xi < dd()));
242  require((0 <= xj) && (xj < dd()));
243  require((0 <= xk) && (xk < dd()));
244 
245  // Body:
246 
247  int ldd = dd();
248 
249  // Bubble sort the indices.
250 
251  int ltmp;
252 
253  if(xi > xj) { ltmp = xi; xi = xj; xj = ltmp; }
254  if(xj > xk) { ltmp = xj; xj = xk; xk = ltmp; }
255  if(xi > xj) { ltmp = xi; xi = xj; xj = ltmp; }
256 
257  //$$SCRIBBLE: This works for ldd = 3 (only?).
258 
259  int result = (xi*ldd + xj)*ldd + xk;
260  result -= (xi*(5 + xi) + (xj*(xj+1))/2);
261 
262  // Postconditions:
263 
264  ensure(result >= 0);
265  ensure(result < d());
266 
267  // Exit:
268 
269  return result;
270 }
271 
272 // PROTECTED MEMBER FUNCTIONS
273 
274 // PRIVATE MEMBER FUNCTIONS
275 
276 
277 //==============================================================================
278 // TUPLE FACET OF CLASS ST3_LITE
279 //==============================================================================
280 
281 // PUBLIC MEMBER FUNCTIONS
282 
283 // PROTECTED MEMBER FUNCTIONS
284 
285 // PRIVATE MEMBER FUNCTIONS
286 
287 
288 //==============================================================================
289 // ABSTRACT POSET MEMBER FACET OF CLASS ST3_LITE
290 //==============================================================================
291 
292 // PUBLIC MEMBER FUNCTIONS
293 
294 const std::string&
296 class_name() const
297 {
298  // Preconditions:
299 
300  // Body:
301 
302  const string& result = static_class_name();
303 
304  // Postconditions:
305 
306  ensure(!result.empty());
307 
308  // Exit:
309 
310  return result;
311 }
312 
313 const std::string&
316 {
317  // Preconditions:
318 
319  // Body:
320 
321  static const string result("st3_lite");
322 
323  // Postconditions:
324 
325  ensure(!result.empty());
326 
327  // Exit:
328 
329  return result;
330 }
331 
334 clone() const
335 {
336  st3_lite* result = 0;
337 
338  // Preconditions:
339 
340  // Body:
341 
342  result = new st3_lite();
343 
344  // Postconditions:
345 
346  ensure(result != 0);
347  ensure(is_same_type(*result));
348 
349  // Exit:
350 
351  return result;
352 }
353 
354 // PROTECTED MEMBER FUNCTIONS
355 
356 // PRIVATE MEMBER FUNCTIONS
357 
358 
359 //==============================================================================
360 // ANY FACET OF CLASS ST3_LITE
361 //==============================================================================
362 
363 // PUBLIC MEMBER FUNCTIONS
364 
365 bool
367 is_ancestor_of(const any_lite& xother) const
368 {
369  // Preconditions:
370 
371  require(&xother != 0);
372 
373  // Body:
374 
375  // True if other conforms to this.
376 
377  bool result = dynamic_cast<const st3_lite*>(&xother) != 0;
378 
379  // Postconditions:
380 
381  return result;
382 }
383 
384 
385 bool
387 invariant() const
388 {
389  bool result = true;
390 
391  if(invariant_check())
392  {
393  // Prevent recursive calls to invariant.
394 
395  disable_invariant_check();
396 
397  // Must satisfy base class invariant.
398 
399  invariance(stp_lite::invariant());
400 
401  // Invariances for this class:
402 
403  // Finished, turn invariant checking back on.
404 
405  enable_invariant_check();
406  }
407 
408  // Exit
409 
410  return result;
411 }
412 
413 // PROTECTED MEMBER FUNCTIONS
414 
415 // PRIVATE MEMBER FUNCTIONS
416 
417 
418 //==============================================================================
419 // CLASS ST3
420 //==============================================================================
421 
422 // ===========================================================
423 // HOST FACTORY FACET OF CLASS ST2
424 // ===========================================================
425 
426 // PUBLIC MEMBER FUNCTIONS
427 
428 const sheaf::poset_path&
431 {
432  // Preconditions:
433 
434 
435  // Body:
436 
437  static const poset_path result(standard_schema_poset_name(), "st3_schema");
438 
439  // Postconditions:
440 
441  // Exit:
442 
443  return result;
444 }
445 
446 void
449 {
450  // Preconditions:
451 
452  require(xns.state_is_read_write_accessible());
453  require(xns.contains_poset(standard_schema_poset_name()));
454  require(!xns.contains_poset_member(standard_schema_path()));
455 
456 
457  // Body:
458 
459  schema_poset_member lschema(xns,
460  standard_schema_path().member_name(),
461  stp::standard_schema_path(),
462  "",
463  false);
464 
465  lschema.detach_from_state();
466 
467  // Postconditions:
468 
469  ensure(xns.contains_poset_member(standard_schema_path()));
470 
471  // Exit:
472 
473  return;
474 }
475 
479  const poset_path& xhost_path,
480  const poset_path& xschema_path,
481  const poset_path& xvector_space_path,
482  bool xauto_access)
483 {
484  // cout << endl << "Entering st3::new_host." << endl;
485 
486  // Preconditions:
487 
488  require(xns.state_is_auto_read_write_accessible(xauto_access));
489 
490  require(!xhost_path.empty());
491  require(!xns.contains_path(xhost_path, xauto_access));
492 
493  require(xschema_path.full());
494  require(xns.path_is_auto_read_accessible(xschema_path, xauto_access));
495  require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path()));
496 
497  require(xns.path_is_auto_read_accessible(xvector_space_path, xauto_access));
498  require(xns.contains_poset<scalar_type::host_type>(xvector_space_path, xauto_access));
499 
500  // Body:
501 
502  host_type& result =
503  host_type::new_table(xns, xhost_path, xschema_path, 3, xvector_space_path, xauto_access);
504 
505  // Postconditions:
506 
507  ensure(xns.owns(result, xauto_access));
508  ensure(result.path(true) == xhost_path);
509  ensure(result.state_is_not_read_accessible());
510  ensure(result.schema(true).path(xauto_access) == xschema_path);
511 
512  ensure(result.factor_ct(true) == result.d(true));
513  ensure(result.d(true) == schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access));
514  ensure(result.vector_space_path(true) == xvector_space_path );
515  ensure(result.p(true) == 3);
516  ensure(result.dd(true) == result.d(true));
517  ensure(result.vector_space_path(true) == xhost_path );
518 
519  // Exit:
520 
521  // cout << "Leaving st3::new_host." << endl;
522  return result;
523 }
524 
525 // PROTECTED MEMBER FUNCTIONS
526 
527 // PRIVATE MEMBER FUNCTIONS
528 
529 
530 //==============================================================================
531 // ST3 FACET OF CLASS ST3
532 //==============================================================================
533 
534 // PUBLIC MEMBER FUNCTIONS
535 
538 {
539 
540  // Preconditions:
541 
542  // Body:
543 
544  // Postconditions:
545 
546  ensure(invariant());
547 }
548 
550 st3(const poset_state_handle* xhost, pod_index_type xhub_id)
551 {
552  // Preconditions:
553 
554  require(xhost != 0);
555  require(xhost->state_is_read_accessible());
556  require(xhost->contains_member(xhub_id));
557 
558  // Body:
559 
560  attach_to_state(xhost, xhub_id);
561 
562  // Postconditions:
563 
564  ensure(invariant());
565  // ensure(host() == xhost);
566  ensure(index() == xhub_id);
567  ensure(is_attached());
568 }
569 
571 st3(const poset_state_handle* xhost, const scoped_index& xid)
572 {
573  // Preconditions:
574 
575  require(xhost != 0);
576  require(xhost->state_is_read_accessible());
577  require(xhost->contains_member(xid));
578 
579  // Body:
580 
581  attach_to_state(xhost, xid.hub_pod());
582 
583  // Postconditions:
584 
585  ensure(invariant());
586  // ensure(host() == xhost);
587  ensure(index() ==~ xid);
588  ensure(is_attached());
589 }
590 
592 st3(const poset_state_handle* xhost, const std::string& xname)
593 {
594 
595  // Preconditions:
596 
597  require(xhost != 0);
598  require(xhost->state_is_read_accessible());
599  require(!xname.empty());
600  require(xhost->contains_member(xname));
601 
602  // Body:
603 
604  attach_to_state(xhost, xname);
605 
606  // Postconditions:
607 
608  ensure(invariant());
609  // ensure(host() == xhost);
610  ensure(name() == xname);
611  ensure(is_attached());
612 
613 }
614 
617 {
618 
619  // Preconditions:
620 
621  require(xother != 0);
622 
623  // Body:
624 
625  attach_to_state(xother);
626 
627  // Postconditions:
628 
629  ensure(invariant());
630  ensure(is_attached());
631  ensure(is_same_state(xother));
632 
633 }
634 
636 st3(poset_state_handle* xhost, bool xauto_access)
637 {
638 
639  // Preconditions:
640 
641  require(precondition_of(new_jim_state(xhost, 0, false, xauto_access)));
642 
643  // Body:
644 
645  new_jim_state(xhost, 0, false, xauto_access);
646 
647  // Postconditions:
648 
649  ensure(postcondition_of(new_jim_state(xhost, 0, false, xauto_access)));
650 
651  // Exit:
652 
653  return;
654 }
655 
660 {
661  // Preconditions:
662 
663  require(is_ancestor_of(&xother));
664  require(precondition_of(attach_to_state(&xother)));
665 
666  // Body:
667 
668  attach_to_state(&xother);
669 
670  // Postconditions:
671 
672  ensure(postcondition_of(attach_to_state(&xother)));
673 
674  // Exit:
675 
676  return *this;
677 }
678 
682 operator=(const st3& xother)
683 {
684  // Preconditions:
685 
686  require(precondition_of(attach_to_state(&xother)));
687 
688  // Body:
689 
690  attach_to_state(&xother);
691 
692  // Postconditions:
693 
694  ensure(postcondition_of(attach_to_state(&xother)));
695 
696  // Exit:
697 
698  return *this;
699 }
700 
703 {
704 
705  // Preconditions:
706 
707  // Body:
708 
709  // Postconditions:
710 
711 }
712 
713 
717 {
718  // Preconditions:
719 
720  // Body:
721 
722  static const volatile_type result;
723 
724  // Postconditions:
725 
726  // Exit:
727 
728  return result;
729 }
730 
734 lite_type() const
735 {
736  // Preconditions:
737 
738  // Body:
739 
740  volatile_type* result = new volatile_type(sheaf::row_dofs(*this));
741 
742  // Postconditions:
743 
744  // Exit:
745 
746  return result;
747 }
748 
749 
750 // PROTECTED MEMBER FUNCTIONS
751 
752 // PRIVATE MEMBER FUNCTIONS
753 
754 
755 //==============================================================================
756 // VD FACET OF CLASS ST3
757 //==============================================================================
758 
759 // PUBLIC MEMBER FUNCTIONS
760 
763 component(int xi, int xj, int xk) const
764 {
765  // Preconditions:
766 
767  require(state_is_read_accessible());
768  require((0 <= xi) && (xi < dd()));
769  require((0 <= xj) && (xj < dd()));
770  require((0 <= xk) && (xk < dd()));
771 
772  // Body:
773 
774  value_type result = component(index_for_ijk(xi, xj, xk));
775 
776  // Postconditions:
777 
778  ensure(invariant());
779 
780  // Exit:
781 
782  return result;
783 }
784 
787 component(int xi, int xj, int xk, bool xauto_access) const
788 {
789  // Preconditions:
790 
791  require(state_is_auto_read_accessible(xauto_access));
792  require((0 <= xi) && (xi < dd(xauto_access)));
793  require((0 <= xj) && (xj < dd(xauto_access)));
794  require((0 <= xk) && (xk < dd(xauto_access)));
795 
796  // Body:
797 
798  if(xauto_access)
799  {
800  get_read_access();
801  }
802 
803  value_type result = component(index_for_ijk(xi, xj, xk));
804 
805  if(xauto_access)
806  {
807  release_access();
808  }
809 
810  // Postconditions:
811 
812  ensure(invariant());
813 
814  // Exit:
815 
816  return result;
817 }
818 
819 
820 void
822 put_component(int xi, int xj, int xk, value_type xvalue)
823 {
824 
825  // Preconditions:
826 
827  require(state_is_read_write_accessible());
828  require((0 <= xi) && (xi < dd()));
829  require((0 <= xj) && (xj < dd()));
830  require((0 <= xk) && (xk < dd()));
831 
832  // Body:
833 
834  put_component(index_for_ijk(xi, xj, xk), xvalue);
835 
836  // Postconditions:
837 
838  ensure(isunordered_or_equals(component(xi, xj, xk), xvalue));
839 
840  // Exit:
841 
842  return;
843 }
844 
845 void
847 put_component(int xi, int xj, int xk, value_type xvalue, bool xauto_access)
848 {
849  // Preconditions:
850 
851  require(state_is_auto_read_write_accessible(xauto_access));
852  require((0 <= xi) && (xi < dd()));
853  require((0 <= xj) && (xj < dd()));
854  require((0 <= xk) && (xk < dd()));
855 
856  // Body:
857 
858  if(xauto_access)
859  {
860  get_read_write_access(true);
861  }
862 
863  put_component(index_for_ijk(xi, xj, xk), xvalue);
864 
865  if(xauto_access)
866  {
867  release_access();
868  }
869 
870  // Postconditions:
871 
872  ensure(isunordered_or_equals(component(xi, xj, xk), xvalue));
873 
874  // Exit:
875 
876  return;
877 }
878 
879 
880 int
882 index_for_ijk(int xi, int xj, int xk) const
883 {
884  // Preconditions:
885 
886  require(state_is_read_write_accessible());
887  require((0 <= xi) && (xi < dd()));
888  require((0 <= xj) && (xj < dd()));
889  require((0 <= xk) && (xk < dd()));
890 
891  // Body:
892 
893  int ldd = dd();
894 
895  // Bubble sort the indices.
896 
897  int ltmp;
898 
899  if(xi > xj) { ltmp = xi; xi = xj; xj = ltmp; }
900  if(xj > xk) { ltmp = xj; xj = xk; xk = ltmp; }
901  if(xi > xj) { ltmp = xi; xi = xj; xj = ltmp; }
902 
903  //$$SCRIBBLE: This works for ldd = 3 (only?).
904 
905  int result = (xi*ldd + xj)*ldd + xk;
906  result -= (xi*(5 + xi) + (xj*(xj+1))/2);
907 
908  // Postconditions:
909 
910  ensure(result >= 0);
911  ensure(result < d());
912 
913  // Exit:
914 
915  return result;
916 }
917 
918 // PROTECTED MEMBER FUNCTIONS
919 
920 // PRIVATE MEMBER FUNCTIONS
921 
922 
923 //==============================================================================
924 // TUPLE FACET OF CLASS ST3
925 //==============================================================================
926 
927 // PUBLIC MEMBER FUNCTIONS
928 
929 // PROTECTED MEMBER FUNCTIONS
930 
931 // PRIVATE MEMBER FUNCTIONS
932 
933 
934 //==============================================================================
935 // ABSTRACT POSET MEMBER FACET OF CLASS ST3
936 //==============================================================================
937 
938 // PUBLIC MEMBER FUNCTIONS
939 
940 const std::string&
942 class_name() const
943 {
944  // Preconditions:
945 
946  // Body:
947 
948  const string& result = static_class_name();
949 
950  // Postconditions:
951 
952  ensure(!result.empty());
953 
954  // Exit:
955 
956  return result;
957 }
958 
959 const std::string&
962 {
963  // Preconditions:
964 
965  // Body:
966 
967  static const string result("st3");
968 
969  // Postconditions:
970 
971  ensure(!result.empty());
972 
973  // Exit:
974 
975  return result;
976 }
977 
980 clone() const
981 {
982 
983  // Preconditions:
984 
985  // Body:
986 
987  // Create new handle of the current class.
988 
989  st3* result = new st3();
990 
991  // Postconditions:
992 
993  ensure(result != 0);
994  ensure(result->invariant());
995 
996  // Exit:
997 
998  return result;
999 
1000 }
1001 
1002 // PROTECTED MEMBER FUNCTIONS
1003 
1004 // PRIVATE MEMBER FUNCTIONS
1005 
1006 
1007 //==============================================================================
1008 // ANY FACET OF CLASS ST3
1009 //==============================================================================
1010 
1011 // PUBLIC MEMBER FUNCTIONS
1012 
1013 bool
1015 is_ancestor_of(const any* xother) const
1016 {
1017 
1018  // Preconditions:
1019 
1020  require(xother != 0);
1021 
1022  // Body:
1023 
1024  // If xother may be dynamically cast to the type of this then this is an
1025  // ancestor of other.
1026 
1027  bool result = dynamic_cast<const st3*>(xother) != 0;
1028 
1029  // Postconditions:
1030 
1031  //ensure(invariant());
1032  //ensure(other->invariant());
1033 
1034  // Exit:
1035 
1036  return result;
1037 
1038 }
1039 
1040 bool
1042 invariant() const
1043 {
1044  bool result = true;
1045 
1046  // Body:
1047 
1048  if (invariant_check())
1049  {
1050  // Prevent recursive calls to invariant.
1051 
1052  disable_invariant_check();
1053 
1054  // Must satisfy base class invariant.
1055 
1056  invariance(stp::invariant());
1057 
1058  // Invariances for this class:
1059 
1060  invariance((state_is_read_accessible() ? p() == 3 : true));
1061 
1062  // Finished, turn invariant checking back on.
1063 
1064  enable_invariant_check();
1065  }
1066 
1067  // Exit:
1068 
1069  return result;
1070 }
1071 
1072 // PROTECTED MEMBER FUNCTIONS
1073 
1074 // PRIVATE MEMBER FUNCTIONS
1075 
1076 
1077 
st3()
Default constructor.
Definition: st3.cc:537
static void make_standard_schema(namespace_poset &xns)
Creates the standard schema for this class in namespace xns.
Definition: st3.cc:448
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
virtual st3 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: st3.cc:659
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
st3_lite()
Default constructor.
Definition: st3.cc:47
virtual const std::string & class_name() const
The name of this class.
Definition: st3.cc:942
virtual const std::string & class_name() const
The name of this class.
Definition: st3.cc:296
poset_path path(bool xauto_access=true) const
A path to this component.
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
poset_path vector_space_path() const
The path of the underlying vector space.
Definition: tp_space.cc:365
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
A client handle for a general, abstract partially order set.
virtual st3 * clone() const
Make a new handle, no state instance of current.
Definition: st3.cc:980
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
STL namespace.
virtual void put_component(int xi, int xj, int xk, value_type xvalue)
Sets the component with indices xi, xj, xk to xvalue.
Definition: st3.cc:822
virtual value_type component(int xi, int xj, int xk) const
The component with indices xi, xj, xk.
Definition: st3.cc:190
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
virtual volatile_type * lite_type() const
Virtual conversion to the associated volatile type.
Definition: st3.cc:734
static int d(const namespace_poset &xns, int xp, const poset_path &xvector_space_path, bool xauto_access)
The tensor dimension implied by tensor degree xp and the dimension of the domain vector space specifi...
Definition: stp_space.cc:86
bool is_ancestor_of(const any *xother) const
True if other conforms to current.
Definition: st3.cc:1015
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
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
static const std::string & static_class_name()
The name of this class.
Definition: st3.cc:315
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xvector_space_path, bool xauto_access)
Creates a new host table for members of this type. The poset is created in namespace xns with path xh...
Definition: st3.cc:478
virtual st3_lite * clone() const
Virtual constructor, makes a new instance of the same type as this.
Definition: st3.cc:334
A space of scalars viewed as an antisymmetric tensor space of degree 0.
Definition: at0_space.h:42
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
virtual int index_for_ijk(int xi, int xj, int xk) const
The index into linear storage of the component for specified indices xi, xj, xk.
Definition: st3.cc:237
virtual value_type component(int xi, int xj, int xk) const
The component with indices xi, xj, xk.
Definition: st3.cc:763
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
virtual const volatile_type & lite_prototype() const
Virtual constructor for the associated volatile type.
Definition: st3.cc:716
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
virtual void put_component(int xi, int xj, int xk, value_type xvalue)
Sets the component with indices xi, xj, xk to xvalue.
Definition: st3.cc:213
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
Definition: st3.cc:430
int p(int xd, int xdd) const
Tensor degree as a function of tensor dimension xd and domain dimension xdd.
Definition: tp_space.cc:235
A symmetric rank 3 tensor over an abstract vector space (persistent version).
Definition: st3.h:230
A symmetric rank 3 tensor over an abstract vector space. (volatile version).
Definition: st3.h:43
~st3()
Destructor.
Definition: st3.cc:702
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
virtual bool is_ancestor_of(const any_lite &xother) const
Conformance test; true if other conforms to this.
Definition: st3.cc:367
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
virtual int index_for_ijk(int xi, int xj, int xk) const
The index into linear storage of the component for specified indices xi, xj, xk.
Definition: st3.cc:882
static const std::string & static_class_name()
The name of this class.
Definition: st3.cc:961
bool invariant() const
Class invariant.
Definition: st3.cc:1042
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
Definition: vd_space.cc:167
st3_lite & operator=(const st3_lite &xother)
Assignment operator.
Definition: st3.cc:79
bool invariant() const
Class invariant.
Definition: st3.cc:387
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
vd_value_type value_type
The POD ("plain old data") type of scalar in the vector space of this.
Definition: vd.h:423
int dd() const
The dimension of the underlying ("domain") vector space.
Definition: tp_space.cc:317
An abstract client handle for a member of a poset.
An abstract symmetric tensor space of degree p.
Definition: stp_space.h:42
Namespace for the fiber_bundles component of the sheaf system.
virtual ~st3_lite()
Destructor.
Definition: st3.cc:98
Row dofs type for class vd.
Definition: vd.h:61
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
virtual int p() const
Degree of this as a symmetric tensor space.
Definition: st3.cc:159
A client handle for a poset member which has been prepared for use as a schema.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
SHEAF_DLL_SPEC bool isunordered_or_equals(float x1, float x2)
True if isunordered(x1, x2) or x1 == x2.
Definition: sheaf.cc:102