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