SheafSystem  0.0.0.0
ijk_adjacency_index_space_interval.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 IJK_ADJACENCY_INDEX_SPACE_INTERVAL_H
22 #define IJK_ADJACENCY_INDEX_SPACE_INTERVAL_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef FORWARDING_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/forwarding_index_space_handle.h"
30 #endif
31 
32 #ifndef INDEX_SPACE_INTERVAL_H
33 #include "SheafSystem/index_space_interval.h"
34 #endif
35 
36 #ifndef LIST_POOL_H
37 #include "SheafSystem/list_pool.h"
38 #endif
39 
40 namespace fiber_bundle
41 {
42 
43 using namespace sheaf;
44 
45 class ijk_adjacency_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const ijk_adjacency_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
72  static const ijk_adjacency_index_space_interval& new_space(index_space_family& xid_spaces,
73  size_type xub,
74  pod_type xzone_hub_begin,
75  size_type xi_size,
76  size_type xj_size,
77  size_type xk_size);
78 
79 protected:
80 
81 private:
82 
84 
85 
86  // ===========================================================
88  // ===========================================================
90 
91 public:
92 
97 
101  pod_type zone_hub_begin() const;
102 
106  pod_type zone_hub_begin(pod_type xlocal_id) const;
107 
112  void adjacent_zones(pod_type xlocal_id,
113  pod_type& xzone_hub_begin,
114  size_type& xi_ct,
115  size_type& xj_ct,
116  size_type& xk_ct) const;
117 
121  size_type i_size() const;
122 
126  size_type j_size() const;
127 
131  size_type k_size() const;
132 
136  size_type i_vertex_size() const;
137 
141  size_type j_vertex_size() const;
142 
146  size_type k_vertex_size() const;
147 
148 protected:
149 
154 
159 
163  pod_type _zone_hub_begin;
164 
169 
174 
179 
184 
189 
194 
195 private:
196 
198 
199 
200  // ===========================================================
202  // ===========================================================
204 
205 public:
206 
207 protected:
208 
209 private:
210 
212 
213 
214  // ===========================================================
216  // ===========================================================
218 
219 public:
220 
224  virtual const std::string& class_name() const;
225 
229  virtual ijk_adjacency_index_space_interval* clone() const;
230 
231 protected:
232 
233 private:
234 
238  static bool make_prototype();
239 
241 
242 
243  // ===========================================================
245  // ===========================================================
247 
248 public:
249 
253  virtual bool operator==(const index_space_collection& xother) const;
254 
258  virtual size_type deep_size(bool xinclude_shallow) const;
259 
260 protected:
261 
265  virtual ijk_adjacency_index_space_interval& operator=(const index_space_collection& xother);
266 
271  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
272 
273 private:
274 
276 
277 
278  // ===========================================================
280  // ===========================================================
282 
283 public:
284 
288  virtual void remove(pod_type xlocal_id);
289 
293  virtual size_type ct(pod_type xlocal_id) const;
294 
296 
300  virtual pod_type begin(pod_type xlocal_id) const;
301 
303 
307  virtual pod_type end(pod_type xlocal_id) const;
308 
309 
311 
315  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
316 
321  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
322 
327  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
328 
333  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
334 
339  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
340 
344  virtual bool is_persistent(pod_type xlocal_id) const;
345 
346 protected:
347 
348 private:
349 
351 
352 
353  // ===========================================================
355  // ===========================================================
357 
358 public:
359 
364  virtual void new_product_structure(pod_type xlocal_id,
365  const abstract_product_structure& xproduct);
366 
370  virtual void delete_product_structure(pod_type xlocal_id);
371 
375  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
376 
380  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
381 
385  virtual bool has_product_structure(pod_type xlocal_id) const;
386 
387 protected:
388 
389 private:
390 
392 
393 
394  // ===========================================================
396  // ===========================================================
398 
399 public:
400 
405  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
406 
410  virtual void release_id_space(index_space_handle& xid_space) const;
411 
416  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
417 
418 protected:
419 
424 
425 private:
426 
428 
429 
430  // ===========================================================
432  // ===========================================================
434 
435 public:
436 
441  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
442 
446  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
447 
452  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
453 
454 protected:
455 
460 
461 private:
462 
464 
465 
466  // ===========================================================
468  // ===========================================================
470 
471 public:
472 
476  virtual bool is_ancestor_of(const any *other) const;
477 
481  virtual bool invariant() const;
482 
483 protected:
484 
485 private:
486 
488 
489 };
490 
491 // ===========================================================
492 // NON-MEMBER FUNCTIONS
493 // ===========================================================
494 
498 SHEAF_DLL_SPEC
499 size_t deep_size(const ijk_adjacency_index_space_interval& xn, bool xinclude_shallow = true);
500 
501 } // end namespace fiber_bundle
502 
503 #endif // ifndef IJK_ADJACENCY_INDEX_SPACE_INTERVAL_H
SHEAF_DLL_SPEC size_t deep_size(const ijk_adjacency_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of ijk_adjacency_index_space_interval& xn.
size_type _j_size
The number of zones in the j direction.
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
size_type _i_size
The number of zones in the i direction.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type pod_type
The "plain old data" index type for this.
size_type _i_vertex_size
The number of vertices in the i direction.
Abstract base class with useful features for all objects.
Definition: any.h:39
An implemenation of index_space_collection that adds an interface for the interval [begin()...
size_type _k_vertex_size
The number of vertices in the k direction.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
size_type _k_size
The number of zones in the k direction.
list_pool< forwarding_index_space_handle > _handles
The handle pool.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
An implementation of index_space_interval for an interval of implicit id spaces for the adjacency of ...
A collection of id space states. This is a virtual class with provides an interface for accessing the...
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
Namespace for the sheaves component of the sheaf system.
size_type _j_vertex_size
The number of vertices in the j direction.
pod_type end() const
Ending space id of this interval in the id space family scope.
virtual bool contains(pod_type xlocal_id) const
True if this collection contains the id space with local id xlocal_id.
Factory and container for a family of id spaces.
ijk_adjacency_index_space_interval(const ijk_adjacency_index_space_interval &xother)
Copy constructor; disabled.
Namespace for the fiber_bundles component of the sheaf system.
pod_type begin() const
Beginning space id of this interval in the id space family scope.
A reallocated pool of objects of type T. Objects in the pool are either allocated or stored in a free...
Definition: list_pool.h:42
list_pool< ijk_adjacency_implicit_index_space_iterator > _iterators
The iterator pool.