SheafSystem  0.0.0.0
poset_powerset_state.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/poset_powerset_state.h"
22 #include "SheafSystem/assert_contract.h"
23 #include "SheafSystem/index_space_iterator.h"
24 #include "SheafSystem/hub_index_space_handle.h"
25 #include "SheafSystem/std_sstream.h"
26 #include "SheafSystem/std_iomanip.h"
27 
28 using namespace std;
29 
30 // ===========================================================
31 // CANONICAL FACET
32 // ===========================================================
33 
34 // PUBLIC MEMBER FUNCTIONS
35 
37 poset_powerset_state(size_type xcapacity, const scoped_index& xsubposet_member_index_ub)
38 {
39  // Preconditions:
40 
41  require(xsubposet_member_index_ub.is_hub_scope());
42  require(xsubposet_member_index_ub >= 0);
43 
44  // Body:
45 
46  // Prevent recursive calls to invariant.
47 
48  disable_invariant_check();
49 
50  // Initialize the upper bound of the subposets.
51 
52  _subposet_index_ub.put(hub_id_space(), 0);
53 
54  // Initialize upper bound on subposet member index
55 
56  _subposet_member_index_ub = xsubposet_member_index_ub;
57 
58  // Reserve space in the subposet block.
59 
60  _subposets.reserve(xcapacity);
61 
62  // Invariant not satisfied until standard subposets initialized by client,
63  // leave invarant check disabled.
64 
65  // Postconditions:
66 
67  ensure(subposet_index_ub().is_hub_scope());
68  ensure(subposet_member_index_ub() == xsubposet_member_index_ub);
69 }
70 
73 {
74  // Detach the standard subposets.
75 
76  _coarsest_common_refinement.detach_from_state();
77  _coarsest_common_refinement_jims.detach_from_state();
78  _whole.detach_from_state();
79  _jims.detach_from_state();
80  _table_dof_subposet.detach_from_state();
81  _row_dof_subposet.detach_from_state();
82 
83  // Delete the members.
84 
85  index_space_iterator& litr = hub_id_space().get_iterator();
86  while(!litr.is_done())
87  {
88  delete _subposets[litr.pod()];
89 
90  litr.next();
91  }
92  hub_id_space().release_iterator(litr);
93 }
94 
95 // PROTECTED MEMBER FUNCTIONS
96 
97 // PRIVATE MEMBER FUNCTIONS
98 
99 
100 // ===========================================================
101 // SUBPOSETS FACET
102 // ===========================================================
103 
104 // PUBLIC MEMBER FUNCTIONS
105 
109 {
110  // Preconditions:
111 
112  require(contains_subposet(xindex));
113 
114  // Body:
115 
116  subposet_state& result = *_subposets[xindex];
117 
118  // Postconditions:
119 
120  // Exit:
121 
122  return result;
123 }
124 
127 member(const scoped_index& xindex)
128 {
129  // Preconditions:
130 
131  require(contains_subposet(xindex));
132 
133  // Body:
134 
135  subposet_state& result = *_subposets[xindex.hub_pod()];
136 
137  // Postconditions:
138 
139  // Exit:
140 
141  return result;
142 }
143 
146 member(pod_index_type xindex) const
147 {
148  // Preconditions:
149 
150  require(contains_subposet(xindex));
151 
152  // Body:
153 
154  const subposet_state& result = *_subposets[xindex];
155 
156  // Postconditions:
157 
158  // Exit:
159 
160  return result;
161 }
162 
165 member(const scoped_index& xindex) const
166 {
167  // Preconditions:
168 
169  require(contains_subposet(xindex));
170 
171  // Body:
172 
173  const subposet_state& result = *_subposets[xindex.hub_pod()];
174 
175  // Postconditions:
176 
177  // Exit:
178 
179  return result;
180 }
181 
184 new_subposet(bool xinitialize)
185 {
186  // Preconditions:
187 
188  // Body:
189 
190  define_old_variable(scoped_index old_subposet_index_ub = subposet_index_ub());
191  define_old_variable(size_type old_subposet_ct = subposet_ct());
192 
193  // Create an id in the id space family.
194 
200 
201  pod_index_type result = _id_spaces.new_id();
202 
203  // Create the subposet
204 
205  _subposets.force_item(result, new subposet_state());
206  _subposets[result]->initialize(_subposet_member_index_ub.pod(),
207  hub_id(result), xinitialize);
208 
209  // Set the subposet index upper bound.
210 
211  _subposet_index_ub = hub_id_space().end();
212 
213  // Postconditions:
214 
215  //ensure(subposet_index_ub() == old_subposet_index_ub + 1);
216  ensure(subposet_index_ub() > old_subposet_index_ub);
217  ensure(subposet_ct() == old_subposet_ct + 1);
218  ensure(hub_id_space().contains(result));
219  ensure(contains_subposet(result));
220  ensure(member(result).is_persistent());
221 
222  // Exit:
223 
224  return result;
225 }
226 
227 void
229 new_subposet(bool xinitialize,
230  scoped_index& result)
231 {
232  // Preconditions:
233 
234  // Body:
235 
236  define_old_variable(scoped_index old_subposet_index_ub = subposet_index_ub());
237  define_old_variable(size_type old_subposet_ct = subposet_ct());
238 
239  result.put(hub_id_space(), new_subposet(xinitialize));
240 
241  // Postconditions:
242 
243  //ensure(subposet_index_ub() == old_subposet_index_ub + 1);
244  ensure(subposet_index_ub() > old_subposet_index_ub);
245  ensure(subposet_ct() == old_subposet_ct + 1);
246  ensure(result.is_hub_scope());
247  ensure(result.in_scope());
248  ensure(contains_subposet(result));
249  ensure(member(result).is_persistent());
250 
251  // Exit:
252 
253  return;
254 }
255 
259 {
260  // Preconditions:
261 
262  // Body:
263 
264  define_old_variable(scoped_index old_subposet_index_ub = subposet_index_ub());
265  define_old_variable(size_type old_subposet_ct = subposet_ct());
266 
267  // Create an id in the id space family.
268 
274 
275  pod_index_type result = _id_spaces.new_id();
276 
277  // Create the subposet
278 
279  _subposets.force_item(result, new subposet_state());
280  _subposets[result]->initialize(_subposet_member_index_ub.pod(),
281  hub_id(result), xmembers);
282 
283  // Set the subposet index upper bound.
284 
285  _subposet_index_ub = hub_id_space().end();
286 
287  // Postconditions:
288 
289  //ensure(subposet_index_ub() == old_subposet_index_ub + 1);
290  ensure(subposet_index_ub() > old_subposet_index_ub);
291  ensure(subposet_ct() == old_subposet_ct + 1);
292  ensure(hub_id_space().contains(result));
293  ensure(contains_subposet(result));
294  ensure(member(result).is_persistent());
295 
296  // Exit:
297 
298  return result;
299 }
300 
301 void
304 {
305  // Preconditions:
306 
307  // Body:
308 
309  define_old_variable(scoped_index old_subposet_index_ub = subposet_index_ub());
310  define_old_variable(size_type old_subposet_ct = subposet_ct());
311 
312  // Create an id in the id space family.
313 
319 
320  result.put(hub_id_space(), _id_spaces.new_id());
321 
322  // Create the subposet
323 
324  _subposets.force_item(result.pod(), new subposet_state());
325  _subposets[result.pod()]->initialize(_subposet_member_index_ub.pod(),
326  result, xmembers);
327 
328  // Set the subposet index upper bound.
329 
330  _subposet_index_ub = hub_id_space().end();
331 
332  // Postconditions:
333 
334  //ensure(subposet_index_ub() == old_subposet_index_ub + 1);
335  ensure(subposet_index_ub() > old_subposet_index_ub);
336  ensure(subposet_ct() == old_subposet_ct + 1);
337  ensure(result.is_hub_scope());
338  ensure(result.in_scope());
339  ensure(contains_subposet(result));
340  ensure(member(result).is_persistent());
341 
342  // Exit:
343 
344  return;
345 }
346 
347 void
350 {
351  // Preconditions:
352 
353  require(contains_subposet(xindex));
354 
355  // Body:
356 
357  // Delete the subposet.
358 
359  delete _subposets[xindex];
360 
361  // Remove the subposet from the collection.
362 
363  _subposets[xindex] = 0;
364 
365  // Delete the member from the id spaces.
366 
367  _id_spaces.delete_id(xindex);
368 
369  // Set the subposet index upper bound.
370 
371  _subposet_index_ub = !hub_id_space().is_empty() ? hub_id_space().end() : 0;
372 
373  // Postconditions:
374 
375  ensure(!contains_subposet(xindex));
376 
377  // Exit:
378 
379  return;
380 }
381 
382 void
385 {
386  // Preconditions:
387 
388  require(contains_subposet(xindex));
389 
390  // Body:
391 
392  delete_subposet(xindex.hub_pod());
393 
394  // Postconditions:
395 
396  ensure(!contains_subposet(xindex));
397 
398  // Exit:
399 
400  return;
401 }
402 
403 const sheaf::scoped_index&
406 {
407  return _subposet_index_ub;
408 }
409 
412 subposet_ct() const
413 {
414  return hub_id_space().ct();
415 }
416 
420 {
421  // Preconditions:
422 
423  // Body:
424 
425  index_space_iterator& result = hub_id_space().get_iterator();
426 
427  // Postconditions:
428 
429  ensure(hub_id_space().allocated_iterator(result));
430 
431  // Exit:
432 
433  return result;
434 }
435 
436 void
439 {
440  // Preconditions:
441 
442  require(hub_id_space().allocated_iterator(xitr));
443 
444  // Body:
445 
446  hub_id_space().release_iterator(xitr);
447 
448  // Postconditions:
449 
450  // Exit:
451 
452  return;
453 }
454 
455 bool
458 {
459  // Preconditions:
460 
461  // Body:
462 
463  bool result = hub_id_space().contains(xindex);
464 
465  // Postconditions:
466 
467  // Exit:
468 
469  return result;
470 }
471 
472 bool
474 contains_subposet(const scoped_index& xindex) const
475 {
476  return contains_subposet(xindex.hub_pod());
477 }
478 
479 // PROTECTED MEMBER FUNCTIONS
480 
481 // PRIVATE MEMBER FUNCTIONS
482 
483 
484 // ===========================================================
485 // ID SPACE FACET
486 // ===========================================================
487 
488 // PUBLIC MEMBER FUNCTIONS
489 
492 id_spaces() const
493 {
494  return _id_spaces;
495 }
496 
500 {
501  return _id_spaces.hub_id_space();
502 }
503 
504 const sheaf::scoped_index&
506 hub_id() const
507 {
508  // Preconditions:
509 
510  // Body:
511 
512  const scoped_index& result = subposet_index_ub();
513 
514  // Postconditions:
515 
516  ensure(result.is_hub_scope());
517 
518  // Exit:
519 
520  return result;
521 }
522 
526 {
527  // Preconditions:
528 
529  // Body:
530 
531  scoped_index result(hub_id());
532  result = xid;
533 
534  // Postconditions:
535 
536  ensure(result.is_hub_scope());
537  ensure(result.pod() == xid);
538 
539  // Exit:
540 
541  return result;
542 }
543 
544 // PROTECTED MEMBER FUNCTIONS
545 
546 // PRIVATE MEMBER FUNCTIONS
547 
548 
549 // ===========================================================
550 // SUBPOSET NAME FACET
551 // ===========================================================
552 
553 // PUBLIC MEMBER FUNCTIONS
554 
558 {
559  return _subposet_name_map;
560 }
561 
565 {
566  return _subposet_name_map;
567 }
568 
569 // PROTECTED MEMBER FUNCTIONS
570 
571 // PRIVATE MEMBER FUNCTIONS
572 
573 
574 // ===========================================================
575 // SUBPOSET MEMBERSHIP FACET
576 // ===========================================================
577 
578 // PUBLIC MEMBER FUNCTIONS
579 
580 const sheaf::scoped_index&
583 {
584  return _subposet_member_index_ub;
585 }
586 
587 void
590 {
591  // Preconditions:
592 
593  require(xub.same_scope(subposet_member_index_ub()));
594 
595  // Body:
596 
597  if(_subposet_member_index_ub < xub)
598  {
599  _subposet_member_index_ub = xub.pod();
600 
601  index_space_iterator& itr = hub_id_space().get_iterator();
602  while(!itr.is_done())
603  {
604  _subposets[itr.pod()]->members()->extend_to(_subposet_member_index_ub.pod());
605  itr.next();
606  }
607  hub_id_space().release_iterator(itr);
608  }
609 
610  // Postconditions:
611 
612  ensure(subposet_member_index_ub() >= xub);
613 
614  return;
615 }
616 
617 bool
620 {
621  // Preconditions:
622 
623  require(contains_subposet(xindex));
624 
625  // Body:
626 
627  bool result = _subposets[xindex]->is_dof_subposet();
628 
629  // Postconditions:
630 
631  // Exit:
632 
633  return result;
634 }
635 
636 bool
638 is_dof_subposet(const scoped_index& xindex) const
639 {
640  // Preconditions:
641 
642  require(contains_subposet(xindex));
643 
644  // Body:
645 
646  bool result = _subposets[xindex.hub_pod()]->is_dof_subposet();
647 
648  // Postconditions:
649 
650  // Exit:
651 
652  return result;
653 }
654 
655 void
658 {
659  // Preconditions:
660 
661  // Body:
662 
663  // Remove member from all subposets.
664 
665  index_space_iterator& itr = hub_id_space().get_iterator();
666  while(!itr.is_done())
667  {
668  _subposets[itr.pod()]->members()->put(xindex, false);
669 
670  itr.next();
671  }
672  hub_id_space().release_iterator(itr);
673 
674  // Postconditions:
675 
676  // Exit:
677 
678  return;
679 }
680 
681 void
684 {
685  delete_poset_member(xindex.hub_pod());
686 }
687 
688 bool
691  pod_index_type xmbr_index) const
692 {
693  // Preconditions:
694 
695  require(contains_subposet(xsubposet_index));
696 
697  // Body:
698 
699  bool result =
700  (*_subposets[xsubposet_index]->members())[xmbr_index];
701 
702  // Postconditions:
703 
704  // Exit:
705 
706  return result;
707 }
708 
709 bool
711 subposet_contains_member(const scoped_index& xsubposet_index,
712  const scoped_index& xmbr_index) const
713 {
714  // Preconditions:
715 
716  require(contains_subposet(xsubposet_index));
717 
718  // Body:
719 
720  bool result =
721  (*_subposets[xsubposet_index.hub_pod()]->members())[xmbr_index.hub_pod()];
722 
723  // Postconditions:
724 
725  // Exit:
726 
727  return result;
728 }
729 
730 // PROTECTED MEMBER FUNCTIONS
731 
732 // PRIVATE MEMBER FUNCTIONS
733 
734 
735 // ===========================================================
736 // STANDARD SUBPOSETS FACET
737 // ===========================================================
738 
739 // PUBLIC MEMBER FUNCTIONS
740 
744 {
745  return _coarsest_common_refinement;
746 }
747 
748 const sheaf::subposet&
751 {
752  return _coarsest_common_refinement;
753 }
754 
758 {
759  return _coarsest_common_refinement_jims;
760 }
761 
762 const sheaf::subposet&
765 {
766  return _coarsest_common_refinement_jims;
767 }
768 
772 {
773  return _whole;
774 }
775 
779 {
780  return _jims;
781 }
782 
786 {
787  return _table_dof_subposet;
788 }
789 
790 const sheaf::subposet&
793 {
794  return _table_dof_subposet;
795 }
796 
800 {
801  return _row_dof_subposet;
802 }
803 
804 const sheaf::subposet&
807 {
808  return _row_dof_subposet;
809 }
810 
811 int
814 {
815  return _standard_subposet_ct;
816 }
817 
818 void
821 {
822  // Preconditions:
823 
824  // Body:
825 
826  _standard_subposet_ct = xct;
827 
828  // Postconditions:
829 
830  ensure(standard_subposet_ct() == xct);
831 
832  // Exit:
833 
834  return;
835 }
836 
837 // PROTECTED MEMBER FUNCTIONS
838 
839 // PRIVATE MEMBER FUNCTIONS
840 
841 
842 // ===========================================================
843 // ANY FACET
844 // ===========================================================
845 
846 // PUBLIC MEMBER FUNCTIONS
847 
848 bool
850 is_ancestor_of(const any* xother) const
851 {
852  bool result;
853 
854  // Preconditions:
855 
856  // Body:
857 
858  result = dynamic_cast<const poset_powerset_state*>(xother) != 0;
859 
860  // Postconditions:
861 
862  // Exit
863 
864  return result;
865 }
866 
869 clone() const
870 {
871  poset_powerset_state* result = 0;
872 
873  // Preconditions:
874 
875  // Body:
876 
878 
879  not_implemented();
880 
881  // Postconditions:
882 
883  ensure(result != 0);
884 
885  // Exit
886 
887  return result;
888 }
889 
890 bool
892 invariant() const
893 {
894  bool result = true;
895 
896  // Preconditions:
897 
898  // Body:
899 
900  if(invariant_check())
901  {
902  // Prevent recursive calls.
903 
904  disable_invariant_check();
905 
906  invariance(subposet_member_index_ub().is_hub_scope());
907  invariance(subposet_member_index_ub() >= 0);
908 
909  // @todo implement remaining assertions in poset_powerset_state::invariant
910 
911  // for all subposets in _subposets: name != 0 implies _name_table[name] = index
912 
913  enable_invariant_check();
914  }
915 
916  // Postconditions:
917 
918  // Exit
919 
920  return result;
921 }
922 
923 // PROTECTED MEMBER FUNCTIONS
924 
925 // PRIVATE MEMBER FUNCTIONS
926 
927 
928 // ===========================================================
929 // NONMEBER FUNCTIONS
930 // ===========================================================
931 
932 std::ostream&
933 sheaf::
934 operator<<(std::ostream &os, const poset_powerset_state& p)
935 {
936 
937  // Preconditions:
938 
939  // Body:
940 
941  os << endl
942  << "ROW GRAPH SUBPOSETS" << endl
943  << "-------------------" << endl
944  << endl;
945 
946  os << "Subposets" << endl
947  << "---------" << endl
948  << endl;
949 
950  size_type lmax_name_len = 0;
951 
952  // Find the length of the longest name
953 
955  while(!itr.is_done())
956  {
958  p.subposet_name_map().all_names(itr.pod());
959 
961  lname_list.begin();
962 
963 
964  while(lname_itr != lname_list.end())
965  {
966  size_type lname_len = lname_itr->size();
967  lmax_name_len = (lname_len > lmax_name_len) ? lname_len : lmax_name_len;
968  ++lname_itr;
969  }
970 
971  itr.next();
972  }
973 
974  const int ID_WIDTH = 8;
975  int lname_width = lmax_name_len + 2;
976  itr.reset();
977  scoped_index lid(p.hub_id_space());
978  while(!itr.is_done())
979  {
980  lid = itr.pod();
981 
982  // Output the id; must be fixed length test field.
983 
984  stringstream lstr;
985  lstr << lid;
986 
987  os << "index: " << setw(ID_WIDTH) << right << lstr.str();
988 
990  p.subposet_name_map().all_names(itr.pod());
991 
993  lname_list.begin();
994 
995  string lfirst_name;
996  if(lname_itr != lname_list.end())
997  {
998  lfirst_name = *lname_itr;
999  ++lname_itr;
1000  }
1001 
1002  os << " " << setw(lname_width) << left << lfirst_name << right
1003  << " " << *p._subposets[itr.pod()]
1004  << endl;
1005 
1006  while(lname_itr != lname_list.end())
1007  {
1008  os << setw(7 + ID_WIDTH) << " "
1009  << " " << setw(lname_width) << left << *lname_itr << right
1010  << endl;
1011  ++lname_itr;
1012  }
1013 
1014  itr.next();
1015  }
1016 
1018 
1019  // Subposet id space family.
1020 
1021  os << endl
1022  << "Subposet Id Space Family" << endl
1023  << "----------------------" << endl
1024  << endl;
1025 
1026  os << p.id_spaces()
1027  << endl;
1028 
1029 
1030  // Postconditions:
1031 
1032  // Exit
1033 
1034  return os;
1035 }
1036 
1037 size_t
1038 sheaf::
1039 deep_size(const poset_powerset_state& xp, bool xinclude_shallow)
1040 {
1041  size_t result;
1042 
1043  // Preconditions:
1044 
1045  // Body:
1046 
1047  result = xinclude_shallow ? sizeof(xp) : 0;
1048 
1049  // Add the contributions from _id_spaces.
1050 
1051  result += deep_size(xp._id_spaces, false);
1052 
1053  // Add the contributions from _subposets
1054 
1055  result += deep_size(xp._subposets, false);
1056 
1057  // Add the contributions from _subposet_name_map.
1058 
1059  // @issue Should we be calculating the size of the name map, or are the
1060  // names owned by a different class.
1061 
1062  result += deep_size(xp._subposet_name_map, false);
1063 
1064  // Determine the deep size of data members:
1065  // subposet _coarsest_common_refinement;
1066  // subposet _coarsest_common_refinement_jims;
1067  // subposet _whole;
1068  // subposet _jims;
1069  // subposet _table_dof_subposet;
1070  // subposet _row_dof_subposet;
1071 
1072  result += deep_size(xp._coarsest_common_refinement, false);
1073  result += deep_size(xp._coarsest_common_refinement_jims, false);
1074  result += deep_size(xp._whole, false);
1075  result += deep_size(xp._jims, false);
1076 
1077  // @issue dof subposets do not have read access.
1078 
1079  //result += deep_size(xp._table_dof_subposet, false);
1080  //result += deep_size(xp._row_dof_subposet, false);
1081 
1082  // Postconditions:
1083 
1084  ensure(result >= 0);
1085 
1086  // Exit
1087 
1088  return result;
1089 }
A client handle for a subposet.
Definition: subposet.h:86
bool in_scope() const
True if and only if scope() contains an entry for pod().
Definition: scoped_index.h:584
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
Definition: scoped_index.h:672
An abstract iterator over the ids of an id space.
subposet & whole()
The members of the current version of this poset.
name_list_type::const_iterator const_name_iterator
The const iterator type for names.
Definition: name_multimap.h:97
pod_type pod() const
The current id in the iteration.
void delete_subposet(pod_index_type xindex)
Deallocate the subposet with index xindex.
The data structure representing the state of a subposet.
const name_list_type & all_names(index_type xindex) const
All names associated with index xindex.
bool contains_subposet(pod_index_type xindex) const
True if and only if there exists a subposet with index xindex.
std::list< std::string > name_list_type
The type of name list for this map.
Definition: name_multimap.h:87
A partial multi-valued relation with total injective inverse between names and indices of type index_...
Definition: name_multimap.h:63
STL namespace.
subposet & coarsest_common_refinement_jims()
The jims of the coarsest_common_refinement (mutable version).
subposet & table_dof_subposet()
The table dof subposet when this poset is used as a schema (mutable version).
pod_index_type new_subposet(bool xinitializ)
Allocate a new subposet. If xinitialize, make the subposet empty,.
virtual void next()=0
Makes id() the next id in the iteration.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to current.
An implementation of class sum_index_space_handle that has a primary sum id space state...
const hub_index_space_handle & hub_id_space() const
The hub id space.
poset_powerset_state(size_type xcapacity, const scoped_index &xsubposet_member_index_ub)
Creates an instance with initial space for xcapacity subposets each of which has an index upper bound...
bool same_scope(const scoped_index &xother) const
True if and only if this is in the same id space as xother.
Definition: scoped_index.h:464
subposet & row_dof_subposet()
The row dof subposet when this poset is used as a schema (mutable version).
virtual void reset()=0
Restarts the iteration.
bool is_hub_scope() const
True if and only if the id space of this is the hub id space.
Definition: scoped_index.h:575
subposet & jims()
The jims of the current version of this poset.
Abstract base class with useful features for all objects.
Definition: any.h:39
void release_subposet_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the subposet iterator pool.
bool is_done() const
True if iteration is finished.
virtual poset_powerset_state * clone() const
Make a new instance of the same type as this.
index_space_iterator & get_subposet_id_space_iterator() const
Allocates an id space iterator over the subposet ids from the iterator pool.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
void delete_poset_member(pod_index_type xindex)
Removes the poset member with index xindex from all subposets.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
bool is_dof_subposet(pod_index_type xindex) const
True, if the subposet with index xindex is a dofs subposet.
void put(const index_space_handle &xid_space, pod_type xpod)
Set the scope to id space, xid_space and pod() to xpod.
Definition: scoped_index.h:332
const scoped_index & hub_id() const
A id in the hub id space; intended for copying to initialize ids to the hub id space.
const index_space_family & id_spaces() const
Collection of id spaces for this poset powerset.
size_type subposet_ct() const
The number of subposets.
void put_subposet_member_index_ub(const scoped_index &xub)
Sets the upper bound of member index in each subposet to xub.
void put_standard_subposet_ct(int xct)
Put the number of standard subposets automatically allocated by the poset handle constructor.
const scoped_index & subposet_index_ub() const
The upper bound on the subposet index.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
int standard_subposet_ct() const
The number of standard subposets automatically allocated by the poset handle constructor.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
bool invariant() const
Class invariant.
subposet_name_map_type & subposet_name_map()
Bi-directional map between subposet names and indices.
subposet_state & member(pod_index_type xindex)
The subposet with index xindex (mutable version).
Factory and container for a family of id spaces.
const hub_index_space_handle & hub_id_space() const
Hub id space for this poset powerset.
bool subposet_contains_member(pod_index_type xsubposet_index, pod_index_type xmbr_index) const
True if and only if the subposet with index xsubposet_index contains the member with index xmbr_index...
subposet & coarsest_common_refinement()
The coarsest common refinement of all versions of this poset (mutable version).
The set of subsets of a poset.
const scoped_index & subposet_member_index_ub() const
Upper bound of member index in each subposet.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710